source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
What is the difference between a resistor and a heating element? As far as I know, a resistor and a heating element are the same thing.But one, the resistor, seems to limit the current in the circuitwhile the other, the heating element, draws more current and converts it to heat. One wastes watts and the other doesn't, yet they are both resistors. What is the difference between a resistor and a heating element? <Q> A resistor and a heating element are indeed the same thing, just designed for different jobs. <S> In fact, resistors can be used as heating elements! <S> I've seen at least one ovenized oscillator (where a tiny oven is used to keep one component at a very specific temperature) that simply used a resistor as the heating element. <S> One difference that does exist, though, is that heating elements are generally made of materials that will work at higher temperatures. <S> They're supposed to get hot, after all! <S> Resistors usually aren't as heatproof. <A> They have most characteristics the same, but the OP is interested in the difference between them. <S> Short answer: Thermal stability. <S> The major difference in characteristics between a resistor and a heating element is that resistors are designed from a material standpoint to have a low thermal resistance change. <S> That is, resistors maintain as constant a resistance to current as possible throughout their operating range. <S> Heating elements have no such requirement, so their resistance can and does vary a lot with current. <S> For a lot of heating elements, its resistance will appear to be nearly a short at room temperature. <S> As current goes through it and it heats up, its resistance increases. <A> A heating element is a resistor tuned to produce as much heat as possible when current is passing through it. <S> When current passes through a resistor, there are losses defined as: $$P(Watt) = <S> IR^2$$ <S> Typically in a circuit, these losses are undesired and in portable electronics mean a loss of maximum battery life. <S> So, in a heating element they are designed to produce as much heat per watt of loss in the resistor; in a conventional circuit, they are designed to have low of losses as possible.
In a resistor, heat is generated as an undesired (but unavoidable) side effect, whereas in a heating element, the heat is exactly what it's supposed to do.
Wet Sponge or Brass Sponge for solder tip cleaning? There seems to be a lot of differing opinions out there on what is best practice. A lot of people seem to be shying away from the wet sponge due to the thermal stress it imposes on the tip. I have personally always used the brass sponge only, but my Hakko station came with both a "wet" sponge and a brass sponge for cleaning. What are the differences between the two cleaning devices? How should I decide which one to use given the type of work I do? <Q> Wet sponge: Cheaper, less abrasive. <S> Brass wool: Removes "debris" better, smaller thermal shock ( <S> drop of temperature can be more of an issue than cracks/wear depending on your iron), you don't have to pour water whenever you start soldering. <A> I didn't know the rationale for brass until a decade ago. <S> The story goes "wet sponge thermal shock cracks the iron plating eventually, then the tip fails" <S> I think my tips have lasted much longer since using brass sponge. <S> It is every bit as good at cleaning the tip as sponge. <S> I do find I use the hakko tip cleaner button far more with lead-free solders than was needed with tin-lead. <A> Here's a huge con I've noticed when using brass wool: <S> When pressing the iron into the brass, it gives/bends. <S> When you pull away, the brass then springs back into place. <S> Why is that bad? <S> Because there may be hot, liquid metal on that brass! <S> There is a potential hazard to both the project you are working on (think small, unseen shorts), or a safety issue to the face. <S> I have personally seen my brass wool fling solder into the air and splash onto a PCB of mine. <S> I've stopped using it ever since. <S> Even if I try to be careful, I don't see it worth the risk when the sponge works well enough. <A> What are the differences between the two cleaning devices? <S> How should I decide which one to use given the type of work I do? <S> When you have a lot of flux or contaminates, a wet sponge cleans it quickly. <S> The brass sponge is ok, but it seems you do have to train it <S> so it doesn't splatter the solder, but stabbing motions into it seem to not splatter the solder compared to just laying it on top of it and rolling the iron like you do on a wet sponge. <S> I know some people adopted the rule no-clean : brass sponge and flux and low flux: wet sponge. <S> Their reasoning behind it was the flux accumulates in the brass sponge where it washes away with the wet sponge. <S> Either way, it doesn't matter to me personally as long as it works. <A> I didn't consider this an answer, but here's what life taught me so far (as per recommendation from @pipe) <S> : I think it's a matter of preference, however, I have to say that I have never, ever, seen a cracked tip due to wet sponge. <S> That doesn't mean that it can't happen. <S> Brass sponge isn't prefect, either, as it may wear out your tip faster due to being more abrasive, but this, too, I haven't seen in practise (but it's also true <S> I <S> I haven't seen more than a few). <S> When in doubt, test for yourself, that's the best way to find out any answer. <A> Tips cost less than the time wasted on fighting with tools that don't work well. <S> Thermal stress cracks vs abrasion are ultimately completely irrelevant. <S> Bottom line is that brass is easier, faster, always ready, and cleans the tip better. <S> I've never seen a tip fail due to reasons <S> that I could confidently blame on a wet sponge or brass. <S> But even if brass conclusively caused a tip to wear down 10x <S> faster I would still use it. <S> Make sure you consider all the costs, including your time and work quality, when making a decision.
I personally prefer the brass wool, cleans better, no water pouring, doesnt affect the temperature of the tool so much (although it still drops it a bit).
Why do fuses have a maximum breaking capacity? Wikipedia told me that breaking capacity is the maximum current that can safely be interrupted by the fuse. I don’t understand why, if a small current can blow the fuse, a bigger current can’t. If the current which is bigger than breaking capacity will cause arc, why a small current with the same voltage won’t? <Q> To elaborate a bit on the answer by Neil_UK... <S> At a modest overload, the fuse wire will melt at its weakest point, and break the current. <S> At a larger overload, an arc will form across the ends of the broken wire. <S> This arc will persist until more wire has melted and the gap is too long to sustain the arc. <S> At a massive overload, the wire will vaporize. <S> The metal vapor will support an arc running the entire length of the fuse. <S> This arc will persist until either something else breaks the current, or the fuse goes bang. <S> High current fuses are often sand-filled to help quench the arc, and have hard ceramic bodies, rather than glass, to resist the explosion. <S> Addendum, after some comments on the question and the other answer. <S> Ideally, the fuse should be rated to break the maximum prospective fault current for the circuit it's protecting. <S> That is, the maximum current that could flow if you put a dead short across the output of the fuse, taking into account the size of the supply transformer and all of the cabling back to that transformer. <S> Sometimes that isn't practical, and you have to rely on upstream fuses blowing in the most extreme short-circuit cases. <S> That can be acceptable if you know that the upstream fuse will blow before the downstream one fails catastrophically. <A> I don’t understand that if a small current can blow the fuse, why a bigger current can’t. <S> The question is, what happens after that? <S> If the fuse is too small, so the current it's trying to interrupt is above its maximum current rating, then the arc may fail to quench, and continue to conduct for a long time after it should have 'blown'. <S> Fuses often contain materials to cool and extinguish the arc, sand for instance. <S> If more energy is dumped into it than it's designed to quench, then it won't quench. <S> In a more extreme failure mode, the fuse may physically explode. <A> Say, we have a 13 A fuse in a plug. <S> At <S> <13 A of continuous current - fuse won't blow; this is the range of current that the fuse can handle safely for an indefinite amount of time At 13-20 A of continuous overload current - fuse <S> won't blow but surrounding parts in the plug may overheat At 22 A of continuous overload current - fuse will blow within minutes to hours; a 13 A fuse will blow at an overload current about 1.6× its rated current <S> At 50 A of continuous overload current - fuse will blow within 0.1-20 seconds <S> At 400 A of fault current - fuse will blow in <0.04 seconds <S> At 3000 A of fault current - fuse will blow instantaneously; a 13 A fuse can blow safely up to 6000 A, otherwise known as its breaking capacity <S> At >6000 <S> A of fault current - fuse may explode or cause a dangerous electric arc
A bigger current will indeed melt the fuse wire.
Shift Register over long distances I am using a SN74HC165 Shift Register to read the signal from some switches. With the SN74HC165 Integrated Circuit near to the microcontroller the circuit below works perfectly. But physically I have to put the microcontroller at a distance of 2.5m from the IC. With this distance I'm losing some data, mainly the K8 signal. I am using pull-up resistors with the value of 10K. Would anyone know a way to improve this signal and avoid data loss at this distance? <Q> Have a look at the clock signal in particular on an oscilloscope at the IC end, chances are it is ringing like a bell and causing the SR to clock multiple times. <S> You can try a series resistor of about 50-100 ohms in series with the clock drive (near the microcontroller), but that's not ideal. <S> It would be better to use an LVDS differential driver and receiver and a properly terminated twisted pair, at least for the clock signal. <S> Failing that, slowing the clock with an RC and using a Schmitt trigger (since the SN74HC165 lacks a ST clock input) such as 74HC14 to clean up the clock at the other end should work, provided it's acceptable to run the clock at a much lower frequency. <A> I would try to lower the baudrate between MCU and IC, making CLK signal being of a low enough frequency. <S> Also, add delays between activation / deactivation of SH and CLK_INH signals and data transfer. <S> Doing that you will ensure that signals are propagated in a way that IC timings are respected. <A> If by losing some data, mainly the K8 signal <S> you mean the K8 tends to be incorrect, the situation seems very odd, since each bit in the sequence is treated identically, regardless of the distance. <S> K8 is the first bit to go out, so your received sequence should be [K8, K7, ..., K1] <S> If there is some timing problem (clock too early, too late), i.e. something to do with propagation delay, you would get something like [?, K8, K7, ..., K2] or [K7, K6, ..., K1, ?] <S> where ? <S> is some incorrectly sampled value. <S> I believe one of these is more likely than getting more errors is bit K8. <S> One potential problem, based on your diagram, is the missing ground connection of the microcontroller. <S> Does it run tightly coupled to the data lines? <S> Is not, you could have a huge inductance in your lines, which not only creates a low-pass filter (limiting your signal rise times and causing delay), but also creating large coupling between lines. <S> For example, a rising edge in one signal (i.e. the clock), could couple to another (i.e. the data). <S> Or vise versa. <S> The shift register could even clock itself with a logic transition of its output pins. <S> Try running all cables close to each other. <S> What about the supply voltage connection between the two ICs? <S> Are both IC's properly decoupled with a capacitor between VCC and ground? <S> If not, you could see a large voltage drop when logic transitions happen. <S> This could explain why you have a problem with the first bit and not the others. <S> The load signal reads in all bits at a time, which could cause a large voltage drop temporarily, affecting the first bit going out, but stabilizes after that. <S> Try increasing the decoupling capacitance between VCC and GND at both ICs. <A> I don't know what your signals look like on a scope, but when I have issues due to long wires and non-differential signals, often a simple 0.1µF cap from the long-distance signal to ground helps to decouple noise. <S> The optimal value of the cap can depend on the speeds/timing you need.
Most obvious explanation seems to be propagation time (loosing of data from K8 switch seems to confirm that). Wires resistance can also be an explanation.
Protect power supply from regenerative drive I am running a 3KW motor on a big 24Vdc power supply (Meanwell RST-5000), through a frequency drive.When stopping the motor, however, I occasionally get a regenerative backcurrent that trips the internal overvoltage protection in my power supply. The voltage ramps up to about 28.5V. The supply is protected against this, but it does have to be manually reset and breaks the workflow. What is a good solution to prevent this? Can I just hook up a big (+- 100Ah) Lead-acid battery in parallel to the power supply? Or will this give me other issues? Please keep in mind that there are huge currents involved (+- 125 A) <Q> I've implemented 3 solutions to this problem: <S> A capacitor bank sized large enough to absorb the worst-case regen energy without tripping the OVP. <S> In your case it might be expensive and huge, but has minimal losses. <S> A resistor bank with a comparator. <S> Also big, less expensive <S> but you waste the energy. <S> Easy to implement and the "standard" solution when a capacitor bank would be too big or expensive. <S> For really large regen energy that happens often, a grid-tie inverter that takes the regen energy and puts it back into the grid. <S> You may need a backup resistor bank in case <S> the transfer switch is down (due to power failure) to avoid damage or shutdown from large regen energy. <S> This is the most expensive and complicated solution but also has low losses. <A> Note that if your emergency stop is on the mains side of the supply, you may wish to think about the implications of the battery when it comes to stopping the thing. <A> In the end, I went with a 140Ah Lead-Acid battery bank, because we had that in stock and it was easiest to mount for me. <S> It is connected in parallel to the power supply, fused seperatly with a 200A slow blow fuse. <S> I let the system run on batteries only for a bit to drain them to +- 24V, and then switched on the power supply. <S> This has run for a full day without a single issue. <S> The batteries don't appear to get hot. <S> Thank you for the great advice though. <S> If I see an issue like this coming in the future, I will definitely consider the comperator/resistor aproach.
A braking resistor is the conventional answer, switched in by a mosfet and comparator arrangement when the bus voltage rises, but a 24V lead acid bank would probably work fine, just make sure the thing is fused and has a suitable float voltage set on the supply.
90 Degree Phase shift at few MHz I have a seemingly simple question but I've been doing a lot of searching and can't find an answer. What is a simple or standard way to achieve a 90 degree phase shift of an RF signal in the frequency range of ~1 MHz up to a few 10s or 100s of MHz? In the minicircuits catalog I see Hybrid couplers as low as 25 MHz so I would say 25 MHz and up is covered (though I don't know the cost) so the question can be narrowed down to how to achieve a 90 degree phase shift for a signal below 25 MHz? In particular, in my specific application I have a signal which can be fixed in the range of 1-3 MHz that I would like to shift by 90 degrees. The 90 degree shifter doesn't need to necessarily need to work over a very large frequency range. Ideas that I think would work but I don't know how well: putting in a time delay with a length of cable. This is a bit inconvenient because it's a long length of cable (~10 m or more) and I don't have incremental control over the phase shift. Put the signal through the stop band of a filter. This will give it a 90 degree phase shift but unfortunately it will also necessarily suppress the signal amplitude by a lot.. I've only thought about the case for a simple single pole filter Digitizing the signal, somehow implement the phase delay digitally, then re-synthesize an analog output. It seems like this should be something not too difficult, but in terms of commercial solutions I have only found products for higher frequency ranges. I can't tell if I can't find what I'm looking for because it's something so simple it's just not sold or if I'm searching for the wrong things or if there is some genuine difficulty with what I need. Any tips are appreciated! I am asking for potential use in a modulation transfer spectroscopy system in which I need to generate a phase modulated (at ~3 MHz) signal at 80 MHz and then subsequently demodulate to extract the phase quadrature of a new signal generated at the modulation frequency. Both the phase modulation and phase quadrature detection could be done with the assistance of a 90 degree phase shifter and mixers. edit: Clarification. I do NOT need a wideband phase shifter. I am curious about a general technique which could be used to phase shift a narrow band signal whose carrier may be anywhere in the range from 1-100 MHz. That is, say I have a narrowband 3 MHz signal. How can I give this a 90 degree phase shift? Say I have a narrowband 80 MHz signal. How can I give this a 90 degree phase shift? I do not need a wideband phase shifter. Apologies for the confusion. If different techniques are suitable for different frequencies within the range I have indicated then that is ok. I am at present most interested in a way to give a 90 degree phase shift to a signal which is like 3 MHz. <Q> If you are happy with feeding a signal into a "block" and getting two signals out that are 90 degrees apart <S> may I recommend this: - Select R = R1 = R2 = \$\sqrt{\frac{L}{C}}\$. <S> This ensures that OUT1 and OUT2 have a phase differential of 90 degrees across all frequencies. <S> The phase relationship between OUT1 and OUT2 is always 90 degrees but amplitudes do change with frequency as with any high-pass or low-pass fliter. <A> In my previous answer, I suggested using a PLL to lock onto a single tone signal; you commented, and that warrants a new answer, that: <S> My signal is not wideband. <S> I am saying suppose I have a narrowband signal at a given frequency somewhere in the range of 1-100 MHz. <S> How can I then give that narrow band signal a phase shift. <S> It is ok if the phase shift device needs to be tuned or constructed a differently for different frequencies within the range. <S> Anything having any significant bandwidth (i.e. anything but a slowly changing tone) can't be dealt with a PLL; you could do something like using an ADC to digitize the signal and then digitally do the phase shift, but really, that might not work either, due to latency restraints: to shift a 1 MHz signal by 90° will require a latency of at least half a 1 MHz period; in that time, 50 periods of your 100 MHz signal would have passed. <S> If you're OK with that latency, you can go digital (but that's an expensive solution). <S> Else, detect the center frequency (might be absolutely non-trivial), and use adjustable phase shifters (PIN diode ICs, for example), and make it so that the phase shift is approximately 90° around the center frequency. <S> I'm coming from a software defined radio background, <S> so <S> : Use a mixer to mix your band-limited signal down to a fixed frequency (an intermediate frequency (IF), this is a superhet, then, or to complex baseband, that's a direct receiver), and then mix it back up with a single tone and a 90 <S> ° shifted version of that tone. <S> (That, by the way, is effectively a quadrature mixer, and you'd be building a signal that's equivalent to a baseband signal with \$\Re(s)=\Im(s)\$. <S> Whatever <S> that is good for.) <A> If you need a phase shift across a band of frequencies , then you need a Hilbert transformer. <S> If you say, in your third point, that you are willing to do so, then I'm afraid that's your only way. <S> Any passive, or active filter will only add a 90 deg phase shift at a certain frequency. <S> Here's an example of what three frequencies will look like: <S> In your case, you'll need some DSP or some sort. <S> Again, if you don't have the possibility to tune the frequency in an analog way. <A> putting in a time delay with a length of cable. <S> This is a bit inconvenient because it's a long length of cable (~10 m or more) and I don't have incremental control over the phase shift. <S> You don't get a constant phase shift that way at all – the phase shift at \$f_0\$ will be \$\frac1{10}\$ of that at \$10f_0\$ and <S> What is a simple or standard way to achieve a 90 degree phase shift of an RF signal in the frequency range of ~1 MHz up to a few 10s or 100s of MHz? <S> Uhhhhh, that's more than ultra-wideband, by common definitions, because the bandwidth that you want to cover is much higher than the center frequency (of ca 50 MHz). <S> So, this is actually hard to do in the analog domain, and there's no real "simple" general way. <S> However, Andy showed up the appropriate way to go: <S> By combining two filters with "complementary" bode phase plots, you can get two signals that are 90° shifted over a large range of frequencies. <S> Things get a lot easier if your input isn't actually wideband, but a single tone at any single point in time: Then, you could just as well use a PLL to produce a 90° shifted version of that, but that doesn't work if your input actually is more than a clean tone. <A> The existing method of producing narrow band quadrature RF signals in Instrument Design over a wide rage spanning many decades is performed at a higher frequency and then mixed down. <S> This <S> so that the quadrature Local Oscillator (LO) only has to be generated over an octave with traditional RF methods above twice the maximum frequency rather than span many decades. <S> As it happens... I just found such a VNA instrument that fits your range. <S> This article describes a low-cost vector network analyzer thatoperates from 200 kHz to 100 MHz, and connects toa personal computer using a USB 1.1 interface. <S> The Analog Devices AD9854 DDS produces the quadrature outputs. <S> It is clocked by a 24 MHz sine wave; it then internally multiplies it up to 288 MHz with an on-chip PLL. <S> This 288 MHz internal signal clocks the DDS frequency-generation circuits and the digital-to-analog (DAC) circuits on the chip. <S> Significant aliasing of the output signal is observed on an oscillo scope even at an output frequency of less than 100 MHz. <S> The two low-pass filters, one on I and one on Q, remove most of these aliasing and stair-stepping artifacts and produce clean sinewaves in phase quadrature. <S> But I suggest you shop around for a used commercial VNA for calibrated results that meet your spectroscopy requirements.
Unless you have the option to tune that frequency, a Hilbert transformer is what you're looking for.
Electronic switch with high number of poles I have two cables each with 10 pins, that connects between two PCBs. I would like to be able to connect and disconnect them from each other. Something like this link to 10 pole mechanical switch , however instead of pressing manually I want to automate it. I have also looked into relay boards but have not found any that have several outputs and it would be too bulky having 20 relays. To clarify I need to connect/disconnect 20 pins with one signal, it is not necessary to be able to control them individually. The pins are used for SPI communication, however I was hoping to find something like this 4 pole relay but with 10 poles instead. We use this for testing purposes and not in the final design, as of now we manually disconnect the cable during each test. So I am looking for some already created device that can act as the "dis-connector". <Q> The solution to your problem depends on the signals being switched and since they are data signals - on data direction. <S> If you have many outputs and one input - use multiplexer (MUX): example of MUX . <S> If the data direction is not defined, use MUX/DEMUX: example of MUX/DEMUX . <S> These devices can be daisy-chained if the channel count is too low. <A> You can just connect the coils of 5 DPDT relays in parallel and control it with one signal. <S> Eg. <S> Omron G6K . <S> 12V coil, 5 in parallel only draws 45mA. 4.5V coil 116mA. <S> That would do the same thing as the switch (select one of two to be connected x 10). <S> But if your signals are digital SPI signals you might want to use digital tristate buffers, multiplexers or something like that- <S> it seems like your problem is poorly defined. <A> Why not use a bidirectional buffer/transceiver chip? <S> For example, the 74LCX16245 is a 16-bit 5v bidirectional buffer with an Enable line. <S> You can use the enable line to "turn on" and "turn off" the inputs or outputs. <S> Two of these chips would provide more than enough IO pins for your need. <S> If you have both inputs and outputs, you can use one chip for input pins and the other for outputs, then they both can be enabled/disabled with a single pin. <S> IMPORTANT: <S> the above chip requires you to set the data direction manually using the direction pin. <S> While this will work if you already know the direction of data flow, you may also want to consider an auto-sensing bidirectional bus transceiver such as the TI <S> TXB0104 or similar device. <S> The only problem is that these are designed to translate 3.3V to 5V signals. <S> One side can only accept up to 3.3V inputs, so you may be able to use a simple voltage divider for that. <S> However, it won't boost the 3.3v output back up to 5V for the other direction. <S> I hope this at least points you in the right direction.
If you have one output and many inputs - use demultiplexer (DEMUX).
Why does my LED not blow out when overpowered by my Arduino? I have a standard 5mm RGB LED that I have connected to the digital pwm pins of my Arduino Nano and I am using a potentiometer at one of the analog inputs to change the hue of the LED. My code isn't adjusted for the LED's voltage so it uses the full range of the duty cycle. The digital pins supply 5V, so with a full duty cycle, that means at some spots on the potentiometer, I am sending a continuous 5V to some pin of the LED. However, all three channels seem to be working perfectly fine after testing it. I previously tried sending 3.3V through all three channels of the same type of LED from the 3.3V pin without adding any resistors and blew out the red channel since it has the lowest threshold voltage (1.8) whereas the green and blue channel were okay because their threshold voltage was very close to the 3.3V. So why does my Arduino not break my LED when connected to 5V with a full duty cycle, but the 3.3V power supply breaks it? <Q> Because the Arduino's pins can't supply enough current to damage it. <S> They have too high source resistance . <S> You can damage your Arduino by doing this. <A> The Arduino Nano is based on the ATmega328P. This chip can sink or source 40 mA for each GPIO pin. <S> Apparently your LED can withstand <S> more than 40 mA. Two questions arise: How much current is actually flowing? <S> (To find out this, the easiest way is to measure it.) <S> Can the ATmega source/sink this amount of current for any length of time before the GPIO goes bad? <S> That depends on whether the actual current per GPIO is below or above 40 <S> mA. <A> The output pins of the chip used in the Arduino are internally connected to MOSFETs. <S> The MOSFET will behave like a relatively low value resistor until you overload it, at which time it will limit current- <S> actually there is a gentle transistion (however not necessarily at a safe current for either the output or whatever random LED <S> you are hooking up to it). <S> Here is a characteristic curve for an output sinking current on a PIC16C54, which will have a similar shape of behavior: <S> The maximums and minimums are based on 3\$\sigma\$ deviation from the mean, and are not guaranteed. <S> Which is why we put resistors in there, because we want circuits to behave predictably for every one that is manufactured, not to roll the dice and have some work and some burn out. <S> Your 3.3V pin presumably is connected to a regulator with a large current capability so with a red LED, excessive current for the LED (and perhaps the regulator) will likely flow.
The heavy currents can also cause immediate or long term damage to the MCU, due to overheating or metal migration failure modes.
Process statements and sequential execution in VHDL For process statements in VHDL, it is said that the order of execution is sequential. My question is, are the signals a , b , and c assigned to their new values concurrently, or sequentially? process(clk) isbegin if rising_edge(clk) then a <= b; b <= c; c <= a; a <= c; end if;end process; If this is sequential, I must say that after the end of the process, a is equal to b , b is equal to c , and c is equal to b , because we assigned b to a before we assigned a to c . And finally a must be b , because c is assigned to b before last signal assignment. However, this does seem impossible to implement in hardware. <Q> However, values assigned to signals are not carried out immediately but scheduled to occur at the end of the process. <S> For example, when your third assignment c <= <S> a; is carried out, the value of a is still the value a had at the start of the process. <S> This is because the first assignment a <= b; has not yet been carried out and a has not changed. <S> In fact, the first assignment will never be carried out because of the fourth assignment a <= c; , which will be scheduled to occur at the process end instead. <S> This behaviour reflects the behaviour of real logic circuitry, which is what VHDL was designed to do. <S> I recommend you read up on how VHDL processes work. <S> Make sure you avoid a classic HDL trap: seeing a Hardware Design Language that models a logic circuit as a computer program that is executed by a CPU. <A> It often helps to look at the RTL schematic. <S> Your code: process(clk) <S> isbegin if rising_edge(clk) then a <= b; b <= c; <S> c <= <S> a; <S> a <= c; end if;end process; yields this: Reading your statements in reverse order: <S> a <= c -- the a register gets whatever was in the c <S> register <S> c <= <S> a -- the c register gets whatever was in the a register b <= <S> c -- the b register gets whatever was in the c <S> register <S> a <= b -- this statement is ignored 1 . <S> 1 <S> There can't be two drivers for a single FF input <S> so, in VHDL, when multiple assignments to a signal occur within the same process statement, the last assigned value is the value which is propagated. <S> Notice also that b_reg and a_reg are exactly the same (i.e. they each clock the same signal in and out). <S> If this simple example were to be synthesized, one of them would almost certainly be removed, and bout would be tied to aout . <S> In fact, it took some keep attributes just to tell Vivado to not eliminate the b_reg for the RTL. <A> In VHDL, statements in process execute sequentially. <S> As you mentioned a, b, c and d are signals (if they were variables, they had different manner).assume these statements in process: <S> a <= b; <S> c <= a; At the end of the process old value of b assigned to a. and old value of a assigned to c. <S> we can think in simpler way:statements in process executed sequentially, but the signals don't get the new values before end of the process.see <S> this example that simulated in vivado <S> : you can see the initial value of the signal before rising edge of clock. <S> a=1; b=1; c=0; <S> In the rising edge of clock, the statements in the process executed. <S> so at the end of process the new value of signals (according to assignment operations given in the question) are: a=old c=0; b=old c=0; c=old a=1; good luck.
Within a process, statements are indeed carried out sequentially.
Help Understanding a PCB Circuit from Cordless Hot Glue Gun I'm trying to understand the circuit in this PCB taken from a cordless hot glue gun. Battery voltage is 18-19v. I've been able to identify most of the components but not all. And most importantly I would like to understand what the circuit is doing. What I Think I Know about the Circuit Q1 Fairchild 4486 TrenchMosfet Pin 1 is Gate (top left) Pin 2,3,4, are Source Pin 5,6,7,8 are Drain (entire right side) R1 31 Ohm R2, R3, R4 1 Ohm R5 20 Mega Ohm The main ic is a Fairchild Semiconductor 30V P-Channel PowerTrench MOSFET This circuit sits between the battery and heating element. I think it just makes sure the drain on the battery isn't too fast and that it isn't shorted. Please correct me or confirm my theory. I'd like help to identify the unknown components then understand what the circuit is doing. My ultimate goal, if possible, is to control the heating element on/off with an Arduino or similar control circuit to maintain a specific temperature via a thermister added near the heating element. <Q> I also recommend you to draw a schematic in the CircuitLab editor. <S> Then you can simulate this and understand it. <S> The gate of the mosfet is driven according to the current output voltage. <A> Draw the schematic, and use your multimeter or oscilloscope, to see what it does, as you vary Vin, and as the gun heats up. <S> Likely functions might be: low voltage cutoff chopper to keep average Vout fairly constant as battery discharges timer As far as controlling it goes: I understand that they often use PTC heating elements for glue guns. <S> The heating element itself is self-regulating, moreso if the supply voltage is constant. <S> This also means that you can sense its temperature by measuring its resistance - you do not need to add an external sensor. <S> You do however need to work out its R-T curve. <S> If you measure V/I of the glue gun in-circuit, you have R. <S> An ADC will do division for you, so you can arrange the signals to get the ADC N to be I/V or V <S> /I, without any further computation. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> (n.b. <S> In this circuit Fet1 must have low R as it forms part of measured R1 i.e <S> it is an error term) <S> One thing to note about PTC heaters, is that they are good to temperature control to the design temperature, because they will have the correct R and I. <S> So electronic control can easily make them more accurate. <S> However you can't make them much hotter - <S> the resistance just goes up, and current stops flowing. <S> You can have trouble making them much colder, because the R goes down, and the current goes up - you end up with low duty cycle big current pulses. <S> Also at some temperatures (e.g. 50C) the R-T curve can be NTC or flat. <S> Control is impossible in this area. <S> This is probably irrelevant to a heat gun, which is only useful in the working zone anyway. <S> But, when sizing your FET you need to watch what the max current during warmup is. <S> The lowest R may be at (say) 50C not at cold or hot, so max I over whole temp cycle needs to be measured. <A> For me your circuit looks something like this: simulate this circuit – <S> Schematic created using CircuitLab <S> And the circuit looks like a strange version of an LDO voltage regulator with a series pass transistor.
For what I can see here, this is some simple output voltage regulator.
Why are plug tops rated 16A and not 17, 18 or 19A? In South Africa, most plug tops are unfused and are rated 16A. I would like to know how they determine what current value they'll rate a plug, and what factors influence how they rate a plug when designing it.I know some countries use the 15A and 13A, but surely the exact value was calculated? How was this done because the information online says nothing about why the plug is rated the way it is. <Q> This is a 'rating'. <S> A committee somewhere has decided on some (reasonable we hope) standard test conditions, and a limiting temperature for the plug elements. <S> 16A is the current which achieved that temperature under those conditions. <S> This obviously begs the question of why those conditions, and why that temperature. <A> Keep in mind that (particularly with the fat "M" South African plugs) <S> the plug might actually be safe at 30A or 40A rather than 16A, but 16A is the highest useful rating (because of wiring or other limitations such as the contact pressure in the female socket), so that's all they bother to test for. <S> (The M plugs are sort of like a round-pin version of the huge UK mains plug and are enormous in comparison with most other mains plugs used worldwide). <S> As @Neil_UK says, the limitations are a product of a committee that comes up with requirements for safety including temperature rise, fire retardant characteristics, and shock safety and markings. <S> The requirements are typically codified into a general law requiring conformance ( National Regulator for Compulsory Specifications Act ) and the actual technical testing requirements are determined by specified groups (and revised from time to time, without there necessarily being changes to the law). <S> The actual testing can be done by whichever laboratories are accredited, for example, a UK laboratory could be used, and they will test to the required standard laid out by the South African authorities. <S> In this case, it appears that the relevant standard only applies up to 16A, so there is no point in testing for more. <S> The requirements may seem a bit arbitrary, but in virtually every case there will be sound reasons why every one of the requirements are in place, and they will be agreed to by industry and government representatives with the aim of assuring safety yet not making the product too difficult or expensive to produce (and sometimes as a non-tariff barrier to protect local companies, but that's another story). <A> The actual current and voltage capability of these connectors may have little or no relation to the Code-specified ratings. <S> For example, there are different contact arangements, but otherwise apparently identical construction, for plugs rated by code for 125V/15A, 125V/20A, <S> 250V/15A and 250V/20A. <S> These connectors differ only in the orientation of the contact blades, so all should be safe to use on a 250V/20A circuit, but the Electrical Code says only the 250V/20A configuration can be used on a 240V, 20A circuit. <S> I expect a similar situation would occur in most other jurisdictions.
In North America, the Electrical Code specifies different plug configurations for different voltage and current ratings, to prevent incorrect connections between device and supply.
Should I tin these wires? I have to insert some wires into several electrical connections and have been getting conflicting information on whether or not they should be tinned before inserting. I'm sure this is a quite simple question to answer with a picture so I have included one below. To be clear, the screw itself does not make the connection here, but pulls the flat conducting plate on the bottom of the connection toward the flat conducting plate on the top. Regardless, the connection is still supposed to be a friction fit held together by the force that you apply from tightening the screw. I suppose the root of what I'm unsure about is whether making an electrical connection under mechanical pressure would suggest you should not tin the wires or if it is specifically the rotation and grinding on a tinned wire that would be caused by the screw that makes tinning these wires a bad idea. I'm obviously no expert on this topic so any additional explanation on the thought process behind the answer is very welcomed. <Q> Tinning wires for these terminals has a couple of disadvantages: <S> The contact will be more tangential to the cylindrical profile resulting in a smaller contact area than if the wires were untinned and allowed to squash into a more rectangular shape. <S> If, for any reason, the joint gets hot the solder can start to soften, flow slightly and terminal pressure will decrease leading to further exacerbation of the problem. <S> On many industrial installations the wires will be pin-crimped before insertion. <S> This reduces the risk of stray strands left out of the terminals. <S> Some crimpers result in a square cross-section on the crimp and these work well with the flats grips on the terminals. <A> You should absolutely NOT tin the wires. <S> You should use a bootlace ferrule if you want to do better. <S> They will save you trouble when building, and ferrules make maintenance much easier. <S> When you have to re-insert a wire, inside a machine where you can't see F.A. , you bless the guy that used ferrules. <A> On the top one spot, with gold star by the way, of the list of reason to NOT tin wires is fatigue. <S> If you move or even microscopically vibrate two wires, one solid/single-strand and one multi-stranded, the single stranded will take much less time to break or deform. <S> Deforming can loosen contact, and is much more likely with a soft metal like lead or copper than with steel blends often used for ferrules. <S> On the second spot is the point Transistor makes about contact profile, though solder is often soft enough to give into a nice flat profile that is better than crimped ends. <S> Another reason (I guesstimate about 4th or 5th on the list) to crimp specifically has to do with uncoated copper strands. <S> If you touch those, they will over little time get black or green copper salts on their outer layer, neither of which groups is great at electrical conduction. <S> Cutting off the strands and twisting them with your fingers = bad idea. <S> This is much less of an issue if each strand is covered with tin in the factory, but still something to think of. <S> If you strip the wire and put on a ferrule and crimp it, you can do that without touching the wires. <A> A dissenting opinion... <S> In damp and specifically corrosive (salt water) environments, un-tinned wire is susceptible to corrosion, which creeps along the wire, so you can't just cut a foot off and expose bare copper) while tinned wire ends remain usable. <S> Sometimes called "black plague". <S> It's predominantly a problem on the negative lead of a DC system, further suggesting an electrolytic effect. <S> See this thread (Yachting & Boating World) for some discussion, which suggests the same may apply to motorcycle wiring. <A> I agree with Brian. <S> For me , the ideal solution is tight twisted strands with a glove then dipped in a hot solder pot to wick inside insulation and leave only a coating much thinner than the strands like 1oz solder tinned boards. <S> This is ideal for anti-corrosion , strain relief (stiffer) , compressability ( the torque setting on screw deforms the copper with very thin soldercoat). <S> But if you don’t have these proper tools a high power iron is needed to allow fluid excess solder to escape so that the coating is very thin.
When you tin wires, the tin creeps into the insulation, creating an extra-hard bit (solder + wire + insulation), which acts as a fulcrum onto the bit just past it (only solder + wire), which is weaker and now operates mechanically much more like a single conductor than strands. In dry environments, do not tin, as the other answers say.
brightness algorithm for VHDL Hi I am working on an image processing project in which I try to change brightness of a pixel. The code I wrote works but not in the way I want it to be. Here is the code segment I use to change brightness of the pixel. What happens here is that I check RGB values of a pixel in order to determine if those values are open to change. To dim the pixel, I substract 1 and to brigthen the pixel I add 1 to RGB values. However, this approach gives very ugly results. How can I modify the algorithm I am using?By the way I just shared the part used for brightness. Other part(Contrast) is not included here. That is the reason code seems incompleted. I am not expert nor knowledgable at image processing. library IEEE;use IEEE.STD_LOGIC_1164.all;use IEEE.NUMERIC_STD.all;use IEEE.std_logic_unsigned.all;use IEEE.std_logic_arith.all;entity Brightness_Contrast isgeneric (PICTURE_WIDTH_HEIGHT : integer := 250;COLOR_BIT : integer := 4);port (clk_in : in std_logic := '0';operation : in std_logic_vector(1 downto 0);rst: in std_logic;data_in: in std_logic_vector(11 downto 0);output_of_operation: out std_logic_vector(11 downto 0);mode: in std_logic);end Brightness_Contrast;architecture Behavioral of Brightness_Contrast issignal check : std_logic_vector(11 downto 0) := (others => '0');begin BRIGHTNESS_CONTRAST: process(rst,data_in,clk_in,operation,mode) is begin check <= data_in; if rst = '1' then check <= (others => '0'); elsif rising_edge(clk_in) then --clk if operation = "00" then if mode = '0' then if check(3*COLOR_BIT-1 downto 2*COLOR_BIT) < "1110" then check(3*COLOR_BIT-1 downto 2*COLOR_BIT) <= ((check(3*COLOR_BIT- 1 downto 2*COLOR_BIT)) + "0010"); end if; if check(2*COLOR_BIT-1 downto COLOR_BIT) < "1110" then check(2*COLOR_BIT-1 downto COLOR_BIT) <= ((check(2*COLOR_BIT-1 downto COLOR_BIT)) + "0010"); end if; if check(COLOR_BIT-1 downto 0) < "1110" then check(COLOR_BIT-1 downto 0) <= ((check(COLOR_BIT-1 downto 0)) + "0010"); end if; elsif mode = '1' then if check(3*COLOR_BIT-1 downto 2*COLOR_BIT) > "0001" then check(3*COLOR_BIT-1 downto 2*COLOR_BIT) <= ((check(3*COLOR_BIT- 1 downto 2*COLOR_BIT)) - "0010"); end if; if check(2*COLOR_BIT-1 downto COLOR_BIT) > "0001" then check(2*COLOR_BIT-1 downto COLOR_BIT) <= ((check(2*COLOR_BIT-1 downto COLOR_BIT)) - "0010"); end if; if check(COLOR_BIT-1 downto 0) > "0001" then check(COLOR_BIT-1 downto 0) <= ((check(COLOR_BIT-1 downto 0)) - "0010"); end if; elsif operation = "01" then if mode = '0' then if check(3*COLOR_BIT-1 downto 2*COLOR_BIT) < "1000" and check(3*COLOR_BIT-1 downto 2*COLOR_BIT) > "0001" then check(3*COLOR_BIT-1 downto 2*COLOR_BIT) <= ((check(3*COLOR_BIT-1 downto 2*COLOR_BIT)) - "0010"); elsif check(3*COLOR_BIT-1 downto 2*COLOR_BIT) > "0111" and check(3*COLOR_BIT-1 downto 2*COLOR_BIT) < "1110" then check(3*COLOR_BIT-1 downto 2*COLOR_BIT) <= ((check(3*COLOR_BIT-1 downto 2*COLOR_BIT)) + "0010") ; end if; if check(2*COLOR_BIT-1 downto COLOR_BIT) < "1000" and check(2*COLOR_BIT-1 downto COLOR_BIT) > "0001" then check(2*COLOR_BIT-1 downto COLOR_BIT) <= ((check(2*COLOR_BIT-1 downto COLOR_BIT)) - "0010"); elsif check(2*COLOR_BIT-1 downto COLOR_BIT) > "0111" and check(2*COLOR_BIT-1 downto COLOR_BIT) < "1110" then check(2*COLOR_BIT-1 downto COLOR_BIT) <= ((check(2*COLOR_BIT-1 downto COLOR_BIT)) + "0010") ; end if; if check(COLOR_BIT-1 downto 0) < "1000" and check(COLOR_BIT-1 downto 0) > "0001" then check(COLOR_BIT-1 downto 0) <= ((check(COLOR_BIT-1 downto 0)) - "0010"); elsif check(COLOR_BIT-1 downto 0) > "0111" and check(COLOR_BIT-1 downto 0) < "1110" then check(COLOR_BIT-1 downto 0) <= ((check(COLOR_BIT-1 downto 0)) + "0010") ; end if; elsif mode = '1' then if check(3*COLOR_BIT-1 downto 2*COLOR_BIT) < "1000" and check(3*COLOR_BIT-1 downto 2*COLOR_BIT) > "0010" then check(3*COLOR_BIT-1 downto 2*COLOR_BIT) <= ((check(3*COLOR_BIT-1 downto 2*COLOR_BIT)) - "0011"); elsif check(3*COLOR_BIT-1 downto 2*COLOR_BIT) > "0111" and check(3*COLOR_BIT-1 downto 2*COLOR_BIT) < "1101" then check(3*COLOR_BIT-1 downto 2*COLOR_BIT) <= ((check(3*COLOR_BIT-1 downto 2*COLOR_BIT)) +"0011") ; end if; if check(2*COLOR_BIT-1 downto COLOR_BIT) < "1000" and check(2*COLOR_BIT-1 downto COLOR_BIT) > "0010" then check(2*COLOR_BIT-1 downto COLOR_BIT) <= ((check(2*COLOR_BIT-1 downto COLOR_BIT)) - "0011"); elsif check(2*COLOR_BIT-1 downto COLOR_BIT) > "0111" and check(2*COLOR_BIT-1 downto COLOR_BIT) < "1101" then check(2*COLOR_BIT-1 downto COLOR_BIT) <= ((check(2*COLOR_BIT-1 downto COLOR_BIT)) +"0011") ; end if; if check(COLOR_BIT-1 downto 0) < "1000" and check(COLOR_BIT-1 downto 0) > "0010" then check(COLOR_BIT-1 downto 0) <= ((check(COLOR_BIT-1 downto 0)) - "0011"); elsif check(COLOR_BIT-1 downto 0) > "0111" and check(COLOR_BIT-1 downto 0) < "1101" then check(COLOR_BIT-1 downto 0) <= ((check(COLOR_BIT-1 downto 0)) + "0011") ; end if; end if; --mode end if; --Operation end if; --CLK end process BRIGHTNESS_CONTRAST ; output_of_operation <= check; end Behavioral; <Q> Similarly to decrease the brightness, divide by a constant. <S> Since we are working in VHDL, its convenient to choose the constant to be a power of 2. <S> \$C = <S> 2^n\$ <S> So that multiplication and division will be simply left or right shift operations by n places. <A> Be aware that a signal is always assigned at the end of a process and to the last statement of the process. <S> This means in your case <S> check <S> <= <S> data_in will only be assigned if operation ! <S> = <S> 00 <S> as otherwise one of the other assignments will be the last one in the process. <S> Further you say that operation and mode are controlled from external switches. <S> Consider that the process you have is clocked at several MHz, means if you press the button for 100ms <S> (what's already super quick) <S> the process has been executed thousands of times. <S> What you need is an edge detection on your button input. <S> Can you show where operation comes from? <S> Regarding signal assignments: <S> proc : <S> process(rst <S> , clk)begin <S> if (rst) <S> then a <= '0'; b <= '0'; elsif rising_edge(clk) <S> then a <= '1'; b <= '1'; b <= 'a'; end if;end process; <S> So if you have a process like above, the signals <S> a and b are assigned at the end of the process, this is not executed sequential as e.g. in Java. <S> This means the assignment b <= ' <S> 1' will always be ignored as the latest assignment is b <S> <= 'a' . <A> This is not an answer per se , but I couldn't post in comments, so, a couple questions/comments for you... <S> I have not spent a whole lot of time thinking about this, so take this FWIW, and apply it as you see fit: <S> Are you simulating this, or going directly to HW? <S> I'm guessing HW, since you said "ugly"... <S> you really need to simulate your design to see what is happening. <S> You have no visibility in HW. <S> Every time you shift by a bit, you either multiply by 2 (SHL), or divide by 2 (SHR)... this is an implementation detail, but a fundamental concept in digital design... <S> you could just as easily write (newValue = value*2 for SHL) <S> I recommend, before you write HDL that you draw this in HW first (gates, FFs, FSMs, memories, etc.) <S> and make sure your design appears correct before writing HDL. <S> Writing SW-centric code for HDL can get you in trouble... <S> you can get away with it sometimes, but, if for a digital design class your professor won't be impressed... <S> well, I wouldn't anyway. <S> Maybe pare it down... comment out the upper 8-bits, and just operate on the lower 4... get rid of all the generics and write something very simple, hard-coded and easier to see what you are doing to get confident with what you are doing <S> You have a boundary condition you have not dealt with... <S> it is possible to overflow your 4-bit values when you add to them (and thus end up with a large delta in the result when you truncate the upper bits by your 4-bit assignment). <S> (e.g. 0xff + <S> 0x2 = 0x101 = 0x01 for you... <S> which means you just went from "white" to "black") <S> Also, you are using type integer which is 32-bit value, thus maybe getting negative values(?) <S> you can either use std_logic_vectors, and ignore the overflow bits, or place a range for your variable that use type integer <S> (e.g. range = 1 to 4) <S> as part of the previous bullet, do you really need all 3 math libraries? <S> Maybe just use std_logic_unsigned to prevent any negative stuff(?)you have pointed to: use IEEE.NUMERIC_STD.all;use IEEE.std_logic_unsigned.all;use IEEE.std_logic_arith.all; <A> For someone who knows absolutely nothing about either hardware design or image processing, you certainly have jumped directly into the deep end with a VHDL project to process video in real time. <S> The question-and-answer format used here on SE is simply not capable of giving you the education you need in order to succeed. <S> You need to takes courses and/or read books on the following topics: digital logic design HDL programming image processing ... <S> after which, you might be capable of asking specific, focused questions that we could actually handle here. <S> I would recommend starting with the topic of image processing, and learning how to do the manipulations you want using software before trying to implement them in hardware. <S> You may find that you don't need to have custom hardware at all. <S> Since you're a Java programmer(?), you might want to check out ImageJ . <S> It's a Java-based set of tools for image manipulation. <S> You can also use a more general tool such as Gnu Octave , which might give you more insight into how the low-level operations are coded.
To increase the brightness of a pixel, one simple method is to multiply R,G,B of a pixel by a constant.
Dividing Current to 10 outputs from 5V source I need to create a simple power supply circuit to feed 10 external boards, similar to a USB power hub. My power source is an AC to DC adapter measured to output 5V 10A. I need to limit the maximum amount per output to 1A. The external boards (U1, U2, etc) are audio boards, they have an MCU, an audio player, 5W amp and speakers. Each board uses from 300mA to 700mA (they vary due to music/frequencies), so 1A max should be enough. I'm a beginner who understands a voltage divider quite well, but that is the first time I have to apply a current divider. I had a look at some tutorials/books, the math seems simple in my context, but it's still not clear to me what resistor values I should use and if I'm connecting the outputs correctly (I'm not used to do things in parallel). Below is how I think it should be: simulate this circuit – Schematic created using CircuitLab About the resistance, if I use the general formula IBRANCH = IS(RTOTAL/RBRANCH) I will get 1A for any kind of resistance as long all values are the same (for example, they could all be 100ohms or 1K)..So what value is best for this application? <Q> The current of the voltage source will automatically be divided between each board as needed. <S> No need to get fancy. <S> You can just connect all those board in parallel. <S> You just added 10 resistors that will do nothing but waste power, remove those. <S> I would suggest adding a filter/reservoir capacitor between ground and Vin on each board as close as possible to that board. <S> This will reduce noise that can affect the output and the spikes in voltage when a board suddenly needs to draw more current. <A> this is not an answer .... <S> i could not draw a schematic in a comment <S> this is your schematic that has been drawn more clearly as you can see, the resistors do not distribute the current between the boards simulate this circuit – <S> Schematic created using CircuitLab <A> Maybe you want resettable fuses (PTC) if circuit protection is your aim. <S> LDO regulators are another method, with faster and sharper limiting. <S> Whatever method you use will cost a bit of voltage, in other words you might have to feed in 5.1V to get 5.0V out.
Depending on the purpose of limiting the current there are possible solutions. Resistors are not what you want. In fact that's what your schematic actually does.
Serial Communication via Mosfet using UART instead of PWM Is it possible to send a uart signal to a mosfet driver instead of a PWM signal. I would like to establish wireless communication with a receiver and send it a data string using amplitude shift keying. Can someone help me? <Q> <A> Well consider what kind of signals you can usually generate with a UART: <S> it needs 1 start bit <S> it needs 1 stop bit <S> it can have up to 9 data bits <S> it can have an additional parity bit I haven't seen many implementations which offer 9 data bits and parity, so let's stick to something which is commonly available: 8N1 or 8 data bits, no parity and 1 stop bit. <S> The start bit is always low, so it will limit the maximum PWM cycle you can get. <S> The stop bit is always high, so it will limit the minimum PWM cycle you can get. <S> So we have 10 bits in total, 1 is always low and one is always high, so your maximum control is from 10 % to 90 %. <S> In between that you only get 8 levels (increments of 10 %), that is not very fine control. <S> To get a continuous PWM signal, you have to use some mechanism which will always keep the UART busy or it will ruin the little control you have. <S> Depending on the implementation, you can use a transmit buffer empty interrupt to fill the next byte in before the old one is already on the line. <S> Another option would be to use a DMA which transfers the same byte all the time into the UART transmit register. <S> Then you update that byte and on the next transfer it will be reflected on the line. <S> Although possible, I would probably go the route the others mentioned already and build a small UART to PWM converter if no other means to control is available. <A> It's possible, with some serious limitations. <S> Take a look at this picture . <S> If you send over UART a value of 255 (0xFF), you get a digital signal that is high for 8/9 ~= 88.88% of the time. <S> If you send 0's, you get a 11.11% duty cycle. <S> If your application is fine with 11% granularity and no ability to set the output to 0, this will do. <S> Otherwise, you will need a PWM generator on the receiving side.
If a PWM signal is required for operation, then you'll probably just have to use a microcontroller to bridge the gap and generate the required PWM signal based on commands received via a UART.
How can I raise the current flow in my 32 Volt LED Solar Panel? Here is my attempt at making a LED-based solar panel: I learned that if an LED is reverse biased, it can yield a considerable voltage up to 2.5 volts. I also did this experiment at home and, using my multimeter, I found that the voltage produced by an illuminated white LED is a maximum of 2.5 volts; yet the current is too small, about 0.7µA. I mounted 25 White LEDs in series on the breadboard, and found that if the array of LEDs is exposed to bright sunshine, the output voltage is 29.7 Volts. The output current, however, is still too small, about 0.07µA. I connected a 10 Ohm resistor in series to the positive output of the panel, hoping that, based on Ohm's law, a considerable current would be forced to flow across the resistor, if we presume that the voltage is about 20V. This did not work, for when I set up the meter on the Ampere measuring function, and connected it in series with the circuit, I still got a reading of the aforementioned value, even with the resistor in series. I presumed that the internal resistance of the LEDs in series could account for this failure, for it appears to be infinite. <Q> Any semiconductor diode can be used as a photocell. <S> However, most of them are very inefficient unless designed specifically for that purpose. <S> White LEDs are particularly bad since they produce white light by re-emission of blue or near UV by phosphors. <S> Those phosphors absorb some of the light hitting the LED from outside. <S> In any case, LEDs don't make good photocells. <S> The total power they can provide will be quite small. <S> Your basic problem is that you seem to be confusing open circuit voltage with power. <S> Any diode produces about its band gap voltage in reverse when you shine the right light on it <S> and it is left open circuit. <S> However, as you saw, if it can't produce much power then the voltage will rapidly collapse when you try to draw any meaningful current from it. <S> You can harvest the little power from these LEDs with a well-designed circuit. <S> That will slowly get charged up, asymptotically approaching the open circuit voltage. <S> At that point you have a fixed amount of energy available, regardless of how little the LEDs can provide over time. <S> What happens then depends on how you want to use the energy. <S> Keep in mind that just sensing the cap voltage and powering the circuit to do so has to take less current than the LEDs require, else the circuit will be a net negative. <S> This can get tricky. <A> You are missing two major issues. <S> First, LEDs are tiny, so an LED of your type will only intercept a teensy bit of power. <S> Granted, the shape of the LED will tend to concentrate the incoming light, but the broader the LED beam (and whites are generally very broad) <S> the less effective it is as a concentrator. <S> And the diffusion caused by the phosphor is not remotely helpful, either. <S> As you've noticed, you can get very nice voltages, but no current to speak of. <S> Since power is voltage times current, this should not be a surprise. <S> Second, LEDs are not good at power generation. <S> To begin with, unlike photodiodes or solar cells (and solar cells are basically very large photodiodes), the same quantum effects which make LEDs good at emitting a narrow band of wavelengths mean that an LED will only absorb light over the same narrow band of wavelengths. <S> White LEDs are actually a blue LED with a phosphor coating, and phosphors don't work backwards to convert broad-spectrum light to a narrow blue one. <S> Put the two together <S> and you've got a device which doesn't absorb a whole lot of light in the first place, and which ignores most of what it does see. <A> You can boost the current with this kind of setup, however you will need to parallel your strings like this: simulate this circuit – Schematic created using CircuitLab <S> For each string you add you will get an additional 0.7uA, the downside of this is you'll need a lot of LED's. <S> You can however do useful things with a string of LED's like this, your generating roughly 20uW of energy. <S> Like run a microprocessor
The first thing to do is to put a capacitor across the LEDs.
Connect 2 SMALL Perpendicular PCBs - Need your creativity! I'm looking to connect 2 small PCBs. I have up to 10 signals that need to be passed from 1 PCB to the other. The 2 PCBs sit perpendicular to each other, and need to be detachable; 1 PCB is an 8 layer, while the other can be anything (doesn't exist yet). Consumer device, so the speed of the signal and all that can be neglected for now; as long as the 2 boards are electrically connected and can be disconnected, it is okay. The easiest solution would be to use an edge card connector. However, I have less than 6.5mm in width, and need the height to be minimal. I was thinking some gimmicky way to use slots in order to connect the PCBs in a puzzle like fashion, but I feel the connectivity reliability would be questionable. I'm open to any crazy ideas; or if anyone has found really small connectors, or done something similar, please feel free to share your experience. <Q> Consider using a flex circuit FH12A-12S-0.5SH(55) with 12 pins is one I'm using now. <S> This series has 0.5mm pitch.. <S> 10 pins is less than 10mm long even with the end hinges. <S> You need to specify the FPC with a stiffener that meets the connector thickness requirement and to make the shape tolerances compatible, other than that it's pretty painless. <S> The lever cover makes connecting a snap. <S> There are vertical types too. <A> My outside of the box solution is to 3d print a corner shaped extrusion that will mate both boards together mechanically without any electrical connection. <S> The extrusion would roughly look like this (disregard the dimensions!) <S> : <S> Once both boards are physically attached to each other. <S> You can use a flat ribbon cable with connectors on both board and run it along the corner line. <S> My recommendation would be to use the exact same connectors than a raspberry pi camera/display. <S> You can easily source them and the equivalent cable. <S> Furthermore, they provide you with 15 different conductors on it to give you some headroom for future improvements. <S> Picture of the connector that I'm referring to: The key advantage that I see at the end of the day is that you don't rely on your connector for mechanical support. <S> You can even adjust the support length if components are in the way (two sub sections instead of running the whole length. <A> JMC connectors could work. <S> The 20 pin version is 7.9mm wide. <S> Stacked <S> height is 5.6mm. <S> http://www.jst-mfg.com/product/pdf/eng/eJMC.pdf <A> Machined pin connectors let you make an ad-hoc connector design, which you can sneak into small spaces, and are very reliable <S> You can drop the sockets through the board, you can put them sideways into slots in the pcb, you can solder them laying flat on the surface etc etc. <S> You can use them with or without the plastic, and you never have to try and find a connector with the right number of pins. <S> See the Mill-Max website
The connector can be roughly anywhere on the board provided that it is oriented properly and that there are no huge components in the path.
What happens when I use a bigger capacitor? I'm using a Adafruit Servo Driver (PCA9685) and I have to solder a capacitor depending of the number of servos. We have a spot on the PCB for soldering in an electrolytic capacitor. Based on your usage, you may or may not need a capacitor. If you are driving a lot of servos from a power supply that dips a lot when the servos move, n * 100uF where n is the number of servos is a good place to start - eg 470uF or more for 5 servos. Since its so dependent on servo current draw, the torque on each motor, and what power supply, there is no "one magic capacitor value" we can suggest which is why we don't include a capacitor in the kit. Right now i'm using only 12 servos (I shoould use a 1200uF capacitor ) but in the future i'm going to use 14 servos (1400uF) my question is: What happen if I use a bigger capacitor (1400uF) for 12 servos or less? <Q> The more torque you make the servos generate by moving or holding position the more current they require. <S> The faster this torque demand changes (particularly increases in required torque), the larger this capacitor needs to be. <S> The capacitor can provide power for very short-term demands, but mostly it reduces the change in current vs change in time for the power supply wiring. <S> If you have an oscilloscope, you can connect is across the capacitor leads and test your application. <S> If you see significant, short term dips in the power supply voltage you need a bigger capacitor. <S> If you see long-term dips in the power supply voltage you need to fix the power supply or power supply wiring. <A> Agree with previous answers regarding practical effects. <S> Here's some of the theory to help understand what happens when you use a bigger capacitor for this purpose. <S> The measure of capacitance is the capacity of the device to hold charge for a given voltage (C = Q/V). <S> So if you picture your capacitor as two plates separated by a material that prevents current flowing, the bigger the capacitance, the same voltage held across the plates will result in a greater build up of charge on the plates (imagine that the effective area of the plates is larger). <S> This is captured in the maths by the time constant tau ( https://en.wikipedia.org/wiki/RC_time_constant ) <S> which indicates that increasing capacitance slows down the discharge rate. <S> Therefore by having a larger capacitor connected to the supply rails close to the servo, it slows down the exponential decay of the voltage level by providing the current that the power supply has suddenly stopped giving. <S> The more charge it has to give, the longer it can provide the current for. <S> This is why there is no golden rule for how large your capacitance needs to be. <S> It is a direct measure of how much energy you require and for how long. <A> Along with the above answer as an audio technician for many years the 'rule of thumb' for audio amplifiers was 2,000 uF per amp of current consumed. <S> This was to make sure the ripple in the DC supply was filtered down to 100 mV or less. <S> I should point out that digital circuits consuming the same current could get away with 470 uF per amp, because digital circuit are able to some degree to 'ignore' mild noise on the digital lines. <S> There is no "one magic capacitor value". <S> OMG-an honest statement if I ever heard one. <S> Your servo drivers would be ok with 1,000 uF per amp, but if you have dynamic torque issues where load can be light then suddenly very heavy <S> I would consider at least 2,000 uF per amp of current consumed. <S> This includes 'Peak' amps which seemed to be one of your main concerns. <S> Also, except for high voltage types over 450 volts, capacitors are low cost. <S> If you measure voltage dips of 5% or more with 2,000 uF per amp under a sudden load, I would go with 10,000 uF capacitors and just make it not an issue anymore.
As you are using your capacitor to act as a short term power source for when the supply dips, a bigger capacitor means a larger pool of charge to draw upon when these temporary dips occur.
Analog analog multiplication, part of a hybrid CPU (for fun) Short version: How do I make an analog multiplier that takes two analog DC inputs? Long version: I made a comment recommending Ben Eaters videos for another question, while doing so I ended up watching some myself (again) and thinking to myself " hmmm... I wonder if it would be easier to make some parts purely analog ". The bus could be just one wire where different voltage levels would later be translated to bits with an ADC. Just messing around a bit I came this far which theoretically can calculate the Fibonacci numbers: Figure 1, small demo of hybrid computer calculating the first fibonacci numbers Link to simulator. In the gif above I go way out of the voltage range so it's easy to see the fibonacci numbers, in reality I would just use the 250 mV = binary 1 (the LSB at the "set values") and then let it propagate through the DRAM which holds 4 bits per capacitor. The important part to look at in the gif is the output of the op-amp to the right of the "a+b" text, it shows the Fibonacci numbers. In between every operation I would quantify the answer by using an ADC followed by a DAC. So if I would read 1.1V then the DAC would turn it into a 1.0 V which afterwards would be stored in the DRAM. And then once every X clock the entire DRAM would have to go through the quantizer to make sure the capacitor doesn't float away . The ALU is only able to do +, - and average. I was thinking about making the multiplication and came to a halt. I've made and seen diode based multipliers before, but I don't want to use them because the diodes has to be matched. I rather use resistors that I can trim with a potentiometer. Anywhoo, I came up with a hybrid multiplier, half analog, half digital. So I made a first with identical resistors everywhere. Figure 2, naive multiplier between digital numbers and analog values. The digital value is offset by 1. Which I then turned into this with binary weights: Figure 3, naive multiplier between binary weighted digital numbers and analog values. The digital value is offset by 1. This reminded me of R2/R ladders, but I couldn't make them work with the op-amp. However, I thought about how R2/R ladders worked, and I remembered that their output is multiplied by their voltage source. So I finally came up with this design: Figure 4, R2/R based multiplier between binary weighted digital numbers and analog values I do like it, the only problem however is that the bus is analog, just one wire. So if I'm forced to use the solution in figure 4 above, then I'm forced to use another ADC at the multiplication area of the hybrid CPU. I can't reuse the one at the quantizer area. Time for the question: How should I make a multiplier that takes two analog inputs? I do not want the solution that is based on 3 diodes that and 4 op-amps because you can't trim diodes. My belief is that if they are mismatched then they will give an answer that is off by more than 250 mV. I have not tried this in the real world. I have tried the MOS based multiplier in the link literally an inch above this word, but I don't know if I'm dumb. I can't get it to work in the simulator. See gif below for failure of MOS implementation. Or click this link for the simulation. I do not want to throw a microcontroller at the problem. I do not want to use a motor that rotates and uses some shenanigans. I was thinking about using a RC filter in a lowpass formation to get hold of the \$e^{\frac{-t}{RC}}\$, charge and discharge and use a ramp + measure the time it takes for the capacitor to reach some value. It's the same idea as with the diode, it's just much much slower, not that I really care. Though I can use a resistor to trim the RC constant. I would prefer not using this solution because it feels... like I'm solving it in the wrong way. The precision doesn't have to be perfect, right now it's just 4 bits per capacitor, this gives each level \$\frac{4}{2^4}=0.25\$ V if VDD is 4 V. Though in the future, it would be fun to store 8 bits per capacitor. After the multiplication has been done, it will be taken to the quantizer to make sure the value is as close to a binary value as possible. So small errors are okay. Here's the gif that shows my failure trying to make the MOS based one: Figure 5, I copied the schematic from the wiki link above, yet it doesn't work in the simulator. If it would have worked, then I should have seen the value 1 V somewhere as I changed the voltage of the reference from 5 V to -5 V. <Q> If the PWM is 50% mark-space then the baseband analogue signal is attenuated by half. <S> Clearly you need to use a recovery filter to remove switching artefacts. <S> But with this technique you can amplitude modulate an analogue signal by varying the PWM duty cycle: <S> - You can also make it into a 4 quadrant multiplier. <S> One analogue input controls a pulse width modulator. <S> The other analogue input is switched. <S> Just a thought in case you are interested. <S> More details here <A> These things exist - Analog devices (used to?) <S> have some multiplier ICs you can (could?) <S> buy. <S> They also have this excellent appnote which I definitely suggest reading. <S> One of the classic buildingblocks in analog design is the Gilbert Cell , named after Barrie Gilbert. <S> It does what you seek (at least, if I understand your question correctly). <S> Because of this multiplying capability, it is very often used as a building block in variable gain amplifiers. <S> Think about it, if you have a building block that has a input-output relationship given as \$ V_{OUT}(t) = <S> V_{IN, 1}(t) <S> \cdot <S> V_{IN, 2}(t) \$ <S> and you set \$V_{IN, 1}\$ as the signal you want to amplify, you just need to change \$V_{IN,2}\$ to control your gain. <S> It is also used as a mixer for the same reason. <A> I am just putting this out here as a viable answer for future readers. <S> After reading Joren's answer I realized that many analog multipliers rely on matching components. <S> So I thought to myself, why not just reuse components so the same component is used everywhere? <S> That way I will automatically match everything. <S> So I looked up the typical diode based multiplier and saw that the anodes of all the diodes are always connected to the (-) input of the op-amp. <S> Same goes for one pin of the 1 kΩ resistor. <S> Link to simulation. <S> In the image above, the multiplication 2.25 × 3 is calculated which results in 6.75. <S> The very same multiplication is made in the... monstrosity below. <S> The "Value for one" is the voltage reference for one. <S> So if it is 0.1 V and V1 = V2 = 1 volt. <S> Then the answer will be 10 V which translates to the number 100 <S> if 0.1 V is 1. <S> So I decided to mux the cathode and the other pin of the 1 kΩ resistor and voilà <S> , there's a nice logarithm and exponential function that is matched. <S> You can see in the gif below. <S> Link to simulation. <S> The gif is a little bit grainy, that is on purpose to scale down 8 MB down to 2 MB. <S> Also the gif is sped up 2x, 28 seconds instead of 55. <S> I know it says " <S> log(x) in base y" and "pow(y,x)"which is not true. <S> I confused myself with the voltage reference. <S> It's just log and pow with some random base. <S> The clever mathematicians will know that it doesn't matter what the base is, you can convert any log to any other log. <S> The number 6.7 is shown at the end at the output of the bottom right op-amp. <S> CircuitJS truncates 6.75 to 6.7 when presenting the numbers without any mouse hovering. <S> Placing the mouse above showed 6.69 V, so 60 mV error which is less than 250 mV and therefor acceptable. <S> According to.. not the best simulator. <S> After reading Andy Aka's answer <S> I'm unsure if another answer can beat it. <S> I will accept his in a couple of days if no other answer beats it. <S> I do not believe that my answer beats Andy's. <A> I recently came across the "Parabolic Multiplier" circuit in a 1968 analog computer. <S> To multiply A and B, you start with two op amps to compute A+B and A <S> -B. Next, you need a function generator that produces X^2 (i.e. a parabola). <S> With two function generators, you compute (A+B)^2 and (A-B)^2. <S> You subtract the two results with an op amp, resulting in 4×A×B, which after scaling gives you A×B as desired. <S> How do you get the X^2 function? <S> An arbitrary convex function (such as X^2) can be approximated with a resistor-diode network. <S> The idea is that each diode will turn on at a particular input voltage (controlled by the upper resistors), and provide a current (controlled by the lower resistors) to the output. <S> The result is a piecewise linear function. <S> (The component values below are arbitrary; I didn't work out the values for X^2.) <S> A real function generator might have a dozen diodes for more accuracy. <S> A function generator could be hardwired, or could have potentiometers so the user could set it to any desired function. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The Parabolic Multiplier was considered a high-accuracy way of performing analog multiplication. <S> A brief mention is in the Dornier 240 analog computer manual . <S> (In German, see Der Parabel-Multiplizierer in section 9.)
If you want to build an analogue multiplier that is a little off-the-beaten track then consider what happens when you feed an analogue signal through an analogue switch but control the analogue switch with PWM at a high frequency (significantly above nyquist to make life easier).
What is the fastest arduino to PC communication method? I am making an application that has multiple i2c sensors controlled by an Arduino Uno. I want to get all of the raw data from the sensors and transfer them to a PC as fast as possible, on which I will perform calculation with the raw data using python. My plan is to write the arduino data onto a text file and then have python read that data and perform some calculations immediately after. I want to transfer the data as quickly as possible so it comes as close to Real Time results as possible. Should I use Ethernet, USB, or something else for comms? Should I use a raspberry Pi3 for this instead? Am I approaching this problem incorrectly?Any help would be appreciated! Thank you. <Q> FTDI FT232RL serial-usb chips can run at 2Mbd , i.e. 200kbytes/sec. <S> This is much faster than the I2C rate. <S> Say you read I2C at max rate of 400kHz (44kByte/s), you only need 887kBd to send the data back as hex-ascii (2 chars/byte). <S> Of course that is the sustained I2C read rate once addressed. <S> In practice you have start/stop,addressing, control register writes, arduino code, etc etc. <S> So your actual ability to get data to send back is probably only half that. <S> You are likely to find that 230kbd or 460kbd are quite adequate. <S> However, the arduinos serial routines might not be up to it.(not an arduino user myself). <S> Your starting place is to get the serial running a test. <S> https://arduino.stackexchange.com/questions/296/how-high-of-a-baud-rate-can-i-go-without-errors Realterm is able to set these (any) <S> baud rates, and capture the data to file, timestamp, run postprocessing scripts etc. <S> It also has a capability to convert and display hexcsv data (specifically from an I2C device) <S> Note that at high baud rates the Arduino might need to you to space chars you send to it. <S> You might also find that to get max send rate, you need to handle the TX uart directly to bypass any software fifos, which can be pretty time consuming. <S> The good news is that you don't have to buffer, when the uart sends so fast. <S> What you want to do will work fine. <S> You are correct to capture to file then process. <S> It is much easier to get going, and to fault find later. <S> If you have a choice, ASCII chars are easier than binary. <S> A hexcsv format is easy for what you want to do. <S> A good tip is you can zip these data files if you want to keep them, they always compress massively. <A> The uno doesn't support this, but newer arduino models do away with the external USB to serial chip and instead directly connect the USB port to the microcontroller. <S> I think by default it emulates a serial port over USB, but since it's not actually a serial port <S> it's not limited to serial port baud rates and as a result will transfer data much faster. <S> Might be worth looking at as you should be able to get much better performance. <A> Would you like 5.3Mbit/sec (5333333 Baud) ? <S> Here is how to: http://peter.lorenzen.us/embedded/dprint <S> http://peter.lorenzen.us/3d-printer/stress-testing-5-3mbit-sec-serial-debug-stream-from-arduino <S> Maybe you will run to problem to have ready so much data at this rate :)
So you are good with the standard usb-serial chip, just change baud rate.
Is it safe to run a PC fan with power low enough to stall it? I have a "6V 4.5W" solar panel (Generic) and a 12V PC cooling fan (Evercool PWR-1225H12B) that consumes 450mA at 12V full speed. Running the fan directly from the solar panel in full sun works decently; enough to push air at an acceptable rate. It is a "permanent" setup, with the fan and solar panel always being connected. My question is: Would there be a premature aging issue to either fan or panel if there is only partial sun? There is a bit of hysteresis because it of course takes more power to start the fan than to keep it running. So if it stalls, it can stay stalled for quite some time before it gets going again (if at all before next sun-up). I think the panel will be fine, as I've read that short-circuits are not inherently bad for them, so the increased stall current should be no issue. However, I'm more concerned about the fan circuitry. Since they are designed to run from a regulated 12V supply, I wonder if the drivers will have an issue running with only partial power and a stalled fan. I realize that it can depend on the specifics of the fan I'm using, and that the innards are not disclosed. I imagine the fans are typically similar though, so anyone who has an understanding of how a typical PC fan works may be able to shed some wisdom as to why it would or would not be an issue to stall a PC fan for extended periods. <Q> Should not be a problem for either panel or fan. <S> Note, that "stall" does not mean "short circuit", not even in brushed motors, and PC fans are brushless. <A> Most PC fans are in fact 2 phase motors. <S> A good reference chip to understand is the DIODES AH2985 , this chip works from 2.5 to 15 VDC and is very common in both the 5 Volt and 12 Volt fans. <S> The driver chips have inbuilt stall detection and restart logic, so won't overheat under any circumstances. <S> If you are concerned enough you can simply test the fans you use with an adjustable power supply. <A> There will be heat loss generated by stalled fans perhaps at 15% of the applied voltage and thus the switching transistors will be warm and heat add it to the base <S> but this should not affect the reliability of the fan if the stall starting voltage is < 1/3Vcc <S> The BLDC drivers may depend on air flow for cooling and Pd is dumped on these devices in stall mode while they are buried inside fan so you cannot sense Tjcn so my values above are based on this. <S> This may be only a problem if RdsOn or Rce of drivers is not much less <10% of coil DCR . <S> Designers should remember this ratio in future BLDC design of drivers. <S> Thus if so, the coil absorbs the power and with no air flow may be safe. <S> Since fan load increases with RPM and DC motors draw less current with RPM <S> the motor current is somewhat constant or slightly linear with RPM above stall speed. <S> Without detailed fan specs this accurately describes the heat and thus reliability risk with fans at stall threshold on starting.
You are stall safe with all PC fan implementations. Bring the voltage slowly up from zero and measure the current, it will soon be apparent if you have a voltage/power/start problem. Variations depend on Fan design.
Batteries connected both in series and in parallel I am confused.Some sources say that connecting batteries in series also doubles the amperage (not only voltage) while maintaining the same mAh rating, while connecting them in parallel only increases the capacity mAh, while other sources say the amperage remains the same. To put it simple, say I want to power an electrical motor that is 48V/1000W.I will first need to connect 12 (3.7 hi-drain 20A 3000mAh li-ions) in series output 44.4V / 3000 mAh.But since the motor drains 20.8Amps and 3000mAh means the battery can provide 3 Amps per hour, this essentially means the battery will get drained for what. 7 minutes? On max power. This means I will also need to connect some batteries in parallel, to provide more capacity. So if I connect those 12 batteries in parallel with another battery.. does this make 14 minutes? Edit, according to this, two batteries connected like that output 6A.If measured separately they are 3A. <Q> If you are driving a fixed resistance, connecting two batteries in series will, in fact, double the current. <S> Well, approximately. <S> It won't be an exact doubling, since batteries have a volt/amp curve which produces less voltage for more current. <S> For very low currents and some high-current battery chemistries, two batteries in series may come very close to twice the current. <S> For high currents, such as a level which will discharge the battery in 10 hours or less, you can count on a noticeably smaller capacity when the current is increased. <S> Conversely, to your specific situation, you've done the calculations correctly, and 7 minutes/14 minutes is about right. <S> However, since each battery string is providing half the current when in parallel, you might reasonably expect greater run time. <S> Like maybe 15 minutes instead of 14. <S> Your figure, on the other hand, makes no sense at all, and I have no idea where you got the idea. <A> Batteries connected in series will raise the effective voltage of the battery pack. <S> A few examples. <S> My base battery is 3volts and 1 Ah of capacity. <S> If I put two in series, I will have a 6 volts (3 + 3)/1Ah equivalent battery. <S> Two in parallel will yield a 3V/2Ah equivalent battery. <S> If I combine 4 of them into two series group put together in parallel, you will get a 6V/2Ah equivalent battery. <S> Pushing further, you can combine many cells to get the desired voltage and Ah caracteristics. <S> Regarding discharge, a nominal 2Ah battery will be delpeted in one hour if you continously drain 2 amps. <S> This is a 1C discharge. <S> 2C discharge means that you discharge it at 4 amps... <S> therefore it will last half an hour. <A> Yes you are confusing the information. <S> Adding cells increases the total mWh capacity if they are reasonably equal in parallel. <S> If in series <S> then the weakest cell limits current. <S> Thus putting in parallel will add up the milliamp hour capacity, while stringing in the series Adds up to cell voltages. <S> Thus an array is often the optimum configuration to balance the voltage and increase the milliamp hours and again when balanced the total of mWh will be the sum of each component cell or pack. <S> When taking the total milliwatt hours and dividing by the mW of the load results is less than 10 hours then the total capacity the may be reduced. <S> This will be significant if it is much less than one hour, But depends greatly on the cell’s quality factor for max discharge rate. <S> Eg C/10 or C/40 etc <S> Always referred to the OEM data sheets for best calculations. <S> If none are available then test and verify Also keep in mind that A DC motor will draw 10 times the rate at maximum current if starting at full acceleration or full voltage and then reduce as the speed increases.
Batteries connected in parallel will raise the effective current capacity of the battery pack. "Some sources" are correct - but only in certain circumstances.
Transistor toggle by NPN and PNP - how is it build? I want to toggle between 2 devices using one GPIO 3.3v pin and powering them with 5v. I thought about using an NPN and PNP transistor, tying up the base and collector/emitter to 5v power supply. If the GPIO pin goes HIGH or LOW, switch trough either transistor. So far, I have tried a lot to get it work somehow. But i do not seem to be able to have either the NPN or PNP transistor not be triggered to a degree somehow. I am too embarrassed to show any of these noob tries, and just want to ask you guys for Ideas how to approach that problem. Am I going a completely wrong way with this? Is thinking of it like a Y switch wrong? Thanks für input on this very confusing matter. EDIT:Some basic Idea, without any resistors (since they are part of my problem: I con't find out, where to place them and how strong.) Placed on my breadboard to get started with LEDs ... One LED should be ON while the switch is pressed, then should switch to the other if pressed. Edit 2: Thank you for all your amazing additions to the post. It will probably take me some time to look up all terms and try to understand the explanations :) So please bear with me. (btw: Only screenshot - CircuitLab shows me a CSRF Error when trying to register :/ ) <Q> Expanding on Tony Stewart's answer which should work for 3.3 V logic, the circuit below will work on 5 V logic as well. <S> Figure 1. <S> One GPIO pin can drive two LEDs. <S> Source: 1 GPIO, multiple LEDs . <S> How it works When the output is switched low, current will flow from the positive supply via R1 and the L1, green, to the output pin. <S> L1 will illuminate. <S> L2, red, will be shorted out and will be dark. <S> When the output is switched high, current will flow from the pin through R2 and L2. <S> The red LED will illuminate and the green will be dark. <S> If the output is tri-stated (wired as an input or disconnected by program control) <S> a current will flow through R1, L1, R2, L2 and both LEDs will glow dimly. <S> On a 3.3 V device the voltage wouldn’t be high enough to illuminate both LEDs significantly so they would appear dark. <A> If you let the GPIO float then both leds will try to light. <S> As long as you drive it either high or low it works. <S> This is not great on 3.3V, as you can only get 2.6V to run the LED off the NPN - it will run a red led OK, but gets marginal for green when supply tolerances are considered. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> This arrangement suits your original question of using the 5V. <S> It works switching LED's or something else with a minimum ON voltage, but it is not a clean switching arrangement as Q2 runs off Q1. <S> simulate this circuit <A> There isn't a very simple arrangement - you wind up with 3 bjt,5R, or 1pnp,2R,1PFet. <S> A single invertor package might do. <S> If you use HC or AC invertors, then use the GPIO as an open drain, R5 pulls the GPIO up above the 3.3V until the protection diode conducts i.e. you get 4V on the GPIO, and the 5V invertors will be fully turned on simulate this circuit – Schematic created using CircuitLab <S> Another fantastically versatile component is the analog switch. <S> simulate this circuit <A> High side switching when the input doesn't go that high is tricky, and your requirement that there be no leakage current through the load <S> makes it trickier. <S> I using only NPN and PNP <S> it took me 5 transistors to do it <S> simulate this circuit – <S> Schematic created using CircuitLab <A> simulate this circuit – Schematic created using CircuitLab Choose R based on R1=(3.3-Vf)/If -33 <S> If R is negative it just means you cannot drive as much current. <S> for Red Vf=2.0 <S> @ <S> 10mA <S> , R1=100 Ohms for White Vf=3.1 @ 20mA , <S> R1=0 Ohms and If ~10mA ( similar for Green Blue, R=0V) <S> 33 Ohms is my estimate of your GPIO Vol/Iol=RdsOn. <S> You can change by verifying with your device spec, usually found near the back of 600 page spec. <S> ARM devices are usually 3.3V and 25 Ohms while 5V CPU's are ~ 50 Ohms . <S> This characteristic is "loose" + <S> /-50% worst case over all devices and over temperature but adequate for this application. <S> Your BJT design would burn out both Base emitters in series across 3.3V with a typical limit << 2V total.
What you are doing is correct as long as you are driving the gpio (and add R2) 74HC4053 triple SPDT would do this for you...
Plated PCB Hole Shorting Power to GND? I’ve been soldering components to my PCB; all has been good, but recently, after soldering a big electrolytic through hole cap, the power and gnd plane were shorted. This persisted even after removing the cap. Is it possible that the plated throughole has a gap in between layers where excess soldered flowed through and connected to GND in one of the internal layers? This board was made through OSH Park (it’s a 4 layer board). EDIT: Solved the problem by drilling through the center of the throughole with an oversized drill. I got to the assumption that the throughole was causing the short by using the suggested method of applying current to go through the power plane/GND and seeing that the lowest voltage was in the vicinity of the hole. <Q> that is well designed and well-made. <S> The plated through hole would not be permeable and there would be no possibility of solder flowing through to a plane layer. <S> It is possible for this to happen if the board is not well made or not well designed with adequate clearance around plated through-holes. <S> If the plated through hole really did short to the plane, then you can try drilling out the plated through hole with a small drill. <S> If that makes the short go away, then it was most likely a plated through-hole problem. <S> In general, if you want to get to the bottom of this, you will have to be systematic about it. <S> If you haven't already, do a careful visual inspection of the whole board looking for solder blobs. <S> A careful inspection of the board layout might be a good idea also, to look for places where power and ground are, perhaps, closer than they should be. <S> Removing all the components might be a good idea. <S> Check the short after each removal. <S> If the short goes away as you remove components, then it could be a solder bridge hidden under a component or a bad component. <S> Or maybe a backwards diode. <S> I don't know what equipment you have, but you could also try applying a high current to the short and use a thermal imaging camera to find a hot-spot on the board. <S> Most likely the short area will appear as a hot spot because the current density will be much higher in that area. <S> It is a current bottleneck. <S> It might only be a few degrees hotter than the rest of the board, or it might actually get quite hot. <S> If the short is definitely in the board, and the board is large, you can repeatedly cut the board until you are left with only a small segment that has the short in it. <S> Then this area can be examined very carefully, and hopefully the short can be discovered. <S> Hopefully one or more of these ideas will help you. <A> I doubt it, it's more likely that there's a solder blob somewhere shorting earth to ground on the exterior of the PCB. <S> The reason for the design rules (keep-out zones around unconnected vias, inter-track spacing etc, is to allow some inaccuracy during manufacture without it causing shorts or opens where they don't belong. <A> This persisted even after removing the cap. <S> How does the board look like? <S> It is possible to overheat the PCB material to the point where it burns away and leave shorted copper layers. <S> Beefy electrolytoc cap can cause this if the soldering iron cannot put enough heat into the solder joint fast enough due to high heat transfer through GND/power planes. <S> Note that there should be visible damage in this case.
If there are other components on the board, one of them could be responsible for the short. The answer to your question is no, that is not normal or possible with a board
Is there any difference between transferring DC over one 36 mm² wire or six 6 mm² wires? I am designing an off-grid DIY solar power site where the distance between the solar panels and inverter is going to be several dozen meters, so I would prefer to put a thicker wire to minimize losses. Though it seems pretty obvious that, in terms of losses, six isolated 6 mm² copper cables should perform identically to one 36 mm² cable (to be precise, the closest size existing on the market is 35 mm² but let's assume 36 mm² for the purpose of this question), I am willing to double-check this with experts. Will DC flow evenly across all the six cables, or are there nuances/pitfalls I am not taking into account? The reason why I would use 6 x 6 mm² instead of one 35 mm² is simply that the former is 1.5 times cheaper. Update: Just giving a bit more details as there are suggestions that the design might be flawed and I should put the inverter closer to the panels and run a few dozen meters of AC instead. The set of panels will produce 92–112V. It is capable of generating up to 2900W (full sun at the right angle) so the current will be up to 32A. This calculator shows that for a 40m-long wire I would need 35mm² to keep losses within 2% (and I would actually hate them to be more than 1%). Yes I could possibly erect the power shed within 5m of the panels but that would not look very nice in terms of landscaping. Also, I would prefer to keep the battery closer to the house so that I could feed some DC appliances without double conversion. <Q> It's not just losses. <S> The wire is being heat up because of the I^2R, and the heat flows out through the surface. <S> Six wires will have much bigger surface to cool down, hence you can have more current. <A> One thing to consider is that some electrical codes prescribe minimum diameters for certain wiring patterns - eg, a minimum diameter for the PEN conductor in TNC / TNC-S system - for safety against mechanical trouble (in the example of TNC, a wrecked PEN could have disastrous results if a heavy load with a "grounded" metal enclosure is connected). <S> How this applies or does not apply to off-grid DC circuits is a matter of code, too. <S> One other (slightly off topic but important) thing to consider with heavy DC circuits: Anything that connects/disconnects (switches, fuses, automats, contactors, connectors) and is rated for xx amps AC at 250V is NOT automatically rated (or suitable or safe!) <S> for xx amps DC at even lower voltages. <S> The reason is AC-only-rated designs relying on the fact that eventual arcs will be interrupted quickly by AC zero crossing. <A> Several dozen meters @ 36mm2 is crazy, except for 10's kWp setup. <S> I guess it is not the case. <S> It is heavy, expensive and generally shows something is far from optimal. <A> A consideration others have not addressed is that this is an outdoor installation subject to wear and tear from sun and rain. <S> The six smaller wires will suffer a lot more damage that the single heavy conductor. <A> Solar Panels generate DC. <S> There are some complex and fascinating effects of AC power transmission which are not applicable to your problem. <S> The DC current carrying capacity of wires is dependent on their cross section, so use the cheaper method. <S> Though Christoph's issue is technically correct, in real life it will never be a problem, partly because as a wire heats up its resistance increases. <S> So there is negative feedback which balances the load. <S> If you are concerned, use bare wires kept in contact with each other (twisted). <S> It's more important to determine the max current (at max solar flux) and size appropriately. <A> For very high current DC application consider arc welding wire. <S> I think 0000 size should work just fine. <S> Notice the construction; hundreds or thousands of fine stranded wires.
Except for marginal cases, you can both save a lot of money and get more power by keeping the wires between 2.5 and 6mm2, using a higher voltage solar panel stack and a corresponding inverter.
Protect a micro controller even on mistakenly connected I am basically a computer engineer and having only basics in electronics and electrical field. I have also searched for the solution but it looks, it would be better if i ask it to experts here... Micro-Controllers are designed to work only if the input characteristics are met. If wrongly connected, it may damage the board. What i am trying to achieve is ( OUTPUT ) : Say i want to accept Point A as Positive Pole , Which goes to VCC Say i want to accept Point B as Ground Pole , Which goes to GND Say i want to accept Voltage accross A and B should be 5V As to the INPUT : User has two wires coming from DC Battery 12V User has two points : Point X and Point Y for connecting these two wires No matter, however user connects two wires coming from DC Battery 12V to Point X and Point Y ( May be + or - to Point X and remaining to the Point Y) How should i design a circuit which takes above X and Y as input and Produce A and B as output 5v across, So that i can save the micro-controller even if end user mistakenly connects positive and negative wires. Thanking you so much in advance. <Q> Use a bridge rectifier before your 12 V to 5 V regulator. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> The bridge rectifier BR1 will rectify (as in "correct") <S> the voltage so that input polarity does not matter. <A> You can use a bridge rectifier, as two other answers have suggested, however if you're in an automotive environment and you have any requirement for other inputs and outputs that probably will not be ideal, because you will not be able to have a common ground. <S> Schematic created using CircuitLab <S> The P-channel mosfet in the left schematic conducts in reverse when power is applied in the correct direction (the intrinsic body diode is in parallel with the channel). <S> In reverse, it blocks. <S> D1 protects the MOSFET gate and if you have a MOSFET with a sufficiently high Vgs rating the circuit uses very little current. <S> Similarly, the relay circuit in the right schematic blocks the input voltage unless it is applied in the correct direction. <S> D2 assures that. <S> D3 absorbs the inductive energy when the relay drops out. <A> A full wave rectifier diode bridge, which is just 4 diodes, would work to ensure that reverse polarity power input would not matter. <S> A voltage regulator after that would make sure your output is 5V. <S> Of course there are voltage limits to both, but 12V is easy to rectify and regulate down to 5V. Due to voltage drop across the diode bridge, the end user would not be able to input 5V or less if your target voltage needs to be 5V.
Another method, which will not allow the device to function if connected in reverse, but will prevent damage is something like this: simulate this circuit –
what's the purpose of parallel RL circuit on mains recifier? simulate this circuit – Schematic created using CircuitLab Hi, I was reading a datasheet for DC1744A which is a demo board of LT3799 and this is the rectifying circuit of the board in their datasheet. I am not sure the purpose of RL parallel circuit before the bridge rectifierand also why they used the choke inductor (L3) after the rectifier not before. (if it is just a choke inductor of course) The circuit drives a transformer with high frequency FET switch. Could someone help me please? <Q> Thus the two, 2-pole filters from AC in to DC out. <S> The LT3799 is a flyback SMPS controller, but it's intended specifically to drive LEDs. <S> One of its features is the ability to be powered from a phase controlled voltage source (triac dimmer). <S> The DC1744A board was designed to demonstrate this among other features. <S> Triggering the triac at 90 and 270 degrees (worst case) subjects the input to a step of around 165V. <S> It's this step that I believe the filters are trying to tame (my opinion... <S> I didn't design the demo board!). <S> The two 10k and the 750 ohm resistors I believe are as Tony Stewart pointed out: they lower the Q so that the input step doesn't cause severe ringing. <S> Another feature of this IC is active power factor correction. <S> For this reason, I don't believe the R-L-C components under discussion are intended to correct power factor. <A> Either the FCC or some regulatory committee requires that any EMI generated by a switching power supply be filtered so that it does not back-feed into the AC power lines. <S> Hence the reason why L1 and L2 have substantial inductance. <S> 3.3 mH is a lot of inductance, a brick-wall filter to block HF noise. <S> The parallel resistors help prevent the L1 and L2 cores from DC and LF saturation, in which they would behave like a short circuit. <S> Remember they also have to handle the 50/60 HZ current passing through them to feed the power supply. <S> To a 3.3 mH inductor 50/60 HZ passes right through them almost as easy as DC current. <S> As for L3 it offers the first barrier to the extreme switching noise produced by a SMPS type supply. <S> I am used to seeing common mode inductors at this location but a single ended filter is good enough, since L1 and L2 filter out any remaining noise. <S> Not shown in the image are the large value capacitors by the MOSFET switch and transformer. <S> NOTE: I should point out that this design is atypical of SMPS design. <S> No common mode filters and large 3.3 mH inductors with rather small value capacitors suggest the designer was just throwing parts together, or had SEVERE EXTERNAL noise to contend with. <S> I do NOT recommend this design for SMPS supplies. <A> I do NOT see this as a good design, with what is shown so far. <S> Edit Inspite of other answers and comments my simulation supports my design intuition. <S> The 780R+58nF was a bandaid to fix the resonance with a damper on Q, R7/R8 still do nothing , a Pi filter is far better and this card never got FCC approved. <S> My opinion stands, you can make your own design choices. <S> It is adequate for Demo purposes but both a DM and CM Pi filter is best on front end. <S> R7, R8 do nothing except when there is no load with a reduction of resonant peaks. <S> The 3.3mH is < 1 Ohm <S> so 10K does nothing substantial. <S> R8+L2 does nothing except doubles the impdeance of L1 and increases component count. <S> C1 must be chosen for a switcher rate of >50kHz <S> otherwise it degrades the noise performance with feedback noise if the SMPS in the 20kHz range as this adds a high Q ( <S> >20dB) tank resonance near 20kHz <S> but if > 50kHz it creates a 4th order LPF, with 5 reactive elements which is suboptimal. <S> A far better design is to use a Pi filter or CLC Common Mode choke on the front end. <S> This will reduce egress and ingress noise by more than 30dB. <S> This means L1 L2 might look almost the same but use a common core and raise the CM impedance of both Line,Neutral relative to 3.3nF shunt caps on BOTH sides of the CM L of same value to offer an impedance ratio on the same value parts at 100kHz of > 30dB. Higher inductance or switching rate would result in even more attenuation of conducted EMI. <S> The R8 (750) <S> C2 (68F) values shown have dubious values which must be incorrect. <A> Given the optimal dampening resistor for an LC resonator is sqrt(L / C) to produce Q of 1?, compute sqrt(3.3 milliHenry / 0.068uF) and you get Rdamp = sqrt(50,000) or 2.2 <S> * 100 = 220 ohms, thus not quite the "optimal" dampening value, but close.
I believe these two filters were intended to smooth the fast rise times present on the AC source voltage, probably to prevent disturbing the SMPS on each half cycle.
Is there something such as an infinite potentiometer? I am trying to find a component, that, similar to a potentiometer, delivers an analog output, but which can be turned indefinitely in a single direction. I have tried searching for something like this, but I never quite found anything that does what I want, while being relatively cheap. Please note, that I am not searching for a rotary encoder, since they either are clicky, do not have the resolution I require, do not support absolute positioning and are usually too expensive if they do support any of these. I imagine something like a normal potentiometer with multiple wiper contacts might work in this case. It would provide a smooth precise output even when turned in a single direction for multiple turns. Does a cheap part exist that behaves like this and if so what is it called? Edit: thanks /u/quetzalcoatl for providing the output potential diagram. <Q> The device Spehro Pefhany's answer builds out of two pots is actually available as a single unit, for example the ALPS <S> RDC803101A . <S> If you turn it, you get two sawtooth signals that are 180° out of phase, so when one output is in its “dead zone”, you can use the other one instead to determine the position. <S> This model also has no detents, so no clickyness at all. <A> The best continuous rotation sensor I've used is the AMS series. <S> Something like this might suit your purpose. <S> Of coursed they can't support infinite output values, but associated with an MCU you can set it to mid scale each time you turn your unit on, or remember last settings. <S> There are also plenty of relatively cheap optical encoders that would allow the same strategy of infinite rotation. <S> For example, this from Bourns <A> I have not seen something like that, does not mean that it does not exist. <S> It does not particularly lend itself to construction with normal pot designs, including modular ganged pots, because the leads usually come out of one side. <S> There are pots without end stops, however they have a dead angle. <S> Expensive long-life ones are called 'servo pots'. <S> You could make such a device by mounting two of these pots on opposite sides of the board (phased differently, obviously). <A> Bourns manufactures them in different ranges of resistance. <S> They come in various sizes, small and volume knob size too. <S> They help in precise control of resistance. <S> There are others too, with a dial inside and outside too, from Bourns. <S> I could get <S> a big multi turn potentiometer for my project for about 2 Dollars, and the small ones are 0.2 Dollars or so. <S> Here's what they look like... <S> These have 10 turns to vary a given potentiometer value. <S> So for a 10k potentiometer, you get 1k variance for each turn. <A> How "clicky" was the ball movement on an old-school ball mouse? <S> That uses a rotary encoder. <S> It's only a simple 2-bit one though, which is enough for speed and direction of motion, but does not give an absolute position. <S> Do you actually need an absolute position though? <S> This really comes down to your application. <S> If cost is an issue, you can also drastically reduce that in the same way as mouse manufacturers did, by making the encoder wheel part of the mechanism and just using a simple break-beam slotted disk for the encoder. <A> I believe this part did exist once, and they just used a stereo pot (has two separate cards), with one wiper rotated, and no stops. <S> Unfortunately I have no proof, so it could be a figment of my imagination. <S> If you want to try your idea, it's easy to get the top section open, and reverse the card. <S> You can't just reverse this wiper as it is keyed with 120deg tags <S> This pot has a separate pcb with the track on. <S> This means that the wiper rotates one way but not the other. <S> You want a pot where the track is printed on the card. <S> Unfortunately on this pot, the stop is in the bottom section, but you can get that open, push the stop in the picture out, and reassemble with the card and case half rotated 180deg. <A> For completeness, sin / cosine potentiometers are also available. <S> They are fairly rare and expensive nowadays. <S> A quick Google search found these: State electronics SPSC50S 2" Dia. <S> Servo Mount Potentiometer Atheris FSCB22A 23 mm diameter servo <S> mount <S> sin/cos potentiometer among others. <S> In general, potentiometers have fallen out of favour is position measurement devices. <S> This is because they tend to have inferior lifetime, resolution, linearity and cost compared to encoders, despite their significant advantage of being 'absolute' rather than 'incremental'. <S> This writer spent many an hour in his relative youth replacing noisy and/or non-linear position readout pots in medical systems. <S> The replacement pot then had to be adjusted, calibrated for gain and offset, and verified for linearity. <A> The Alpha <S> RV112FF may be what you're looking for? <S> In short, it's an endless dual potentiometer where both tracks produce a triangle shape as they're rotated, and they're offset by 90 degrees, so by reading both positions, you can deduce the absolute position. <A> You do not state the application. <S> If your goal is a volume control on an amplifier so that your gangsta rap can be turned up to infinite volume, I can't help you. <S> But if your goal is to detect the position of a rotating shaft, you might consider synchro transformers. <S> They give an x and y output, where x is the cosine and y is the sine of the rotation angle. <S> They can be turned forever (or until they wear out), and there are no wipers to go bad. <S> Of course, it is best if the excitation frequency is not lower than the shaft rotation frequency ;-). <A> the RV112FF from Taiwan Alpha <S> ( http://www.taiwanalpha.com/en/products/4 ) is such potentiometer with 360 degree endless rotation. <S> I found this while searching for a LONG time for drivers for such potentiometers. <S> I could not find any algorithms to decode them, so I have made one. <S> Hopefully this can be useful for you others looking for same. <S> https://hackaday.io/project/171841-driver-for-360-degree-endless-potentiometer ) <A> There are 360 degree linear pots that you can get without rotation stops, like http://www.bourns.com/docs/Product-Datasheets/6630.pdf <S> With these, there is always an interruption, so continuous rotation at constant velocity will produce a sawtooth.
The correct google term seems to be "sin cos encoder" , which finds plenty of hits, although many of them point to industrial units which have several cycles of sin/cos over their rotation, kind of combining a normal encoder and a potentiometer... What you may find useful is a multi turn potentiometer.
Why does my router have a power on/off switch? I have to develop a consumer product for home automation. We initially wrote a requirement to have a on/off switch, but after a second thought we realized that hard-reset can be done by simply unplugging the device. This lead to another question. Why customer products such as routers or Hi-Fi products usually have a useless on/off switch? Is there a standard behind that? <Q> It's largely for convenience. <S> Not having to crawl under desks to plug and unplug things you aren't using isn't exactly my favourite pastime, and I assume it wouldn't be yours either. <S> Adding a switch on the front panel to just simply turn a thing on and off without turning everything else off, nor having to dig into the mess of cables near your typical extension cord and wondering which thing to unplug just seems like a no-brainer. <S> Also, this reduces the strain (cycling) on any of the connectors used, as @Tony Steward pointed out. <S> About routers, some people still prefer turning them off when they're not in use, mainly to conserve power. <S> Uplugging the power jack to them may be an option too, but again a more painful one. <S> Having a switch also makes it easy to power cycle bricked devices. <A> One could simply remove the DC power barrel connector but they tend to be cheap with thin nickel plating which can erode and oxidize the substrate conductor from hundreds or thousands of operations, so that is your choice also with uncontrolled contact bounce unlike a spring switch which can also bounce but will be less than your power on Reset time by design. <S> So reliable power on Reset is still your choice of methods. <S> The cap surge currents tend to be far greater than the steady load current . <S> So soft starts may be advised but a DC switch is not mandatory but Life test verification in your DVT plan and design specs are imperative. <A> Completely unnecessary, since a reset isn't supposed to be needed. <S> The last thing any IT guy wants is end users turning off devices with a switch on the device.
The on/off switch is to make it easier to reset the unit. It's a feature commonly used as filler for consumer products.
Which type of DC electric motor is the best suited for driving a mechanical clock? I want to drive a clock mechanism with a motor. In order to get acceptable accuracy I need a motor that can deliver a certain rpm very precisely, is low on vibrations, noise and power consumption, and has a certain longevity. I don't need "production grade" accuracy, this is just for the learning experience, but I want to come as close as feasible. So far what I found out was that it should probably brushless and be able to operate at a low voltage. Still there is a staggering selection. Which other criteria should I pay attention to? <Q> The challenge is to get two or three separate hands moving from a single fixed rpm motor using only gears. <S> DC supply. <S> A stepper motor typically gives you 200 steps per revolution. <S> You could gear that to give the second hand a step per second or half-second. <S> You can precisely control it by microcontroller (so you'll have an accurate clock) and you still have all the gearing to play with between the second, minute and hour hands. <S> The stepper won't be cheating. <S> It will be a sensible solution to the problem. <A> Use the plate mover motor from an old microwave. <S> These are also available as spare parts for less than $10. <S> These are synchronous motors which rotate at a fixed fraction of the mains frequency, usually about 10rpm. <S> All you have to add is an additional gear which does one round per hour. <A> If you want 'a certain rpm very precisely', then your only options for a pure motor are a stepper motor, or a BLDC run as a stepper. <S> From the comments, you consider that use of a stepper motor is cheating. <S> It is, if you present the clock as pendulum/escapement regulated. <S> It isn't, if you want to build a mechanical time display, that's as accurate as the timebase you choose to employ. <A> Depending what you consider a "motor" you could consider one of the solenoid-assisted pendulums. <S> It avoids the sense of cheating as the period is derived from the pendulum, and, as a converter of electrical into kinetic energy is still legitimately a motor. <S> For example, suspend a magnet on the pendulum, and pulse a solenoid coil when the magnet triggers a Hall effect sensor. <S> See also Hipp toggle , S ynchronome , or a home built derivative , or the much less exotic <S> ATO clock .
You could use an ordinary motor, servoed with some sort of encoder, but that's just a more complicated way of getting to your exact rpm.
How do we define the cutoff frequency in an active Op-Amp filter? When we get a circuit such as the following: How do we define the cut-off frequency? Is it still $$f_c = \frac1{2\pi R_1C_1}$$ since \$f_c\$ is defined for \$X_{c1} = R_1\$?Or is it defined so that \$V_{out}\$(the one after OA3) is \$0.707V_2\$? <Q> The cutoff frequency is defined as the -3dB point, where 0dB is defined as the amplitude of the signal in the passband. <S> So it's still \$\frac{1}{2πR_1 C_1}\$. <A> It's defined to be the half-power point. <S> Since power is proportional to \$V^2\$ (and \$I^2\$ for that matter), one half power is when \$V_\text{OUT}=\frac{V_\text{IN}}{\sqrt{2}}\approx 0.7071\cdot V_\text{IN}\$. <S> There are other definitions. <S> Different filter types may set the bar elsewhere (Chebyshev, for example.) <S> My own way of looking at it is that the critical point is when the \$2^\text{nd}\$ derivative of phase with respect to frequency goes through zero. <S> But that's my arbitrary choice and it incorporates the effects of nearby poles and zeros. <S> So just ignore me on that point. <A> How do we define the cutoff frequency in an active Op-Amp filter? <S> f C} = <S> R\$ <S> Re-arranging we get \$f = <S> \dfrac{1}{2\pi C R}\$ <S> In your circuit you do have op-amps <S> but, they are only providing "gain" and this does not alter the relationship between cut-off frequency, C and R except in the case when the cut-off frequency is so high that the op-amps can no-longer provide that gain.
For a simple RC filter the so-called cut-off frequency is when the impedance of the capacitor equals the resistance of the resistor i.e.: - \$\dfrac{1}{2\pi
Another question about power to homes in Europe I have a couple more questions about power to homes in Europe.Our device draws between 12A and 45A (at 230vac) depending on its configuration. It appears that at the high end of the scale that will be a problem in the UK or France or Germany, where the domestic distribution panel is a single phase. (protected by a main breaker in the 60 to 120A range) In these circumstances (UK etc.) I assume there will be several individual circuit breakers each rated at 16A? IIRC I saw something about 32A circuit breakers somewhere - is this possible? In other countries (like Sweden) is the main protection a 3 phase breaker such that if one phase is overloaded all phases are interrupted? or are there 3 individual breakers? In these cases I assume the 3 phases are distributed throughout the home - some lights are on phase A, some outlets on phase B and some of each on phase C. Is there more than one circuit breaker for each phase? For instance is it possible that the outlets on the first floor use phase A, breaker 1 while the outlets on the second floor use phase A, breaker 2? What would be a common rating for each <Q> I'm in the UK, and my 45A device (instant heat electric shower) has its own 63A RCD/breaker wired directly from the company master fuse. <S> This fuse also supplies my distribution panel, with its array of smaller breakers for the 'conventional' circuits. <A> I’m in Switzerland and circuits are spread between the 3 phases, 10A and 16A breakers. <S> Some are « linked » as 3 together for the oven for example. <S> Note in the UK some power circuits are rated as 32A and this depends on the number of sockets they feed and spurs etc. <S> You would do well to purchase the wiring regs from the IEE - 17th edition now I believe. <S> And it’s good reading - if you have insomnia... :) <A> Even on a dedicated circuit, expect de-rating to be required. <S> Any large draw device will need a dedicated circuit. <S> The "32A" UK circuits are not good for 32A. <S> They are actually 16A circuits wired in a "ring" <S> so 16A is fed both directions. <S> Treat them like a 16A circuit.
Euro circuits are generally 13 or 16A. Don't expect to use the full capacity, there will be de-rates required on a plug-connected device, or on a hardwired device which shares a circuit with receptacles.
Finding the open circuit voltage I am asked to find the open circuit voltage v(AB). So far, I have found the current, I(1) by using the current divider, and I got approximately: 0.307A. Except, I am not sure where to go on from here to find the open circuit voltage. Any help would be appreciated. Thank you very much. <Q> Open circuit voltage is always the voltage of the component to whom the open circuit is parallel. <A> All you do is apply ohm's law to solve this. <S> first find the source voltage by finding the load resistance and multiply that by the known current. <S> so \$ \frac1{ \ \frac {1}{47}+\frac {1}{22+68} } <S> \$= \$ \frac1{ \ \frac {1}{47}+\frac {1}{90} } = <S> 1/(0.0213 + 0.0111)= <S> 1/0.0324= 30.876 <S> \ <S> \Omega \$ 0.750 <S> A * 30.876 ohms= 23.157 <S> V find the current in the 22 ohm and 68 ohm branch.... <S> \$\frac{23.157\ V}{90\ \Omega} = <S> 0.257\ <S> A\$ <S> now lets see what the voltage drop across the 68 ohm resistor.... <S> 0.257299269 <S> * 68= <S> 17.496350292 V <A> One way to solve this is to progressively simplify the circuit into either a single Thevenin or Norton source. <S> For example, if going the Thevenin route, combine the current source and the 47 Ω resistor to make the equivalent Thevenin source. <S> Now combine that with the 22 Ω resistor to make the equivalent Thevenin source of everything left of the 68 Ω resistor. <S> Now you have a simple problem of a Thevenin source with a resistive load. <S> It is now simple to solve for the voltage across the 68 Ω resistor.
Open circuit voltage is the voltage which is across 68 ohm resistor.
Can I power 100 ATMega328 in parallel? I'm in the napkin-sketch phase of a project that will be ~100 custom devices in a big mesh. Each device is an ATMega328P on a custom PCB with 16-40 'mini' neopixels. I plan to power the whole installation with something like this 5V, 10A supply (keeping my use of the neos subtle) or possibly a 20A supply if I need to, say, run the neos a bit brighter. What I'd like to do is distribute the power through each board to the next, so that the whole installation has one connection to the power supply, rather than one per board. My thought is to have two JST connectors on each PCB, one for +5VDC in, the other for +5VDC 'thru' to the next board. Is this possible/dumb? This is more power than I'm used to, but I don't think it's so much power that I'd need bus bars, solder islands or a ridiculous (4+ oz) pour on the PCB. I'm thinking just a gigantic (~1.5cm) trace from the "in" connector to the "thru" one (and placing them close to each other). <Q> Mainly, I'd be concerned about noise and voltage drop. <S> One alternative is to supply ~6V instead of 5V and on each board include a Low Dropout (LDO) regulator to obtain the 5V needed to run the board. <S> Also, I would try to avoid passing the power supply through the foil but use vertical PCB mount bussbars to route current across the board. <S> Ten-amp connectors shouldn't be a problem unless you have extreme size restrictions. <S> Multiple pins can be paralleled to increase the ampacity. <S> Twenty amps might be more of a challenge. <A> Obviously, at least one connection in the mesh will have to be able to handle the full 10A (or 20A?). <S> This includes both the physical connector and the traces on the board. <S> If the boards are identical, then they ALL need to be able to handle that current, which means that they'll all have to have a fairly beefy connector and heavy traces. <S> It might make more sense to provide each board with four connectors (N, S, E, W), and then feed power along one edge or two opposite edges of the mesh. <S> Then each connector only needs to handle about \$\frac{1}{\sqrt{N}}\$ of the total current. <A> Instead of connecting 100 boards in series, make a backplane PCB or series of PCBs to distribute the power. <S> You can have a single heavy duty connector and branch out the power.
And if you have the room, you could use 24V as your main supply and install a small SMPS at each board to provide the 5V; this way you would be connecting and routing 1/5 the current as you would by supplying 5V. I wouldn't string that many loads (boards) in series and expect good performance.
Will the High-Level Synthesis (HLS) design approach for FPGAs reduce the demand for RTL designers? I'm a senior electrical engineering student who's very interested in FPGAs and RTL design. But recently after learning what HLS compilers are capable of I had to consider the possibility that eventually the majority of RTL design will be done by computer science gurus using high level languages which will reduce the demand for RTL design specialists. I understand that the need for experts in hardware description languages will never completely disappear as long and FPGAs still exist, so my question would be is it reasonable to think that the need for RTL/FPGA designers will be significantly reduced by the growing mainstream commercialization of HLS design tools? <Q> Eventually, the compiler more or less wiped out the assembly programmer. <S> But it took a long time, and there are still a few paid ones about, optimising high speed functions to the Nth. <S> There are more hobby ones about, doing it the hard way for the fun of it. <S> Eventually, HLS will more or less wipe out the RTL level designer. <S> But it will take a long time, and there will still be a few paid ones about ... <A> As long as performance is resource constrained, understanding the lower level functionality of the hardware and coding to deal with its idiosyncrasies will always produce more efficient and thus more cost effective solutions. <S> If an application can tolerate area, speed, and/or cost penalties, then HLS solutions may be sufficient. <S> Those who understand the lower level functionality can also command a higher salary. <A> In C and assembly programming, if you want to optimize code and make it run as fast as possible, code is hand optimized for the architecture of the CPU and its pipeline. <S> The code is even optimized for cache sizes on CPU's. <S> Even traversing arrays can be optimized for cache loading strategies. <S> While we have less machine code programmers, they are still necessary. <S> The same goes for RTL\FPGA designers, if you want your RTL to be optimized, you will need a designer that can understand FPGA architecture a on a high level. <S> An RTL designer can hand optimize designs, which a computer won't have that ability because they don't have the connectivity and understand ideas like humans do. <A> At the very least, people involved in development of those HLS tools will have to know how they work and thus understand RTL in details. <S> Just like with general programming nowadays, when you have assembler guys in each compiler/HAL/System library team. <S> Even for regular HW designers, the knowledge of RTL will be a big plus. <S> How will you debug your HLS code which doesn't work as you expect, if you don't understand the concept it is based on? <S> Again, this is the same as with software, where programmers who have no idea of assembly can be completely blocked during debugging when they see a variable with no address or a breakpoint inside an inlined or partially merged function which triggers "for no reason". <A> I personally believe we are heading in the direction of higher level coding, being that parts are growing in orders of magnitudes (in resources, that is). <S> But I think your job will be safe for awhile, and here's why <S> : Compilers eventually made assembly programmers go extinct, but it took quite some time. <S> FPGAs are generally in much less demand than software, so I believe this will scale down the number of people/resources being poured into this effort of making this higher level coding possible.
Except for low volume applications, I think it will be a long time before the efficiency of a design can be ignored, so the market for knowledgeable HDL designers is not going away any time soon.
Glitches from wirewound potentiometer I'm having issues with deployed knob pots after they've been in use for a while. It's been an ongoing problem that we don't see at our local facility. I'm wondering if any of you may have experienced this problem, and more importantly, are aware of a solution. Pot: Bourns 3590S-1-203L, 10-turn, panel-mounted, 20k, knob-pot. https://www.bourns.com/pdfs/3590.pdf Problem: Durability. Common occurrence of glitchy output after some time (months/years) in use. A picture showing traces from both a good (blue) and bad (black) pots, turned by hand: Initially, there are no indication of problems. Glitches manifestafter some time... Once a pot develops glitches, they are permanent and always appear atthe same location in the 10-turns. Glitches may appear, seemingly, at any location in the ten-turnrange. Duty cycle is low. Lets say a full ten turns forward and back everyday (which would still be an over-estimation). The pot setting may remain (energized, or not) at the same location for days, weeks. Although discouraged (and unusual), the system may be power cycledwith the wiper set in any location. It should typically be set to full CCW. We are very careful when hand-soldering leads, using a heat-sink on thepot tabs. High quality, temperature controlled irons. Experiencedassemblers. SAC305/ No-Clean flux. The pot wiper is placed at one extreme location prior to soldering(mainly as a way to determine if this problem could be a result ofheat damage during soldering). Working environments tend to be environmentally controlled. Eventhough high-humidity is unlikely, it's possible. Knob pot dial and panel are well earthed, with a dedicated chassis conductor. We've seen failures for pots with both plastic and metal shafts. Here is a copy of the driver and buffer circuits for the 20k pot: The problem pot is the "Panel_Cmd_Knob_Pot" connected to the top 3 yellow ports. (Not shown above is U2A. This section is used as another low-speed buffer elsewhere.) The +/-12VDC supplies come from +/-15 rails (switching supply), linearly post-regulated on-board (LM3937/LM2990 series). All connections are 'permanent' (no hot-plugging). What I plan on trying next: Add a series resistor from the knob pot wiper to the U2B buffer input. Perhaps current-limiting power-up transients, that may or may not exist. Any better ideas? Updates: 5/22: Sent suspect pot to Bourns for eval. 6/5: Requested status update from Bourns. No response yet. 7/22: Bourns has acknowledged that they have the pot in hand, and the fellow who would look into it is back from traveling. However ever since, they've gone dark and appear to be unwilling or unable to provide any insight. Suggestion: Don't do what I did and/or avoid these parts. 9/10: Bourns has stayed quiet. Giving up, and closing this question. -Chris <Q> Adding a heavy duty RC filter (1 M * 100nF) will help reduce noise while pot is moving, but a bad spot is always going to be a bad spot. <S> I ran into the same problem with variacs under daily use. <S> At some point the element had no conduction at the bad spot, but micro-arcing of current from using the same spots over and over again was the culprit, so every two years I had to replace them. <S> I did not have this problem with the pots you use. <S> I did switch to 1K pots to reduce sensitivity to noise, but I never had one with bad spots even after ten years of heavy use, but I used conductive plastic potentiometers, not wire-wound. <A> switch to a conductive plastic element or even a try the sealed bushing of the same pot. <S> The problem is that it could have develop wear spots from the mechanical wiper, or crud/dust has got inside it. <S> I'd probably try the 3590S-4-203L, if that didn't do the trick, then maybe just a seal shaft conductive plastic pot if it doesn't really need 10 turns. <S> If this design didn't have current flowing through the wiper you would have never knew of the developing wiper noise. <A> You must draw some current from the wiper for it to be self-cleaning just like with switches. <S> 1mA should be enough. <S> If it's gold-plated, maybe 50uA is enough. <A> I've seen this type of failure before with potentiometers, where the track exhibits strange properties during the turn. <S> Long story short, the tracks were disintegrating/failing due to vibration from the vehicle. <S> We ended up switching to RVDTs. <A> (Wanted to COMMENT, but don't have enough points, <S> so ANSWERing instead.) <S> Just a SWAG on my part, but could galvanic corrosion be the cause or a contributing factor? <S> I remember being a new engineer working on phone systems and learning that the system voltage is ground and -48VDC, rather than ground and +48VDC, to counter this effect. <S> Referring to the schematic, the pot's wiper goes only to the non-inverting input of U2B, so the input bias current will flow though the wiper. <S> The bias current spec is less than +/-1 <S> nA <S> (+/-1.5 nA over temp), so not a bunch, but still something. <S> Maybe with the right set of conditions -- input bias current polarity and magnitude, shaft inactivity, humidity, temperature, (Elvis sightings??) <S> -- a problem will occur. <S> A clue would be if the bad spots are present only where the wiper has been parked for a while. <S> If this does turn out to be an issue, one solution would be putting a resistor from the wiper to the appropriate end of the pot: the high end to source current into the wiper, or the low end to sink current out of the wiper. <S> A large value resistor (e.g., 1 Meg) would probably do the trick and not affect the range of the pot. <S> Like I mentioned, it's just a SWAG, but wanted to pass it along. <S> Maybe the engineer at Bourns could review (if he gets back), or maybe some folks on SE who are more familiar with the topic could comment. <S> Hope you get to the bottom of this and get it resolved!
A 10K resistor in series with the wiper would reduce any shoot-through currents when the pot is at extremes of range, and maybe the op-amp conducts or clamps voltage close to their supply rails.
What is better, always keep connected or discharge/charge cycles for the smartphone battery? My smartphone is serving as internet hot-spot over WiFi for my home/office laptop.I’m keeping phone always plugged in charge. Most of the day I’m home and using a lot of traffic.What is the best strategy to prolong Li-ion phone battery life? Keep always connected? Full discharge/charge cycles? Try to keep its state of charge in some range of ⅓ or ⅔? Use fast or slow charge? <Q> The best solution would be to charge the battery to around 50% or a little more, and take it out of the phone for storage in a cool place. <S> If the phone supports running without a battery in it. <S> The next best I guess would be to try to keep its state of charge in some range of ⅓ to ⅔, using slow charge. <A> Any charging/discharging causes wear. <S> The 2nd point will be difficult as most phones will simply charge the battery to 100% when the phone is connected to a power source. <S> On a rooted phone there might be something that can be done to change this but that might depend on the phone model. <S> Most phones do not work and or start up without a battery so removing the battery (when it is at around 50% charge level) might not work for you. <S> If there is no "hack" to make the battery stay at around 50% charge level <S> then I suggest just keeping the phone plugged in all the time <S> so there is no charging or discharging. <A> This seems to be a rhetorical question because normally you don't have any control over last three points. <S> But the full charge-discharge cycle would be the worst strategy. <S> Practically every smartphone has an intelligent charger that follows the standard charging procedure for Li-Ion batteries: first it applies constant current until the voltage gets up to float voltage (4.20 V for regular Li-Ion, and 4.35 for Li-Po cells), so-called constant voltage stage. <S> Then the charger sits at this voltage level while the battery sucks the full charging amperage for a while. <S> Then the battery (by itself) begins to reduce its current. <S> At this point the battery recharges about 80% of its rated capacity. <S> The dropping current indicates the final charging stage. <S> Chargers usually terminate (disconnect) when the current drops to 1/10 of the rated charging current. <S> If battery is not loaded, the charger would wait until the terminal voltage drops by 100 or 200 mV (by itself, due to self discharge or some sleep-mode consumption), and will kick off a new charging cycle. <S> But since the battery is already charged to the top, the voltage will rapidly rise to 4.2V level, and current will be already low, near the termination threshold, so the cycle will be fairly short, few seconds maybe. <S> Then the cycle repeats. <S> It is sometimes called "trickle charging". <S> Modern charger ICs do this autonomously, without SOC intervention. <S> For the good lifetime for a battery it would be better to terminate the charge right at the beginning of the current drop, or at something like 20% drop. <S> It will save the battery from overcharging electro-chemical effects and prolong its life. <S> Theoretically a SoC can adjust charger parameters, but it would be a challenge to find and alter the kernel code for this. <S> The fast or slow charge also can be controlled via computer interface, at least in most Texas Instruments ICs. <S> So if you have an access to charger configuration, slow charge will also help to maintain good SOH - State of Health of the battery. <S> In short, keep it always connected, don't do deep discharge cycles, reduce charge current if you can, and rise the termination threshold to maximum if you can, and you will be fine. <A> Lithium-ion batteries work the best between 40 and 80 percent of charge. <S> Correspondingly, you can use some apps which notify you when the charge level goes below (say) 35% while discharging or above (say) 85% while charging. <S> You should definitely not go for full charges and discharges.
To get the longest life span from a Li_Ion based battery you should: charge it to a charge level of between 40% to 60 %, this makes the internal stress in the battery the lowest. Not use the battery, so not charge or discharge the battery at all.
I2C/TWI in ATMEGA - where is voltage source? While reading about I2C/TWI protocol, i recognized as important part the ability to pull the signal down by any member of the communication. Thus pull-up resistors being very important here. There are few schematics I found: http://www.cypress.com/documentation/application-notes/an50987-getting-started-i2c-psoc-1 https://cs.wikipedia.org/wiki/I%C2%B2C https://www.superhouse.tv/i2c-for-arduino/ All of these schematics contains VCC source for SDA and SCL. What I do not get is where/what is voltage source in the case of ATMEGA & sensor (or two atmels cpus). In all schematics I have found there are only two cables - SDA ~ SDA and SCL ~ SCL. I cannot grasp how would that work if there is not external VCC source. Sorry if the answer lies somewhere here on the stack, I could not find it. EDIT: As requested - links with vcc missing In here https://howtomechatronics.com/tutorials/arduino/how-i2c-communication-works-and-how-to-use-it-with-arduino/ - there is actually both of the schematics (in the beggining one with the external voltage connected through resistor to SDA & SCL) but in the schematics with arduino and two moduls, no vcc. <Q> I2C signals are externally pulled up. <S> The current flows from the pull up. <S> Signal pins are open drain and only set the low signal level. <A> Sometimes schematics, especially simplified diagrams, simply leave out the power and ground connections. <S> They are assumed to be provided somehow but the detail is not important. <A> What I do not get is where/what is voltage source in the case of ATMEGA & sensor (or two atmels cpus). <S> In all schematics I have found there are only two cables - SDA ~ SDA and SCL ~ <S> SCL. <S> Thanks for updating the question with an example of one of the schematics that you don't understand, which I've copied below: <S> ( Source - How To Mechatronics ) <S> In all schematics I have found there are only two cables - SDA ~ SDA and SCL ~ <S> SCL. <S> Actually SDA and SCL are not the only connections in that diagram. <S> (a) <S> There are also power and ground connections (see the red & black connections in the diagram above) from the Arduino. <S> (b) <S> The "sensors" you mentioned are not only sensors - they are sensor breakout boards which contain more components than just the sensors. <S> In the case of those two breakout boards mentioned on that web page, both breakout boards also have pull-up resistors for the I2C SDA and SCL signals. <S> From experience, I've marked the I2C pull-up resistors by adding yellow rings on this image from that web page: <S> ( Source - How To Mechatronics ) Summary: <S> The explanation above shows where the I2C pull-ups resistors are, in the diagram you linked: <S> This is partly a limitation of the "Fritzing" diagram you were looking at, which shows the physical breakout boards but not the components fitted on them, like the I2C pull-up resistors. <S> (There are some cases, where you would need to manually change the I2C pull-up resistors which were originally fitted on such breakout boards, especially when connecting multiple breakout boards on the same I2C bus. <S> That decision depends on factors such as the length of the bus, the I2C clock speed, the I2C pull-up voltage and the specific resistor values originally fitted on the boards.)
There is a power source (from the Arduino) to the sensor breakout boards, to power the sensors and to be available to the I2C pull-up resistors; and Both of the sensor breakout boards have got I2C pull-up resistors fitted on them, even though these resistors were not shown separately, like on the earlier links in your question.
Running a desk fan off a car battery: How long will it last? I'm going on a road trip and will be sleeping in the bed of the truck at night. I want to be able to have a fan running during this time. I have a couple old car batteries sitting around, and I was thinking I could charge them up before I leave home, and then use them to power the fan at night. The engine will not be running when I am using the fan, and I don't want to drain the battery that's used for starting the engine. The thought is that I get a power inverter so that I get 120 VAC out to power typical AC desk fans (the smaller the better). I want to calculate how long a battery can power such a fan. Let's say the fan is a 120 V, and on the "Low" setting consumes 30 W.Let's say the battery is a 600 CCA, 12 V, lead-acid car battery, with a 50 Ah capacity (20 Ah Rate). How can I calculate the time that the battery will last? I know that the power rating of the fan can give the current used (P=IV), and the capacity of the battery can tell me how long at whatever current (Capacity = Amps*hours). But I don't know which voltage to use (12 or 120), or how to incorporate the inverter or the part about the 20 Ah Rate. I'm also open to other ideas for running a fan with the engine off. Another additional thought is to connect the battery in parallel to the truck's battery and that way it would be charging when I drive during the day, but the batteries are different capacities, and I don't know if there would need to be other hardware to prevent my truck battery from being drained. If this can't be done then I will just drain the battery and when it's dead, I'll just have to wait to get back home to charge it. Thanks! <Q> @PDuarte's answer is not quite correct. <S> However, let's try another tack. <S> Your 30 watt fan will draw about 2.5 amps at 12 volts (2.5 times 12 is 30). <S> Assuming 90% efficiency from the inverter means that the inverter will draw 2.5/.9, or 2.78 amps. <S> A 50 Ahr battery will last 50/2.78 or 18 hours. <S> Why is PDuarte's answer different? <S> Because a battery does not lose voltage linearly with time. <S> Here is a site which addresses the issue. <S> A "typical" lead-acid battery will have a discharge curve which looks more or less like for a 20 Ahr unit. <S> Since you are talking about a 50 Ahr battery, the 0.6 A curve is closer to correct. <S> Note that the battery voltage will remain above 11 volts pretty much to the end. <S> However, you need to be aware that, as the site says, Don't expect battery to give you 100% of capacity and even don't try to be close to that. <S> Granted, 8 hours times 2.78 gives 22.2 hours, which is less than a 50% discharge for your 50 Ahr battery, so you're unlikely to experience problems, but it's something to keep in mind in any future endeavors <A> Rough calculation following.... <S> Fan is drawing 30W . <S> Assuming an inverter of 80% efficiency, this means that the power consumed by the battery is 37.5W <S> (37.5 x 0.8 = 30) Assuming a nominal value of 12V from the battery in order to not complicate things, this means the current consumed @ 37.5W is 3.125 A . <S> This is the current value we use for calculating the time. <S> For a 20Ah battery, this means a 6.4 hour (20 / 3.125) lifetime. <A> Quick calculation that could estimate the best case (i.e. don’t expect to see the fan working longer than that: <S> Your battery energy: <S> 50Ah (that doesn’t actually means it will have this charge, generally is less than that) <S> Your inverter efficiency: a fantastic circuit could reach around 90%. <S> Your load: <S> 30W <S> Let’s not consider the battery voltage drop during time and estimate 8V average until it looses all energy <S> So <S> : 50 x 8 = 400 W (this is 400W power during 1 hour)For your fan, 400 / 30 ~ 13.3 hrConsidering losses: 12 hours of total fan if battery is fully charged. <S> THIS IS THE BEST CASE you’ll get, <S> normally it’s less. <S> Also, I’m not considering that your inverter won’t be able to use all the battery’s energy since it will stop working after the input voltage is less than a specific threshold depending on the manufacture’s design.
There are such things as "deep discharge" lead-acids available which will tolerate heavy use, but they are expensive, and car batteries are not made to that standard.
Is there any advantage to have a dedicated hole to measure milliamperes on a multimeter? I have noticed that high-end multimeters usually have four holes: Common (COM) Volts (V) Milliamperes (mA) Amperes (A) While cheaper ones usually have three holes only: Common (COM) Volts (V) / milliamperes (mA) (shared) Amperes (A) Is there any clear advantage to have a dedicated hole for mA measurement? <Q> Meters are often left connected to voltage sources for purposes of monitoring them. <S> Further, they often use the same knob for both mode selection and power on/off. <S> If a meter uses the same knob to turn the meter on and off and control the mode, it may be very easy for someone turning the knob to accidentally turn it to a current-measurement mode while it is connected to a voltage source. <S> Doing this will effectively short out the supply, putting as much current as it can source through the meter. <S> Not good. <S> Accidentally switching the meter to a resistance-measurement mode could pose similar risks if the meter is connected to a particularly large voltage, but it's easier to protect resistance-measurement circuitry against moderate overvoltage than it is to protect current-measurement circuitry against severe overcurrent. <S> In some cases, it may also offer the benefit of allowing the meter to pass through current any time the current-measurement input is used, even when the power switch is "off", thus allowing a device under test to be left powered on without wasting out the meter's battery at times when nobody cares about its measurements. <A> Let's use the term "socket" rather than "hole". <S> The meter section of a multimeter usually consist of a millivolt meter. <S> Full scale is typically ±199.9 mV (200 mV nominal) for what's now considered a low-quality meter and ±399.9 mV, <S> etc., for better meters with higher resolution. <S> All measurements including voltage, current and resistance have to be converted to mV in this range to get a meaningful reading. <S> From Ohm's law we can calculate the shunt resistance value required to generate the required voltage for various current ranges: <S> Range Resistance2.000 mA 100 <S> Ω20.00 mA <S> 10 Ω200.0 <S> mA <S> 1 Ω2.000 <S> A 0.1 <S> Ω20.00 <S> A 0.01 Ω * * Most meters will use this value for the 10 A shunt value but the power rating is only good for 10 A. <S> The idea here is that inserting the meter into a circuit to measure current will cause a maximum voltage drop of 200 mV and minimise the disturbance to the circuit under test. <S> Figure 1. <S> Innards of a no-name multimeter. <S> Source: <S> Dismantle-It . <S> In the PCB of figure 1 notice the fine traces going to the range selector contacts. <S> These won't take 10 A. <S> Also notice the 10 A shunt resistor (a piece of resistance wire) mounted at the bottom of the board but standing off it for cooling. <S> The manufacturers seem to calibrate it by attaching the brown voltage measurement lead at the appropriate position along the shunt - hopefully after a test measurement. <S> Any decent meter will use a dedicated socket for the high-current range to avoid running high currents through the selector switch. <A> It is cheaper for the manufacturer, who doesn't have to engineer a way to switch high currents to different shunts. <S> This was difficult to do well with mechanical switches. <S> Since the advent of power fets, it is just an economic choice. <S> Tektronix TX1 and TX3 meters solved it in the '90s, and did away with it. <S> e.g TX schematic pg 48 . <S> (You will see that the fets don't carry the 10A range, only the lower 100mA ranges) <S> By contrast the TX3 has no mA hole, but still has a 100nanoamp resolution. <S> It is hugely inconvenient for users, as the mA fuse is always blown, if you work anywhere meters are shared. <S> Personally, I loathe the mA hole. <A> The higher current range requires a lower resistance shunt, which will not provide much signal or even accuracy for low mA range currents. <S> The signal/noise ratio and accuracy can be poor even when it's amplified. <S> The mA range can use a larger resistance shunt for better accuracy and noise performance.
Using a separate connection for current measurement means that turning the knob to a current-measurement mode while a probe is connected to a voltage source (and fed to the voltage-input jack) will likely yield either a meaningless number or an error display, but will not allow massive amounts of current to flow through the meter. Low cost meters save money, by only having a single shunt, no mA hole, but no mA range.
What power supply do I need for my LED light strips? My set up is this: Power supply > RGB LED WiFi controller > 1 to 3 cable splitter > 2M cable (x3) > 132.5cm 120leds/m 5050 RGB strip (x3) I contacted the eBay seller about what power supply I would need to power the 5M cable they provided. They told me 12V 5A. After a little research it seems that this is wrong. I read that 5050 LEDs draw 60mA per segment (3 LEDs per segment). There are 200 segments in this 5M strip, so 60mA x 200 = 12,000mA. Which would mean I would actually need a 12V 12A power supply. Unless the current draw from 5050 LEDs differ from different manufacturers? I won't need this much current since I'm cutting off 3 individual 132.5cm strips from mine. Each strip has 159 LEDs, which equates to 53 segments (159 / 3). 60mA x 53 gives a current of 3180mA for one strip. The total current of all three is 9,540mA (3180mA x 3). So I guess this means I need a 12V 10A adapter? This is expensive though, so I am wandering, if I'm not powering them to white all the time, I could manage with less current? I've already tested a 12V 5A adapter on the strips and it seems to work fine. It doesn't get hot or anything. I even tried a smaller section of strip to see if it was any brighter and it's seems to be the same brightness. Surely it should be brighter than using a longer strip?? <Q> Stick with what the seller has told you. <S> The one thing you don't know is the rated voltage (forward) of each LED.If you cut out LEDs and don't see a change one of two things is going on. <S> There is a current limiter inline to the diodes. <S> You have reached maximum intensity, and going with any fewer LEDs would cause a short life span. <S> After you get to maximum intensity, more current does not show a greater intensity, it just damages the LEDs. <S> As always, it would help if you had the data sheet for the LEDs, so could know the maximum POWER (V x I =P) that the diodes could handle. <S> Then you could figure out no matter how many LEDs you were using what the voltage should be. <S> By removing that section of strip, you may have shortened their life. <S> See if the seller can fill in that info gap. <A> Your LED strips have LEDs grouped with three in series, and the groups are all in parallel. <S> Each group has its own current limiting resistor. <S> Because of the arrangment of series and parallel for the groups (and because each group does its own current limiting,) the current drawn by each group is pretty much independent of the other groups. <S> If the power supply cannot deliver enough current for all the groups in parallel, then you would see your expected result when removing groups - removing a group would make the others brighter. <S> What you have read about LED strips in general doesn't have to apply to the strips you have at hand. <S> The manufacturer can decide how much current each group should get. <S> They pick an operating voltage (12V) then subtract from that the forward voltage of the LEDs in series. <S> Then, they pick a desired current for the LEDs. <S> From this data, they calculate the needed resistance to limit the current. <S> You could try to work backwards from known data (supply voltage, resistance, estimated forward voltage of the LEDs) to get the current needed for each group. <S> Or, you do it the easy way. <S> Use a multimeter in current measuring mode. <S> Put it in series with your LED strip. <S> Power up your strip. <S> Measure current. <S> Divide measured current by the number of groups in the strip. <S> You now know how much current each group needs. <S> From that, you can calculate the total needed current from your power supply. <S> The basic unit for your strips is the the 3LED group. <S> When calculating the current, you need to figure out how many of those you will be using. <S> Remember to over rate your power supply somewhat. <S> If you calculate, say, 800mA then a 1A power supply would be OK. <S> If you calculate 1500mA, then you'd probably want a 2A or maybe a 2.5A power supply. <S> The idea being not to push the power supply to its limits. <S> It will run cooler and last longer that way. <S> Also, if it can supply more current than needed then you won't have to worry about it wimping out - the LEDs will always be at (about) <S> the same brightness. <A> You have the general idea right <S> but there are a few caveats. <S> These led strips arent actually designed for 20 mA at 12V (per segment per color). <S> The LEDs tends to be underdriven at that voltage. <S> They tend to have resistors targeted for 20mA at 14.2V. <S> At 12V they will be lower, likely <S> 17 mA. You can test this with a ammeter or voltage meter. <S> These led strips are on relatively high resistance FPC. <S> As the strip gets longer and the combined current across the copper increases, the voltage across the strip starts dropping. <S> Which leads to dimmer LEDs at the far end from power and a lower overall current as the system balances itself out. <S> For you this means that the total current needed is lower than stated. <S> The sellers tend to be resellers with no real understanding of how the product works so they regurgitate whatever info they think they were told about it. <S> As to one small section being brighter than a large section, it wouldnt be, as long as the supply can provide the current as set by the current limiting resistors on the segment.
Your best bet is to simply power one section and measure the actual requirements.
Why is "wavelength" used as a unit for the length of an antenna? We often refer to antenna size relative to wavelength . For example: a 1/2 wave dipole is approximately half a wavelength long. Wavelength is the distance a radio wave travels during one cycle. ( Here ) Why is antenna length measured in terms of wavelength? Wavelength is not even a universal unit or SI unit. Wavelength is not a fixed constant and varies from wave to wave. So why is an antenna measured in terms of wavelength? There are formulae for calculating antenna length in metres ( here ) but why are antenna lengths not described in metres in the first place, and why do we have to use formulae to convert wavelength to metres? What is the importance of wavelength as a unit of antenna length? <Q> Antennas are designed for operation at a specific frequency, and the physical dimensions of an antenna scale with the design frequency. <S> In the case of a dipole antenna, things like the antenna gain and directivity depend on the length in wavelengths, known as the electrical length. <S> So if you know the antenna is, for example, a 1/2 wave dipole, you know immediately what the gain, directivity, and radiation pattern look like. <S> If the length was specified in meters, then you would have to also know the design frequency so you can calculate the electrical length in wavelengths in order to determine the antenna characteristics. <S> Also, it is possible to use electrical lengthening techniques which make the antenna behave electrically like it's longer than its physical length, complicating things when you know only the physical length but not the electrical length. <S> I will note that it is conventional for some antenna types to specify the size in wavelengths, and for others in meters. <S> For example, dipole antennas are very commonly specified in terms of their electrical length in wavelengths, while dish antennas are commonly specified by their diameter in meters. <A> Not only is it best practice to state the length in \$\lambda\$ <S> it's also important to specify the type i.e. monopole or dipole for instance. <S> Consider a monopole and look at the impedance it presents to the circuit it attached to: - A typical quarter wave monopole has zero reactance (magenta line) and has a radiation resistance of about 37 ohms (although it's a tad difficult to get a precise value from the graph above). <S> If this were a half wave dipole it would have double the radiation resistance of a quarter wave monopole <S> so, just saying a 10 metre antenna tells you nothing that is import for the designer. <S> But monopoles can be short and specifying one that is one-tenth \$\lambda\$ <S> is useful to know because a designer would be able to estimate at its optimum frequency it would be capacitive at -j500. <S> A fast car isn't necessarily a Ferrari or a Lamborghini <A> Actually this is a very basic question about high frequency (HF) applications. <S> If one is talking about HF, the wavelength is short in comparison to the transmission line, which is the case in an antenna. <S> The wavelength is given by $$ \lambda <S> = \frac{c}{f}\,.$$The frequency \$f\$ is the operating frequency. <S> The propagation speed \$c\$ is given by$$ c= \frac{1}{\epsilon_0\epsilon\cdot\mu_0\mu}\,.$$If we have free space, <S> \$\epsilon\$ and \$ \mu\$ are one and \$c\$ simplifies to the speed of light \$c_0\$. <S> If there is dielectric material, in whicht a wave propagates, the speed of the wave is dependent on these two parameters (\$\epsilon\$, \$ \mu\$). <S> So the quantity of how the wave is propagating is important in the design of an antenna. <S> With the wavelength \$\lambda\$, one can directly see, which dimensions the antenna has, without further calculations. <S> \$I\$ shows the current distribution and \$V\$ the voltage distribution over a half-wave dipole antenna. <S> So one can see that \$\lambda=2\pi\$, where \$2\pi\$ is one period of the voltage/current distribution. <S> The current distribution over the dipole plays an important role e.q. for the radiation pattern. <S> So it makes sense to give the quantity \$\lambda\$ <S> to directly have a feeling for the current distribution over the piece of wire. <S> Furthermore, the wavelength is just a length, so its quantity is given in SI units, for example meter$$[\lambda] = <S> \mathrm{m} \,.$$ <A> Just as PlasmaHH commented, the properties of an antenna are dependent on its wavelength. <S> This wavelength is frequency dependent. <S> So you can have two antennas with the same length with both a different impedance matching for two different frequencies, so one of the antennas could be a full wavelength antenna for frequency 1 while the other one may be a quarter wavelength antenna for frequency 2. <S> In Antenna basic concepts <S> they'll explain the difference between different antenna lengths: <S> 1/4 wave: A single radiating element approximately 1/4 wavelength long. <S> Directivity 2.2 dBi, 0 <S> dBd. <S> Loaded 1/4 wave <S> 1/2 wave: A single radiating element 1/2 wavelength long. <S> Directivity 3.8 dBi, 1.6 dBd. <S> A special design is the end fed 1/2 wave. <A> Wavelength is not a fixed constant and varies from wave to wave. <S> So why is an antenna measured in terms of wavelength? <S> What is the importance of wavelength as a unit of antenna length? <S> Because different wavelengths(frequencies) require different length antennas. <S> Size of antenna must be very closely tuned to the length of the wave <S> it's supposed to work with. <S> There are formulae for calculating antenna length in metres (here) <S> but why are antenna lengths not described in metres in the first place, and why do we have to use formulae to convert wavelength to metres? <S> Where do you start when you're building an antenna? <S> You start with "what wavelength(frequency) <S> will it operate on?". <S> Therefore you start with wavelength and that is your entry data. <S> So the formulae are designed to work this direction: you enter wavelength (or frequency) and it tells you required dimensions of your antenna. <S> You never start with meters and ask "what frequency will it operate on?" <S> (except those rare cases when you find some old junk in the attic and try to figure out what the hell it is) <S> The answer: <S> We start with wavelength to arrive at meters because we design antennas to match a given frequency, not design frequencies to match a given antenna. <A> The same antenna design may be used for a variety of different wavelengths. <S> Wavelength in the antenna design diagram is a variable. <S> To build the antenna you would substitute the wavelength variable in the diagram with the actual wavelength value (e.g. meters, inches) corresponding to the primary frequency you want the antenna to receive.
Antenna design described in absolute units would be locked-in to just one frequency, therefore (almost) useless for anyone who needs another frequency.
Why doesn't an inductor mind polarities? I have seen many textbooks that say consider a capacitor which is polarised (DC capacitors) and non-polarised capacitors also exist, but why don't inductors have AC inductors and DC inductors? Sorry for the silly question, but I want to know the answer. <Q> There are inductors with polarity. <S> They have a permanent magnet to bias the inductor opposite to the expected DC current. <S> It's generally not worth it, but it has been done. <S> See, for example, DOI: 10.1109/ESTS.2011.5770892 Permanent magnet inductor design . <S> Abstract: <S> Permanent magnet inductors (PMI) are useful in dc biased applications. <S> They utilize the flux produced by a permanent magnet (PM) to partially offset the flux established by current in the inductor winding. <S> The addition of permanent magnets allows for decreased inductor mass for a given inductor current and inductance rating. <S> Herein, the Pareto-optimal front between loss and mass is established for a PMI inductor and is compared to that of a traditional EI core inductor. <S> It is shown that the PMI inductor is significantly less massive than the EI core inductor for a given loss. <S> Polarized capacitors (which is a significant limitation on their application) are used because a polarized capacitor can be made significantly smaller and lighter than a non-polarized capacitor of the same value. <S> If non-polarized capacitors were the same size, cost and performance as polarized capacitors of the same capacitance and voltage rating, there would be no reason to use the latter. <A> No this is an interesting question and I learned things myself while answering this question :) <S> There are some instances where inductors may be polar sensitive. <S> For instance, let's look at mutual inductance. <S> Credit goes to Fundamentals of Electric Circuits (6th edition) by Matthew Sadiku, chapter 13, page 557. <S> As you can see, polarity does matter when you're talking about transformers and mutual inductance. <S> But this is more of reference polarity and magnetic field polarity. <S> But you place the inductors upside down and it won't change anything. <S> In other words, the inductors themselves don't have polarity. <S> In the case of regular inductors that are not meant to be used for its mutual inductance, it's just a coil... and <S> no matter what direction that the current travels, it will always follow the proper path that the laws of physics define it to be. <S> You can ask the same question about resistors. <S> Why aren't resistors polar sensitive? <S> It's because current travels the same way regardless how you place the resistor and <S> the current behavior is always the same through the resistor. <S> The same is true about an inductor. <S> As Iganacio pointed out, the reason why capacitors may have polarity is that of the material inside of a capacitor that defines it as polarization. <S> On one side, there's dielectric material and on the other side, there's electrolytic material... <S> You don't have that with inductors... <A> Maybe you are a bit confused. <S> and you get an AC magnetic field of the same frequency. <S> Polarized cores for relays were tried for a few years then pulled from the market, as the pre-existing magnetic field tended to make them change state with extreme vibration on the z-axis. <S> If a core were pre-magnetized and a strong AC magnetic field was applied it would loose its pre-magnetized field and have no magnetic field unless AC or DC current flowed in the coil around it. <S> Inductors in general do NOT retain any magnetic field once the current is turned OFF. <S> They are made of different materials than those used to make electromagnets or permanent magnets. <A> We can also remember that while capacitors are not theoretically polarised, though electrolytically formed ones fail if incorrectly connected so similarly a general inductor is also theoretically not polarised unless magnetically biased (well described in other answer). <S> However in practice they may be constructed in ways that require taking note of which terminal is which. <S> Mostly this relates to the capacitive coupling to cores and cases or the electrostatic shielding from the outside casing or layers. <S> Ganged capacitors and mutual inductors are also polarised in relation to other sections of the component (as mentioned in other answer).
An inductor has no polarity until a coil of wire around it gives it a DC polarity because it produces a polarized magnetic field by using DC current, or use AC current of a frequency within the cores resonate range
How can electronic devices remain waterproof (no short circuits) while they have exposed charging connectors I am a happy owner of a Garmin Fenix3 fitness watch and a developer for watch faces as well. I noticed my watch charges and communicates data through 4 pins (probably for the USB layout 0,VCC, Data+, Data-) on it's back side as shown here ( http://i219.photobucket.com/albums/cc18/gaijinnv/fenix-3-back_zpsoxagq2pb.jpg ) I have been using my watch in numerous occasions underwater (swimming etc) and i was always curious on how these pins (and especially the charging ones) are not short circuiting leading to power failure or "crazy" behavior. This charger layout might be helpful too https://forums.garmin.com/filedata/fetch?id=1176424&d=1454672325 <Q> Those pins are only connected to the battery or whatever when the power chip senses a charging current available - otherwise there is no real connection... <A> I would expect there to be (at least) a diode between those pins and the battery, preventing current from flowing out and across the pins. <S> You won't be able to charge it underwater, that definitely will be a problem. <A> There are basically two ways to transmit energy under water: without any contact, through a dielectric like plastic, using induction with AC currents. <S> I've seen a lot of devices charging like that. <S> through pins which are encrusted inside plastic (so only the extremity points outside). <S> Of course, you have to worry current <S> will not flow inside the water, for example, if the current is DC, by inserting a diode. <S> In the case of battery charging, nevertheless, I would be surprised that the battery is fed directly through a diode: even a lead acid battery needs a charging unit that sets precisely the charging voltage. <S> So, there is probably a chip that regulates the voltage from the input according to the battery charging specification. <S> To oversimplify, suppose that the battery is charged though a LM317 voltage regulator (of course, it is not in your watch). <S> So, all you have to do is a unit that feels if some voltage is present at the input pin of the regulator, and sets the voltage to some defined value or to 0V at the adjust pin, according to whether there is some voltage or not. <S> A similar process may have been used in your watch. <S> Notes: the device that "feels" if there is a voltage at the input pin and adjusts <S> the voltage at the adjust pin may be nothing more than a transistor. <S> Yes, it may be possible to charge the watch under water, because the water resistance is sufficiently large to load only slightly the charger, or simply because the plugging is sufficiently tight to isolate the contacts from water.
Then if you set the voltage to 0 at the adjust pin, there will be no current at the output and input pins of the regulator.
How does the high inrush relay handle the inrush current? I was searching through the high power relays(16A, 240AC) and found that some manufacturers have high inrush capability relays and that too upto 100A inrush current. Below are some examples (one is latching and other one is standard) Pansonic https://www3.panasonic.biz/ac/ae/control/relay/power/dw/index.jsp Omron http://omronfs.omron.com/en_US/ecb/products/pdf/en-g5rl.pdf Can someone help me to understand how these relays would handle the inrush current ? Some internal schematic if available ? Also since these relays have 100A inrush, can they not easily work with 1HP (240VAC) pumps? <Q> Schematically, all relays are the same. <S> The current carrying and switching capacities are determined by the dimensions of the internal parts and the materials used. <S> The capacity to conduct and dissipate heat must be determined for each piece. <S> The capacity for extinguishing the arc when breaking current must be analyzed. <S> The effect of contact bounce must be analyzed. <S> The heat produced the arc and by current flowing in the parts must be analyzed. <S> The spring force vs. the solenoid force, the geometry to the parts and other details of opening and closing the contacts must be analyzed. <S> If you open up two relays of similar physical size but different current and voltage ratings, you can see the different dimensions of the internal parts and perhaps differences in design details. <S> You are not likely to find detailed dimension drawings and design calculations for specific products. <S> You may find some design examples in a text book. <A> Inrush capacity just means that inside the relay, the components are capable of dissipating the heat caused by the very brief (1-2 cycle) inrush current without causing damage. <S> That has nothing to do with the "breaking capacity" of the relay. <S> Rating of a switching device for control of a motor is not really about the inrush, it is about stopping the flow of current when the motor has been running. <S> When contacts separate under load there is an arc that forms, and it is extinguished when the dielectric of the air is sufficient to stop the current flow. <S> Induction from the motor will cause the voltage to rise in the arc as it forms, which will sustain the arc for longer. <S> The arc is then melting the contact surface areas, potentially destroying them. <S> So the capacity of those contacts to stop that current flow and extinguish that arc without vaporizing and/or welding in the process, determines the maximum motor size it can handle. <S> If you are switching a motor, you need a relay / contactor that has a motor rating equal to or greater than your motor power (HP or kW). <S> If the contacts have no motor rating, they are incapable of being used in that manner. <A> High inrush current is handled by a combination of contact pressure and other mechanical design attributes plus metallurgy of the contacts. <S> Sometimes when this happens you can tap the relay and they will open, only to weld again the next time the load is switched on. <S> Wear is an important secondary concern. <S> The contact materials that resist welding are not typically the best for switching other types of loads such as resistive or inductive. <S> In the olden days cadmium oxide alloys (AgCdO) were used, but these days less toxic materials such as Silver Tin Oxide (AgSnO2) and Silver Tin Indium (AgSnOInO) and Silver Copper Nickel (AgCuNi) are used. <S> Here is a document from TE which describes a plethora of contact materials. <S> Contacts that are optimized for high inrush current handling will likely have some other facet of performance or cost that is sub-optimal (such as breaking ability for inductive loads) <S> so there is no one contact alloy that is good for every application. <S> Note also that if you whack the contacts with huge inrush currents, they will get hot from I^2R heating and if you repeat the performance without enough cool-down time, the relay can be damaged.
The main issue with inrush current is that an excessive current can cause the contacts to weld together , so that they do not open when the coil is de-energized, which is very undesirable. In the case of relays with a high-inrush version where all other specifications (coil power in particular) are similar, chances are that the only difference is the contact materials.
Should I cool off in water the desoldered components? I use a REGULAR (for home-use, not for electronics) hot air gun to desolder non-SMD components from PCBs. The components are really hot (naturally) after desoldering and it takes a while until they cool off. Is it better or worse if I cool then off in water? My issue is related to the fast cooling interval that will appear when I drop the hot component into the water. <Q> Worse, if you look at the component packaging there is a thermal profile that is to be followed to ensure that the component does not experience thermal shock from expansion and contraction. <S> Thermal shock can disable components or cause them to be intermittent. <S> A thermal profile looks like this: Source: <S> Another way to do it would be to turn a can of dust off upside-down and spray your parts down. <S> But you don't want to do that, the parts will cool down too fast and you could break them. <S> In fact it's probably a good idea to slowly back away the hot air gun away from the part to let the temperature ramp down. <S> Or turn the temperature down on the heat gun and let the part cool off a little before removing the heat. <S> For large parts such as BGA's a thermal profile isn't just a good idea, the part will not function correctly if the thermal profile is not followed. <S> Because the pads on a BGA are so small, and the solder connection so small that thermally shocking the solder can introduce discontinuities in the solder connection itself. <S> The nice hot air guns for BGA's can also follow a profile. <A> It's really hot in a reflow oven and the purpose of the Mfg thermal profile is to avoid thermal shock , ramp slowly then peak quickly above solder liquidus temp for a not to exceed x seconds and then cool slowly with a controlled ramp. <S> So let it be. <S> Worse yet components that have absorbed moisture due to the class code of the seal ( e.g. clear epoxy LEDs fit in this category) <S> extended periods of unsealed exposure followed by rapid heating thru 100'C can cause a popcorn failure inside that shears the whisker gold wire bond, that may not be visible. <A> It's probably a bad idea to cool semiconductors (as answered above), however parts such as connectors (i.e. metal and plastic) seem to survive much better if cooled off immediately, in my experience.
Wikipedia Water will create thermal shock because of it's low boiling point and high specific heat (capacity to absorb heat), it's proabably one of the fastest ways to cool down a PCB or part.
What DIY Function Generator is Suitable to drive a Pasco WA-9857 String Vibrator? Preface... total amateur. I picked up 8 Pasco WA-9857 String Vibrators off of eBay for an art project. I need some way of driving them individually.... cheaply. So I bought a $12 XR2206 Function Generator DIY to try it out. Because that XR2206 kit outputs DC there is a 10MF capacitor on the Sin output to mimic AC current (at least that's my understanding). I'm using a 12V 2.5amp PSU, Sin, and 3K - 65KHz settings on the Function Generator. The result is a high pitched squeal from the Pasco unit if I play with the Amplitude, Fine and Coarse potentiometers but no movement from the vibrator. Is my problem here the 12V power supply, the settings on the function generator, the not-so-awesome function generator itself, or something I'm not familiar with/considering? If it is the function generator is there something I can use that is cheep and in a small form factor like what I bought. <Q> You need up to 10 watts of power to drive the vibrator. <S> There's no way the Exar chip can provide that. <S> Try feeding it through an audio amplifier. <S> The 10Ω nominal impedance should be compatible with pretty much anything capable of driving 8Ω speakers. <A> @Dave Tweed is right, <S> The cheapest solution, without putting your home stereo amp at risk is also found on E-Bay. <S> For under $12. <S> https://www.ebay.com/itm/1-X-10-Watt-4-Ohm-Class-AB-Audio-Amplifier-DIY-Kit-TDA2030-10W-Mono-Amp/350586610872?epid=1431792372&hash=item51a09724b8:g:K1sAAMXQjUNR1AsC <S> You would connect the output of the function generator you have, (KEEP THE CAPACITOR IN CIRCUIT!!), to the amp input, then the amp out put to the string vibrator. <S> The power supply you mentioned will work fine for this project. <S> Reply with any questions. <A> You have two things to keep in mind: <S> Required power Required frequency <S> The answer from Dave Tweed covers power. <S> I'll address the frequency. <S> Start by reading the manual for the string vibrator. <S> Note that the generator settings (where mentioned) are 100Hz or below. <S> Also note that highest sampling rate mentioned for the measurements is 1000Hz. <S> From this, we can assume that the operating frequency of the vibrator will be less than 500Hz. <S> We can assume this because of the nyquist rate . <S> I'll let you read that rather than explain it myself. <S> The next thing is that the vibration frequency is related to the length of the string and the tension it is under. <S> The string used in the experiments is approximately the length of the strings on a guitar or a bass guitar. <S> But, it is under no where near as much tension. <S> Because of this, you can expect the string to vibrate at lower frequencies than the strings of a guitar, and probably lower than those of a bass guitar. <S> So, frequencies in the kilohertz range are right out. <S> Conclusion: <S> You need an amplifier to use your signal generator to drive the string vibrator. <S> You need to use frequencies below 100Hz to drive the string vibrator. <S> Your current signal generator will do, if you pair it with an amplifier. <S> Check to make sure the amplifier can operate at low frequencies. <S> Many cannot. <S> A small note concerning power: 10VAC at 1A is the maximum power rating. <S> I think you will find that the vibrator will operate at lower power. <S> More power means the amplitude of the vibration can be larger. <S> So, it might operate at lower power but you might need more power to make the amplitude high enough for what ever you are demonstrating. <S> Also, you will probably need more power at higher frequencies - though that might not be a large factor over the frequency range you can use.
An amplifier made to drive a woofer or sub woofer will probably do better than a typical stereo amplifier.
Finding current when short-circuiting the terminals I am working with the circuit shown below. I am having trouble with the situation where: if a short circuit is connected between Terminals A and B. what current would flow through the short circuit in the direction, A to B? I am confused about this question. I thought that is would be 2.7 x 10^-3 A (from the current source), however, this is incorrect. From this circuit, I have also found that the open circuit voltage (VAB) when V1 is acting alone is 2.92V. And that the open circuit voltage when I3 is acting alone is 9.45V. Open circuit voltage when both sources are acting is 12.4V. And finally, I calculated that the Thevenin resistance between A and B is 3.50E+3. (These answers are approximate, as I was asked to give them to 3SF.) I am not sure if these previous calculations help to answering the question that I am confused about. I would appreciate it a lot if you could please explain this to me. Thank you very much for you time and help. <Q> Applying a source conversion to the voltage source V1 will make the job easy. <S> A voltage source V in series with a resistance R can be replaced (Across its two terminals) with a Current source of value V/R with a resistance R in parallel with it. <S> The proof for this result may be found online in sources such as this . <S> After performing such a conversion the short circuit current will be the sum of the two sources and independent of R2. <A> Hint 1) Installing a short circuit across nodes A and B places a zero-ohm resistance in parallel with resistor R2, which effectively eliminates (removes) R2 from the circuit: $$R_{EQ}=R2\,||\,0\,\Omega=\frac{R2\cdot 0\,\Omega}{R2 <S> +0\,\Omega}=0\,\Omega$$ <S> So redraw the circuit with the short circuit installed between nodes A and B, and with resistor R2 removed. <S> Hint 2) <S> After the short circuit is installed between nodes A and B, by inspection we know that the voltage at node ' <S> A' (relative to the reference potential at node 'B') must be zero volts—i.e. <S> , \$V_{AB}=0\,V\$. <S> In other words, the voltage across current source I3 is zero volts. <S> (n.b. <S> An ideal current source is a mathematical model, and the voltage across an ideal current source can range from zero volts to infinite volts.) <S> Hint 3) From Kirchhoff's Current Law (KCL) <S> we know that the sum of all currents entering node 'A' must equal the sum of all currents exiting node 'A'. <S> Or alternatively, the sum of all currents entering and exiting node <S> A must equal zero. <S> $$\Sigma(currents\;entering\;A)=\Sigma(currents\;exiting\;A)\\\Rightarrow \Sigma(currents\;@\;A) = <S> 0$$ <S> With AB shorted we see by inspection that the voltage at node A is zero volts—i.e. <S> , \$V_{AB}=0\,V\$. <S> Therefore, the voltage polarity across resistor R1 is such that a current \$I_{R_1}\$ flows from voltage source V1, through R1, and into node A. <S> You can use Ohm's Law to calculate the value of current \$I_{R_1}\$. <S> The current produced by current source I3 also flows into node A. <S> And according to KCL the the sum of the currents flowing into node A must equal the sum of the currents flowing out of node A, through the short, and into node B, <S> \$\therefore I_{R_1}+I3= <S> I_{AB}\$. <S> Hint 4) <S> Thevenin Equivalent circuit. <S> In your original circuit with R2 installed and AB open, let current \$I_{R_1}\$ <S> flow from V1, through R1, into node A. Also, let current \$I_{R_2}\$ flow from node A, through R2, into node B. Find \$R_{TH}\$ by opening AB, turning OFF all independent sources (V1=0V, I3=0A), and calculating the equivalent resistance across AB: $$R_{TH}=R1\,||\,R2=\frac{R1 <S> \cdot R2}{R1+R2}$$ <S> Find \$V_{TH}\$ by applying nodal analysis (KCL) at node A with AB open: <S> $$\Sigma(currents\;entering\;A)=\Sigma(currents\;exiting\;A)\\\Rightarrow I_{R_1}+I3= <S> I_{R_2}\\\Rightarrow <S> \frac{V_{R_1}}{R1}+I3=\frac{V_{R_2}}{R2}\\\Rightarrow <S> \frac{V1-V_{AB}}{R1}+I3=\frac{V_{AB}}{R2}$$ <S> Noting that \$V_{TH}=V_{AB}\$ with AB open, solve for \$V_{AB}\$. After solving for \$R_{TH}\$ and \$V_{TH}\$, place a short across AB and calculate the current through the short, \$I_{AB}=V_{TH}/R_{TH}\$. <A> Thus the current through R1 remains at 0.833 <S> mA. <S> V=IR, R=0, so <S> the current source damages itself trying to provide infinite current. <S> In reality though, current is monitored by potential difference across a resistor, so current will drop very close to zero and still maintain the required potential difference across the sense resistor.
Without the current source, it would be 0.83333mA. With the current source, since it is shorted, there will be no current from it.
What is this electronic set up with a red light on top of it? Anyone can tell me what this is ? Not sure if it exactly pertains here in the electronics forum but I think it does . What is this set up near my house and why is there a really bright red light on top of it https://imgur.com/a/9sYNkCd more pics https://imgur.com/a/VnSxd4t <Q> Based on the concrete slabs with access doors and vent pipes around it, that's almost certainly a waste water lift station control and monitoring unit. <S> Lift stations are used when waste water drainage and/or local sewer lines collect at a point below the existing main sewers. <S> They pump the water back up into the sewer system where it can be gravity fed to the water treatment facility. <S> They are very common in fairly flat areas with a high water table (like South Florida, where the OP's pic was taken). <S> The red light on top can be used to indicate an active pump or alert to a failure. <S> If the light is on for more than a few minutes, you should definitely call the numbers on the posted signs. <S> Brief article: " <S> What Are Lift Stations" <S> Brief video: "How a Lift Station Works" Image Source and a diagram of inner workings. <A> Adding to Phil C's answer. <S> The image below suggests that you want the waste water systems in your area to be operating "really well" at all times. <S> The location you identified is marked by the red symbol near the centre of the the images below. <S> The top image is from Garglabet maps, and the bottom version emphasises why you would want your waste water "lift" stations to be able to lift as required at all times. <S> "Water, Water everywhere - nor any drop to drink ..." <A> While we are guessing, I throw out this one: Warning light for ICBM silo. <S> If you see that thing turn on, run for cover. <S> Who knows... and doesn't really matter. <S> I have one of these near me, mine is for a water pump.
It's probably a control box for a water pump, for a well, or maybe a sewage lift station.
Does an AC electric motor with no load consistently draw its maximum power at full RPM's? Say you have a typical bench AC electric motor rated at 180W which has reached its maximum RPM's.Does the motor always draw 180W when running at full RPM's ? Or does the motor draw less power once its at full RPM's? Note that no load is applied in this scenario. If I imagine this in my mind, it makes sense to me that a motor once at full RPM's and under no load, would draw less power as the momentum should be helping it turn, but I'm not sure so I'm checking with the community. <Q> To a first approximation, the motor draws as much electrical power as it is doing mechanical work. <S> If there's no load, the power consumption will be low. <S> In practice, there are electrical and mechanical losses involved in keeping a motor energised and spinning. <S> The motor might also have a fan for cooling itself. <S> These will require some power. <S> Finally, the motor efficiency will be less than 100%, so it will require slightly more electrical power than it produces mechanical work. <A> There is a problem with the description 'typical bench AC motor'. <S> There is no typical bench AC motor. <S> Were we talking about a DC brushed motor, then it's easy. <S> Many bench AC motors are induction types, and herein lies the problem. <S> There is a type of induction motor that overheats at no load, and actually requires a load to make it work properly. <S> An induction motor is partly a rotating transformer, which operates at the slip frequency. <S> As the load lessens, the slip frequency falls, and at a low enough slip frequency, when the rotor Volt. <S> Second product is exceeded, the stator-rotor transformer saturates and draws excessive current, which overheats the stator. <S> This excess current is a magnetising current, so is not measured as power by the standard domestic meter. <S> In one sense therefore, even this motor is not drawing power. <S> But drawing so much current that it overheats is unexpected. <S> A more conservatively-sized induction motor that's safe to run at no load will indeed draw less power than it would at full load. <A> The electrical power drawn by a motor is equal to the mechanical power delivered to the load plus losses in the motor. <S> A portion of those losses is not diminished when there is no load. <S> The losses consist electrical, electromagnetic and mechanical losses. <S> The electrical losses consist of heating losses in the resistance of the motor windings and other internal parts. <S> The electromagnetic losses consist of hysteresis and eddy-current losses in the rotor and stator iron. <S> The mechanical losses consist of friction and aerodynamic drag (windage). <S> If the motor has brushes, contact resistance and arcing contribute to the electrical losses. <S> In a DC motor with brushes, the magnetic field does not vary much, so the electromagnetic losses are little or nothing. <S> If the motor has a fan, the fan loss is considered to be part of the windage. <S> Many motors have protrusions or fins on the rotor that are intended to augment cooling. <S> Motors that do not have permanent magnets have magnetizing current that, in many motors, is not reduced when the motor is not loaded. <S> Some of the electrical and electromagnetic losses described above are associated with the magnetization.
No load means lower power consumption, even at rated speed.
Difference between 1206, 0805 and 0603 SMD resistor What is the difference between a 1206, 0805 and a 0603 SMD resistor, as far I know they all have a resistance of 10.7K? I going to need one for my little 5v DC buck converter. <Q> The codes you are referring to are size codes, e.g. 1206 means 0.125x0.060 inches. <S> There are some other differences, except for size. <S> Smaller resistors probably feature a lower power and voltage rating, but can have smaller parasitic components, ESL and parallel capacitance. <S> I would not expect the parasitics to be an issue, just be sure to get one with the required power rating. <S> If you need to hand solder them, I suggest not going too small,e specially if you do not have any experience. <S> 0603 should be fine for almost everyone, 0805 <S> even more so, 1206 is a huge beast you can solder with your hands tied and your eyes closed. <S> As usual, if you have doubts always refer to the manufacturer datasheet. <A> Here are the relative SMT sizes: Source: <S> groups.io Usually size also corresponds to power rating (the more surface area and pin area the part has, the more heat it can dissipate and the larger amount of power it can handle. <A> They are different sizes. <S> 0603 means 0.06 by 0.03 inches (1.6 by 0.8 mm). <S> And so on. <S> ( Wikipedia ) <S> The smaller ones will most likely have lower power and voltage ratings, because they are smaller.
1206 means 0.12 inches by 0.06 inches (3.2 x 1.6 mm).
There is an op amp in switching power supply I still can't figure out what is function of the operational amplifier? <Q> It is an error amplifier . <S> The amplifier provides an analog feedback signal through the LED/phototransistor to control the PWM across the isolation barrier. <S> Here is what a real circuit typically looks like (schematic from this TI document): <S> Since the circuit is powered by the isolated voltage, the LED is initially 'off' and the PWM runs at maximum output. <S> As the voltage approaches the target voltage the LED current increases, causing the PWM to back off <S> and (if tuned correctly) keeps the voltage from overshooting the target, whilst minimizing the rise time. <S> I agree that your block diagram appears to be reversed from what is normally possible. <S> The three-pin TL431 contains both an op-amp-like amplifier and a fairly accurate and stable band-gap reference, all for a penny or two! <A> It is "supposed" to be a voltage comparator. <S> The resistor divider on the right should scale the output voltage to the reference voltage on the op amp ' <S> + <S> ' input. <S> However, the way the circuit is drawn, the bottom resistor is short-circuited. <S> The node pointed out by the red arrow (in the following image) <S> is incorrect, it should not be there. <S> The top resistor should not connect to the negative of the DC output, only the positive. <A> This lets one set the output voltage with the resistor divider while using a commonly available voltage reference, such as the TL431, commonly used in this application. <S> This lets the switcher controller know how should it tweak the PWM's duty cycle, whether to increase it (output voltage too low) or decrease it (output voltage too high). <S> Take the it just a conceptual schematic to give you a flavour of something rather than applying it directly to a design - I can't actually remember seeing an actual opamp on the secondary side for this purpose, on the stuff I've torn apart. <S> Only some kind of a funny arrangement with an LED being driven through the reference. <S> It works. <S> The comparator however looks 'backwards' to me, by its two inputs being swapped. <S> I think so because this way the controllers sees the opto as off at first - there shouldn't be any power at the secondary. <S> But once the power goes up, the reference kicks in, being suddenly greater than the sensed voltage, and the opto would turn on. <S> Weird. <S> Had the inputs been swapped, then it would all make more sense, I think.
Basically, it's there to compare the voltage gotten on the output against a reference voltage (shown in the schematic as a battery for some reason) and provide feedback to the control circuit.
Circuit for math game grid? I am a graduate math student and I want to design some electrical circuits for a math games workshop. I know physics only at a high-school level. At first, let's explain the game and its rules, suppose that we have a \$3 \times 3\$ board, and there is a light on each square, when we press the corresponding switch of each light, the status of that light and all other adjacent lights will change. For example, let's consider this example: If we press the corresponding switch of the blue signed square, then the status of the blue signed square and all red signed squares will change. At the next step, if we press the corresponding switch of the pink signed square, then the status of the pink signed square and all orange signed squares will change. How should I design such a circuit? We want to replace the \$3 \times 3\$ board, with other boards like: But the rules are the same as the above example. How should I design the circuits corresponding to \$(4 \times 4)\$ or \$(\star \star \star)\$? <Q> The actual circuit is just a microcontroller reading a bunch of switches and controlling a bunch of lights. <S> Or, you can do something called multiplexing . <S> The switches and lights would be arranged in a grid. <S> The microcontroller scans the array as needed. <S> This is how any similar professionally designed product would likely work. <S> However, especially if you are new to micros, giving each switch and light its own dedicated pin (possibly thru I/ <S> O expanders) will be easier. <S> For a one-off, that would be fine. <S> There is another approach that is more complicated electrically, but conceptually simpler. <S> Use a tiny microcontroller for each square. <S> The micro has connections to its 4 neighbors. <S> When a micro detects its button pressed, it complements its light and sends a blip to its neighbors. <S> When the micro sees a blip from a neighbor, it complements its light. <S> This makes the firmware in each micro very simple, and only requires 6 I/O connections. <S> These are 1 for the light, 1 for the button, and 4 lines to each of its neighbors. <S> The neighbor lines would be passively pulled up, and a micro pulls down on them for some minimum time (a few µs) to indicate a toggle. <S> Don't forget to debounce the switch input. <S> Once you have this basic building block, you replicate it to make whatever size array you want. <S> This system is scalable to large arrays. <S> The rest is firmware. <A> I recommend you start by researching Mealey state machines. <S> By turning your game into a sate machine, you will be able to easily create your circuit out of digital logic gates. <S> If you want to go a step further you could use an FPGA and a hardware description language like Verilog to design your circuit. <S> However, this requires an understanding of digital logic, state machines and of course how to use a language like Verilog. <S> It may seem like overkill for such a simple task, but it will allow you to easily incorporate the logic of your game for literally any board configuration your FPGA has enough pins for. <A> You can make a single small PC board for each button that contains logic like that shown below. <S> The board receives inputs (and ground) from the adjacent switches that toggles a flip flop whenever the switch on an adjacent board or on the board itself is activated. <S> The switches must be debounced before driving the flip flop clock so that it toggles only once per switch press. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> You can use a 74HC4075 triple three input OR gate for the OR gates. <S> You can use a 74HC74 style D flip flop and have an RC based reset drive the reset input to clear all the FFs at power up. <S> To create a flip flop that toggles for each clock from a D flip flop, feed back the inverted output to the D input as shown below. <S> (From http://www.learnabout-electronics.org/Digital/dig53.php )
You could get a microcontroller with lots of pins, or use I/O expanders, and wire each light and switch to its own pin.
Delaying a TTL signal I need to design a circuit to delay an input signal by a given amount of time (around a second, trimmable). The delay should be set through the use of passive components (resistors or capacitors). The input signal is basically a TTL level that goes high at a certain time, stays high for some time (100ms should be nice value), then goes back low. I cannot use a micro or other programmable device because the firmware certification process is too expensive. I realized a working solution that uses an RC network feed into a Schmidt triggered comparator (with a fixed voltage reference placed in input against RC voltage level). I'm not very satisfied with this solution for two main reasons: the needed delay implies large caps that are pretty inaccurate; the input signal high level need to last at least as much as'delay'; Overall requirements: delay duration 1 sec +/- 500 ms accuray +/- 10% The delayed event should last for a reasonable time lets's say at least 100ms (and less than 200ms). <Q> The Analog Devices / Linear Technology LT6993-1 (see circuit below) is a positive edge triggered pulse generator that has a resistor-programmable clock frequency and a resistor programmable divider value and polarity, with delays up to 33 seconds with ~3% accuracy. <S> An internal A/D converter converts the DIV input voltage into an 8 bit divider selector and a 1 bit polarity selector. <S> The clock frequency and the divider value determine the output pulse width. <S> Large divider settings allow reasonably sized resistors to generate long delays. <S> The circuit below (from the data sheet) shows how to use two of the chips to generate a delayed pulse in response to the rising edge of an input pulse. <S> The resistor values would need to be adjusted to match your required delays. <S> Suggested DIV resistor values are shown in the table below the circuit. <A> Custom Silicon Solutions makes the CSS555C , which is a 555 timer married to a wide counter. <S> It allows you to count multiple timer cycles to use reasonably sized resistors to generate really long delays. <S> It has a trimmable internal capacitor to tune the delays, so it doesn't even need an external capacitor. <S> The circuit below shows the multi-cycle monostable mode. <S> You would need two of the chips. <S> The first chip would generate your 1 second delay and the second chip would be triggered at the end of the delay to generate the 100ms pulse. <S> If you google "CSS55C price" <S> you can find sources where you can buy the part. <A> Page 14 of the Texas Instruments <S> 74LS123 app note <S> has an example of a digital delay circuit using both halves of the '123. <S> You can adjust both delay and output pulse width by varying the values of Rext. <S> If you don't need to randomly terminate the output pulse <S> you can tie the 'B' inputs and the clear inputs high. <A> This is indeed the very standard way of implementing a delay in a digital circuit. <S> I'm not very satisfied with this solution for two main reasons: the needed delay implies large caps that are pretty inaccurate; Well, just use a larger R, then! <S> The delay is defined by the the product of R and C, so you can trade one for the other - and large-valued resistors are easier to get exact than large-valued capacitors. <S> the input signal high level need to last at least as much as 'delay'; <S> So, maybe replace your ready-made Schmitt trigger with predefined hysteresis boundaries with a trigger with a high "off-to-on" threshold and a low "on-to-off" threshold. <A> Another 2-chip solution. <S> The advantage of this approach is the continuous clock which can be measured and adjusted, possibly easier than timing a one-shot event. <S> The input pulse sets the NAND latch which removes Reset from the counter, enabling it to count. <S> After 8 clock pulses the output goes high. <S> The next clock pulse resets the NAND latch which holds the counter in reset, disabling it. <S> The other two gates form an RC oscillator, values shown should put it about 8 Hz for a 1 second delay, and 125ms pulse width. <A> The 74HC4538 is one I've used often. <S> 1 second is up at the end of its range. <S> This is a one-package deal, since it has two separate units. <S> The first would provide the delay, and its output would drive the second, which would produce the final pulse width. <S> To be clearer, perhaps: the first would be configured as a positive edge-triggered unit, and its Q output would drive the second one-shot which is configured for negative edge detection. <S> The period of the first would be one second, and the second unit would have whatever pulse width you want (within reason, of course - probably less than a second would be good.) <S> And if you're worried about interfacing TTL to CMOS, don't be. <S> Assuming the CMOS is the only load on a TTL output, adding a 1k pullup resistor to +5 will do the trick with no fuss.
I realized a working solution that uses an RC network feed into a Schmidt triggered comparator (with a fixed voltage reference placed in input against RC voltage level).
Use MOSFET series resistor instead of shunt for current measurement If I have a setup where a N MOSFET drives a heavy inductive load (say, 25A peak), can I use the MOSFET's internal resistance to measure said current the same way I would use a shunt resistor? The value of the equivalent series resistance when the MOSFET is active (i.e. Rds-on) is usually very low and easy to find in the MOSFET's datasheet. I know it is not ideal, and will strongly depend on the FET's temperature a well as the current (so I have a loop there). Still, is there any serious impediment to this approach? The reason I want to do this is because I have a system where I need to minimize component count as well as avoid any extra losses (i.e. shunts) when driving the inductive load, but can compute some corrections/linearization on a temperature-sensing micro-controller if needed. I am almost 100% I saw a LiPo battery manager that appeared to do something similar, but I am unable to find it. As I recall, this IC estimated the charging current using something similar to what I just described. But maybe I am just mistaken. <Q> So if you calibrate and compensate- go for it. <S> Or maybe it's just good enough. <S> LiPo itself probably like narrow temperature range, maybe in application you are limited to 25-35 degrees or something. <S> Keep in mind, that in two years your purchasing people will ask to replace the MOSFET with something else- <S> and you can't, because there is no same MOSFET in the world. <A> RDSon is mostly dependent on temperature and Gate-Source voltage. <S> The Gate-Source voltage part is not really a Problem, the temperature is though. <S> It is not uncommon that on resistance doubles (or even more) at the upper specified temperature limit (compared to 25°C). <S> Take a look at some MOSFET datasheets as reference. <S> There are some current sense ICs that specialize in current sensing using MOSFET RDSon (eg. IR25750L). <S> There are app notes available for temperature compensation (for example this) . <A> equivalent series resistance ... easy to find in the MOSFET's datasheet <S> No. <S> This seems to be your main misconception. <S> The datasheet tells you the guaranteed maximum , but not what it will actually be in any one device. <S> Sometimes datasheets show typical specs, which are usually significantly less than the maximum. <S> And of course any one device might be lower than typical too, but you don't know how much. <S> Then as others have said, R DSON has a strong dependence on temperature. <S> With calibration to the particular device, and maybe some correction for measured or assumed temperature, you might be able to detect very basic current thresholds, like "too high, shut down now" . <S> But anything you'd call a "current measurement" isn't really going to work.
MOSFET's on resistance is not very accurate and not stable over temperature.
Can I use multiple voltage regulators in a circuit safely? If I have two different voltage regulators both powered from different sources is it safe if they are both outputting in parallel? If one is on and the other is off? I made a basic schematic to show what I mean here . Schematic: <Q> Check the datasheet of the regulators, but most don't like reverse voltage. <S> Parallel voltage regulators can't be counted on to share current. <S> One will always have a little higher setpoint than the other. <S> This could also lead to instability, depending on the nature of the controllers in the regulators. <S> A better way to solve this is to combine the two voltage sources before a single regulator. <S> At this low voltage, you can use Schottky diodes. <S> Put one diode in series with each voltage source. <S> Power will then automatically be taken from the higher of the two voltage sources. <S> Make sure to put something like a ceramic cap after the diodes physically close to the input of the regulator. <S> You can still use multiple regulators to spread the dissipation and to reduce voltage drops to distant parts of the circuit. <S> You bus around the higher voltage out of the diodes, then regulate that locally as needed. <S> However, you don't tie the outputs of multiple regulators together. <S> You have each power a different part of the circuit instead. <S> If you want to minimize local dissipation, you use a buck switcher after the diodes. <S> This makes a little more than the minimum input voltage of the regulators. <S> You filter that a little and bus that around. <S> Then you make the regulated voltage from that as needed locally. <S> For example, if using a 5 V LDO that requires 5.5 V in, you might bus around 6 V. <S> Each local regulator would then be 83% efficient. <A> Analog Devices has a great article that discusses current sharing in parallel voltage regulators here . <S> The gist is that you need to add extra circuitry in order to have the regulators share current relatively equally. <S> A quote from the article is shown below. <S> They are discussing Low Dropout Regulators (LDOs), but the same applies standard regulators like the 7805. <S> I would also worry even more about current sharing when powered by two different voltage sources, since the regulators would be even less matched in that case. <S> Also, in the case of one of the voltages being disabled, if the regulator does not have reverse current protection, current can flow from the output back to the voltage input that is off. <S> Current sharing with linear regulators is traditionally not as simple as connecting the parts in parallel. <S> An LDO's output voltage is determined by the reference voltage multiplied by a gain factor based on the feedback resistors. <S> Due to tolerance errors in the voltage reference and feedback resistors, the output voltages will be mismatched. <S> With unmatched outputs, the LDOs will not share current; one LDO will provide the majority of the current until it hits current limit, thermal limiting or its output droops low enough for the other LDO to begin supplementing its current. <S> These three situations present circuit operation challenges and can pose reliability concerns, leading to possible premature failure of the overstressed LDO. <A> This will depend on what the datasheet of the regulator says. <S> In general: No, you cannot operate them in parallel, because supply and load changes will have different effects on your regulators, and thus they will start regulating "against each other". <S> Even more basic: No two regulators are exactly the same, even under perfectly constant conditions, so one is bound to constantly "pull up" the voltage, while one is constantly pulling it down. <S> Whether you can just put them in parallel with one unpowered: In general, I'd say "no". <S> Again, if the datasheet doesn't contain clear information that this is possible, it probably isn't. <S> Read the datasheet. <S> LM7805 (and clones thereof) are relatively "dumb" and slow, so you might be in luck and operating them in parallel <S> might under non-oscillating load conditions actually work relatively well. <S> Do not power one but not the other: current will run through the unpowered one!! <S> So, no, don't do that, especially not with 7805s. <S> Instead, consider just having one regulator, whose input <S> you switch between the different sources. <S> Also, it's probably a very bad idea to regulate 16.8 V down to 5 V with a linear regulator: <S> Your waste heat is (16.8 - 5) V · I_out = 12 <S> V · I_out, and if your output current is let's say 250 mA, you're already burning 3 W, which heats up your device by 36 °C. <S> If you use more than 250 mA, you get hotter.
Two voltage reference-based linear regulators set to the same output voltage and with the outputs tied together will not share current equally. No, this is not a good idea.
What kind of fan filter is this? This schematic is part of a fan controller. simulate this circuit – Schematic created using CircuitLab FAN_POWER: 3.3 V (or 5 V for higher loads) PW_FAN: goes to the fan What kind of filter is this on the right hand side of the PNP-BJT? I'm not very familiar with LC circuits in this way. <Q> What kind of filter is this <S> It's a <S> "Oh crap, this thing failed FCC testing again. <S> My boss is already pissed, and if it doesn't pass next time, I'll be fired. <S> If only I had actually paid attention in school instead of getting homework answers from EE.SE and copying test answers from the guy next to me. <S> I remember something about inductorators and capacitators getting rid of high frequencies. <S> [23 seconds on Google] <S> Ah, here's something. <S> It must be right. <S> Someone named Anne Onimus says so. <S> She must be an expert or something. <S> I'm not sure what <S> those 4.7 µH and 470 µF mean exactly <S> (and why can't they write "u <S> " right?) <S> , so I'd better copy it exactly. <S> Hmm, wasn't there something about types of capacitators for different frequencies? <S> Something about ceramics for stuff that radiates? <S> Nah, ceramics are for pottery. <S> I'll just do what Anne says here. <S> Oh <S> oh, what if this isn't enough? <S> I know, I'll use two of them! <S> Wait, I can't afford to fail again. <S> I'll use 3. <S> No, wait, if 3 are good, 4 must be better!" <S> filter. <A> It's just a cascade of LC low pass filters. <S> This looks like a "added filter stages until it worked" thing, not something designed for a specific purpose. <S> I think Q1 - R1 - R2 form some kind of linear voltage regulator; I'm not quite sure why you'd want to do any of this. <S> Is FAN_POWER maybe more something like a PWM? <A> It's definitely unique. <S> Apparently the designer was extremely concerned with maintaining a constant current to the fan. <S> The R1/R2/C1/C2 looks like an attempt to minimize the effect that supply ripple or noise will have on the current through Q1 ( <S> when FAN_POWER shows noise, the voltage across R1 [and therefore the base current] is kept stable), and the Chain O' Chokes will also impede any changes in the current. <S> It may be an attempt to protect the supply from motor noise or flyback in the fan itself. <A> The configuration in signal processing is known as a " comb filter ". <S> Here is a single pi filter: <S> Successive pi filters give you what is seen in that fan circuit. <S> Pi filters are fairly common methods of removing noise, especially the electromagnetic radiation kind that interferes with wireless signals. <S> The advantages of the larger comb filter are debatable, and depend of course on the tuning. <S> As with many filters, while they can dampen noise at some frequencies, there may be increased noise at others.
The passive circuit version consists of iterative " pi filters ", which are a low-pass.
Dual SPI master with ATmega32u4 An unexpected need emerged in my design, which is to control 2 slave SPI devices simultaneously. At first, of course, I was planning to to use the SPI Bus as usual and control both devices using the /CS pins so everything seemed fine. By reviewing the datasheet of device A today, I noticed that it expects all of the data in one go, which means I cannot do the procedure I originally had planned: 1) Select device B 2) Read data from B3) Unselect device B4) Select device A 5) Write data from B6) Unselect device A7) Repeat until all data from B goes to A (around 1.1 Mbit) The device A assumes that when its /CS goes high it's the end of data stream. Of course I cannot read everything from B in one ran and store them to MCU RAM, since the data are way bigger. Naturally, the next thing that came to my mind is to use 2 separate master SPIs at the same time: select both chips, read on byte from B and feed it immediately to A. So my questions are: a) Is that possible using an ATmega32u4? It has a critical role in the overall design and changing to another MCU Would be a step back. b) I read that the USART can act as a second SPI master. Is that viable and reliable? How hard is to implement? c) If, unfortunately, is not possible and I have to change MCU, which one would you recommend? Note that the USB capability of ATmega32U4 is essential. d) Is the new process (read from B, feed to A) likely to cause any unexpected behavior? Does not seem in my point of view, I am asking just in case since I am a new engineer. Any other idea or direction is welcome! Thanks in advance. UPDATE In case it plays a significant role, Device A is an FPGA while B is an flash memory. The MCU has a dual role: Download the bitstream from the PC via USB and store it on the flash ROM / use the stored bitstream to configure the FPGA upon reset/power on. Both FPGA and flash use SPI. According to the datasheet of the FPGA (ice40 family, Lattice, " iCE40 Programming and Configuration " p.26), the image has to be programmed without interruption. <Q> You might want to take a different approach altogether. <S> Instead of attaching both the PROM and the FPGA to the µC as slave devices, attach the PROM directly to the FPGA, and allow the FPGA to boot in SPI master mode instead of SPI slave mode. <S> Bonus: <S> the booting will happen more quickly. <S> You'll still be able to access the PROM from the µC after the FPGA has booted for firmware updates or data storage, by passing the µC's SPI interface signals through the FPGA logic. <A> a) <S> Afaik <S> the Atmega have only 1 SPI bus. <S> b) <S> No experience ( <S> but I'm novice) <S> c) <S> I use STM#2's mostly. <S> These have 2 SPI buses and if you need more there are version which have 3 (or even more possibly). <S> The cheapest (cost less than an Arduino) <S> STM32F103C8T6 has 2 SPI buses. <S> d) <S> However, since STM32 has DMA you might be able to do it 'directly', i.e. sending incoming SPI data immediately to the outgoing SPI. <A> You state that the FPGA assumes end of configuration data when CS is de-asserted. <S> Is there a timeout as well? <S> That is, if you can have an indefinite delay while leaving CS active will the device behave properly? <S> If there is simply a need to prevent the FPGA device from closing the transaction, then the problem can be simplified as one of keeping CS selected while not allowing commands to the flash from being read in as garbage data. <S> For this a second SPI master may be overkill <S> The transaction would look like Asynchronously Assert CS for FPGA <S> Disable Buffer Device <S> Read FLASH device as usual Enable Buffer Device <S> FPGA <S> Transaction (CS already asserted) <S> GOTO 2 <S> until done Asynchronously De-Assert CS for FPGA <A> USART as SPI master <S> As the datasheet says in chapter 19, <S> The Universal Synchronous and Asynchronous serial Receiver and Transmitter (USART) can be set to a master SPI compliant mode of operation. <S> So you can have two independent SPI (master) ports to transfer data between the slaves. <S> Using an I 2 C external EEPROM <S> Instead of an SPI flash, you can connect an I 2 C EEPROM to the TWI port (PD0, PD1) on the MCU. <S> I <S> 2 C is called TWI or 2-wire <S> Serial Interface in Atmel-ese, but they are essentially the same thing. <S> Drawback: <S> EEPROMs are generally more expensive as flash memory.
I would suggest using a buffer device between MCU and FPGA for the MISO , MOSI , and SCLK line, and use that to disable the SPI signals by using the reset/enable pin on the buffer device. The SPI buses on the STM32 (and probably other uc's) are independent so there should not be any problem with the process.
Identifying an unmarked SMD capacitor and chip So I'm setting myself into SMD components, as I want to create my own compact 5v step down converter, based on this component. I've read that these small brown ceramic capacitors are most likely unpolarised, to my knowledge meaning they can be turned both ways and still do their job just fine. But using my multimeter measuring capacitance, gives the result 8.400 uF and while reversed on the same capacitor gives me the result 26.60 uF. The other capicators give me a more clear answer when measured 220 uF and when reversed 0 uF. Does this mean they're polerised and can only be put in one way? I would also very much like to know which kind of chip that could be on the back on this 5v step down converter. Chip: The component: https://www.aliexpress.com/item/3pcs-5W-9V-12V-24V-to-5V-DC-DC-Step-Down-Buck-Converter-Module-replace-TO/32766296476.html?spm=a2g0s.9042311.0.0.27424c4d1qdowf <Q> Measuring capacitance in situ is unreliable and inconsistent. <S> You should remove the part and measure the component directly. <S> Those are ceramic chip capacitors (99% Confidence). <S> And they are not polarized. <S> This kind of el-cheapo 5V stepdowns use a common circuit design. <S> It is probably easier to go to the source material (design guides) and not reverse engineer. <A> ME3116 is the IC, see the parts datasheet at the LCSC site, where you can also purchase the part: High Speed LDO Regulators . <S> The other parts and schematic including a PCB are here: BUCK TO-220 Replacement . <A> This means that you have a number of unknown devices in parallel to the capacitor, so the result can be pretty much anything. <S> Without the circuit it's hard to speculate on exact figures. <A> In order to have any reliability, those capacitors need to be measured out of circuit. <S> Desoldering them isn't to bad, as they are not very easy to damage. <S> As for the IC, do you have a part number for the entire module? <S> it could be an unmarked stock component or it could be a proprietary.
The reason you are getting odd results is that you probably measure the capacitance while they are soldered into a circuit. Those are plain multi-layer ceramic capacitors and are bipolar, or rather non-polarized. If there is any Lettering on the IC at All(I can't tell from your photo) there are ways to look up SOT23 marking codes and narrow the possibilities down.
Protection diodes for Arduino pin passing current to +5V rail when powered down - what to do? simulate this circuit – Schematic created using CircuitLab In the circuit above, I'm using a resistor (R1) and a couple of protection diodes (D3 and D4) to keep the voltage on an Arduino pin from 0V to 5V as the input from the LFO varies from -10V to 10V. One thing that did not occur to me until I built this in reality was what happens when the Arduino is powered down. When the 5V rail on the far side of D3 isn't powered at all, but the +/- 10V is still applied at "In", the diode at D3 seems to be forward biased at all times. It seems to be allowing enough current to pass to at least light up the "on" LEDs of the Arduino, whether or not it's actually booting. I suppose the maximum amount of current that would be passed in this situation would be (10V - Vf- 1V)/1K, so less than 9mA. Could that be problematic for the Arduino? If so, is there a good way to prevent this? <Q> Fortunately that is likely an analog input, so a 1 K resistor is about the limit or you could go up to 10 K and be done with it. <S> If you can sequence OFF your signal source seconds before the Arduino is powered down, that would be a safe move. <S> Since you do not have a capacitor filter on the input pin there is no problem of it discharging through the pin when the MPU is powered down. <S> When power is shut off the base voltage drops below any existing emitter voltage quickly and the transistor grounds out the pin. <S> It will easily handle any current passing through the 1 K resistor. <S> However, you have BAT54 diodes with a low Vdrop, less than the BE junction of a PNP, so I think the upper diode will protect the input pin very well. <A> You could just use a transistor for the input (assuming reasonably low frequency, as your 40Hz indicates- <S> this will easily work to tens of kHz): <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Instead of D3 to the +5 rail, consider using a suitable Zener diode to the ground rail.
Another solution is to use a 2N3906 PNP with its emitter at the pin, its collector grounded, and a 22K resistor from base to Vcc (5 V).
Strange behavior of voltage divider I am using a voltage divider to supply a voltage to a system (I don't know what sort of circuit I am supplying the signal to, except it's used to drive a very large motor. It needs a 0-5v signal). Other than this, there is another input to the system as well, a 72V switching signal. I am using two 10K resistors at the moment (this is for testing purposes) for the voltage divider. The voltage divider has a supply of 5V, so the signal is 2.5V. The circuit is given below, and the red arrow indicates the signal. The strange behavior occurs when the switching signal is turned on, at which point the voltage signal suddenly jumps to 5V. In addition to that, there is no response to the input signal at all. The system is working, because it responds to the original signal from an accelerator pedal. Any idea what could be causing this behavior? Thank you. EDIT: The original accelerator pedal is the one in this link: https://www.alibaba.com/product-detail/electric-vehicle-foot-pedal-with-potentiometer_60649371220.html?spm=a2700.7724857.main07.9.28a05756UO1eV2 . <Q> Without knowing your load circuit, I can still say it's most likely an impedance problem. <S> You have two options. <S> Either you can decrease the output impedance, or increase the load impedance. <S> We can't help you with the latter unless you give us more information. <A> You can't do that: if you have any load connected to your voltage divider (and a large motor as an particularly heavy load), you don't get a voltage divider, you get a loaded voltage divider, as you must imagine the load to be in parallel with either of your resistors. <S> Linear networks basics! <S> What you need is a voltage regulator of kinds, not a voltage divider. <S> For heavy loads, you probably don't want to use a linear voltage regulator, though your voltages really indicate you don't have much of a choice? <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> Connecting ground references. <S> There is not enough context and no schematic in your question so we can only guess at possible problems. <S> Your diagram does not show that you have referenced your divider's ground to the controller ground. <S> If you have failed to do this then your control voltage has no return path and will not work. <A> I suspect you are connecting it incorrectly. <S> Normally the control input to a moter speed control will look something like this: simulate this circuit – Schematic created using CircuitLab <S> If you connect the voltage divider to A rather than B, it will behave as you suggest. <S> The value of R1 is not necessarily 100K, it could be something else, and it will load your voltage divider, but it should not load a 5K source resistance (as you have) by a huge amount.
To decrease the output impedance, you could replace your voltage divider with a linear regulator like the CUI P7805-Q12-S2-S , or keep the voltage divider and add an op-amp configured for non-inverting buffer mode.
1.5V to light up LED Need some help here - I need to light up a normal LED with ONLY 1.5v; yes, 1.5V to light up an LED sounds ridiculous since we need a minimum of about 1.8V or more. But, is there any solution? <Q> You need to boost the voltage somehow if you want to emit visible light via a LED. <S> The obvious choice is a boost converter. <S> You can find boost chips that are intended to run from a single primary cell, so can work with your 1.5 V. If you don't need a lot of current, like just a mA or so to light up a indicator, a charge pump might work. <S> However, at these low voltages the diode drops will be significant. <S> You might be able to find a charge pump with synchronous rectification. <S> Or, get clever and use the diode characteristics of the LED to advantage, with the other diode being a Schottky. <S> LEBs (light emitting bulbs) intended to work from a single 1.5 V battery were commonly available for "pen lights" and the like. <S> However, the efficiency will be poor, even compared to relatively bad boost converters and charge pumps driving a LED. <A> First thing which comes to my mind is a Joulethief like this one. <S> simulate this circuit – <S> Schematic created using CircuitLab source <S> Alteranatively you could use a boost-converter like MCP1640. <A> Like this CL0117 LED driver. <S> The recommended circuit looks like this: <S> That's just a single cell, an inductor, the LED, and <S> the CL0117. <S> You can find them in flashlights. <S> I couldn't locate a reliable source on the CL0117 <S> (I don't count Alibaba or Ebay as reliable,) but did find a similar IC at Arrow. <S> The ZXSC380 is very similar. <S> Three pin device, inductor, cell and LED are all you need. . <S> It is an SMD part, though. <S> It could be soldered to your LED and inductor "dead bug" style to avoid making a PCB for it. <A> Maybe this might work for you: - Or this.... <A> Linear makes an LED driver chip especially for one or two single cell batteries: LTC3490 Single Cell Minimum Component LED Driver <S> It is for driving lighting LEDs with between 310 and 385 mA. 1v-3.2v input, 2.8v-4v out. <S> Can be Dimmed with PWM. <S> Low battery detect. <S> Very simple circuit with good efficiency, over 75% @ <S> 1.5v.
There are some very simple integrated solutions for driving an LED from a single cell. Another option is to not use a LED to make the visible light.
Bending insensitive connection or highly flexible/thin cable I want to attach several accelerometer data loggers to different parts of the human body (i.e. my own, it's not gonna be a commercial product). The individual units save their data to sd card so they are mostly autonomous. Nevertheless I want to wire them, in order to centralize power supply (a commercial portable power bank mounted to my waistbelt) and probably to be able to synchronize them regularly if the individual clocks drift too much. So most probably 2 or 3, but never more than 4 wires. Since the limbs move a lot (like when I am running) the cables will also be bent a lot. So if the cables have all but the most minute bending stiffness, they will exert additional forces to the accelerometers, which distort the measurements. I am also worried because if I end up doing the experiment very often, the wires will break in no time. Any finally I am worried about the cabling being very uncomfortable and cumbersome to use if the cables are stiff (for example attaching 2-3 stiff cables to one leg alone doesn't sound much fun). So are there any common applications which require multi-wire cables with very small diameter (with very small I mean less than 2mm for a 3 or 4 wire cable) or high mechanical compliance, which I could abuse for my purpose? Is there another well-established way to make cable connections to electronic devices which have to be insensitive to frequent bending (probably sounds funny, but: wiper contacts or something?) Side notes: There are several reasons why I don't want to power the units individually:1) LiPo batteries are small, but are an inherent safety risk when mounted to the human body (multiplied times the number of batteries times the measurement time); I don't want to perform as burning man...2) the individual units should be as light as possible so that their own inertia doesn't spoil the measurements (I can't nail the units to the bones...)3) with small sized LiPo batteries the operating time is rather limited. The capacitance of the cables don't play a dominant role because (infrequent) synchronization in the range of milliseconds is totally sufficient. Also resistance of the wires is not so much important because the data loggers only consume very little current. My design of the data loggers is already finished (and first prototype boards etched), so I would hesitate to change it. Nevertheless if any alternative suggestions with extraordinary advantages show up, I might change my mind as to changing the design. <Q> Usually it has two cores plus an overall screen <S> , it is highly flexible and reasonably robust, but can be a bit of a swine to terminate. <S> Here https://www.canford.co.uk/MOGAMI-LAVALIER-MIC-CABLE is a 2.5mm od variety, you can probably find smaller variants. <S> And here https://www.hhb.co.uk/product/mogami-miniature-balanced-lavalier-microphone-cable-(2901)/2379/ is a 2.16mm variant. <A> It is unlikely you will find an off the shelf solution. <S> You can actually integrate the sensors on a flex cable, or there are even processes that integrate PCB's and flex cables. <S> This is an example of integrating an SMT device in a flat flex cable <S> Source: <S> http://www.mech.utah.edu/~wil/tutorials/flexCirc_soldering_tutorial/Flex_circuit_Soldering_Tutorial.html <S> Another option is throwing out the connector altogether and going directly from PCB to cable (and maybe back to PCB) <S> Source: <S> https://blog.epectec.com/flex-circuit-polyimide-coverlay-solder-mask-considerations <S> You need to worry about strain relief and bend radius regardless of what you do. <S> Flex cables typically have a bend radius of 1/2", and if this is exceeded, the cable will break. <S> You can find information with the cable manufacturer, but there are some interesting reads here: MINCO flex design guide EPEC flex design guide <A> Whatever cable you choose for flexibility , strength and diameter , consider why so many headphone wires break and why USB connectors and some 3.5mm plugs are more robust than others. <S> My observations and guidance tells me the weakest connections require a rigid substrate, sleeve or strain wire that is 5 to 10x stronger than the weakest connection such that the bend radius is >5 to 10x <S> the wire diameter with a gradient strain relief. <S> This can be done with molding or heatshrink tubing or polyurethane compound ( <S> PL400) or as in CATV coax and grid wires a stronger weight carrying guide wire or sheath. <S> The ideal sheath for radial flexibility yet axial stiffness is a plastic braided weave over the stretchy weak braided wires with a perfect termination. <S> Then strands may be not just AWG40 but AWG 56. <S> This may yield the best ratio of stress/ strain in lowest mass and diameter. <S> In industry this solution is polycarbonate flat cable with a spiral axial motion aka Kapton tape or FPC cable have these qualities eg FPC can move back an forth 1e9 times without failure in axial curve moving in direction of curve (axial) used for moving head R/W signals on disk drives very fast. <S> PU jacket stranded wire can too if routed properly. <S> Levelier cable is an excellent choice at AWG40=0.08mm <S> but if it matters someone may have even better. <S> Conclusion—-Keep in mind cable routing and minimize stress in the weakest axis but choose cable with flexibility yet <S> high stress/strain ratio characteristics meaning can bend but won’t stretch. <S> P.S. Note that in hospitals sensitive EKG sensors are always well taped to body to perform this strain relief. <A> What kind of accelerations are you trying to measure? <S> Unless it's vibrations, or you're trying to integrate motion over mm distances, the accelerometer is more or less going to stay where it's attached to your body (unless you sew it on loose fabric or something like that). <S> I doubt the cable will have much effect. <S> I would just buy some thin usb extension cables and cut them up. <S> They have enough conductors, and they're built to be flexible. <S> You could even leave the connector on the power bank end and use that as a disconnect. <S> If you want to get really serious, hop on digikey. <S> They have pretty much every cable configuration you can imagine. <S> https://www.digikey.com/products/en/cables-wires/multiple-conductor-cables/473?k=cable&k=&pkeyword=cable&FV=4f00002%2Cffe001d9&quantity=0&ColumnSort=413&page=1&stock=1&pageSize=25
They do make kapton flex cables in multi conductor, that are available off the shelf (at digikey), these require connectors on each end and may not be suitable for the strain placed on the end of the cable. I would reconsider whether the stiffness of the cable will be an issue. Lavelier microphone cable sounds like what you want, it is the cable normally used between the head and transmitter pack on bodyworn radio systems used in live performance.
Positive Level Shift a Clock Output using Diode? I need to level shift a 26mhz 1.8v clock output by .7v on both the high and low side (so clock swings from .7v to 2.5v on output). Would a simple diode/resistor setup like below work for this? https://www.circuitlab.com/circuit/6v24nh/screenshot/540x405/ I did a simple circuit to simulate this, and it seems to shift the single nicely and clock output looks clean on scope, but its amplitude is shortened, so it swings from ~.9v to 2v, which I'm assuming is from the 1k ohm pull up I'm using. Some cutoff is fine, but how would I get this closer to 2.5v on the high? <Q> Something like this might be more predictable: simulate this circuit – Schematic created using CircuitLab <S> I'm not sure if you actually 'require' a low of 0.7 V <S> or you are just willing to accept it as part of the level conversion problem using diodes. <A> Actually found an even better solution, instead of starting with clock output on the low side, I just reversed it, so took clock source from the high side (ie between .7v-2.5v and simply passed it through a 100nf capacitor, which brought it down to a 0-1.8v. <A> Here is good and working solution with only 3 devices (2 resistors and 1 nmos): <S> Simulation results show good transient switching and clean logic levels, even for 26MHz: <S> Regarding your circuit <S> You have to change the 5V to 2.5V!, and the 5V logic out is now 0.7/2.5V. <S> You can use this schematic. <S> But I don't think you will get it run on 26MHz. <S> Further the levels are dirty -> better use a push-pull stage. <S> D1 is a little bit strange. <S> Seems that for the 5V version <S> it limits the output voltage to 4V! <S> In your case D1 is always in reverse operation. <S> You can cancel it. <S> Here is another circuit: maybe you have to clamp the output with schottky diodes to vdd and gnd, to get faster switching times. <S> simulate this circuit – <S> Schematic created using CircuitLab Hope it helps! <A> Termination <S> At 26MHz, you don't want to cut corners. <S> I mean this literally, since that's what passive pullups do. <S> As you mentioned in your answer, placing a small capacitor in series to AC-couple the signal can work. <S> However, there are a few caveats: <S> The signal must be DC balanced. <S> If you have a continuous clock with a 50% duty cycle, this will not be a problem. <S> However, you will have to use a DC-balanced encoding (such as Manchester or 8b/10b) in order to make this work for a data signal. <S> You need to provide appropriate DC biasing and termination at the receiver. <S> In this case, I would suggest using far-end parallel termination. <S> I chose a 100pF capacitor because it provides a 200MHz bandwidth, but you may need to experiment with different values. <S> simulate this circuit – <S> Schematic created using CircuitLab Use a level translator <S> When powered from 2.5V supply, these devices should have input levels compatible with 1.8V LVCMOS, but output 2.5V logic. <S> Just be aware that the low output will still be at GND, which may cause an ESD protection diode in your receiver to conduct.
Since you are dealing with a small offset voltage, you may be able to get away with using a logic level translator such as the 74LV1T34 or 74LV1T126 .
How to burn multiple FPGA We can buy prototype board to program FPGA very easily. And we can also buy single FPGA to program. But I don't know any board to program multiple time a FPGA. I guess that whenever you want to program several FPGA, a special programming board has to be used, where you can easily replace the FPGA by another with some kind of slot. Am I wrong? And is that board FPGA specific? <Q> An FPGA (aside from some specialty products) doesn't store its configuration after power is removed. <S> It must be re-programmed <S> every time it is powered up. <S> Most FPGAs include dedicated logic to connect to an EEPROM on the same board and automatically configure the FPGA from data stored on the EEPROM after each power up. <S> If you use this kind of FPGA, your problem is now how to program a bunch of EEPROMS to be stuffed on the boards with your FPGAs. <S> For this, gang programmers are certainly available. <S> You can also pay a service company to program your EEPROMs for you. <S> But they might not be economical if your production volume is less than 100 units or so. <S> The major FPGA vendors build this capability in to their in-circuit programming tools so you might not even be aware that this is what you're doing. <A> The previous answer is correct (The Photon) for solutions that typically have only FPGAs on the board. <S> If you already have an MCU on your board you can load the FPGAs from that processor. <S> Read <S> this from Xilinx on configuration (others are very similar). <S> Read <S> this on Altera FPGA configuration loading. <S> Typically when you load from a serial EEProm <S> this is handled by the FPGA itsel, and as pointed out you just need to program the EEProms <S> so the FPGA can be permanently installed on the PCB. <S> The other methods are much more flexible and typically include: A serial option such as SPI or I2C A JTAG option with multiple FPGAs addressable (many times this may include a JTAG header on the board for manual upgrade, but it can be driven from an MCU. <S> A parallel option which looks like a RAM chip. <S> The parallel option is often used where the functions in the FPGA are dynamically changed during operation. <A> After the board is assembled, you connect the JTAG and program the FPGA. <S> And you can do this repeatedly to the same FPGA, so upgrades and bug fixes are straightforward. <A> Am I wrong? <S> And is that board FPGA specific? <S> The largest company I know that does "gang programmers" for the last 40 years or so is DataI/ <S> O . <S> They have adapters for every chip size and software for all chips bundled in one package and charge an annual update fee for their libraries. <S> They don't do cheap a dirty single chip gang programmer cards. <S> But someone else might. <S> They have the most popular machine, and ones for high production run rates. <S> Not cheap, but good. <S> When large board shops have high production rates they use Data <S> I/O equipment that supports. <S> Up to 2000 parts per hour(with tray, tape and tube, even with large file sizes) <S> 2 pick & place heads SSD for fast download <S> Optimized algorithms <S> Normally you program a serial Flash chip for a voltatile FPGA <S> but there are some interesting flash + Cortext FPGA <S> SoC's out now. <S> https://www.microsemi.com/product-directory/fpgas/1690-proasic3#proasic3-e <A> What we often do if we have production lots that are larger than a several dozen pieces is, we create a needle board for incurcuit testing that also has contacts to the flash interface. <S> This way we can directly integrate the programming process into the testing sequence.
Instead, you can use the regular in-circuit programming facility of your FPGA to program it to a design that routes signals from the in-circuit programmer through the FPGA to program the EEPROM. To expand on @crj11 s answer, all you need to do is provide a JTAG interface, which is a tiny little 10-pin connector, hooked up to the appropriate pins on the FPGA.
How to find coupling and decoupling capacitor values? I am trying to learn receiver design, one thing I noticed is the use of coupling capacitors and decoupling capacitors and incuctors. There were set of standard values such as 100 pF, 1000 pF or 0.1 uF (at decoup). My doubt is how do we choose those values exactly? I have asked few and they tell about the formula XC=1/2*PI F C but even if I am using that formula, how to know the value of Xc? For example consider I am working on 1 GHz, now how to calculate those values? <Q> The reason for decoupling capacitors is to absorb the current gulps which the IC demands. <S> Without the capacitor, you get lots of high frequency noise between the ground and power. <S> This is the why of decoupling. <S> There are various methods to apply to select your decoupling capacitors. <S> If they are defined it the datasheet, always follow that. <S> If not, you can either "do the maths" based on the frequencies and work our what you need, or you need to apply the engineering rule-of-thumb. <S> A while ago, there was a strong belief in going for "decade" capacitors, using a 10nf, 100nF and 1uF, to get a good range across the frequency spectrum. <S> These days, after lots of work has been done on it, the rule which gets applied most is "largest capacitor in smallest package". <S> This is usually all you need. <S> If you need more decoupling than that, you will need to "do the maths" which will depend so much on your circumstances that it can't be addressed here. <S> For those interested, the reasoning behind largest capacitance in smallest package: the smallest package has the lowest inductance, and therefore will absorb high frequencies easily. <S> Higher capacitor value, will handle higher amplitude noise. <A> My doubt is how do we choose those values exactly? <S> We don't! <S> No capacitor is ideal, there is always series resistance and inductance to be considered. <S> To learn more watch <S> this EEVBlog video by Dave Jones .Note <S> that bypass capacitor is just a different word for (supply) decoupling capacitor. <S> More on the effect of different types of capacitors is demonstrated in this video . <S> One of the conclusions you should draw after watching the videos linked above is that the choice of (bypass) capacitor depends a lot on the frequencies of the signals you want to decouple your supply for. <S> In the case of (AC) coupling capacitors you want the most optimum capacitor for your signal frequencies. <S> In practice the actual value of the capacitor does not matter too much as long as it is "enough". <S> For example, to suppress a supply ripple of 100 Hz, a 10 nF capacitor isn't going to help much. <S> A 100 uF capacitor will help but so will a 47 uF <S> and a 220 uF capacitor. <S> It depends on the circumstances what a designer will choose. <S> Often if a suitable capacitor is used already elsewhere in the product then that capacitor is chosen to keep the BOM (Bill of materials) shorter. <S> With experience selecting the components becomes easier as you have seen similar situations before and you will know what to do. <S> Note that on a PCB, if you have enough free area, you can just add footprints for adding (bypass) capacitors. <S> Then if it turns out you didn't make the right choice at the design phase you can easily try out a different capacitor. <A> You are learning about voltage-dividers. <S> Voltage dividers have a series element and a shunt element. <S> In a bypass capacitor (lowpass filter), the capacitor is shunting energy to ground. <S> At higher frequencies, the capacitor does a better job of shunting, limited by inductance and resistances (and resonances of the GND system). <S> In a DC-blocking capacitor, (high pass filter), the capacitor is the series element and at higher frequencies there will be less attenuation.
So you get the standard package you're using (say 0603 or 0402) and get the largest capacitance you can find in that package with the required voltage rating.
how to find impedance of inductance with square wave input I know the impedance of the inductance is: 'jwl'; but this is correct with sinusoidal input; now my question is: how to calculate the impedance when the input is the periodic square wave(like a digital clock)? any help will be appreciated. <Q> Form the context of your question, it sounds like you are asking for an impedance magnitude in ohms. <S> The problem is that this is only defined at a single frequency. <S> If you want to define an effective impedance as (perhaps) rms voltage divided by rms current, then there are several ways to arrive at that figure, from analytical, to simulation with SPICE. <S> The latter might be easiest, and also illustrate to you what happens to the waveforms (hint, the current wave is not square). <A> assuming your usecase allows it, you can build a simple LC filter with a known value capacitor. <S> From there, you can use your square wave as an input, Vc as an output, an work out your impedance from the step response of your system. <A> Impedance is defined as the ratio of the Laplace transforms of the Input voltage and the current flowing through the said input voltage source. <S> You can use the method suggested by Neil_UK for an approximate analysis, but if you are looking for an exact answer, then you must keep in mind that impedance comes out in the jwL form only for a purely sinusoidal input. <S> One of the methods to handle a general input voltage is to first solve the problem by writing the differential equations, for example in this case,$$L\frac{di(t)}{dt} = <S> v_i(t)$$Then taking a Laplace transform like so $$sL\mathscr{L}(i(t)) <S> = <S> \mathscr{L}(v_i(t))$$And <S> then the current established in the circuit as a function of time may be found by expressing the Laplace transform of the current in terms of known quantities (including the Laplace of v_i) and taking the inverse Laplace transform using a tool like Matlab. <S> If the OP is familiar with these ideas then they may lookup the iLaplace operator in Matlab. <S> A useful link to learn more about generalised impedance as an s domain <S> (Laplace Domain) proportionality factor is this . <A> You could use the fundamental to get a very approximate stab, but because a square wave has significant energy at higher frequencies, there will be a fair degree of error. <S> However, given that we know that the square wave is treatable as a summed series of sine waves with a well known equation - you could iterate towards a better solution by applying the sine wave equation for impedance at each of these harmonics in turn, and summing the current flowing at each. <S> You then get a series of sinusoidal currents which you can sum to get total current, and then get impedance back. <S> As you include more and more of the upper frequencies you will iterate towards a more accurate solution. <S> This could be done easily enough in a spreadsheet or with a simple script if you know a little programming. <S> This gives a decent solution without delving into higher mathematics - or a useful sanity check on results that you might obtain by other methods. <A> Another answer makes mention of laplace, but since your signal is periodic, it's easier to think in terms of fourier. <S> Your square wave can be regarded as a series of harmonics. <S> Since the inductor is linear we can use the superposition principle to analyse each harmonic seperately. <S> I'm going to ignore the issue of phase and just think about the magnitudes of the components. <S> In a square wave the fundament is the strongest component, the 3rd harmonic is \$\frac{1}{3}\$ the strength of the fundemental, the 5th harmonic is \$\frac{1}{5}\$ the strength of the fundemental and so-on. <S> But the impedance of the inductor is proportional to frequency. <S> So in our current waveform, the 3rd harmonic is \$\frac{1}{9}\$ the strength of the fundemental, the 5th harmonic is \$\frac{1}{25}\$ the strength of the fundemental and so-on. <S> The RMS current through the inductor will be dominated by the fundamental. <S> If you had used a capacitor instead then the impedance would be inversely proportional to frequency. <S> All the harmonics in the current waveform would have the same strength as the fundamental and the RMS current would be infinite.
As a square wave is composed of a fundamental frequency, plus 0.33 3rd harmonic, plus 0.2 5th harmonic etc, you can make a good stab at an effective impedance (depending on how you want to define effective) by simply using the fundamental frequency.
What could be the issue with energy monitoring IC (HLW8012) and my non-isolated power supply? This circuit works fine when I replace the 220v power supply with a cheap power supply(I assume they are isolated) from aliexpress. However, when I use my own power supply(schematic below), it causes the 0R resistor, fusible resistor, AMS1117 IC and HLW8012 IC to blow out with smoke. my power supply circuit is also working fine under load when not connected to power monitoring circuit. I think there is something wrong with my GND but I don't know how to solve it. Chinese datasheet for HLW8012 can be found here and some english info about it here <Q> The problem is that the GND of your circuit is a local ground. <S> That means local to your circuit . <S> If your circuit is powered on then the GND in your circuit will be at roughly half of the mains voltage. <S> That means that if you connect this circuit to a PC, it's case would become live at half mains voltage. <S> That is extremely dangerous <S> and that's why PC cases are (or should be) grounded via the mains earth connecttion. <S> This means that the PC's mains earth connection will short your circuit's ground to mains earth. <S> Your power supply circuit is not designed to handle that <S> so it blows up. <S> You really need to study the subject of mains isolation , why it is needed (safety) and how it is done (transformer, opto couplers, wireless). <S> Then browse the internet for similar (mains power monitoring) <S> projects to learn how it is done. <S> You will find that monitoring mains current directly via a shunt resistor is always a challenge. <S> It is much easier to use a current transformer or a Hall sensor based module as these already provide mains isolation so they're much easier to use. <A> Try this for a possibility of what happens: - <A> Working with this kind of circuit, you need to understand the safety issues involved with a transformerless, non-isolated off-line device that is floating at mains potential. <S> Put it in an enclosed, double-insulated box, and do not connect anything to it without isolation - don't connect oscilloscope, PC microcontroller programmer, etc while the AC is connected. <S> That said, however, it is not an intrinsically unworkable or dangerous design - millions of such devices are used every day for domestic AC power metering and home automation and switching devices. <S> You've obviously got a short from the line active straight through the fusible resistor and one of the bridge diodes back to the neutral. <S> You do need your local "ground" to be mains active, for the HLW8012 to work. <S> Your active straight from the input line, before the shunt resistor, should be connected to ground via the 0-ohm resistor. <S> (Remember! <S> NOTHING ELSE EXTERNAL IS REFERENCED TO THIS.) <S> The incoming active line should be connected to both the 0-ohm resistor to ground and one side of the 1-milliohm shunt resistor, and nothing else. <S> (Not even sure why you need that 0-ohm resistor.) <S> Connect the other side of the 1-milliohm shunt to the active wire to the load. <S> Connect the neutral wire to the load neutral, as well as to the 8.2-ohm fusible resistor that feeds the switcher. <S> Also connect the string of 470k voltage-sense resistors to the neutral. <S> Get rid of the bridge rectifier. <S> Put a single diode in series from the neutral line (after the fusible resistor) before the LC pi filter. <S> Other than that <S> , I think you're on an OK track for success. <A> I suggest to use transformer to separate the input <S> ac voltage form your dc GND like done in this famous AC/DC module (THX208 - PWM Switching Power Supply Controller) at the this circuit photo ( U6 tarns ) :
Yes you will have a ground issue with this circuit.
How to properly monitor supply voltages How do you properly monitor supply voltages for digital circuits (microcontrollers, FPGAs, RAM)? (I stumbled upon this question when working on safety critical systems) What I have seen a lot is to have ADCs which measure the supply voltage regularly, but these kinds of circuits perform weakly against glitches as most of the time the ADC is not measuring at the right moment. Glitches can lead to memory corruption, which can be catastrophic.Furthermore, having a look at http://www.analog.com/media/en/technical-documentation/product-selector-card/Supervisorsfd.pdf it seems like some resilience against detecting glitches seems even desired. What makes sense, because as long as a glitch does not have a certain width or depth, it has no impact. But I have also stumbled across some ICs (an RTC for example) which besides their normal brown-out circuitry have some edge detection to detect sudden rises or falls on the supply voltage. To summarise, isn't it desirable to have beside the normal "static" voltage monitoring (with things like ADCs or comparators) some circuitry which can detect glitches (of a big enough width of depth to have an impact)? <Q> The problem is that once your supply is not stable, all bets are off. <S> Any glitch that takes Vcc below the minimum threshold in a processor circuit or similar is really bad news. <S> If I suspected that this was the case but was not able to catch the event with a scope (perhaps because it was very infrequent) <S> I would consider designing an analogue latch circuit to indicate in some way <S> the fact that the supply had fallen below limits. <S> But this would still be to confirm the problem so that I could set about trying to fix it at source. <S> I would not be trying to make a processor detect when its own supplies were flaky (although things like brown-out detection exist, but that is a bit different). <A> There are some different ways to monitor supply voltage. <S> https://www.digikey.com/products/en?keywords=DS1233AZ-15%2B-ND <S> Read through the data sheet to understand how it works. <S> You could make your own supervisor circuit using a high speed comparator and a voltage reference. <S> Sampling of the supply voltage using an ADC probably isn't necessary unless you need a log of the data. <S> Most likely you just need to know if something happened and act accordingly. <A> But if there is a 'brown out' and the voltage dips below a certain value then having an ADC to monitor the situation isn't going to help. <S> An 'electronic fuse' is something that I've used in the past for current faults. <S> The TPS2420 also has UVLO <S> but it is not set-able, on some other electronic fuses they are. <S> These type of parts have a fault pin and you can set the fault current. <S> If your looking to monitor the voltage for 'dips' this is a good circuit and is found in many power IC's, or you could build one with discrete components: <S> The schmitt trigger comparator ensures that the output doesn't flucuate and has hysteresis so if there is a dip <S> and it's rapidly switching it doesn't switch on fast oscillations. <S> The resistive bridge determines the voltage that the circuit detects (which should be matched with the comparator reference voltage). <S> The current source ensures that the comparator still operates even under low voltage conditions (and you should have a capacitor on the linear supply that should keep the circuit running in bad conditions). <S> You could run the output of this circuit into a S/R latch or the interrupt pin for a microprocessor.
One simple and effective solution is a power on reset chip such as the DS1233AZ-15+.
Data transmission over up to 100 ft I need to transmit data (less than 5Mbps) point-to-point over 100 ft. I prefer not using Ethernet due to the complexity. I can use low-scale FPGAs or similar chips if needed for functions like error correction control. I'm considering UART over RS-485/422, but I'm not sure if it can provide such performance. Do you have suggestions on not-too-complex solutions? Thank you. <Q> It's mostly down to the cable - I've had cat7 cables running 600 Mbps over 35 metres down one pair with power down another pair. <S> I've had 100 Mbps running 500 metres over a single (but very decent) coax. <S> This was a single ended driver and cable-compensating receiver chip. <S> Choose your cable wisely and you can easily get the distance you want especially if you use a differential driver and receiver. <A> UART on RS-485 is a good first approach, but the standard says 2Mbps@50m <S> , I wouldn’t fight against it. <S> Have you considered optical communications? <S> You can use the protocol of your choice above the physical layer, just choose a decent pair of tx/rx transceiver <S> and you’re good to go. <A> I think you should use Ethernet even if you think it is complex. <S> Today there are very competent IP that you can use in low end FPGAs like Spartan or Artix that do all Ethernet stuff that you need like TCP, UDP, DHCP etc. <S> There are even free cores and you will have a link up and running in a very short time. <S> It is scalable, very good infrastructure, very good support by small boards like Raspberry Pi and so on.
I have implemented both 485, optical and Ethernet applications and my opinion is that Ethernet is almost always the better choice.
Which microcontroller and transistors can I use to control these switches? I have a SATA HDD case ( product details ) with switches that toggle the power supply for each HDD. My aim is to control each switch individually via software. (My background: I'm a total novice to applied electronics, but I have a good grasp of the underlying physics.) Edit: I've measured the resistance between all pairs of switch pins and found out that each switch is equivalent to the following circuit: Luckily, it suffices to connect pins A and B (or any equivalent pair) to enablethe HDD power supply as if the button were pressed. The top pins are ignored. When a HDD is attached and the switch is off, the voltage between A and B is 12V. The current, when connecting A and B, is < 1mA. My idea is now to add a transistor to each A-B pair of pins and route a wire from each transistor base to a microcontroller that's attached to the same ground potentialas the HDD case.Is this approach feasible and safe? Can you recommend a simple, low-power microcontroller that can be attached to a consumer motherboard, preferably viaUSB? It should have at least 15 output pins which are only needed to toggle the transistors. The software interface that the MC should be able to implement is trivial: set_pin_voltage(PIN_INDEX, on|off) . Maybe a simple IC is enough? What type of transistor would be appropriate? The default switch state should be off, so the transistor should only conduct when a voltage is applied to its base. What type of cable would you recommend? Since posting my original question, I've read a good amount of The Art ofElectronics , but I nonetheless feel very insecure about real-life componentselection for my first electronics project.I'd love to hear your expert advice. Detail view. These are 6-pin alternate action switches (push for on, push again for off). D5 is a status LED Overview. The case is partly disassembled. <Q> It depends a little bit what exactly this switch connects. <S> You for sure can replace it with a transistor but to tell you how we would need to know the schematic of this thing. <S> Otherwise just use an opto-coupler and you're good. <S> Then create a transistor circuit that brings the same signal level to the power input pin when driven. <S> edit: According to your edit you can simply do something like simulate this circuit <S> – Schematic created using CircuitLab <S> As you mentioned, connect the controller to the same ground potential as the transistor circuit. <S> What controller you use probably depends how you actually wanna control it, generally speaking, an ATiny could do the job. <S> And one transistor per switch is enough. <A> You can buy a multimeter for less than 20 dollars these days. <S> Then set it to either resistance mode or continuity (the one that beeps). <S> It looks like the 3 pins on either side are connected, and then both sides are connected when the switch is pressed, but it will be safer to check yourself. <S> If you look under the board you may be able to make out the traces and confirm this without buying a meter. <S> Anyway, once you find out which pins to connect, you would need an optocoupler for each switch. <S> An opto is an LED and a light sensitive transistor in the same package. <S> You will want to look through the datasheet for the opto and find the current rating for the internal LED and its forward voltage drop. <S> You will also need a resistor to limit current into the LED. <S> If using a microcontroller (I'm assuming 5V) <S> the resistor value would be: (5 - LED Forward Drop)/Current for LED = <S> Resistor ValueDoesn't have to be exact, just make sure you don't exceed the LEDs max current. <S> You want to drive it fairly hard though. <S> Then just send a HIGH signal for a closed switch, or LOW for an open switch. <A> You have left the crucial close-up photo of the underside of the board out. <S> This would help us determine if the switches are used in single, double or triple pole, and NO, NC or DT configuration. <S> This determines your best line of attack. <S> If the switches are only switching a single line with 3 contact (at the full supply current) then replacing it with a suitably rated transistor or relay should do the job for you. <S> If you want to maintain the remote controlled state even if your micro-controller should have a glitch you would need to use latching relays. <S> Your switch would have to be off to allow relay control and your switch would then over ride the relay. <S> If you are happy to control all the switches at the same time you might be able to get away with a single bigger relay on the power supply input to the device unless you want some communications circuitry to remain active to avoid USB device enumeration whenever you power drives up and down. <S> You do not explain why you want to control them <S> so we are having to guess what is important. <S> You should also supply information of the power supply rating of each drive or the whole unit to allow for component rating recommendations.
If the switch is used to "connect" a logical signal to an input, figure out how it's connected (could be normally opened or normally closed).
How to fix incorrect routing to SMD transistor terminals I've got a doozy of a situation: On this circuit I had made, I routed an IRL530N D2Pak transistor with Source and Gate switched....the large heat pad should be the gate input, but instead I routed it to ground. Furthermore, I added 2 heatsink pads on either of the transistor, with traces from those pads going to the Gate pad. To compound the issue, I added 11 small copper-plated through-holes on the Gate pad that runs through the board to the ground plane on the bottom side. Unfortunately (for this situation), I added 2 inner layers (power and ground); those through-holes are part of the inner ground plane as well. Here's a couple options I was going to take, all of which could possibly damage the board: 1) Heating issues may arise a) flip the transistor 180 degrees b) cut the Drain pin off c) solder the Source pin to the square pad d) cut the traces going to the heatsink pads e) cut trace from the small right pad f) bridge connection between heatsink pads and the 2 small pads g) solder underneath of transistor (Gate) to 2 small pads (the left small pad will be the Gate trace g) wire the non-SMD Drain pin that I cut off to the resistor to bridge that connection 2) May cause a short somewhere or I may accidentally end up removing the entire square pad (this would be my first time running this kind of procedure) a) use a thin knife to cut around each hole (top and bottom of board) to break electrical connection b) remove the parts of the copper off the top of the board c) cut trace from small right pad, then wire it to ground d) wire the square pad (now the Gate) to the pin that used to be connected to the right small pad e) do nothing to the left small pad or the trace (would still be the correct route for the Drain) 3) Inner power and ground planes may short, or eventual re-soldering may flow through and come in contact with the inner planes a) drill through each of the 11 holes b) cut trace to right small pad, reroute to ground c) route square Gate pad to the pin originally routed to right small pad So far that's what I'm thinking of doing...I don't have enough expertise (or even a minimal understanding) of the cause-and-effect risks involved, so any opinion or alternative solution would be greatly appreciated. If the board is a goner, let me know too...I only purchased 3 for a relatively cheap price, so I'll take the hit if that's the case. Anthony <Q> People make mistakes all the time, and learn with more experience not to do those things. <S> After a few mistakes like this you check all of the pad layouts with the datasheet (sometimes this doesn't help because the datasheet can be wrong), regardless you need to do some rework. <S> You can cut traces, solder components by tacking them on to an existing pin (like an SMT resistor), and wire things together. <S> The best thing is 30 gauge wire (usually comes in blue) <S> it's small enough that for low current signals (like a 7mil trace or 10 mil trace) it makes a great substitute if you need some rework. <S> You can also use high gauge wire for larger currents. <S> Sometimes it's advantageous to buy the same part in a different package for prototyping. <S> Like you said, don't short stuff out. <S> You can even cut traces and solder bridge them back together, rework is a part of circuit design. <S> Source: <S> Nexlogic.com <S> The time you can get in to trouble with prototyping is parasitics and differences between wires and traces. <S> If your signal needs a particular resistance, inductance and capacitance then these differences will show when you change a trace for a wire and do some rework. <S> These differences will be manifest in the miliohm, uH <S> -nH range, and pf range which also means that high speed +40Mhz signals could have a problem. <S> Large currents will also see a difference. <S> The last thing is if the design operates in the uV to nV range there will be thermal noise introduced from the solder junctions of the wire (vs no thermal junctions with a plain copper trace on a PCB) <S> The engineers at linear usually do all of their prototyping without PCB's at all and solder all of their components together. <S> Something like this: <S> Source: <S> http://www.computerhistory.org/atchm/an-analog-life-remembering-jim-williams/ <A> The middle pin and tab are the drain. <S> If you have that connected wrong and with a bunch of thermal vias to ground rather than wherever the drain should go, your best bet is probably to mount the transistor somewhere else and connect it through wires. <S> If it's a switching supply, rather short wires. <S> For example, you could solder the MOSFET to a thin (eg. 1mm) piece of copper clad PCB and glue that to your PCB with short wires for the 3 connections. <A> I would like to expand on @Spehro idea and suggest that the additional PCB does not have to be glued, nor the original pads covered by tape. <S> This way you will preserve much of the heat dissipation capability. <S> Here is quick drawing of possible arrangement. <S> Note that it needs good isolation coating on that middle trace. <S> You can come up with better layout. <S> Update: here is a bit better layout which avoids crossing the trace on main board. <S> Update: Hmm... this would add a lot of parasitic capacitance. <S> I think you can cut down on copper pouring in the bottom layer (or both) and still have enough heat dissipation capability left.
If you make very thin adapter PCB exactly the same as old pads on both top and bottom and then cross-connect them with vias you can solder this PCB to the board in place of the component and solder FET to it at the same time.
How are size of caps determined/calculated for use in smoothing voltage? I'm reading this great book ( AVR Programming: Learning to Write Software for Hardware by Elliot Williams) and setting up my arduino atmega328pu, usbasp programmer and using avrdude to program the chip. The book shows the following setup to power the chip off the computer's USB port via the USBASP programmer. The author explains that you should use a 100 nF (0.1 µF) across the VCC to ground to smooth the voltage. How is that value (100 nF (0.1 µF)) calculated or determined? I know 5V is coming off USB port of computer and I'm wondering how that factors into the calculation. What Does That Do? Does that basically "short" certain voltages directly to ground -- when voltage spikes? Part 2 : A Similar But Different Example There is also a similar set up of a mintduino but the author is using a 9V battery so the voltage is different but in that case the writer/experimenter shows it hooked up like the following*: Of course you can also see that this experimenter is setting up the atmega328 to use an external crystal (16 MHz) but he uses two smoothing caps of 22pF and he puts one serially on each pin (XTAL1, XTAL2), each connecting back to ground. Basic Explanation? Can someone provide a bit of an explanation of how these are similar or different? General Formula? Can someone provide a general formula for calculating the cap values I should use in instances where the voltage is different? *You can see the entire mintduino article at: https://makezine.com/projects/build-a-mintronics-mintduino/ <Q> The supply bypass capacitor should be low impedance at MHz where the chip introduces or responds to noise. <S> Now at (say) 50MHz, a perfect 100nF (0.1uF) cap has an impedance of \$X_C = \frac{1}{2\pi fC}\$ = 14m\$\Omega\$. <S> Typically the power supply regulator can respond well up to perhaps 250kHz, where Xc = 6\$\Omega\$, so a 50mA spike will cause a drop of less than 0.3V. <S> It would be better to have a larger reservoir capacitor <S> somewhere to take care of these spikes <S> but the 100nF will deal with high frequency spikes from the chip (if the bypass capacitor is further away there is series inductance that will increase the voltage drop). <S> In earlier days 0.01uF was easier to get in disk form and that was the popular size (with a large, perhaps electrolytic or tantalum, capacitor mounted somewhere on the board). <S> Now it's just as easy/cheap to use 0.1uF. <S> Load capacitors on a crystal are another matter- <S> they are calculated from the load capacitance specified for the crystal (and they have to be acceptable to the chip). <S> If the rules are not followed, the oscillator may be slightly inaccurate. <S> If the capacitors are way too big or too small, the oscillator may not start properly under all conditions. <S> If the crystal is specified for (say) 18pF load, the load capacitors are 2* Cload - Cstray- Cinput, so perhaps 27 or 33pF. <S> Connecting the caps as shown from Vcc to GND is not generally done. <S> It might help a bad design to start, but it will could cause unreliable operation and excessive jitter if there is much noise on the power supply. <A> I found a definitive answer in the Atmega328p complete data sheet (starting at bottom of page 50) <S> so I thought I'd post it here for future reference. <S> Low Power Crystal Oscillator <S> Pins XTAL1 and XTAL2 are input and output, respectively, of an inverting amplifier which can be configured for use as an On-chip Oscillator, as shown in the Figure below. <S> Either a quartz crystal or a ceramic resonator may be used. <S> C1 and C2 should always be equal for both crystals and resonators. <S> The optimal value of the capacitors depends on the crystal or resonator in use, the amount of stray capacitance, and the electromagnetic noise of the environment. <S> Some initial guidelines for choosing capacitors for use with crystals are given in the next Table. <S> For ceramic resonators, the capacitor values given by the manufacturer should be used. <A> General formula: <S> The arudino can be thought of as a switching load. <S> Why? <S> because millions of transistors can switch on or off all at the same time. <S> The two cases we are most concerned about are the minimum and maximum case when the processor is drawing min and max current. <S> For example, if we know the arudino draws 0.5mA when it's doing nothing and 30mA max, this would be like having a 6600Ω resistor on all the time (for a minimum current) and a 110Ω resistor when it's drawing max current. <S> The interesting thing is the cable is the reason why we have to have a power filter capacitor, because it has inductance and the cable can't source all of that current instantly. <S> (if we had a super conducting cable with no loss or inductance to the power supply, we wouldn't need filter caps at all). <S> Because the cable takes a while to source power, we need to store it locally in a capacitor. <S> In general this can be calculated, but you'd need to know the inductance of the cable, the power supply's source inductance and resistance. <S> The inductor resistor and the load can be modeled as an RLC circuit . <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The other example is an oscillator circuit: Basic Explanation? <S> Can someone provide a bit of an explanation of how these are similar or different? <S> The capacitors are for tuning the resonant point of the clock crystal, they are different. <S> The capacitor values are very low in the pF range and depend on the value of the resonant point of the crystal, they form a resonant circuit with the crystal. <S> General Formula? <S> Can someone provide a general formula for calculating the cap values I should use in instances where the voltage is different? <S> There isn't really a formula, there are tables, but the best place is to look in the datasheet of the microprocessor, because the drive circuitry is slightly different between microprocessors. <S> Source: <S> https://www.electronics-tutorials.ws/oscillator/crystal.html
The easier thing to do instead of measuring or estimating the cable resistance, is to switch out capacitors and measure the ripple with a volt meter.
How does this inverting opamp circuit with adjustible bandwidth work? Either my textbook author is a scoundrel or I don't have the prerequisites to understand even a simple op-amp circuit. I understand how a basic inverting amplifier works and I get how the gain falls off due to the internal RC circuit (miller C). What I don't understand in below circuit is how the value of the resistor \$R\$ changes the bandwidth. Since gain-bandwidth product is generally constant, this circuit must be very clever to manipulate bandwidth without touching the gain. I'm attaching the full snapshot of my textbook explanation. It says bandwidth varies with \$R\$ and gives equations, but doesn't explain how or why. Please help me understand how this works. <Q> This result can be understood easily if we combine the voltage source that is in parallel with R with R itself to get a Thevenin equivalent at the inverting terminal of the opamp. <S> The Thevenin equivalent will be$$R_{th} = <S> R_1 ||R$$$$V_{th} = <S> \frac{V_{in}(R_1||R)}{R_1}$$And <S> the expression for the gain is$$A_v = \frac{V_o}{V_i} = -\frac{R_f}{R_1}$$Which is independant of R. <S> As the OP has correctly pointed out, the Gain Bandwidth product of an amplifier remains constant no matter the extent of feedback. <S> More on this can be found here and here . <S> The trick is that the input to the feedback amplifier (inverting amplifier) is Vth and not Vin. <S> So by increasing R the gain is falling (Denominator increases), since the gain is$$\frac{V_o}{V_{th}} = -\frac{R_f}{R_1 ||R}$$ and consequently, since GBW remains constant, Bandwidth must increase. <A> Intuitive Answer Since R attenuates both input and feedback to 0V the internal transistors must use more internal gain to supply an output signal voltage so the input current to Vin(-) cancels and remains a virtual ground. <S> i.e. <S> Vin/Rin=Vout/Rf . <S> So attenuating Vin to Vin(-) with Rin to R to gnd does not affect outside DC loop gain but the op amp transistors have to use more internal gain to match the output , but at the expense of BW due to fixed GBW. <S> The outside “DC” loop gain up to attenuated New GBW product ... is what I intended TY @LvW <A> The shown circuit modification with a resistor R between the opamp input terminals is a very popular method for improving the stability margin of the closed lopp gain (input compensation). <S> For ideal opamps (very large open-loop gain) <S> the resistor R has no influence on the closed-loop gain but it lowers the LOOP GAIN (and, hence, the bandwidth of the closed-loop gain). <S> As a result, the stability margin is improved and we are allowed to use even opamps which are NOT unity-gain compensated for applications requiring closed-loop gain values as low as unity. <S> Intuitive explanation <S> (for uneffected closed-loop gain):Assuming that the open-oop gain Aol is infinity, the closed loop gain is Acl=-Hf <S> / <S> Hr with Forward factor <S> Hf= <S> Vn/Vin for Vout=0 (Vn: Voltage at the "-"opamp terminal) and Feedback factor (return) <S> Hr= <S> Vn/Vout for Vin=0. <S> It is easy to show that the additional resistor R lowers both factors in the same way so that the value of "R" cancels out in the ratio Hf/Hr. <S> Calculation: <S> Forward factor: Hf=(Rf||R)/[(Rf||R) + R1] <S> Feedback factor: Hr=(R1||R)/[(R1||R) <S> + Rf] After evaluation (and some mathematical manipulations) of the ratio <S> Acl=-Hf <S> / <S> Hr <S> we arrive at Acl=-Rf <S> /R1 <S> (R cancels out). <S> However, the loop gain (which is essential for stability properties) can be made as low as necessary by varying R: <S> Loop gain LG=-Hr*Aol <S> (Aol: Open-loop gain of the opamp)
The author is correct in saying that the bandwidth varies with R but the gain doesn't.
Why is slip necessary in an Induction motor? Why should the rotor of a 3-phase induction motor not rotate at synchronous speed? <Q> The magnetic field of the stator, rotating faster than the physical speed of the rotor passes through the rotor conductors. <S> That induces current in the rotor. <S> Current in the rotor generates a magnetic field in the rotor that rotates at the same speed as the stator magnetic field, but lagging in position. <S> That creates rotor torque. <S> With no load attached to the motor shaft, very little torque is required to keep the rotor moving, so the speed is nearly synchronous. <S> Any increase in load reduces the rotor speed and increases the rotor current and torque. <A> It certainly can rotate at synchronous speed, or even faster. <S> But electric power is communicated to the rotor by induction. <S> Effectively, the rotor is the secondary winding of a transformer, which is driven by a frequency equal to the slip speed. <S> So, at synchronous speed, that frequency is zero, and no power is communicated to the rotor. <S> So, to rotate at synch speed, you must be mechanically driving the rotor with enough power to overcome frictional losses - this happens in a Tesla car rolling downhill, for example. <S> Drive the rotor faster than synchronous speed, and it can return power to the electrical system. <S> Induction between rotor and stator now extracts electrical power from the rotor, acting as a brake on whatever is mechanically driving it via the shaft. <S> But then it isn't a motor, it's a generator. <A> If the rotor is spun at synchronous speed there would be zero induction and hence zero torque produced. <S> What you see is slip and that slip creates enough induction which leads to enough torque to overcome residual friction and losses when no proper mechanical load is connected. <S> Just in case you didn’t understand the zero induction idea; if the rotor windings are rotating at the same pace as the rotating magnetic field, the rotor perceives no net change to the magnetic field hence, due to Faraday’s law of induction, no induction takes place. <A> You need to take a close look at the rotor. <S> In particular, search it for any evidence of magnetism. <S> You won't find any . <S> To run synchronously, the rotor would need to have a definite north-south magnetism. <S> That magnet would need to be strong enough to keep the motor in sync despite the drag of the load. <S> That could be done with permanent magnets, or with a wound rotor powered via slip rings. <S> What you actually have is a "squirrel cage". <S> It could be a plain copper or aluminum pipe, but it works better if it's slotted down the pipe, looking like a ...squirrel cage. <S> Even better still if ferrous laminations are added to its center. <S> There are no electrical connections to the rotor . <S> The motor's stator creates a whirling magnetic field spinning at 3000/3600 RPM, or 1500/1800 <S> RPM. <S> The "swishing of this virtual magnet" across the squirrel cage induces currents into the cage. <S> That current creates a magnetic field, and the attraction/repulsion of that magnetic field sets the rotor into motion. <S> What the squirrel cage rotor can do, that the synchronous motor cannot, is recover when the load drags it off-frequency. <S> The more off-frequency it is, the more it inducts and the more power <S> it develops: Anyone who's worked at a wood shop knows the BEEE-OOOO-EEE sound of a table saw being loaded up during a cut. <S> In theory, it's weird. <S> But in practical use, it's darned elegant. <S> Thank you, Mr. Tesla!
At synchronous speed, the rotor would be turning at the same speed as the rotor magnetic field and no torque would be produced.
Why is ISS photo-voltaic current output shown as a negative value? Looking at raw telemetry data provided by NASA from the ISS (here's a nicely formatted version: https://isslive.com/displays/spartanDisplay1.html ), the current output of the photo-voltaic panels are shown as a negative value. Maybe there's a simple explanation for this, but I haven't found any information on it (one NASA "teaching guide" I found talked about calculating PV power output from this data and essentially ignored the negative sign). I can see why voltage might be negative, but not current--after all, the PVs are generating power, not consuming it. Any thoughts? <Q> If this Reddit thread is to be believed, the currents are representing the current draw of the ISS batteries. <S> Looking at the Spartan Console <S> handbook (the system from which you are looking at data on ISS Live) <S> , we can see that the data we are looking at is from each of the 8 battery controller channels: <S> In order for the ISS to continually maintain electrical power, the SPARTAN flight controller oversees a set of batteries for each of the eight independent power “channels” (one for each solar array). <S> Current measurements taken for a battery will have one sign represent charging, and another sign representing discharging. <S> As to which one is which, you would need more information. <S> Assuming the data for each is up to date, then at the moment of writing this answer: ISSLive shows a negative current ISSTracker shows that the ISS is currently on the night-side of the planet <S> As the ISS is on the night side of the planet, it's solar panels will be dark. <S> That means that it must currently be running on battery power, i.e. the batteries must be discharging. <S> Based on this a negative sign probably indicates discharging of the batteries. <A> It may be a convention where positive current means a load (ie. <S> consumer of electricity) and negative current means the opposite of a load, ie. source of electricity. <S> All needed to find out if the system is balanced, charging or discharging is to add the numbers. <A> Historically Energy consumed, dissipated or measured in a load <S> is + ve therefore to satisfy KCL and be <S> consistent source current must be - ve. <S> But typically we say a PS sources positive current or sinks positive current from the perspective of THE LOAD. <S> NASA clearly does it correctly using KCL at the node. <S> Although KCL may apply arbitrary assumptions for initial reference directions and still work, this is the convention of using Kirchhoff’s Laws.
Negative indicates that the solar panels are charging the batteries (driving current into the battery).
Using both clock edges in an FPGA design So, after getting some advice from some good people here, I managed to put together my first (very modest) FPGA design. It is basically just a few registers and counters, and only runs at a few MHz, but I could synthesise and implement it with no warnings, and the real signals coming out seem to do what simulation made me think they would. I learned a few things along the way. Now I want to learn how to set timing constraints and run timing analysis. So I am reading through the Xilinx doc UG612 and I see at the top of page 205: "Use only one edge of the clock" Hmm. Seems I broke the law. Part of my design is a parallel load shift register - I used the negedge of the last cycle of the clock to load it (from a counter which was clocked on the previous posedge). A quick sketch: Of course, I am not directly using the negedge here, but the load signal is derived from it. I thought that this was good - but Xilinx tells me - don't do that. Am I wrong? If so, why? What should I do instead? <Q> "Use only one edge of the clock" <S> I don't know why they would say that. <S> Thus a 200MHz clock will give you 5 ns from rising edge to rising edge but only 2.5 ns from rising edge to falling edge. <S> I made a small example using 16 bit values: always @(posedge clk) <S> result1 <S> <= counter <S> + hold;always <S> @(negedge clk) <S> result2 <S> <= counter + hold; <S> Below is a screenshot of the ISE timing analysis. <S> It is for a 5ns 50% duty cycle clock. <S> The text is about a failing path from bit 3 of counter to bit 15 of result2 . <S> As you can see it uses the rising edge as source and the falling edge for the destination. <A> The logic elements in the FPGA are usually designed with zero hold time , specifically to enable you to design with only one clock edge. <S> In your example, this means that both the CTR INC signal and the SR LOAD signal are seen as asserted on edge 0, and neither one is seen as asserted on edge 15. <S> The value that gets loaded into the shift register will be the one that is in the counter prior to edge 0. <S> The effect of incrementing the counter won't be seen in the shift register until the next time SR LOAD is asserted. <S> If you made the SR signal follow the same waveform as CTR INC, this would still be true, and the circuit behavior would be the same. <A> You are not wrong, you are just making your life more difficult than it needs to be... <S> especially where timing closure is concerned (developing accurate constraints is harder). <S> You can easily make this design operate on rising edge only. <S> Seems to me, if you want to load when counter = 0, you could have some combinatorial logic that: assign load = <S> (counter==15) (or similar). <S> This will shift your load signal back 1/2 clock cycle, and be seen on the rising edge of edge0 as asserted. <S> There are many ways to do this (using all rising edge clocked FFs) though, and probably a little googling will go a long way.
You can use both rising and falling clock edges in the design and the timing analyser will take that into account.
Why do we need orthogonality for FSK carriers? I keep on coming across a requirement for FSK carrier separation, \$1/T\$ for non-coherent detection and \$1/2T\$ for coherent detection, where \$T\$ is bit period. I understand where this comes from in the context of an optimal quadrature receiver, such as this: . Now from an electronics standpoint, say I design a filter-envelope detector receiver: In this scenario where we use bandpass filters why do we need the FSK carriers to be orthogonal? - Why do they need to have a frequency separation of 1/T? Also, if this scheme works then why is it not considered an optimal receiver system, in contrast to the quadrature receiver? <Q> FSK is frequency Shift Keying, a fancy way of saying the data is transmitted by frequency modulating a fixed carrier frequency. <S> But this is not the same as FM. <S> In FSK the shift is in discrete steps above and below the carrier frequency. <S> In the center point is the main carrier frequency, which is xtal/PLL controlled. <S> The data can increase or reduce this frequency (modulation) either in analog form (FM), of phase shifting or frequency shifting above and below the center line on a vector scope, which represents the main carrier. <S> Quoted From Wikipedia/Orthogonality: <S> Euclidean vector spaces. <S> In Euclidean space, two vectors are orthogonal if and only if their dot product is zero, i.e. they make an angle of 90° (π/2 radians), or one of the vectors is zero. <S> Hence orthogonality of vectors is an extension of the concept of perpendicular vectors to spaces of any dimension. <S> That is your orthogonal part . <S> If you shift 5% above the carrier to represent a logic'1', you must shift 5% below the carrier to represent a logic '0'. <S> These shifts must have a mirror image <S> 90 degrees out of phase to be valid data, separate from the carrier, which has a vector of zero. <S> This keeps the return to the carrier frequency 'in the center' much like FM and QAM do, so the carrier is easy to filter out and lock onto with a PLL. <S> FM is orthogonal in an analog sense, as it is an analog modulation of the carrier, but is not 90 degrees out of phase, merely symmetrical. <S> The sum of all modulation over a second or more is about zero. <S> In FSK and QAM, as they are digital data, tricks can be used the same as Ethernet and PCIe does by making sure no more than 3 bits in a row are all ones or all zeros. <S> This is done in hardware at the physical layer on both sides of the link. <S> It prevents the carrier frequency from being 'hidden' too long by repeating ones or zeros so the DSP chip can extract the data from the carrier. <S> The key to this working is in fact a nearly constant change from ones to zeros and zeros to ones, regardless of the original data stream at the HAL layer. <A> why do we need the FSK carriers to be orthogonal? <S> For data extraction. <S> There is a type of amplifier concept referred to as "lock-in amplifier" which is very good at extracting gain and phase information associated with a known frequency. <S> Why is this method prefered? <S> if you walk through the mathematics it shifts all information that is not at the carrier frequency "out of scope" by out of scope <S> I mean away from the mean. <S> This includes lower frequency content as well as higher frequency content. <S> This makes it ideal for noisy environments <S> The principle can be seen in the mathematics below: \$V_{sig} = <S> Asin(\omega t <S> +\phi)\$ \$V_{osc0} = <S> Xsin(\omega t)\$ \$V_{osc90} = <S> Xcos(\omega t)\$ <S> \$V_0 = <S> Xsin(\omega <S> t)Asin(\omega t +\phi) <S> = \frac{XA}{2}(cos(\phi) <S> - cos(2\omega t + \phi))\$\$V_{90} = <S> Xcos(\omega <S> t)Asin(\omega t +\phi) = <S> \frac{XA}{2}(sin(\phi <S> ) + sin(2\omega t + \phi))\$ Filter <S> these signals to remove the twice carrier component \$V_{0f} = \frac{XA}{2}(cos(\phi) ) <S> \$ <S> \$V_{90f} = \frac{XA}{2}(sin(\phi) ) <S> \$ via trig: \$\phi <S> = atan <S> ( \frac{V_{90f}}{V_{0f}} )\$\$A = <S> \frac{2}{X}\sqrt{V_{0f}^2 + V_{90f}^2 } <S> \$ <A> Orthogonal signals are, ideally, producing ZERO correlation in the detectors not expected to match what is being transmitted. <S> That correlation occurs over an entire bit time. <S> For some ideas, read about the modulation in GSM cellphones, or in MSFSK --- minimum (frequency) shift FSK.
The DSP engine counts on a balanced 'orthogonal' approach to lock onto the carrier frequency.
Three diodes in series rectifier So, I want to make AC 220V to DC 220v rectifier. Can I use two or three diodes in series, because the reverse voltage maximum of one diode is about 60 volts? <Q> 220 V AV does not give you 220 V DC after rectification. <S> The Peak voltage of 220 Vrms AC is 1.414 <S> * 220 V = 311 V DC <S> Your diodes and smoothing capacitors should be able to handle that 311 V DC. <S> Also the mains is only typically 220 V AC, at times 240 V AC or more is possible. <S> In practice you would use 400 V DC (or higher) rated components for a mains bridge rectifier and smoothing capacitors. <S> As mentioned in hatsunearu's answer using multiple diodes in series to get to the required reverse voltage rating is a bad idea . <S> There will always be one diode in the series chain that is the weakest and at some point it will break through and that will also kill the other diodes. <S> It is just not good practice. <S> Diodes with a high enough reverse voltage rating are available so use those. <A> The voltage across each diode when reverse biased in a situation like that is undefined (if they are perfectly identical, it's fine, but they probably aren't). <S> Play it safe and get a regular diode like a 1N4005. <S> Slightly related: the only time you might use redundant diodes in series is when you are building an extremely reliable product (eg. <S> AED) where a diode failing short can cause a loss of human life. <A> Usually we like to have 600VDC or 400VDC as an absolute minimum rating for 220VAC mains (311V peak), considering the mains will typically have transients on it. <S> If you put 10 60V diodes in series, each with 0.8V drop at 20A you will have losses of 320W for a full bridge (40 diodes) vs. perhaps 40W for four rectifiers with 1V forward drop.
It's possible, particularly for non-Schottky types, but your losses will be multiplied by the number of diodes.
Multiplexing PT100 with CD4051 I am interested in developing a generic 8-channel 4-wire PT100 interface for RaspberryPi. Needed accuracy must be better than 1degC and range from 0-200 degC. Additionally i need lead wire compensation. Here is the plan:1) Use constant current source using TL431 and a 2N2222 transistor. I am guessing this should work: 2) Then route this 1mA current through a CD4051 multiplexer to the power wire of each of 8 PT100s. Additionally, get the return signals through another two CD4051 multiplexers into an ADC as follows: : 3) Finally use ADS1115 ADC to A) find potential drop across the lead wires 1-2 of the 4-wire pt100. Then B) measure voltage drop across PT100. Now my problems are:1) I can at best procure 1% resistors for the constant current source. So the current may not be that constant. I will hand pick the resistors but what about temperature compensation? In general how much current variation can i expect? 2) Is the scheme of interfacing 8 PT100s OK or can there be better ways to do the same? As i have read in distributed posts here as well as in some papers(eg. here or here ), this is a common method. But i could never find how they practically implemented this or if its performance suffered and so on. 3) How can i measure leads wire resistance without getting the Rds(on) of CD4051 in the effect? This is so because 1mA is passing through the 1st MUX. Kindly let me know if there are any mistakes or improvements in the above scheme. I am a novice (mechanical eng.) but i am OK to learn, so kindly pardon me if i am off somewhere. Thanks! ------------------------------ EDIT --------------------------------------- I am only now interested in 3-wire PT100 sensors as these are what available locally at affordable prices. All the rest of the requirements remain the same. So the problem is clearer now: How do i measure the sensor lead resistance while avoiding the Rds(on) of CD/HC4051*? A possible solution: In this figure, the first wire of pt100 is supplied by 1mA current through a HC4051(see footnote). Since i need to make a differential measurement between the first two leads of the pt100 while avoiding rds(on) of HC4051, i attached A0 of the ADC directly to the first wire through a schottky diode. The diode prevents the activation of other PT100 channels not activated by HC4051. The 0.3v drop due to this diode can be incorporated into calculations to get lead resistance. Am i wrong or OK in this regard? Is leakage current going to be a problem? I have also included a resistance (2.5k) between the third wire set of PT100 and ground. This i presume will help make a better differential measurement at the ADC (A2 and A3) while avoiding any current passage through HC4051. Does this make sense? Thanks a lot for responding so far. *(I accept the suggestions given that CD4051 is not the best for this case. I will take @Sephro's suggestion of HC4051.) <Q> The Texas Instruments datasheet of the CD4051 isn't very clear about the maximum current. <S> My conclusion about violating the "Maximum Input Current of 1 µA" was wrong, that's the maximum leakage current. <S> The HEF4051 is a similar chip from Nexperia (former NXP/Philips) <S> there the datasheet is more clear: the maximum current is 10 mA so that 1 mA is OK. <S> However the high on resistance will still prevent you from reaching the required accuracy. <S> The on resistance will vary over almost anything like supply voltage and temperature. <S> What is possible is to use a current source for each sensor and then only multiplexing the resulting voltage to the ADC input. <A> Yes, you can do that (perhaps not with the CD4051 and perhaps not with that particular 1mA current source, because of voltage compliance), however the only point of ADC input A0 is to check that the current source is not outside compliance voltage. <S> Rds(on) is huge (as much as 1300 ohms), and varies with supply voltage, input voltage and temperature. <S> An HC4051 would be better at 5V. <S> You can measure the 'bottom' lead resistance by measuring relative to ground. <S> Of course, there is no way to measure the resistance of the other two leads because no significant current passes through them. <S> Realistic problems are going to crop up when you attempt to protect the inputs against the things that can happen off board. <S> You may be better off expending the scratch for genuine analog switches that have a degree of built in protection and adding some external protection around that. <S> It would also be nicer to use +/-10V to +/-15V supplies, if they are available. <A> I worked on @Bimpelrekkie 's as well as @Spehro Pefhany's answers. <S> Since it expands i cant post it as a comment. <S> Neither can i post as an edit, i guess because it is an answer of sort, a comprehensive one. <S> For current source, i have added 8 of these, each giving 1mA as per @Bimpelrekkie. <S> But they are now activated through a HC4051 IC as below. <S> Will it work? <S> The remaining circuit consists of routing each of this 1mA to each pt100. <S> The entries of this 1mA currents are sensed through another mux and the ADC pin A0 as per @Spehro Pefhany. <S> Since no current is flowing, the resistance of mux is not an issue here. <S> Using mux on middle wire of PT100 and differential measurement of A0 and A1 gives lead wire resistance. <S> Differential measurement between A2 (PT100 middle wire) and A3 (PT100 sink wire) gives me PT100 resistance. <S> The sink of all currents is through a resistor, which i suppose will help in making a noise free measurement. <S> Please correct me if i'm wrong in this. <S> This circuit lacks protections and needs to be completed as many pins are yet open, but at the least the basic scheme must be verified. <S> If any errors or possible limitations please do let me know. <S> I already thank @Bimpelrekkie and @Spehro Pefhany for helping in such short period.
If you really want to measure 'top' lead resistance for some reason other than break protection (for which A0 suffices) you can add another analog multiplexer and pick off the voltage at the 'top' of the RTD.
Should I use all the pins from 1 Port or few from each available (STM32)? I am using a MCU from the ST, specifically from the STM32L1xx series. I want to connect 2 sensors, both of which will use the I2C protocol, 1 MicroSD card with SPI and 4 Interrupts. Is it a good practice to use as many pins from one port (for example from PORTA) as possible or to use every available port? Some pins connected to PORTA, some to PORTB etc. Thank you for your time <Q> The pins that can be used by the SPI, I2C and interrupt hardware might constrain your selection of pins. <S> The layout of your board might also influence the pin selection. <S> For (relatively) high output currents (generaly not a good idea <S> IMO) <S> some chips have a per-port limit, which would favour choosing pins for higher current outpust from different ports. <S> (copied from Jeroen3's answer) <S> When you must quickly copy a multi-bit value to a number of pins, it will be much easier when those pins are on one port (and even easier when they are conseqeutive and start from bit 0). <S> Other than those aspects, I don't see how it makes any significant difference which pin you choose, from the same or different ports. <A> If you goal is to save the 5 uA/MHz by not enabling a GPIO bank, than yes. <S> Otherwise, just let the peripheral usage board design dictate which IO to use. <A> You probably design a low power device (Lxx series) and every enabled peripheral (like another GPIO port) consume some current just to drive the internal electronics. <S> And that is the main reason why very low power devices designers should try to do not enable anything which is not 100% necessary. <A> From a technical perspective there's no need to use all pins from one port or distribute between all ports. <S> One reason could be if you have a lot of current driving pins, but in most cases the board layout defines where your periphery is connected and therefore defines the ports. <S> In other cases you want to compute parallel data (e.g some buttons) <S> and then it's easier to have them on one port as this simplifies the code. <S> And of course, if you use special functions of certain pins, they're also defined. <A> Once you have assigned all hardware IPs to ports that fit your needs, you are left with a bunch of I/Os for other GPIO-related stuff. <S> Most important of them is IRQ lines. <S> STM32L1 has an external interrupt controller (EXTI) that forces you to only have one pin numbered N among all ports as interrupt. <S> (I.e. you cannot use B0, C0, ... as IRQ if A0 is IRQ, etc.). <S> When you merge this constraint with you PCB routing constraint, using as little ports as possible is a plus, but may not be possible.
When you are very current-starved it might be good to disable unused ports, which can favours using pins in already used ports.
Phono preamp, one channel doesn't work I have built a stereo preamp using this circuit (taken from here Hi-Fi Phono Preamp Rod Elliott - ESP ), but for some reason I can't get the right channel to work at all while the left one plays. Now I realize the circuit here is shown for one channel only, but my op amps are duals so I've connected everything the same way for the right channel. Yet it's too weak, it's almost mute. Almost all of the components I've put are exactly the same as in the circuit. The only difference is 2.7k resistor, in my PCB one channel has a 1/2 watt resistor and another is 1/4 watt. Also 22uf caps, in one channel they are 50v, in another 100v. But why would that affect anything? I've even tried different op-amps and film capacitors, but it makes no difference at all. I've checked all the connections several times. I've checked every component for resistance and capacitance as well. Obviously I've connected grounding to the vinyl player. I've tried different PSUs even, one with +8v and -8v, another with +12v and -12v. None of this helps. Another strange thing is, the moment I disconnect one of the channels from the preamp, a horrible interference appears in the other channel. What have I done wrong? <Q> Another strange thing is, the moment I disconnect one of the channels from the preamp, a horrible interference appears in the other channel. <S> What have I done wrong? <S> It would seem that you're getting oscillation via feedback through the power supply. <A> It could be that the ground is broken in one input lead - not the one that you remove, the other. <S> If everything else is floating the circuit might hum when you pull it. <S> If you have a tone generator apply a low level sine to each side in turn, compare the two sides with a scope. <S> Pay attention to DC biasses. <A> The 22uF capacitors are for the ground connection, and if they aren't biased with a significant voltage, they can decay (and will go bad on the shelf, too). <S> If one of those capacitors has gone open-circuit, therewill be no significant gain. <S> Without the capacitor, bothgain stages are voltage followers (zero dB voltage gain). <S> Find some fresh, lower-voltage units (nonpolar if possible) and replace 'em, and/or swap in some capacitors that have been given a DC bias (like, with a 9V battery)overnight. <S> Jumpering from 'in' to (-15V) and leavingthe unit powered for a few hours will have a similar effect.
You need some decoupling capacitors on the power supply pins of each opamp.
Why is the load output voltage from my relay so low? I’m trying to build a simple circuit with a relay controlled by an Arduino that will turn on/off a little LED light string I have that was previously powered by two AA batteries (that would be 3V, according to the diagram on the battery case). I have the circuit wired and the Arduino programmed so that it triggers the relay on every .5 seconds and off every .5 seconds. I would expect the lights to blink with this configuration, but they do nothing. I have tested quite a few different configurations, I have tested the lights (they work perfectly fine with power directly from my breadboard power supply), and I have tested other known-working devices on the circuit and I have not been able to get anything to work on it. The relay does function as expected — the LED on the PCB blinks on when it is triggered and it does make the clicking noise from the circuit closing — so I figured that it had to be an issue with the load power. As I mentioned, I’ve got a breadboard power supply attached that should be providing enough power to the circuit to light the lights, and I have tested the lights directly on the power supply and they work. This lead me to think that there must be something wrong with the relay. I tested the output voltage from the relay with a multimeter and I had to turn it all the way to the most sensitive setting to get any sort of reading at all, which turns out to be something in the range of .3 millivolts. Obviously much lower than the expected 5V that should be coming out of there. I checked the resistance through there and it was within expected values. So my question is, what’s happening here? Why am I not getting power from the relay? <Q> You should connect the positive supply to the "COM" terminal of the terminal block, and your LEDs to either the "NC" or "NO" terminal. <A> You did not say anything about the relay type you are using. <S> That would be great to know. <S> Usually, a Relais needs about 40mA of current to turn fully on. <S> What makes you think that the digital output of the Arduino can deliver this ( <S> rather high) current? <S> Eventually you need a relay driver circuit between your Arduino and the relay. <S> (A simple transistor will do the trick). <A> Well folks, I figured it out. <S> I definitely had it wired up completely wrong. <S> Unfortunately, during the trial and error process that eventually led to my understanding, I think I have damaged my relay module, my Arduino, or both. <S> As it is now, I can no longer trigger the relay at all, and certain configurations still get the LED to come on, but no click, regardless of how much voltage I try to put into it. <S> It’s pretty much borked now, I’d say. <S> But a learning experience! <S> I now know how to wire a relay properly! <S> Now I just need to order another module (I have a backup Arduino, so that’s good...) <S> so I can actually finish this project. <S> I promised some pictures, and while nothing is actually wired right now, at least this will give some idea of what I was working with.
On the relay boards I've seen, the relay contacts connect only to the terminal block on the board - there is no power on the contacts unless you provide it through one of the terminals.
why capacitors are used with crystal oscillator? I want to learn 8051 programming so I begin from hardware in which crystal oscillator is connected with capacitors. can anyone please explain why capacitors are used and why those 22pF? how they calculated? <Q> can anyone please explain why capacitors are used <S> Firstly, a typical circuit is shown below and on that circuit is marked phase angles to roughly achieve oscillaton: - The inverter provides 180° R1 and C1 provide about 10° <S> The crystal and C2 provide a further 170° <S> If you didn't have capacitors you wouldn't get a total of 360 degrees phase shift and that means it wouldn't oscillate. <S> If you use a simulation tool and model the crystal you will see something like this (below). <S> This is the combined added phase shift brought about by changing C1 and C2's values: - The blue horizontal line marks the "added" phase shift of exactly 180° - this would be the point of oscillation. <S> Anything below 10 pF probably wouldn't oscillate so <S> , you need the capacitors to make the overall phase shift around the loop add up to 360°. <S> and why those 22pF? <S> Well there are oscillators that will need more and some that will need less. <S> The XTAL data sheet normally indicates what value is required. <S> how they calculated? <S> You need to observe the recommendations in the data sheet and also consider the added effect of gate input capacitance. <S> Related answer and also Designing an oscillator . <A> Simple answer : For the circuit to oscillate we must establish positive feedback (360 deg phase shift within the complete loop, including the 180deg phase shift of the inverter). <S> That means: We need a feedback network which provides another 180 deg phase shift at the desired oscillation frequency. <S> Fo this purpose we can use a passive third-order lowpass or a passive third order high-pass. <S> A third-order network is necessary because a second-order filter provides 180 deg at infinite frequencies only. <S> In the shown circuit we have third-order ladder-network <S> (R1-C1-L2-C2) <S> working as a lowpass . <S> Please note that in those cases the crystal works as a high-quality inductance L2 <S> and NOT as a series or parallel resonant circuit. <S> The desired frequency (where the crystal acts as a inductance) is between these two resonant points. <A> Andy has provided a fine answer. <S> Here's another perspective that looks at power dissipated by the crystal... <S> From Andy's plots, the oscillator isn't likely to oscillate if the two added capacitors (C1 & C2) have small values. <S> In a simulation, a 74HCU04 10 MHz. <S> crystal oscillator would not start when C1 & C2 were much less than 5 pf. <S> In this circuit, no series resistor was added to the HCU04 output pin, as in Andy's example circuit:(R1). <S> For C1, C2 = 5pf, oscillations were feeble, and the circuit would be unreliable. <S> AC power dissipated in the crystal's R1 (20 ohms) <S> was 1.25 uW, well within the typical crystal power spec around 100uW. <S> Crystal frequency would be somewhat higher than 10.0 MHz, since C1 & C2 are below the crystal manufacturers' spec of 18 pf. <S> For larger values of C1 & C2, oscillations start more readily, and build more robustly, to finally settle with larger crystal current (and larger power): <S> C1 & C2 = <S> 5.0pf <S> ....power 1.25 uW C1 & C2 = 8.0pf....power 6.5 uW C1 & C2 = <S> 20 pf.... <S> power 77 <S> uW C1 & C2 = <S> 47 pf.... <S> power 314 uW <S> This last case (C1 & C2 = 47pf) exceeds the recommended manufacturer's power dissipation for the crystal. <S> Oscillator frequency for this case would be on the low-side of 10 MHz. <S> Capacitors C1 & C2 are usually chosen so that oscillator frequency is very close to the crystal manufacturer's target frequency, since frequency is often of prime importance to the circuits that this oscillator drives. <S> Too little capacitance raises oscillator frequency, and risks a feeble oscillator that refuses to oscillate. <S> Too much capacitance runs at a lower oscillator frequency, and risks damaging the crystal with too much power. <S> Such a robust oscillator can also potentially run at spurious crystal resonances other than the fundamental frequency. <S> In this simple simulation, only the fundamental crystal resonance is included.
The bottom line is that an oscillator will only oscillate if the phase shift is 360° (or 0°) and there is enough gain (greater than 1) around the loop.
How does factory reset work? All embedded devices includes a "Factory reset" option that allows the user to reset his device if something is wrong. I am developing a Firmware on an STM32 board. The firmware includes a boot loader that allows to upgrade the application via UART (By sending a binary file that contains the new image) and I want to add another feature: A factory reset. When the user choose this option, the board shall load the original image. What is a Factory reset? Is it about loading the whole binary file into memory again or it's just calling a function that reinitialize variables modified by the end user? What are the best practices to do so? Where to store the original FW? is it in an internal or external flash? <Q> It is not true that all embedded devices have this capability. <S> Some do but not all. <S> If you want your device to support a return to factory default firmware itself then your design has to incorporate a memory into the circuit to store that image. <S> A common component for this is a SPI flash chip. <S> Then your boot loader also needs to be changed to support a mode of getting a firmware image from the SPI flash chip instead of getting the image in through the serial port. <S> If your device does not support user replaceable firmware then it is usually not necessary to provide a means to restore to factory default firmware. <A> If you take the most common example of factory defaults, it's your PC's UEFI (BIOS). <S> It is made with a flash chip and a volatile battery backup SRAM memory chip. <S> The flash chip contains the program, and the SRAM contains the settings. <S> On factory reset , the contents of the volatile sram are erased. <S> On the next boot, it detects that the checksum of the settings is invalid and restores the defaults contained in the program. <S> This is not limited to battery backup SRAM, the same can be done with FLASH or EEPROM. <S> But battery backup SRAM can be erased without powering up the machine. <S> Another term is factory recovery , this simply means that it contains the main program twice. <S> But only one copy can by upgraded by the user. <S> Dual-BIOS is an example of this. <S> On higher level systems, like phones and computers, it means that it uses the installation files to restore the operating system to factory conditions. <A> Factory reset is whatever you want it to be. <S> It depends on the application and device type. <S> I usually do two things: <S> Ensure that there is always a reliable way to enter the bootloader , so that even a partial/wrong firmware update can't brick the device. <S> Have a way to reset the firmware settings in case the user changes something, a particular setting combination will crash the application etc. <S> Both can be done with buttons (long presses, short presses), DIP switches or other communication means (eg. <S> UART, USB). <S> For example if you use one GPIO for a single button you could use it the following way: Power-on + button pressed = invoke bootloader Power-on, button not pressed = <S> wait 3s, blink a led, if a button is pressed (within the window) and held for 5s then reset firmware settings <A> As you said the factory reset reloads the initial factory image to the device. <S> This can be necessary in case of a misconfiguration where the user just didn't know what he does or just wants to go back to the initial configuration. <S> In cases like yours were a software update is performed <S> you may wanna cover certain failure scenarios during the update. <S> In this case you may even have a dedicated flash memory with the original factory image stored that can be selected using a jumper to restore factory default configuration. <S> This is e.g. done on computer mainboards were you can restore original BIOS configuration in case an update would fail and corrupt the main image.
Generally speaking the factory reset function you mention will restore any saved variable data information back to default values.
Amplifying pulse signal (0.1 .. 0.5V) to Arduino digital input How this can be so difficult (to me :-). The incoming sensor signal rests close to 0 Volts and gives ~ 0.5V pulses, which needs to be read by Arduino digital input (interrupts). So far, what I have tried: 0.5Volts is just under optocoupler to function, that would have been easy. Reading directly this small signal to Analog input. OK, but timing is not enough accurate. So, definitely want to use Arduino digital interrupt. When sensor sends 0.5V pulse -> 5V to arduino digital input HIGH state. If sensor signal goes under 0.2V -> Arduino digital input to LOW state. OK, OP amps perhaps, but how? Have tried to simulate, without getting right things around suitable op amp. I have single DC supply +5Volt to drive things. I would like to keep component amount small, tiny package. <Q> Most ATMega ICs have a built an analogue comparator (AC) module already, so there is little need to use external circuitry unless you want control over the hysteresis. <S> For an Arduino Uno, the AC pins are PD6 and PD7 (digital pin 6 and digital pin 7 in "Arduino" speak). <S> To PD6 (AIN0) you would connect a DC reference voltage of where you want your threshold to be (in your case ~0.3V), and to PD7 (AIN1) you connect your input pulse signal. <S> If you want to be able to measure more than one signal (albeit one at a time), you can use any of the analogue input pins (A0 through A5) instead of PD7. <S> The ADC multiplexer output inside the MCU can be routed through to the analogue comparator. <S> However, be aware that the ADC cannot be used simultaneously with the analogue comparator if using the multiplexer as the input source. <S> For the ATMega32U4 on a Pololu Micro as per your comment, things are a tiny bit different. <S> These do still have an analogue comparator, however they don't have an AIN1 pin. <S> Instead you must use the ADC Mux as the source for your signal, so that means you can feed the pulse signal into any of the A0 through A5 pins on the micro board. <S> For the DC reference, AIN0, that is on PE6 which corresponds to digital pin 7. <S> For your reference DC signal, you can simply use a pair of resistors as a voltage divider, and possibly also a small (~100nF) decoupling capacitor to smooth out noise. <S> If you are interested in timing your signal, the ACO bit can also be internally routed directly to the input capture register of Timer 1, so you can timestamp transitions of the signal. <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> This analog comparator with a 0.25 V reference will give an output high when the input exceeds the reference. <S> Things to watch <S> : You want a comparator that will operate on a 5 V supply. <S> Make sure the inputs work down very close <S> to 0 V. <S> Many have open-collector outputs and require a pull-up. <S> You may be able to use the micro's internal pull-up instead of R3. <S> I haven't shown a decoupling capacitor on the 5 V supply. <S> You need one. <A> Here is a simple circuit that can achieve what you want with just a few cheap components. <S> The input from your sensor will connect to the emitter terminal of the NPN transistor. <S> The output at the collector will connect to the digital input of the MCU board. <S> The 5V to power the circuit can also come from the MCU board. <A> Almost there... but not. <S> I found this library, so I dont have to start bit masking those registers (lazy, yes indeed) <S> #include "analogComp.h"// Pololu ASTAR a32u4void setup() { // put your setup code here, to run once: analogComparator.setOn(AIN0, A1); // <S> AIN0 is on D7. <S> As a reference voltage analogComparator.enableInterrupt(speedSensorInterrupt); Serial.begin(9600);}void loop() { delay (1000); Serial.println(". <S> ");}void <S> speedSensorInterrupt <S> (){ Serial.println("Comparator Interrupt between A1<->D7!");} So, D7 is right (AIN0), at least it makes effect. <S> Due that interrupt is raised when going over ~0.8V on that input. <S> However A1 (signal input) voltage level, does not make any effect when interrupt is raised. <S> Hmm, what could be the issue?
To read whether the signal is high or low, you can then either check the ACO bit of the ACSR register, or you can set up an interrupt service routine for the ANALOG_COMP_vect interrupt vector.
Where can I find Micro-USB B feedthrough adapters? Perhaps I am missing something, but I am finding it virtually impossible to find Micro-USB type B receptacle to Micro-USB type B receptacle feedthrough adapters. As I understand it, this is effectively the same as Micro USB type AB. The application is plastic enclosure, which needs USB to power a Raspberry Pi. This is the only product I have found so far that meets these specifications. Perhaps this confusion is a result of my misunderstanding the USB standard. In any case, I appreciate the help. <Q> These are non standard cables, as usb normally does not allow female connector on cable. <S> You can find plenty of then as micro usb extension cables or "panel mount" extensions. <A> Ah, but what would you be connecting to it on the inside? <S> As I understand, Raspberry Pi is powered via micro-B USB port, i.e. it acts as a "device" where USB is concerned. <S> As such, you will be plugging USB-B cable into it, which has USB-A on the other side. <S> So, what you are looking for is USB-B to USB-A feed-through, which conforms to USB specification. <S> Something like this . <S> I am sure there should be micro-B versions too. <S> What you are missing is that per USB standard the cable is always directional: host side is A, device side is B. <S> The logic is simple: Your enclosure is a device when viewed from outside. <S> So it has B receptacle. <S> But the Pi inside the box is a device too, where box is concerned, so the Pi has B and box has an A for it. <S> Any adapters that conform to specification, including feed-trough, must not change the general agreement. <S> BTW, this is exactly the reason Pi has separate B for power even though it also has several A ports. <S> Pi acts as "host" when you connect something like keyboard to it. <S> Although I think it uses OTG chip connected to those, which is wrong, but that is another question altogether. <A> Your issue has nothing to do with USB standard. <S> RPi uses one of its micro-B receptacles just as a power jack. <S> If you want your enclosure to have the u-B port extended using a feed-through connector, it won't really work, because you won't find any u-B to u-B cables.
All you need is a power jack of any type on your enclosure, not necessarily of USB type.
For an ideal Capacitor, when is the current leading and when is the voltage leading by 90? Say I have a purely restive load as a reference in parrallel with an ideal capacitive load. I know that the current through the capacitor is said to be leading by 90 degrees. Specifically though, what is it leading? With the two loads (resisitve and capacitive) in parrallel with the power source, can we say that the voltage will be the same both in magnitude AND phase across both components? AKA Vsource = Vresistor = Vcapacitor. I want to say: when in parrallel, the currents of the two components different and the voltage is the same. Likewise, in series, the voltages will be different and the currents will be different. Is this correct? Thanks! <Q> The current through a capacitor always leads the voltage across the capacitor by 90 degrees. <S> The current through a resistor is always in phase with the voltage across the resistor . <S> The current through elements in series must be the same. <S> These are the rules...apply as necessary. <A> $$ \text {C <S> I <S> V <S> I L} <S> $$ <S> In a C apacitor <S> the current ( I ) leads the V oltage which leads the current ( I ) in an inductor ( L ). <S> With the two loads (resisitve and capacitive) in parrallel with the power source, can we say that the voltage will be the same both in magnitude AND phase across both components? <S> AKA Vsource = <S> Vresistor = Vcapacitor. <S> Yes. <S> Both share common nodes <S> so this must be true. <S> I want to say: when in parallel, the currents of the two components different and the voltage is the same. <S> Correct. <S> Parallel components always have the same voltage. <S> Likewise, in series, the voltages will be different and the currents will be different. <S> Correct. <S> Series components always have the same current. <A> You are correct, when the two are in parallel, the voltage across them is the same (like any components in parallel). <S> The current thru the capacitor in that case will be 90 degrees out of phase with the voltage they share. <S> Hope this helps.
The voltage across elements in parallel must be the same. In series, the current thru each component will be the same and the voltage across the capacitor will be 90 degrees out of phase with that current.
Mounting a sensor against the inside of an enclosure I have a plastic ABS project enclosure which I'm trying to figure out how to mount a sensor to the inside of, against a window that will be placed into the enclosure wall so that it looks through the window and is as close to and stable against the window as possible. I'd like to avoid gluing the sensor -- if that's even possible -- for maintenance reasons. The sensor is a LWIR sensor in a TO-39 can. I'm trying to avoid soldering wires to its leads so I plan to use a socket with wires soldered to the socket's leads. The link is a TO-100 socket, but with the appropriate diameter and spacing (though an extra 4 sockets). My plan is that I'll have the TO-39 can on top of the pictured socket. How do I "attach" those up against the inside of the window in the plastic enclosure? The enclosure will be outside and waterproof, so I'm trying to avoid putting holes in it which I'd need to seal. Also, the window will be quite small. Thus I prefer to glue something to the inside of the enclosure which surrounds the window. I'm thinking of something like a z bracket: But that doesn't seem ideal because: the bracket needs to hold the socket somehow. bracket needs to be attachable (gluable?) to the enclosure wall be somewhat adjustable because it's unlikely that I'll find a bracket the precise number of millimeters to keep the sensor against the window. Ideally serviceable in a way that the sensor can be removed Maybe some sort of bracket glued to the inside of the enclosure but with a rubberband which pulls the sensor toward the window. If I could use 2 or 3 rubberbands then they'd fit through the socket's leads and keep the socket stable? <Q> solder the socket into a printed circuit board and bolt the board to the case using countersunk machine screws and spacers and nuts. <A> The best glass bonding compound I have worked with is silicone RTV, but the ammonia vapors can corrode metals, so I used RTV 120 series which has almost no ammonia in it. <S> Glass expands and shrinks with temperature so most epoxies and cements will let go on the first freeze/thaw cycle. <S> We used white but like most RTV compounds you have a choice of colors. <S> The non-ammonia type has 50% of the holding power of regular RTV, and the manufacture recommends 24 hour cure time, 48 hours till full hard cure. <S> Even at 50% strength, it is tough to pull off of glass or shiny stainless steel. <S> RTV 122 <S> White RTV 123 Black RTV 128 <S> Translucent <S> Key Performance Properties: <S> • Primer less adhesion to many metals and plastics <S> *. <S> • <S> Non-corrosive to aluminium and steel per MIL- <S> A-46146A+. <S> • <S> Lower odour cure than conventional acetoxy silicone sealants. <S> • UL Recognition. <S> Recognized by Underwriters’ Laboratories, Inc. under their Component Recognition Program (UL File <S> No. E-36952). <S> Refer to GE Silicones Tech Info Sheet CDS4320 for additional information. <S> • <S> One component. <S> • Cures at room temperature. <S> • Excellent electrical insulation properties. <S> • <S> Retains elastomeric properties at temperatures of -60C(-75F) <S> to 204C (400F) for long periods and to 260C (500F) for short periods. <S> • <S> Excellent weatherability, ozone, and chemical resistance. <S> This is the link to the pdf. <A> If you machine the window out of transparent plastic, you can make it extra thick and provide mounting bosses for a transition PCB between the sensor socket and conductors to your main PCB. <S> If you consider the PCB-sensor a replaceable "module" you could avoid the TO-39 socket entirely, which would be nice. <S> Then the problem reduces to attaching and sealing the window to the box. <S> If the inside of your enclosure is smooth enough you could machine a groove into the facing part of the window and use an O-ring, with similar grooves/O-rings for mounting screws etc. <S> It appears that HDPE and polyolefin plastics are suitable for some IR applications. <A> maybe something like this drill hole in bracket to fit the sensor <S> a nylon quicktie could be used instead of a retaining clip
If you are unable to make a window of a suitable material, then consider just mounting the sensor to a machined block which is then mounted to the enclosure and PCB as suggested.
What is this symbol on this schematic? (two boxes on wire) Apologies if this is a stupid question - I'm very new to electronics and feeling slightly out of my depth... I've puzzled out most of the rest of this schematic, but can't find the circled symbol's meaning anywhere Thanks! <Q> What is this symbol on this schematic? <S> (two boxes on wire) <S> This is often used as a reversible way to break and join nodes on simple PCBs, which is cheaper than adding a 2-pin header and jumper. <S> On that schematic, this "solder pad jumper" is used to connect, or disconnect, the USB voltage source (left-hand side of the schematic) from powering the main MCU via the LP38691 regulator. <S> If you supply a voltage from VIN on the right-hand side of the schematic, you would split (break) that pair of pads, to avoid back-feeding the USB power source, from whatever is providing your VIN , while still allowing you to have a USB data connection. <S> Look at a photo of the actual PCB which corresponds to that schematic (or read the description of the schematic in its documentation) <S> and you should either see (or read instructions about how to use) that solder pad jumper. <S> Update: <S> Now that I found the subtle URL in the schematic from the question , I see that schematic is for the Teensy 3.2 (scroll down the linked page, as all schematics are on one page). <S> Also scrolling down the Teensy pinout page , the reverse of the Teensy 3.2 PCB shows this photo, including the solder pad jumper from the schematic, and instructions of when to cut it (as you found later) in the top-right: <S> As you can see, the PCB designer chose to use rectangular solder pads for that solder jumper, and this choice has been duplicated in its symbol on the schematic. <S> Other designers use semi-circular pads for this type of jumper on the schematic and/or on the PCB itself. <A> I would say this is a representation for a solder jumper . <S> Two exposed pads that are placed close together on a board, that allow for manual "hardware configuration". <S> You can check if this is correct if you have the board at hand. <S> Related question, with a schematic symbol on answer (not an exact match, but the same idea could be implied): How to do Jumperless Jumpers? <A> It is most likely a "solder short" — a pair of pads that are connected by a narrow trace that can be cut. <S> But they are close enough together that they can be reconnected by a blob of solder. <S> They could also be ferrite beads, used to help with power supply decoupling, but other ferrites are shown as ordinary inductors, so this is probably wrong.
It is a pair of solder pads, which are joined by default - hence the "wire" (PCB track) between the "boxes" (solder pads).
Why does voltage always lead current by 90 degrees in an inductor? I have learnt that in an inductor voltage leads current by 90 degrees. However, I do not fully understand why it is 90 degrees. I have been looking everywhere for more information on why this is so. However, all the sources I found just state the rule. <Q> It's really that the current is the time-integral of the voltage, or the voltage is the derivative of the current. <S> If the current is a sine, then the voltage is a cosine, since that's the derivative of a sine. <S> The way derivatives and integrals of sinusoids work, each is ¼ cycle, or 90°, phase shifted from the next. <A> The bottom line is the basic equation for an inductor and that equation applies in any electrical situation: - $$V = <S> L\dfrac{di}{dt}$$ <S> So if the current is a sine wave, the differential of sine is cosine: <S> - Hence voltage leads current by 90 degrees. <S> But remember this only applies to AC signal analysis. <S> For instance if you applied a step voltage across an inductor the current rises linearly with time because: - $$\dfrac{di}{dt} = <S> \dfrac{V}{L}$$ <S> The basic equation describes both AC and transient events. <A> Also, an ideal inductor with jwL has a positive imaginary part with no further real resistance. <S> So the angle will turn 90°. <A> The 90 degrees phase shift (for sine waves) is only valid for an ideal lossless coil. <S> In practice there is always resistance in play: series resistance of the wire and skin effect, and parallel resistance due to core losses and eddy currents in the wire and other nearby conductors. <S> The phase shift will be less than 90 degrees. <S> In the extreme case, the core losses of special ferrite beads are so high that they behave as resistors for high frequencies. <S> There is also parallel capacitance, so if you increase the frequency then the combination goes through parallel-resonance (= high impedance) and becomes capacitive with a phase shift going towards -90 degrees. <S> Oh, and then there is magnetic coupling with other nearby inductors... <S> Never assume that a coil is just a coil. <A> Current and voltage start from the same physical phenomenon, electromagnetism, but they are totally different effects. <S> In the inductance, being a coil, a magnetic field is generated by circulating a current through it. <S> This current is maintained if the voltage to the coil is suddenly stopped. <S> This generates that the current, in the inductance, is constant before sudden changes in the voltage. <S> This is the reason why the answer of Olin Lathrop makes sense: With an integral of a function that contains a finite jump, a continuous function is obtained that adds terms that allow to absorb the finite jumps. <S> The physical effect after this behavior can be checked carefully at: https://physics.stackexchange.com/questions/355140/magnetic-field-due-to-a-coil-of-n-turns-and-a-solenoid <S> What you comment about the degrees of lag is only observed in phasors, but without the why, your knowledge has been lame. <S> I add: <S> the same effect occurs with capacitors, voltages and currents, due to the reciprocity theorem http://electrical-engineering-portal.com/resources/knowledge/theorems-and-laws/reciprocity-theorem <A> If you connect a inductor to a voltage, current will start to flow. <S> the current will only grow slowly - so current lags compared to the suddden change of voltage when you connect it to the voltage. <S> The inductor stores engery in form of his growing magnetic field.
Due to the internal counter-voltage of the inductor (wich could be interpreted as some kind of risiatance against the change of the current)
110V soldering station to 220V I got a 110V version of the Aoyue 968A+ soldering station by mistake and shipping the station for a replacement or selling it is not an option. I reverse engineered part of the station looking for the cheapest way to convert it to 220V input capable (instead of using a 220V to 110V transformer). This is the bit of the pump and hot air gun driving circuit that I reverse engineered. I'm wandering if it could be "fixed" by placing a diode between say the TRIAC and the hot air gun heating element therefore chopping half the 220VAC mains sinewave. The pump seems to be the same for both 220VAC and 110VAC versions of the soldering station though, so I'm thinking how could I find out if 220VAC was to damage the pump. simulate this circuit – Schematic created using CircuitLab Hot Air Gun Heating Element: On the other hand, there's also a transformer with 110VAC input and 24V and 9V outputs for the soldering iron and the 5V linear regulator tied to the logic circuitry respectively. Is chopping half of the 220VAC sinewave before the transformer input a solution too? I saw a post about half wave rectifying and a hefty discussion about its effects on the transformer, so another option would be trying to wind more turns into the primary winding, would this be advisable or too much work / space required to achieve it?. I have yet to reverse engineer this part of the cricuitry but there's also an optocoupled BTA12-600C TRIAC that's controlling the soldering iron heating element. Transformer Label: Transformers Remaining Space for Extra Winding: This is the PCB with the heaters and pump controlling circuitry: On a side note:I'm willing to upload a schematic of the remaining circuits if the MCU on the bottom layer was to be identified. It's a 7mmx7mm 32 pin ~0.7 pitch TQFP marked as " REN10 509 H3G1 " with the following pinout -> Pin 1 - 5V Pin 2 - "M" programming? Pin 3 - "R" programming? Pin 4 - NC (in this PCB) Pin 5 - GND Pin 6 - NC (in this PCB) Pin 7 - 5V Pin 8 - NC Rest of the pins - apparently GPIO <Q> Use a 240:110 autotransformer to power the complete solder station. <A> Using diode in series with primary transformer winding is very bad idea. <S> AC transformer may work only with sinusoidal (AC) voltage. <S> The only solution for transformer is to make new primary winding, doubling <S> it's turns by thiner wire. <S> But! <S> The other parts of scheme remains. <S> Triacs are 600V rated, so the questions is: are heater element and pump motor capable to run at 230 V? <S> I guess they aren't. <S> I guess pump motor for 220 <S> V would have double turns (comparing to 110 V version) in it's winding (as transformer have). <S> And heating element would have 4x resistance. <S> Putting diode in series with heater will cut only half of power, while doubling the voltage increases power by factor of 4, so diode is not a solution. <S> So, the choice is: (1). <S> Change ctransformer (or rebuild <S> it's primary winding), heating element and pump, or (2). <S> Just bye 600W+ 230-110 transformer. <S> I think the last one is much better. <A> If you put 220VAC on the primary of a 110VAC transformer it will very promptly run down the curtain and join the choir invisible. <S> Your best bet is an external transformer. <S> You cannot even use an external 24VDC supply because the triacs will never switch off.
Your transformer will not survive chopping the mains waveform in half with a rectifier.
XBee power supply design using a Li-Po 3.7V battery I'm currently designing the power supply for a device which uses XBee PRO S2C as a medium of communication. We are using a Lipo battery 3.7V 3500 mAh battery and TP4056 based battery charger. The problem is: XBee PRO S2C operating voltage is 2.6 to 3.7V. However when the lipo battery is fully charged, its voltage jumps to 4.2V and at this voltage the XBee does not operate and is damaged. What can be the best option to reduce the Lipo battery supply to feed the XBee power? I can use a PN diode or Schottky diode, but it works only if the battery voltage level is above 4.0V as it is consuming 0.7V as voltage drop (PN diode) and Schottky depends on current consumption. The best option I found is using a LDO regulator of operating voltage at 3.0V and low drop out of 0.2V. Will this regulator work for the requirement I'm looking for? <Q> Yes. <S> Diode's won't be a robust solution, but a small LDO regulator will do exactly what you need it to do. <S> It seems the most current the XBee will use is about 120mA, which is well within a typical LDO regulator's limits. <S> I am concerned about the battery though. <S> LiPos are large dangerous batteries that are designed for very high currents for short periods. <S> Not a small current for a long period. <S> So, are you designing an IoT type of thing? <S> Or trying to add WiFi to some RC device? <S> In the latter case, awesome! <A> It is 5 volt tolerant because I used an adapter board which I thought must have level shifters and 3.3 volt voltage regulator <S> so I connected 5 volt powered arduino tx directly in xbee rx and it was working perfectly. <S> later I checked and found that regulator was there <S> but the xbee rx pin was directly connected with arduino tx, I have been doing it for more than 2 years. <A> The best option I found is using a LDO regulator of operating voltage at 3.0V and low drop out of 0.2V. <S> Will this regulator work for the requirement I'm looking for? <S> yes it will go for an any LDO with a dropout of less than 300mV @ <S> 150mA like MIC5205-3.0BM <S> daatsheet with 3V output. <S> So that any li-ion battery will make the think work till last 20% of its capacity (appx).
Better design an logic converter between xbee and host, if they are operating at different voltages.
How are the individual homes connected in a 3 phase power distribution system (power grid) so that they have correct voltage? For a single phase distribution system it's simple, each home has one wire coming from the neutral and one from the live, in turn each outlet has a live and a neutral wire. The live is 120V relative to earth, which is the neutral wire's voltage (ignoring ground because that is just there as a safety feature). For 3 phase (I am talking about standard North America three phase where two phases are given to each house, not industrial 3 phase motors) there is a neutral wire, but it is thinner than the live and meant to simply carry away current from unbalanced loads, not used under ideal circumstances, so since it is not a main source being used to carry the electricity and I will assume this is an ideal circumstance so we can ignore the neutral wire. I would then think that this would mean that two live wires would need to feed to one outlet, with one of the live wires in place of the neutral, creating the circuit. But the standard voltage of a wall outlet is 120V, and two live wires makes 208V because they are only 120 degrees out of phase. From my research I know that the 208V is used in some appliances, but most use 120V. So my question is this: How do you get 120V from a wall outlet without using a neutral wire, if each wire individually is 120V relative to ground, and two lives connected makes 208V? This diagram may help you understand my question. <Q> For most residential power in the USA, there are transformers that are dedicated to single-phase residential power distribution. <S> Each transformer has the primary side connected to the distribution voltage that is thousands of volts. <S> The exact voltage of the primary and the connection details are not important for this question. <S> The secondary of the transformer is 240 volts with a tap in the center of the winding so that higher power residential loads like a clothes dryer or central air conditioner can be connected to 240 volts. <S> Two groups of `120 volt circuits are connected between the center-tap neutral and one or the other of the ends of the winding. <S> In that way, the 240-volt service is split into 120-volt services. <S> The transformers for residential service are located on the power poles or on concrete pads where they serve a neighborhood or part off a neighborhood. <S> An apartment building may have a transformer inside the building. <A> > residential <S> > 3-phase, 2 phases to each house > 208V between phases <S> You are either in New York City or certain countries in Central America which do that. <S> Brazil does something similar but at 127/220V, which is close enough to work with most North American appliances. <S> If you have two poles / phases L1 and L2 neither near earth, <S> and you want 120V <S> , you will need an isolation transformer. <S> An autotransformer won't do because 120V requires a neutral wire that is near earth potential for safety. <S> It might be OK if the 120V machine is double insulated. <S> Easier is to just pull a cable to that location which has a neutral wire. <S> You cannot use equipment safety ground as a current return. <S> If anything goes wrong it will light up your entire grounding system. <S> Things which are supposed to be safe will be lethal. <S> Everywhere else in North America, 3-phase is only used for transmission. <S> Near your house, one phase is tapped by a single phase transformer. <S> The transformer gives 240V center tap which goes to the houses. <A> How do you get 120V from a wall outlet without using a neutral wire <S> I will assume this is an ideal circumstance so we can ignore the neutral wire <S> You don't. <S> You can't. <S> It doesn't work like that. <S> If you are really using three-phase service directly to some building, and providing 120V outlets in that building, with no transformer in between: you do that using the neutral wire. <S> You can't do it without using the neutral wire. <S> Ideally you roughly balance the loads on the three phases, but you don't have to balance them perfectly, and if you have three-phase service to your building, you are presumably driving HUGE high-powered loads with it, so some dinky little 120V outlets to run your computers or whatever aren't going to make a big net difference to the draws on your phases, and using the neutral for them is harmless. <S> If you have three phase service up on a pole, and you're going to split it out to go to people's houses: you have a transformer up on the pole to convert it to one or more 240V split-phase circuits, each of which is effectively two back-to-back 120V single-phase circuits that you can put in series. <S> Whether or not you physically use a neutral wire on the three-phase side of the transformer, is immaterial to the question of whether each downstream split-phase circuit will draw in an equal, balanced way on all three upstream phases: it will not. <S> You will need to manually balance the loads across the downstream circuits when designing the system. <S> That's just the way it goes. <S> It doesn't have to be exact.
If you have a lot of 120V appliances, you balance which phases you put them on, to try to keep the draw roughly even.
Help identify this 10K potentiometer? I need to change this potentiometer that act as an encoder in a Native Instrument controller/mixer (Kontrol S5), as it has become faulty and increases values by itself at the lower end of its range... very strange! Having it fixed by NI would cost me about 300 $US with shipping, which is prohibitive, so I am looking to do it myself, as I have some experience with de/soldering. I have searched for countless hours but have not been able to identify it. So far I gathered that the B103 marking says it is 10K linear, but I have no clue what the 5F2 marking means. Other useful information: has a center detent has about 300 degrees of turn shaft diameter 6mm and length 15mm runs inside a 12V device It looks like a Bourns PTV111 series, but those have a plastic shaft versus metal on this one. Any help pointing me in the right direction would be GREATLY appreciated! Here are images of the potentiometer : <Q> It is a potentiometer with a center tap output on the extra pin, like this one: https://www.mouser.com/datasheet/2/15/RK11K11_VARIETYOTHER-253030.pdf <S> I think you'll have to remove the existing one and use a multimeter to determine the pin assignments (for wiper, center tap) in order to find a suitable replacement from another manufacturer, like the Alps part I linked to. <A> This was the only similar thing I was able to find, there is a small difference at shaft's base but not sure if it's because "The drawing and specification are for reference only." <S> http://docdro.id/15rpUdT <S> Available on eBay as spare potentiometer for "NATIVE INSTRUMENTS TRAKTOR KONTROL X1 Z1 F1 S2 S4 MKI - MKII". <S> (not S5 though). <A> Having 4 pins makes this more likely a rotary encoder. <S> Searching for "5F2 encoder" will bring up hits for devices by TE Connectivity that look similar.
The other alternative is as you said, Bourns PTV111 . "5F2" most likely refers to the package options like shaft length and if the detent is present or not, but you'd need a datasheet from the original manufacturer to be certain.
ATmega328p TQFP and unconnected pins, what is it the best practice? I'm designing a board based on ATmega328p in TQFP package.I'm not using all the ports, so, for example, ports from PC0->PC5, ADC6 and ADC7 won't be connected to anything. Can I left them unconnected or is it better to connect them to ground (or VCC)?I do not have to read from these ports, so even if there will be some noise, it will be not a problem for me. What is the best practice in this case? Thank you! <Q> If your software is not looking at those pins for any reason you can set them as outputs in the configuration bits and leave them disconnected from the circuit. <S> They will act as anchors after the part is soldered to help keep it in place. <A> I normally leave them unconnected and program them as output. <S> I would never connect them to ground or VCC if only to prevent a short circuit when the program is developed/changed. <S> If you want to do that, use a resistor. <S> But that increases the price of the product and may make routing the PCB more difficult. <S> The resistor pads can also be used to connect a wire to if you suddenly find you do need an extra input/output. <S> (Murphy's law!) <S> In fact I just finished a prototype PCB where I added some contact pads to unused pins, just in case.... <A> Option 1.) <S> Set as input, and use an external resistor to pull it to VCC or GND. <S> Option 2.) <S> Leave them unconnected on the PCB, and through software make them all inputs and enable the input pullups. <S> This is less expensive than 1.) <S> in terms of board area and cost, but depending on your application can pose problems on startup if you're in a noisy environment as some pins default to hi-z. <S> Option 3.) <S> Leave unconnected on the PCB, and drive as an output to VCC or GND. <S> Disadvantage is that it can lead to a short if something touches it. <S> Leaving an input pin floating is typically not a good idea; noise can cause it to flip states a lot and that can burn power in the cpu circuitry connected to it.
Don't tie a pin directly to VCC or GND because that leaves the possibility of shorts during development if you accidentally set that pin to an output.
self-heating effect of dual PT100 temperature probe in a moving mass of water I'm trying to know how much self-heating should I expect in these conditions: Temperature range: 0-45 C Using a 1050Ohm pullup resistor to feed each PT100 (2-wire configuration) with 5 volt excitation and 5 volt reference. Temperature probe with two PT100 inside Temperature probe will be inserted in a pipe with a moving mass of water using a thermowhell. According with what I've read in several sites, including this texas instruments reference the self-heating coefficient should be 0.01-0.02 C/mW for a moving mass of water. with a 5V excitation, 1050 Ohm resistor and max value of 117.47Ohm of the PT100 at 45C I get 2.1546mW so the temperature would raise the negligible amount of 0.043 mK using 0.02 C/mW coefficient. Am I right in my calculations? Also, since both PT100 are fitted in the same probe, may they affect each other in terms of heat in a significant way? EDIT: Andy corrected my calculation error and introduced the water SH as a variable but Spehro answered my second cuestion and provided more practical info./tips : Increased thermal resistance from poor thermowell coupling. Self heating coefficient being variable depending on material,construction. <Q> You would be better off to get actual self-heating numbers from the probe manufacturer (or make measurements yourself). <S> The coefficient can vary over a range of 10:1 depending on RTD element and probe construction (thin film vs. wound and epoxy vs. alumina packing, for example). <S> TI is a semiconductor maker, not an expert in probe design. <S> If you have a separate probe assembly loose inside a thermowell, it will be worse again! <S> At least you have flowing water which is the next best thing to flowing molten metal. <S> I would consider 5mA to be an excessive current for a Pt100, usually we use 1mA, so you are getting 25x as much self heating. <S> That's a pretty heavy price to pay for a less professional design of signal conditioner if you care about accuracy. <S> Most certainly the two elements will interact, again it will depend on the exact construction. <A> It's always worth double-checking that water's specific heat (SH) doesn't vary too much with temperature: - Picture source . <S> As can be seen, the SH doesn't vary much over the range of temperatures you are considering <S> so it's reasonable to conclude that water temperaure doesn't significantly alter its thermal conductivity in this range. <S> the self heating temperature rise will be less than 0.05 degrees. <A> General case <S> You have a voltage divider made of a unknown resistor and a 1.05 kΩ resistor, driven from 5 V. <S> The highest dissipation in the unknown resistor happens when its resistance matches the fixed resistance. <S> Therefore, you want to know the dissipation of a 1.05 kΩ resistor <S> is with 2.5 V across it.     <S> (2.5 V) <S> 2 <S> /(1.05 kΩ) <S> = <S> 6 <S> mW <S> At 0.02 °C/mW self-heating, that comes out to 0.12 °C. <S> Your specific case <S> You now say the maximum resistance of the thermistor is 117.5 Ω. <S> That means the maximum dissipation will also be lower. <S> With the other resistor of the voltage divider being 1.05 kΩ, the voltage across the 117.5 Ω resistor is 503 mV.     (503 mV) 2 <S> /(117.5 Ω) = <S> 2.2 <S> mW <S> That times the 0.02 °C/mW yields 0.043 °C.
The probe material will affect it too. With the PT100 at 45 degC, its resistance is 117.5 ohms and hence it will develop across it a voltage of 0.503 volts and dissipate a power of 2.16 mW. Using the TI figure of thermal resistance of 0.02 degC/mW
Copyright of reference designs? I have been reading a design guide by TI which provides full schematics for their reference design seen Here . There is copyright stamped all over this document as seen below. I don't plan on using their design but it made me think, what if I wanted to use their design? With company's providing reference designs, presumably, they want me to use it and buy their product. I'm confused on the usability/copyright of using manufacturer reference designs, are we allowed to and what are we not allowed to use? <Q> Your main confusion seems to be between copying a schematic and a design . <S> Only the schematic is and can be copyrighted. <S> You can't, for example, copy the schematic of the reference design into a book of schematics and sell the book. <S> However, there is no restriction in the document of the idea behind the drawing. <S> Ideas can't be copyrighted. <S> They can be patented, but that's different from the copyright you asked about. <S> Since the intent of TI in providing a reference design is for their customers to use it, it would be very strange if TI patented the design and then prevent you from using it. <S> They want you to use their IC in a circuit, and many circuits will have significant similarities with the reference design. <S> Put another way, TI is giving their idea of how to use this chip freely, but not that specific drawing describing the idea. <S> You are free to create your own drawings that describe the same or similar ideas. <A> For TI, in particular, it is in this document . <S> It starts by saying: Texas Instruments Incorporated (‘TI”) <S> technical, application or other design advice, services or information, including, but not limited to, reference designs and materials relating to evaluation modules, (collectively, “TI Resources”) are intended to assist designers who are developing applications that incorporate TI products [...] <S> Then, later: You are authorized to use, copy and modify any individual TI Resource [...] <S> But actually, this document is mostly a disclaimer from TI. <S> It quickly says you can use the resources, and goes into extended lengths of explaining that you should not sue TI for whatever reason you might think of... <S> So, as Eugene said, the copyright you saw only applies to the resource document itself, not to the information given in the resource document. <A> Reference designs are intended to be copied and the manufacturer provides them with this intention. <S> It's not a substitute for reading the datasheet thoroughly, but it's also a pretty good way to ensure you're not too far off base with a complex design. <S> In some cases you may even want to copy layout, for example for DDR memory to processor connections. <S> However, there is usually a disclaimer that indicates in legalese that you may be infringing someone else's patent by using the circuit and they take no responsibility for that.
It's only the drawing itself that is copyrighted. All manufacturers provide explicit license information regarding reference designs and other resources (datasheets, app notes, ...).
Want to output data on GPIOs in parallel, what is the delay between each pin? I have the following setup to control 256 bi-polar stepper motors from a data stream via SPI. I'm deciding between an MCU (teensy 3.6) or an FPGA. Each motor (four wire) is driven by a driver that requires 2 GPIO's (A4988). I use 32 16-bit shift registers to talk to the 256 drivers from around 36 GPIOs on the MCU/FPGA. I want each motor to respond in unison when i issue commands, essentially they should be controlled in Parallel. An FPGA should do this well, but coding on one is not so trivial. Using a Teensy 3.6 for the MCU approach, i would like to know how 'parallel' the control would be. I.E. I have 32 Data lines going from 32 GPIOs to 32 16-bit Shift registers; I want to turn all steppers fully on in the same direction: how long is the latency between the command being output from GPIO 1 to GPIO 32? Here is a block diagram to aid the setup. I would probably go with the MCU approach if the latency is negligible, but i would like to know your thoughts. I would imagine any latency only being an issue since i bridge all other shift register control pins (latch, clock etc). Thanks <Q> Depends on how you wire up the shift registers. <S> Usually shift registers will have three input pins: data, clock, and latch. <S> Rising edge on clock will shift in/through a data bit, rising edge on latch will transfer the contents of the internal serial registers to the parallel output registers. <S> So if you tie all of the latch pins together and drive them at the same time, all of the shift register outputs will update at nominally the same time (within a few ns). <S> If you want the least skew between the outputs, this is the way to do it. <A> Lets assume you have an MCU with two 32-bit ports. <S> Next you take fourteen SN74ALVCH16721 20-bit D-registers. <S> (Just to have some spare bits!) <S> To write to one you could: - Set the data on port1 - write the clock high on <S> port2 - Write the clock low on port2 <S> For fourteen chips that is 42 writes. <S> With a 64MHz CPU that takes ~218 nsec. <S> Lets add a fudge factor of ten because the instruction must be fetched: <S> ~2uSec. <S> You think your motors will notice? <A> GPIOs in MCUs are usually organized as registers of certain width, typically matching the internal MCU architecture. <S> If you attach some of your I/Os to the same register, say 8-bit register, you can have all these GPIOs to change nearly simultaneously, the difference will be in sub-nanosecond time frame (plus possible tracing length mismatch). <S> Regarding FPGA, driving wide parallel busses has a known problem of power starvation due to limited internal ability of FPGA to deliver current to GPIOs. <S> Specifications for FPGA usually have very specific restrictions on how many GPIOs can be switched simultaneously, you need to consult with datasheets before planning the FPGA design.
But if you have a wider bus and your GPIOs are split between different MCU registers, then there will be delay between the groups, few MCU clock cycles, depending how your software handles individual register read-writes.
FPGA how to create delay I understand that with synchronous FPGA, the whole execution is done in cycles. What happens when my circuit has two parts which give outputs in different cycles (one has greater depth than the other) and I need the outputs in a different part of the circuits in a single cycle? Is there any better way than just adding logic gates which do nothing in order to get delay of the required number of clock cycles? I know that I usually don't have to care about this when programming FPGA's, but I would like to understand it. <Q> You would use either pipeline registers or FIFOs to take up the delay. <S> Pipeline registers are good for short delays, and you essentially get one cycle of delay per stage. <S> At their simplest, they act like shift registers, but it is also possible to have handshaking between stages. <S> FIFOs are good for longer delays. <S> A FIFO will store the data in an internal RAM for the duration of the delay. <S> Another advantage of a FIFO is that it can cross clock domains. <A> I’m assuming your FPGA runs on the same clock, so you do not have CDC issues. <S> In that case, have your separate sections output the data in separate buffers. <S> A processing section can then wait for both buffers to have data available in them. <S> When the data is available you can pop both buffers and do the required processing in the processing section. <S> This setup also has the advantage that you avoid blocking by the processing section due to the buffering. <A> If you want to delay results by a certain number of clock cycles, latches/flip flops are a better choice than gates. <S> You can pipe the faster data through the number of stages the slower data needs to catch up. <S> It's essentially a shift register for each bit of the result that needs to be delayed. <A> The only things you need here are basically two counters and a dual ported ram and instead of using buswidth * delay-cycles flipflops you are using buswidth * delay-cycles RAM bits plus the overhead of the counters.
If you need to delay a lot of data lines for a lot of clock cycles a delay implementation using RAM blocks might be less resource intensive than just using flipflops.