source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
Why the need for multiple I²C ports? The I²C protocol allows, in theory and with 7-bit addressing, up to 127 devices to be connected to the master. This is a large number, so why would any low-cost microcontroller (e.g. this PIC24 ), have more than one I²C port? Why is it needed? <Q> Sensor hub arrangement <S> In this scenario, there are two I²C buses. <S> Let's call them local bus and main bus . <S> The purpose of the local bus is to connect a bunch of sensors to a microcontroller (μC). <S> The purpose of the μC is to poll the sensors, aggregate information from them, and detect certain events. <S> A μC in such role is called sensor hub . <S> The sensor hub is not responsible for higher order functions; there is a powerful main processor for that. <S> The main bus connects the sensor hub to the main processor. <S> So, the sensor hub μC is a master on the local I²C bus and a slave on the I²C main bus. <S> SPI and I²C <S> The PIC linked in the original post doesn't share the pins between SPI and I²C. <S> However, there are other PICs that use the same pins for hardware SPI and I²C, because both are implemented with the same MSSP peripheral. <A> A very common reason to need more than one bus is having devices that run at different speeds. <S> Originally, I²C ran at at a maximum 100 kHz. <S> Later, the speed was increased to a maximum of 400 kHz, and still later, to 1 MHz and above. <S> The gotcha is, since the address of each device is embedded in the I²C protocol, then if you have devices with different speed ratings on the same bus, say 100 kHz and 400 kHz, you always have to run the bus at the lowest speed common to all devices on the same bus (100 kHz in this case). <S> If you ran the bus at the higher speed (400 kHz), obviously the lower-speed device would not work properly, and it might even interpret the address of the high-speed device as its own, causing the 400 kHz device to fail as well. <S> But even if you initially ran the bus at 100 kHz, and then tried to speed up the bus to 400 kHz after addressing a higher-speed chip, it would be possible (although probably unlikely) for the lower-speed chip to interpret one of the high-speed data packets incorrectly as its address, and thus mess up the communication on the bus. <S> In either case, at the end of the interchange with the 400 kHz device, the 100 kHz device would probably be in an unknown state. <S> So it is most efficient, if you have devices running at different speeds and you have multiple I²C ports and <S> you have the spare pins to allow for such luxury, to have one I²C say for 100 kHz devices, another for 400 kHz devices, and another for 1 MHz devices, as your needs may dictate. <S> This is not an issue with SPI because each device is enabled (addressed) in hardware by a separate chip select line. <S> So the clock speed can be matched to the speed of the selected chip (10 MHz, 20 MHz, whatever) without having any effect on other chips on the same bus, since they are not enabled. <A> Also it could let you support two devices with the same address. <S> Yes most devices let you select maybe the bottom two bits of their address with straps. <S> Recently I had to support 4 devices who each only allowed you to set the LSB of their address with a resistor. <S> Having two ports means no extra cost for me. <S> Maybe I want one to be the master for a bunch of devices and present the other as the slave port, so my master doesn't have to wait to grab the bus to give me a command while I poll a temperature sensor for the 10,000th time. <S> There seem to be a bunch of other good responses in this thread, just adding my 2 cents. <A> Speed. <S> If you should need to access two I2C devices at the same time, you could have a significant conflict. <S> Or, one would have to wait for the other. <A> Second, I²C can be used to get more bandwidth (you can receive or send two bytes at the same time). <S> If you have some ADC that works continuously, one I²C is busy all the time. <S> Switching address takes some time too, so in some cases - you can use two ports for two devices and avoid address changes to save time. <A> Others mentioned many reasons to do this, I will add one: <S> You got a bunch of 5V I2C devices, and a bunch of 3V3 I2C devices. <S> For example I have a 3.3V micro which has two I2C ports, one 5V tolerant, the other 3V3 only.
If a PIC has two separate MSSP peripherals, then one can be used for hardware SPI, while the other one is used for hardware I²C.
Why are headphone wires so thin? Speaker wire is thick so why are the wires that go from a stereo plug to earbuds so thin? They seem unnecessarily thin. Is this so they break easier and then I need to buy another pair of headphones? <Q> Headphone wires are so thin, because the power transmitted is low, and there are technical and economic reasons to keep the wires thin. <S> Proper speakers use large amounts of power to drive the magnetics inside them, to get a good decibel (sound power) output. <S> Little earbuds go straight into your ear canal, the transmission power can be extremely low in comparison, and it's very directional. <S> The tiny little speakers in those need such low power, that thin wires is fine to transmit on. <S> Remember the more current you need through a conductor, the larger it should be to avoid losses due to good old Ohm's law <S> (voltage dropped through a resistive conductor, due to current). <S> As sweber mentions in the comments, the length of the wire plays a part in how thick the wires need to be - if the cable is long, like in a speaker system, the resistance needs to be kept low over the distance, and thicker wires (cross sectional area for a conductor) help with this. <S> Since earbud cables are quite short, usually about a metre long, and for the expected current draw, thin wires are acceptable. <S> Finally, there is an economic benefit to not over-sizing the conductor for earbuds. <S> Copper is expensive, especially if you are manufacturing millions of units of something, there can be a huge difference in price between one gauge wire and another, from the weight of copper involved. <S> If you can technically transmit on a thin wire, and it's economic to do so, then why not? <S> They are usually stranded wires to help with flexibility and reduce metal fatigue, and the wires are almost always coated with protective plastics or fabrics to reduce stress on the wires. <S> The rubberized insulating around the wires is to avoid axial and shear stress from breaking the wires. <S> So no, it's not a conspiracy to make you buy more crap. <A> They're made to be cheap, light, unobtrusive and flexible. <S> I don't think it's a conspiracy to make you buy more, but there's only so much that can be done with a small amount of affordable material. <S> Less material means less volume and weight (so less shipping cost, since you can pack more into a TEU shipping container), as well as less material cost. <S> More professional over-the-ear headphones often have heavy wires that will stand up to a lot of abuse, and can be replaced when they fail. <S> For example, this one which uses a Lemo connector on the headphone end and the usual 6.35mm phono jack on the other end. <S> That's one difference between a $25 (or $2) <S> ear bud set and a $1500 studio headphone. <A> There is the total thickness of the wire. <S> Overall thickness of all the strands combined. <S> And then there is the choice of whether to use more and thinner strands or use fewer and thicker strands. <S> The choice to use more and finer strands actually makes the wire more flexible and less likely to break. <A> If they were thicker, they'd be heavier. <S> This pulls on the earbuds and would increase the chance of them falling out of your ears. <S> Try taping 1m of speaker cable to each earbud and see what it feels like. <S> For over-ear headphones, you can get ones that have a plug and socket rather than just a wire going into plastic, enabling you to replace the wire if it gets damaged.
The total thickness is chosen to be small because there is not much power conducted to the earphones (compared to a loudspeaker), and consumers like thin wires. Headphone wires tend to break at the ends, where the flexible wire meets the solid body.
What is a DC DC controller? I have heard about DC DC converters and I understand what they are but what is a DC DC controller? What is the difference between the two? Like this LM5085 , I cannot understand the major difference between the converter and controller. Hoping for an explanation. Thanks in advance! <Q> This allows the power able to be handled to be adjusted to suit the application by using more or less capable switches as required, and often achieves overall performance levels which are not practically achieved within an IC of a given size. <S> The overall result is that the task is partitioned into sections which are best handled by components which are usually able to be price and size optimised compared with using a single IC solution. <S> The LM5085 that you cite Datasheet here - has a 4.5V to 75V input voltage range. <S> Providing a power IC at this voltage rating is usually expensive. <S> A typical application circuit (from the data sheet) is shown below. <S> This is rated at about 60 Watts (5A at 12V out, 5B shown on diagram) but by changing Q1 and L1 any sensibly desired power level can be achieved. <S> The ICs cost just under $1 in 1000 quantity at Digikey <A> There are basically three options for implementing a DC-DC converter. <S> A Module <S> Modules have the entire DC-DC converter built into a little cube. <S> These are designed by people that know what they're doing, and optimized for efficiency and EMC. <S> They are good for when a) time to market is critical, and the designer of the end product can't be bothered vetting a power supply and b) when the designers of the end product don't know or want to know anything about power supply design. <S> An example... <S> An IC <S> When you use an IC, brains, control loop, and the switching transistors are on the same die, usually with the switches in the form of a synchronous rectifier. <S> The end product designer only needs to add caps, inductors, and resistors as needed. <S> The design work is done by the manufacturer, and is implemented by the end product designer. <S> The end product designer will optimize to their particular situation, and is ultimately responsible for the performance and EMC. <S> An example... <S> A Controller IC <S> This is what you have found. <S> A controller IC has the brains(again, complex) transistor drivers, and control loop on one die. <S> The switching transistors and passive components are all external. <S> Again, the manufacturer of the controller will provide recommendations, but the end product designer is responsible for optimizing and vetting the design. <A> A DC-DC controller it can be used for buck, boost or flayback converter. <S> The Dc-DC controller consists of a VCC monitor for controlling the state of the device, current power driver for controlling the gate of a discrete P or N channel transistor,fixed frequency oscillator, short circuit protection timer, programmable Soft−Start,precision reference, fast output voltage monitoring comparator, andoutput stage driver logic with latch.
A switching regulator "controller" implements the logic portion of the overall converter inside the IC but does the heavy current switching using one or more external high current and/or high voltage semiconductor switches.
Is controlling a voltage regulator's EN/SHDN terminal directly by 3.3V microcontroller possible? Let's take the LT1763. The datasheet says that "The SHDN pin can be driven either by 5V logic or open-collector logic with a pull-up resistor."On the other hand the chart "SHDN Pin Threshold Off-to-On" says about 0.7V at 25*C temp suggesting 0.7V shall be enough to drive the SHDN pin high. The question is whether 3.3V logic is enough to drive this line reliably? If not, which chart should I study? I need the device to operate normally off and enable it from the microcontroller on demand. If the 3.3V cannot drive the SHDN pin correclty then I'll need to use an NPN and put the chip power supply between Vin and NPN's collector (for GND). <Q> Yes, 3.3V should work. <S> The datasheet says: <S> So as long as you can drive the \$ \overline{SHDN} \$pin lower than 0.25V <S> when turning it off and higher than 2V when turning it on, it should work as expected. <A> With an Off-to-On threshold of between 0.8V and 2V, and an On-to-Off threshold of between 0.25V and 0.65V, that sounds very similar to a TTL level Schmitt Trigger. <S> So any voltage that rises above its Off-to-On threshold, which could be anywhere between 0.8V and 2V, will turn the regulator on. <S> Any voltage which falls below 0.25V to 0.65V will turn it off. <A> It might not, but this can help: simulate this circuit – <S> Schematic created using CircuitLab
Since 3.3V is greater than the upper Off-to-On threshold, that will happily turn the regulator on.
Uses for gate expressions, Nor and Xor I'm not generally confused by Electronic Engineering, but Nor and Xor are the Gate expressions that like to break that Rule.I can't find proper answers to this question, as they are either:Too Complex. Or too Uninformative. No and Yes, I and O are quite simple, but i stumbled across the two extra expressions I've never heard of, Nor and Xor.I'm quite new to this kind of stuff, so Nor and Xor are also new, and quite confusing.Some clarification on the uses of Nor and Xor would be appreciated. <Q> There is one special thing about the NOR gate. <S> It (along with NAND) is what is called universal gates. <S> That is, any other gate (AND, OR, NOT, etc.) can be implemented using just NOR gates. <S> I think this picture shows why: <S> So, as far application is concerned this is the main thing. <S> For Ex-OR, it is commonly used as a state toggle or a buffer. <S> If you look at X-OR truth table: You will see that if I set one input to zero it acts as a buffer. <S> If my input is 0, then output is 0 and if my input is 1 <S> the output is also 1 (buffer - output same as input). <S> On the other hand if I set one of my inputs to 1, then it acts as a toggle. <S> If my input is 1, I get 0 and if my input is 0 <S> my output is 1. <S> Why are buffers used? <S> In digital circuits it is primarily used to introduce some time delay. <S> Toggling - well though NOT gate does the same, it is advantageous to use X-Or because by just changing the first input 1/0 (Toggle/Buffer) can be achieved. <A> Truth tables: NOR <S> (NOT-OR) is more or less like NAND: 0 <S> NOR 0 = NOT(0 <S> OR 0) = NOT(0 <S> ) = 10 <S> NOR <S> 1 = NOT(0 <S> OR 1) <S> = NOT(1) = 01 <S> NOR 0 <S> = NOT(1 <S> OR 0) = NOT(1) <S> = 01 <S> NOR 1 = <S> NOT(1 <S> OR 1) <S> = NOT(1) = 0 <S> XOR emits 1 when the two inputs differ. <S> You can consider this as binary addition without carry. <S> A XOR B = <S> (NOT(A) AND B) <S> OR <S> (A AND NOT(B))0 XOR 0 <S> = 00 <S> XOR 1 = 11 XOR 0 <S> = 11 XOR 1 = 0 <A> In 2 OR <S> NOR---- <S> ---- <S> --- --- 0 0 0 <S> 1 <S> 0 <S> 1 <S> 1 <S> 0 <S> 1 <S> 0 <S> 1 <S> 0 <S> 1 <S> 1 1 <S> 0 <S> XOR stands for "exclusive OR". <S> There are several ways to think of that. <S> The name suggests OR, but not when both inputs are equal. <S> You can also think of it as indicating difference in the two inputs. <S> No matter how you think about it, XOR is: In 1 <S> In 2 XOR---- <S> ---- <S> --- 0 0 <S> 0 <S> 0 <S> 1 1 <S> 1 <S> 0 1 <S> 1 <S> 1 0 <A> They are types of logic gate: NOR - Negated OR <S> (Neither one nor the other) <S> XOR - eXclusive <S> OR <S> (One or the other, but not both)
NOR stands for "not OR", which you can think of as OR with the output inverted: In 1
Filtering the output of the "cheap MCU voltage inverter" This is the circuit I have to create a negative rail for a local op-amp which needs the rail in order to manage to get low on the output rail. I've tried running a single supply but that did not perform well enough. The circuit works and with my diodes I get an output of -4.4V from 5V positive which is enough for my needs. The problem is that the output is a bit noisy and I can see some low freq. pickup as well. How can I filter the output of the circuit? I've tried to increase the C4 capacitor which reduced the noise however the did not change the low freq. pickup. The circuit will supply an op-amp used in analog circuit so low noise is important. UPDATE: The schematic was wrong (did it in a hurry before leaving duh), however the circuit was hooked up correctly. simulate this circuit – Schematic created using CircuitLab <Q> Your circuit: Can't work as you describe. <S> If this is supposed to be a charge pump, then C3 is in the wrong place. <S> A proper charge pump is: Issues of noise are nonsensical until you actually have a charge pump. <S> Try the above circuit. <S> Then you can ask another question if you still have problems with that. <A> Are you using the MCU output directly as the source of the square wave? <S> The MCU output impedance (probably low 2 digits of ohms range) transfers to the charge pump output and needs to be taken into consideration. <S> If the low frequency noise is indeed resulted from low frequency load variation and it is somewhat repetitive and can be estimated with a low frequency limit, along with the estimate of the charge pump output impedance, you can calculate a capacitor value to meet the noise requirement. <A> This low frequency noise can be generated by changes in the current consumption (negative rail) of the op amp. <S> Maybe a LDO could do the trick. <S> For the high frequency, use any low pass filter.
The LDO suggestion in the other answer may give you the cleanest output if there is some voltage to spare. Alternatively, to reduce the output capacitor size, lower the impedance of the square wave source with a buffer of some sort.
What is the difference between processor clock and system clock? In the TM4C123G Launchpad Workshop page 129, there is a note about power modes. This note differentiate between processor clock and system clock. So what is the difference between them ? Is this a general concept or is it specific to the TM4C123GH6PM micro-controller ? <Q> From the datasheet, the processor has a main clock, which the system clock is derived from as shown in the image below: <A> So the system clock is not stopped (in the Deep Sleep it is stopped as well), it is just stopping feeding the core. <A> Different clocks control different parts of the microcontroller. <S> One of those clocks control the main code, while the other controls timers. <S> By using low power modes, you turn off the main code clock but leave the other on so your timer or adc or other peripheral that runs on that timer still works. <S> Essentially all microcontroller work this way.
The processor clock is derived from the system clock, but for the mode you are mentioning it is just "disconnected" from the processor core.
Is hardware flow control necessary? I want to communicate using a serial cable to a device that uses RTS/CTS flow control and 115200 baud speed. I want to use this Sparkfun TTL to rs232 adapter, but it has no RTS or CTS pins. What can I do to get hardware flow control or is there a software solution? <Q> The software solution is called XON/XOFF flow control . <S> It basically consists of sending ^S/DC3 (0x13) to suspend transmission and ^Q/DC1 (0x11) to resume it. <S> Naturally this requires the other side to support it, so if only hardware flow control is supported then it won't be a viable solution. <A> If both ends are always fast enough to receive all the other end sends, there is no need for flow control. <S> This is often the case with UART speeds. <A> This way, it's telling itself that it's OK to send. <S> The hack is that if you do overrun its input buffer, it will suppress its sending instead. <S> If sending data is required for consuming its own input (e. g. input echoing or command/response sequences), you can end up in a deadlock <S> so you need to be careful not to send stuff too fast.
If your device requires hardware flow control, one hack is to connect its RTS to its own CTS pin.
Why don't brushless motors "short"? You always learn in school that you should never short terminals of a battery because the wires overheat from the large current. If you look at a brushless motor, you'll see that its nothing but coils of wire. So why don't these motors "short" the power leads? How is this any different than shorting terminals of a battery? How is the current being regulated when the motor is operating? <Q> Those wires form coils, so are long . <S> Every bit of wire has some resistance, and all those bits of wire end to end result in a significant enough resistance to not look like a "short". <S> These wires shorted across a voltage source is exactly where the stall current of the motor comes from. <S> It is simply the voltage applied to the coils divided by their resistance. <S> When the motor is running, then another effect is present. <S> The motor actually acts like a generator so that spinning in the forward direction cause a voltage to be generated across the coils. <S> This voltage opposes that applied by the external power source. <S> The current thru the motor is therefore the power voltage minus this <S> reverse EMF produced by the motor acting as a generator, and that result divided by the coil resistance. <S> The faster the motor spins, the less current, because a higher back EMF is subtracted from the driving voltage. <S> This back EMF effect also limits the top speed of the motor. <S> At some speed, the back EMF generated internally cancels the applied voltage, and nothing is left driving the motor. <S> Of course it wouldn't spin at that speed since nothing is driving it anymore, but it works at a little lower speed if nothing is loading the motor. <A> A "short" is a low resistance , low inductance connection. <S> A motor coil is a moderate resistance, high inductance connection. <S> The inductance reduces the rate at which the flow of current increases from 0 (at the initial time of connection), and the resistance limits the maximum amount of current that can flow. <A> You mention a brushless machine. <S> These require a form of AC excitation (inverter, controller etc...). <S> Take a single phase brushless DC machine (same argument for single phase BLAC, or polyphase...) <S> If you were to take a battery and connect them directly to the phases of this brushless machine A few things would happen instantaneously <S> the machines stator would appear like an open circuit as essentially it is a real-world inductor: <S> R+L (for a 100uH line inductance you could have 0.1R) <S> The current would build up as per V = <S> L di <S> /dt <S> Once current is flowing there would be rotor airgap flux generated which in turn would impose a torque on the rotor & it would turn (unless already aligned) & essentially lock the rotor. <S> Depending on other considerations, a few other points of interest need to be noted. <S> The current limit will be based upon the Equivalent Series resistance of your source, plus the windings resistance. <S> Now the stator acts as a really good heatsink so taking that into consideration. <S> 4a. <S> If the steady state short-circuit current is a value that the machine can tolerate then it will sit there generating torque at its shaft 4b. <S> If however it isn't (more than likely for anything over a small battery...) <S> the stator windings will heat up & the insulation will breakdown, shorted turns, propagated shorted turns, hard short. <S> If an inverter+controller was present, depending on the complexity they may PWM the stator to a fixed current level to control the stall torque within the bounds on the machine+inverters design. <S> Simply put, Depending on the battery, its cranking capability, and the stall current capability of the machine, you would not put it directly across a brushless machine for exactly the same reasons. <S> Now if they were connected to a PMDC machine (brushes) <S> the rotor would start to rotate and the current will be limited due to commutation and the rotor speed <A> I think he is trying to understand why the coils that are touching don't all short. <S> It is that resin coating that keeps the current flowing "in line" down the wire. <S> When a brushless motor is pushed past its current rating, it can overheat and burn off some resin. <S> When this happens, the wires are now free to touch and exchange electrons, and the motor is now dead. <S> This coating is clear, so unless you look close or scratch it off, you can't really see that it is there.
I believe the answer he is looking for is that the wire has a thin resin coating before it is wound around the stator laminations. So even if you have a motor coil directly across a battery, as long as the connection isn't maintained for very long there isn't an opportunity for the amount of current flowing through it to get out of control.
If I were to discharge, recharge, discharge, recharge,..., an electronic equipment, would there be any negative effects? Would there be any damage to a laptop or another electronic equipment if I use the internal battery supply till it has been completely depleted, then I recharge it to maximum, then wait for it to become completely depleted again, and then repeat. If so, what would be some of the long term effects? <Q> Batteries have a limited lifetime (including sitting on a shelf) due to ageing and also a limited number of charge/discharge cycles, which depends on the average depth of discharge (at least for lithium ones). <S> Example: Lithium batteries don't suffer memory effects (forcing you to fully discharge regularly) <S> so it's actually preferrable to discharge it partially like the graph suggests. <S> I can only tell about users concerns though, I know how batteries work but not enough to say why exactly this happens (that's when experts on the topic come in). <S> Anyway, the answer to your question is: your battery won't last long. <S> The undervoltage protection circuit will cut off each discharge before it instantly kills the battery, but it will be dead in very little time regardless (800 cycles judging from the graph for that particular battery, or about 2 years if fully depleted and recharged every day). <A> Most rechargeable batteries, particularly LiOn, have a lifetime defined by number of full discharge/recharge cycles. <S> For most LiOn batteries, this is around 500 cycles. <S> Therefore, if you cycled AC to the laptop 5 times per day, the battery would be dead in about 100 days. <S> (BTW, partial cycles count much less against the battery lifetime.) <S> On the other hand, it is good to fully cycle a laptop battery around once per month. <S> This allows the battery level monitoring circuitry to "re-synchronize" with the actual battery level. <S> So to maximize battery life, you should run the laptop on AC as much as possible, while occasionally running on battery for a full cycle. <A> I want to add a bit about why this isn't the best idea for your battery's health from the electrochemistry side of this question. <S> Lithium ion batteries have a cathode - a layered structure with some lithium in it - and an anode - usually carbon. <S> You charge them by moving lithium ions into the layers of the cathode, and you discharge them by pulling the lithium back out (figure from Sigma Aldrich): <S> The big problem now is the cathode. <S> This causes irreparable damage to the battery - it loses the ability to hold charge and becomes a battery-shaped paperweight. <S> Your laptop probably stops you way above the point-of-no-return, but it's still better for your battery to keep it from getting fully discharged. <S> Aside from this, cycling a battery causes it to lose capacity for multiple reasons. <S> This is covered in the other answers.
If you discharge a battery to extremely low voltages, the layers of the cathode don't have anything to keep them apart, and the layered material starts breaking down.
what does 24 vac secondary mean I need a 120 to 24 volt transformer. The one I bought says 24 Vac secondaryJust below that it say 40VA output. Is this a 24 volt transformer or a 40 volt output <Q> With transformers, you have Primary and Secondary voltages. <S> You can think of them as Input and Output, although it actually works in either direction. <S> So, you are looking for a transformer with a 120V Primary and a 24V Secondary. <S> The primary-to-secondary ratio is a fixed property of the transformer. <S> In this case, 120V:24V is a 5:1 transformer. <S> If you hook up 240V to the primary, you'll get 48 on the secondary, and so on. <S> (There are practical reasons not to do this. <S> One example: perhaps the windings were only specified to handle 120V, and would fail at a higher voltage.) <S> As far as the 40VA, that is a power rating, not a voltage rating. <S> In a DC circuit, this would be given as 40W (Watts). <S> However, with AC, the voltage and current waveforms can be shifted in relation to each other. <S> This causes a difference between the "real power" and the "apparent power". <S> It is customary to give the apparent power rating of a transformer in VA (Volt-Amps) <S> Here is a Wikipedia article on the VA. <S> Even better, here is a good question/answer on EE.SE :) <A> It is a 24Vac (rms) output transformer. <A> The 40VA means "volt-amps" and is a measure of power handling. <S> It means that you can draw 40VA <S> / 24V = 1.67A from the secondary. <S> Why don't they just put 24V at 1.67A? <S> Not sure. <S> I guess even though a transformer is listed to have a 120V primary and 24V secondary, it could actually take other voltages. <S> For example, you could probably put 240V into it and it would work just fine and the secondary would put out 48V. <S> But the power would stay the same so you could only draw 40VA <S> / 48V = 0.83A. If you draw more power than that, it would get too hot and maybe start to melt or maybe even burst into flames (seriously). <S> Note that the 24V secondary means RMS. <S> Meaning if you used an oscilloscope to look at the peak-to-peak swing it would be more like 30-something volts. <S> But if this transformer is for a power supply, after the AC is rectified and filtered, it will be a little above 24V such that it is a good voltage to be regulated down to 24V. <S> The point is that if you need a DC power supply that puts out 24V regulated, you actually need a 24V transformer and not 26V or whatever.
It has a power capability of 40VA (volt-amps)
What does this PNP transistor + OPAMP circuit does? I can solve the circuit for given DC input voltage with transistors Ies and alfa values. It amplifies the input signal for like 13 times. (Not linearly). But i couldn't understand the purpose of this circuit. Could you help me with that? Thanks in advance <Q> You'd normally have a diode from the emitter to ground to prevent the input from going too far negative and possibly damaging the transistor (by reverse B-E breakdown). <S> How it works:- <S> The transistor base-collector voltage is maintained at 0V by the op-amp through virtue of negative feedback. <S> Collector current is \$i_C = <S> I_S <S> e^{(\frac{V_{BE}}{V_T})}\$, <S> so \$Vo = <S> -(100 <S> K) <S> I_S <S> e^{(\frac{V_{i}}{V_T})}\$ <S> There is a temperature dependency, obviously in the thermal voltage <S> \$V_T = kT/q\$, but also in the saturation current \$I_S\$, so practical antilog circuits use something like a thermistor to compensate for temperature variations. <A> It is an Antilog Amplifier . <S> The output voltage will be proportional to the antilog of input voltage. <A> The best way to understand and explain a circuit is to divide it into its constituent building blocks. <S> Here we can think of this circuit as of a voltage-to-voltage converter (amplifier) consisting of two consecutively connected (cascaded) converters: an exponential voltage-to-current converter (the transistor) and a perfect current-to-voltage converter <S> (the op-amp + resistor).
This is a standard textbook building block- an antilog amplifier.
Best way to get 256 io pins? I'm connecting to an arduino or raspberry pi and would like to have 256 io pins. I found a 16bit io expander which has 8 unique addresses for 128 but that's the max I can do on i2c. Any other thoughts on how to expand my io ports? <Q> You can put an I2C Multiplexer in there between the Arduino and your devices, then only put one of each address on each downstream bus. <S> A 1-to-2 Multiplexer that I've used with Arduino before is PCA9540BD,118 . <S> That will get you to 256 with the hardware and interfaces you are already using with the addition of one more component. <A> It's a good tool to have in your toolbox. <S> For example, XC2C32A with 33 I/O for $1.25. <S> Or slap down a $50-ish XC2C512 with 270 <S> I/ <S> O <S> and it's all over but the programming. <A> This is a solution if all you are looking for is low-speed output-only: 74HC595. <S> http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf <S> I once used this chip for animating a lot of LEDs. <S> You can connect a chain of these chips together, so that the output of a Q7S goes to it's neighbor's DS. <S> Then, take an SPI output of your main micro and connect it to the chain. <S> The micro's SPI-MOSI should connect to the free DS chip and then SPI-CLK should connect, in parallel, to all of the SHCP pins. <S> Then, use a free I/ <S> O to pulse all of the STCP pins. <S> Your transmission should look like this: Transmit 8 bytes on SPI. <S> Pulse STCP <S> Once you pulse the STCP line, all of the outputs will change. <A> The MCP23S17 has 16 I/ <S> O pins and uses SPI. <S> Throw in a 4:16 demux for the select and you get 256 I <S> /Os. <A> Both MCP23017 and 23S17 have addresses <S> so 8 23017's on I2C and <S> 8 23S17's sharing one SPI bus.
There are inexpensive CPLDs available with lots of I/O pins.
CAN bus simulation (automotive purpose) - tried Arduino and SparkFun I repair electric powered steering systems for cars, especially Fiat, Alfa, and Lancya (Delphi manufacturers), and I'm in need of making some tool to test these reparations. I mean just turning it on, for example. I have researched during some time, and I figured I need CAN bus signals to be simulated as the eps ECU is receiving ignition packets from CAN. Here I go... I need to know what way I could read and send CAN packets from/to the bus. I mean, what tool or anything else. I have been trying with Arduino Uno + a SparkFun CAN BUS Shield , but I don't get any results. When everything is connected, my serial console isn't sniffing any packets. I have connected all correctly, I think, and tried different bit rates, changed Arduino boards and shield, tried many different examples. I invested lots of hours with no profit... I was using SEAT Ibiza 2010 for I+D, connected CAN-H and CAN-L on the OBD port, in the CAN lines from the radio, etc... Any idea of what could be wrong is welcome, as is a new method to make my project... Information: Libraries Used UPDATE 2 (28/12/2014): I used a multimeter because I dont have a oscilloscope. Reading the voltages are always giving me plain 2.5V on CAN-H and CAN-L, I get this readings at Arduino CAN-H CAN-L and in OBD2 Port (Pins 6 and 14) UPDATE 3 (29/12/2014): I'm planning to switch to some programming language with a CAN interface, any suggestions are welcome, thanks! UPDATE 3.1 (30/12/2014): Definitely, I'm taking another way to do this, I'm waiting Kvaser and ECOM to reply me in their support emails. That way we may know if their tools fit with my project. I will keep you updated, thanks for all the help guys! :) <Q> The Arduino CAN shield is pretty cool if you want to build an embedded computer to play with CAN. <S> However, if I understand correctly, you are building a one-off tool for your personal use (or will merely use an off-the-shelf tool if one exists for the right price). <S> For that reason, I urge you to consider writing PC software rather than embedded software to interface with existing, low-cost CAN hardware interfaces. <S> Charlie Miller and Chris Valasek used this so called ECOM tool and wrote software which interfaces with it. <S> The ECOM tool appears to have an API and example driver. <S> Their car hacking white paper and software will give a pretty good starting point for interfacing a PC to a car. <S> Softing also makes PC CAN interface hardware, but I am having trouble accessing their website right now, so I won't link it. <A> If you're open to buying something off the shelf for a few hundred dollars, Kvaser's Leaf products are pretty easy to use. <S> They let you send pre-recorded sequences of packets and monitor the bus. <S> You can get one with an OBD-2 connector if that's what you need. <S> Building your own test equipment is fine for a personal project, but if you're making money off of these repairs, it's probably better to start with something you know is reliable. <A> Having managed to eventually get numbers from a CAN bus with an embedded controller, I believe the biggest problem you're experiencing are the vendors' examples not properly initializing the controller's registers for CAN quanta and sample timing. <S> Curbing the popular CAN shields' efforts is the 16 MHz crystal SparkFun and Seeeed use. <S> Then the low-speed Arduino isn't well suited for moving serial data. <S> None of the sample code on the Internet works because they are all canned examples for 1 Mbit/s... <S> Some microcontrollers have CAN controllers built-in (sadly, almost none have transceivers). <S> I used a ChipKIT Max32 and a MCP2551 <S> IC via breadboard in the circuit below. <S> Additionally, I tapped into the transceivers on the SparkFun and Seeed's CAN shields to get Tx/Rx data. <S> The ChipKIT's Max32 has two CAN controllers and an 80 MHz CPU clock, so <S> it is well suited for CAN experimentation. <S> Using an online calculator, I was able to set up the PIC32's controller on the first try. <S> I suspended my development on CAN work for other projects, but an affiliate has coaxed an Arduino Uno with CAN shields into reading from a 500 kbit/s bus. <S> I looked at the code he recently shared with me, but I couldn't find how the MCP2515 controller's timing was set or how it differed from the example code. <S> The next development board I'm trying is Ti's Connected LaunchPad TM4C123GXL. <S> It has CAN controllers, USB OTG, lots of I <S> /O and is US$13.
Vector's CANoe is a well known (and expensive) tool for that purpose. There are also several full-fledged, commercial software tools for analyzing and simulating CAN on a PC as well.
ICSP or Pre-Programmed Microcontroller I've designed a PCB for small scale production; currently I'm hand soldering them in batches of 20 at a time. This PCB uses an ATMEGA168 microcontroller which I program before soldering to the board - this method works well for me at the moment. I'm looking at having a batch of 200 boards manufactured and assembled for me as the product I've designed seems to be quite popular. Would it be better practice to either include an ICSP header onto the board or keep on pre-programming the ICs myself? Re-programming of the board after manufacture or assembly isn't an intended or required feature. I'm unsure of how this is done in a larger scale production environment? Adding an ICSP header would increase the cost of manufacture slightly so is pre-programming a standard practice? <Q> If you have the space for a header, that's probably the best option, and the slightly staggered pins Majenko recommends is a good way to hold a connector in place without adding complexity. <S> But here's an alternative approach, for boards where you don't have space to fit a header, or the standard header doesn't accomplish all your programming/setup/board test tasks. <S> Given a small form factor PCB as here (33mm diameter) <S> you can lay it out with test points (labelled on the back) and create a test fixture for it (using Pogo Pins ) <S> This requires some machining ability and at least a pillar drill (because the pogo pins must be exactly vertical). <S> However if you're willing to risk a prototype PCB you can clamp it to a sheet of material and "spot" through the testpoint holes to get the pogo pins in exactly the right place. <S> (I get 10 PCBs for a ridiculously low price from Itead, so losing one is no big deal). <S> With a lathe and mill, making the pillars and clamps to locate the PCB in exactly the right place is a doddle, <S> but it's not too difficult with simpler tools. <S> Then you simply fit each PCB, program and test it. <S> The loose connector normally goes to header pins on a TI Launchpad, used for programming this MPU (TI MSP430) via the SBW interface, but the same principle would apply to JTAG or other interfaces. <S> (The brown cable at the top is a co-ax cable carrying a calibration signal to a frequency counter). <S> The polished mahogany base is optional; I just happen to prefer a steampunk style for my test fixtures. <A> If you get to larger quantities you can consider pads for pogo pins (you'd have to make a fixture to hold the PCB in alignment) or, in your quantities, you could use one of the Tag Connect cables which require only holes and unpopulated pads (they snap onto the board). <S> As well as allowing you to recover from a need for a programming update, this will allow you to have an assembly house populate the boards before programming, which could improve logistics. <S> Pre-programming is certainly an option, even in production quantities (you can even have the distributor do it for you), but it seems to be mostly used in the most simple of applications. <S> Usually chips on boards are programmed (or capable of being programmed) post-assembly. <A> I always add space for an ICSP header, even if it's not populated. <S> I have three ways of doing it at the moment depending on situation. <S> One of my designs has a very fine pitch header for which I have built an adapter (0.6mm solid core wire is perfect for it): <S> I use this connector when space is at an absolute premium. <S> (Sorry it's blurred, my phone's camera is naff). <S> The second arrangement I often use is to incorporate the ICSP into another header. <S> If the ICSP pins can also be used as GPIO pins, and you can use them with a detachable connection, then it is simple enough to include any other ICSP connections you may need (MCLR, for instance) at minimal cost. <S> Then you just plug your programmer into that header with an adapter that should be simple enough to make. <S> The third way is to provide a "staggered" or "offset" header footprint for ICSP. <S> I use this mainly on development boards where the end user may want to do ICSP but doesn't want to ruin their board by soldering a header in permanently. <S> This footprint allows a standard header to push-fit and make good solid contact without any solder: <S> When you start dealing with much larger quantities it can certainly be more cost-effective to get the chip manufacturer <S> to pre-program the chips for you with your firmware. <S> I think all the major manufacturers provide that facility. <A> If a firmware problem is discovered after manufacturing a large batch of boards, building a fixture which can reprogram those boards may be much cheaper than having to rework or rebuild them. <S> In some cases, a good approach may be to select a board's I/ <S> O layout so that the controller pins needed for in-circuit reprogramming are given to purposes which "naturally" result in them being exposed to easily-accessed contact points. <S> For example, a board which is designed for use with metal-dome contacts might have the contacts themselves wired to the in-circuit programming pins. <S> Such a design wouldn't require dedicating any space in the layout for a programming connector, but--especially if the battery contact were also generally sized, allow a programming connector to get by with simple spring-loaded contacts. <S> Note that it doesn't necessarily matter if the code seems to be well-tested <S> ; changes from one batch of chips to the next can still cause unexpected problems. <S> For example, I designed a product that was supposed to switch itself off under processor control by having the processor output "high" on a pin when it was supposed to be "on". <S> On the first batch of 10,000 units everything worked fine, but on a later batch the processor would start malfunctioning when its voltage hit about 2 volts, and could switch that pin back to "high"; the 2-volt "high" output was barely enough to turn the unit back on. <S> Since the processor was specified to remain in sleep mode down to IIRC 1.6 volts, it was possible to correct the problem by reprogramming the units so that they would enter sleep mode when activating their shutdown state. <S> Had such reprogramming not have been possible, much more expensive rework (or else scrapping and rebuilding) would have been required.
I would suggest always including a header in that kind of quantity (small). If one is using a processor which can be reprogrammed in circuit, I would highly recommend that boards be designed in such a way as to allow its use, even if actually using the feature would require making building a fixture for that specific purpose and one doesn't plan on having to build one.
Triggering a 12 v relay with an arduino I am trying to trigger a 12 V relay with an arduino input. All I am doing in the Arduino sketch is to make pin 13 go high and low every 1 sec (1000 ms). The relay refuses to get triggered. Can someone please tell me what am I doing wrong? Struggling with this for way too long. <Q> I assume you're actually trying to drive it with an Arduino output- <S> an input won't drive anything. <S> A lot of power 12V relays need around 100mA (or more) coil current. <S> That means your base current should not be much less than about 5mA to guarantee the transistor is well saturated. <S> If you have a 5V Arduino it might drive to 4.5V at higher current, the transistor base needs 0.7V <S> so that's about 270uA (a lot worse if the micro is 3.3V), so it will only drive about a 5mA relay safely. <S> From the transistor datasheet : Reduce the 14K resistor to something more like (4.5V - <S> 0.7V)/0.005 = 750\$\Omega\$ <S> and you'll be able to drive a 100mA relay safely (assuming a 5V micro). <A> Most likely the transistor can't sink enough current to turn on the relay. <S> Look up how much current the relay needs with 12 V applied. <S> Divide that by the minimum guaranteed gain of the transistor. <S> That tells you how much base current you need. <S> If that is more than your digital output can source, then you need more amplification in there somewhere. <S> If the digital output can source the minimum required base current, then size the base resistor accordingly. <S> Figure 700 mV B-E drop in the transistor. <S> If the digital output drives to 5 V when high, then that leaves 4.3 V across the base resistor. <S> (4.3 V)/(14 kΩ) <S> = <S> 300 <S> µA. <S> If the transistor gain is 50, for example, then that can only support 15 mA of relay current. <S> Most likely your digital output can source at least 5-10 <S> mA. <S> A few mA base current should be possible, which should be able to support the coil current of a modest relay. <A> Adding to what other people said in their answers. <S> The maximum collector current for a BC548 is 100mA, so (to be really on the safe side, even when its temperature rises), I wouldn't want to have it switch a current above, say, <S> 50mA. <S> If your relay needs more than 50mA of current, you should choose a BJT with a greater maximum collector current rating. <S> To check your relay current absorption connect the relay directly across a power supply (12V) and measure the current it draws from it.
You must ensure that the current needed to power the coil of your relay doesn't exceed BC548's maximum current rating (with a suitable safety margin).
How is U1 powered in this schematic This is taken from an app-note on the ONSemi NCP1014 . Pin 1 of the NCP1014 is Vcc, and I don't understand how it is powered in this configuration. The datasheet linked above mentioned a dynamic self supply powered by charging a cap on Vcc but I'm really not sure how that works given the polarity of D5. Is current drawn through C4/5 here, charging those and C7 on the Vcc, then C7 discharged to power the device? The App note also mentioned that D6 is only there for a fail condition and when activated would blow F1. <Q> The natural ripple superimposed on the VCC participates to the frequency jittering. <S> For improved standby performance, an auxiliary VCC can be connected to Pin 1. <S> The VCC also includes an active shunt which serves as an opto fail−safe protection. <S> So it doesn't need a separate supply to that pin - it gets the supply internally and the capacitor is used to stabilize it. <S> But where does it come from? <S> Well, the internal block diagram in the same datasheet shows that quite plainly: <S> Yes, it gets it from the drain of the internal switching MOSFET, which is presented on pin 3 of the SOT-223 packaged device. <A> The datasheet- figure 2 and especially the below description from your linked datasheet are pretty self-explanatory.. <S> ask if there is anything that is not clear. <S> When the MOSFET is off the current source shown in the above diagram charges C7 through the output caps until it reaches the proper voltage. <S> This does mean that a small load is required or the output voltage could go high out of regulation and either that load or D6 can perform that function. <A> What you're missing is that the negative rail of the input is still about 55 to 240V lower than the negative rail of the output, so even though the chip isn't being supplied a normal positive supply rail it is still able to extract enough energy from the circuit for its operation.
From the datasheet you linked to: Vcc: This pin is connected to an external capacitor of typically 10 mF.
Hacking laptop power button: Turn on laptop when AC's back I'm using one of my old laptops as a server. I'm running the laptop without battery in case of a need for a hard reset. When I need a hard reset, I want to be able make this happen with a toggle of AC power. The problem is, when AC power lost and come back, the laptop can not be powered on automatically. Unlike desktop computers' BIOS, most laptop's BIOS including mine does not have such power settings and no "wake on lan" option. So I decided to hack the power button. If I touch a 1 uF capacitor by parallel, laptop powers on. This is good. If I solder this capacitor in the same place, the laptop is not getting up when AC power come back. Why would it happen? Edit The laptop expects power button released in the firs place, and then pressed for a short time. What I did causes "pressing button as soon as the AC power comes" effect. That was why battery led is flashing when I solder the capacitor to the pins of the power switch. Edit2 Answer is added: https://electronics.stackexchange.com/a/145588/20285 <Q> As I understand that the problem is holding power switch "pressed" as the power comes, the laptop thinks there is a problem. <S> So I made a circuit that waits for a short time, "presses" power button, releases it when computer is turned on. <S> This circuit is tested and working: http://youtu.be/eg2waRuW1ME <A> Probably because the capacitor is discharged when you attach it, but from then on it's charged up. <S> It sounds like the button is an active-low connection - connects a signal wire to ground when you press the button. <S> You will need to identify which wire is which (a simple multimeter on continuity test should allow you to find the ground pin) and then arrange a circuit that will connect the signal wire to ground when you need to. <S> The simplest arrangement would be an NPN transistor: simulate this circuit – <S> Schematic created using CircuitLab <S> A more rugged circuit that doesn't care which pin of the switch is which, is to add a small (reed) relay to do the switching: simulate this circuit <S> This also has the advantage that the control system is completely separate from the laptop system ( galvanically isolated ).You <S> would need to generate the control signal at the right time though. <S> A small microcontroller would be the simplest circuit (maybe something like an Arduno Micro, or an ATTiny board), although any circuit that creates a single pulse when it gets power (preferably after a short delay) would work. <S> I'm sure something using the 555 timer could be crafted. <S> For instance, using an Arduino board, the code to drive it would be as simple as: void setup() { pinMode(3, OUTPUT); digitalWrite(3, LOW); delay(1000); // <S> Initial 1 second delay digitalWrite(3, HIGH); // <S> Press the button delay(100); // <S> Small delay of 0.1s digitalWrite(3, LOW); // <S> Release the button}void loop() { <S> // <S> We don't need to do anything else.} <S> That would fit into any small ATTiny chip without a problem - really really simple to do. <S> Power on <S> , a 1 second delay, the output pin 3 gets a 0.1s pulse, then nothing else until the next time it all powers on. <A> When you momentarily touch the capacitor across the switch it takes a while to charge the capacitor and this can create a voltage pulse to the switch inputs that is long enough to trigger the wake up circuit. <S> On the other hand when the capacitor remains connected it gets charged up by the bias voltage applied to the power button circuit. <S> So when the AC voltage disappears for a short time the capacitor may be staying charged and not creating the necessary pulse to trigger the wakeup. <S> It is also possible that when AC voltage is applied after being down for a longer period of time that the capacitor charges in a way to not create the necessary voltage pulse to trigger the wake sequence. <S> Here is what I suggest that you try: Make the capacitor value much larger and wire it right across the power switch contacts. <S> Most likely one side of the power switch is connected to the laptop GND. <S> If the capacitor ends up having to be an electrolytic type make sure to put <S> it's negative lead toward the GND side of the power button. <S> Then also add a Shottky type diode (i.e. BAT54 type) from the positive lead of the capacitor (anode side of diode) that can discharge the capacitor when the AC power goes down. <S> For this to work you will need to find a DC voltage plane inside the laptop that goes to GND when the AC power is lost. <S> The cathode of the diode would connect to that voltage plane. <S> To be safest take a voltmeter and take a reading of the voltage across the power button. <S> This may be +5V or +3.3V. <S> The safest this is to find a matching DC voltage plane and connect the diode to that.
The laptop power button circuit is capable of operating with a pulse type signal.
Detecting transient voltages in a wall wart Background I have now three smartphones (SGS3 [neo], max 77686 or so) lying around, all more or less dead due to a broken voltage regulator. Since I am not a fan of coincidences, I suspect a broken wall wart somewhere around in my apartment, but I not only have too many to just throw them all away, I also currently don't have a scope to measure things. Required Idea Since I am suspecting transient too-high voltages that destroyed the S3s regulator, I want to build a simple circuit that can detect those. For normal DC (or rather low frequency AC) I can come up with some ideas (monoflop, comparators, zener etc.) that can be the base of a circuit, but I have no idea about how fast the transient can be. Since those are all smpss, I think their working frequency is at most 200kHz so the voltages to detect should probably be in that timing area. I don't have much experience in what circuits would be a good idea to detect the voltages that I am searching for fast enough. So what would be a good design idea for a circuit that detects, lets say anything above 5.5V that lasts at least 5µs (or if you have experiences with mentioned voltage regulators smaller times when they are likely to damage the regulator circuit)? Although it is sylvester soon and everyone appreciates some blowing up tantalum capacitors due to overvoltage, I would prefer something reusable with not too much components, that is also nothing that requires a microcontroller or similar. <Q> If I were going to build a detector device such as you propose I would spend some time to make it really useful. <S> As such I think you should consider the following list of features. <S> Have a fast voltage spike detector that detects spikes in the > 6 volt range. <S> Have a fast voltage spike detector that detects spikes that go negative more than -1V. Equip the circuit as a pass through device - charger input - USB cable output to device. <S> Provide an LED that lights when there is either a positive or negative spike detected. <S> Additional nice features if you could see fit to equip the device with an MCU. <S> Monitor <S> the charging current through a current shunt and switch off for short or overload current conditions. <S> Monitor voltage to make sure that it stays nicely within a range of 4.75 to 5.25V. <S> Add a small LCD display to show unit status such as voltage, current, spike detect count and a charge time counter. <A> Are you preferring digital or analog? <S> If analog then you need a peak detector and a latch -one PNP and one NPN transistors. <S> If digital - then two resistors, a transistor and an Arduino-like device. <A> Quick and dirty way: add a 4700uF (or bigger, the bigger the better actually, as long as it is rated at higher than 5V and can hold off transient spikes) cap and 1K bleeder resistor between the power rails and the cap will smooth out those spikes. <S> And if that cap blows, you have too much a spike.
Provide an output clamp circuit that clips any spikes on the output to voltages 5.6V. Provide a negative clamp circuit that clips any negative spikes on the output to -0.6V or less.
How to know if the generator is dissipating or generating power? How do I determine whether current/voltage generator is generating or dissipating power. For voltage supply I'm quite sure it depends on current direction, if they are the same, then it's generating. Is it same for current generator, higher voltage on + , it's generating, else dissipating? Edit: DC circuit. <Q> Desperado, you actually asked when a voltage/current source is a source and when - a load. <S> You are right about the voltage source - it becomes a load when the current enters (instead to exit) the positive terminal. <S> This will happen if we connect to it (through a resistor) <S> another voltage source with higher opposite voltage (" <S> +" to "+", and "-" to "-"). <S> It seems, as you noted, that in the case of the current source it is the same... <S> but I think it is not... <S> Usually, a current source consists of a voltage source and a resistor in series. <S> So it will act as a current source (will pass a current in the same direction) even when we connect a voltage source with opposite polarity... <S> if only it is lower than its internal (excitating) voltage. <S> From another viewpoint, a current source (and a real voltage source with some internal resistance) always dissipates power in its internal resistor... <A> Edit: <S> Right... I thought that you really had a generator/load kind of situation.. <S> generator as in fill with gasoline, pull the handle, listen to the roar of the engine kind of thing... <S> Very simple. <S> You need to measure the Real Power of the generator/load. <S> Some theoretic background: There are three power quantities: Real Power , Reactive Power and Apparent Power . <S> Just so that you know they can be measured and calculated for example like this: Real Power is measured by multiplying instantaneous voltage and current samples and calculating RMS. <S> Apparent Power is measured by multiplying the average RMS voltage with average RMS current. <S> Reactive Power can be calculated mathematically from the Real Power and Apparent Power, and the sign (whether it's Inductive or Capacitive) is determined from whether the voltage is leading or lagging the current. <S> In your case you just need the Real Power, so it's very simple. <S> Also measure the voltage. <S> So that you don't need to worry about the sampling theorem, sample them at a relatively high sample rate, 1 KHz or more. <S> For accurate results, you either need samples from an exact integer number of waves (60Hz or 50Hz) or a long(ish) period of time. <S> If you know what windowing means, use a Hann Window. <S> If not, then just don't worry about windowing. <S> Multiply the instantaneous current samples with same-time voltage samples. <S> Then calculate RMS. <S> The result is the Real Power, in Watts if your sampling period is one second. <S> If it's positive then the circuit is using power. <S> If it's negative then the circuit is generating power. <S> If the unit is three phase, no problem, just measure the phases separately and add the final RMS values of the three phases together. <S> Be careful with the polarity of the current transformers : changing the polarity will change the sign of the result. <S> Experiment with a known resistive load (electric heater element etc) to verify that you get the correct amount of watts from your measurement circuit. <S> If you don't need the information so accurately, you can just measure the current x voltage pairs, and keep a running average to know if it's positive or negative. <S> There are also power meter (KWh-meter) ICs available which may simplify the task. <A> In standard circuit analysis, the convention is that for any device, if the current flow from the terminal with relatively positive voltage internally to its negative terminal, then it is absorbing power. <S> This is true for any type of device, voltage source, current source, resistor, capacitor or any arbitrary circuit. <S> For a current source, it is an idealized device, we can't say whether the absorbed power is dissipated, stored or extracted. <S> For a real device like a resistor, the power is dissipated. <S> For a capacitor, the power is stored...
Measure the current in the wire from/to the generator using a current transformer.
Can you use your computer to make a radio transmitter? I was wondering, is it possible to oscillate the electronic signal emitted from the audio jack on a computer ? Because I would like to somehow create a simple radio transmitter just using my computer. <Q> The audio output doesn't operate at high enough frequencies to generate radio signals. <S> But the VGA output does. <S> My favourite example is Fabrice Bellard (author of FFmpeg) making a DVB-T transmitter from a VGA card: http://bellard.org/dvbt/ <S> Depending on what you want to achieve, you might get some results if you make an induction loop , such as the ones used in hearing aids, and connect that to your PC's audio output. <S> There's also an AM transmitter example using VGA output: http://www.erikyyy.de/tempest/ <A> You can use the CPU clock frequency as carrier, modulated by your PC sound card output. <S> Try by yourself to make a simple modulator with a resistor, or a more advance design using a diode, or an extreme modulator circuit using a single transistor, depends of your desired modulation type (CW,AM,FM,SSB,PSK...) <S> Last, don't forget how to feed of your antenna. <A> Sound cards usually don't have a wide enough bandwidth to allow RF signal out, but you can modulate the audio from your sound card to some other RF source from your computer. <S> The motherboard usually have several known RF clock sources: several bus clocks and the RTC clock, and maybe the UART clock is right in the SW band. <S> You can try tap off one of those crystals and use that as the carrier of your audio broadcasting. <S> Anyway it is always easier to roll your own radio modulator from several transistors and a crystal of your own than tapping off your motherboard.
If you take direct control of the VGA hardware, or modulate the pixel data at correct intervals, you can generate RF signals.
Type "X2" line filtering capacitor failing as short circuit I recently plugged in an old Apple IIGS that had been sitting in a basement for almost 15 years and it worked for awhile before blowing up in a smokey mess. The reason for the smoke was easy to diagnose, one of the line filtering film capacitors had exploded and shattered. The fuse was also blown in the process (so I'm assuming the capacitor managed to somehow blow in a short-circuit fashion). Although it is straightforward for me to buy replacement parts and repair the device, is there a particular reason why a film capacitor would fail in such a spectacular fashion? My understanding is that typical film capacitor failure modes involve a gradual reduction in capacitance, rather than a sudden internal short circuit. Does a capacitor failure in this fashion typically indicate another component has also failed down the circuit? Unfortunately, I do not have schematics for the power supply, but my understanding is that "Type X2" capacitors are "across the line" -- between line and neutral. The exploded (and also the intact capacitor on the other side of the transformer) read: 0.22uF X2 and have a 250V rating. <Q> Going by the colour of the capacitors, they look like Rifa PME 271M types. <S> If that is the case, they are well-known in vintage computer circles. <S> The BBC Micro PSU was fitted with them (made 1981 or so) and they fail with a lot of smoke but no fire. <S> The smell is characteristic, a sort of wood-smoke, bonfire smoke smell. <S> The standard fix for the BBC Micro (and similar Acorn PSUs) is to replace them all with modern X-class equivalents. <S> In this forum post: <S> http://www.vintage-radio.net/forum/showthread.php?t=69128 <S> Rifa capacitors that have not yet failed usually have many tiny hairline cracks in the epoxy outer shell. <S> Do an image search for "Rifa PME271M" to see more examples of failed capacitors. <A> X and Y type capacitors are specified to fail open, withstand gross overload and self-heal the microscopic defects they accrue over time (this is done to ensure they are safe for direct connection to line voltage without any protection mechanisms - MOVs, PTCs, fuses - in front of them). <S> In 99.999% of cases this means you should never experience what you saw. <S> They are designed specifically against failing short. <S> X capacitors are different from Y ones; X capacitors are connected between line and neutral whereas Y caps are connected from L/N to ground. <S> Obviously, Y capacitors are even more stringently specified against shorts, as this could cause a dangerous situation. <S> That being said, the odd one out might fail short like this. <S> It is certainly a freak accident, quite possibly because of the age of the machine. <S> X capacitors failing short shouldn't cause too many problems in a sound electrical installation. <S> The X and Y capacitors are directly connected to line voltage, i.e. there should not be any components in series with them that can increase stresses to the point where they are likely to fail faster when another component has failed. <A> Ditto what Bob said: X type capacitors are designed to fail short and blow a fuse. <S> When a Class-X capacitor, also referred to as an "across the line <S> capacitor"—the capacitor placed between line and neutral—fails because of an overvoltage event, it is likely to fail short. <S> This failure, in turn, would cause an overcurrent protective device, like a fuse or circuit breaker, to open. <S> Therefore, a capacitor failing in this fashion would not cause any electrical shock hazards. <S> If a Class-Y capacitor, also known as the "line to ground capacitor" or "the line bypass capacitor"—the capacitor placed between line and ground—fails short, this could lead to a fatal electric shock due to the loss of the ground connection. <S> Class-Y safety capacitors are designed to fail open. <S> A failure will cause your electronic device to be subjected to the noise and interference that the capacitor would normally filter out, but at least there will be no fatal electric shock hazard. <S> Source: https://www.allaboutcircuits.com/technical-articles/safety-capacitor-class-x-and-class-y-capacitors/
Y type capacitors are designed to fail open soas not to cause a dangerous shock if case ground becomes disconnected from electrical ground. There's some failure analysis, which suggests a mismatch between the capacitor itself and the epoxy coating. Also, failure of the X capacitor probably doesn't indicate failure of any other components down the line; blue smoke isn't contagious by itself.
Does "Connected" mean solder together? Looking here , I am shown that the connecting symbol, means the wires are, literally "connected" as shown below. I am currently working on trying to decipher an FM Radio schematic, but am having trouble with this "connected" thing... On the above schematic, I am shown that almost everywhere on the board, there are connecting wires. Is this exactly how it's meant to be soldered/constructed? Am I meant to grab 3 wires, and just drop a blob of solder on them so that they are all connected? <Q> It might be easier if you understand that schematics are simply a symbolic representation of the circuit, the components do not need to be placed in that particular physical layout to work, i.e. R2 doesn't have to be vertical and R3 doesn't have to be horizontal (though it is often easy to think of it as a close approximation to the layout). <S> It could also mean they belong to the same "node" on a breadboard, in which case there is no solder. <S> So for example with TR2, the collector at some point in following the path (it could be wires, leads of components, traces on PCB, etc.) <S> of the collector, it must be connected to one end of each C4, R3, and R4. <S> The base must be connected to the other end of R3 and one end of C3 and the emitter is connected to ground. <A> The schematic shows how components should be electrically connected. <S> It does not show how the connections should be made when the circuit is actually constructed (although sometimes special requirements may be pointed out). <S> Construction requirements, that is the layout of the components and the wiring, are dependent on the type of circuit. <S> For low frequency and low power circuits, the wiring can be fairly sloppy because parasitic capacitances and voltage drops in the wiring are not critical. <S> As the frequency and the power levels go up, wiring becomes more critical. <S> Often a circuit description will be accompanied by construction notes. <S> If not, you will have to use judgement and experience to determine how the circuit should be constructed in order to work properly. <S> I suggest looking at actual equipments to see how the layout and wiring are done compared to the frequency and power levels involved. <A> Connected means electrically connected; that usually means soldered together, but not necessarily so. <S> Applying mechanical pressure on two conductors will make them connected, and that's the principle used for most connectors. <S> You can simply solder the components together as you mentioned, but you'll find that, except for the simplest circuits, to be extremely difficult; it's hard to keep them in place when the only thing that's mechanically supporting them is also the solder that connects them electrically, not to mention unwanted connections when two wires accidentaly cross. <S> For development/testing/prototyping, use a breadboard . <S> When the circuit is working correctly, transfer it to a PCB . <A> A "schematic" shows the logical connection between devices, not the physical connection. <S> You can use any construction that provides equivalent connectivity. <S> Usually there will be a separate layout diagram that shows how it should be constructed, such as on a PCB. <S> Solderless breadboards are popular but have problems at radio frequencies. <S> Radio circuits can be built with the "deadbug on copper clad" technique <S> ( http://blog.eepro.to/2013/01/example-circuit-boards.html ) <S> Look at <S> The large copper ground plane connects all the components soldered to it together. <S> That would correspond to the bottom line of your circuit diagram. <S> The circuit is made among the components soldered together in mid air, not touching the copper board. <S> An "island" has been cut (marked "output") that is also not connected to the copper ground plane. <A> QUICK ANSWER " <S> NO" <S> The others here are good and not wrong, but in short. <S> Connected DOES NOT mean "solder together", connected means "a path exists between the two", you could use a wire, any conducting material. <S> For example "my hard disk is connected to my computer" - it's not physically soldered to it <S> but there is a connection <S> Less far-fetched example "connect the power LED to the motherboard" - no soldering at all, and infact there are a pair of wires between the LED and motherboard. <S> As you get to higher-frequencies or higher power wires behave less like these "perfect vesseles of current transmission" and start to act as resisters and tiny capacitors, then a wire doesn't "connect" as such because it adds resistance based on it's length, but for your low power low frequency stuff wires are magical current transmission devices that do not distort or absorb or anything.
As for "connected", it could mean they are soldered together, either through wires, the leads of the components if using through hole, or are both connected to the same trace of a PCB at some point.
How to solder with one hand? I am a beginner at electronics. I don't have many tools and stuff, so I am forced to solder by hand. I don't have a pcb to solder on, so I usually just solder the wires together, but it's really difficult without a holder. Is there an easier way to do this? If not, is there a substitute for a wire holder? Any help would be appreciated. <Q> Something like this may help. <S> Just google "solder helping hand" <A> If you really need 3 hands to solder, you're doing it wrong. <S> The need to hold the components or wires together while soldering means that you're using the solder both for mechanical AND electrical connection, and this is a very bad habit to get into. <S> There's an old saying that the difference between military and hobbyist soldering is that the military assumes that solder has zero strength, while hobbyists assume it has infinite strength. <S> Lean to the military. <S> If you're connecting 2 components, wrap one lead around the other, then solder. <S> And PkP has a good idea about using a couple of books. <A> First put some solder to each wire end. <S> And after that, just heat the wire ends together with the soldering iron. <S> That way you don't need to hold both wires and the soldering tin. <A> You could use different splicing techniques to keep the wires together while you solder them together. <S> Below are images of two different techniques: <A> Solder wire is reasonably stiff. <S> Pull out several inches of solder wire from the roll, set the roll on its side, then bend the solder wire up into a hook shape. <S> You can then use one hand to hold the wires up against the solder and another to hold the iron. <A> Tape... <S> Just tape the wires to your bench, and bend them up a little. <S> If they roll you can tape them some more or use something heavy to keep it in place. <S> Use pliers with a rubber band around the handles to make pliers that will hold your wire or wires hands free. <S> Use vise grips if you have them. <S> If you don't want to twist them together first, I usually just put some solder on one wire and touch it and the iron to the other wire that's taped down. <S> You can also melt some solder onto your tip and use that to make the connection. <S> When you touch the iron to the wire solder combo surface tension will suck the solder wire up to your iron and your wires. <S> Just some ideas. <A> First I assume you do have two hands. <S> Are you building an air wired type circuit? <S> (A rat's nest of wires and components.) <S> So first you can try twisting bits together to hold them mechanically while you solder them. <S> If that doesn't work, then I tin both pieces. <S> Get a bit of extra solder on the iron. <S> Hold one piece onto where it needs to be and tack it in place with the iron. <S> But you need something as a base. <S> I tend to use a blank piece of copper clad. <S> Here's a pic <A> 1) First, make a diagram of how you want everything to fit together, then start by melting a small blob of solder onto a component lead where another component lead will cross it. <S> 2) Do the same thing on the lead that will cross then, using one hand, hold one component so the blobs are one on top of the other, then with the other hand (and a soldering iron) melt the blobs until they flow into each other, and then hold them together without moving them until the joint cools. <S> 3) Continue the process at each location where leads will cross until you're done. <S> After a while, some wires will cross automatically as you're soldering others down, so merely solder them together as you go along. <S> I like to work on a sheet of paper on a flat surface, and if I need to hold down the circuit while I'm working I'll just use the corner of a book or something to keep it from moving during those times. <S> When you're finished you should have an "air-wired" circuit, and it would be a good idea to touch up all the solder joints just to make sure they're solid. <S> Because of pressures you've applied during the first phase, when you go to touch up the work and re-melt some joints some wires may adjust themselves by springing around a little. <S> That's OK, just make sure that they're where you want them to be and stable when you re-solder <S> them and that the joint never moves while it's cooling. <S> If you have a longish run, like Vcc or GND, and it would look nasty if you only had the component leads to solder together, you could use a piece of tinned bus wire to keep everything tidy, as shown below, and eventually, you should wind up with something like this: <A> It is not clear why you are short of hands here. <S> For several tasks, it may help to split one hand into two: for holding solder or some part, ring finger and pinky can be sufficient, and you can use thumb against one or both of the remaining fingers as a separate "hand". <S> With some practice and/or dexterity, both of those half-hands can be trained to move independently (of course within the anatomic constraints). <S> For adding solder to some part held with the same hand, this can work reasonably well. <S> Splitting the hand holding the soldering iron tends to work worse and is more likely to lead to burns. <S> Maybe practice eating with chopsticks. <A> Put the two wire ends together and wrap them together. <S> Then you additionally wrap solder around them. <S> This will make things mechanically stable. <S> Next step is grab the soldering iron with one hand and the solder job with the other and solder it.
Now if you truly only had one hand to work with you could configure the wires to be touching using a method above and then bend the solder over and around the joint. How about stack some books on top of each other, and nudge one of the components or wires between two book corners.
Simplest possible 5V to +/- 10-15V converter (for op-amps) Im looking for simplest possible solution to power op-amps from USB or phone charger. Requirements: +5V input voltage ±10V to ±15V output voltage at least 10mA output current on both rails (+/-) very low cost low part count simple and accessible parts (no specialized ICs) low noise and ripple would be nice (small and cheap linear regulators at output allowed) Is this possible without a transformer, when I need no separation and I don't care about GND shift relatively to USB GND? <Q> Take a look at the LT1930 . <S> On page 8 of that datasheet is a 5V to <S> +/-15V <S> converter using a single inductor. <S> I've built one and it works quite well. <S> Not exactly "built from stuff already in my workshop", but you can buy the necessary bits and pieces for about $10 from Digikey and it uses about 1.5sqcm of PCB space. <A> If you want cheaper than that, you'll still end up spending $5.00 per chip anyways, and will have to buy a pair of separate DC-DC switching ICs plus external circuitry anyway. <S> This chip is specifically designed to convert +5VDC to ±12/15VDC, so it's an all-in-one solution, plus the external circuitry needed to run it. <S> As an added bonus, they come in SPDIP 16 pin packages, so if you're a hobbyist without your own CNC or toner-transfer/etching capabilities, you can test it out on a solderless breadboard. <S> Also, consider the Project Management Triangle: <S> Fast, good, cheap: Pick any two. <S> With respect to your requirements: <S> +5V input voltage <S> Requirements met <S> ±10V to ±15V output voltage <S> Requirements met at least 10mA output current on both rails (+/-) <S> Requirements met 100mA generated per rail in 15V mode, 125mA in 12V mode <S> very low cost <S> Requirements met For what you're getting and what the normal is, this is considered low cost, unless you want to manually design your own switching dual-output symmetric supply from discrete components low part count Requirements met One chip simple and accessible parts (no specialized ICs) Defined "specialized"; It's a common chip from a company that won't be going out of business any time soon low noise and riple would be nice (small and cheap linear regulators at output allowed) <S> Requirements met Good line regulation (0.05 %/%) and load regulation (1%) <A> (comments got a bit long!) <S> It is generally possible to create your own switch mode <S> boost converter with varying levels of functionality. <S> Any boost converter switches an inductor to ground with a FET to produce a higher voltage waveform. <S> This can be rectified and smoothed to produce the higher voltage. <S> All chip type boost converters take this output and feed it back <S> so they can adjust the PWM switching waveform to keep the output stable. <S> The following circuit is take from an Adafruit note and shows the concept: <S> It has no feedback so is only approximate. <S> However, with a small range of output currents, a linear regulator can take up the slack here. <S> The wave at the node is put through a capacitor. <S> The other side of the capacitor is diode clamped to ground, thus shifting the waveform negative. <S> This image, pulled somewhat randomly from google images, shows the idea: <S> In this case, this circuit is generating gnd to +Vcc transitions which are then inverted by the capacitor and two diodes. <S> The output is smoothed and then zener regulated. <S> The combined concept (ie: <S> the PWM input to the FET is "someone else's problem!) <S> might look like this <S> : For opamp use, it would be recommended to filter the switching waveform through a PI inductor filter before feeding it to the linear regulators. <S> Edit: I asked a question about this inversion tactic on stackexchange a short while ago which may also be relevant: Inverting charge pump with boost converter loading characteristics
Inversion can be done by utilising the higher voltage PWM waveform, present at the inductor-fet-diode node and feeding it to a capacitor-diode charge pump. The MAX743 chips ( datasheet ) will do the job, and are low cost, at about $13.00 per chip at the moment on Digikey . The adafruit note isn't concerned with absolute output stability, only a range of output voltages at a pretty static output current and input voltage.
Output capabilities of super capacitor I have come across a question that is very near and dear to my heart and I am in the hopes that somebody can answer this new years eve question of mine per se. So I am wondering, if I were to run two 2.7V 360F super capacitors in parallel and attach them to a 5V step-up regulator, could I supply 500mA @5V (or very close to 5V) for about 2 hours? I did some math from equations that I found online and I was wondering if the above question is plausible based off of the values stated above. <Q> The energy in a capacitor is $$ E = \frac{1}{2}CV^2 $$ <S> So at 2.7 V in two capacitors, you would have $$ E = 2\:\text{capacitors} \cdot <S> \frac{1}{2 <S> } \cdot 360\:\mathrm F <S> \cdot <S> (2.7\:\mathrm V)^2 = <S> 2624.4 \:\text{joules} $$ <S> The amount of energy you are taking per second is $ <S> $ 0.5\:\mathrm A \cdot <S> 5\:\mathrm <S> V = 2.5\:\mathrm{J/s} <S> $$ <S> So, in a perfect capacitor with a perfect power supply, you could run this for $$ \frac{2624.4\:\mathrm J}{2.5\:\mathrm{J/s}}= <S> 1049.76\:\mathrm s= 17.496 \:\text{minutes} $$ Note, that this is only with a perfect capacitor. <S> In addition, the regulator has an efficiency that will vary according to the input, likely going down in various ranges, and certainly not really going to 0 Volts. <S> This means you will have to have the amount of energy to maintain the minimum voltage, and add to it the amount you actually consume for the time you want. <S> To run a 5 V power supply with 90% efficiency at 0.5 A for 2 hours, or 7200 seconds requires a specific amount of energy to the input of the power supply: $$ 5 V \cdot 0.5 <S> A \cdot <S> 7200 <S> s <S> \cdot \frac{1}{0.90} = <S> 20000 J$$Note that the 90% efficiency effectively increases the amount of energy needed. <S> In addition, power supplies typically won't run down to 0 V. <S> So there must be extra energy to handle the amount that is never discharged. <S> We'll call the minimum voltage Vmin. <S> $$ E_{required} = <S> E_{@Vmax <S> } - E_{@Vmin <S> } = \frac{CV_{max}^2}{2} <S> - \frac{CV_{min}^2}{2}$$$$ E_{required} = <S> \frac{C}{2} <S> \cdot <S> (V_{max}^2 - V_{min}^2 )$$ <S> So for a Vmax = 2.7 V and a Vmin = 0.5V$$ 20000 <S> J = <S> \frac{C}{2} <S> \cdot (7.04 <S> V^2)$$$$ C = \frac {20000 <S> J \cdot 2}{7.04} = <S> 5681.8 F$$ <S> This could be one huge capacitor or many smaller adding up in parallel. <S> However , note that I haven't considered any losses due to series resistance. <S> That just adds on the total capacitance needed, but by using multiple parallel capacitors, you tend to reduce the effective resistance as you are putting them in parallel. <A> A supercapacitor does not sound like the right device for your application. <S> Most supercapacitors have a sizable internal resistance. <S> This internal resistance effectively appears in series with the capacitor, and it has the same consequences: <S> As current flows through this resistor (to flow through your load), voltage is dropped across the resistor (Ohm's law). <S> Thus, even if the capacitor is charged to 2.7V, if you pull 500mA from it, the terminal voltage will be less. <S> The energy lost in this internal resistance (according to one of Joule's laws: <S> \$P = I^2 R\$) wastes energy making your device less efficient, and heats the capacitor, potentially damaging it. <S> However, 500 mA is well within the capabilities of many batteries. <S> 500 mA for 2 hours is 1000 mAh (milliamp-hours). <S> For comparison, Energizer's datasheet gives the capacity for their ordinary AA alkaline battery at a discharge rate of 500 mA at around 1400 mAh. <S> Four of them in series would give you a nominal 6V and 140% of your required runtime. <S> That's just an ordinary alkaline -- there are many other chemistries that may be even better suited, depending on what your requirements for cost, size, longevity and so on are. <S> Moreover, batteries maintain a more constant voltage as they discharge compared to capacitors, so if you pick the right battery, you may not even need the boost converter. <A> Ok, this is what I have found from an initial google: $$ <S> Ah = \frac{(V_{MIN}+V_{MAX})/2 \times C}{3600}$$Given an acceptable voltage range for your boost converter of 2.5V to 2.7V ( <S> pure assumption here), that equates to (for one capacitor):$$Ah = \frac{(2.7 + 2.5)/2 <S> \times 360}{3600}$$$$Ah <S> = \frac{2.6 <S> \times <S> 360}{3600}$$$$= 0.26Ah$$So two in parallel would be 0.52Ah, or 520mAh. <S> That could theoretically provide 520mA for 1 hour at 2.5V to 2.7V. <S> So there's no way you can get 500mA at 5V for 2 hours. <S> For that you'd need 1000mAh at 5V, which pre-boost would be about double the current and half the voltage, so you'd be looking at 2000mAh at 2.7V. <S> For that you'd need 8 super capacitors of that type in parallel.
Supercaps tend to have a high series resistance that loses energy. You've not provided any link to any specific supercapacitor or datasheet, but 500mA is a lot of current for most supercapacitors.
Connector Problem. How to conveniently connect with cell-phone LiPo batteries Using a LiPo battery from sparkfun is easy as it comes with a molex connector on it. But how to conveniently connect to a LiPo battery taken from a cellphone? Soldering doesn't work on the exposed terminals of the battery. I've tried to tie up with sticky tape and thread and glue, but its very unstable/unusable, a slight vibration ruins the connection. Does anyone here know a better/convenient/stable way of connecting such battery to a circuit? INFO: I wish to use this battery to power up my breadboard circuits. <Q> The only way to connect those batteries properly is using spring loaded contacts, because you have to apply steady force to maintain low contact resistance. <S> There are manufacturers out there, who make such contacts like Kitagawa. <S> But to make it work instantly you can make a spring contact yourself. <S> For me it works properly. <S> My Phone's USB-connector is wrecked, so I have to load it this way: You may add something to align battery and contacts better. <S> A handfull of nails or screws will do fine. <A> What has worked very well for me is to buy a cheap universal cell phone battery charger, then gut it to use the case and connector. <S> They are very cheap on eBay, Amazon etc. <S> For example, below is a photo of one that costs $1.69 on eBay (including shipping). <S> Browsing the various commercial products also gives ideas if you wish to build your own. <S> Note: <S> Be careful if you decide to use the cheap CC/CV Li-ion chargers in such units. <S> I've seen some terminate the charge at too high voltage. <A> Adding to other answers: You can make spring loaded contacts using "pogo pins" - test pins made for bed of nails testing. <S> These have contacts which come in various styles including needle point and wider flat circular contacts and these push into a spring loaded base which can be soldered into a carrier of your choice (Vero board or PCB or ...). <S> Many examples of pogo pins in use with some good (and bad) DIY examples. <S> Wikipedia - pogo pin Probe and spring alternative <S> Rather nice (looking) low profile versions. <S> Source unknown (so far). <S> From here Typical DIY use]( http://www.makerdyne.com/blog/wp-content/uploads/2013/06/Pogo-[Pin_Breakout_Board_Tester_08.jpg ) Stack Exchange related Q&A with some good examples of pp styles & use For sale fom ADAFruit <S> Various styles with video related to that image. <S> Some very nice3 looking low profile examples from here . <S> Expect to pay as a factor of niceness^n. <A> There are a whole load of connectors for sale on AliExpress: http://www.aliexpress.com/cp/phone-battery-connectors-online-shopping.html <S> Otherwise I think a couple of protuberances made of solder on a small piece of stripboard might be held in place with an elastic band. <S> I might do this soon and take a picture to illustrate what I'm trying to convey ( <S> or I might forget about it altogether). <S> Edit: <S> I can shake it around pretty vigorously without the contacts breaking but if anything were to physically nudge the contacts then they might separate. <A> A much simpler version would be right angle headers on a pcb . <S> They used a female header as a back stop. <S> So these are friction fit.
Okay, the protuberances of solder didn't work but I made some contacts out of bent wire (e.g. from electronics component legs or sewing pins with the ends clipped off) which I soldered onto the stripboard and held on with an elastic band. Searching on "Universal Cell Phone Battery Charger" will find many different designs, most quite inexpensive. If you don't have right angle headers, you could bend some regular ones.
What's this symbol (- capacitor with wire through the middle?) I've occasionally come across this symbol which appears to be a capacitor with a wire through the middle - but I've never seen it on anything where I could physically get a look at what component it corresponded to, and I've never seen it defined in a list of component symbols. Have a look at the first schematic here and look at the earth rail - you'll see what I mean. It's always puzzled me - can anyone shed any light? <Q> They are common on RF devices where they allow wires to enter a shielded enclosure. <S> Looking at the picture from the link you gave here they are: <A> Those are known as "feed-through" capacitors. <S> They provide a way to get a wire into or out of a shielded enclosure - the capacitor gives some filtering to prevent unwanted signals from travelling along the wire. <S> You can see them where components/wires pass through the top and bottom sides of the small enclosure in the bottom view of the radio. <A> It looks like a feed through capacitor. <S> The chassis is grounded and the wire passes from one side to the other to form a connection. <A> I think this is "Adjustable Capacitor" or "Variable capacitor". <S> From the schematic it seem to control things like bandwidth. <S> In addition is is in parallel with other components <S> so I <S> this cannot be a wire through capacitor. <S> Check bottom of page: http://www.learnabout-electronics.org/ac_theory/capacitors01.php <A> "RF" means radio freqruency. <S> Example, when you're in your car trying to find a radio station, you rotate the dial to the radio station you would like to listen to. <S> In order to listen to that radio station, you have to turn dial to match the same frequency of the radio station. <S> With that being said, the capacitors with the line are variable capacitors. <S> The dial on a radio is a variable capacitor. <S> That is why dashed lines from the symbol are pointing to are dials. <S> The capacactance can be changed to obtain a certian frequency. <S> Look up Variable Capacitors.
If I'm looking at the correct symbol, that's a feed through capacitor .
Change Direction of 12v DC Motor Rotation using Relay I want to make a circuit to change 12 Volt DC Motor direction and move some thing between two points. Using Relay or some basic limit switches.Like this Image. I got a Circuit As i want... AUTOMATIC FORWARD-REVERSE A MOTOR The following circuit allows a motor (such as a train) to travel in the forward direction until it hits the "up limit" switch. This sends a pulse to the latching relay to reverse the motor (and ends the short pulse). The train travels to the "down limit" switch and reverses. If the motor can be used to click a switch or move a slide switch, the following circuit can be used: Please Help me to understand this circuit and how to wire these things. <Q> Something like this should work. <S> Note that the limit switches are different- <S> one is normally closed and the other is normally open. <S> If you have a relay with three form C contacts you can avoid using the diodes. simulate this circuit – Schematic created using CircuitLab <S> The two contacts are used to reverse the motor in the usual way, but one contactdoes double duty as a self-hold for the relay. <S> The diodes prevent SW2 from shortingout the supply when the relay is de-energized and the limit switch to engage the relay is activated. <S> You can put a bridge rectifier across the motor to absorb inductive spikes from the motor inductance. <A> Maybe something like that could work. <S> Switches are on the two ends and trigger the change of direction of the motor. <S> The relay should be of the 'latching' a.k.a. ' <S> bistable' type. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> ! <S> [reversing a dc motor][2] <S> This is a minimal reversing circuit for a dc motor. <S> It is missing a stop button, start,and interlocks, and it can all be added to it. <S> It doesn't start on <S> it's own, one limit switch has to be pushed. <S> The interlocks are important, because if the 2 relays are energized at the same time, it is a short circuit. <S> As drawn, the whole circuit is on a same voltage (relay coils would be same voltage as the motor). <S> The bottom part can be separated, and then the motor can be a different voltage than the relay coils. <S> Normally a circuit like this also uses additional overtravel limit switches, in case the two fail.
The circuit has a dc motor, 2 relays, and 2 limit switches.
Microcontroller shutting off because of brief loss of power, can a capacitor fix this? I have a microcontroller hooked up to a 5v supply which goes through a voltage regulator stepped down from 12v. I'm assuming that it's rebooting because it's possible that the voltage drops quickly for a small fraction of time, which is enough to cause the chip to reboot. Is this assumption correct? Could adding a capacitor to the circuit solve this issue? <Q> There are possibly two things going on here, short glitches (ns to µs) and much longer supply dropouts (ms to s). <S> You always need <S> a bypass capacitor accross power and ground of a microcontroller. <S> This keeps the local supply steady despite quite large very short term variations in the current the microcontroller is drawing. <S> These variations are too fast for the power supply to regulate away. <S> Also, the traces back to the supply have enough impedance at the high frequencies of these fast current variations to cause local voltage fluctuations even if the main supply was totally steady. <S> The other problem of longer term power supply dropouts has to be handled with significant energy storage somewhere. <S> After all, insufficient power is coming in for some period of time, and the local storage has to make up the difference temporarily. <S> The best place to put this is before the regulator. <S> Let's say your regulator requires 2 V headroom. <S> That means it will continue to produce 5 V out as long as its input doesn't drop below 7 V. <S> That's 5 V less than the nominal 12 V in. <S> A large enough cap on the input can hold up the input voltage of the regulator for some time after the 12 V input suddenly goes away. <S> Put a Schottky diode in series with the 12 V input, then the cap afterwards. <S> That prevents the input going low from discharging the cap. <S> For example, let's say you put a 1 mF cap on the input of the regulator (in addition of course to the small high frequency caps required for basic regulator operation as specified in the datasheet). <S> Since you didn't say what your current is, we'll arbitrarily pick 100 mA in this example. <S> Let's also say the Schottky diode drops 500 mV at full current. <S> The cap is then charged to 11.5 V during normal operation, and can drop to 7 V before the 5 V supply starts to drop. <S> (4.5 V)(1 mF)/(100 mA) <S> = <S> 45 ms, which is how long the cap can keep things running after the 12 V input suddenly goes away. <A> If it's really power supply dropping, you'll do better with a capacitor in front of the voltage regulator (isolated with a diode, if necessary). <S> That will allow the voltage to drop more before falling out of spec for the micro. <S> For example (picking numbers out of the air) suppose your micro needs 5V, your regulator supplies 4.75V and your micro is guaranteed to work at 4.5V. <S> And further suppose you're feeding the regulator with 9V from a wall wart and the micro and other stuff draw 50mA. And suppose the regulator drops out at 1.5V. <S> If you put a 1000uF capacitor after the regulator, the time it will hold up the micro is: t = 1000uF <S> * (4.75V - 4.5V)/50mA = <S> 5ms <S> If you put it before the regulator, the time it will hold up the micro is: t = 1000uF <S> * <S> (9V - 6V)/50mA <S> = 60ms (about 12x longer) <S> I kind of suspect that this may be an EMI issue causing disruption of the micro program unless you have a strong indication that the voltage is actually dropping. <A> It is mandatory to have ceramic capacitors close (~1cm) to the MCU supply pins. <S> This is practically true for all integrated circuits. <S> But if you have doubts why the MCU resets, they usually have registers showing why a reset occured. <S> Some MCUs have a brown-out circuit onboard and the trip point can even be set on some of them. <S> Which MCU do you use? <A> It is good practice to have some capacitance placed CLOSE to the power pins of the microcontroller. <S> Typically a 1uF and a 0.1uF <S> in parallel would do it. <S> This is a general guideline though. <S> It depends on how severe the voltage dip is <S> (how much of a dip and for how long) that will tell you how much bulk capacitance. <S> In addition, for squelching conducted noise due to ESD, I would add a 470pF cap in parallel with the above.
That said, I would recommend you consult the datasheet for the microcontroller to see if there is a power fail bit that gets set in cases like this to see if it is a power failure at all.
What happens when microcontrollers run out of RAM? It may just be a coincidence but I've noticed the microcontrollers I've used rebooted when they ran out of RAM (Atmega 328 if hardware specific). Is that what microcontrollers do when they run out of memory? If not, what happens then? Why/How? The stack pointer is certainly blindly increased to a non-allocated memory range (or rolled over), but what happens then: is there some kind of protection that makes it reboot or is it (among other effects) the result of the overwriting of critical data (which I assume different from the code which I think is run directly from flash)? I am not sure this should be here or on Stack Overflow, please let me know if this should be moved although I'm pretty sure hardware has a role in that. Update I should point out I am particularly interested in the actual mechanism behind memory corruption (is it the result of the SP rolling over -> does that depend on the uC's memory mapping etc.)? <Q> In general the stack and the heap crash in to each other. <S> At that point it all gets messy. <S> Depending on the MCU one of several things may (or will) happen. <S> Variables get corrupted The stack gets corrupted <S> The program gets corrupted <S> When 1 happens you start getting strange behaviour - things not doing what they should. <S> When 2 happens all manner of hell breaks loose. <S> If the return address on the stack (if there is one) is corrupted, then where the current call will return to is anyone's guess. <S> At that time basically the MCU will start doing random things. <S> When 3 happens again, who knows quite what would happen. <S> This only happens when you're executing code out of RAM. <S> In general when the stack gets corrupted it's all over. <S> Just what happens is down to the MCU. <S> It might be that trying to allocate the memory in the first place fails so the corruption doesn't happen. <S> In this case the MCU might raise an exception. <S> If there is no exception handler installed, then most often the MCU will just halt (an equivalent of while (1); . <S> If there is a handler installed, then it might reboot cleanly. <S> If the memory allocation does go ahead, or if it tries, fails, and just continues with no memory allocated, then you're into the realms of "who knows?". <S> The MCU might end up rebooting itself through the right combination of events (interrupts caused that end up resetting the chip, etc), but there's no guarantee of that happening. <S> When the program goes completely AWOL through this kind of crash the instructions to reset the timer generally won't be run, so it will time out and reset. <A> An alternative view : Microcontrollers don't run out of memory. <S> At least, not when programmed properly. <S> Programming a microcontroller is not exactly like general purpose programming, to do it properly you have to be aware of its constraints and program accordingly. <S> There are tools to help ensure this. <S> Search them out and learn them - at least how to read linker scripts and warnings. <S> However as Majenko and others say, a badly programmed microcontroller may run out of memory, and then do anything including infinite loop (which at least gives the watchdog timer a chance to reset it. <S> You did enable the watchdog timer, didn't you?) <S> Common programming rules for microcontrollers avoid this : for example, all memory is either allocated on the stack or statically (globally) allocated; "new" or "malloc" are forbidden. <S> So is recursion, so that the maximum depth of subroutine nesting can be analysed and shown to fit in the available stack. <S> Thus the maximum storage required can be computed when the program is compiled or linked, and compared with the memory size (often encoded in the linker script) for the specific processor you are targetting. <S> Then the microcontroller may not run out of memory, but your program might. <S> And in that case, you get to rewrite it, <S> smaller, or pick a bigger processor (they are often available with different memory sizes). <S> One common set of rules for microcontroller programming is MISRA-C , adopted by the motor industry. <S> Best practice in my view is to use the SPARK-2014 subset of Ada. <S> Ada actually targets small controllers like AVR, MSP430 and ARM Cortex reasonably well, and inherently provides a better model for microcontroller programming than C. <S> But SPARK adds annotations to the program, in the form of comments, which describe what the program is doing. <S> Now the SPARK tools will analyze the program, including those annotations, and prove properties about it (or report potential errors). <S> You don't have to waste time or code space dealing with erroneous memory accesses or integer overflows because they have been proven to never happen. <S> Although there is more up-front work involved with SPARK, experience is showing it can get to a product faster and cheaper because you don't spend time chasing mysterious reboots and other strange behaviour. <S> A comparison of MISRA-C and SPARK <A> I really like Majenko's answer and +1'd it myself. <S> But I want to clarify this to a sharp point: Anything can happen when a microcontroller runs out of memory. <S> You really cannot rely on anything when it happens. <S> When the machine runs out of stack memory, the stack most probably becomes corrupted. <S> And as that happens, anything can happen. <S> Variable values, spills, temp registers, all become corrupted, disrupting program flows. <S> If/then/elses can evaluate incorrectly. <S> Return addresses are garbled, making the program jump to random addresses. <S> Any code you've written in the program may execute. <S> (Consider code like : "if [condition] then {fire_all_missiles();}"). <S> Also a whole bunch of instructions you haven't written can execute when the core jumps to a nonconnected memory location. <S> All bets are off. <A> AVR has reset vector at address zero. <S> When you overwrite the stack with random garbage you'll eventually loop around and overwrite some return address <S> and it'll point to "nowhere" <S> ; then when you return from a subroutine to that nowhere, the execution will loop around to address 0 where a jump to reset handler usually is.
What there can usually be a high probability of happening, though, if it's enabled, is the internal watchdog timer (if one exists) timing out and rebooting the chip.
Parallel Transistors in Constant Current Load I'm designing a constant-current dummy load for testing my power supplies. This load should be able to handle a maximum of \$2\mathrm{A}\$ at \$24\mathrm{V}\$. My current design, so far, is loosely based on the design found at EEVblog #102 . Original design: simulate this circuit – Schematic created using CircuitLab A simplified version of the original design from the website is shown above. In the schematic, \$V_1\$ and \$V_2\$ are, respectively, the control voltage, and the power supply under test. The number of amps that this load draws is equal to the number of volts on the input of the op-amp. For example, when \$V_1=1\mathrm{V}\$, the op-amp turns on MOSFET \$\mathrm{M}_1\$ until the voltage at its inverting (minus) input is also \$1\mathrm{V}\$. This voltage is applied across \$R_1\$. Since, ideally, no charge flows into or out of the op-amp's inputs, we can use Ohm's law to determine the \$R_1\$'s current, \$1\mathrm{V} / 1\mathrm{\Omega} = 1\mathrm{A}\$. Therefore, \$1\mathrm{A}\$ is drawn from \$V_2\$ (the PSU under test) through \$\mathrm{M}_1\$ and \$R_1\$. If the control voltage is, for example \$1.5\mathrm{V}\$, then the current draw would be \$1.5\mathrm{V} / 1\mathrm{\Omega} = 1.5\mathrm{A}\$. As you can see, the current is equal to the control voltage because of the \$1\mathrm{\Omega}\$ resistor. The problem: As previously stated, I intend to build a power supply what can handle \$2\mathrm{A}\$ at \$24\mathrm{V}\$. Using the previous schematic, I ran some quick estimates at max load. . . $$ V_1 = 2\mathrm{V} $$$$ V_2 = 24\mathrm{V} $$$$ R_1 = 1\mathrm{\Omega} $$ For the resistor \$R_1\$:$$ P_d = 1\mathrm{V} \cdot 2\mathrm{A} = 2\mathrm{W} $$ For the MOSFET \$\mathrm{M}_1\$:$$ P_d = 23\mathrm{V} \cdot 2\mathrm{A} = 46\mathrm{W} $$ The major problem with this design is that the MOSFET has to dissipate \$46\mathrm{W}\$! This is probably not very healthy for the TO-220 device. Therefore. . . Schematic 2: simulate this circuit In this schematic, the load is split across 2 sets of MOSFETs/resistors. My hope is that each one of the components would only have to dissipate half of the original heat. This means that \$R_1\$ and \$R_2\$ would have to dissipate \$1 \mathrm{W}\$ each, and \$\mathrm{M}_1\$ and \$\mathrm{M}_2\$ would have to dissipate only \$22 \mathrm{W}\$ each. I tested this design using CircuitSim, and it works! However, practically, I can see a potential issue with this implementation. Do \$\mathrm{M}_1\$ and \$\mathrm{M}_2\$ have to be matched? Do \$R_1\$ and \$R_2\$ have to be matched? Is thermal runaway an issue? One of my major concerns is that, outside of the ideal, virtual world of the circuit simulator, the MOSFETs' parameters vary, and one MOSFET would hog all of the current, destroying itself. Then, the other MOSFET would quickly follow suit. What can I do? Do nothing. Connect the MOSFETs' sources. Add another op-amp for \$\mathrm{M}_2\$. What if I use bipolar transistors? What kind of op-amp should I use? Should I use an op-amp at all? What are the limitations of using op-amps in this application? Please feel free to explore other options or suggest something else! Thanks for your time! Hopefully this topic can be expanded upon for the benefit of others in the future. <Q> Directly paralleling the transistors is a terrible idea- <S> the threshold voltages of the MOSFETs will be different and one transistor will take much more current than the other- <S> further you are only measuring one current so the total current may be greatly in error. <S> It's worse than with BJTs. <S> Fortunately op-amps are cheap and you can just use two or more (one per MOSFET), fed from the same control voltage, each fed back from an individual source resistor. <S> Use a single supply op-amp, not an LM741. <S> That way each current will be precisely the desired fraction of the total, and the total will also be accurate. <S> There is no need to match transistors or resistors (but the resistors should be accurate enough for your desired current accuracy). <S> The currents from each transistor will simply add. <A> You are right to worry about that power level in an MTP3055, but it's nowhere near the limit of the package. <S> For instance, the Vishay IRL540 is a TO220, and it's rated for 150 watts. <S> You just need to make sure you've got a good heat sink. <S> And by good heat sink <S> I mean a big honker. <S> No clip-on jobbers. <S> Assuming you still want to worry, your alternative approach will probably work. <S> It's true that one of the MOSFETs will be running open loop, but I'd guess you'll be all right. <S> Matching the transistors would be a good idea, but I doubt it's necessary. <S> Use 1% resistors. <S> Isolating the gates from each other with about a 100 ohm resistor for each gate is also nice. <S> The ultimate way to go if you insist on using wimpy MOSFETs is simply to duplicate your load circuit, with each load set to pull 1 amp. <S> Put them in parallel and you're set. <S> Op amps are cheap, although I'd strongly advise upgrading from 741s. <S> At the least, use single-supply op amps and save yourself the trouble of providing dual supplies - and with 741s you really need dual supplies. <A> The general rule of thumb is it OK to use MOFSETs in parallel because as they heat up their on-resistance increases, and so they generally share current well, but this is for use as a on/off switch. <S> When used in an analog fashion such as this, I'd imagine differences between components could result in very different currents through each transistor for a given gate voltage. <S> You could use bipolar transistors with a similar circuit as long as the op-amp output current capability is sufficient for whatever the transistor gain requires. <S> You have to be careful using MOSFETs for analog circuits like this because some (especially trench types) are designed for fast switching full-on or full-off type applications and fry quickly when left in-between too long with significant current. <S> This MOSFET isn't of that type but check the "Maximum Rated Forward Biased Safe Operating Area" graph in the datasheet. <S> Even with two in parallel you are dangerously close to the edge of the safe operating area. <S> I'm not a transistor expert but typically find BJTs more robust for analog circuits <S> (I've killed many more MOSFETs than BJTs). <S> For projects like this I think one of the biggest issues you need to think about is how you are going to dump heat. <S> I think using multiple transistors is a great idea in addition to big heat sinks, fans, etc. <S> Junction to ambient thermal resistance for T0-220 packages is usually around 60 degC per watt without any heat sink. <S> So 22W would rise the junction temperature of the transistor 1,320 degC over ambient! <S> That is definitely going to release all magic smoke! <S> You usually need to keep the junction temperature below 150degC or so depending on the part. <A> The datasheet for the power transistors states the threshold voltage varies @Troom from 2V <S> up to 4V. <S> If you plan to sink 2A (1A per transistor) and you use 2 Ohm sense resistors, the voltage accross these would be 2V. <S> In worst case this means one transistor will conduct more than the other. <S> You can do several things: if you plan to use this only on 24V systems, rise the control voltage / introduce a divider at the sense line. <S> This means you will have higher voltage on sense resistor, higher power dissipation on the sense resistor and better current sharing between the two transistors. <S> use bipolar transistors. <S> The mismatch in Vbe is small compared to the voltage accross the sense resistors. <S> This will solve the root of your problem, but will introduce additional power dissipation in the OPA, something you must take into account (you may have to buffer the OPA with an additional transistor). <S> That beeing said, when you buy semiconductors, they are usually from the same production batch and the matching of the various parameters is ussualy much better then that shown in the datasheet. <S> So in essence you could simply buy the transistors, measure them to see how well they match, calculate back the ratio of the current sharing and if satisfied - simply use them. <S> This is the route I would go.
I would use a separate op-amp for each switch, each with its own resistor so that you have multiple independent current control loops in parallel.
Which ARM MCU family is better for beginners? Which ARM MCU family is better for beginners? I mean which family: Is straightforward and easier to learn Has more/better learning and development resources available Has bigger and better community [Has FLOSS learning and development software/hardware available] Update: Do starting with Cortex-M4 is good idea? (because of ARMv7, Harvard mem arch etc) between NXP, ST and TI Cortex-M4 based MCUs which is better for start? (based on requirements above) <Q> Personally I learned using the FRDM-KL25z development board from Freescale although there are a wide array of options. <S> There is an Arduino-like environment called mBed, which is very similar to Arduino although it is for ARM controllers. <S> You can use mBed with many different controllers such as the Teensy and even the FRDM development board I mentioned. <S> If you aren't looking for an Arduino-like environment, you can use the FRDM development board I mentioned from Freescale which has a free development environment that includes a code generator called Processor Expert. <S> Processor Expert allows you to specify components and communication protocols and then will generate the raw code for you. <S> The code is still bare-metal code and will be very similar to code you would write if you weren't using Processor Expert. <S> Another line that is very popular, especially among the users here at EE.SE, is the Discovery line of development boards from ST Microelectronics. <S> In short though, for a beginner, I would very much recommend the Cortex-M0 series. <S> The Cortex-M0 <S> + has the same instruction set although it us more optimized. <A> A lot of this depends on what you mean by "Family". <S> If you're asking for which manufacturer's product family is a good place to start, I'd recommend Atmel's SAM series basically because of the toolchain, at least if you're on windows. <S> ARM is unfortunately rather fragmented, in terms of manufacturer support and toolchains for windows. <S> Atmel has Atmel Studio , which you install and it basically just works. <S> I spent a while poking around with STM32 parts before trying some atmel devices, and getting a functional toolchain was a major annoyance. <S> I eventually got CooCox working, but there is very little first party support. <S> Atmel studio just works right after being installed. <S> This is nice because getting GCC working on windows can be involved. <S> If you aren't familliar with MCU development at all, I can't recommend ARM at all, really. <S> You have to do a lot of reading-between-the-lines on any platform to get the peripherals to work. <A> 1.Do starting with Cortex-M4 is good idea? <S> (because of ARMv7, Harvard mem arch etc) <S> Yes, why not? <S> If you are programming in C language, I think you won't feel the difference (only the compiler will). <S> In the other hand if you are programming in assembly, then there are differences of course. <S> 2.between NXP, ST and TI Cortex-M4 based MCUs which is better for start? <S> (based on requirements above) From those MCU, I only know the TI Tiva MCU. <S> You can buy the low cost Tiva C Series TM4C123G LaunchPad. <S> This Launchpad has two MCU on it. <S> One of them functions as the programmer and you could use it, if desired, to program/debug an external Tiva C MCU. <S> You can use an Arduino-Like programming IDE called Energia to program simple applications very quickly. <S> For complex applications, you should use Code Composer Studio (CCS), which is free under certain conditions (one of them is using it with low-speed programmers as the one in the Launchpad). <S> Current CCS (version 6) allows to easily install libraries and examples. <S> Free libraries that allows to "easily" (this is of course relative) work with peripherals inside the MCU, interface with external peripherals, or having a RTOS (real time operating system).
The ARM Cortex M0 is the lowest and most simple architecture in the ARM family.
Ammeter time limits - how to understand them On my multimeter, near the 10 A connector it says 10 A MAX 10sec EACH 15min . I usually measure currents less than 1 A so I never cared about this. Is it correct to assume that if the measured current is lower than 10 A, I can take the measurement in more than 10 sec and I don't have to wait 15 minutes? I measured only a few times a current of about 4 A and I'm sure I didn't follow those time limits and the multimeter is still working (so far). I read the manual, there's nothing written about this. <Q> First time I measured a 10A power supply (using a virtually bombproof AVO-8 ) <S> I got a surprise after several minutes when I burnt myself on the test leads! <S> The probes were overheating too, but the meter was made of stronger stuff! <S> Anyway after that, I'm not surprised to see limitations like that on anything but the most rugged grade of multimeters. <S> At 4 amps I'd keep it down to maybe a minute or so and let it cool off, or if I was making quick measurements I wouldn't worry about it. <A> The short-term specification — 10A for 10 seconds — is an indication of how much energy the meter can absorb without going outside its accuracy specifications (and without damage). <S> You can probably assume that for lower currents, you can extend the time proportionally to the square of the reduction, since power is proportional to current squared. <S> E.g., at 5 A, you can probably make measurements in the short term that add up to 40 seconds. <S> The long-term specification — each 15 minutes — is an indication of how quickly the meter can dissipate the absorbed energy and return to thermal equilibrium. <S> This is equivalent to an average power rating. <S> For example, if you measure 5A for 10 seconds, which is 1/4 the energy, you should be able to do this every 15/4 = 3.75 minutes. <A> If I remember correctly measuring continuously 10A will not destroy your unit (at least my survived), but will affect the accuracy. <S> If you measure lower currents, you will hit a different delta temperature. <S> This deltaT may or may not be enough to affect the accuracy of your unit, but it is not going to be necessarily linear <S> - it depends on the overload. <S> I would expect to see something similar to the pulse derating curve for a resistor, but those are only my expectations.
If you measure 10A, you can do so for 10s, then you must leve the multimeter to cool down for 15min, I believe.
Using two 14 AWG wires instead of one 12 AWG I do understand there are many factors when choosing what AWG wire, however by the charts, tools, and info I have found, using two 14 AWG copper wires should be equal to a single 8 AWG wire. 8.025 AWG to be really specific. Am I missing anything important? If I have several hundred feet of 14/2 with ground and 14/3 with ground, is there any technical problem with running a pair of them to replace the 12/2 or 12/3 that I try to use as a minimum, or should I toss the extra 14 AWG Romex as useless? <Q> Electrically, multiple smaller wires in parallel act as one larger wire. <S> At DC, it's strictly about conductor crossection area, assuming the same conducting material (usually copper) is used in all the wires. <S> With AC, multiple separated wires are actually better than a single wire with the same crossection area. <S> However, if this is for line power, then your question becomes a legal issue, not a electrical one. <S> I suspect that it's NOT allowed to parallel multiple smaller wires and then assume the whole is rated for the sum of the currents of each of the wires. <S> I'm no expert on the electrical code, and it varies by jurisdiction anyway. <S> You have to consult your local electrical code. <A> This answer addresses some of the side issues that you raised in your comments: 15 amp breaker or not, 12 AWG wire is the smallest wire I will use. <S> There was a time when I felt the same way. <S> However, after doing some extensive rewiring of some older houses, I've changed my mind. <S> AWG 12 is much more difficult to work with in tight spaces such as junction and outlet/switch boxes, and I find that it just isn't worth the trouble. <S> Due to factors like resistance buying a thinker gauge wire will always pay for itself on your power bill. <S> How do you figure that? <S> For most types of loads, if you deliver higher voltage to the point of the load, the current draw — and your power bill — will increase . <S> The only type of load for which this isn't true is a "constant power" load, such as anything that uses a switching regulator. <S> In this case, delivering higher voltage will result in lower current. <S> The problem is that this type of load is an insigificant fraction of your total load in most cases. <S> In this case where I am building something that is not a house the code does not apply. <S> It doesn't matter whether you're building a house; the electrical code applies to anything that is permanently wired to the electric utility, or to a local generator. <A> #12 AWG is protected by a 20A fuse. <S> Doubling #14, 12, 10, 8, <S> ......wire to increase ampacity is not allowed. <S> Doubling is allowed for much larger sizes. <S> The #14 AWG Romex is not useless, keep it for any circuit that will be protected with 15A fuse. <S> An exception is where the voltage drop is more than 5% ( extra long runs with high load), or exposed to high temperature. <S> Then use #12 for 15A circuits. <S> If you don't want the #14 Romex, sell it and then buy the correct size you need. <A> In theory you could do this safely by individually fusing each wire at the source, however I suspect local electrical codes will prohibit this gambit, so I would not suggest it for something connected to the mains. <A> Using AWG multiple conductor conversion table, 2 conductors of 14 gauge equals 11 gauge which doesn't meet NEC.
The other consideration is what happens if one conductor fails if 12 gauge fails there would be a loss of power if one 14 gauge failed the other would take the whole load causing a fire. In house or building wiring, or anything that is connected to power, 14 AWG wire has to be protected by a 15A fuse.
Which circuit breaker will blow first? Assume that Each circuit breaker is identical. Each breaker trips at 15 amps on a 120V circuit. One circuit breaker is located back at the circuit box with 50 feet of wire to the outlet. The other circuit breaker is located at the outlet with 5 feet of wire to a high load application which draws more than 15 amps. Which circuit breaker has a higher chance of blowing? I would imagine the one at the box because more current may exist due to the resistance in the 50 feet of wire. <Q> If all the breakers are absolutely identical, then they will both trip at the same instant. <S> The current flowing through them both will be the exact same amount of current. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> With no branches in the circuit, just a simple ring, the current at all points will be the same - simple KCL. <S> AM1 == AM2. <A> <A> Ignoring the real-life fact that circuit breakers vary widely in their cut-off current: both will break at the same time, because they get equal current. <S> The two breakers and the load are in series, so the current simply has to be equal. <S> There might be some difference in the (ground-referenced) potential at the terminals of both breakers, but they won't notice. <A> With both Ckt breakers at the same ambient temperature the Ckt breaker closest to the source of the fault will trip. <S> 35 years of experience.
The warmer one will trip first in an overload (not short circuit) situation with identical breakers and identical current.
OP-AMP with varying Vee I couldn't understand the purpose of the varying Vee. <Q> The label in the diagram refers to the wiper of the potentiometer, which is connected to Vee. <S> The two outer terminals are connected to the offset-null of the Op Amp. <S> The offset null terminals allow you to calibrate an op-amp to ensure the output is exactly zero at exactly equal inputs, despite manufacturing tolerances, by altering the position of the potentiometer. <S> This arrangement where the wiper is connected to Vee and the other two terminals to the offset-null terminals is the most common arrangement of this facility. <A> I do not think this is intended to vary Vee. <S> Can you give us the source of the picture? <A> As @circuit fantasist said in his now deleted answer @iggy is right - <S> this is exactly an offset null adjustment . <S> Look at the end of this article <S> The page he cited shows the circuit below. <S> (where the term '-Vcc' is synonymous with '-Vee' in the original question). <S> FWIW - that is an excellent Op Amp introduction page - but much or all of the material has been copied unnattributed from elsewhere, and the same material appears in dozens of other places on web with no attribution. <S> The original just may be " <S> OP AMP BASICS 1.1 CHAPTER 1: <S> OP AMP BASICS James Bryant, Walt Jung, Walt Kester, Greg Kovacs Department of Electrical Engineering Stanford University" and/or "Op Amp Applications Handbook, edited by Walt Jung (Newnes, 2006)", but given the date and use of a 741 the original may be much older. <S> Their answer is old and refers to an outdated "741" opamp but the comments are of direct relevance: <S> Offset Null Adjustment Procedure for the µA741:Offset null adjustments differ with the application (e.i. Inverting or Non-Inverting Amplifier). <S> Offset-null potentiometers are not placed on design schematics as they would detract from a design. <S> For practice, perform the following Offset Null adjustment if you wish: <S> Adjust the 10K pot(entio)meter to its center position. <S> Connect the potmeter outside leads between pins 1 and 5 of the op-amp. <S> Make sure that the power is applied to the design application. <S> Connect the wiper of the potmeter to the negative supply voltage. <S> Ensure that input signals are zero or null and that pins 2 and 3 have a dc return to ground. <S> Measure the output with a dc meter and obtain zero null by adjusting the potentiometer <A> @Russell McMahon, thanks for the additional clarification. <S> Maybe it would be interesting to see (in the 741 internal structure) how the potentiometer adjusts the offset voltage. <S> A few years ago I revealed the secret of the 741 input stage in the op-amp Wikipedia page (now it significantly differs). <S> As we can see, the potentiometer changes the transfer ratio (Iout/Iin) of the current mirror Q5,Q6 acting as an active load for the input differential pair Q1-Q4.
I think this is simply a way to zero out the OPAMP offset voltage.
Single LED connected in parallel to conducting wire does not light up LED connected in series to resistor. All is well. This doesn't work. Neither does this. This would be the schematic diagram. simulate this circuit – Schematic created using CircuitLab Why doesn't it light up? Is this the absence of a load, even though the breadboard connection has a minimal resistance? Conclusion Straightforward answer: Wire without load sucks up all the current because its resistance is approximately 0 (see Ohm's law V = RI). Points which have approx0 resistance between them are called electrically common. A bit more elaborate: The voltage on the wire is equal to 0. The LED leads are connected to this wire, hence no current can flow through the LED (analogous to a bird sitting on a high voltage power supply wire). Why is V = 0 in the wire? Because there is no resistance. If you measure the pressure of a flowing river without any obstacles between two points of not inmense distance between them, they are practically the same. The water can keep on flowing though, becausethe initial pressure from the potential difference between the mountain top and sea level (the power source) produce the current. If there's an obstacle in the way, say a small dam, water can accumulate (as well as electrons can do) on one side of the obstacle (the resistor) creating a potential difference on each side of the obstacle. Therefore a voltage builds up. Resistors can be thought of as narrowingsof a pipe, but as such, the water analogy would fail, because Bernoulli's principle would come into consideration. Even though the voltage drops just like the as pressure drops in the narrowing of a pipe, in a circuit it happens before and after the resistor, not only within it. With Bernoulli, current (mass/time) is equal everywhere. That is why the water molecules are accelerated in the narrowing in order to get the same amout of mass through.In circuits it is more like closing of lanes in a road due to an accident. The road gets narrower and technically the drivers would have to accelerate in order to get the same amount of cars through in the same time interval. In reality, they slow down, producing a traffic jam, and with soa "car potential difference" is built between before and after the accident site. <Q> Ok, let's take this step-by-step up Wittgenstein's ladder . <S> Step 1: <S> Current is lazy and always takes the path of least resistance. <S> Given the circuit: simulate this circuit – Schematic created using CircuitLab <S> For the current to get from point A to point B <S> it's going to go straight down the simple wire rather than take the more difficult route through the LED. <S> Step 2: <S> Kirchhoff's Current Law: <S> At any node (junction) in an electrical circuit, the sum of currents flowing into that node is equal to the sum of currents flowing out of that node Ok, but on the circuit above point A and point B are connected directly together, so they are in effect the same point. <S> The circuit is basically the same as: simulate this circuit (imagine the little link bit isn't there <S> - the editor won't let you do diagonal lines). <S> The current I that flows in must equal the current I that flows out of point A. <S> So if all that's going in is going straight out, there's none left to go up to the LED. <S> Step 3: <S> Wires aren't perfect. <S> No wire has absolute zero resistance. <S> The same with breadboards. <S> So the actual circuit is more like this: simulate this circuit <S> Ok, so we have an fixed voltage <S> \$V_{CC}\$. <S> Let's say this is, for simplicity. <S> 5V. <S> The LED has a fixed forward voltage drop. <S> Let's assume for the sake of argument that it's 2V. <S> Ok. <S> Let's take the LED out of the circuit initially and just work out the voltages dropped across the resistors R1, R4 and R5. <S> The total resistance for that section will be 100.002Ω (simply add them together). <S> So the current through them would be \$\frac{5}{100.002} = <S> 49.999mA\$. <S> Therefore the voltage dropped across R4 would be \$0.049999 <S> \times <S> 0.001 = 49.999{\mu}V\$. <S> Now if you attach the LED across that resistor it's only going to be getting 49.999µV, which is considerably less than the required forward voltage needed to turn it on. <S> So it won't be conducting as it's not on, so <S> the current through the resistors R2 and R3 will be zero. <S> Now there are more potential steps in Wittgenstein's ladder, but from here we're getting into the realms of subatomic physics, and even quantum theory, so we'll leave it there for now. <A> Let's look at that circuit again: simulate this circuit – <S> Schematic created using <S> CircuitLab <S> You know what all of these components do. <S> But that's not all of the schematic. <S> There are lines. <S> You know, these things: simulate this circuit <S> What do those things mean? <S> Lemma <S> : they mean that everything touching any one line has the same voltage. <S> "What, no! <S> Those are wires!" <S> , I hear you thinking. <S> OK, what is the difference between a wire and a resistor? <S> Not much: a wire just has a very low resistance. <S> You can find tables that give resistance per length for standard wire gauges. <S> So, wires are just really small resistors. <S> Now consider Ohm's law: <S> $$ V = IR $$ <S> Let's just say we have 1A going through a 10kΩ resistor. <S> What's the voltage across that resistor? <S> $$ V = <S> (1\:\mathrm A)(10\:\mathrm k\Omega) = <S> 10\:\mathrm{kV} <S> $$ <S> What happens if the resistance gets a lot smaller? <S> Say, 1Ω? <S> $$ V = (1\:\mathrm A)(1\:\Omega) = 1\:\mathrm{V} $$ <S> The voltage gets smaller. <S> The smaller the resistance, the smaller the voltage. <S> As the resistance approaches 0Ω, the voltage approaches 0V, regardless of the current. <S> Mathematically: $$ \lim_{R\to <S> 0\:\Omega} IR = 0\:\mathrm <S> V $$ <S> The lines in a schematic are idealized wires that have zero resistance. <S> Thus, the voltage across them is always zero. <S> You are actually using real wires which have some resistance, but it is negligibly small. <S> Look back at the schematic. <S> So it can't light. <A> Wow ! <S> Assuming the breadboard's contacts are perfect, there is no voltage between the LED terminals, so there is no current, no power, no light. <S> I1=0. <S> Of course, there is a minuscule resistance so <S> with a very high input voltage you may see a few photons emitted before frying the breadboard, but, meh ! <S> In your third photo, you are short circuiting your power supply. <S> Hope it is protected (not just a battery) ! <A> In the second and third photos, both pins of the LED are connected to the same metal strip in the breadboard, so there is no voltage across the LED - therefore no light. <S> In your schematic diagram, you show the two leads of the LED connected together, so they will be at the same voltage. <S> Again, no voltage across the LED, so no light. <A> even though the breadboard connection has a minimal resistance <S> They are not the same; in fact, they're opposites. <S> "No resistance" does not mean "no current can flow". <A> The first image makes sense, that's how an LED should be connected. <S> In the second image, everything except for one end of the resistor and the positive are plugged into row 6 so both pins of the LED are touching the same connection. <S> In the third image, everything is plugged into the positive connection, so basically you're shorting it in the 2 non working examples.
Both sides of the LED are touching the same wire, so there can't be any voltage across the LED. I see a power supply, a resistor, and an LED. It's important to recognize the difference between "no resistance" (a short circuit) and "infinite resistance" (an open circuit). So no current flows through the LED, it just goes straight past. I have the same breadboard here.
Why do LEDs have a maximum current? So I understand that LED's have a maximum current (like 20mA for instance), but scientifically why is this? Using the water analogy it seems like a high voltage would be the thing that would mess up something (I like to think of it like a huge amount of "pressure" blowing out a pipe or something). Why would a rate of electron flow damage something? <Q> It's difficult to come up with an analogy because the usual analogies for electrical systems are fluid systems. <S> A great thing about fluid systems is that the working fluid is also good at cooling things, and most people's practical experience with fluid systems involves rates of flow where heating is not very significant. <S> So let's try a different analogy: a string being pulled through the resistance of your fingers. <S> Your fingers are the LED, and the voltage drop of the LED is analogous to the difference in tension of the string on either side of your fingers. <S> Current is analogous to the rate at which the string is being pulled. <S> Will your fingers be damaged if the string is pulled too fast? <S> Yes: we call it "rope burn". <S> This will happen even if you adjust the resistance of your fingers to maintain a constant difference in tension on the rope regardless of its speed (analogous to the approximately constant voltage drop of the LED). <S> The reason is that the rate of work done, and thus, the heat generated, is the product of the force your fingers apply to the rope and the rate at which the rope is moving through your fingers. <S> You can get a rope burn by squeezing too hard, or moving the string too fast. <S> "Rate of work" or "rate of energy" is called power . <S> One way to define it, for mechanical systems, is the product of force (\$F\$) and velocity (\$v\$): $$ P = <S> Fv <S> $$ <S> Since power is a rate of energy it should be in units of energy per time. <S> In SI units, thats joules per second, also known as the watt . <S> So, however fast the rope is moving, and however much force your fingers are applying to it, you are doing work at the rate of some number of joules per second. <S> This energy can't vanish: it becomes heat in the rope and your fingers. <S> Once you exceed your body's ability to transfer heat away from your fingertips your skin gets too hot and you are burned. <S> The analogy for electrical systems is that power is the product of voltage and current: $$ P = VI $$ <S> \$V\$ is approximately constant for an LED, but if you increase \$I\$ enough, you generate heat faster than it can radiate to the ambient environment. <S> The LED gets too hot and is damaged. <A> There's a forward voltage drop of a couple volts across the LED. <S> This Voltage drop times <S> the Current is the Power dissipated in the device. <S> It creates light, but also heat. <S> It's the heat that kills the LED. <A> Whenever electrons flow through a conductor, Joule heating happens. <S> This is partly because of what heat really is, particles that makes up the object moving around, and having electrons pulled through it guarantees that some electrons will collide into something and have its energy transferred into that particle, heating it up. <S> When the LED is overloaded the excessive heating will cause the fragile bonding as well as the die itself to change. <S> None of those change is constructive and eventually the heat destroys the part. <S> For LEDs they burn out and maybe blow apart, for some other parts they can burst into flames. <A> Here's another way of looking at what some others have said: The conversion of current to light is not 100% efficient, so the remainder of the energy not converted to light is heat. <S> Each electronic component has something called a "thermal resistance" measured in degrees <S> Kelvin <S> /Watt which says how easily the "waste energy" above gets out of the die to the PCB (typically the cathode for an LED) as heat. <S> This is specified in the datasheet. <S> In addition, each electronic component has a maximum junction temperature, Tj at which it can operate according to the rest of the specified parameters in the datasheet. <S> With this information, given a constant thermal resistance, Rth, a fixed maximum power rating LED, Pdiss_max, and a constantly increasing power source driving the LED, what will happen is you will drive the junction temperature above its maximum rating and likely de-solder the wire bonds from inside the chip, rendering it inoperable. <S> Good question! <A> There's only a certain amount that that size of material can handle. <S> Take a filament for example. <S> Just the right size to glow but not burn up. <S> It is being overwhelmed with electricity, there's only so much it can handle before it burns out. <S> Same with LEDs. <S> Depends upon the amount and type of material. <A> All nice answers. <S> I just wanted to add that if there was no non-radiative recombination in the LED's, then there would be much less heat and one could push more current through before it heats up... <S> (Think newer high efficiency LED's) <A> Actually I found the water analogy pretty effective. <S> A pipe will break apart If a massive quantity of water would transit into it. <S> More specifically, it will melt down as a fluid flowing generates a small quantity of heat like any other material do
TL;DR: Flowing current creates heat, and for LEDs, heat kills the part.
Do I really need the open loop output impedance of an op amp? There are several answers on the internet and here on how to calculate the output impedance of the opamp with a given feedback. My intention, though, is to find this value with an open loop configuration because is considered before feedback connection of the output. Like here, the output resistance saw before the Cgs: Someone says that is written on the datasheet, but also could not. In this latter case we should need the internal circuitry to estimate it. Is that true? If so, how can I find this value from, for example, an LM324? That impedance seems to be not present inside the datasheet. EDIT: But I may be wrong, in that circuit I need to model the output of the op amp as a voltage generator+output resistance. I was thinking to open loop only because the oputput of the system in which the feedback takes the signal is not the output of the opamp. But if I'm wrong, I can find the output resistance with the normal closed loop way. Would still be right even if the feedback of my circuit is a drop due to a current and not the output voltage directly from the opamp? I think the answer would be 'yes' because the output is still dependent on the output of the opamp, of course. <Q> Open-loop output impedance of a opamp is rarely, if ever specified. <S> However, the maximum current source and sink capability usually is. <S> You should therefore go with the datasheet and consider the opamp output a current source within the maximum specified current capability. <S> It's impedance should therefore be considered infinite, since that is the impedance of a perfect current source. <S> In reality, the impedance won't be infinite, but you don't know what it will be. <S> CMOS output opamps probably look mostly resistive, but the current source model may actually be closer for bipolar output opamps. <S> In any case, don't try to read into the datasheet what it doesn't say. <S> You are only guaranteed what it guarantees. <S> Assume the current source model when designing the circuit, and everything should work. <S> If you design the circuit right, the open-loop output impedance will be irrelevant anyway. <S> In the closed loop case, the output impedance, like the gain, will be governed by the feedback. <A> The usual assumption is that it's less than 100 ohms for normal (not very low power) <S> op-amps and often much worse for very low power op-amps. <S> You may be able to find an estimate of the nominal value by reverse-engineering the SPICE model (although the below-linked article from AD indicates that the modelling of Ro may be quite inaccurate). <S> You typically will find some guarantee of stability (such as phase margin) with a given capacitive loading in the datasheet. <S> From that, you could work backwards to a limit on the output resistance. <S> As Olin says, it's bad engineering to depend on parameters that are not directly or indirectly guaranteed on the datasheet, so it's best to isolate that capacitive loading or otherwise make the circuit relatively insensitive to output resistance so even if it turns out to be relatively high your circuit will still work to specifications. <S> Edit, re your edit: <S> The open-loop output resistance can affect the stability of the circuit, especially with capacitive loading, because it puts another pole in the feedback path. <S> If this is a consideration, you need to have some idea of what that resistance is, even though it's not directly specified on the datasheet, so it's a good idea to have a rough idea of what the nominal and limits are, otherwise you're just guessing that it will be stable. <S> In the case where a resistor and AC feedback is used to stabilize the circuit ( called in-loop compensation ), you still need to have some basis for picking the value of that resistor. <S> Is 50\$\Omega\$ okay, or must it be 1000\$\Omega\$? <S> Aside from stability considerations, normally we don't need to think too much about the open-loop output resistance of the op-amp- <S> it's effectively reduced by the gain, so it tends to be negligible if the amplifier gain is high in comparison to the required accuracy. <A> As Olin says open loop output impedance (\$Z_o\$) is rarely specified. <S> It's because it's not just a constant resistance,but usually a function of frequency and temperature, and also not really linear. <S> As Spehro says, it's not much of a care about, except for stability or driving capacitance. <S> But since it looks like you are trying to control a FET with a LM324, you will probably care about it a lot. <S> While \$Z_o\$ is rarely given, closed loop output impedance (\$Z_{\text{oCL}}\$) is much more common. <S> With \$Z_{\text{oCL}}\$ and amplifier gain (\$A_v\$), \$Z_o\$ can be calculated. <S> Usually a unity gain curve is given, and from the classic feedback equation of Black, \$Z_o\$ can be calculated as: <S> \$Z_o\$ = \$\left(A_v+1\right) <S> Z_{\text{oCL}}\$ <S> The LM324 is in the same family as the LM611 , which does show a curve of \$Z_{\text{oCL}}\$. <S> Now the output stage of the LM611 was improved over the LM324 to reduce crossover distortion, so \$Z_o\$ will be a little better but similar to the LM324. <S> First, you can see that the output impedance of this family of OpAmps is high. <S> Once outside the gain bandwidth of the OpAmp, <S> \$Z_o\$ and \$Z_{\text{oCL}}\$ become equal. <S> So, for LM324, LM611 \$Z_o\$ is ~ 1KOhm. <S> But it isn't really resistive. <S> In fact it's only resistive between about 300Hz and 10KHz. <S> Between 10KHz and 300KHz \$Z_o\$ appears to become inductive (really there's just some non-linearity that makes it look inductive). <S> It is possible to calculate \$Z_o\$ from this curve for \$Z_{\text{oCL}}\$. <S> A curve like that of \$Z_{\text{oCL}}\$ is usually the best information that you will get from a datasheet. <S> Also relevant here might be " Stability problem in unity gain OpAmp ".
It's an important number (especially the upper limit of open-loop output resistance) if you anticipate substantial capacitive loading of the op-amp and wish to evaluate stability, but unfortunately it's not generally directly guaranteed.
Why the output decreases in series? I am just confused with below statement "A 100 W bulb is connected in series with a room heater. If now 100 W bulb is replaced by a 40 w bulb, the heater output will decrease !" if I follow this formula P=I*IR and believe that 100W bulb will have greater resistance than 40W so if I remove 100W (greater resistance and replace it with low resistance 40W bulb) . the heater should pull more voltage for more output ! Then why it says that it decreases ? Or in short which one has greater resistance 100w OR 40w and why ? <Q> Ok. <S> Let's completely ignore the heater for the time being. <S> Let's also assume a 110V mains voltage powering the bulb. <S> We'll also treat all the items as simple resistors with no effects of self heating taken into account (purely to keep it simple and not overload you with too much information too soon). <S> We know voltage, and we know wattage, so <S> we can use:$$P = <S> \frac{V^2}{R}$$Or, re-arranged for R <S> we have:$$R = \frac{V^2}{P}$$ <S> Immediately from that you should be able to see that as you increase P the R will decrease proportionally. <S> Still, for completeness, let's work through it for each of the bulbs and the heater: <S> Let's first substitute in our values:$$R_{100} = <S> \frac{110^2}{100 <S> } $$$$ R_{40} = <S> \frac{110^2}{40}$$Work out <S> those sums <S> and you come up with the values:$$R_{100} = <S> 121{\Omega}$$$$R_{40 <S> } = 302.5\Omega$$So <S> now we know the resistance of the bulbs by themselves. <S> Add to that another resistance for the heater. <S> Let's assume it's a 1KW heater. <S> That, by itself, using the same formula, gives us:$$R_H = <S> \frac{110 <S> ^2}{1000} = <S> 12.1\Omega$$ <S> Now let's put it in series with each of the light bulbs and work out the power from the heater. <S> First the 100W <S> bulb:$$R_T = 121 + <S> 12.1 = 133.1\Omega$$$$I = \frac{V}{R} = \frac{110}{133.1} = 0.826A$$$$P = <S> R <S> \times <S> I^2 = <S> 12.1 <S> \times 0.826 <S> ^ <S> 2 = 8.265W$$Now the 40W <S> bulb:$$R_T = <S> 302.5 + <S> 12.1 = 314.6\Omega$$$$I = \frac{V}{R} = \frac{110}{314.6} = 0.3497A$$$$P <S> = <S> R <S> \times <S> I^2 = 12.1 \times 0.3497^2 <S> = 1.479W$$So <S> you can see a massive reduction in output from the heater with the lower wattage bulb. <A> The problem is that you're using the wrong formula for power. <S> An incandescent light bulb is typically meant to be the only device in a circuit, which means that the voltage would be meant to be constant, not the current. <S> Since the power relation between voltage and resistance is proportional to the inverse of the resistance, a lower power means a higher resistance. <S> As such when the lower power light bulb is placed in series with the other device instead, the voltage divider created drops more voltage across the light bulb <S> and so the power available for the other device decreases. <A> The resistance of a filament bulb is not constant - it varies (increases) with (increasing) temperature. <A> The 100W light bulb has a lower resistance than 40W. Voltage, power, and current change. <S> In loads the most constant value is the resistance (with the exception of light bulbs, where the resistance goes up with heating up). <S> If you want to find a working resistance of a 100W light bulb, I = <S> P/V <S> and then R = V/I. <S> But when several loads are in series, first add the resistances, then calculate current, then power. <S> In loads, the lower the resistance is, the higher is the power. <S> (inversely proportional)Provided the voltage is the same. <S> Figure out this one. <S> If I supply a heater with an extension cord, the lower resistance the extension cord has, the less heat the extension cord produces. <S> But the lower resistance the heater has, the more heat the heater produces.
A hot 40W bulb may well have a higher resistance than a cold 100W bulb.
What is the wrong with this simple sine wave generator circuit? I've designed this circuit myself aiming to generate sine wave at the collector of the transistor, but I doesn't work. the current at the collector is DC. Is it a simulator error or the design is wrong ?What modifications should I do to make it works ? I know that there are many oscillator circuits on the internet but I just would like to know what the error in this circuit is. <Q> The basic problem is that there is no feedback thru the resonating components. <S> Note that they are tied to the base directly from the power supply. <S> There is nothing that will make them oscillate. <S> There are many L-C oscillator circuits out there. <A> There is no reason for the transistor to change its operatin point in steady state conditions (after the input transient). <S> An oscillator needs its perturbation at its output to feed into its input. <S> This is not happening here. <A> Even if you tied the tuned circuit to the collector (as Olin pointed out) it is a parallel tuned circuit and will block feedback at the resonant frequency i.e. it won't oscillate - try using a series inductor and capacitor. <S> Then, feed that to the emitter rather than the base. <S> Then it is positive feedback.
No matter what topology you use, the frequency-setting components either need to be in the feedback path, or somehow arranged to kill the gain at all but the selected frequency.
Alternative ways to catch an inductor's flyback current This guy had a bit of problem installing the flyback diode to his relays due to physical obstruction. Now if that is really an issue will this be a good alternative way, for perfboards and breadboards? simulate this circuit – Schematic created using CircuitLab When the MOSFET is turned on, C1 is essentially shorted out and completely discharged. When the MOSFET is turned off L1's flyback current charges capacitor C1 to a voltage. Capacitor C1 is chosen to be able to hold all the energy L1 can hold without reaching a voltage so high that it can damage the MOSFET. <Q> The capacitor as shown has a couple of problems. <S> First of all, the peak current when the relay is switched on will be much greater than without the capacitor. <S> Secondly, the combination of the capacitor and inductor may cause "ringing". <S> Adding a resistor in series with the capacitor will mitigate those problems. <S> This approach will avoid having the cap waste power when turning the relay on; if the relay is switched on and off repeatedly before the cap significantly discharges, the cap voltage will increase but this in turn will help it dissipate energy faster. <S> A caveat with this approach is that the relay will be release more quickly when the cap has a higher voltage than when it does not. <S> A final suggestion would be to use both high and low side switches along with a couple of diodes; using that approach would cause the energy stored in the relay to feed back into the supply. <S> This would cause the relay to release more quickly than it would with many other flyback approaches, and if the relays are switched on and off frequently this approach would improve energy efficiency. <S> One caveat is that one must ensure the supply has adequate filter caps to accept the energy supplied by the relays. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> As shown, the circuit will switch the "relay" (1 1mH coil) "on" and "off" cleanly. <S> If one closes the switch (right-click, select "properties", and then set the state to "closed") and reruns the simulation, the relay's current will dissipate much less quickly (which will in turn mean that the relay will respond more sluggishly). <A> Yes that's a perfectly good way of doing it but bear in mind <S> there is very little (other than the coil's series resistance) to burn off the energy - <S> the resistance of the coil is likely enough to rapidly dissipate the energy and thus ensure rapid turn off of the relay (should it be needed). <S> You can also use a resistor in parallel with the coil or wired as you've shown the capacitor - you just have to make sure that the peak current through the relay and the resistance (product) don't generate a voltage that could fail the mosfet. <A> If you need snubbing at the transistor then you should use a reverse-biased zener or avalanche diode with a voltage lower than the transistor's breakdown voltage. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Other methods are to use an avalanche-rated MOSFET (no additional parts), or put a zener diode as so: simulate this circuit – <S> Schematic created using CircuitLab <S> These methods dissipate the energy stored in the inductance partly or mostly in the MOSFET rather than mostly in the coil as happens with a diode across the coil. <S> They will maximize the relay life because the relay can open quickly. <S> The rapid dv/dt could cause EMI problems and in fact a small capacitor (eg. 10nF) across the MOSFET may help with that.
Another approach would be to use a capacitor with a resistor in parallel with it and a diode so that current can flow from the coil to the cap but not vice versa.
Why does this big button require 12V DC for an LED? I'm looking at the Spark Fun Big Dome Push button . The spec on the page (and other places selling it) says that the LED is 12VDC. Does this mean that I need 12V as a minimum? Am I not able to just swap out the LED for one of my own (much lower voltage) if I dismantle it? I can't seem to find a datasheet for it. Ultimately I want to have it connected to my machine via USB - which is why I can't provide it with 12V. My first thought at accomplishing this was to use an ATTiny85 I have connected via a USB to Serial breakout (or one of those USBs with an FTDI chip in them). Any help would be much appreciated. Or alternately if my method to read the button's input is roundabout please let me know as I don't have an EE background! <Q> The LED and switch are separate. <S> The LED says it needs 12 V, this might be because they've connected several LEDs in series, or used a large resistor. <S> No way to find out except to ask them, or buy one and look. <S> If it is multiple LEDs you might be able to cut some tracks and put them in parallel, so they work at 5V <S> The switch is a 3 contact microswitch, so will be very easy to read from a small microcontroller. <S> Your plan is probably the neatest and quickest way to get a switch to talk to USB. <A> Most LEDs have a similar voltage drop (usually somewhere between 1V8 and 3V3 <S> but it can be out of this range in specialist devices) <S> so this would suggest that the designers of the switch have integrated a series resistor that has been selected for use with a 12V supply. <S> Looking at the link you included in your post <S> it looks as though the button can be dismantled so <S> if you could get to and replace that resistor, you could make it work with a 5V (USB) supply but changing the LED itself won't make a great deal of difference. <S> Hope this help. <A> If you want to connect it to a computer over USB consider using a USB to rs232 adaptor these provide about 12V DC under software control on three outputs, (which will be good for blinking the LED) and have 5 input pins. <S> which will respond to 1 to 20V signals, in addition to this serial ports can generate interrupts potentialy removing the need to poll the I/O pin. <S> Else it should be possible to parallel another resistor with the existing resistor to make the LED operate well at your desired voltage.
The LED is has a resistor setting the optimum current at 12V 5V will likely make it glow dimly, 10V will look good and 12V great.
MOS FET reccomendations for a newbie I'm embarrassed how many times I've used ordinary BJT transistors in circuits that clearly would have been better suited to a FET, and even better a MOSFET. This is because as a lifelong hobbyist, I have a huge stash of common BJTs, and sadly the days of well stocked "neighborhood" electronic store are long gone. Experimenting always requires ordering parts first. Now I understand MOSFETS well enough to pour over specs and parameters and make choices, but maybe someone with more experience could point me to a short list of "general use" enhancement mode P and N channel mosfets that are both inexpensive and readily available as both SMT and through hole parts, that I basically couldn't go wrong ordering a supply of. I realize there are thousands of good choices, but if you consider that the old familiar (and cheap!) 2N2222 (NPN) and 2N2909 (PNP) BJTs have satisfied the bulk of my needs for simple switching or basic amplification apps for as long as I can remember, perhaps some parts will come to mind. I very seldom need to handle more that 500mA, and usually have low voltage and power requirements (15VDC, seldom more than 1W). Honestly most of my needs are for switching and about the only 'specialty" wishlist item I have is that the lowest "on resistance" would certainly be worth a few cents more. Suggestions welcome. <Q> If you're into lower voltage (logic level, 3.3V) and such like circuits, the old standards such as the 2N7000/7002 <S> (latter is SMT) are not great. <S> You might want to look into Alpha and Omega's line of SOT-23 MOSFETs which are good value and good performance. <S> For example, AO3418 / AO3419 . <S> You can get 100 of them for about $20, so even if you sneeze and a few of them go walkabout <S> it's not a disaster. <S> Unfortunately, there's not much <S> that's good introduced in through-hole packages in recent years at least for smaller than a TO-220. <S> MOSFETs have evolved rapidly, and the best available MOSFET of several years ago is often overly expensive and of poor performance compared to more modern parts. <A> Honestly - the days of the "standard" part number are gone as more manufactures put out products, and we're given the luxury of choice. <S> Every person I talk to, has different recommendations. <S> Additionally, its hard to find a part that has both SMT and Through Hole variants. <S> For example, my go-to is BSS138, but I believe they only come in SMT. <S> You seem to have the specs you need in mind. <A> First, you have to get over looking for parts that have thru hole variants. <S> Hardly anything does anymore, <S> and there's no point to them anyway. <S> Soldering <S> a SMD part is actually easier than soldering a thru hole part. <S> My common N channel FET goto part for low voltages is the IRFML8244. <S> This is a great little part. <S> It's cheap, and better in just about all respects than its predecessor, the IRLML2502, which was my preferred jellybean part for such things before. <S> The IRFML8244 can handle up to 25 V, 41 mΩ Rdson at 4.5 V gate drive, can pass a few amps, has relatively low gate charge, and comes in the common SOT-23 package. <S> You can drive this FET directly from a processor pin without any additional parts in many cases. <S> It's great for switching solenoids, motors, and the like. <S> For high side switching, you have to look around. <S> Do a search on Mouser for your requirements. <S> You will find less parts that cover a variety of applications without more compromises or higher price. <A> MOSFETs are a little unlike BJTs in that while just about any BJT can be substituted for any other device (so long as the parameters are in the ballpark), MOSFET circuits typically depend on a particular Vt. <S> This is because for the most part BJTs are characterized by the beta parameter, but it is considered poor design to assume a particular beta for a circuit, as significant variations can occur even given the same part number. <S> This is different than MOSFET devices, where Vt can be (relatively) more precisely controlled. <S> With that said however, the 2N7000 is apparently notable enough to warrant its own Wikipedia page, so it must be pretty common.
I'd type them into DigiKey, and find a part that has the best package and value for your needs and then just go with that.
What do i need to get this motor running off a car-battery? I'm going to build a motorized barn-door mount for astrophotography, but have ABSOLUTELY no experience with motors, circuits or anything else related to the motor. This is the motor I bought: https://www.sparkfun.com/products/12219 I've read about resistors, voltage, wire gauge, etc, etc... I need it at 1 rpm consistently from I turn it on until I turn it of. I plan on having a snap-switch on the thing. Now, what do I need??? I have the motor, motor mount, switch and that's it. What gauge wire do I need? Resistor? Fuse? One of those boards that look like they belong in a computer? I've searched in here and took a look at the videos where I bought the motor, but I'm too green in this.... Hope someone in here can help. <Q> The motor has a stall current of 0.5A. <S> That's the most it'll ever expect to draw. <S> So you need a fuse that'll blow at more than that (1A would be fine). <S> You also need wire that can take 0.5A minimum. <S> You also need to consider how far from the battery the motor will be. <S> Under normal operation it'll be somewhere between 95mA and 500mA (0.5A) <S> current draw depending on the load it has to move. <S> So we'll take the worst case of 500mA. <S> 24AWG is the absolute thinnest wire you could get away with for 500mA. <S> Any thinner than that <S> and it'll fuse. <S> 24AWG has a resistance of 25.67mΩ per foot. <S> Using the formula:$$V= <S> R \times I$$we can work out that, per foot at 500mA, you would drop:$$V = <S> 0.02567 <S> \times 0.5 = 12.8mV$$So after 10 feet of wire your 12V would be (12 - (0.0128 * 20) <S> * 2) 11.744V. Note, it's times 20 not times 10 as you have to remember, it's "there and back again", so 10 feet distance is 10 feet of wire there, and 10 feet back again, so <S> 20 feet of wire. <S> But, choosing thicker wire, say 18AWG, which is about twice as thick as 24AWG, the resistance drops right down to just 6.385mΩ per foot. <S> So for 10 feet distance (20 feet of wire) you'd be losing just 64mV, so your 12V would still be 11.94V. <A> You could hook it directly to the 12v battery, with the switch in between. <S> If you want to be a little bit better, a common 1n400x diode in reverse across the motor terminals, and a slow blow 0 6 to 1 amp fuse would be nice. <S> That motor only takes a tenth of an amp, so 22 or lower gauge wire will do. <S> Common 2 pair lamp electrical wire will be 16 to 18 Gauge and work fine. <S> A car battery will last for weeks on this motor alone. <S> It probably won't move a barn door though. <A> You stated: I need it at 1 rpm consistently from <S> I turn it on until I turn it off <S> The product page states (emphasis added): <S> They have a gear ratio of 3000:1 and operate up to 12 volts and deliver a stall torque of 2995 oz-in. <S> and a max speed of 1 RPM. <S> Maximum speed means it might be something less. <S> In fact, if there is any mechanical load on the motor, I can pretty much guarantee it will be less. <S> If you don't actually need the speed to be consistent, then you can follow the advice in the other answers and hook it up to a battery. <S> But if you actually do need a consistent speed, this motor is probably not going to work well for you. <S> For a consistent speed, you need something to regulate the speed. <S> You have generally two options: Measure the speed, and adjust the drive voltage to adjust the speed towards a target speed. <S> This is called a servo . <S> Use a synchronous motor , one that turns at a rate synchronous with an AC driving waveform. <S> A stepper motor is one kind, but there are others. <S> In either case, using those devices is a little more complicated than can be explained in the scope of one answer, but now you have a direction to research.
You need just motor, switch, wire and fuse.
How can I add power to a USB socket? I have a USB device that perfectly works when it's plugged into a Tower Windows-PC, but doesn't work when it is plugged into an old Linux Laptop. Is there a way to add more power to the USB device? Would the following circuit work? simulate this circuit – Schematic created using CircuitLab <Q> I really doubt that the failure of the USB device on the old Linux computer is due to the power though. <S> It is far more likely that the problem is that the old computer does not have the latest device drivers installed that are needed to support the target device. <S> You did not mention what type of USB device it is but even devices that have standard generic capabilities sometimes have special drivers to support getting them initialized and operational. <A> That circuit will work. <S> However, it may not actually solve the issue you're having, depending on the device you're having trouble with. <S> It might be not turning on due to a lack of the proper communication with the host computer. <A> Yes, that will work. <S> Another solution is a USB Y cable. <S> Depending on what your device actually needs, you can get them with USB A-Female, Mini/Micro-B Male, or 3.0 Micro B (or more). <S> Uses two USB ports, which bypasses any individual port limitations. <S> I need one for a 2.5" Sata hard drive enclosure with my MacBook, which enforces the 500mA limitation.
Your circuit idea would work but it would be easier to simply use a powered USB hub in between the computer and the USB device.
Does this TO-220 Package Resistor need a heatsink? I purchased this 0.5 Ohm power resistor, which comes in a TO-220 Package, with the aim of pushing 3A through it (i.e. 4.5W) The datasheet has the following information: It says it will rise 6.5 K/W, so it should rise 29.25C + 23C ambient = 52.25C. Using my thermometer probe, the temperature on the metal body is well over 150C, so I turned it off. Have I messed up something in my calculations, or is this datasheet incorrectly specified? <Q> At an operating temperature of 150C you have a temperature gradient between the resistor's internals and the air of 100C. <S> You want to push 5W (rounded up) through this gradient, which means that the total thermal resistance can not be more than 100C per 5W or 20C <S> /W (C/W is how a heatsink is rated). <S> If the 6.5C/W is the correct internals-to-case heat resistance that leaves 13.5C/W for the heatsink. <S> To put that in perspective: the heatsink below is rated at 11C/W. Note that for heatsinks a lower value is better (and larger, and heavier, and more expensive), so stay below the 13.5C/W figure. <S> You can do such calculation the same way you would calculate with voltage (temperature in C), current (power in W), and resistance (thermal resitance in C/W). <S> Note1: With a 13.5C/W heatsink that heatsink will be at (13.5/20)*100 = 67.5C above the ambient temperature. <S> If that is too hot for your purpose you will need a (much) bigger heatsink. <S> Note2 <S> : The heat must be transferred to the ambient. <S> Even th largest heatsink is useless when it is put in a thermally isolated box! <S> Note3: <S> The C/W of eany heatsink can be improved (lowered) dramatically by using forced circulation (= a fan). <S> But think about what happens when the fan fails, and the air must still go somewhere. <S> Note4: <S> A a quick rule of thumb anything in a TO220 casing can dissipate up to 1W, but the case will get too hot to touch. <S> Above 1W a heatsink is probably needed. <A> I would venture a guess that \$\mathrm{R_{thj}}\$ is not junction-to-air <S> (well, technically, this being a resistor doesn't have a junction, but I'm using the familiar term) <S> but rather it is to case/packaging. <S> EDIT: <S> based on a Bourns app note and the corresponding data sheet for the product used as example in that appnote, \$\mathrm{R_{thj}}\$ is definitely to case, not to air. <S> Bootnote <S> : Since it appears impossible to get more precise specification regarding the desired operating point from the OP/question, I'll just vaguely point toward Arrhenius' law as it applies to temperature-induced failures in electronics; the following graph is excerpted from Dorf's Electrical Engineering Handbook . <S> So, yeah, you can push components to their limit temp... as detailed in Wouter van Ooijen's answer... <S> but it's not risk free. <A> The 6.5 degC/W is how much the "internals" will warm up compared to the plate/case on the TO-220 package. <S> So with 4.5 watts the internals will rise about 30degC above the case. <S> But how does the case get rid of heat. <S> This will likely be a much larger figure. <S> If you look here <S> it tells you that for 1 watt generated, a TO-220 package will be 65degC warmer than ambient temperature. <S> This implies, that for 1 watt, the internals will be 6.5 degC warmer. <S> Intenal will be at over 70 degC for 1 watt and you are wanting to dissipate 4.5 watts. <A> A specific worked example : you want to safely dissipate 4.5W in that resistor. <S> It is rated to work at 155C internally; however derating usually has a positive effect on reliability. <S> Let's see what happens if we aim for 120C internal temperature. <S> At Rthj=6.5K/W, the junction will rise 6.5K*4.5W <S> = 29.25K above the case temperature. <S> Therefore we want to hold the case below 120-29.25 <S> say <S> 90C. <S> Now what is your ambient temperature? <S> Say this is in an enclosure with other electronics <S> and we can expect the air to be a little warmer than room temp, say 40C. <S> So our heatsink needs to have a thermal resistance of (90 - 40) <S> C / 4.5 <S> W = <S> 11.11C <S> /W (or less) <S> - I would design for 10C/W unlesss space or budget are particularly tight. <A> Thermal resistance is used to tell you how fast heat travels from the resistor to the package exterior. <S> That allows you to estimate the temperature rise from power applied. <S> If you think of heat as being like voltage and how well or poorly different materials allow heat to pass through them as being like resistors then you have a better idea what the spec is telling you.
The level of heatsinking you need depends on the maximum ambient temperature you can guarantee (let's assume 50C).
Find first pin of a LQFP chip I have bought some ATSAM4E8C chips in LQFP 100 package. The datasheet shows that the IC should have a dot indicating the first pin, but mine have two dots. One larger in the corner, and a smaller white dot diagonally. The upper left side of the name painted on the chip is not aligned with any of them.Where should the first pin be located? <Q> If you have multiple circular indents on the package, and they are all the exact same size and shape, then they are not the identifying indents. <S> In that case the identifying dot will be printed. <S> In general, though, you have 2 types of indent in the package. <S> Large flat ones are part of the moulding process and are to be ignored. <S> The identifying one is usually smaller and deeper - often with a more concave profile to it. <S> For instance, take this chip from Creative: <S> This one from ITE is more tricky: <S> Both the dots are the same size and the same depth - however the lower left one has a small bar across it - not easily visible to the naked eye - which highlights it as the identifying corner. <S> This one is more akin to the Atmel: <S> You can see the two dots are different sizes. <S> The identifying one is the smaller one of the two. <S> The larger is the moulding artefact. <S> So in summary: Large and shallow = not it. <S> Small and deep, concave, or <S> otherwise not just plain large and shallow = it. <A> Wow what poor packaging design. <S> Looking at the datasheet revealed nothing... But looking at the picture on their website <S> I see the two circles you're talking about. <S> I would choose the smaller one that is more concave not the larger flat one. <S> That's more inline with the industry uses for pin marking. <A> The first pin of an LQFP package is in the corner. <S> But to be sure, see if the datasheet offers other information. <S> You could also add a link to the datasheet into your question. <S> A white, or other color <S> , dot indicates a post processing step: something that has been done to the chip after markup. <S> For example, it may have been programmed (if it has nonvolatile memory), fused (to allow other product variants) or retested. <S> Looking at the picture at http://www.atmel.com/devices/SAM4E8C.aspx?tab=documents , the small dot on the left is the pin 1 marker, the larger circular flat area is just for mechanical handling of the package.
The larger dot in the upper right is a moulding artefact - the one in the lower left is smaller, and they have even gone to the trouble to accent it by drilling a further hole in it.
Why do microcontrollers have so many functionalities at once? Being fairly new in the field of electronics, and being a computer scientist, it strikes me as a bit odd that almost every single microcontroller that I've come across thus far is fitted with: Multiple timers, with multiple trigger modes Multi-channel PWM Multi-channel ADC Multiple hardware supported communication protocols Multiple external interrupt pins EEPROM Sometimes DAC and analog comparators It seems, at least to me, a bit wasteful to jam all of this specialized (even through commonly used) equipment inside the microcontroller, if I'm only using 1/50 of it. Even if I wanted to, I'd only be able to use, say, 1/10th of it, as pins are often mapped to many of these features at once. Why are they jammed up, i.e. what's the argument of not just using external chips or even just software implementations? Are there any ATMega-like processing chips, i.e. chips with a lot of processing power instead of PWM, ADC etc.? <Q> Those peripherals are necessary for most real-world applications of microcontrollers, Not all of them, but leaving out any subset would decrease the market for the microcontroller. <S> For example, the Scenix microcontroller family which was very fast but had very limited hard peripherals was a resounding market failure. <S> That's really bad news for those of us charged with specifying microcontrollers- a complete redesign in order just to keep your products going (okay, maybe good news if you're brought in to replace the person who specified the oddball micro and subsequently paid to clean up someone the mess they left, but that's not great fun either). <S> Much of the area on the chip is taken up by the memory and the bonding pad/drivers and the CPU so those little hardware peripherals are pretty minor. <S> If you need more processing power, leave the world of 8-bit micros behind and move to one of the 32-bit ARM cores which are generally used in microcontroller-like situations but have more of the chip area devoted to the processor and often to the memory. <S> Or a DSP or FPGA can offer orders of magnitude more processing power, suitable for video processing, high end audio, high end instrumentation and data acquisition etc. <S> As it is, the processing power of modern 8/16 bit micros is not all that bad, and often we 'waste' it by using a high-level language to gain other advantages (faster development and prototyping, use of commercially available libraries such as protocol stacks) rather than tediously hand-crafting bespoke code in assembly. <A> I think there are two main reasons. <S> The first reason is that the cost to develop and prototype a microcontroller is huge -- so much so that low-end members of a product line are usually the same hardware as the high-end models, just with certain features disabled or not specified. <S> The second reason is that microcontrollers are designed for control , not processing. <S> Usually the thing you're controlling will have some analog sensing capability and some analog control mechanism. <S> The sensors can connect to the ADCs or (if they have built-in electronics) they can communicate via SPI or I2C. <S> The control mechanism could be driven by a DAC or a PWM. <S> That's where a longer-range protocol like CAN comes in handy. <S> Finally, timers and external interrupts are useful for all kinds of stuff, and even general-purpose computers rely on them heavily. <S> External components would cost more, take up more board space, and be less convenient from a logistics standpoint. <S> You would also have to worry about compatibility and reliability. <S> System integration is not trivial. <S> Emulating these functions in software (aka "bit-banging") is usually not feasible since it would require a much faster processor, especially if you want to use more than one function at once. <S> That means more cost and more power consumption. <S> Imagine trying to create a 1 MHz PWM function on a 50 MHz CPU, for instance. <S> After the overhead from the timer interrupt and conditional branches, you'd be lucky to have more than a couple dozen cycles left over to do all the work! <S> If you want a chip that's more focused on processing power, try a DSP or an actual microprocessor. <A> If you're running a program on the CPU you are already using 90% of the chip! <S> Counters and UART/SPIs <S> and so on <S> are relatively trivial pieces of hardware occupying very little chip area. <S> ADCs and DACs <S> maybe a bit more, PWMs are just counters, so you're paying noise-level prices for most of the peripherals. <S> At least, for their silicon. <S> The pins they use are another matter - so pick the smallest pin count package that does your job. <A> It maximizes available market share for a part while minimizing the development and support cost. <S> Plus relatively speaking an I2C or a SPI block is pretty small area wise. <S> It's better for them to put their development team on a part that includes a bunch of features that can fit into all different applications, than to try and make tons of parts with very specific features sets. <S> While you're in the micro controller world you'll almost always see the process accompanied by some "jazz" that fits with where they think it should be in the market. <S> Starting with 8bit MCUs and going up into the general purpose ARM processors. <S> Again though, the area that those peripheral functions take up is small compared to the area the processor core takes up (well maybe the ADC has some area to it). <S> It's not like <S> if you ripped out those sections then you really could make more powerful processors.
Most of the time it's cheaper to make one chip that targets many markets instead of many chips that each target a small market. A popular paradigm in control systems, distributed control , involves many small control systems communicating with each other.
Why implement microcontroller in FPGA? I am currently "investigating" FPGAs, what they can do, how they do it etc. In more than one place ( for example here ) I have seen projects that implement a simple microcontroller with FPGA. So my question: I would like to know, what is the purpose of doing such implementations? Why use a microcontroller implemented in FPGA instead of having a micro on board? What are benefits? And perhaps also what are downsides? <Q> If your project is going to use an FPGA for the grunt work, and it has the spare capacity, why would you go to the expense of an extra chip when you can just implement it in the FPGA? <S> For many procedural control environments it can be considerably easier to implement the required setup in a language like C than trying to do it in VHDL or Verilog. <A> Benefits: blazingly fast interface between the microcontroller and any custom interface or <S> I/O logic on-chip. <S> customizable processor and debug interfaces also, often easier control logic than writing the control code with, say, VHDL Downsides: <S> Possibly more expensive FPGA is needed to fit both the microcontroller and the custom logic, compared to just having the custom logic on the FPGA <S> Possibly more difficult to implement, especially with memories and if the core is complex, than a ready-made microcontroller on a separate chip. <A> In extension to the answers of Majenko and PkP: This trend of embedding a CPU into the FPGA design has lead to several heterogeneous systems like: <S> Xilinx' Zynq-7000 family Altera's Arria/Cyclon/Stratix SoC FPGAs MicroSemi's SmartFusion FPGAs <S> There is also an Intel Atom + Altera FPGA chip on the market: <S> http://www.altera.com/devices/processor/intel/e6xx/proc-e6x5c.html <S> Most free micro controllers for FPGA suffer from a bad tool chain support. <S> Embedded ARM CPUs come with trace/debug support, compilers (gcc tool chain) and full linux support. <S> Here is a survey presented at FPL 2014: http://dx.doi.org/10.1109/FPL.2014.6927482 Edit 1: There is also the class of PSoC (Programmable System on Chip) devices from Cypress. <S> These devices include a micro controller (M8C, 8051, ARM Cortex M0 or Cortex M3) and classic SoC integrated I/ <S> O controllers or devices (I²C, SPI, Timer, CAN, DAC, ADC, OpAmp, ...) <S> and a programmable part. <S> This part is not as fine grain programmable as classic FPGAs, but it can be used to implement addition <S> I/ <S> O controllers or built hardware accelerators. <S> PSoC allows you to use analog components in your design. <S> http://www.cypress.com/psoc/?source=CY-ENG-HEADER <S> PSoC overview: (source: electronicdesign.com ) <A> If you just needed a microcontroller, and didn't have an FPGA, it would be unusual to use a FPGA with microcontroller firmware. <S> However, not all projects grow in that direction. <S> Many tasks have clear need for a FPGA, but eventually come across a task which really isn't suitable for a VHDL solution. <S> Sometimes a problem is simply best handled by a general purpose CPU. <S> Or, sometimes it's the other way around: <S> some tasks are simply not suitable for a general purpose CPU -- they need parallelism. <S> At that time, you have a choice. <S> You can either add an additional chip to your device, or you can realize you have a bunch of spare gates on the FPGA you're not utilizing. <S> License a little IP, and you can have a working general purpose CPU in no time! <S> Another interesting detail is that you can customize some microcontroller firmwares. <S> I know of projects which embedded a Power PC, but stripped out all of the gates needed for floating point support, and a good chunk of the branch prediction. <S> This made it small enough to fit side-by-side with the VHDL based firmware. <A> There are several valid reasons for instantiating a microprocessor or microcontroller in an FPGA. <S> Here are three: <S> You just want to learn about the operation of a processor. <S> FPGAs give you infinite ways to probe what's happening inside the processor as it executes code. <S> This is just for learning. <S> You are implementing a big system that requires the hardware-level speeds of an FPGA (faster than software executing on a microprocessor) but your design requires a complex state machine, which is more easily implemented using software running on a simple processor like the Xilinx PicoBlaze than in a hardware FSM. <S> Note that a PicoBlaze can run as fast as 240MHz in the latest FPGA process technologies and that the PicoBlaze processor executes an instruction every two clock cycles, <S> so you get a fast, consistent state machine that's easily programmed in software. <S> Expanding on (2), you need a state machine that can handle interrupts. <S> Processors are really good for this because they already know how to safely save and restore state before and after servicing the interrupt. <S> Here is one caveat: If you want a fast processor with a standard instruction set and a big development ecosystem, then you want a fast, hard-core processor like the two ARM Cortex-A9s in a Xilinx Zynq <S> SoC. <S> The FPGA fabric in the Zynq SoC still allows you instantiate more processor cores in programmable logic but the ARM Cortex-A9s can run standard operating systems such as Linux and standard IDEs such as Android. <S> In between the ARM Cortex-A9 and PicoBlaze, there are many soft processors you can implement with programmable logic available from many sources. <S> Some people like to roll their own processors and that's a great educational activity. <S> However, microprocessors need software development tools and creating/debugging those tools requires orders of magnitude more effort than creating the processor itself. <S> You must always trade off the possible benefit of a custom microprocessor against the time and effort needed to create/debug the processor core and the tools. <S> Full disclosure: <S> I work for Xilinx <S> but I'm pretty sure I didn't state that FPGAs are always the solution. <S> If a 50-cent microcontroller can do the job, you're better off using that. <S> FPGAs and Zynq SoCs are for projects that require heavy lifting beyond the abilities of microcontrollers. <A> Sometimes you might use an FPGA because you have software that runs on a long-obsolete and unavailable physical processor that you want to resurrect. <S> Whilst not pin-compatible (although DIP-style mounts have been seen) <S> this lets you be cycle accurate. <S> A pure software emulation on a commodity microprocessor is unlikely to be so. <S> For example apple2fpga
By adding the microcontroller into the FPGA you get the best of both worlds - the power of the VHDL / Verilog etc for the logic and interfacing systems, and the simplicity of a procedural language for the core control and management systems.
Providing house wall switches with 3.3v/5V supply? It's a bit non-technical, but I'd love to hear the opinions of the pros. I'm trying to figure out what is the best way to connect my home's wall switches (lights, etc.) to 3.3V/5V. The plan is the embed a tiny wireless module and a relay into each switch's housing, and allow the switch to be remotely controlled. I can think of three options to do that: Try to find a small and cheap Chinese phone charger and copy its design Deploy 3.3V/5V wires in the walls, next to the mains wiring Using batteries The 1st option is preferred, since I don't want to handle maintenance or do major infrastructure change. I looked into solutions from Power Integrations but not sure if it's compact enough. <Q> My opinions: Don't trust a cheap Chinese design. <S> They are sometimes lethal. <S> Nah, you'd be changing them every couple of days. <S> What I would do: Just buy the plug-in remote switches - they're 10 a penny these days. <A> All this stuff already exists. <S> Important thing to watch for is the approval for your country. <S> Typically home made, devices can't be permanently installed in the home. <S> For example, In North America UL or CSA approval is required. <S> Any approved device was tested for transient spikes, fire suppression, and anything else and was deemed safe. <S> Even a device approved elsewhere may not be used, if your countrydoesn't recognize the testing agency. <A> If what you want to do is remotely short the switches, you usually don't need to tamper with them. <S> Same goes if you want your relay in series with the switch. <S> Since that's probably a rather central location, you can use a single psu for several relays. <S> Less space, less maintenance, less trouble. <S> Again, be sure to tamper with mains voltage only if you are competent enough - those nice colorful wires do contain death. <A> Option 1 may not be possible due to no neutral or earth being present at a wall light switch. <S> It will depend on the applicable regulations, the electrician's preference and a bit of luck. <S> Here in New Zealand, it is common for a lighting circuit to run phase, neutral and earth to the ceiling rose, with a 2-wire cable from the rose down to the switch. <S> One wire will be phase, and the other is the load. <S> That makes it difficult to power electronics that physically live in the switch, especially when the switch is on. <S> An option is to use a commercial infrared controlled switch, and have your control system emulate the remote. <S> I use something similar to control a Mitsubishi heatpump. <S> There are articles on the web on how to analyse and re-create these protocols. <S> This has the huge advantage that you are not working with mains, and there is no insurance problem.
Copy a good design from a respectable source Depending on your country there may well be regulations preventing you from running low and high voltage cables together. Just put your relays in a safe (implying, but not limited to, not too crowded) box, close to where the wire to the switch is connected to mains and wire to plug/light.
Where do small gas engines get the current for their spark plugs? While technically not an EE question, until StackExchange adds a regular Engineering section, EE was the closest fit. On small gas engines like those in weed wackers and lawn mowers, where do the spark plugs get the current necessary to create sparks large enough to set fire to the gas fumes? <Q> There are other possibilities, but the usual low-tech approach is a magneto. <S> Then, at exactly the right moment, a cam presses a microswitch to open that circuit, interrupting the current. <S> The resulting dI/dT creates a large V in the primary of a transformer, which is transformed in the secondary to sufficient voltage to make a spark. <S> As Dave says,there may not be a transformer, just the coil : or <S> the coil itself may be the primary of the transformer, for economy. <S> Only in the vaguest sense is this the same thing as an alternator : the latter aims to deliver useful quantities of relatively steady power at an approximately constant voltage; the magneto only produces one short pulse per revolution, (sometimes every second revolution in a 4 stroke - the contact breaker can be driven off the camshaft) with no more power than the spark plug needs. <A> Small gas engines have a powerful permanent magnet built into the flywheel, which swings past a coil on each revolution of the crankshaft. <S> This is timed to occur roughly about the time that a spark is needed, and a set of "points" (a switch driven by a cam on the crankshaft) provides the precise timing, opening the circuit and causing the coil to produce a high voltage pulse to the spark plug. <S> Essentially, the magnet "charges" the coil with energy directly, rather than using the 12V DC bus that you have on larger engines. <A> Re: the "wasted" spark of the magneto, mounting the magnet on the flywheel for four stroke engines does produce a wasted spark. <S> This is of no real consequence unless a charge remains unignited from a previous compression stroke. <S> It is just far simpler and more accurate to use the flywheel rather than a reduction gear (cam say). <S> The velocity is greater, there is less lash, and the wiring harness is less cumbersome. <S> Even non-magneto four stroke engines as still fitted to some motorcycles will have a wasted spark, just because it is simpler and more reliable to run pickups from the flywheel.
A permanent magnet is mounted in the flywheel, so that at approximately the right moment, it flies past a pickup coil at high speed, inducing a current in a circuit including that coil.
Standard way to tension a string using a motor? I am dealing with a design that requires me to tension a small string, about 5 inches long with a diameter of about 1-2 mm, and then keep it under tension (lock it in place) without the use of additional power. Is there any standard way to tension a string such as this using a motor or electronic components, or does anyone know if components exist that are available for preview from manufacturers that will do this? Let me quickly clarify the tensioning requirements here with a visual aid. I'm looking for something like this: I need to program a microcontroller to activate/deactivate the black body in the image. When activated, it should tension the string up to a maximum amount of tension and then lock it in place after some period of time while supplying power to it. When it is activated again (while it is in the locked state), it should unlock the string. Is this possible, and how? Thanks in advance for any help! It is greatly appreciated! <Q> Use a motor driving a worm-gear reduction with the string locked to the output shaft. <S> In order to tension the string, turn the motor ON in the proper direction until the required tension is achieved, then turn the motor OFF. <S> The worm gear will then keep the string under tension with no power applied to the motor. <S> In order to release the tension, turn the motor ON again, for a while, but in the opposite direction. <A> It seems the simplest way to do this would be use a solenoid. <S> When powered, it will pull the string taut, and when depowered it can go loose again. <S> Putting a tension spring between the solenoid and the string will allow you to set the tension. <S> Something like this might work: http://au.element14.com/multicomp/mcsmo-1253l24std/solenoid-open-frame-pull-24v/dp/2008794 <A> Similar to air-reduction brakes, where the typically imagined function is done by a spring, which must be actively opposed when its full function (wheels skidding on dry pavement when fully loaded) is not wanted. <S> Same as #1, but with a weight instead of a spring. <S> Offers a different relationship between force and displacement than a spring. <S> Powered tensioner + brake. <S> The brake operates like #1: applied by a spring, must be actively released. <S> This list is by no means exhaustive, but it might give you some ideas. <A> When you said latch in place, I immediately thought Ratchet and Pawl .
Depending on your application, there may be several ways to do this: Spring tensioner + powered release.
Op-Amp based power supply, what powers the Op-Amps? I have seen some schematics of power supplies. They contain Op-Amps inside to implement negative feedback. I was wondering, hmmmm what powers the Op-Amps so they can actually work and implement negative feedback? Unlike diodes and transistors, the Op-Amps need power supply and that also would have to be a stable one. So how are Op-Amps inside a power supply powered up? <Q> "Op-Amps need power supply and that also would have to be a stable one. <S> " Not really. <S> The typical/cheap linear regulator (e.g. LM317) conceptually looks like the diagram below (taken from Clayton and Winder's Operational Amplifiers <S> so it's somewhat authoritative.) <S> The error-magnifying opamp (inside) is simply powered by the unregulated supply/input. <S> The output of this opamp will be affected by variations in its (unregulated) supply in proportion to its PSRR. <S> Nevertheless the output regulation it provides is quite good. <S> You can find actual LM317 circuits (down to transistor level) on the net, but don't ask me to analyse those here. <A> That's a good question. <S> In the case where they're powered only by the voltage they control themselves, there must be provision given to allow the circuit to start before the op-amp is guaranteed to be functional. <S> For example, for a linear regulator you might have a resistor to allow the output to source current, and the op-amp would throttle the pass transistor back as it comes alive. <S> Edit: As Nick Alexeev mentioned in his comment, sometimes there is an entire auxiliary supply (switching or otherwise) to power the control circuitry. <S> This is especially likely in very high power switching power supplies. <A> To power up the op-amp by the stable output voltage controlled by the very op-amp is a clever trick that resembles the bootstrapping in the process of starting up a computer... and as I can see, quantum231 is impressed exactly by this idea... <S> But here the main problem is not from where to power up the op-amp... <S> but sooner the network producing the reference voltage... <S> especially in the simplest case (a resistor and Zener diode in series). <S> So, in this "bootstrapped stabilizer", this network should be supplied by the output voltage as well. <A> Op-amps have a good Power Supply Rejection ratio (PSRR). <S> I looked up some common op-amps and for a LM324 op-amp you get between 65dB to 100dB and for a LM741 Op-amp it is between 86dB and 96dB. <S> What this means is that if there is a 1V ripple on the power supply, the output would have in the region of a few micro-volts error ripple on the output for an op-amp with a minimum figure of 65dB. <S> For op-amps with a higher PSRR this would give better results. <S> This PSRR figure is achieved largely due to the very stable current sources in the op-amp.
They're powered by the voltages they control themselves or by the unregulated input (or sometimes a combination of the two).
Effect Of Electronic Devices In Close Proximity From reading other posts, it seems like electromagnetic induction is the greatest threat to electronic devices these days with either traditional HDDs or newer SSDs. Since current in a wire creates an electromagnetic field, I assume most electronic devices create their own field (albeit probably a weak one). Electromagnetic induction could be created by moving the devices around each other in a rapid fashion. Is there any danger to electronic devices (including their memory/storage and microchip functionality) when they are placed in close proimity to each other... say stacked on top of one another while operating? Bonus Points: Assuming I was able to measure the electromagnetic field, what values would cause concern? <Q> This is a pretty broad question... <S> so the answer is... <S> it depends how intense the EM field is. <S> At one extreme, you could have a very strong EMP like the one caused by detonation of a hydrogen bomb ! <S> On the more mundane level, the EM interference that electronic devices cause to each other is commonly a concern and studied under the (obvious) name(s) of electromagnetic interference / electromagnetic compatibility . <S> I also agree with the comments below your question that while this is a concern, whether it is the biggest... <S> it depends on the application. <S> You're more likely to have issues with heat dissipation (or rather accumulation) when you pack a lot of devices like those close together. <S> Also, (mutual) vibration is a common concern in HDD arrays; the RAID-grade HDDs will typically have some firmware features not present in desktop HDDs to better cope with that. <S> EDIT: <S> As user/consumer there is one (software/firmware) bit that you can do to limit EM emissions from computing (and similar) devices: make sure your computer has enabled spread-spectrum clock generation its BIOS/firmware; it should be on by default precisely due to EMI regulatory compliance issues. <S> Since you (now) ask in the comment below about a cell phone affecting computer components... <S> that's a more dicey issue. <S> A cell radio will emit a lot more than (other) computer components... by design! <S> It can certainly affect some critical-care electronic equipment ( although almost exclusively older ICU equipment/designs ) and supposedly electronics on-board airplanes (again a controversial issue ; the fairly recent [2013] relaxation of FAA rules still prohibits the use of the cellular radios inside the [smart]phones , however <S> the even more recent 2014 decision of EASA does allow the cell radio to be left on) etc. <S> Obviously the cell phone itself (which if it's a smartphone is basically a computer with flash memory like in a SSD etc.) <S> works well enough in the presence of its own cell radio, but I honestly don't know if typical desktop computer components get tested (by their manufacturer) for correct operation with a cell phone radio right on top of them. <S> Maybe you should ask that as a separate question. <A> This is at the heart of FCC Part 15 regulations for consumer (Class B) <S> electronic devices with a clock rate of 9 KHz (note: not MHz) and greater. <S> This applies to devices which are unintentional radiators, such as computers (i.e. they are no intended to produce radio waves, but they do so anyway) <S> : Operation is subject to the following two conditions: The device may not cause harmful interference, and The device must accept any interference received, including interference that may cause undesired operation. <S> 'Accept' in this context means that the equipment must be able to tolerate without catastrophic failure any interference that is thrown at it, even though it is not guaranteed to function normally under these circumstances. <S> Normally anyone going to market with an electronic device <S> has it tested that it meets these conditions. <S> Such testing can cost several thousand dollars (but not as much, say, as you would incur if the product contains intentional radiators, such as cell modules or Bluetooth modules, which call for a lot more testing.) <S> Advertising or selling a electronic product that fails Part 15 can subject the manufacturer to severe fines: $100,000-$200,000 plus $10,000/day per violation. <A> No. <S> The field emitted by most devices is very small, and there are legal limits on high-frequency EM emissions. <S> Metal casework goes a long way towards absorbing emission and radiation. <S> The exceptions are things like high-power radio/TV transmitters and train-sized electric motors. <S> However, if noisy electric devices are using the same power supply as sensitive devices, they may cause damage through spikes and surges. <S> Again this only applies to extreme cases and not normal consumer electronics. <S> Consumer electric tools are generally fine, but it's probably not a good idea to plug your laptop and arc welder into the same supply.
The computer components that you mention (HDD, SSD) almost certainly have been tested for both EM emissions and susceptibility (to those), so they're very unlikely to affect each other that way in close proximity.
How to change the frequency of AC supply? Im using an inverter to convert Dc into Ac from battery. I want to control the frequency of the alternating current ie., increase and decrease gradually (eg: 1Hz 2Hz 3Hz... 60 Hz). Is it possible to control the frequency? <Q> Maybe consider a single-phase motor speed controller like this one . <S> According to the spec it runs from 48Hz to 62Hz and can produce an output frequency of 0 to 120Hz with 0.1Hz resolution. <S> Output power is about 1 h.p. <S> There will be many options and alternatives in this type of product - this was top of the list on google when searching for "single-phase motor speed controller". <A> An inverter designed to produce AC power is almost always designed for a particular frequency, 50 or 60 Hz. <S> They typically contain a transformer to assist with the voltage conversion, and that transformer will be very inefficient at any frequency below the design frequency. <S> If you need high-powered AC signals at 1 Hz, 2 Hz, etc., you'll need to use a completely different approach. <A> Most are three-phase, but you can get single-phase also. <S> A VFD works by rectifying the incoming AC directly (no transformer or anything) into high-voltage DC, then chopping up that DC to approximate a sinewave for each phase out. <S> The internal control circuitry is also powered from the high-voltage DC via an internal DC-DC supply. <S> So, if you have a high-voltage DC supply already, you could connect it directly to the terminals on the drive labelled DC and leave the AC disconnected, or you could give it AC from a sinewave inverter (less efficient, must be sinewave because of the peak voltage). <S> Then if you want a true sinewave out (most motors don't care), you'll need to add an LC filter after the drive. <S> Go to the same electric supply and look at load reactors for the L and power factor correction capacitors for the C. <S> In all of this, remember: <S> NO TOUCHY!!! <S> :-) <S> Or, as Adam Davis suggested, you could use an audio amp. <A> VFD's (Variable frequency drives, also known as variable speed drives) are extensively used in industry to control AC motors. <S> They use a rectifier to convert incoming three phase AC to DC, then use six IGBT's (isolated gate bipolar transistors) to pulse on and off to simulate the AC output to the three phase motor: <S> Wikipedia will explain a lot better: VFD's
As the other two answers suggest (and Javi does a very good job explaining the output), you could go to any industrial electric supply place and get a Variable Frequency Drive (VFD).
Lumen difference between CFL and LED How much watt I need for LED bulb to get the same amount of light produced by 32 Watt CFL bulb? So, comparing lumen is the right way to find out the difference between these two light source? <Q> To get an LED that looks about as bright as a 32 watt CFL, find how many lumens are radiated by that CFL, and look for an LED with a similar number. <S> There is also a quick rule of thumb. <S> LEDs and CFLs are approximately equal in efficiency (the most efficient LEDs or CFLs achieve around 100 lumens per watt), so a 32 watt CFL will require approximately a 32 watt LED to have equal brightness. <S> Of course this is just an approximation, and there's wide variance in the efficiencies of individual CFLs or LEDs, but this will get you in the right ballpark. <A> Just lumen comparison is not enough. <S> A CFL will emit X lumens but it does that in all directions. <S> An LED emitting same X lumens may give a higher lux or lumens/sq area depending on its photometry or lensing design. <S> With an LED you get the light where you want it and not in all directions. <S> Although there are now LED lamps that more or less emit in all directions but to my mind that is a waste and the lamp design is not exploiting the LED feature or being able to direct the light where most needed. <S> This is like taking a shower in a shower head that is spherical and emitting water in all direction as opposed to a flat shower head giving you the water where needed... :) <A> Watt shows how much power it consumes. <S> Lumen shows how much light flux is output by a light source. <S> Lux shows how much light a human eye perceive: <S> \$\text{lumen} = \text{lux} <S> \cdot <S> (\text{area})^2\$. <S> Efficacy shows lumen per watt. <S> You can compare two source by lumen in terms of amount of light. <S> If they are both commercial light, lumen value should be already defined on its box or specification on the producer's or seller's webpage. <S> It is not possible to say what LED you need without knowing the LED's lumen/wattage/efficacy and CFL's lumen or efficacy. <S> You use CRI (color rendering index) in terms of light quality which you may not find it on the specs.
Yes, comparing lumens of the two light sources is the right way to compare their perceived brightness.
Are there good free software analog filter design tools? If not, why? I'm finding myself needing to do a fair bit of analog filter design. Mostly passive LC ladder filters. I honestly don't know much about how to design them by hand, I've been using the Genesys tool. I'm also getting into using a lot of free software for my work. I find the work flow is generally faster and more enjoyable. So, I've been looking for a free software analog filter design tool. It's quite easy to design digital filters with Python, but there doesn't seem to be much for analog filter design (and I mean choosing the values of capacitors and inductors). So, am I missing something? Is it straightforward to realize an analog filter with these tools? If not, why does nothing like this exist? What are the typical algorithmic methods for designing analog filters? *EDIT: What I mean is free as in freedom software. I'm aware of all the vendor provided tools, I don't like them. I usually find them much more difficult to work with. And, I'm also just curious now about why there doesn't seem to be much open software in this area. <Q> There are a number of online tools though they are often limited. <S> Here is a list of online and free desktop tools Active filter web based tools <S> TI <S> WebBench Filters <S> Analog Devices Filter <S> Wizard Active filter desktop design tools <S> Though official links to original sources of it seem to have vanished . <S> FilterPro by TI <S> FilterWiz Lite by Schematica <S> Passive filters <S> AADE Filter Design tool by KE5FX (Ham radio) <S> Simulation <S> I would always recommend simulating the software generated filter with real life simulation models of the components you intend to use for your implementation. <S> Use a different simulation tool that the generation tool to limit the possibility of software bugs effecting your design. <S> If you are not dealing with purely sinusoidal signals remember to consider the step and impulse response. <A> Tina-TI <S> which is a SPICE-based simulator. <S> It has a menu in it which allows you to compute the frequency response of a subcircuit and view a graph. <S> SPICE will certainly allow you to confirm a filter design once you've chosen values. <A> Her is a very versatile PASSIVE filter design tool: "AADE" from AADE.com. <S> Using this program you can design all classical RLC filter topologies. <S> For ACTIVE filter projects I prefer FilterPro (www.ti.com), which is available for free. <A> I use microcap and there is a student version available. <S> My colleagues use LTSpice because it is free <S> but, when I want to go straight for values in things like sallen key op-amp filters or LCR filters I use this webpage from Okawa. <S> They do RC, RL, RLC (3 types), sallen key HP and LP (2nd and 3rd order with and without gain) and multiple feedback filters (2nd and 3rd order) <S> - covers most folks needs I reckon.
FilterLab by Microchip FilterFree from nuHerts FilterCAD3 from Linear Technologies (Now Analog Devices) Some of the IC vendors offer helpful tools; last time I did a bit of simple RC filtering I used
Driving one LED from audio signal only with pnp transistor How it's possible to turn on/off a single LED with the left (or right) sound channel of an audio jack and a pnp transistor. Everywhere npn transistors are used. Like here: Driving LEDs from audio signal LED Color Organ Triple Deluxe I'm very new to this topic and need the led control for a simple project of my computer science master thesis. My uncle gave me some old pnp transistors and I built something like this: and this: . When I use my fingers the LED glow. But when I connect my audo jack and play a song, nothings happens or the LED glows very very (not visible) low. I thought, that the 5V will give the power although the audio jack has not enough power. Are npn transitor needed or is there a very simple way to use pnp transistor to let the LED glow, when a smarthone plays a sound throuh the audio jack? A simple circuit diagram would be helpful. (image source: http://www.talkingelectronics.com/projects/TheTransistorAmplifier/TheTransistorAmplifier-P1.html ) <Q> If the output voltage is high enough you could consider an emitter follower which has a high input impedance β*Zl and therefore hardly loads the jack. <A> This means that you can choose any point you want to be ground. <S> PNP and NPN are mirrors of each other, as are P- and <S> N-channel FET's. <S> If you mirror all transistors and swap the supplies, it usually works the same way. <S> Put those two together, and you can adapt most circuits to use the opposite type. <S> It doesn't always work because of slight physical differences, so in some cases you might need a different size package to get the same performance, but that's more for power applications than small signals. <A> Your problem is not the voltage, it's how you are connected. <S> Transistors are driven ("turned on") by voltage across the base and emitter. <S> That's the flat side and the arrow in the schematics. <S> So, instead of trying to connect from base to -6, connect to base and +6. <S> It will also be a very good idea to connect a 1k resistor from the base to the input.
If you're running from batteries, or an isolated power supply with nothing else attached, then there's no inherent ground connection.
How can I sense if a cane is being held upright or fallen down? I am trying to make a little wireless-connected gizmo to attach to my grandfather's walking cane. The idea is that when it senses the cane has fallen down, it would alert/call one of us so that we can rush to him if we're not nearby. The question is: What sensor or combination of sensors could I use to reliably differentiate between these two scenarios? NORMAL situation : The cane is being held upright (or at only a slight angle from vertical) and used normally. versus CRITICAL situation : The cane has been let go of, falls down and continues to lie on the floor/ground Obviously, occasional false positives would be fine, but detection misses (false negatives) should be minimized. I am thinking a combination of two things might help: --sense whether my grandpa's hand is holding the cane or not (perhaps a light sensor that is blocked when the hand is on it?) --sense whether the cane is upright or has taken a fall (perhaps an accelerometer+gyroscope+vibration sensor to determine orientation and shock events?) <Q> I agree with one of the above replies in that you need something (probably two accelerometers) to detect the angle at which the cane stands (calibrated at the factory if you are industrializing this). <S> This way you have a continuum of what angle the cane is at, relative to upright. <S> This gives a distinct advantage over a simple tilt switch for the following reasons. <S> 1. <S> You can calculate the angle with two accelerometers. <S> With a tilt (on/off) switch, you cannot2. <S> Not only can you calculate the angle with two accelerometers, you can detect the rate at which the angle changes relative to the cane standing up straight. <S> This is key <S> as you can then at least have the information to characterize what the rate of fall looks like by a simple drop test and base your fall detection algorithm model on that. <A> A very simple solution is a tilt sensor such as the AT-407 from Sparkfun. <S> It consists of 2 steel balls inside a small tube and 2 leads. <S> When the tube is tilted, the balls separate and continuity is lost between the 2 leads. <S> It costs only $1.95. <A> The most reliable way would be a gyro+accel combo (like the mpu6050 from invensense). <S> You can just use their DMP stuff to get a roll/pitch/yaw angle for the sensor, or do the work yourself by running the data through a kalman filter. <A> Seems like an accelerometer and a small microcontroller (a PIC for example) could do this quite easily. <S> You could then set the angle at which the alarm goes off in the code. <S> With the light sensor approach you'd need to be careful that the area stayed clean. <S> Otherwise if he covers the sensor with crud it will always indicate that the cane is vertical even when it is not. <S> With a vibration sensor you'd have to get creative about detecting the impulse event (when the cane falls) <S> and then latch the output so it continues to sound the alarm even after the can has come to a rest.
You don't need a vibration sensor, as you can get that from the accelerometer data too (just look for impact events).
Wheatstone bridge why not use a voltmeter? I have been reading up on the limitations of a Wheatstone bridge, one of which is that for high bridge resistances any imbalances are hard to detect because of the small current that flows through the galvanometer. Why can't we just use a voltmeter instead? Is it because a voltmeter is less accurate or something?? <Q> A galvanometer could be built that sensed very small current changes. <S> These days "in modern times" with circuit advances being made in semiconductor devices that have ability for input impedance levels up to the 100s if not 1000s of megohms it is possible to sense a change in the balance of a bridge without having to use the classic galvanometer mechanism. <S> This allows bridges to be built with a lot more flexibility on the resistance ranges that can be used in the bridge elements. <S> There are still practical limitations though. <S> If a bridge is located some distance away from the sensing circuit and the bridge resistance is too high it can result in noise pickup from the environment which will can drive proper sensing into impracticality. <A> At the time the Wheatstone bridge came about high impedance VTVM, FET or DMM were not around. <S> Passive analogue meters need to get the energy to move the needle from the circuit itself. <S> There was simply no other option available. <A> "Why can't we just use a voltmeter instead?" <S> Nowadays we do. <S> You are reading some old books if they talk about using galvanometers with wheatstones. <S> Such measurements imply that you are reading a fairly stable DC situation, and pretty much nobody in their right mind would use a measurement bridge for that. <S> If nothing else, a decent DVM will give much better resolution and accuracy for less money than a high-precision bridge, and will do it much faster, too. <S> Don't get me wrong. <S> Back in the day, bridge/galvos were the best way to make certain types of voltage measurements. <S> Those days are long gone. <S> ETA: Now, bridges by themselves are something else - they are widely used for sensors such as strain gauges. <S> Just not with galvanometers to do the measurement.
The likely reason that the classic Wheatstone bridge is showing that a galvanometer is used to measure the bridge imbalance is that "back in the day" this was the most sensitive way to measure a very small bridge change.
Do components have an un-used lifespan? Lets say for example, that I had a box full of transistors, resistors, capacitors, diodes, leds, this and that, and left it in a cool, average environment for lets say... 50 years. Do these components have a lifespan while been unused? Do the insides end up degrading and become unusable like cars? Or do they just... Sit there? I'm asking this, because I just got a thought that struck me, being that if you kept today's components, (and kept them for 50 years) will you be able to use them in the future? <Q> Yes, they will degrade little by little; they will grow tin whiskers, maybe oxidize little by little because their casing will never be 100.00% sealed. <S> Also the pin plating will oxidize, so you'll have to treat them before soldering. <S> Also moisture can creep in, little by little... difficult to say if it would affect discretes like transistors a lot, but ICs will suffer. <S> Oxidization plays a role in IC degradation if the passivation layer has defects, but the killer is metal whiskers between pins, pads and bond wires. <S> It doesn't cause gradual degradation; basically the chip works fine until finally a whisker causes a short circuit between pads and the chip dies. <S> Image: <S> whiskers on a piece of zinc. <S> Source: http://commons.wikimedia.org/wiki/File:Zinc_whiskers.jpg <A> In particular, electrolytic capacitors and batteries will tend to be dead (especially the latter). <S> Rubber will tend to deteriorate (DVD door or cassette drive belts) and speaker cones can also deteriorate (my Keil AMT speakers need re-woofering). <S> Electrolytic capacitors tend to dry out. <S> There's plenty of electronics around from 1965, and things have not changed so much in basic technology.. <S> it's generally salvageable but perhaps not fully functional out of the crypt. <S> Something like a UPS that is mostly battery cost-wise is probably scrap for economic reasons, even if 95%+ of the parts are still fine. <S> Semiconductors are usually pretty much immune to aging if they're kept cool and not powered. <S> The biggest reason why parts have a <S> best-before date is corrosion that makes them difficult to solder reliably. <S> That's not a problem if they're assembled into a product, but if you've got reels of diodes, for example, the diodes may be just fine, but so corroded they cannot be used reliably (at least not without some kind of uneconomical rework). <S> Storing them in low-humidity cabinets and using sulfur-free packaging (brown cardboard boxes are often bad) will help. <A> Do these components have a lifespan while been unused? <S> Do the insides end up degrading and become unusable like cars? <S> Or do they just... Sit there? <S> Sure, this lifespan is called shelf life . <S> What happens when it passes? <S> Here is an analysis with nice pictures. <S> Here is another one. <A> In electronic reliability engineering the storage environment and temperature influence the reliability of the component and his lifetime, take for example the MIL HDBK 217f standard, the lifetime of the electronic component depend on the working environment (storage environnement in your case) and other factors like temperature, voltage setress (if is insid electrical circuit). <S> Take an exemple of ceramic capacitor of 0.1 uF commercial in the MIL HDBK 217f, if we suppose he is stored at ground, benign environment and at 30°C temperature the Failure rate will be equal to 0,00000001 failure/hour, but in case where the capacitor is stored in the same environment at 0°C the FR will be equal to 0,000000002 failure/hour.
Like cars, if kept in an ideal environment (cool and dry) a few things will deteriorate but most will not (at least not very fast).
Can I use 1 resistor for both inputs of an RTL NOR gate? I am working out the ideal RTL NOR circuit to use as universal gates for a large project. Based on what I've found on Wikipedia, to implement a NOR gate using BJTs and resistors, we have the following: In this case, R3 & R4 provide paralell input to the base of the transistor. We can ignore R1 as it really isn't required for silicon transistors. Inputs A and B seem to supply the same 5V whether they are both high or not right? To test it, I have implemented this NOR gate like this: The pullup resistor is 1K ohm and the input resistor that both inputs go through is 10K.The transistor is a 2N3904. I've tested this NOR gate and the truth table it yields is right on for NOR. I'm wondering if this simplification has any implications that I'm missing. Is there a specific problem with fan-in here? Ideally, I'm looking for the simplest circuits for mass production. I would like to avoid any complications that may arise when combining many NORs to produce other gates. <Q> If you connect (short) multiple RTL outputs together you'll have a so-called wired-OR circuit (actually it will be an AND circuit) and that will appear to work (at least until all those output resistors in parallel become too low), and the inverter will give you a NAND output. <S> However, by connecting the outputs together they no longer have individual logic states and cannot be connected anywhere else and appear as the correct logic state. <S> In other words the wired-OR (AND) function is occurring at the OUTPUTS of the gates that are connected together rather than inside the gate. <S> You think you are seeing a NOR function because open-circuit is actually appearing as a high (1). <A> Unlike with TTL or CMOS, connecting multiple RTL outputs together will not create a short between V+ and ground, and this will "wired AND" them together, and the R2s of the previous gates will act as the base resistor. <S> The issue comes when you connect multiple inputs to an output used in this way; since there is no resistance between the two outputs, all will see the same ANDed result regardless of which it is "supposed" to be connected to. <A> No, you can't. <S> To answer the question "Why?", think about what the voltage at AB (the combined A-OR-B node) if A was HIGH and B was LOW.
No you cannot (in general) use just one resistor and short the inputs together, assuming that's what you are doing.
How does a flame sensor or thermocouple operate with just one wire? I am learning electronics and I just got stumped. I was just looking at a flame sensor and it appears to have only has one connector. I thought sensors in general need two wires to form a complete circuit. How can current travel from the flame to the rod to create a complete circuit? If you wanted to measure the voltage or current of the sensor on an open flame, how can this be done with a multimeter? What do you reference it against? I thought the metal collar was a grounding point, but this is used to bolt the sensor to a furnace. Is the furnace acting as a reference point? <Q> The Flame rod in your picture is not a thermocouple. <S> The other connection in the circuit is the flame being in contact with a metal surface that acts as a ground. <S> Most every flame rod system I have worked on puts and AC voltage on the flame rod. <S> Depending on the system this voltage may be between 80 and 300 volts. <S> Without a flame present in the system you can only verify an AC voltage from the Flame Rod to ground. <S> When a flame contacts the flame rod part of the flame MUST be in contact with a metal surface - such as a nozzle where the gas and air combine. <S> A DC electrical current is established that flows from the flame rod through the flame and to ground. <S> The DC current can be measured with a micro amp meter in series. <S> I believe that the general principal is that the AC voltage ionizes carbon particles in the flame which conduct the current. <S> Gas and air mixtures affect the flame rod signal. <S> IF the flame pulls away from the nozzle, such as a higher firing rate, there will be intermittent flame detection as the ground path is usually lost. <A> The flame has nonlinear (like a diode) characteristics that allow it to be very reliably distinguished between a proper gas flame and an open, a short or a resistance due to soot or moisture between the electrode and ground. <S> This is vitally important, because if the gas valve is left on with no flame, the gas will eventually find an ignition source, and Ka BOOM ! <S> Don't fool with this stuff lightly, there is significant redundancy and other considerations required to make a safe, approved and legally acceptable ignition controller. <A> I'm not a plumber, but I think the answer is that the flame carries the current and that the other terminal is the (grounded) nozzle of the flame jet. <S> (Flame is a plasma and a conductor.. <S> pretty cool.) <S> Edit: Poking around on the web <S> , this might not be a thermocouple but a flame rectification sensor. <A> I suggest that it is actually the hot sensor rod that does the rectifying. <S> A hot object sheds electrons more easily than a cooler one. <S> This was/is used to great effect in vacuum tubes/valves, Cathode-Ray TV tubes and even fluorescent lamps (though both ends of those are hot). <A> The ionization that occurs in the flame envelope causes the continuity. <S> The larger the ground area, the better and more consistent the signal will be back to your board. <S> Most common misunderstanding in this process is the fact that the ground is not part of the flame rod assembly. <S> The flame envelope has to consume the space between the rod and the ground area. <S> Simple touching flame to the tip of the rod generally won't complete the circuit. <S> Hope this helps <A> The flame sensor when heated up acts like a cathode of the vacuum tube. <S> It emits electrons which flowing to the ground through the flame, like in the vacuum diode.
The flame sensor in your photo uses the electrode in the flame vs. the frame of the furnace (which includes the root of the flame) and is connected to the mounting lug on the flame sensor (that's why there is a ceramic insulator in there).
Implementation and usage of gray code? Generally and briefly, are there any direct application of gray code in electronics? If so, what are they? <Q> Absolute optical encoders are an obvious and common example. <S> Since only one bit changes at a time minor misalignment between bits in the pickup does not matter as much. <A> It is also used in digital modulation schemes like, for instance, in this 8-PSK modulation here: Because of the noise, sometimes the receiver might incorrectly detect an adjacent symbol instead of the correct one. <S> If gray encoding is used, the adjacent symbol will only be 1 bit apart. <S> The received binary stream will therefore be closer to the correct one, and might be eventually corrected if an error correction mecanism is in place. <S> More about constellations here: http://en.wikipedia.org/wiki/Constellation_diagram <A> <A> We used grey code for a non-ferrous optical encoder to track joint position in MRI kinematic studies. <S> Due to the high level of RF noise from the MRI transceiver, and the high magnetic field, errors might occur sending an incorrect position of (knee, elbow, etc) joing in the positioning system. <A> Something that wasn't mentioned yet is the use of gray code in Karnaugh maps. <S> This site gives a good explanation: https://www.allaboutcircuits.com/textbook/digital/chpt-8/logic-simplification-karnaugh-maps/ <A> In the 1980's one of the defense industries proposed developing a guided hypervelocity missile (Mach 5) for air-to-ground attacks. <S> The missile was to be guided by a rear-facing optical sensor which would be illuminated by a pulsed laser in the launcher. <S> The output of the laser would produce a modulated pattern in the far field which was specified to be gray-scale encoded. <S> That is, it would provide a "checkerboard" pattern with each successive pulse producing a different pattern, and the result of a series of pulses would be a gray code representation of the location of the particular spot with respect to the aiming axis of the launcher. <S> This would allow the missile to know where it was with respect to the desired line of flight without the need for the launcher to track it and issue guidance commands, as the missile itself would figure out its error and correct its flight path. <S> I suppose that's only barely real-world, since the system was never funded, but I know they did preliminary work on it and were fairly certain it would work. <A> A gray code can be used to minimize transition power, when a counter value goes on a bus with a large enough capacitance to warrant the overhead of encoding (if any). <S> A gray code is also often used in read&write pointers in asynchronous dual-port FIFOs to prevent wrong transitions being detected by the two asynchronous clock domains. <A> Switching between vectors in Space vector PWM is another one. <S> Switching only one half bridge at a time reduces harmonics. <S> Its much less direct than the other examples though. <S> You have to go out of your way not to use it though in this case since there is a physical correlation with the phases that naturally arises as a gray code
Grey code is used in rotary encoders.
Low component count isolated contact closure without power on the remote side Other answers here show a common way to allow a microcontroller to cause a contact closure (button press) within another device in an isolated fashion: use an optoisolator. I have the reverse problem. I've got a distant unpowered button, and I want to know when it is pressed. I want to know this without risk of damaging my µC due to badness \$\gg V_{DD}\$ on the long wires running back to that button. If you want a mental model of the application, think of it as an electronic doorbell. I already know how to sense the remote button press in an unprotected fashion: I also know about the standard method of microcontroller input protection. (Zeners, GDTs, TVSes, MOVs, current-limiting resistors...) I was just hoping to be able to buy a 2- or 3- terminal blob with some combination of those components arranged, qualified, and quantified. I even dared hope that I could find a gang of N of them in a "firewall IC" for under $10. (4 ≤ N ≤ 10) I want the effect of going to the littelfuse.com homepage and saying, "Yes, I'll take all of that, and can you tie it up and put a bow on it for me, please?" Littelfuse seems to prefer that I buy a pile of discrete parts instead. An optoisolator won't work here because it requires that I either power the remote end with a separate isolated power supply or give up some isolation by powering the LED side of the isolator from the microcontroller's supply. I want it to work with just a raw contact closure. If there's any voltage coming from the button, it's either an application error that I wish to protect against (e.g. active sender rather than a dumb button) or badness per above. The Infineon ISO1I813T is the closest thing I've found so far: The problem is how many external components it requires. With the same number of components, I think I can probably come close to its effect with the standard method. The only thing I lose is isolation, and I'm not sure I really need that. All I'm certain I need is protection . As a provisional goal, let's try to make it withstand at least an indirectly-coupled lightning strike. Somewhere between that and EMP-proof would be nice. :) <Q> Maybe not low enough component count, but what about this? <S> simulate this circuit – <S> Schematic created using CircuitLab <S> It's isolated, within the limits of the transformers, and requires no power at the switch. <S> The only real complications are generating and sensing the sine wave. <A> One class of devices that may be worth a look at are the integrated TVS devices used for USB protection. <S> They include a TVS and current limit resistor but might be a bit light-on for lightning protection if that may be an issue. <S> One example is the Semtech STF203 series available from Digikey at reasonable low-volume prices. <A> Easiest thing to do is just give the button its own power supply, assuming the total time it spends pressed is minutes over the course of years. <S> Coin cell + series resistor to drive an optoisolator. <S> Next easiest thing to do is a tiny AC-coupled system like markt's answer; could probably be done with one transformer and current sensing. <A> I'm going to add another silly thought I had last night that should meet your requirements for both isolation and protection, although I acknowledge that there are a few issues with it. <S> Replace your long wire with two optical fibres, one each for Tx and Rx. <S> At the button end of the link, orient the two fibres such that Tx points into Rx over a small air gap (lenses are probably advisable). <S> Replace the electrical components of the button with a blade that pushes into the air gab and obstructs the optical path when the button is pressed. <S> I have in my head a picture of the fibres entering a button block in parallel (rather than end to end), with the block containing both the button mechanicals and prisms and/or lenses for the optics. <S> Unfortunately I have no mechanical/optical drawing tools to turn the mental image into a screen image. <S> Push the button and the signal is reflected back down the fibre. <S> It may sound a little left field <S> but it's about as electrically isolated as you can get and <S> the button end at least is EMP-proof...
An alternative: a single fibre, with the button blade replaced with a mirror.
Winding my own inductor-resistance I am building a boost converter 12VDC-24VDC with output current of \$I_{out}=250\:\mathrm{mA}\$ and input current of around \$I_{in}=600\:\mathrm{mA}\$ and need to design an inductor for it. I've calculated that the inductance has to be \$L=125\:\mathrm{\mu H}\$, the switching frequency is 400kHz. I have a ferrite core with 5mm diameter and 20mm length (I can cut it if necessary) and permeabillity of 12. I am also using 32 AWG wire (because of skin effect) which has a diameter of 0.2mm and \$R=538.3\:\Omega\$ for 1000m. The equation of cylindrical coil is \$L=\frac{N^2\cdot\mu_o\cdot\mu\cdot A}{l}\$ where \$N\$ is number of turns, \$\mu_o\$ is permeabillity of free space \$\mu\$ is relative permeabillity of the core, \$A\$ is cross section area of coil and \$l\$ is length of the coil. There are dozens of ways one can design an indutor based of number of turns and the length of coil, but increasing the length also increases the resistance of the inductor. So what is the maximum resistance the inductor can have under these circumstances, how can I calculate it? So I know later on what length to take, and from this the number of turns. EDIT: I've calculated the inductance based on the equations found on this website , page 40. Input ripple current: \$\Delta I=0.2*0.6=0.12A\$ Duty cycle: \$D=\frac{24-12}{24}=0.5\$ Inductance: \$L=\frac{12*0.5}{0.12*400000}=125\mu H\$ <Q> If you know the diameter of the core and the inductor is close-wound on it, then the length per turn is $$ <S> Lt = <S> \pi <S> \times <S> (D +d),\ $$ where: <S> \$ <S> Lt\$ is the length of the turn, \$ <S> \pi \$ is about 3.14, \$ D \$ is the diameter of the core, and \$ <S> d \$ is the diameter of the wire. <S> The length of the wire used to wind the core will then be: $$ <S> Lw <S> = n <S> \times <S> Lt $$ <S> where \$ n \$ is the number of turns, and the resistance of the winding <S> will be the resistance of the wire per unit length times the length of the wire in the coil. <S> Generally, though, you'd be primarily concerned with the resistance of the coil in terms of its effect on the Q of the coil, and you'd measure out the length of the wire needed to wind the coil, regardless of its resistance, plus a little extra, just in case. <A> Skin effect does not mean that you have to use thin wire, it only means that you don't get all the benefit of using thicker wire. <S> Your calculated inductance sounds way too high for 400kHz operation (maybe an order of magnitude or so). <S> I suggest you double-check the calculation. <S> You can get lower DC resistance in two ways- use thicker wire <S> (but you only benefit with the diameter of the wire rather than <S> the diameter squared above the skin depth) or you can use multiple thin wires in parallel (ideally in a Litz arrangement, but a simple slow twist is much better than nothing). <S> If your inductor is high resistance you'll get I^2R losses from the wire (effectively series resistance) on top of the core losses (which look like a frequency-dependent parallel resistance) and your DC-DC efficiency will suffer. <A> Therefore, choose the thickest wire that still allows you to achieve your needed inductance. <S> Using Litz wire will further reduce your losses. <S> By the way, the absolute must-have book on inductance is Grover , but it's a very tough read . <A> The maximum resistance is probably limited by temperature. <S> If the core becomes too hot <S> its magnetic properties will change and you will have a bad time. <S> The losses will be approximated by Joule heating: $$ P = <S> I^2 R <S> $$ <S> How this affects temperature will depend on the thermal resistance of your inductor. <S> Without a datasheet it would have to be determined experimentally. <S> However, you will run into other problems well before you hit this absolute maximum. <S> Resistance means losses, and losses mean inefficiency. <S> You probably want your converter to be reasonably efficient. <S> If the converter is any good at all, losses will be low enough that temperature is not a concern. <S> Otherwise, what you have built is a heater , not a boost converter.
Resistive losses are reduced by increasing the wire diameter of your inductor wire. A higher resistance will mean higher losses in the core, which means more heating.
New multimeter probes don't fit my multimeter This seems like a silly question, but my research is failing to yield results... I ordered some new probes for my multimeter because I needed things like alligator clip leads and the little wire clips instead of just the pointy spikes. Problem is they don't fit. Well, ok, they do "fit" (I can insert the plug in the hole) but the contacts don't touch, rendering them useless. Looking at other sets of probes, they all seem to have this sheathed attachment, and none have the simple banana plug that the default probes came with. Is this multimeter just too low end to fit standard probes? Are there multiple multimeter probe plug standards? What is this plug called so I know what to search for? (ones a "banana" plug, right? What's the other?) Are there adapters I can buy? Success! <Q> It's to meet safety standards that require the "male" part to be insulated so you won't shock yourself if you touch the probe <S> and it's not plugged in. <S> It's possible (advisable or not is another question) to modify the probes with an X-Acto knife or box cutter so they will fit your multimeter. <S> The ideal solution is to replace your multimeter with a new one that supports the safer probes, at least from the pov of the regulations and the manufacturers of multimeters. <S> Edit: <S> Re your added photos, check to make sure the inside is the same and the only thing keeping it from mating is the sheath. <S> Here is the inside of the ones I have modified for an older Uni-T multimeter (used only for low voltage < 30V): <A> It sounds like you bought fairly cheap probes. <S> Not to worry, it's a simple fix (if I understand what you're describing right). <S> The problem sounds like the internal metal pin is too thin to connect with the socket. <S> If you look down the end of the connector you'll see the pin, and it should be formed out of 4 individual segments in a cross shape: <S> All you need to do is spread those segments apart a little. <S> Just insert a small screwdriver into the slots and twist a little to spread them. <S> You should then find it's a bit stiffer to insert the plug into the socket and the probes now work. <S> And none of that compromises the safety. <A> I had EXACTLY same problem recently. <S> Using pliers I managed to squeeze its top part enough to fit in. <S> However after using it for couple days I gave up and bought a new set of leads. <S> Only twice as expensive but fit perfectly, 50cm longer and much more flexible silicone.
Turns out, the cylindrical contact inside cheap plugs was very slightly off-center, so it bumped into the side of the socket tube and prevented the plug from being inserted fully.
What is the purpose of pre-synthesis simulation? I have used Verilog to develop RTL representations of synthesizable digital circuits, and have recently been using Verilator to run simulations of these. My understanding of Verilog semantics, therefore, is based on how things work under those simulations (Verilator attempts to match a synthesized representation). However, this question on StackOverflow (see also this linked document ) has drawn my attention to the idea that Verilog can legitimately be run in two different modes, these being pre-synthesis and post-synthesis , and that the meaning of the language (and the results of simulation) are not the same between the two modes. Of particular interest to Q&A sites like this one, discussions about Verilog's behavior might become quite confused by lack of an explicitly specified distinction between the two modes. I am aware that Verilog can be used to describe algorithms in ways that cannot be readily synthesized by automated tools, but assuming we have a design that is targeted for synthesis, what would be the purpose of running a pre-synthesis simulation? Note: What actually started me wondering about this was this response to another question that I posted. I was interested in post-synthesis semantics, but the answer seems to be addressing pre-synthesis semantics, although the distinction is not explicitly indicated in the question or the answer. I understand that the physics and timing of real hardware is not addressed in pre-synthesis simulations, but this is not what I am asking about. An example of language semantics differences (as indicated in the linked document ): pre-synthesis: the order of blocking assignments can matter post-synthesis: the order of blocking assignments does not matter The point being, pre-synthesis simulation may fail to match hardware due to semantic rules -- even if there are no problems in the timing. So running a pre-synthesis simulation may give the wrong result (one that doesn't match hardware) unless you have carefully constructed the code such that it will work the same for both modes of the language. So the question is basically, why run a simulation that is known to have wrong semantics . Further note: Verilator is completely idealized, and has no notion of any specific hardware, so perhaps it is not accurate to call that post-synthesis. However, it uses the semantic rules of post-synthesis, and is purportedly very fast, so to me this establishes a baseline of what first-order simulation should probably do. <Q> The main purpose of pre-synthesis simulation is to verify the logical functionality of your design, without worrying about the specific timing details of a particular implementation. <S> This saves a lot of time in the functional debugging cycle, since you don't need to wait for the synthesis process to complete before simulating again after making a change. <S> Once you have the design working correctly with "nominal" or "unit" delays, you can then run the synthesis tools and verify that it continues to work with actual timing delays. <S> Fixing the issues at this stage and dealing with long critical paths usually takes fewer iterations, which is good since each iteration takes longer. <S> But in fact, many designs are never taken through post-synthesis simulation. <S> Regarding your subsequent edit, if the order of blocking statements ever matters, then you're probably not doing something right. <S> One of the key differences between simulation and reality that I frequently trip over is the specification of sensitivity lists for processes. <S> The simulator will always take the sensitivity list literally, because this is important with regard to making the simulator run efficiently. <S> However, the synthesis tools and the actual hardware don't really care about sensitivity lists (although some synthesis tools will give you a warning if there seems to be a problem) — if a signal changes, those changes will propagate through the logic regardless of what the sensitivity list might say. <A> The meaning of the language is the same, the difference is indeed whether the design needs to be synthesizable. <S> Pre-synthesis simulation assumes ideal hardware, with constant propagation delays, so it will not accurately reflect a component being split into two parts with a long interconnect between them. <S> On the other hand, that simulation is fairly cheap, and there is no need for a full compilation beforehand. <S> This can be used for functional tests of individual units that should be synthesizable across many different devices (i.e. most reusable components). <S> Post-synthesis simulation uses the hardware model for the given temperature, core voltage, speed grade etc., and in order to give a meaningful result, it needs to be aware of the placement. <S> This is a great debugging aid, especially when writing timing constraints. <A> I'm not sure what you mean by running Verilog in different modes. <S> I'm assuming you mean simulating the RTL and the synthesised code and that you are talking about functional simulation (that is, timing other than cycle-level is ignored). <S> The purpose of running RTL level simulations is that it is faster to simulate, easier to debug and easier to modify. <S> Just as working with a high-level programming language compares to working with assembler. <S> In addition, you can use non-synthesisable code to get something working for test or evaluation purposes even when the whole design is not ready or libraries not available. <S> Ideally, of course, both RTL and gate level would give the same results. <S> You can use lint tools to uncover many mismatch scenarios. <S> Many modern simulators will also warn you (albeit you may be drowned in warnings). <S> The RTL/gate mismatches combined with slow gate-level simulation gave rise toequivalence checker tools. <S> There are many coding style issues (see Cliff's article), but many can be avoided by lint checkers. <S> Using ' <S> x's can be useful in RTL, for example to uncover reset issues. <S> However,care must be taken to make sure this sort of stuff is not part of the actual design. <S> Use of any design code that relies or masks <S> 'x's is definitely dangerous. <S> Using directives (full, parallel case, translate on/off) deserves extra scrutiny. <S> As a vaguely related amusing aside (which wasn't so amusing at the time), many years ago I worked on a pre-release commercial equivalence checkerthat a customer was using to reduce reliance on gate level simulation. <S> Around their first tape-out I discovered a tool bug that tied some 'x's tozero by mistake and, to my chagrin, discovered that correct behaviour of the block relied on the value being zero, even though synthesis was free to pick either (since the designs were supposedly equivalent). <S> I put in a frantic call to our AE who noticed the floating wire at placement and tied it toground, 'just because it was nearby'! <S> Close call. <A> I've done a few verilog designs for FPGA using Xilinx ISE 14.7 with many hierarchical nested layers of modules, and I find debugging is much more difficult in post-synthesis. <S> Pre-synthesis simulation (also called behavioral simulation) retains the hierarchical net names, so it's relatively easy to drill down to a specific lower level module to inspect its behavior. <S> However post-synthesis, the entire design becomes one big flat mass of registers and combinational logic. <S> Assuming that the interesting nets have not been optimized away, they may have been inverted or otherwise renamed. <S> Pre-synthesis (behavioral) simulation gives an idealized representation, that closely follows the structure described by the code. <S> If the design doesn't work correctly at this stage, it won't work post-simulation either. <S> Post-synthesis simulation gives the best representation of what the hardware will actually do, but it's relatively more time and effort to get useful results. <S> In many cases (for FPGA based designs) it's cheaper and simpler to go directly from successful synthesis to testing on FPGA hardware. <S> If the design is verified on the FPGA <S> then you're done. <S> The post-synthesis simulation only becomes necessary as a diagnostic if there are problems that can't be understood from observing the external signals.
It is often sufficient to use pre-synthesis simulation to verify the functionality, and the static timing analysis tools to verify the post-synthesis timing.
Slightly weird astable oscillator in a 555, where does this capacitor discharge to? In the 555 datasheet, the cap is usually connected to pin 7 (discharge), but in this circuit, it's not: When the capacitor voltage is >2/3Vcc, output will turn off and current will have no where to go. Does it go through Vbe? Also, I've constructed this circuit with the 'normal' astable configuration and it seems to draw >1A current total on 9V, and after a while will kill the 555. I was under the assumption that most of the current will go through the transistor since we are controlling current via the 1k resistor. The normal configuration works but the output voltage gradually decreases overtime, doesn't seem stable. Never tried this configuration in the complete circuit, so unsure if same thing will happen. <Q> When the circuit is first turned on the voltage on pin 2/6 is low, this triggers the 555 which turns on pin 3. <S> The 10n cap then charges through the 33k resistor. <S> When the voltage on pin 2/6 reaches 2/3 Vcc the output turns off and the 10n capacitor starts to discharge through the 33k resistor into pin 3. <S> When the voltage drops to below 1/3 Vcc, the process repeats. <S> When the 555 is triggered the NPN is turned on, the exact current allowed through the coil depends on the 1k resistor and which transistor was chosen. <S> You can vary this by change the values of these two components or changing the timing values presented by the 10n cap or the 33k resistor. <S> Since the current through a coil cannot change immediately it slowly ramps up when the 555 is triggered. <S> If the timing interval is too long <S> the current can ramp up to an extremely high value. <S> You thus have to make sure the current is limited either by component values or the timing. <S> Something else to take note of is that the voltage at the collector of the transistor can be extremely high (couple of hundred volts easy), it is pretty likely that you are blowing the NPN transistor after only a short operating time. <S> I would recommend putting in some feedback at the output. <S> Use a voltage divider on the output of the transformer, into an NPN transistor that pulls the reset line low (it should have a pullup). <S> This will stop over-voltage killing your circuit. <S> So to summarize, there are three problems with this design: <S> Timing values probably aren't calculated correctly. <S> Current isn't limited, either by timing or components. <S> No protection against over-voltage As for the voltage decreasing over time, pulling 1A from a 9V will degrade its ability to supply power pretty quickly, this will drop the output voltage/current which affects the circuit. <S> To test this you can monitor the voltage of the 9V battery while the circuit is operating, you should see it drop drastically. <A> The 555 is likely being blown out by the high voltage flyback spikes produced by the primary side of the transformer. <S> Place a medium current diode across the transformers primary, with the anode side on the transistor's collector. <S> This shorts out the spikes. <S> If the oscillation is slow the current in the transformer could be very high. <S> The transistor's current is being determined more by the transformers primary resistance than the base resistor, if the oscillation is slow. <S> If the oscillation is high the inductance of the primary may help limit the current to a lower level. <S> A parallel RC combination on the transistor's emitter can limit DC current while still allowing high AC currents. <S> In your circuit pin 3 will discharge the 10n cap. <S> Using pin 7 isolates the cap voltage from the changing output at pin 3. <A> I suspect that what's happening to your 555's that they're being killed by the high-voltage transients generated by the transformer primary when the 555 switches a square wave through it. <S> You could either try to protect the 555 from the transients by filtering them out of the power rail, or you could just not create them in the first place by adding a low-pass filter between the output of the 555 and the base of the BJT so that the square wave is "rounded off". <S> simulate this circuit – <S> Schematic created using CircuitLab <S> A 100nF cap should be effective, although you may need to experiment a little with values because it's going to attenuate your audio signal as well. <S> The diode prevents the cap from discharging back into the 555 when the output goes low.
Pin 7 would also discharge the cap, as in the standard data sheet arrangement.
NPN Transistors for motor control I wondered if someone could offer advice here. I have a 3.3v dc motor. Obviously, i can change the direction it turns by flipping the + an - leads round. Can i acheive the same thing but with 2 npn transistors. Signal to one to turn it one way, and signal 2 for the other. Can someone advise a simple, safe circuit for this? Thank you <Q> The circuit you are looking for is called a "H bridge". <S> http://en.wikipedia.org/wiki/H_bridge <S> Two transistors will not let you change the direction, you need four as described on wikipedia. <S> And it is also mostly MOSFET or BJT transistors used in "H bridges". <A> You could get away using 2 transistors if you had a V+, V-, and an extra center ground voltage. <S> Normally what is done with a basic two wire power supply <S> is to use 4 transistors in an H pattern, (with the motor in the middle), this is often called an H-bridge driver. <S> Each transistor pair allows the current to flow (through the center of the H pattern) in only one direction or the other. <S> You can buy motor driver chips with this transistor arrangement already made. <S> (The unsafe part of the idea happens if you build your own circuit and accidentally turn on the wrong two transistors at the same time.) <A> While it is possible to create the required circuit with BJT's & construct a H-Bridge <S> The problem you have is the 3v3 volts you are planning on sourcing the machine from. <S> Each BJT will, roughly, drop 0.6V, so that is 1.2V taken away from being able to source the electrical machine, which means your top speed & torque will be reduced. <S> You haven't provided much information with respect to the type of electrical machine & only hinted at how you want to operate it. <S> A reasonable assumption is that it is a brushedDC machine and you simply want to change direction (not vary its speed) <S> You could try a DPDT relay <S> This way you will not have to sacrifice 37% of your available voltage
There is also small IC circuits that can be used.
What does the line "edge resonance between an inductor and a capacitor" exactly mean? I am working on a project on DC DC converters in which the concept of soft switching i.e, Zero Voltage Switching (ZVS) and Zero Current Switching (ZCS) are used. One method to attain this is using an Edge Resonant Switched Capacitor Cell (ER-SWC) as specified in one of the IEEE Transactions published in 2013: Analysis, Design, and Performance Evaluations of an Edge-Resonant Switched Capacitor Cell-Assisted Soft-Switching PWM Boost DC–DC Converter and Its Interleaved Topology . I have been trying to find out the significance of this word edge resonance but in vain. In all my findings I could only see the lines "edge resonance between the resonant inductor and the resonant capacitor" but nothing about what it is exactly and why it is so called, knowing which would help me to justify why I should be using this concept for my converter. . I am familiar with normal resonance occurring in an electrical RLC circuit but not edge resonance. On googling for the same, the results are based on some communication related topics and not electrical. I have seen the same question posted before by someone else but it has never been answered. Hope this will be. <Q> All circuits have parasitic inductance and capacitance. <S> Nothing can really be done about that. <S> But, it is possible to find ways to use the parasitic components to advantage in some cases. <S> In power conversion it is sometimes possible to arrange things such that the transfer of energy from a parasitic inductor to capacitor results in greatly reduced switching losses in transistors and diodes. <S> The most simple example of edge resonance is a voltage step driven RLC with diode circuit. <S> You probably know that the Q of this circuit is \$\frac{Z_o}{\text{R1}}\$, and as long as R1 has a value that allow Q > 5, the circuit will be very under damped (highly resonant). <S> If a step input is applied, voltage on C1 will ring up to ~ 2Vstep. <S> At that time current in L1 will be zero. <S> D1 blocks any discharge of C1. <S> That's a resonant rising edge. <S> Replace the diode with a well timed switch and you can get a resonant falling edge as well. <S> This may seem a trivial example, but all edge resonance is based on the same dynamic. <S> Operational conditions can be narrow, restricting load and input range, for complete ZVS. <S> Extra inductance or capacitance may have to be added to reach the proper condition for a given input voltage or load. <S> Also, the same resonance can be used to reduce high frequency spectral components for reduced noise and interference. <A> Well, from http://www.google.com/patents/US4912622 <S> I found that an alternative term is transition-resonant converter . <S> And this surely is textbook material , the general definition being "it employs resonant transitions only during the instants of switching". <S> That seems to match what the circuit from your paper is doing (in this respect). <S> It appears that "edge resonant" is a term preferred by researchers in Asian countries for some reason. <A> Based solely on reading abstracts of papers, the term "edge resonant" seems to relate to snubber action occurring in a selected manner at switching edge in order to minimise energy losses - probably typically by implementing a mix of ZCS (zero current switching) and / or ZVS (Zero Voltage switching as appropriate to achieve the desired optimisation. <S> Snubber triggering and/or switching appears to be based on some derived function of extant conditions rather than at an external time defined position. <S> For example: This paper A novel pulse regenerative active auxiliary edge resonant bridge leg link soft commutation snubber and resonant snubber-assisted three phase soft switching sinewave PWM inverter specifically contrasts edge resonance snubbing and "hard switching". <S> I do not have unpaid access to the paper <S> but it seems likely that an examination of their comparison will explain the differences in method. <S> They say - The operation principle and operating characteristics of this active auxiliary snubber circuit are respectively described, together with the practical design procedure of this unique edge resonant snubber. <S> Furthermore, the three phase soft switching sinewave PWM inverter with the novel auxiliary active edge resonant bridge leg link snubbers treated here is evaluated and discussed as compared with three phase hard switching sinewave PWM inverter <S> And this paper A Divided Voltage Half-Bridge High Frequency Soft-Switching PWM DC-DC Converter with High and Low Side DC Rail Active Edge Resonant Snubbers (apparently) associates the term with ZVS / ZCS snubber control. <S> They say : " ... <S> All the active power switches in the half-bridge arm and dc bus lines can achieve ZCS turn-on and ZVS turn-off commutation operation and consequently the total turn-off switching losses can be significantly reduced. ... <S> " <S> Similarly here: Boost chopper-fed ZVS-PWM DC-DC converter with parasitic oscillation surge suppression-based auxiliary edge resonant snubber " ... discussed and compared with the hard switching scheme from an experimental point of view. <S> Finally, this paper proposes a practical method to suppress parasitic oscillation due to the active auxiliary resonant switch at ZCS turn-off mode transition with the aid of an additional lossless clamping diode loop, ... "
H-bridges that have an inductive load and switch capacitance can use edge resonance for Zero Voltage Switching.
Selecting input voltage for 7805 I generally use switching 12V power supplies for my circuits since they are so common, but I understand the 7805 can take a lower input voltage. If I gave the 7805 a lower input voltage (i.e. 9V), I understand there will be less heat dissipated as it would be a smaller voltage drop. 6V would be even less, assuming my regulator can go that low. But, is there a disadvantage to giving less input voltage? Performance? More or less noise? And on the power supply side, are lower-voltage or higher-voltage supplies typically better made? (I've got a 100uF aluminum cap on the input, and 10uF aluminum and 0.01uF ceramic caps on the output.) <Q> The 7805 will drop out typically around 1.6V above the output voltage. <S> At 1A it's guaranteed to not drop out with 2V of input-output differential. <S> Most likely you'll not be running anywhere near 1A or you'd be using a switching regulator, but even at low current the dropout is not so low- <S> that's because the 7805 is not an LDO regulator and there are Vbe drops in there. <S> One could guess that the input ripple rejection probably deteriorates as you get close to the dropout voltage and the gain drops. <S> The datasheet specification is at 5V input-output differential, so they sidestep that issue. <S> If you have a sensitive analog circuit like an RF module you may wish to use a higher input voltage than the absolute minimum. <S> If you're using a 7805 with unregulated (transformer, rectifier and filter) <S> input voltage probably needs to be something like 10V to be safe and account for line voltage tolerance, ripple and so on). <S> If you're using it with a regulated supply (like a switching wall wart) <S> 9V is good, 7.5V is okay, but 6V is not high enough. <S> pay careful attention to the output capacitor value, ESR and type), they are more expensive, less sources, and generally have much lower input voltage capability <S> so they're easier to fry with input transients. <S> Much modern electronics uses LDO regulators and/or switching regulators, there are literally thousands of possible parts to use, but none yet has quite the staying power of the 7805/78M05/78L05. <S> I would say that if you need a heat sink on the 7805 <S> it's time to move to a switching regulator in most cases. <S> There's no problem using the 7805 or 78M05 at 10, 50 or 100mA, and it's better than a 78L05 (more expensive, but the circuit is different and has better guaranteed performance). <S> The trade-off of an LDO vs. a 78xx regulator is a bit more complex and it is heavily dependent on the input voltage and how much control you have over it. <A> Switching regulators do not disapate power the same way a linear regulator (e.g. LM7805) does. <S> The typical (old style) <S> LM7805 needs a minimum of 7v to guarantee 5v out, and that would dissapate continuosly with at least 2v <S> x I out, with a linearly higher dissapation as the input voltage goes higher. <S> A well designed switching regulator dissapates power only during the breif time that the power components are switching, (some is lost in ineffiecient switching and some lost to Rds or Rce). <S> Typical switching regulators are more efficient with higher input voltages. <S> Lower input voltages will give lower dissapation in linear regulators. <S> But one disadvantage to using a lower input voltage is that your input supply, or battery, might be bogged down in high load situations, and go below the regulator's drop out level. <A> But, is there a disadvantage to giving less input voltage? <S> Performance? <S> More or less noise? <S> No, as long as Vin <S> > <S> Vo <S> + <S> Vdrop <S> where Vdrop is the internal voltage drop of the regulator. <S> The drop is normally proportional to the output current and can be as low as a few hundred millivolt for low drop regulators up to several volt. <A> Assuming that you want a regulated 5 volt source which can supply 1 ampere into a load, and that you want to use use a 7805 connected to a 9 volt supply to get that 5 volt output, the 7805 would have to dissipate: \$\ Pd = <S> (Vin - Vout)\times <S> Iload \ <S> \ = <S> \ <S> \ ( <S> 9V-5V) <S> \times 1A = 4\ <S> watts\$, while the load was dissipating \$\ 5V <S> \times 1A = <S> 5\ watts \$ <S> The input power would, therefore, be 9 watts and, since efficiency = <S> \$ <S> Pout/Pin \$ <S> , we'd wind up with an efficiency of about 55%. <S> A switcher would run, typically, at about 80%, so it'd be dissipating 1.25 watts regardless of the input voltage - within limits, of course - and, compared to the 7805's 4 watts, would run much cooler. <S> The advantage of using a lower voltage on the input of a linear regulator is that the regulator will run cooler but with, say, 2 volts of headroom needed for a 7805 to run properly, it'll still be wasting 2 watts compared to the switcher's 1.25. <S> The downside for the switcher is that its output will be a little noisier then the linear's <S> and it'll be more expensive. <S> Maybe. <S> By the time you get finished with the heat sink, the mounting hardware, and the the heat sink compound, who knows???
With higher input voltages some switching regulators will actually switch at higher frequencies making capacitor noise filtering more efficient. There are LDO regulators that have very low dropout (so 6V would be fine) but they have other disadvantages (they are only conditionally stable-
How to measure the bonding wire inductance in lab by myself? Very curious about the IC design. Everytime when we get our chips , we always need to bond wire the chip to connect the PCB. Even though the factory always claims that the bonding wire is 0.8nH/mm for inductance model, then I am still very curious, how to measure the bonding wire inductance value by myself in lab for practical situation ? Does any expert know how to do it ? Thanks so much. <Q> A dedicated LCR or Qmeter will allow you to measure this directly, however, my guess is you don't have access to one otherwise you would have used it already. <S> A Vector Network Analyzer would also work by monitoring changes in the Smith Chart. <S> For regular inductors this is done with a function gen and a scope like so ( link ). <S> Something in the nH range may not be feasible with the above method... <S> if you have access to a VHF scanning receiver a method like this will work ( link ). <A> Attach a bond wire to each pad, making sure that they run at right angles to each other in order to minimize mutual coupling. <S> Measure the inductance of this setup and then divide by two. <A> How about a theory number? <S> The "Radio Engineer's Handbook by Terman, lists inductance for straight round wires. <S> There are corrections for the skin effect at higher frequencies.
I think the only practical way to do this would be to construct a special test chip that has two pads near a corner that are shorted to each other.
Will this zero-cross detection circuit work? I have a 10W SMPS circuit powering a home appliance like this: I need to extract a zero-crossing pulse from this circuit which would then be fed to a micro-controller. To this end, I am considering the following modification to the circuit: Specifically, I have added an opto-coupler PC817 whose input LED would be driven from the rectified ~340V (0 to peak) through R16 (330k, 1/2W resistor). The maximum input current to the opto-coupler would thus be ~1mA. Considering the CTR to be 0.8, from the datasheet, the collector current would be ~0.8mA. Accordingly, I am considering a 33k resistor for R17. Have also added D10 ( 1N4007 ) to isolate it from the smoothing capacitor. Are the calculations correct? Will the circuit work? Is it okay to drive the opto-coupler LED from ~340V? Would it damage the components or make the circuit less reliable? How to estimate and minimize the pulse width at the zero-cross output so that it is closer to the zero-crossing? <Q> The rise/fall time of the opto is about 20 microseconds (1000 ohm load) and the time when the rectified voltage is close to zero is maybe 2 degrees of one cycle. <S> At a 20ms period of AC, a couple of degrees is about 100us. <S> It's getting to close to not working <S> is my impression. <S> Looking at the frequency response graph on page 8, with a collector resistor of 33k you'll be lucky to get 1kHz through this device <S> so I reckon you won't see much of a signal. <S> Even with a 100 ohm load the bandwidth is only going to be about 50kHz and will probably just about work. <S> This would mean a rehash to your optical receiver circuit. <S> None of this takes into account the reverse recovery time of the bridge rectifier and 1N400x diode or any stray capacitance that might slug the shape of the full-wave rectified signal you hope to have. <A> The speed of the phototransistor optocoupler is possibly a problem, as Andy has already flagged. <S> Also consider what threshold you are trying to achieve. <S> If you want a zero-crossing pulse centered about the zero crossing and turning off at (say) +/-10V then you need to supply sufficient current to the LED to make that happen. <S> Say that's 5mA. <S> You now need to limit the current at the AC peaks to some reasonable value, and with a resistor it will be ~33 times higher, of course (\$\frac {230\sqrt{2}}{ 10}\$). <S> To get the width (ignoring the speed of response of the circuit) we know that the voltage is about 325 sin(\$\omega\$t) <S> where \$\omega\$ is the angular frequency of \$2\pi 50\$ radians/second. <S> So the width of the pulse will be pw = <S> (2/\$\omega\$)\$sin^{-1}\$(Vzc/325), <S> or, in general pw = (\$1\over\pi f\$)\$ sin^{-1}(\frac{Vzc}{Vline \sqrt <S> 2})\$ <S> For example, if the voltage is +/-10V, then the pw will be about 200usec. <S> For small voltages it will be approximately proportional since the rate of rise of a sine wave is almost constant near the zero crossing. <S> So, a +/-5V voltage will give you a 100usec pulse, ideally preceding the zero crossing by 50usec and following the zero crossing by 50usec. <S> To make a precision zero crossing detector, you would be best to derive a power supply from the mains (maybe the TNY has some voltage you could borrow) and use a comparator of some kind (I've often used discretes because they're more immune to nasty stuff on the mains) to actuate a high speed logic-output coupler, so <S> the LED in the opto sees only 5mA or 0mA. <A> Andy aka is correct, but if you still want to give it a try <S> I'd suggest the following modification simulate this circuit – <S> Schematic created using CircuitLab <S> ETA - Please ignore this paragraph - The reverse diode corrects the immediate flaw in your design - reverse voltage on the LED. <S> The opto data sheet, oddly, has no spec on maximum reverse voltage, but I'll guarantee you that your LED would not survive a single cycle of the mains voltage. <S> By putting the optocoupler on the input of the bridge, you get a more positive zero indication than when you look at the output. <S> It's not a panacea, though, since optos are famous for having different turn-on and turn-off times. <S> To get around this, you can try simulate this circuit with two optos back to back and the outputs wire-or'ed. <S> They do exist.
Even this is not guaranteed, though, since if the turn-off time is too much greater than the turn-on time, you'll get no output pulses at all. Actually, your idea has merit, but if you want to try it, you need to look at faster optocouplers.
Get an output (like a voltage or dry contact closure) from any/most typical digital alarm clocks? New to the community and less than a hobbyist so please advise if this question should go elsewhere. I am not noting a particular alarm clock or model because I would like this to be repeatable across any/most generic store-bought types of digital alarm clock. What I'd like is to have the user set the alarm clock as they normally would and when it 'rings' I need some form of an output. This should be either some sort of voltage (nothing high or high amp, 5 or 12v and 100 or 200ma should be plenty) or perhaps just a contact closure. This would then be taken to a home control system to perform whatever tasks are wanted for wake up and so that is why the question is in generic terms. Can this be achieved in a way that can be generically applied to most alarm clocks and if so how? (in somewhat noobish terms if possible) <Q> The connection might be wires, or it might be soldered right onto the PCB. <S> (So far as I know they have not integrated speakers onto an IC) <S> You will have to take some measurements of the signal. <S> Is it DC and at at least 0.8V? <S> Then you could boost the current with a transistor and connect it to a relay. <S> If it's AC you might want to add a diode to rectify, an RC low pass filter, then proceed as with the DC case. <S> The bigger question is this: "What home automation system does not already have a clock?" <A> An output common to all alarm clocks should be the buzzer. <S> This could be used as a signal to activate whatever you want with the right circuitry. <S> A quick google search provided this article http://www.todayifoundout.com/index.php/2010/06/how-to-hack-an-alarm-clock/ <A> If you can tolerate having the buzzer/speaker still sound when the alarm goes off, then you could attach a microphone to the side of the case, and then you wouldn't have to open up the case at all. <S> Use a circuit something like the one below to convert the output of the microphone (fed into the Audio input line here) into a digital signal at the output of the comparator. <S> The circuit doesn't specify a comparator, but one you could look at is the LM311. <S> It can sink 50 mA, which would make it ideal for driving a relay.
Any alarm clock that uses a buzzer or a speaker will have access to the signal there.
Does the op-amp output depend on the difference in input? If there's two different input voltages, does the op-amp amplify the difference between them. Or is it only the differential op-amp that does this ? I'm confused!! .. I remember a question where the output voltage was 0 because the two input voltages were the same, but is that always true ?! But isn't the voltages of the two inputs the same anyway in the ideal op-amp ?! <Q> An op-amp does amplify the difference between the two inputs, but the gain of an op amp is generally very, very high (>10,000) so the input difference required to drive the op amp output from one end of the range to the other is very small. <S> For an op amp with a gain of 10,000 on <S> +/- <S> 15 volt rails <S> , the output swing is 30 volts while the input difference to drive that output swing is 3 mV. <S> In other words, the difference between the + and - inputs of this op amp should not exceed 3 mV so long as the output is not being driven into the rail. <S> An ideal op amp simply takes the limit as the gain goes to infinity, driving the input voltage difference to zero. <S> This is done because the gain of the op amp is not necessarily linear - it can vary depending on the input and output voltages. <S> Generally the gain will decrease as the output voltage nears the rails. <S> The gain can also depend on the common-mode input voltage as well. <S> The high gain means that when you add a feedback loop, the closed-loop gain will be much more linear than the open-loop gain, even though the op amp open-loop gain is not so nice. <A> If there's two different input voltages, does the op-amp amplify the difference between them ? <S> Yes. <S> Because op-amp is a differential amplifier. <S> But isn't the voltages of the two inputs the same anyway in the ideal op-amp ?! <S> Not always. <S> The voltages at the input terminals becomes equal (virtual short) only when a negative feedback is provided to the op-amp. <S> It does not apply to op-amp circuits with out negative feedback ( eg., comparator, schmitt trigger, etc.). <A> Hi Mustafa as per my knowledge <S> op-amp can Amplify the difference of different input voltage. <S> This job done by all different op-amp configuration not only differential op-amp. <S> Most other configuration of op-amp (Differentiators,Integrators,etc) you may saw non inverting terminal connected to ground and the differential input equal to Input voltage at inverting terminal. <S> So,It look like the output is depend upon amplification of only inverting input. <S> If we connected some other voltage to non inverting terminal also then the output vary depend upon differential input. <S> In ideal case if same voltage applied to two differential terminal of op-amp then the output will be zero. <S> But practically it won't happen due to output offset voltage. <S> If any wrong in m statement then sorry for that & please let me know... <A> An op-amp does not obligatory have a differential input but as the differential input is more universal and versatile, nowadays almost all the op-amps are equipped with it (maybe current-feedback amplifiers are an exception). <S> In some cases (e.g., in inverting configurations) the non-inverting input is unused and it is simply grounded.
The output voltage for an ideal op-amp is 0 if the input voltages are equal.
Which type of USB socket is this? I am looking to replace this USB port on a new laptop which snapped inside the connector. I know it is a USB 3.0 socket, but not sure on the exact part number or type of socket. I found this online: http://www.maplin.co.uk/p/maplin-usb-30-socket-a-pcb-n08jt which looks very similar, but the one I need seems to mount in the middle of the PCB, rather on the top Any help would be great. <Q> You also need to determine the exact format, eg. <S> pin 1 being on the left or right - as viewed from top, 4 or 5 total pin format, then compare that to the replacement. <A> This is going to be difficult <S> but it's possible. <S> To start, you should unsolder the usb connector. <S> You might find some clues on the bottom but it's unlikely. <S> Next you'll need to compare datasheets for something that will match. <S> I would recommend going to digikey or mouser and doing a search there. <S> Take careful note of the 3d dimensions too so that it'll fit your laptop's enclosure. <S> Many of them are going to look the same across different vendors since these things are very standard. <S> However, it only takes one pad of a different size to ruin the fit. <S> Good luck! <A> That sort of connector would usually be referred to as a 'board-cutout' or 'mid-mount'. <S> Molex has a few options in their 4839x series which you could source from RS (for instance http://uk.rs-online.com/web/p/type-a-usb-connectors/8129632/ ), but you'll have to show some more detail for your connector, like a view from the back showing its connections to the PCB, to be more certain. <A> Looks similar to <S> this one (photo credit to Digikey ):
It is called a "Mid Mount" or "Board Cut Out" type USB connector. More importantly, you'll want a good drawing of the footprint that includes dimensions of the solder pads, distances of throughholes and any other mounting features.
Does using a resistor in series on a breadboard track work as expected? I've read up on Kirchhoff's laws of current, however I'm not certain how it applies in this case. I have 1 10K resistor in series on a breadboard track. Considering that electrons flow the path of least resistance, part of me thinks that electrons could flow on the rail below the track, skipping the resistor and outputting full current. Here's an image of what I'm talking about: It's almost like the resistor is a parallel circuit of its own, however it doesn't run to ground. So, would the rail + resistor be one and the same? I know for sure if I hopped the resistor over the bridge in the middle that all electrons would flow through the resistor, yet I can't say for sure in the other case. <Q> Yes. <S> Essentially <S> you have a 0.0Ω <S> * resistor (The Breadboard wire trace) parallel a 10k resistor. <S> Therefore the equivalent resistance will be 0.0Ω. <S> (Non-Zero, insignificantly small resistance that can be assumed to be Zero Ohms for this illustrative purpose) <S> $$R_{eq} = \frac{1}{\frac{1}{R1}+\frac{1}{R2}} = <S> \frac{R1*R2}{R1+R2 <S> } = 0 <S> $$ <A> It's almost like the resistor is a parallel circuit of its own, however it doesn't run to ground. <S> Forget "ground". <S> There is nothing special about "ground" whatsoever. <S> It's just another node in the circuit, just like all the other ones. <S> Are these circuits any different? <S> simulate this circuit – <S> Schematic created using CircuitLab <S> What is that "ground" thing anyway? <S> I have batteries and LEDs and resistors in my parts drawer. <S> But I don't have any "grounds". <S> As such, the resistor as you've stuck it in the breadboard isn't "like" a parallel circuit. <S> It is a parallel circuit. <S> There's no requirement for "ground" to be involved. <S> The laws of physics have nothing to do with "ground". <S> Ground is simply a notational convenience which makes the schematic easier to draw. <A> No, that's not going to work as you want it to. <S> That breadboard track is like a wire. <S> A resistor across a little bit of wire does nothing. <S> From end to end of the track, you still have a wire. <S> That wire does have some finite resistance, so some infitesimal portion of the current will flow thru the resistor and not the metal of the track, but that won't matter in any practical or even reasonably measurable sense. <S> If you want to insert a 10 kΩ resistor in a current path on such a breadboard, you have to place the resistor between two separate tracks, then arrange for the current to go into one track and out the other. <S> Think of each track as being a blob of solder on a board that you can connect up to 5 things to. <S> You put components between the blobs for them to matter. <S> Connecting both ends of a resistor to the same blob does nothing other than use up 2 of the possible 5 connection points. <A> All pins in that row on the breadboard are connected, so yes, that resistor does nothing as it is shown. <S> If you were to put 5V into that track as well as ground, it would just short straight from 5V to ground. <S> You basically shorted the resistor with the breadboard. <A> Well for all intents and purposes you could assume there is negligible current that is flowing through your 10K.
In reality current will flow through all paths, it's just that only a very tiny, tiny amount will be flowing through the 10K while most of it flows the very low resistance of the metal track below.
Can someone explain the different relay schematics contact types? I'm looking at relays and there are multiple types of contacts forms, such as: A, B, C, X, Y, Z and much more. Searching around found different schematics for same form. Can someone explain them or show me a picture of the different contact forms? <Q> There is a mesh in symbols because even manufacturer agree on a common language, marketing issues differentiate them frequently. <S> Even the common assosiation RELAY AND SWITCH INDUSTRY ASSOCIATION <S> I think it is not existe anymore, but they are publish a handbook about relays, the "Engineer's Relay Handbook" Bellow is en extract of the above handbook (5th edition) <S> the types of contacs are available throught the market. <A> Form A Normally open, held close. <S> In it's un-powered state the contacts is open. <S> Also referred to as a "Make" relay. <S> Form B Normally closed, held open. <S> In it's un-powered state the contacts are closed. <S> Also referred to as a "Break" relay. <S> Form C <S> This is a DPDT relay where one contact is Normally Open and the other is Normally Closed. <S> Basically, a Form A and a Form B in one package. <S> Form X <S> This is a variation of the Form A relay, that is Normally Open, Held Closed, but the contact is double make. <S> Form Y <S> This is a variation of the Form B relay, that is Normally Closed, Held Open, but the contact is double break. <S> Form Z <S> As I'm sure you've guessed by now, this is a variation of the Form C relay. <S> One side is Normally Open, the other is Normally Closed but as the relay is engaged each contact is double make or double break. <S> Some references: Gigavac TE-Relay_Definitions.pdf <S> (see pg 5) <A> A form A contact is single throw, normally open, closes when relay is operated. <S> A Form B contact is single throw, normally closed, opens when relay is operated. <S> simulate this circuit – <S> Schematic created using <S> CircuitLab (Our handy schematic editor doesn't have a Form B switch) <S> A single pole relay will have only one set of switch contacts. <S> Double Pole will have two sets, so can switch two circuits. <S> Relays are available with four or more poles. <S> The Form A, B, and C terminology is also used with switches. <S> Form C contacts may be described as "shorting" or "non-shorting". <S> In a "sorting" switch, all three terminals will be connected together briefly as the switch moves between positions. <S> Relay and switch contact arrangements are often given as "SPST-NO" (Single Pole, Single Throw, Normally Open) for a single Form A contact, or "DPDT" (Double pole, Double Throw) for two form C contacts. <S> A Double Throw (form C) switch or relay can be substituted for either Form A or Form B - just ignore the unwanted contact. <S> I'm not familiar with X, Y, or Z contact arrangements. <A> Form X, Y and Z are the same as Form A, B and C, except there are two sets of contacts instead of one. <S> They are usually used for power <S> relays where the contacts have to carry a lot of current, e.g. 40 A at 440 V. <S> The double contacts I presume would reduce wear and arcing when the contacts are separated. <S> Here are the schematic diagrams for a Form Z and Form <S> x: <A> The bifurcated contacts of Forms X, Y, and Z are actually designed to reduce noise when switching low power signals for the sake of digital circuitry, as two small contacts bounce much less than one massive one. <S> Forms U, V, and W are similar to X, Y, and Z, respectively, but the armature itself is doubled, not the contacts. <S> And I'm at a loss as to why that was done... <S> And of course, GR Tech's detailed chart shows there are still more derivatives available. <S> There is, however, some debate as to whether or not the bifurcated contacts are really worthwhile, as they tend to be more expensive, and a good software debounce is usually just as good as a hardware debounce. https://forums.qrz.com/index.php?threads/are-bifurcated-relay-contacts-any-better-than-paired-contacts.281935/
A form C contact is double throw - the moving contact is connected to one "output" when the relay is released, and to another when the relay is operated.
What is the purpose of a resistor on the non-inverting terminal of an Op-Amp Integrator? I have seen this type of circuit design a few times, but am not sure why it is needed. Considering the schematic below, what is the purpose of resistor R3? <Q> It depends on the opamp. <S> In the old days when we had to trudge to school barefoot in the snow uphill both ways, opamps inputs drew enough current to matter to many circuits. <S> For such opamps, the imbalance in current between the two inputs, called the input offset current <S> was lower than the total current drawn by each input. <S> You could cancel out the common current drawn by both inputs by driving them with the same impedance, leaving the additional voltage offset due to the lower offset current. <S> In your example, R3 is there to present the same impedance to the + input as is driving the - input, which is R1//R2. <S> Generally, this is the case with opamps that have bipolar transistors on the input, such as the common jellybean LM324. <S> Today a lot of ompamps have MOS inputs, so the input bias current is so low as to not matter in most cases. <S> Since the current is due to leakage and not biasing the internal transistors, you can't really count on its direction. <S> There generally is no bias current offset spec. <S> In this case, there is no point in trying to match the impedance driving each input. <S> You do sometimes see this on MOS-input opamps due to a religious conviction or someone applying a rule of thumb without thinking about what it's for and when it's valid. <A> It it to mitigate the input leakage current of the OPAMP <S> The OPAMP will attempt to keep the difference between + & - to equal zero. <S> The input leakage current of the OPAMP in conjunction with gain resistors will produce a voltage at the - pin. <S> If the + pin was tied to 0V there would now be an offset error voltage By providing a resistance to 0V (usually the parallel equivalent resistance of R1 & R2) <S> the offset error due to this leakage current can be mitigated. <S> Here is a good writeup on the affect. http://www.analog.com/static/imported-files/tutorials/MT-038.pdf <A> R1 is there to counter-act any small DC offset since the integral of any DC offset tends to infinity. <S> These offsets can come from source errors (your source may not be exactly a sign wave) or they can be intrinsic to the Op-Amp (known as input offset voltage). <S> edit: <S> oh wait, you're asking about R1, not R3. <S> Incidentally, it amused me when someone up-voted my initial wrong answer.
R3 is there to counteract the effect of input bias current (basically the assumption that an op-amp has no current flowing into its input terminals isn't true, so you need to account for it).
What will happen to a transformer if rated output voltage is injected to the secondary terminal? I believe that I have a three phase delta to single phase transformer 1Kva with input 415 v three phase and output 230 Vac single phase. ( Someone help me to identify what kind of transformer is this? ) I would like to test the transformer. What would happen if inject a 230 vac from a socket directly to the secondary of the transformer? Would I damage the transformer or it's perfectly fine and I would get the 415 v ac at the primary end. I'm just worried the sudden surge of voltage to the terminal may effect the transformer wingdings. Below is the sample picture what I'm trying to do: (please ignore the immature wiring connection and the exposed fuse) Some part of me saying this is a bad idea. What would happen and why is the question now? Edit:Primary connections: Secondary Connection: <Q> No, you would not get 415 volts at the primary <S> , at least if this is a regular symmetrical 3-phase transformer in open delta configuration. <S> The turns ratio in that case would be would be (415 x √3)/ 240 = 3. <S> However, if you feed the secondary you lack the 120⁰ phase shift resulting in only 1/2 of the voltage over the individual secondary windings (now primary), therefore 120V instead of 138V. <S> The primary will drop proportionally to 360V. <S> You may want to check if the transformer is truly a symmetrical 3-phase transformer. <A> Would highly recommend that you try testing first with 2.4vac or 24VAC input. <S> For a simple unloaded transformer the ratio of input to output will be the same. <S> Note that determining proper 3 phase output may require a scope or special circuitry to see the phase differences (if needed). <S> Using a Variac (variable transformer) can help select low input voltages. <S> Other safety measures would include fuses and/or resistors in line with the input voltage. <S> If absolutely required to have a test system using the full voltage input you might put the whole transformer that is being tested behind a clear shield or enclosure that prevents any test person from accidental contact. <S> Entry to the enclosure or removal of the shield would open interlock switches (opening up all input lines) disconnecting all power to the transformer. <A> Amended due to original question being misleading. <S> It appears that you have a transformer that produces a single phase output but has a 3-phase input connection. <S> On the face of it, it's a magical black-box that converts 3 phases to a single phase using one common core. <S> This can't happen with standard magnetics; either the transformer is only using two input windings with the secondary on a third branch of the magnetics or something else is happening that is beyond my understanding. <S> It looks like (from the top picture) that there are two primary windings and the secondary is receiving the magnetic field from both in the shared central section of the core. <S> IF THIS IS THE CASE, then you have to decide how the primary coils are wound and whether there is a true 3-phase connection - I suspect that there isn't but using a multimeter should uncover this. <S> This is how I suspect it is functionally: <S> - If this is true then my original deleted answer basically stands - <S> you should be able to apply 230V/240V to the primary across two particular connections and get something like 127 volts on the secondary. <S> Please note that the supply out from this device is 230V not 240V as stated in your question. <A> But this is not a single phase transformer. <S> There are several ways a three phase to single phase converter might be wired. <S> There's some information in this source: http://carroll-meynell.com/technical-3phase . <S> If you introduce voltage to the secondary winding, the primary windings probably end up with different voltages. <S> At the very least, use a circuit breaker <S> and I'd suggest using a series resistor at the 240VAC end to limit the current. <S> You're not attempting to load (take power out of) <S> the primary coils, are you?
For a single phase transformer and the transformer is working properly, then it would be OK and you would get 415 VAC to the primary as you suggested.
Mixed SPI and I2C using ATtiny USI I've been successfully using the USI on an Attiny84 to talk SPI to a radio module. This is good for hacking up sensors and whatnot as little radio devices. My next sensor project involves a sensor with an I2C interface. I know the USI can talk I2C as well, but I'm already using it to talk SPI to the radio. I know the USI itself has mode bits to switch it from three- to two-wire mode, so I could have it talk SPI or I2C. But how might this interact with external hardware? When it's in I2C mode to talk to the other device, the SPI device's SS line is deasserted, so the SPI radio will just ignore it. But when it's in SPI mode to talk to the radio module, surely the data and clock lines will be such that the I2C device thinks a transaction is ongoing? Anything I can do to prevent this? Some ideas I have: Software implementation of I2C on two spare GPIO pins. Putting a buffer gate between the clock output of the tiny USI and the SCL line of the I2C bus, so that one GPIO pin on the tiny can control it. Use another GPIO pin as the SCL line on I2C bus, and use software-only clocking of the USI. Each of these uses at least one other GPIO pin though, and I don't have many spare. Can I do it a nicer way? E.g. some order-guaranteed way of working the lines when in SPI mode, so that I2C never sees a "START" condition? Has anyone else ever successfully mixed these? <Q> You could use an SPI to IIC bridge like this device . <A> The solution I settled on was to use a single-gate version of the 4066, namely a 74VHC1G66 (which is a tiny SOT-23-5 part) as a transmission gate to link the SDA part of the I²C bus onto the appropriate pin of the USI module. <S> The transmission gate's control input is active-high, which means I can control it from the slave-select line of the SPI chip. <S> When the SS line is high, the gate is conducting and I²C will work through it (bidirectionally) while the SPI chip ignores it. <S> When the SS line is low, the SPI chip is paying attention to the line now working in SPI mode, and the I²C chips don't see anything because the gate is in high-Z state, and the pull-up resistor on the SDA line keeps it high. <S> This is an easily-extensible arrangement if more than one SPI slave is added, because they can be diode-ORed together with a pullup resistor on the 1G66's control line. <A> Pin 1 is SPI chip select and I2C clock. <S> Pin 2 is SPI MOSI and I2C data. <S> Pin 3 is SPI clock. <S> Pin 4 is SPI MISO. <S> In order to talk over I2C... <S> Keep pin 3 and 4 static, and then talk over I2C as normal. <S> The SPI device will see a chip select but no clock so nothing will happen. <S> In order to talk over SPI, just use the SPI bus as normal. <S> Note that unless you are trying to create an I2C start or stop condition you must take care to never toggle pin 2 while chip select is high. <S> While the chip select is low <S> the I2C device will just see a clock stretch since the chip select is shared with the I2C clock. <S> It will ignore all the data transitions on the data pin because it is only supposed to latch data on the rising edge of the clock, and even then only after having seen a valid start condition.
You can mix a SPI and an I2C bus on the same four pins (with no additional hardware) if you only have one SPI device.
Capacity of a capacitor fully charged vs half charged I read in most places, when people ask "can I replace a 10v 10uf with 100v 10uf?" and everybody answers "it's the same". Well... how can it be!?, I have a comparator circuit, that uses a little capacitor to set the "on time" of the circuit. And it makes no sense, is not the same a 10v 10uf cap charged to 10 volts, that a 100v 10uf cap charged to 10 volts... If I am correct, where can I find more info related to this? if I have a 100v 10uf cap charged to 10 volts, what is the real uF of that cap? when is 10v only? <Q> While practically there are a lot of differences between a 100V and a 10V capacitor (dialectic, size etc....) <S> An ideal (i.e., overlooking specifics of the dialectic differences and tolerance differences) <S> Sure the 100V capacitor has the capability to store more (\$\frac{1}{2}CV^2\$ & \$Q=CV\$) but for that operating point the same charge exists in both. <A> The capacitance is a function of the plate area and spacing, and also of the dielectric constant of the material between the plates. <S> The voltage rating is simply a function of the thickness of the dielectric and the intensity of the electric field that's required to cause it to break down. <S> The two are almost entirely unrelated. <S> As long as the dielectric doesn't actually break down, the first statement holds, which means that the capacitance is constant, regardless of the actual charge or voltage on the capacitor. <A> In terms of basic function, they are the same (as long as the voltage is within the rating of the 10V capacitor!) <S> In terms of long-term reliability - if they are both electrolytic capacitors - a voltage of 10V may not be enough to keep the 100V rated capacitor fully formed, and it may develop higher leakage current than the 10V capacitor. <S> Some electrolytic capacitor datasheets recommended maintaining a voltage of ideally 2/3 the rated voltage, and generally never less than 1/2, in order to maximise the useful life of the capacitor. <S> In practice I can't say I've ever seen failures I could attribute to violating this rule (other than zero or negative applied voltages!) <A> If both are electrolytic capacitors the tolerances might be very large, (typical for an electrolytic). <S> So a timing circuit will likely not be reliable (or repeatable) when swapping out this type of capacitor. <S> If a timing circuit needs to have a tight design tolerance then it should be made using a capacitor of high quality and a known tolerance. <S> As others stated, leakage currents could be very different in different voltage rated electrolytic capacitors. <S> Equal value capacitors of different material types can also have very different leakages. <S> For example electrolytics will typically leak much more then a polycarbonate capacitor of the same value. <S> (The different leakages will make the capacitor seem to have a resistor across it, again making a timing circuit inaccurate.) <S> A few capacitor manufacturers provide charts in their specification documents that show the typical capacitance changes per a change in applied voltage. <S> These may only be provided if there actually is a significant change in value with the applied voltage.
The difference you see in the "on time" of your comparator circuit with different capacitors (of same value but different voltage ratings) can easily be due to the tolerances of the two parts. 100V 10uF capacitor charged to 10V stores exactly the same amount of charge as a 10V 10uF capacitor.
Removing PCB from complex pattern of soldered-in thru-hole posts? I have a PCB mounted to a chassis with 16 feedthrus, the feedthrus posts are soldered to plated thru-holes in the PCB. I would like to remove the PCB from the chassis, the problem is that I am unable to remove 100% of the solder from the plated thru-holes and I am unable to simultaneous heat all 16 points to try and remove the board while the solder is hot. The 16 posts are arranged in two identical groups of 8 with an identical outline. I've tried to remove the solder from the thru-holes using solder wick and a vacuum solder-removal gun but a little solder is always left, this is probably due to the sizing of the holes which are only slightly bigger than the feedthru pin, 22 and 18 mils respectively. One idea is to make a custom soldering iron tip that exactly matches the hole pattern so that all 16 holes can be heated simultaneously, then the board can be removed while the solder is liquid. I've never made a custom soldering tip before so this method has some inherent risks from the unknowns. Any other suggestions for removing the PCB? Also, heating the whole assembly above 150°C is not desirable due to sensitive components that are mounted to the chassis on the other side. <Q> I'm assuming no access to the other side. <S> (Otherwise cut the pins and remove them one at a time.) <S> I like a solder sucker for this. <S> (But this also assumes none of the pads are connected to a ground plane... <S> It's sometimes hard to get enough heat into the ground pad pins.) <S> Make sure the solder sucker is clean <S> (My has an o-ring that I will take out and re-grease.) <S> Then for that last bit of solder that holds the pin to the pad, heat it and try wiggling it with some tweezers until it is free... sometimes you can push it down a bit. <S> If this doesn't work then my only other thought is to try and drill the pins out. <A> You might want to try with ChipQuik . <S> It is a solder that has much lower melting point than your everyday solder. <S> When you remove as much solder as you can, flood it with ChipQuik. <S> Given enough solder, it should be possible to keep all points in melted state by reheating them in turn as they turn solid. <S> Once you do have them all melted at the same time just wiggle the board until you get it out. <S> And don't forget to clean ChipQuik before you resolder things back in. <A> This always worked for me. <S> Use a hot air gun and heat up one side and lift it up a little bit and hold it until the solder cools down. <S> Do the same on the other side. <S> Repeat until the pins come out of the board. <S> This way you don't heat up the whole boards and endanger sensitive components. <S> Best for the job would be a narrow nozzle hot air gun, or you can make a nozzle reduction using some aluminum foil and shape it conveniently for the area you want to heat up. <S> Good luck.
Then work hole by hole, sucking out the solder.
What does the D stand for in "D Flip-Flop"? I'm rather interested in the history of eletrical engineering, and I've seen some discussion here and there about the origin of the names of the various flip flop circuits. Some time ago I took part in one such discussion here: Understanding D flip flop function - what this thing does , and became so interested on the subject that I purchased an early textbook from 1957, which supposedly is the first university level textbook where flip-flops are discussed. I promised to report my findings, and I'll do so below. But sadly it didn't answer all my questions. It seems that using flip flops was already an established tradition in 1957 and the book doesn't discuss any history. So please answer if you have any info on the subject. So I am looking for references that predate 1957. I am also interested in the origin of the characters J and K in a JK flip-flop, in case someone would be able to verify or clarify the answer given in What is the meaning of JK flip flop's J and K ? . <Q> This doesn't prove anything <S> but it suggests that already in 1957, at least, there was tradition to suggest that the D means "delay". <S> As a side-note to put things into historical perspective, here's a schematic for a flip-flop from the same book, using radio tubes and 200 volt anode voltage. <A> The consensus seems to be that the "JK" is in honor of Jack Kilby, and the following is from: ELECTRONIC INVENTIONS 1745-1976, By G.W.A. Drummer, ISBN 0-08-020982-3 <A> To my knowledge, the "D" for the D flip-flop stands for data . <S> The reason for this, is that what ever "data" is on the input, it will be saved and "reflected" on the output, on the leading or falling edge of the clock. <S> A typical application involves the use of 8 of them with their inputs connected to the data bus, when you pulse the clock, the data on the bus will be captured in the flip-flops and made available on their outputs. <S> Although they can be used on different applications, this was their main application.
Montgomery Phister's textbook "Logical design of digital computers" from 1958 (written in 1957) introduces the D flip-flop as "the delay memory element" .
using a capacitor for an off-grid system New to the side and have very little knowledge on electrical systems. I'm trying to come up with a good off-grid system for my small house and have the idea of a PV array with a battery bank, charge controller, and inverter to charge during the day, and then have a bicycle running a car alternator to charge the batteries/help with load during the evening when I workout. Now my question is, we intend to run some high-draw appliances such as a vitamix blender, food processor, etc. from time to time, and will these appliances need a capacitor to help with the large draw when we first turn them on? Both to protect other devices running off of the electric system and also for the batteries? I'm assuming so, but wanted to make sure so I don't spend money unnecessarily. Also, how would I calculate the size of capacitor I'd need if it is necessary? Also, correct me if I'm wrong, but I should not be overly concerned with the battery bank being depleted from appliances like this since they are on for a minute or less at a time? I'm planning on a bank of about 400-800 amp-hours. Please correct me if I'm mistaken! Thank you all very much in advance! <Q> The quick answer is no. <S> A capacitor won't help, AND you don't need it. <S> If you have a 400 - 800 AHr battery, it will provide you with all the juice you need for a small appliance such as you've specified. <S> If you're worried about transient load currents (as you should be), you need to pay attention instead to your inverter specifications. <S> Inverters don't generally have much excess margin on their load current specs, so you need to get one which seems oversized compared to your average load. <S> The exact amount of this overage will depend on exactly what appliances you're using. <S> Recharging via exercise bike won't hurt, but it won't help a whole lot, either. <S> The general rule of thumb for humans doing work (like driving a generator) is 100 watts. <S> This is (roughly) the solar power incident at noon on a 1 square foot solar cell. <S> Figure 20% efficiency for the cell, and a 1-hour workout on the bike is more or less the equivalent of an extra square foot of solar cell over the course of a bright day. <S> Like I say, it won't hurt, but its major impact will be to make you feel better about exercising and not wasting energy. <S> By the same token, running appliances for short periods of time need to be taken into account, but in general they are not dominant in your energy budget. <S> Let's say a blender draws 10 amps at 120 volts. <S> For a really good inverter with a 12-volt input, that's an inverter draw of 100 amps. <S> But, it only lasts for 1 minute, so the total battery drain is 100 amps x 1/60 hours, or about 1.5 amp-hours. <A> A 1500W appliance running for one minute consumes 25 W-h. <S> Compared to your total proposed capacity of 4800 to 9600 W-h (I'm assuming 12V batteries), this is a drop in the bucket. <S> As long as your inverter can handle this peak power level, your batteries will be fine, and you don't need any extra capacitors, either. <A> on paper you guys are right, however deep cycle batteries often have trouble starting certain appliances such as a freezer, hi amp blender or juicer etc. <S> I recently set up a system with 4 deep cycle 12v batts that together ran a 720ahr bank. <S> Also i bought a pure sine wave inverter rated at 3000w peak 6000w. <S> This system should have been way overkill to start a small chest freezer which ran at 150w but starting it was drawing 1800w and immediately draining the bank while never fully starting the freezer. <S> The answer was a car audio capacitor. <S> I bought a 4000 ferad capacitor for 35 bucks online and hooked it up in parallel with my batteries. <S> It works like a charm. <S> there are hazards involved with charging capacitors but this system works well. <S> Deep cycle batteries and capacitors are on opposite ends of the spectrum. <S> the batteries deliver a consistent voltage but have poor immediate surging power. <S> A capacitor can surge immediately but voltage will drop until it is recharged. <S> hope this helps. <S> Get a capacitor that is rated somewhere around your inverter wattage output. <S> hope this helps. <A> I have exactly the same setup as 69992, and its true. <S> even though the system should handle a load such as a freezer pump, juicer sometimes they just dont and voltage drops quickly. <S> First thing people underestimate is wire size. <S> from batteries to inverter wires should be 0 guage or bigger like 0/1 or 0\2. <S> overkill these wires and make them as short as possible. <S> Now some cheaper deep cycle batteries like 24 or 27 series simply dont preform like a trojan or rolls and dont have the dump capacity needed to surge start loads like these. <S> These can be bought on ebay for like 30 bucks. <S> Now these need to be wired in parallel with your batteries with the same heavy guage wiring as before as they are part of the same 12v loop. <S> this loop should be capable of handling loads up to 200 amps as after the inverter the most current you would probably use with a etup like this is 20amps at 120v. <S> thats why people go to 24 or 48 volt systems as they can get away with smaller wire sizes at the 12v loops. <S> The capacitor was the key, i have a 4ferad cap in parallel with my batts. <S> I was told that you size the cap to thw general wattage used so a 4 ferad cap would couple to a 4000w inverter perfect. <S> these caps are not well known about in the off grid world, they solve alot of problems. <S> The one unknown aspect of this setup is the unknown behavoir of battery charging as you are also charging the capacitior as well. <S> hope this helps
My solution to this problem was a car audio capacitor. Additionally, without going into details, practical capacitors simply don't have the energy and power density you want.
Transform a 0-10V into 0-5V and use op-amps as buffers? I would like to transform a 0-10V into a 0-5V so I can read it with "5V MCU" (like the AVR/Arduinos). In the most basic case I would just put 2 resistors and do a divider, but since I don't know how that would affect the signal source I figure that I could add a buffer with op-amps since it would be safer. So I could add a voltage follower on both sides of the divider. simulate this circuit – Schematic created using CircuitLab Or I could do a amplifier with amplification with 0.5 and then a voltage follower as a buffer. simulate this circuit Is it overkill to add the op-amps? Is it a good idea to do this kind of things, or is there another way? <Q> Your first circuit is fine. <S> You could even use 100k resistors instead of 10k to save power. <S> Note that your first op amp will need to output 0-10V, which means you won't be able to run it off of a 0-10V supply. <S> If you don't have a rail-to-rail op amp, I'd recommend at least a +13/-3 V supply. <S> As Matt said, your second circuit will not work. <S> The gain of a non-inverting amplifier cannot be less than 1. <S> You could use a pair of inverting amplifiers, with the first one having a gain of 0.5. <S> That would help with your output range as well, but there would be a small load on your source. <A> If you don't have a higher voltage supply (like 12V) available, I would suggest a voltage divider and buffer amplifier. <S> For example: simulate this circuit – Schematic created using CircuitLab U1 <S> has to be a RRIO <S> (rail to rail on both the input and the output) <S> op-amp (and should be a CMOS type with very low input current to use such high value divider resistors). <S> This also avoids the problem of the op-amp outputs exceeding the supply voltage of the micro under certain conditions (open input, for example), which would otherwise have to be dealt with to do things properly. <A> Depends on your requirements. <S> Do you need to sample at a very high frequency? <S> If so, you will definitely need to add some buffers. <S> The first circuit you have would work, presuming the op amps can achieve the required output swing. <S> However, if you do not require a lot of bandwidth, using a simple resistive divider will work. <S> Using a high resistance will ensure that the source is not loaded. <S> However, you will get droop on the ADC input as the ADC sampling capacitor charges up, so it would be advisable to add a capacitor to ground at the ADC input to smooth this out. <S> Either way, the 2nd circuit is not going to do what you want it to as <S> the gain of the first amp will be greater than 1.
It may be a good idea to look in to using a single buffer as well, either before or after the divider, depending on bandwidth requirements and power rail availability. The first amp will need to be powered off of at least 0 to 10 volts, and the second amp could be powered from 0 to 10 or 0 to 5.
Is DIP28S the same as SOP28? I am looking at buying a chip holder for a chip that comes in the form of DIP28S according to different datasheets on it. However when I searched for DIP28S chip holders I could only find SOP28 chip holders, and the measurements of them would allow the DIP28S chip to fit in those chip holders. So my assumption would be that DIP28S is the same or very similar package form to SOP28. Am I correct? <Q> The packages are different, you won't be able to use SOP holder to hold a DIP package. <S> The datasheet shows 1.78 mm pin distance <S> so it is more narrow than the standard DIP which gas 2.54 mm between pins. <S> Therefore, standard DIP socket won't work either. <A> DIP28 is usually 600 mils wide, with a 300 mil width also very common; the "S" in this package name refers to the fact that it is 400 mils wide as per the mechanical drawing. <S> You will need to find a socket that fits appropriately, rather than the normal 300 mil or 600 mil sockets used for DIP28. <A> , that is basically a standard DIP x 0.7. <S> It used to be quite popular in the Asian market (eg. Fujitsu ). <S> Also "DIP28S" has also been used to refer to the "skinny" 300-mil wide 28-pin DIP package to distinguish it from the 600-mil wide package. <S> In no way is it the same as an SOP-28 SMT package.
DIP28S could be a "shrink DIP" through-hole package
What kind of component would I need to put a break in a RS-485 bus? I'd like to have some kind of electronically controlled switch (transistor, relay, solid-state relay, etc) that acts as a break in a RS-485 bus. The effect I would like is to optionally split the bus into two halves, isolating one half from the other. Obviously RS-485 signals would need to be transmitted clearly (even high-speed 2Mbps+ signals) when the switch is in the 'on' state and no signal should get through when the signal is in the 'off' state. What kind of component should I be using, and how should I wire it up? P.S. I'm looking for a component that is as physically small as possible, and I'd like the switching voltage to be 5V or lower. P.P.S. The RS-485 bus cables in my application will be short enough that signal reflection won't be a problem, so I'm not going to worry about any termination at the moment. Nevertheless, bonus kudos is available for a solution that could optionally incorporate switching in a termination resistor on each side of the break - as I'm sure that would be useful to someone in the future. <Q> You can just use a relay, optionally switching over to a couple of termination resistors each side. <S> Edit following WRB's comment: If the system can't stand a bit of junk on the bus (which would seem like an oversight in something relying on RS485) then look at quiet relays (mercury wetted for example) or perhaps putting two RS485 transceiver IC's back to back. <A> Placing a simple mechanical relay contact in line with an RS485 signal is asking for problems. <S> The contacts could chatter creating unknown noise on the line. <S> You also should not interrupt an RS485 line unless you are sure there is no data flowing in either direction. <S> A better method would be to use one or more analog multiplexer chips to route the signal pairs. <S> If you have extra inputs or outputs you could put the termination resistors there and switch them in or out as needed. <S> To prevent switching during a potential data stream you might try making the analog multiplexer system addressable by the master device. <S> Lots of sources for analog mux chips on the web. <S> Just be sure to adhere to the signal level and through current limits of the selected chip. <S> Another possibility to keep things more compatible (to RS485 standards) would be to use an RS485 receiver chip and one or more driver chips, and in between them use a standard digital multiplexer. <A> Assuming "proper" half-duplex RS485, you can use a combination of an LT1930 to generate +/-15V rails from a 5V supply, and an ADG5434 to do the switching. <S> The +/-15V rails (well, at least +/-12V rails) are required <S> because RS485 can have a common-mode voltage of up to +/-7V on the signalling pair, i.e. each trace can have between -7 and +12V at any given time. <S> I'm not going to draw the schematic for the LT1930 <S> (refer pg 8 of the datasheet) but here's the schematic for the RS485 switching. <S> simulate this circuit – <S> Schematic created using CircuitLab Note that all four switches in the ADG5434 must be switched simultaneously and in the same direction, and yes the buses are terminated. <S> You should be able to get it down to about 3sqcm of board space, 4 at the outside. <S> Now, issues. <S> It's going to be <S> quite power-hungry (expect around 100mA at 5V for the LT1930 to generate the split supplies), and yes, it's not cheap. <S> On the upside, it has zero latency because it's switched. <S> No solution buffered through two UART's in an MCU has zero latency. <S> The problem with "just a switch" is that in this context you really have two choices for switches: electro-mechanical (a relay) or solid-state. <S> Relays have electrical isolation between the switching mechanism and the switched circuit, but they're large, consume quite a bit of switching current, and usually require more than 5V to operate. <S> Solid-state switches generally aren't isolated (there is an exception to this that I explain below) <S> so they require a supply voltage that covers the possible voltage range of the signal being switched. <S> The exception is photo-coupled solid-state switches, like the AQW612 . <S> They are small, isolated and can switch high voltages <S> (that one will switch 60V AC or DC from 1.14V or higher). <S> You could replace each switch in the above schematic with one AQW612 configured as a SPDT, and drive all of their inputs together. <S> Power consumption would be far lower, around 40mA when switched (and you'd have to change the termination resistors to 95 ohms), but the cost wouldn't exactly drop. <A> What you can't control is the amount of contact bounce. <S> This is not going to be a problem if the buss is idle - the termination resistors generally hold the buss in a specific idle state and separating the buss generally doesn't mess that up. <S> I'm quite partial to the Aromat telcom relays - DPDT in a DIP package with bifurcated gold contacts. <S> Very reliable and designed for long life. <S> Also not all that expensive. <S> You can get smaller relays but the price begins to increase accordingly. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> PS - I wish that someone could tell me how to move the component text in the Circuit Lab schematic diagrams.
A small DPDT relay will do you the mechanical part of separating the two halves of the buss, including adding termination resistors to both halves if necessary.
Can gain and phase margins be obtained from step responses? We need to comply to specific gain and phase margins requirements whereas the controller has been tuned on-line without knowing the plant transfer function (in order to save time). The response does not exhibit any overshoot, but we need to make sure we have 14dB and 30° of gain and phase margins. Can step responses be used for this? For information, the controller is a PI type and the plant is a piezo actuator which twists a ring. <Q> " Can step responses be used for this? " <S> The answer is yes as long as the PHASE margin is concerned - provided you have a linear second-order system. <S> Relevant books and articles contain a formula which relates the phase margin to the pole Q of the system. <S> Because - on the other hand - the pole Q is related to the step respose overshoot, there is a curve which connects overshoot (in %) and the phase margin. <S> For example, for a phase margin of 30deg the corresponding overshoot is app. <S> 38%. <S> (see, for example, S. Franco: " Design with operational amplifiers and analog integrated circuits" , McGraw-Hill, 2nd ed., page 354). <S> As far as I know, a similar relationship does not exist for the gain margin. <A> Unless there are some big wiggles in the gain curve 14dB sounds like plenty. <S> How do you determine the frequency to measure these parameters? <S> As far as measuring these numbers in the step response... I'm not sure. <S> If you want to see that the HF response is 14 dB down, then (I think) that information is contained in the short time behavior of the step. <S> (Dang I'm not sure that is right.) <S> And it will be hard to pick out the details. <S> I'd rather just crank up the gain and see where the system oscillates. <S> (But maybe you can't do that?) <A> When you do a step response, if there are no overshoots, generally you can state that the phase margin is good. <S> However, you are talking about a "plant" and there will be non-linearities and these may cause worsening instability issues that are load or demand defendant. <S> There is no excuse for NOT doing the job properly!! <S> Lives could be at risk! <S> If you want to read what the clever people at TI say, read this paper entitled "Simplifying Stability Checks" - it applies mainly to op-amps. <S> Note that on page 3 there is a section entitled: - "Comparison of Load Step Responses for Varying Phase Margin". <S> This underlies what I said at the top of this answer. <S> It nicely demonstrates how you get more oscillations as you approach a low phase margin. <A> I'm open to other ideas, but that's the best I found.
One method I've found is to identify the system using the Strejc method (which works for any order, sorry the link is in French), then fine tune the model to fit the real system, and finally plot the bode diagram to get the gain and phase margins.
Decoupling caps in circuit schematics difference I want to ask if there is differences between this two circuits: I ask this questions becouse in different schematics like this: There is two decoupling cap of 0,1uF, it's a mistake or are necessary 2 decoupling capacitors? They seems to be in parallel. <Q> Decoupling caps need to be physically close to the pins they are decoupling. <S> This also means every power pin needs its own decoupling cap. <S> Since the values of all your decoupling caps are the same and are small, what you see is probably due to the IC having more than one power pin. <S> This is common with large digital ICs, like FPGAs and microcontrollers. <S> Sometimes you see two caps for a different reason. <S> One of them is a decoupling cap and the other is meant for lower frequency "bulk" storage to ride out short power glitches and the like. <S> The first will be a small ceramic usually in the 100 nF to 1 µF range and physically close to the power pin. <S> The other will be a much larger capacitance, often electrolytic, and can be farther away like at the power entry point of the board. <S> The electrolytic is no good at decoupling because it has poor characteristics at high frequencies, but it does have much higher energy density. <S> Sometimes two true decoupling caps are used in parallel. <S> This is usually for RF or other high frequency applications. <S> No capacitor is perfect, and every real capacitor only works like a capacitor below some maximum frequency. <S> Smaller capacitors usually work to higher frequencies. <S> Sometimes you will see 100 nF in parallel with 100 pF <S> or 1 <S> nF. <S> The extra capacitance from the second capacitor is irrelevant, but it brings lower impedance at higher frequency, which the larger cap can't do. <A> The basic idea is that they are in parallel, however they are possibly located at many different places on the PCB, but not always. <S> Some schematics will show several capacitors all together in one place, and you don't really know where they are physically located. <S> This is very common on VCC and other power lines. <S> For very complex schematics a designer might do this so that other areas of the schematic don't become overly cluttered by too many parts. <S> On the actual PCB there can be a few capacitors at the power supply entry points, a few scattered around the board, and a few right at chip power pins (as by-pass caps). <S> There can be a number reasons for the different physical locations. <S> One is because PCB traces are not perfect, they can have small resistances and inductances. <S> You would want to place the caps in locations that work best with those small imperfections. <S> Placing caps right at the power pins of a chip can reduce noise from getting out of the chip and causing problems further back on the trace, even though the trace might already have a large cap at the opposite end. <S> For example a cap with low ESR might not have a high farad value, but you need both, so you would place a large value electrolytic cap in parallel with a small ceramic cap (which often has a low ESR). <S> On some very high frequency boards you might physically see two small value capacitors at both ends of a short trace. <S> In this case the trace may be purposely used as a small inductor. <S> The schematic for these boards will sometimes shows the caps separated with an inductor, but you won't see a normal inductor on the board. <A> The thing about schematics is they do not necessarily reflect the physical layout and location of components. <S> It is likely both capacitors are necessary but are located in different areas of the physical layout to protect each area from voltage drops and transients. <S> More on decoupling capacitors here .
Other times you may see a large value cap and a small value in parallel, this may be because the component they filter require special conditions that can only be satisfied by mixing different types of caps.
Is Power consumed by a motor under various load conditions constant? Does a motor (dc /Induction/Synchronous ) consumes more power when operating at higher load than when operating at some lower load? Or power consumption remains constant/same in both cases? What I think is that, Power drawn by motor should increase as we increase the load on motor. But, someone told me that Power drawn remains constant.For example a 10 kW motor will always consume 10 kW irrespective of load on it.He said power consumed is P=3 V I pf (pf=power factor) for a 3 phase induction motor.As load increases current I increases but Power consumption remains constant as V ,pf change to compensate the increase in I in order to make power remain constant. Please explain this. <Q> Don't let inductive current lag (apparent power) confuse the issue. <S> Ohm's law still applies. <S> When you apply a voltage to a motor, the resulting motion generates a "back ElectroMotive Force" against the coils; its rotation feeds back a resistance that regulates the current, in proportion to the motor speed. <S> If an external load reduces the speed of the motor, that "back emf" is reduced (the resistance of the motor decreases ), increasing <S> current <S> in order to maintain the voltage , and thus power increases . <A> Your friend is incorrect. <S> The rating on a motor is the rated power that the motor produces at the shaft. <S> It isn't the power that the motor draws. <S> Also note that this is the rated power, which means that it doesn't always produce this power, only that this is the maximum power that the motor can safely run at continuously. <S> The input power of the motor will vary depending on the load. <A> "For example a 10 kW motor will always consume 10 kW irrespective of load on it. <S> He said power consumed is P=3 VIpf <S> (pf=power factor) for a 3 phase induction motor". <S> If this would be the case, motors as we know now would probably not exist. <S> Since V is constant, the product (I x PF) must remain constant as well. <S> As the power factor varies between 0 and 1, the motor would run at a ridiculously low PF at full load. <S> You could only have solved this if motors would be incredibly over-dimensioned or PF would have come standard with every motor. <A> At steady state, the electrical power input to the motor is exactly equal to the output mechanical power at the motor shaft, minus any losses. <S> You can arrive at this conclusion by considering the conservation of energy. <S> If the amount of power input to the motor were more than the amount of power being taken by the load, the extra power would have to be going somewhere. <S> (In real life, excess power is stored as kinetic energy - the motor accelerates.) <S> To illustrate that power in is proportional to power out, see the example motor curves below. <S> Note that power input to the motor (red curve) is roughly proportional to power output. <S> Also note that power at no load is 12,100 watts - <S> this represents the losses of the motor at no load, i.e. friction losses, iron losses, copper losses. <A> You are right and someone is wrong. <S> a motor with no load draws little current and also has a low power factor. <S> when loaded he power factor increases and current draw increase. <S> power consumed is a slippery term, for example the first law of thermodynamics puts it at 0 motors produce heat mostly by electric resistance, so heating is proportional to the current flowing through the motor, current isbasically proportional to torque, so that increases with load too. <S> Put a large motor like a vacuum cleaner or a circular saw on a long enstension lead with an incandescent lamp. <S> at night start the motor up and you'll see the lamp dim and then brighten again, <S> this if proof that he motor poses a variable load. <S> A similar experiement can be dome with a pocket fan motor flashlight globe and a 10 ohm resistor in series with the battery. <S> (slow the fan by hand ans <S> watch the lamp dim) <S> About the only thing likely to be constant is reactive power <A> So you were correct. <S> The confusion that your "friend" has may be related to the fact that a PORTION of those losses in the motor are fixed, meaning there are losses associated with just making the chunks of iron and strands of copper act like a motor at all, and those losses remain the same regardless of loading on the motor . <S> So as the load on the motor decreases, even though the QUANTITY of power lost decreases with the load decreasing, the PERCENTAGE of total load that those fixed losses represent does go up. <S> So for a rough rough example let's say you have full load on a motor that is drawing 1000W with 100W of total losses, and 10W of that is fixed losses in the motor, so 10% of the losses are the fixed losses. <S> If the load on the motor drops to 500W, and the losses drop to maybe 60W, but that 10W loss in the motor itself remains constant, that 10W represents 17% of the total losses now, instead of 10%. <S> That sort of issue gets some people confused into thinking that the actual total power doesn't change because "losses increase". <S> It is a RELATIVE increase in PERCENTAGE, not an ACTUAL increase that takes place.
Power consumed by a motor = power required by the load + losses.
How to fix EMC problems for existing designs? I'm going to be looking at a few products that have failed EMC radiated emissions testing and will need to apply fixes in order to make them pass (unfortunately, in these cases, two of the designs can't be modified to fix the problem at board level). NOTE To see high resolution images of the scans, right click on the images and open in a new tab/window In my particular case, the problems seem to stem from the following: Product 1 is in a metal enclosure with a cut out for a TFT display and keypad, and several cables running out of the enclosure. The system is microcontroller based, with unshielded power, shielded CAN and shielded RS232 interfaces exiting the enclsoure. The problem seems to be coming from a 25MHz crystal that is driving the graphics controller and is leaking out from the cables and also from the front of the screen. Product 2 is also in a metal enclosure but with a plastic window and cables running out. This system is microprocessor based (Linux) with unshielded power, shielded CAN and shielded RS232 interfaces exiting the enclosure. The problem in this cases appears to be stemming from the 3A, 5V switching power supply on the board (Lot's of 3kHz harmonics). There's also a lot of 45MHz harmonics stemming from the SD card. This product is open to design modifications Product 3 is in a plastic enclosure with a large plastic window for indicators and cables running out. The system is microcontroller based with unshielded power, shielded CAN and unshielded GPIO interfaces exiting the enclosure. The problem seems to be stemming also from the same 3A , 5V switching power supply (same design as the previous item). All three products are double layer boards. What steps can I take and what solutions can I use to help reduce the radiated emissions of this existing design? What reference material (books, articles etc) can I use that discuss this topic? <Q> There are a couple of general strategies you can consider: <S> Add shielding if there isn't already. <S> Close gaps in the shielding. <S> Remember the radiating efficiency of an opening in the shield depends roughly on the largest dimension (a 4" x 0.001" seam radiates nearly as efficiently as a 4" x 4" hole), so concentrate on breaking up the longest seams with gaskets or other types of conductive materials. <S> Add EMI-absorbing material within the enclosure. <S> This is usually a stop-gap to avoid changes in other parts of the design, but it's generally expensive and not necessarily very effective. <S> Beyond these general strategies, this kind of problem depends a lot on the details of your system and <S> exactly what changes you can afford to make, so it's hard to be more specific about what you can do. <A> There are things you can do, photon has some nice tips above. <S> Do you have the scans from the failure? <S> Post one if you do. <S> these <S> the loop one is the most useful. <S> Borrow a spectrum analyzer or go to your testing house and use theirs (even if you aren't in a chamber). <S> Now sniff out the source of your failure with the probes. <S> Gradually you will start to understand the source of the radiation, then you can start to deal with it with counter measures to see if it goes away. <S> You say you can't change the design, but you could probably swap components or maybe add a little resistor or ferrite bead here and there. <S> Oh and don't underestimate the usefulness of using a spread spectrum clock source if your design can support it. <A> You're basically between a rock and a hard place. <S> The answer is shielding, both electric (e.g., sticky copper foil) and magnetic (e.g., ferrites around cables). <S> But pay attention to costs. <S> If you can't respin the PCB, I'm guessing that you also can't retool the enclosures. <S> But stopgap measures such as ferrites and copper foil are going to add significantly to your recurring costs, including the labor of installing them. <S> It doesn't take long to get to the point where a respin would have been more cost-effective in the first place. <A> As mentioned already, you'll want to use clamp-on ferrites around the cables to keep common-mode noise down (common-mode current measurements are a good way to find out if you have a problem there). <S> Also, is the switching power supply in the second and third designs integrated into the same board as everything else, or is it a separate board? <S> If it's the latter -- it may be worthwhile suggesting a quieter replacement for it. <S> Have a book , by the way. <S> EDIT: <S> I didn't see you post the graphs until now -- <S> while all I wrote above should be helpful, there's other things you can do as well, especially to the second product <S> and it's pesky SD card slot. <S> I'd suggest having the software devs underclock the SD card, and then making a hardware change to series resistors to the SD card lines near the IC that drives them -- <S> these two changes, taken together, will reduce both the frequency of the noise (making it easier to shield and harder for the board to radiate) and <S> its amplitude (by increasing the signal rise and fall times -- if you can use built-in slew rate control to do this, that's good too, for that matter).
One suggestion for the leaky windows would be to use a conductive mesh or coating gasketed to the case or case shield; this will suppress much of the RF coming out of them. Get some emi probes I use Start disabling things in your circuit or removing parts until you see the frequency you failed at go away.
Op-Amps with unequal split supplies (e.g. V+ = 25V, V- = -11V) Most electronic designers will be familair with designing op-amp circuits with a single supply rail (e.g. Vs+ = 5V, Vs- = 0V) or matched split supplies (e.g. Vs = +18V, Vs- = -18V). I have a design where I need to handle both +24V inputs and -10V inputs. Of course, there are some off-the-shelf parts that can handle +/-40V supplies, but my choice is rather limited. On the other hand, op-amps with 36V supply voltages are plentiful, and given my voltage span is +34V, a carefully chosen rail-to-rail input/output (RRIO) op-amp should be up to the task, if I can make the supplies +25V, -11V. This would make the design rather unusual (to say the least). What do I need to pay particular attention to when designing for this unusual arrangement of supply rails? Or, am I simply better off going for the high-supply op-amp? EDIT: Do I, for example, need to take into account the following: A higher than normal offset voltage/bias current? Problems with matching between bias current and/or offset voltage between channels? Changes to distortion? Any other likely specification changes? <Q> Remember that the op-amp thinks only in terms of V+ and V- applied. <S> It doesn't care what you call ground. <A> There's no reason in general to be afraid of unequal supplies. <S> You might have to calculate some resistor values for the regulators or whatever, but that's no big deal. <S> You do have to be concerned a bit about headroom- <S> if you're using an inverting amplifier, for example, the output can only swing to (say) -9V <S> reliably, so you can't have a gain of -1 and a 20V input. <S> So, you might have to scale the inputs, so that you do not run out of headroom, again no big deal, so long as you allow for it. <S> I would suggest avoiding RRIO op-amps where possible. <S> RRO and single supply <S> op-amps are generally a better choice. <S> In particular, high-voltage RRIO op-amps are seldom necessary or appropriate. <A> @Caveman almost has it. <S> Unless you're dealing with a genuine precision design, there is nothing to worry about. <S> If you're dealing with 10's of microvolts, then there are a couple of extra factors to consider. <S> One thing to take into account is that it will change what the "common mode" (with respect to what you call ground) with a corresponding impact due to CMRR . <S> Consider also that the change in supplies will affect the output due to PSRR . <S> For actual simulation results, take a look at this answer . <A> Do you need very high input impedance? <S> If not, the inverting amplifier configuration can be used for inputs that go outside the power supply rails, since the voltage appears across the input resistor and the -ve input is a "virtual ground". <S> Then you can use a 5 V Power Supply. <S> Depends on the application? <S> What are you trying to do?
It's fine as long as you don't go outside the common mode input range.
How can I send one bit one mile with one battery? This summer I will be attending a large music festival for the second year. I will be going with other people this time, and I'd like to be able to communicate with the other people wirelessly in some way. Cell phones are out, because even if you could get reception your phone dies quickly trying to fight with the other 50K+ cell phones in the square mile that the festival takes up. Walkie talkies are difficult too- because there are so many people, nearly every channel is occupied. I'm always open to reasonable commercial solutions but when faced with a problem like this my first thought is, what could I build? I've got basic requirements: A bitrate of >0b/s. Yes, that says bits per second. 0.1b/s would satisfy this requirement. A working distance of about 1km / 0.5 miles. I'm willing to compromise here for... Pocket-sized and battery-powered. Obviously not easy but this rules some tech out immediately. I can use one bit to indicate "meet at the designated spot". I can use four bits if we just sync up our maps with a legend. So, I don't need practically any bandwidth at all, which might drastically simplify some designs. Also, I'd be willing to get any licenses I needed to work on this, but I am not currently knowledgeable about RF communication. I do have a strong basic electronics and programming background, though, so any ideas would be helpful. I guess my basic question is: is there a wireless tech available that meets the bulleted requirements and would not have the problem of being completely oversaturated by having 100K people in one square mile? <Q> Amateur radio is perfect for that. <S> Hand-held radios can reach several miles. <S> You can use voice or morse if necessary. <S> There is rarely any congestion, there may even be some repeaters. <S> The initial test is pretty easy to pass as long as you get the manual. <S> Radios: http://www.aesham.com/ham-radios-handheld/?p=catalog&mode=catalog&parent=274&pg=1&CatalogSetSortBy=price <S> Study Guides: http://www.arrl.org/ham-radio-license-manual <A> Option 1: <S> You could make use of a small FM bug with an RDS coder. <S> Assembled FM bugs and RDS coders are easy to find, just a matter of putting it together. <S> Disclaimer: <S> Transmitting on FM broadcasting channels with EIRP levels above -43dBm( 50nW) is illegal in most countries, so you could have problems with the 1km distance requirement if you do not want to break the law. <S> Option 2: <S> Use radio text messaging on a D-Star portable HAM transceiver. <S> Widely available and if you and and your friends manage to get your HAM licence before the festival, that would probably be the most feasible option. <S> Option 3: Acoustic OFDM. <S> This allows simulcast of data and sound at low bit-rate via the speakers of the PA system. <S> If you look at the size of festival speakers I don't think receiving decodable data at a distance of 1km is going to be a problem. <S> The downside is that you need to walk to the podium and get permission from the organiser to connect your device to the audiomixer or mike. <S> Off-the-shelf devices are also very hard to come by. <S> The good thing is that you own a piece of technology that virtually nobody has ever seen, and that is going to make you cool @ the festival :). <A> If you are ok with a simple morse code process try a watch, a decent laser pointer and a convenient building. <S> Everyone agrees to look at the building at the top and bottom of the hour and count the flashes they see on it.
Anyone with an off-the-shelf portable FM radio with RDS display would be able to receive your text information.
How does a passive 1x Scope probe work? I understand about input impedance and capacitance... My question relates to the cable: What is the characteristic impedance of the cable connecting the probe to the scope? It must be terminated in a matched impedance to avoid reflections but the input impedance is typically 1 M ohm in parallel with a few pF - that can't be the characteristic impedance.So what gives? I have noticed that the cable has a centre conductor that is very small in diameter - is that to create the correct Z0? I've been asking this question of professional EEs for many years and no one knows... <Q> Achieving a matched condition with an oscilloscope probe is virtually impossible because the source impedance of the circuit under test is unknown and generally different from the scope's 1MΩ or 50Ω input impedance. <S> On top of that the input impedance of the oscilloscope has a reactive component as do most circuits under test, which makes it impossible to achieve impedance matching over the full BW of the scope (eg 100MHz). <S> To dampen the catastrophic frequency response as a result of the reflection on the probe cable, the latter is made of lossy coax. <S> If you measure the core resistance between the tip and the BNC connector with a multimeter you can observe this. <S> You may want to read "Tektronix ABC's of Probes" primer and "The Secret World of Probes" from Doug Ford. <S> Both are excellent primers on a correct understanding of how probes work. <A> It's probably 50 ohms. <S> It's basically just coax cable. <S> One reason for choosing 50 ohms over any other impedance is that some testgear has switchable 50 ohm terminations on its inputs, to improve accuracy for HF measurements, and in that case a 1x probe could be terminated correctly. <A> I hardly ever use a x1 probe. <S> But grabbing one off the wire rack, I measured ~330 ohm of series resistance and ~100 pf parallel capacitance. <S> (The 100 pF number is a bit squishy.) <S> The 100 pf is a killer at high frequencies. <S> And this probe has a 3dB point near 7 MHz. <S> (about where 100 pf is 300 ohms) <S> The lossy coax is important for operation as a x10 probe... <S> I've read about the details, but to be honest <S> I have forgotten them. <S> Jim Williams had a nice discussion of probes... <S> I think in this app note. <S> And this is a classic... but not too much about x1 probes.
Probe cable is lossy coax.
Set PCB size with values altium I've been searching for a way to set PCB size in Altium, I can change size using Mouse, but there is no way I found to change it to some values using keyboard. Like I want to change PCB size to 10" x 1.5" but I can't unless I use Edit Vertices and move the edges. I read the documentation, but there is nothing in there about specific size. Am I missing something ? <Q> You can define the board size from a primitive, for example, draw the edges of the board using lines, select them all, then go to Desing->Board Shape->Define from selected objects: <S> Another way is using the PCB Board Wizard. <S> You need the File menu on your side panel: <S> If you don't have the File menu you can show it going to View->Workspace Panels->System->Files. <A> It may have changed a bit, the version we're using is a bit different from @ <S> Andres: <S> If you do Design->Board Shape->Redefine <S> Board shape you can draw the outline with straight lines (easier if you turn snap on first to get the mm or mils exactly even). <S> If it's some odd size or has lines that are curved you might be better to use 'define from objects'. <S> Draw lines, arcs etc. <S> (say on a mechanical layer), get them right and make sure the outline is closed <S> (you can adjust the lengths and positions by double clicking and entering the numbers) and then select all of them, and use Define from selected objects. <A> I usually create a layer called "BOARD_OUTLINE" (I generally use Mechanical Layer 6) and I set the grid to the greatest common factor of the desired board length and width. <S> For example, if I want a 10.5mm x 4.0mm board, the greatest common factor would be 0.5mm. <S> Then on the BOARD_OUTLINE layer I would draw an outline using the snap grid and the HUD to get the right length and width. <S> Once the outline is complete I would use the keyboard shortcut E-S-Y for " E dit -- <S> > <S> S elect -- <S> > <S> All on La y er" and then the shortcut D-S-D for " D esign -- <S> > Board S hape -- <S> > D efine from Selected Objects". <S> If you want to set the length and width just by typing in the numbers, however, the board wizard is the way to go.
Then use the PCB Board Wizard where you can define the exact board size along with other parameters.
What's the reason for wiring a relay this way? I came across the following automotive wiring diagram: One thing I don't quite understand is the way they wired the relay. I've got two main questions. It appears to me that they used the exact same wire from terminal 87 to provide power to terminal 86. I don't think that there is anything wrong with this approach, but I haven't seen it before. The exact same wire gauge is used although one would expect that the load (the radiator fan) draws more current than the relay coil, right? Why did they do it this way? Why did they connect battery positive (30) to terminal 87 on the relay? Why didn't they use terminal 30 on the relay? It makes no sense to me, but I guess there must be a good reason. <Q> There is absolutely nothing strange there - it's just how they've drawn it <S> that's strange. <S> Let me re-draw it as a proper schematic for you: simulate this circuit – <S> Schematic created using CircuitLab <S> When the switch turns on the relay activates and power flows to the motor (depicted as a lamp here - circuitlab doesn't have a motor). <S> Why did they wire the battery to pin 87 and not pin 30? <S> Simply because then the motor would be on all the time and the relay would do nothing. <S> Why did they use the same gauge wire? <S> Simple economy of scale. <S> They're already using that gauge elsewhere, so why fork out on a different, smaller, gauge as well when they don't need to? <A> If you draw this as a schematic, it would look like: <S> simulate this circuit – <S> Schematic created using CircuitLab Terminals 30 and 87 are electrically equivalent - the circuit will work the same, regardless of which way they are connected. <S> The connection from terminal 87 to 86 goes through the thermal switch, so the switch will control the fan. <A> The relay terminal numbers shown do not comply to standards. <S> Correct terminal numbers are 85 - Relay coil +ve, 86 - Relay coil -ve, 87 - Relay contact common, 87b - Normally open contact. <S> Reference - DIN 72552 http://en.wikipedia.org/wiki/DIN_72552 .
Using bigger size wire for the relay coil, to reduce inventory, is okay.