source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
Problem with a solar power bank indicator LEDs I bought a 10000mAh (actual 4000mAh) solar power bank from Victsing few days ago. After having solved a short-circuit problem that affected the solar panel, I noticed that it took an extremely long time to charge from direct sunlight: in six very sunny days just about one quarter. The device presents four blue indicator LEDs that sequentially turn on when the power bank is charging (both from sun or microUSB). The problem is that the LEDs are very brights and seems to consume a lot of energy. From some calculations and measurements, it seems that they consume about 10-30% of the energy harvested by the solar panel, a lot in my opinion. The four LEDs are controlled by an unidentified microcontroller. The question is: is it possible to reduce in someway the consumption of the LEDs, by modifying the circuit, the microcontroller or the LEDs? Thanks a lot. Alessio <Q> Most LEDs have a nominal current of 20mA. By choosing a larger resistor, the current can be reduced, but their light becomes dimmer. <S> There are LEDs for just 2mA, saving 90% of current / energy without being too dim. <S> So, changing the LEDs may also be an option, if the device doesn't already use low-currrent LEDs. <S> However, what's the size of your solar panel? <S> If it's 10cm x <S> 10cm <S> = 0.1 <S> m <S> x 0.1 <S> m = 0.01 square meters, it catches only 10W of sunlight. <S> (The sun gives us a maximum of 1kW per square meter) <S> The efficiency is as low as 20%, resulting in just 2W electrical power gained. <S> At 5V, that's just 400mA. <S> So, one to three 20mA LEDs are noticeable consumers, but 2mA LEDs are not. <S> Now you say your powerbank holds a charge of 4000-10000mAh. <S> It takes 10-25 hours of bright sunlight to collect this charge. <S> In reality, there are <S> power conversion losses and sunlight isn't always as intense as in the Sahara at 12 o'clock. <S> You can for sure add 20% to the charging time, maybe more. <S> So, don't expect too much from the solar module. <A> If you increase the resistance of those (that is: replace them with higher value ones), the current through and brightness of the LEDs will decrease. <A> Are you sure about that 10-30% figure? <S> A typical blue indicator LED would require around 20mA at 3V - around 0.06W. <S> As Arsenal says, if you want them dimmer, just stick a resistor in series with each LED. <S> LEDs will glow visibly with only very small currents through them.
There should be some resistors placed between the microcontroller and the LEDs or the LEDs and ground to limit the current through the LEDs.
5V Voltage Regulator - Bypass when 5V This might be a silly question but I can't find any information about this or maybe I am not asking right. I have a AM1117 5V voltage regulator that is usually powered by a 12V to 16V battery. Now I have certain situations where I want to just put 5V power on the board (like USB). I am pretty sure that if I put 5V into the AM1117 I won't get 5V out of it :-) However how could I solve this issue on a simple level. Trying to avoid putting more components on the board. Thanks, Andy <Q> It has a maximum of 0.2 ohm on resistance so the voltage drop will be 0.1V maximum plus the drop across the inductor at 500mA out and 5V in. <S> That is not the only one, but it's key to pick one that uses a P-channel high-side switch- ones that use bootstrapped N-channel MOSFETs will not provide 100% duty cycle. <S> This particular one is rated up to 16V input (18V absolute maximum) which might or might not be too tight for your input. <S> At 14V input and 500mA, an LDO will be dissipating 4.5W, which is a lot of heat to have to get rid of. <S> A buck regulator of the above type will dissipate maybe <S> 0.25W, <S> maybe 20 times better. <A> The most straightforward is to replace the AM1117 with an LDO with a very low drop out voltage. <S> They can have 50-100mV of voltage drop when the input is below the voltage required to regulate. <S> One with a MOSFET pass device will be better than a bipolar as many bipolar based LDOs (e.g LM2940) take a significant amount of current when in dropout. <S> I can't find a suitable one at the moment - look for Ultra Low Dropout regulator. <S> How much current output do you need? <A> Kevin White's answer is a good one. <S> If you want to do exactly what you said -- e.g. bypass the regulator when you have a 5V source from USB <S> then you can do the following: <S> You can use a comparator to compare the two voltage sources and use the output of the comparator to drive a pass transistor. <S> You'll want to use a voltage divider on the higher source (you might also want to use a divider on your Vusb depending on how you go about the design) so that across the range of possible inputs you have something that's less than 5V <S> (you'll want to take into consideration the common mode input range). <S> For example make your divider such that at the maximum possible Vin you have 3.3V. <S> The other input to the comparator is your Vusb (or maybe a divided version of it depending on your comparator selection etc). <S> This way if your usb source isn't connected the gate to your p-fet will be low and you'll pass your regulated 5V to the global 5V net. <S> If the USB source is connected then your comparator drives high and your pfet is shut off. <S> Your USB source is now the global 5V source.
Since you say you want 500mA, I suggest you use a buck switching regulator such as the AOZ1022DI that behaves like a resistor if the input is lower than regulated. You can pass the output of your regulator through the transistor such that the source and your usb 5V are connected.
How can you measure low resistance accurately? I got resistors having 1Ω and 0.1Ω. They will be used for measuring current incident to MCU. But when I tested the resistance by using my DMM, the value was fluctuated a lot and it was never what it should be. How can you measure resistance around 0.1Ω accurately? I attached + - probe of the multimeter together and then it showed 0.5Ω on the screen. Also resistance of my alligator cable varied with the position I attached the probes. Does it mean that multimeter is not a good choice to measure such low resistance? I'm using Fluke 177 digital multimeter. <Q> then you just need to apply a voltage <S> V. <S> And then you can easily calculate the resistance, from the measured voltage and current. <A> The Fluke 177 has a maximum resolution of 0.1\$\Omega\$, so it's not a meter suitable for a direct measurement of these resistors. <S> In the lowest resistance range it has an accuracy of 0.9% + 2 Digits. <S> So it will have an accuracy which would result in 200% error for the 0.1\$\Omega\$ and 20% error for 1\$\Omega\$. <S> You can use the approach given by Gregory Kornblum or Bruce. <S> Just be sure not to use too much current as self heating might cause the value to drift (or you could kill the resistor if you go over the top). <S> - so called Milliohm-Meter, there are some which offer a resolution of 0.01µ\$\Omega\$ (which would be way overkill here). <S> They internally work on the same principle. <S> They use different constant currents based on the resistance range. <S> For example the Hioki RM3543 would use a 100mA or 1A current to measure a 0.1\$\Omega\$. <S> They also use 4 wire resistance measurement to cancel out the effect of the measurement leads. <S> Just like in the approach given, 2 wires are connected to the current source and 2 wires are used to sense the voltage directly on the resistor. <A> Use separately current source and volt meter. <S> Apply 0.1A and measure voltage on your resistor. <A> Typical approach would be to use differential amplifier with the gain of 10/100 across the resistor while putting current through it. <A> Or you can get a low ohm meter. <S> If you do a lot of measurements. <S> (I have had the same fluke, for over 30 years, its a bench meter). <S> If you calculate via V and I, a HIGH precision resistor is required (or measure it with a VERY good meter).
Best way to do this is the Volt and Ampere meter method: There are special low resistance meters
How to increase the rated output voltage/current by connecting multiple op amps? Is there a way to increase the power output from connecting multiple op amps? My guess is that connecting the op amps' output in parallel will increase the rated current, and connecting power supplies with a common ground on the op amps to increase the voltage. For example, +15 V to first op amp, then -15 V to second op amp; the saturation of the parallel connected op amps should be 30V? I'm using THS3202 and looking for driving a \$50\Omega\$ load at around 50 W I have seen the datasheet and all the rated/maximum. How can I connect multiple op amps to increase the resulting output wattage? <Q> For example, the OPA454 datasheet shows how to do this on page 17: <S> In this schematic, \$A_1\$ is the master amplifier which provides the gain, and \$A_2\$ is the slave (which is just a unity gain buffer intended to double the output current capability of the overall circuit). <S> Note that both amplifiers are configured with the same supply voltage -- <S> in the case of the OPA454, this is a maximum of \$\pm <S> 50\$V. 1 <S> However, this will only double the output power of the amplifier since it only allows you to double the output current (with no change in the supply voltage). <S> Op amps can't supply 50W <S> so this isn't enough for you. <S> If you really want to increase the power output, use a power amplifier stage. <S> The same OPA454 datasheet shows how to do this as well: <S> The op amp is driving a push-pull amplifier consisting of external power transistors. <S> Note that the feedback loop is connected not to the op amp's output but to the push-pull amplifier's output (which is the overall circuit's output). <S> This circuit has a much higher output current, which is provided by the power transistors rather than the op amp itself. <S> 1 <S> There are a number of potential challenges that must be considered with this parallel connection (stability, slew rate, choosing the current sharing resistor \$R_S\$, etc.). <S> Apex Microtechnology's AN26 application note has a good explanation of these challenges. <A> Stop and think about this. <S> First, 50 W is way more than anything called a "opamp" is going to provide. <S> You didn't provide a link to the datasheet, so I don't know what your opamp can do, but it would probably require paralleling many many of them to get 50 W, even if that would work. <S> Second, to push 50 W into 50 Ω requires 50 V and 1 A. <S> That's again beyond ordinary "opamp" range. <S> Follow the opamp with some kind of power amp. <S> You don't say what the frequency range is or whether the output must swing both ways or not, so there is little more to add here. <S> If your frequencies are in the audio range, for example, then a off the shelf audio power amp would be the easiest solution. <A> A typical Opamp (LM741) has a less output current, Power is the product of voltage and current, when you cascade your opamp all you doing is combining the gain of them, you can't expect 50W from cascaded Opamp's specially when each one has same output current, but you could use amplifiers, cascaded darlington pairs to do the job, look at Voltage Compensation to know more how opamp works. <S> Think about it voltage in series <S> adds up, current in parallel branches adds up at a common node, hence to get more current (more power P=V*I) <S> you need many Opamps in parallel. <A> Are you fixed at one op amp type? <S> If not, to take the easiest way, you might use power opamps like the TDA2030 - 2050 series, you can find some audio power amp schematics with these. <S> If you use "classical" opamps be careful at the maximum output current that could limit also the driving current of the power transistors you use for power boost.
In order to increase the power output using multiple op amps, you should use the maximum rated supply voltage (to maximize output voltage) and put the op amps in parallel to increase the output current.
How can I use an analog switch to control a higher voltage than vcc? I am using an Arduino and several analog switches (TEXAS INSTRUMENTS CD74HC4066E) to control several items (LEDs and other devices.) The switching voltage that comes out of the Arduino is 5v, but several of the voltages that I need to switch are higher (typically 9 volts for LED strips.) Will these analog switches be able to control 9 volts if 5 volts is used to switch it? Should VCC be 5 volts or 9 volts? is 12 volts and option? <Q> There are dozens of varieties of the basic 4066 design, none of which seem to be called 4hc4066e. <S> You should however not assume that you can use these circuits to switch any higher voltage than the circuit's supply voltage. <S> If you are simply using Arduino's GPIO pins to switch things on and off, using a 4066 circuit is nevertheless quite an overkill. <S> You can also use the GPIO output to drive an NPN or FET transistor. <S> The schematics on this page <S> (output circuits 'using an NPN transistor' or 'using a FET') can also be used with the Arduino, although the page is targeted at Raspberry PI users. <S> Both circuits are capabable of switching higher voltages than the output of the GPIO pin. <A> The simple answer is "No". <S> If you want to switch 9 volts, the CD74HC4066E can do it, but Vcc must be 9 volts. <S> If you look at Figure 1 (Typical "ON" resistance vs input signal range) <S> you'll see that the input is essentially limited to Vcc, so a Vcc can handle 0 - 4.5, and Vcc can handle - 9. <S> In this case, Vih (input "HIGH" voltage) must be a minimum of about 6 volts, and this is more than your Arduino can provide. <S> There are a number of alternatives available. <S> First, you can get a level shifter. <S> For instance, an MC14504 will do what you want, assuming you don't need to provide more than about 2 mA of current. <S> If you want more current, there are other level shifters available, or you can use a MOSFET driver chip. <S> I'm personally partial to the Maxim <S> MAX4426 - MAX4428 series, but <S> that's just because I've used them before and am lazy. <S> Finally, of course, you can roll your own using a transistor or 2. <S> Depending on how much current you need to source or sink you can try either of simulate this circuit <S> – Schematic created using CircuitLab these circuits. <A> The "switch" supply can be in the order of several tens of volts whilst the logic supply to the device can remain at 3V3 or 5V. <S> Do some hunting at MAXIM, ADI or TI. <S> In fact you can get analogue switches that just use the switch supply and have 2V logic levels that are compatible with 3V3 systems and 5V systems. <A> you could use a device called a photovoltaic stack .This <S> gives you the same isolation as an optocoupler .You <S> dont have to worry about supply voltages now .The <S> input of the photovoltaic stack looks electricaly like a normal garden variety optocoupler so its easy to drive. <S> The isolated output is about 5Vdc which is fine for driving a logic level <S> N channel mosfet. <S> If this sounds OK then check for snags on www.badbeetles.com and get some photovoltaic stacks. <S> IR used to and may still make them.
You can get analogue switches that have a seperate "switch" supply to the logic supply.
Connecting batteries in parallel doesn't produce greater amperage Having two 3.7V "3000mAh" Rechargeable Li-ion batteries, I tested connecting them in series and parallel. Using a multimeter, I measured the amperage of single batteries and it's about 6A . When connecting them in series, the voltage is doubled (it becomes 7.4V ). When connecting them in parallel, I expected that the amperage will be doubled, but it's not . It remains 6A . Why does this happen? How can I increase the amperage using more batteries? From what I know, when connecting batteries in series makes the voltage to be increased and when they are connected in parallel, the amperage is increased–but in my tests this last expectation didn't happen. Why? This is how my circuit looks like: My two batteries, in parallel, connected to ampermeter. <Q> As the comment mentions, paralleling and short circuiting lithium batteries is potentially very dangerous if you don't know exactly what you are doing. <S> Most Li-Ion batteries have a protection circuit which includes overvoltage and overcurrent protection, but it's still not a good idea at all. <S> Much better would be to test this using a couple of small alkaline batteries (e.g. AAA) and still do it briefly. <S> If you absolutely must test the current on the Li-ions, then read the datasheet, see what the maximum current rating is and for how long, then use external current limiting on each battery. <A> Look, let's get one thing straight: <S> V=IR. <S> If you take two "ideal" 3.5V batteries and put them in parallel, what you read across the parallel pair is still 3.5V. <S> If you put that voltage across a 1000 Ohm resistor, you'll get 3.5mA - the same as you'd get with one cell alone! <S> That would be true no matter how many 3.5 volt batteries you put across the parallel bundle. <S> If you try to "burst" the current by shorting + and - terminals, the current you get depends on a whole bunch of stuff: internal resistance, battery chemistry, the rearrangement of charges in the battery electrolyte, temperature change, etc. <S> And, as was pointed out, it's never a good idea to just short the terminals out, particularly in a lithium battery. <S> What does change when you put the cells in parallel is the amount of energy stored in the whole system. <S> This is frequently expressed in Watt. <S> Hours (or, if you know the open circuit voltage of the cell, Amp. <S> Hours.) <S> So in an ideal case, doubling the cell volume (putting two cells in parallel) could double the Amp. <S> Hours, NOT Amps! <S> That is, there'd be twice the energy stored in total system. <S> You'd get the same current for a longer time. <S> But even this may not be quite true. <S> Nothing is ideal! <S> Quite simply, the "stronger" battery might pump current into the adjacent battery and rob the load of useful energy in the long run. <S> I know a lot of other people responding were driving at this. <S> I thought I'd just put it in a more physics/chemistry setting. <A> Many very helpful pointers that this is a bad idea, but I haven't seen anyone actually answer your question. <S> Putting two voltage sources in parallel does not increase amperage in the circuit. <S> Ohm's law tells us V=IR, so the only way to increase current is to increase voltage, or decrease resistance. <S> Putting two voltage sources in parallel doesn't do either of those things. <S> If you want to double the current by adding batteries, you put them in series . <S> This will double the voltage (approximately) and leave the resistance (nearly) unchanged, so the current will double. <S> However, in your case, you're SHORTING the batteries, so doubling the current is an even worse idea , because it's just way too much current for those batteries.
If the open circuit voltages and internal resistances of the cells you put in parallel were different, you may stress out one battery over another (as pointed out elsewhere) and that battery may not supply the same amount of energy as the one next to it.
Matched biasing transistor compensates for temperature changes I fail to see why this circuit compensates for temperature changes with both transistors at the same temperature. If I understand correctly, the current through both transistors is the same, but I don't get why it is also independent of temperature. Can someone please clarify this to me? <Q> Both transistor stages are already internally stabilized against temperatute changes. <S> However, no stabilization can totally (100%) compensate the corresponding influence on the collector current. <S> In this circuit, the influence of the Q1 stage can additionally improve the stabilization of the gain stage (Q2). <S> This works as follows: <S> A temperature increase will only "slightly" increase the collector current Ic1 and, thus, somewhat reduce the voltage Vc1 at the collector node of Q1. <S> This voltage Vc1 is the driving voltage for the base current Ib2 which reduces correspondingly. <S> This small Ib2 reduction counteracts the temperature caused increase of the Q2 collector current Ic2. <S> For proper dimensioning one can show that, in this case, a nearly ideal temperature compensation for the gain determining transistor Q2 is possible. <A> Have a look at this document , circuit #2 figure 1B <S> The current gain beta of the transistors is temperature dependent, <S> this together with the 10 kohm base resistor of Q1 gives a (somewhat) temperature compensated behaviour of the collector current Ic. <S> Since Q1 and Q2 are connected as a current mirror, Q2 will have the same collector current as Q1. <A> It does not take the signal variation in consideration. <S> Basically Q1 is connected as a diode with the forward voltage in principal the same as the Vbe voltage of Q2. <S> If the temperature increases the Q1 forward voltage drops with approximately the same voltage as Q2 Vbe voltage and therefore keeps the bias current the same over temperature.
As i see it this circuit keeps the bias to transistor Q2 temperature compensated.
How does the microcontroller read potentiometer resistance as integer without regard to potentiometer value? When I hook up a 5k rotary potentiomoeter to the analog input pin of a microcontroller it will read values from the pot as integers 0-1023. If I switch the 5k out for a 500k the microcontroller will still read values as 0-1023. How is the system able to abstract the reading from the potentiometer down to the same range and distribution of integers when the max value of the potentiometer changed? <Q> That fraction does not depend on the Ohmic value of the potentiometer: <S> when you tae a higher value, then for a given position of the knob bot 'sides' will get higher values, but the ratio will not change. <S> Note 1 <S> : the voltage supplied by the wiper will not change when you take another Ohmic value for the potentiometer, but the impedance (effective series resistance) does change. <S> As long as this impedance (worst case 1/4 of the value of the potentiometer) is lower than what the A/D input specifies as maximum <S> this is not harmfull. <S> Note 2: the most common potentiometers are linear, but there are also logarithmic (and anti-logarithmic) potentiometers, which will (for a given position) give a very different ratio. <A> ADCs measure voltage as a ratio compared to their reference. <S> And the voltage at the wiper will always be between the two voltages at the ends. <S> This remains true regardless of the overall resistance as well as the type of potentiometer used. <A> The potentiometer will be wired as a potential divider, so the voltage at the wiper will be relative to the wiper position irrespective of the value of potentiometer. <A> The value of 0-1023 is relative. <S> Relative to the minimum and maximum ADC voltage. <S> In the same respect, the wiper is relative to the minimum and maximum voltage present on the potentiometer (if all three terminals are used). <S> 50% is 50% if read as 512 out of 1023 or 1/4 or 2.5V out of 5V.
Apparently you hook up the potentimeter as a proper potentiometer, that is: the wiper supplies a fraction of the toptal voltage to the A/D ipnput.
Why use RAM IC over EEPROM IC? I have been looking at various different external storage ICs that would work with an arduino. When I looked at the specs of some EEPROM chips and compared it to the specs of other RAM chips, I noticed that they had relatively similar specs in terms of Read/ Write frequency and storage capacity. So if they have such similar characteristics, why would you use a RAM chip over an EEPROM chip? Wouldn't an EEPROM chip be much more useful as it is nonvolatile? <Q> EEPROMs are slow to write (milliseconds) and they wear out after a certain number of writes (reads are generally unlimited, with exceptions). <S> You can wear an EEPROM out in a very short time if you're writing to particular locations continuously. <S> For example, this 1Mbit 24C1024 has a write time that can be as long as 5ms and a 'typical' life of 10^6 cycles. <S> If you write to the same location every 10ms then it will wear out in 2-3 hours. <A> Typically speaking: DRAM/SRAM <S> much <S> faster (especially when writing) <S> much more durable <S> volatile <S> -- does not retain contents when powered off less expensive because there may be fewer transistors and definitely cheaper transistors per bit of storage EEPROM <S> Generally the opposite <A> The two are intended for different purposes. <S> EEPROM <S> (Electrically Erasable Programmed Read Only Memory) <S> is non-volatile and used for long-term storage just as configuration parameters which might be changed by the user; results of a calculation to be read out later; and something downloaded from the Internet such as an MP3 song or e-book. <S> You can now get a 256MB (not bit) EEPROM now for $3 . <S> External RAM (Random Access Memory) is like the RAM inside your computer chip, except that it is harder to access. <S> RAM is volatile; it will lose its consent when the power goes off. <S> This sometimes is not a problem in embedded systems, since some are designed to never be completely turned off -- the external RAM may be left powered up even if the power to the microcontroller is turned off. <S> This is called battery-backed up RAM. <S> External RAM is harder to access than the RAM is you CPU because it is connected over a serial link, either SPI or I2C, since all but the highest-end microcontrollers do not have an external address or data bus. <S> So the external RAM does not appear in the address map of you microcontroller; rather you have to access it via a subroutine to first send the address to be accessed and then the data either to be written or read back. <S> This is way way slower than accessing the RAM inside you microcontroller. <S> This limitation is also inherent in accessing EEPROMs. <S> External RAM can be used to hold large intermediate results of a calculation, data that is being logged (here you want to use battery-backed up RAM), and material temporarily downloaded from the Internet (such as a web page, or an MP3 song you don't need to keep around). <S> Static RAM is at least an order of magnitude more expensive than EEPROMs of the same size. <S> You can't used dynamic RAM (which is cheaper) without special refresh circuitry.
EEPROM is not suitable as a substitute (or extension of) a computer's internal RAM, since as another answer pointed out, it takes much longer to write than to read, and you can eventually wear it out.
Leach circuit to power microcontroller Like many, I'm trying to design small circuits to do things. One objective is a device to report home power use. Such a device is relatively easy. Powering such a device for the very long term is hard. Batteries die, solar panels advertise that there's something in the meter box worth stealing, etc. On the other hand, why can't I just connect a current clamp ( http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Current/ECS1030-L72-SPEC.pdf ) to the mains supply and run the monitor from the leached power? Use a blocking diode and a fairly large(?) capacitor across the terminals of the clamp and add a 3.3V voltage regulator, with ground and supply to the respective sides of the capacitor. The capacitor won't be "perfect" and should add enough resistance to limit the voltage, I'd have thought. Anyone tried anything like this? Would it work? Suggestions, comments and crazy to add? (Note that I wouldn't take it amiss if you said "Go home, you're drunk". This would, right now, be good advice!) Thanks Edit to add: I can't plug in an adapter. I have the mains cables, but this is at the meter box outside. No sockets are present. Edit 2: Target power "generation" would be ~1ma at >5V, feeding a 3.3V LDO regulator. Power use to be ~0.1mA, with a <1s pulse at ~40ma every ~2 minutes. Capacitor to support pulse. <Q> It's a valid plan and I've seen others implement it before. <S> Here's a link to a evaluation board that does AC lines monitoring and powers itself off of the AC Mains. <S> Look at the schematic on page 10. <S> The regulator is U2 and the rectification diode is Z1. <S> You might be interested in the board anyways, it already does the voltage and current measurements and outputs the value over UART/I2C/SPI. <S> Back to your idea though. <S> I would suggest the following modifications. <S> We'll talk about the clamp in the next paragraph. <S> Instead of a shunt capacitor make it a series capacitor. <S> This provides AC coupling and blocks any DC current from forcing the diode on. <S> The diode is a cheap form of rectification. <S> Half wave rectification is probably good enough for your purposes. <S> See the wiki page for some details on rectification. <S> Make sure that the regulator can support the output voltage of the rectifier. <S> If you bring in the voltage directly from the line, the rectified voltage will be very large. <S> This is one of the reasons I would use a transformer to step down the voltage. <S> Additionally, placing a shunt zener diode can help decrease the rectifier output voltage. <S> You might want this if the rectifier output is too larger for your regulator. <S> See what they do in the schematic linked above. <S> U7 is the shunt zener. <S> Make sure that you add appropriate resistance to prevent excessive current flow if the zener conducts. <S> One issue I see with the plan is the current transformer that you are planning to use. <S> Current transformers are typically used for current measurements. <S> If you look at the I-V curve in the datasheet that you've linked, it provides mV of output voltage for tens of Amps on the primary side. <S> This cannot supply the rectifier and regulator. <S> Alternatives would be to use a transformer to reduce the AC voltage to something manageable and use the same rectification scheme. <S> Another method would be to attach directly to the AC line as in the board I linked to. <S> Be very sure that all of your parts are rated for the expected voltage or current. <A> That particular transformer will deliver a few hundred mV into 10 ohms at tens of A (less if the current is lower). <S> If you increase the 10 ohm burden resistor, the transformer will saturate, maybe at a high enough voltage to use, maybe not. <S> Usually measuring transformers saturate well above the typical point where they are used (to preserve linearity) but that characteristic is not specified. <S> Also, you will have to deal with (potentially) large changes in the transformer output as the current changes unless the transformer is designed to saturate appropriately. <S> Why not just a simple plug-in AC adapter? <S> Cheap and easy. <A> Just buy a power supply unit, one that plugs into the mains and outputs a reasonable voltage, say 3V or something, to power your microcontroller. <S> Then cut and strip the end of the power supply and connect it into your circuit, or something similar. <S> Here's one that I found: http://www.bitsbox.co.uk/index.php?main_page=product_info&cPath=277_279&products_id=2016 Loads and easier and safer than directly fiddling with the mains with diodes and capacitors yourself.
The idea is feasible, but you might require a relatively large and expensive core.
what happens when voltage is in indeterminate region? For example, 0 is ground or 0 volts and 1 is VDD or 5 volts what happens if the voltage is 4.99 volts? or 3.2 volts? Is it 0 or a 1??!? <Q> It is undetermined. <S> It could sometimes be seen as a '0' other times as a '1'. <S> Different devices might act differently, it might vary with temperature or anything. <S> It may even oscillate between 0 and 1. <S> It can't be relied upon <S> so don't expect anything at that point. <S> It should be passed through as quickly as possible - a few nanoseconds so as to minimize the time that the logic level is uncertain. <S> If it is above or below that region the device will work as specified. <A> it's a 1. <S> If it's between Vilmax and Vihmin <S> then it's indeterminate. <S> If it's a bit higher than Vcc or a bit lower than 0 it's still a 1 or a 0 <S> respectively ( <S> practical, not textbook answer). <S> For example, for a CMOS part 74HC00 with 5V Vcc, Vihmin is 3.5V and Vilmax is 1.5V. <S> So 4.99V is surely a 1 and 3.2V is indeterminate ( <S> in practice the latter is usually going to be a 1 because the typical transition is at Vcc/2 and 3.2V <S> is much more than 2.5V- the typical range at room temperature is 2.33~2.67V- <S> but it's almost always best not to depend on this sort of thing). <A> I'm assuming you're talking about discrete digital logic, such as the 7400 or 4000 series of IC's. <S> When an input is lower than VIHmin or higher than VILmax, the device is in an "undefined state" and may* consume much more power than usual (possibly leading to the death of the device.) <S> This is because in this state, some circuit elements inside the chip are all "on" and create essentially a dead short between Vcc and Vss. <S> So this condition must be avoided on most digital IC's. <S> *Depends on the exact IC in question. <S> Some are "worse" about this than others. <S> (In highschool electronics class, we designed an electronic "coin toss" using a 7400 series counter and other gates. <S> Many students left input pins unconnected, which is a big no-no <S> but we didn't know any better. <S> Most devices failed, due to excessive power consumption, leading to overheat condition, which was due to several inputs being in a "floating" or "undefined" state.) <S> Always tie inputs either high or low on unused digital inputs. <A> If the input voltage is above VIHmin, according to the figure, it is defined as a logical '1'. <S> This would probably apply to the 4.99 V case. <S> (Since the figure lacks any numerical values for the voltages, we can't really know, of course.) <S> 3.2 <S> V would probably fall in the indeterminate region, and the state of the circuit would be undefined, ie it could be interpreted as either a '0' or a '1' depending on tolerances etc. <A> If the voltage is between Vil and Vih or Vol and Voh, it is said to be in intermediate stage. <S> In this state, the voltage remains in ambiguous state. <S> The result will not be stable.
As long as it's less than Vilmax (and higher than 0) it's a 0, as long as it's higher than Vihmin (and lower than Vcc)
DC motor speed control -> motor heating up too much I have 90V brushed DC motor which I try to make to turn 100-500rpm with PWM controller (555 based, 100Hz). Otherwise it works but the motor heats up so much that I can not touch it with hand. I think if I continue, it will burn. I tried it with 70V DC (can't get higher voltage from my 3 bench power supplies), it draws 1.2A and with 50% duty cycle the rpm is roughly 200rpm with the load. Little bit difficult to measure the load but very roughly it's max 0.25Nm. I thought this is the way to control DC motor so I wonder what's going wrong..? It the load too much for this motor, does 70V (instead of 90V) make the difference, would higher PWM frequency help...? Thanks,Tipo <Q> The basic problem is the rpm you want out of the motor is too low. <S> You can fix this by adding a gearbox, which multiplies torque while increasing motor rpm and reducing current to make the motor more efficient. <S> A PMDC motor delivers maximum power when loaded down to 50% of no-load rpm. <S> However this also corresponds to 50% of the power being wasted, which will probably overheat the motor unless the voltage is very low. <S> A more practical target rpm is 80% of no-load. <S> You want 200rpm out at 50% PWM. <S> Your target speed is therefore 4100*0.5 <S> *0.8 <S> = 1640rpm. <S> To get 200rpm at the load you need a gearbox ratio of 1640/200 = 8.2:1. <S> This will multiply torque by the same ratio. <S> Since torque is proportional to current, the motor will draw fewer amps and run much cooler. <S> If you can't get a gearbox with ~8:1 ratio, a lower ratio can still make a big improvement. <S> You can then use a lower supply voltage that matches the lower gear ratio, eg. <S> 35V <S> with 4.1:1, 24V with 2.8:1. <S> The down-side is lower torque multiplication and therefore higher current draw to get the required output torque (so the motor will run hotter). <S> A secondary cause of excessive heating is your low PWM frequency, which is creating very high current ripple (it is going up to double the measured current when the PWM pulse is on, and down to zero when off). <S> Since power loss in the motor's resistance is proportional to current squared, this causes twice as much heating as the same amount of smooth DC current. <S> To reduce current ripple, increase the PWM frequency so that the inductance of the motor windings has a useful effect. <S> 3KHz is high enough for most conventional brushed motors. <A> You need more PWM frequency. <S> The idea behind PWM speed control is that the inherent inductance of the motor smooths out the current so that, from the motor's perspective, the current is constant and it behaves the same way as if you had used a linear regulator. <S> However you are running at such a low PWM frequency that the current is not being smoothed by the inductance. <S> This has the effect of essentially pulsing the motor - running it at an extremely high torque for a short amount of time and then letting it coasting for the rest of the time. <S> The problem is that the losses in the motor are proportional to the square of the current but the torque is directly proportional. <S> So when you average out the torque in this situation you have squared your losses compared to if you just ran it with a smooth and constant torque/current. <S> The result is it gets really hot. <S> You'll probably need at least 2kHz before you start getting smooth current flowing in the motor, and upwards of 10kHz would be best. <A> Similar question here: DC Motor - PWM vs Voltage <S> When running at a lower voltage/higher duty cycle, you will need more power for a given speed/torque when compared to a higher voltage/lower duty cycle. <S> More power means more heat, which is what you are seeing. <A> There could be a reason as to why the motor is overheating. <S> You have applied 70Vdc and achieved 4100rpm <S> thus 2V would potentially result in 120rpm. <S> If you were to supply 2V from a DC powersupply it should spin and not overheat. <S> The thing is you mention you are using PWM (via a 555timer) at 100Hz. <S> That is potentially too low depending on the stator inductance. <S> A simple rule of thumb in control is a factor of 10 through all the loops... <S> The inductance is an input into your switching frequency. <S> IF you needed 10Hz for position control (if you have an actuator) <S> 100Hz for speed control <S> 1kHz for current control <S> 10kHz for the voltage/PWM
If you have, relatively speaking, low inductance you will end up with high current ripple which itself will heat the motor (via copper loss and eddy loss)
Termination of unused PoE pairs How important are the specific termination values used for PoE pairs (pins 4&5, 7&8)? Below is the recommended Ethernet front end for Micrel’s KSZ8841/42. http://www.micrel.com/_PDF/Ethernet/app-notes/an-139.pdf Would it be acceptable to use 49.9 ohm resistors in place of the 51ohm resistors? Why did they specify 49.9 on one side, and 51 ohms on the other? I’d like to make them the same in order to reduce the number of component types. This would not only help drive down the price of the 49.9 resistors but also mean there is one less component type to manage in inventory and load into the pick n place machine. There must be a good reason for specifying slightly different resistor. I'm sure they didn't do it just for fun. How critical are the terminations of the PoE pairs? In my mind they are not critical because there is no data being transmitted over them, but I’m not sure how much their termination influences the characteristics of the cable for the other conductors. <Q> Make sure you place caps (~ 22nF) in series with the \$75\Omega\$ if using PoE as Bob Smith did not envisage having PoE power on the data lines. <S> It is also very important to consider saturation of the choke magnetics which also is not an issue on non-PoE. <S> This took up months of my time trying to resolve. <A> Yes it would be totally acceptable to use 49.9 ohms instead of 51. <S> Theoretically the value should be 50 ohms <S> I think so 49.9 is even closer to that. <S> By terminating it properly you make sure any signals that are on the line (cable) dissipate in the resistor instead of reflecting back into the cable and distorting the signal. <S> For unused ethernet pairs it is probably not that critical <S> but it can be that due to capacitive coupling there could be some signals on the unused pairs. <S> By aso terminating these properly also these signals cannot reflect and disturb the other signals. <S> Also it's just good practice. <A> Ideally it should match the cable exactly, but I doubt you are going to find an exact cable to match. <S> The 75 ohm pair terminations (Bob Smith terminations) are apparently sub optimal. <S> There is an interesting article on termination of unused Ethernet pairs here: <S> https://www.eetimes.com/document.asp?doc_id=1277940 <S> This suggests a 52.3 (read 49.9) ohm star connection for CAT5, or a 66 ohm between pairs gives a better match to the inter-pair impedance. <S> Note that there is no evidence that this better matching would make noticeable reduction to electro magnetic emissions. <S> (I expect that the Bob Smith terminations will absorb sufficient energy to prevent ringing). <S> Here is a rough sketch of what the Ethernet terminations may look like if you were to include the inter-pair matching as suggested in this article. <S> C1 to C4 are required for PoE systems. <S> Theoretical, rather than real-world resistance values have been shown.
I agree that 49.9 ohm termination resistors are suitable to use instead of the 51 ohm. The terminations are there to terminate the transmission line which in this case is the ethernet cable.
How to connect 3 TTL devices together? I have 3 devices that I need to connect together. They are supposed to be connected via serial port at TTL not RS232. It only uses 3 wires, TX, RX and GND. How can I make them communicate with each other, can I just connect all TX wires together and RX wires together? <Q> Just connecting all TX wires together, and all RX wires together won't work - you'll have all units talking on one connection, and all listening on the other. <S> RS-232-like serial communication is designed for two-way communications between two devices. <S> Adding a third severely complicates matters. <S> If one device can be considered the master, and in control of the other two units, you can connect the TX line of the master directly to the RX lines of the two slaves. <A> As Peter noted, you cannot just connect everything together. <S> If you are careful designing the protocol running over the serial ports, you could make a ring: A[TX] -> B[RX]B[TX] -> C[RX]C[TX] - <S> > <S> A[RX] <S> the packets sent would need to include the destination node and each node would need to forward packets destined for a different node. <S> For example, for A to send to C, the packet would go from A to B and B, seeing that the destination is not him, would forward the packet to C. <A> A device can listen to only one transmission at a time, so the listener has a problem when both others are transmitting at the same time. <S> If you can somehow avoid this, you can use three two-input AND ports: simulate this circuit – Schematic created using CircuitLab <S> If you can arrange that only one node talks at a time, and it is no problem that this tlaking node hears (receives) itself, you can use one three-input <S> AND: simulate this circuit
You would need to ensure that the slaves will only speak when addressed by the master, and use a switch or mux to select which slave TX line is connected to the master's RX line.
Ground pour underneath an MCU I am working an ATmega32u4 based custom board.I think I am done with majority of the routing. Now I need to work on the proper shielding of EMF. So I began putting ground pour on the top plane. Now the question is, I have a couple ground traces (in blue) on the bottom layer, and was wondering if I should also have a ground pour on the bottom layer too? <Q> Ground pour on the top layer is not really doing much. <S> So definitely add a ground plane on the bottom and try and keep all routing on the top. <S> What I would do is have a power pour on the top, and a solid ground plane on the bottom. <S> Now all your return currents have somewhere to go <S> won't fringe across gaps or over other traces. <S> The ground pour on the top layer (under the microcontroller) does nothing. <S> It has no harm, but it really doesn't have a benefit either (assuming you have a ground plane). <A> Where there is mostly or entirely a single supply rail, I think it's a bit better to pour ground on one side <S> and Vdd on the other (I usually specify GND on the bottom). <S> There's not much downside to doing copper pours tied to the rails, provided your rules allow a larger than minimum gap (so manufacturability is not impacted). <A> I would suggest you go a different route with your pour layout. <S> Put a large ground pour on the bottom with vias from the ground pins down on to it. <S> Then put a VCC pour on the top side that ties all the VCC pins together (remember to choke the AVCC pins if you want to do low noise ADC measurements). <S> Put the decouplers as close as possible to the chip. <S> The reason for doing this is that it ensures that all the VCC pins have an equal and low impedance path to the power supply and prevents circulating currents in the supply rails/pins. <S> Good supply rail design is as important as managing your ground return path from the perspective of EMC <S> so this can help a lot. <S> As long as the VCC plane is properly decoupled it will also serve as an effective shield for the chip's internal die and leads so you don't lose anything over it not being a ground plane. <A> Using Different Voltages for Planes in a 2-Layer Board is not suggested. <S> because of it's capacitor behavior. <S> For Reducing Ground Resistance and better Current flow to Ground, It is Better to use GND pour on BOTH sides and it is recommended to use VIA under ICs to eliminate current circles under smd IC planes and improve circuit stability from the aspect of EMC.
Having a ground pour on the top would make make sense if you didnt have a ground plane on the bottom.
L6472 step motor driver and flyback diodes I plan to use the L6472 step motor driver but I'm not sure if I should use flyback diodes connected to the driver output side. The step motor will be bipolar with the following specs: The L6472 has internal source-drain diodes with these specs: Usually there are always flyback diodes but not on the evaluation boards of the L6472. So is it safe not to use these diodes? Or might the L6472 be damaged? The datasheet doesn't say more about the diodes... Thanks! <Q> You don't need to add flyback diodes to an H-bridge because the source-drain diodes will perform that function, however if you parallel the internal source-drain diodes with external Schottky diodes, the chip will run cooler. <S> The voltage drop of the internal diodes is relatively large. <A> Indeed, nothing mentioned about flyback diodes in the datasheet. <S> The application diagram also does not show them. <S> Since the IC can supply motors with up to 7 A the output MOSFETs must be quite large and this means the source-drain (in reality source-bulk but the bulk and drain are shorted) will be quite large also. <S> I think it's safe to assume that you don't need to place flyback diodes. <A> After seeing the datasheet of the L6472 component, i assume you don't have to use the flyback diodes, since the component is protected by a overcurrent detection see §6.9, which can turnoff the MOSFETs in case of overcurrent. <S> For the diodes in your table are the diodes of the MOSFETS
But you can place the flyback diodes (shotky diodes for exemple) at the outputs to add another level of protection to your circuit.
What is the best USB transfer type (bulk, interrupt, Isochronous Transfers) to be used for implementing a USB oscilloscope? I want to build a USB oscilloscope. I was reading about different USB transfer types . Which transfer type is best to transfer the collected ADC samples from a USB oscilloscope to a PC? Below are a few of my findings. Please correct me and also it would be good if anyone could suggest a good transfer type. Isochronous transfer - Possible loss of data. Not good for an oscilloscope since each data item is valuable. How much data could be lost? Interrupt mode - I have no idea if it would flood the USB connection Bulk mode - Seems the best to me since no loss of data Control transfer - not suitable since it is not meant for transfering data <Q> Bulk transfers do not lose data, but they have no guaranteed minimum bandwidth. <S> (On the other hand, they can reach higher speeds, because they are able to use all the bandwidth not actually used by any other transfers.) <S> What happens when your oscilloscope's data transfers are delayed (either because of errors, or because of other devices), and new data is piling up? <S> Do you stop the device until the old data is transmitted, or do you throw away the old data to be able to transmit the current data? <S> You get no choice about the error handling, but your bandwidth is reserved on the bus. <S> If you want to display the recorded data in real time, you should use isochronous transfers. <S> If you want to transfer the recorded data to the PC after the measurements have finished, you should use bulk transfers. <A> The question is almost completely independent of your use as an oscilloscope, and is completely governed by the types of communications you are asking USB to do. <S> For example: An oscilloscope which has a large (multi-megabyte) buffer internally and is designed to run a short test first, then upload the data, would use entirely bulk transfer. <S> It has no need for guaranteed bandwidth, so the high volume with error checking of bulk transfer will be best. <S> An oscilloscope which is designed to be continuously hooked up to circuit under test on a continuous basis and must operate in "real time" (read: deterministic run time) would choose isochronus. <S> Bulk offers no deterministic runtime guarantees, and you cannot set up your pipe to have reserved bandwidth. <S> You'll have to do your own error corrections, but at least they can be done deterministically. <S> An oscilloscope with a "live" feed for human viewing plus a high speed capture on a trigger may set up two endpoints, one isochronus to keep up with the live feed and bulk transfer for the triggered data. <S> For human consumption, losing a frame or two is not a big deal, so there's no reason to worry about the lack of error checking on isochronus. <S> However, when it comes to the actual data, you transfer it in bulk for error correction. <S> One might use this circuit as part of a live system. <S> It might not only be the oscilloscope but also a safeguard against signals that indicate the circuit is leaving operating ranges and needs to be shut down by the computer. <S> In this case, you may add an interrupt endpoint to the system, to get a guaranteed latency (and some well defined error handling) to make sure the issue gets serviced before it breaks circuits. <S> Once you know what sort of data you are transmitting, and the Quality of Service (QoS) terms that data needs to arrive under, then you can decide which USB transfer mechanism to do. <S> You will know that you are ready to make these decisions when the word "oscilloscope" is no longer required to describe the data and QoS you need. <S> Then you know it is in objective enough words to start addressing these issues. <A> For an oscilloscope, the bandwidth of the transfer is the parameter you want to maximize. <S> While isochronous and interrupt transfers put bounds on latency, they are only intended for low- to medium-bandwidth data streams. <A> Just use bulk transfers. <S> An oscilloscope is not actually a high data rate device. <S> Unless you are planning on making a digital phosphor type design, an oscilloscope is really just a window into a very small part of a waveform. <S> For example, let's say you want to show 1000 horizontal pixels and refresh the display at around 30Hz. <S> If the samples are 8-bit each (this is typical) and there are two channels, you are looking at only 60,000 bytes/second. <S> Full speed USB can do about 1,000,000 bytes/sec, so you are using less than 6% of bus throughput capacity. <S> That gives plenty of time for letting the bulk transfer mode do its thing (correct errors, work around other bus traffic), and it is unlikely you will ever encounter a real-life bus configuration that won't be able to allocate you enough bandwidth for that much data.
Bulk transfer is designed specifically for high bandwidth, so that is the correct choice. Isochronous transfers are designed for 'real-time' data.
Convert reed switch disconnection or SPST off to single "LOW" pulse I'm trying to wake up my Arduino and run some code when a reed switch or SPST switch connected to an interrupt is opened. If my Arduino is in powered off mode, only LOW interrupts are accepted (not changes, which would make things much easier). Is there a simple hardware way to send a single LOW pulse when the switch is disconnected? I'm trying to avoid the interrupt continually triggering my Arduino to wake up while the switch is open; I only need the code to run once, and then I want my Arduino to power back off until the switch is eventually closed and then reopened again. I've been exploring using a 555 timer in monostable mode, perhaps with a transistor inverter to make the pulse low, but it appears that that solution will eventually trigger again (more than once) if the reed switch remains open for a prolonged period. <Q> Sounds like capacitively coupling it might work well. <S> Reed switch goes from power a pull-down resistor and one side of the cap. <S> The other side of the cap goes to a pull-up resistor and the GPIO pin. <S> When the reed switch is closed, both sides of the cap will sit on the power rail. <S> When you open the switch, the pull down resistor will pull that side of the cap down. <S> If the cap is large enough and the resistors are properly sized, the GPIO pin will be pulled down as well until the cap can charge up. <S> When the switch is closed, the capacitor will discharge. <S> You'll need to play around with the values of the resistors and capacitor to get a pulse of the right length, though the pull-down will have to be significantly smaller than the pull-up - I would suggest trying a 10k pull-down with a 100k pull-up. <S> To figure out about how long the pulse will be, calculate the time constant, tau = RC. <S> This will be approximately how long the pulse will be. <S> A 10k and 100k resistor with a 0.1 uF capacitor will give you a tau of about 110e3 * 0.1e-6 = 0.011 seconds. <A> simulate this circuit – Schematic created using CircuitLab <A> Along the lines of your investigating use of a 555, you might consider using a 74LS122 monostable. <S> Using a monostable gives a nice square pulse on the output with a precise pulse width (depending on the tolerance of the resistor and capacitor). <S> Unlike the 555, the 74122 always generates the same length output pulse <S> no matter how long the input is kept at ground. <S> The values shown for the resistor and capacitor will generate a 1 ms pulse. <S> If you are using a switch, you might want to increase the delay to 30 ms or so to mask any switch bounce. <S> That would mean using a 2000 µF capacitor instead of 68 µF. <S> Whether you need a delay longer than 1 ms for the reed relay will depend on the specs for the relay. <S> The 74LS122 is available in a 14 pin DIP package for $1.25
It might be a good idea to add a clamp diode to power on the GPIO pin side of the cap so the cap can discharge through the diode instead of the chip's ESD protection diodes.
why cannot use permanent magnets for large electricity production Why cannot use permanent magnets for large electricity generation as they donot require power to produce strong magnneticfield <Q> A magnetic field alone does not generate any electricity by itself. <S> Energy can be converted from mechanical energy to electrical energy by means of a magnetic field. <S> This process is governed by Lorentz force and Faraday's law of induction <S> It is true though that a strong magnetic field improves the efficiency when converting mechanical energy into electrical energy. <A> The value of the magnetic field is used also to control active and reactive power, if I remember correctly from my undergrad classes. <S> https://en.wikipedia.org/wiki/Alternator#Principle_of_operation <A> Generating an electromagnetic field does not, by itself, require power. <S> Permanent magnets are not batteries. <S> Variations can generate or require some energy, like moving masses in the gravitation field.
For high power applications, permanent magnets don't give strong enough fields, are more sensitive to thermal and mechanical stress, compared to windings.
Techniques for Attenuating a 5GHz Signal Between? I need to set up to radios with high gain directional antennas to talk to each other within a relatively small distance. The radio in questions is a RADWIN 5000 jet. The max distance I can set them up is about 20 feet from each other. Each antenna has a gain of 20dBi and the lowest power the radios will transmit at is -1dBm. So without attenuation each radio will receive a signal about 1/2W and we have a concern this will damage the receiver. Traditionally we could use a wave guide filter to attenuate the signal before the antenna but since this device is an all in 1 package (radio and antenna in one case) we don't have this option. So my questions is this: does anyone have any suggestions on type of materials or sets ups I can put between the 2 devices to attenuate a 5GHz signal by say 30dBm? <Q> If you stick some ECCOSORB <S> in front of the antennas, it should attenuate the transmitted power pretty considerably. <S> Basically, you want some sort of microwave absorbing attenuator. <S> There's a number of brands, but it's generally colloquially called "echosorb" or something like that. <S> In general, it's a carbon-loaded open-celled foam substance, which attenuates broadband microwave energy. <S> The downside is it's pretty specialized, and kind of expensive. <S> http://www.panashield.com/emc_absorbers.asp <S> http://www.eccosorb.com/ <S> http://www.ets-lindgren.com/RFAbsorbers <S> http://www.westernrubber.com/products/himag-microwave-absorbers/himag-reticulated-foam-absorbers/ <S> http://www.lairdtech.com/product-categories/rfmicrowave-absorbers-dielectrics <S> http://www.masttechnologies.com/rf-absorbers/ <S> http://www.djmelectronics.com/rf-absorber.html <A> The signal will be strong, but not that strong. <S> A path loss calculation says that for two 20 dBi antennas 6 m apart, at 5700 MHz, the received power is -23 dB of the transmitted power. <S> So if the transmitter is -1 dBm, the received power will be -24 dBm, or 4 microwatts. <S> This won't damage them, but they may be overloaded and not work perfectly. <S> Two simple ways to reduce the signal <S> : Misalign the antennas - don't point them at each other. <S> That will quickly reduce the signal. <S> For example, the front to back ratio of the panel is probably more than 30 dB, so if you turn one around completely, that reduces the received power to -54 dBm, as though you were 200 m away. <S> Or put something in the way of the signal. <S> It doesn't need to be anything fancy, a wall, a sheet of tinfoil will work fine. <S> If you're going to use metal, use a piece at least 3 times the size of the antenna, and keep it near to one antenna. <S> In the middle of the link, the signal will just diffraction around it. <S> Finally, there's no way you could receive half a watt! <S> If the transmitter power is -1 dBm, that's the most you could ever receive, by conservation of energy. <S> In practice, much less as you see above. <A> is there a reason you picked these? <S> Can you put a wall between them? <S> How about some anti-static shielding foam?
You don't have to worry about damage. You're really not using the right radios for this.
AC-bias in tape heads: could someone explain? I understand that the purpose of AC-bias is to improve the quality of a tape recording by countering some otherwise adverse physical properties of practical magnetic materials. I've had this explained to me in a number of different ways, often contradictory, always vague. Online sources like Wikipedia don't help because they're more muddled and vague than most! Could someone who is eloquent and knowledgeable give the definitive answer as to the physical processes which are involved and how AC bias helps? Actual equations preferred to hokey analogies. <Q> I can't give you equations, but I can tell you that the main purpose of AC Bias applied to the record head of an analog tape recorder is to overcome the inherent hysteresis of the magnetic oxide contained in the binder on the recording tape. <S> I'm no longer competent to give you an extremely detailed explanation - <S> I last worked with analog tape recorders more than 20 years ago and this kind of memory is one of those "Use it or Lose it" type of things. <S> In general, we used to supply more bias than necessary to improve the distortion figure that we could get from analog tape - the number that is still burned into my brain is 3dB of over-bias. <S> I do remember playing the amount of over-bias for the various tape brands that we used - Ampex <S> 406 and 456 tape was the most common tape in use by the recording studios and broadcasters that I was working with at the time. <S> We spent days messing with bias and equalization to find the best compromise between distortion and S/N ratio. <S> This was massively fun work way back then <S> but I wouldn't care to repeat it now. <S> [Edit] <S> I went looking for the calibration tapes that I used the most recently and found their home page: the company is <S> Magnetic Reference Laboratories and much documentation can can be found at their home page. <S> I haven't reviewed this documentation in several decades and can't tell you which file contains the information that you are looking for <S> but it is a great place to start looking. <S> These people are what I would consider to be the modern-day experts in regards to analog magnetic tape recording. <S> Look further down the page for technical documentation. <S> MRL <S> [Edit 2] <S> One of the links on the above page is to a PDF that does a great job of describing what AC Bias is and why it works. <S> The link is: AC Bias <A> The record head is a small electromagnet pressed against the tape. <S> If a current is applied, it magnetises the oxide particles on the tape. <S> the stronger the current, the more magnetic domains are re-aligned <S> and the stronger the signal recorded. <S> However, a very tiny current will have no effect on the tape at all. <S> This would mean that weak signals would end up distorted (as only the peaks would be recorded). <S> Even weaker signals would not be recorded at all. <S> Adding a high-frequency bias ensures that there is always enough magnetic field to magnetise the tape. <S> However, the frequency is higher than the tape is capable of recording, so it doesn't affect the result. <A> The non-linearity in the way the tape is magnetised usually exists at both low and high levels of magnetisation with a region in between which is more linear. <S> Before High frequency bias was discoverd, heads were biassed with a DC current to try to shift the magnetisiation into this 'linear' region. <S> It was not all that successful and the advent of HF bias transformed magnetic recording. <S> The exact frequency is not critical but should be 3 to 5 times greater than the highest audio frequancy to be recorded. <S> The bias current is critical and depends on the type of tape you are using. <S> The optimum adjustment is a compromise between achieving the minimum distortion without erasing too much of the high frequency audio; an unfortunate side- effect. <S> Techniques such as feeding the bias to a separate head or modulating the bias current dependent upon how much HF there is in the audio signals (Dolby HX Pro) were techniques developed to try to overcome tis.
It's to overcome the hysteresis of the magnetic tape.
Under which possible conditions is measuring with an multimeter a danger to life ? My knowledge of electrics is very limited, I am planning to buy a Multimeter, but I am confused when it comes to safety. I do not really know what is a danger to life when measuring a circuit with a multimeter. Is it the voltage, current, resistor, capacity, frequenz a combination of some of this or other factors. Could you please explain common conditions in working with an multimeter and when it is safe and when not. <Q> Some general points- <S> of course you should always follow the meter and test probe manufacturer's recommendations. <S> Arc flash is a particular type of high energy fault that can cause fatal injuries, A lesser danger of injury (death is less likely) is from high high current causing burn injuries, which can occur even at low voltage. <S> Some cheap meters have no fuse at all in the high current range and putting the probes across a hefty battery or high current supply will melt or blow the test leads off. <S> Others have a fuse but with woefully inadequate interrupting capacity. <S> In all cases using a multimeter with at least the minimum safety category for the situation will reduce the risk. <S> A good summary of the categories is in this Fluke publication- ABCs of Multimeter Safety. <S> I would recommend CAT III for most mains measurement situations. <S> Here is an analysis of an incident that killed two people as a result of using cheap multimeter. <A> I'll skip the fun stuff, like measuring the voltage of a lightning bolt by standing in the middle of a thunderstorm with one DMM probe stuck in the ground while holding the other above your head. <S> There are two basic areas to be careful of. <S> First, measuring high voltage (basically, 110 volts or greater). <S> You've got to be careful that you don't inadvertently complete a circuit. <S> This means being careful not to let your fingers touch the metal probe ends, or try it while wet, or get careless about what you touch. <S> A useful technique, if you are worried, is to keep one hand in your pocket. <S> That is, you clip the DMM ground probe to a handy ground point, then use one hand to make the probe connection to the point of interest, while keeping the other hand in your pocket. <S> The very worst thing you can do is to make contact with two voltage sources with both hands - the current path from one hand to another will include your heart, and this is technically known as A Bad Thing. <S> Do not, under any circumstances, try to use a DMM on a point which is not held firmly in place, such as the end of a wire which is hanging freely. <S> For voltages of, let's say, 24 volts or less, the above concerns are simply not much of a problem as long as you're not doing it while immersed in water. <S> With dry hands, 24 volts may give you tingle, but nothing more, and lower voltages, such as 5 volts simply won't produce any sensation at all. <S> Under these conditions, you need to worry more about accidentally short-circuiting two adjacent conductors with the metal end of the probe. <S> This can happen, for instance, if your hand slips, or if you have the probe touching one point and turn away (for instance to look at the DMM face), and change the angle of the probe so that it makes contact with two points and short circuits them. <S> This is most likely to just damage the circuit, but if the voltage being shorted can produce currents of many amps you may get spatters of hot metal being thrown off. <A> One risk is electric shocks. <S> It's difficult to pin down <S> exactly what point a supply becomes hazardous because it depends on many factors but the general rule of thumb is that supplies below 50V or so are safe enough under normal conditions. <S> Sticking probes into bits of live metal carries a risk that you will end up touching live metal. <S> How serious that risk is depends on the type of probe you are using, what you are using it to probe and how careful you are. <S> If one probe is touching an object that is live at a dangerous voltage then you should treat the other probe as also being live. <S> The other side of the safety equation is energy related risks. <S> Something goes wrong during measurement that results in very high current flow. <S> Maybe a spike in the supply flashed over the meter. <S> Maybe the user plugged the test leads into the wrong sockets. <S> Whatever the cause of the high current event the level of danger depends very much on the type of supply. <S> Industrial and commercial distribution tends to be especially bad for this. <S> In the worst case the energy released as an arc flash can be enough to kill. <S> Test gear is rated into "categories" depending on the environment in which it will be used. <S> Another answer linked a document from fluke titled "the ABCs of mulitimeter safety which convers this pretty well" but basically you want at least CAT II for working on mains supplies inside portable equippment, CAT III for work on most wiring inside buldings and CAT IV for outdoor work and work on the main service intake. <S> Be careful of CE marks, they can be self-certified and there is no central tracking. <S> So unscrupulous vendors can and will slap them on virtually anything. <S> I would avoid no-name meters for working on anything hazardous regardless of what measurement category the lables on them claim.
There is danger from electrocution and from release of high energy (shrapnel, molten metal, vapor) in case of a short. Another thing to consider is to make sure that your contact points are mechanically stable.
Back EMF of an inductor in a DC circuit? Will an inductor in a DC circuit act as a voltage source and oppose the applied current creating the magnetic field? Or is it because of the steady state direct current there is no change in I there is no back EMF opposing the power supply? simulate this circuit – Schematic created using CircuitLab Source : I'm confused, going from 0A to xA wouldn't that be a change? Creating a growing magnetic field...? <Q> Assuming the above circuit has been sitting for a while since the power supply was turned on and has reached steady state, then the current in the circuit will be the normal expected I= <S> V/R. <S> At steady state, inductors are basically just resistors. <S> There will be no voltage drop or rise across L1 (assuming it is ideal and has no resistance) because the current is constant so di/dt=0. <S> Inductors only act differently than resistors when the current though them is changing. <S> If you start with PS at zero volts and ramp up to a final voltage, then di/dt will be non-zero during the ramp up period and the inductor will have a negative voltage across it resisting the current flow until it reaches steady state. <S> Make sense? <S> Check out the resources listed at the end of this answer... <S> How is the current induced in this circuit? <S> ...for lots of great references I think you'll enjoy! <A> The source provided by you shows the usage of constant non varying current(DC),so there won't be any induced emf around it initially,but as the circuit reaches steady state the inductor behaves as if it is an short circuit because usually steady state implies a lot of time after application of input or theoretically infinite time after any recent changes to circuit, thus time tends to infinite implies voltage tends to zero as per formula above for back emf. <S> this is the transient behavior of inductor to DC source. <S> as you are asking, yes, it's because of the constant DC the back emf across inductor is null. <S> but, once you remove the source and connect the circuit without any source in it, inductor acts as the source for sometime and supplies the same current flowing through it previously when acting like a short circuit thus behaves like a source, so the current direction remains still,but the emf polarity reverses to indicate that it is no more passive element as it is supplying current now. <S> this is because of the fact that inductor can't change current flowing through it instantaneously.thus <S> the difference of AC source from that of DC is the back emf and resultant impedance while steady state current is flowing.thank you .i <S> hope this is useful to u. <A> You are correct. <S> When the power supply is switched on the current through the inductor will be increasing (di/dt > 0). <S> This will produce a transient voltage across the inductor that resists the applied voltage (a "back emf", following the passive sign convention for i and vL). <S> Once the current reaches its maximum, di/dt = 0 and the voltage across the inductor is also zero. <S> However, another change will occur when the power supply is suddenly switched off. <S> di/dt < 0 <S> , so the inductor assumes a negative voltage that tries to keep the current pumping. <S> Both of these inductive voltage spikes can damage other parts of the circuit, particularly integrated circuits and transistors used for switching. <S> This is why inductive loads (e.g. motors, solenoids, relays, etc.) are provided with flyback diodes which allow the current to keep flowing and dissipate the stored energy of the inductor's magnetic field: simulate this circuit – <S> Schematic created using CircuitLab
The circuit has reaches a steady state, or DC ("Doesn't Change"). Inductors need a time varying current to flow through them to produce an time varying field across it and thus produce an self induced EMF opposing the original current flowing through it.
toggle 12v as high and 11v as low for arduino a little diff question, have googled to get clues but apparently I don't know what exactly to seats for. Im trying to turn on a led with arduino when a external source triggers 12v. basically that ext source swaps between 12v when active and 11v when inactive. I hoped for that 11v to be 0v so I could use transistor or relay with arduino but unfortunately the low state on external device is 11v. how can I check with arduino when the ext source is at 11v and how do I tell arduino that this is the low state. I just want to light up a led with arduino whenever the ext source is 12v and kill the led light when it's 11v.I tried with 2 1M resistors on that 11v but I got it down to 9v and I don't like the idea of chaining resistors. is there any other possible components that I could use for this purpose ? <Q> The part you're looking for is a comparator. <S> Set a threshold with resistors at 11.5 volts. <S> The arduino is not required here, but could still be used if additional behavior is desired. <S> simulate this circuit – <S> Schematic created using CircuitLab Alternatives: <S> There is probably a diode-based option, but the comparator will be simpler. <S> As mentioned by others, you can use a resistor divider into an A/D and then do the threshold logic in software. <A> If your paranoid place a 5.1v zener diode on the pin to protect it just in case. <S> Also remember that sampling does take some current. <S> The current is minuscule but it does limit the maximum value of the divider. <A> simulate this circuit – Schematic created using CircuitLab <S> Use the above voltage divider <S> schematics,,you should now be able to map 11v and 12v to some analog values in arduino,,you <S> will have to do R&D with code to pull this off <S> Vr2=(Vin*R2)/(R1+R2) <S> Vr2=(12 <S> *10000)/(10000 <S> +100000)=1.0909V <S> Vr1=(Vin*R1)/(R1+R2) <S> Vr1=(12 <S> *100000)/(10000+100000)=10.909 hope this helps
Use a voltage divider and sense the voltage state using and analog to digital converter.
what is the name of this part I'm trying to be this part separately but I don't really know its exact name therefore I couldn't find it. It's the black separators highlighted in the red rectangle that I'm looking for. I tried looking for pin separators and pin spacers but that didn't result in anything. <Q> You can buy the pin headers with different lengths of pins and pins staked into the plastic to different depths. <S> Quite customizable. <S> You can contact header manufacturers and see under what conditions they would sell them with no pins at all. <S> I would guess that for < 1K pieces pulling them out as FM says would be your best and most economical bet, but likely short-lead-time specialist guys like Samtec as @Ignatio says might be amenable, at a price . <S> (Ignore the name 'terminal strip', nobody else calls them that). <S> You can buy headers with more than one spacer: <S> To pull them out, find a piece of perf board, run the pins through (so the FR4 supports the plastic), and pull them out. <S> If they're too grippy, warm the plastic a bit with a heat gun. <A> As mentioned, these spacers are not sold separately (not as a standard part, anyway). <S> I know Sullins sells some connectors like this with the option of adding these spacers within the order. <S> It's part of the part number configuration. <S> See the catalog page for the PPPC series ( http://sullinscorp.com/catalogs/101_PAGE114-115_.100_FEMALE_HDR.pdf ). <S> In the fourth table on the first page you'll see the different options for spacers and tail length. <S> I think this is probably what you're looking for. <S> The top of page 2 shows how to configure the part number. <A> I think they're called pin spacers. <S> As pointed out by @Ignacio Vazquez-Abrams, they're not sold separately. <S> Maybe they are, but they might be only available for other manufacturers and not for us peasants. <A> Wouldn't something like a "EW .100" Flex Stack, Flexible Board Stacker, .330 <S> " Tail" Link from Samtec work? <S> Comes with two separators... <S> There are other options available (don't know what you pin pitch is)...
However, you can buy headers just like the one you showed in your first picture with the spacers already added.
Why are induction motors controlled with a constant V/f? It seems that induction motors are always controlled using a constant ratio of voltage over frequency. Why is that? Take the classic torque-speed characteristic curve - varying the frequency shifts it sideways such that it's possible to start the machine, and control it at any operating point within the frequency and rated torque limits. What advantage does that give? <Q> For an AC machine, the air gap flux is proportional to voltage and inversely proportional to frequency. <S> (Note that \$\frac{V}{Hz}\$ can be converted to \$\frac{V}{rad/sec}\$ which is equivalent to \$V\cdot s\$, or Volt-seconds. <S> \$1 <S> V\cdot s\$ is equivalent to 1 Weber, which is the unit for magnetic flux.) <S> So, if you maintain a constant ratio of voltage to speed, you maintain a constant air gap flux. <S> Because torque is proportional to air gap flux, by maintaining a constant \$\frac{V}{Hz}\$ ratio, you can essentially make torque independent of speed in an AC motor. <S> So you can maintain constant torque down to very low speeds. <S> As Andy aka said, if you only reduce the frequency to change speed, your flux increases and you end up saturating the steel <S> and you aren't able to maintain constant torque. <A> Magnetic cores saturate when the flux density reaches a certain limit, determined by the core material, size, and geometry. <S> When the core saturates, the windings stop looking like an inductor and start looking like a wire. <S> This generally makes the current through the windings shoot up dramatically, resulting in higher losses and possible hardware damage. <S> And since there's no more magnetic flux being stored in the core, no actual useful work is being done with that extra current. <S> Saturating the core, in general, is a bad thing. <S> A given coil around a core will have a maximum volt-second product; this tells you the point at which the core will saturate. <S> If the volt-second product for a winding was 10 Vs, You could apply 1V for 10 seconds, or 10V for 1 second, or 100V for .1 seconds, and the flux density would end up the same. <S> (V=L di/dt, so if L is constant, and the product of V and dt is constant, di is also constant.) <S> Since a motor is a winding around a core, the motor also has a volt-second product limit. <S> Once you reach that limit, you have to reverse the voltage and flux up the core in the opposite direction to keep doing any useful work. <S> Since we're applying a sine wave to the motor winding, the half-period of that sine wave is the seconds in our volt-second product. <S> If the frequency goes down, the period goes up, so the volts must go down to keep the volt-second product the same. <S> If the frequency goes up, the voltage can also go up, because the period went down. <S> Since frequency and voltage vary in the same direction, we can say the volts-per-hertz remains constant. <S> Of course, that's just an upper limit. <S> We could run fewer volts without risk of saturation, and may wish to in some circumstances. <A> Same story for a power transformer.
If the frequency lowers, for a given supply voltage, the magnetization current increases and this can cripple the motor if the iron cores start to magnetically saturate.
Detecting a moderately-fast moving object from 1ft away I have a small side project using Arduino (pro mini or nano) that would detect passing model race cars (and quadcopters) and counting how many times it passed through a selected location. I thought of using IR emitters and detectors (photodiode) to achieve this but I'm worried it might not be fast enough or it might miss some counts. The setup would have a few (1 or 3) IR emitters on one side of the road and a detector on the opposite side, facing the emitters (or maybe the emitters on top, and detector on the bottom). They would be more or less 1 foot apart and the toys would pass in between (there is also an arch about 1ft and all of them should pass under the arch). I'm using these for the emitters and these for the detectors. Only one car would pass through the track at any given time so there would be no issues arising from use of multiple cars. The toys are about 4-5" length and width, and height of a quadcopter would be around 1-2". Basically, just detect any brick-sized object passing through the arch. Is there something I could do to guarantee a count and would IR even fit this type of application? Or should I use an alternative? If so, any suggestions? Thanks in advance <Q> As far as the speed, IR detectors are definitely fast enough with response time being of the order of ns or us (if you use more filtering). <S> There are a couple of areas of concern: 1) <S> The pattern is probably close to being omni-directional (I could not see the datasheet that would show this) <S> so you may have issues with the signal bouncing off of the floor, other objects and would have to experiment a lot with thresholds. <S> 2) <S> It is likely that the signal would not increase/decrease monotonically as the car is passing by, so you would have to implement some sort of a debounce function to avoid multiple counts for the same event. <A> I shone a laser onto a LDR (light dependent resistor) for this sort of situation a while back. <S> The laser (you can buy them for $1 or so on eBay) is highly directional, and quite powerful, so the difference between the laser hitting the resistor, or not, is substantial, and gives you a nice sharp cut-off. <A> IR detector speed is faster than necessary. <S> But some other points must be considered.... <S> (1) <S> The beam-width of IR LEDs, and IR detectors are unknown. <S> You would prefer to have narrow beam width for both. <S> (2) <S> Those IR detectors could be raw diodes, or phototransistors. <S> Both can yield acceptable car-passing output, but a raw diode needs a different amplifier circuit than a phototransistor. <S> A phototransistor has internal gain that relieves some gain requirements of the external amplifier. <S> (3) <S> Some method must be arranged to compensate for ambient light. <S> Those photo-detectors will give some considerable output from room lights, and can change as shadows pass from people moving about. <S> Attaching a hood or tube onto the photodetector can help reduce this effect, but not eliminate it. <S> Be not discouraged - this can be made workable. <S> Consider hiding your photo-gate within the bridge (tunnel) where optical environment is better-controlled. <S> One method of dealing with a variable ambient-light environment is to use your microcontroller to modulate the IR LED on-to-off at a fast rate. <S> Then the amplifier that boosts the IR-detector signal can be an AC amplifier which blocks a slowly-varying ambient background. <S> Here's a possible measurement sequence... <S> turn <S> LED offMeasure detector amplifier outputturn LED <S> onMeasure detector amplifier outputSubtract two measured values. <S> Repeat <S> The subtracted result, if small, indicates a blocked optical path. <S> Large changes from light-to-dark and dark-to-light are also available. <S> Your microcontroller should be able to perform this sequence hundreds or even thousands of times each second.
Since you can point your IR LED directly at the IR detector, it should be possible to minimize optical path loss.
How the current from circuit cross a capacitor dielectrics? I've intensively studying electronic circuits there are few months and this is the first time I feel my brain stuck. How can the current coming from the circuit cross a capacitor to the other side if there is a dielectrics layer between it? Even if it is AC it doesn't make sense to me. <Q> The dielectric prevents this. <S> What does happen is that an electron on one plate of the capacitor forms a negative charge. <S> This negative charge attracts a positive charge on the other plate of the capacitor. <S> In other words, it repels an electron on the other plate. <S> Current is simply movement of charge / electrons. <S> A DC current is movement of charge in one direction (not possible through a capacitor). <S> An AC current is movement of charge alternating in opposite directions (possible through a capacitor). <A> Electrons do not jump from one side of the dielectric to the other. <S> Capacitors are open circuits. <S> They store electrons and discharge them from the same side. <S> In a DC powered series RC circuit, the half of the capacitor attached to the more negative section of the circuit will begin storing electrons from the DC supply, becoming more negatively charged and forcing the positive half of the capacitor to release electrons and become more positively charged. <S> This continues until the capacitor is "fully charged. <S> " The process reverses when you discharge a capacitor -- all the extra electrons on the negative side want to move toward the positive side, and bring the potential voltage to zero. <S> The same concept occurs in AC circuits, but the alternating nature of things causes capacitors lose impedance as the frequency grows. <S> At high frequencies, capacitors can act like a short. <A> This animation from wiki commons shows the water-flow analogon for a capacitor: <S> The water can not pass the red membrane, but as the membrane is flexible, water (charge) will flow into the pipe on one side and out of it on the other side, if there is some pressure (voltage). <S> If the membrane is bent and there is no external pressure, the membrane itself generates pressure, like a charged, but disconnected capacitor. <S> And the more flexible the membrane is, the more water can rush in for a given pressure. <S> This is similar to the capacitance: <S> The higher this value, the more charge flows into the capacitor for a certain voltage.
The current does not flow through the capacitor in the sense that an electron goes in on one side and comes out on the other side.
Why does USB have Vcc=5V and high=3.3V? I am thinking about adding USB support to a device of mine using V-USB. From what I read there and on other sites USB seems to have only 3.3V as a high level on the data pins, whereas the voltage supplied by USB is 5V. What is the reason behind that? To me it seems to only make things more complicated since that way I need to work with multiple voltages on the board or completely step down the Vcc to 3.3V. <Q> If USB was 3.3v then if you had a long cable and poor connectors with 0.5v of drop then the device will only run at 2.8v. <S> If the voltage is 5v <S> the you still have 4.5v to work with and that is enough to run an LDO voltage regulator. <A> The data lines on low speed USB have a differential signal voltage of the following characteristic for the transmitter: - On low and full speed devices, a differential ‘1’ is transmitted by pulling D+ over 2.8V with a 15K ohm resistor pulled to ground and D- under 0.3V with a 1.5K ohm resistor pulled to 3.6V. A differential ‘0’ on the other hand is a D- greater than 2.8V and <S> a D+ less than 0.3V with <S> the same appropriate pull down/up resistors. <S> And for the receiver the spec is: - The receiver defines a differential ‘1’ as D+ 200mV greater than D- and a differential ‘0’ as D+ 200mV less than D-. <S> Information taken from here and note that where it says 3V6 it actually means 3V3. <S> For high speed USB systems the voltage levels are smaller: - As you can probably tell the transmit logic levels have nothing really to do with either 5V or 3V3 logic systems. <S> The power feed is just a regular power feed that makes compatibility with 5V and 3V3 systems fairly easy. <A> The 5V voltage on power pins is just a power feed for a device which needs power. <S> At the time USB was introduced both 5V and 3.3V devices were common and the goal was to support both systems. <S> There are (at least) two advantages of using 5V as power supply voltage instead of 3.3V: <S> For the devices that needs higher power (eg. <S> external HDD) using higher voltage at the same supply current yields more power. <S> Using 3.3V as supply voltage and increasing the current would not be equally good, as it would require thicker wire to transmit. <S> In case of a 3.3V low power device, it is far more simpler, cheaper and more efficient to regulate 3.3V from 5V using a simple LDO than vica versa. <S> The latter would require a switch mode boost converter which is more complex. <S> An 5V device's input/output can be designed to interpret and output 3.3V max. <S> as high level. <S> The decades old TTL standard already required only 2.4V as high level, so in theory are 3.3V compatible (as an input). <S> In contrast, if the data bus would be choosen to operate on 5V levels, it would cause problems for 3.3V devices. <S> Although an input can be easily made to be 5V-tolerant, on an output it is not possible to output 5V using single supply voltage. <S> It requires a level shifter (built-in or external) and both supply voltages. <S> It is by all means more complicated than the previous, especially on bidirectional bus like the USB. <A> A primary factor when determining voltage levels for a differential bus is power consumption. <S> The higher the voltage/bit rate is, the higher the power consumption is (this should be obvious to the reader). <S> In particular, power consumption is amplified when you have very high speed signals, or multiple load points. <S> If you think of the same issue in the other direction, a higher voltage level will be harder to achieve from the driver perspective <S> thus will limit transmission speed. <S> Current mode driving (which ensures the speed) used in many modern buses, USB included, allows lower voltage swings on the data lines. <S> On another note, reflections or signaling imperfections will result in over/undershoots. <S> If you already have an intrinsically high voltage on the bus, the superimposed (and higher power) <S> transients may not be tolerable by the device. <S> That power also goes in vain. <S> The extreme case of this phenomenon is when you disconnect the antenna from an RF transmitter. <S> If you have enough power in the transmitter you will jeopardize the radio. <S> You can take other factors, like EMI, into consideration as well. <S> How about the dissapated heat in termination? <S> For a given Z0 more volatge, more heat. <S> That is why the Low/Full speed USB uses 3.3V, USB 2.0 and later uses the even lower 800/400mv. <S> We usually want to apply the lowest voltage that makes sense for the specific interface. <S> Be reminded that many high speed interfaces (such as ethernet, can, hdmi, pci, lvds, and many more) all use low voltage signals in the same tier. <A> The other reason can be confidence of connection's correctly working. <S> Bigger range is more powerful against noise(Because needs noise with higher voltage to change bit's state).
The higher voltage allows compensation for voltage drop to the device. The case for data pins is also for supporting both 3.3V and 5V devices as simple as possible.
Why is the Inductive reactance formula (XL=2πfL) not working for me? I have an inductor labeled as "222" which I believe its means that its inductance value is equal to 2200 Microhenries. I double checked by measuring the inductor with and LCR meter and the value matched the label. According to the inductor reactance formula "XL=2πfL", a frequency of around 3620 Hz impressed into a 2200 Microhenries inductor should yield around 50 ohms of inductance reactance. To test this, I fired up my signal generator configured to output 4 volts peak to peak with a frequency of 3620 Hz. Given that my signal generator has a built in 50 ohms resistance I was expecting the voltage drop across the inductor to be 2 volts (2 volts dropped across the signal generator built in 50 ohms resistor and 2 volts dropped across the inductor 50 ohms reactance). However, the voltage drop across the inductor turned out to be 3 volts. This means (according to me) that the impedance / reactance generated by the inductor is more like 150 ohms. Basically, 1 volts dropped across the signal generator built in resistor and and 3 volts dropped across the inductor. Why is this happening? What am I doing wrong? Why is the formula not working for me? Thanks. <Q> Your inductance has an impedance of j50 ohms at 3620 Hz. <S> Your generator has a 50 ohm resistance at that frequency. <S> Using the standard voltage divider equation, and taking into account the imaginary value of inductor imepedance yields a voltage ratio of 0.707. <S> That value multiplied by your 4 volts yields an output of 2.83 volts which is close to your measured value of 3 volts. <S> In this case, your generator impedance has a 0 degree phase angle while your inductance has a 90 degree phase angle. <A> So 2200uH is 50j at 3620 <S> Hz. <S> Using AC voltage divider: $$Vout = <S> Vin <S> *\frac{50}{50j + 50}$$ <S> $$Vout = <S> Vin <S> *(0.5 - 0.5j)$$ $$Vout <S> = Vin <S> * \sqrt{2}/2 \textrm{ }[45^{\circ}]$$ <S> $$Vout = <S> Vin <S> * 0.707 <S> \textrm{ }[45^{\circ}]$$ <S> If Vin is 4V (rms), Vout is 2.8V (rms) <A> The internal impedance of the signal generator must be resistive rather than inductive. <S> The applied voltage squared would be the sum of the voltage across the resistance squared and the voltage across the inductance squared.
The important point is that you must take into account the phase angle of any impedances that you use as a voltage divider.
How can I detect fuse failure? I have two components in parallel on a DC circuit driven by a single momentary switch. Each component is individually fused. I need to detect failure of either fuse and in that event power on a warning indicator. The most direct approach is to wire a NC relay in series with each fuse, but the specs of the circuit aren't tolerant to the voltage drop as power output from each component must be maintained. I'd like to solve with common cheap components as this is a hobby implementation. Any ideas? <Q> You could connect an LED and its ballast resistor in parallel with each load, as shown below. <S> The LED would stay on while the fuse wasn't blown, and you could use a high-efficiency LED to minimize its impact on the fuse. <A> Put a resistor and LED in series, and put that series combination in parallel with the fuse. <S> If the fuse is intact, it's a short, and no current flows through the LED. <S> Size the resistor properly for the voltages involved, and the LED will turn on. <S> If you need an indicator used to drive a circuit rather than just an LED, put the diode of an optocoupler in place of the LED. <S> Of course, this is somewhat dependent on the nature of the voltage and the load. <S> There are imaginable circumstances where this would not work. <A> Assuming there is a voltage drop after the fuse blows, a simple P-ch MOSFET (or PNP) with gate connected to the top of the component would work. <S> When voltage drops after fuse blows, it lights an LED. <S> Something like this: <S> Sim: <A> You might try something like the attached circuit. <S> Whether it will light or not will depend on the circuit being powered. <S> If it has a relatively low resistance to ground, then the LED will light. <S> You might have to monkey with the value of the resistor. <S> simulate this circuit – <S> Schematic created using CircuitLab
If the fuse is open, the only current path is through the resistor and LED.
Can my battery pack provide power for this motor? I just made a 7.2V 6-cell NiMH battery back with a 2300mAh rating. Will it be enough to power this motor of an RC car? (I will link the datasheet). At maximum efficency it draws 13A at a nominal 7.2V. How will the battery pack be able to deliver this current when it's current rating is well below that? I have tried reading various articles and reading through motor datasheets, but I cannot understand how it works. Here is the link I would greatly appreciate it if anyone could help me understand this <Q> Here is a data sheet for an Energizer 2300 mAhr NiMH battery. <S> At 13 amps it will not work. <S> A 1C rating is the capacity divided by 1 hour, in this case 2.3 amps. <S> 13 amps is 13/2.3, or 5.6 C, which is way beyond what the battery is intended for. <S> Purely as a SWAG (Scientific Wild-Ass Guess), your battery pack will put out about 4 to 5 volts for about 5 minutes at 13 amps. <S> It will also get extremely hot, and there's a decent chance you'll damage one of the cells if you run it to full discharge. <A> 2300mAh is not a current limit - it tells you how long the battery will last a a particular current flow. <S> 2300mAH mans that it could supply 2300mA for one hour, <S> 1 Amp for 2.3 hours etc. <S> At high rates of discharge this proportionality falls down. <S> Typically RC <S> model cars that use the type of motor you describe will use subC cells that can provide many 10's of Amps. <S> As Peter says if your batteries are just AA cell they will be more limited. <S> This is a data sheet for 2300mA AA cells ( datasheet ). <S> Each cell has 40 mohm internal resistance when 50% discharged so at 13A current the voltage will drop by about 0.5V down to about 0.7V, or only 2.8V for the entire battery. <S> I think that although the car will move but the performance will be very limited - <S> you need a bigger battery such as 7.2V RC battery pack . <A> If you want to use that type/size battery, I suggest you build an 8p6s battery pack as follows: <S> 1. <S> Make 6 battery banks (i.e. connect 8 cells in parallel (i.e. all + on one bus metal wire/strip & all - on another bus metal wire/strip). <S> <-- make 6 of those banks (48 cells required). <S> 2. <S> Connect each battery bank in series (i.e. connect the + of bank 1 to the - of bank 2, connect the + of bank 2 to the - of bank 3... <S> etc until you have all of the banks wired in series. <S> The first - (bank 1) and the last + (bank 6) are the metal wires/strips that you will connect to your motor (i.e. in the simplest connectivity arrangement for testing purposes). <S> When fully charged, that battery pack should power your motor for ~1 hour at the motor's maximum efficiency and deplete the battery to ~50% of full charge. <S> If you want the motor to operate less time, then remove an equal number of cells from each bank (e.g. 1 cell from 6 banks or 4 cells from each bank). <S> If you want your motor to run longer, add an equal number of cells to each bank. <S> Have Fun!
If you are using AA type cells, I doubt you'll be able to get 2.4A from your series-connected battery pack.
How can you delay your fsm to stay in one of the state for about lets say 5 clock cycle? If I want to delay my FSM to stay in a state for 5 cycle how could I do that?I suppose I should use a counter but what is the VHDL code how could I use a counter inside the process statement. Sorry if the question is simple I am learning VHDL coding. I am using this coding, but it is not compiling : library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;use ieee.numeric_std.all;entity state3_fsm is port ( clk_H : in std_logic; res_H : in std_logic; start : in std_logic; done_H : in std_logic);end entity state3_fsm;architecture arc of state3_fsm is type statetype is (s0, s1, s2); signal pr_state, nx_state : statetype; signal count : std_logic_vector(3 downto 0);begin ff_pro : process (clk_H, res_H) begin if (res_H = '1') then pr_state <= s0; elsif (clk_H'event and clk_H = '1') then pr_state <= nx_state; end if; end process ff_pro; com_pro : process (start, count, pr_state, done_H) begin case pr_state is when s0 => if (start = '1') then nx_state <= s1; else nx_state <= s0; end if; when s1 => count <= count + 1; if (count = 5) then nx_state <= s2; count <= "000"; else nx_state <= s2; end if; when s2 => if done_H = '1' then nx_state <= s0; else nx_state <= s2; end if; when others => nx_state <= s0; end case; end process com_pro;end architecture arc; <Q> What you have is on the left, and what you want is on the right assuming you want a delay between State 2 and State 3 . <S> You simply can add a new state that handles the delay. <S> Some pseudo code for the delay state would be implemented like the following: if(clk)delay_counter <= <S> delay_counter + 1'b1;if(delay_counter = <S> = <S> 5)beginmode <= <S> state3delay_counter <= <S> 0;end <S> If clk happens every 50ns, you just created a 250ns delay. <S> You're trapped in this state until you've met the delay, then you hop into the next state you want. <S> EDIT: <S> Just reread your question and maybe I misunderstood but <S> the concept is the same anyways. <A> A pure FSM cannot "count" anything in the states. <S> A counter is an FSM by itself. <S> In order to delay N cycles in a specific state, you will need to expand it to N+1 substates, which will "count" the delay transitions. <S> Of course you can compromise the "purity" of the FSM and add a counter as you mention. <S> You can find a plenty of examples of the code online. <S> Here is one example . <A> If you want to stay in each state for the same specific amount of time, add the delay in the code that changes the current state to the next state. <S> Example: <S> State_Memory : Process (CLK)begin -- will delay changing states for 5 times the clock periodif (CLK'event and CLK = ' <S> 1') thenif (count = 5) <S> then -- 5 is max countCurrent_state <= <S> next_state;count <=0; --reset counterelsecount<= count + 1; --increment counterend if;end if;end process;
If you want State 3 to happen 5 times you would put a block in State 3 that points to State 4 based on a variable counting up to 5, and State 4 just sends you back to State 3 or State X based on that variable.
Why is output voltage being neglected when calculating power supplied by this current source? If you look at the fourth equation, the example is attempting to calculate the power supplied by the current-controlled current source on the far right of the circuit. For the equation P = I * V, they are plugging in 8 volts for V, which is the voltage across this current source resulting from the voltage source on the other side of the circuit. What bothers me is that the current source should be outputting a voltage as well. Why is this not being factored in? Shouldn't the voltage value plugged into the power equation for that current source be equal to the 8 volts across it minus the voltage that it is outputting as a source? <Q> Since the current source is in parallel with p3, its voltage is the same as p3's: 8 volts. <S> That is, 8 volts is "the voltage that it is outputting as a source". <S> I'm not sure what other voltage you're talking about. <S> It's true that a real-world current source will include circuitry which will dissipate more power than is delivered to the load, but since there is no way to know what that is, even in principle, there is no way to calculate it <S> and it is ignored. <S> Just as the voltage source will, in real life, dissipate more power than it delivers to the load, that power is also ignored for the purposes of this sort of problem. <A> Think of battery which is constant voltage source, it provides constant voltage but <S> the current drawn through it can vary based on the load. <S> In same manner, in constant current source, current is constant but voltage can vary based on load! <A> Ohm's law states that only two of the three scalars (voltage, current, and resistance) are required to calculate the third, so there is no need to deal with the voltage at all since we can use its equivalent in the power formula. <S> \$P= <S> I^2 R\$
The calculation is correct, constant current source will provide constant current but voltage across it can vary based on the load.
What is reactive Power and how it is generated and what is its source? Many people, including me are good with dealing with real and reactive power in power flow systems, but still has question at the end of the day: What is reactive power and how it is generated or what is its source? After taking few course in power electronics, I tried to come up with simple explaination of what is reactive power and what is its source. <Q> Consider an appropriately sized capacitor (or inductor) that also draws the same current from that same AC voltage source. <S> Now, the average power taken is zero and you are not billed by the energy provider. <S> If you multiplied RMS values of voltage and current you get what is known as "apparent power" and for a resistor this is also the "real power" <S> BUT, for a capacitor or inductor this is all reactive power. <S> So you have three terms that are linked mathematically: - <S> But why does reactive power not get billed i.e. what is so special about the current that flows in a capacitor or inductor compared to a resistor? <S> Answer - using the capacitor as an example, Q=CV i.e. charge stored = capacitance x voltage. <S> If you mathematically differentiate both sides you get: - \$\dfrac{dQ}{dt} = C\dfrac{dV}{dt}\$ and rate of change of charge equals current <S> So the waveform of current in a capacitor "follows" the differential of the supply voltage. <S> If supply voltage is a sinewave <S> then current is a cosine wave i.e. <S> (and here's the important bit) <S> it is 90 degrees shifted forward and, if you were to calculate real power you would find, somewhere in the algebra, a cos(wt) multiplied by a sin(wt) <S> and, there can be no escaping that this produces a waveform that has an average value of zero (go do trig!) <S> : - You are billed on average power not peak power or (god forbid) RMS power or even reactive power. <S> Pretty graph stolen from here . <S> Note that the power waveform is twice the frequency of the voltage or current. <S> For a resistive load, V and I would be in phase and the power waveform would be wholly positive i.e. the blue waveform moves up as red and green become in phase. <S> See below for several scenarios of current phase displacement relative to voltage and what that means for the position of the power waveform: - <A> Reactive power is energy circulating back and forth between the source and the load. <S> Usually the load is an induction motor. <S> Energy stored in the motor's magnetic field is transferred to and from the source every time the polarity of the magnetic field reverses. <S> Alternatively, the energy can be transferred to and from power factor compensation capacitors. <S> That transfer of energy is reactive power. <A> Real power is energy that has been consumed by the load. <S> It has been converted into another energy form and isn't coming back. <S> Reactive power is simply energy that is being stored in the load by any capacitors or inductors inside it. <S> It can be returned to the source and indeed does so on a cycle-by-cycle basis in linear AC systems. <S> The terms are just a way to simplify the analysis of AC power systems. <S> They are useful because when we are talking about a motor, heater or light, we really want to know the real amount of power that is being converted by the device, but if you just measured the terminal voltages and currents you would get the wrong answer because of the presence of reactive power. <A> Another way of understanding reactive power is to think of an undamped mass-spring system. <S> Let's make an analgy: Power = force . <S> velocity equivalent to Power = voltage . <S> current <S> So, when you have an undamped mass-spring system with some initial excitation, the mass will oscillate eternally, with the velocity lagging force <S> 90º degrees. <S> Energy is being exchanged from the mass (kinetic) to the spring (elastic) and vice-versa, but no real work is being done on average (you have positive and negative semi-cicles of power). <S> That's the mechanical analogy for pure reactive power system - in this case a LC circuit, where energy is exchanged between an inductor and a capacitor. <S> In a single-phase power system, reactive power comes from the interaction of generator windings and any inductive loads on the system, and it's bad because then you have this energy exchange between the load and source going through the whole transmission system, overloading lines and resulting in losses. <S> When using, for instance, a capacitor for correcting the power factor of the load, you are actually taking the energy ping-pong from being system-wide to being local-wide, nearer to the load - so your losses go down. <S> For balanced three-phase systems, however, it is important to notice that the reactive power isn't exchanged between source and load , but instead between system phases (yes, from one wire to the other two).
An AC voltage source will provide real power to a resistor; the voltage is in phase with the current and this means "real watts" are produced by the resistor and you are billed for the energy usage.
link voltage and link capacitor basics I am currently getting into the topic of electric vehicles and I often come across the terms link voltage and link capacitor. simulate this circuit – Schematic created using CircuitLab As far as I know is that the fully charged battery must not be switched suddendly to the system (AC/DC and Motor) because of the link capacitor. The high inrush current could damage this capacitor and the link voltage should be raised steadily using a pre-charge switch which is in series to a pre-charge resistor.After pre-charging the intermediate curcuit, the main switch (without the pre-charge resistor) of the battery can be closed. Therfore without power loss. First of all I don't know to which component this capacitor belongs. Is it built in the AC/DC converter? If so why is it needed?Or is it just because of the capacitive behavior of the cable? Where do the terms link voltage/capacitor belong to? To the field of power electronics? Could someone plase give me more information on the terms link voltage and link capacitor regarding charging and discharging of the battery system? How long does it usually take to load the capacitor and what are the damages that could happen if no pre-charging happens? Does the link voltage has to be the same as the current battery voltage? Where do you measure the link voltage? Across the link capacitor? Are there any online materials or books available you can recommend? <Q> A typical EV has 300-400 Volt battery rather than 48V although some mild-hybrids do use <S> 48V. <S> The converter is DC to AC not AC to DC and referred to as the inverter. <S> The link capacitor is part of the inverter and would not be externally accessible <S> The Link capacitor may have a value of a few hundred microfarads. <S> It will take a second or so to precharge through a separate relay and resistor to limit the current. <S> When it is charged the main contactor engages and shorts out the resistor and precharge relay to provide full power to the inverter. <S> If the capacitor was not precharged the main contactor inside the battery could suffer damage to its contacts through excessive current - burning or welding them together. <A> You're right about the precharge circuit. <S> They're designed to have a very low series resistance, so initially they'll appear as a short circuit and could damage the battery/cabling/etc. <S> The capacitors are physically in the inverter (DC/AC converter), they're as close to the transistors (likely IGBT's) as they can be, they exist to minimize the ripple in the DC link from switching in the drive. <S> So, in terms, it's actually because of the inductive nature of the cable that they're needed. <S> I've most often heard these terms in power electronics, around motor drives like this. <S> Link Voltage simply refers to the voltage across those capacitors, in this case it's also the battery voltage. <S> It's crucial to know in the control system so it can control the behavior of the motor. <S> The capacitors probably don't have much to do with the charging or discharging of the battery system, they have much less capacitance than the super caps that are sometimes used in place of batteries. <S> The precharge time depends on the size of the drive, my experience is with ~2000HP VFDs and they take upwards of 30 seconds to precharge. <S> If you don't precharge you might blow some capacitors or burn up cabling because of the inrush. <A> The popular power electronic motor drive topologies for electric traction draw current with lots of ripple .This <S> is true for DC or AC motor systems. <S> The powerelectronic circuits that dont draw significant ripple current tend to have a Link Inductor which sounds like it would be heavier and lossier than the link capacitor you are asking about .The link capacitor is best closest to the motor drive for EMC reasons and to minimise voltage spikes caused by breaking large currents <S> quickly thruogh parasitic inductance .Some <S> battery technologies dont like ripple ,and if the effect of ripple on battery life isnt well known then its better to be safe than sorry. <S> In fact the power losses in the internal resistance of the battery will go down when the link capacitor is present. <S> Inrush current issues have been covered by others.
It's needed to limit the current when turning on the drive after the link capacitors have discharged.
How to obtain a little 120 VDC from 240 VAC? Is there some simple technique to efficiently produce 120 VDC from a mains 240 VAC supply? All I need is < 50 mA. Can something be done with just rectification and capacitors for example? Large dropper resistor? I want to run a few neon bulbs in DC mode. EDIT:- I only actually need one neon to run, but can have others if it makes the cicuit simpler vis a vis total voltage drop. I think a single neon bulb draws only about 1mA. EDIT2:- Appologies all, but thanks for feedback. I think that this question is very badly put. It's not the power supply per se that I want, but the neon bulb to run at DC current. Should I ask another, better question? <Q> Here's a simple way to get regulated 120 volts, DC from 240 volt mains, but DANGER, WILL ROBINSON!!! <S> it's not isolated from the mains, so if you get 240 <S> hot and 240 neutral connected backwards it <S> could seriously fry some equipment or make you dead. <S> If you want to play with the circuit, here's the LTspice .asc file <S> you can use to run a simulation. <A> You can use the standard linear way if you want something simple: simulate this circuit – Schematic created using CircuitLab <S> Or you can build/buy a switcher if efficiency is more important. <A> simulate this circuit – <S> Schematic created using CircuitLab <S> This is essentially tuned to the load equivalent impedance via the input R's and AC side capacitor. <S> Supply perturbations are mitigated by the DC side smoothing cap. <S> Prolonged changes to the AC (freq, voltage) has the capability to change the output voltage. <S> Likewise a change in the load equivalent impedance will change the output voltage. <S> Losses in this topology are small. <S> An additional DC- FET could be added to provide some controlled variability if required <A> Note : If you consume small currents this way would be sufficient, Otherwise you should use a 2:1 transformer and a full bridge with a capacitor. <A> The above two answers give you a simple schematic to obtain DC from AC. <S> Here is a little modification to the above schematic in order to obtain a stable DC voltage at the output. <S> There is just the addition of a voltage regulator and one more capacitor - simulate this circuit – <S> Schematic created using CircuitLab <S> The transformer (you can ignore the name) will be used to step down the AC voltage. <S> The diode bridge is the full rectifier and the capacitor C1 (usually around 100U) gives a smooth DC output. <S> In order to reduce the variations in the output we use a voltage regulator. <S> The voltage regulator will give the exact DC output. <S> For 12V output you should use 7812 Voltage Regulator IC. <S> You can tap the output across C2. <A> A neon bulb will run on AC or DC. <S> They often have internal current limiting resistors. <S> If not, you can use a current limiting capacitor.
When you want so small current, and exact voltage is not critical for you, I suggest to avoid Transformers, instead first use a full bridge rectifier as this : Then in the output use a simple resistance voltage divider to achieve your desired voltage. You could do what some mains powered LED's do, use the reactance of a capacitor.
Problems with using potential dividers to scale 220V AC mains to 0 to 5V I want to measure the 220V grid voltage using a microcontroller. I can either use a transformer to step down the voltage to 6V rms and use potential divider and dc bias to bring the voltage to uController friendly 0 to 5V range. Or I can use potential dividers without the transformers. What problems will I run into if I use potential dividers to divide the grid voltage (and add DC bias) and interface them directly with my microcontroller without any isolation? Edit:I want to understand the implication of a design with no isolation. I am guessing electrocution is only a problem during production and testing. And it goes away once the circuit is nicely packaged in a plastic container. Edit2:What I am designing is a minimalist watt meter that only communicates wirelessly via wifi. Only thing exposed out will be a socket to plug the appliances in. <Q> You most likely want to completely avoid designing a device that is directly coupled to the AC mains. <S> There is the inherent safety issue to be considered <S> but there are others as well. <S> Making a product that is not isolated makes some challenges in device packaging to make sure than no user accessible controls or interface points will be exposed to mains voltages. <S> Since you are making a measurement device there is all likelihood that you will want to attach another device via a cable that has GND return lines in it. <S> Without isolation you will expose the device on the end of the cable to the mains connection in your device. <S> During development when you are trying to download, test and debug software in your MCU any USB or JTAG pods that connected to an non isolated circuit will expose the mains hazard to the supporting development computer. <A> Sure using a transformer on the mains is nice and safe .If <S> you are tight for space <S> you could use a VCO that has a frequency that is proportional to the instantanious value of rectified mains. <S> The discrete VCO drove a garden variety cheap optocoupler with a LED in series .The <S> duty cycle of the pulse in the KHz range was made to be much less than 50% to avoid wasting power. <S> A work associate wrote code for the micro to count the pulses from the output of the opto. <S> The veroboard for this looked a bit bitty <S> but when it was cadded it was really small and cheap and as safe as a transformer. <A> If your case really is user-tamper-proof, the worst thing that can happen for mains-connected (e.g. divider) design is a fried MCU. <S> Such designs are not unheard of. <S> Here's one from Freescale: MK30X Single-Phase Electricity Meter Reference Design which can communicate through Zigbee. <S> The MCU is mains connected, through a divider for voltage and shunt for current measurement. <S> Some bus outputs (e.g. RS232) are opto-coupled for isolation. <S> Their Zigbee (daughterboard) plugs into the I2C bus of this MCU but <S> that port is <S> not said to be [opto]isolated from the mains. <S> Also the JTAG port is not mains-isolated either, and for that one they explicitly warn about shock potential. <S> So yeah, it's not inconceivable to make something like this... <S> Service personnel beware. <S> Finally given that you say in another (more recent) question here that your EE skills are rusty... <S> THIS (MAINS WATTMETER) IS NOT A PROJECT FOR THE INEXPERIENCED.
Overall best recommendation - Do not use a direct coupled to mains type design.
Multiple diodes in series reverse biased I was thinking about a question that was just up here, someone's interview I think. Anyway I'd never really thought about what happens when you have two diodes in series but reverse biased. simulate this circuit – Schematic created using CircuitLab Why is the voltage drop shared, or 10V across each of them? I mean I understand if it were resistors there'd be a current flow, I suppose here it's the very small reverse bias current flow? I just don't understand what's happening at a low level :) Then having Vdrop be VCC/3 seems like a text book answer, like the real answer should be each diode's characteristics are a little bit different so depending on how much current each one is handling, however small somehow leads to the voltage drop across it. So how does that work in real life? <Q> You'd need to look at the I-V curve for each diode and find an operating point where the total voltage for the three makes up the source voltage (30 V in your example), and the current is equal through each one. <S> If the diodes are identical, then of course that leads to VCC/3 across each diode. <S> But if one diode is slightly warmer or colder than the others, or has more light shining on it, or just came out of the fab with a little bit more or less dopant in its junction, then they won't be truly identical, and you could have substantial variation in the voltages. <S> (if that's what you want). <A> You seem to have the right idea. <S> For diodes arranged in this way, it comes down to reverse bias leakage. <S> Here's a screen shot from a 1N4148 datasheet made by Fairchild: As the voltage source turns on and rises from 0V to 30V in your schematic, the reverse voltage across the diodes will increase the same. <S> So the reverse current will start at zero and start to climb up the curve in the figure above. <S> Just as the reverse current reaches about 15nA through each diode, the reverse voltage drop on each diode will be just about 10V. <S> At that point it'll stabilize and hold there indefinitely. <S> Obviously, the diodes won't be exactly the same, so they will stabilize with different voltages, at whatever value of curent that causes the three voltages to add up to 30V. Also, there are other causes of leakage current in the circuit that is entirely dependent on the circuit's topology, but that's beyond the scope of your question. <A> You state in your question, "I would understand, if the diodes were resistors." <S> Well - they are ! <S> They are variable resistors . <S> Let me explain, by looking at the I-V curve diagram (thanks to Dan Laks), you will see that at 10v, there is a reverse current of 15nA. <S> This corresponds to a resistance of (10v/15nA =) 667 meg-ohms. <S> Assuming that the diodes are "identical", then you have 3 equal resistors across a 30v supply. <S> Therefore, the voltage across each diode is VCC/3. <S> The sum of the three resistors is 2,000 meg-ohms, so the current across the three diodes <S> is(30v/2,000mohms =) <S> 15nA. <S> For the case that the diodes are not identical, then the voltage across each diode will be higher or lower than 10v, but their sum will be 30v.
Putting high-value resistors in parallel with each diode (as in the earlier question) will reduce the effect of the diode variations on the resulting voltage drops and get you closer to achieving equal voltages across the diodes
Designing a Light/Dark Sensor for motors, using Transistor and and LDR I am working on some project for which I need to turn off a motor whenever it's dark. I looked around and found some light/dark sensing circuits. However, most of these circuits use an LED that switches on whenever is light or dark, depending upon application. I was wondering if someone could help me to modify the circuit(resistor values) to replace the LED with a motor, as shown in the figure below. It would be helpful if you can show the respective calculations :) <Q> I need to turn off a motor whenever it's dark <S> Instead it gradually slows down the motor as the light fades and the reverse as the light increases. <S> Ideally you should use a comparator to produce a digital on/off output when the LDR reaches a certain resistance. <S> This can be made programmable by using a potentiometer that sets a threshold voltage for the comparator. <S> After the comparator you'll use something like an N channel MOSFET to activate the motor. <S> Something like this: - The above is designed to switch on and off a motor pump when certain water temperature is reached - see the sensor LM335 - this can be replaced (pot and all) with an LDR. <S> You don't need both channels of sensing <S> so I'd just get rid of one of them and leave the pot intact to set the threshold. <S> This is the link to the page where the circuit diagram lives. <A> You don't want the motor to be gradually turned off and on over some range of light level. <S> That would be bad for the motor, probably no good for whatever the motor is driving, and cause a lot of dissipation in the transistor switching the motor. <S> You need hyestersis , which provides "snap action". <S> It will also make the turn off point a little darker than the turn on point. <S> That keeps the system from jerking around the motor when the light is right at the threshold, which will have some inevitable noise on it. <S> Here is a circuit that should work: <S> In this example, I arbitrarily picked 20 kΩ for the LDR value at the darkness threshold <S> you want the motor to switch on/off. <S> Adjust R2 a bit to move the threshold. <S> Q2 and Q1 just amplify the lightness signal about the Q2 B-E threshold. <S> Each of them inverts <S> , so the output of Q1 will be the same polarity as the lightness signal on the base of Q2. <S> R5 passes a little of this signal from output to input, which is how this circuit has hysteresis. <S> The resulting 0-12 V digital signal is applied to the gate of Q3, which then switches the motor either solidly on or solidly off. <A> R2 is the former LED resitor an you don't need it anymore. <S> The transitor is prety small for such power, so you might add a second one in darlington pair. <S> The rest of the circuit can remain as it was.
The problem with your circuit is that it doesn't switch on or off the motor as a certain level of darkness/light is reached.
9 Pin D Plug Cable Assembly: Fitting more than one thing into a solder bucket I want to terminate a cable in a 9-pin D plug. The design I’m working on needs a resistor and two capacitors at the terminals of the D plug. I can’t work out how to successfully work Pin 7 – I need to join together the resistor, a capacitor and a wire to Pin 2. The thinnest wire I have is 24 gauge, 0.511 mm, and the diameter of the solder pots is 1.5mm. Diagram 1 below shows the plug wiring My plan is to join the wire, R1 and C2 together using a lash splice. This is proving really hard to do in practice. Only one wire can fit into the solder pot; the other two have to be joined 3mm above the tip of the wire going into the solder pot. So - is there a better way to do it? <Q> If this is to be repeated many times, consider making a small PCB that fits between the two rows of cups. <S> Another technique is to solder the lead of a component into the pot, and bent the lead of the next coponent in a small circle (loop) around the wire of the first component. <A> Wrap the free lead of the capacitor around the lead of the resistor, as close to the resistor body as possible, solder them together and trim off the rest of the capacitor <S> lead <S> so you are left with just the lead from the resistor. <S> Solder it to the inside of pin 7. <S> Then reflow solder over both the wire and the pin. <A> The easiest solution is to install a bare wire jumper between pins 2 & 7. <S> Take a piece of bare, solid wire and form into a "U" shape. <S> Make the legs of the "U" the right spacing to slip into pins 2 & 7. <S> Cut the legs of the "U" to about 1/4" (6mm) long or so and slip the wire loop into both pins 2 & 7. <S> Solder <S> the wire loop to the pins. <S> Now hook and solder all of the other wires into the loop that is thus formed. <S> That is: the resistor, capacitor, wire leads all are connected to the wire loop that is connecting pin 2 to pin 7. <S> Use relatively heavy solid wire for the jumper: 18 or 20 AWG will work well.
Then solder a short piece of wire from the inside of pin 2 over to the top of pin 7, crimping it to the resistor lead.
How can I make a small housing for LEDs? I am trying to recreate for a flight simulator game I play (DCS World). I have the software working now, but I am unsure how to build the actual panel itself. I want all the lights to be flush in the panel, as in the picture, rather than typical dome LEDs popping off of a board. A few friends have suggested making a small enclosure around each LED out of hazy plastic and making those sit flush behind the panel but I am unsure how to do this or if it is the best approach. What would be the recommended approach and how do I go about doing it? <Q> One solution is to do this in two pieces. <S> First, you would make a PCB with the LEDs in the desired locations. <S> This PCB would also contain any circuitry required for the product. <S> Second, you would make the actual cover, with translucent areas above the LEDs. <S> This would mount on top of the PCB, usually with a small air gap. <S> Obviously, you would need to use standoffs (or some other method) to keep the two layers positioned appropriately. <S> A common problem is when light from one LED bleeds over into another one of the holes. <S> LED Specs: <S> Different LEDs have different viewing angles. <S> You can select a narrower angle to keep the light where you want it: Light pipes: <S> A light pipe is a piece of clear plastic the acts as a waveguide for visible light. <S> You attach/glue the light pipe into your top panel, with the bottom edge of the pipe directly over your LED. <S> Most of the light is then guided up to the surface of your panel. <S> In this picture, the smaller end is the part that goes through your top panel, and the wider end hovers over your LED: <A> Another technique is to mount your LEDs on your circuit board in the exact location you want them and overlay a reasonably thick piece of ply/mdf wood. <S> Drill the wood for each LED and this will provide a light mask to stop them bleeding into each other. <S> Then you can either use clear epoxy resin to seal each in and fill the hole (you may need to sand the epoxy flush) or put a clear acrylic sheet over the board. <S> The second method will not look as good imho but easier and faster. <A> You can get small clip-on Fresnel lenses for LEDs: <S> http://uk.mouser.com/ProductDetail/VCC/CLB300CTP/?qs=sGAEpiMZZMsUguuR3b6UZrF6qe0eJ0ihsHVRogp8oWM%3d <S> You can also get flat top LEDs: http://lighthouseleds.com/led-component-lighting/clear-top-dip-leds/5mm-led-flat-top.html
This can be solved by a combination of LED specifications and/or light pipes.
No components 3D view in KiCAD I'm just starting to work with KiCAD. One of the video tutorial shows that 3D view should incorporate components placed on the board: However in my case I can see only the board with pads: Looks like I need to tune up my KiCAD installation (I'm using Windows 7, KiCAD version 4.0.0). Could anyone give me any advize for that? EDIT 1 As @Robert Stiffler mentioned I verified if the component 3D view is enabled. As I can treat the follwoing screen - everything should be OK. However the option name is differ from suggested ("Show component 3D shape" VS "Show 3D footprints"). So it is possible that I picked the wrong setting. And the libraries are mostly standard. <Q> I solved this issue doing this: Run Eeschema Open CvPcb to associate components and footprints Open Preferences -> <S> Configure Paths <S> On "KISYS3DMOD" change the path to the correct one. <S> " <S> C:\Program Files\KiCad\share\kicad\modules\packages3d" in my case. <S> Restart the program. <S> Enjoy! <A> For Fedora 29 I had to install a separate package: $ sudo dnf install kicad-packages3d <A> If you're on a Mac, the KISYS3DMOD path variable needs to be changed to: /Library/Application Support/kicad/packages3d . <S> As installed, it had modules/ in between kicad/ and packages3d , but the modules directory doesn't exist in the OS X installation, at least on my version, 2015-10-10 BZR 6258. <S> Note that only footprints having 3D models will appear, as mentioned in another answer. <A> On Ubuntu 14.04 the correct path is: /usr/share/kicad/modules/packages3d <A> This problem seems to be resolved for more recent versions of KiCad. <S> I did however run into the same symptoms but different cause with KiCad 5, which I'm posting here for any wanderers who find this thread looking for the solution. <S> Basically if you have run KiCad 4 on your computer and then installed KiCad 5, the libraries are messed up. <S> A full solution is discussed here . <S> It boils down to going to KiCad - <S> > <S> Preferences -> <S> Manage Footprint Libraries <S> Then deleting all of the KiCad default libraries (which should be GitHub for ver 4) and re adding them from ${KISYSMOD} which varies by OS, but for macOS was /Library/Application Support/kicad/modules/ <A> In the 3D view window, ensure that"Show 3D footprints" is enabled. <S> Most of the standard packages that come in the library have 3D models. <S> If you created your own footprints or components, these won't have 3D models. <A> I had similar problem on Debian 10 buster ( <S> stable).The <S> packages3d <S> folder is not included by default, all I did was to download it from here .Extract and place the content of the download in the directory /usr/share/kicad/modules/packages3d <A> For Debian, you need to install the kicad-packages3d package as it is not installed by default when you install the kicad package. <S> I think this is reasonable because kicad-packages3d is a 300M+ download and after installation, /usr/share/kicad/modules/packages3d/ is 5.1G.
You will also need to make sure that the components you are using have 3D models available.
What about water makes it destroy electronics? From my understanding water shouldn't really damage electronics, but it does.what about water actually causes damage, and why is water with impurities such as salt make it so much worse? <Q> There is nothing inherent about water that will damage electronics. <S> There have even been experiments where electronics have been operating while immersed in pure water. <S> The impurities on the other hand can both conduct electricity and corrode the materials the electronics are made from. <S> The former will cause unintended shorts, and the latter will destroy the electronics directly. <A> You state 'From my understanding water <S> shouldn't really damage electronics' . <S> I think that's just plain wrong, for several reasons. <S> Several things. <S> Water is a conductor, though a poor one (see here ). <S> At 182kΩm (or 5.5 micro-siemens/m see here and convert to SI units), across a short distance (e.g. 1mm) and with long tracks that could lead to a non-negligible conductance, which is enough to affect a circuit's operation. <S> This won't itself permanently damage the electronics (i.e. the circuit drying will fix it) but if the circuit is operated when wet, excess current may flow causing permanent damage, especially with high voltages present. <S> Whilst water is a poor conductor, gunk on the board may dissolve in water, decreasing its resistance further, possibly quite dramatically, increasing the effects in (1). <S> Impurities already in the water may do the same thing. <S> When current flows through water, positive ions will flow in the direction of the current flow. <S> This will cause PCB tracks etc. <S> to be gradually electrolytically dissolved. <S> This may cause permanent damage if operated when wet. <S> This may cause permanent damage if wet (whether or not operated). <S> Water leaking into air-based capacitors is likely to change their capacitance, and the additional parasitic capacitance of water surrounding the tracks is likely to change circuit performance. <S> This will only affect the operation of the circuit when wet, and is unlikely to cause permanent damage unless it causes excess current to flow. <A> Water has a dielectcic constant of about 80 when pure .This would raise parasitic capacitances everywhere which would muck up resonant circuits ,slow down high speed digital waveforms causing malfunction. <S> It could make some equipment go unstable. <A> A small amount (1 in 10^7) of water molecules (in pure water) break into H+ and OH-. <S> These can conduct electricity and hence mess up your circuit. <S> https://en.wikipedia.org/wiki/Self-ionization_of_water <S> Impurities, specifically ions (charged particles) improve conduction (significantly) and hence increase the damage.
Various materials within the electronics may dissolve in or be damaged by the water, for instance paper within paper capacitors, cardboard speaker cones, etc.
How to emulate potentiometer to control electric vehicle? I'm trying to control an electric vehicle, say scooter. Vehicle throttle meant to be controlled with potentiometer like on the picture. And it works just fine with 10K pot. Now I want to control throttle electronically, thus I make some analog voltage with microcontroller and scale it appropriately to match HIREF - LOREF with op amp. I check the THROTTLE voltage with oscilloscope and it is just fine, but motor controller doesn't seem to react. What can be the case? Isn't it voltage controlled? Can I emulate potentiometer with some circuit? <Q> I had the exact same problem, with I think a Curtis 1234 motor controller for a hybrid vehicle project I was on as an undergrad. <S> It turned out, as a safety feature, the controller sent out a current through the pot and compared sourced current to sunk current to check for a broken wiper or other throttle faults, similar to a GFCI breaker. <S> You could enter a programming mode and change it to look for just the voltage, but the programmer was very expensive. <S> In the end I wound up using a digital potentiometer to interface between our computer and the motor controller. <A> I got it working. <S> I found this solution in manual to Curtis 1210, apparently it is applicable to other controllers as well. <A> That should work. <S> Are you sure that LOREF is the same as your microcontroller ground? <S> It may not be. <S> Measure the voltage and continuity between those points before you connect the micro controller <S> There may be self-check circuitry to detect errors like that and disable the motor. <S> Have you measured the THROTTLE voltage when driven from your circuit - is it in the same range as with the real throttle?
Apparently motor controller has some sort of check to ensure that potentiometer is functional, workaround is to attach a resistor of proper resistance between potentiometer LOREF and HIREF.
Continuity Test on Resistor I have a newbie question. I'm learning about electrical engineering and I bought my first multi-meter. It has a feature called "Continuity Test". I believe this test is to make sure conductors such as wires and cables are continuous and not severed or perhaps you want to find the right circuit. My question is the following... When I inspect a resistor with the multi-meter probes I can find voltage and current. But when I test for continuity the meter does not beep!? It's as if the two ends of the resistor were not connected somehow. I'm sure this is a laughable question for veteran electrical engineering people but why is it that a multi-meter would not register continuity through a resistor? What goes on in the continuity test so that it registers positive for continuity? Does a certain amount of voltage, current or perhaps the frequency needs to be equal through the circuit in order for the meter to consider continuous? Thanks in advance for any feedback. <Q> The continuity function is designed to give an audible indication of resistance that is less than some threshold value. <S> To be useful, it will be designed to respond much more quickly than the display so that a tech can quickly 'buzz out' wiring and such like without waiting for the reading to settle or even taking his or her eyes off the test probes. <S> It's specifically designed so that the voltage does not turn diodes on, it won't respond to resistors above a certain value and so on, so that it (usually) responds to just a fairly solid electrical connection. <S> The values will vary somewhat by manufacturer, but here is an excerpt from the Fluke 177 DMM manual : <S> As you can see it has hysteresis and a pulse stretcher that allows brief breaks to be detected. <S> This is done by circuitry that is mostly operating in parallel to the main ADC function. <S> Some crummy cheap meters have a continuity beep that is dependent on waiting for an ADC result, but they are not very useful. <S> Avoid! <A> You're right about what a continuity test is for: determining that two wires are connected. <S> That implies a low resistance between them. <S> So try it: test smaller and smaller resistor values until your meter shows continuity. <S> It's not a particularly useful result, but it will help you understand what your meter is doing. <A> If the resistance is too high, then an open is assumed and no beep. <S> If the resistance is below the preset threshold then it is assumed that a connection exists and a beep is heard. <A> The continuity range usually has a certain resistance threshold in which it considers a wire to be closed. <S> A long copper wire might be about 1 ohm, and you could probably expect that threshold to be about 100 ohms or so; I don't know what the typical value is. <S> If your resistor is of greater resistance than the threshold on your meter, then even though current can flow through it, the meter will not register continuity. <A> The continuity test applies a very small voltage to the circuit and check what current flows through it. <S> If the current is larger than the lower limit (for continuity test of your multimeter), it beeps. <S> For example, you cannot have a beep testing a diode, because it has a voltage drop (about 0.7V). <S> If you measure a resistor with less than 10 ohms, probably you will hear the beep. <S> If you check your multimeter DS it will not be hard to specify the maximum resistance or voltage drop to make it beep.
The continuity tester is meant as a pass/fail test.
How much power for my circuit? I'm an electronics newbie. Please don't hate on my question. I'm wondering if there is a special rule for powering a circuit with many power consumers on it. For example, if I have a circuit with 10 5v motors...in order to power all the motors do I simply need one 50v power source? <Q> What you are describing is one of the fundamental laws of electronics, called series and parallel circuits. <S> There are many references for such topics, however Ibiblio has been hosting Tony Kuphaldt's excellent series, Lessons In Electric Circuits for nearly a decade. <S> The first volume, 1-DC, will explain how this works and why. <S> The short answer is, you could try wiring each motor to each other motor, then power the entire string of them with 50V. <S> This would be wiring them in "series. <S> " <S> In theory this sounds logical, but in reality there are many issues with this method. <S> The motors do not all start at the same time or rate, so one may "see" 3 volts while another "sees" 20 volts (and promptly burns out.) <S> Instead, the better way is to connect each motor's red (+) and black (-) terminals together, otherwise known as parallel, and power all of them from one 5V source. <S> Of course you'll need more "energy" to spin 10 motors all wired together this way, and the chapter about Ohm's Law will make this more clear. <A> Direct answer: <S> no, you do not need a 50V supply. <S> The voltage supply usually is selected according to the highest required voltage of a single component. <S> Lets say you have 1 motor that needs 5V and one LED that needs 2V. <S> You need to select a 5V supply and take care that all other elements that need less will see a lower voltage. <S> This is accomplished by a voltage regulator or voltage divider. <S> So in case of your 10 motors you will still select 5V as maximum voltage. <S> What will multiply is the current capacity of your supply. <S> Say each motors draws 1 Ampere. <S> With 10 Motors your supply needs to provide 10 x 1 Amp = 10 Amps. <A> In the very unlikely circumstance that you intend to connect all the motors in series, so they will run simultaneously, you would theoretically need a 50 volt power supply. <S> However, this is unlikely to work well, as the current required by each motor will depend on the load it is required to move. <S> However, you will more likely want the possibility of running the motors one at a time if needed, or several at once. <S> In that case, you would want a 5 volt power supply with sufficient current capacity to run the number of motors you will want to run simultaneously. <S> For ease of calculation, assume a motor requires 1 Amp for normal operation. <S> Note that a larger (higher current) power supply than needed is no problem - the motors will only draw the current they need. <S> The power supply does not force its maximum current through the load.
If you will only operate one motor at a time, the power supply just needs to supply 1 Amp, but if you might want to run all 10 at once, the supply must be capable of supplying 5 volts at 10 Amps or more.
Operational Amplifier (op amp) with different in I have this circuit: It's a basic op-amp that V_out will be like: $$V_{out} = -V_{in} \frac{R_2}{R_{in}}$$ but I can't find V_{in} and R_{in}. Simulating, I know that, if R1=R2=R3, then V_out = V_1 + V_2, but what happens when R1 is not the same than R2 or R3? Thanks! <Q> Your circuit is an example of a summing amplifier . <S> You might find this resource useful for understanding more about them, and armed with the proper term, Google will be a good friend :) <S> Note that your \$V_{in}\$ will always be 0, unless you've driven the op amp into saturation somehow. <S> Since the non-inverting (+) input is grounded, the inverting input becomes a so-called "virtual ground". <S> So your equation is not correct for this configuration. <S> Your experimental results are in the right direction. <S> I think you'll find that the proportion of \$R_3\$ to \$R_1\$ and \$R_2\$ determines a scaling factor for the output. <A> The Vin in your diagram does not correspond with the Vin in the formula: - <S> Vin (as shown in your diagram) is the virtual earth (or summing point) of the op-amp <S> and it acquires a voltage that is exactly the same as the voltage on the non-inverting input theoretically. <S> In practical op-amps it's still a very small number, maybe a few millivolts different to 0V <S> (0V on the non-inverting input). <S> Regards your formula, this circuit would better apply: - <S> In the above read R\$_F\$ as R2 in the formula. <S> It isn't a summing amp <S> but it's straightforward to convert the formula you have to include an extra input: - <A> 1) In your schematic, eliminate V2 and R1, just for now. <S> Then $$V_{out} = <S> -V_{in} \frac{R_3}{R_2}$$ <S> In other words, V1 is the input, and the resistor connected to it is Rin. <S> 2) <S> Before you try running that, I'd advise changing V3 and V4 to something lower than 10k volts. <S> Like a thousand times less. <S> Try 15. <S> 3) With R3 at 10k, and R2 at 1k, and V1 at 5 volts, your nominal output will be 50 volts. <S> This is not exactly feasible with 15 volt supplies. <S> And more than about 22 volts will kill a 741. <A> Since V1 and V2 are both 5 volts, you can replace them with a single 5 volt supply, and then R1 and R2 will be connected in parallel, so their total resistance will be: $$ Rt =\frac{R1 \times R2}{R1+R2} \text{ ohms} $$ <S> So your drawing, with R1 and R2 reduced to a single resistor, the opamp supplies reduced from plus and minus 10000 volts to plus and minus 10 volts, and Vin located properly <S> , should look something like this: <S> Next, an opamp's job is to do whatever it has to to force both input terminals to be at the same voltage and, in this case, since the + (non-inverting) input is hard-wired to ground, the output will swing to whatever voltage is needed to make the - terminal go to zero volts. <S> That voltage will be: $$ <S> Vout = -Vin \times\frac{R2}{R1} <S> = -5V <S> \times \frac{10k\Omega}{500\Omega} = <S> -100 <S> \text{ volts}$$ <S> The problem is that since the supplies are at plus and minus 10 volts, the opamp's output will go as negative as it can, so it'll rail somewhere short of - 10 volts. <S> The solutions are to either get a high voltage opamp and high voltage supplies, to decrease Vin to the point where Vout is at a reasonable voltage, or to change the ratio of R2 to R1 so that with Vin at 5 volts Vout will be at a reasonable voltage.
So Vin in your diagram is 0V - it has to be 0V in a theoretical op-amp.
Which hardware to measure velocity via string/wire wheel attatchment? This is a broad question but I want advice on what type of hardware I should look for to make a device that could measure the velocity of an object attached via a string/wire to some sort of rotary wheel. The purpose of this is to attach it to a barbell and measure mean-velocity for weightlifting athletes. I'm a software engineer by trade but know nothing about hardware. I'm hoping I can find something that would interface with arduino, as that would ease the learning curve. As with such a broad question, I'm not looking for a solution, rather I would like to be pointed in the right direction. <Q> For example, http://www.firstmarkcontrols.com/ , but there are both cheaper and more expensive versions. <A> You're looking for a rotary encoder. <S> https://en.wikipedia.org/wiki/Rotary_encoder <A> Check out our open source project OpenBarbell. <S> We designed a 3D printed enclosure around a tape measure spring and use a simple optical quadrature encoder setup. <S> You can check it out here. <A> Conceptually it will help to split the problem up into sections: Section 1) <S> What are you trying to measure? <S> "measure the velocity of an object" Section 2) <S> How are you going to measure it? <S> Option 1 - "use a rotary encoder to measure rotations of a wheel to infer velocity/position of object" Option 2 - "use an accelerometer to measure movement of object to infer velocity/position of object" Option 3 - "use weight sensors under the feet of the athlete to measure his change in weight and infer velocity/position of object" <S> Whatever you go for - you need to decide how you are going to use the data from the sensors to estimate/infer what you are trying to measure.. <S> this will almost certainly involve calibration, trial and error. <S> I strongly recommend Adafruit stuff for Arduino compatibility and ease of use. <S> This 10DOF chip comes prebuilt and with the libraries written for you! <S> http://www.adafruit.com/products/1604 <A> How about a slotted pulley, like this but cheaper . <S> Or maybe drill holes through the supporting web. <S> Then shine a LED through the slots, with a photo diode on the other side. <S> Count the pulse frequency <S> and you know the number of revolutions per second... do the math to figure out the speed. <S> You don't get direction information unless you have a more complicated slot arrangement.
You're best "out of the box" solution is probably a yo-yo potentiometer (also called a string pot). You can certainly use an off the shelf encoder, but you'd have to rig up the mechanics on your own.
How to solder something as tiny as this? I have an LED strip that is a little over 1 cm wide with 5 connectors on it, each about 1 mm wide I estimate. The wires on the left are the ones that were originally on this strip. It's supposed to be possible to cut this strip so I'm not doing anything out of spec. My problem is that anytime I solder a wire to one of the copper traces on the strip, and then try the next one, the heat de-solders the existing wire. I sometimes manage 2 or 3, but then I invariably loosen one after which I have to desolder and clean all of them. So far I have tried after the 'usual' technique (putting wire on the spot, apply heat to wire, push tin on wire until it starts to flow): Tinning wire, putting it on trace, apply heat Solder a solder copper piece first (the stranded wire has a tendency to 'fan out' to nearby wires), using all of the fore-mentioned techniques Drill a hole in the trace with a dremel, put tinned wired in there, apply heat to wire a bit away from the trace until tin starts to flow. Very hard to get hole right, plus once the tin starts flowing, it flows to the next trace. I'm running out of ideas. I've tried the above with those tools with the two crocodile clamps to keep everything in place (not sure what they're called), and with magnifying glasses, and it's not just a matter of keeping steady or seeing everything correctly - it just seems that there is too much solder in too small an area (I've tried to keep it minimal, of course). Is this possible with only a soldering iron? Maybe there is a way to fab my own push-on connector so that I don't have to bother with soldering so close together anymore? I'm just a DIY amateur, I wouldn't know what sort of equipment this sort of thing is done with in a real lab (the connections that were pre-soldered look so near and precise). Thanks. <Q> In looking at your picture, I'd say it looks like to me that: <S> Your wires are too long (too much insulation stripped) <S> Your wires don't appear to be adequately tinned <S> You appear to have stripped the wires with a pocket knife or similar <S> (shouldn't impact solderability, but looks bad and may contribute to #1) <S> It doesn't look like you twisted the wires together before you tinned them. <S> this <S> (though that's a lot longer than I would generally ever expose) <S> Once that's done, I coat the neat wire end with a copious amount of flux, then get a gob of solder on the tip of the soldering iron, then lay the gob on the wire until the solder is wicked into the wire. <S> No need to rub the iron on the wire, or press, or do anything else <S> - it'll all get soaked up as soon as the wire gets hot enough. <S> Once that's done, keep adding solder until right at the point you can barely distinguish the original stranding. <S> At this point, the wire's tinned. <S> You shouldn't ever need to push or rub or poke with the iron. <S> Be sure to clean the tip off with a damp sponge immediately before you do any work. <S> If you're looking to get a solder joint like the one below, check out this tutorial on tinning wires and this tutorial on soldering to LED strips . <A> Try some kapton tape, maybe the 1/4" variety. <S> Tape the LED strip as close as possible to the pads, then place the wires on the pads and tape them to your work bench so that they are always in contact with the pads. <S> Should prevent the wires from lifting off the pads when the adjacent pad heats up. <A> Starting from scratch I would feed each wire in from underneath, then bend the wire so that the whole thing will lay flat. <S> Then I'd tape the whole thing down <S> so it stays in place and solder across all the wires. <S> I'd probably use a small tip and tack each one, although you can probably get away with a large one and solder them all in a row. <S> If your wire is too big for this use smaller wire. <S> I'd also think, if you're going to do this a lot, that finding a small connector that's the same pitch as the end of those holes there and soldering it in there <S> first will be a lot less trouble and probably more reliable. <A> Tin the wire. <S> Heat the pads and melt a small amount of solder on to each pad and let it cool. <S> Then place the wire on top of the cool solder and use the soldering iron to melt it all together. <S> Done. <S> I just did exactly this the other day - these LED strips are neat! <A> It appears that the combination of too much solder, too wide soldering iron, and little soldering experience, are preventing you from obtaining the results we see in Chuck's picture. <S> Two of the three problems can be fixed right away. <S> If you tin the wires and the holes, you will need very little, or none, additional solder. <S> Use a pencil soldering iron, like the one in the same picture. <S> After you put the wire in a hole, heat the junction of the wire and hole, until the solder on the wire and hole melt (should take no more than 2 seconds). <S> If you do need to use a little additional solder, use the very thin kind (about 2 mm diam, rosin core). <S> I recommend you first practice this in a PCB with similar spacing, then do the strip. <S> Good luck!
If you tin the pads with a **little* solder, then soldering the two parts together should just involve laying the soldering iron on the wire with the wire on the pad. In general, I squeeze wire strippers on the insulated wire to cut through the insulation, then twist the cut end as I pull it off to get a tidy twisted end, like
PIC MCU: Software or hardware delay? Experimenting with blinking LEDs, I learned about creating delays with either a software loop or a timeout from a timer.I know that for a simple blinking LED program, where the processes aren't that complicated and timing isn't crucial, using either wouldn't matter. But in more of a time-crucial multitasking context what are the benefits and/or disadvantages of both? Thanks heaps, here's how I set them up: Software delay: void softwaredelay(){ int i; for(i=0; i<1000; i++) {/*Timer Stuff*/}} Hardware delay (specific for PIC16 mcu's): void timerdelay(){ OPTION_REGbits.PSA = 0; OPTION_REGbits.PS. = 0b111; OPTION_REGbits.T0CS = 0; INTCONbits.T0IF = 0; TMR0 = 0b11111000; INTCONbits.T0IE = 1; while(INTCONbits.T0IF==0) {/*Timer Stuff*/}} <Q> You need to go to the bank (which is just around the corner) and do your laundry. <S> Going to laundry requires you to wait for the washer to finish, and then wait for the the dryer to finish. <S> How would you go about performing these tasks? <S> On a lazy day, you could just do the laundry and then go to the bank. <S> It's not that important. <S> Who cares. <S> But on a busy day, where you have other things to do, like catching a movie, or studying or whatever task, the efficient thing to do is you load the first part of the laundry, then go to the bank, then load the second part of the laundry. <S> Now you are free to do other things. <S> That is maximizing your time so you can do other tasks. <S> Now for a microcontroller or any embedded system, the same is true. <S> If you don't care about power, time, or anything, then go with a software-driven delay. <S> It's easier to implement, and you can scale it as high as you want with great ease. <S> If you care about power, time, or efficiency, then a hardware timer is the way to go. <S> While you wait you can either go to sleep or perform another task. <S> It's a bit more complicated to setup, and if multiple tasks require delays, you may run out of hardware timers and then have to resort to a more complicated system of managing time and delays. <S> If you care only about ease of use: Software <A> It largely depends on what you want to achieve. <S> If you add more code into the loop the delay will change, potentially unpredictably or inconsistently if you have variable control flow blocks. <S> I suspect that none of this matters much for a simple blinky program, but you asked about time critical applications <A> The "software delay" is a naive solution. <S> You should never use such code in any microcontroller program because there is never a reason to do so: you will always have hardware timers. <S> "Software delays" is unprofessional, since it has the following problems: Blocks the CPU from doing anything useful. <S> Timing is very inaccurate and depends on how the C code gets translated to machine code. <S> Writing reliable "software delays" requires you to disassemble the C code and check CPU ticks per assembler instruction. <S> Quite tedious and has to be done over and over, as soon as the code or compiler options are changed. <S> Interrupts will also make the timing inaccurate. <S> The delay depends on the system clock. <S> If the clock is changed, the delay will change too. <S> The optimizer might remove the whole "software delay" code if it finds out that it does nothing. <S> You might need various clever tricks to prevent this from happening. <S> Keeps CPU current consumption at 100%. <S> If blocking the CPU is not an issue, that is if your program has nothing useful to do while waiting, then you should setup a hardware timer and poll that timer flag as in your second example. <S> For harder real-time requirements, you will have to use timer interrupts. <S> If current consumption is an issue and the MCU supports sleep/wake-up, you can usually configure the MCU to go into sleep mode until the timer has elapsed.
For a software blocking delay like you have set up, you will not be able to service interrupts and maintain a constant interval. If you care about anything other than ease of use: Hardware Timer
Transmitting data from MATLAB to FPGA This is about design of a JPEG compression/decompression scheme on an Altera FPGA. It is possible to have camera or SD card for image input and TV or SD card for image output. However, these interfaces introduce their own complexities. To keep things simple in the early part of the project and to make it easier to thoroughly test the design, it is desired that it be possible to pass data of an image from MATLAB into the FPGA. MATLAB already has a lot of functions to manipulate data, so it is desired to send data to FPGA and read back the result after processing and compare the FPGA result with the result of identical processing done within MATLAB. Basically data shall be read back from the FPGA from different stages of the JPEG compression and decompression processor to check how each part of the design is working. So the question, how do I transmit data from MATLAB to the FPGA and read data back? Is there some tutorial on this somewhere? <Q> I have done something very similar in the past. <S> My aim was to transfer an image (*.bmp) from PC to FPGA (internal BRAM), and send it back to PC after the watermarking process. <S> As previously mentioned, UART is your best bet. <S> Implement a UART in FPGA or use an existing design. <S> For Xilinx, look at this design provided with the Picoblaze. <S> It is well documented and can be used as standalone in your design. <S> You can also find older versions of this design for older Xilinx FPGAs. <S> I think you can find similar designs for Altera (or vendor independent) easily. <S> On the MATLAB, you can read and write data to a serial object using these functions. <S> I have had problems with baud rates above the standard 115200 so if you need real-time performance, UART might not be sufficient. <S> Otherwise start with the lowest baud rate and test it for errors and try to achieve maximum. <S> Though MATLAB will be fast and easy for this application; since it is not free and not everyone might have access to it, another option is to use Python. <S> In my case, I have written a Python script to communicate with the FPGA. <S> It has a nice and simple serial library called pyserial for serial communication. <S> You can use PIL (Python Imaging Library) for image processing and numpy for computation process. <S> However; if you are only interested in testing the design for functionality, you can just read pixel data from a file to process it in simulation. <S> Output image data to a text file using MATLAB <S> and then read it into a memory array defined in your testbench file. <S> You can simulate your design as if its running on the hardware (assuming the design is synthesizable) and test it. <S> You can output processed data to a file at any stage of the process and read it from MATLAB for comparison. <S> After you make sure the design works perfectly, you can start implementing the communication interface on actual hardware. <A> You can crank up the baud rate to near megaHertz speeds. <A> This answer can be considered as a candidate for the Software Recommendations section of SE, but here goes: you could try one of the 3rd-party packages that offer a library of target-specific drag n' drop Simulink blocks to simplify the development. <S> For instance: http://www.mathworks.com/products/connections/product_detail/product_35635.html?s_tid=srchtitle . <S> By inserting your existing Matlab code into Simulink blocks you can then diagrammatically build your communication control scheme around your code, compile and download the code to the FPGA and run it.
The quick, dirty and cheap way is to incorporate a UART in the FPGA and use the built-in matlab serial object to transmit and receive pixel data.
beginning with programming microcontrollers I am a software developer (coming from java and javascript/web-app programming) and I'm very interessted programming microcontrollers like arduino or espruino. The problem is I have little to no knowledge about electronics. When it comes to circuit diagrams etc. I have no idea what it means. What do you recommend to get started with the basic electronics on a project level? I took a look at starterkits like the Fritzing Creator Kit . Would this be a good starting point? Or are there any other good starting point like a Youtube channel, blog, any good website...? <Q> Well that depends on what family of microcontroller you want to work. <S> If you want to go for PIC MCUs, <S> Explorer 16 board are best or you can go for other development boards for PIC. <S> If you want to start with AVR MCUs, then purchase an AVR development board. <S> Arduino <S> Uno is also a good starter kit to start your programming. <S> There are many tutorials available online. <S> If you don't want to purchase any starter kit and want to simulate your design in Proteus Simulator , then this blog <S> can you help you.! <S> You probably need books to understand microcontroller's & their programming. <S> For AVR read <S> this & for PIC go for <S> this and for any other MCU <A> There are many online sources available. <S> edx.org and coursera.org . <S> Below is list of suggested coursers ordered from beginner to advance. <S> Electronic Interfaces: <S> Bridging the Physical and Digital Worlds from University of California at Berkeley Circuits and Electronics from Massachusetts Institute of Technology Embedded Systems - Shape <S> The World from University of Texas at Austin Cyber-Physical Systems from University of California at Berkeley <S> The Hardware/Software Interface from University of Washington <S> The above list is a short list of suggested free online coursers. <S> The cost for following one or two of these courses can be managed under US $100. <S> This should get you started. <S> References: <S> How can I get started with electronic engineering EEVBlog Verilog training <A> I for one am using the books <S> Make: Electronics, Electronics for Dummies, and Electronics all in one for Dummies. <S> I am learning about circuits that way. <S> I am just a beginner hobbyist though <S> so I don't know any better. <S> By the way, I also have the Arduino Uno Starter Kit which comes with a project book <S> and I think it's a good start if you want to start learning about Arduino directly. <S> But like I said, I'm a total beginner, so take my answer with a sack of salt. <A> The 8051 Microcontroller and Embedded Systems Using Assembly and C <S> (English) 2nd Edition by <S> Muhammad Ali Mazidi is very good book to start with. <S> It explains Microcontroller and its application with Assembly and Embedded C in very simplified and detailed manner.. <S> Some other book which I would recommend ... <S> Embedded Systems Design by Arnold S. Berger <S> The Art of Designing Embedded Systems
You definitely need development board/ starter kits to begin microcontroller programming. I suggest you look at the MOOC platforms
Linear Feedback Shift Registers on FPGA's I want to put 256 linear feedback shift registers on a FPGA and each LFSR will have just two tap positions for the XNOR feedback and each register is 63 cells . I don't care if the LFSR'S are not maximal length. The catch is I want the tap positions for all these shift registers to be easily reconfigurable. How difficult/easy is it to do this? <Q> Your problem can be solved "easily" - that is, in a straightforward manner - but it will suck up considerable resources and cut down maximum frequency. <S> What you do is to feed each input to the XNOR gate from a 256:1 multiplexer, with each register stage feeding one input to each of the two muxes. <S> A 256-bit mux will have several levels of gates, so the total propagation through the mux will be relatively slow. <S> Since I don't know your desired clock rate, I can't predict if this will be a problem. <S> Each mux will require an 8-bit control byte, and this can be done in various ways, the most straightforward being a total of 16 parallel inputs. <S> Or you can have 8 inputs feeding 2 8-bit registers with 2 clocks (or a single clock and an enable address). <S> Or you can have a pair of serial inputs feeding 8-bit shift registers. <S> Or, or, or, etc. <S> Depends on your taste in control interfaces. <S> If you really want to get creative you can use an Ethernet/TCPIP link. <S> Or an RS232 interface. <A> If you are using Xilinx FPGAs, the LUTs can be configured as 32-bit shift registers (SRL32), each with one adjustable tap. <S> What I would recommend is using 6 of these 32-bit shift registers as three 63-bit registers in parallel, one fixed at 63 bits and the other two for the variable taps. <S> With a bit of additional logic it should be possible to implement this with fewer registers, though there could be some disruption when changing the tap selection under certain conditions. <S> If you aren't using Xilinx FPGAs, then it might be advisable to look at the programming manuals to figure out what sort of shift register features are supported. <S> It is possible to make variable length shift registers with large MUXes, though this could consume a lot of logic resources. <S> Depending on the architectural features of the FPGAs and your design constraints, one option may make more sense than the others. <S> Another consideration is constraints on how the shift register taps are changed. <S> If you need to change the taps on-the-fly without disturbing the contents of the shift registers, this could limit what architectures you can use and some of the optimizations you might be able to make. <A> I assume that you mean runtime configurable, because compile time configurable would be trivial with generics. <S> For runtime configuration you'll have to use the LUTs as dual port rams. <S> 64-bits of RAM will give you a look up table for 6 of your 256 bits. <S> (Use 6 taps as the address). <S> You would program the look up table to just feed one of the 6 bits through if that one is a a tap that you picked. <S> (Zero if there are no taps in the 6 bits). <S> Then you'll have to combine the results of all of the rams with XOR and invert to get the desired XNOR. <S> The speed will likely be limited by the XOR combining tree of 256/6 lookups.
Dual-port RAMs are another option, especially for longer shift registers or for multiple parallel shift registers with identical taps.
Water level sensors for water pump I have a "pompe a eau" inside a well of 40 meters length, the water pump doesn't stop if there is no more water in the well and that causes damage to it. So I tought of using water level sensors just above the hole from where the water pump drains the water, so that when there is no more water I can turn off the circuit so that the water pump stops working. I have a little knowledge of electronics(but good programming skill, I can program arduino or some other microcontroller without any problem). So I have looked for water level sensors in eBay and I found this . The problem is that the cable lenght is just 400mm, its too short for doing anything with and is this item capable of taking pressure because the "pompe a eau" is going to be 10-20 meters under the water. Maybe this is not the right sensor for the job? <Q> Just buy a pump with integral float switch (that's the red thing): <S> - (source: reuk.co.uk ) <S> I use a similar one to this to pump waste water from my koi pond 10m up a slope to a drain. <S> It works but, if you don't value your time enough to spend (maybe) $100 then my advice is useless. <S> Try searching "submersible water pump with integral float switch". <S> Of course the 10m depth means you have to possibly refine the search parameters. <A> There are lots of solutions. <S> As in the other answer, a float switch, a set of sensor wires, a bubbler system, an ultrasonic level height sensor or some radar sensors. <S> Not enough information to offer a specific answer. <S> https://www.google.com/search?q=borehole+pump+level+sensor&ie=utf-8&oe=utf-8 <A> Another option would be to monitor the current draw of your pump. <S> As soon as it starts to cavitate the current will change significantly and you can easily program an arduino to monitor that. <A> Thanks for your asking. <S> Based on the principle that the measured hydrostatic pressure is proportional to the height of the liquid, an isolated diffused silicon sensitive element or a ceramic capacitive pressure sensitive sensor is used to convert the static pressure into The electrical signal is then converted into a standard electrical signal by temperature compensation and linear correction. <S> It is generally suitable for liquid level measurement of various media in petroleum, metallurgy, electric power, pharmaceutical, water supply and drainage, environmental protection and other systems and industries.
I think Immersion type liquid level sensor is a pressure sensor for measuring the liquid level.
Most Energy Efficient Charger Design? What is the best (i.e. most energy efficient (has the least energy loss)) way to reduce 120 VAC to various DC charging levels for simultaneously smart charging: a 12V deep-cycle/starting battery, an 18V tool battery, 7 3.7V Li-ion cells, & up to 8 AA/AAA nimh cells that all charge independently of each other? Note: I'd prefer to have/make one bench charging station that allows me to simply connect one or more batteries/cells to it, rather than having a power strip & a mess of AC adapters/converters. <Q> Although multi-chemistry charge solutions exist (typical device linked), they each have their own charge sequence requirements and charge power. <S> Some useful links: Charging Lithium Ion , Charging NiMH , Charging Lead-Acid . <S> There are numerous articles available on each type. <S> My point here is to support the other answer that each charge type should have its own port as you can usually only use the charge controller in one chemistry mode for a given design as it is nigh on impossible to detect precisely what you have just attached. <S> Note that multi-cell stacks may need cell balancing for many reasons, including safety. <S> HTH <A> If your application requires that 8 NiMH, or any other chemistry cells be charged separately, then you may have a common charging source, but the circuitry used to charge each cell must be devoted to serving only that cell. <A> You have a bunch of batteries with different chemistries and different voltages. <S> You won't find a smart charger that can do all of them.
The most sensible option is to hide all the messy wiring under the bench, and switch on each of the chargers as you need it.
Why do the high side MOSFETs get hot in this buck converter? Here I am attaching step down buck converter circuit.While testing, mosfets on high side get hot extremely high even for 100W load.Low side has no problem.All mosfets are fixed on very big heat sink.Anyone please help me to overcome this problem. Components used are as per given in circuit.PWM frequency is 50KHz & max duty is 80%.Gate voltage observed is always >10v. <Q> the IR2110 high side driver simply isn't capable of providing enough drive current to drive all of these MOSFETS in parallel. <S> Each mosfet has an input (gate) capacitance of typically 7000pF <S> at turn on with the 10R gate resistance (ignoring the diode) the required input current is initially <S> > <S> 6A - the IR2110 is only rated for 2A - you will be getting a very slow turn on of the MOSFET's, hence lots of heat. <S> Try one IR2110 per MOSFET <A> The short answer to why are the high side FETs heating up (as already given by I Chodera) is switching loss due to insufficient gate drive. <S> But, let's use some Baby Math to give a rough analysis of what that means. <S> Gate Drive: <S> Not only are the high side FETs hot, but the IR2110 should be pretty toasty too, driving all those FETs. <S> Power lost in the gate circuit, and that will be mostly in the IR2110, is: \$P_{\text{Gate}}\$ = \$V_{\text{drv} <S> } f_{\text{pwm}} <S> Q_g\$ = <S> (12V)(50kHz)(6)(150nC) <S> ~ <S> 0.5W <S> Since the thermal resistance of the IR2110 is ~ <S> 100C/W, it will have a temperature rise above ambient of <S> ~50C. Let's say ambient is 50C, so that junction temp is 100C. Who cares? <S> Well, \$R_o\$ (output resistance) of the IR2110 is ~8Ohms at 25C, but it is a MOS device, <S> so resistances at 100C are about 1.5 times those at 25C. With a heat elevated \$R_o\$ of ~12Ohms (plus about 3Ohms of additional gate circuit resistance), the IR2110 will not be driving as hard as you think. <S> Switching Loss: <S> Most of the switching action in a topology like this takes place while the gate drive processes the Miller plateau charge (\$Q_{\text{mp}}\$). <S> Normally the rising and falling times (\$\tau \$) are different, but here they will be equal (and later combined, 2 \$\tau \$) <S> because, Baby Math. <S> So, the FETs switching time is going to be: \$\tau \$ ~ <S> \$\frac{2 R_g Q_{\text{mp}}}{V_{\text{drv}}}\$ = <S> \$\frac{2 <S> \text{(15 Ohms)(6)(75 nC)}}{\text{10V}}\$ ~ <S> 1.4uSec <S> For the loss calculation, peak inductor current will be used as a simplification. <S> \$P_{\text{sw}}\$ <S> = \$I_{\text{pk} } \tau V_{\text{ds}} f_{\text{pwm}}\$ = \$\text{(24V) <S> } \text{(9A) <S> } \text{(1.4uSec)} \text{(50kHz)}\$ <S> ~ <S> 15W <S> From the equations you can see that reducing the loss could be accomplished by: Improving the gate drive. <S> If 100W is all the power to be processed, it makes no sense to have 6 parallel power modulators. <S> One would do. <S> A good reference for loss in Synchronous Bucks is Fairchild AN6005 . <A> Upgrade the drive circuit using a single bjt or cmos totem pole to avoid multiple IR2110 shoot thru error. <S> The gate drive MUST be dimensioned to provide +/-20V at 5A, at 200KHz. <S> Redimension gate resistors within +/-20% to align switching times using a scope. <S> Anything serious can't go wrong, and this is a >5KW power processor. <S> Alternatively, a you can make this a six phase buck converter by using six IR2110, that should be the easiest way since you're using a microcontroller, period.
Use fewer FETs, another way to reduce \$\tau\$. Lowering the switching frequency.
How to measure Clock frequency of PIC? I am using PIC micro controller (PIC16F1846) with an external 8MHz crystal attached to the external clock pins (RA6 and RA7). Why is it that when I use my oscilloscope probe to attempt to measure the clock frequency my basic LED flashing program stops working (light state freezes) and I have to perform a reset? <Q> Try a 10x (not 1x) <S> probe on the OSC2 pin. <S> You should be able to see the clock. <S> The frequency will be slightly changed by the probe loading. <S> I don't think your part number is correct, but most 16F chips are similar. <S> Edit: Scope probe loading is explained in this Tektronix paper. <S> Crystal pullability is explained in this application note. <S> Note that the typical loading from a 10x scope probe would only change the frequency by perhaps 100ppm (0.01%), which is unimportant in many applications other than timekeeping. <A> This is a separate but related topic. <S> Measuring the frequency at the oscillator out pin tells you the oscillator frequency, not necessarily the instruction clock frequency. <S> On old PICs, that was just 1/4 of the oscillator frequency. <S> However, many newer PICs have more complicated clock chains than that, with a PLL and various optional dividers. <S> It is a good idea to make sure the instruction clock is actually what you think it is as early as possible. <S> I usually do this by having my main loop initially just toggle a pin. <S> Set up the bank for the appropriate LAT register first <S> , then BSF, BCF, and BRA back to do it again. <S> That should take 4 instruction cycles. <S> You look at that on a scope and verify the pin frequency is really 1/4 of the instruction clock that you expected. <A> Capacity of the probe could cause failure of the clock generation. <S> 100 Ohms will be fine.
The simpliest way to prevent this is to wire a resistor to the central contact of the probe and perform the measurement placing another leg of the resistor onto your crystal.
How much do max current specs matter on VCC and GND? I know that each of the output pins on most chips have a specification for the maximum power that can be drawn from that pin. However, some chips also have a spec for the max. current through VCC and ground, and these specs are less than the sum of all possible output currents for the chip. So, why do those total current specs exist, and is it okay to exceed them? (I wouldn't want to exceed the current spec. on a pin that actually does something, but for something passive like VCC, it sounds safe enough...) <Q> It is never OK to exceed an 'absolute max' spec on a chip and expect the chip to function normally. <S> That particular spec exists precisely because it is possible to draw very large currents on the Vcc or Gnd pin while staying within the individual spec for all of the other I/O pins. <S> The die inside the microcontroller is sort of a circuit board in its own right. <S> The pins are connected to the die with very thin bond wires. <S> These wires and the traces on the metal layers of the die itself are very small and can only carry so much current. <S> If you try to draw too much current, it will cause the voltage on the die to droop. <S> The direct result of this could be undesired behavior, resets, etc. <S> The resistance of the bondwire and traces that cause the voltage drop will also produce heat that can cause issues, up to and including damaging the bondwire and/or die. <S> If you really need to supply that much current, you should use external power transistors and/or port multipliers to take the load off of the microcontroller I/O pins and internal power distribution network. <A> If the data sheet lists these values in the Absolute Maximums section, it categorically means that if you go outside of the specified ranges the IC is NEVER GUARANTEED to meet its design spec ever again. <S> If its important that your circuit works reliably, you don't do this. <A> The current for a pin is limited by the strength of the driver for that pin. <S> Exceeding these limits may damage that bond wire. <A> The leads, bonding wires, and traces on the IC have a maximum ampacity. <S> If this is violated then the chip could suffer irreversible damage due to debonding or vaporization.
The current for the VCC and VDD pins is limited by the size of the bond wire between the pin and the die inside the chip.
How to solder wires on Li-ion cell phone batteries? I am making a obstacle avoiding robot and wanted to power it with mobile phone batteries.But wondering how to solder wires on battery correctly for no inconvenience. p.s. I am a new arduino enthusiast. <Q> Don't. <S> The battery manufacturers specifically tell you not to do this, as the batteries are quite heat-sensitive. <S> If you manage to set one on fire, you can't extinguish it either: it reacts explosively with water, so you have to bury it in sand or powder. <S> You can then either build a battery holder nicely or use tape or elastic bands to hold it in place. <S> (The manufacturers use electric or ultrasonic spot welding to attach wires to battery terminals internally.) <A> Step two is really thinking hard if you can't stick to step one. <S> Step three would be: Very, very carefully. <S> To expand on step three: <S> Many single-purpose pre-fab lithium cells for such things as phones will have very limited protection, if any at all, against short circuit or internal discharge avalanches and what not, and will generally have 99% battery in them, so the chemistry will be close to the contacts. <S> So over-heating is a serious danger, as that can damage the internal barriers and cause excessive internal leakage, which can quickly cascade into a damaged battery, or one just about ready to explode. <S> For circular, metal-can cells this risk is very low, due to construction, but for flat LiPo cells, with low thermal mass at the pins as well <S> , this is a good possibility. <S> Apart from that a short circuit on the pins while you are soldering is also a very serious risk. <S> The plastic that holds the contacts will be extremely low grade, so if you heat the pins for more than a second or two, they may come loose and presto-sparking. <S> Short circuiting a LiPo cell with no internal protection may also cause outgassing or explosion if you are unlucky, both potentially seriously shortening your life expectancy. <S> The one advantage to this is that most cell phone batteries come with gold plated contacts and solder should fairly easily stick to them. <S> I repeat: <S> Try step one twice and then seriously think hard about step two! <S> But if you MUST : First practice soldering small contacts a couple of times to get competent at it and only then try soldering onto the cell, making sure you never heat the contacts for long stretches. <S> But seriously don't <A> There are Li-ion batteries and battery packs designed specifically to be soldered, which usually look like this: <S> I'd strongly suggest you buy one of these instead of trying to reuse a cell phone battery. <S> Your device will most probably be badly soldered and thus unreliable if you do. <S> There's aslo a danger of shorting or overheating the battery while holding it right in front of your face. <S> Lithium is not that good for the eyes they say :) <S> If you already have the batteries, pogo pins are the way to go. <A> Use conductive glue. <S> Here's an example. <S> A few caveats, taken from the reviews: It isn't tacky.. so either use a clamp, or be prepared to hold the object (for a long time.) <S> It's thin & watery..apply sparingly in layers. <S> ... <S> and even after it's dried to the touch, it won't conduct electricity very well until it's sat for at least a few days to thoroughly dry. <S> It gets brittle.. and will crack away under any kind of stress or tugging.. so be prepared to reinforce whatever you're mending with either tape or an additional application of epoxy. <A> If the battery is replaceable and has gold-tinned pads like this: <S> Then they have protection circuit and the pads are on a small PCB. <S> You can solder to these pads like you would to any PCB (don't use more heat than needed, but it is not particularly sensitive). <S> However, if it has wires or connector directly coming from the battery, like this: Then the battery most likely does not have protection circuit <S> so you probably should avoid using it at all. <S> If you do, you can carefully solder to the wires but never on the battery itself.
The correct solution is to get spring-loaded contacts or "pogo pins", attach them to a PCB or piece of Veroboard, then attach the wiring to that. Step one is trying to avoid wanting to solder to any kind of pre-fab battery, as you don't know 100% for sure what's in them in ways of protection.
Would an electric fence be able to detect being bypassed? In the Flashpoint episode "The Farm," there's a scene where you can see one of the officers run a jumper cable from one contact on an electric fence to another, then cut the line of the fence (not breaking the circuit, mind you). Based on context clues, one could assume the fence surrounds a large, multi-acre plot of land. Another bit of information: the cable they used to keep the circuit complete was longer than the original cable on the circuit, which would mean it would have a higher resistance when the circuit was rebuilt. I have two questions: How feasible is this? And would a (powerful, that is) fence controller be able to detect the change in resistance? Or would it be so small that it's undetectable in the grand scheme of things? From my (limited) electronics/electrical schooling, adding the cable to jump between the contacts would change the resistance, as resistance for parallel circuits is modeled as: $$r_{total} = \frac 1 {\frac 1 {r_{a}} + \frac 1 {r_{b}}}$$ Which means the addition of the extra cable would have an impact on the resistance of the circuit itself (although very minimally). If I recall correctly, another one of the officers was counting down to when the first officer should splice into the circuit. I don't know enough about electric fences to come to any conclusion, but are electric fences constantly charged? Or do they have a delay between pulses? <Q> Theoretically, yes. <S> You can measure the amount of resistance and determine the length of the fence. <S> However, there are some practical limitations to this. <S> Doing this accurately would require quite an investment while the resistance won't be stable. <S> Even the weather would influence it. <S> Compensating for all those fluctuations would require some pretty advanced equipment while an electric fence is essentially a very low-tech device. <S> are electric fences constantly charged? <S> No, they are usually pulsed. <S> This has a couple of advantages, one of them making it easier to generate such a high voltage. <S> They are continuously powered, but the circuit is not designed to sustain the charge. <S> As @PlasmaHH mentions , if you want to measure your fence the proper way, impedance would be more valuable than resistance. <S> I have never seen anyone do this on an electric fence, but you can measure the length of a coax cable by sending a pulse through it. <S> The time it takes to come back and the form of the pulse will tell you a lot about the characteristics of the cable, including the length. <S> However, this wouldn't be foolproof on an electric fence. <A> Neither resistance nor inductance will provide reliable information of bypassing activities, especially not with a mile long fence wire. <S> However, with a sharp peaking signal (already present due to the nature of the electric fence) and analysis of the electrical reflection pattern might provide an usable information to detect bypassing. <S> The term you want to look for is Time Domain Reflectometry. <S> See: https://en.wikipedia.org/wiki/Time-domain_reflectometry <A> I am not going to show this to my family (we meet monthly at the family farm where there are multiple electric fences), because they would laugh at it. <S> Electric fences are designed for maximum reliability when installed by someone with only the barest understanding of electricity. <S> As such they have no components not needed except for an oversize case to protect it from irate cows. <S> These days the wire of choice in nylon carbon fiber mesh which in addition to having impossible to calculate resistance, the impedance and capacitance also are affected by the weather. <S> To build an alarmed electric fence would require not only a entirely new class of "charger" (the box that charges the fence), but different wire, insulators, poles and grounding. <A> Assuming the wire's total length of 4,000 ft, at a height of 6 ft. <S> To bypass it, one would need to add only about 10 ft (5 ft down, 5 ft up). <S> With a resistance of 1 ohm per 10 ft, the initial total resistance would be 400 ohms. <S> Adding 10 feet would only add 1 ohm (resistance in series, not parallel), making a total of 401 ohms. <S> This is a change of only 0.25%. <S> Also, there is an additional complication. <S> You can not take measurements of the line while the high voltage pulse is active. <S> This means that to get its resistance (impedance), you have to sample <S> the line in between the high voltage pulses.
Even if we ignore all the mentioned variables and assume an ideal fence, the change in resistance would be very small. Further the traditional wire of choice has been iron which has high resistance, and rusts which increases resistance in unpredictable ways. The only way a detection could be feasible is looking for changes in signal reflection.
How accurate is a photoresistor? I'm doing a school project in which I need to measure the amount of light emitted by a specific object. The first thing that came to my mind was to use a photo resistor hooked up to a voltage meter in resistance mode. After some research on the internet, it seems like photo resistors are not extremely accurate. My question is exactly how accurate a photo resistor is against itself. I will be using the same one throughout the whole experiment, and would like to detect small changes with different light sources. <Q> Cadmium Sulphide (CDS) photo resistors were commonly used in film cameras for determining exposure, usually wired in Wheatstone Bridge configuration. <S> These light meters were quite sensitive and repeatable. <S> Here's an example circuit:- Since you only want to determine which light source is brightest, absolute accuracy is not important. <S> With a Wheatstone bridge circuit you can adjust the potentiometer to get a null reading (equal voltages on each side) with one light source, then switch to another source and note whether the reading swings positive or negative. <S> At low light levels the response will be slow, so you may have to wait a few seconds for the reading to stabilize. <S> The biggest problem you may have is different spectral outputs of your light sources combined with the response of your sensor. <S> Incandescent light bulbs emit a broad spectrum that is skewed towards Infrared, while LEDs and Fluorescents have sharp peaks at certain colors. <S> CDS sensors are most sensitive to green light. <S> If you want to compare perceived brightness then you also have to consider the human eye's spectral response. <S> CDS is a good match. <S> Other sensor types can be quite different, leading to unexpected results. <A> You should find out which kind of photo resistor you are using and consult the data sheet for the part. <S> There, you should find some information on how accurate this device is. <S> I'm not sure if there's a general rule on the accuracy. <S> Just read the data sheet :-) <A> A photo resistor is highly inaccurate and without optics will pick up ambient light, too. <S> What you want to do is using a chopper that can shade the sensor for a zero-reading/adjustment. <S> When you have 2 readings and can subtract the object reading with the zero reading. <S> The chopper can be a simple magnetic relay that moves a piece of black cardboard mounted on it's anchor. <S> Additionally place the sensor in a small tube (colored black) to avoid getting too much ambient light on it. <A> Forget the photo resistor, Your best bet will be a photodiode(PD).With a ~$5-10 PD and a DMM that has a 200uA current range,you can make a decent power meter. <S> The best thing, is that the measurement is full of physics. <S> Over most of the visible range a PD has a response that is close to 100% quantum efficiency(QE). <S> (The exact response varies, but 70% to 90% QE is not uncommon.) <S> 100% QE means that each photon that strikes the PD makes one electron-hole pair, measure the current, convert to electrons per second, (apply QE factor), and you've measured the number of photons per second. <S> You can express this in watts/cm^2, if you know the wavelength, or just leave it at photons per second. <S> (Trying to convert it to lumens is a pita.) <S> If you need more sensitivity, comeback <S> and we can talk about opamp circuits. <S> Oh if the photodiode is too much $, You can use a cheap solar cell, but you'll have to guess at the QE. <S> (And maybe measure the area.)
A photo resistor's value can change with temperature and aging, but this shouldn't be a problem so long as you do all comparative tests at the same time and don't let the light source heat up the sensor.
Is there a way to step up voltage without consuming power when there's no load? Is it possible to take a lower DC voltage, such as the 1.5v from a AA battery, and step it up to a higher DC voltage, such as 5v, which keeps that 5v potential even when there is no load, and which doesn't consume any power when there's no load? In other words, is there a thing (a board, a component, etc) which can take a AA battery and output 5v without the battery running down when the 5v-needing board is off or in low power mode? <Q> Any circuit that you put across the battery will draw some power, but with no load it can be very low. <S> The problem comes when a load is applied and it needs to hold the voltage up. <S> The more power it has to provide under load, the higher the quiescent current may have to be for it to work properly. <S> The 'thing' you are talking about is called a Voltage Booster or DC/DC Step Up Converter. <S> The two most common ways to step up a DC voltage are:- <S> Switched Capacitor <S> A capacitor is connected in parallel with the battery to charge it, then reconnected in series to double the output voltage. <S> With no load the capacitor will stay charged for a long time, but under load it will start to discharge and so must be topped up periodically. <S> The switching circuitry will draw a bit of current even when there is no load. <S> This quiescent current can be reduced by lowering the switching frequency, but then the output voltage will drop more as loading increases. <S> Inductive booster <S> An inductor (coil of wire) is switched across the battery, causing an increasing current flow and building up a magnetic field in it. <S> Then the switch is opened, and as the inductor's magnetic field collapses it tries to maintain the current flow - increasing voltage until it does. <S> A diode steers this voltage to the output, where it charges up a capacitor. <S> An inductive booster must draw some current from the battery even with no load. <S> However it may be able work in 'discontinuous' mode where it draws a short burst of current to charge the output capacitor, then waits for the voltage to drop a little. <S> If capacitor leakage is negligible then the duty cycle (ratio of switch on to off time) can be very low, resulting in very little average current draw from the battery. <S> Quiescent current draw will then be determined by how much power the circuit needs to work in this mode. <A> I think you want an ultra low quiecent current boost converter. <S> Here is one from TI... <S> http://www.ti.com/product/tps61200 <S> It can take an input voltage as low as 0.7 volts and boost it to a selectable output voltage between 1.8 and 5.5 volts. <S> It only draw 55 micro amps (millionths of an amp) when there is no load on the output but can supply up to 600mA @5 volts when there is a load. <S> There are other chips like this that have even lower quiecent current draw ( <S> some lower than the internal discharge rate of a battery) but the typically have lower maximum current limits, so picking the right on depends on your application. <A> I guess depending on the kinds of load you want to put on it and how stable the voltage needs to be, you can use a charge pump to triple the voltage to 4.5 VDC, you may even try quadrupling the voltage to 6VDC, but you would be really pushing the limits. <S> This all of course depends on what you are using the potential for.
I think you're best bet if you go this route would be to use 2 batteries and use the charge pump to double that voltage.
Why is it dangerous use a coiled extension cord What aspect using a coiled extension cord makes it more dangerous than using an unrolled power cord. Many fire safety websites reference that an extension cord should not be used while coiled. Is this due to the cord acting as an air core inductor (I can't really see why this should cause fires). If this is the case, if every second loop is in the opposite direction is it safe. My theory is that if the cord is getting heated from high current draw, when coiled all of this heat is in a much more condensed location, causing a greater temperature rise than if the cable was unrolled. Is it dangerous, if so what is the cause. Am I missing anything, do parameters like loop size, loop direction etc make any appreciable difference. <Q> The normal cable ratings assume that the wire can adequately disperse heat generated in the cable due to the current flowing. <S> If you coil it up and use close to the maximum rating then it stands a good chance of melting the plastic insulation and then causing a short. <A> Current flowing in a cable generates heat. <S> This causes the temperature of the conductors to rise until the heat lost balances the heat generated. <S> When you pack lots of cables that are all carrying current (whether multiple seperate cables or multiple loops of the same cable) <S> together heat dissipation suffers resulting in a higher temperature at a given current. <S> Reels are particulally bad because they tightly pack together a large number of passes of the cable. <S> Excess cable in a loose jumble on the ground is far less likely to overheat than excess cable wound tightly on a reel. <S> You get away with it most of the time because most of the loads people plug into extension leads are small and/or intermittent. <S> From time to time though the right combination of circumstances come together and melts one. <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> An inductive coil. <S> Figure 2. <S> Cancellation. <S> Unless you wired your equipment with single wires it would not be possible to create an air-cored inductor as shown in Figure 1. <S> Because your cables contain the feed and return current in very close proximity the inductance caused by the current to the load is exactly cancelled out by the current returning from the load. <S> The danger is that if they are carrying significant current (for the gauge of wire) they will get warm or hot. <S> This may cause insulation breakdown or even fire. <A> Here's another illustration. <S> Used to charge an EV at 'only' 10A... MW <A> Last week (1st week in Jan 2017) we almost had a fire from a coiled extension cable. <S> It was connected to an electric urn that does draw high power, and the only reason it did NOT start a fire was the circuit breaker tripped in time. <S> I have kept a segment of the cable in question were it melted several loops together before the wires touched inside the mess. <A> It's all about the cooling All the failures you see above are the wires overheating. <S> You have many wires in close proximity, all getting warm. <S> This dense "clump" of wires simply cannot dissipate the heat, and they have a "meltdown". <S> The National Electrical Code talks about this, in the various parts of NEC 310.15. <S> Here is the "Cables bunched together" (coiled=raceway) <S> derate table. <S> You see these burned up coils with 20+ loops of cable... <S> that's 40 <S> + conductors bundled on the reel, which calls for derating cable capacity to 35%. <S> Now, many cables can't run at 90C, so you have to derate from the temperature they are good for. <S> Say your extension cord is good for <S> 60 degrees C, NEC 310.15(B)16 doesn't have a figure for that, but we can extrapolate and get 11A . <S> Derate that to 35%, and we have 3.85 amps . <S> That's all you should be putting through it when it's coiled up on the reel like that! <S> Of course, people are pulling 10-12 amps, that's why it burnt up. <S> But if you're pulling 1-2 amps through that coiled up cord <S> , that's no problem as you can see. <S> Are those derates a burden for house wiring? <S> No. <S> Most house wiring derates off the high 90C number that you're not allowed to use anyway on small branch circuits (NEC 240.4). <S> So derating down to 70% doesn't really pinch. <S> That lets you have 9 active conductors or 4 circuits in a cableway. <A> The inductance thing doesn't seem very relevant in this case, it should add impedance not reduce it, it seems to be more of a dissipation issue, the surface area is greatly reduced and so is the dissipation capacity, on the other hand for the cord to catch fire due to overheating <S> it has to be used pretty close or beyond it's rating, it's not like plugging a 10w light bulb on a coiled extension will cause any issue
If the temperature gets too high the insulation on the cable softens and eventually melts.
Multiple switches, same function. Can they be wired in parallel to a single I/O pin? I'm working on a Raspberry Pi project that requires 30 separate momentary switches to be hooked up to trigger the same function within the software. It's for an art project. I don't need to distinguish between different buttons - I just need to register any button press - ideally on a single I/O pin for simplicity's sake, if possible. My first thought is to simply wire up all the buttons in parallel, connected to a single I/O using the internal pull-up resistor. I know that in theory this should form a logical OR gate, which is what I want. My question is: might multiple button presses cause unexpected behavior or potentially cause electrical damage to the Raspberry Pi? Or will this work as expected? If the former is true, what's the best way to achieve this? <Q> No problem at all! <S> You can put as many switches as you'd like in this configuration. <S> I've also added a series resistor to protect the RPi GPIO pin as suggested in the comments. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Given this: - Wetting current is the minimum amount of electric current necessary to keep a mechanical switch contact in good health. <S> If a mechanical switch contact is operated with too little current, the contacts will tend to accumulate excessive resistance and may fail prematurely. <S> ... <S> and assuming you are providing enough wetting current for the switch(es) you'll be OK but please do ensure that earth loops are not created with other equipment if the switches are located remotely. <S> Wetting current <A> The other side of each button should all be connected to the same potential, so there won't be any issue assuming they are simple pushbuttons (i.e. minimal inductance, no voltage or current generation capability, etc.).
If a remote connection is possible, you can wire-or all the switches together and feed the signal through an opto-isolator to the RaPi.
How do electronic devices keep track of time without power? There's laptops, PCs, microcontrollers and a lot of other things that can be plugged out and plugged in without a battery. But how does the system clock still keep track of time without anything to power it? <Q> They use a small backup battery, which you can read about on Wikipedia : Modern personal computer motherboards have a backup battery to run the real-time clock circuit and retain configuration memory while the system is turned off. <S> In computers this is usually called the "BIOS battery" and is generally a lithium cell such as a CR2032. <S> In the photo below it is circled in red: <S> This is the same for portable devices which have their own battery, for example a laptop. <S> You can prove this by removing the internal battery and seeing if it keeps the time. <S> So to answer your question they don't really keep time without power, they have a battery for it. <A> This is a typical solution for most mobile phones which are almost constantly powered and only need the back-up power when the user removes the battery. <A> While the other answers are definitely true: electronic devices cannot keep track of time without a power source, there are other considerations that can give the illusion of keeping track of time: <S> connected devices ask for a time synchronisation as soon as they connect: computer usually gets it from the internet using NTP (network time protocol), GSM devices can also get it from their local cell tower. <S> there are multiple services broadcasting time over the air waves: GPS is just a worldwide broadcasting system of an incredibly precise time. <S> there are AM radio stations whose sole purpose is to broadcast their current time finally some smaller systems (microcontroller and embedded systems) <S> do not really need an accurate time, just guarantee that time always flows in the same direction. <S> They would save their timestamp every now and then in a permanent memory area and restart from their last known time on next start. <S> NTP is defined by RFC 5905 <S> Single transmitter radio clock <A> Without a power source an electronic device can't keep track of time. <S> Batteries are power sources so they can't be thought of as being able to keep time without power. <S> There is another strategy that doesn't keep track of time. <S> When you 'sync' your device with the computer time on the device is synchronized. <A> Besides the "big flat battery on a computer motherboard", there is another device other answers don't mention: <S> the RTC (real time clock). <S> Some microcontrollers do have such a feature, by having an internal battery inside the chip, which can keep the time for decades without external power.
Modern equipment often uses ultra-capacitors to keep real-time clock powered when the system is off:
Inverting Op Amp: Why does current flowing into output seem to magically reappear at ground? I'm trying to understand the flow of current through the inverting op-amp circuit. I've created a simulation: The thing that is baffling me is: How come the values of PR1 (op-amp output) and PR2 (ground) are the same? How can the current flow INTO the op-amp output, and then OUT of ground??? Are they somehow connected internally? Edit 1 :I added the resistor between output and ground. Edit 2 :Added the current probes for power supply. Now I'm even more confused... <Q> Via R3 directly, and via R2, R1 and V1. <S> So if the output sinks current I, that current must come from ground. <S> Simple as that... <S> The more interesting question, is what happens to it inside the opamp. <S> From the opamp output there is no direct connection, internally, to ground. <S> Instead, there are connections via both the V+ and V- terminals and your external voltage sources V2,V3 to ground. <S> So inside the opamp, the output current ought to appear as an imbalance between the currents supplied by V2 and V3, and that imbalance should return the missing current to ground, closing the loop. <S> One clue is the supply currents themselves which are identical, enormous (for a 741) and look like worst-case ratings. <S> A more realistic value for these would be 3-5mA <S> (+ the output current on V3 in this case), up to a maximum of 24mA, at which point the opamp would fail to deliver all the required current (say, 20mA) at the output. <S> So it looks as if your opamp model is too simplistic to reflect this behaviour, which you would undoubtedly observe in a real circuit. <S> Is that Robert Pease <S> I hear cackling in the background ? <A> I'm pretty sure the Boyle macromodel for 741 is causing this. <S> In Op Amp Applications Handbook (ed. <S> Walt Jung) <S> p. 742 <S> the MPZ model (well AD's flavor thereof) has this praise output load current is correctly reflected in the supply currents. <S> This feature is a significant improvement over the Boyle macromodel [...] <S> And here's the [741] Boyle schematic from Some Practical Aspects of SPICE Modeling for Analog Circuit by E. Kennedy (published in Analog Circuit Design, Art, Science, and Personalities Edited by Jim Williams). <S> The article has a longer description, but it's pretty obvious just from the schematic that the output current is generated relative to the ground not to the rails. <S> The paper says "most of the open-loop gain is obtained with the VCIS dependent-generator G b ", which you can see is connecting the output to ground (via R01). <S> There's another obvious DC path from output to ground via (R01, R02); in fact that's how the opamp output impedance is simulated. <S> Finally the two voltage sources near the output (Vp and Vn) are not simulating a push-pull stage (as claimed in another answer here). <S> They just limit the output voltage so that it saturates to some value[s] chosen to be less than the rails. <S> This is explicitly said in the paper on page 305 and even repeated on page 309. <S> Also, Vp an Vn are not controlled, but fixed sources. <A> The current flowing from the ground node only has two paths- along R1 and R2, or through R3. <S> Once these meet at PR1, the only other way they can go is the op-amp output. <S> So the current at ground has to be equal to the current at the output. <S> Mathematically, you could demonstrate this with Kirchoff's current law, which states that the currents into a node must sum to zero.
Trace both current paths from output, and you find they both end up at ground.
How do I get VCC and GND pins on a PCB using an Eagle schematic? I've just started learning EAGLE and I've been trying to make a PCB to mount some LEDs on. I read through a few online tutorials, and I believe I have (correctly?) made the schematic in EAGLE. But when I error check, it gives me 2 warnings. There is only one pin on net VCC. One is where the VCC connects to the net and the other where the same net connects to the resistor. I can't seem to find any information on what the issue is or how to fix it. When I switch to the board layout, I only have the resistor and the two LEDs. How am I supposed to get the VCC and GND pins on the board? Are they even supposed to be there? All the tutorials I've found online include some part with included voltage and ground pins so the entire package shows up on the schematic. <Q> If you want VCC and ground pins, you need to add components for those. <S> The VCC and GND symbols you have are ports. <S> This tutorial shows an example of a DC jack component that provides an off-board connection for VCC and GND: <A> The Vcc and Gnd symbols just assign names to those nets - they don't represent any real component. <S> If you need something to connect an external power supply to, you need to place a connector, with its pins connected to the Vcc and Gnd nets. <A> You need to put some kind of connector, or at least a solder point, for these kinds of things. <S> One package that is relatively easy to use for such things is the PINHEAD library of 0.1" connectors <S> This is the device PINHD-1X5 from the pinhead library. <S> I used named nets and labels to connect things to it. <A> Another option is to use the component called SOLPAD.As the name suggests, it creates a solder pad in the board. <S> You can find it in the library with the same name, and there's various pad sizes you can choose. <A> You can name the connecting wires in your diagram to VCC and the autorouter will attempt to connect them all together. <S> I also use the plane technique, I draw a polygon on the lower layer of the board and then name it GND, I draw another on top and name it VCC. <S> You have to create through-hole connectors for SMD devices but <S> just by running ratsnest function, it connects VCC and GND for through hole devices. <S> This, of course, implies double-sided boards and has the advantage of creating a capacitor between VCC & GND planes, it's also known to reduce RF emissions from boards.
For single wire connections, I make a suitable schematic symbol with one pin, and use a single pad as the PCB footprint. Any pins connected to VCC are considered connected to each other, and the same goes for GND.
Isolating or suppressing possible servo noise from signal lines I will be building a circuit to control a robot arm which is not a small toy kit. There will be motion sensors, feedback systems, robot arm controlling modules. So digital signals will be flying all around. The data communication will be over I2C. The robot arm has 6 servo motors, 2 x Servo 5521MG (Running Current 750 mA - 1.2 A @ 6V), 4 x Servo MG996R (Running Current 500 mA - 900mA @ 6V) and their potential noise concerns me. I am planning to use separate power sources but ground has to be common to pass the servo control signal. I found some ideas such as using ferrite on servo cables, opto isolator, which one would be best option? Which pcb design practices I should follow to prevent noise influence over signal lines? <Q> When heading pcb design it is always good to know the interferences. <S> If the sensors are sensitive then first make two different ground (analog and power ground) and route the pcb. <S> Then connect the two grounds at one place with a ground tie (pcb object with which you can connect two nets); e.g. the power connector. <S> So there will be almost no offset failure because of the high current. <S> You could use optocoupler, it's the philosophy of having the gnd level as wobbly as possible so if one is higher than the other then there would be no interference. <S> I am not a fan of this philosophy, it's only good when you have a connector in an industrial field with norms and discharge tests. <S> When you are afraid of incoming peaks <S> but you don't want to sell your product and don't have to do these tests, maybe use a rc lowpass first, <S> this is more cheap and needs less space. <S> You can start with a zero ohm resistor and if you measure to high peaks adding caps and rise r's. <S> For high frequeny noise some caps all over the board <S> are always a good idea. <S> Some small caps (~100nF) for decoupling and bigger caps (~47uF) for stabilizing the power outputs during fast changes. <A> This is a damn serious question. <S> First, screen all cables. <S> Screening is one single net surrounding all system. <S> Use star connection for gnd. <S> Meaning you either connect all gnd on your power supply (and screening), or each board's gnd to the screening- incase they have completely sepadate power supplies. <S> Carefully check all current return paths. <S> Use optical or othe isolation between digital an power parts of the system. <S> Use common mode filter on power input. <S> And remember, tbere is always something you forgot, so be ready to blood, sweat and tears. <A> You could probably get away with just throwing some decoupling caps on ground. <S> Before you start considering some kind of isolation strategy you should set up some kind of test circuit and check for noise with an oscilloscope. <S> Function generators work great for testing servos if you have a few of those available to you.
Spacial distance also help, when theres a gap or even a gnd route (route between nets is rarely used, mostly on clock signals f>1MHz) between power and analog the interference is even smaller. I think in your case a good ground layer on the pcb is important.
Can you provide a short circuit protection circuit to use with a regulator? I recently shorted my AMS1117 voltage regulator while probing on a DSO. It blew off. I am wondering, is there a short circuit protection circuit which I can use with any configuration voltage regulator. <Q> A single component in the high or low end of a circuit. <A> There are load switches that monitor the current flow. <S> If the current exceeds a maximum for example due to a short the current get limited. <S> If this situation persists, the load monitor will shut down and preventing any further harm. <S> One example of such a chip is the FPF2123 from Fairchild which I like a lot. <S> On the other hand the AMS1117 that you've used has internal short circuit protection, so even if you short the output the AMS1117 should be fine. <A> There are various ways to protect a power supply from over-current. <S> Simple ones are a single-use fuse or a "polyfuse". <S> There are also various resettable circuit breakers. <S> A more complicated way is to have a electronic circuit watch the voltage across a small current sense resistor, and switch off a series FET when it gets too high. <S> That is often called a "electronic fuse". <S> However, it seems you are overreacting. <S> You screwed up and blew up a part. <S> It happens. <S> Get over it. <S> You have to ask yourself how likely this kind of failure is in the field and what the consequences are. <S> If it is unlikely and the consequences not severe (device may stop working, but nobody is going to get shocked, won't catch fire, not running critical systems, etc), then probably the best thing to do is nothing. <S> All the methods to deal with this failure cost money, board space, possibly power, and may also degrade performance. <S> Adding protection isn't free, so you always have to look at both sides of the issue and make a tradeoff. <S> There is no place for knee-jerking in engineering. <A> Those parts, even from amazon, are about $0.20 each. <S> It is likely that any protection on-board mechanism able to pass enough current to let the AMS1117 operate close to its typical rating, and fast enough to protect from a dead short will be many times more expensive. <S> I have worked with people who have blown voltage regulators protected by polyfuses. <S> A polyfuse is better than nothing, but they can be 'beaten'. <S> IMHO <S> The issue is the way the circuit was probed, and not the protection circuit. <S> If you are intending to do lots of electronics, you'll come across lots of systems which have no protection, so it may be worth adopting a couple of different tactics. <S> An alternative, effective, but much more expensive solution is to use a proper Bench Power Supply Unit (PSU) which has a user-controlled current limit. <S> Then you can power your circuit and the PSU will restrict the current to a level set by you. <S> A PSU is often used in colleges to teach electronic engineering, and it works (providing the student sets the current limit) to reduce the amount of 'electronic carnage' created in the labs. <S> Ultimately, the long term solution may be to learn a safer methodology to probing a circuit to minimise the likelihood of damaging the circuit under test. <S> If you are panning a long term career in electronics, that may be a valuable skill. <A> If you have sufficient voltage margin you could put an LM317 in constant-current mode on top of (= before) your regulator. <S> But as Olin remarked: nothing is free, you'd have to ask yourself whether this is worth the trouble.
A fuse and or a resettable PPTC (Poly Fuse) are the two simplest ways to provide short circuit protection.
Are plastic enclosures safe for hobby mains voltage projects? This may seem an obvious /silly question, but bear with me because I want you to consider it from a pragmatic view point. I have a fledgling project that will be mains powered and fit in a space roughly 200mm in any dimension. Initially you'd think that a plastic box would be suitable. But consider: There will be penetrations in the form of a switch and some sort of optical indicator, both perhaps with metal bezels /lever. And there will be a mains transformer, with a bolted attachment through the case. What initially seemed a simple example of a Double Insulated box, now has metallic (conductive) penetrations though it, compromising the insulation integrity. Commercial Double Insulated kit is quite complicated, with blind self tapping screws, multiple insulation layers, e.t.c that all seem a little out of reach for the typical electronics enthusiast. It seems to me that it's safer to treat the whole thing like a washing machine, and put it in a metal box with a good earth ... P.S. Should I look for Aluminum or plastic enclosure for UPS touches upon these issues, but does not seem to address common enclosure penetrations. <Q> For a plastic enclosure, you want to treat any metal stuff coming out the same way the DC output of a doubly insulated supply (e.g. wall wart) is, meaning it has to come from the side of board that's separate (to standards) from the mains. <S> Separate to standards means clearance, creapage etc. <S> You can look at some teardowns to see what's involved; here's one to medical standards: <S> https://www.youtube.com/watch?v=_EMAggN5H-w <S> Honestly, I'm not sure why you want a switch and some sort of optical indicator perhaps with metal <S> bezels /lever <S> (emphasis mine) <S> There are plastic alternatives for these, and even with insulation rated for mains [and above]. <S> As for there will be a mains transformer, with a bolted attachment through the case <S> This might be tougher to find alternatives for in DYI projects, but I've seen 50VA (mains) <S> transformers held in place by nothing but plastic tabs, but this in specially/factory designed plastic cases where those tabs have the necessary thickness etc. <S> and are part of the case body. <S> So, how heavy/big is your transformer? <S> If you can sacrifice screw thickness (or overbore the holes) without sacrificing mechanical endurance, you could use a solution similar to mounting TO-220 isolated on heatskins, i.e. insulating "shoulder" bushings also know as" nippels " in some parts of the world. <S> Full-bodied nylon screws also exist, but you'll probably want to read the manufacturer's data carefully to make sure they are strong enough. <A> The answer is mostly common sense. <S> Anything that is connected to the AC Mains needs to have the equivalent of double insulation. <S> Use nylon or some other non-conducting hardware to mount the power transformer. <S> If there is a power switch on the AC Mains, use an all-plastic switch such as a rocker switch. <S> You could use a metal enclosure but not only is metal much more difficult to machine, you now also require a grounded power cord. <S> I build projects in both metal and plastic enclosures. <S> Metal when I need mechanical strength or EMI shielding, plastic when those attributes aren't needed. <S> One of my favorite plastic enclosures are intended for home electrical purposes. <S> Thick, heavy-wall plastic that is really easy to machine both by hand and our little CNC machine. <A> As well as electrical considerations, you may wish to consider fire safety. <S> One standard is UL94 , with the V-0 classification a common one. <S> I'm pretty sure many of the cheap plastic project boxes that might be suitable for battery powered gadgets will not pass. <S> Plain old polystrene molds more easily and costs less than a material with a pedigree.
Plastic that does not support combustion has fire retardant additives, some of which may or may not be prohibited (especially in the EU).
Programming a microcontroller with another microcontroller I'm looking into using a PIC24FJ256GB106 to program three other of the same microcontroller. So this is how it should work: The program is sent across through serial to the master/programming PIC That PIC receives it and uses ICSP to program the other PICs through the five ICSP lines (I/Os) Before you say it , no, bootloaders are not an option. Essentially, I'm looking for a program to make a microcontoller act like a PICkit /ICSP programmer. How would one find the code to make this magic happen? <Q> There are several open source PIC programmers that will program the PIC24FJ256GB106. <S> The gotcha is all of these are based on a PIC18, none seem to use a PIC24 to do the programming. <S> Of course since the schematics and firmware are provided, if you are set on using the same PIC24 to do the programming, you could convert one of these boards (and the firmware) over to that chip. <S> Here are three: <S> Olin Lathrop's LProg , which you can buy from Microchip DIRECT for $20. <S> Here is the schematic and here is a link to the firmware . <S> This is the one I recommend. <S> DIY PIC Programmer . <S> You can buy it for €20 here . <S> Firmware available here . <S> usbpicprog . <S> Looks like you have to make your own board for this one. <S> Schematic available here , firmware here . <A> I doubt you will find exactly what you want, because the place where you'd most likely find such functionality is in programmers, which are generally meant to program a wide variety of chips, and the functionality is split between the programmer itself and the matching PC application. <S> But you could still check for instance the pickit2 source code (it is available on the Microchip website) for inspiration. <S> But because you are restricing yourself to just one target chip, rolling it all yourself is not that difficult. <S> Check the programming manual for your chip, it has all the details. <A> There's nothing magic or out of the ordinary in what you're asking. <S> Just about every programmer for PICs out there is a PIC that programs other PICs. <S> You would concentrate on the business end -- not the USB or serial comm with a host.
I would just find one of the myriad of open-source/hardware PIC programmers that are out there, and adapt it to your needs.
Problem powering ESP8266 with two 1.5V AA cells I was testing the deep sleep mode featured in the ESP8266. I have a simple USB battery power supply associated with a 3.3V power regulator ( https://www.adafruit.com/product/2165 ). Everything is fine, I have a low current in the deep sleep mode. Then I tried to power the thing with two 1.5V AA cells and eveything got messed up: my ESP keep restarting (led blinking). I both tried the ESP-01 and Huzzah from Adafruit. I noticed two things: (1) Input voltage drops at 2.8V when ESP is on. (2) Input current raises over 130mA (compared to 70mA with the USB battery). My conclusion would be that the voltage being too low, the chip trie desperately to power up at full throttle, .. and fails then reboots. Am I right? Edit: ESP8266 seems to be able to work ender 3.3V : http://www.esp8266.com/viewtopic.php?p=23790#p23790 What is the solution? Thanks to you. <Q> Modules like the ESP8266 which have no on-board regulator but do need a regulated power supply. <S> Indeed, a power supply voltage that is too low will cause the module to reset. <S> On the module there's a trimmer to set the output to 3.3 V, set this BEFORE connecting the ESP8266 because such an upconverter module can easily generate 12 V which would fry the ESP module ! <A> I confirm it works excellent with 2 AA batteries. <S> I tested it with DURACELL batteries (standard batteries bought from a convenience store). <S> You HAVE to connect positive to CH_PD and VCC <S> (this is key!)negative goes to GND <S> and that's it. <A> Some facts about your setup: The typical operating voltage of ESP8266 is 3.3V <S> Your LDO / Regulator outputs 3.3V <S> Your LDO input is 3V <S> Your LDO isn't a boost converter. <S> You would have to use at least three AA alkaline/lithium/Carbon-Zinc batteries. <S> The rechargeable Ni–MH or Ni-cd batteries will barely make it as each cell is 1.2V (nominal). <S> A better (no hassle) solution is to buy ESP module with a battery pack like one below. <S> It will simplify a lot of things for you. <S> You can remove extra LEDs or sensors if you want to go low-power. <A> I have used some old Nokia batteries with no problem. <S> Since they can have up to 4.2V <S> (!?!) <S> after fully charged, I use a diode in series to the positive.
What I would do in your case is get a boost module like this one to convert the voltage from the batteries to 3.3 V. In a nutshell, you can't power the ESP8266 module either directly or using LDO using two AA batteries.
Passive circuit to generate a pulse when a door opens/closes? I've searched a bit here, for example https://electronics.stackexchange.com/search?q=pulse+switch , but I haven't quite found what I'm looking for. Here's the actual problem: I want to send a signal to a server, wirelessly, every time a door is closed (it would be fine to send on open and close, but all I need is on close). I'm open to other solutions, but my current approach (using materials I already have) is to use the Amazon dash button hack ( https://medium.com/@edwardbenson/how-i-hacked-amazon-s-5-wifi-button-to-track-baby-data-794214b0bdd8 for example), along with a reed switch. This means I need the dash button to be momentarily pressed when the door state changes - that is, if the door open/closed state is represented as a 0/1 signal, I want a circuit that generates a short pulse when that signal goes high. I know this can be done with an XOR gate and RC, I think I can do it with three NAND gates, and I'm sure there are a few other simple powered circuits that can do this. The problem is the dash button runs on a single 1.5V battery, so I'd like to do it either passively, or with a power draw that does not significantly effect the battery life. It seems to me that using CMOS logic to do this would work, but 1) I'm not sure how well it would work at 1.5V, and 2) I'm wondering if I'm missing a simpler or better solution. So... The question I'm trying to ask : What is the simplest/cheapest/lowest-power way to generate a short pulse, in response to a door changing state from open to closed? Ideally, passively, with a reed switch. The question that might be better answered : What is the simplest/cheapest/lowest-power way to send a boolean signal, wirelessly , to a web server in response to an edge in the door state? <Q> That way the switch is not closed while at rest, but briefly closes every time the door goes past. <A> A variant of this circuit will give you a short pulse. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Your simplest, cheapest way to get the signal into the webserver is probably going to be by using a small USB device like this: USB contact <S> It has a single input that can closed by your reed switch. <S> Since you will have to write software for your web server to interface with the contact, just have the software watch for the transistion from open to closed. <S> You won't need to generate a pulse in hardware, then. <S> Those devices usually include a library that you use to read the input. <S> Bind that <S> into a small program or library that your web page can use, then just evaluate the input signal and set the needed value for your webserver. <S> That Cleware device is just an example. <S> There are many other manufacturers that can probably beat it on price, availability, reliability, whatever. <S> I just gave it as an example because I've actually used one before.
Mount the reed switch on the outside of the door jamb, and the magnet not opposite the switch on the door but on the other side horizontally. Software is enough, and you can include debouncing in the software if needed.
Ramp current in inductor When DC voltage is applied across an inductor, would the current through it be ramp? According to voltage current relationship in an inductor, the current should be ramp if voltage across inductor is constant. Is this practically possible only when there is no resistance connected in series with inductor? Why would the current through inductor be ramp in this circuit of dc-dc buck converter? Edit The large value of capacitance reduces the change in output voltage and so the voltage across inductor remains constant. This would mean that load current and hence output voltage is not really constant. Why is this acceptable? What would be the nature of voltage across the capacitor(output voltage? <Q> When DC voltage is applied across an inductor, would the current through it be ramp? <S> Yes Is this practically possible only when there is no resistance connected in series with inductor? <S> Yes, or low enough resistance to not affect the result much. <S> Remember that all real inductors have parasitic series resistance, so being able to neglect a small resistance matters. <S> Why would the current through inductor be ramp in this circuit of dc-dc buck converter? <S> The capacitor C should be large enough to prevent \$V_o\$ changing very much. <S> Of course the output voltage is not perfectly constant. <S> There is always some voltage ripple in this circuit. <S> So the inductor current is not a perfect ramp. <S> But if it's designed reasonably, it will be close enough to a ramp to do useful analysis with that approximation. <A> According to voltage current relationship in an inductor, the current should be ramp if voltage across inductor is constant. <S> Is this practically possible only when there is no resistance connected in series with inductor? <S> Yes, increased inductor current would cause larger voltage drop across the resistance, which would drive the voltage across the inductance lower. <S> Why would the current through inductor be ramp in this circuit of dc-dc buck converter? <S> Typically, the analysis of switched mode power supplies is done in a piece-wise linear fashion. <S> This means that the capacitor voltage is considered constant for the duration of a switching period, which would then cause the inductor current to look like a ramp. <S> In reality, the switching frequencies are in hundred's of kHz (up to MHz with GaN devices) and the output voltage does not really change much during this period. <S> The resistor in the picture symbolizes the dc/dc converter load and since it is in parallel with the capacitor, the voltage across the load (=resistor) is considered constant as well. <S> The cycle-to-cycle ripple in the output voltage is ~ very small, typically <1%. <S> This is the reason why the simplified first-order (inductor only) analysis is feasible. <S> The large value of capacitance reduces the change in output voltage and so the voltage across inductor remains constant. <S> This would mean that load current and hence output voltage is not really constant. <S> Why is this acceptable? <S> What would be the nature of voltage across the capacitor(output voltage? <S> See the simulation below. <S> The capacitance is made (too) small to emphasize the ripple. <A> Yes, from the relationship \$V = <S> L \frac{di}{dt}\$ <S> we can see that for a constant voltage, we get a constant rate of change of current - i.e. a linear current ramp. <S> If we include a series resistor, we get a decaying exponential curve caused by the resistor dropping increasing amounts of voltage as the current increases - \$i(t) = \frac{V}{R} <S> ( 1-e^{-\frac{Rt}{L}})\$. <S> For small resistance values this doesn't deviate much from an ideal ramp - the deviation increases with increasing R (and over longer time periods). <S> For the buck converter, C resists the change in output voltage \$V_O\$ such that the voltage across the inductor, \$V_L = <S> V_O - V_I\$ remains relatively constant, and hence you get a simple current ramp. <S> Varying current flows in the inductor and output capacitor, with the load seeing (ideally) fixed output current defined by an (ideally) fixed output voltage across the capacitor. <S> The Buck converter Wiki page shows many of these waveforms along with a more general overview of operation.
Since inductors have quite small resistance (to minimize losses) and the inductor current typically changes ~20% max during one switching period, the voltage across the inductor can truly be considered constant.
Resistance of an LED in a simple battery-resistor-LED circuit? I have a simple circuit arrangement of a 9V battery - 1k Ohm resistor - LED. This circuit has a current of 7.5 mA (measured between the LED and the battery). If there's voltage drop of 2V in the LED, does it mean that my LED has a (2 % 7.5)k Ohm resistance? Thanks! <Q> Diodes are not ohmic. <S> Resistors have a linear relationship between current and voltage. <S> That is the relationship described by Ohm's law which you used in your question. <S> Diodes look like this: We normally model them as a simple voltage drop when they are forward biased and an open circuit when they are reverse biased. <S> If more precision is desired, we sometimes model the forward biased state with a voltage drop and a resistance. <S> However, what you have computed is not the same as this resistance. <S> Your calculation fits a line between the origin and your present circuit's operating point, giving a much different number. <S> To say that your LED has that resistance is misleading as if you change the current, the voltage will not change proportionately. <A> You should not consider LEDs (and other diodes) as having resistance, as they do not obey Ohm's Law. <S> It is best to say that an LED has a (nearly) fixed voltage drop, which varies with the colour of the LED. <A> Since resistance is defined as: $$ R= \frac{E}{I}$$ <S> In the case you've mentioned, by citing a particular forward voltage (Vf) dropped across an LED with a particular forward current (If) through it, we have $$ R= \frac{Vf}{If} <S> = \frac{2V}{0.0075A} =267 \text <S> { ohms}$$ <S> However, since an LED's Vf will stay fairly constant while its If varies since the LED isn't ohmic, its resistance won't remain constant, and its calculated resistance will only be valid at the particular Vf and If cited. <S> For example, if the LED you you were referring to developed a Vf of 2.1 volts with an If of 15 mA through it, then its resistance under those conditions would be: $$ R= \frac{Vf}{If} = \frac{2.1V}{0.015A} = 140 <S> \text{ ohms,}$$ <S> which, as you can see, is quite different from the first case. <S> Following is an interesting plot of forward voltage and resistance as a function of forward current for a randomly picked (junkbox) <S> 20 mA red LED. <S> The current through, and <S> voltage dropped across the LED were measured, and the resistance was calculated as discussed earlier. <S> Enjoy! :) <A> A better way to look at the resistance of the LED is to look at the total current and voltage for the circuit. <S> R = <S> V / <S> I = 9 <S> / .0075 <S> = 1200 ohms <S> Since the resistor is 1000 ohms, the LED must be providing 200 ohms of resistance. <S> As mentioned though, this value is not constant like a normal resistor. <S> Also, assuming the battery is actually putting out 9 V, the LED voltage drop could not be 2 V. <S> This would make the current (9 - 2) / 1000 = 7 mA.
The voltage across a lit LED varies only slightly as the current varies.
Need Help With OpAmp Circuit for Cell Phone Recording I'm trying to make a simple circuit that will allow for the combining and recording of both sides of the conversation by tapping into the connection between a cell phone and a headset. For convenience sake, I want to also use a spare cell phone as the recording device due to portability,etc. I am using iPhones for the cell phones in this application, although that shouldn't matter. NOTE: The iPhones provide approximately 1.8V to the microphone to power it, thus my decoupling capacitors on both the input and output. The 4.7K on the output is to trigger the recording iPhone to switch over to external mic mode, otherwise it will only record the internal mic and ignore the input signal. I've tried designing this to the best of my knowledge and understanding, however I am not getting anything on the outputs. I've checked the input with an oscilloscope and I'm getting a good signal at the opamp input pins, but nothing on the other side. I've tried changing out the IC and still nothing, which I'm guessing there's a flaw in my design since I don't fully understand each component's role/effect in the circuit beyond basic theory. Any help would be awesome and much appreciated. <Q> The TL07x op amps are not rated for rail-to-rail operation. <S> In connecting pin 4 to ground, you are forcing the inputs much closer to V- than they can support. <S> The data sheet specifies limits on the common-mode voltage input (which means the input voltage in this case) as 4 volts above V- to 4 volts below V+, which means that it won't work as you've connected it. <S> This will provide +/- <S> 9 volts to the amp. <S> Also, I recommend a 0.1 uF to ground at both pins 4 and 7. <S> This is called decoupling, and you should always do it. <S> You already have a C3 of 1000 uF, but this is much bigger than you need, and will not respond quickly enough to keep you out of trouble. <S> 0.1 to 10 uF is much better. <S> Also, it's possible that the iPhone outputs are AC coupled. <S> If so, your inputs will drift around, and may be unusable. <S> I recommend connecting your + inputs to ground with a 10k to 100k resistor. <S> Finally, there's no need for the 22k resistors. <S> Just connect the output of each op amp to the - input. <A> At the very least, you need to bias the + input of your opamp to the virtual ground you want to use. <S> Use a resistor divider between your 9v rail and ground to get 4.5V. <S> This will bias the input to the midpoint of your rails. <S> In this configuration, you will need two separate biasing dividers for the two op-amps. <S> A more rational approach might be to configure them as inverting op-amps, and you can use a single voltage divider to both + inputs of the op-amps. <A> Alright, so I created a stripped down version on a breadboard using only one set of I/O pins and connected it to a function generator (100mVpp - 1.5kHz) and an oscope. <S> My function generator can go as low as 50mVpp (which is closer to what the input signal will be) , however this low of a signal conflicts too much with noise and the oscope, so I chose to work with a higher Vpp for this test. <S> I tested it with and without the voltage divider and the results are self-explanatory. <S> The yellow is the output signal, the blue is the input signal. <S> The circuit: Without the voltage divider: With the voltage divider: <S> Notice that there's a drop in the signal output amplitude compared to the input signal <S> and I'm not sure why. <S> (There's also a phase shift occuring, however I'm not concerned about that unless it's indicative of some other problem of concern.) <S> The output amplitude <S> increases <S> when I increase the frequency, however 1.5K is well within the vocal range and this will be a problem. <S> I saw no difference between a resistor across pin 1 & 2 vs a jumper across them, as per @WhatRoughBeast suggests. <S> I guess I don't grasp the negative feedback to set the gain of the opamp. <S> Am <S> I just not understanding this correctly? <S> EDIT: <S> Ok, I took Daniel's suggestion and swapped it to an inverting configuration and presto! <S> Here's the revised schematic: <S> And, as you can see, the results are as expected: <S> Now I don't quite understand why this works and the non-inverting layout doesn't, but the fact it works is what I was trying to achieve. <S> If I understand what Daniel said, I can connect pin 3 to pin 5, using the voltage divider for both Pin 3 & 5, correct?
My reason for choosing an opamp was to simplify amplification (among other benefits of using an opamp) and to increase the amplitude of the input signal for better mixing on the output. The simplest change is to get another battery, and connect + to ground, and - to pin 4.
Four layer PCB, leaks current on edges I was testing a four-layer PCB and got electric shocks several times when trying to touch the edges of the PCB. The four layers are: top/+15V/ground/bottom layer. It seems that there are several "white spots" on the edges. And is it possible that the +15 layer get exposed and shocked me? If that is the case, it is quite dangerous. We manufactured big boards that each one combines several small ones. Then we break each big boards to have small boards which are the final product. So I guess the power layer(+15V) may get exposed at the breaking process. My questions are: Am I correct? Is it because we combining small boards into big boards in the wrong way, such that the internal layers get exposed easily? Is it because our prototype factory did not do a good job? What are the potential risks under this condition? To the product its self and to users? Every answer below is great. I chose Olin's because his answer contains most details. Many thanks! <Q> If there is exposed copper at the edges, then the board was designed improperly. <S> Almost certainly whatever software you are using to design this board has a parameter that controls how close edges copper is allowed. <S> Verify the setting, and of course make sure the software is actually checking against this rule. <S> The software may have not known that the board was intended to be broken apart. <S> In that case, it didn't know to apply the rule. <S> Either fix the setup so the software knows, or check this manually. <S> Either way, it's your responsibility to make sure copper stops some distance from all final edges. <S> 25 mils is usually conservative for edges the board house will make. <S> Break-away edges will have more positional slop, and can affect the board a little distance in. <S> For those, you should use a larger keep-away distance. <S> Routing a ground plane right across a break away edge is definitely a bad idea. <A> If the boards use breakout tabs extra care is needed around the tabs to make sure that shorts or exposed copper does not occur. <A> vini_i has it right, you should always ensure any pours are well away from the edge of the board. <S> I generally allow at the very least 15 mil (0.381mm) between traces/pours and the edge of the PCB, and I prefer at least 25 mil. <S> Otherwise you can get shocks, shorts, or low resistance between planes. <S> Never run a pour all the way to the edge of the PCB.
It is possible that when the boards were assembled in to a panel the board edges may have been violated or shrunk back to the copper by accident. When designing a board there should be sufficient pull back of all the planes away from the edge of the board.
9v Batteries in Parallel? I am creating a circuit with a 9v battery as its power source. For the sake of extended hours of usage, would it work to put another 9v battery in parallel , since placing it in series would make the supply 18v, which is too far away from 5v for the 7805 to deal with. Bottom line, would it double capacity/lifespan, or would it go up in smoke? <Q> You can parallel these batteries, but there will be some mismatch and they won't share the load equally. <S> As it is now, your power supply is only 56% efficient. <S> You should be able to get that to about 90%. <S> That efficiency boost alone may be enough to not need a second battery. <S> If you can use multiple 9 V batteries, you can use different batteries altogether. <S> 9 V batteries have poor power density. <A> If you are talking about PP3s, then 6 AAs in series would be a lot more economical. <A> I suggest to use 2x 14500 lithium ion cells in a 2xAA holder with a 9v-style snap. <S> This gives 7.4 volts nominal. <S> An added benefit is they are rechargeable and have much higher energy capacity. <S> A low dropout switching regulator module can also be added for even better efficiency (you can get ones small enough to fit on top of the battery pack). <S> Let me know if you want picture or part numbers.
With a small boost switcher, you should be able to run your device from two AA batteries for much longer than the single 9 V battery the way you are using it now. A much better solution is to use a buck switcher instead of the 7805.
Estimating the Capacity of Charged Used Li-ion Cells: I acquired 6 used li-ion cells 1 year ago. Since I wanted to know for certain how well the cells would hold a charge after 1 year, I conducted an experiment. I recently tested the cells. Below is some data related to my testing: Charger info: Voc = 5.25 (Open circuit Voltage--no cell in charger) Imax = .68A (max charge current=680mA--no cell in charger) Cell Info: Manuf: Panasonic Id: CGR18650CE V: 3.6 (nominal) mAh: 2150 (typical capacity when fully charged)+Chrg: CC=1.43A (max), 4.2V (max) // "+Chrg"=Charging-Chrg: CC=2.04A (max), cut-off @ 3V // "-Chrg"=Discharging Notes: - All cells were charged at a CC=.68A to a CV=4.2V. Charging was cutoff when the charge current reached .01A@4.2V - The resting V of all cells after 24 hrs was at least 4.05V. Here are the cell measurements after 1 year of resting: Cell V___ A___ VA(W) Est mAh (i.e. VA/3.6*1000)1 4.16 3.29 13.67 38022 4.01 3.23 12.95 35983 3.95 3.18 12.56 34894 3.85 3.09 11.90 33055 3.95 3.17 12.52 34786 3.77 2.95 11.12 3089 The multimeter was verified to be operating properly using a bench power supply. We can see from the data that some cells held their charge better than other cells. My question is, how can the cells have such a high capacity when the datasheet indicates their capacity is 2150mAh? I know the cells are at least 5 years old. I also realize that my estimated mAh capacity is not based on actual discharge tests, but is there some other way of estimating the capacity of such cells using a multimeter & a bit of math? <Q> I don't get the point where you get from the cell voltage to the capacity. <S> What you need to do is to discharge the cell with a constant current and measure the time until 2.7V is reached. <S> This is done best with a electrical load or 4 quadrant source. <A> No, you cannot estimate battery capacity quickly and accurately with a multimeter. <S> Measuring battery capacity is complex, and the most accurate methods require a full discharge cycle (and even these aren't perfect). <S> Otherwise, you need techniques like coulomb counting during charge and discharge, or look at the battery's response in the frequency domain to AC pulses. <S> There are specialized ICs built for these purposes. <S> For more info on estimating capacity and state-of-charge, see here: <S> https://batteryuniversity.com/learn/article/how_to_measure_capacity and for info on how one IC manufacturer does it, see here: <S> https://www.maximintegrated.com/en/design/partners-and-technology/design-technology/modelgauge-battery-fuel-gauge-technology.html <S> As to why your back-of-the-envelope method didn't work, to measure power from the battery you need to multiply voltage provided and current being drawn at the same time . <S> The open-circuit voltages you see will immediately drop when you apply a load, and in general, for most of the discharge cycle, the voltage will be about 3.6V, so multiplying current draw by the voltage you see now will be an overestimate. <S> And multiplying that by a burst of short-circuit current won't tell you anything meaningful about capacity. <A> To measure cell capacity accurately you should charge a cell to a specified voltage, for example 4.1 or 4.2 Volts. <S> Then DISCHARGE the cell with a constant current, for example 1 A, until the unloaded voltage (when no current flows) has reached 3.6 V (for example). <S> It is also not completely clear to me if you assumed that the charging current is constant. <S> Because it should not be ! <S> Only when the cell is around 40 % - 80 % full the charge current should be at it's maximum value. <S> You measured the charging of the cells which is not a 100% efficient process, some of the energy will be converterted into heat. <S> This can explain why the measured capacity appears higher. <S> The cell probably did not absorb all the mAhrs.
A proper Li-Ion charger will charge with a lower current when the cell's voltage is quite low and when it is nearly full.
Why do the Wh and mAh ratings of a USB battery pack appear to be inconsistent? I received a battery pack that I had ordered today, one of those ones that provide 5 volts using a USB connector, and plug into a USB socket to charge. I noticed that on the box, it said it was rated for 6000 mAh.The battery itself said 22.2 Wh, and that the output voltage was 5V DC.Converting that back to mAh was: (22.2 / 5) x 1000 = 4,400 mAh. About 75% of the 6,000 mAh printed on the box! Feeling shortchanged, I picked up another (Li-Polimer) battery pack from a different manufacturer I had lying around and saw it's capacity was: 15 Wh, 4,000 mAh. The voltage again being 5 volts.Converting the Wh reading to mAh was: (15.0 / 5) * 1000 = 3,000 mAh (about 75% of the mAh reading). My guess is that as the batteries deplete, like the lead-acid batteries of old, the voltage decreases. So if the voltage dropped to 3 volts, it would still deliver the milliamps for the mAh reading, but the Wh for the watt hour reading would be reduced. I suppose this means that the useful capacity of the battery (the period of time where it actually delivers 5 volts) is even less... perhaps only just half of the mAh rating? <Q> Firstly the battery is not \$5\mathrm{V}\$, it is nominally \$3.7\mathrm{V}\$ as pointed out already. <S> However the confusion lies in misinterpreting the \$\mathrm{mAh}\$ rating of the battery, and it has nothing to do with converter losses, and everything to do with $$P=I\times <S> V$$ <S> If the battery is rated at \$6\mathrm{Ah}\$, it means you can draw \$1\mathrm{A}\$ for \$6\mathrm{\space hours}\$. <S> So lets say you are drawing \$1\mathrm{A}\$ from the battery. <S> This means it is delivering: $$P=I\times V = 1 \times 3.7 <S> = 3.7\mathrm{W}$$ <S> Now lets say you feed this through an ideal boost converter. <S> In this case \$P_{in}=P_{out}\$. <S> So assuming we boost it up to \$5\mathrm{V}\$, this means that the current that must be drawn from the output to discharge the battery at this rate is: $$I= <S> P <S> /V=3.7/5=0.74\mathrm{A}$$ <S> So what this means is at the higher voltage, you can draw a current \$0.74\mathrm{A}\$ for \$6\mathrm{\space h}\$ for that battery capacity - so the output capacity is \$4.44\mathrm{Ah}\$. Again, this is not converter losses - in fact with losses the number would be lower. <S> Essentially at a higher voltage, the energy delivered by each unit of charge \$\left(\mathrm{V}=\mathrm{J}/\mathrm{C}\right)\$ is higher, hence at a higher voltage but lower current you are still delivering the same energy. <A> Marketing trick, like hard drive capacity being base 2 in an OS while manufacturers state the size in base 10 (gibibyte vs gigabyte). <S> The capacity in mAh is raw capacity of the battery, before any regulator loss. <S> The raw battery in the USB battery pack is typically a 3.7V Lipo. <S> As such, 22.2 Wh / 3.7 V = 6 <S> Ah (6000 mAh). <S> Figure 80% boost efficiency, you'd see 22.2 <S> Wh <S> * .8 = <S> 17.76 <S> Wh at the 5V output, giving 17.76 <S> Wh / 5V = 3.55Ah <S> , not adjusting for the Lipo's voltage range or any (if your lucky) under voltage protection. <S> You got played by standard consumer marketing tactics. <A> I noticed that on the box, it said it was rated for 6000 mAh. <S> The battery itself said 22.2 <S> Wh, and that the output voltage was 5V DC. <S> Converting that back to mAh was: (22.2 / 5) <S> x <S> 1000 = 4,400 mAh. <S> About 75% of the 6,000 mAh printed on the box! <S> There are two parts to the "battery pack". <S> The first is the internal cell, usually some variant of a lithium ion chemistry. <S> The second is a boost converter to change that cell's voltage to the 5V output you need. <S> The specifications you are quoting refer only to the cell, not the output of the regulator. <S> So the cell itself is a 6,000mAH cell, and can hold 22.2Wh of energy when fully charged and new. <S> Given that P <S> = <S> I <S> * V <S> we can find the cell's voltage: V = <S> P / <S> I -- <S> > <S> V = <S> 22.2 / 6.000 <S> -- <S> > <S> V = 3.7 . <S> 3.7V is a common voltage for Lithium chemistry cells. <S> This is a good thing for consumers because regardless of the voltage regulator's output, the capacity is comparable between devices. <S> So keep in mind that the 5V output of the regulator never enters into the picture for these specifications - only the cell's voltage (which may vary depending on exact chemistry). <S> You can still compare two packs using the watt-hour rating for capacity, and to a lesser degree the mAH rating, and find which one holds more energy.
Instead it has to do with the fact that you are sacrificing current capacity for a voltage gain which is how a boost converter works - if this wasn't the case then you would have invented free energy. So the marketing packaging is proclaiming the battery's actual capacity.
Blinking 3 led's in parallel? I have a PIC development board which has few on board led's. I am programming MCU so that it can blink 3 led's in a parallel manner. I have made the following code: void led1() //blink led1 with delay of 700ms{ LED1 = 1; Delayms(700); LED1 = 0; Delayms(700);}void led2() //blink led2 with delay of 1200ms{ LED2 = 1; Delayms(1200); LED2 = 0; Delayms(1200);}void led3() //blink led3 with delay of 2000ms{ LED3 = 1; Delayms(2000); LED3 = 0; Delayms(2000);}void main(){ //******// /** code to blink led's in parallel **/ //*****//} What logic should I write to blink led's in paralledl manner. I know embedded can only do one task at a time but there has to some coding solution for it. I don't want to use FreeRTOS for simple applications. I want them to blink at the same time. Like 1st one blinking with the delay of 700ms, at the same time, 2nd blinking with delay of 1200ms and at the same time 3rd blinking with delay of 2secs. All 3 parallely <Q> Create a say 1 or 10 or 100 mS counter. <S> For each LED provide a count down register. <S> Each time the timer "ticks" decrement each LED count down register. <S> When a register reaches zero, process the LEd and reset the timer. <S> QED. <S> You can also use count up to a limit or other schemes. <S> The key point is that each task is essentially independent with the single timer source driving them. <S> LEDRED = <S> 7 <S> LEDGREEN = <S> 12 <S> LEDBLUE = <S> 20 <S> DO <S> Until_hell_freezes_overDELAY 100 mSDecrement LEDRED <S> IF LEDRED = <S> 0 <S> Toggle RED_LED <S> LEDRED = <S> 7 <S> ENDIF Decrement LEDGREEN <S> IF LEDGREEN = 0 <S> Toggle GREEN_LED <S> LEDGREEN = <S> 12 <S> ENDIF <S> Decrement LEDBLUE <S> IF LEDBLUE = 0 <S> Toggle BLUE_LED LEDBLUE = 20 <S> ENDIF <S> LOOP <A> I would make a timer that goes off every 100ms. <S> Then call a function 'update_led_x' that will increment a counter for that led. <S> When it gets to a certain count, it toggles the led and resets the count. <A> If you want accuracy, then a timer interrupt will be a good idea. <S> Otherwise, and if this is the only thing you want the code to do, then you could have a while(1) loop withe a single delay of the minimum you need followed by a handler function for each of the LEDs. <S> Each LED will need its own counter which keeps being reset to the value of the required number of these minimum delays and the three LED handlers will test, increment and reset the respective counters each time round the loop. <S> As the counters reach half their value, the LED would turn off and as the counter is reset to 0 they would turn on.
You will need to rewrite the code such that the turning on and off of all three LEDs can happen independently rather than in sequence.
Can calibration improve the accuracy of a circuit? If I have some resistors and a fixed-gain current shunt amp, that all claim "1%" accuracy can I make a system that's better than 1% accurate, if I put a calibration tuning pot into it, and adjust it manually while measuring it? Will it be better than 1% and repeatable if I do that? What I'm after is something that's both accurate and repeatable - that once calibrated, it remains in that higher-accuracy state for a long time. What parameters am I looking for in datasheets that will explain how long-term repeatable such a setup would be? <Q> Keep in mind that anything adjustable will eventually require (re)adjusting. <S> The actual accuracy of a complete circuit has to take into account tolerance buildup ; all the part tolerances have to be assessed. <S> Your 1% resistors will have an initial resistance of 1%, but over time and temperature, this is more likely to be of the order of 3% (I work in an industry where we support equipment for decades so such an analysis is important for us). <S> Sometimes it is worth adding circuitry to add an Automated Calibration feature that could perhaps invoke at power-up or on some regular basis, although that would be bit over the top for a simple resistive network. <S> This is useful for high end test equipment , though. <S> The simple answer - yes, you can get better than 1% ( provided your measurement equipment is better than 1% ). <S> The general rule of thumb is that to achieve a particular accuracy, the measurement equipment should be 10 times as accurate(but <S> this varies depending on who you ask). <A> 1% resistors are called that because their actual resistance is within ±1% of the label value, not that their resistance will vary (over time) by ±1%. <S> So you could use lower spec resistors with your calibration tuning pot and tune for increased accuracy. <S> All resistances will change value with temperature. <S> There's a small table of temperature coefficients here; I don't know if it's relevant: <S> ( http://hyperphysics.phy-astr.gsu.edu/hbase/Tables/rstiv.html#c1 ) <A> Long term stability is given under the term of drift, long time drift, long-term stability or sometimes just stability. <S> Problem with these values are, that most of the time each manufacturer gives a value at different operating conditions, making it hard to compare products. <S> Vishay and others published quite good articles on different resistor kinds and their drift performance: <S> Foil resistors (Vishay) <S> Thin film resistors <S> (Vishay) IEEE Paper on thick film resistors (not accessible for me) <S> Long term stability is mostly influenced by temperature and the load of the resistor (self heating, electromigration might be a thing). <S> So a resistor which is used always used under 70°C and high humidity will age quicker than a component at 25°C and moderate humidity. <S> This is a different effect than just your normal temperature coefficient, because it won't go away if the temperature returns to normal conditions. <S> The kind of precautions to take surely depend on where the device is going to be used. <S> Is it expected to run in a laboratory under controlled conditions? <S> You can probably get quite good results without too much trouble. <S> Is it going to be used in some waste water plant? <S> You better take every possible way to stabilize the temperature and prevent moisture from getting in. <S> I'm not sure <S> how long term stable the potentiometer will be, but I can imagine that a cheap pot will make things worse over time. <S> So use a trimmer potentiometer as those are meant to be used the way you want to use it (one time setting, seldom recalibration). <S> There are of course good reads on trimmer pots as well: <S> Foil vs. Wirewound vs. <S> Cermet <S> (Vishay) <S> Best of trimmer primers <S> (Bourns, horrible on the eyes) <S> BI Technologies trimmer basics <S> (BI technologies, also horrible layout)
Certainly, an adjustable part (potentiometer in your case) can increase the accuracy of a circuit, at the expense of needing to go through the same procedure regularly.
Determining Resistor for Heating Element I am attempting to run a Molybdenum heat coil. The best I can tell it is 0.3-0.4 ohms per rack and I would like to run say two racks at 230V at 3.9KW (so it doesn't trip my 230V 20 amp breaker). Does that mean, assuming a value for two racks is a total of 0.8 ohms, can I add a ~12.7641 ohm resistor for a total resistance of 13.5641 to run it at 3900 watts at 230 volts? If not, how is it possible to run these? Do I need a lower voltage supply with more current? <Q> Using resistors is Very Bad Idea. <S> Look at datasheet of Your heating element, this one is for example: http://heatingelements.isquaredrelement.com/Asset/Moly-D-technical-brochure.pdf <S> On page 4 You can find a graph showing resistivity in function of temperature of heating material. <S> At normal operating temperature <S> (about \$1600^{\circ}C\$) molybdenum elements has resistance 7 times larger than at room temperature! <S> If You have an element with \$0.3\Omega\$ resistance at room temperature, it will rise up to about \$2.1\Omega\$ at \$1600^{\circ}C\$. Connect them in series and You've got more than \$4\Omega\$ in operating condition. <S> I know, it's still too much to run it with 20A circuit breaker - only reasonable solution for such power <S> is to use SCRs with proper driver. <S> Such regulator gives You another two important features: Soft-start - limit current during start-up, when molybdenum elements are cold and have low resistance. <S> Regulation of temperature - use more sophisticated regulator with feedback from some temperature sensor and <S> you'll have an automatic regulation. <A> You have not provided enough information about the heater elements to answer your first question properly. <S> Your 230V, 20A power source provides 4600W of power. <S> If you provide the recommended voltage type & rating for your heater element, you will probably get a better answer. <S> Note: <S> Adding a 12.8 Ohm resistor in series with your heater elements won't work because the majority of the energy will be dissipated as heat through your largest resistance--which is your 12.8 Ohm resistor. <S> A Moly-D 3-6 would use 61A@16V and consume 975W (so, to produce ~2,732 <S> ° F in a 1 ft^3 oven, you would need 4 heater elements, which would consume 3.9kW), just as an example. <S> Most likely you will have to use some kind of step-down transformer that can provide a large A output--which will probably be pricey. <S> HTH Best Regards! <A> You have three options: Find more of the coils an add them in series until you get down to your target power. <S> Sounds like you will need 30-40 of them though so that seems unreasonable. <S> Use a transformer to reduce the voltage and therefore power. <S> Still, looking for a 3.9KW transformer is going to be difficult or expensive. <S> Use PWM to reduce the average current draw. <S> This is going to need a separate question about creating a driver capable of powering a load this big. <S> Unfortunately I think you will just have to find alternate heating coils that are of a lower power if you are not able to use the ones you have without tripping your breaker.
Yes, you would probably need a lower V & higher current to use the heating elements that you have. If you have no information about your heater element, you could start here for possible clues: http://heatingelements.isquaredrelement.com/category/oly-d-molybdenum-disilicide-mosi2-heating-elements
Does a trace with via handle more power? Eventually I see power traces on both sides of dual layer PCBs that have lots of massive vias, do the vias help the traces handle more power? Does it increase heat dissipation and/or decrease resistance? I sometimes see them in PCBs with the same trace on both sides, so the via's function apparently is not to carry current from one side to another.. is it adding thermal mass or..? Is there a rule of thumb/graphs/calculations/application notes for this? Or is it more empirical/case specific? Info about vias for PCB heatsink pads for power ICs is quite common but I couldnt find much about traces. I know there are other methods of increasing power handling and heat dissipation for traces, but I'm specifically curious about this method.I think I'm not referring to PCB stitching of RF planes. <Q> Well if you have a very thick trace to carry a lot if current on one side and you want to flip to the other you often use a bunch of vias. <S> Vias have their own current carrying capacity per thermal rise just like traces do. <S> So what often happens is an engineer has to do this so instead of calculating how many vias they need they just add more than they think they would possibly need just to be covered <S> (since normal such vias are very cheap). <S> the current will be split (more or less) between them. <S> In some case such as very fast switching of high currents the location of the vias might matter, so the split might be a little different in that specialized case. <S> Here's a link to a pcb via calculator that includes current carrying that might be instructive. <A> This technique is generally known as "via stitching". <S> The vias in your picture are most likely being used to conduct heat away from a part on the other side of the board. <S> (Given all of the decoupling capacitors, I'd guess it's some sort of high-speed digital part.) <S> In a comment, you mentioned having seen vias used around PCB antennas. <S> This is a different use case; in this case, they are being used to create a shield around RF circuits, either to isolate them from external signals, and/or to prevent them from radiating signal into other parts of the board. <A> stitching vias are used for multiple purposes. <S> Increased current capability of traces <S> Increased reliability of trace (in case of single via failure) <S> Thermal conduction to enable removal of heat to other layers ground plane stitching. <S> If you have multiple layers on a PCB and with more than one ground plane you will typically want these connected with a very impedance. <S> Using multiple stitching vias is one way to achieve this. <S> It can also used on edges of boards to provide limited shielding to sensitive/high speed traces on inside layers.
The heat capacity of a single via is relatively low, so many vias must be used to efficiently conduct heat away from the part on the opposite side. Each via in parallel is like a wire in parallel
How to make 9V battery clip easier to work with breadboard I just recently started to play around with electrics. I use a breadboard as a playground and I have to plug in and out my 9V battery so many times that the clip is now broken. The tip of the lead came off (see picture) and stuck inside the breadboard. I found the lead of the clip is hard to work with in the first place. It's too easy to bend, and that makes it difficult to stick into the breadboard, don't you think? Do you have some kind of tricks to make it easier to plug in and out 9V battery, perhaps something with a stronger lead? <Q> You could solder the ends onto some stiff wire pieces or (better) onto a 0.1" (2.54mm) pitch header (pull out some pins if you want more spacing than 0.1"). <S> Put some shrink wrap around each wire if you really want to do a nice job. <S> Source here . <S> Naturally you'll need to thread the heatshrink tubing on before soldering, then slide it down and shrink it into place. <S> By the way, usually the back of those solderless breadboards can be peeled back or otherwise removed and the errant piece of wire cleaned out. <A> You mighty want to try a battery holder with leaf contacts instead of snaps, something like this, and available here : <S> If you were to make a little base (suggested above, in red) you could wire to the PC pins and have the whole thing sit nicely on your benchtop without hurting the pins or the work surface. <S> On the breadboard end of the wire, a little connector a <S> la Spehro Pefhany would be perfect. <A> Just cut and solder them on. <S> That seems like a pretty quick fix. <A> Do the following inexpensive & simple steps to solve your problem: 1. Strip (1/2") <S> the ends of your battery clip leads & tin them with solder. <S> 2. Strip (1/2") <S> all ends of 2 insulated (1"L x 20 AWG) solid copper wires & insert them into your breadboard power rails. <S> 3. <S> Buy <S> /Make 2 (stranded-wire) <S> jumper wires with boot-insulated alligator clips on each end (i.e. 2 wires & 4 clips-- <S> whatever length you want). <S> 4. <S> Clip the alligator clips to the battery clip wires & when you want to power your breadboard, just clip the other alligator clips to your breadboard power rail wires. <S> Alternatively, you could do the following instead: 1. Strip (1/2") <S> the ends of your battery clip leads & tin them with solder. <S> 2. Strip (1/2") <S> all ends of 2 insulated (6"L x 20 AWG) solid copper wires. <S> 3. <S> Solder <S> one side of the solid copper wires to your battery clip wires. <S> 4. <S> When you want to power your breadboard, just insert the other ends of the stripped solid copper wires into your breadboard power rail. <S> Or, simplest of all, you could do the following instead: 1. Strip (1/2") <S> the ends of your battery clip leads & tin them with solder. <S> HTH Best Regards!
You could replace the battery pack wires with a couple of breadboard jumper wires (the ones with the nice thick pins, like this ). Tinning the wires makes stranded wires quite inflexible--but be careful when inserting them--the point where the tin approaches the insulation is vulnerable to stress & can weaken stranded wires over time.
Can I use two Power Source to Switch with a Relay like this? I'm Planning to switch between two power sources with a Arduino like below diagram. what I'm going to do is monitor AC power failure with a sensor and then once AC power failed switch the Relay to Battery source. My question is, Connecting two ground wires from DC adapter and Battery Ground will cause any trouble? <Q> My question is, Connecting two ground wires from DC adapter and Battery Ground will cause any trouble? <S> Even then it won't burn but might throw up a few operational problems but... unlikely. <S> Regards Ignacio's comment, it is advisable to have a diode if the DC from the AC supply is a bit bigger than the battery voltage - <S> this would nearly always work without going to the complication of a relay but if the voltages are somewhat similar then it's hard to say whether the battery will remain powering the target circuit when AC is on. <S> Another thing - when the relay changes over, there is a small but finite time when you lose power so you should have enough capacitance across the load to prevent drop-out. <A> There's no need to monitor power failure with a sensor, you can just use an AC relay connected across the mains or a DC relay connected across the output of the AC/DC adapter. <S> Wire the normally-open contact to the plus output of the AC/DC adapter, the normally-closed contact to battery plus, and the relay common to load plus. <S> Wire the AC/DC adapter minus, battery minus, and load minus together, and you're done. <S> A caveat: When the relay is switching and the common contact is flying from the NO to the NC contact, (or from NC to NO if the mains come back up while the thing is operating on batteries) <S> there'll be a short time when it's on neither the battery nor the adapter, <S> and there'll be no output to the load, so you need to make sure there's a BFC across the load in order to keep its supply voltage high enough and long enough to keep it (the load) happy during switching. <S> IgnacioVazquez-Abrams makes a valid point, and if you can live with the voltage drop across the [Schottky] diode OR <S> , that might be the way to go since it'll be a very smooth transition from the AC/DC adapter to the battery and way, way cheaper than with a relay and a BFC. <A> Be sure to use a break-before-make relay (as most are, but good idea to check) <S> otherwise there will be a momentary connection between the Adapter +ve and battery +ve, which may give problems depending on the design of the AC adapter or battery, e.g. of the adapter has a low source impedance and a higher voltage than the battery, then the momentary current pulse into the battery may cause battery damage.
No, this will not cause trouble providing the battery in question is a just a battery and not some other AC / DC power supply with maybe a dodgy earth.
White LED W/ 3V or less? I'm designing a front end bike light just for the fun of it, and I've hit a problem. So far my design will have an input voltage of 3V, but all the white LEDs I find have a forward voltage of 3.2V or greater. I am curious if there are any white LEDs that I can run off of 3V. My goal of this light is more of a "be seen" light than a "light up the entire area" light. I plan on blinking the LED with a 555 timer. I will power my circuit with 2 AAA batteries, or maybe a watch battery. <Q> White LEDs are blue LEDs with a phosphor that converts some of the blue light into yellow light that mixes with the blue to form white. <S> To make Blue light requires just over 3V. <S> The voltage requirement for blue LEDs has been going down in recent years but won't ever reach below 3v. <S> The actual voltage of course also varies with the current, which dictates the brightness. <S> To get a good life out of the battery you should design your circuit to work with just 0.9V per cell, i.e. 1.8V for a 2 cell battery or 2.7V for 3-cell. <S> As Stefan suggests the best way is to use a switching power supply to convert the battery voltage to that needed by the LED. <S> Then you will get the best battery life. <A> OK - you probably resolved this issue a couple of years ago, but another option you could have considered is to use a Joule Thief type circuit to boost the voltage - Solar charged Christmas lights can power entire strings of 100 or more white LEDs from a single AA 1.2v cell using this concept, and the components required are pretty simple... <S> One resistor, a common transistor, and you can build the coil yourself. <S> Use the 2 AAA cells to power the 555, and then send the 555 pulses to the Joule Thief to power the LEDs. <A> You could try a switching power supply to boost your voltage up to 3.2V - 3.3V.
The voltage of an LED is related to the energy of the photons in the light and that energy is dependent on the color. At very low currents (light output) they may be a bit below 3V. Since you are intending to power the circuit from a 2-cell alkaline battery although it may be slightly greater than 3V when new, it will drop as the battery runs down.
What is the best tips to use while soldering? Is a silver tip better to use rather than a copper tip? <Q> There is no reason to get a silver tip. <S> My Weller tips last me years, especially if you have a small € 5,- can of activator to re-activate the tip once in a while when it doesn't have the solder stick well enough any more. <S> Fun fact for all <S> you tip-material-geeks <S> : Some very cheap cast iron tips or similar can actually be activated to work for a couple weeks with Cooper Tools / Weller tip activator. <S> Tried it for a friend once, who had a €7,- plug in iron that had no wetting action. <S> Because the tip was garbage. <S> After activator it worked for a couple of weeks. <S> I do not doubt other brands will work too, but I got stuck to this brand in the 90's :-) <S> The causation for silver tips is/was maybe a bit of lore around the whopping 2% higher thermal conductivity, but probably the higher inertness of silver compared to copper, but first of all: Most major brands don't use pure copper any more and second of all they are coated to protect. <S> So as long as you don't bend or actively scratch cheaper tips you will probably not notice the difference. <S> And if you do, in 6 to 12 months it will corrode away <S> and you spend €4 on a new tip, rather than having a €50 tip for the 3 to 5 years <S> you'll be happy with this model of soldering iron. <A> Silver has slightly better thermal conductivity than copper. <S> So on those terms alone it would be better, but only marginally so. <S> I don't know about other things like lifespan of the tip, etc. <S> A bit of googling found a 1924 Popular Science article praising such a silver tip. <S> Whether it's worth the significantly higher cost is a different matter though. <S> There is one other issue to consider: whether a silver tip will have good wetting action with the solder normally used in electronics. <S> Wetting action increases the surface area used for thermal contact between the tip and target material[s]. <S> I don't do silver brazing (or use silver wires), so I'm not entirely sure about this, but a bit of searching suggests that the alloys used to optimally solder silver <S> are different than for copper. <S> So wetting action of a silver tip with tin-based solder might not be so good, possibly negating the slight advantage silver has in thermal conductivity through the tip alone. <A> Have you seen this video ? <S> If anyone, Dave knows what he's talking about. <S> Soldering isn't only about what tip you use but many other things as well. <S> You can use the most fancy-schmancy silver tip ever <S> but if you set thetemperature incorrectly or use the wrong solder, it's a waste of money. <S> As far as I know for general soldering no-one uses silver tips. <S> A copper tip is good enough but you need to use it properly and maintain it so that it will last a long time. <S> An oxidized tip will not be able to transfer the heat properly so you need to keep your tip in good shape. <S> In paractice the heat conductivity of copper is sufficient and I don't see why silver would improve on that. <S> What is important is thermal capacity, a small tip cannot transfer as much heat in a given time compared to a larger tip. <S> So choose the right tip for the job ! <A> Most modern soldering tips are plated with Iron over the entire area of the tip, with another material plated on top of the Iron at the front part of the tip where the solder is melted. <S> The Iron prevents the copper from oxidizing and corroding, while the additional plating layer used for soldering presents a surface that wets well with solder. <S> These plating materials allow the tip to have a MUCH longer lifetime than an unplated copper tip. <S> The combination of these plating materials will give the tip a silver appearance, especially in the area of the tip where the solder melts. <S> Both Weller and Metcal have great descriptions of the plating materials used on their tips. <A> Just buy a tip from a good brand and you will be good to go. <S> You really do not need to worry about the coating or metal. <S> One important thing would be to have a welding tip cleaner (steel wire ball) ready at hand so that the oxide can be removed when needed. <S> As a bonus I have pointed out some general good advice below: <S> Soldering station Soldering tip (one small and one big) Soldering wire (60/40 Rosin Core). <S> According to me, the diameter does not matter much. <S> If soldering tiny SMD parts the flux will keep the solder from bridging over pins and will dispense the solder evenly. <S> Rosin/Resin flux (gel) <S> A high quality soldering wick (a pump could be handy as well if large amount of solder should be removed) <S> Keep the soldering iron at the temperature you need to be at, given the situation at hand. <S> I usually have mine at approx. <S> 350C and that works fine most of the time for smd work. <S> Don't be shy when it comes to crank up the temperature if needed. <S> This does not cost much and you will solder like a god. <A> It never got corroded or wasted for a long time, and it was always clean and wetted.
The best tip I have ever used, was made of copper-silver alloy (I don't know the ratio). Get yourself a good standard tip that has been primed with the proper coating, such as tips from the major brands (that usually only fit the major brands of soldering gear well, tbh).
Why do ICs have NC (No Connection or No Function) pins? In case they have no use to the end users and have no function, why are they given as pins instead of being just closed? Some ICs have even 4-5 NC continuously (in accordance to their pin number). <Q> There can be several reasons. <S> It is easier/cheaper to use standard packages than custom ones. <S> So if you need 4 pins, but there is a standard package with 5, you have one spare. <S> With large packages you can have many spare pins. <S> Removing the pins or designing a package with a custom number of pins would be very costly in terms of set-up. <S> They may have been used during development/testing <S> You might have different versions of the same series part. <S> Some in that series might have more pins than others, so <S> The chip manufacturers packaging factory may only support a few different packages, so there may not be one available with the correct number of pins, so you go up a size. <S> There are probably many more, but my fingers are tired. <S> You may then ask, why not just connect them to something? <S> Well, that requires more time wire bonding. <S> It also means an increase in silicon size if you have to add the additional bond pads to the die. <S> There may be performance related issues with bonding the extra pins (stubs in high frequency circuits?). <S> And so on. <A> It's unclear what the alternative being proposed here is, but say an IC wants to sell in DIP8 format, but only needs 5-7 pins, some will remain "NC". <S> There's no economic incentive to cut them out. <S> Furthermore, doing that would physically destabilize the package. <S> There are of course different packages in which one such IC can be sold. <S> A great example is TL431, which only needs 3 pins, but is sold in a variety of packages to suit customer demands (up to 8 pins). <S> You'll see in the image below that in some packages several pins are used for a given function (duplicated) to increase allowable current etc. <S> So that's one alternative for "NC". <S> Here's another <S> (perhaps even more interesting) example, <S> the TOP254 <S> which is both an example of pin duplication, and of the [rare] pin removal (in the DIP package[s]). <S> The duplication is again done for the same reasons mentioned before. <S> The pin removal between C and D is to increase safety by maximizing distance (creepage and clearance). <S> This an SMPS controller with integrated main switch. <S> Between its D pin and everything else you [periodically] have hundreds of volts of rectified mains voltage. <S> The datasheet even lists this among its features: Extended creepage between DRAIN and all other pins improves field reliability <A> In addition to the other good reasons listed, I know that NC pins are sometimes also used when: <S> The die will not fit into a package with the appropriate number of pins. <S> The next larger (standard) package is used, resulting in unused pins. <S> This could easily result in multiple adjacent NC pins since the larger package may have many extra pins. <S> Adjacent pins are too close together to meet high voltage spacing requirements, so a NC pin is used between them. <A> In addition to the reasons already given, NC pins are sometimes used to provide somewhere to attach guard traces to. <S> On some small fine pitch packages it's difficult to get PCB traces between the pins to provide guard rings as required on very high impedance, low current inputs. <S> Some manufacturers will place NC pins beside inputs that might need a guard - Analog and Linear both do this on some of their low bias current Op-Amps. <S> NC in this case meaning Not internally Connected. <A> Here's one that might be a bit less known: <S> Often you'll have many devices that are the same devices with different channels. <S> There will be a part that has 4, 6, 8 outputs of something, but are all offered in similar if not the same package, probably even the same pinout. <S> What happens is, the silicon for the 4 output devices is the exact same as in an 8 output, except 4 pins are just labeled "NC" on the datasheet! <S> Not all parts or manufacturers do this, but it is definitely something that happens. <S> You might ask then, why would anybody buy the part with more outputs than less if it's the same die? <S> The reason comes out to be what the manufacturer of the chip guarantees and tests. <S> A 6-output part could very well work the same as an 8-output part with the 2 NCs being in reality 2 outputs, but if the manufacturer doesn't stand by and guarantee those "NC outputs", then nobody will realistically ever use it in products intended to be sold to the market.
the ones with fewer pins have N/C's You might want an oversize package for thermal performance (or size of die), and as a result you end up picking a package with more pins than you need.
Can I use a transistor and a relay in conjunction to control the speed and directional rotation of a brushed motor? The title says it all. I'm working on a project that requires me to power a brushed DC motor that can reverse directions and change speeds. Everything is controlled by Arduino, but an external battery powers the motor. The Arduino steps in between in order to control power flowing to the motor. I'm new to electronics and this is my first project, so I'm hoping for some guidance from the EE community here. Is my approach of using a MOSFET to control the speed of the motor and a relay (since it can reverse voltage) to control the direction a reasonable one? How would this look in a circuit diagram if it could work at all? I hope this is sufficient information, but if you need more details, please most a comment and I will elaborate. If you have any other approaches you'd like to share, please do. Edit: The suggested duplicate "question" doesn't help me or answer my question because I don't see a question and I don't see how the answers address every part of the question I'm asking here. My main question specifically asks if I can use a transistor and a relay in the same circuit to control the direction and speed of a motor. I'd also like to know how I could implement this by seeing a circuit diagram. <Q> Yes, you can use a relay for direction reversing of a brushed DC motor. <S> It would use a DPDT relay as shown in the diagram below. <S> The duty cycle of the PWM would control the motor speed. <S> With the proper selection of MOSFET you would be able to drive the MOSFET from the PWM output from your Arduino. <S> The direction relay coil is shown as using the same voltage as that used to power the motor. <S> If the relay coil was a different voltage it could be connected to a separate voltage rail. <A> You can. <S> Like Michael Karas suggested. <S> But more common way is to use full bridge or special motor driving IC, which in turn includes that bridge. <S> That will work smoother than relay, and will remain more reliable and silent than the relay. <A> Since, your in school, it would be more beneficial to use an H-bridge, they are easy to control with a microcontroller <S> and I think you learn more than just buying a motor driver. <S> This one takes two signals from an Uno. <S> Signal Definitions <S> A_C5V_L: This is signal generated by the controller, the motor object writes this signal. <S> B_C5V_L: This is signal generated by the controller, the motor object writes this signal. <S> 12V or the variable voltage: <S> Is generated from the power board and can be varied using a screw driver GND is grounded to the power boardReference table which describes operation of circuit Speed Control (Pulse Width Modulation): <S> In addition, to applying the constant variable voltage generated by the switching regulator in the power board, if one applies a square wave to <S> A_C5V_L or B_C5V_L the voltage that the armature of the motor sees will effectively be lower. <S> Where the voltage is approximately: V = (Variable Voltage) <S> x (duty cycle %) <S> /100. <S> Hence, this is how the open loop speed control of the motor functions. <S> Below is a possible PCB board design: <S> Print Circuit Board Manufacture was used for 2 reasons: <S> Print Circuit Boards are light in comparison to breadboards. <S> Using PCB boards satisfies the weight design constraint <S> Print Circuit Boards eliminate the need for hundreds of wires and reduce fabrication time by automating the process Obviously, you would need to refit these to your own application.
And yes, at the same time you can use an N-Channel MOSFET transistor to control the speed of the motor by driving the MOSFET with a high speed PWM signal.
Converting voltage reading from temperature sensor into Celcius I'm learning how to read temperature reading from a sensor from this tutorial . The code (Arduino) to convert from voltage reading into temperature is as follow. float temperatureC = (voltage - 0.5) * 100 ; // Converting to degrees I wonder why the formula has to be like this, the numbers and stuffs. Is it different from sensors to sensors? If I buy a temperature sensor, does it come with a specification on how derive temperature from voltage reading? <Q> Typically for electronic components, there is a datasheet available which explains most of the stuff you need to know. <S> The TMP36 isn't different in that regard. <S> So the datasheet is published by Analog Devices . <S> In it you will fine important ratings like which supply voltage range the device is made for (2.7V - 5.5V). <S> And of course there is a specification on the behavior of the temperature sensor. <S> Table 4 on page 8 gives us the values you find in your code: <S> Offset voltage: 0.5V and Output <S> scaling: <S> 10mV/°C <S> Which is what you are calculating. <S> Every sensor will be different and every will come with it's own specification. <S> There are temperature sensors around with a digital interface, so you might have to do no conversion at all or have to calculate a strange polynomial function to get to the temperature. <S> I think the tutorial is a bit lacking in not telling you that there is a datasheet available. <S> Datasheets are one of the most important things for engineers. <S> More complex devices (like a microcontroller) often come with a reference manual which covers the same stuff for all devices of a family <S> and then there is a datasheet for each of the devices (or small family of devices). <A> The datasheet will give you either an expression that shows how the output voltage as a function of temperature or it will give you a graph in which case, you have to work out what the expression is. <A> The output voltage vs temperature characteristic certainly will vary between different types of temperature sensors. <S> You will have to study the datasheet for the particular type of sensor you intend to use to determine the appropriate calculation to convert the voltage to temperature. <S> Also, the count returned by the microcontroller's ADC for a given voltage will vary depending on the ADC's voltage reference and number of bits - this also will afffect the required calculation.
Every different sensor will be different.
Can one circuit only compute one boolean function? Can one circuit (with fixed position of gates and wires) only compute one boolean function? <Q> No. <S> There are lots of examples of circuit that can be reconfigured to compute different boolean functions at different times. <S> ALU : (arithmatic logic unit) has some inputs that determine an op-code which selects different operations to perform on the other inputs. <S> Multiplexer : Can be used to implement arbitrary logic functions on some inputs, depending on the inputs to other inputs. <S> SRAM : <S> (static random access memory) can be programmed to implement arbitrary logic functions on the inputs applied to its address pins. <S> EEPROM : <S> (electrically-erasable programmable read-only memory) can be used to implement arbitrary logic functions like an SRAM, but doesn't lose its program when not powered. <S> FPGA : <S> (field programmable gate array) <S> The king of programmable logic, can be programmed to implement very complex logic on very large numbers of inputs, as well as implement state machines. <S> Internally, an FPGA is typically implemented using a large number of SRAMs. <S> CPLD : <S> (complex programmable logic device) nowadays usually just a small FPGA, earlier generations had a more rigid logic structure, but with more predictable behavior than FPGAs. <S> PAL , GAL : (programmable array logic and gate array logic) <S> Earlier generations of programmable logic, nowadays largely superseded by CPLDs. <A> Then the output is not a boolean function of the input. <S> one simple example of this is a flip-flop. <S> a more complex example is a computer. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> It would fairly trivial to construct a single circuit (not a single gate, but that's not what you said) that performs multiple logic functions. <S> For example, just take a 2-input AND gate, 2-input OR gate, and a 2-input XOR gate, and parallel each of their 2 inputs ( X and Y ). <S> Then run the three outputs to a 3:1 multiplexer. <S> You would need two control lines ( A and B ) to select the function, with the output appearing at Z . <S> Note that all three logic functions (AND, OR, XOR) are always being performed in parallel; the control lines just select which one of the three output lines to pick from. <S> A B 0 <S> 0 do nothing (0 output) 0 <S> 1 AND 1 <S> 0 <S> OR <S> 1 <S> 1 <S> XOR A=0, B=1 (AND) A=1, <S> B=0 (OR) A=1, B=1 (XOR) <S> X <S> Y Z <S> X <S> Y Z <S> X <S> Y <S> Z 0 <S> 0 <S> 0 <S> 0 <S> 0 <S> 0 <S> 0 <S> 0 <S> 0 <S> 0 <S> 1 <S> 0 <S> 0 <S> 1 <S> 1 0 <S> 1 <S> 1 <S> 1 <S> 0 <S> 0 <S> 1 <S> 0 <S> 1 1 <S> 0 <S> 1 <S> 1 <S> 1 <S> 1 1 <S> 1 <S> 1 <S> 1 <S> 1 <S> 0 <S> This is sort of the way <S> a 1-bit slice of an ALU (arithmetic logic unit) works, except the control lines for it don't necessarily correspond directly to the basic logic functions -- <S> see my answer here for more info and a schematic.
No, you can loop the logic back on itself an create a circuit with internal state.
Amplify signal with extremely low S/N-ratio Is it possible electronically to amplify an expected signal with a S/N close to 1, or 1? If yes, how? I already tried to use an Lock-In-Amplifier, but that was not useful after the noise itself is also chopped. Are there other possibilities? Clarification: I have a photo multiplier tube which detects reflected light (shape is depending on sample which reflects light). The noise is the dark current. If I reduce the light on the sample, the dark current goes down, but so does the signal. If I reduce the amount of reflected light by slits, both signals are also going down. The dark current is random, and therefore not predictable. Concerning the signal itself: I do not know where I can expect the signal, and I do not know the shape of the signal. <Q> I'm guessing that is not what you want. <S> Fundamentally if you want to measure a signal of similar magnitude to the noise you have to know something about the signal. <S> The more you know about the signal the more you can design a system to measure it while reducing the impact of the noise. <S> If you want more help you are going to have to give us more information about your signal. <A> Yes, it is possible to amplify a signal, regardless of its S/N ratio, however, you will also be amplifying the noise. <S> With a perfect noise-free amplifier, you will be able to maintain the SNR. <S> With any real amplifier, the SNR will be degraded somewhat. <S> As a first step in improving things, you must make your detector as narrow band as possible with a bandpass filter, to reduce the noise power, while maintaining the signal power. <S> This improves the SNR compared to a wideband detector, an example of which is an oscilloscope trace. <S> A lock-in amplifier is a method of reducing the noise bandwidth of the detector system to a much higher degree than is possible with a simple bandpass filter. <S> Where the signal is periodic, the noise bandwidth can be reduced, almost arbitrarily reduced if you average for long enough. <S> When the signal is wider band, and the noise power reduction of a lock-in amp cannot be used, you can still use correlation, at least if the signal waveform is known. <S> In a way, this is just a generalisation of the principle of the lock-in amp, which can only correlate with periodic signals. <A> If you're talking about a signal where a lock-in might be useful, you might consider whether ensemble averaging techniques would give you a grip on this problem. <S> If you're measuring a noisy response to a well-defined stimulus, you can average in time, locking onto the stimulus to line up the epochs. <S> The noise goes down by \$ \sqrt{N} \$ for N ensembles in your data set.
Of course you can amplify the signal but in doing so you will also amplify the noise.
How does a forward biased diode conduct electricity? I am having a hard time imagining the flow of current through the p-n junction.When a diode is forward biased, the holes on one side of the barrier and electrons from the other side try to cross the barrier. But as soon as they do, shouldn't the electrons fall into holes and fill them, making a neutral entity just like the barrier in the first place? How does the current flow then? How do the holes and electrons cross over without fusing into each other? <Q> An electron "falling into a hole" generates two ions, an anion in the P-type material and a cation in the N-type material. <S> The conduction occurs when the ion forces an electron out/draws an electron in with the assistance of an external electromotive force in in order to restore the ionically neutral rest state of the semiconductor material. <A> It is assumed that you have a voltage source that tries to keep the same voltage drop over the diode. <S> In other words, the voltage source continues to shove electrons and holes into the diode. <A> When you apply a bias, majority carriers cross the junction due to a reduction in the potential barrier. <S> On reaching the other side, they become minority carriers. <S> At near the depletion region edges, the minority carriers are in excess. <S> It is true that the minority carriers then begin to recombine as they travel along the semiconductor. <S> This leads to a concentration gradient of the minority carriers between the depletion edge and the end-contact. <S> With this concentration gradient, the minority carriers begin to diffuse along the semiconductor towards the end contact, creating a diffusion current. <S> I believe this is where your question comes in. <S> This diffusion current is approximately 0 at the end contact. <S> What happens is, the current throughout the semiconductor must be constant and equal to the current flowing into it. <S> The decrease in diffusion current is therefore made up for by a rise in majority carrier drift current. <S> So yes, they do "fuse into each other". <S> But because the majority carrier concentration is so much greater than the minority carrier concentration, the decrease in minority carrier current near the end contacts is made up for by the majority carriers. <S> I hope this is sufficiently clear.
Please note that electrons going in one direction is the equivalent of holes going in the other direction (a hole is created by sucking out an electron), so there is indeed a current flowing.
7404N and high output Simple question: Is it OK for the output pins to be high? I want to use the 7401N together with a 74LS138 to do memory address decoding. I will connect two Yx pins to two two separate input pins on the 7404N. From here the two output pins from the 7404N will be connected to the same pin on my Micro-Kim (the /DEN pin). Will that fry the 7404N? simulate this circuit – Schematic created using CircuitLab Regards, Jacob <Q> What you are doing with the two outputs is not okay. <S> Basically if one of them wants to be high and the other wants to be low, they will compete and force limiting currents through each other, very likely damaging them, because you cannot guarantee in any case that they will go high or low at the same time, since then you'd have to tie both inputs together as well. <S> Depending on what you want to do exactly (not sufficiently clearly specified for me), in the sense of combining them you need OR, or AND, or NOR, or NAND gates, or diodes and/or transistors to do that for you. <A> No that won't work. <S> You should combine them with some sort of logic function eg 'Or' 7432, 'And' 7408 or similar. <A> I don't think it'll fry anything, but since 7404s aren't open-collector gates, if you connect two outputs together and they're not both high or low at the same time, the output logic level will be undefined and can't be guaranteed to be either a 1 or a zero. <S> Following is the 7404 schematic from TI's data sheet <S> so you can see what's going on in there, and what logic function do you want to implement? <S> Or, better yet, can you complete this truth table? <S> : <A> You can use a 7407 instead of the 7404. <S> The 7407 has open-collector outputs. <S> Tying the two outputs together in this fashion is called a " wired-or " or " wired-and " depending on the polarity of the signals (the latter in this case, because the outputs of the '138 are active low). <S> So there won't be a conflict if one output of the 7407 is high and the other is low. <S> With the 7404, this situation would cause a short since +5 would be connected directly to ground. <S> You will want to add a pullup resistor to the output line to +5V to provide the high level.
You can't wire two outputs together like that.
Speaker Frequency Range and Frequency Response What is the difference between frequency response and frequency range of a speaker? How do we measure frequency range and frequency response? <Q> Frequency range is a largely useless marketing term. <S> Frequency response is a real engineering term. <S> It tells you the input voltage to output sound power across the audio frequency range (20 Hz to 20 kHz). <S> From that you can decide what "frequency range" the speaker has, but based on the parameters you actually care about. <S> For example, for demanding high end audio applications, you might want the frequency response to be within 3 dB of flat. <S> You look at the frequency response graph and see over what frequency range that is true for. <S> On the other hand, if this is a less demanding application, like a public address system, you might care more about efficiency or maximum sound output power within some distortion limit. <S> To summarize, frequency response is the raw facts. <S> Frequency range is someone else looking at the raw facts, deciding what's important or what they can get away with, and telling you the min/max frequency the speaker is good for, whatever "good" means. <A> Frequency response is the more practical/useful value because it tells you the "range" but within certain criteria i.e. 40 Hz to 18 kHz +/- <S> 3dB. <S> The +/- <S> 3 dB is important because if the speaker spec just said 40 Hz to 18 kHz <S> you wouldn't know that the loudness wasn't down by 30 dB at the end points of the spectrum. <S> Neither would you know that within the pass-band there wasn't some really bad resonant point that would make listening to music an obscene act! <S> Just specifying a range is meaningless. <S> You need SPL (sound pressure level) versus frequency and if you can get a graph all the better: - An SPL frequency response tells you that a speaker can deliver a certain loudness as well telling you how "flat" the response is in the passband. <S> See <S> this for extra info. <A> Regarding measurement, there are various standards, e.g. quoting a summary of IEC 268-5 (more recently renamed IEC 60268-5): 1) <S> The frequency response of the loudspeaker is measured along the reference axis using a sine signal. <S> 2) <S> At the maximum sound pressure level, the volume level is averaged at one octave. <S> This mean output level is termed the sensitivity. <S> 3) <S> Dips in the frequency response narrower than 1/9 of an octave can be discounted. <S> Also notable in this regard <S> [measurement] is the [US] AES2-2012 standard. <S> This is a bit too long to summarize here because it concerns the components that go into a loudspeaker, with different procedures/recommendations for high vs low frequency drivers, enclosures etc. <S> You should also beware that manufacturer's measurements may include conditions that you surely don't have at home, for example, one loudspeaker datasheet has in <S> the fine print Frequency response and range measured on-axis with recommended active EQ in an anechoic environment <S> Anechoic environment is probably an anechoic chamber . <S> (These are pretty expensive, by the way.) <S> As for their "recommended active EQ", who knows... <S> but I suspect a way to get better stats. <S> I should add that on-axis response, while a useful measure, if by no meansa complete charcterization of a loudspeaker. <S> The off-axis response matters quite a bit in practice, and for consumer devices this is hardly ever detailed (or even summarized)... <S> the reason being that it would take a small book to do it (in detail) and the summarization methods require a bit of expertise to interpret. <S> The 3D graph shown below is hard to interpret without being able to rotate it interactively etc., <S> so that's usually not what you get, even for professional product, but <S> instead you get a series of cross-sectional (sometimes polar in the angle) plots at some frequencies. <S> One can argue that manufacturers could make detailed available on the internet, but alas they don't. <S> Also note that this example includes only one (plane) angle, actual 3D characterization needs two angles (vertical and horizontal), so that's 4D data. <S> For datasheet examples that are somewhat decent in terms of providing this kind of off-axis data (in cross-sectional form), you can look at DAS . <S> By no means the norm though for consumer products.
The frequency response is given as the range of frequencies at which the volume level of the loudspeaker drops 10 dB below the sensitivity level.
Gas engine on a robot: Is is possible? Is it a good idea? For a college project, a group of us are trying to design a remote controlled snowblower. We want to go with a battery and a gas engine basically like a car. Our logic for this was batteries wouldn't last long enough without being too large/heavy/costly and an electric cord would probably get tangled and cut and might not be long enough. We have some MechEs working on the mechanics of the thing but us EEs got stuck with the drivetrain and control side. I've worked with robotics before (FIRST FRC in highschool and other college stuff) but I've never touched a gas engine of any sort. I'm having a little trouble with finding information on this topic and I expect its because I'm just not searching for the right things. I'm wondering if anyone here has worked on systems like this in the past and can offer advice on where to start, any important things to consider or just general comments on the project. Thank you! <Q> Something like this from walmart is a good example of something you could use, and it even has a handy 12VDC output, 1000 Watts max generator with a 4L fuel tank. <S> Please be aware that the 12VDC output only has 8.3A available, meaning it's only 100W. <S> Your next bet to use more of the power from this would be to use a 1000W <S> AC->DC converter (which you would need to buy) to get the most out of it. <S> The 12VDC can go to an automotive SLA battery bank too. <S> The alternator DC output goes to the 12V automotive SLA battery bank on your mobile machine. <S> The alternator will charge the batteries, while the batteries and also power directly from the alternator (unless you use some diodes to block this from happening) can go to power whatever you want in your robotic snowblower. <S> Any converter you use should be automotive rated, and should be able to handle the crazy noise and over voltage spikes on the output of the alternator. <A> Well power wise you could use an alternator but for a college project that might be overkill. <S> I'd start with one or two of those little 6V batteries they use for riding lawnmowers (or motorcylces). <S> That solves your power problem for the electronics. <S> Then assuming you are working with your mechanical guys you'll want some form of electronic clutch like the one in this link Also googling "robot electronic clutch" brought up a bunch more results. <S> Something like that on both rear tires would give you forward, backwards and turning ability. <S> That's just an example, you could use any combination of electric motors, solenoids, or whatever to achieve the same effect. <S> Basically you're just trying to build an electro mechanical linkage. <S> I'm reminded of an old self propelled lawnmower that just lowered geared teeth onto the tracks of the rear wheels when it wanted to move forward. <S> You could easily automate something like that with a pair of motors. <S> Anyway just some ideas to get you going. <S> If I was doing the project that's how I'd think about it. <S> Where am I getting power from <S> , how can I control the wheels for forward, backward, steering and idle, then I'd move on to sensors and navigation once I had my underlying platform working. <S> In fact I wouldn't even worry too much about the control electronics until I could manually get this to work. <S> Although depending on your team size maybe someone can work on control while someone else brings up the drive train. <S> Just like a real engineering project :) <A> Not much beats the energy density of gasoline <S> so it makes a lot of sense. <S> For indoor testing, use the actual mains through an umbilical.
Otherwise, you can try to do it from a motor and alternator:Just get a small 2 stroke motor/generator, and bolt it to your machine, and the drive train output goes directly to an alternator (you can buy these or salvage from a car). You can buy a small gas powered generator for about $100 and just use it like it was mains power (limited to maybe 700-800W).
Altium Issue: PCB Switch Pad Nets for Rubber Button I am currently trying to create a component in Altium for a rubber keypad switch. This will be like the ones in TV remotes etc where there are a mesh of fingers connected when the conductive pill makes contacts with both sides. Having read the following design guide , I have come up with a PCB pattern The issue I'm having is when I place this component on the PCB. The nets for both sides of the component only show one net: There is a clearance issue on the left is where the pin has been placed and the nets colliding. Any suggestions for solutions would be much appreciated. <Q> If you name the pads for each side of the switch using the same designator, they will appear as being on the same net. <S> It doesn't look like you used pads at all, though. <S> When you create a component like this you need to start with an actual pad, then draw traces extending from it <S> (this is all in the PCB footprint library). <S> You seem to have just traces. <A> One would have to be moved so that it is intersecting with the added copper associated with the other switch connection. <A> The footprint was being placed upon a board which already had tracks upon it. <S> The tracks which crossed the PCB component caused the nets to be incorrectly assigned.
It looks to me like you have the connection pads for the two component terminals nearly on top of each other. In your PCB footprint pattern you need to make sure that each side has its own pad and number.
Small and cheap pcb-to-pcb connection I'm looking for a smart way to connect two PCB's in a cheap manner. I would prefer not to use any external components for the connection (if possible). The PCB's are rather small (20 x 20 mm). Do you have any idea? Best Regards,Andreas <Q> If you need a permanent joint, and you need this to be mass-produced, but you care about space (no room for a connector) or cost (connector is too expensive), you could use hot bar soldering . <S> The idea is that a flat cable (usually a special kind of flex pcb) is pressed down by the hot bar so that it makes all the connections at once. <S> Example: <S> https://electronics.stackexchange.com/a/3098/26394 <S> If you can overlap the boards (ie: they don't absolutely have to connect edge to edge like puzzle pieces, but the edges can overlap like shingles), you could use z-axis adhesive . <A> What do you consider "External"? <S> The most common use I have seen is PCI-e connectors in computers. <S> The cards have pads on them and the motherboard has the connectors. <S> That's really your best option. <S> I wouldn't try connecting bare PCBs together, there would be a lot of stress on the joint and you might rip up pads. <A> You can use a DB-25 plug and a DB-25 socket. <S> https://en.wikipedia.org/wiki/D-subminiature <A> It looks as though you're designing a jigsaw like electronics kit. <S> In that case try (1) right-angled pin-headers - pins on one side and sockets on the other both lying parallel to the PCBs. <S> They may take up too much PCB area though, given the 20 x 20 mm dimensions. <S> Any standard edge connector will get in the way of the interlocking bumps on the PCBs.
Usually this type of connection is called "Card-edge", and it uses a special socket mounted on one of the boards, and the other board has pads located just perfectly on the edge of the PCB.