source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
Safety of using microcontrollers such as Arduino I have been learning how to work with Arduino Uno R3, and it seems very intuitive and exciting for me. As many agree, I see lots of benefits of learning to use it at a young age. I would like to start a volunteer class for the local kids in my neighbourhood to teach them how to start small projects with the Arduino. This also includes learning how to work with a breadboard and other related devices and objects that go along with creating cool projects with Arduino. What are the safety concerns of teaching 10 to 15 year olds to work with an Arduino (or similar) microcontrollers? Is there an existential risk that is high enough to make it a bad idea, legally or otherwise, to teach such a course to kids that age? <Q> The biggest risks are that they destroy the equipment, not that they get hurt. <S> At least not until you introduce them to soldering irons! <S> I would recommend not using lithium ion batteries for power - since they can explode if shorted. <S> Regular AA batteries will get hot if shorted (enough to cause burns/fires after awhile) but arent likely to explode. <S> The best power supply would be one with an adjustable current limit which helps avoid damaging equipment or people. <S> Some components like capacitors can explode if run over their voltage rating or with polarity reversed - sometimes with a very scary bang. <S> But even that isnt too risky unless it gets in your eyes. <S> As long as they dont do anything incredibly stupid they will be fine. <S> (As an example of "incredibly stupid" - in our high school electronics lab someone decided to find out what happens if you short out a 120v electrical outlet with a piece of solder. <S> The answer is that it glows for a second, then violently explodes and sprays molten solder a good 10-15 feet. <S> I recommend not repeating that experiment!) <A> This probably goes without saying, but avoid using power sources with significant "oomph", or have some mechanism that limit the current/power that is hard to get around. <S> Certainly less than 12V is good, and preferably limit to 1A or less. <S> Along with 1, batteries are trouble (namely Lithium based batteries). <S> They generally can provide a lot of current when shorted, and in the case of Lithium-based batteries (Li-ion, Li-Po), can catch fire if abused. <S> Polarized capacitors are trouble (electrolytics/tantalum). <S> When reverse biased, they don't behave like capacitors, but usually like a short. <S> With enough current, the capacitor will heat up. <S> In the case of electrolytics the electrolyte will evaporate, and the cap will burst. <S> I believe tantalum ones will catch fire. <S> Note that there are bipolar (non-polar) electrolytic capacitors. <S> These are perfectly fine to use. <S> These include (but are not limited to): a. Turning off/disconnecting all power sources before modifying a circuit <S> b. Keep circuits relatively well organized (you may want to provide layouts for the students to build). <S> This will not only reduce errors, but hopefully will make debugging easier, and decreases the likelihood of anything dangerous happening. <S> c. <S> Double checking (or triple checking) never hurts. <S> You'd be surprised (or maybe not so surprised) how often students ask why their circuit isn't working just to find an obvious problem because it was "too simple" for them to check. <S> That being said, it sounds like a perfectly fine idea to me teaching kids about circuits. <A> Safety? <S> There is only one thing to be done. <S> Teach them not to stick their faces directly over the circuit. <S> Stand back when you turn on the circuit "just in case". <S> A few "flame ons" here <S> and there will then only hurt your pocket book and make you look sooooo much cooler. <S> Faux danger and learning all in one. <S> Learning by explosion/smoke/heat is as valid as any other and perhaps more so. <A> The only risk I can think of is short circuiting. <S> If they are working with batteries make sure to explain this. <S> The danger of short circuiting is for one that it can make the wires really hot. <S> If a battery is short circuited with something of low resistance, like a wire, it could potentially cause the battery to explode. <S> The Arduino limitations should be taught as well, so they don't damage the controller, for example (by a too high current drawn from and/or too high input voltage on pins). <A> I was breadboarding with TTL from an early age, back in the days when solder had a lot more lead, a TV chassis was live, and mercury tilt switches were clear glass bulbs freely sold with no awkward questions. <S> Steel wool and jumper cables were the limit of our destructive nature. <S> Although not many speaker cones survived for long either. <S> Once or twice we did very dangerous things with multi-tapped transformers and CRT yokes from those same TV's. <S> We did this in sheds where asbestos was routinely cut and nibbled. <S> One of my lay friends went home one day and told his parents I made bombs in the garage. <S> This took a while to die down even in those days. <S> As for short circuiting, the "crowbar" approach always held an allure. <S> After all it does protect everything downstream and the fuse is serving a purpose. <S> Nowadays every home should have RCD/earth leakage protection and our work areas <S> a big fat red mushroom switch. <S> Boards and shields with screw terminals and pins are way safer. <S> My wife has a Master's and does not what to do with a soldering iron. <S> Should you get your Raspberry Pi on and teach them to code instead ? <S> If anything this is more dangerous and they probably won't learn any more Python once they realise that C projects run 10 times faster. <S> It bothers me dreadfully that these processors are often used as sledgehammers to drive in thumbtacks. <S> Many applications could be served by dedicated devices such as 555 timers or counter-scalers. <S> Maybe we just like to dabble. <S> Anticipate fire, anticipate burns. <S> A bucket of sand for fire. <S> (I still wonder how we could make DC powerpacks for 5V and 12V and use the same connectors) - can't have halon any more either. <S> Of course, then there is the risk from the project. <S> Let's say a controller for a live steam engine. <S> What are the risks from a sketch gone bad ?
| Electricity at the voltages used in microcontrollers isnt going to hurt anyone. Do encourage good circuit practices from the start.
|
How do the cassette tape adapters get their energy I was wondering where the cassette tape adaptors get their energy, looking at this image http://car-mods.wonderhowto.com/how-to/hack-your-cars-cassette-deck-into-wireless-bluetooth-music-player-0139843/ there is clearly some electronics. I can't see any dynamo however. Is the energy harvested from the audio signal? Edit: As it seems I was too fast in searching for an image. Here is an other one taken from : http://i23.photobucket.com/albums/b371/2wildthing/CassetteAdaptorInside2.jpg which shows less of electronics. Maybe the system is all passive. I was somehow assuming that still some kind of conversion had to take place, even though the audio signal and the storage on the magnetic tape is analogue. If you find better tags, feel free to add them. <Q> Standard cassette tape adapters have no active circuitry. <S> The audio signal is simply wired directly to the tape head, like this... <S> Your image shows an adapter which has been hacked to include the circuit from a Bluetooth stereo headset. <S> It is described here... <S> How to Hack Your Car's Cassette Deck into a Wireless Bluetooth Music Player <S> There is no harvesting involved. <A> Consider that a real audio-cassette is "nearly" passive; the motion of the magnetic field on the tape past the coils in the read head produces a tiny, tiny signal which is amplified by the circuitry in the player. <S> Most inexpensive headphones are entirely passive, after all. <A> A microphone input provides a little power because it must be compatible with an electret microphone with a built-in one-FET amplifier. <S> I guess thus little power will be enough for the tapehead-to-microphone amplifier you show.
| For the common audio-cassette adapter that plugs into an MP3 player or other source, the headphone-level signal is more than strong enough to produce a signal at a similar level. A small Lipo battery is probably hiding under the pcb, similar to this...
|
Reverse biased capacitor on IC input pin I am looking at the test circuits on the data sheet for the AN6884 VU meter IC, and I cannot understand the connection to pin 8 in the following diagram: Pin 8 accepts a positive input voltage. The potentiometer is clear, but the 2.2uf capacitor is not. It appears to be reversed. If I "correct" the orientation, the circuit does not work at all. That's clear, because the input in my test circuit is DC. This circuit will light the LEDs as the input voltage on pin 8 increases relative to pin 7. As displayed, the LEDs go from fully off to fully on over roughly the entire turn range of the potentiometer. If I remove the 2.2u capacitor, the circuit works, but the range of the potentiometer is greatly reduced. That is to say that the LEDs all come on at a much smaller turn of the potentiometer. Can someone explain what the reversed capacitor is doing here? <Q> Your description doesn't agree with that in the datasheet . <S> Pin 7 is the output of the internal amplifier, and pin 8 is its input, designed to accept a low-level AC input (57 mV for a 0-dB indication). <S> It sounds like you're trying to drive this circuit with a signal that includes a considerable DC bias, which explains why all of the LEDs light up right away when you remove (short out) <S> the capacitor. <S> However, if that's the case, I can't explain why reversing the capacitor doesn't work, unless the actual polarity of the capacitor is backwards from what you think it is. <S> Have you tried a non-polarized capacitor (e.g., ceramic)? <A> The bias current is specified as -1 µA min. <S> , 0 µA <S> max.. <S> That means there is a small current flow out from the pin. <S> So it determines the DC bias of the block capacitor's polarity. <A> you only need to add a 4148 diode forward biased aiming at pin 8 from you wiper on the pot. <S> also add a 1uf from pin 8 to ground. <S> the original cap is in correctly. <S> your just missing the am demodulator <S> the circuit is just like in a diode detector but larger caps.
| Per AN6884'd datasheet , Pin 8 is the signal input pin, and it's the internal Op amp's positive input.
|
How often do AVR's actually glitch and need a watch-dog reset in the real-world? Have you ever seen an otherwise happy AVR spontaneously glitch and require a reset? Assuming: a nice stead power supply that stays inside the specified range a correctly sized decoupling cap directly between Vcc and ground normal (not too noisy) household conditions ...what is the real-world MTB glitches? I've had hundreds of AVR's running for years and I don't think I ever have seen a real glitch, but maybe I am just lucky? Note that I know that you should always use a watchdog, I know. Don't flame me - but if the likelihood of glitches is very low, there could be applications where it would be reasonable to maybe not use the watchdog to get lower power usage in sleep. Note also that I understand that the watchdog also protects you from firmware bugs, but I am only asking about spontaneous hardware glitches. <Q> Cosmic ray hits and SEU (Single event upsets) are very real. <S> Just look up data about DRAM and the need for ECC (Error correcting) and from that you should be able to get a sense for the probability vs. area. <S> Some processes are less prone, and smaller processes while being more sensitive also present a smaller capture cross section, sometimes that is a benefit and sometimes not. <S> Keep those watch dogs running! <A> It is just about impossible to practically guarantee that, say, a nearby lighting strike will not have enough EMI energy to cause a problem. <S> In space applications, the earth's magnetic field does not have the usual shielding effect, so random upsets are more likely than on earth (but still non-zero in either case). <S> The chances of a small self-contained system (no inputs or output and battery powered) seeing an upset are much less than if there are wires attached. <S> There are plenty of systems out there without watchdogs and without proper reset circuits- <S> if the cost of a lockup is low, nobody cares (just cycle the power!). <S> If the cost is high then using a WDT (internal or external), redundant processors, mechanical overrides or other means may be desirable. <S> Unused memory may be filled with jumps to a cold-start routine, and other techniques can be used. <S> I'm sure there are a lot of WDTs in use that are pretty much useless because they're being kicked by an ISR or something silly like that. <A> Interesting official word from ATMEL: <S> Hello Josh, I understand that you’re concerned about the interrupt control bits getting flipped randomly. <S> This could not happen unless they’re somehow modified in the firmware or the device is kept in a noisy environment that could cause flash corruption. <S> To prevent the possibility of flash corruption, please refer to the device datasheet section 18.7 Preventing flash corruption. <S> As long as the design conforms to the considerations mentioned for preventing flash corruption, there is no possibility of the interrupt control bits getting corrupted in the device. <S> Hope this clarifies. <S> Please get back to us in case of further queries. <S> Best regards, Ineyaa <S> N Atmel Support Team <S> UPDATE <S> One year later, I now have 10's of thousands of these little AVRs out in the world running 24x7 <S> and so far I have not seen a single case of a spontaneous glitch. <S> Pretty amazing. <S> Will update next year! <A> Well... in typical environment and modern microcontrolers it is not often. <S> So rare that its hard to measure and determine it. <S> It depends on many factors, including unndesireable events on production line. <S> Hardware glitches should never happen in not damaged microcontroller working in normal environment, so datasheets don't say anything about reliability. <S> I personally don't use watchdog very often, because many of my projects just don't require such protection. <S> When I use it - I use it for: extra software bug protection <S> partially damaged microcontroller protection <S> Im only using it when: microcontroler drives some expensive peripherials (big transistors with big load) for safety reasons with circuits related with mains somehow or when microcontroller drives something that may destroy something or harm someone when data processed in microcontroller must be very reliable
| You can reduce the likelihood with good design, but unless the system is in a Faraday cage with magnetic shielding and heavily filtered feedthroughs there is some possibility of an upset. Modern processors (and better software design) can support reset on anomalies even without a WDT- for example, if the program counter goes out of range. Depends on the environment and the configuration.
|
Can an opto-isolated input be analog? Title says it all: can an opto-isolated input be analog or are they intrinsically digital? Why: I am looking to purchase a relay control board and am deciding between a few options. Here is my primary option , however I need 5 analog inputs and this one states that it has opto-isolated inputs. Could those be analog? EDIT: Page 6 of the user manual has each opto-isolated line connected to a digital and an analog input pin. Does this mean it can accept analog (voltage) inputs? <Q> In the context of the O.P.'s I/O box It comes with full schematic . <S> That could enable a little bit of hacking. <S> If I'm reading the schematic correctly, the opto-coupled inputs are connected to PC1/ADC1, PC2/ADC2, PC3/ADC3 on the ATMega. <S> If U9, which is the opto-coupler IC, is removed then the ADC lines can be connected directly to the outside connectors. <S> That would create 3 straight analog inputs. <S> Outside of the context of the O.P.'s relay I/O board. <S> More generally. <S> This is usually done with specialized opto-couplers, such as LOC series. <S> (source: IXYS application note AN-107 ) <S> These types of circuits aren't neatly as common as digital opto-couplers, though. <A> The description of that board, and its user manual, indicate that it has only three analog inputs. <S> The opto-isolated inputs are digital. <A> To answer the larger question, optocouplers can be analog in the current domain; The "DC current transfer ratio" (CTR DC ) describes the current gain/attenuation provided by the coupler. <A> You need more answers to believe, ok. <S> As you can see in the post from Nick Alexeev it is possible to make opto isolated analog inputs, but you have to make quite some effort to do it. <S> To get enough precission for an AD converter even the effort shown in Nicks circuits is not enough. <S> Be shure if that cheap box could do that, it would be written with BIG letters. <S> The table on page 6 in the manual shows only that the signals from the isolated inputs are connected to arduino inputs that could be used as analog or digital inputs. <S> I'm sure they are intended as digital inputs. <S> Eventually you can change these inputs to analog, but the (more or less) linear area would be only a smal part of the input voltage range <A> I use an LOC111 bu <S> it is expensive for some project.plese see this Analog Signal Isolation through Digital Opto-coupler (YOUTAB) and use this way <S> it is small and it is very good for 4-20ma input because only use on side power supply. <S> I send my work maybe help you. <S> I use this for 4-20ma <S> but you can change some port of circuit and use for your propose. <S> Block diagram <S> I/ <S> O wave form <S> band Width simple diagram
| Yes, an analog input can be opto-isolated.
|
Basic working principle of transformer In a transformer power is conserved and p=vi. So, in a step up transformer, if secondary voltage is increased the secondary current has to decrease . Now, my question is, if the secondary winding in connected to a constant load, v=ir rule implies, if secondary voltage is increased the secondary current has to increase. These two sentences contradict each other. <Q> To make it easier to understand lets make a couple of simplifications: we have an ideal transformer <S> That transformer has no limits of power transfer. <S> This ideal transformer will transfer energy form the primary to the secondary with fixed ratio of voltage in to voltage out. <S> Really it's the ratio of the windings, but lets just assume for now that the voltage is an easy 1: <S> N for every 1 volts in you get N volts out. <S> You place your resistor across the output and it dissipates power. <S> You know the voltage, therefore you can measure/calculate the current on the secondary and get the power dissipated. <S> Because the voltage of the primary is less and the power transferred (remember it is idea) <S> is exactly 1: <S> N then the current will increase by NX on the primary. <S> If you change the load resistance the current(s) will change. <S> If you remove the load, the secondary current drops to zero. <S> 0 <S> X N = 0 <S> and therefore no current flows in the primary. <S> The right way to look at it is that the primary current flow will "see" the secondary's load at a scaling factor of \$N^2\$. <S> The current changes appropriately. <S> Now for the real part: real transformers have limits on the amount of power that they can transfer. <S> This is the "watt rating" <S> so pulling 10 watts through a 40 W transformer, you can use those simplifying assumptions and call it ideal. <S> AS you get closer to the 40 W limit then non-idealities come into it. <A> Basically, the transformer don't generate energy, it only transfer energy from one side to another side, <S> that is why it's called transform ER . <S> Omit the various loss in the transfer, the power on the two side always equal. <S> Assume your secondary connects to a "constant load", such a fixed resistor. <S> And you make the the voltage on the resistor rise, so the current flows in the resistor should rise, too. <S> But think again, how and why can the voltage on the secondary rise? <S> How do you make them both rise without improve the power input on the primary side? <S> That just is the " Conservation of energy ". <S> If the power on the primary side is fixed , then if the secondary voltage increase, and the secondary current must decrease. <S> If your primary side can supply more energy, then the voltage and current on the secondary side can both increase. <S> The working principle of transformer is electromagnetic induction. <S> For more, go here: http://en.wikipedia.org/wiki/Transformer . <A> For an ideal transformer with no losses, power in = power out. <S> If the transformer is a 2:1 step up transformer then secondary voltage is always twice primary voltage. <S> So, assume you are feeding 16 watts in (4v and 4 amps). <S> This means your output voltage is <S> 8 volts and your output current is 2 amps and this, in turn, implies a secondary load resistance of 4 ohms. <S> If you attach a 20 ohm load to the secondary and you are still forcing 16 watts into your primary then the 20 ohm load will be dissipating 16 watts and this means it has a secondary terminal voltage of 17.89 volts and a current of 1.118 amps. <S> To achieve this (given the turns ratio is fixed), the input power comprises 8.95 volts at 1.789 amps.
| Yes, if the voltage on the resistor rise, the current must rise.
|
Why are null measuring methods considered to be very precise? I heard a professor saying "it's a null method, so it is very precise". He was talking about the force balance pressure measuring method. I think in this cathegory of methods one can include the Wheatstone bridge (with balanced arms) or other methods where a galvanometer is used. But why is this more accurate than other methods? My intuition tells me that the accuracy of a non-zero reading can be "more affected" by many factors..., but i'm not sure... <Q> There are two key benefits of null-balance measuring methods. <S> The first is that the quantity being measured is not affected in any way by the measurement when the system is in balance; i.e., there are no "loading" effects. <S> The second is that since the measurement is always made at the same point on the indicating device, any nonlinearities in the indicating device itself do not affect the measurement at all. <A> In most cases the measuring instrument influences the measured system which results in an error. <S> Sometimes it's not possible to calculate that error and correct the result. <S> In the example of the wheatstone bridge it's the goal to have no current through the instrument. <S> When this current is zero, the electrical properties of the instrument have no influence on the circuit. <S> You can use the most sensitive instrument available and ignore the internal resistance, it doesn't matter. <S> As the example from your professor shows, it seems that this principle can be transfered to non electric measurements. <A> In general, you can achieve a null much more easily and more precisely than if you were to attempt to achieve a peak value. <S> Achieving a precise peak means, for example, being able to tell the difference between 10.000 units and 10.001 units, while achieving a precise null means being to tell the difference between 0.000 units and 0.001 units. <S> Errors affect the former measurement more than the latter measurement.
| The only requirement is that the indicating device must have good "repeatability", which means that it always comes back to the same point for the same quantity being measured, regardless of its previous history.
|
How can a resistor affect current AND potential at the same time? Though the resistor is always introduced as one of the most simple components it is the one which makes least sense to me. Ohm's law defines the resistance as$$R = \frac{V}{I}$$ this means that the voltage is defined as $$V = I \cdot R$$ and the current as $$I = \frac{V}{R}$$. So following the law a resistor must affect both voltage and current however the reality is that it only changes one size. To lower the voltage To lower the current This does not make much sense to me because in my understanding voltage and current must be lowered both but in the common LED resistor example it only affects one size: $$U = 9V\\I = 30mA\\R = 300Ω$$ you also find use cases where only voltage is affected. How do I interpret this? What is the factor which determines if the resistor affects either voltage or current? <Q> There is no factor that determines if the voltage or the current is reduced. <S> That whole concept is erroneous. <S> The simple statement you are looking for is: A Resistor Defines the Relationship Between the Voltage and the Current <S> That is, if the current is fixed, then the resistor defines the voltage. <S> If the voltage is fixed, then the resistor defines the current. <S> In all three of the Ohm's Law formulae you will have two of the three values as fixed values - values you know, through measurement, or whatever, and the third variable is the one you want to find. <S> From there it's simple maths. <S> The LED example, though, throws an extra spanner in the works, since the LED isn't a linear device . <S> So its influence on the circuit is calculated separately before Ohm's Law is applied. <S> You have three known values, and you want to calculate a fourth. <S> The known values you have are: the supply voltage (9V), the LED forward voltage (say, 2.2V as an example), and the current you want to flow through the LED (30mA). <S> From that you want to calculate the value of the resistor. <S> So you subtract the LED's forward voltage from the supply voltage, since those are both fixed voltages, and the result will be the amount of voltage that must be dropped across the resistor for the whole to total 9V. <S> So 9V - 2.2V is 6.8V. <S> That is a fixed voltage. <S> The current you want is fixed too - you have decided on 30mA. <S> So the resistor value is then:$$R=\frac{V}{I}$$$$\frac{6.8}{0.03} = <S> 226.\overline{6} <S> \Omega ≈ <S> 227 <S> \Omega$$You will always have two of the three values as fixed values - either because they are set by external factors, like the power supply or battery voltage, or they are a specific value that you require or desire, when it is you who has set that value. <S> The third value is what must be calculated to make both those fixed values hold true. <A> however the reality is that it only changes one size. <S> Ohm's law relates the voltage across and current through a resistor . <S> For example, consider the simple voltage divider circuit - a voltage source \$V_S\$ and two resistors \$R_1\$, \$R_2\$, connected in series. <S> The series current is just $$I_S = \frac{V_S}{R_1 + R_2}$$ and the voltage across the second resistor <S> is, by Ohm's law, $$V_{R_2} = <S> I_S <S> R_2 = <S> V_S\frac{R_2}{R_1 + R_2} <S> $$ <S> Now, double the resistance of the second resistor <S> \$R'_2 = 2R_2\$ <S> Both the voltage across and current through will change: $$I_S = \frac{V_S}{R_1 + 2R_2}$$ <S> $$V_{R'_2} = <S> I_S <S> R'_2 = <S> V_S\frac{2R_2}{R_1 + 2R_2}$$ <S> Only in the case that the voltage across is fixed by the circuit will only the current through change when the resistance is changed. <S> An example would be a single resistor connected across a voltage source. <S> And, only in the case that the current through is fixed by the circuit <S> will only the voltage across change when the resistance is changed. <S> An example would be a single resistor connected across a current source. <S> In summary, Ohm's law holds for resistors but one must apply it in conjunction with other circuit laws such as KVL and KCL to fully determine the resistor voltage and current. <A> Ohm's law states that the current flowing through a conductor is directly proportional to the voltage applied across the conductor. <S> That means if you increase voltage the current will increase proportionally in the conductor. <S> For example if you have a voltage of one volt across a conductor having a resistance of 1 ohm then the current flowing through the resistor will be 1 amp. <S> If the voltage is increased to 2 volts then the current flowing through the resistor be 2 amps. <S> For 3 volts 3 amps and so on. <S> The basic thing in an electrical circuit is that voltage applied across a fixed circuit alone determines current flowing through the circuit. <S> If you increase voltage the current will increase.
| In general, a change in resistance will change both the voltage across and current through the resistor.
|
Shortest time to visibly light LED What is the shortest time (pulse 010) to visibly light a LED? Visibly = The human eye can see the LED blink. I use 5V as source and PIC16F628A@20MHz for the project. Here is a datasheet for the particular LED (red). Extra question: What is the shortest time needed for the LED to receive max current (20mA) through it? <Q> I was testing this just now. <S> I have set up a function generator to have an amber LED blink at 1 Hz. <S> The generator gives pulses of 5V with variable pulse width (pulse period = 1s). <S> Resistor is 270R. <S> Looking very closely, I am able to see pulses of 150 ns with normal lighting. <A> There is no minimum time, except as set by the maximum LED current, eye noise floor, and perhaps physical damage to the eye. <S> For pulses less than the flicker fusion frequency the eye sees a brief pulse that is proportional to the response-weighted energy (luminous intensity integrated over pulse time). <S> So, if the LED responds linearly, a 10mA pulse for 10ms looks about as bright as a 50mA pulse of 2ms width. <A> It's going to vary by individual and with luminous intensity of the LED you use. <S> With a microcontroller running at 20MHz, you ought to be able to adjust the pulse width in 50ns steps (that's 20 steps per microsecond). <S> Seems like you could set up an experiment and do a study with a representative population of observers to figure out the statistics of when your target population perceives the LED as on. <S> A single pulse perception is quite different from a repetitive pulse perception as the eye acts like a low pass filter. <A> This is a measurement best done through experimentation. <S> When you make the experiment you will have to be cognizant of the duty cycle as well. <S> If you kept the on/off duty cycle at 50% and made the on time shorter and shorter (basically increasing the frequency of the signal) you will note that the LED will appear different at narrower and narrow pulse ON time. <S> On the other hand if you setup the experiment as having the pulse happen at say once per second or so and then narrow up the pulse step by step <S> it may very well become undetectable to the human eye at a wider pulse than the case with the 50% duty cycle. <S> Since you already have a setup with a microcontroller it should be relatively easy to setup to gather the empirical results. <A> When you talk about the eye, you're realling dealing with (at least) two systems. <S> Theres the "hardware" of the eye, i.e. the actual iris, retina, nerves etc, and the "software" of the eye, which is basically the way your brain interperets the signals from your eye. <S> Interestingly, the eye itself can detect individual photons. <S> This is fairly remarkable, as it means that there is technically no light so dim that you cannot see it. <S> This is a problem however, because if your eye could see single photons, there would be large amounts of noise in your vision. <S> This is handled by the "software" side of your vision, which not only processes the signals to turn them into images, it also filters the signals in various ways. <S> Various experiments have concluded that on average (to people accustomed to the dark), 3 photons hitting a rod in close succession looks like a dim light, and anything less than that is not guaranteed to be seen as light by the brain. <S> Remeber also that only a fraction of the light that hits the retina will hit a light detecting cell. <S> Unfortunately this doesn't mean very much for you. <S> I assume that youre not trying to communicate with people who have been in a dark room for half an hour, and so are asking how long you have to light an LED in a normally lit room for it to be seen. <S> As one of the other people said, this can pretty much only be done by experimentation, as it will depend on which direction the led is facing, ambient light levels, specific LED model, etc. <S> Luckily, you're using a microcontroller, so it really is very easy and quick to test different timings. <S> https://en.wikipedia.org/wiki/Absolute_threshold http://math.ucr.edu/home/baez/physics/Quantum/see_a_photon.html <A> usually the human eye cannot perceive variations faster that 30Hz. <S> You should use a 140 ohm series resistor and the LED acts like a capacitance (the C value is not written in the data-sheet). <S> The circuit is an RC circuit and il will charge with a time constant \$\tau=R*C\$
| I fully expect the the shortest visible pulse will vary from person to person so what you find as data for you will probably not be applicable to someone else.
|
What is the lowest noise power source? In particular two cases. 1) Unregulated: Supercap versus battery. 2) Regulated: Best regulation method to power precision low current analog circuits again with battery versus supercaps. I know "best" is dependent on a lot of things. I'm looking for off the shelf linear regulator versus op-amp and precision reference, etc. I'm ignoring power supply and common mode rejection of the rest of the circuit at this point. <Q> If you are sensitive to ultra low noise then the actual series resistance of the power source comes into play. <S> A simple resistance can generate noise which is dependent on temperature. <S> At first I would assume that a perfect capacitor would have less resistive noise then a battery that has some value of internal resistance. <S> Supercaps may have some drawbacks in relation to internal resistance too, (you would need to check the actual specifications). <S> It turns out that even a capacitor can have some internal noise. <S> For some additional info see this wiki that includes calculations for both resistive noise and capacitive noise: http://en.wikipedia.org/wiki/Johnson%E2%80%93Nyquist_noise <S> But if you are taking this battery current or supercap current through a regulator it is most certain that the regulator will generate more noise than the battery/supercap. <A> These are commonly available from multiple vendors (TI, Analog Devices, etc.) <S> and typically can output up to 10mA. <S> If you require additional current, then you can buffer this with a simple op-amp buffer. <A> 1) I would say supercaps in theory are better, but like Nedd says, in practice it depends on equivalent series resistance (ESR). <S> How they each respond to EMI <S> I don't know, but likely, the smaller the component geometry, the better, <S> and you can add shielding, put it underground, etc... <S> Then again you might not need to worry about battery vs supercap. <S> What you want is proper decoupling as close as possible to where the supply voltage/current is used. <S> Also consider the dielectric so your decoupling has a good response at HF, e.g. X7R capacitors work better at HF. <S> 2) <S> For low frequency noise current/voltage regulation, topologies based on JFETs are likely to be best. <S> BJT is better at moderate frequencies and MOSFET at high frequencies. <S> Here's a suggestion for reading: Motchenbacher and Connelly <A> The best voltage source will be regulated with a home brew regulator based on a low noise amplifier, for instance the TI OP211. Having decided on an amplifier, you then need a low noise reference to use with it. <S> At low offsets, up to a few Hz, a buried reference Zener specified for low noise is best. <S> Above a few Hz offset, a lead acid rechargable battery, at 50% state of charge, is reputed to beat out other batteries, and capacitors. <S> Use the buried reference to control your mean voltage, the lead acid to control your noise. <S> If this is too much engineering to achieve 'best' performance, then have a look at regulators from Analog Devices and Hittite, their low noise ones are astonishingly good, but still not as good as you could build from discretes!
| The 'best' solution would be to use a precision voltage reference.
|
Making my own kotatsu I want to make my own kotatsu (a small table with an heating element underneath) and I'm considering using a "heat lamp" as the heat source (one of those aimed at reptiles, fits in a normal light bulb socket) The one I bought supposedly draws 250W at 110-120VAC. Ideally, an Arduino mini pro turns it on/off (SSR) depending on the temperature it reads. My plan would be to screw a small box containing the SSR and the arduino under the table with nothing but insulated wires coming in and out of that box. This would be my first project dealing so closely with alternating current, so I'm keeping safety in mind... and I have many questions: Do you see any problems in using a solid-state relay? I have the FOTEK SSR-25DA, which seems to be rated for 25A. If my math is right, it shouldn't be using much more than 2-3A, right? Even considering it might draw more when turned on, it seems reasonable to my (amateur) eyes... Also, I won't be switching it rapidly (minimum time of say, 10 seconds). I don't think it's going to warm up super fast with a single bulb anyway... I have 22 AWG wires on hand and again, from what I could find on the Internet, they seem to be large enough to handle this kind of current. Still, to my non-electrician eyes, they look small for something carrying 120V and 2-3 amps. Unfounded fears? I'll be using 18AWG stranded wires instead. How could I connect the arduino and the lamp to the same power source? I'm thinking of simply using a power strip on which I'd plug a wall adapter for the arduino... Makes sense? Is there any problem about having the arduino on the same power line as it controls via SSR? I tried my best to make a schematic of what I have in mind. Do you see problems with this setup? simulate this circuit – Schematic created using CircuitLab Anything else you would do differently? Potential safety issues? Thanks! Sorry for the long question! :) <Q> Points 1 and 3 are fine. <S> Regarding point 2, you should never use anything less than AWG18 for mains wiring, no matter how low the current. <S> This is generally required by the electrical code, and it's mainly because of the mechanical robustness issue. <A> The SSR is isolated - OK <S> 25A is more than enough - OK <S> 7.5mA control current - no problem for the arduino - OK 0.64 mm diameter is small and for longer distances not suggested <S> If the arduino and the lamp are movable in relation to each other I would fear that the wire breaks Personaly <S> I would use flexible, braided wire, suited for mains equipment anyway <S> The SSR is isolated, I see no problem <S> I don't know your requirements, eventually a simple dimmer would do the job. <A> A proper kotatsu heater contains an element, proper guards, standoffs, temperature control and sometimes a fan. <S> you can get one on amazon.co.jp for $30, I expect you can find a 120v version readily enough. <S> Don't forget the table skirt or all the heat escapes. <S> And don't sleep under it <S> - people have occasionally set themselves on fire doing that. <S> Dump the coals from dinner into it and set the table on top. <S> @OlinLathrop <S> : Just because you don't know what it is doesn't make it a bad question.
| The heatlamp will probably set your table on fire, and the circuitry, microcontroller and SSR is overkill. The traditional kotatsu is a barbecue pan in a pit below the table.
|
How to identify the type of a microcontroller? Assuming that we have an application which a lot of devices can connect and interact each other (like Internet of Things). Is there a way to identify the micro-controller that each connecting device contain inside? For example to identify if one device has a PIC or an Atmel or else? If not can at least identify if the micro-controller is 8bit vs 16bit or else? edit: Can the firmware return the version of a microcontroller? <Q> If you're only looking at the network traffic, then no, different microcontrollers don't leave different "fingerprints" on the byte streams somehow. <S> How a device behaves on the network is a function of its firmware, not hardware. <S> The hardware has to do the minimum things for the device to work, but the network stack above the MAC layer is going to be implemented in firmware on small and cheap devices. <S> There are standards for what the various layers in the protocol stack are supposed to do, so mostly different implementations will do the same thing. <S> Still, there is some wiggle room, and different implementations will have different quirks while adhering to the standards. <S> You might be able to identify some of these quirks and infer some implementation inside, but that won't be easy and will never be definative. <A> This answer is written on the basic assumption that the OP is choosing the devices and writing the firmware him/herself. <S> The OP indicates this to be true in the comment discussion below the question. <S> Yes, you can certainly include functionality that will identify the device in use. <S> The microcontroller will probably have the ability to read its own memory location in firmware so that it can report those values upon request. <S> How you implement that functionality is entirely up to you. <S> If you're trying to prevent thieves from porting your firmware into other chips, this method will not prove to be very effective. <S> It will be trivial for them to report dummy identification values when requested to make their chip look like another. <A> Your questions seems to be <S> "I have an application (I'm assuming it's on a server or running in the web) <S> how do I identify what is talking to my application?" <S> If you want a micro controller to report an ID or firmware version you need to code it to do that. <S> If you are thinking others will take your code, port and run on another micro then maybe they will. <S> But only if your application is successful enough will people want to do this. <S> Then you can't enforce any changes to the firmware version reporting or anything else. <S> An alternative is to write for all the versions of micro <S> so no one else has to. <S> Not practical IMHO as it's a lot of work. <S> Another is to use some serial number, encryption and individual pass code you only give to legitimate users. <S> Not recommended as it's a pain in the a <S> ***. <S> I have had this with software licenses. <S> Another way would be to release the source code <S> and it contains comments to the coder to include the micro controller type. <S> Here I would insert a table of codes telling them the codes to use. <S> Or you could just tell them to fill in a string description and accept what ever they want. <S> Limit it to 16 characters maybe.
| Most (if not all) microcontrollers will have read-only memory that contains a device ID and a silicon revision number.
|
Why do we need bulky filters at the input stage of SMPS designs? I usually see costly and large filters at the input stage of switch mode power supplies. Isn't the AC signal already filtered by the large capacitor (the 100\$\mu\$F one in this example) after the bridge rectifier? What is the necessity of such an elaborated filter network encircled in red? <Q> If the noise got out that way, it would radiate via the mains wiring and that's an EMC problem. <S> The big capacitor (100uF, 160V) will not be effective for this, due to its ESR and other factors. <S> The filter components specifically filter out the high fequency noise. <A> In this particular instance, the circuit is not using active PFC (power factor control), so I think that the extreme amount of filtering is an attempt to meet regulatory requirements by using "passive" PFC (harmonic filtering) to correct the harmonic distortion created by the rectifier/DC filter combination. <S> Note that the cutoff frequency of the filter is only about 3 kHz, which is much lower than it would need to be if it were just dealing with switching noise from the regulator. <A> It is for removing switching ripple from entering into mains. <S> Because when switching occurs in converter ( SMPS ) ckt at high frequncy ( 50 or 100 k or so ), ripple gets induced in SMPS ckt. <S> By introducing capacitor we try to regulate SMPS output to optimum required value.
| It's to stop high-frequency noise (100kHz or higher) from getting out of the SMPS and onto the mains.
|
What's the hold function on a multimeter for? All it does on my multimeter is freeze whatever value it was reading at the time. When would I need to use this? <Q> I rarely use the feature but for more precise measurements it can be useful. <S> For example if measuring a sensor I might want to make a note that the meter reads 2.984 V and it's more convenient than trying to remember the value while I write it down on a piece of paper or enter the value into a spreadsheet etc. <S> Sometimes too I might be in a position where it's hard to read the meter output at the same time <S> and I can rest my little finger on the hold while positioning the probes. <S> Some higher end meters also have an auto-hold type feature where once the reading becomes stable they will take the measurement and hold the display. <S> That's a feature that I find much more useful because you don't have to keep your eye on the meter at all <S> and they will beep when the measurement is done. <A> You are up a step leader with little light due to the power being turned off… <S> Meters are not just used at nice work benches. <A> Some hold buttons don't do the hold until the meter sees a signal. <S> So you press hold, turn to your circuit, and put the probes on whatever you want to look at; the meter triggers the hold, and you get the reading without having to look at the meter or have a third hand to press the hold button while you're holding the probes. <A> Also you can use it to measure the value after a certain time after you switched something on/off.
| Many uses, for example when you can't read the screen because it changes in value too fast to read, mostly measuring the average is better then.
|
What is the role of resistor in this schematic? I am a beginner in Electronics and I am not able to understand why do we need to put this resistor(Resistor which comes after the switch) in this schematic? Does it save IC from current? but how ? Thanks <Q> LED resistor <S> I originally thought you were asking about this resistor. <S> I'm leaving the explanation here since it might be useful anyway. <S> The point of this circuit is to let you get some intuition about flip-flops. <S> To do that, the LED is hooked up so that it lights when the flip-flop output is in the high state. <S> However, the output of the flip-flop tries to be a voltage source, which is a bad match for driving the LED. <S> It's also at the wrong voltage anyway. <S> Let's say the flip-flop is powered from 5 V, that you want to put 5 mA thru the LED when the output is high, and that the LED is a common green type that will drop about 2.1 V when on. <S> That means the resistor will have 5.0 V - 2.1 V = 2.9 V across it. <S> We already said it needs to allow 5 mA thru it in that case. <S> From Ohms law, 2.9 V / 5 <S> mA = 580 <S> Ω. <S> The standard value of 560 Ω is close enough and should work fine, as long as the flip-flop output can source the 5 mA. <S> Many digital outputs can do that, but not all, so you have to check. <S> If the flip-flop can't source enough current to drive the LED to sufficient brightness, you can use a transistor in between. <S> Switch resistor <S> I see <S> now you asked about the other resistor, the one that is connected to the switch. <S> That's a pulldown resistor. <S> It makes the flip-flop input reliably go to the low state when the switch is not pressed. <S> It's value is a compromise between pulling the input hard enough low when the switch is off, but not requiring too much current thru the switch when it is pressed. <S> I go into a lot more detail about pullup (same thing, just the switch and resistor flipped) resistors at https://electronics.stackexchange.com/a/23647/4512 . <A> The resistor is called a pull-down resistor. <S> If it were not there, when the switch is open there would be no defined voltage on the pin the switch is connected to. <S> This is called a "floating" input and generally does not guarantee that the input is in one state or the other. <S> By adding the resistor we know that the input will be low when the switch is open. <A> If there would be just a wire from the switch to ground and not a resistor, the switch would short-circuit the positive voltage and ground and nothing good would come of it. <S> On the other hand, if there would be nothing (no wire and no resistor) from the switch to ground, there wouldn't ever be a reliable low level in the clock input. <A> The resistor 'pulls' the input down to ground (LOW or logic '0'). <S> When the switch is closed there will be a positive voltage at the input (HIGH or logic '1'). <S> When it is released the input goes back to ground. <A> With the switch not pressed, and the resistor removed (replaced by an 'open'), the input would not be connected to anything. <S> With modern CMOS chips, that will result in the input picking up stray signals, often the over-present 50/60 Hz 'hum'. <S> That is not what you want! <S> As PkP explains, replacing the resistor with a short (wire) is not a good alterntive iether.
| The resistor drops the voltage between the flip-flop output and the LED's on voltage, while letting a predictable amount of current flow in the process.
|
Connecting multiple SPI devices to Texas Instruments CC3200 LaunchPad I want to connect one of the two (or both) 433 MHz RF receiver modules to the Texas Instruments CC3200 LaunchPad: RFM83CL-433S1 RFM65CW-433S2 I also want to connect an SD Card connector to the LaunchPad at the same time. Is this possible? Is it possible to connect all three devices to the CC3200 LaunchPad at the same time and get each of these addressed? I guess it would require two additional chips, one to change binary format to dedicated lines (green below) and one 4-way AND gate (blue below): Is this assumption correct? Or is there already something similar available on the CC3200 LaunchPad? Which chips would I require to accomplish the green and blue area? Your help is appreciated. <Q> If you have enough GPIOs on your controller, you can wire them directly to the SS pins of the SPI devices. <S> If your SS pin is active high, you need to add pull-down resistor, if it's active low, you need to add pull-up resistor. <A> You don't need all of those chips. <S> Directly connecting 3 outputs to each of the slave's SS line will work. <S> Keep them pulled up, and pull them down when you need to talk to the specific slave. <A> You can replace all the logic in both those boxes with a 2-line to 4-line binary decoder chip, such as the 74LS139. <S> The '139 actually gives you two such decoders. <S> A 74LS138 will give you a single 3-line to 8-line decoder.
| If you have not enough GPIOs to give your SPI devices each a dedicated pin or you want to save some pins, you can use decoder chips.
|
Can a DC motor be of specification 320Watts, 3A, 24 V? The above is the specifications of a wheelchair DC motor I'm trying to use as my hobby project. My question is how can a motor of 320 Watt and 24 V DC be of 3.0 A max rating when the current should be around 13 A ? <Q> In my opinion this is the nominal specifications. <S> And the power is written as peak :) <S> This is like on cheap stereo written for example 3000W, but the RMS is always hidden and much lower:)) <S> Anyway, i think this specification of power shows peak power or stall current. <S> UPDATE <S> If you want to use it for wheelchair this is not the motor you need. <S> Because it is C.C.W - counter cock wise, that means this motor isn't recommended for clockwise turning. <S> It is limited due to angled brushes. <S> H-class is insulation class. <S> H stand for 180C. <A> Sure, they can print anything they want on the sticker. <S> As you noticed, \$24\:\mathrm V \cdot 3\:\mathrm <S> A = <S> 72\:\mathrm W\$. <S> One then wonders, how do they get 320W? <S> My guess (since the sticker is too brief to say): "320W" is the maximum theoretical mechanical power this motor could produce. <S> A DC motor driven by a fixed voltage has a maximum no-load speed, and a maximum torque which is developed at zero speed. <S> That maximum no-load speed is limited by the battery voltage (here, 24V), and the maximum torque is limited by the stall current, which isn't specified but which is probably (a lot) <S> more than 3A. <S> You can get a rough idea by measuring the winding resistance with an ohmmeter, then calculating what the current would be into that resistance at 24V with Ohm's law. <S> Sometimes you have to jiggle the rotor to get the commutator to line up. <S> A linear function then describes the torque vs. speed relationship for a given motor, at a given voltage. <S> From Understanding D.C. <S> Motor Characteristics : <S> Mechanical power is the product of torque and speed, and thus, the motor develops maximal mechanical power at the midpoint of this line, where the motor is running at half its maximum speed and delivering half its maximum torque. <S> "320W" likely refers to this maximum theoretical mechanical power. <S> Of course, the motor will overheat if you actually run it under those conditions for very long. <S> Briefly however, it will be fine, as long as you don't generate more heat than would be generated by 3A continuously, or generate so much torque as to damage the motor mechanically. <A> We used the same one in our wheelchair. <S> Basically 320watt is safety power operating rating for the motor at load condition. <S> Our wheelchair takes continuous 30-40amp with good grades. <S> This doesn't mean that motor will burn @40 or even 100amp, because of the PWM Controller. <S> It follows this equation: \$ <S> V_{out}=Dutycycle*V_{in} <S> \quad <S> \textrm{and <S> } \quad P= <S> Vout*I_{Load} \$ <S> So with a heavier load the controller reduces the duty, reduces speed and the average voltage. <S> It may be possible get 50amp continuous, for times more than a minute. <A> Experts, correct me if I'm wrong, but often the maximum current specification on DC motors is the maximum current the motor will draw at the specified voltage under no load (maximum speed). <S> Stall current (under load) will be much higher than that. <S> See for example these datasheets , which specify a maximum current but then have a power/torque graph that allows currents much higher than the specified maximum. <S> I suggest you hook up the motor to a (current limited) 24V power supply and measure the current under various conditions. <S> I expect you'll see it draw about 2A under no load, and this current will increase when you put a load on the motor. <S> It is well possible that if you stall the motor, it will draw more than 13A (320W) and as such, your driving circuitry needs to be able to shut down or limit the current to prevent burning out the motor. <S> Basically maximum current can mean a number of things: <S> The maximum current a circuit needs to be designed to handle so themotor doesn't damage the electronics. <S> The maximum current themotor can handle without being destroyed. <S> The freewheel current -as <S> I explained above. <S> The conclusion is that the information on the nameplate is insufficient to determine either. <S> Assuming all values are somehow correct and it isn't a 70W motor or the current rating is actually 13A, measuring the motor's behaviour is your best bet. <S> Also, good info here .
| To get 320W in any sense (mechanical, electrical, or thermal power) would require more voltage, more current, or both, or a violation of the law of conservation of energy.
|
Current always goes to less resistance? I read in a book that "Current always goes in the less resistance path". In a paralel circuit with 1k resistor to one side and 10k resistor to another side the current still goes in both sides. Why does the current goes to both sides? It should only go to the 1k resistor cause there is less resistance. In the same paralel ciruit, if I add another wire in paralel to the ground all the current will go to the ground, proving that "Current always goes in the less resistance path". But why does this "law" only work when one of the wires is ground? <Q> Electricity always tries to go to from a high potential to a low potential through every possible path. <S> The "least resistance" aphorism is shown when one of the resistances is much lower than all of the others, but is still not strictly true; the different resistances create a current divider where the overwhelming amount of current takes a single path. <S> As you've discovered, it no longer holds when the resistances are reasonably comparable. <A> Electric charges always tend to move from high electric potential to low electric potential. <S> when there is a potential difference, there will be current flow. <S> That is, if there are several paths the current can flow, then the majority part of the current will flow in the path with the less resistance. <A> I = <S> V/R so if voltage source is connected across 1k and 10k resistor, more current will flow through 1k than 10k. <S> So the statement is actually more current flows through least resistance path.
| I think the words "Current always goes in the less resistance path" emphasize that the majority current will goes in the less resistance path.
|
Very small 12V DC power supply As a second part of my bad question about voltage converters . Well, I was asking about a regulator to get me from 220V AC/DC, into 12V DC .A regulator can't do that , but today I got the Apple charger for the iPhone , that takes my 220v into a 5v , and its very small. I think if you take out the plastic you get a tiny transformer. Is this a switching power supply ? So , my question now is, what kind of transformer Apple uses in its iPhone chargers, is it some kind of regulator, or just a small transformer with coils ? My needs are very small voltage conversion, from 220V AC (or DC with diodes), into about 12V-24V DC, with a very small current consumption (MCU), that is in one small enclosure box, and relatively cheap. I was looking for it everywhere, but couldn't find such a small box to do that. (By small I mean to be on a board, not more than 2-3 cm) <Q> A full iPhone charger teardown is given by Ken Shirriff. <S> Making something that small that is efficient (doesnt produce much heat) while also meeting the EMC and safety constraints is a very difficult task, and is only cheap because of the extremely high volumes that companies like Apple can produce. <S> Pads/pins/tracks with high voltages between them have to comply with creepage and clearance distances so that they don't electrocute the users. <S> Since your priority is for a small size PSU, you have to compromise on the cost. <S> The absolute cheapest power supply may not be the smallest, and as Ken shows , may compromise safety or performance. <S> The Apple design seems to cost about 5 USD for the parts, which is cheap for such a high quality design. <S> Their selling price, as with much consumer electronics, may not directly reflect the cost of the parts. <A> Almost certainly it's an off-line flyback converter. <S> Here's a typical circuit using a fairchild device: - Just google for "off-line flyback converter" and you'll get dozens of hits. <S> So , my question now , what kind of transformer Apple uses in its iPhone chargers , is it some kind of regulator, or just a small transformer with coils ? <S> It's a small transformer (provides isolation and safety) made using ferrite cores. <S> Here's what wiki says. <S> I can vouch for a couple of the following designs in Premier Magnetics range ( here ). <S> If you click on the link for UL-CSA recognized - Top switch transformers <S> you can get to many designs for off-line flyback switching converters on sht 2 of the pdf. <A> If this is just for you (not for commercial product) - you can modify phone battery charger. <S> For example - here is Nokia AC-15E charger 5V -> 12V modification. <S> Here is YouTube video about this: link <S> And here is schematic with changes: <S> (source: video linked above) <S> Modify R2 resistor value. <S> Change C01 capacitor to 470uF/16V <S> Remove output zener diode <S> I would suggest to put zener diode (12.1V <S> or 12.5V depending on required voltage tolerance) instead of original (5.1V?) <S> zener after you set R2 value.
| Apart from the size of the major components such as transformer and transistors, one of the factors that stops these chargers getting much smaller is the mandatory spacings for safety agency approval.
|
Trying to determine the output of a RC-filter with load I have a low pass filter like this: simulate this circuit – Schematic created using CircuitLab \$V_{\text{out}}\$ is measured right after \$R_1\$, which I suppose means that it is measured over the parallel part. \$R_2\$ is the load of the filter. When this circuit is measured with an oscilloscope it seems like it is not dependent on the frequency at all. I would like to investigate why. I tried to calculate the transfer function for the filter, but I am not sure that it is right. $$ H(j\omega) = \frac{1}{R_1\left(j\omega C+\frac{1}{R_2}\right)+1}$$ I'm using \$R_1 = 33\text{k}\Omega\$, \$R_2 = 1\text{k}\Omega\$, and \$C = 220\text{pF}\$. If I plot the frequency response in Matlab with this, I just get a straight line going from the origin through (1,.5), (2,1) where (Hz, H(w)) and so on. Is this correct? <Q> You can re-arrange <S> to get: $$H(\omega) = \frac{1}{C_1 <S> R_1} <S> \times \frac{1}{j\omega+\frac{R_1+R_2}{C_1R_1 <S> R_2}}$$ <S> so your pole frequency (or cutoff of your lowpass filter) is $$f=\frac{\frac{R_1+R_2}{C_1 R_1 R_2}}{2\pi}$$ <S> For your values that works out to be \$745\$kHz which is well above your test signal's highest frequency (\$100\$kHz). <S> So you won't see any rolloff. <S> Here's what the mag/phase versus frequency looks like: <A> You can interpret this circuit as a voltage divider using $$R_2 \parallel \frac{1}{j\omega C} = <S> \frac{R_2}{j\omega <S> R_2 C + <S> 1} $$ and \$R_1\$. <S> The transfer function is therefore $$H(j\omega) = <S> \frac{R_2 <S> \parallel \frac{1}{j\omega C}}{R_2 \parallel \frac{1}{j\omega C} + R_1} = <S> \frac{\frac{R_2}{j\omega <S> R_2 C + 1}}{\frac{R_2}{j\omega R_2 C + 1} <S> + R_1} = <S> \frac{R_2}{R_2 + R_1(j\omega <S> R_2 C + <S> 1)}$$ <S> If you divide numerator and denominator by \$R_2\$ <S> this is the same expression you calculated, but I think it's easier to understand the filter using my result. <S> As \$\omega \to 0\$ <S> $$H(j\omega) = H(0) = \frac{R_2}{R_2 + R_1}$$ which is what you would expect for a simple voltage divider using \$R_1\$ and \$R_2\$. As \$\omega \to \infty\$ the denominator dominates and \$|H(j\omega)| \to 0\$. <S> This is a low pass filter so the output should depend on the frequency (provided you sweep to a high enough frequency). <S> Here is your circuit in CircuitLab setup so that you can simulate it within CircuitLab: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> And here is the frequency sweep on the circuit as reported by CircuitLab (click to make it larger): <S> You can use this to verify your Matlab code. <S> If you post your Matlab code we might also be able to help you find a problem with it. <A> You can rearrange the circuit: simulate this circuit – <S> Schematic created using CircuitLab <S> But using Thévenin equivalence, you have this: simulate this circuit <S> Which is a standard RC circuit with $$ V'_{in} = {R_2\over{R_1+R_2}}V_{in} $$ and $$ R_p = R_1||R_2 = { <S> R_1R_2\over{R_1+R_2}}$$
| Your equation is correct but written a bit unusually.
|
How can I tell charge-only USB cables from USB data cables? Like most computer hobbyists and programmers, I've amassed boxes of USB cables to connect USB, Micro-USB, and Mini-USB to chargers, computers, and gadgets. These cables are a mix of phone charger cables, and cables that came with external hard drives, bike lights, GPS units, and other miscellaneous gadgets. The problem is, they all look the same, just plain black cables. How can I tell if one of these cables is a charge-only USB cable instead of a USB data cable? Ideally, I would love to rely on some visual clue, but I have a multimeter I could use to test the cables with if I knew a good approach to this. My goal is to label these cables so I can resolve this ambiguity so when I reach in to my box of cables, I know which cable to use for charging my phone and which one to use to synchronise my GPS with my computer. <Q> The kind of cable you mean is missing the D+ and D- data lines. <S> It simply doesn't have those wires inside the cable. <S> You can test for continuity or resistance using a multimeter. <S> Probe between the corresponding data pins: D+ on one side to D+ on the other, or D- to D-. <S> The D+/D- lines are the middle two pins of a USB connector. <S> Technically USB requires the data lines to request more power from a host device, so a cable missing these connections would, in theory, only let devices charge very slowly. <S> In practice most USB hosts will not enforce such a limit. <S> It is also possible that some phones will refuse to charge without data lines in the cable. <A> Look for something on cable like: (some number)AWG/1P . <S> If it does exist then you have shielded twisted pair of conductor denoted by P above. <S> And they use for data transmission. <S> Here: <S> (some number)AWG/1P denotes <S> some number = number of wire gauge AWG = <S> American Wire Gauge? <S> 1 <S> = Number of pairs P = shielded twisted pair of conductor <A> If the cable has any markings on it, look for the wire size and amount on it. <S> They will typically say AWG 22-2 or similar for a 2 conductor of AWG size 22 cable. <S> A 4 conductor cable would be different. <S> Of course, you could find a cable that has four conductors inside but not all four wires connected, so it would still be a charge only cable. <S> But that seems like a waste of copper. <A> You'd like an easy way to tell a "charging only" cable from a complete cable. <S> Unfortunately, your only solution is to place your own sticker or wire tie around the cables. <S> The USB Implementers Forum does not recognize charging only cables, and does not publish any form of graphic or symbol to distinguish one from the other. <S> To contact the USB-IF on this issue see http://www.usb.org/about . <S> The production process for a "charge only" cable is simply to leave out the two center wires. <S> There's no enforcement of any rules related to USB, so you just get whatever the factory churns out. <S> To see what you've got plug in a phone to a PC and browse files. <S> If browsing works, you have 4 wires. <S> If not, chances are you've got just 2 wires. <S> Note that the center two wires are used even for charging. <S> There's a bizzare and incompatible set of signals used by the device to determine how much current (charging power) to try and draw. <S> Without the center two wires, you get whatever the device's default behavior is (which may be slow charging). <A> You can tell that a cable almost certainly has all four wires connected and will reliably transfer USB data at the speed it's rated for if it is unmodified and has the USB trident logo on top of the plugs: ( Images from Wikipeida .) <S> The USB standard does not provide for cables without data lines, and the USB Implementors Forum does not allow the use of their trademarked logo above on non-standard cables. <S> (And yes, to address the comments, trademark law is not always perfectly enforced. <S> But nor is it particularly poorly enforced in most first-world countries even for low-value products such as soft-drinks and USB cables. <S> Further, simple testing of connectivity with a multimeter is no guarantee that the cables do not have other issues related to their inductance and capacitance that will cause problems with data transfer.) <A> The outer insulation on charge only cables tends to be thinner than that of a data/charge cable because they physically contain 2 less wires. <S> but the continuity test described above is the only way to be 100% certain. <A> Use a Smartphone, if it gives the message "Connected as a media device" the cable allows data connection, if not, the cable is a charge-only cable! <A> Not sure my experience is true generally, but when I look at the end of a charge-only cable, I see an "arrow" symbol, while USB symbol for a data cable. <S> Pls see my blog post for details.
| You will see no continuity or a high/"infinite" resistance on your meter if the cable is missing data wires and is a "charge only cable". Just select one on one side of the cable, and test continuity to both of the middle pins on the other side.
|
What happens if I supply a higher voltage than the rated voltage of my jack? I want to replace the original jack from my notebook with a new one since it is broken (and I would like to avoid to replace it with the same as the original). The original AC adapter supplies 19V and a bit less than 3Amp. However I can't find on Internet a DC jack (for pannel-mounting use) whose rated voltage is 19 V. All I find are 12V DC / 3Amp MAX jacks. So what would happen if I use my AC Adapter with that new power DC jack (so 12V 3Amp) ? Will it overheat or is it safe? Thanks (and sorry if that's a duplicate). <Q> The jacks on DigiKey are rated for 24 V: http://www.digikey.com/product-detail/en/PJ-005A/CP-5-ND/165838 <S> Unless it's a really marginal design, it will be OK. <A> I strongly recommend that you find a properly rated connector. <A> I agree with Ignacio, do not use 12V connector with 19V because 19 is more than 12. <S> At such low voltage probably nothing will happen, but you don't know why it is rated for 12V. Maybe insulation can handle much more, but if you overrate it by more than 50% - you may expect some undesireable effects (including fire, corrosion, changing insulation mechanical or electrical properties). <S> I would suggest to use Lenovo socket and plug from T43/T60/T61 series laptop. <S> It is well designed and hard to break. <S> Best power socked I ever saw in any laptop. <S> I never had problems with power connector in any ThinkPad <S> (I was stomping on cord many times, pulling it accidently etc.). <S> It looks like this: Notice that this connector is not supposed to be soldered to board. <S> It is for motherboard protection. <S> In low cost laptops power connectors are soldered directly to board <S> and if you pull cord accidently - you can break whole motherboard. <S> There are cheap cables like this on ebay: image source: ebay auction link
| The voltage a connector is rated for represents the breakdown voltage of the dielectric or insulator; if it is violated then arcing may occur inside the connector itself , and as such presents a severe fire hazard. In my laptop - this connector is surrounded by some rubber and it moves with plug. I would not hesitate to use any DC barrel plug at 19V, because that's just not much voltage. For plug - just replace whole cable in your power supply.
|
What is the difference between different types of GND I would like to know the difference between different types of Grounds like AGND, SGND, Battery Gnd, PGND. Are all the grounds not same? Cant we connect the device to any one of these grounds? <Q> Though they all all contain "GND" they are not really mean the earth, we only have one earth, but can have many "GND"s. <S> You can think GND as a common reference point of a local system. <S> For some reasons, such as safety, EMI, etc., we tend to split our system into many sub-systems. <S> Every ground just is a reference point of the sub-systems. <S> If your device doesn't belong to a system, you can't connect your device to the ground of that system. <A> Ideally all grounds are the same. <S> However, there may be reasons they aren't the same: <S> Your ground has significant DC current flowing through it. <S> From Ohm's law, we know \$V = <S> IR\$, so there will be a slight voltage gradient across your "ground". <S> Similarly, for high frequencies, ground has some non-zero inductance. <S> An inductor at high frequency has significant impedance, leading to a potential difference at these high frequencies. <S> Ground is a label for a reference point. <S> Sometimes you don't want your reference point to be physically tied to the literal ground, or want isolated reference points (known as "galvanic isolation"). <S> Usually high frequencies are on the digital side, where you are switching at a high rate (worse, these are square waves <S> so there are higher harmonics). <S> Analog circuits usually imply you care about the amplitude/other features of the waveform, and these high frequencies from digital circuits can easily corrupt your signal. <S> Thus it's not uncommon to have a divider between analog and digital grounds. <S> However, crucially both grounds are still tied together (preferably at a single point) <S> so you have the same reference point. <S> There are other things to consider here, but I'm omitting them for brevity. <S> For circuits with significant DC current and sensitive analog components, it's not uncommon to divide the power ground from your analog ground. <S> Again, you would tie these together at a single point to have a common reference. <S> Galvanic isolation is used for various reasons. <S> One of the big reasons is safety. <S> For example, most power bricks are isolated supplies. <S> If there is a failure on the primary side, as long as you don't exceed the isolation voltage limit your second side usually just loses power instead of being shorted to the primary side plugged into the wall. <S> In this case, you physically have two separate reference points. <S> Their potentials can float such that the voltage across the two grounds is not zero. <S> Sometimes there is some effort made that this potential doesn't drift too far away. <A> No they aren't always the same. <S> AGND (analog ground) for example is a reference point for your analog component. <S> You can hook this up to another voltage then the ground of your battery. <S> Same case with the SGND, which you will probably have with a differential signal. <S> This is the reference point for the signal. <S> I have never heard of PGND (protective ground?) <S> so I can't really say alot about that, except that it is not always the same as the ground of your battery.
| From your "GND"s, the AGND, may represent the "analog ground", SGND may represent "signal ground", PGND may represent "power ground".
|
Shall I connect inverter with boat GND? A friend of mine is building a boat. On this boat, he has 12V batteries with a 230V/13A transformer. Recently somebody suggested he should connect the null with the ground. With DC, this is common practice. But how would somebody suggest doing the same with AC?! Polarity switches continuously on AC. I suspect he either misunderstood the advice or the advisor didn't understand it himself either. What might the advisor have wanted to tell? There's no reason to assume malicious intent. <Q> I think the "adviser" may have been talking about connecting the socket's earth to the inverter's neutral / cold / null point: simulate this circuit – <S> Schematic created using CircuitLab <S> With this arrangement, if there is a short or other fault causing current to flow through the earth connection, it will either cause enough current to flow to trip / blow the MCB or Fuse, or cause a mismatch in the live / neutral currents which would trip an RCD (GFCI). <S> You could also add an ELCB into the mix as well, and that would function normally. <A> But how would somebody suggest doing the same with AC?! <S> Polarity switches continuously on AC. <S> This is not advise or complete answer for your main question, just explanation about GND. <S> Voltage is difference between two terminals. <S> In the other words - there is no voltage in one terminal. <S> Voltage must be between two terminals. <S> GND can be used as point of reference and sometimes as conductor in some cases (cars, boats) to reduce cost of wiring. <S> It is also commonly used method. <S> You can read more about grounding here: <S> Where is the ground/negative for overhead power lines? <S> If you connect one terminal to GND and say "this is zero" - other terminal relatively to this will have variable voltage - sometimes positive, sometimes negative. <S> If you have a boat and you will connect 12V battery - to GND and say "this is zero" - other terminal will have +12V relatively to GND. <S> If you connect battery + to GND - other terminal will have -12V relatively to your ground. <A> The shore power neutral must not be connected to vessel ground. <S> When the inverter is operating, the on-board neutral must be connected to vessel ground. <S> The above rules are from ABYC (USA) and CSA (Canada), but, according to a British book I have, apply there as well.
| The shore power "safety ground" should be connected to the vessel ground, preferably through a Galvanic Isolator.
|
Altera DE2 interfacing with analog sensor Can Altera GPIO pins read the analog output of a light sensor? The light sensor output is analog and I want the Altera to turn an LED on whenever the signal of the sensor is greater than some specific value. Can I do that directly, or do I have to connect the output of the sensor to an ADC? How would I go about that? <Q> If your Altera has LVDS inputs, you've got a fairly good comparator. <S> It's possible to make a crude Sigma-Delta (or PWM) <S> DAC and thus get a crude ADC. <S> It's not going to be a very good ADC- noisy and the default reference is the crummy digital supply rails and range will be limited, but if all you need is a few bits it might work for you. <A> You can use the LVDS as an analog comparator, simply by connecting positive pin to your "specific voltage value" which has to be less than 2.5 V and the negative pin to your sensor. <A> <A> As the current answers reflect, no, you can't do this directly: you need to implement an ADC that can convert the analog level from the sensor to a digital value that can be read by the digital input pins of the Altera. <S> However, if turning an LED on if the sensor has a value higher than some threshold is really the only thing you need to do, there's a much easier way: with a comparator . <S> That's a circuit with two inputs A and B, which outputs a high signal when A > B and a low signal otherwise (it's a bit simplified, but that's basically it). <S> You can then connect the output of that comparator circuit to your LED. <S> If you google "op-amp comparator circuit" you will find some nice circuits that can do what you want. <A> No, the GPIO pins are digital. <S> There are no onboard ADCs in the Cyclone IV series.
| You can either connect an ADC, and to do that you will have to refer to the datasheet of your chosen ADC, or use a comparator to compare the incoming voltage with a reference voltage, and output a digital HIGH / LOW signal which a digital pin can read. No you can't sample analog values with digital inputs.
|
230 and 240 transformer leads So I have a transformer that is like 230 || 30 V. One thing I don't get that on primary side it has the following leads: 0 --- 230V --- 240V When it can be useful? I mean I can't think of situation when somebody would say "We should wire it to 240V, 230V will be a bad choice". Isn't it hard to know what exact value particular wall outlet will be outputing? I always though that in one house it can be 230, then you go to the different city and it's 240, not to mention it is never precise, so you can get like 235. Moreover regular customer doesn't know what he has in the outlet. What is the reason that manufacturer decided to have two options? I've never seen a 230/240 switch on any device either. And bonus question - if you already decided to make such a primary side - why not make 220V also? I tried google this and all the answers were like "there is no difference, don't bother", but I suppose manufacturer would not make it such a way if it wouldn't have an application. <Q> This type of multi-tap transformer primary was common before the days of regulated DC power supplies. <S> The user was supposed to select the appropriate tap according to local mains voltage. <S> Variations from 210V to 250V were common, in European radios, TVs, tape recorders and the like. <S> Old test equipment like scopes also had this type of voltage selection. <S> I've seen a 1957 valve radio with such a tapped primary, and it was set to the wrong one. <S> The secondary AC voltage was low, and that meant that the rectified DC was low, too. <S> We changed to the correct tap, and the voltages came up to levels much closer to the nominal voltages in the schematic. <S> The radio worked a lot better like that! <A> It's precisely because of that inaccuracy in the supply voltage that you may want such a transformer. <S> By itself it's pretty useless, but with active voltage monitoring, and a method for switching automatically from the 240V to the 230V tap <S> a power supply is able to compensate for brownouts, etc. <S> The same technique is used in many UPS systems for compensating for brownouts, though they often have more than just one extra tap. <A> This kind of transformer would normally be permanently wired to the correct voltage tap for the target market (country) and the unused tap left open. <S> Adding a tap only costs pennies,and it provides a bit of optimization (especially for something like an audio amplifier that may not be able to meet the advertised performance without the proper tap connection). <S> It could thus run afoul of truth-in-advertising laws in a market with a lower nominal mains voltage, or run a bit hot in a market with a higher nominal mains voltage. <S> It was not unusual to have mains transformers with taps for 100/120/200/230/240 VAC before switching supplies became common. <A> You may have a transformer that was built for use during the time when Europe was standardizing the line voltage. <S> Up until 1995, various countries in Europe used different line voltages for the outlets. <S> For example, in Germany it was 220V, but in the UK it was 240V. <S> In 1995 ( Mains voltage wikipedia ), they all began switching to 230V ,and were supposed to have completed the switchover by 2008. <S> Here in Germany in the early 1990's I used a big test rig for two way radios that had a switchable supply voltage - <S> it was adjustable from like 210V up to 250V. <S> I also own an oscilloscope that was built in 1967 that has a jumper on the back to switch between 110V and 220V - with various jumper positions for voltages from 220V up to 250V (or something like that <S> I don't have it memorized.)
| So, you may have a transformer that was built to be installed into a device and used when the line voltage was 240V, but could then be switched (switch or jumper) to use the lower voltage after the changeover.
|
How do you change the default via dimensions in Altium? When I place a via, it always has a diameter of 1.27mm and a hole size of 0.711mm. I want all of my vias to be smaller and it's really annoying to have to change them manually EVERY time. I tried going to Design > Rules and changed the "RoutingVias" rule so that the "Preferred" dimensions would be the ones that I want, but they still come out with the larger default dimensions. I've googled this but haven't found what I'm looking for. I also tried changing the maximum hole dimensions to be the ones that I want, but the vias are still coming out way larger. Anybody know how to get my vias to default to particular dimensions when I place them? Thanks! <Q> For placing vias in interactive routing, you can press 4 and cycle through sizes of via- minimum, maximum, preferred or user choice (favorite). <S> Shift-V during interactive routing allows you to select a favorite from a list- <S> and you can customize the list through DXP->Preferences->PCB Editor->Interactive <S> Routing->Favorite <S> via sizes <A> @markt answer is correct. <S> This is more of a side answer since it doesn't address your question directly, but it does help if you have made a mistake of choosing the wrong via size in the first place and need to change it. <S> If you have a bunch of vias (this method actually applies to any object within Altium) like in the image below <S> If you right click one of the vias, and select Select Similar Objects.. <S> You'll get a window like this <S> These are basically search critera for you to find similiar objects. <S> If I'm looking for <S> any <S> via <S> , I would change the Object Kind - Via to Same <S> If I'm looking for vias that have a certain hole size or via diameter, I would change those parameters to Same <S> Check the Selected Matched check box at the bottom of the window and <S> it will create find and select all those objects that meet your criteria. <S> Now the awesome part. <S> In your PCB Inspector Panel (it would have opened up if you have checked the Run Inspector at the bottom of the previous window). <S> If not, then just open up your PCB Inspector Panel. <S> You would see something like this <S> If I were to change anything here, it would apply to all the selected objects. <S> I can change its hole size and via diameter <S> and it will change it for every via <S> I have selected. <S> It helped me a few times when I made a via too small and my fab house said it cant do it. <S> To go through the entire PCB and find every single via and manually change it would have been a nightmare. <S> But in a few short clicks, I changed all of them. <A> After you select the "place via" tool, hit tab and the "via options" dialog will come up. <S> Any modifications you make in the dialog will be replicated for every via you place, until the next time you change it the same way. <A> Adding to this because I have spent time attempting the previous solutions for Interactive Routing and failed to alter the via size from the default 1.27mm. <S> Maybe I did wrong, I dunno. <S> What worked for me was to go into Design> <S> Rules <S> > <S> Routing> Routing Via Style and select the template to use. <S> However initially this also did not work as the 'Enabled' check box was not selected. <S> Once ticked, it works as desired.
| You can set the default via through DXP->Preferences->PCB Editor->Defaults->Via
|
Connected 2-Pin Button switching randomly from LOW to HIGH I got this ordinary 2-pin push button and now I'm trying to read its state.Basically I want to turn a LED on and off. My board is an Arduino Uno and the button is connected to GND and Digital Pin 2 .Also Pin 2 is configured as INPUT_PULLUP .I followed the instructions in this tutorial. My issues: digitalRead(2) returns randomly LOW and HIGH It seems like there's no pullup resistor configured even though it's definitely in the code When I take the button in my hands and touch some parts it seems to work? Questions: The button is connected to GND. There are also other components connected to the same GND. Could there be too much connected to GND? Do you have any ideas what I did wrong? Could my Arduino be broken/fried? Update: Here is the datasheet for the button I bought. <Q> That button won't have an internal pull-up resistor (it's rated for250VAC with a breakdown of 1500V AC!) <S> - you need an external pull-up resistor and also take note what EM_Fields says about voltage and current - try it with a 1k ohm pull-up but don't expect miracles and do expect severe contact bounce to cause multiple false triggers. <A> In normal use those kinds of switches generate arcs when the contacts open and/or bounce, and those arcs blast off non-conducting films which can otherwise accumulate on the contacts and cause trouble. <S> The problem is that the low voltage and current levels you're trying to switch just don't have the power to blast off all of the non-conducting film that can build up on the contacts, which will leave you with intermittent contacts and the problems you're experiencing. <S> Instead of exercising the switch, try shorting across the pins on the Arduino with a clip lead or something and, if you get reliable operation, the switch will more than likely be the problem. <A> If it looks like the internal pull-up isn't working, what happens if you add an external one? <S> Maybe that's the better design <S> : use an external pull-up resistor. <S> Your note "When I take the button in my hands and touch some parts it seems to work" makes me think that there's no pull-up at all, and the input is floating.
| The trouble may well be in the switch itself since it's not designed for the low-current switching your circuit needs, and is designed to switch fairly high voltages and currents.
|
Any reason I cannot just switch a transformer from a 555 to generate high voltages? I had an idea to finally start using my nixie tubes and thought why not just switch a mosfet which switches a transformer to generate required high voltages for nixie tubes from a low voltage supply. When I googled all I found was these boost converters using inductors. Now is there a reason for these being used? <Q> Both boost converters and transformers can give higher voltage from lower one. <S> Here are some specifications: Boost converters: Require less space than transformers <S> Require more components to work Light <S> Transformers: <S> Require more space <S> Require less components to work Heavy <S> According to this, if you want to use less space, use boost converter. <S> If you can afford more space, then use transformer. <A> What you're describing (switching a transformer at high frequency via a transistor) is called a forward converter. <S> These are more difficult to design than a boost converter. <S> In particular, you have to limit the duty cycle to keep the current in the windings stable. <S> If you already have an isolated DC supply, it's much simpler and safer to use a boost converter with an off-the-shelf controller. <S> Trying to build your own switch-mode power supply from scratch is a bad idea unless you really know what you're doing. <S> Alternately, if you can use mains power you could transform that to the ~200V needed by the tubes and rectify it without needing any DC-DC conversion. <A> Yes, of course there is a reason boost converters are used to make high voltage from a low voltage supply. <S> The reason is that's what they do , or put another way <S> they meet the spec . <S> A boost converter with a single inductor is the simplest way to get a moderate boost in voltage with significant current, it takes only a single low-side switching element, and can be easily controlled via PWM. <S> For high stepup ratios, especially when significant current is required, a transformer starts becoming worth the extra complexity. <S> At low currents there are cascaded charge pumps, but those require one stage per multiple. <S> For example, to get 10x higher voltage requires 10 stages ideally, more in practise due to some voltage loss per stage. <S> Look up <S> Cockroft-Walton for more details on a particular cascaded charge pump. <S> Old televisions used a flyback transformer topology to make 10s of kV from a few 100 V DC. <S> The 10s of kV were needed to drive the electron gun in the picture tube. <S> There are lots of ways of making a higher voltage from a lower one. <S> Which way is "best" depends on the particular circumstance and on what criteria are most important to you. <S> There is no single universal Right Answer. <A> Boost converters using a single inductor are the most common type and they also accommadate the smallest amount of power transfer capabilities i.e. they are in the below-1 watt to 10 watt range loosely speaking. <S> A small disadvantages is that they provide no isolation between input voltage and output voltage <S> AND, the peak ratio of step-up voltage to supply voltage is limited probably to less than 100:1 although there will be notable exceptions. <S> The transformer flyback circuit is often used in AC-DC converters i.e. the wall wart and these range in power from below 1 watt to well over 40 watts. <S> They can be step-up types of course. <S> Raising the bar a bit is the half bridge (push-pull) transformer design. <S> This uses a centre tapped primary and two <S> (usually) MOSFETs pushing and pulling the primary. <S> I guess these tend to cover the range 25 watts to over 200 watts. <S> The main circuit of higher powers is the H bridge and these are responsible for AC inverters <S> etc.. <S> So, if you want to know which topology to choose concentrate on power requirements and whether isolation is needed. <S> All apart from the boost (single inductor) circuit can provide isolation.
| Transformer-based converters are used to isolate a system from the mains power.
|
What is the function of fuse here The datasheet states that TPS2400 protects the load from an over-voltage, by disconnecting the load from the power supply (Q1 goes off), without blowing the fuse. Why is the fuse F2 here, if there will be no current flow at over-voltage or under-voltage condition? <Q> Fuse F2 protects against over-current conditions, which can occur when the voltage is within normal limits. <S> Imagine a short in, say, D2. <S> That short would draw excessive current and blow fuse F2. <A> The fuse is there as secondary protection. <S> Overvoltage or overstress beyond the rating of the devices could cause semiconductor switches like Q1 to short. <S> In this case the D1 TVS device protects the semiconductors from an overvoltage condition, but relies on the fuse, F1 to blow if the overvoltage lasts long enough. <S> If there were no TVS device and Q1 shorted, F1 would blow preventing further damage and potentially hazardous conditions. <A> if a short circuit occurs in the appliance, the cable could easily become overheated (due to excess current) and burn or rupture its insulation. <S> Without a fuse to "protect" the cable, this can lead to the direct ignition of material in the home or workplace and suddenly what starts off as a minor incident ends up with a building burning to the ground. <S> Side effects of course are danger to anyone coming into contact with ruptured cable and receiving an electric shock. <S> A fuse prevents this by protecting the cable. <S> When it comes to protecting "loads", a zener diode and fuse perform a slightly different job. <S> They are called zener barriers in the petrochem and coal industries because they limit the voltage at the terminals of "otherwise safe" equipment and this significantly reduces the risk of an ignitable gas explosion or dust explosion. <S> In your case F2 just protects the equipment that is connected to your output and F1 likely protects the cable between power supply and appliance. <S> See this wiki article
| The function of a fuse is usually to prevent fire - that's the basic protection a fuse offers - between power supply and appliance there may be a few feet or metres of cable -
|
What is the test voltage of a ohmmeter? Ohmmeters don't appear to make LEDs conduct which gives overestimates in the resistance measured (tested with a R1//(R2+LED) parallel circuit). So what is the voltage they apply to the circuit, assuming it is conventional? I assume it depends on the range selected (I seriously doubt it will apply 1V to a mOhm branch), but to what extent? <Q> The obvious answer is to measure it with another meter. <S> Other than that, this can vary by meter but is usually around a volt or two. <S> Some have a special low voltage mode meant to specifically avoid turning on silicon diodes, but the accuracy is lower. <S> Many hand-held meters simply apply the battery voltage. <S> One meter I have takes a separate D cell just to power the resistance test. <S> It takes 4 AA cells to power the amplifier and the rest of the meter, and the single D cell provides the voltage for the resistance sense. <S> The one-cell voltage is about right in that it will turn on ordinary diodes, but is very unlikely to cause any harm, even of something is high enough impedance to not drag down the voltage. <A> It depends on multimeter <S> It doesn't have to be a constant voltage. <S> You have to measure it, as others suggested, or search for some documentation about your multimeter. <A> If it's a DVM <S> I'd think along these lines: - Smallest resolution in ohms is probably 0.1 ohms and smallest resolution in volts <S> might be 1mV. <S> This leads to the conclusion that the current used in the lowest ohm range <S> is probably: - <S> \$\dfrac{1mV}{0.1\Omega}\$ = 10mA. <S> Given that the lowest ohm range will probably go-over range at 200 ohms, the maximum voltage it likely produces is 4 volts across 200 ohms.
| By default, most meters put out enough voltage to turn on ordinary silicon diodes.
|
Can FPGA out perform a multi-core PC? I don't understand how FPGA can be used to accelerate an algorithm. Currently I'm running a time consuming real time algorithm on a quadcore laptop so that four computations can be done in parallel. I have been recently alerted that FPGA may yield even better performance. I don't understand how that works. Can someone explain how FPGA accelerates an algorithm and if I should switch to a Xilinx or Altera FPGA solution or keep performing the computations on my quadcore laptop. Additional Details: The algorithm runs 20 artificial neural networks using inputs fed in through the wavelet packet transform Thank you all for the great answers. <Q> A colleague of mine benchmarked this and came to the conclusion that FPGAs would outperform a PC once you had more than about 100 independent , integer tasks that would fit in the FPGA. <S> For floating point tasks GPGPU beat FPGA throughout. <S> For narrow multithreading or SIMD operation then CPUs are extremely optimised and run at a higher clock speed than FPGAs typically achieve. <S> The other caveats: tasks must be independent. <S> If there are data dependencies between tasks then that limits the critical path of computation. <S> FPGAs are good for boolean evaluation and integer maths, as well as hardware low-latency interfaces, but not for memory-dependent workloads or floating point. <S> If you have to keep the workload in DRAM then that will be the bottleneck rather than the processor. <A> An FPGA works completely differently from a processor. <S> For a processor you write software that tells the hardware what to do. <S> On an FPGA you describe "what the hardware should look like" internally. <S> It is as if you are making a chip specially made for your algorithm. <S> This speeds up a lot of things and can bring down the power consumption. <S> But it has its drawbacks: The development takes much longer and is much more complicated. <S> You need to think in a completely different way and cannot use algorithms that work in software in a straight forward manner. <S> For Artificial Neural Networks the FPGA is a great choice. <S> There is a lot of ongoing research in this area. <A> It depends a lot on the algorithm, but the principle can be explained quite simply. <S> Suppose that your algorithm has to sum a lot of 8-bit numbers. <S> Your CPU will still need to fetch each instruction, get the operands from the RAM or the cache memory, execute the sum, store the result in cache, and go on with the next operation. <S> The pipeline helps, but you can execute only as many simultaneous operations as the cores you have. <S> If you use an FPGA, you can implement a large number of simple adders that work in parallel, crunching perhaps thousands of sums in parallel. <S> Although a single operation may take more time, you have a huge degree of parallelism. <S> You can also use a GPGPU to do similar tasks, as they are also made of many simpler cores. <A> There are roughly 3 levels of specialization of computing equipment: CPU (like in your laptop) is the most generic of them all. <S> It can do everything, but this versatility comes at a price of slow speed and high power consumption. <S> CPU is programmed on the go, the instructions come from RAM. <S> Programs for CPU are quick, cheap and easy to write and very easy to change. <S> FPGA (which means Field Programmable Gate Array) is the middle tier. <S> As it's name implies it can be programmed "in the field", that is outside of a factory. <S> FPGA usually gets programmed once, this process can be described as setting up it's internal structure. <S> After this process it behaves like a tiny computer specialized for the one task you've chosen for it. <S> This is why it can fare better than generic CPU. <S> Programming FPGA is very difficult and expensive and debugging them is very hard. <S> ASIC (which means Application Specific Integrated Circuit) is the ultimate specialist. <S> It's a chip designed and produced for one and only one task - a task it does extremely fast and efficiently. <S> There is no possibility to reprogram ASIC, it leaves the factory fully defined and is useless when it's job is no longer needed. <S> Designing ASIC is something only large corporations can afford and debugging them <S> is well, pretty much impossible. <S> If you think in "cores", then look at it this way: CPUs have 4, 6, maybe 8 big cores that can do everything. <S> ASICS often have thousands of cores, but very tiny ones, capable of one thing only. <S> You can look at bitcoin mining community. <S> They do SHA256 hashes. <S> CPU core i7: 0.8-1.5 M hash/s <S> FPGA: 5-300M hash <S> /s <S> ASIC: <S> 12000M hash/s per one tiny chip, <S> 2000000M (yep, that 2T)hash/s for one 160-chip device <S> Of course, those ASIC babies cost almost $2000 when mass produced, but it gives you an idea about how a jack-of-all-trades can fare against a specialist. <S> The only question is: can FPGA bring you more savings than designing it would cost?Of <S> course, instead of running it on ONE laptop, you can try running it on 20 PCS. <A> By cheaper - I mean total effort, not FPGA <S> IC cost, but also very fast memory for FPGA <S> (you would need it for neural network) and whole development process. <S> Use SSE - I've seen pretty simple neural network implementations with 2-3x better performance. <S> This might be good idea if you have no dedicated GPU in your laptop. <S> Improving the speed of neural networks on CPUs by Vincent Vanhoucke and Andrew Senior <S> Use <S> GPGPU <S> (General-purpose computing on graphics processing units) <S> - I think you can archieve 100-200x performance boost on medium class laptop GPU like GeForce 730M. <S> Here is neural network implementation (and free code). <S> It uses Nvidia CUDA. <S> GPGPU approach is very scalable, if at some point you realize that you need more computing power - you can just use desktop computer with more powerful GPU or even Nvidia Tesla K80 with 4992 cores (thats expensive).
| Yes, FPGA can outperform modern CPU (like Intel i7) in some specyfic task, but there are easier and cheaper methods to improve neural network performance.
|
Using a motor with DC I am using a Lego DC motor with a 9V battery which can provide up to 1A of current. I called Lego support and they said the motor draws 300mA of current. What does that mean? If I plug the motor to the battery will it use 300mA of current or will it use as much as my battery can provide and damage itself? I know a motor has an internal resistance that's why I make this question: if is has na internal resistance it can control the amount of current that will consume without any external resistor, right? Am I right? <Q> It is up to you to provide a supply that provides correct voltage, and capable of providing up to the required current. <S> (Note the asymmetry!) <S> If the voltage is correct the motor will draw (only) <S> the current it needs. <A> The motor internal resistance will be relatively low, probably allowing it to draw much more than an amp when it starts. <S> But that doesn't matter from a battery (though it might cause some sorts of power supply or adapter to panic and shut down). <S> When the motor is running it actually takes much less current - 300ma in your case - provided <S> it's not too heavily loaded. <S> So, run the motor on its own, and notice how fast it runs when it's not driving anything. <S> If you slow it down with your fingers (don't do this with a big motor like a drill!!!) <S> it will draw more current as it slows down, and if it stalls altogether it can easily take an amp or more. <S> So when you use it, make sure it is lightly enough loaded to run fast - if you need to drive a heavier load, like running a car around the carpet, that's what gears are for. <S> (If you can measure voltages and currents, say so and we can add more detailed explanations) <A> In general, it should be OK to run your motor from a 9V 1A power supply. <S> The 300mA rating ought to be the current it draws while running. <S> Stall current (how much current it draws if you block it from turning) may be higher, in which case it might get hotter than it should - possibly burning out if you leave it blocked too long. <S> The site @codo referenced ( Lego motor tests ) gives more detailed information about the various motors, including which ones have thermistors. <S> Don't block the motor from rotating and you should be fine with the power supply you have. <S> If you expect blockages to happen, use a motor with a thermistor or use a power supply that limits the current.
| If the motor has a thermistor, then the stall current will be limited and you won't have to worry about burning out the motor.
|
Breadboard header for usbasp I am not able to find any breadboard headers for this particular usb asp connector Here They do exist because I've seen then at school, but I can't seem to find them online. I bought breakable male male pins, but they are too short to fit in the board. I also bought a black header for it on ebay, but it is also too short for the breadboard, only good for soldering. <Q> This is what I do. <S> Get some of these 11.5 mm male DIL headers (eBay) <S> : Trim it down to: Move the black plastic pin spacer to about half way if necessary, and insert: ...works a treat :) <S> You can get longer ones - just search eBay for "male pin header long double row". <A> I have 2 different solutions that I've used for this: <S> Loose wires inserted into the IDC and breadboard <S> This works for any chip, but can be a pain to move between chips. <S> PCB-mounted adapter using extra-long headers <S> I will include pictures of both solutions when I am able to. <A> So long story short, I was looking for electronics surplus stores in the area, and look what I found: <S> Found at Creatron Inc . <S> It doesn't show on their product page , but I'm sure you can drop them a line <S> and they'll help you.
| This must be done custom per chip but is extremely reliable, and allows additional embellishments such as a button to make powering the chip from the programmer optional.
|
What is the purpose of holes on edge of the PCB? Here is a photo of one of Texas Instrument's RF EVMs. Please pay attention to edge of the PCB that has multiple tiny holes. I marked 3 of them with a red circle on the photo. What is the purpose/benefit of them? The edges are V cut, is it something to do with it? Or if it is kind of performance improvement, then how do you determine what size of the hole to use and the distance between the holes? EDIT: Here is the gerber view of the board (not the same edge), as I can see, they are just holes (not vias) <Q> Those are vias. <S> They are connecting that one piece of ground plane to another one on another layer. <S> It may be done for increasing current carrying ability, thermal transfer, EMI reduction, and any number of other reasons. <S> Given that it's an RF board it's most likely to help control unwanted EMI. <S> When you have two ground planes, and high frequency, different points of the ground planes will be at different voltages, with respect to each other. <S> 0V is never 0V throughout an entire system, but varies due to the inductance of the traces. <S> By strapping those two traces (ground planes) together you are effectively nullifying much of those voltage differences, and turning it back from an antenna to just a ground plane. <S> And of course the effect is most pronounced at the edges of the planes, so that's where you want most of your vias. <S> You notice there are also plenty of vias throughout the whole ground plane in an attempt to keep the potentials as even as possible. <A> It's called via stitching, <S> a via fence or a picket fence. <S> It's typically used to control EMI at very high RF frequencies- <S> getting in or getting out, and can also reduce the resistance of the connections at DC. <S> If the copper areas are joined by more widely spaced vias the loop area and inductance would be higher, and at DC more vias in parallel mean a lower resistance. <S> Edit: <S> Here (from Wikipedia commons ) is a photo of an RF board (an LNB). <A> Three are three reasons why the "picket fence" or "Via stitching" is done at the edges. <S> 1) <S> The dominant reason is to reduce EMI, Consider it a small Faraday cage for your board. <S> This has been covered in other answers so there is no need to elaborate further. <S> 2) <S> For ESD reasons. <S> Good board design dictates that you have a ground ring around the periphery of your board. <S> Boards are handled by their edges and in having a ring around the edge any potential ESD events get dumped into a solid ground, get conducted around the circuits and onto where ever it wants to go. <S> Having ground on both sides and at the edge is a more complete version of a ring and also reduces the resistance. <S> 3) Mechanical reasons. <S> These vias stiffen up the board. <S> Notice that I didn't say make it stronger. <S> When you flex a board, often the shear planes between layers tear apart vias and cause disconnects. <S> Adding vias could very well weaken the board (in it's ultimate yield strength, you have to assess each design individually). <S> But what it does do is make the board less flexible. <S> i.e.; stiffer. <A> As already stated in the comments it is shielding. <S> See http://webbooks.net/freestuff/EMCDesignGuideforPCB.pdf , page 53.
| Once in use this rail/ring also helps move any ESD events into connectors to the edge of the board and away. That prevents the whole board from flexing during handling and particularly poor handling (picking a board up one handed by one edge) and moves the stress out to the edge where there is no critical vias (or at least redundant ones) and prevents flexing in the inner areas where there might only be one via. Two traces with different high frequency signals in them make a nice dipole antenna.
|
Difference between __asm__ volatile("jmp 0x0000") and ((void(*)(void))0x0000)()? Is there anything slightly different between the two calls? Which is the "better" version? <Q> One specifically performs a JMP instruction, and the other treats it as a function call. <S> Depending on the chip you're programming for it will most probably use a different instruction than JMP, and it will most probably alter some registers in some way that the JMP wouldn't. <S> For instance, on MIPS, it would use a JAL instruction (Jump And Link), and the return address would be placed in $ra. <A> You don't say which microcontroller you are using, but that looks to me very much like a jump to a reset vector, causing a software reset on the device. <S> The first form injects an assembly language opcode that creates a (blind) jump into that address, causing the control flow to immediately divert to the beginning of address space from the function it's written in. <S> The second form creates a function pointer to a void function, and calls that function (the last parentheses). <S> Instead of jumping blind to address zero, this mechanism creates a new stack frame and at the very least pushes a return address to the stack so that the code can return from any function that is compiled to address zero or vectored from address zero. <S> If the address zero is indeed a reset vector on the target microcontroller, then diverting the program flow in any way to that address will run the startup routines, which resets the stack and very commonly also initializes any initialized variables in the system. <S> So in that case it really makes no difference if the caller has created a return stack frame or not - the system will just reset and never return to the caller. <S> In the other case, if the microcontroller doesn't start its execution from address zero, then that address could contain any function or vector to a function, that conceivably might return. <S> In that case it's important to write the call as a function pointer. <S> A good example of this kind of system would be a microcontroller that has program RAM at address zero and program ROM at some other address such as 0x8000. <S> At hardware reset the software execution might start at address 0x8000 <S> instead of 0x0000 <S> and the address 0x0000 might contain for example a zero pointer call trap, an old programming trick used to detect function calls to missing methods or to methods of uninitialized objects. <S> But any C compiler will be able to compile the function pointer, so that style is also more portable. <A> The first statement will perform a jump to address zero; the second might perform a call to address zero, but it could just as well do something else. <S> For example, an implementation might define a method <S> NULL_DEREFERENCE_TRAP() with a default implementation while(1); , and have any attempt to call a null pointer <S> invoke that function rather than actually jumping to location zero. <S> If the processor has a watchdog, the while(1); loop may result in the watchdog triggering and restarting the system, but the system might hang for a second or so first. <S> Additionally, depending upon how system initialization code is written, it would be possible that startup code might check whether certain things which hardware would normally force to a certain state on reset <S> are in fact in that state, and use the fact that they aren't as an indication that the system is being "soft-restarted". <S> Triggering a watchdog could prevent such mechanisms from working as intended. <S> Finally, one should be aware that there is no requirement that the storage format for ((void(*)(void))0x1234) have any relationship to the storage format of the number 0x1234 . <S> If a system wanted to trap null-pointer accesses, but still provide a means of creating a pointer to a hardware register at address zero, and if no legitimate address had bit 31 set, <S> it could legitimately (from the standpoint of the C standard) say that the bit pattern stored for any pointer will be the address xor'ed with 0x80000000. <S> In such a system, casting 0 to a pointer would yield an invalid pointer (as it should), but trapping null access would require that a pointer to physical address zero be constructed by some means other than casting an integer zero.
| The reset case is the more common case, and the real difference (and the reason to use the function pointer style) might be that the C compiler doesn't support the asm keyword.
|
How much power can a thin wire handle before heating too much? If I have a copper wire 25um in diameter and 3mm long, and I'm running AC current through it at 3GHz, how can I calculate how much it heats up given a power and duration? The wire is immersed in oil at room temperature, and I don't want to burn the oil, even at the wire's surface. The oil has dimensions about 3mm\$\times\$3mm\$\times\$0.15mm and is in contact with a large chunk of aluminium on one of the flat sides (the wire is suspended about 0.1mm away). Eg. 16W @28Vrms for 10us (it's a 50ohm system) with 50% maximum duty cycle Is this something I can look up, or do I need to plug it into a simulator? <Q> Skin depth at 3GHz is only 1.2um, you'll need to consider that. <S> I have no idea if this calculator is accurate, but it gives a resistance of 18.8 ohms for 100mm of straight 25um wire. <S> However AWG 30 is more like 250um (0.25mm), so which is it? <S> It would be more like 1.8 ohms for 100mm of 250um wire. <S> Note that at 3GHz and this kind of diameter, the resistance is roughly proportional to the reciprocal of the diameter rather than the reciprocal of the diameter squared, since it's only a thin shell around the outside that's doing all the work. <S> In the case of 250um, that's about 50x as much resistance as the wire exhibits for low frequencies. <S> AC resistance will let you calculate the power dissipation, but calculating the temperature rise will not be easy- <S> there may be tables used by transformer designers (since large transformers are often immersed in oil) <S> but I doubt they go down to 250um let alone 25um. <A> 16W for 10us is 160 micro-joules; not very much. <S> Rate of cooling in oil is difficult to calculate <S> and we don't know the pulse repetition rate, so I can't get much further than that. <S> At this point you've added a 50% duty cycle, which changes (or clarifies) the situation enormously. <S> You can model it as continuous dissipation at 50% power (with an error bounded by that 8k figure) and given the thermodynamics of conductive cooling I don't know what the answer will be. <S> Does the oil remain static, or can you pump oil past the wire to improve cooling? <A> You can find tables that tell you resistance and current-carrying capacity for 30 gauge wire. <S> Based on the resistance and current that you're putting through it (and ohms law and p = <S> I V) <S> , you can calculate how much heat you are putting into it. <S> Will it heat up too much? <S> Well, that depends on the heat coefficient of the oil and likely the amount of oil and where the oil can dissipate the heat.
| Given the mass and specific heat capacity of copper, you can put an upper limit on the temperature increase from a single pulse, by neglecting cooling altogether.
|
Would a sulfated lead-acid battery charge at 2.1V per cell? I'm trying to charge a 6-year-old OEM lead-acid battery in a 2008 Volkswagen Jetta with an external charger, whilst it's still connected within the vehicle. (The battery was working fine, until it got discharged to perhaps 25% due to a prolonged episode of charging the mobile phone through the car without the engine running, and wasn't recharged fully since then; I've now added distilled water, and am trying to recharge it after a delay of only a couple of weeks since the last proper charge.) When tested under slight load (key in the ON position without the engine running, and with the lights off), it would appear that the voltage of the circuit being charged is only about 12.6V or so; when testing under no load, it's maybe around 13.5V (with the charger being in maintenance mode). Is there any point in trying to recharge a sulphated battery with a charger that appears to only be capable of producing merely 13V in its maintenance mode, for a 12V battery? Would I have a much better luck with 14V for trying to de-sulphate my battery? <Q> 13V read on your multimeter is probably RMS value. <S> There are probably relatively high voltage pulses. <S> I would just charge that battery and try to use it. <S> If it does not hold charge - you should replace it. <S> I was experimenting a lot with desulphation and... for car battery it does not make sense. <S> If there is just small sulphur dust on electrodes - desulphating will not help a lot. <S> It is waste of time. <A> The best way to damage a charger, is to start your car while the charger is connected to the battery! <S> Hopefully you have not damaged your charger. <S> You are right, you need more that 12v to charge the battery to 12v. <S> However, even though the battery might show 12v with no load, as soon as you start the car, its voltage will drop to 10v or less. <S> If the charger is "current limited," it will charge the battery without trouble. <S> If it is not, then initially there will be a high current rate, which will taper off, as the battery's voltage increases. <S> To charge you battery, disconnect the cable from the positive terminal. <S> Connect the 13v charger to the battery terminals and leave <S> it connected continuously for at least two days . <S> Disconnect charger, reconnect the positive cable and try to start the car. <S> If it does not start, you have a dead battery or a damaged charger. <S> If you are sure the charger is good, then replace the battery. <A> TL; DR: Please replace the battery and avoid injuring yourself. <S> Lead acid batteries in modern vehicles are typically maintenance free, which makes me wonder how you added distilled water - assuming you didn't do anything bad to the case, please read on. <S> Sulphation is the normal mode of lead acid battery discharge. <S> When the discharge is really slow, the layer is built very tightly into all the nooks and crannies on the plate. <S> Rapid discharges are much looser in nature and therefore easier to recover from. <S> To clean the plates without dismantling the battery (which you could do, with great effort and care), you have to perform an equalizing battery charge. <S> The problem is that commercial lead acid batteries for vehicles are not built to withstand this. <S> The basics of equalizing are simply to continue charging so as to maintain a fixed, higher than normal voltage for a specified period of time after the normal charge is complete. <S> Don't do this to a car battery! <S> The industrial cells this is done on are large, well ventilated things with flash arrestors and hydrogen monitoring. <S> The elevated voltage at the end of the cycle is intentionally held to promote off-gassing to mechanically disturb the sulphation on the plate and encourage it to mix into the electrolyte - note that these batteries also could have the benefit of an agitation system to help circulate the electrolyte. <S> The fully charged battery won't absorb any more power so it simply performs more electrolysis than usual. <S> Please do not attempt to equalize a sealed lead acid battery.
| If the current is too high, the battery and/or the charger could be damaged. If there are big sulphur crystals - you have to use chemical method (instead of electrical method with fancy charger). There are chargers out there with so called super charge settings that could do this, but i don't recommend them and neither would the battery manufacturer.
|
How to reduce 5 volts to 4 volts 1.5Amp with minimum components used? I am trying to reduce 5 volts high current source to 4 volts with at least 1.5 amperes. I searched the internet, but I could not find 3 pin voltage regulator, 5V(in) 4V(out)voltage regulator. I think voltage divider is an option, but it consumes lots of power, LMZ12002 is an option but it requires at least 9 components. Is there other options? <Q> Consider connecting a diode in series with the load. <S> edit: Depending on the application <S> , this might be enough, but the forward voltage drop of a diode (or two) does vary with the load current and the temperature of the diode(s). <S> Also, some power (1 W per A) is wasted. <S> If you, for example, want to drop the voltage supplied to a DC motor to make it run a little slower, a diode in series is good. <S> edit by Russell McMahon: <S> A 2A rated silicon diode or 2 x 1A diodes in series will typically have 0.6 to 1.0 Volts drop at near rated current. <S> Actual value varies with type - see data sheet. <S> Voltage drop increases with current. <S> Whether this is precise enough depends on application (the O.P. needs to give more information about the application). <A> An adjustable (because 4.0V is not a commonly used voltage) <S> LDO regulator is the easiest route to take. <S> For example, the Micrel 29150/29300 regulators can handle 1.5A or 3A with a dropout of well under 1V guaranteed. <S> You need to read the datasheet, calculate two resistors to get the required voltage and to follow the datasheet recommendations for the capacitors (especially the output capacitor) to the letter. <S> For example in the above-linked datasheet where it says low ESR capacitors 'may contribute to instability' that means that under no circumstances should you use a large ceramic capacitor as the output cap without a series resistor. <S> There are other options for the chip, this is just one possibility. <S> Whatever chip will be dissipating about 1.5W at 1.5A so a small heat sink is called for. <S> If you're actually using it at 1.5A, the 3A-rated part would be a good idea. <A> See eg www.digikey.com and enter search terms. <S> As an example only The Seiko S816 works with an external transistor and not including decoupling capacitors requires TWO components total. <S> Dropout is limited by the external transistor's characteristics. <S> While a bipolar would usually be used, this would drive a suitable MOSFET and dropout voltages as sensibly low as desired would be possible. <S> Using Digikey's search also found MIC29302 in stock $2.86/1 3A, <S> 250 mV dropout typical at 1.5A. Agh/whoops <S> - I now see I've arrived at the same device as Spehro :-). <S> Search Digikey using their excellent parameter driven search. <S> This and more are there. <S> Also <S> Semtech SC1592 in stock $1.82/1. <S> 260 mV dropout at 3A <S> BUT uses a special dual input supply mode - power conversion is low dropout <S> but Vspply_control needs to be Vout + 1.5V. May or may not be useful. <A> Voltage dividers will work well for low currents and well defined constant loads. <S> The choice between linear regulator and switching regulator depends on the application. <S> Generally linear regulators are less noisy, less efficient, and dissipate more heat. <S> Switching regulators are more efficient and cooler at higher load current. <S> The LMZ12002 module is a good part but requires selection of many external components. <S> Also, looking at the datasheet, it is difficult to tell if it will work with a low (1V) input to output differential voltage. <S> The graphs show the lowest differential voltage of 2.2V. <S> The minimum input voltage would be 6.2V not 5V for 4V output. <S> The NQR002A0X4Z is another prebuilt module with a lower differential voltage requirement of about 0.7V. <S> And it is a little cheaper <S> and it still has pins. <S> NQR002A0X4Z at Digikey <S> http://apps.geindustrial.com/publibrary/checkout/NQR002A0X?TNR=Data%20Sheets|NQR002A0X|generic <S> Minimal parts count is a single resistor, RTrim. <S> However, it is best to add a 10uF or 22uF low ESR cap (ceramic) to the input and the output. <S> Connect them close to the pins. <S> RTrim calculation:12/(4-0.6) = 3.52941kclosest value is 3.57K, 1% <S> The C-tune and R-tune can be left out for general purpose use. <S> They are for speed. <S> Leave the enable pin open and the part will turn on. <S> Or connect it to Vin through a 10k resistor to be sure. <A> Most linear (Low Drop Out - LDO) <S> voltage regulators need about 2V difference between input and output. <S> Given the fairly high current limit, I'd suggest a Switch Mode voltage regulator. <S> For a drop in voltage, you are looking at "buck" regulators. <S> Analog.com have a wide range of regulators: <S> given your specifications on voltage in & out, current limit, the lowest part count <S> I found was the ADP2106 , with 9 components and PCB area of 45 <S> mm^2 <S> I am sure other manufacturers have similar product, possibly even better. <S> This was the quickest example I could find.
| Switching regulators work well when they have a high differential (input to output) voltage compared to linear regulators. There are definitely 3 terminal regulators with low dropout that suit this requirement. The input voltage must be at least 4.7V for it to regulate to 4V at 2A. Depending on the duty cycle, heat sinking for the diode(s) may need to be considered. 1.5A is too high of a current for good regulation and reasonable heat dissipation with a voltage divider. There lots of surface mount options.
|
Unknown voltage in IR pulse sensor circuit I've build a simple circuit based on the sketch from here: http://makezine.com/projects/ir-pulse-sensor/ simulate this circuit – Schematic created using CircuitLab However, after connecting everything I have strange readings on output. It is all the time value around 60mV. I've been thinking that maybe this is the IR from sun light, but after covering receiving diode with aluminium foil which is meant to block IR light it is still around 60mv on output. On the attached circuit I've marked places where I measured voltage and the outcome values. Can someone please tell me where can be mistake? <Q> Yuck, That's a mess of a schematic. <S> But for a start the photodiode <S> (PD) D2 is put in backwards. <S> Right now it's always forward biased.. <S> so you get ~0.5V there, and no response for the light. <S> Flip it around and you'll get V(PD) <S> = <S> 5V- I(PD) <S> * 39 k ohm. <S> (I'd typically put the resistor R4 to ground, then you have zero signal with no light.) <A> C1 and C3 block any DC component of the signal. <S> That is, a steady IR light level will change the voltage at the junction of R4 and D2 (where the schematic shows 470 mV), but will have no effect on the voltages at any point to the right of C3. <S> A DVM will probably not respond quickly enough to indicate the presence of such pulses - you would need an oscilliscope to see the recovered pulses. <A> You need a 1k resistor from the - input of the second op amp to ground. <A> There are multiple design problems with the circuit 1) <S> There is no DC feedback from the output of OA1 to it's negative input. <S> After a few seconds it will saturate and stop working. <S> 2) <S> The output circuit is incorrect. <S> I suspect the only reason the originator was able to see the signal on a scope is because of the input resistance of the oscilloscope. <S> Even with the resistor in place the transistor does not do amplify the signal useful and the circuit would work better if Q2 and R2 are removed and the output of OA2 connected directly to the output. <S> 3) <S> The photodiode polarity and missing resistor as indicated by the other responders. <S> OA1 does nothing useful (as well as stopping it working) and would best be removed. <S> Connecting the photodiode directly to the positive end of C1 may allow it to work.
| The circuit is intended to detect pulsed IR light, as you would get from an IR remote coontrol. The most obvious problem you have is that you didn't copy the circuit correctly. Without a resistor to ground the output will not be able to bring the output low.
|
Why does this EPROM have comb-like structures around the wire bonding pads? I took some pictures of a Microchip EPROM die from the late 80s / early 90s (I can't recall the exact part number). The wire bonding pads are surrounded by a comb-like structure. What is the purpose of this structure? <Q> At this writing, there are two "answers" that are total guesses - and wrong at that too. <S> These are in the TOP metal layer, the combs are there to give lots of sharp edges to promote an excessively high ESD event to conduct at that location. <S> The diode and ESD clamping structures are by necessity in the Silicon. <S> These are very very far from being the transistor structures which are in the Si at least 3 - 7 metal layers down. <S> Look at lightning arrestors in the larger world. <S> You will see these exact same things there. <S> Call it a belt and suspenders approach. <S> Or rather a last chance <S> , the actually ESD structures are rated for much lower voltage events. <A> They are probably large p-MOS and n-MOS transistors that are used for ESD protection on the bonding pads. <S> Here is a reference that shows various bonding pad designs in detail (in general this information is not easy to come by- <S> IC manufacturers seem to treat ESD protection as a kind of trade secret). <S> Image taken from the above pdf: <S> I don't recall Microchip ever making memory EPROMs. <S> Is this part of an EPROM microcontroller? <S> Edit: Just looking at a Microchip PIC16C57, which is probably from a similar era. <S> There are similar patterns on either side of most of the pins (which are I/O) <S> but on only one side of the input-only pins such as T0CKI, /MCLR/Vpp, OSC1. <S> So the structures appear to be drivers on one side and ESD protection circuitry of whatever kind on the other side. <A> Those structures are the large transistors required to drive the pins that are used as outputs.
| These comb structures are as you might expect to see when you want to induce breakdown at a precise location and into controlled structures rather than else where in the chip.
|
How do you calculate the current and voltage when the emitter is grounded for saturation mode For example, assume you have this transistor with a grounded emitter: Since we are dealing with a saturation mode, \$v_{ce} = 0.2 \$ making the drop across the resistor 9.8 v. The current going through the collector is \$ I_c = 9.8/10 k\Omega = 9.8 mA \$ and assuming \$ \beta = 100 \$ then \$I_b = 0.098 mA \$. But \$v_c = I_c \times R_c = 9.8\$ volts. For a transistor to be considered in the saturation mode \$v_c < v_b \$ My textbook has some contradictory statements about saturation mode. In the beginning of the course, we learned that when a transistor is in saturation mode, the collector should read close to zero volts. The book now says that when a HIGH (> 2 volts) is applied to the input supplied to the transistor's base, it will cause the transistor to conduct and the collector voltage drops to a LOW. But in the calculation from above (assuming that it was done correctly), I can clearly see that the voltage on the collector is 9.8 volts, close to 10 volts and not anywhere close to zero or LOW. EDIT: Am I suppose to assume that \$v_c = v_{cc} - I_c \times R_c = 0.2\$. Since the emitter is grounded, \$v_c = v_{ce}\$ <Q> You cannot make both assumptions about \$V_{ce} = 0.2V\$ and <S> \$\beta = 100\$ at the same time; they are for two different modes of operation for the transistor (there's also a third mode where the transistor is in cutoff, and a fourth less common one in reverse active). <S> You start out assuming one of the possible states. <S> For example, suppose I assume the transistor is saturated. <S> Then \$V_{ce} = 0.2V\$ <S> and \$V_{be} = <S> 0.7V\$. <S> You can then solve for base and collector currents using these assumptions for the BJT and only these assumptions . <S> The last step is to check your assumptions. <S> For example, to make sure the transistor isn't actually in the linear active region must check that \$\beta I_{b} \gg I_{c}\$. <S> So let's say in your case you get \$I_{c} = 9.8 mA\$ and \$I_{b} <S> = <S> 9.8 <S> \mu A\$. <S> Well clearly our assumption about saturation was bad because \$\beta I_{b} = 980 \mu A\$, which is less than our calculated \$I_{c}\$. <S> We must then start over with new assumptions and re-solve the problem. <S> Instead, suppose \$I_b = 2 mA\$. <S> Then \$\beta <S> I_b = 200mA\$, which is much greater than \$I_c\$, so now the saturation assumption is correct. <S> Note: <S> \$\beta I_b \gg I_c\$ is kind of a vague limit. <S> Typically we use at least 10 times bigger for saturation. <S> For solving assuming the BJT is forward active, you would assume \$\beta I_b = <S> I_c\$ and only this assumption . <S> To check it (against saturation), simply make sure \$0.2V < V_{ce}\$. <A> Your calculation of the collector current is correct. <S> So let's focus on calculating the base current. <S> Since we are dealing with a saturation mode, <S> vce=0.2 making the drop across the resistor 9.8 v. <S> The current going through the collector is Ic=9.8/10kΩ=9.8mA and assuming β=100 <S> then Ib=0.098mA. β is a characteristic of the transistor in forward-active mode, and doesn't apply in saturation. <S> Then the base resistor determines the current, \$I_b=\dfrac{V_{in}-0.7\ \mathrm{V}}{10\ \mathrm{k\Omega}}\$. <S> I can clearly see that the voltage on the collector is 9.8 volts <S> You just got mixed up here. <S> The voltage across the collector resistor was 9.8 V. <S> The voltage across the transistor from emitter to collector is 0.2 V. <S> In fact, you got the 9.8 V number by assuming \$v_{ce}=0.2\ \mathrm{V}\$. <A> VC does NOT equal 9.8V. <S> It is 10 - 9.8 = 0.2 as in your assumption. <S> The 0.2V is only an approximation - depending upon the transistor it may be as low as a handful of millivolts.
| Simply use the forward drop of the be junction, \$V_{be}\approx{}0.7\ \mathrm{V}\$.
|
CMSIS and sub millisecond delays We are running FreeRTOS with CMSIS. Is it possible, using CMSIS on STM32F3 Discovery board, to have periodic tasks running with periods less than 1 millisecond resolution? We want to run tasks at 400 Hz, meaning the period should be 2.5 milliseconds. All functions pertaining to delays in CMSIS that i've found have millisecond resolution. Should we reconsider using CMSIS for our purposes? EDIT 2:A straight forward question now, hehe.Could someone show me an example of how to setup a task to run periodically with a rate of 400 Hz with FreeRTOS, possibly using CMSIS but not limited to it, on STM32F3 Discovery board? EDIT:I will try to explain in more detail. The task is a PID controller that should run as fast as possible, but no faster than 432 Hz. So 400 Hz seemed like a round number. This means that 2 ms is a too short period. And the difference in task frequency between 2 ms and, say, 4 ms is quite dramatically. I don't quite know how much jitter we can accept, though. But it should probably not be in the millisecond range. It seems more and more like we have to make use of the native FreeRTOS calls for the timing of tasks. We would happily trade CPU utilization for greater timing accuracy since we won't probably make use of a great deal of the cycles in non-OS activity. <Q> The granularity is probably a limitation from FreeRTOS, not from CMSIS itself. <S> Since you require a task every 2.5ms you might want to setup a timer to trigger every 2.5ms (Interrupt). <S> Do what you have to do inside your interrupt (but keep it short) and get out as fast as possible. <S> Usually there is hardware available for specific tasks, so if you can tell us something about your task at hand, there might be a better solution. <A> I found the solution eventually!What I did was to change the constant 'configTICK_RATE_HZ' in 'FreeRTOSConfig.h' to something so that 400 Hz could be expressed as an integer multiple of the tick rate, and then used the function 'vTaskDelayUntil'. <S> I.e. ' <S> configTICK_RATE_HZ 4000' and 'vTaskDelayUntil(&firstWake, 10)'. <S> Be sure to set 'INCLUDE_vTaskDelayUntil 1' in the same file as well! <S> They warn about using values greater than 1000, but it seems to work for us. <S> The CMSIS functions `osDelay*' cannot be used anymore though. <A> You are correct that FreeRTOS specifies all timings in ticks (as can be seen by the name of the parameters in functions such as vTaskDelay() , although vTaskDelayUntil() is better suited to periodic tasks). <S> The pdMS_TO_TICKS <S> () macro is used to convert milliseconds to ticks. <S> When using FreeRTOS by itself therefore the limitation is actually one of processing power. <S> If the CMSIS APIs don't allow sub millisecond times to be specified then there is nothing to stop you calling the native API too. <S> Restricting times to be multiples of ms would appear to be somewhat limiting as it assumes your tick is an exact multiple of ms.
| Setting sub millisecond ticks is indeed possible and lots of people do it, but naturally you will experience a greater percentage of your CPU time going to processing interrupts.
|
Is there a metal that will not interfere with smartphone reception as a case? I want to design an iPhone case that will include a metal plate on the back of it. Is there any kind of metal that will not interfere with the phone's reception? <Q> That depends on what you mean by interfere . <S> If you mean as if there were nothing there but <S> air <S> , then no. <S> But if you mean the cell phone still works , then yes. <S> Consequently, there will be some RF currents in the metal. <S> These currents will circulate around, and ultimately: be radiated again, or go into losses, making something warm <S> It's pretty hard to prevent the energy from being re-radiated. <S> As the currents wave through the metal, it's likely they will hit the edge. <S> When they do, the current can't continue flowing, so a voltage develops. <S> You have current, you have voltage -- sounds like an antenna. <S> In fact if you cut a slot in a waveguide with the right dimensions, it makes a great antenna. <S> It's called, unsurprisingly, a slot antenna . <S> Depending on the geometry and placement of your metal, it might re-radiate <S> the energy it intercepts quite efficiently. <S> Or, it might not radiate so efficiently, and instead a lot of the current will circulate in the metal and be absorbed by resistive losses. <S> It's going to depend a lot on the specific geometry of the metal. <A> In addition to what's been previously stated, you will likely want to reduce the losses from induced currents. <S> Using high-conductivity non-magnetic materials will be beneficial, eg. <S> Gold, Copper, Aluminum. <S> Metals to avoid would be those that interact with magnetic fields in a manner that makes their permeability factor much greater than 1, eg. nickel; such materials negatively impact the skin depth . <A> No. <S> All kinds of metal have enough conductivity to interfere with the function of a UHF antenna. <S> The placement and dimensions of such a metal plate are much more important than the type of metal.
| By putting metal near the phone, this metal will intercept some of the electrical field emitted by the antenna.
|
Level shifting 5V to 3.3V - can I just use a zener diode? simulate this circuit – Schematic created using CircuitLab My problem is the ATmega328 is running at 5V. I know I need a bidirectional level shifter. However don't really want to spend much more money on this if I can. I don't want to blow up an expensive amplifier as well. Most expensive IC I've ever bought. The D2 pin would output 5V but I thought zener diodes are commonly used for over voltage protection. So why I can't just use this diode to clamp it down to 3.3v? I know I need bidirectional level shifting but wouldn't the voltage be clamped to 3.3v either way? <Q> Upon looking at the data sheet for the max31850, it looks like you want to connect an open-drain 3.3V output (or input) to a 5V input (or output when low). <S> I don't think this is a good idea to use a zener- <S> the knee is too soft, and the output driver of the max31850 is too wimpy (4mA) to make this work reliably. <S> Also the minimum voltage to be recognized as a 1 is 0.6 Vdd, which is 3.0V, a bit too close to 3.3V for comfort when working in the reverse direction- <S> the zener will be conducting significantly at that voltage. <S> Further, the datasheet typical capacitance for the zener is 450pF at 0V <S> (more when forward biased) <S> so you may not get the speed. <S> The Zener would draw excessive current from the micro if the port pin was driven high accidentally (and would likely exceed the maximum voltage spec), and the 4.7K plus the zener soft knee would likely lead to 'high' voltages that were not enough to guarantee operation. <S> Generally all bad news. <S> Powering the ATMega from 3.3V would make these problems go away. <A> That configuration is asking for trouble. <S> The 328, when driving a high output, is rated for ~ 4 volts @ 20 mA, so it will be way outside its comfort zone when driving a 3 volt zener. <S> Instead, run a 200 ohm resistor from D2 to the zener, and a 1k from the zener to P1. <S> Another possible problem with your idea is speed. <S> You don't say how fast you want the lines to toggle. <S> A 3-volt BZX79C has a capacitance around 470 pF. <S> Combined with the 4.7k resistor you've shown gives a time constant of about 2 microseconds, so you could not reasonably expect data transfers at greater than 100 kHz. <S> With the components I've suggested, you can get about 500 kHz from the Adafruit. <A> You're thinking along the right lines with the zener, but you have the resistor in the wrong place. <S> Do not build this circuit! <S> The resistor should be in series with the signal line, between ATmega328 and diode. <S> Have a look at this very similar question: <S> How does a zener protect my microcontroller? <S> The output voltage from the MAX31850 will not exceed 3.3V, assuming that it's a 3.3V chip. <A> For usage of zener diode, both @JohnHonniball and @Spehro have good suggestions. <S> But I think you may not need zener diode. <S> Per MAX31850's datasheet, MAX31850 have 4 pins, DQ for data output, open-drain and read-only. <S> AD0~AD3 for address input. <S> As DQ pin is read-only, so you only read it. <S> And atmega328 can recogonize 3.3V as a logic high (when \$V_{CC}\$ = 2.4V ~ 5.5V, \$V_{IH(min)}\$= 0.6\$V_{CC}\$ ). <S> So you just need configure your data pin as a input, then it won't output high voltage. <S> Don't forget put the 3.3V pull-up resistor. <S> For address pins, because they are basically input only pins. <S> If you need them be MCU controlled, you can use simply resistor dividers. <S> If you don't need MCU controlled address, you can just fix them to some voltage, per the datasheet .
| You're right that a zener circuit will work for a bidirectional signal line.
|
What is the exact difference between SGMII and 1000Base-X? I was wondering what the exact difference between SGMII and 1000Base-X is, because both seem very similar. Is the "big" difference only the physical medium they are supposed to be transmitted on? Both standards transmit Ethernet frames and use the same medium access method (CSMA/CD), so what's the crux here that justifies to use two names for basically the same thing? <Q> To elaborate on @Majenko's answer, both SGMII and 1000Base <S> -x are dual 1000Mbps SERDES pairs (one in each direction), at least until the 1000Base-X signals reach the optical transceiver. <S> The main difference is in the auto-negotiation capabilities. <S> In 1000Base-X, auto-negotiation is limited to flow-control (and duplex, which is not really used since it's always full-duplex). <S> In SGMII, auto-negotiation also allows the PHY to indicate to the MAC the post-PHY link speed. <S> Even though the MAC-to-PHY SGMII link is always 1000Mbps, it supports 10, 100 and 1000Mbps past the PHY and the MAC need to know this to space out the bits properly (e. g. <S> if the external link is 100Mbps, each bit on the SGMII link is sent 10 times). <A> Most Ethernet systems are made up of a number of building blocks. <S> The two most important are the Ethernet MAC Device (the device that actually makes and receives Ethernet frames), and the Ethernet PHY (PHYsical interface) device - the device that connects you to your wires, fibre, etc. <S> These two devices are connected using a Media Independent Interface (MII). <S> So your Ethernet chip would connect to a 1000Base-X PHY using SGMII. <S> It could instead connect to a 1000Base-T PHY device using the same SGMII interface. <A> There are PHYs with RGMII, SGMII and MDI. <S> In these case RGMII connect to MAC. <S> SGMII connect to a media module, such as SFP module which can be fiber or copper. <S> MDI as usual for Copper Transformer interface. <S> In some PHY the link to MAC is over SGMII.
| In gigabit ethernet it's the SGMII - Serial Gigabit Media Independent Interface.
|
Ensuring common ground in a circuit with several voltage requirements I'm working on a project that has components requiring various voltages. 3.3v --- to power a set of laser diodes (qty 24 @ 50mA = 1.2A) 5v --- to power a set of infrared transceiver sensors (qty 24 @ currently unknown current) 9v --- to power an Arduino board and some peripherals (some typical Arduino-esque current draw) I've never done a project like this (with various voltage requirements), and I'm wondering what the best practices are for powering these separate sub-systems. Would one of the following scenarios be most appropriate? Scenario A - Multiple power supplies--- Use a separate AC/DC power supply for each required voltage (Meanwell or somesuch)--- Somehow connect all the grounds together Scenario B - One power supply and voltage regulators--- Use one AC/DC power supply rated at 9v--- Step down the voltage to 5v and 3.3v using appropriately rated voltage regulators Scenario C - Something I could never have imagined! Thanks in advance. <Q> I think it partly depends on whether this is a "home" project or for a commercial product. <S> However, using a linear regulator to drop 5.7 V <S> @ 1.2 A is going to dissipate nearly 7 W of heat, so you're going to need a serious heatsink, not to mention it being hideously inefficient. <S> For the "easy way out", use a transformer with a centre-tapped secondary (or two secondaries connected in series, but make sure you connect them up the right way around), so that you get (for example) 0-6-12 Vac outputs. <S> You can then use the 12 Vac winding to produce your 9 Vdc output, and the 6 Vac output for the 5 Vdc and 3.3 Vdc outputs (with the usual bridge rectifiers, smoothing capacitors and linear regulators). <S> For the "right" (IMHO) solution, have a single 9 Vdc input, and use two switching regulators to produce the 5 Vdc and 3 Vdc supplies. <S> Perhaps something like the ADP2302 from Analog Devices. <S> If the current draw on your 5 Vdc rail is low enough (say < 250 mA), you could get away with a linear regulator here. <A> Either scenario A or B would be suitable. <S> The main thing is that in all likelihood the GNDs for all three supplies need to be interconnected so that there is operational compatibility between the TX, RX and MCU sections of the design. <S> The choice of the A or B really depends on factors that go beyond the realm of the electronics design stuff we like to talk about at this site. <S> That said there are factors that you have to consider in making your decision of which configuration to select. <S> Here are some of those considerations. <S> System level packaging is always a consideration. <S> What do you haveroom for? <S> Want it big? <S> Small? <S> What are your skills toward implementation. <S> Sometimes we take a pathin a decision tree based on what we are familiar with or feelconfident enough to weigh the risks involved. <S> What ever you choose to do please do consider energy conversion that is efficient as possible. <S> The days where we can choose to freely use inefficient linear regulators operating at 10 to 50% efficiency should be well behind us. <S> (Note that in some localities there are laws requiring certain classes of products to meet certain efficiency standards in order for those products to be sold in that area. <S> Battery chargers are one of these categories). <A> I have used Scenario B with success using LM78xx voltage regulators. <S> It's a very straight forward approach and doesn't increase the component count very much. <S> Just be sure that your wall wart (or whatever you are using) outputs a DC voltage that is at least several volts higher than the rated output voltage of the regulator. <S> Also be sure that it can supply enough current with some room to spare. <S> Scenario A seems rather unwieldy. <A> Scenario B. Use pre built switching regulators based on the LM2575 step down converter. <S> The prebuilt boards are normally designed to be drop in replacements for the LM78xx series of linear regulators. <S> You can buy them in 5V and 3.3V and feed them the 9V you are supplying your Arduino. <S> The LM2575 is very easy to use and requires only 5 external components: diode, inductor, two resistors, and a capacitor. <S> Fixed voltage versions only requires the diode, inductor and capacitor.
| Use switch mode energy conversion where ever possible. Cost of implementation is often a primary driving factor in asituation like this. The "easiest" answer would be to have a single 9 V input, and then use linear regulators to take that down to 5V and 3V separately.
|
Suggestions on instruments to detect pachyderms I am doing a project to detect the pachyderms in the forests when they cross the borders. Now is there is any other way other than seismic or sound waves to detect the pachyderms before they cross a border (Ruling out the camera's). I would love your valuable inputs. Thanks in advance. <Q> As COTS Pachyderm-Proliferation-Preventers are probably as rare as hens teeth, designing is liable to be required. <S> Electronic means seems liable to be a preferred one. <S> Beam breaking (IR or perhaps visible) at above typical average person or other-creature <S> height seem liable to offer good success of perceiving pending pachydermal plundering. <S> A single beam will remain broken for t = <S> Lp/ <S> Vp (for obvious meanings of L, V and P) <S> and you can decide how L a worst case small P is and <S> what max V it moves at to give a likely estimate of the minimum time <S> a beam is liable to be broken for, allowing discrimination against smaller and or faster moving beasties with smaller minimum L/V ratios. <S> Positioning a few beams a short distance apart where separation is <S> say > <S> = 2 <S> x Lp_typical would give you some ability to count numbers in a group. <S> Triggering a light in the path of perambulating pachydermae may lead to aversive behaviour. <S> As with beam breaking - size and speed of the target could be used to filter out signals from pussy-cats, possums and people <S> A simple and easy solution would be to find foodstuffs which are non perishable and attractive to proliferating pachyderms and mount it in such a manner that it was accessible to the target creatures but not readily disturbed otherwise. <S> Add simple monitoring means and when the prey prises the food material from its location the trap is sprung. <A> Making an answer of my earlier comment: Two suggestions: <S> Infrared motion detectors like the ones used on automatic lights (tuned to only react to large, warm objects) <S> Radar kind of thing - low level radio signal, and detect variations in the reflections. <S> Going that route would require some kind of signal processing to differentiate between trees waving in the wind and elephants walking - maybe use multiple sensors and combine the processed results. <S> Expanding since seismic and acoustic aren't really ruled out (see comments.) <S> Seismic detection: A picket line of seismic detectors along the border that transmit their signals in real time to a central processor. <S> Using the differences in arrival time for strong signals, you could locate the pachyderms relative to the fence. <S> With enough processor power and enough sensors, you could follow the pachyderms in real time on a monitor. <S> More processing would let you extrapolate from movements to determine if they are headed towards the border. <S> This could be more long range than any of the other methods. <S> If the pickets are in a zig-zag instead of a straight line, you could even follow them on the other side of the border (where they go after crossing the border.) <S> Acoustic detection (microphones) as above. <S> Probably less long range and more prone to false signals than seismic. <S> Your processing would have to look for the sound of (pachyderm) footsteps rather than just signal strength as with seismic. <S> Given <S> that one of your comments says you want an early warning system, I'd probably go for number 3 - zig zag line, and lots of processing. <S> If you want cheap, I'd go with the IR motion detectors along the border - just wire them to a panel of indicator lights <S> where ever it is you are going to do the monitoring. <A> Bees appear to work - the hives buzz more when elephants get closer. <S> Since elephants are scared of bees, this wouldn't be a neutral observation, but actually deter them from attacking the crops. <S> See http://elephantsandbees.com/ <S> This can work for human sized targets, so should be able to use a larger mesh with larger beasts.
| Doppler RADAR units (as once commonly used as door opener sensors) are liable to be successful with probabilistic predictions based on the ponderous pachydermal progress. There are commercially available microwave units that combine the transmitter and receiver and put out an AC signal proportional to the speed and size of the moving object. If you want an higher maintenance technology which doesn't act as a deterrent and doesn't make honey, then you can use mesh networks and detect changes in the signal strength between the nodes.
|
Enclosing/Casing Design for electronics (electronic eng. vs industrial designer) I have been wondering, this since i dont have that much experience in product design, but, who is supposed to do the case design of an electronic product? the industrial engineer or the electronic engineer? i have been trying to find the answer to this question last job i had my boss didnt want to allow me (electronic eng) to participate in the case design (i needed to ground it at least) <Q> Since the aesthetics of the enclosure are often what distinguish your product in the marketplace, it is an industrial designer , not an industrial engineer, who should be doing the enclosure design. <S> Your company may have one in-house, or hire one as a consultant. <S> I don't see that an electrical engineer would be too involved in the initial case design, except to give to the industrial designer a BOM of all the large parts anticipated to be used in the design. <S> Often, a case design will be influenced by whatever type of display is being used and other user interface features (buttons, etc.). <S> There may be some back and forth between the EE and the industrial designer on some of these components. <S> After a case design has been proposed, then the EE would need to make sure there is enough room for whatever PCB's are needed and also cutouts for connectors, that there is adequate height for tall components, and any thermal considerations are taken care of. <S> The industrial designer will typically render models of the enclosure using a 3D CAD program like SolidWorks . <S> Programs like this can usually exchange files with PCB layout programs like Altium Designer , for example, to make sure mechanical features of a PCB like a cutout for a mounting post like up exactly. <S> 3D modelling programs can be used to design enclosures that will be produced either in metal or plastic. <S> Prototypes are usually made using 3D printing . <S> Later, instructions for making a mold or CNC instructions for making a metal enclosure can be output from the CAD program. <S> When designing the enclosure, it is important for the industrial designer to keep manufacturing costs in mind; adding additional complexity to a mold can easily cost an extra $10,000. <A> In this case your boss dictated the terms, and you live with them. <S> The EE should specify whether there are any specs that need to be met by the case, hand it off, and review it prior to production. <S> It's all one team. <A> Ideally, multiple people would be involved in the case design. <S> In your case, you were worried about grounding. <S> But you might also be concerned about heat dissipation, the strength of the enclosure, ease of manufacturing the case, assembly processes, the cost of the case, safety standards, etc. <S> It would be highly unlikely, even if you work at a small company, that one person would be responsible for all of these items. <S> Now, it isn't unreasonable for your boss to have an industrial engineer take the lead on the case design but that person should be getting input from electrical engineers, mechanical engineers, purchasing, QA, etc. <S> in the design. <S> If your boss didn't allow you to participate at all in the case design, then that is highly questionable.
| The industrial designer will be working with any other engineers involved in the project, such as electrical, mechanical, and industrial, plus a human factors person, and will be responsible for seeing that the enclosure meets all the electrical, mechanical, and regulatory requirements of the product.
|
SMD LED polarity marking: is the cathode marking standardized? SMD LEDs normally have some kind of marking like the following image from here indicates: The site states The CATHODE lead is always the lead to be identified with ALL LEDs, including surface-mount LEDs. There are definitely manufactures that do NOT follow this scheme like this one from CREE . We recently had 300 PCBs manufactured where each had 32 LEDs of those. However, the assembly house placed all LEDs in reverse. The first thing we obviously did was looking at our board layout. If you assume that always the cathode is indicated, the footprint is correct. However, it is not consistent with the marking of the actual LED that was mounted. The manufacturer probably just looked at the matching markings. Long story short, the manufacturer checked their production and "admitted" that it was their fault. Actually, we worried that they just "but the marking says otherwise". This could have ended up in a long discussion about who's fault this was, so: Is there a standard that defines that the marking actually HAS TO indicate the CATHODE?Has the assembly house to double check something like this? <Q> It's also a good idea to make a couple of test boards and hand solder and get familiar with the components to identify this kind of issue prior to sending in large batches to get assembled. <S> I've made my own altium footprints with silkscreen diode style symbol showing polarity, which sits in between the pads. <S> It helps me with hand soldering too, and then it doesn't matter which product I get, which may have different markings. <S> I guess there are tricky components though that even trick the manufacturer, if they do not check the mechanical data/datasheet of the component when putting it into the pick and place machines. <S> Good luck getting it fixed hehe, will take someone a long time. <A> I believe that PCB manufacturers are aware of the fact that surface mount LED can have the tab on the Anode side. <S> I have worked before with several manufacturers and they have always asked about the proper orientation of LEDs. <S> At first this was strange for me <S> but it made sense when I became aware of this issue. <S> One solution could be to omit A and K markings and place a tab where the actual device's tab goes. <S> This by itself could still be misleading if the manufacturer is actually aware that the tab denotes Anode. <S> Thus, I would say that in order to avoid confusion a note should be placed either somewhere in the board or in the schematic. <S> For example: Note: <S> Tab denotes anode. <S> By the way, using C can be also confusing because it can be taken as a capacitor place. <A> Not all manufacturers mark the cathode. <S> I just got some that have a green stripe, and it corresponds to the anode. <S> Some don't have any markings, but you have to look at the datasheet and compare it to the internal connection structure. <S> In the end, I think it's best to identify anode and cathode in the silk and/or on the assembly drawing, and supply the datasheet (or at least the datasheet drawing of the part). <S> If there's any doubt, test a part and make sure before you build 1000 boards!
| It is entirely per component manufacturer, and when the PCB is manufactured some companies will ask that component placement overlays are given with designators are provided and polarity marks for all polarized components are shown.
|
Can I dip a soldering iron in water to cool it down? I have a cheapo soldering station (Duratool D02265). It is fine for what I need. But, I often want to swap the tips round quickly, without waiting for ages for it to cool down! I was wondering: Can I dip the end in water (without destroying it!) to cool it down quickly (Just to the top of the nut, so I can undo the nut and carry on working)? Of course I would turn it off first! Here is a picture of the soldering station and the tip (Its cheap and rubbish, I know!) <Q> Dipping the tip into water does not sound like a good idea. <S> However, you don't need to anyway. <S> I change tips occasionally on my soldering iron too. <S> Just use a pair of plyers to undo the nut, pull the tip out, and put in the holder. <S> You can use your fingers to put the new tip on, but will need the plyers again to tighten the nut. <A> Quickly changing the temperature like that causes the metal to contract/expand at different rates and will cause metal fatigue. <S> So it will shorten the life expectancy of the tip and perhaps the treading used to connect it. <S> Using a moist sponge is a much safer option and you should be able to still cool it down fairly quickly this way. <A> Biggest risk is getting corrosion or electric shock risk if water wicks into the element area. <S> Some irons have a pretty exposed thermocouple behind the tip that will prefer not to get wet or have electrical connection with the element wire. <S> That said, a very damp sponge on the exposed part of the tip is common practice and tolerated fairly well by most decent irons and tips. <S> Also remember that many irons may overheat if the tip is removed with the power on (Weller Magnastat obviously will not as the tip magnet is needed to close the switch).
| Cheap bits may compromise their iron plating (if any) with repeated steam pressure build-up if water gets under the edge of the plating. The iron should be off when you do this, but there is no need to deliberately cool it.
|
How to interpret these antenna radiation patterns? The datasheet for this chip antenna shows a couple of radiation plots, but I don't know how they correspond to the physical orientation of the antenna. I want to orient the antenna so that the nice, omnidirectional "co-pol H-Plane" is parallel to the ground. For example, say I placed the device on a table in a room. I don't care how well it radiates above or below the table, but I want to be able to walk in a circle around it and always get consistent signal strength. Are the angles (\$\theta\$ and \$\phi\$) standardized? I've seen other datasheets (for different antennas) that show the corresponding orientation, but I'm stuck with using this one. In other words: Should I orient the antenna "side-to-side", or "up-and-down"? :) Thanks. <Q> to elaborate on the answer from Zokol... <S> If you have a vertical (up-down) antenna, the H field is horizontal, as in the picture from the Wikipedia page Zokol mentioned. <S> I would have made this a comment, but I wanted to include the actual image rather than just link to it. <A> The H-plane refers to horizontal, and E-plane to vertical radiation orientation. <S> Co-pol stands for co-polarization, meaning that the transmitter and receiver are using same polarization orientation. <S> Cross-polarization means that the polarization of the transmitter is inverted, comparing to the receiver. <S> For example: sending signal with left-hand circular polarization, when the receiver is designed for right-hand circular polarization. <S> Similar effect with horizontal vs. vertical polarization. <S> So you should place the antenna horizontaly and keep the other antenna oriented so that the polarization is not inverted. <S> Sources: https://en.wikipedia.org/wiki/E-plane_and_H-plane http://www.antenna-theory.com/definitions/crosspolarization.php <A> H-plane is the plane in which the magnetic fields propagate and E-plane is the plane in which the electric fields propagate. <S> My guess is that this chip is more or less an electrically lengthened dipole, so if you want vertical polarization (H plane parallel to the ground), you will have to stand it up on its end and mount your board vertically. <S> Otherwise the physical proportions of the antenna don't really make much sense.
| In a standard vertical dipole antenna, the H plane is perpendicular to the axis of the antenna while the E plane is any vertical plane that passes through the antenna (electric field lines from one end of the antenna to the other follow the E-plane while magnetic field lines circulating around the antenna follow the H plane).
|
Determining distance between wireless sensors - sailing project I'm looking for a solution which will allow me to determine the distance between two points, one of which is static and the other not. It's part of a project I'm working on which will involve the creation of a sailing app for my boat. Based on a wireless network of sensors, I want to be able to determine and display on a tablet, information which shows how far the sails have been hoisted up on the mast. I need to put some sensors on the mast and in the sails themselves. I worked on RFID tags but got poor results due to high power consumption. I tried ZigBee distance measurements and accelerometers but ended up with a lot of noisy data. Any ideas on the matter would be much appreciated. Please remember that there are environmental matters to consider (weather) and the fact that the boat is in constant movement. <Q> Just brainstorming here. <S> You could put barometric pressure sensors on the head and tack of the sails. <S> If you measure the pressure difference you can calculate height. <S> Might not be super accurate, but it would probably work to some extent. <S> The short term change in pressure in the head sensor would be somewhat accurate while the sail is going up, even without reference to another sensor. <S> You could also put one sensor on the base of the mast to be your zero reference, and in that case, each sail would have just one sensor at the head. <S> This would work better for conventional spinnakers which have considerable variation in tack height, depending on conditions. <S> Another way is to use something like an optical encoder on the mast. <S> The detector would be on the head of the mainsail (this would only work for the main, probably not for headsails). <S> None of these things are going to be super reliable. <S> In other words, I don't think this holds promise as an industrial type of system. <S> It would be more like a teaching aid that could be kind of interesting (basically a gimmick). <S> If you need rock-solid reliability, I think you will need to consider special halyards or something like that. <A> I kinda like the idea of Ultrasonic measurement here. <S> There would be two transmitters: one is battery-powered and mounted on the sail. <S> It would emit a chip periodically. <S> The other transmitter is with one of the receivers. <S> You would have TWO receivers: one at the top of the mast, the other at the bottom of the mast. <S> If I am thinking correctly, the ratio between the received times would give you the position of the sail on the mast. <S> Note that you do <S> NOT need to know exactly when the transmit chirp occurred. <S> That is: you don't need any connection (wired or wireless) between the transmitter on the sail and your electronics. <S> Instead, you simply see which signal arrived first: the base or the top of the mast. <S> You calibrate the system by firing the reference transmitter (located with one of the receivers) and measuring the time for that signal to be received by the other receiver. <S> You could also encode a signal into the sail transmit chirp if you have multiple sails. <S> This allows you to ignore signals from a sail that is not on that particular mast. <A> You could try it with a ultrasonic time measurement. <S> You place a ultra sonic speaker on one side of the measurement and a receiver on the other. <S> By measuring the time of flight you can get the distance in between. <A>
| If discrete measurements are OK you could install magnets on the mast and a hall effect sensor on the sail (or vice versa).
|
Why LED reversed bias voltage cannot be measured? As I have just found out, typical LED does not behave similarly to standard diode when measuring reversed bias voltage. On typical diode, you can measure reverse bias voltage about .3 to .6V, but not on LED. I have read you can measure it using constant current source, but why? What is the physical principle behind this? <Q> LEDs behave electrically like other types of diodes, just with different parameters. <S> They can be modeled reasonably well by the Shockley diode equation with a series resistor. <S> Regular diodes tend to have a reverse breakdown in the 50V-1000V range, LEDs it's on the lower end of that range. <S> Usually we don't use LEDs reverse biased except to stand off a few volts in multiplexed circuits, so the specs tend to be very loose (maybe a 5V spec on an LED that can withstand 50V or 100V of reverse bias). <S> Regular diodes have a forward voltage of 0.6V <S> or so at currents of mA, with LEDs it's more like 1V-3.5V (the lower values for IR LEDs, the higher for UV). <S> The ideality factor n tends to be around 2 for regular diodes, and it can be quite different for LEDs. <A> Sorry, but you're wrong. <S> In 2 , the voltmeter is a balanced bridge which draws no current. <A> I assume you are having trouble measuring the forward voltage with your DMM Diode function. <S> Some DMM's have enough compliance to measure LED's and some don't. <S> So you could try another DMM. <S> If not follow EM-fields idea and just use your power supply on the bench. <S> Put some series resistance (maybe 1k ohm) before the LED to limit the current... and as Sphero said you will be measuring the forward voltage at only one current. <S> The reverse voltage of an LED is another story.. as Sphero said numbers in the 50 - 100 V range are common. <S> (Again a series resistor will be needed so as to not damage the LED.) <S> You can do some fun things with a reverse biased LED. <S> (Link on request.)
| The forward and reverse bias voltages and currents can be measured on an LED as easily as they can on any other diode, and all that's needed is a voltmeter, an ammeter and a voltage source.
|
How to drive 30 LEDs with a smaller amount of pins? We have 30 LEDs in a row, and we want to turn them on left to right. However there are way to many for the Arduino to have each one on a different pin. Is there an IC that can take a binary output, and output in base 1? <Q> LEDs like that are commonly driven by shift registers. <S> A shift register takes 3 inputs from the arduino (Data, Enable and Clock), takes a (for example) 8 bit number, then outputs it on 8 different pins. <S> One example is like this: Shift Register 8-Bit - 74HC595 <A> You really should dive into charlieplexing. <S> With this technique it is possible to drive many leds with just a few pins. <S> The formula is n x n-1. <S> Meaning that with 4 pins you can drive <S> 4 x <S> (4-1) = <S> 12 leds. <S> Imagine that 12 leds with just 4 pins. <S> With 5 pins you can therefore drive 5 x (5-1) = <S> 20 leds. <S> It involves some really ingenious wiring and software, But there is a lot of documentation on that in the net. <S> just search google for arduino and charlieplexing. <S> I made an hourglass with 20 leds just using an Attiny85 and a Larson scanner with 12 leds also using an Attiny85. <S> I am on the verge of writing a detailed series about charlieplexing on my website, but hey that will take a while. <S> http://lucstechpage.weebly.com/ <A> What you're looking for is a decoder or a multiplexer . <A> The right answer is a to take the the number of LEDS you have and call that the number of bits of storage you need. <S> If you have 8 LEDs you need to interface to 8 bits of external storage. <S> You then need to find an interface protocol with an equal number to or less amount of pins than you have. <S> If you only have 3 external GPIO pins, you could go with the SPI interface, or the IIC interface. <S> Consider this part as a solution: http://www.maximintegrated.com/en/products/interface/controllers-expanders/MAX7314.html <A> Okay, thermometer code. <S> I don't know of any off-the-shelf decoders for that. <S> If you are into programmable logic, I think a single CPLD such as the XC2C64 could be programmed to drive (say) 50 LEDs with a 6-bit input. <S> That gives you static drive. <S> An easier and cheaper way is to use multiplexed drive- drive 8 source drivers (UDN2803 or similar) with one port of your micro and 8 sink drivers (ULN2803) with another port. <S> That will allow up to 256 LEDs to be driven with only 16 port pins, two chips and 8 resistors. <S> The source drivers may have to be MOSFETs or something else <S> hefty, as they must conduct the average current of a single LED * 16 (with 12.5% duty cycle). <S> The sink drivers must handle the average current of a single LED * 8 (but all of them may be on at once). <S> Layout may be more convenient using a shift register and static drive- <S> the matrix layout is better for a rectangle, not so good for a linear bar graph.
| With charlieplexing you can blink each of these leds individually or even have them burn all at the same time.
|
Does an unloaded amplifier use more power at a higher volume? Suppose we have a powerful sound amplifier, which is set at 90% of it's power, and nothing is being driven into its inputs. Is it using more power at this high volume (and producing heat, etc.)? Is it bad to an leave amplifier at a high volume even if nothing is playing? <Q> It is using power and producing heat, but probably not as much as if it was driving the outputs to full power. <S> A Class D amplifier may use very little power when quiescent, a Class A amplifier will use about as much power idling as when it is producing full volume output. <S> Most consumer electronics will use Class D or Class AB amplifier for the output stage, so it won't use much power compared to when it's driving speakers to full volume. <S> Class A for a power amplifier is mostly the province of audiophiles and audiophools. <S> I don't think it typically makes much difference where you leave the volume control- <S> that's an attenuator that's back of where the heavy lifting gets done. <S> I guess if you're plugging and unplugging input cables you might damage your speakers from the loud hum and buzz that occurs if the volume is cranked up to 11. <A> The attenuator, or "volume control" on a power amp is just that: an attenuator. <S> It goes before the amp itself, which has a fixed voltage gain. <S> So there's no difference at all to the amp if you drive it with 1Vrms and -6dB of attenuation or 0.5Vrms <S> and 0dB of attenuation. <S> The amp itself gets 0.5Vrms <S> in both cases and <S> so that's what gets amplified by the amount fixed by the manufacturer. <S> Output power is then determined by the speakers' impedance and the actual output voltage, which is why the spec is higher at 4 ohms than at 8 ohms. <S> Watts = <S> Volts^2 / Ohms. <S> You don't actually get twice the max. <S> power with half the impedance because the amp's internal power supply will sag a bit (the Volts^2 part). <S> This doesn't affect the sound, just reduces your headroom compared to the ideal math as reflected in the spec. <S> When I calibrate a sound system, I set all of the amps and whatever processing is between them and the sound board so that the entire chain from the board to each amp clips at the same time as the board is turned up. <S> There's no point in going louder than that because something will clip at that level anyway <S> and the board will still say it's okay. <S> If you have multiple amps that work together, calibrate them all individually as above, then turn all but one down for balance. <S> This gives me maximum volume with minimum noise compared to that volume, and it lets the board tell me when the amps are about to clip. <A> It will use marginally more power because any pre-attenuator noise will be amplified. <S> Marginal being the operative word. <A> "Is it bad to an leave amplifier at a high volume even if nothing is playing?" <S> I do this all the time and have never had any problems - as long as any source you have plugged into the amp is muted or turned down, ie 'earthed'.
| The amount of power will depend on the type of amplifier.
|
What do the arrows in transistor symbols point to (and from)? Transistor symbols are often drawn with arrows pointing in one direction or the other, depending on type, like in the following symbols: But what is the arrow actually pointing at? And from where are they pointing? Is it the same principle behind it in each symbol and if so, why do they sometimes point FROM the transistor and sometimes TO it? And why do the arrows point from different origins (sometimes base, emitter, gate, source etc) in different types? Is there any general principle behind how the arrows are directed? <Q> For BJT's there is a PN junction between the base and emitter. <S> The arrow indicates the order of the junction (base to emitter or emitter to base). <S> An NPN has stacked N, P, and N doped channels. <S> The PN junction (between base and emitter) goes from the center out. <S> PNP likewise is the opposite. <S> Observations, not necessarily fact: In a MOSFET, the body is often connected to the source. <S> For an N-channel MOSFET, the source is N-doped and the body is P-doped, so the arrow points from the source to the body. <S> Likewise, a P-channel MOSFET has the reverse condition. <S> Interestingly, Wikipedia has symbols for "MOSFETS with no bulk/body" which have opposite arrow directions. <S> I have no good explanation for why these are this way, though I suspect it might follow a similar pattern and the semiconductor topology is different from "traditional" MOSFET topologies. <S> Your symbols for b (FET) are JFET symbols. <S> Here, the PN junction is between the gate and "body" (semiconductor section connecting the drain and source; I don't know what the correct for this part of a JFET is <S> so I just called it the body because it takes the bulk volume of the JFET). <S> For an N-channel, the gate is P-doped and the body is N-doped, so the arrow points from the gate in. <S> The P-channel JFET is the opposite <S> so the arrow points out of the gate. <S> I've never used unijunction transistors (case d), but looking at the wikipedia page shows a similar doping structure as the JFET, the only difference the lack of an insulated gate (names also have changed, apparently it follows the "BJT" type naming of base and emitter). <S> I would not be surprised if the arrow direction convention follows the order of the PN junction (wasn't immediately obvious to me which type the example structure on Wikipedia was for). <S> Additional info: <S> Bipolar Junction Transistors <S> MOSFET <S> JFET <S> unijunction transistors <A> In short, the arrows show the current direction of a PN junction when forward biased. <S> In BJTs the PN junction is the base-emitter one. <S> In JFETs it is the one between gate and channel. <S> In MOSFETs it is the one which exists between the channel and the substrate (the terminal where the arrow is placed in the symbols you posted), which is not available externally. <S> Note that when the substrate terminal is not shown in the symbol, the arrow is placed on the source and will point in the opposite direction, since the source has the same semiconductor polarity of the channel, which is always opposite to the substrate polarity: N-channel devices have P-type substrate and viceversa. <S> In UJTs (case d) it is the one between the emitter and the bulk semiconductor which connects the two base terminals. <S> Note that this convention is the same used for semiconductor diodes <S> : the anode is connected to the part of the symbol which is a big arrowhead, and the anode is the terminal where the current enters the device when forward biased. <S> This doesn't mean that those junctions must be operated in forward bias conditions. <S> This depends on the specific device type and operating conditions. <S> E.g. JFETs are always operated with their gate junction reverse biased, whereas BJTs may work in different operating regions depending on whether their BE and BC junctions are forward or reverse biased. <A> That is, current flow from positive to negative. <S> Diode and LED symbols are the same. <S> EDIT: <S> clarified, the emitter arrows. <A> About the bipolar transistor symbol. <S> First transistors were made with needles tucked into a germanium crystal, and were derived from point contact germanium diodes. <S> Galena diodes (for radio) used also nails set over the crystal surface, not soldered connections. <S> The symbol is litterally that. <S> A specific junction transistor symbol once existed, but the point-contact symbol sticked.
| The arrows in the bipolar transistors (emitter) show the direction of flow of conventional current .
|
Name that thing... Circular 4-pin female connector I've been asked to wire in some Octopod LED lights driven by a Pixel Drive 30 controller, but I can't work out what the connectors are between the lights. I tried to contact the manufacturer but they've been taken over and the person I dealt with wasn't able to tell me. This is one of the connectors I have... Specifications are:- 4 equidistantly arranged pins 12mm diameter across the plastic part (I assume to fit a 1/2" male part?) 9mm depth to collar Screw-fit casing My behringher mx1602 mixing desk power supply has a similar connector in a 3-pin configuration. From looking around it seemed to be an "Amphenol" connector used in vintage microphones and also power supplies. My searches so far have been contradictory that the parts are rare as hen's teeth and very expensive but that doesn't fit with the use of a 3-pin variant in a relatively 'budget' piece of equipment like the MX1602. My searches for Amphenol seem to be a company that make an awful lot of connectors but I haven't been able to identify which model/part/description this part is in order to be able to even try to order one. <Q> This maybe a not very precise description: 4 Pin Female Inline Microphone Connector <S> Each connector is keyed to ensure proper polarity. <S> They provide a threaded locking ring for reliable contact under extreme shock and vibration. <S> These connectors are great for mobile use and can handle both voice, data and power applications. <S> Includes a built in strain relief <S> According to http://www.vetco.net/catalog/product_info.php?products_id=6552 http://en.wikipedia.org/wiki/Microphone_connector <A> I believe this is a GX12-4 connector, mostly available through eBay. <S> I've ordered some myself and hope they are the right thing. <A> That is an Amphenol 91-MC4F(female).
| : These circular connectors are most commonly used for microphones, but they are rugged, multi-pin connectors suitable for a wide variety of uses. I have found them, but they ARE expensive now! The partner to that is the 91-MC4M(male).
|
Switch 15V source with a MOS by digital 0/5V (dc) I'm trying to switch on and off some 15V devices from Arduino Uno digital ports (0/5V). Each port must control a group of resistive loads (lights) of a train model. There are about 10 groups of loads, and I'd like to keep simple the switching circuits. From now on I'll consider just a switching unit, a group of lights. I want the power source (VDC) to lit my lights as much as possible when the digital port is high (5V) and let them off when it's low (0V). My first attempt has been to use a common MOSFET, the 2N7000, with a pull-down resistor to force the lights to turn off and secure the transistor in case the load gets accidentally disconnected. R1 is high-valued compared to the load, so most of the current flows to the load, and the threshold Vgs of 2N7000 is around 2V; it looks like 5V should switch it on. I decided that each load would be composed up to 10 lights, 1'5k Ohm each, so that the 150 Ohm equivalent R would drain 100mA from VDC, below the 200mA maximum Id for the MOSFET. All grounds are common. simulate this circuit – Schematic created using CircuitLab So this was my short study. However, once in the field, the lights weren't that bright, and after doing some theoretical tests, I got around 3V at output node instead of the expected ~14V from power source (VDC - Vds_on) After searching online, I found that this transistor may not be appropriate for this job, although I wouldn't consider it a "power electronics" job. I have to add that I don't need a high switching frequency; maybe about 100Hz for a software-ruled PWM fade-on/off effect, but nothing else. Question time (most important first): How can I get the 14V at output? Is 2N7000 inappropriate (and why)? Which [family of] transistor could I use instead? Do you think the circuit is alright? Could you recommend me some securing mechanism (current) for the Arduino side? Thank you very much! <Q> You have an N channel MOSFET connected as a source follower. <S> A source follower (just like an emitter follower for BJTs) can't have as it's output a voltage any higher than what is put on the gate. <S> In fact, for a MOSFET, the source voltage will be a couple of volts less than what is on the gate - this is why you see 3V. <S> The act of connecting your load to the source ensures that you cannot achieve full-turn-on unless the gate rises higher than 17 or 18 volts from ground. <S> But all is not lost.... <S> Ask yourself - what turns the FET on - answer - the gate to source voltage has to be a couple of volts or even higher on some fets. <S> This can only mean that the fet is partially turned on. <S> Like this: - Rd is where you'd connect the lights. <S> Now with the mosfet gate at 5V with respect to grounded source the fet turns on much better. <S> Another way is to use a P ch MOSFET driven from a BJT: - Because the P channel FET's source is up to the positive supply, pulling the gate down to GND <S> ensures it turns on to the lowest resistance. <S> Don't run this circuit any higher than about 15 volts though because the maximum FET gate voltage might be limited to 15 volts - read the data sheets - a lot of mosfets are OK for + <S> /-20 <S> volts gate-source but <S> some are only rated at max 12 volts. <A> Yes, the threshold may be 2V, but that is the voltage difference between the gate and the source. <S> Your 5V is between the gate and ground. <S> Between ground and the source, you have your load. <S> So the voltage at the gate, with respect to the source, will be much less than you think. <S> Try it - measure the voltage between gate and source with a multimeter, see what it is. <S> For high side switching you should use a P-channel MOSFET, and use an NPN BJT to switch it. <S> This is a circuit I use all over the place: <A> You're getting exactly what one would expect from that circuit. <S> You haven't made a switch, you've made a source follower (aka a common drain amplifier). <S> We had another question along these lines recently; the answers there may help you. <S> To summarize, the transistor only turns on when Vgs = 2V. <S> If Vg is 5V, that means Vs cannot be more than 3V or the transistor will turn off. <S> To fix this, you need to ground the source. <S> This fixes both Vg and Vs, giving Vgs = <S> 5V. Connect your load between the drain and the 15V supply.
| The problem here is that you are using an N-Channel MOSFET as a high side switch. You ought to consider grounding the source and putting the train lights in the drain.
|
Why this current regulator won't regulates? I'm trying to make a current regulator to power up some LEDs. For now I'm working only on PSpice models. The circuit above works well if the sensing opamp is configured as voltage follower or even if the voltage of the shunt resistor is directly reported to the inverting input of the main opamp U2A w/out the U2B. Now, if the U2B is used to amplifying the shunt voltage resistor, in order to make this lower of at least 10 times to absorb 10 times less power, the opamp should amplifying 10 times this voltage and report it on the inverting input of U2A. Under PSpice, by varying the Vcc from 4.5 (the minimum to have opamps working under this input values) to 12V, with this U2B which apmplifies fo 10 times, the current is like this. Where noramlly should remains stable under 50mA. The average value that you can see depends also on the base resistor of the BJT. What am I missing? <Q> The voltage divider ratio is \$\frac{R7}{R6 + R7}\$, which works out to \$\frac{1.8k}{18k + 1.8k} = 0.091.\$ <S> That gives you about 45.5mA, which is close to what you see. <S> You actually want a ratio of 0.1. <S> Add a 220-ohm resistor in series below R7 and you'll get much closer to your ideal value. <A> The negative feedback for an op-amp is usually taken directly from the op-amp's output or from the emitter of a transistor such as Q2. <S> If you try and put "other stuff" in this feedback loop you introduce delays and what you find (normally) is that you are building an oscillator. <S> Please check what the transient response looks like because I suspect that your circuit will be oscillating at some frequency in the high kHz region. <S> All the main players such as TI, ADI etc design op-amps to compete with each other and they are constantly pushing the upper frequency capabilities of their devices. <S> This inevitably means that the phase margins of those op-amps are a little close to the point of oscillation in normal circuits - you have added a 2nd op-amp and expect this to be stable - think again. <S> It can be made stable but this can be a tortuous endeavor. <S> The graph showing current against Vcc <S> I suspect <S> has triangular artefact on it due to this high frequency oscillation. <A> Running a version of your circuit under TINA gives proper operation at 45.2 mA. <S> The fact that your waveform shows about 45 nA, rather than mA, suggests that you've made a data entry error. <S> You should check to see if you've changed the sense resistor to 6.6 micro ohms. <S> That said, increasing the gain in order to lower shunt resistance power dissipation does not seem a pressing need. <S> At 45 mA, a 6.6 ohm shunt will only dissipate 13 mW. <S> Why is this a problem? <S> Are you truly using a shunt so fragile that 13 mW is a problem? <S> And, since this is an LED driver, I can't believe that you need enormous stability in your output current and are worrying about temperature drift in your shunt. <S> Or have I missed something? <A> The same circuit, with an BUZ70 will work perfect. <S> There is still a little reduction on current at high voltages (from 15 to 24V). <S> I don't know if it is a reduction of the gain of the MOS at higher voltages between gate and drain (doesn't should be ah higher gain)? <A> FYI, most UV LEDs have this charateristic: they are Much more efficient when Overdriven and, since you are concerned about efficiency, it would help to understand how this is done: <S> Current pulses are applied with a controlled peak amplitude and some limited maximum pulse width. <S> The duty cycle of the square wave is reduced to limit both the PN junction temperature and the apparent brightness. <S> (Reducing the duty cycle also reduces the pulse width.) <S> I hope you get excited by the constant current driver, and begin exploring the larger world of LED switching drivers. <S> psIf <S> you are driving only one LED <S> , the 3.3V supply may be adequate, so Vcc may only be needed for the OpAmp.
| It looks like the problem is the values of R6 and R7.
|
EEPROM I2C driver hanged during ESD test? In our prototype , we have a I2C based EEPROM . During ESD Test(High potential spark is injected into system for a very short moment), the drivers hangs in the I2C code. Basically there are while loops in which which we are checking is the busy , or transmit flag is set or not, Acknowledge received or not using the respective registers. So , if any of the parameters is not matched , then the code will hang in that loop itself. This driver works fine in normal conditions. But during spark injection, it hangs in one of the loops. And even after the ESD test it remains in the same condition, , it does not recover until we restart the device. What could go wrong with the controller(MSP430F6438 I2c bus) or the slave(I2c based EEPROM), which causes the code to hang in one of the loops which checks for busy bus, transmitt flag, acknowledge recieved flag? <Q> It sounds like your test conditions are causing the I2C driver code, or the I2C module itself, to enter a state from which they can't recover. <S> The simplest timeout to implement would be to count the number of times you've tested the various flags and when that count expires, exit with an error code. <S> A more complicated (i.e. useful) approach would be to monitor a hardware timer that's running in the background. <S> When a loop starts, record the current value of the timer plus the timeout that you want; check the timer at the start of each loop and if it exceeds your pre-calculated value then exit with an error code. <A> While really we can't know what causes your hang-up, there is one likely scenario where you should probably look first. <S> An ESD pulse is likely to cause an unintended on transition on a digital signals. <S> In an I2C system, if ESD causes a pulse to appear on SDA when the bus is idle, this will be interpreted as a start condition. <S> Depending on how the uC and peripheral I2C controllers are implemented, they could wait indefinitely for the started transaction to complete before they are ready to execute a new transaction (for example, one generated by your code). <S> Of course an extra pulse on SCL or SDA when an I2C transaction is in progress (maybe detected by only one of the two chips involved) could also cause the two chips to lose track of the state of the transaction and cause problems. <S> So if you are looking for where your hardware might be improved to avoid this fault, make sure your SDA and SCL lines are routed over unbroken ground planes, avoid excess routing distance, and possibly reduce the pull-up resistor values. <S> Also make sure the uC and peripheral have adequate bypass capacitors. <S> If you are looking for software work-arounds for this fault, if you can detect the hung condition, you could try resetting the uC's I2C block, or sending SCL pulses (8 or 10 or 16?) with SDA released high to clear the I2C state machine in the peripheral. <S> This might require resetting the uC <S> i/o's to be GPIO's and bit-banging if the uC I2C block is also stuck. <A> What could go wrong with the controller(MSP430F6438 I2c bus) or the slave(I2c based EEPROM), which causes the code to hang in one of the loops which checks for busy bus, transimit flag, acknowledge received flag? <S> It's hard to tell which causes your system hang. <S> But you can do something to figure out where you code hang. <S> If possible, you can print some debug message to the screen or to your PC by USART or other interface. <S> You can add some "probe" in your code, when enter a function or enter a loop, you print some message to your PC, then you can know where you code hang. <S> However it's a good habit to add timeout to a loop may "dead". <A> Sort out the flaky code. <S> If the code hangs due to an unforeseen circumstance then alter the code so that the unforeseen circumstance is catered for. <S> As a last resort try a hardware watchdog timer - although this will only work (no code change) <S> if there are some external lines that can be decoded that indicate the problem. <S> You might also consider some EMI protection/filtering on internal wiring and maybe even take a look at the ground plane around the micro and EEPROM.
| Try putting a timeout on the loops to detect a failure; if a failure occurs then reset both I2C hardware and drivers.
|
Best RF frequency for my application I need to design a device that can transmit an RF signal about 200 meters. The data transferred is very simple. One device simply has a button, that when pressed transmits a two-digit ID to the other unit. There is no other data or voice transmission. Because the product will be sold globally I'm leaning toward doing 2.4GHz, but I'm concerned about getting the 200 meter range. This range is way outside of most 2.4GHz products. I'm planning on using TI's CC2541 2.4GHz transceiver SoC along with their CC2592 range extender. The CC2592 is supposed to extend the range by up to 7x. BlueGiga sells a Bluetooth Low Energy "Long range" module with a claimed range of 450 meters. So I think reaching 200 meters should be possible. The other choice is a 868/915/920 MHz system, but that has its own complications, and I would prefer to use a single frequency 2.4 GHz system. Also I'm not sure if 868/915/920 MHz will cover all countries. So my question is what frequency would you suggest for an international product transmitting a simple ID up to 200 meters? Thanks! <Q> The 2.4GHz frequency is more solid international standard than 433 MHz.(source: http://en.wikipedia.org/wiki/ISM_band ).Any of the carrier frequencies mentioned could transmit to that distance. <S> But, it's almost always a question of the power of the signal. <S> If you don't have the power of the signal, you need to rely of the manufacturers data. <S> Note that generally the transceiver distances are line of sight distances i.e. no obstacles. <S> The obstacles can reduce that distance considerably. <S> I would recommend a 2.4GHz transceiver with at least double line of sight transecting distance that what you need. <S> TI are good, another option is the Nordic nRF24L01+ chip. <S> Note that it could also be possible with some Bluetooth modules but at that signal strength they are probably illegal! <S> Good luck,Data source - I'm an EE Engineer. <A> and it performs much better in terms of FSL and penetrating walls. <S> As far as I know, the 433 MHz is not widely used like the 2.4 GHz signal <S> so I expect u find less attenuation there which will ease the reception of ur signal at 200 meters. <A> I think you'll have to break out the math on this one and do a link budget. <S> For indoor operation, have a look at the ITU model for indoor attenuation . <S> You'll need to make some assumptions about how many walls/floors you want to be able to operate through. <S> For outdoor operation, there's quite a few urban loss models, such as the Young model. <S> Basically, you'll want to find the worst-case path loss at 2.4 GHz for 200m with your chosen environment assumptions, then apply a reasonable safety factor. <S> To ensure that your link closes, you need to at least meet the SNR requirement of the receiver under the worst expected environment. <S> If you can't do this with the modem chip alone, you have three (basically just two) parameters to work with: <S> Transmit/receive antenna gain. <S> Receiver noise figure (by adding a low noise amplifier). <S> Transmit power (by adding a PA). <S> Antenna gain is probably out in your case, as you probably are going to work with an omnidirectional antenna. <S> Most of those single-chip RF solutions have a poor noise figure. <S> You can get relatively low-power low noise amplifiers which you can put in front of the receiver to improve the noise figure and thereby the SNR. <S> Some of these include internal bypass switches <S> so you don't need an external one during transmit to prevent damage. <S> Maximum transmit power varies from region to region, but I think most countries follow US limits. <S> When using frequency hopping, you can use up to 30 dBm EIRP with less than 75 channels or up to 36 dBm when using more than 75 channels or digitally spread, provided that the input at the antenna doesn't exceed 30 dBm. <S> If you're going to add a PA expect to use a fair bit more power, and don't forget to isolate your receiver with appropriate switching so you don't blow it up. <S> Good luck!
| Generally, lower frequencies have a better ability to pass through obstacles than the higher frequencies. I would go with the 433 MHz, it is ISM frequency
|
What kind of cable is used to connect the two parts of headphones I am trying to replace a broken cable on my headphones(Sennheiser HD 280 PRO) but I can't figure the type of cable so that I can order it online. I think it is pretty standard as it seems other headphones have similar cables. However searching for headphones cable only helps to find replacing connector cable(i.e. the one connecting the headphones to computer) but not the one connecting the two parts(speakers). This is a picture of the cable. One part is varnished(maybe not the correct word in English). I don't have a caliper, but I think the tickness of the cable is about 1.5-2mm. Could someone please tell me what kind of cable is this? EDIT: adding two more pictures of the end of the cable: The while bit that can be seems is more like fabric, not wire. <Q> If this is the cable that runs between the two earpieces, all you need is two conductors. <S> The original cable uses enamelled wire of two different colors. <S> The enamel coating with burn off when you tin the conductors. <S> Simply twist all of the strands of one color together, then hold the twisted wires in a ball of molten solder on your soldering iron tip. <S> Be careful not to get one strand of the other color in the twisted bundle - this would result in a short circuit. <A> I'd use speaker wire, as it's probably best combination of cheap and readily available. <S> Places that sell speakers may sell it by the foot, from a spool. <S> I believe if you reclaim wire from a different dead device, you run the risk of it being lacquered, making it hard to work with (namely, hard to solder). <A> I don't know the type of wire <S> but I would seriously consider using something a little thicker in your repair. <S> Most headphone failures are because of these cheap, thin wires. <A> My suggestion would be to look for a standard headphones extension cable, you can get them in many different lengths. <S> If you get one that has a jack on one end, then all you need to do is cut the connector off the other end and solder it on to your headphones. <S> This has two advantages, one that you can get extension cables from many places online for reasonable prices, and two you don't need to solder on the connector which can be fiddly and the DIY ones tend to have pretty rubbish strain reliefs. <S> But actually it is relatively easy to solder. <S> See my answer to this question for tips on soldering the cable.
| Usually the cable is enamelled copper as it allows for much lighter weight and narrower diameter cables on headphones.
|
Can I solder 4 AA batteries together in series and make my own rechargeable battery pack? I've bought my young son a couple of remote control tanks for Christmas. They are supplied with two rechargeable 'battery packs' (4 x AA batteries heat shrunk together). The battery pack supplied is Ni-Cd 400mAh 4.8V The charger says "Output 4.8VDC 250mA". The reviews of these tanks say they are great but the batteries don't last very long. I wondered if I could buy 4 x 2850mAH AA batteries and then solder them together to replicate the supplied battery pack and then charge them with the supplied charger and use these instead of the supplied ones? I've been reading on the internet how to solder the batteries (i.e. don't apply heat for long and 'rough' the ends up first to help the solder stick). But I also read somewhere about 'balancing' the batteries so that they would charge?? The supplied batteries are just linked together (i.e. nothing in there that I could see that would 'balance' them) so thought I would get expert advice on the best way to proceed with this? I'm fine at soldering but don't want to make a home-made battery pack and then have it blow up when I try and charge it! I bought a plastic 4xAA battery holder that links the batteries together but it doesn't fit in the tank compartment so that won't work. Help appreciated :-) <Q> It's possible to buy AA batteries with solder tags on each end. <S> The tags are spot-welded to the cells during manufacture. <S> At least, it used to be possible to get them, from industrial suppliers such as Farnell. <S> I bought one in NiCad form several years ago. <A> Edit: see also Is soldering wires directly on a NiMh battery safe? <S> nothing in there that I could see that would 'balance' them <S> This may be why they don't last very long. <S> Due to manufacturing variance, one of the batteries will go flat first while the others have more charge. <S> This can result in current being driven through it by the others while it's flat, damaging the battery. <S> Or the reverse happens while charging: one will fill up first, and then suffer overcharge damage. <S> Does the charger automatically stop on full charge or <S> it <S> it timed? <S> Or look for cheap repurposeable packs, eg. <S> http://www.dx.com/p/gd-509-2-4v-1200mah-rechargeable-2-x-aa-cordless-phone-replacement-battery-pack-white-292547#.VIXLYsmfjjU <S> is clearly 2x AA heatshrunk together, you may be able to find 4 heatshrunk together in the right format then just change the connector. <S> Edit 2 <S> : by the way, I would put money on the tanks suffering mechanical failure or enemy action before the battery packs become an issue. <S> Unless they're expensive 'models' rather than 'toys'. <A> Make sure that the AA batteries that you select are re-chargable. <S> The commonly available Alkaline batteries are not re-chargable. <S> With appropriate charger for each type you could select NiCD or NiMH batteries and have a viable solution. <S> Commerically available chargers for NiCD and NiMH batteries typically can charge four cells at one time but they charge each cell individually. <S> For this reason it is advisable to not solder to the cells so they can be used in the charger. <S> One way to make a tubular cell holder for AA batteries is to slide them into a piece of 1/2" rigid copper tubing cut to the right length. <S> Attach a copper end cap with a spring attached inside to make the negative end of the holder. <S> The copper tube becomes the negative end of the pack provided you mount the batteries inside in the correct orientation. <S> For the positive end use a screw type fitting so you can open and close the tube. <S> You have to fabricate your own top + contact by epoxy mounting a brass screw into the axial center of the screw-on part of the pack. <S> There are various choices of how to achieve the screw-on part of such a pack but not knowing the size constraint in your situation I leave it to your DIY. <S> I used an union fitting one time when I made a tube to hold 45 AA cells.
| It may be better to adapt the battery holder to the batteries with a saw, so you can use the holder and charge them individually.
|
How to make this I2C OLED screen work? (probably SH1106) I have just received this screen: link but unfortunately it's different then other showed in reviews. That's my version link It's probably based on SH1106 but I can't make it work. I have tried few popular Arduino libraries but I can't get address of this screen from I2C scanner - it's not answering. Anyone knows how to program it? <Q> I believe that your OLED screen might be a SSD1306 based one, and not a SH1106 as you believe. <S> Should that be the case, I think you'll be glad to know that there is a library for it (made by Adafruit): https://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples <S> It's simple and you can find it here: http://www.modlog.net/?p=887 <S> Hope <S> this helps you out. <A> I could make the display work with the Adafruit library, based on the configuration as follows: // <S> If using software SPI (the default case):#define <S> OLED_MOSI <S> 11 <S> //SDA in the OLED <S> display#define <S> OLED_CLK <S> 13 <S> //SCL <S> in the OLED <S> display#define OLED_DC 9 //D <S> /C in the OLED <S> display#define OLED_CS 10 <S> //Its not <S> connected#define OLED_RESET 2 <S> //RST <S> in the OLED displayAdafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS); Remember: <S> Use the example with the SPI communication, evertything works GREAT!! <A> I just bought a display exactly like yours and had also the same problem... and trying to find a solution I came with your question, and later I found the solution!! <S> : <S> http://forum.arduino.cc/index.php?topic=217290.0 <S> Follow the steps from the user: <S> Caltoa, -Use the U8glib, take the 'Hello World' example for Arduino, and uncomment the section: U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // <S> SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9 <S> And add a '2' at the end, like this: U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9, 2); // <S> SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9 <S> Then connect like this: U8GLIB_SSD1306_128X64 u8g( SCL, SDA, 'cs no connected', D/C, RST); Totally Working!! <S> p.s. <S> It is not an I2C display, it uses a SPI communication, the labels on the display are wrong! <S> That is why in the library you have to use the 'Software SPI Communication'. <S> Hope it works with you, and everyone with the same problem!!
| From what I've read, you should also do a small code modification in order to get your OLED display working.
|
Why do only thick wires have less resistance? I have learned that the thicker a wire is, the less resistance it has. However, this is not the case for other things such as a wall. If a (non-metal) wall is thicker it does not have a lower resistance. Why is this? Thanks in advance. <Q> Resistance in a wire can be defined as $$R = <S> \frac{\rho <S> L}{A} <S> $$ <S> where \$ \rho \$ = <S> resistivity <S> \$ <S> L \$ = <S> Length <S> \$ <S> A \$ = cross sectional area <S> Thicker gauge wires have a larger A, and therefore the resistance of the wire decreases keeping everything else constant. <S> If you are asking about non metallic objects, than they might not be conductive (very high \$ \rho \$), and so their resistance would be extremely high. <S> If the object is conductive, then the \$ \rho \$ of that material would play a factor in its overall resistance. <S> Below is an image that shows the resistivityof various types of meterial. <S> Rubber is not considered to be conductive and look at its resistivity compared to copper which is conductive. <S> Source for image <A> Because it's not the thickness of the object , it's the thickness of the electrical path. <A> How much electrical resistance does ANY wall have? <S> Think of the wall as a very short and very fat conductor. <S> It happens to have VERY high resistivity, so its resistance will be very high, but if you double the size of the wall, its resistance will be halved. <S> Maybe still very large but halved. <S> So, your question is somewhat confused, because you are comparing two materials (metal in a wire and a wall that does not conduct much, at all) that are grossly different. <S> So different that the material difference totally obscures the question about conductor cross-section.
| A thicker wall does not increase the thickness of the path but instead increases its length , thereby increasing resistance.
|
Will having two antennae at the receiver give better reception? I have a 300mbps router with two antennae (tp-link td-wd8968). I'm building a PC and looking for a wireless network card. I have seen seen cards with a single antenna (150mbps) and cards with two antennae (300mbps); I understand the latter is for 802.11n which has higher data rates, but does it have any affect on the signal range? <Q> Not really. <S> Wi-fi cards that support using two antennas generally have an internal switch that will select one antenna or the other. <S> The card will select whichever antenna has a better signal. <S> This is called diversity, and it is used to counter issues with channel fading. <S> Newer wifi cards can use both antennas at the same time. <S> This is called MIMO and under certain circumstances it can allow a 2x improvement in bandwidth. <S> In terms of range, diversity will allow the card to counter some forms of fading and can improve reception and reliability, but it will not increase the range unless you use a higher gain (more directional) antenna. <A> However, more likely is that the two antennas are not interactive and are used to achieve diversity <A> Adding multiple Antennas would help in beam steering also ,If both of your antennas are working together .Its one of the Beam forming Mechanisms :) <A> This whitepaper has some nice graphs. <S> Have a look at page 7, where the radiation pattern of a dipole is shown. <S> This is the kind of radiation pattern you have with one antenna: <S> You can see that radiation is high in the x and y direction, but poor in the z direction. <S> That means, if your router is in the z direction, you're going to have poor reception. <S> To improve your reception you can position the antenna differently. <S> You can do that on both sides: on your computer, and on your router. <S> Adding a second antenna in a 90 degrees corner with the first one would mean that you're going to improve reception in, say, <S> z and x axis. <S> That means you have fair reception in the z and y direction, and good reception in the x axis. <S> However, the card will normally not use both antennas at the same time, but rather select the one with the best reception, so you will have equal reception in all directions. <S> Newer cards will use both antennas at the same time. <S> In that case you want to position the antennas in one line, so that you're improving both x and y, <S> but not z. <S> Then, again, make sure that your router is in the x or y direction, but not in z. <S> Having two antennas is therefore especially useful for moving transceivers (laptops, phones, etc.) <S> or for transceivers that need to talk to many others at the same time (the router). <S> Your router has two antennas, so make sure to position them optimally for your setup.
| Having two antennas that are specifically sited as an array can make the pair of antennas more directional and this inevitably leads to higher gain.
|
Is this use of optocoupler wrong? This is nearly not exactly how the circuit looks like, but I have a feeling that this circuit could cause problems while working. My feeling is that initially as Q1 would be in ON position, the collector voltage at the optocoupler would be 0.6V and hence to turn ON the transistor of the optocoupler, the base voltage would have to be more than 1.0V. The CTR is 470% as "If" is 5mA. I feel the circuit is wrong. Can anyone explain it? <Q> You did not provide a datasheet link or a part number for the opto, but I can make some educated guesses. <S> First, the 470% CTR is a suspiciously high number as a guaranteed minimum at 5mA LED current for a phototransistor output isolator. <S> Suppose it's something like the excellent FOD817D <S> (the D is important) which has a CTR range of 300-600 with 5mA in. <S> That is specified with Vce of 5.0V and you require less than 0.5V for it to work reliably. <S> The effective CTR will be much lower. <S> Figure 3 shows you that you can typically expect it to handle 2.5mA at the output (good design will add a substantial amount of margin for aging, temperature and unit-to-unit variations, so maybe 0.8mA is safe). <S> You are at 250uA, so the particular part I mention should be more than okay. <S> Suppose you are using a Darlington type or an optoisolator that is not as high performance? <S> Well, you need to add some voltage drop between the optoisolator collector and the transistor base. <S> Since you have plenty of voltage (12V supply) and the optos are specified at 5V, you could insert a 5.1V zener diode between the opto as so.. simulate this circuit – <S> Schematic created using CircuitLab <S> The Vce of the opto is about 5.6V at the threshold, and the zener diode <S> I suggested has a 5.1V breakdown at 50uA (the circuit switches at about 60uA) <S> so all the parts are well specified. <S> Nominal base current is similar to your circuit, about 180uA. <S> You'd really like to see more like 2-4mA maximum for the transistor to be well saturated, so maybe you can increase the 1K to about 3.6 to 5.2K. <S> If you really need the 1K then increase the base current using the method I illustrated above, use a MOSFET or darlington or a really high performance BJT. <S> TL;DR <S> : There are a couple of things that look marginal in this circuit, the real optoisolator drop at saturation and the base current of the output transistor. <S> They both should be fixed. <A> If you are having failures of the LED in the opto-isolator, try adding a diode in series with R4. <S> Something like 1n4005 will do nicely. <S> I'm thinking that there is the possibility of significant reverse voltage across the LED - this can damage or destroy it. <A> The optocoupler is a current source/sink. <S> with a CTR of 470% (pretty high) it will try to draw 23 mA, but R2 will only allow maximum 250 uA. <S> When the switch is closed the optocoupler will therefore effectively pull Q1's base to ground, switching it off. <S> The circuit should work correctly.
| If it's actually a Darlington output, then you'll need to modify the circuit to get to work reliably as the saturation voltage will be too high.
|
What's an industry standard in electrical engineering? Context: One of my colleague is arguing I can't use one of my baseline equipment for a long lifetime (15years) product because it is not an "industry standard" and might become obsolete and unsupported during that timescale. Question: So when should we consider a particular equipment or device is an industry standard? Is there a database? How are industry standards defined? This is not intended to be an open-ended question: "industry standard" appears to be a well-defined definition and I'm looking for that definition (I've looked at several sources including wikipedia and it doesn't help), guidelines on how to identify them, and explanations of how they are defined <Q> Tautologically, something is industry standard if it's standardised by the industry. <S> That means there will be a standards body issuing documents which define what the standard is. <S> For example, DIN standardise <S> e.g. DIN plugs such as on PS/2 keyboards and audio equipment. <S> JEDEC various things to do with ICs. <S> IEEE. <S> ISO. <S> British Standards Institute for our BS1363 plugs. <S> MILSPEC for high durability. <S> There are quite a lot of these <S> but they're not very search-friendly. <S> (The PS/2 keyboard is a good example of a defacto standard that didn't come from a body, rather from everyone making IBM compatible equipment. <S> Defacto standards are harder to pin down.) <A> "Industry Standard" varies wildly from industry to industry. <S> Very often, what it really means is "commonly used", not actually defined by a standard. <S> Perhaps if you share what industry you're in or what type of device you're looking at, someone could give you a better answer. <A> An example of a standard that will probably stay around forever is the NEMA 1-15 specification for polarized two-prong plugs in the US. <S> Along with that is the 120v, 60 Hz power we use (although I'm not sure there is a formal standard for that.) <S> However standards can become obsolete; for example ungrounded two-prong NEMA 1-15 receptacles have been prohibited in new construction for 50+ years, making that standard obsolete. <S> They have been replaced by the NEMA 5-15 three-prong polarized receptacles. <S> However many grounded and ungrounded two-prong receptacles still remain in older buildings (and are not required to be replaced, but if replaced, must be brought up to current standards). <S> If standards are updated, they need to be done in a compatible way if possible. <S> For example, the now obsolete unpolarized NEMA 1-15 two-prong plug will still fit into a three-prong polarized receptacle. <S> (However, a polarized 1-15 plug will not fit into an old-style unpolarized 1-15 receptacle by design, since it would defeat the purpose of the polarized plug.) <S> NEMA (National Electrical Manufacturers Association) is not a governmental organization, but rather an association of some 450 member companies. <A> In general, your colleague is simply wrong. <S> A given model of equipment may be widespread in the industry (for instance, the Tektronix 465 scope was a workhorse for 20 years) but there is no such thing as an "industry standard" piece of equipment in the sense that he means it. <S> The 465 is a prime example, having been made obsolete by newer digital scopes. <S> What counts in equipment is performance. <S> It would be inappropriate for you to specify performance in terms of your favorite equipment, though. <S> That is, you should not specify measurements as "made by an XYZ Widgets bogometer model 3.14159". <S> Rather you should specify limits and precision in terms of volts, or amps, or ohms, or whatever is appropriate.
| In some industries, it means the device has passed testing (IE, automotive components passing AEC-Q# testing), while in others it means that it has a certain set of safety features (such as SEMI F47). It very much depends on what you're buying and for what. There are industry standards (such as RS232, which is still in use after 50 years) but equipment gets superseded as the technology advances.
|
Need help with a vertical mount, male A USB connector I need to figure out a way to get a Male A USB connector to vertically attach to a PCB. Ideally, we wouldn't use a surface mount right angle connector. Any help would be greatly appreciated! Most of the male connectors are right angle SMT which would require an extra step in our assembly (and more labor). <Q> I think the image at the top is cut from our page (-: <S> We offer a male full size <S> A right angle PCB mounting connector here: <S> http://gct.co/connector/?series=USB1061 <S> There is a micro version, vertical, however that is Micro B. http://gct.co/connector/?series=USB3150 <S> this is at preliminary <S> I look after the USB product range at GCT and am not familiar with any manufacturers offering a vertical A plug in full size, the main reason is that male vertical connectors are normally used for docking/cradle type applications, where a device would be plugged to a dock to charge and transfer data. <S> These applications require high mating cycles. <S> The full size USB2.0 A connectors (plug and socket) are normally only good for 1,500 cycles, which is below the mating cycle requirement for most cradle mount applications. <S> So in turn connector manufacturers didn't developed these options due to commercially viability. <S> That's why you can find the micro vertical plug types on the market, but not 'full size'. <S> Hope that helps to explain why you can't easily find what you're looking for. <S> It does not help too much, you might need to consider switching from full size USB2.0 to Micro USB2.0 to achieve your physical design. <S> All the bestLaurence <A> This link may give you some help: Vertical USB connector, what is the best practice? . <S> I think it's difficult to directly mount a right angle USB A connector vertically on PCB. <S> One method is mounting the connector on a small PCB as normal, then using some other sockets to connect this small PCB to your major one. <S> However, this need more extra work. <S> Why not choose a vertical type directly? <S> Update: <S> Sorry for the mistake I've made. <S> The OP wants a "male" USB A connector, vertical mounting and not SMT type. <S> I've never seen such a product. <S> Can you accept some "converters", such as USB Male to Female 90-Degree <S> Connector or USB Male to USB Male Connector . <S> Then you may have more choices on your PCB mounting connector, but these need more money and spaces. <A> It actually exists, only in China: https://www.alibaba.com/product-detail/USB-3-0-A-Male-PCB_62313017196.html https://www.alibaba.com/product-detail/USB-2-0-A-Male-PCB_62259048167.html
| And there are indeed USB A Type Vertical Single type connector, such as: http://www.cypressindustries.com/usb-a-type-connector-vertical.html .
|
Which current should I use to determine the Watt? I am making a heated blanket and I have some troubles to determine the heat that will be generated. Resistance: Let say, I use this heated cable with a resistance of 0.3 Ohms/m*. If I am using 10m of this cable the resistance will be 3 ohms. Voltage: I will use a AC adaptator with a voltage of 19V. Current: So the current that will be drawed is 19/3 = 6.3A But my adaptator delivers a current of 3.16A, so which current should I use to determine the Watts that my blanket will output? 3.16A or 6.3A? My guess is that it will be limited to 3.16A but that's where I get confuse because it seems that the length of the cable doesn't count anynore (if it's below 20m) : a 1 m cable should draw 63.3A (at 19v and 0.3 ohms/m) but with a input current of 3.16A, it should only draw 3.16A. a 15 m cable should draw 4.22A (at 19v and 0.3 ohms/m) but with a input current of 3.16A, it should only draw 3.16A. a 20 m cable should draw 3.16A (at 19v and 0.3 ohms/m) but with a input current of 3.16A, it should only draw 3.16A. a 30 m cable should draw 2.11A (at 19v and 0.3 ohms/m) but with a input current of 3.16A, it should only draw 2.11A. This seems to mean that A 1m cable or a 20m cable will generate the exact same heat but a cable longer than 20m will start to generate less heat. Could that be correct because it doesn't make sense to me and I can't find where is my reasoning mistake. Thanks a lot for shedding some light on this! *I could only find the resistance per m of this cable on a forum. But for all the other cables I looked for, I've never found the resistance/m. Why the sellers never give this info? It is a specification too obvious to notify? <Q> There are a few scenarios for how over current will be handled depending on the power supply you're using <S> (I'm assuming a standard CV -continuous Voltage- power supply): <S> Power supply with <S> Constant Current (CC) Limit: <S> The current supplied will be ~3.16A but the voltage will drop to 3.16A <S> x 3Ohms = <S> 9.48V (for you 3 Ohm example), reducing the power accordingly . <S> The Power supply will Fault because of over-current, setting the output voltage to zero whilst the over-current condition persists. <S> The power supply does not have any over-current protection and will try to supply the power needed, but this causes lower output voltage, higher ripple voltage, possible over heating of the power supply components and eventual failure. <A> Chances are your power supply will either shut itself down, or overheat and break. <S> Trying to draw more than 3.16A from it is a Bad Idea™. <S> Assuming the supply is robust enough to survive, and the current draw is the overriding factor, and it doesn't shut itself down: <S> The supply has a maximum power of 19*3.16 <S> = 60.04W. <S> You try drawing 6.3A from it, the voltage would drop to V=P/I = <S> 60.04/6.3 <S> = <S> 9.53V <S> To keep the voltage at 19V you will need a power supply capable of providing 6.3A, which equates to ~120W power supply. <A> If your resistance is such that it would draw more current than your power supply can deliver, you have the following possibilities depending on the design of your supply: <S> In this case your power is the current limit X the actual output voltage. <S> The power supply shuts down immediately and delivers no current. <S> The power supply delivers more current than it's designed for, eventually destroying itself or shutting down from over temperature. <S> The power supply hiccups turning on for a short time and then off if the load is still higher than the current limit. <S> In any of these cases the (instantaneous) power will be the actual current times the actual voltage. <S> It may have no relationship to the rated output voltage and current of the supply, because the supply is operating outside its design limits.
| Your guess that "it will be limited to 3.16A" is not the full story because you are trying to draw more current from the power supply than it can deliver. The power supply output voltage drops until the current is some safe limited value.
|
Is it bad to connect multiple electrolytic smoothing capacitors in parallel? I'm making a power supply using a transformer and bridge rectifier, and I'm wondering whether it is a bad idea to put multiple (5) capacitors in parallel for smoothing. The output should be capable of drawing 1.1A at 10.7V. I'm allowing for a ~2V peak to peak ripple, as this is fed into a boost converter. $$ C = \frac{I }{2 f V_{p-p}}$$ $$ = \frac{1.1 }{100 *2}$$ $$ = 5.5mF$$ Further, what if I was to use different valued capacitors (e.g. a 4.7mF and 1mF)? <Q> It is common practice to parallel a bunch of capacitors of small values for noise suppression; each value suppresses a different frequency band. <S> The values are typically provisioned in decades, e.g. 0.001µF (1nF), 0.01 µF (10nF), 0.1 µF (100nF) etc. <S> For high-frequency devices like cell radios, you will see caps in the pF range. <S> However it is also common to parallel capacitors of higher values, either electrolytic or tantalum. <S> This is done for several reasons. <S> First, the value you want may not be available, but a smaller value that can be paralleled is. <S> Or maybe the larger value isn't available in the tolerance you want, and again you can get that in a smaller value. <S> Then there are price considerations. <S> Depending on a how common the value is, a larger value cap may actually cost more than twice what two smaller caps cost. <S> And finally, there are size considerations, particularly on a board with SMT devices. <S> The manufacturer recommended adding 2000µF to a 3.6V rail going into a cell module. <S> First of all, a single 2000µF tantalum cap wasn't available, just 2200µF. <S> But it was actually bigger than two 1000µF caps, and cost more than the two smaller ones together. <S> So I used two 1000µF capacitors. <A> No, it's not necessarily bad. <S> A couple good reasons would be to get a form factor that fits (at some expense in total volume) or to get a higher ripple current rating. <S> A bad reason would be to get the exact value you calculated- <S> the tolerance is usually -20%+80%. <S> In this case you can consider 6.8 or 10mF. <A> If size, volume, price, etc. <S> need not be considered, then you are free to meet the required capacitance with any number of smaller capacitors (with appropriate voltage rating) that add up to the required capacitance.
| It is not "bad" to connect several smaller capacitors in parallel to make a larger capacitor (it is actually good).
|
LDO - SOT223 - What's the Fourth pin for? What's the fourth pin in LD1117-33 for (the thick on the top)? <Q> I can't find a picture of an SOT223, but here is a TO-220 which follows the same principle: <S> You can see how the tab and the middle pin are one and the same piece of metal. <S> As others have rightly mentioned, this is for heatsinking purposes, and is often required. <S> It is also used in some packages for high current connections, where you may have the tab as one connection, then 4 or 5 pins together for another connection (such as in >100A MOSFETs). <A> Right out of the datasheet page 2 : <S> NOTE: <S> The TAB is connected to the VOUT. <S> https://www.sparkfun.com/datasheets/Components/LD1117V33.pdf <S> And it is often used as a little heat sink soldered on the PCB <A> You're supposed to solder it to a nice big area of copper on your PCB. <A> The tab on SOT223 packages is commonly for heatsinking purposes and is most commonly found on devices that get warm, such as linear regulators and various transistors/mosfets etc. <S> If you connect it to a larger copper area on the PCB, heat can flow from the device into the PCB. <S> It is commonly connected to Vout but not always. <A> It's connected to the middle pin, Vout. <S> Having Vout on the middle pin and tab instead of GND is kind of pain in the ass when designing your circuit, because placing input and output capacitors around is more difficult and also you can't use part of the ground plane as a heatsink.
| Not only is it usually connected to the middle pin, its typically required for heatsinking. You'll also notice on the DPAK that pin-2 is not really a solderable pin, so the only way to connect to that part of the IC is through the tab.
|
How do I solder this tiny QFN chip I am not very experienced with soldering. I have a basic soldering iron with a new tip, and a third hand. Last time I tried soldering wires to a ble chip that looked like this , I ruined two chips in the process and gave up. Those were not cheap. Now I want to solder this QFN chip but I want to have the right tools and skills for the job. Perhaps I don't even need to solder, all I want is to connect some of the pins of the chip to a bread board. If there is another way to do that without soldering, I would prefer that. I am a novice in this area. Any help, guidelines or reference to tutorials for beginners would be much appreciated. I just want to know what is the best way, that is relatively safe (so I won't destroy the chip), to get it on a bread board. Thanks! <Q> Short answer: You can't with your equipment. <S> That's a .5 mm (20 mil) QFN. <S> Trying to solder that with a soldering iron will only make a mess. <S> Ideally you use solder paste, a stencil, accurate automated placement, and a reflow oven. <S> I have soldered similar chips with a hot air station and some care. <S> You want the amount of solder on each pad to be as even as possible, but there should be a clear "bulge" of solder on each pad. <S> Then liberally apply paste flux and <S> very carefully place the chip correctly over the pads. <S> Use a magifying light or similar to make sure the chip is aligned close to right. <S> It doesn't have to be exact, but you don't want any part of a pin over a adjacent pad. <S> This step is tricky, especially since it's hard to move the chip the tiny amounts required for final alignment. <S> Next apply hot air. <S> I usually use around 700°F, but only the minimum air flow you need. <S> Try to heat the chip as evenly as possible. <S> After a few seconds, you will see the solder melt, at least on one side, then hopefully all sides a second or two later. <S> At that point the surface tension of the molten solder will align the chip nicely. <S> You will probably see it move. <S> Leave heat on for another few seconds just to make sure everything is really melted, then remove heat and let cool. <S> This whole step should take maybe 10 seconds, 20 tops. <A> I would suggest to buy a QFN to DIP adapter, something like this . <S> Then, you can use air reflow or solder with an iron. <S> I solder all 0.5mm pitch components, such as CPLDs or FPGAs with a good soldering iron using a small (thin) tip. <S> However, it might not fit well into your breadboard since there are two parallel rows on each side. <S> What I usually do is solder DIP female pin headers on this board and then use wires to connect it to the bread brad. <A> The CC3200 is available as a module too, with integrated crystal and all the support components. <S> I highly, highly recommend that you use that. <S> It's not easier to solder, but it will have a booster pack available which you can just plug into your main PCBA. <S> Or even easier <S> , just buy the CC3200 Launchpad and use it for the basis of your product. <A> Check out this product from Schmartboard. <S> It is a special breakout board made for your specific IC package, and all it takes is a fine-tipped soldering iron to make the connections. <S> Basically, it has troughs preloaded with solder. <S> You place the chip, and then (with the soldering iron) <S> you push the solder towards the IC, where it makes contact to the pads underneath. <S> I've used them before, and it's a little tricky at first. <S> Expect to throw away the first IC you try, although you may not actually have to :) <S> However, as @MattYoung said in a comment, trying to get rf working through wires and a breadboard is bound to be frustrating. <S> Good luck!
| Use a soldering iron to put a bead of solder on all the pads.
|
Does a Connector With Multiple GND Pins Make a GND Loop? There are some cable standards that have multiple GND pins on the connector proper. A good example of this is the SATA connector (it has 3 of them). In reality, each GND pin has a slightly different impedance, due to varying factors: connection quality, cable quality, cable age, etc. Wouldn't these mismatched impedances form a GND loop? Wouldn't it be better to have a single GND pin (of larger gauge if more current is needed)? And if it is a GND loop, why are cables wired this way? <Q> In addition to the capacitive coupling mentioned by John D, there's inductive coupling at the higher edge rates. <S> Ideally each signal line will have a return that runs right next to it; then the mutual inductance makes it such that the return current flows in that one ground wire, not the others. <S> The signal line and its ground return are basically in the same place, with equal and opposite currents cancelling each other out so they don't radiate or accept interference. <S> The matter of mutual inductance is similar in a ground plane in a PC board. <S> Ground fills with one or more interruptions don't qualify. <S> There must be a continuous, uninterrupted ground plane under the trace. <S> The return current does not take the shortest possible path; but instead, because of mutual inductance, <S> the return current travels directly underneath the trace, taking the shape of the trace, as that's what's easiest for it. <S> This also produces the least interference, and accepts the least. <A> Multiple smaller diameter conductors improve the impedance over a single larger conductor because of skin effect. <S> Also, the ground conductors can serve a a shield between other conductors that may be carrying fast signals and could otherwise couple capacitively into an adjacent signal conductor. <A> The kinds of ground loops which pose problems are generally those in which the effective area of the loop is large enough to capture stray fields, and where either the currents induced in the loop as a whole can in turn induce current in wires which run parallel for part of it, or where such currents create an unwanted potential difference between different points on the loop. <S> Neither of those conditions would seem to apply here. <S> The magnetic field created by any induced current would oppose the magnetic field which induced that current. <S> If some wires were only parallel to the ground wires for a portion of their length, it would be possible that magnetic fields in the portion where they aren't parallel might get coupled through toward the area where they are parallel, but with wires that run parallel for their whole length that's not an issue. <S> Likewise, if induced current in one of the cable's ground wires would try to end A's ground potential higher than that of end B, induced current in another <S> would try to do the opposite, thus cancelling the effect.
| Even if it's a connector for a card and not a cable, and if you can't have a ground pin for every signal pin, you still want to distribute the ground pins evenly so any given signal pin's distance to a ground return pin is as close as possible. In practice the impedance difference isn't enough to cause a problem.
|
Whats the point in conserving electricity if the AC current produced cannot be stored? If we cannot save the ac current produced in a battery or some device like the DC current there is no point in conserving it because current once produced should be consumed somehow!!My faculty said storing AC current is a tough task <Q> This of course works only if the production level can be changed rapidly, hence the electricity producing companies like to have a mix of cheaper but slowly adapting sources, and more expensive but faster adapting sources. <A> The argument is that if energy is conserved, then fewer new plants will need to built to supply the demand. <S> This will reduce capex (which is real money, however it is amortized), reduce pollution, and reduce the need for fossil fuels which have bad side effects from their extraction and their burning (a certain percentage has to be fossil fuels because they are more flexible). <S> As I understand it, you generally want to run hydroelectric plants and nuclear plants flat-out since there is little advantage in running at less power, so they're good for supplying base demand. <S> Thermal plants on the other hand, can be quickly (hours or minutes) started up and shut down and are good for dealing with variations in demand. <S> They consume natural gas or coal more-or-less in proportion to the power demand. <S> As an aside, there was a large thermal plant about 1 mile from me and if the load was shed due to breakers opening (a blackout) that lasted for more than a second or two it seems they would vent the steam to keep the (suddenly unloaded) turbines from spooling up to dangerous RPMs- very noisy. <S> It is true that if you have a hydroelectric power plant which is capable of supplying, say, 1GW and the consumption drops from 800MW to 750MW there is little measurable saving. <S> An analogy might be the need for a new roads- if everyone worked from home one (random) day a work week <S> then the need for new lanes on a highway might be put off for many years, pollution would be reduced and energy saved. <S> It might even save money if the people were as productive at home as at the office. <S> One might argue that it would be better to mass produce plenty enough nuclear plants (or fusion plants if you want to go all sci-fi) so that excess energy could just be dumped or stored (for example, by pumping water up Niagara falls from Lake Ontario to Lake Erie while the plants adjust to the load. <S> Energy too cheap to meter- one promise of the early atomic age. <S> Some of these arguments are more public policy and political in nature, so this is no place for them. <A> Power companies are in the business of making money so if everyone used 10% less electricity long term they would adjust their output to maximize profits. <S> This in turn would mean us using less natural resources, creating less pollution and waste. <S> So while turning off your lights one day might not do anything making a habit of reducing your consumption would have an effect. <S> You could argue that if only you do it that might not make a difference, but if enough people do it will. <S> The other obvious benefit, is using less will cost you less. <S> Except when power companies try to adjust for less consumption by trying to get a rate increase approved or charging people who use solar for the privilege of connecting to the grid. <A> Most electricity is produced by means of a steam-turbine generator which has a rather massive flywheel. <S> If current is allowed to flow in the generator's coils, it current will generate torque in a direction to oppose the generator's rotation, thus taking kinetic energy from the flywheel. <S> The more kinetic energy is taken from the flywheel, the more steam energy will need to be used to keep it spinning at the proper speed. <S> The more steam energy is used for that purpose, the more heat will need to be produced to replace it. <S> The more heat is required, the more fuel fill be fed into the generator (or, for nuclear generators, the faster the nuclear reactions will be allowed to proceed).
| If it is not consumed it does not need to be produced, which saves on whatever is consumed to produce it.
|
Controlling heater with PWM through MOSFET I'm trying to control a heater coil (resistance ~0.9 Ohm) with PWM using a MOSFET. PWM modulator is based on LM393, MOSFET is IRFR3704 (20V, 60A). If I place 1k resistor in place of heater everything runs fine and waveforms at testpoints CH1 and CH2 are nearly square. But when I place an actual heater in the scheme, oscillation occurs on the falling edge of pulse at the moment when voltage crosses Vth (channels are mixed here: yellow oscilloscope channel is connected to testpoint CH2 and cyan channel to CH1). Oscillation amplitude is somewhat larger than battery voltage and reaches 16V at its maximum.I'm mostly a microcontroller specialist and my knowledge of this kind of circuits is poor. Is it an effect of the heater inductance or something else? How to oppose it? <Q> It's probably not mostly from the inductance. <S> More likely, pulling close to 8 Amps from the battery <S> has a significant effect on the battery voltage, and this changes the switching thresholds around the comparator generating the PWM signal. <S> You can keep the pullup resistor R1 connected to the full battery voltage to turn on the FET as hard as possible, even with the LM393 supplied from 5V. <S> And as the voltage peaks exceed the battery voltage, inductance must be having some effect so the flyback diode is definitely recommended. <A> The mosfet turns off really fast and you get a V = L(di/dt) voltage spike. <S> This turns on the zener protection in your mosfet and then the current runs around the rest of your circuit <S> A fly-back diode might do the trick. <S> Put the diode in parallel with the heater element with the cathode connected to the positive terminal. <S> Now when it is turned off the current will find a harmless path via the diode. <S> Careful. <S> The diode will heat up with each cycle. <S> From your oscilloscope trace the oscillation time is about 100us <S> Current = <S> about 10A V of diode forward biased = <S> 0.7V <S> E = <S> VIT = <S> 700 <S> uJ <S> ( I know this calc is cheating, it probably less than half this amount) <S> P = <S> E*F <S> (F = switching frequency) <S> if F = 1kHZ then P = <S> 700mW <S> To select you diode multiply its power rating in Watts by your switching frequency in kHz. <A> I can see a very significant flaw in your circuit: The LM393 has an open collector output. <S> So when the output goes "high" it effectively goes only "not low" and is pulled up via the R1=10k. <S> The charge current flow into the MOSFET gate is also provided via R1, thus the turn-on is extremely slow. <S> This is not a problem for the 1k dummy load, but with significant load current the MOSFET parasitics (e.g. Miller effect) can cause trouble of the kind you observe. <S> You need to modify your circuit to charge the MOSFET gate much faster via a low-impedance path, maybe via a bipolar totem-pole driver, see the TI Application Note "Design And Application Guide For High Speed MOSFET Gate Drive Circuits" (SLUP169) for reference. <A> add small positive feedback (by resistor ) to provide litle hysteresis (in point setting by R3 on point line of sawtooth wafeform for example resistor 10MB beetween node <S> 3 and 1 U1positive feedback for histerese - secure fluctuation on power <S> suplly (batery) <S> add diode + filter RC on supply R3 change voltage battery <S> set another swithing point on R3 and generate flaping Q1 and in resultate positive feedback circuit by supply - frequency of oscilation (sorry for language) <S> http://en.wikipedia.org/wiki/Schmitt_trigger
| It's very probably the inductance. You probably need to feed the LM393 and R3 from a lower noise supply, either R-C filtered (say 50 ohms and 1000 uf) from the battery, or perhaps better, from a 5V LDO regulator (with decoupling).
|
How does this voltage detector IC work in a circuit? What does open drain vs. CMOS output mean? I'm evaluating the Rohm BD48/BD49 series voltage detector. I'm having trouble understanding the data sheet. I want to generate a high signal when the input voltage is above a desired threshold (3.0 volts, so the BD4xx30x), and low when it's below that. This chip comes in two varieties, one of which is an "open drain" and the other is "CMOS". The data sheet says: For both the open drain type ... and the CMOS output type ... When the voltage applied to the VDD pins reaches the appropriate threshold voltage, the VOUT terminal voltage switches from either “High” to “Low” or from “Low” to “High”. I think that means high-to-low, or low-to-high respectively ? I.E. A) the open drain type when input voltage is below the threshold generates a high signal on the output pin (but as mentioned elsewhere, only via an external pullup), which goes low when input voltage exceeds the threshold, while B) the CMOS type generates a low signal when the input voltage is below the threshold, which switches high when the input voltage exceeds the threshold. So I think that I want the BD49 CMOS series, with its Vout hooked straight to the control pin (active high) of the chip I want to pair it with. Is that right? I'm guessing based mostly on some assumptions of the accompanying figures. <Q> An open drain output refers to an output stage where the pull-up transistor is missing. <S> This means that rather than outputting a high voltage when the output is high, it presents a high impedance to the circuit and an external pull-up resistor is used to provide the high voltage. <S> This is useful when there is more than one device that wants to output to the same line; since none of the devices can pull the line high, there is no way to create a high-to-low short circuit. <S> A CMOS output generally refers to a normal push-pull output where the low voltage is no more than 0.1V <S> DD and the high output is no less than 0.9V DD . <A> See the Output vs Input voltage graphs on pg. 9 <S> (Fig 6). <S> In short, either IC will work for your purpose, but the open-drain one will require an external pull-up resistor (whether or not the open-drain or the "CMOS" type is more useful for you depends on your application). <S> Hysteresis is a feature that essentially means you have two separate threshold voltages, depending on the type of change occurring. <S> For instance, the low-to-high threshold voltage will be higher than the high-to-low threshold, to avoid rapid switching (bouncing) of the output when there is noise in the input. <S> Ignacio covered the difference between open-drain and the "CMOS" output, so I won't go into that here. <A> No I think it's telling you when the voltage exceeds a threshold the output will go from low to high. <S> This would make a good microprocessor reset for example. <S> It would only release reset when the voltage was above a certain level. <S> Then it will monitor the voltage and if it goes below a threshold <S> then it's output will go from high to low. <S> This is good for brownout protection. <S> If your vcc drops below the operational threshold of your chip you want it to reset. <S> There is some hysteresis around the thresholds so the thing doesn't oscillate wildly in the transition region. <S> Open drain is a common way to do reset so someone else, the uc itself or another device can pull the line low.
| To answer your question, both ICs (the open-drain and the "CMOS" types) have the same output characteristics: they will pull the output high when the input voltage is high, and pull the output low when the input voltage is low. The datasheet mentions "low to high" and "high to low" separately, I believe, in order to imply that there is hysteresis on the output (and indeed, the rest of that sentence refers to a different part of the datasheet discussing the IC's built-in hysteresis).
|
Simple RS232 to 8 bit Parallel circuit I want to make a simple rs232 to parallel (8 bit) converter. I would like the input to 1 wire and the output can just be 8 bit with no strobes etc. and run at high speeds (ideally up to 1Mbps, put ~100kbps would be ok) Ideally, what would be simplest circuit to achieve this? I tried to work it out but it ended up being quite complex, multiple cloks/monostables, shift register, decade counter.. So, I thought I'd post here as I thought there may be a trick to simplify it or a specific chip. Ideally CMOS. Thanks :) <Q> In ancient times, there were stand-alone UART chips that could do this. <S> I don't know if such parts are still available. <A> Peter Bennett has the right idea, I think. <S> If you Google on "6402 UART" you can find the part you need - Jameco, for instance, sells them. <S> Depending on what you're used to, some aspects may be a problem. <S> It's a 40-pin DIP with 0.6 inches between rows, so it's pretty big. <S> It also needs 5 volts, so 3.3 volt operation is out. <S> Interfacing is easy. <S> It has tri-state outputs. <S> The standard part will work to 125 kHz, using a 2 MHz input clock. <S> The only extra circuit you need is an inverter and some delay. <S> Have the DR output produce an inverted level with a 200 nsec delay at the DRR input, and you're fine. <S> Format - word length, parity, start/stop bit lengths - are all controlled by pin levels. <S> Bit rate is not programmable - you must provide a 5-volt <S> TTL/CMOS oscillator with a frequency 16 times the bit rate. <S> However, I think you need to rethink your statement that "the output can just be 8 bit with no strobes etc." <S> How will you detect the arrival of two successive identical words by just looking at the data? <S> Since you have to generate a "data received" pulse anyways (that's what the delay/inverter does), I'd recommend designing something which uses it. <A> I just order a 6402 as this will solve my problem nicely. <S> A bit big, but size isn't too much of an issue. <S> The reason I can not worry about strobes etc, is that I am actually driving a 4bit data bus which has a complicated 2bits strobe system which I am driving with 2 of the data lines, so <S> a complete write cycles is actually me sending 8 bytes in a row and indirectly doing the strobes that way. <S> Thanks :)
| I suspect the easy solution these days is to use a small microcontroller with a UART port and and 8-bit GPIO port - a trivial program can read received data from the UART and output it on the GPIO port.
|
Why does the current waveform become non-linear in a bridge rectifier? This is my bridge rectifier circuit, and I'm trying to understand why the current waveform of the source deforms the way it does when you approach an ideal capacitor. Source V1 is 9VAC. I simulated the current through V1 for capacitor C1 values from 10uF to 1F, and the current waveform changes from a sinusoidal to a very peaky deformed waveform Here is a zoomed in trace of the waveforms. The light blue difference between line voltage and voltage at the capacitor: <Q> Current can only flow from the utility (the ac network) to your circuit if the voltage is higher that the voltage on the capacitor. <S> With no capacitance the output voltage follows the rectified ac and thus the current also follows this (for a resistive load) <S> As you start adding capacitance to your circuit it is providing "holdup" which creates a flatter, more DC rail. <S> The periods where the AC is higher than your DC become smaller and smaller. <S> As a result the peak current that needs to flow increases to ensure a consistent amp-seconds to the capacitor. <A> Look at this: - The blue trace is the voltage on the output capacitor - notice that it slowly droops when the red trace drops away - this is due to <S> output load current discharging the capacitor between AC cycles. <S> To replenish that charge, the red trace can only do this when it reaches a slightly higher voltage than the blue trace. <S> Normally, this only occurs at the peak of the red trace - <S> at all other times the diodes in the bridge remain reverse biased and pass little or no current. <S> At that peak of the cycle, the current draw through the bridge rises rapidly to a peak. <S> As soon as the red trace starts to fall, no more charging current is taken thus, the current waveform is how you picture them in your question. <A> With 10 uF cap and a 10 ohm load, basically the cap might as well not be there. <S> The time constant RC (which tells you how fast the capacitor voltage will discharge under load) is about 100 usec. <S> As a result, the line current closely follows the line voltage. <S> With the 1 F cap, the time constant is about 10 seconds, and once charged the capacitor only discharges a tiny bit during one AC half-cycle, so charging only occurs for a brief period right at peak line voltage. <S> If you reduce the value of your 0.5 ohm resistor you'll see the current spike get narrower and higher. <S> For the intermediate case, you get an intermediate result. <S> With the capacitor partially discharged, you see the line voltage rise above the capacitor voltage at about 2 msec. <S> The current through the bridge has to simultaneously charge the capacitor and provide the load voltage, so the peak current is higher than the 10 uF case, but since the 0.5 ohm resistor plus the effective resistance of the diodes limits the amount of current available, the spike is wider and lower than the 1 F case.
| The simple answer to your question is "because a rectifier is a non-linear device", but I suppose you want more than that.
|
signal ground and power ground I'm making a PCB with two ground signals, power ground and signal ground. These two shall be connected together at one spot on the PCB, after recommendations from the datasheet.But how is this done in the schematic? I can't simply connect these two together, since it will then be interpreted as one net and give a DRC error. Any help is appreciated. The schematic is done in Altium Designer. Here is the schematic of the demo board which I have based my design on, a connection between SGND and GND is done on the bottom if the schematic. http://cds.linear.com/docs/en/demo-board-schematic/DC2044A-2-SCH.PDF <Q> You can create something called a net tie. <S> Net Ties and <S> how to use them <S> Alternatively, you can place a zero ohm resistor, or a ferrite bead between the two grounds. <A> <A> Also, be aware of capacitive coupling between the layers. <S> If this sounds familiar, it's because it describes a capacitor. <S> There are two basic approaches to solve this. <S> First, put both grounds on one layer. <S> Then all coupling is "sideways" and is very small. <S> The second is to put a third layer in between the two layers, connected to ground at one point. <S> It shields the two layers from each other, and is often called a Faraday layer. <S> (See "Faraday box" for explanation.)
| Treat them as too separate nets and then join them at one point with a zero ohm link/resistor. If the PCB tool uses one layer of copper for one ground, and another layer for the other ground, you get two large copper planes separated by a very small distance, with a dielectric layer in between.
|
Replacing a Switch and Avoiding body diode conduction I am trying to design a replacement for a 2:1 switch using FETs, which would be really easy if I didn't have to concern myself with the body diodes that are present on PMOS transistors. My scenario is that I have two batteries in parallel to power a circuit, they are both fed into a dual schottky diode and then that output is used to power most of the circuit, this dual schottky is good as it prevents a major issue arising if one of the batteries were to short circuit - the other would drain through it and die quickly. However, unfortunately the voltage drop over the schottky is too high (even though it is a mere 0.25V) and would not be able to power a specific part of the circuit that I need, and it would stop functioning much earlier than if powered direct from the batteries. I need to switch between the two batteries to power this part in order to keep their voltages relatively even. Originally I was using a TS5A3154 multiplexer to do this, however I ran into issues when I realised that the analogue inputs would be higher than the supply voltage for the chip (the enable pin became redundant and the output would always be high [whatever was at NC / NO]). So I want to replace this with FETs as mentioned (PMOS or whatever will work / be cheapest) and need to avoid the possibility of one of the batteries shorting allowing the other to drain through the body diode that is present on PMOS transistors. The reason I am struggling is because any solution can't have a voltage drop over it as this would eliminate the point of the switch in the first place. The FETs (switch) is / will be controlled by a microprocessor which only has an output voltage of +2V, while the battery voltages will be up to 3V at the beginning of life and then will be considered dead at about ~2.5V as some of the circuit won't work and they are crucial for the functionality of the circuit. The premise of this being that a 2V pulse from the microcontroller will switch off / on one of the batteries and then switch on / off the other one accordingly. Just to reiterate, the question is to prevent the body diode of a PMOS conducting given events mentioned above without causing a voltage drop when they are functioning. Cost is quite a big thing with it needing to be as cheap as possible, I have searched for alternative switches to replace the current one but all datasheets seem to say the same sort of thing regarding analogue inputs being higher than the voltage supply. I would draw a circuit to go with this question, however, I do not feel it would actually provide anything as all it would be is two batteries each going into a PMOS and then have the two outputs connected to each other going to some load. If you want one I will oblige but as I say, it will only give a small visual aid rather than any technical input. Edit Just to add a little bit more information regarding this question: The two batteries are required to power the rest of the circuit all the time while possibly only supplying this part of the circuit for part of the product lifetime (in reality it will power it for near enough the whole time but to make it clear, it can be turned on and off if needs be) The part I am wanting to power is for wireless communications, it will initially drain a few milli amps on power up but then reduce to somewhere in the micro amp region I can't just 'hope' that the batteries don't short, I need a contingency plan The rest of the circuitry will be drawing only ~20uA for most of the time of operation as low power is a must as well EDIT PART TWO: So firstly thanks to everyone who has given an answer already, I have looked into each of them but for one reason or another they aren't suitable for my application - largely cost, current draw, operating voltage, etc... So to give you an update on my situation, I think the most likely way forward will be to use two TS5A3154 switches and have each battery power one each and also be connected to one of the analogue inputs on the switches and then somehow switch between the two using a micro controller ( EFM32G222F128 ). The new issue I am having is that at least one of the outputs from the micro controller will have to be always high, however I need my MCU to go into a low energy mode (EM2) but I don't know if it is possible to be able to do this while having an output high, so if anyone has any knowledge on this chip and coding it in C, that would be amazingly helpful! Reference manual for coding the Gecko For people who have already answered - I will still award the bounty if no answer for this addition is given so fear not! Godspeed. <Q> There are IC's which can provide this functionality. <S> One option would be to use a "Power Multiplexor". <S> An example is the TPS2115 . <S> It takes the place of the diodes and switches, and is controlled by a 2V-compatible logic signal. <S> Its internal resistance is 110 milli-Ohm (or less), which give a voltage drop of 0.6 mV (!) <S> at 5mA of current. <S> You can find them for around $0.85 in quantities of 1000 <S> +. <S> There are two possible problems with this chip: it only operates down to 2.8V (not 2.5), and it has a 55uA quiescent current. <S> I don't know how important these are for your design. <S> Linear has a good selection, see here for examples. <S> To see even more options, here is Digikey's selection of related Power Management IC's (PMIC's)to dig through. <S> Good luck! <S> In response to your microcontroller question: Generally, microcontrollers retain their output pin states during low-power modes. <S> Specifically, the Gecko microcontrollers retain their pin states in all power modes except for EM4. <S> So it should be just fine! <S> This specific microcontroller is complex and powerful. <S> If you are only using it for the battery management, you might consider using a more basic one. <S> Good luck :) <A> If you are happy with the dual diode arrangement and the only issue is voltage drop, I think you can get by with one PMOS on each battery. <S> You need to have the body diode forward biased during discharge. <S> Essentially, you are putting the FET in "backwards." <S> When the FET is on, the drop will be very low. <S> I drew up the idea below. <S> This is a quirky circuit in the sense that if one battery has much higher voltage, then it may discharge, even if the other battery is the one that is enabled by logic. <S> If you don't want this quirk, the problem can be easily fixed by using two PMOS per battery. <S> Break the circuit between battery and "backwards" PMOS. <S> Then insert the second one with source connected to battery, drain to drain and gate to gate of the "backwards" PMOS. <S> I can draw it if you don't know what I am talking about. <S> Just let me know. <S> I have to warn you, though that that circuit has its own problems, because it is stable and happy with both FET's off. <S> So it may need to be jump started somehow. <S> Keep in mind that your current diode OR circuit automatically fails over to the good battery if one goes bad. <S> If you have two FET's per battery, you lose that feature. <S> There is no automatic failover, and if the currently selected battery goes bad, the rail goes down. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> The solution is simple, just swap the Source and Drain <S> so the FET works in the 3rd quadrant. <S> Then you still have the diode steering, but with a FET in parallel that can be turned on to reduce voltage drop. <S> And if you switch battery negative <S> then you won't need level translators to drive the gates. <S> Cost is quite a big thing with it needing to be as cheap as possible, <S> Then just wire the batteries in parallel and don't worry about the tiny chance of one shorting out - or use a single larger battery! <A> K1 and K2 are single coil Form A (SPSTNO) latching relays, and the diodes on their coils are for spike suppression. <S> 1N4148s or similar will be fine. <S> RL is the load, the BFC is used to maintain the voltage on the load while the relays switch batteries, and the circuit works like this: With both relays open, a short pulse is sent to A1 while A2 is at 0V, closing K1's contacts and connecting BT1 to the load. <S> Later, when it comes time to switch batteries, A1 and A4 are connected to 0V and a short pulse is sent to A2, opening K1's contacts. <S> Then, after a fixed delay, (ensuring that BT1 and BT2 won't be shorted through the relays) a short pulse is sent to A3 which will close K2's contacts and connect BT2 to the load. <S> During the switching delay, the BFC will keep the voltage across the load from drooping out of spec and should negate the effects of contact bounce on the load. <S> In the configuration shown, it's possible that, inadvertently, both sets of relay contacts could be closed at once, connecting the batteries in parallel, which could be a Bad Thing. <S> It's also possible, with a little extra hardware and/or some clever programming, to preclude such a possibility. <A> The main challenge of the question is to avoid the voltage drop when using current and with the same schematics make sure you never have reverse current in the batteries. <S> One simple solution is to use two LDOs (low dropout regulator), one per battery. <S> It has several advantages: <S> First: you obviously don't get any reverse current in any battery. <S> Second: if you make sure both LDOs are of exactly same model and operate at same temperature, they will drain more current from the battery that has the highest voltage. <S> Third: as the output voltage is regulated, your circuit will reduce its current need and therefore operate for a longer period than it would if it was directly connected to the batteries. <S> Fourth: Some LDO have extremely low dropout (lower than 10 mV at current of 100 uA) and low quiescent current <S> , therefore it will not impact significantly you life time. <S> simulate this circuit – <S> Schematic created using CircuitLab Good luck !
| Other options could be an "Ideal Diode", or an "Ideal Diode Controller".
|
how to properly save an architecture in a fpga ic forever Considering I made an architecture to do some specific thing, wrote in vhdl, for example. Can I 'burn' it in a fpga chip, forever? Or how should I do it, protecting the intelectual property knowing the fact it can be read from the serial flash memory? <Q> Xilinx Spartan <S> 3AN FPGA's have internal flash making them nonvolatile. <S> Your question is actually multiple questions. <S> 1) Are FPGA's volatile or non-volatile? <S> Most are volatile, requiring the configuration bitstream to be read into the FPGA from an external nonvolatile storage device at every power on. <S> There are some that are nonvolatile. <S> Like the Xilinx S3AN I mention. <S> 2) <S> How do you protect the configuaration bitstream? <S> There are multiple answers to this question. <S> This will protect the bitstream's functionality from being discovered by reverse engineering. <S> That is to say that even if the enciphered bitstream is able to be extracted from the nonvolatile storage device, either in-situ or more destructive means, sense will not be able to be made from the extracted file since it is encrypted. <S> You can also set the bitstream to be prohibited from being readback. <S> The JTAG interface that one uses to program an FPGA at debug time can generally be used to read the configuration bitstream back out of the fpga. <S> Setting the NO_READBACK option prohibits this. <A> It is possible to find FPGAs with an integrated non-volatile program memory. <S> For example, Microsemi (formerly Actel) specializes in this type of device. <S> Other vendors offer the option to mask-program an FPGA. <S> For example, Xilinx calls their mask-programmed devices " EasyPath " FPGAs. <S> This does require an NRE payment, as far as I know, so it isn't appropriate for situations where you might need to update your design. <S> (Hat tip to alex.forencich for the correction) <A> I can at least speak for altera, I assume Xilinx will have something similar. <S> They have the option of encrypting the file you put into external flash or EEPROM. <S> Then you load the decryption key into the altera part, using its non volatile or battery backed key storage. <S> Since you can't read the key out it protects your ip. <S> They were losing design wins to Asics because they couldn't protect peoples IP <S> so this is a pretty common feature. <S> http://www.altera.com/devices/fpga/stratix-fpgas/about/security/stx-design-security.html <A> The only way you could accomplish this is by purchasing a separate Flash module (if you dont already have one on the PGA) and loading your code into ram, however this is not recommended for all the hassle, just purchase something like a CPLD if you plan on reprogramming at a later point or a ASIC if you have no intentions of reprogramming it again.
| You can encrypt the bitstream; which means to say that the bitstream that is stored on the above discussed nonvolatile storage device is a unique ciphertext that can only be decrypted by the single fpga with the appropriate key.
|
Sensing analog voltage on Arduino without loading the input circuit I want to design a voltage divider for my Arduino Analog input pin, to be able to sense the change in voltage in a 9V, 250mA circuit (without loading it). Ive programmed the Arduino so that as soon as a drop in voltage is sensed, my Arduino will perform rest of its job (programmed to create a specific series of delays that I need). In other words how can I create a signal that is proportional to the changes in the 9V signal that operates at 250mA without drawing any extra current from it nor by creating any voltage drops in the original circuit. The link below gave great information on how I can use opto-couplers and that would have solved my problem but CNY17 cannot operate over 60mA (otherwise I would have just put that in series with the original circuit?) How can I use a 12 V input on a digital Arduino pin? Any help is much appreciated! edit1:Let me try to describe the problem better. I had a feeling it came across as vague in my attempt to minimize the description. The 9V circuit that I was referring to is basically a water flow meter that starts spinning when a flow is sensed and this chops the 9VDC applied across it into pulses, an irrigation controller connected to the other end(this is what applies the 9V across the flow meter) measures the frequency of these pulses and determines the flow of the water(in gpm)Using Arduino, I am building a circuit that will initiate a series of delays as soon as it senses a flow. 9VDC=no flow, chopped 9V=flowHowever since I cannot connect 9V directly to Arduino, I need some sort of a voltage divider, but the reason it needs to be isolated from this 9V flow meter circuit is because the irrigation controller is calibrated to read any changes in the voltage and I don't want it to give false reading. I guess I can use some current from the original circuit -it currently runs at 230mA and I dont know how much I can add on to this without confusing the controller - something that must be tested to find out.Also I would imagine that a small voltage drop (1-2volts) should be okay? for example: I was considering using an optocoupler- with the photodiode in series with the flowmeter cicuit, but I dont want to reduce the original current (230mA) by any significant amount lest it give a false input to the irrigation controller. At the same time, the optocouplers I am looking at do not allow anything more than 60mA. Hope this helps understand the problem a bit better. I am happy to answer any more questions. <Q> The easiest, and cheapest, method would be use a voltage divider with large value resistors (both greater than 100k in this case). <S> If you connected your 9V circuit output in series with a 200k resistor and 100k resistor, the voltage in the middle of the resistors would be 3V, comfortably in the middle of the Arduino's 5V operating range. <S> For practical purposes, a large value voltage divider will not load your source circuit down as, from Ohms Law, 9V divided by the total resistance, 300k, is 30uA. <S> This is 0.01% of your source current, and can thus be ignored. <S> If this small current cannot be ignored, look into op-amp circuits, which will have input currents in the nA or less range. <S> EDIT: <S> Yes, loading of the ADC circuit could be a problem. <S> The easiest way to prevent this would be to connect the large value voltage divider, which I describe here, to the op-amp voltage follower shown below. <S> This would both drop the voltage to a level the arduino can handle, and prevent any ADC circuit loading. <A> The best thing for you is to use the op-amp buffer. <S> You can read about it here: <S> http://en.wikipedia.org/wiki/Buffer_amplifier#Voltage_buffer <S> The circuit in designing a buffer is just an operational amplifier, nothing else. <S> Although you might consider reducing the 9V to 5V to prevent any damage to the arduino. <S> Here a voltage divider will be useful. <S> So, first use the buffer amplifier(this will avoid loading the input circuit) and then use a voltage divider configuration to convert the 9V to 5V. <S> This should solve your problem. <A> Given your new enhanced description, you should probably be using DIGITAL TECHNIQUES to look for falling edges on your 9V chopped signal. <S> Use the signal to drive the base of a transistor, and a fairly big resistor to current limit that. <S> Power the transistor with 5 Volts. <S> An optocoupler needs to suck enough current to drive a photoelement, and will probably draw more current than a simple transistor circuit. <S> Detecting your falling edges is a much more efficient way to deal with all of your issues than sampling of the analog signal. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> If you run this simulation, this is actually inverting, so you would detect rising edges. <S> I used a generic transistor, but a 2n3904 would be fine. <A> If you are running your Arduino on 5v, you can just drop the 9V in half. <S> From what you say, you don't really need to worry much about loading the circuit - you'll need far less than the 230 mA it already draws, to make a measurement. <S> For example, two 4.7K resistors will only draw about 1 mA. <S> I might use 10 time that or more tho. <S> All this assumes your arduino is separately powered, right? <S> You will need to share the ground of the Arduino with the negative side of the 9v circuit. <S> You may have bigger problems tho - there could be spikes in the 9V line. <S> But that's not the question you asked - so <S> this is just a heads up.
| The high value voltage divider as suggested is all you need, for either analog or digital. So you might want to use a small cap across the line, and/or add a reversed diode. You can use analog or digital inputs, since you don't need to measure the exact voltage, only detect interruptions.
|
How does the controller know when to jump to the ISR? I am talking about things at the core level. As far as I understand, the controller core just executes instructions which are fetched from the memory (Fetch - Decode - Execute). When an Interrupt arrives, how does the core/ALU decide to jump to the ISR? Because we, or the compiler, don't add any instruction to poll the interrupt status - then how does it know that an interrupt needs to be served? <Q> What you are missing is that the core does do more than just execute opcodes that are fetched from memory. <S> It has specific logic in it to implement interrupts. <S> When the interrupt detection hardware asserts the signal that says it's time to take a interrupt, usually a special instruction is jammed into the core that was never fetched from memory. <S> In most cases this is a CALL instruction to the interrupt vector address. <S> This uses the existing instruction execution mechanism to save the current PC onto the call stack, and change it to the interrupt vector address. <S> It also deals with discarding pre-fetched instructions and the like. <S> The special interrupt-taking logic also has to disable interrupts in such a way so that the same interrupt condition doesn't cause another call to the interrupt vector address next cycle. <S> Different processors have different ways of handling this. <S> The simplest is to just gloablly disable interrupts, requiring the software to re-enable them at the end of the interrupt service routine. <S> Other processors have a interrupt priority level. <S> This level is bumped so that only interrupt conditions of higher priority can cause a new interrupt. <S> The interrupt priority is then something that is automatically saved along with the CALL return address, and restored when the code returns from the interrupt. <A> Commonly in the modern microcontrollers there is a dedicated Interrupt Controller (IC) unit who is in charge of managing interrupts. <S> In addition each peripheral component has an interrupt output(s) which is going from 0 to 1 (or vice versa) if some condition apply (for example this peripheral completed some work). <S> This output is connected to the interrupt controller. <S> The Core CPU can tell the IC either to ignore this specific interrupt (mask it) or to notify the MCU whenever it happens by triggering specific signals, and then the MCU decides what to do with it. <S> The common way is have the IC to tell to MCU which interrupt did happen and jump to corresponding handling code. <A> There is hardware in the computer core that jams a new value into the program counter that corresponds to the particular interrupt that has been triggered. <S> In order to remember where to come back to after the interrupt routine is completed the current value in the program counter is pushed into the stack before the hardware jams the interrupt address into the program counter. <S> When the interrupt routine is completed the original value of the program counter is restored back out of the stack. <S> The values to jam into the program counter at interrupt time are usually determined by one of two schemes. <S> One approach jams a fixed address for each interrupt type into the program counter and the computer core then starts executing from that fixed location. <S> The space at the fixed location is often limited in size so it is common to code a jump instruction at the fixed addresses that go over to the actual interrupt service location. <S> The other scheme uses something called an interrupt vector table. <S> Here the hardware generates a fixed address offset into the vector table based on interrupt type. <S> The hardware then pulls out the content at that table location and uses that value as an address to jam into the program counter. <S> The addresses in the table have of course been loaded there according to where the interrupt service routines are located in the memory. <A> The controller has a register for the program counter that keeps track of the address where the next-to-be-executed instruction is stored. <S> (This register is also written when a jump is executed.) <S> The controller has an interrupt vector (or sometimes more than one, dependent on the type of interrupt), which is the address where the ISR is stored. <S> This address is always the same - it's like the reset vector, where the program starts. <S> (Often, there's a jump instruction stored at this vector that jumps to the actual code to execute, since the space at the vector is not enough to store the whole procedure. <S> However, the important thing is that the ISR is always located at the same position.) <S> Then, when the controller reaches the next instruction cycle, it fetches the instruction from the address that is pointed to by the program counter (so, the interrupt vector). <S> (In one instruction cycle of the controller there are different tasks <S> it performs: it fetches the next instruction from the address pointed to by the program counter; it increases the program counter; it decodes the instruction, and executes it.)
| When an interrupt occurs, there's some dedicated hardware in the controller that writes the program counter with the interrupt vector.
|
Why use a resistor for Pull-Up? I just got my first Arduino and had a question about pull-up resistors. I was trying to connect a push-button to the Arduino at pin 2, and if it's HIGH then I write HIGH to pin 13. Now, in the tutorial I watched, it said to have a resistor from the button to ground so if pin 2 asks what the voltage is, it gets ground, so it doesn't write HIGH to pin 13. I tested this and it did, indeed, prevent the noise from pin 2. However, when I tried replacing the 10k resistor with a normal wire, it didn't work. So, my question is why do we have to use a resistor and why can't it just be any connection to ground? In this diagram pin 2 reads whether it gets 5V (HIGH) or 0V (LOW) and returns a boolean value. Then, if the value is HIGH, pin 13 outputs HIGH. Also, it looks like the long wire on the Arduino is blocking out the labeling on a pin. The pin that the long wire connects to says "5V". Thanks! <Q> You have to use a resistor so the pushbutton can overpower it. <S> If you use a piece of wire, you get a short between Vcc and GND when you push the button - not so good for the button or the rest of the board. <A> Updating due to addition of diagram. <S> Generally, buttons are switches. <S> A spring of some sort keeps them "off. <S> " When you push the button, you overcome the spring force and it shorts its two contacts together, and it is then "on." <S> In your case, you do not have a pullup, you have a pulldown. <S> One side of the switch is connected to VCC (5V) and the other side is connected to the resistor which pulls down to GND. <S> The IO pin is connected to the resistor side of the switch, too. <S> The reason you need a resistor, which has been explained by other responders is that if you use a wire, then every time you press the button, 5V will be shorted directly to GND. <S> You mention that you tried this and it "didn't work. <S> " I am not sure what "didn't work" means in this context, but the whole board probably reboots every time you do that. <S> I hope this answers all your questions. <S> Have fun experimenting! <A> Um .. here is my 2 cents .... <S> every microcontroller (including the one sitting in the Arduino) has a current limitation on their pins. <S> So when you connect the pull-up (or pull-down) resistors you have to ensure that the current that they can draw is within the specs of the microcontroller). <S> So you need a high-ish resistor for this, but you cannot keep too large a resistor so that even stray currents mess up your circuit. <S> Typically about 10K to 20K is recommended. <S> FYI: I am a hobyist not an electronics engineer, so use my info at your own risk <S> :-P <S> Abhishek
| Using a resistor holds the pin at a specific level until something 'stronger' (lower resistance) comes along and changes it (in this case, the button).
|
How to attach an electronic enclosure to glass? I'm developing a very small PCB that I'll put inside a small case that will be attached to glass, let's say for example in a car. Once you attach this to the glass, it should stay there for a long period, but should also have the ability to be detached and attached again without too much effort. At first I considered using a sucker also known as a suction cup but this is maybe a too bulky solution, and I need something more discreet. Also the distance between the glass and the case should be minimal, and using the suction cup this distance is considerable. So do you know something that could do the job for this application? <Q> In Italy we have a transponder-based payment system called Telepass, which sticks to the windshield using Velcro. <S> One side attachs to the glass with tape, and the other is attached to the device. <S> It is pretty tough, and usually lasts for years. <S> It seems it uses Dual Lock by 3M . <A> These are double sided adhesive strips with a core which detaches when stretched. <S> Each application requires a new strip (or set of strips), just as you would probably have to replace ordinary double sided adhesive strips, but until removed the strength of the bond is excellent and the no-damage removal allows you to use it with products you wouldn't normally be able to. <S> For instance, I once pulled the whole back panel off a tablet because it was attached to the passenger window of a car much more strongly than I expected. <S> With strips like these, that damage would have been avoided. <S> Note that while most of the command range (and most similar products I've seen) have opaque white plastic strips, 3M also do a clear version, which could work for attaching two clear glass surfaces together. <A> Glue the base of the mirror to your windshield and the casing to where you'd normally put your mirror. <S> If your PCB is insensitive to magnetivity, you could glue a magnet to the windshield instead. <A> You can use velcro or velcro-like attachment, but if it's a car windshield be aware that ordinary self-stick velcro tends to peel off due to the tilt of gravity and the heat, leaving a sticky residue on the glass (or the device). <S> You may need a high temperature version, or get a version without adhesive (eg: for sewing in) and use your own glue. <S> (The velcro to velcro connection is fine, it's the glue part that fails) <S> If you use suction cups, you might try offsetting 2 or more small ones - to the side of your enclosure rather than between the enclosure and the glass.
| If glue is an option:Interior rear view mirrors are sometimes glued to the glass. Once in place a small non adhesive tab protrudes, when you want to remove the strip, you pull on this tab and the adhesive pulls away from both surfaces without damaging either, until the whole strip comes away and the two surfaces are no longer bonded together. I would recommend something like the 3M command strips, or one of the many similar products.
|
Should I use a snubber or solid state relays on a 24 vac circuit? I'm trying to create a smarter controller for my hydroponic systems.I have an arduino controlling a sainsmart mechanical relay.The load on the relays are 24 VAC orbit sprinkler valves.Everything is powered from the same 120VAC circuit using different wall wart transformers. The problem is that 30% of the time the arduino resets when a valve is triggered.This happens whether or not the relay board is fully optically isolated or not.But, this does not happen when the arduino is powered off a 9 volt battery. I'm guessing that the relay triggering is sending power spikes into 120VAC. Should I setup a snubber circuit, and if so, what are good specs?Should I ditch the mechanical relay in favor of the below SSR? The mechanical relay board: http://www.sainsmart.com/8-channel-dc-5v-relay-module-for-arduino-pic-arm-dsp-avr-msp430-ttl-logic.html The solid state relay board: http://www.sainsmart.com/8-channel-5v-solid-state-relay-module-board-omron-ssr-4-pic-arm-avr-dsp-arduino.html <Q> Probably the 120V is sagging when the relay load turns on. <S> You might be able to fix this with 120V wiring improvements. <S> It sounds like a bad condition to begin with. <S> To solve this problem analytically, you would want to know: <S> How long is the interruption on the 12V output <S> What voltage drop from 12V is allowable before the system will not function reliably <S> How much current is consumed by the load <S> I found this on digikey doing a quick search. <S> Other options will work also. <S> Make sure the diode can handle the normal load current. <S> The way to choose the cap is as follows: <S> dt = time of interruption <S> i = <S> current consumed by load during interruption dV = maximum voltage drop board will tolerate. <S> Vf = drop across diode due to load current <S> C = <S> i <S> * dt <S> / dV <S> A note about dV: <S> the diode Vf affects dV. <S> When you calculate the maximum voltage drop, you need to consider that the starting point is 12V - Vf. <S> So if Vf is 0.3V, you will be starting from 11.7. <S> If the board works down to 9V, then dV = 11.7 - 9 = 2.7V Round up or tack on a little extra capacitance for margin. <S> When you calculate the required capacitance, you will see whether it is practical to solve the problem this way. <S> If you don't know any of the required information, and you can't easily obtain it, you could just try bigger and bigger capacitors until the problem goes away or you give up. <S> In that case, I would start with 220uF aluminum electrolytic. <S> Make sure the voltage rating is high enough. <S> I would probably just use a 20V or 25V capacitor. <S> If you find a value that works, you might want to go up a little bit from there to give yourself margin. <S> If the capacitance value becomes ridiculous, you should probably consider another solution. <S> Large capacitors can cause large inrush current when the power supply is first connected, and this can lead to other problems. <A> My guess is that the spike that often occurs when the relay driving a solenoid changes state. <S> Note that I'm being careful how I say that: most often, the spike occurs when the relay opens and the AC waveform is at just the right point. <S> But relay contacts can bounce also when closing and that also leads to transient spikes. <S> For me, the cure is simple. <S> Just put a small 35V varistor across each solenoid coil, right at the solenoid. <S> We use Epcos S07K35 from Digikey part number 495-4376-ND <A> I solved the issue of the arduino rebooting by sequencing the on/off of each relay with a delay of 250ms. <S> The issue only happened when triggering 2 or more relays at the same time. <S> I'm sure a RC snubber would have worked, though. <S> 2 months now with no issues.
| Another option is to use a diode and cap to hold up the 12V rail during interruptions. A diode (Schottky) which might work is the SR202.
|
routing a 4 layer PCB I am currently routing a 4 layer PCB and I was wondering how I connect the ground and power planes to the connector and components that need them. Do I simply leave the two planes without routing on them? If so how can a connection be created between those planes and the components. <Q> Use a via. <S> Presumably the power planes are internal. <S> Use a via to connect from the signal planes (top and bottom) to the internal power or ground plane. <S> The via can be completely through the board but only connected to the starting trace and the plane you want. <S> Depending on your software you'll probably just need to be routing a signal of the same name as the power plane and once you make the via, it will connect automatically. <A> Connection to a ground plane is done through a via. <S> In case of surface-mount component, there is separate via connected to the surface-mount pad. <S> In case of throughole component (pictured below), the pin is soldered into the via. <S> Notice that in this case, ground plane is connected to the via. <S> Vcc plane has an annular clearance around the via, <S> and so it's not connected to the via. <S> When soldering throughole components, a plane can act a heat sink. <S> That makes soldering more difficult. <S> Thermal relief pattern makes soldering of plane-connected pins easier. <S> (Source of drawings: Nick's introduction to PCB design workshop .) <A> For SMD components, connect the ground or power leads to short traces. <S> A <S> via placed on those traces should automatically connect to the appropriate plane. <A> If you put a big copper plane for ground on layer 2 and another one for power on 3 and assign them to the ground and power nets respectively, PADS will automatically connect them when you flood the copper. <S> All of the through holes will get connected using the copper "spokes" for thermal relief. <S> The SMD pads on the top (and possibly bottom) layers would need additional vias.
| For through-hole components, pins connected to the Vcc or GND nets will be automatically connected to the power or ground planes as needed - the planes will have no clearance around the hole, so will connect to the through-hole plating.
|
Fast and cheap data aquisition I need to be able to analyse signals that are 10ns in length. It comes from a PMT (Photomultiplier tube) or an equivalent detector. We need to be able to trigger at a certain signal strength coming from the PMT. Microprocessors like the ATMega328P are way too slow to do this, but I also can't find any fast (100mhz+) a/d converters online. Any recommendations how I can tackle this problem with cheap and easy to use hardware? Note: This is for a high-school project, the cost needs to be as low as possible. EDIT: Please forgive my bad English. <Q> When you need to trigger off of a fast signal, you don't need an ADC. <S> You can just as easily use an Analog Comparator . <S> Your ATMega already has one <S> and I believe it will be fast enough. <S> I believe the 328P doesn't have an internal reference, so you may have to provide one (could be just a voltage divider). <S> Then you can have an interrupt fired when you cross the threshold voltage, and you're set. <A> You could build a monoflop . <S> The fast signal triggers the monoflop, which creates a pulse of a specified length. <S> You can then easily analyse the monoflop output. <S> If you only need to blink a LED (as you suggested in a comment), you could just place a switch at the monoflop output and switch on the LED with that. <S> As @Brian Drummond remarked, I cannot guarantee that the 555 is fast enough and couldn't find according specs. <S> It would maybe be safer to build a monoflop circuit from scratch or even better: use a monoflop chip with according specs (e.g. TI SN74AHC123) <A> I made a nice little PMT pulse amp from an AD8001 <S> And then sent the signal into a nice fast comparator (LT1016).. <S> With a pot setting the trigger level. <S> Do you have a 'scope that can see the PMT pulses?
| Maybe you can just use the comparator.. if your signals are big enough. One possibility would be to use a (LMC) 555 chip in monostable configuration.
|
Limiting current draw on a camera battery charger I have a camera battery charger which is driven from a 12V (measured 12.2) switched mode wall wart rated at 1A. All three items (charger circuit, wall wart and battery) are stock, but all three heat up pretty quickly, which got me worried. The items work - the battery gets charged - but all items, especially the wall wart, are very hot in the end. I measured the current through the wall wart cable to be 1.5A. Now how should I go about limiting it? I thought about adding a 4 ohm resistor in series with the wall wart supply, as I calculated would be adequate. I also thought about adding a few diodes in series to drop the voltage, but I was worried, it might interfere with the internal circuitry of charger (there's a couple of ICs and inductors and what not in there, too complicated for a beginner like me to reverse engineer). Or would I need an active current limiting circuit? <Q> Many chargers use a fancy charging method called pulsed or burp charging: (from http://www.mpoweruk.com/chargers.htm ) <S> A high current is used to charge for a certain pulse length, and after, the battery receives a short discharge pulse. <S> Effectively, this increases the charge speed, however, this method depends on certain calculations for the optimal voltage and current to charge with. <S> Therefore, it would be the best not to use these devices together, but to get a power supply rated for 1.5A. <S> However, if you bought these items together, there's (almost) nothing to worry about. <S> Many devices get hot during normal use (especially wall warts). <S> And if it booms, you have your warranty. <A> Protecting an inadequate power supply from overload is possible using A PTC current limiter or NiChrome heater wire resistance in the range you suggested. <S> But a far better solution is use an old PC PSU with 20A @12V capability. <S> These tend to cost about $15 http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=3843504&csid=_61&rrpl=item_page.content1&rrstr=ClickCP&rrindex=0 <A> Modern battery chargers (especially for the relatively new LiPO batteries) are not a dumb power supplies, but they have a specific time-current pattern, that is maximizing the charging efficiency, protecting the battery and helping it's lifetime. <S> So limiting the current would be a really bad idea.
| If you change the input current and voltage of the charger, you can't expect this to work properly anymore, which may harm the battery and/or increase the charge time. A 5% pre-load is often necessary on the 5V for stability.
|
Circuit for a coarse and fine setting potentiometer? I've tried to find a circuit for a coarse and fine adjustment (two potentiometers) voltage divider, but I don't understand it and/or they don't have a linear response. Problem: I want to have an adjustable voltage from 0 - 5V using two potentiometers, one for coarse adjustment and the other for fine (10mV if possible) adjustment. From the datasheets I've looked at (e.g. this ) they don't seem to specify the resolution of increments possible of the pot. Here are three circuits I currently have: The third circuit's fine adjustment decreases as the coarse adjustment is set higher, so I don't think this is a good idea (unless a logarithm pot is used... no idea how those work yet). Since the first and second are very similar, I'll consider the first one. I assumed a 5 degree resolution out of 300 degrees, since I could not find any information regarding this. This gives me: 0.83kOhm / adjustment with the 50K pot, and a 166mV resolution 0.167kOhm / adjustment with the 10K pot The equation I obtain is: $$ V_{out} = \frac{R_{course} + R_{fine}}{50 + R_{fine}} V_{in}$$ Plotting this in matlab for 0V course adjustment, I get the following curve: At the lower end of the pot, there is a resolution of 33mV and at the higher end of the pot there is a resolution of 24.7mV. For my application, this is adequate. However I'm unsure if there is a better (and linear) approach to a fine and course adjustment. <Q> This is better.. <S> simulate this circuit – <S> Schematic created using CircuitLab Advantages are: Low sensitivity to pot tolerance and tempco <S> (you can use precisionresistors for R2/R3) <S> Quite linear and almost constant fine adjustment range in mV <S> Quite constant (+/-0.5%) and predictable output impedance ( <S> minimum 9.09K maximum 9.195) Low sensitivity to CRV (contact resistance variation) of pots (1% CRV in R1 results in 0.05% variation). <S> This circuit draws 20mA or so from the 5V rail. <S> If that's an issue you can increase R4 10:1, increase both R4 and R1 by another 10:1 at the expense of a bit of performance or scale all the value at the expense of output impedance. <S> Your circuit #1 has an output impedance of 0 ohms to 27.5K, depending on the pot settings. <S> Fine and coarse only takes you so far, you could also consider a switched voltage divider for the "coarse" adjustment. <S> Expecting the "coarse" adjust to stay stable within 0.2% may be too much to ask unless it's a very nice potentiometer. <S> Note that your conductive plastic pot does not specify a temperature coefficient at all- <S> that's because conductive plastic pots are generally <S> horrible- <S> maybe <S> +/-1000ppm/ <S> °C typically, so using them as a rheostat rather than a voltage divider is not such a great idea. <S> You've got that reduced by 5:1 by the ratios of the pots, but it's still pretty bad. <S> The circuit I presented would typically be about 5x better with decent resistors for R2/R3 because the pots are used purely as voltage dividers. <S> Edit: as a good approximation for R4 << R3 and R1 << R2 (you can do the exact math in Matlab taking the pot resistances into account if you like), the output voltage is: \$ V_{OUT} = 5.0 (\frac { <S> \alpha \cdot <S> 9.09K}{10K} + \frac {\beta \cdot <S> 9.09K}{100K}) <S> \$ <S> Where 0\$\le <S> \alpha\le 1\$ is the position of R1and 0\$\le <S> \beta <S> \le 1\$ is the position of R4 <S> So the range of R1 is 4.545V and the range of R4 is 0.4545V. <S> If you center both pots you get 2.500V. <S> If you can set R4 to 1% of full scale (reasonable), that's 4.5mV resolution. <A> +1 for Spehro Pefhany. <S> That is a very elegant circuit. <S> As for how it works, this is how I see it: simulate this circuit – <S> Schematic created using CircuitLab <S> The asymmetry of the voltage divider (asymmetrical because R3 > R2) makes one of the pots coarse, and the other fine. <S> Because R2 < R3, the output voltage will be mostly a function of V1, with V4 able to make fine adjustments. <S> The caveat here is of course that the output impedance of the pots changes with the wiper position, so the application of Thévenin's theorem in the first step is really only correct when the pots are at their midpoints -- as the pot is moved to either extreme the output impedance approaches 0Ω. <S> However, since R2 and R3 are much bigger than either pot, this variability is relatively insignificant, both in terms of nonlinearity, and variation in output impedance of the circuit overall. <A> You have the right approach, and your numbers are probably good to within a factor of 5 or so. <S> For a plastic element pot, 1% resolution seems reasonable, although it depends on details of construction. <S> This probably shows up as increased hysteresis (the resistance at x degrees when turning clockwise is different from the resistance when turning counter-clockwise). <S> Note that resolution is worst for wirewound pots, since the contact skips along the outside of a long helix of wire <S> , so you get a stairstep effect with fixed step size. <S> There are basically 3 approaches to getting better resolution from a pot. <S> First, go to a smoother element, with smaller internal grain size. <S> Conductive plastic is best, and the pots you link to use this. <S> Second, make the pot larger. <S> This allows finer control of exactly where the contact meets the element, although it also requires more precision in the bearing and design of the wiper arm to keep it from flexing as it moves. <S> Finally, you can go to multi-turn pots, 10-turn units being the norm, although I've run across 5-turn and 20-turn models. <S> In this approach, the resistive element forms an n-turn spiral, and the contact arm displaces vertically along the shaft axis as necessary. <S> With a longer resistive element, more precise placement of the wiper is possible, and thus better resolution. <S> As for your analysis, it's right on. <S> The amount of non-linearity is directly related to the ratio of the two resistances. <S> A larger ratio gives better linearity (although this cuts down on the range of the fine adjustment, and requires the coarse adjustment to be more precise). <S> Finally, if you demand ultimate (and probably unreasonable) linearity, you don't gang the pots at all. <S> You connect their ends in parallel, and feed each wiper to an amplifier with a different gain, then sum the two results in a final amplifier. <A> (But I like Spehro's circuit! <S> another advantage he forgot to mention, ~constant input impedance.)
| For the pots you link to, the problem is that the length of the arm from the shaft to the element contact is quite small, and the bearing as cheap as possible, so there may be some slop in exactly where the element contact occurs. I've done it with two pots in series, each wired as variable R's (one end to wiper), with an opamp on the output, sometimes the variable R is in a gain stage.
|
Tri-state output to three analogue levels? Is there a circuit which can transform a tri-state (low, high-Z, high) output to three voltage levels? Ideally, the circuit will use only passives and diodes. Would a simple voltage divider across the pin do the job? Vdd | R |tri-state-----+-------out | R | Vss <Q> A simple potential divider will work, and is commonly used for this. <S> Vhigh, Vlow, Vdd/2 levels for 1,0,Z respectively. <S> Remember the 0/1 to Z transition will be relatively slow because it is not actively driven (just the RC time constant); or in other words, the Z state has a low drive capability (5k\$\Omega\$ source resistance). <S> simulate this circuit – <S> Schematic created using CircuitLab <A> That'll give you half the supply voltage when the output is HIGH-Z, and the normal HIGH and LOW when the output is in those states. <S> Two resistors, no diodes needed. <A> I use the same arrangement in the laboratory of digital electronics to demonstrate to my students the idea of the tri-state output (of the unidirectional buffer 74LS244). <S> To directly visualize the output state, we connect two LEDs in series to each resistor. <S> Thus, when the output is OFF (HI), both the LEDs light. <S> At low or high output voltage, one of them is shunted by the internal transistor, and extinguishes. <S> We also connect a LED network (two LEDs - red and green, in parallel) between the outputs of the chip and voltage divider. <S> Also, we replace the voltage divider by a potentiometer and move its slider; in HI state, it produces a voltage varying between the rails. <S> You can replace the voltage divider by a resistor connected between the output and some voltage between the rails (usually, 1/2Vcc). <S> In the laboratory, we connect it to the output of a pulse generator (when the output is in HI state, we see the pulsess; <S> otherwise we see high or low voltage depending on the input signal). <A> It's possible to have low/float/high output any three voltages between the rails by using the four resistor circuit shown below (note that only one of the R4 resistors will be needed; which one will depend upon the desired output voltage when the output is floating). <S> The circuit below will output 1/2/3 volts when the output is low/float/high. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Assuming VS is the supply/output high voltage, and the desired top/middle/bottom voltages are VT, VM, and VB respectively, assign values to R1 and R2 such that R1/R2= <S> VB/(VS-VT) <S> [in this example, 10k/20k = 1V/(5V-3V)]. <S> Resistors may be scaled up and down together as convenient. <S> Next, assign R3 so that VB/R1+VB/R3 = <S> (VS-VB)/R2 <S> [in this example, 1V/10K + 1V/10K = (5V-1V)/20K.] <S> That will make the output yield the correct voltages for 'high' and 'low' cases, but not necessarily for the 'float' case. <S> If the 'float' voltages is too low, add R4a to raise it; if it's too high, add R4b to lower it. <S> In this example, it's necessary to raise the voltage. <S> When the output is at the correct voltage, 0.2mA will flow through R1 and 0.15mA through R2. <S> That means 0.05mA must flow through the series string of R4a+R3 which has 3 volts across it, so the total resistance of that string must be 60K; R4a must thus be 50K.
| Yes, you can connect a voltage divider to the output pin, say, using equal resistors.
|
How to read a push-pull output I recently came across a sensor that had a "push-pull" output. I can't find anywhere how to read such an output: Is it some particular kind of analog output? I would want to read it with the MSP430G2553 (using energia or code composer). <Q> A Push-Pull output is your normal CMOS or TTL-like output. <S> It's either HIGH (IO pin is connected to VCC through a MOSFET), or LOW (IO pin is connected to GND through a MOSFET). <S> The basic circuit of the output stage is as simple as: simulate this circuit – <S> Schematic created using CircuitLab <S> It is the technical name for any "normal" digital output pin, and can be connected direct to any normal digital input pin that expects to work with the same voltage ranges. <S> That is as opposed to an Open Drain (or Open Collector ) output which basically omits the P-channel MOSFET and just switches the ground connection on and off <S> (these require a pull-up resistor or other similar setup to work). <S> It uses the same arrangement - a high and a low transistor of some form, but it operates in the linear, not the saturation region of the transistors. <S> This mirrors the incoming waveform with more power. <S> If your sensor is of the analog type, then it will provide a simple analog signal out of it, amplified by the push-pull amplification stage. <S> This output can be connected direct to any analog input pin that expects to work in the same voltage range. <S> Simplified push-pull amplifier: -- <S> Wikipedia <S> It is called push-pull because the top transistor pushes power out of the pin from Vcc, and the lower one pulls the power in from the pin to ground. <A> Just connect it - and only it - to the MSP device pin. <S> A "push pull" output is one that can't be shared with other outputs (to save I/O pins) and doesn't need a pull-up or pull-down resistor. <S> Which makes it the easiest sort to use. <S> An "open collector" (or "open drain") output can only pull the voltage down to 0V, but not up to +V. <S> This means it can be connected to other outputs of the same type without damage, but needs a "pull up" resistor to signal '1' when it is turned off. <S> (The MSP430 has these pullups built in, there is a special register to turn them on or off) <A> push-pull is the name given to a "totem-pole" style of output driver, commonly seen in micro controller/digital outputs. <S> The "push" stage is when the output is logic high, and a transistor sources current from VCC and "pushes" it out into the output. <S> The "pull" stage is another transistor, which pulls the output to ground. <S> These are often used as MOSFET drivers too, because they can sink and source large amounts of current, rather than an open collector with (internal or external) pull up resistor which is another common alternative (these are only strong to "pull" or sink current, cannot provide much current). <S> If the transistors are CMOS fets, they will be basically VCC or 0V. <S> If they are older style PNP/NPN drivers, sometimes using Darlington pairs for higher current output, they may not provide the full VCC output voltage (close to it though!) and may not reach 0V on the "low" output either, usually less than 1V though. <S> EDIT: to answer the "analogue output" specific part of the question, The output will be related to the sensor reading or whatever internally is happening, and in addition to a normal push/pull style output there will be a feedback associated which allows the "set point" of the push/pull output to drive properly, over an external or internal (read the datasheet!!) <S> load resistance. <S> See the image below for how it may be done on your device.
| Also, push-pull outputs are also used in the analog domain where they are effectively an amplifier.
|
Do MOSFETs have voltage drop across source and drain when turned on? Like diode and BJT having around 0.6V drop, is there any voltage drop across the MOSFET drain and source when the MOSFET is turned on? In the datasheet, they mention diode forward voltage drop, but I assume that it for the body diode only. <Q> Look in the data sheet for the value of this resistor. <S> It's called Rds(on). <S> It may be a very small resistance, much less than an Ohm. <S> Once you know the resistance, you can calculate the voltage drop, based on the current flowing. <A> MOSFET: <S> When the gate voltage is large with respect <S> the the threshold voltage Vth, the voltage drop from drain to source is linearly dependent on current (for small voltages << Vth of the MOSFET), so it behaves like a resistor. <S> The resistance is less when the MOSFET is more enhanced, so a more positive voltage on an n-channel MOSFET gate relative to the source. <S> The equivalent resistor might be tens of ohms for a small MOSFET down to milliohms for a large power MOSFET. <S> From the 2N7000 datasheet you can see that for a gate voltage of 4V and a Vds < 0.5V the resistance is a couple of ohms (typical, worst case would be much more than that). <S> So typically at 50mA, it would drop maybe 100mV. <S> (The resistance Rds(on) is the slope of the curves near the origin). <S> Rds(on) increases greatly with high temperature, so be careful with using 25°C specifications. <S> If you don't give it enough gate voltage (many MOSFETs are specified at 10V, some at 4.5, and fewer at 1.8 or 2.5) <S> you may get a much higher Rds(on). <S> BJT: <S> Voltage drop from collector to emitter is dependent on current but not linearly. <S> At low current and with high base current, the BJT might have a voltage drop of tens of millivolts. <S> From the 2N3904 datasheet you can see the characteristics when Ib = Ic/10. <S> You can see that at, say, a current of 50mA <S> it has a voltage drop of about 90mV so quite similar to the 2N7000. Vce(sat) <S> is the relevant specification. <S> It's pretty stable with temperature, but you must give it plenty of base current for the expected collector current. <S> If you don't give it enough base current, the voltage from collector to emitter can increase greatly. <S> At more than the base voltage <S> it's no longer considered to be saturated. <S> One interesting difference between the two is that the MOSFET drops almost exactly zero voltage at zero current, whereas the BJT drops perhaps 10 mV at zero collector current (assuming you put some reasonable current in the base- <S> that's not reflected in the above curve). <S> That makes the MOSFET generally a superior switch for precision instrumentation applications where 10mV is a big deal. <A> I think you are comparing two different things. <S> The 0.6V drop you typically see in a BJT <S> is the B-E (base to emitter) junction. <S> For a mosfet, a similiar analogy doesnt exist. <S> G-S (gate to source ) will always be whatever the gate voltage is with respect to the source. <S> For a BJT collector to emitter, that will vary depending on your collector current and collect or emitter resistor. <S> For a mosfet, there is a paramater called Rds(on) which is the resistance between source and drain. <S> So the D-S (drain to source) voltage, like the C-E voltage will vary depending on current.
| The MOSFET behaves like a resistor when switched ON (i.e. when Vgs is large enough; check the data sheet).
|
How can the value of a resistor be measured if it goes straight to ground? I'm looking to integrate a LiPo charging circuit into my PCB, and found the MCP7831 IC. It's got a PROG pin, that allows you to change the behavior of the IC by use specific resistor values between that pin and ground. But I'm wondering how it knows the value of the resistor? I would think to know the value of the resistor your + voltage is applied to one side, and the other goes to an input pin of an IC that measures the lowered voltage. But if it connects straight to ground, how does the value get measured? <Q> It's generally done with a current source. <S> The current source applies a current to the unknown resistor and the voltage across the resistor is measured. <S> Usually the current source is will be trimmed and curvature corrected over temperature to improve accuracy. <S> Sometimes the voltage is measured with an ADC. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Have a look at the datasheet - it's shown explicitly: <S> In normal (not precondition) charging, a constant voltage of 1.00 volt is maintained on the PROG pin by closed loop control through the op-amps (the 1.22 V reference is divided down). <S> The resistor connected from the PROG pin to Vss causes a current to flow of 1.00V/R. <S> In the example, a current of 0.5mA will flow through the 2K resistor (Ohm's law). <S> That current is reflected in the current mirror with a 1000:1 ratio, so 500mA will flow through the battery. <S> There's a few details beyond this, but I think this covers the question. <A> Like most regulator/regulation ICs that use a resistor for programming, a fixed voltage is applied to the resistor. <S> This results in a specific current, and through either a current mirror or a current amplifier further parts of the IC can use this information to control their behavior. <A>
| The PROG pin can measure the resistor by either setting a specific voltage and measuring the current or by setting a specific current and measuring the voltage.
|
Using PIC32 Flash for storage Continuing along on my PIC32 adventure, and using my PIC32MX210F016B. I have some configuration data for another IC that I have to program over SPI. I want to store that confurgation data, about 2K in the PIC flash. I'm not to clear how to do that though. I was trying to find some documentation or example about it. In TI land for an MSP430 I remember I had to specify the flash page I was going to use in the memory map and then CC studio kept erasing it every time I reloaded code. I feel like since this is static maybe I can declare it in my code, I just don't want it to end up trying to take up 2k of ram. Any advice or references on the best way to accomplish this? <Q> You can declare your data in your code using the 'const' storage class to tell the compiler to place the variable in flash instead of RAM. <S> So something like: const char array_of_stuff[2048] = {0, 1, 2, 3, 4, 5, ... , 2047}; or even const struct { int thing0, thing1; char smaller_thing, lots_of_little_things[512]; etc ... <S> } interesting_stuff = { <S> 123, 456, 'p', {'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', .... }, etc ... }; or, if your data is stored in something like an external .csv file const char my_data[2048] = {#include "my_data.csv"}; Leaving out the 'const' keyword might at first seem to produce the same effect, but in fact what you'll have is a big area of initialised RAM which the compiler will arrange to have populated with all of your stuff at startup instead of locating your variable(s) <S> in flash 'directly'. <A> If you want to manipulate the Flash in your program, then there are two things you can look at that might help you. <S> Both are part of the chipKIT project: <S> https://github.com/chipKIT32/chipKIT32-MAX/tree/master/hardware/pic32/libraries/EEPROM <S> It relies on a section of Flash being set aside in the linker script (linker scripts are in https://github.com/chipKIT32/chipKIT32-MAX/tree/master/hardware/pic32/cores/pic32 ) and also uses a form of wear levelling to increase the life of your flash. <S> Secondly, for general Flash reading and writing, another library for the chipKIT project (written by me) is here: <S> https://github.com/MajenkoLibraries/Flash Feel free to take any code from that you fancy. <S> If you aren't going to be making any changes to the data, and it is fine to include it in the code, then declaring it const <S> is the way to go. <S> When const <S> it will reside in Flash (more specifically <S> the .rodata section) so will not take up any RAM space. <S> Unlike simpler MCUs <S> the PIC32 has a single monolithic address space, and the Flash is directly mapped into that 4MB memory address space. <S> Consequently the data in Flash can be directly accessed and doesn't require any special register manipulations or instructions. <S> Simpler MCUs often copy the read-only Flash data into RAM to make accessing it easier (unless you specifically force it to do otherwise). <A> Microchip has an EEPROM emulation library for PIC32 that should do just what you need. <S> http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en538000 "const" will address the problem, I think, so long as you don't ever need to change the data while running, but the EEPROM emulation should do all the tricks (Haven't used the method myself, so I can't vouch for it)
| There is "EEPROM Emulation" (emulation of the Arduino EEPROM library using Flash).
|
Identify coils end in 3 phase AC induction motor for star-delta configuration In general if I look at a 3 phase AC motor outlet wires there are six wires that comes out of motor, three of them are marked to show coils end and other three are not marked which show coils other end. Sometimes what happens these marks are worn out due to the reason that motor is rewinded and winder guy forgot to mark the coil ends or due to other reasons. Six wires also comes out of a star-delta motor starter,now how would I correctly identify outlet wires which are coming out of motor so that I can configure the star-delta connection correctly? <Q> I had this problem once with a motor which losses is terminal block and solved it following these steps, Identify the coils, measuring continuity. <S> Connect the motor in delta style using six cables or use a star-delta starter as power of motor dictates. <S> Test all the combinations in one of the ends of the coils, left the other side fixed. <S> There are only two possibilities. <S> You must try uvw-uwv-vuw-vwu-wvu-wuv , skipping the ones who puts the same phase at the ends of the same coil, you could test this with a voltmeter. <S> If the sequence is wrong and you have a star-delta starter, the motor will starts up always correctly in star an showns an anormal response at delta changeover, stops or severely losses torque. <S> I followed this procedure with a 15Kw motor and a star-delta starter. <A> In this case try measuring conductivity between the ports with a tester/multimeter, i.e. when you get conductivity with the ports 1 and 5, then they are part of the same coil, different coils are galvanic isolated. <S> For this part you just have to set one coil as phase T and interchanging the other two phases will set the rotation of the motor on the opposite direction. <S> Hope it helps. <S> Sorry for the bad English. <A> I suspect you could test it like a transformer. <S> Apply 12 volt ac to one coil pair and look at the waveform on that coil and another coil using a two channel oscilloscope. <S> If the second coil is in phase with the first coil mark the two wires that the probe tips connect to. <S> Move the second probe to the 3rd coil pair and repeat the marking procedure. <S> This should ensure that the marked ends of the three coils are all having the same phase relationship. <S> I will add that you should use a low voltage ac compared to the rated running voltage because the rotor winding is acting like a shorted turn in this test and it could cause several amps to be taken from the ac test supply. <S> I'd be interested to hear what you measure. <A> I use this method to find correct polarity of the coils:With all six end loose, use a continuity meter to pair up each of the coils two ends. <S> Use a controlled DC supply across each coil and inject a small DC current. <S> Then take a simple magnetic compass and place it near each of the three coils. <S> If the direction of current flow is the same through each coil, the magnetic compass should give the same pole(north or south)near each coil. <S> You can decide which of each end is start and finish end of the coils. <S> Credit to A.Mizzi <A> Connect meter (analogue volts) across a winding..dab a 6/12v battery across another winding to induce a forward flick of meter... <S> take into concide ration 180 deg phase shift.. <S> Mark up and repeat for other win ding. <S> .. <S> job done <A> We took two coils and combined two terminals and give supply at one uncombined terminals and combined terminal,if we check the voltage across the uncombined terminals if it's more than supply voltage than its terminal <S> are in correct position otherwise if less than wrong one thus we can check <A> Take one winding mark a1 and a2,take 6v or 12 v battery.connect multimeter in dc v smaller range to other winding terminals,assume b1 and b2. <S> connect multimeter to b1 and b2. <S> Just touch 12 v battery positive to a1 and negative to <S> a2,dont connect permenant.observe multimeter makes a positive kick,then assumed polarity b1 and b2 is correct,make permanent marking.same way connect battery positive to b1 and negative to b2 just touch battery terminals.connect multimeter to other leftout terminal,multimeter makes positive kickthe assumed terminal is c1 and c2.if the multimeter makes negative kick <S> then the assumed connections become reverse like c2 anc1.like <S> this repeat this for all the three windings.
| Once you have identified each coil ports, then injecting a small voltage (in comparison with the rated one) on each coil/motor phase, identify the direction of the motor rotation and assign the phase names that are more convenient for you.
|
Simple switching between clocks using oscillator disable pins I am working on a circuit where I need to use different clock sources. I am using two HCMOS oscillators. Both oscillators have an disable pin. When disabled, the clock output buffer is placed in tri-state. Can I safely connect both lock outputs with each other and use the disable pins so that only one oscillator is enabled at a time? The following image shows what I mean. NOTE: Glitch-free switching between clock signals in not required. <Q> Your circuit concept will work just fine as long as you only enable one oscillator at a time. <S> After all there are reasons that oscillators like these are equipped with an output enable/disable pin. <S> Your application is one of the reasons. <S> Some food for though. <S> To ensure that both oscillators are never enabled at the same time you need to properly comprehend how the two enable signals are generated. <S> If the two signals come from a microcontroller (which I suspect is the case) you can easily control the enables via the software to ensure that at least one of the enables is low at any given time. <S> However when the MCU is in reset or before the software is active you have to make sure that the default (reset) state of the enable circuitry abides by the only one active at a time rule. <S> An effective way to deal with this is to use MCU pins that default at powerup and out of reset as inputs to the MCU. <S> You can then put suitable pulldowns on each of the enable lines to hold the lines low until software eventually comes along and configures the two pins as outputs and drives one high. <S> The job to ensure proper operation gets slightly more complicated if these oscillators are actually supplying the clocking signal to the MCU itself. <S> (I suspect that this is not the case for your application since you said that glitchless switching was not required. <S> It the MCU was fed from the clocking selector on the fly then you would need a glitchless design. <S> You would also need to design the circuitry so that one enable was active and the other was disabled in the default (reset) state. <A> With the circuit as given, the oscillators have to be able to withstand 50mA if both become enabled for some reason. <S> If this is within spec for them then it will work, otherwise you should either increase the resistances, use oscillators with higher tolerances, or put them behind a 2:1 mux. <A> Since tri-stating a logic output puts it in a condition where it appears to disappear from the bus, your scheme will work as long as MCLK1_EN and MCLK2_EN are mutually exclusive. <S> There's a caveat, though... make sure that the output capacitance of the disabled oscillator, during shutdown, isn't enough to load the enabled oscillator to the point where it can't clock the following stage/s.
| A good way to handle this can be to design so that both enables are low in the disabled state through power up and until the MCU software is active and able to select one or the other enable.
|
How to test and rate a home-built low dropout regulator? I built a low dropout regulator following experiences building a discrete linear regulator. The circuit is simple like this: simulate this circuit – Schematic created using CircuitLab I would like to know how to test the maximum voltage inout and output, current carrying and heat dissipation ratings of this circuit with parts as specified in circuit, as well as its minimum voltage dropout. By supplying a regulated 5.5V into this circuit I can get the maximum of 5.4V at the output under 30mA load. Does this spell a minimum 0.1V dropout at 30mA? I also got a minimum of 2.5V voltage output without load. How to modify this regulator so that it can shut the load down by turning the pot one way all to the end? Also is the op-amp getting power from the unregulated input a problem? --- EDIT --- Since this circuit is not protected, how to add overcurrent protectection? I am considering using LM358 instead of LM741 as the op-amp chip, and how to construct the current sensing and overcurrent protection circuit using the extra op-amp from LM358, a shunt resistor and a few more MOSFETs? (I have 2N7000 , BS250 , IRF4905 and IRF540 spare parts lying around in bulk) --- EDIT 2 --- Rounding up suggestions, does this seem like a better circuit? simulate this circuit The reference is modified per @SpehroPefhany 's suggestion to use a TL431 powered through a 680Ω resistor. The old 741 is swapped out with OPA2134 dual rail-to-rail op-amp (expensive!) per @andyaka 's suggestion. Some frequency compensation is attempted using capacitor C3 at the gate of pass transistor M1. My intention of the overcurrent protection is like this: The second op amp in the OPA2134 package is wired into a differential amplifier, monitoring the voltage difference between current shunt resistor R4. When the current approaches 4A the voltage drop across R4 increases to the point that the voltage output of the differential amplifier OA1b approaches the threshold voltage of 2N7000 and start to push it on, pulling the voltage at the inverting input of error amplifier OA1a lower, pushing the gate voltage of M1 higher and start to shut M1 down. --- EDIT 3 --- Rounding up suggestions again, would this be better? simulate this circuit The op amp is no longer driving the pass MOSFET directly, and current shunt voltage is directly matched against the threshold voltage of a MOSFET PNP BJT. This should be able to eliminate the need for a RRIO op amp. I am still using a relatively modern LM358 but is 741 suitable here now? <Q> I suggest you do not use a 3.3V zener diode as a reference- <S> you'll get horrible line regulation (and ripple rejection), especially with a resistor as the current source, as well as bad temperature stability. <S> At least use a TL431 (almost as cheap as a zener in volume) which (if you give it >1mA) will maintain a very steady voltage (nominally 2.495V) and has quite reasonable temperature stability. <S> Your 1uF in parallel should result in unconditional stability. <S> An LM358 should work okay with a sufficiently low pullup resistor to allow the output to get close to the positive rail so the MOSFET can turn off. <S> The LM358 is good for 32V, your MOSFET gate is probably not rated for 32V <S> so that limits your maximum input unless you improve your circuit. <S> You've not made any attempt to deal with (frequency) compensation. <S> At some point (probably very soon) you will find out why LDOs have problems in this area when it turns into an oscillator. <S> You may not easily see the oscillation at the output because of the huge capacitor, so look at the op-amp output to see if the circuit is stable. <S> Anyway: <S> How to test Line and load regulation test for the rated input range with different loads (minimum to maximum and a few inbetween). <S> Measure the output voltage for each. <S> Temperature <S> stability- repeat tests at different temperatures from minimum to maximum. <S> Ripple rejection- apply some ripple on the input at the desired frequency and observe how much gets through to the output. <S> Drop-out- observe the output behavior as the input is increased from zero to a voltage a few volts above the output, with various loads. <S> You can measure quiescent current Iq as well, if you like. <S> If you pullup resistor is very low (like 1K) <S> you may see a significant increase in current as the op-amp rails for a high set output voltage and input slightly too low to regulate. <A> Here's a fairly simple, well-behaved LDO that simulates nicely: <S> +V is 24VDC, the voltage into the load is >23.9V with R3 at 5V, and <100mV R3 at 0V. <S> I'll clean it up a little, maybe switch out the LT1007 for a RR out opamp to get really low LDO, and post a link to the LTspice file tomorrow. <A> This circuit just will not work properly on low power loads. <S> The 741 maximum output voltage is at least 3 volts under the supply rail voltage and this means the P channel MOSFET will always be conducting some current - gate-source voltage threshold can be as low as -2 volts and given the 741 <S> probably can't get to within 3 volts of the positive supply rail <S> you are going to have big problems at some point or another. <S> This also explains why you cannot properly shut down the regulated output voltage. <S> Try using an op-amp that wasn't designed in the middle of the last century. <S> hint - rail-to rail output types are needed to cure the above. <S> Please also note that you may encounter large instability problems with newer op-amps due to their increased GBW product. <S> on the olde worlde 741 they are likely to slow to cause problems in your circuit.
| Stability- change the load from maximum to minimum with different input voltages and observe the output behavior-looking for droop or overshoot when the load is increased or decreased suddenly.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.