source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
Questions on STM32 multiple GPIO names I started designing the development board for STM32F427VIT6 of LQFP100 package. Its has multiple USART and UART pins. The USART names in the datasheets are USART1, USART2, USART3, UART4, UART5, USART6 UART7 and UART8. In pin out table pin PA0 and PA1 are UART4_TX and UART4_RX respectively. PC10 and PC11 are also UART4_TX and UART4_RX. Same case with USART and SPI pins. Different pins having the repeated names. Please explain the reason and how to use these pins. <Q> There are a bunch of muxes inside the chip which allow you to route signals to different pins to allow for easier part placement and PCB layout. <S> The GPIO peripheral then has alternate function registers to select which function to give to which pins, these registers configure the muxes. <A> What helps me a lot is to install <S> STM32Cube (nowadays called STM32CubeIDE). <S> There you can select all peripherals you need, and you can very easily find out which peripherals clash (i.e. use the same pins) and use alternative options. <S> Using alternate (such as PC10/PC11) pins for UART4 <S> you have to select manually within the graphical layout, but this is much faster than trying to read datasheets. <S> It can generate the framework code in case you want to use HAL, but even if you would not want, it helps to find out easily how to check the pins which you can use. <S> Below you see a picture from your CPU with the UART4 at alternate pins: <A> You'll need to set the GPIO port to alternate function and then select the usart alternate function through the gpio alternate function register. <S> Further more there is another register were you can pick alternate pins for the same peripheral ..i.e. usart 4.
Have a read through the Reference Manual for your specific Chip
ON-OFF MOSFET Switch for Induction Heater The induction heater was tested using a relay as an ON-OFF switch before and worked so i just want to focus on the MOSFET switch part of the schematic. When i tested the circuit using a MOSFET switch it worked but after a few tests the OFF state just stopped working. After taking a look at the P Channel MOSFET I noticed that it was always ON even with everything turned off. I suppose something must have burned the MOSFET. And my question is what may have caused this to happen? <Q> You blew your PMOS. <S> Semiconductors usually fail short. <S> You are cutting it real close with your PMOS's max Vgs (25V max). <S> Any ringing or spike and you blow your PMOS gate. <S> My money is on that. <S> It's so close that 24V zeners or TVS diodes to clamp the gate voltage would not help. <S> Use a 12V or 15V clamping diode instead. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Put a diode in there; cathode to PMOS drain, anode to ground (so it's reverse-biased when the PMOS is on). <S> When you turn off the PMOS <S> the two inductors will pull current from ground until they're discharged. <A> There a re two ways to address your problems: Put a high power diode across the switched 24V supply Put a small wattage Zener diode and diode from Drain to ground <S> You also need to address the V(GS) for the device you used. <S> That alone may be killing your device. <S> simulate this circuit – <S> Schematic created using CircuitLab
It's probably inductive kickback when you switch the PMOS off.
What information exactly does an instruction cache store? Processors use both data and instruction caches in order to reduce the number of slow accesses to main memory. However, while it is clear to me that the data cache's purpose is to store frequently used data items (such as elements in an array or inside a loop), I cannot see what exactly the instruction cache stores that helps alleviate memory access times. In the image above, we have an example of an "addi" instruction which adds a constant value to the value stored in general purpose register "r2" and writes the result to general purpose register "r1". After this instruction is executed, what exactly is saved to the cache? It can't just be the opcode - most CPU instruction sets contain just a few hundred unique opcodes or less, so if the instruction cache was pre-loaded with all possible opcodes, it would always have a 100% hit rate. However, that would defeat the purpose of having a cache, plus I've read that instruction cache misses are very much possible. It can't be the values from main memory which are loaded into the general purpose registers, since that's exactly what the data cache is for. Thank you in advance. <Q> It literally stores lines of machine code from program memory (aka the entire instruction you line in your original post. <S> The fact you even discuss "storing all possible op codes in cache" points to a deeper misunderstanding. <S> Talking about storing all possible op codes in cache (or any memory for that matter) has no meaning. <S> All the possible opcodes that the processor can run are hard-wired into the logic circuitry of the processor. <S> They aren't "stored" anywhere. <A> The Instruction cache stores the most recently used instructions and their addresses so that if an instruction needs to be repeated it doesn't have to be retrieved from main memory - this is much quicker. <S> For example the first time a loop is performed the instructions will be retrieved from main memory and simultaneously placed into the cache. <S> On subsequent iterations of the loop the instructions can then be quickly retrieved from the fast cache memory. <S> The addresses are stored in the cache together with information that indicates whether the cache is up-to-date so the CPU control knows whether it can use the cached instructions or needs to go to main memory. <A> It is the program itself. <S> Main memory is often too slow (or has too much latency) to be able to feed the CPU its next instruction every time it is ready for one. <S> This is why a fast cache near the CPU is used, this is the instruction cache.
The instruction cache stores the individual instructions for the CPU of the currently executing program.
Lead Contamination when Soldering I bought a soldering station a while back and was practicing on a kit and had the website on assembly up while I was soldering using 60/40 tin-lead solder. Should I worry about splatter on the surfaces causing contamination? Or from using my keyboard/mouse while I was soldering? I occasionally snack in there and was wondering if I was slowly poisoning myself. Edit: is there any way to clean it the contamination from the room? Edit 2: Possible duplicate doesn't quite answer my concern on surface contamination and transfer of contamination I feel. For example when I touched a door knob after soldering but before washing my hands, would I have transferred any amount of lead contamination to the door knob in which case I could be unknowingly ingesting lead by touching the door knob and eating/drinking in another room? Edit 3: question was not properly answered I feel, does lead transfer to surfaces after my hand touched the solder because if so wouldn't door knobs and light switches in my house be contaminated <Q> I've been using it for over 60 years and haven't poisoned myself yet. <A> I can verify that soldering does produce beads and dusts in the area, even when you're careful. <S> It's quite a bit more than some people make it out to be. <S> If you keep your workstation clean and it is the proper colour, the solder has no grime or camouflage to hide amongst. <S> An iron will mostly produce larger bits like beads and flakes, but solder vacuums are notorious for producing fine dusts. <S> If you're jumping back and forth between soldering and using the mouse/keyboard, then you should not be jumping back and forth between eating and using the mouse/keyboard. <A> Yes there will be solder dust if your regularly soldering things. <S> If anyhow these dust goes inside PC or complex smd circuits it may causes short circuit or disfunctions. <S> Clean your solder bit with wire net soaked in water.
Clean these dust with vaccume or use solder paste under your solder holder so the dust stuck on the paste surface.
Which is the most recommended sensor for sensing humans inside a rail passenger car? I am thinking of an application which is necessary to know if there is and where someone is located, inside a rail passenger car or bus, for example, the problem there is many external factors such as external sunlight or temperature that could disrupt thermal sensors, creating many false positives. In case of cameras some objects, like seats or other objects difficult to "see" people in a determined place. Another point is it is a real-time application, it means, the amount of generated date from cameras would be almost impossible for processing. I am thinking to use ToF sensors or mm-Wave sensors, however, I do not know if the seats or some objects could difficult or even make impossible for sensing human. Someone has some idea or advice which sensor could be used in such an application? PS1: It is necessary to sense someone before he/she seats, I was thinking to set some ToF sensors on the ceiling of the wagon, in order to see when someone is passing through, however, I do not know if the same ToF can see someone while they are seating. <Q> Secondary sensing could be by eg PIR - motion detection. <S> IR - body heat Ultrasonic - motion detection IR - beam breaking Capacitive - body proximity. <S> Doppler RADAR application: <S> Person movement along a carriage can be detected by horizontal units and individual seats or areas by vertical units. <S> As well as whole body motion it is possible to detect physiological body attributes <S> Knee joint articulation produces a frequency of about 25 Hz due to the action of the joint under load. <S> I long ago met people who developed systems based on this feature. <S> They claimed that it reliably detected people and rejected flapping curtains falling boxes and miscellaneous pussy cats. <S> It should be possible to detect heart motion artefacts. <S> This may require sensors located in seats. <S> The cost of the RADAR units is low enough that a sensor per seat system may be economic. <S> The large range of low cost Doppler RADAR units appear to be based on the "RCWL-0516" module. <S> From here : " ... <S> The electronics of the module consists of two equally important sections: a microwave frequency transmitter/receiver/mixer based on the MMBR941M high-frequency NPN transistor and a much-lower-frequency section based on an IC — RCWL-9196. <S> Technically, the microwave section resembles a “Colpitt oscillator,” with the requisite inductor (and capacitors) made by circuit board traces. <S> The inductor (~10 nH) is the S curve trace on the top surface, and capacitors are the ring structure on the bottom surface and also the rectangular block to the left of the S curve. ... <S> " <S> Useful application article and another <S> This Google search provides many related links. <S> Many Ali Express Doppler RADAR units - buyer beware as ever. <S> Under $US1 each! <S> Quality unknown. <A> Thermal imaging cameras can be fed into image processing systems that can be programmed to discriminate ambient thermal signatures from those of humans, which are relatively consistent. <S> All the camera system need do is find "blobs" of heat and count them. <S> It's already being done all over the world. <A> I'm assuming the passengers must be sit down and will not travel stand. <S> My first though is using some sort of physical pressure sensor, that can detect if somebody is sit on a place. <S> However, this requires modifying the sits to add those sensors, maybe cutting the seat cloth. <S> I'm also thinking about ultrasonic sensor, that detect how far is an obstacle from the sensor. <S> They can point to the sit from the roof, and if somebody is sit, it should detect a different distance than if the seat is empty. <S> However those sensors might not be very precise, and you can have weird situations that can give false positives, like if somebody puts some luggage on a seat.
Doppler RADAR can be used to provide an excellent person sensor, perhaps in conjunction with other secondary sensors. Doppler RADAR modules are available at low cost.
Does it take/cost power when supplying in 3v to a "5v to 3v" regulator I have a boost converter that converts 1.5v to 3v, and I have a ESP32 that takes a USB input of 5V and uses a regulator to convert it down to 3v. If I provide 3v to the 5v input that goes via the regulator, is it the same as skipping the regulator and connecting it directly. <Q> Attempting to pass through 3V through the 5V to 3V regulator may result in erratic behavior by the regulator as it attempts to regulate below its drop out voltage, and possibly a lower voltage at the output. <S> It's not a straight forward option. <S> You are better off bypassing the regulator. <A> As Christian B states you will not use a buck converter to convert from 1.5 to 3v <A> Like the earlier answers, you probably are using a boost, not a buck, however many converters have both built inside. <S> Like what Passerby said, you are better passing over the regulator as if the voltage drops, you may get spikes and drops in the output. <S> Also, it takes some (not much at similar output level) power. <S> Overall I wouldn't worry about power use as the board will take much more total than the small loss of the converter. <S> If you can, skip the converter, but it shouldn't be too much of a problem if you can't/don't.
No, giving 3 from a source that has less loss than the build in converter will save you some power. The regulator will also take some power for itself. For the converter, you are saving power and here is a link explaining how: http://www.learnabout-electronics.org/PSU/psu32.php
Under open-circuit conditions, does a transformer behave more like a resistor, capacitor, or inductor? I have the below schematic showing the equivalent circuit of a transformer under open-circuit conditions. Will the transformer behave like a resistor, inductor, or capacitor? And will this behaviour vary depending on the values of the open circuit current, open circuit voltage, etc? I notice that we have a resistor in series with an inductive reactance, which is then in series with a parallel combination of a resistor (representing core losses), and a magnetising inductive reactance. So far, I have ruled out the transformer behaving as a capacitor. I am thinking that perhaps the transformer is behaving as an inductor? Although, I do not have a great understanding of why this is, it's really just a wild guess. I appreciate your time and help, thank you. <Q> Inductors and transformers are constructed similarly, except that a transformer has multiple windings on the same core and an inductor has only one. <S> For most transformers, Rc and Xm would be negligible because they represent core losses, which are kept to a minimum to allow the transformer to operate efficiently. <S> If you neglect those nodes in the circuit, the circuit would become an ideal inductor and a resistor in series. <S> It would behave like a real inductor with some nonzero internal resistance. <A> Go with what Thor has said. <S> When it comes to testing, beware of using transformers in open loop conditions expecting them to work as inductors. <S> Transformers are constructed to work with minimal magnetizing current. <S> Using them as inductors will usually saturate the core and you would see a short circuit <A> Your schematic tells you the answer. <S> The input impedance is dominated by the higher primary Inductance so that Xl > <S> > <S> Xm and Rl <S> << Rm <S> so it can be approximated by Zin=Rl+jXL. <S> For a transformer with a primary L = 1 H at 240 Vrms <S> the primary current is ~ 0.75A <S> with 4H it reduces by 4.
If you are only using one winding of a transformer, it will behave exactly as an inductor.
Connecting Arduino to 10hp 3 phase ac motor? I want to connect Arduino to 3 phase 10 hp ac motor. I just want basic functionality that is I should be able to turn it on or off using the code. Is it possible to do with 3 phase solid state relay?if yes, can I use 3 relays instead of a 3 phase solid state relay?If no, how to do it? <Q> Better use three phase contactor with 230VAC coil. <S> Supply 230V to coil by simple arduino relay. <A> Since Arduino is limited to 5VDC (or 3.3) you will need an output to a switching transistor to drive the motor contactor of your choice. <A> As Eryk has said you should use a single pole relay with a 5V or 3.3V coil (or switching transistor) to energise a larger mechanical contactor (with a coil voltage of your choice) designed for switching 3 phase loads. <S> You should ensure the contactor's contacts are rated for the KW/hp load you are connecting (minimum 10hp+ in this case). <S> *Use a solid state relay if you wish, but it's probably too expensive to justify depending on your motor application. <S> You may also be wasting 3 outputs on your Arduino for 3 separate control signals compared with one control signal for a contactor. <S> Also there is more chance of one of the relay coils failing. <S> All of these points risk you single phasing the motor, causing damage or injury or both. <S> Also you MUST provide sufficient short circuit and overcurrent protection for the motor in the form of fuses, an MCB or a motor protector circuit breaker.
If you mean 3 separate relays for switching each motor phase directly, this is not recommended as each phase is switching a significantly large load for a relay, which will more than likely cause it to fail long before an adequately sized contactor will fail.
On-the-fly routing of digital and analog signals using unbuffered analog crosspoint arrays? The issue I have is strongly related to a question which was asked over here . Unfortunately I did not find the answer I was looking for. Digging a bit more I've came across a class of IC's named unbuffered analog crosspoint arrays . What I would like to know is if an unbuffered analog crosspoint array IC would allow for: bidirectional data flow Xn to Yn analog signal passthrough with virtually no noise injection up to, let's say, 12-bit resolution digital signal passthrough compatible with I2C & SPI & UART The one IC that I came across is ADG2128 but I'm not sure if it fits the criterias listed above. I'm well aware that the problem might be solvable via a PLD (be it FPGA or CPLD), but I have no experience whatsoever hardware or firmware (VHDL) wise when it comes to such devices. Implementing an I2C slave altogether with a biderectional crosspoint array is no easy task for a beginner. Thus, a ready-to-go, already made IC would be a good kick-start. <Q> Achieving clean passage of an analog signal through an analog multiplexor comes down to this phenomena, which you can model as a voltage divider: the ratio of signal-source impedance to aggressor-energy impedances <S> Certainly the signal-source impedance is under your purview. <S> Crosstalk between the obvious signal paths is also under your purview. <S> The less obvious aggressors are 1) trash on the analog-mux FET gate 2) trash on the analog-mux FET bulk/tub <S> /well/substrate <S> Both of 1 and 2 are highly dependent on the quality of RAIL bypassing and dampening. <S> At high frequencies, the injection of signal-charge thru the signal-gate and the signal-bulk will upset these RAILS, and nothing becomes predictable. <S> Using minimal-inductance packages and bypass capacitors (and attention to dampening) becomes crucial to analog SNR and to digital DataEyes. <A> bidirectional data flow Xn to Yn <S> It looks "configurably bidirectional": so you can route Xn to Yn, or Yn to Xn, but you have to pick which direction you want in advance. <S> analog signal passthrough with virtually no noise injection up to, let's say, 12-bit resolution <S> Bits aren't the most appropriate measure for noise levels in analog signals. <S> You need to use signal-to-noise ratio (SNR) in decibels. <S> 12 bits corresponds to a SNR of at least 72db. <S> This device only guarantees up to 63db crosstalk between adjacent channels, so that may be a problem. <S> digital signal passthrough compatible with I2C & SPI & UART <S> Lack of true bidirectionality will be a problem here for I2C. <S> The others ought to work for normal speeds. <S> I'm well aware that the problem might be solvable via a PLD (be it FPGA or CPLD), but I have no experience whatsoever hardware or firmware (VHDL) <S> wise when it comes to such devices. <S> Implementing an I2C slave altogether with a biderectional crosspoint array is no easy task for a beginner. <S> Thus, a ready-to-go, already made IC would be a good kick-start. <S> The analog side of this cannot be done with a programmable digital logic device. <A> 1) <S> Yes it allows bidirectional data flow, analog or digital signals. <S> It is basically a big matrix of analog multiplexers, also called pass gates. <S> 2) <S> Yes, with some limitations of course. <S> Pass gates have few tens of ohms resistance when on and few megaohms maybe when off. <S> Not much current can be sent via pass gates, about 10mA or so max. <S> There are also stray capacitances so high frequencies attenuate when passing through and couple to nearby signals. <S> So it will depend on your signal bandwidths and impedances, and signal voltages may not exceed the chip supplies. <S> 3) <S> As long as above limitatios are considered. <S> Contrary to what you stated that this could be done with a CPLD or FPGA, those can't switch and multiplex analog signals. <S> For digital routing of SPI and UART they would work fine. <S> But for switching a bidirectional open-drain type bus like I2C, that is easier with analog muxes or dedicated I2C multiplexers.
Yes it is compatible with SPI, UART and even I2C which is bidirectional.
Voltage isolation at IC pin when Vcc=0V I recently started a project that utilizes a piezo sensor to sense vibrations. The piezo signal is fed to a uC in order to detect vibrations above a certain threshold. However, the piezo's high voltage spikes may damage the pin so I added a schottky diode for reverse voltage protection and a zener diode for spike suppression. The initial circuit looked like this: simulate this circuit – Schematic created using CircuitLab (The buffer is not necesarry, but it protects the uC) Now here's the problem: When the uC is turned off, the piezo may still exhibit voltage when hit. Since Vcc is at 0V, the buffer or uC's internal protection diodes will be killed and damage the IC. Therefore, I need a circuit that isolates the piezo from the uC when there's no supply voltage. Is there a simple solution to deal with voltages when Vcc=0V? It cannot draw more than 50uA when turned on because everything is powered by a coin cell. <Q> Add another Schottky diode from the non-inverting input to the positive power supply rail. <S> Since Schottky diodes have lower forward drop than regular diodes, almost all the current will go through the Schottky diode. <S> You can use <S> a single BAT54S dual diode to replace both D1 and the new diode. <S> Right now you have a 1N4148 for the negative side, which is not a Schottky and significant current <S> will flow through the IC when the input goes negative, which could lead to latch-up and thence destruction of the IC. <A> I would say this is industry standard. <S> Works both in powered and unpowered state. <S> A small resistor in series with any input comes to mind too unless you are aiming for MHz reacion speed. <S> Often good for EMI purposes but need to be tested in circuit. <S> You can use the same BAT54S on the input pins of the MCU. <S> They are dirt cheap. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> You have already implemented clamp circuits that restrict the voltage at the input to within the range -0.7 volts to about +5.1 volts so, to protect the sensitive input when power is removed you need to place a resistor in series with the gate input. <S> To calculate the value you need to extract, from the data sheet, the maximum input current allowed for the device. <S> That may be typically 1 mA <S> and this would then lead you to choose a resistor of 5k1 in value. <S> Going for something a little bit bigger should't be a show-stopper so choose 10 kohm (for this numerical example).
The Schottky diode will be reverse-biased in normal operation, but when the power is off it will conduct any spikes to the positive rail where the bypass capacitors will kill it off, and even if the user pumps it the zener will prevent the supply rail from going too high.
Is there no current between these terminals? This is related to charge carries movements out of transistor terminals. Assuming a transistor in common emitter connection is biased properly where resistors are omitted for simplicity. Before asking the question here is what I know: From V3's negative terminal the electrons will enter to the emitter terminal following the path A->B->C. Most of these electrons will be drifted to the collector and from there they will follow X->Y->Z. The rest of the electrons will recombine with the holes in the base and will cause electron flow from the base to D. My questions is: Is there literally no charge movements(current) between B and K? <Q> Figure 1. <S> There are two current loops, <S> I b and I c . <S> Conventional current is indicated by the direction of the arrows. <S> There can't be any loss in current around the base loop or around the collector loop. <S> At one section of the circuit - between C and B - the current flowing is I b <S> + I c . <S> From the comments: The current caused by static electric does not flow in loops afaik. <S> Like in a lightning strike. <S> It's still a loop. <S> It's the same as discharging a charged capacitor. <S> Once charge starts to flow <S> it's static no longer. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 2. <S> Lightning discharge equivalent circuit. <A> The current you have between Base in D is also flowing between K and B. <S> The current there has the value of I/ß, with I the current from A to B and ß <S> the amplification of the transitor. <A> (disregarding any miniscule wire resistance)
Of course there is, but they are at the same charge potential so the net is 0.
Identify unknown capacitor and resistor values How can I find out what the values of R12 and C3 are? <Q> The joys of small SMT components. <S> You have often have no way of knowing without measuring it. <S> Usually resistors will have some text telling you something, but decoding it isn't reliable. <S> That being said, R52 does have a "0" on it, I'd expect it to be a zero ohm link. <S> Capacitors are even worse. <S> I don't think I've ever seen ceramic SMT caps with anything useful on them. <S> Luckily you can get meters for capacitors, usually on the higher end digital multi-meters. <S> Importantly though, do these measurements with the components OFF the PCB. <S> Otherwise you'll be measuring the value of the PCB, not the component. <S> EDIT: as mentioned in comment, the datasheet for U2 may help and may be a useful sanity check. <A> Surface-mount resistors of 402 and 201 (and smaller) <S> sizes don't have any markings. <S> All SMT capacitors (even 1206 size) don't have the markings either. <S> They can't be identified visually, they can be only measured, with one end de-soldered. <S> The voltage of caps is even a bigger challenge, so you would need to guess it from overall local voltage environment. <S> In this particular case the C3 is likely the power de-coupling cap, so 0.1uF <S> 6.3V 0402 is very likely. <S> The resistor is likely one of SPI bus pull-ups, so 10k to 100k 0402 <S> size will do. <A> Since no-one has yet given the link, here is the datasheet for U2 . <S> From the logo and markings, it's a GigaDevice GD25Q64CSIG - 64Mbit SPI Flash in an SOP8 package - standard SPI flash pinout. <S> Unless the device is being used in Quad SPI mode (unlikely), then pin 7 (for which the missing <S> R12 <S> is the pull-up) is the HOLD <S> # input and probably isn't actively driven by anything (follow the traces to check - in my experience, it's rare to see the HOLD <S> # signal used). <S> If you really wanted to, you could measure R15 (the pull-up on pin 3 - you may need to remove it to get an accurate measurement, depending on the test voltage of your multimeter). <S> I expect that the missing R12 (the pull-up on pin 7) was likely the same value (a designer would typically choose the same value for all pull-ups). <S> As already mentioned by Ale.. <S> chenski , it won't be a critical value and the range suggested by him will do. <S> Regarding C3 , again I agree with Ale.. <S> chenski <S> - it's the local power decoupling for U2 <S> and he's kindly suggested a typical value. <S> If you really wanted to find its likely value, you could (following the same logic as I explained for the R15 to R12 similarity) find another local decoupling capacitor for a similar device on the PCB (e.g. CMOS glue logic, or small support device), remove it, measure it and replace it. <S> Then use that value for C3 . <S> However the effort is unlikely to be worth the trouble, just try using 0.1uF anyway.
I have seen enough variation on what is on a resistor, that I would recommend putting a meter across it and measuring it.
How can I safely determine the output voltage and current of a transformer? So I am building a Tesla coil with my partner for a senior design project. We safely ripped out a transformer from a microwave oven. However, after a good amount of research, we were unable to find the maximum output values from the transformer. We know the input values, the standard 120 V and 60 Hz from a US outlet. We need to know the max/peak kV to figure out the capacitance we will need for our primary coil that we need to construct. Here is what it looks like: <Q> 6170W1D012G is an LG part number. <S> Primary 120v. <S> HT secondary is 2210v 500 mA. <S> If you have to ask, as has been said, you do not know enough to do this safely. <A> No. <S> Do not use a Microwave Oven Transformer (MOT) for a Tesla coil. <S> It is the wrong impedance. <S> The output voltage is too low (around 2kV), spark gaps will not fire reliably. <S> The output current is too high (500mA), if it bites you, you will probably die. <S> The correct transformer to use is an old style (iron core) <S> Neon Sign Transformer (NST). <S> The output voltage of 15kV is plenty to make very forgiving spark gaps. <S> The output current in the low tens of mA may well be survivable if it bites you. <A> Consider exciting the high voltage secondary (at 60 Hz) and measuring primary voltage to get an idea of the turns ratio. <S> It should be pretty simple math past that. <S> I agree with other comments that you might want more experience and/or meaningful oversight from your professors for this project. <A> To answer the general question, to suss out the basic specs of a power transformer drive it backwards. <S> This is how we did it in engineering school with pole transformers. <S> You apply 120vac to the HV secondary of the transformer, then measure the voltage on the primary. <S> (Note: Be sure to fuse the 120v supply.) <S> This will let you calculate the ratio of primary to secondary voltage. <S> There was also a way to roughly calculate the current capacity while doing this, but it's been nearly 50 years, so I've forgotten that detail. <A> The voltage of a microwave oven transformer & the voltage across the capacitor is about 2.1KV <S> But like the other guys said: Don't use it for a Tesla Coil. <S> The voltage is too low & the current too high, and it is too dangerous. <S> Use a neon sign transformer. <S> Image source: <S> My own experiments - Peter R. McMahon <A> To measure the voltage, while operating, I would suggest a string of 9 10MΩ resistors in series with a digital multimeter with a 10MΩ input impedance, or an oscilloscope with a x10 probe. <S> Multiply the reading by 10 for the meter, or 100 for the oscilloscope. <S> To look at the waveform across the capacitor, where both sides are live, the scope can be set to differential mode like a powerscope, using 2 strings of resistors & both channels, set in A+B mode, with B channel inverted. <S> The trace will be the difference between A & B, with B as the reference (ground or otherwise). <S> To measure the current, you can connect the DMM in series, but make sure it is insulated from ground, & KEEP <S> FINGERS AWAY.There's big bities in a microwave oven power circuit.
The voltage rating should be printed on the capacitor.
Balanced Charging of ZOP 2s lithium ion battery Good day everyone, I recently purchased a “ZOP Power 7.4V 2200mAh 2S 35C Lipo Battery T Plug” for a project. I have designed a circuit to charge the battery, but now I am wondering if it is necessary to ensure the batteries are balanced when charging. I am using an 18V, 10W solar panel to charge my battery through a buck converter which controls the charging modes (CC/CV), the battery is connected to an RC car to extend running time. Through research, there are websites and forums with completely conflicting views, some say it is very important to balance charge batteries in a pack, whereas others state since there are only 2 cells present balanced charging can be ignored and the battery can be charged normally in series. There doesnt seem to much information on these batteries, but this website contains some basic information on it: https://www.banggood.com/ZOP-Power-7_4V-2200mAh-2S-35C-Lipo-Battery-T-Plug-p-992114.html?cur_warehouse=CN#jsReviewsWrap I look forward to hearing peoples advice and opinions! <Q> Balancing them when it's not strictly necessary won't cause any issues. <S> Dangerous, fire or explosion based issues. <S> I'd take the safe approach if I were you. <A> If the cell capacities are well matched and they have equal charge <S> then they shouldn't need to be balanced while charging. <S> So... <S> When you get the battery, measure the voltage on each cell via the balance connector. <S> If they are within 0.03V of each other then it should be OK to charge the pack via the T connector. <S> When charging for the first time, monitor the voltages to make sure that neither cell goes above 4.23V. <S> At full charge both cells should be within 0.01V of each other. <S> If one cell is higher then discharge it with a 100&ohm; resistor until it is a bit lower than the other one, then let the battery rest for a few minutes and measure again, repeating until the resting voltages are equal. <S> However a cell may (rarely) develop a partial short circuit which causes it to slowly discharge. <S> A 'leaky' cell will continually go out of balance, so if you find the pack needs regular balancing it's probably best to discard it. <S> The more cells there are in a pack the more chance there is of one cell getting badly out of balance without affecting the total voltage enough to notice, but even a 2 cell pack can be affected. <S> I have a brand new 2S pack on my bench right now which has one cell at 3.75V and the other only <S> 1.78V. If I tried to charge this pack the higher cell would go above 4.23V and blow up well before the total pack voltage reached 8.4V. <S> Unfortunately at less than 2V the other cell cannot be revived, so the battery is useless. <A> You should allways keep the cells balanced in order to mantain a balanced power draw from each cell. <S> If, by come reason, one of the cells starts having under voltage, you might overload the other risking a ball of smoke... <S> You know what they say: Balanced LiPo is a healthy LiPo!
Therefore you should measure the cell voltages regularly to check the balance. NOT balancing them when it IS necessary WILL cause issues. A well balanced Lipo pack should remain balanced for its lifetime, unless it is damaged or abused.
Should I twist DC power and ground wires from a power supply? Is it beneficial to twist the red/green power/ground wires from a low-voltage (~5V), relatively low current (1 to 5 A) switching, desktop power supply? This makes my wire bundle on a desk less chaotic, but will it reduce noise or provide any other benefit? Is there any reason why I should specifically avoid doing this? <Q> Reduced magnetic radiation from loads that are switching. <S> A magnetic loop is an antenna, switching loads and changing currents cause the antenna to radiate magnetic radiation, which can cause noise in other devices. <S> Generally its a good idea to twist the wires and reduce the radiation and susceptibility to noise. <S> I can't think of any reason why you wouldn't do this, <S> on all of my prototypes/products I make sure the wires are twisted. <A> It would reduced radiated noise. <S> No specific reason to really avoid it since the only real reasons are reduced heat dissipation and overkinking the cable which shouldn't happen if you do it properly. <S> It would also reduce noise that is coupled to the lines that enters the power supply (by ensuring the noise is picked up "identically" on both lines), but that barely matters at all for something like the kind of power supply you probably have. <A> Twisting power and return lines together will not cause an adverse affect electrically. <S> Also, any high frequency noise that happens to exist on those lines will radiate less, though maybe only marginally less, due to a tighter coupling between them caused by the reduced geometric separation of the conductors. <A> More twisting means more contact surface betwen magnetic radiofrequencies polarities which can be assumed as less output voltage as the twisting decreases conductance ratio developing a closed magnetic field which converges to more inductance. <S> eventually showing a predictable extra current than driving a bare load with no twisting at all... <S> Interestingly the ammage vs inductance reciprocal isn't a straight line but <S> an exponentiation such as at the end of a twisting pair of cables would turn a 1 Ampere load maybe into 1.8 amperes breaking some current loops in the planned circuitry...
Twisting wires reduces the magnetic loop area of the wires, this has two implications: Reduced susceptibility to noise from magnetic fields, with twisted wires an a smaller magnetic loop area, external magnetic fields will induce less current in the loop made by the wires than straight cables.
Why some vias have solder mask and others do not? Here's an area of a commercial PCB. I'd like to know if the "missing" solder mask is a deliberate choice made by the PCB designer, and if so, why? edit: changed graphic to highlight representative vias. Blue circle - solder mask (gold-colored) Red circle - no mask (silver colored) <Q> The advantage of leaving the vias uncovered is you can probe them with test probes without having to scrape away the solder-mask first. <S> The advantage of covering them is reduced risk of shorts or solder-stealing. <S> Personally I tend to start with them uncovered, but then cover the ones close to components. <S> I wonder if in your case the designer has made them covered by default on the power/ground nets, but uncovered by default on signal nets. <S> That could make some sense as power/ground vias are less likely to need to be probed and are more likely to be in tight locations. <A> Yes, it's a choice in most PCB design software. <S> It might be a default choice or it might be a deliberate choice, you'd have to ask the designer. <S> Sometimes vias double as test points (in which case they are specified without solder mask), but at first glance, I don't see evidence of that in the sample. <S> The board appears to be Organic Solderability Preservative (OSP) finish, which would not be great for test points. <S> ORP is used in high volume consumer electronics because it's cheap (no gold). <S> Here is a PCB with ENIG (electroless gold over nickel barrier) finish that has both kinds of vias/pads. <S> As you can see, the tenting is not always perfect sometimes it pulls away around the edges of the holes. <A> I'd like to know if the "missing" solder mask is a deliberate choice made by the PCB designer, and if so, why? <S> I have all of my vias made with the solder mask removed, and unless there are size limitation from needing lots of vias in a small space, I make them the size of 34 gauge blue wire. <S> This makes it easy to solder in wires for test monitoring equipment, like an oscilloscope. <S> If I have soldermask on the via, I have to remove it with an exacto knife. <S> Vias also make great points to stick digital multi meter probes in (if they have no solder mask)
The main reason would probably to have something to solder to or test points. It's an option in most PCB design software, both as a default and on a per-via basis.
Brushless motor design with additional separation layer at the air gap As a thought experiment, I was thinking about how to actuate an passive impeller inside a tube from outside, contactless. Imagine a tube equipped with an impeller inside it. The impeller is mounted in a passive way such that it can freeley rotate around the tube's axis. That setup can be used to generate air or water flow for example but the impeller has to be actuated in order to do so. What I was thinking about is to mount permanent magnets at the impeller's tips and surround the tube outside with a stator containing many electromagnets. The interesting question here is how does such a setup behave knowing that additionally to an air gap (in the case we want air flow generation), we have now an additional layer of material separating the rotor and the stator (the tube's material). Does the tube's material play a role? If yes, what are the properties of that material that have an effect (magnetic permeability? magnetic capacitance?, thickness?), I can imagine that it would behave differently when using PVC, Stainless Steel, Iron, Copper. How does the performance compare to a normal brushless motor? Which affects the system's performance more: the increased distance between stator and rotor, or the additional material layer between them? Do such actuation systems already exist? If yes how are they called? <Q> Yes, these drive systems exist. <S> If the separation material is non-conductive, then the effect is no more than an additional airgap. <S> The effect of an increased airgap is to require more H field (longer or stronger magnets) to get the same B field in the gap, or conversely you get a lower B field for the same expenditure on magnets. <S> This results in a different Kv, and a small reduction in efficiency. <S> If the separation material is conductive, then it will slow the rate of change of magnetic field due to circulating currents within it, limiting the maximum speed of the motor, and it will get hot, reducing efficiency. <S> Stainless steel is the metal of choice, as it has a much higher resistivity than copper, and high alloy grades are essentially non-magnetic. <A> In the event that the sleeve is stationary and attached to the stator, PVC, ceramic, or other nonconductor will have the same effect as an increased air gap. <S> A magnetically permeable material will act as a flux path for the stator teeth "shorting out" the field and significantly degrading motor performance. <A> There are drive systems that have a rotating magnet that couples with the driven magnet on the other side of a stationary casing - Here's an example of one from Iwaki <S> Alternatively the rotating field can be generated by a stator assembly, exactly like any regular motor, with either a non-conducting sleeve, or a low-conductivity metallic sleeve. <S> The advantage of the metallic sleeve is that they can be far thinner than most non-conducting sleeves, so the additional airgap penalty is small, but is balanced by eddy current losses. <S> On small water pumps for circulating water heating systems, the sleeve is often brass, and the rotor is a typical induction machine rotor. <S> For more exotic (higher speed or high power density) applications, such as in aerospace, steel or nickel alloys are used. <S> Here's one used in an aerospace application. <S> The sleeve (34) between the stator (28) and fluid-filled bore in that application is a PEEK material (if I remember correctly). <S> This one is a BLDC motor with a pump attached that circulates glycol coolant. <A> The pictures below show a pump similar to the design described in the question. <S> The pump impeller is connecter to the rotor. <S> The rotor is a permanent magnet. <S> The nails held by the rotor demonstrate the location of the magnet poles. <S> The opposite end of the shaft fits loosely in the motor housing. <S> Water is discharged radially through slots in the pump housing. <S> Motor Rotor and Pump Impeller <S> The motor stator is completely encapsulated inside a plastic housing. <S> A tube molded into the housing extends through the stator. <S> It presumably fits tightly through a hole in the stator iron. <S> The "air gap" consists of the thickness of the plastic tube and the water between the tube and rotor. <S> The shape of the stator housing suggests that the coil is wound around the stator laminations off to the side and the laminations extend to surround the rotor to form a "C-frame" stator. <S> Motor Stator and Pump Housing <S> This pump is used for an aquarium filter. <S> Pumps like this are probably sold in a lot of retail stores that sell pet supplies.
A conductor like non-mag stainless steel or copper will work, but eddy currents from the rotating magnetic field will lead to losses in the tube and some heating of the tube, so if you use this approach non-magnetic stainless is preferable to copper because of its higher resistivity. The impeller and rotor turn on the shaft which is supported by a structure in the center of the plastic ring that directs the inlet water.
LED brightness stability issues - how to fix? I am performing an imaging experiment in which LED stability is critical. I use 2-3 red LEDs to illuminate a surface while imaging that surface. In each LED circuit, I use a constant-voltage laboratory power supply (typically 11 V / 0.05-0.10 A) and a buckpuck LED driver to achieve constant current. The buckpuck's output current is adjustable using a 5k potentiometer between the REF and CTRL pins (higher resistance = higher current output = brighter LED). The circuit diagram is illustrated below. The LED itself is attached to a heat sink to avoid overheating. Despite this, I am still having issues with LED instability. Does anybody have any suggestions to make the LED brightness more stable? Here are the specific components I am using: Power Supply: TENMA 72-7245 Dual Output Power Supply LED Driver: LuxDrive 1000mA Buckpuck 3021-D-E-1000 LED: Osram LRW5SN Platinum Dragon Red 625nm LED Potentiometer: Bourns 3590 Precision Potentiometer, 5k 2W 10-turn linear wirewound Any help is much appreciated! Thank you. EDIT: Thank you for the feedback so far. Ideally, I would like to avoid large changes to the circuit design if at all possible. Given that, would the following things help reduce high-frequency noise at all? Grounding. I'm not really sure how to properly ground this circuit, or if it needs it. Decoupling capacitors. Could a capacitor between Vin +/-, LED +/-, or CTRL/REF reduce high frequency fluctuations? <Q> Ditch the buckpuck and run the LED off of the constant current mode of the LAB supply. <S> If it is more steady then it's probably the buckpuck. <S> If you really need stability an LDO is probably the way to go in constant current mode (except the load would be the LED, and you need to deal with thermal issues of the LDO): <S> High Side Constant Current Source <S> Here are some other cool ideas for stabilty: www.ti.com/lit/ug/tidu922a/tidu922a.pdf <A> You may need a pulsed current burn-in period to burn off electrode interface impurities and then optical intensity feedback such as used in lasers. <S> Stability is defined over different time intervals. <S> What are you specs? <S> What were your results? <S> I assume you have checked ripple current if this is your problem, use an LDO for a CC source , allowing for LED thermal stability. <S> Even a fixed power series resistor with CV on your power supply would be better. <S> to drop 1V. <S> That will stabilize in a minute with temperature. <S> Efficiency also depends on temperature. <A> The LEDs you are using are about 10 years old. <S> At 1000 mA your LED's forward voltage is 2.7 V and generating 2.7 watts. <S> What is the temperature of the LED's thermal pad? <S> Can you hold your finger on it for an extended period of time? <S> Being connected to a heatsink may not be sufficient. <S> You need substantial thermal management at 1 A. Red LEDs luminosity is very sensitive to heat. <S> You can lose up to 70% flux due to heat. <S> In 2008, when these LEDs were developed, the LEDs manufactured on the same wafer had a large differences in their performance characteristics. <S> Different luminous output. <S> Different relative Luminous Flux (both current and temperature. <S> So two, especially red, LEDs with same current will very likely emit amounts of flux. <S> I'm not sure by what you refer to as "stable". <S> I really need a better explanation than just "instability". <S> The human eye cannot easily detect a difference in luminous intensity very well <S> so I doubt that is the issue. <S> If do you mean the flux of a single LED fluctuates or if the difference in flux between two LEDs varies too much. <S> I suspect the temperature is too high. <S> You are pushing the LEDs to their limits if you run at 1000 mA. <S> The lab supply may not have enough power. <S> I would suggest you run the buckpuck where you can hold your finger on the LED without getting burned. <S> looking into an LDO long-term if the simpler solutions don't pan out. <S> I will try the capacitor between supply leads, and I will also try twisting my wires <S> I doubt caps (or twisting wires) <S> will help a constant current source. <S> The Buckpuck is a fairly decent (not cheap) CC supply and doubt it is causing the instability. <S> If find the lab supply specs a little troubling: 11 V / 0.05-0.10 A Try powering the buckpuck with a battery. <S> An adjustable LDO, one for each LED. <S> If you set the LDO's max output at 2.8 V, then you do not need a resistor. <S> You can adjust each LDO's output for the desired luminous intensity. <S> Or you could use a 3.3 V LDO for all the LEDs and use a different resistor for each LED.
Another thing to do would be to check the voltage supplied to the buckpuck, some of these cheap lab supplies dont have a very steady output. The LDO is a good approach. If you need the luminous intensities to match, then you may need a separate current source for each LED.
Concept of ground near negative terminal What's the point of having the ground near the negative terminal when the electrons would just then flow out of the circuit into the ground? Since there is already a potential difference between the positive and negative terminals, what's the point of a ground at all? For example: Why would ground be on the right? That means in technical current direction, the current would go to the ground and not to the negative terminal and there would be no potential between the ground and the negative terminal... <Q> The ground symbol does not necessarily indicate a physical connection to the earth - and even if it did, that connection would not "suck all the electrons away". <A> Ground defines where 0 volts is. <S> So you cannot place it at the 'negative' terminal, otherwise it would be 0 volts. <S> For example, if you place 0 V near the '+' side of a 9 V battery, that side will be 0 V, and the '-'side of the battery will be -9 volts. <S> If you place the ground near the '-' side (normal way), than the '+' side is +9 volts and the '-' side is 0 volts. <S> If you place two resistors in between the '+' and '-' side and place ground between the two resistors, than (assuming the resistors have the same value), the '+' side will be +4.5 volts, the ground in between the resistors 0 volts and the '-'side will be -4.5 volts. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> What's the point of having the ground near the negative terminal when the electrons would just then flow out of the circuit into the ground? <S> No, if you measured the current with a meter on ground, you would find that there is no current flowing from this circuit to earth. <S> Why? <S> because all currents must flow back to the battery. <S> A current needs a loop and current flows back to the source. <S> Since there is already a potential difference between the positive and negative terminals, what's the point of a ground at all? <S> In this case, for reference. <S> If this circuit was detached from ground, you wouldn't know what the voltages were with respect to ground. <S> It enables you to call 0V the same as earth ground. <S> This can be nice if you have other devices that are connected to ground. <S> If this circuit is in the air, the whole circuit could be floating to different voltages (but they would be the same with respect to each other. <S> In calculations, you need a ground, if there is a system of equations, you need a zero point or it becomes difficult to solve the system of equations. <S> Why would ground be on the right? <S> It doesn't need to be, you could put it anywhere in the circuit, the voltages would be different (relative one to another) but the currents and powers would all be the same. <S> It would be a great exercise for you to solve this circuit by putting the ground at different points and solving for all voltages and currents. <A> You have heard from somewhere that grounding sucks the electricity. <S> I have heard it too and even said it. <S> It's true for static charge. <S> If I happen to collect it for ex. by walking on a plastic floor and later touch a waterpipe or other to ground connected non-insulating object, a spark jumps from my hand. <S> That's because the earth has a huge capacitance against the infinity, it can easily sink the small amount of free charge that I happen to carry. <S> The free charge I carry tries to diverge because the charged particles push each other away. <S> Its counterpart somewhere on the floor surely leaks off at least when the floor is washed. <S> Insulator materials such as plastics can catch or inject electrons when their surfaces are rubbed. <S> That's the static electricity. <S> The rubbing generates a thin transition zone between two materials where some free new molecular orbitals exist for electrons and those which have enough energy to float freely, can occupy the available new states. <S> A battery and a circuit is different. <S> There's no charge unbalance, nothing tries to jump out of the circuit - if some electrons happen to escape (for ex. <S> due thermal vibrations) <S> , its positive counterpart which is still in the circuit generates finally <S> so much pull that no more electrons will escape. <S> Thus, if you connect one point of the circuit to the earth, it will not suck the electrons off because none tries to escape. <S> Term ground in circuits generally doesn't mean earth. <S> It's only a name, a point which is the reference point for the voltages of all other points in the circuit. <S> All voltages are between two points, but for convenience and making designs radically easier, we generally have one point named GND. <S> Then we can easily write "this point XXX has voltage YYY volts". <S> Physically YYY volts is still between XXX and the agreed GND and a voltmeter to see it must be connected between XXX and GND. <A> Just to address one of your misconceptions in the comments: If electrons are not being "sucked away" to a true earth ground, what is making electrons go to an earth ground from, say, a house? <S> Especially when the earth is assumed neutral. <S> Stop thinking of "electrons". <S> Think of current. <S> Current flows in closed loops. <S> If the loop is open circuit no current flows. <S> There is only one earth connection on your circuit <S> so there is no return path out through that connection and back to your circuit. <S> Therefore no current will flow. <S> Electrons don't get "sucked away". <S> Why do you think they would? <S> Current only flows in a house earth wire in the event of a fault. <S> Further reading: <S> Figure 1 from my answer to <S> How does ground mains work? . <S> Actual electric potential at terminals of battery positive vs negative, power vs ground, flow direction
In most circuits the ground symbol simply indicates the point in the circuit that we will consider as "Zero Volts", and will use as a reference when measuring voltages elsewhere in the circuit - it is where we place out black meter lead when measuring voltages.
Low temperature batteries for use in Arctic I've been checking the forum and Google but still haven't got precise solution to my current question. In short, we are looking for rechargable batteries for Arduino that survive under -40 Celcius degrees. Our group is going to deploy several sensors in the Polar Region, Arctic, to study the permafrost. These sensors are dispersed in the area around a community, within some kilometers. The data collected by the sensors are to be saved with Arduino-based nodes, and then uploaded to cloud for quasi real time. Hence, the Arduino modules serve as dataloggers and LoRa nodes. In the community, we've got power line to power up the LoRa bridge. But all the end nodes out of community cannot access AC power source. Lacking a source of power, the end nodes rely on batteries and solar panels. There are several considerations here. For example, sensing and LoRa transmission need to be set to very low frequency, like, once per 15 minutes, to reduce the power consumption. We would set it via programming, and set Arduino to sleeping mode for the rest of the time. Here comes the question I'm having trouble with: What kind of battery and solar panel should we use? The temperature on site is very low, going to -40 celsius degrees in deep winter. Most commonly used battery types cannot survive these temperatures. We also need the battery to be rechargable, which could be charged with solar panel (of course, mostly during Spring to Fall while there is sunshine.) Our technician used lead acid batteries in the past but the performance was marginal. The batteries on some sites were severely damaged and even broken during winter.And solar panel and power source regulator? We plan to shorten the operating time so we can reduce the size and cost of solar cells, but still, we need them to stay alive. Any suggestions? <Q> Check out the Israeli company Tadiran. <S> Maybe you can combine the primary cells with rechargeable cells to extend the life, just ensure that the storage temperature of the rechargeable cells includes your lower limits. <S> You could also consider insulating the battery and using some of the battery power to keep the battery itself warm enough. <S> This could cause problems with overheating during charging conceivably <S> but maybe slow charging is acceptable since more hours of light are available when the temperatures begin to rise. <S> This also works for LCD displays that need to work in extreme cold (film heater attached to the back of the display). <S> There might be a fix with a damper and/or ducted fan too. <S> The ultimate solution is an RTG , but that's probably impractical for you. <A> Instead, use something like Energizer Ultimate Lithium batteries (not rechargeable) which operate down to -40 and up to 60C. <S> My thinking is that you will have many months of time you need to operate without solar power anyway. <S> So you will need a big battery. <S> How much smaller can the pack be if you use rechargeable and add solar? <S> Is the solar really going to improve your system design? <S> Here is a link to the battery technical data sheet: <S> http://data.energizer.com/pdfs/l91.pdf <S> Here is an excerpt from that data sheet showing the relationship between temperature and capacity: <S> At the very minimum, you should calculate how many of these cells you would need for your project without solar, and decide if it is reasonable, rather than rejecting it without consideration of the details. <S> It will be difficult to have something work reliably, unattended in that environment. <S> I think eliminating solar will be a big win for system reliability, if it is possible. <A> Many years ago (47) we used carbon batteries in a couple of Navy sensors I worked on. <S> We were able to recharge them, but I don't know how efficient they were. <S> When Alkaline batteries became available we tried them and found they freeze and burst at -17 <S> F. <S> Just a thought...
The carbon batteries worked no matter how cold the sensors got. Some Lithium primary cells are rated for military temperature range (down to -55°C). I suggest that you reconsider using rechargeable batteries.
How is dynamic resistance of a diode modeled for large voltage variations? The resistance of a diode changes with the voltage across it which is called dynamic resistance. If the voltage across the diode is constant we can find the dynamic resistance from the slope of the I-V curve. So for small variations we can use that dynamic resistance value in the diode model. But if the voltage across the diode varies a lot like in a AC to DC rectifying diode, I guess we cannot just model a diode’s dynamic resistance with a constant series resistance. If we want to formulate the diode current in such case how is the diode dynamic resistance modeled? Here aren’t we facing a non-linear resistor? <Q> The concept of dynamic resistance is a derivative: \$ r = \frac{dv}{di} \$ <S> As such, it only applies to variations of current and voltage that are small enough to allow us to neglect the non-linearity and use a linear model for the diode. <S> But if the voltage across the diode varies a lot like in a AC to DC rectifying diode, In this case, a linear model can't be used to model the diode's behavior over the whole waveform, and the concept of "dynamic resistance" which is a part of this linear model does not exist, so you'll have to use the diode equation. <S> If you only look at a specific point in time on the waveform, then you can calculate dynamic resistance at this point, depending on the value of the current at this point. <A> It's nonlinear but still very simple and easy to solve numerically. <S> The diode model used in SPICE has more than a dozen parameters. <A> Yes, for slow enough changes in bias, a diode can be modeled as a nonlinear resistor. <S> For faster changes you must also consider the diode's capacitance, which is also bias-dependent. <S> Simplifying a lot, the simulator has to keep updating the value for the dynamic resistance as the simulation evolves.
You can model the DC I-V characteristics with the Shockley diode equation over a fairly wide range of currents, especially if you include an accurate ideality factor and some series resistance.
How to add a low pass filter to this non-inverting amplifier circuit? I've come up with this simple circuit as an amplifier before an 8bit ADC which receives audio signals. R2 is actually a variable resistor (pot.) of 100k. The circuit also biases the signal to VCC/2 and uses large resistors to set the input impedance is pretty high all over the working audio frequency range. This works well for my application, however I would like to add a single low pass filter stage to this amplifier so I can remove some high freq. content that I would not be able to sample. How to approach this without having to use another op-amp and without changing the characteristics of the circuit in the spectrum I would like to pass? <Q> The correct approach is to choose a LPF and sampling frequency such that the maximum signal at fs/2 is less than your ADC resolution. <S> This means you need a brick wall filter at 3x <S> your -3dB BW or 128 x faster sampling rate than your signal <S> -3dB BW for a 20dB decade filter for an 8bit ADC... <S> not 2x faster with a 1st order filter. <A> Put about 1k in series with C1 and a cap in parallel with R3. <S> 800 ohms and 0.01 uF will give about 20kHz. <S> But this is only a first-order filter, not very useful, as SunnySKyGuy says. <S> Edit: this assumes that the driving impedance is low. <S> If not and you know what it is, then just put an appropriate cap. <A> Add a low pass filter to a non-inverting amplifier circuit. <S> This image is from this calculator which may help you pick your filter component values easily. <S> The low pass filter is R2C2 in the image above and is buffered by the opamp reducing the interaction of gain and filter components.
Without giving it much thought you already have a high pass filter on the input, and the simplest way to apply a low pass is to use the output of the opamp.
Physics of Dirty Electricity? I've been reading about "dirty electricity" lately and while I know there's much controversy whether it causes adverse health effects this question is not about that subject. I'm simply trying to understand the facts and physics regarding "dirty electricity". According to GreenWave Filters (which produce and sell filters to "remove" dirty electricity): Dirty electricity is erratic spikes/surges of energy traveling along power lines and wiring where only standard 60Hz AC electricity should be. It is created by electronics, energy-efficient lights, and many other devices, as they manipulate electrical current to operate. Dirty electricity can circulate throughout a building and to other buildings, radiating potentially harmful EMFs as it goes. 1) What exactly is "dirty electricity"? Based on the above text, I understand that certain devices may draw electricity in aberrant ways causing it to spike/surge. What do we mean by electricity "surging"? 2) Do devices that generate "dirty electricity" contaminate all of the wiring in the wall? Or is it just around the outlet they draw power from? Or perhaps just around the device itself? If it does contaminate everything, how does the electricity from the device go back and contaminate the wiring in the whole house? 3) Most importantly, does this "dirty electricity" somehow radiate outside the walls (like WiFi) or is it something that just effects the flow of electricity in the wires? If it does radiate, does it radiate in a single frequency or multiple frequencies? Finally, does the amount of "radiation" depend on the amount of energy drawn by the device? Is there a way to measure it? I understand it may seem like I'm asking several unrelated questions but I think all of my questions stem from a lack of understanding of the simple physics of dirty electricity. I think that if I understood exactly what dirty electricity is, all of my questions would be answered. This is why I'm asking it as one question. P.S I realize there are other threads on stackexchange that address some of the health concerns related to "dirty electricity". Once again, my question is not related to health. I'm just trying to understand the physics of how it all works - what creates it, where does it exists etc. Also, this question seems to address how dirty electricity effects electronics plugged into the wall but of course we are not plugging people into the outlet. So I'm trying to understand the physics of how it interacts with humans. <Q> The language used by the sellers of this device is not particularly scientific. <S> It appears likely to be a placebo device marketed to (self-described) sufferers of " electrosensitivity ". <S> There is no scientific basis for these claims, and this device is unlikely to have any real function. <S> The advertisement and sale of such devices has been prosecuted in some countries under false advertising laws . <S> There is some limited truth to the concept of "dirty electricity" in relation to electrical devices , but it bears little relation to what appears in the marketing information for this device. <S> Most notably, it does not have effects on human health, and cannot be effectively filtered by a plug-in device of this nature. <A> What exactly is "dirty electricity"? <S> This term isn't a technical one. <S> We might say a power line is dirty if its voltage doesn't vary according to the 50 or 60 Hz sinusoidal waveform we normally expect. <S> I understand that certain devices may draw electricity in aberrant ways causing it to spike/surge. <S> What do we mean by electricity "surging"? <S> It's normal (not aberrant) for some types of loads to draw current in frequent short bursts. <S> If the device is not designed correctly, this current might need to travel along the mains wiring to reach the device. <S> But any device you buy from a reputable seller in a first world country should be tested for conducted emissions , which will limit the amount of quickly changing currents it can draw from the mains. <S> Even if the device requires quickly changing currents internally, these can be delivered from capacitors inside the device rather than from the mains, if the device is well-designed. <S> What do we mean by electricity "surging"? <S> A surge is a relatively long-lasting increase in voltage on the mains, compared to a "spike". <S> A "spike" might last a few milliseconds. <S> A "surge" might last for 100's or milliseconds or a few seconds. <S> Do devices that generate "dirty electricity" contaminate all of the wiring in the wall? <S> As mentioned above, well-designed devices will not. <S> Also, even if they do, there will be no permanent "contaimination" of the wiring in the wall. <S> Most importantly, does this "dirty electricity" somehow radiate outside the walls (like WiFi) or is it something that just effects the flow of electricity in the wires? <S> Rapidly changing voltages or currents can cause radiation in the form of radio waves. <S> Exactly how much they radiate depends on the frequency content of the voltage or current waves, the exact geometry of the wires, the presence of nearby conductive structures, etc., so it is not easily predictable. <S> If it does radiate, does it radiate in a single frequency or multiple frequencies? <S> In whatever frequencies the voltage/current signals contain. <S> Finally, does the amount of "radiation" depend on the amount of energy drawn by the device? <S> Not in any predictable way. <S> Is there a way to measure it? <S> You could use an antenna and spectrum analyzer to measure whatever radio signals are present in a certain area. <A> The old style flourescent lights, in which an arc has to re-strike at 120 Hertz, creates dirty (high-frequency content) energy on the local power lines. <S> The fast risetimes of the arc, perhaps 10 microSeconds, (on scopes I've used, holding the scope probe tip up toward the tube some few feet above the lab bench) gets converted into radio waves by the wiring inductances and capacitances around the area, including all the way back to the power transformer. <S> Microwave ovens, rectifying 2,000 volt power using silicon diodes that quickly turn on under high-slew-rate conditions, are a fine "dirt-ier" of all around.
IMHO in any system with sparks (motors) and arcs (flourescents) and rectifier diodes (any power supply), the area will be dirty, and the seeker of high-resolution measurements or of quality radio performance (AM and FM) or or wide dynamic range concert music, will have to use substantial filtering to prevent intrusion by the electro-magnetic "dirt".
What current should I choose in bench top DC power supply? Most of the time while I'm doing my university projects, I find that only voltage requirements are given for building a circuit, and how much current I should supply from a bench-top DC power supply is not given. Normally, if we require 5V supply, we set the current to some small non-zero value only ,like it's not important. So I'm wondering if anyone knows the importance of which current to set. <Q> The answer to this depends on the load of the Power Supply (PS). <S> If you feed chips (gates, sensors, etc.) <S> you must provide the nominal voltage, which is given by the manufacturer. <S> In this case, the current that the circuit draws is not up to you, but it depends on the circuit impedance. <S> If it starts to draw, say 1 A, you have made a wrong connection, so you have a soft or hard short-circuit. <S> In other words, the current limiter is to protect the circuit from a wrong connection and don't burn everything. <S> But most PSs can provide constant-current (CC). <S> For example you can max out the voltage and turn the current knob to zero. <S> If you connect a LED, by turning slowly the current knob you can feed the LED with 10mA, without any current-limiting resistor. <S> The same goes for a DC motor. <S> You can provide CC to it, so it will always develops the same amount of torque on its axis. <S> Keep in mind that we can only directly control the voltage. <S> Current can be controlled, but it requires a feedback loop which measures the output current and increases or decreases the output voltage accordingly. <A> Usually using a bench-top supply to power a known device that requires a fixed DC voltage is not much different from powering it from a wall-wart, except that you can limit the current to a more reasonable value in case of a short or circuit malfunction. <S> This is very useful when the device is under development. <S> A wrong connection or a short can burn out the device, so you'll need to replace it. <S> The bench-top supply can usually save you this hassle. <S> To spell out an example, let's say I've made a simple circuit with a MCU and some other minor functionality (e.g. reading a sensor and reporting it via serial). <S> I'll know that the MCU draws 1mA, the sensor is 15mA, so I can dial in 16mA as the limit. <S> To have some headroom, I'll typically set more, <S> e.g. 30mA. <S> When I turn on the circuit, if the supply says "16mA current draw", then it's all fine. <S> If it says 30mA, then it's "whoops, let's see what I've wired wrong". <S> If I used a 5V 1A wall-wart, and I've made an error, the device would possibly be fried before I can react. <S> As thece says, the current-limiting function of the bench-top supply can come in handy for other types of loads, like LEDs, lights, motors or batteries (you can use a bench supply to charge a battery <S> , you have to be careful, but it's easily doable). <A> I like the current limiting feature of my bench power supply. <S> It is a very nice safety feature. <S> Not for my safety, but for the safety of my circuits devices. <S> I tend to keep it low. <S> Usually 30-50mA, and the power supply output voltage display will indicate low when the current limits out as an additional warning that current is being limited. <S> I can always turn it up if need be <S> but I tend to err on the conservative side of current limiting. <S> FWIW
The reason you set the current limiter to some non-zero low value is that you expect that it will draw some small amount of current.
USB Type C 3.1 PD to get DC20V output I have a USB Type C notebook charger. I know it can supply 20V with 2.25A for my notebook. If I have a type-c breakout board, like this: https://www.ebay.com/itm/USB-3-1-Type-C-Female-to-Female-pass-through-adapter-breakout-USB3-1-CF-CF-V1A-/254173573546 And I know the pinout: What can I do to get DC20V between A1 and A4 (and of course between B12 and B9?) <Q> All answers are severely misleading. <S> Now, the Power Delivery specifications (614 pages) are as long as the entire USB 2.0 specifications (622 pages). <S> The negotiating protocol involves hundreds of messages over 300 kbps link that is as complicated as USB, and the number of protocol states/stages are in order of 200. <S> Starting from a background of bare Type-C pinout and even buying specialized IC is a far-far complex task. <S> The mentioned specialized ICs are providing only the physical level interaction across CC links, and at most provide packet service. <S> The entire negotiation protocol and "policies" are implemented over a general purpose MCU, and implementation of all these crazy polices takes thousands lines of code ("just as your laptop does"), so an advice to DIY the protocol interface at OP's level is misleading. <S> However: What shall I do to get DC20V between A1 and A4 <S> you shall buy a ready-to go board called "USB PD trigger", like this one : <S> The board has at least 5 ICs including ARM 32-bit MCU chip, so it will be a challenge to make another one for this price tag. <A> The default voltage on a USB 3.1 port is 5V just as in USB 2.x. <S> To set <S> the port current or voltage level requires use of the Power delivery Interface. <S> Read the spec at USB.org or download the spec from Microchip .The protocol is covered in section 1.8 for the descriptor and consumer packets. <S> In short to get the USB3.1 port to supply 12 or 20V you must negotiate over the USB PD protocol just as your laptop does. <A> This whole mechanism is called USB Power Delivery (USB-PD). <S> It's actually a pretty complex standard, even by modern means! <S> So, you'll need some kind of logic (a chip) that "speaks" that protocol to your laptop charger. <S> After they successfully negotiated that, yes, you'll get a lot of power, you get that on the VUSB line. <S> However, you MUST NOT use the second USB port on your breakout board in that case – obviously, whatever would be attached to that, would never expect the 20V that come, and has a high chance of frying. <S> The USB-PD protocol is, on its lower levels, very similar to Ethernet (whyever) but on different voltage levels with different speeds, and thus pretty complicated to do with a microcontroller. <S> That's why you'd typically buy a dedicated USB-PD controller IC that integrates all the logic into one. <S> So, all in all: <S> What shall I do to get DC20V between A1 and A4 (and of course between B12 and B9)? <S> Then, you also buy the evaluation board for that chip, because it's non-trivial to get started with the chip if you need to add all the external circuitry it needs. <S> At that point, your breakout board becomes superfluous.
You buy a chip (for example, ST builds such chips) that does the USB-PD for you. You can't get any other voltage than the default +5V without Power Delivery negotiations.
Epoxy Resin Molded vs Hermetically Sealed Metal Can Packaging for LEDs and Photodiodes Between epoxy resin molded vs hermetically sealed metal can packaging for photodiodes and LEDs are there any relevant functional differences I should be aware of when selecting between otherwise seemingly identical photodiodes or LEDs? The can offers potential flexibility for lens/filter options while the molded packaging is obviously lower cost. It seems to be a toss up which is actually more mechanically rugged and environmentally stable since one case is entombing/encapsulating in a more permeable material while another is being placed inside an impermeable material. I guess the metal can packaging would also handle higher temperature. Are these the only significant differences? LED Example: https://dammedia.osram.info/media/resource/hires/osram-dam-5580407/SFH%204550_EN.pdf https://dammedia.osram.info/media/resource/hires/osram-dam-5723400/SFH%204851_EN.pdf Photodiode Example (not quite as identical as the LED example): https://www.marktechopto.com/pdf/products/datasheet/MTD5010N_2011_07_20.pdf https://dammedia.osram.info/media/resource/hires/osram-dam-5488355/SFH%20213_EN.pdf <Q> The main purpose of the metal housing is to secure a lens used for directing light into the photodiode or out of the "point source" LED, as well as block light from entering or leaving in the wrong direction. <S> Those devices are used mainly for optical sensing and instrumentation applications due to their narrow radiation pattern. <S> The metal housing could be a good heat dissipator. <S> But considering those devices are orders of magnitude more expensive than their non-canned version, I'm pretty sure a good designer would look for better and cheaper ways of keeping the device cool. <A> Hermetic sealing (if it's for real) is, well, hermetic. <S> Epoxy molded packages can allow atmospheric contamination to creep into the package along the leads -- this is why some chips come packaged with desiccant packages; because water can condense (or, more likely, adsorb onto the inner walls) inside the package and cause a steam explosion when soldered. <S> If it's on a board with a bunch of typical components, then you probably don't care about that part. <S> If it's on the end of some long cable in a harsher environment than the signal processing electronics -- maybe you do. <A> It all depends on your application specs. <S> The optical design is most important to achieve the aperture required for reflection at some range and avoid scatter unless required. <S> Optical clear epoxy comes in different grades and is somewhat hydroscopic on the interface. <S> For cooling , if required, the cathode lead is the heat conductor to your ground plane.
The metal encapsulation offers shielding immunity for high impedance loops from magnetic fields.
Finding short-circuit across 3.3V power rail and ground rail on PCB I have a short-circuit between my 3.3V and ground power rail on my assembled PCB. How do I find where the short is? Should I start by removing components one-by-one from the board? <Q> I have a short-circuit between my 3.3V and ground power rail on my assembled PCB. <S> How do I find where the short is? <S> See below. <S> Should I start by removing components one-by-one from the board? <S> No!!! <S> This should not be necessary. <S> See below. <S> Summary: <S> Voltage drop along track sections will lead you to a fault. <S> It helps if I_fault is > <S> > <S> I_no-fault. <S> Detail: <S> A very useful "trick" is to use a voltmeter set to the most sensitive range available (and sometimes a very low current range may serve the same purpose) to determine where current is flowing by measuring voltage drop along tracks. <S> Imagine <S> a track A-B-C-D with V+ applied at A and various components and other tracks comnnected to it. <S> Imagine that the short is on a sub circuit connecting to ABCD at point <S> C.The sub circuit is C-E-F-G with short circuit at point <S> F. Measuring voltage on ABCD from A to D gives a voltage drop due to current flow along the track. <S> With the fault current leaving at C, V_A-B and V_B-C will be similar and positive. <S> BUT V_C-D will be much smaller as the fault current will not be in the C-D section. <S> In this case the direction of current flow is clear, but if a random section of track X-Y is tested, if V_X-Y is <S> positive then current is flowing from X to Y and <S> if V_X-Y is negative current is flowing from Y to X. <S> In this case the short circuit has been localised to sub circuit CEFG. <S> As above V_C-E and V_E-F will be similar but V_F-G will be much smaller as fault current is not flowing in FG. <S> If the fault is to ground, as it is in this case, the measuring from various points to ground will give decreasing voltages as the fault is approached physically. <S> Once the general method is understood logical extensions can easily be derived. <A> First, verify on a blank board that it is not actually the board itself (make it a habit to measure the resistance between ground and power rail on every new PCB layout for this BEFORE you start soldering, especially if you don't have extra blanks to test after you finish soldering). <S> The second step I usually do is is visually check all the decoupling capacitors since they usually are the majority components connecting the power and ground rails. <S> The caps are usually big enough that you can see if there is a bridge on them. <S> If you still can't find anything it starts to become a crap shoot. <S> Rather than removing components, it is usually easier to just reflux and remelt all the fine-pitched solder pins in situ (by dragging your solder iron across all the pins via the drag soldering method) and hope you accidentally fix the short. <S> A desperate measure I sometimes take is I run a high current through the board and look at it under a thermal camera (or slowly scan the board with an IR gun) and hope that enough detectable heat is produced where the short occurs. <S> If I really want to remove components, I start with the decoupling capacitors in case one of them failed short, but removing components is an absolute last resort. <S> You might skip looking for a solder bridge if you know the short is because a component failed during operation rather than a bad soldering job. <S> You might want to make it a habit to measure the resistance between your power rails and ground every few components you solder so you can fix things as soon as it happens and you won't have to try and find a needle in a haystack. <A> Copper foil of the default thickness (1 ounce/square foot, 1.4 mils or 35 micron thick)has resistance of 0.000500 (500 microOhms). <S> 1 amp thru that square of copper (for example, <S> a trace 1mm by 1mm) causes 500 microVolts drop. <S> Two squares, at 1 amp, is a millivolt. <S> Some DVMs will easily display that small a voltage, accurately.
The third and last step before I start getting desperate is to look at all adjacent ground and power pins under an eye loupe for a solder bridge or a misaligned pin that touches both ground and power trace.
Motorbike turn-signal blinker starts OFF, I want it start ON I bought a cheap blinker that claims to be good for LED bulbs (so the frequency is independent of the load.) It is true, but it has a flaw: the lamps go ON only after about a half second from when I turn the switch, which I don't like at all. I want my turn signal going immediately ON and then blink. I opened the blinker, and this is what the schematic looks like: Falstad circuit simulator I used Falstad to try and understand the circuit and get a solution myself before asking - without result. How could I modify the circuit so the lamp starts ON? Please note that I have no other wiring other than what is represented: I have no a "pure" ground wire, just the + and the wire that goes to the handlebar switch. <Q> The main issue is that the circuit starts off "dead" and MUST charge a "local" supply before it can turn the FET on. <S> IF you can bring in "true ground" then it can be done "with ease". <S> Startup time is in part related to C1 charge time. <S> Also implementing suggestion 2. <S> below will minimise the oscillator time to input low, which is needed to turn the FET on. <S> Suggestions: <S> I am not going to try to 'work these out' in detail without knowing if (literally) chassis ground can be provided or if an NC relay can be fitted in, but the following 'lines of attack' may be profitable: <S> If you can add a relay with a NC (normally closed) contact it could be used to assist startup and then be disabled by a driver. <S> The IC numbering suggests that you have an hex Schmitt inverter package available. <S> If the other gates are available they could provide the required logic. <S> Returning C2 to Vss rather than V+ MAY help somewhat. <S> 3 <S> This gets the first inverter driven on initially. <A> Could you add a normally closed relay on the indicator wire? <S> Then when the indicator line goes high the contacts will open. <S> Add 12v to the switch and your done :) <A> My suggestion would be to take the existing circuit and reduce the time constant by a couple of orders of magnitude — so that it "blinks" at a rate that's too fast to actually see. <S> This reduces the startup problem to a negligible delay and gives you your virtual "Vss" supply. <S> You can now add a second, slow timing circuit that actually establishes the visual blink rate. <S> This probably involves changing the gate that drives the MOSFET to a NAND gate. <A> Simple fix: reposition C2. <S> Connect the minus side to the minus of C1. <S> Connect the plus to pin 13 of the IC ( where the minus used to be. ) <S> This will pull the gate low when the circuit is first powered up. <S> On further thought; I think the connection of R2 will also need to be changed. <S> Cut the trace that connects to the FET and add a jumper <S> so it ,R2, connects to the pins 12-11 on the IC. <S> The FET will turn on just enough to stop charging C1 so first blink might be dim. <S> This seems to be the most doable change. <S> Parduz reports that this didn't do the trick so new configuration. <S> Move the plus side of C2 to the junction of R2 and R3. <S> I can't read the value of R3; if it is 75K it can stay, <S> but it is 7.5K <S> it will need to be replaced with a resistor between 47K to 220K; whatever you have or can obtain. <S> Then put a new capacitor in the spot that used to have C2; value will depend on the new R3, if 100K then .33uF to .47uF, <S> .1 to .22 uF <S> for 220K, etc. <S> This will hold the FET off for 30 to 50 mSec, allowing C1 to charge up enough to fully turn on the FET. <S> This won't address the complaint of too much variation in timing with voltage change, Unfortunately I am not in a position to completely re-engineer this circuit. <S> This is the most I can think of for now. <S> Further thoughts <S> : I have been assuming that C1 discharges when the blinker is off, but now realize that is not likely. <S> The oscillator will always stop in the off state and to get it to reset, both C1 and C2 must go to zero volts. <S> To do this a resistor should be connected across C1; 47K would would discharge it in about 15 seconds while causing about 10% ripple when on. <S> This is likely to make the timing variation with voltage worse, so it will be a trade off.
Try reducing C1 to as low a value as will still allow proper operation. Placing a resistor between the two inverters and a cap from inverter 2 input to V+ MAY help somewhat.
Why is the cutoff frequency of this highpass filter with formula different from LTspice? I used this online tool to play around and design a Sallen-Key low pass filter with a cutoff frequency of 0.3Hz. When I now put the resulting values for R1, R2, C1 and C2 in the formula I get exactly my desired 0.3Hz.But when simulating the circuit with LTspice, the cutoff frequency was unexpectedly at 0.46Hz. That is more than 50% off! Can anybody tell me where the difference is coming from? Am I missing something obvious? The only thing I can think of is that Spice is using numerical solutions, but the error of the calculation should never be that high! And the OpAmp shouldn't make any difference at these low frequencies either...What frequency would I probably get when acutally building the circuit? <Q> Here's what the calculator gives: The "problem" is that in the calculator the cut-off frequency seems to mean the frequency where there is a pole. <S> And with this given topology at that frequency there is 6 dB of attenuation. <S> You need to find the -3 dB cut-off frequency from the graph. <A> The online calculator is assuming ideal components. <S> If I use an ideal op amp in LT spice, I get pretty close to the same answer as the tool: <S> Freq, Mag, Phase0.30432198871077,-5.8043099990704,89.001051267349 <S> This is the answer that I get from LT spice with an ideal opamp: They are off only by 0.1dB <S> and that is probably because I can't get the exact same point on the plot (0.304321 vs 0.304735 ) <S> I suspect the input bias current is part of the problem on the OPA2337 , it being 40nA and the current through the resistor being ~2uA <S> (really depends on the waveform coming in, Mine is at 1VAC). <S> Either way with a resistor that high, input bias current can change things albeit in this case maybe 1 or 2%. <S> Another problem is some manufacturers models don't accurately show real world performance, so double check the model with the data sheet. <S> Especially input bias current. <A> Jusaca... <S> the error is on your side. <S> EDIT: <S> See the end of this answer. <S> You have mixed the pole frequency <S> wp <S> withthe 3dB-cutoff frequency wo. <S> The parts values give a pole frequency fp= <S> wp/6.28=0.3 Hz and a pole quality factor Qp=0.504. <S> Please note that the pole frequency is identical to the 3dB cutoff for a BUTTERWORTH response only (Qp=0.7071). <S> Your design with Qp=0.5 gives a filter characteristic worse than Butterworth and even worse than Bessel-Thomson (as far as the transition region between passband and stopband is concerned) <S> In your case, the 3dB cutoff must be larger (than the pole frequency) by a factor of app. <S> 1.5 . <S> Fazit : You have designed a filter for a pole frequency of fp=0.3 Hz (and NOT for a cutoff at fo=0.3 Hz). <S> This can be verified very easily : For any second-order filter the phase shift at f=fp must be 90 deg . <S> Look at the phase response - and this will be confirmed at f=0.3 Hz. <S> Here are the corresponding formulas: wp=1/[R1C1SQRT(kckr)] <S> and Qp=SQRT(kckr)/(1+kc) <S> with kc=C2/C1 , kr=R2/R1 . <S> Correction: <S> The error you have made is: For calculation of the resistors you have selected damping factor =1 (which means Qp=0,5). <S> For a correct calculation select "quality factor" Qp=0.707 and the resistors are 240k and 560k. <S> Now you have a BUTTERWORTH response with fp= <S> fo=0.3 Hz.
There's no difference in the simulation and calculation, at least none that I can see.
Driving stepper motor with H-Bridge, how many Volts? I know that stepper motors are usually driven with current-limiting chopper drivers and hence the applied voltage doesn't really matter (or does it?) and that's why specs of stepper motors don't state a max voltage but a max current instead. However, I'd like to drive a Nema23 with a SparkFun Monster Moto Shield and an Arduino Uno. This is the info I have about the motor How do I calculate the DC voltage I can apply to the VMOT of the motor driver shield without frying the motor? <Q> From the data sheet at Sparkfun for the motor shield, the absolute maximum voltage is 41 volts and the absolute maximum current is 30 amps. <S> For normal operation, input voltage is 9-16 volts. <A> Within the ample insulation rating stated, motors would be damaged by current, not voltage. <S> As already pointed out, the motor drive you want to use does itself have a voltage limit, so you want to stay well within that. <S> This is especially true if your mechanical system may ever backdrive the motor - <S> some types of power supply will see the bus voltage rise under such conditions of regeneration, so it's best to stay well within the limit. <S> Realistically, you might shop for a 24v supply, though going higher could be reasonable. <S> If your performance need is low even a 12v one may work. <S> Your driver of interest is a bit overkill for a NEMA23 frame motor. <A> There is one number which you need to get: the phase resistance of your windings. <S> Let's say, as an example, that your windings are 2 ohms each. <S> Then, for a perfect bridge, you would want an 8 volt supply. <S> 8 volts divided by 2 ohms is 4 amps. <S> Note that this will produce a motor with less torque than specified, especially at high step rates. <S> When voltage is applied to an inductor, the relationship $$V = <S> L \space <S> di/dt <S> $$ will hold, a low V means that the current in the winding cannot change quickly. <S> And, of course, your bridge will probably have some voltage drop, <S> so you'll need to use slightly higher voltage to compensate.
So within a reasonable range, voltage is just not an issue , so long as the chopping drive does not exceed the rated current.
relative price of a transistor and a capacitor DRAMs achieve high memory density by storing each bit of information with one transistor and one capacitor. That got me wondering, how expensive is a capacitor relative to a transistor? <Q> The question isn't necessarily about the relative cost of each transistor versus each capacitor. <S> Once the masks are made for manufacturing the silicon chips, a chip made purely of transistors wouldn't cost any more than a chip made of purely capacitors <S> (Excepting the number of steps in the manufacturing process, which a mixed chip would need all steps anyway). <S> The difference comes in the real estate on the silicon. <S> The simplest way to store a single bit in SRAM (Using purely transistors) requires 6 transistors, and is made this way: <S> Image pulled from the SRAM wikipedia page. <S> Alternatively, we can use a DRAM cell. <S> As you mentioned, DRAM uses one transistor and one capacitor, which means we can fit many more of these two-component storage cells onto a single chip than the six-component storage cells. <S> DRAM is cheaper because it can be made significantly more dense than SRAM, not because of the relative cost of the transistors and capacitors on the silicon chip. <A> If you're asking this question from a VLSI perspective then it certainly is going to depend on the process, but it will be a complicated question to answer. <S> It looks like a typical DRAM memory is constructed by a process that's designed to make densely packed DRAM cells, and in a modern DRAM the capacitor is built above the transistor such that they have a similar cost. <S> A more typical CMOS process doesn't have the facility to make small area capacitors like this, and is optimized to make small transistors and no capacitors at all. <S> People who may have designed or used DRAM cells or a DRAM process are likely to be under NDA and unable to talk about the particulars like cell sizes. <S> We relate area to cost because a larger silicon chip requires more materials and more effort to produce, but also because it presents more opportunities for a defect to destroy it reducing yeilds and requiring a large portion of the production to be thrown out. <A> Taken literally the question is quite meaningless since parts of a DRAM cell cannot be "sold" separately. <S> In terms of R&D effort, the single biggest investment in making a DRAM chip is the resolution of the process, which applies to all the structures inside a chip, transistors and capacitors alike. <S> Then comes the layout <S> : that's what allows packing more individual DRAM cells on a given area, and again, it cannot be attributed to only transistors or only capacitors. <S> In terms of the real estate on a chip (which defines production costs), the most important structure is the interconnect matrix (bitlines, wordlines and contacts) rather than DRAM cells themselves. <A> DRAMs ... <S> how expensive is a capacitor relative to a transistor? <S> Please see my answer as an extension to Dmitry Grigoryev's answer: <S> Your question seems to be based on the false assumption that microelectronic circuits consist of single parts the same way a soldered circuit does. <S> However, this is not the reality. <S> In reality, microelectronic circuits consists of areas where the material has a certain chemical composition. <S> If you read that some integrated circuit has about 1500 transistors, then this actually does not mean that this IC is built of 1500 parts, but it means that there are maybe 10000 different areas on the IC. <S> These 10000 different areas work like a soldered circuit made of 1500 single transistors would work. <S> I have already seen a cut drawing of a DRAM cell: It is nearly impossible to tell which area belongs to the transistor and which one belongs to the capacitor because some larger areas are both there for storing charge (capacitor) and for controlling the resistance in another area (transistor). <S> This means that these areas are both parts of the capacitor and the transistor! <S> By the way: The capacitance of the DRAM cells is very small. <S> Larger capacitances on an integrated circuit are rather expensive. <S> This is because larger capacitances require more space and the price of integrated circuits grows with the size, not with the number of parts. <S> For this reason ICs like the MAX232 don't have the capacitors built in but external capacitors are used.
If we consider only DRAM cells, then capacitors are typically larger so they are more expensive in that sense.
Using Op-Amp to amplify DC? In all the textbooks the shown inputs to Op-Amps are AC. Could one use Op-Amp to amplify a DC voltage? if the answer is no, why not? Why only transistors can be used to amplify DC, aren't Op-Amps made of transistors? <Q> Yes, you can amplify a DC voltage. <S> Many signals in applications such as temperature, pressure, weighing, etc., change so slowly that they can be considered DC. <S> The amplifiers that condition these signals will often use op-amps 1 to buffer and boost the signal level. <S> 1 <S> "Op-amp" is an abbreviation of "operational amplifier". <S> It is not an initialisation or acronym <S> so we don't write it as OPAMP. <A> An opamp can certainly amplify a DC voltage. <S> There is nothing inherent it opamp design that prevents DC amplifiction. <S> All opamps are internally DC coupled. <S> Obviously, coupling capacitors would not be used and the affect of the opamp offset voltage would have to be considered. <S> Generally a dual supply opamp would have to be used to keep the input at close to 0 volts. <S> Otherwise the opamp will amplify the bias voltages and probably saturate with any reasonable gain. <A> Mainly, the amplified output voltage must be between the output limits of the op-amp. <S> An amplifier powered with +12V and -12V cannot produce a 50V output, for example. <S> A rail-to-rail op-amp can produce an output all the way to the supply voltages; others will not go all the way to the positive or negative supply voltage, but a few volts shy. <S> But why would you want to do this? <S> A DC input never changes. <S> So instead of, say, amplifying a 0.82V input signal by 10 to produce 8.2V out, just use an 8.2V power supply. <S> On the other hand, you can make a fixed power supply with a low-power accurate voltage reference as input to a fixed-gain amplifier, which feeds an external power transistor. <S> (A fraction of the final output of the power supply is fed back to the op-amp's negative input to regulate the overall circuit.) <S> So an op-amp is often part of a power supply. <S> simulate this circuit – <S> Schematic created using <S> CircuitLab The circuit has a 5.1V Zener diode as a reference, and the output is divided by 10/(6.2+10) <S> = .62 <S> to amplify by 1/.62 to produce 8.2V.Note you still need to power the amplifier with something greater than the output. <S> Here's it's a 12V DC supply, but it could be a transformer and rectifier that runs from AC wall current. <S> If what you mean is an input that only slowly changes, for example when someone turns a knob, that's still AC. <S> It's just very boring AC.
In principle, yes, you can amplify DC with an op-amp, subject to the constraints of the amplifier.
Heat lost in ideal capacitor charging If we use an ideal capacitor to charge another ideal capacitor, my intuition tells me no heat is generated since capacitors are just storage elements. It shouldn't consume energy. But in order to solve this question, I used two equations (conservation of charge and equal voltage for both capacitors at equilibrium) to find that energy had indeed been lost. What's the mechanism by which heat is lost in this case? Is it the energy required to push the charges closer together on C1? Is it energy spent to accelerate charges, to make it move? Am I right in claiming that no "heat" is generated? I noticed that the energy lost equals that stored in the "equivalent" series capacitance if it was charged to \$V_0\$ . Is there any reasoning why it is so? <Q> The problem with these theoretical examples lies in the fact the current is assumed infinite for 0 seconds . <S> Crudely substituting this in the conservation law: <S> $$ \frac {\partial <S> \rho }{\partial <S> t} <S> +\nabla <S> \cdot \mathbf {J} = 0 $$ <S> $$ \frac { \rho }{ 0 }+ \infty \neq 0 <S> $$ Since charge is conserved, the assumption of infinite current in zero time is wrong. <S> How much power is dissipated \$P_{diss}=VI\$ cannot be defined, since the definition of the current is false. <S> So, the answer is: cannot be defined EDIT Note that the dissipation neither is <S> 0  <S> W because R = 0 \$ <S> \Omega\$ . <S> For the same reason as above: \$ P = I^2R = \infty^2 <S> \cdot 0 \$ , which is not defined . <A> When masses collide in an inelastic manner, momentum is conserved but energy has to be lost. <S> It's the same with the two-capacitor paradox; charge is always conserved <S> but, energy is lost in heat and EM waves. <S> Our schematic model of the simple circuit isn't sufficient to show the subtler mechanisms at play such as interconnection resistance. <S> An elastic collision can be said to be equivalent to adding series inductors in the wires. <S> Somewhere between the two is reality - the connections are composed of resistors and inductors; the fact that our schematic may not show them is just a weakness of our imagination. <A> What's the mechanism by which heat is lost in this case? <S> Normally, the wires and the switches have some resistance. <S> Because current flows through the wires, heat is produced. <S> I noticed that the energy lost equals that stored in the "equivalent" series capacitance if it was charged to V0. <S> Is there any reasoning why it is so? <S> However, if you have "real" capacitors where charge and voltage are not exactly proportional (as far as I know this is the case for DLCs) <S> the percentage of energy which is converted to heat is <S> NOT exactly 50%. <S> This means that the key to your observation lies in the equation of the capacitors (q ~ v) <S> and there is no "intuitive" explanation that is independent of that equation. <S> (If there was an explanation that is independent of the equation, the percentage would also be 50% for "real" capacitors.) <A> I have to go with " <S> The question is invalid". <S> It looks like the problem was edited from a previous one to a different question. <S> The "answers" all have units of Q^2 * C / C^2 or Q/C. <S> It's been 40 years for me since I had that EE class, but isn't that Voltage? <S> How do you answer a "heat dissapated" question with units of voltage? <A> EDIT: To those of you uncomfortable with me proclaiming that \$R = 0\$ in the end, it is analogous to taking the resistance of air to be infinite. <S> And if you are still uncomfortable, read "infinite" as "really really large", and "zero" as "really really small". <S> There is infinite current flowing through zero resistance , and this results in a finite energy being dissipated in the wire . <S> To make sense of this, we need to do a bit of calculus . <S> Suppose there is also a resistance <S> \$R\$ in the circuit, which we shall set to zero at the end. <S> Let <S> \$V_0 = <S> q_0 / C_1\$ . <S> Doing the usual Laplace transform for circuits, the transformed current \$I(s)\$ is given by $$\begin{align} \frac{V_0}{s} &= I(s) <S> \left <S> [ R + \frac{1}{s C_1} + \frac{1}{s C_2} \right] <S> \\ &= I(s) <S> \left <S> [ R + \frac{1}{s C} \right] \\\end{align}$$ where \$1 <S> /C = 1/C_1 + 1/C_2\$ . <S> Thus $$\begin{align} <S> I(s) <S> &= \frac{V_0 / s}{R + 1 <S> / (s C)} \\ &= \frac{V_0 / <S> R}{s + 1 / (R C) <S> } \\ i(t) &= <S> \frac{V_0}{R <S> } \cdot \mathrm{e}^{-t / (R C)}.\end{align}$$ <S> The instantaneous power dissipated is $$\begin{align} <S> P(t) <S> &= <S> i(t)^2 \cdot <S> R \\ &= <S> \frac{{V_0}^2}{R} \cdot \mathrm{e}^{-2t / (R C)}\end{align},$$ <S> and so the total energy dissipated is $$ \int_0^\infty <S> \frac{{V_0}^2}{R} \cdot \mathrm{e}^{-2t / (R C)} \,\mathrm{d}t = \frac{1}{2} C {V_0}^2 = \frac{{q_0}^2 <S> C_2}{2 C_1 <S> (C_1 <S> + C_2)}.$$ <S> Note that this is independent of \$R\$ , and I would argue it even holds for <S> \$R = 0\$ . <S> Indeed setting \$R\$ to zero in the context of generalised functions, we have that $$\begin{align} i(t) &= <S> C V_0 \cdot <S> \delta(t <S> ) \\ P(t) &= <S> \frac{1}{2} C {V_0}^2 <S> \cdot \delta(t),\end{align}$$ where \$\delta(t)\$ is the Dirac delta (or unit impulse) in time, which has dimensions \$1/\text{time}\$ . <S> Thus all of the energy is dissipated in the instant \$t = 0\$ .
If you charge an "ideal" capacitor where charge and voltage are proportional, 50% of the energy will be converted to heat.
Variable declaration with @ in C I am reading some C code and came across this declaration in the program: unsigned char serv_ctr @0x0002; Can someone point me to documentation, or explain what the "@0x0002" is for in the Mplab XC8 v1.35 C compiler? <Q> From the XC8 compiler manual page 27, section 2.5.2 Absolute Addressing : Variables and functions can be placed at an absolute address by using the __at() <S> construct ...... <S> 2.5.2.2 DIFFERENCES <S> The 8-bit compilers have used an @ symbol to specify an absolute address <A> @ <S> is a common non-standard extension to the C language which allows you to declare a variable at a specific address. <S> It can be used for memory-mapped hardware registers etc. <S> In which case the variable must also be declared volatile , so your example is incorrect. <S> Other compilers use something like __attribute__(section... or <S> #pragma ... , all of it non-standard C. <S> The only rational reason (if any) why tool chains do this, is to enable register debugging on crappy debuggers. <S> The non-standard syntax will ensure that the register becomes part of the linker output and debug info. <S> Which in turn allows you to watch the register in the crappy debugger just as you can watch any other variable. <S> If you have a good debugger, it will have support and awareness of your specific MCU. <S> Then you don't need non-standard crap in the C code, but you can write pure, portable standard C instead: #define serv_ctr ( *(volatile uint8_t*)0x0002u ) <A> A short extension: <S> This is no longer working since xc8 2.0 and up. <S> You now had to write: unsigned char serv_ctr __at(0x0002); to put a variable ( serv_ctr ) at an absolute address ( 0x0002 ). <S> With XC8 2.0 it is possible to compile your old code using the @ <S> syntax if you set the compiler settings to use "C90" format. <S> The setting looks like this, it is under "XC8 Global Options" and is called "C standard".
This is to specify an absolute address to place the variable at.
Why are GND pads often only connected by four traces? I have seen this everywhere but cannot figure out why it would make sense to essentially compromise the quality of the ground connection. Is this done for visual reasons? Here is an example: <Q> This is to make soldering easier. <S> Those 4 traces make it easier for the pad to heat up as the heat can only escape through those 4 traces. <S> Soldering to a GND pad is difficult enough as it is, but if you had none of the spokes, you would essentially be trying to heat up the whole ground plane. <S> It would be exceptionally difficult to heat it sufficiently to solder. <S> There may be some other reasons too, but this is the one that I know of! <S> As pointed out by @John Go-Soco in the comments, these are also reffered to as thermal reliefs <A> It's worth mentioning that for reflow processing, thermal relief doesn't matter. <S> The oven will take care of heating it. <S> But for prototyping it becomes real PITA to (de)solder the pads. <S> That connector is an SMT connector. <S> The thermal reliefs make the pads much weaker so it doesn't take that much vertical strain to peel them off the PCB. <S> For mechanical strength it's better to leave the mounting pads as full contact, I don't think I've ever broken off an SMT connector that had solid copper on mounting pads. <A> They are commonly referred to as 'thermal relief', and as others state, they are to make soldering easier, as they impede thermal conduction to the rest of the ground plane. <S> The thermal conductivity of metal is, like electrical conductivity, determined largely by the free electrons. <S> So beware, this also impedes electrical conduction. <A> These gaps are for thermal isolation. <S> This is less of a problem with industrial production but very much a concern in hobbyist soldering. <S> As for the quality of the ground connection: normally high frequency signals are captured by decoupling capacitors nearby the supply pins. <S> This results in only a DC current over the ground plane which can easily pass through these smaller pathways. <A> 'Star-connect' pads are basically a trade off between thermal conductance and structural strength. <S> The usual case for a pad de-laminating is for an edge to peel up. <S> The star structure holds all the edges down, it's actually stronger than some of those other pads in the picture. <S> As to why you want to limit thermal conductance, that's not just confined to assembly considerations. <S> While heat may not be an issue in a lot of designs, it can certainly be a major consideration in others. <S> Ground planes and other copper fills are often used to stink heat off your small surface mount parts. <S> So thinking about how much a component sinks and where could be important to a design <S> and you can't always have the physical spacing between components that you might otherwise want. <S> Why that particular board uses them. <S> Well it seems a little odd... <S> Those are the pads for the SD slots external casing. <S> It's clearly a surface mount design, so you would expect a re-flow construction where heating the pads isn't a problem. <S> Perhaps the SD slot has plastic components that aren't spec'd for the oven temperatures <S> and so had to be attached separately? <S> Or if it was a DIY/Hobby kit then that would also make sense. <S> Of course someone could have just ticked the 'star-connect' box when they routed the ground connections in their EDA software...
If these weren't there you would be heating up the whole ground plane which could harm other nearby components because of the extended time needed to get to the required soldering temperature.
Diode type with lowest drop voltage I make a small solar energy harvester. I'm searching for the type of diode with lowest drop voltage. Any suggestion for the type of diode for me ? Thank you <Q> You can try something like the 1N5817 Schottky diode, but note that lower drop goes hand-in-glove with higher reverse leakage (particularly egregious at higher temperatures). <A> For harvesting low voltage, you might want to consider the ideal diode using 1 FET , 2R’s and an IC or buy the board online. <S> Understanding an 'ideal' diode made from a p-channel MOSFET and PNP transistors <S> Or if the cost justifies a better solution, this energy harvesting IC BQ25505 <S> which specs include : – Ultra-Low Quiescent Current of 325 nA. – <S> Input Voltage Regulation Prevents Collapsing High-Impedance Input Sources <A> Most diodes will be better than 1N4148. <S> Diodes for higher current will usually have less voltage drop at lower current. <S> As Andy says, Schottky diodes will have lowest voltage drop. <S> At about 200 mA voltage drops for common diodes are (from various datasheets): DIODE Vdrop @ <S> 200 mA Diode type1N4148 1.0 <S> Signal1N4007 <S> 0.8 General rectifier ( <S> 1A)1N5408 <S> 0.6 General rectifier ( <S> 3A)1N5817 0.25 Schottky ( <S> 1A)1N5820 <S> 0.2 <S> Schottky (3A) <A> Firstly you should post a quick schematic of what you're working with. <S> But your common models will still drop around 200mV. <S> There are ways to achieve the same result as using a diode, without the voltage drop. <S> But it's more complicated and would depend on your design. <S> For solar energy harvesting though, you should be fine with a single Schottky between your panel and the rest of your design. <S> Something like a 30V/3A would work with your average panel and have a pretty low voltage drop. <S> Of course that all depends on what panel(s) you are using and what is connected to them... <A> If you are just using the diodes to mux two power sources then you can use an ideal diode chip. <S> https://www.analog.com/en/parametricsearch/11029 <S> They typically consume micro-amps of current. <S> The forward voltage drop is usually only a few mV.
Schottky diodes are the kind with the lowest voltage drop.
Input and Output impedances of Current and Voltage Amplifiers I read that Voltage Amplifier have high input impedance and low output impedance, and Current Amplifier have low input impedance and high output impedance. If this is true what is reason for this as I could not find one. FETs have high input impedance and can act as voltage amplifiers, I think this confirms that voltage amplifiers have high input impedance. On the other [hand] when we come to Common Collector and Common Base Amplifiers, the former one high input impedance but have voltage gain of less than 1. Is that not violate the basic property voltage amplifiers? Since it have high input impedance, should it not have high voltage gain? Similarly the later one have low input impedance but have significant voltage gain and no current gain, again opposite to the property of current amplifier? <Q> I read that Voltage Amplifier have high input impedance and low output impedance, and Current Amplifier have low iremainnput impedance and high output impedance. <S> These are definitions that we impose on the circuits to make them easier to think about, so it's dangerous to try to make sweeping generalizations from real circuits. <S> An amplifier is a voltage amplifier if the designer intended that it respond to voltages with voltages, etc. <S> But one could conceivably have any topology be a "voltage" or a "current" (or transresistance or transimpedance) amplifier. <A> On the other [hand] when we come to Common Collector and Common Base Amplifiers, the former one high input impedance but have voltage gain of less than 1. <S> Is that not violate the basic property voltage amplifiers? <S> No, voltage amplifiers can have gains that attenuate. <S> This can be done with most op amps. <S> Typically it doesn't make sense to use op amps as attenuators because it can also be done with only resistors. <S> If you need impedance matching then use a voltage follower. <S> Since it have high input impedance, should it not have high voltage gain? <S> It's the feedback network and open loop gain that determine the gain of an amplfier. <S> However if you want high gains then it becomes necessary to have high input impedance when amplifying low level signals (like nV's) . <A> When you consider a single transistor is a custom amplifier that is usually just one of many or in an IC with many transistors. <S> There are many "standard" configurations that are tradeoffs: Voltage <S> gain : <S> Collector output <S> Current gain ; Collector or Emitter Follower <S> (voltage gain <S> =1 ) Conductance gain = <S> impedance reduction <S> Power <S> gain (any combination of the above ) <S> Linearity improvements : using negative feedback, which lowers input AND output impedance but reduces voltage gain by using R ratios Bandwidth (fixed GBW) <S> Signal inversion (collector) or not (emitter) <S> If you want to maximize any of the above (1~4) <S> then there must be compromises in some others. <S> To get more voltage gain, the input impedance may be lowered or output impedance raised to achieve this. <S> The current gain can vary widely and also depends on collector current. <S> By using current gain with resistor or "impedance" ratios, we get voltage gain. <S> Bypass capacitors make use of low DC gain circuits but high AC gain. <S> There are constant voltage circuits and also constant current circuits with no gain but just used as regulators and there may be many of these current regulators inside linear ICs' to raise impedance and keep current constant independent of hFE. <S> There are also other amplifiers such as Gyrators which use a negative impedance characteristic and others simply with negative feedback e.g. convert a capacitor into inductor behaviour. <A> This is a fine voltage amplifier, yet Rin is 2.6 ohms (0.026v/0.01amp). <S> simulate this circuit – <S> Schematic created using CircuitLab
Input impedance doesn't have anything to do with the gain of the amplifier, a voltage amplifer can have a gain of 1 and have very high input impedance.
How to make a conveyor (electric part) I am going to make a conveyor like this There will be a optic sensor which detects a box. There will be motor (3 phase, 380 V, 1 A, 0.37 kW, 1400 rpm) with gear reduction (coefficient of reduction is 36). Power from this motor is enough for me. The question is about the control and power systems. My suggestion: 1) power line (3 phase) go to Schneider GV2ME08 (circuit breaker) 2) then go to Schneider lc1d09 (contactor) 3) then go to the motor. Ic1d09 will be controlled with 24 AC. So I need transformer (220/24 AC) I need a relay for commutating the 24 V. This relay will be controlled with 5 V from Siemens Logo 24 RC. When the optic sensor sends a signal to the controller then this controller turns on the relay. It is how do I see this picture. My question: Is it correct? If it is correct does I can do it better? Will my conveyor do twitch? Do I need to use a frequency regulator for smooth start? I will be glad for any opinion. <Q> Selection components to control a 3 phase motor/conveyer <S> The components you selected are adequate for the load you specify. <S> The Schneider lc1d09 contactor has adequate load capability. <S> I would strongly suggest that you use the 24V AC coil (or the 110V AC coil) to ease your wiring since you appear not to be using a DIN enclosure. <S> To drive the contactor you will need a Class 105/106 rated control transformer. <S> Here is an example that might be suitable for phase to neutral connection: This allows your wiring closet to be only AC mains equipment. <S> To setup your optical curtain you need to select a device of course, and should get a floating relay output for either 24 or 120V AC rating (most will easily do this. <S> This will probably be a low voltage 12 or 24V DC operation and kept separate from your motor wiring. <A> Usually the photocells and other proximity sensors work on 24 VDC. <S> In any case do not forget to order a contactor with built-in suppressor device, this can be a MOV or a diode. <S> MOVs are more universal in this case. <S> Your conveyor will start with high acceleration, 95% is good enough for any use, in only few cases you'd need a frequency converter. <S> EDIT:You don't even need to supply the contactor with 24VAC or DC, you can use 220VAC contactor and use the output relay of Logo to switch it on. <A> does it correct? <S> If it is correct does I can do it better? <S> The selected components seem correct with improvements recommended in other answers. <S> The minimum of the setting range should be no higher than the motor current rating. <S> Will my conveyor do twitch? <S> Do I need use frequency regulator for smooth start? <S> The conveyor will probably accelerate to full speed in about a second. <S> That may see quite sudden, but relatively smooth. <S> The need for a frequency regulator, variable frequency drive (VFD), will be determined by the sensitivity of the load. <S> Most such conveyors don't require a VFD, but the need will be difficult to predict. <S> You should also consider how often the conveyor will be started and stopped. <S> You need to define the action of the conveyor in detail and be sure that you don't need more that the one sensor to get the desired action. <S> Circuit Breaker Selection and Setting <S> Based on the table and curves below, I would select the GV2ME05 and set the trip slightly below the maximum setting. <S> The GV2ME06 might be ok with the setting at minimum. <S> The magnetic trip allows about 15 X setting current. <S> The thermal trip allows 15 X setting current for about 0.7 to 2 seconds and trips in about 10 to 50 seconds at 2 X <S> setting current. <S> The thermal mechanism will not trip below about 1.25 X the setting current. <S> I believe the setting should be at the motor rated current or even slightly below to assure protection from long-term overload or excessive starting and stopping. <S> Added Information <S> Tomato boxes may slip a little when the conveyor starts, but it seems very unlikely that they would tip over. <S> The acceleration force in unlikely to bruise the tomatoes. <S> At 1400 RPM, the motor has higher slip than average. <S> The maximum starting current will be less than average. <S> The starting torque will be maximum at standstill and drop steadily as the motor accelerates.
In my opinion, you should change to 24DC power supply and use a contactor for 24VDC. The conveyor speed can be calculated from known gear ratio and the main roll diameter. You should review the thermal trip setting range of the Schneider GV2ME08. The motor has been selected for full-voltage starting, not for use with a VFD.
Using Arduino sensors with an STM32 I want to start an electronic project, and found that an ARM based MCU, like STM32F103C, fits my needs more than AVR like Arduino Uno (mostly because of CPU and RAM.) I was wondering if I can use any Arduino sensor with my STM32 board? Looking a list of the sensors related to STM32 , they seem much more expensive. <Q> Yes, of course you can use those sensors. <S> To make it easier, you can get an STM32 Nucleo board, which has the same header pin configuration as an Arduino for quick and easy prototyping. <A> As MCG already mentions, you can use in principle any sensor that also can be used by Arduino. <S> The main issue is if you want to use libraries. <S> For the Arduino, there are for almost any sensor a library available, for the STM32 <S> this is much less the case. <S> Writing a library can take quite some time (depending on the complexity of the sensor communication). <S> The Nucleo board can help if the sensor is placed on a board that can be pushed on top of an Arduino; otherwise you need to use separate wires anyway. <S> Another way that could be worthwhile checking, is STM32Arduino, which is a project to make some STM32's compatible with Arduino, and can be programmed like an Arduino, but not all libraries are compatible. <S> See also MCG's comment below and check the following helpful starting point for STM32Duino: getting-started-with-stm32-development-board-stm32f103c8 . <S> In most cases, Arduino is the most easiest solution, mostly because of the existence of a large library support, however, the Arduino also has some big advantages: very less SRAM, mostly bigger in size than STM32 boards, no (easy) debugging, very less peripherals. <S> Another problem with Arduino libraries (and probably STM32 libraries too), is to check if multiple (different) libraries work together; you get into problems when e.g. they use both the same timer. <A> May work for some, but definitely not for all. <S> Notice that the Arduino operates at 5V supply and <S> I/O voltages, while the STM32 uses 3.3V! <S> While many of the STM32's I/ <S> O pins may be 5V-tolerant for input (see datasheet), they cannot output 5V signals which many Arduino-targeted sensor( board)s are built for. <S> So, best case: The sensor is ok with 3.3V signals at its inputs and sends 5V signals to 5V-tolerant pins on the µC. good case <S> : The sensor does not work (as expected) because the 3.3V signals are too low, but neither end takes any damage. <S> bad case <S> : The sensor sends a 5V output signal to a non-5V-tolerant µC (input) pin and damages the µC and possibly the sensor by excessive current. <S> Check and make sure that the sensor's inputs can operate with 3.3V signals, and that the µC's inputs can handle the (likely 5V) signals from the sensor. <S> Some sensors can operate on a range of supply voltages, e.g. 3.3V~5V, so if you supply them with 3.3V they will work perfectly in a 3.3V system. <S> And there are, of course, sensors which can only operate on 3.3V but not on 5V. <S> For use with 5V Arduinos, these typically have some sort of level-shifting included on the board ("shield") <S> they come mounted on. <S> In these cases, even though the sensor could work on 3.3V, the board cannot.
The sensors are not Arduino exclusive, just look up the datasheets to the parts and you should have no problem using them.
The role of solenoid's wire diameter? I'm not an expert in the electromagnetic field and need to design a solenoid actuator with 1 kg force approx. I am wondering if I change the wire diameter of the coil, what happens in solenoid's parameters? for example, the current passing the wire, voltage or force of the solenoid would be changed if the wire diameter goes up or down? <Q> Flux density in a solenoid is proportional to the number of turns and current. <S> As you can see, wire size and/or resistance is not in the equation, the size of the wire only indirectly affects the result. <S> Too large and you can't fit the turns into the space. <S> Too small and the wire will overheat, or the resistance is so large that you need a higher voltage than desired to get the same current. <S> Also, since most people want to drive the solenoid with a constant voltage, you want the desired current to result from the rated voltage. <A> The pulling force is determined by the ampere-turns (among other factors such as core type, winding diameter, winding length, etc.). <S> The more turns, the more pulling force. <S> As you add turns, however, the resistance of the solenoid as a whole will go up. <S> If you have a solenoid and change only the wire gauge of its winding, the following would have to change: Larger gauge wire: <S> Overall resistance decreases <S> Current increases <S> Pulling force increases Outside diameter of solenoid would increase due to extra mass in wire <S> Smaller gauge wire: <S> Overall resistance increases <S> Current decreases <S> Pulling force decreases Outside diameter of solenoid would decrease due to less mass in wire <S> Note that you should consider the current capacity of the wire gauge you are using, along with the duty cycle. <S> You can increase pulling force by increasing voltage (and therefore current). <S> However, if you don't limit current, the wire will heat up and can eventually fail. <S> If you only actuate the solenoid briefly, you can allow higher power. <S> Some people refer to this as a "kick" when supplying higher voltages to solenoids than what would be considered 100% duty-cycle appropriate. <S> There are some helpful calculators for solenoids, such as this one at CalcTool . <A> The two most important parameters you have for the strength of an electromagnet are The Power you have available and The weight of Copper you have available <S> Although this doesn't seem like enough, all the other terms like volts, current etc cancel out. <S> The more you can spend on copper to build it, and power to run it, the stronger the field you will get. <S> Now, do you make that copper (for instance) <S> 1000 turns of 2mm2 wire, or 2000 turns of 1mm2 wire? <S> It depends on what voltage and current power supply <S> you have available. <S> Consider a magnet with two 1000 turn 1mm2 windings. <S> Put them in series, you have 2x the voltage. <S> Put them in parallel, you have 2x the current. <S> But in both cases, the same magnetic field, and the same power dissipation. <S> So it doesn't matter what diameter wire you use, if you haven't chosen your power supply yet.
The wire diameter directly affects how much current the solenoid can handle (resistance changes with diameter).
What is a Power on Reset IC? I'm making a prototype based on the W7500P reference design, the latest version (updated 6 months ago) specifies the need for a Power over Reset IC. I do not understand the point of this component over more traditional resets, and I'm questioning wether or not it is necessary to include this.The WizWiki W7500P developement board (made by the same company) does not include this component. Here is the reference design : <Q> Power-on detectors (also: brownout detectors) check whether the supply voltage has been stable within a certain range over a certain amount of time and let go of the reset line only when that happened. <S> The problem with unstable power is complex ICs fail partly , so while e.g. an internal EEPROM holding calibration data may only return garbage, the CPU already or still runs with that, now garbage, data. <S> If it's interactive so the user can check for unintended behaviour, you probably don't need it. <S> If the device is expected to run unattended, you certainly need such a detector. <S> Some µCs have this function already built-in. <A> A POR chip usually contains a voltage reference, precision comparator, threshold-setting resistors, and an output pulse former (monostable). <S> It is designed to operate on very low voltages, even though the trip point might be up around 3 v or 5 V. <S> The one on your schematic includes an input for a manual reset switch. <S> Also, if the system power dips below the threshold value it forces a reset. <S> It is up to you to decide if you need all of these features or protection. <A> The W7500P reference design is a standalone implementation. <S> As such it is unknown what will be driving the board <S> (MCU choice). <S> In this case it is prudent to provide a good level detector for Power On Reset to ensure the reset state of the device when power is applied or during power failure/return. <S> The WiZWiki-7600P development board has a MANUAL reset switch (Sheet2-D1) which assumes human presence to reset the device <S> should it fail to initialize. <S> While perhaps acceptable for a development board this is not adequate for a finished product expected to reset gracefully and predictably for power on or power failure. <S> If you have an MCU with POR detection built in, or added to it, you can use this to reset your WizNet 7500, but you should ensure predictable reset conditions for you product. <S> There are a plethora of PMIC power supervisors to chose from, do yourself a favor and put one on your board. <S> Many of these POR supervisors are SOT23 packages, so at the very minimum you should layout one on your board even if it's a DNP placeholder. <S> Be careful during part selection that some are active pullup and some are open Collector/Drain outputs.
Whether you need something like this depends on how reliable your device needs to be. The idea here is that as the system power rail ramps up from 0 V to 3.3 V or whatever, the POR chip wakes up first and holds the uC reset input in the reset state until after the power rail is up to full voltage and has stabilized.
If ground and neutral are bonded at main panel, why aren't all grounded device chassis energized? I know this is a question with variants that have been asked countless times on the internet and on this site. Believe me that I have scoured through these questions and answers in search for a satisfactory answer but that I have not found one. In your home electrical wiring, the rule appears to be that you should never connect ground to neutral anywhere else than at the main panel. The reason for that (from countless individuals/websites online) is that once you do that, you would be a using a device's ground and neutral returns in parallel, and once the ground in a system is energized, this effectively energizes all other objects connected to ground in the system. But given that ground and neutral are already connected together at the main panel, doesn't that do exactly what is meant to be prevented with this rule? Once you have conductors (ground/neutral wires) at equal potential somewhere in the system, how does connecting them elsewhere change their relative potential? I know that my thinking is wrong at some point, since clearly every chassis in every home isn't energized. I just don't know where my understanding goes wrong. <Q> In a perfect world with conductors that have zero resistance, neutral would be always at zero volts everywhere, with respect to ground. <S> It has current flowing through it, but that's not the same as having a nonzero voltage, which I take to be what you mean <S> by "energized". <S> In this world, that's not totally true, but the point where neutral and ground are connected together is ALSO the point where there is a physical grounding rod driven into the earth. <S> So even if some part(s) of neutral are significantly above 0V, due to high resistance, or a fault, or whatever -- the point where neutral and ground are connected should still be very close to 0V, which means that the rest of the ground wire should still be very close to 0V, as long as you don't connect it to neutral anywhere else. <S> If you connect neutral to ground somewhere else, away from the grounding rod, this no longer holds -- in the event that neutral were to break, current could flow through the ground wire near the additional connection between ground and neutral. <S> There are different systems used in other countries and situations, and the best way to set up a protective grounding system depends on what assumptions you make about failure modes. <S> In a perfect world where the neutral conductor has zero resistance and never breaks, you wouldn't need a separate protective ground wire at all. <S> So ultimately you need a model of what kinds of failures you expect, in order to decide what kind of protection will be most useful. <A> Nowadays we have RCDs or GFCIs in the home to prevent serious electrocution should the live wire inside a piece of equipment come into contact with the chassis connection. <S> If neutral were also bonded to the earth wire locally on the equipment, what prevents a lot of fault current flowing back through the neutral wire and convincing the RCD that “all was well” when it wasn't. <S> So, advocating ground and neutral being connected at equipment may not make a serious change to the potential on the neutral wire <S> but it will divert earth <S> current away from the earth wire and potentially render the RCD useless. <S> Also, earth wires are generally smaller cross section and can’t handle long term neutral current should the neutral wire fail. <S> So, if neutral failed and full load normal current passed down the significantly lesser rated earth wire, the fuse would no longer protect the cable and a fire could result. <A> Ground is only for safety and EMI reduction and there is no good reason to do what you suggest, only bad ones due to fault detection/protection. <S> So there is no point discussing it if you understand how it works by unbalanced currents on Line-Neutral. <S> Sharing neutral current with ground would make Neutral current with Line Unbalanced and thus false-trip the RCD/GFCI. <A> A house is served by wires from a transformer, AND sits on ground thatmay conduct electricity from... other buildings, or solar-wind-drivencurrents induced in the subsoil. <S> Because parts of the house (reinforcing rod in concrete, plumbing pipes, metal sewage pipes, etc.) are conductive AND in contact with the ground,a random electrical cable or appliance may come into contact withgrounded metal. <S> In order that the ground-to-wire voltage be kept in some safe limits, thetransformer center-tap (which is at the midpoint of the AC voltage range)is connected to ground. <S> This is done where it can be inspected, in the main electrical panel. <S> What that ground-neutral bonding prevents is the buildup of voltagein the house wiring that can exceed safe insulation ratings to the 'grounded' bits of metal thatare omnipresent. <S> Such events as lightning strikes will occasionallychange the under-this-house potential to be different from the potentialunder a utility pole or another house; a one-ground-per-building rule isessential. <S> Finally, only currents INSIDE THE HOUSE can create a voltage drop betweenneutral and earth-ground, by resistive effects in the current-carryingwires, so <S> your home is safe even if your neighbor has a major wiring fault. <S> Once you have conductors (ground/neutral wires) at equal potential somewhere in the system, how does connecting them elsewhere change their relative potential?
It isn't about the 'relative potential', it's about inspection of outlets; thetest for grounding, and for power-present, could be fooled by wiring practicesthat make no safe ground connection to the ground pin.
N-Channel Mosfet as Switch I have a few n-channel MOSFETs (the irlb8721's) and I was able to use it as a switch to control an led with the gate at 5 volts. I would like to change the source/drain voltage to 11.1v from 5v and current will be 20a with still having the gate at 5v (so I can control it with a microcontroller). Would this be possible? Or do I need to add additional transistors/resistors? simulate this circuit – Schematic created using CircuitLab <Q> Let's see how bad this looks... <S> According to the datasheet Vds max = <S> 30V, what is much higher than 11.1V, so you are good in this regard. <S> Let's check the power dissipation @ <S> Id=20A.According to Fig. <S> 12 of the datasheet, the Rdson degrades significantly when Vgs=5V instead of 10V. <S> For Tj=125˚C (worst case), Rdson=16mΩ. <S> So the power dissipated will be 0.016*(20A)^2=6.4W, <S> what is pretty high. <S> According to the datasheet, the thermal resistance from junction to ambient with no heatsink is 62 ˚C/W (max). <S> With Pd = 6.4W, assuming Tamb = 25˚C, we get Tj = <S> 25 + <S> 62 <S> * 6.4 <S> = 421.8˚C!!! <S> It's clear you need a heatsink! <S> Let's see how big of a heatsink you need. <S> Let's say Tj=125˚C <S> (what is already pretty high) and Tamb=25˚C, so the delta T will be 100˚C.For Pd = 6.4W, the total thermal resistance will have to be less than 100˚C / <S> 6.4W = 15.6 <S> ˚C/ <S> W.The thermal resistance from junction to the heatsink is 2.3 + 0.5 <S> = 2.8 ˚C/W, according to the datasheet. <S> This means that the heatsink thermal resistance will have to be lower than 15.6 - 2.8 = 12.8 ˚C/W. You may be able to achieve that with a big heatsink or with a not-so-big heatsink with forced ventilation. <S> If you add a level shifter capable of driving the gate of the FET with 10V instead of 5V, the power dissipation will reduce significantly. <S> According to the datasheet Rds max will become 8.7mΩ, what drops Pd to 3.48W, what will require a total thermal resistance of 28.7˚C/W, and 25.9˚C/W for the heatsink only. <S> This translates into a much smaller heatsink. <A> If you are using the IRLB8721 simply because it's what is in your component drawer <S> then you can simply parallel multiple devices. <S> While current sharing will not be exact between devices, the power dissipation will reduce with the square of the current flow through each device. <S> For example if the RDS(on) achieved is close to 16 mOhms with your current 5V MCU driving the device: <S> At 20A you might expect 6.4W dissipation in that single device. <S> Two devices in parallel (~8 mOhm) will give about 3.2W spread across both devices or about 1.6W each. <S> This is well within the capabilities of the TO 220 device tab without a heatsink at all. <S> Three devices in parallel (~5.3 mOhm) will give about 2W total dissipation spread over the three devices or about 700 mW each. <S> There is no chance of thermal runaway at all since RDS increases and VGS(th) reduces with an increase in temperature. <S> Given the cost differential between the IRLB8721 and a heatsink, using two devices in parallel would be cheaper than buying a heatsink to dissipate the power from a single device. <A> Will it work at 11.2V? <S> Yes <S> because when its's working the Vds is still only <0.1V <S> and Vds max is 30V = <S> BVdss when it is off. <S> How do you know if the FET will work? <S> or you can invert the driver with an NPN and use the >=10V gate rated voltage <S> RdsOn rises 50% at Vgs=5V from the rated value at Vgs= 10V for this FET with Vgs(th)max= <S> Vt=2.35 <S> Here <S> 5V/2.35=2.12 Unless rated for your drive level, I always suggest choose Vt (max)<=1/3 <S> of Vdd and not 1 / 2.12... <S> Next time, remember that. <S> What about the PTC effect? <S> RdsOn rises 100% or doubles at Vgs=4.5 <S> ( So don't use 4.5V, use a 1% supply not 10%) or get a lower Vt (Vgs(th) FET. <S> These tend to be SMD only. <S> 8.7mΩ*150%*20A²= <S> 5,221 mW. @ <S> 25'C <S> At <S> 65'C RdsOn rises 25% so if your junction temp rise was 40'C, now it will be 50'C. <S> Thus it will rise more than you expect. <S> PTC Effects on junction Temp <S> A good heatsink is mandatory and is a bit more than Ohm's Law to compute the required resistance because there will be a PTC effect with 2x Ron per a Tj rise of 50% per 80'C. (est.) <S> multiply 125% thermal resistance for a 40'C rise \$R_{θJC}+R_{θCS}+R_{θSA} <S> \cdot <S> Pd= (2.8 + heatsink[ <S> °C/ <S> W])*150% \cdot 5.2W <S> = 45° <S> C\$ add rise +5°C margin for error for est. <S> of heatsink and enclosure above room or enclosure temp <S> Thus the thermal resistance of heatsink + enclosure must be \$40 <S> °C/5.2W/150%-2.8= 2.32° <S> /W\$ <S> That's a decent size heatsink, but if inside a box this can be much more without ventilation <S> and then you can be looking at the PTC effect leading to a slowly rising temp until you ask ( Why did my FET fail?) <A> The irlb8721 data sheet says the max continuous drain current at T=25 <S> Celsius is 62A for Vgs=10V. <S> Of course, your load component(s) needs to be able to take that current as well.
Here, It can if you have a really good heatsink
How to use libraries with delays inside within a time critical STM32 HAL application? I want to use a library for an LCD for STM32: LiquidCrystal , and possibly some other libraries. I noticed this library is full of HAL_Delay calls, not only during initialisation but also during processing functions. My application needs to read MIDI data and process them, preferably within 10 ms, so a HAL_Delay of 1, 2, 5 and 50 ms as are part of e.g. that LiquidCrystal library is messing up the MIDI data. What should I do (in general or specific) to use libraries using HAL_Delay calls inside a time critical application? Things I can come up with: Rewrite the library using interrupts? (seems like a lot of work) Use another MCU (STM32) to handle that (more hardware/soldering work) A better solution? <Q> You can implement an RTOS and replace the HAL_Delay for the equivalent Thread_Sleep function available. <S> But the library doesn't look very complicated, you can probably pick any of the options and do it in equal time. <S> A secondary MCU is almost never the right answer. <A> If your cycle time allows for it (read: is fast enough) <S> another approach is to split the library so that the function is returning at each delay. <S> The function will be called at each cycle and it then can decide if the necessary time has passed since the last action and do the next steps to the next delay. <S> Though you might want to use this approach only if the library is quite relaxed to the maximum time needed and your system has a well defined cycle time. <A> Rather do the MIDI processing in interrupts. <S> I assume you are receiving MIDI data through a UART, and there is a receive interrupt that stores incoming data in a buffer. <S> The problem is that you'd lose data if it can't be processed in less than 320 µs (the time to receive one byte) in the receive interrupt handler. <S> If the processing would take more time, you'll need a second interrupt handler. <S> Use the PENDSV <S> interrupt for the processing. <S> Give it a lower priority than the receive interrupt, so that it can continue receiving data. <S> It should also have lower priority than the SysTick interrupt, otherwise it would block the delays based on that. <S> This way, the processing can run on lower priority than the hardware interrupts, but it will still preempt the application libraries. <A> The library is clearly not optimal for your usage, it does show that it is a port of Arduino library to STM32 HAL. <S> While it is very general and configurable how the LCD is connected to GPIO pins, there are some downsides like the delay system. <S> First of all, the LCD could be connected to a CPU with 1 MHz (1 microsecond) bus cycles. <S> Most commands take up to 50 microsecods to finish execution, so it could execute at least 20000 commands per second. <S> The slowest command takes 2 milliseconds. <S> So the bus cycle delays in the code are roughly 2000 times longer than necessary, just because the minimum delay it uses is 1 ms. <S> The delays are really an issue. <S> In fact, as you can call HAL_delay at any given moment in time, the next systick will happen anywhere between 0 and 1 milliseconds, so these delays can be even too short as the systick might happen after 1 microsecond. <S> Replace with tuned busy loop to get down to microsecond delays accurately. <S> Don't use another CPU for this. <S> Better spent energy would be to rewrite suitable LCD driver from scratch. <S> For instance, writing one character per systick interrupt might work. <S> But only after the delays are fixed to have 1 microsecond bus cycles. <S> Yes, many solutions. <S> For example, use another LCD driver that suits your usage better. <S> Use the BUSY flag from LCD, to know when it is ready, instead of always waiting long enough time. <S> Also the suggestions in other answers are good. <S> Also, when choosing which libraries to use, always consider the licence of libraries what they allow you to do and what they prevent you from doing.
Using interrupts might be a solution, depending on what you mean by that.
Adequate Power Supply for 300 Daisy-Chained LEDs I have 300 LEDs (WS2812B) wired in a series. They were sold as 150 LED/5 meters and rated to power at 9W/m, so 45W/5m strip. I would need 90 Watts to power my entire 300 LED strip. I have a 3-rail power supply that has an output of 5v 40A (200W), would this be adequate to power the LEDs? Naively, I thought I could power them straight from the PS but got major color change around the halfway mark (expectedly where the second strip is connected). I soldered +V and -V of the second rail to the halfway point and it helped my situation but not entirely and I am worried I am going about it wrong. If anyone could shed some light (haha) on my situation I would greatly appreciate it. <Q> Afaik you are doing right. <S> 300 leds / (150 leds / 5 m) = <S> 10 m of LEDs. <S> 10 m * 9 <S> W/m <S> = 90 W.So 200 W is more than twice you need. <S> The reason you get color problems, is that the voltage reduces halfway so much, the LEDs do not have the entire 5 V but less. <S> By splitting the complete circuit in two, you reduce the voltage reduction, but probably not enough, you might to split it in four segments if possible. <S> By doing this, you have 4 segments of 50 W, but you also need 90 / 4 = 22.5 W per segment. <S> (probably there is a way to exactly calculate how many LEDs in one chain you can power with a certain PS but some more variables are needed, which I don't know). <A> From the user questions online, as I expected, "BUYER BEWARE if you run this strip at max power you'll see about 50% voltage drop from the input to the output which will cause the color temperature to change on one side of the strip." <S> I expect you would need AWG 16 x5m feed to each end and locate PS near centre. <S> AWG 16 .... <S> 12.5mΩ <S> /m <S> x5m x 18A = 1.12V drop per wire and feeding from centre reduces at least half this in the middle. <S> If that user was correct (?) <S> voltage drops 50% on 1 reel at full power then <S> 2.5V/18A/2wire = 70mΩ per 5m power trace <S> My suggestion: ( if possible) simulate this circuit – <S> Schematic created using CircuitLab 40A on FPC traces .not. <A> You are doing it right and your power estimation is correct. <S> ~50W <S> PSU should do fine, 200W will have plenty of safety margin. <S> You are suffering from resistance of power and ground tracks on the LED strip, as current at maximum power is quite large (~10A).Your approach (connect power/ground at several points) is also correct. <S> Optimally, you always need to solder additional wires in the middle, like this. <S> X is where you connect the power to the LED strip: <S> === <S> X======X=== is the best (maximum distance to power point is 3). <S> You can extend this approach to have 3-4 connection points. <S> X======X====== is worse (maximum distance to power point is 6). <S> X============X is also worse (maximum distance to power point is 6). <S> X============ is the worst (maximum distance to power point is 12). <S> As your wires would carry 10A - you need to use quite thick wire to connect power, at least 1-2.5mm². <S> Few other notes: Please watch your heat dissipation. <S> You need to avoid temperature >85°C. <S> To ensure more reliable operation you might also need to solder larger electrolytic low-ESR decoupling capacitors (something like 10000uF 6.3V). <S> On the other hand - it could be an overkill. <S> Small decoupling capacitors are already there. <S> You might not need full power. <S> In my projects full power was always too bright, so I limited it in software to something 1/10 of max.
My experience shows that 9W/meter would lead to self-distruction of LED strip due to overheat if you don't glue it to some heat dissipator.
Is this IR LED driver circuit with a transistor OK? I am making a custom IR array board with a custom Arduino (only ATMEGA328 and necessary components.) So please tell me will this be fine or if I need to make some changes. IR LED = 940nm, continuous forward current is 100mA, the forward voltage is 1.4. Current forward = 20mA with 1.2 forward voltage. simulate this circuit – Schematic created using CircuitLab Please do suggest will it work with IRFz44N? So instead of if I use any NPN transistor with this parallel circuit, it will work fine, right? So please let me know if this is right or wrong. <Q> will it work with IRFz44N <S> For IRFZ44 it is only specified at 10V. <S> You can use IR L Z44 for example, here's its spec: <S> Your schematic is OK <S> but: The LEDs are going to draw some pretty high pulsed current, so I'd add a capacitor between the FET's source and the LED's positive supply. <S> Either a low-ESR electrolytic, or a 10µF ceramic. <S> If you're powering the arduino from a 5V supply then check that it has enough current capability for the LEDs. <S> If you use a higher voltage supply (like 12V) then the internal regulator on the arduino may overheat and shutdown if you draw such high current from it. <S> Remember dissipation in a linear regulator is (Vin-Vout)*I. <S> So you need to check and make sure it'll be OK. <A> For your purpose, at 500 mA or less of power draw for your leds through the IRFz44N, it would be fine. <S> It has a Vgs Threshold of 2V min and 4V max, and the Vgs to <S> Id graph shows it will pass up to 20 Amps at 5V Vgs. <A> Others have answered the basic question. <S> This answer is just to show a more conventional schematic. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> OP's schematic redrawn in conventional manner. <S> For ease of reading and showing the intent of the schema normal practice is to enable reading from left to right with higher voltages at the top and lower voltages at the bottom. <S> This allows easier analysis of current flow, etc. <S> With this layout and the use of ground symbols it is immediately clear that M1 is acting as a negative rail switch on the load. <A> Replacing the MOSFET with "any NPN transistor" will not work. <S> However, it should be fairly easy to make the system work- <S> as long as the unstated requirements are not too demanding. <S> First, your GPIO will not put out much current. <S> See the data sheet p 339. <S> The data sheet indicates that a pin can put out about 20 mA with an output voltage of 4.4 volts, and the absolute maximum rating (which you should NEVER use as an operating point) is 40 mA (with an unknown voltage). <S> Subtracting about 0.8 volts for the base-emitter diode drop, this give 3.6 volts across the resistor, and this in turn requires a resistance of 90 ohms. <S> Your 1k will limit the base current to about 4 mA. <S> You want the transistor to act as a switch, with very low Vce, and this is called saturation. <S> What you don't realize is that when a transistor is in saturation its gain is very low - 10 is the usual rule of thumb. <S> This in turn says that your maximum LED current will be on the order of 40 mA. <S> You have not identified your LEDs, nor have you identified the current levels you want. <S> Assuming (just as a starting point) that D1/D7/D4 are red LEDs with a forward drop at desired current of 1.4 volts, the LEDs will drop about 4.2 volts, leaving (assuming zero volts across the transistor) of about 0.8 volts across a 10 ohm resistor, for an LED current of 80 mA. Assuming all 3 branches have the same current, this implies a total current of 240 mA, which is comfortably less than 40 mA, and implies a base current on the order of 24 mA. <S> If this analysis corresponds to your requirements, you should be OK. <S> You will need to examine data sheets to choose the proper transistor.
You will need to get transistor bigger than a small-signal device, with a maximum collector current in the vicinity of 800 mA to 1 A or higher. No, you are driving this MOSFET with a 5V Vgs, thus you need a MOSFET that has RdsON specified at 5V Vgs, otherwise it may work, or maybe not.
High resistance, no current. What's the point of a potential then? I am referring to this example: Why does it matter that the IC has a high resistance? What does this do for/to the IC? If there is a potential but no current, what is the point of using the IC when in the end no current would run through? Would the device even work? <Q> Not every gate needs current for it to operate. <S> MOSFETs are an example of voltage controlled devices whereas BJTs are current controlled devices. <S> A high input impedance means that no significant current will be drawn and as such components can be chosen accordingly. <S> It also means that the voltage between the divider won't change according to current draw because no current wil be drawn. <S> As such it is safe to use a voltage divider to get a wanted voltage. <A> The formula for the voltage divider's output \$V_{out} = <S> V_{in}\cdot \frac{R2}{R1+R2}\$ only applies if you're not drawing any current of the output node. <S> This because the formula above presumes that the same current flows through both the resistors R1 and R2. <S> In other words, to have a stable output voltage <S> Vout <S> you either have to take the required output current into your calculation or it has to be small compared to the current through R2. <S> For that reason you cannot use a simple voltage divider to power e.g. a microcontroller. <S> A potential without a current is a signal , either an analogue one or a digital one. <S> You'd do this e.g. to lower the logic level of an input signal from 5V to 3.3V. <A> Try doing the problem again with a much lower restance for the IC input, you'll find you get a very different answer. <S> That is why it matters. <S> Most (modern) IC inputs (not power supply pins) can be modeled as a large resistor. <S> Again, this problem is talking about an input pin, not a power supply pin. <S> The input pin could be one of the sense terminals of an op-amp or it could be an input to a digital circuit IC. <S> So whatever the IC is, it will sense the voltage at that input and respond accordingly. <S> This problem would be very different for a power supply input because power supply inputs can rarely be modeled as a simple resistor. <S> Hence, you would not design a bias circuit using a simple voltage divider for a power supply.
In this case you'd route it on a high impedance input pin of a device and therefore the application with the voltage divider works (as no current is drawn).
No potential difference between the negative terminal of battery A and positive terminal of battery B? I know that if you have two batteries, battery A and battery B, and connect the negative terminal of battery A to the positive terminal of battery B, there is no potential difference. If you consider the negative and positive terminals of the same battery, the potential difference exists (say 1.5V). I've learned that the potential difference exists because the atoms at the positive terminal have few electrons compared to the negative terminal and so electrons flow to equalize the two terminals. Why does this flow only occur when it is the terminals of the same battery and not opposite terminals of two different (identical in all characteristics) batteries? <Q> Measuring over two separate batteries won't work as they have no reference between each other. <S> Connecting two separate batteries with a single wire does not complete a circuit so current does not flow. <S> It only makes the connected battery terminals to be at same potential, so you can build a 3V battery from two 1.5V batteries. <A> Because batteries are neutral. <S> Poles are equal in opposite charges for the both batteries, so you can't free the charge out of either battery without applying power. <S> Also, notice that it is a circuit with a great impedance between other poles of batteries. <A> I know that if you have two batteries, battery A and battery B, and connect the negative terminal of battery A to the positive terminal of battery B, there is no potential difference. <S> If you consider the negative and positive terminals of the same battery, the potential difference exists (say 1.5V). simulate this circuit – Schematic created using CircuitLab Figure 1. <S> What you are describing. <S> You have learned incorrectly. <S> All the atoms have the required number of electrons. <S> The potential difference exists to to the chemical reaction of the cell. <S> Current is the movement of electrical charge - either positive or negative - so don't keep thinking of it as "electrons" although they are most common mobile charge carriers. <S> Current can only flow when there is a conduction path from one potential to another. <S> Why does this flow only occur when it is the terminals of the same battery and not opposite terminals of two different (identical in all characteristics) batteries? <S> Current can only flow in a circuit and only if there is potential difference (voltage) driving it. <S> By just connecting the negative of BAT1 to the positive of BAT2 you have not created a circuit. <S> It is still an "open circuit" so no current will flow. <S> If you look at Figure 1, what path could the current possibly take? <A> So, what electrons do isn't really important unless you're studying physics. <S> In reality current actually flows from the negative to the positive, but we didn't know that when we made up the circuit conventions and it doesn't actually matter how it works (again unless you're a physicist). <S> Everything is drawn backwards to reality! <S> What you need to keep in mind is that current flows between different potentials when it has a path to do so. <S> If you join the positive and negative terminals of two batteries, all you did was create a bigger battery. <S> It is now a battery with two individual cells (although the batteries may already be made up of multiple smaller cells connected in this way in order to achieve their given voltage). <S> A typical battery is actually assembled in exactly this way, with multiple lower voltage cells strung together. <S> But until you create a path which forms a complete circle (circuit), there is no where for anything to go. <S> You are changing the potential, but you aren't creating a circuit.
There will be no voltage between the connection point of two batteries as they are directly connected. I've learned that the potential difference exists because the atoms at the positive terminal have few electrons compared to the negative terminal and so electrons flow to equalize the two terminals.
Why are these traces shaped in such way? Please look at this image(see the PCB traces within the circles). This circuit belongs to a laptop adaptor. What are those parallel soldered-traces on the PCB traces? Why aren't they soldered to the soldered legs of the components? <Q> What are those parallel soldered-traces on the PCB traces? <S> They are traces where some of the soldermask has been removed in order to allow solder to build up to improve the current capacity of the trace. <S> The reason they left the narrow parallel lines of soldermask is so that the solder distributes itself more evenly across the width of the trace. <S> Otherwise, it might bunch up on one side or the other. <S> The rings around the component leads serve the same purpose — they prevent solder from wicking away from the joint. <S> The benefit of this is actually less than most people seem to think. <S> The resistivity of solder is about 9× that of copper, so in order to halve the resistance (double the current capacity) of a trace, the solder needs to be 9× as thick as the copper underneath. <S> For 1-oz. <S> copper (35 µm), the solder would have to be uniformly built up to 0.3 mm or more. <S> Why aren't they soldered to the soldered legs of the components? <S> They are in fact soldered to the legs. <S> There is a circle of soldermask around each leg, but the copper still makes the connection underneath. <A> What are those parallel soldered-traces on the PCB traces? <S> When you are designing a PCB with high current traces, you want to keep the trace resistance as low as possible. <S> You can do this by multiple methods: (a) Use a thicker copper layer <S> eg 70 microns instead of 35 microns. <S> (b) Use bus bars to carry the current instead the PCB traces. <S> These bars are copper metal that can be soldered on a PCB. <S> (c) Use a wider trace - not possible in all cases due to space constraints. <S> (d) put additional solder on the traces which will reduce the resistance to certain extent. <S> The benefit is 25 - 50 % reduction in resistance as per this video. <S> Again, it will depend upon the copper thickness and lead thickness. <S> Why aren't they soldered to the soldered legs of the components? <S> If component pins are included, they will find it difficult to trim the additional pin length because it will become fat due to a lot of solder deposited on it. <S> They are electrically connected due to the copper trace. <S> They coated most part of the trace with solder but chose to leave the pins. <S> They also made some slots which is not being covered by solder. <S> This is mostly to keep the additional solder deposit uniform and under a certain limit. <S> If you have a larger area being soldered by wave soldering, it will tend to pick up a larger hanging mass of solder (due to surface tension). <A> In case of high power adapters, high current has to be supplied. <S> Higher current requires either a wider copper trace and/or a thicker copper trace. <S> Widening the trace Widening a trace reduces the trace resistance and allows a bigger area for the electrons to flow across without much resistance. <S> While this method works in most of the cases, it fails when you have space constraints on the PCB. <S> Thickening the trace Thickening the copper trace will mean that the copper layer deposited on the PCB itself has to be thick. <S> More copper = more price. <S> This will increase the cost of the raw material which will ultimately increase the final PCB cost. <S> But, we can surely deposit some other metal instead of copper! <S> Solder is the cheapest and easiest of all options. <S> Some parts of the traces are intentionally not covered with soldermask. <S> These areas are later coated with solder during the soldering process. <S> How much area has to be soldered is calculated during the PCB design stage. <S> Dave Tweed♦ correctly pointed out the importance of a strip of solder mask between two exposed regions on the trace. <S> This allows for even distribution of solder all over the exposed region. <S> If the solder mask strip was absent, you would have seen a spherical blob of solder in the center of the exposed region. <S> So, instead of a flat solder coat, you will get a coat which looks very much like a mosquito bite! <A> In addition to the other good info in answers; Heavy parts soldered to large circular pads need more mechanical strain relief than electrical conductivity to avoid a microcrack annular ring , which is quite common due to shipping vibration and handling. <S> Heat emission near to DC output is essential with a large surface metallic area as often the plug gets much hotter from contact resistance over time and heat flows into the board contacts. <S> Thermal pads with spoke lines allow for heat islands for faster solder flow in soldering and de-soldering. <S> This would have been wave- soldered and there are many (5) unpopulated locations with red glue dots for inverted soldering. <S> Without the wave, there would be no excess solder, which cause bridging, so an omega vibration is often added to create a turbulence to the wave for higher yields and thicker solder spreading. <S> Spray Fluxing with airation in a bubble stone assists that but whatever process used here was not quite optimized but worked. <S> Using twice the copper thickness would have been better but also twice the board cost. <S> Added Note also <S> the addition of self-adhesive rubber pads across the HV barrier also offer better creapage protection reducing the cost of routing an air gap.
The heavy track void lines also provide additional surface area for bulged solder to conduct some more current and heat for thermal convection rather than the thermal resistance of a plastic solder mask only, over copper. You cannot have wide traces on your PCB if you want a very small form factor of your finished product.
Is this resistor leaking? If so, is it a concern? I found this resistor on the control board of an old Whirpool washing machine: Is that fluid leaking from the resistor? (Why would that happen?) Could it be something like stray epoxy or a chemical reaction with the substances in the machine like water vapor/soap instead?If it is fluid or a chemical reaction, what implication does that have for the longevity/safety of the resistor? <Q> That's a cement block style, wirewound power resistor, sometimes called a square carbon power resistor. <S> They look like this when new: <S> The one in your circuit board has been mounted upside-down from usual, so you can see the guts of it through the opening slot in the bottom, but that's no big deal. <S> It looks very much like the amber conformal coating material that was popular for that vintage of PCB. <S> It has probably been over-applied and ended up on the power resistor. <S> Naturally it will bubble and discolour when heated. <S> Apart from the odour and aesthetic factors, this is not in itself an electrical issue. <A> No, it's fine (as far as we can tell visually). <S> Maybe some foam got melted onto it or a bit of glue was on there and was heated by the resistor. <S> Those resistors have a ceramic housing, resistance wire winding around a core, and are held in by a type of ceramic cement. <S> No liquids at all. <S> I wonder why they put the ugly side up. <S> Whatever their reason, it's consistent, and if you search the PCB part number you'll find other examples with the burnt glue or whatever schmoo it is on there. <A>
Ceramic resistors sometimes run pretty hot so something may have melted on it but my concern is to the right side of the yellow capacitors is visible corrosion that may be due to capacitor fluid leakage and may require replacement clean up may be possible with 97% alcohol So I'd say with some confidence that there is very little concern about on-going chemical reactions. Like all resistors, this component contains no fluid, so the material that has bubbled was added later.
Placing bypass capacitors after VCC reaches the IC I have a question about bypass capacitors and their possible placements. I am designing what I hope to be a double sided PCB, which has the VCC and the vast majority of the data lines on one side, with the majority of the other side as a GND plane that the first side can via into as needed. I have found a picture of a PCB online which is doing similar things that I want to achieve, which is interface mostly 3.3V parts on a PCB designed to mate with a 5V host.As such, it has 3 SN74LVCH16245A family ICs to do signal level translation from 5V to 3.3V and visa-versa. I found the way the designer did the bypass capacitors to be elegant - it appears that there is a small VCC plane created underneath the SN74LVCH16245A ICs, and that the VCC lines on the ICs are connected to that plane on the opposite side of their pins , with the bypass capacitors then connected to the pin on it's normal side, and then the other connection of the bypass capacitor neatly vias to the other side for GND. I have drawn a box over the SN74LVCH16245A ICs in the image below: I have made a diagram of what I think is going on below: My question is, is it ok for bypass capacitors to be placed after the VCC on the PCB reaches the VCC pins on the IC?I ask because I have never seen bypass capacitors placed like this, or advised to be placed like this. In every illustration I have seen, the VCC line comes towards the VCC pin on the IC from the normal direction all other data lines do. And the bypass capacitors are always in between the incomming VCC to the pin and the VCC pin on the IC itself, but never afterwards, as per illustration below: If it is true that it is ok to place bypass capacitors in such a fashion, then it would be possible to combine that design with placing bypass capacitors as "bridges" over adjacent data pins of the ICs, would it not? As per illustration below? Could anyone give me some insight as to whether this is ok, or if they have a better suggestion of how to place bypass capacitors? Thanks! <Q> Any inductance reduces the effectiveness of the capacitance. <S> Putting the capacitor "after" the supply trace means that the capacitor will need to be recharged via a higher inductance, but I can't see why this would matter. <S> Low inductance = short and wide traces. <S> The really wide trace under the IC has fairly low inductance so putting the decouplers to the left and right of the IC in your diagrams is usually effective. <S> It seems possible that your alternatives could be just as effective, assuming that other things weren't compromised. <S> Note that the inductance and capacitor form a resonant circuit, the filter will not be effective at the resonant frequency. <S> So, designers are often using multiple values of decouplers to solve this. <S> Like 0.1 uF and 0.01 uF, or for a high-frequency board, maybe 0.01 and 0.001 uF <S> There are high-tech (i.e. expensive) tools to analyze the effectiveness of your decoupling. <S> I have never personally used them, they came along after I stopped designing boards myself. <A> After you understand how to do some impedance plots of your layout, you can vary the trace inductance 0.5nH <S> /mm and choose cap values with s-parms or ESR and compute your power plane impedance or not. <S> But remember that resonance will always occur where you least want it. <S> ( Murphy's Law) <A> It doesn't matter. <S> Do not think in terms of "the current going to the IC from the power supply recharges the decoupling capacitor on its way to the IC". <S> This doesn't follow any mechanical analogies that we may be used to such as the reserve tank on an air compressor, the water reservoirs, or supply trains. <S> Think of separate AC and DC analysis of the circuits. <S> For DC/low frequency currents, the power supply powers the capacitor. <S> Under AC/high frequencies, the true power supply is an open-circuit and the effective power supply is actually the capacitor itself. <S> You have two different variations of the circuits running on top of each other <S> so what really matters is minimal loop distance between the component and capacitor. <S> The DC current path refreshing the capacitor don't play into the AC current path that the capacitor is actually supplying. <S> The DC currents going past the capacitor before reaching the IC is irrelevant. <S> This is covered in more detail in Henry Ott's Book Electromagnetic Compatibility Engineering under section 11.7 <A> Afterward is fine. <S> Perhaps the PCB designer used this approach, to reduce the loop area of the IC+bypasscap. <S> Smaller loop areas require less energy to fight with the (smaller) inductance. <S> Check into X2Y capacitors, and how the flow of currents thru adjacent PCB vias can minimize the inductance and improve the bypassing. <S> You are exploring a crucial topic for high-frequency dataline fidelity. <S> Draw the 3_D topology (not 2_D, but 3_D) and examine the total enclosed volume. <S> Minimizing that volume is the key to minimal energy storage and thus minimal inductance. <A> If the overall goal is low esr bypass. <S> A full size power and ground plane is highly recommend, it will result in the lowest ESR result. <S> So placement of vias connecting the bypass caps is the most important. <S> And for the IC's you want the vias as close as you can get them to the pads. <S> This design will result in the lowest noise and most stable system. <S> Thus for your question for a 2 layer design, is very careful thought of routing everything. <S> If you can't, consider pouring gnd on one side and power on the other, and keep space for the pours to remain connected. <A> Either way is fine, the only important thing is putting them close to the pins. <S> What I would think more about is if you really want a big GND plane on one side of the board. <S> We treat GND like it's a magical 0V that can sink infinite stuff. <S> In reality all those GND connections actually have to flow through that plane. <S> That means you have multiple voltages traveling over the same path. <S> Your GND plane is going to be at different potentials, which are not 0V. <S> This isn't always a big deal, but if noise is something you are worried about it is certainly something you need to look at. <S> Having isolated return paths for some components is a very good idea.
What is important, is to have a low inductance path between the decoupling capacitor and the IC pin. You want the vcc and gnd via's as close a possible for the capicators. I would highly recommend adding an internal power and ground plane.
STM32 RTC with HAL libraries I am working on stm32l053 (nucleo 64) and I want to track time with integrated RTC. Since I am quite new to stm32 development I am using CubeMX and HAL libraries. My problem is that the time is not changing over time, the HAL_RTC_GetTime() function is always returning time that was configured at the beginning in the MX_RTC_Init() function generated by CubeMX. Here is my code for testing:Vars: RTC_TimeTypeDef currTime = {0}; in while while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ HAL_RTC_GetTime(&hrtc, &currTime, RTC_FORMAT_BIN); char timeBuff[20]; sprintf(timeBuff,"%d,,,%d...%d\n", currTime.Hours, currTime.Minutes, currTime.Seconds); HAL_UART_Transmit(&huart2, timeBuff, sizeof(timeBuff), 100); HAL_Delay(1000); } And here is the generated MX_RTC_Init() function: static void MX_RTC_Init(void){ /* USER CODE BEGIN RTC_Init 0 */ /* USER CODE END RTC_Init 0 */ RTC_TimeTypeDef sTime = {0}; RTC_DateTypeDef sDate = {0}; /* USER CODE BEGIN RTC_Init 1 */ /* USER CODE END RTC_Init 1 */ /** Initialize RTC Only */ hrtc.Instance = RTC; hrtc.Init.HourFormat = RTC_HOURFORMAT_12; hrtc.Init.AsynchPrediv = 127; hrtc.Init.SynchPrediv = 255; hrtc.Init.OutPut = RTC_OUTPUT_DISABLE; hrtc.Init.OutPutRemap = RTC_OUTPUT_REMAP_NONE; hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH; hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN; if (HAL_RTC_Init(&hrtc) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN Check_RTC_BKUP */ /* USER CODE END Check_RTC_BKUP */ /** Initialize RTC and set the Time and Date */ sTime.Hours = 10; sTime.Minutes = 15; sTime.Seconds = 0; sTime.TimeFormat = RTC_HOURFORMAT12_PM; sTime.DayLightSaving = RTC_DAYLIGHTSAVING_NONE; sTime.StoreOperation = RTC_STOREOPERATION_RESET; if (HAL_RTC_SetTime(&hrtc, &sTime, RTC_FORMAT_BIN) != HAL_OK) { Error_Handler(); } sDate.WeekDay = RTC_WEEKDAY_SATURDAY; sDate.Month = RTC_MONTH_MAY; sDate.Date = 25; sDate.Year = 19; if (HAL_RTC_SetDate(&hrtc, &sDate, RTC_FORMAT_BIN) != HAL_OK) { Error_Handler(); } /** Enable the WakeUp */ if (HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 5, RTC_WAKEUPCLOCK_CK_SPRE_16BITS) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN RTC_Init 2 */ /* USER CODE END RTC_Init 2 */} Serial output is: 10,,,15...010,,,15...010,,,15...010,,,15...010,,,15...010,,,15...010,,,15...010,,,15...010,,,15...010,,,15...010,,,15...0... PS.RTC WakeUp is working as expected so the RTC is counting but I guess it is not storing counts in registers. <Q> The solution is to call both GetTime and GetDate at the same time, If you call only GetTime it does not update correctly: HAL_RTC_GetTime(&hrtc, &currTime, RTC_FORMAT_BIN);HAL_RTC_GetDate(&hrtc, &currDate, RTC_FORMAT_BIN); <S> I don't know how they are connected, even more so because GetDate() is run after GetTime() and it still makes difference. <A> Try adding __HAL_RCC_RTC_ENABLE() to your MX_Init function. <A> Met the same problem today on my own STM32L072 board. <S> Finally found out LSE is not working, so does the RTC part. <S> The board has a slow start up period because it will switch to LSI after some waiting time. <S> Change to another board, RTC works fine.
It looks, like clocking for RTC is not enabled (CubeMX generated code sometimes "forgets" to do that).
How can an induction motor be "self starting" I read that all you need to start an induction motor is to apply the AC voltage, and with time the slippage decreases. How does this happen magnetically? If a rotor, connected to a moderate sized mass, is stationary at t=0, and you apply a quickly rotating magnetic field, then the stator will spend half of its AC cycle with its magnetic vector ahead of the rotor, and the other half it will be behind. To me that means it rotates the rotor in the +ve direction for 1/2 of the 1/60 cycle (assuming 60Hz), but it rotates it backwards for the other half. What am I missing? <Q> Most of what is written about induction motors is about 3-phase motors. <S> In a 3-phase motor, the magnetic fields rotate smoothly in one direction. <S> Single-phase motors accomplish the same thing with two windings that, in effect, are energized as a two-phase system. <S> There are several schemes to accomplish that. <A> You're absolutely right that a rotor inside a magnet on a single-phase circuit won't start moving on its own. <S> The key to getting it started is having a rotating magnetic field . <S> Once the rotor is turning that's all it needs, but when it's stationary it needs a push to get it moving. <S> There are several ways to create that push. <S> Many motors have an additional winding, called a starter winding, that's offset from the main winding. <S> The power to that winding goes through a capacitor (that's the thing inside that cylinder on the top of the motor), which shifts the phase of the power coming into the starter winding. <S> So as the incoming voltage rises to its peak, the starter winding produces its full magnetic field, and then, a bit later, the main winding hits its peak. <S> The net magnetic field changes its direction as the main winding kicks in. <S> That pulls the rotor a bit. <S> Then the voltage switches direction, the momentum of the rotor keeps it moving, and the pull in the opposite direction pulls it around. <S> Again, the starter winding gives the magnetic field a bit of rotation, and that, again, pulls the rotor more. <S> Once the rotor is up to speed, a centrifugal switch shuts off the starter winding, and the main winding is left on its own to provide all the power. <S> As you put more load on the motor, the rotor slows down, and lags further behind the magnetic field. <S> That produces a stronger pull, which produces more torque, which adjusts for the increased load on the motor. <A> You were right if you talked about single-phase induction motors with no additional provisions. <S> Such induction motors are rare for that very reason. <S> You can find them as electrical brakes for example, because that starting problem doesn't apply then. <S> If you insisted on single-phase and single-coil (well, sort of), you had to create an anisotropy in the magnetic field in the rotor. <S> That's done in a shaded pole motor . <S> Such a motor has more standstill torque in one direction than the other, so it starts by itself.
The field of a magnet in a single-phase circuit doesn't rotate; it just switches polarity.
Glitch in AC sine wave interfering with phase cut dimming My company installs ZigBee -based phase cut dimmers for bulbs and LEDs (those which support phase cut dimming). Recently, we encountered a site where we faced a flicker issue. The light is slightly flickering. When the same set of LED driver + LED is being tested at our test lab, everything is working fine. This issue seems very site specific. Site details - Some active construction is still happening at the site. Machinery like stone cutters, drill machines are being used on a continuous basis. It's also possible that the site is being powered by a generator set and not connected to grid at all (I am not sure of this part yet). Here is the site waveform: I noticed a repetitive glitch in the AC waveform which could be a reason behind the flicker issue. AC waveform as seen at our test lab: This one looks different from the site waveform. What is causing this distortion at the site? Is there a way I can correct it so that dimmers don't cause any flicker? <Q> The first waveform looks fine for mains, it can get much worse. <S> I suggest you use a rent a power corruptor, or use a lab with an operator, to see how vulnerable your dimmer is. <S> And work with those results to improve the design of the phase angle dimmer. <A> The distortion is due to diode rectifiers, phase angle rectifiers. <S> The distortion is not such big that should cause any malfunction. <A> Flicker: as dimmed, the LEDs have longer dark time than with full light. <S> The light from the fluorescent material decays more. <S> The human eye can well see the flicker, at least if the LED is a little aside from the center of the field of the vision. <S> It has been the same with fluorescent lights and old CRT televisions. <S> Another thing: If you have another non-linear load which also distorts the voltage waveform and does it in somehow a complex and different way, the summed distortions can produce mixing results in nonlinear components. <S> Some of them can be in the visible frequency range. <S> Without proper spectral analysis this all is only speculation.
Possibly, the LED power supply misinterprets these false glitches with expected phase angle voltage from the dimmer.
Different PCB color (is it a different material?) I have acquired this PCB. The right side of the PCB handles high voltage AC power (250 V maximum,) while the left side handles low DC voltages (24 V maximum.) They are separated, not only by board cuts, but also with this yellowish line in the middle. Is it just coloring to differentiate between the areas or is it some sort of protection material? If it is some sort of protection material, how do I include it in my future designs? <Q> The green areas have been coated in solder-mask. <S> It's the same base material throughout. <S> You would typically achieve this in your designs by adding features to the solder-mask layer(s) of your board. <S> The solder-mask layers are usually 'negative' images, so drawing something on those layers will result in the solder-mask being left out in those areas on your board. <A> The yellowish PCB laminate has better electrical insulation than some solder masks, so sometimes air gaps and solder mask free areas are used to separate the high voltage and low voltage side. <S> I work as CAM/CAM designer in a PCB fab, and recently we made a run of boards with no solder mask at all, because the boards were going in X-ray machines. <S> Extremely high voltages, and the voltages would jump very easily through the solder mask. <A> The yellowish line in the middle of the board is the true PCB colour. <S> The green areas <S> either side are solder resist. <A> In this case the lack of solder mask won't afford any additional protection that adequate isolation doesn't already provide, so removing it for that purpose is futile. <S> You may want to remove the solder mask for other reasons like adding plated text or artwork, peeling back the mask around pads, while creating custom footprints, and so on. <S> While most programs have different naming conventions for these layers, they generally all have the same approach of applying solder mask anywhere there isn't a line, polygon or text on the layer. <S> For example, in Eagle if you wanted to have a line with no mask separating two halves of the board you would draw a line on the tstop or bstop layers. <S> In KiCAD you would do the same but on the f.mask or b.mask layers
The yellowish area is simply the base color of the PCB material, which has not been coated.
Over Voltage Protection circuit without being affected from temperature I need adding an OVP circuit for my converter circuit. At the 100Vdc the Brown-Out pin of my PWM controller IC will be pulled down to the ground. I did this with the circuit shown below. But, at 80°C, the transistor is conducting too early. At 80Vdc input voltage and 80&degC, the transistor is conducting. How can I improve this overvoltage protection circuit without temperature effects? Thanks <Q> You need a temperature stabilized reference voltage and a comparator to do your task. <S> The circuit below uses the TLV431 , but you could use any of the variants available. <S> The reference voltage here is 1.2V. <S> You should keep the current in the voltage divider about 10-20x the maximum Iref pin current or about 100uA, here I set it much higher at 500uA simply to get reasonable value resistors. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> While I calculated fixed resistors here, you might find it more appropriate to use a 200 kOhm for R1 and a pot for R2. <S> The threshold voltage temp variation for the input pin is about 31mV maximum over the -40 to 125degC, this should give you about 6V range on the 100V bus you are measuring. <S> If you want to get the voltage range with temperature less than that you would need a considerably more complex circuit. <S> The temperature variation if the reference is shown below, and I assume you will not be using this over the whole range. <S> As shown below, you may appreciate that you can significantly reduce the temperature variation by heating the TLV431A to 50degC in a small oven (it could even be as simple as a FET glued to the TLV431). <S> This would drop the temperature sensitivity to just a few mV at 100V input over the whole temperature range. <A> Your circuit uses the \$V_{BE}\$ of an NPN as its reference. <S> This \$V_{BE}\$ behaves the same as the voltage across a silicon diode meaning it has a temperature coefficient of around -2 mV/K. <S> So the reference voltage goes down as temperature goes up. <S> So indeed the NPN will switch on at a lower voltage at higher temperatures. <S> That's totally expected behavior. <S> To solve this you could change the value of R1 (increase it a bit) but that would mean that the protection voltage at room temperature also increases. <A> Instead of a transistor use a voltage comparator component and provide a temperature stable voltage reference. <S> The reference voltage goes to one input and the other input of the comparator comes from the voltage divider off your battery.
If you need a constant OVP value over temperature you might need a more complex circuit.
How to set the sampling frequency for this filter+ I need to make a passive LP anti-aliasing filter(recommended cut off freq.). Filtered signal from an hotwire-anemometer will be measured by DAQ has 100Meg input impedance. The thing is that my sampling freq. twelve khz and I'm not sure it is fine enough. At which freq. should the stop band start? How to decide the adequate sampling freq. for this to be updated... <Q> When designing an anti-alias filter for a lowpass signal, you need to know 1) <S> The sampling frequency fs 2) <S> The signal bandwidth fb 3) <S> The quality of the signal you want to achieve Your passband goes up to fb. <S> It should be flat enough for your application, you may not want it -3dB down at fb, you might want less attenuation. <S> A Chebychev filter has controllable passband ripple. <S> Your stopband depth must be enough for the quality of the signal. <S> For 0.1% aliasing, you need -60dB stopband. <S> For a post-DAC filter, the stopband starts at fs-fb, and goes up to infinity. <S> For a pre-ADC filter, your stopband edge depends on exactly how you are going to use the data. <S> There are three choices. <S> If you are going to do analysis only in the specified passband, then your stopband starts at fs-fb. <S> Signals between fs/2 and fs-fb will alias to below fs/2, however they will be above fb, and if you are analysing only to fb, will not cause a problem. <S> If you want no signals aliased at all, even if they are out of your specified bandwidth, then your stopband should start at fs/2. <S> This might be useful if signal harmonics are present, and they form part of your processing dynamics, for instance detecting zero crossings. <S> Harmonics, when aliased, become non-harmonic, and mess up peaks and zero crossings. <S> If you want to do as little digital processing as possible, then your stopband should start as close to fb as you can economically make it. <A> I understand that hot-wire-anemometers, HWA are used to study wind turbulence with very fast slew rates , where Tsr=0.35/ <S> f-3dB. <S> If you have a 12 bit ADC, any signal above the Nyquist rate and above your ADC resolution is aliasing noise. <S> \$Av(½f_s) = <S> 20 log <S> 2^{-12}=-72dB \$ <S> Now define your specs. <S> \$f_s= 12kHz\$ <S> LPF stop <S> band <S> \$f_{sb}= <S> 6kHz @ <S> -72dB\$ <S> passband <S> \$f_{-3dB}=3.4kHz \$ linear phase or Bessel to -12dB A Chebychev is steeper but will cause more ringing from high Q in the LPF due to a Heaviside Step Function from a wind shear or turbulence. <S> Since this is less than 1 octave, <S> I an expecting 72/-6dB/oct. <S> = <S> 12th order filter using a quad Op Amp and 12 Caps. <S> There are many tools to design easily as long as you know how to scale values and keep the same RC product and understand what group delay does to a step function. <A> if you just need to begin to examine the wavelengths and the energy distributions, then try this <S> simulate this circuit – <S> Schematic created using CircuitLab <S> If you get too much attenuation at 3.2KHz, then reduce the downstream capacitors by about 50%, and re-measure.
If you want a maximum of 1% alias products, then a -40dB stopband will be sufficient (you could use less at certain frequencies).
Why do LDR photocells use CdS and CdSe? Basically what the title says. Cadmium is a toxic, environmentally harmful heavy metal that's banned under the RoHS directive, and even before RoHS its toxicity was well known. What makes cadmium selenide and cadmium sulfide such appealing semiconductors to make photocells out of? Why not use silicon, which also drops in resistivity when exposed to light? Silicon does even respond to most visible light as far as I'm aware, though not as strongly as CdS/CdSe due to being an indirect bandgap semiconductor. But other direct bandgap semiconductors exist, too, including ones without any highly toxic elements, like gallium antimonide or tin sulfide, or any of the more complex compounds used for thin-film solar cells. What gives cadmium compounds such an advantage? <Q> What makes cadmium selenide and cadmium sulfide such appealing semiconductors to make photocells out of? <S> Cadmium sulfide and Cadmium selenide turn conductive in the visible wavelengths, they do this because they are semiconductors and the bandgap is responsive to visible wavelengths. <S> A photoresistor is made of a high resistance semiconductor. <S> In the dark, a photoresistor can have a resistance as high as several megohms (MΩ), while in the light, a photoresistor can have a resistance as low as a few hundred ohms. <S> If incident light on a photoresistor exceeds a certain frequency, photons absorbed by the semiconductor give bound electrons enough energy to jump into the conduction band. <S> The resulting free electrons (and their hole partners) conduct electricity, thereby lowering resistance. <S> The resistance range and sensitivity of a photoresistor can substantially differ among dissimilar devices. <S> Moreover, unique photoresistors may react substantially differently to photons within certain wavelength bands. <S> Source: Wikipedia Photoresistor <S> Source: Optical and photoelectrical properties of CdSxSe1-x films produced by screen-printing technology <S> But other direct bandgap semiconductors exist, too, including ones without any highly toxic elements, like gallium antimonide or tin sulfide, or any of the more complex compounds used for thin-film solar cells. <S> What gives cadmium compounds such an advantage? <S> There are other materials that are responsive, but CdS or CdSe have responsivity in the visible wavelength range <S> , this is useful if you want your device to respond in the same wavelength range that people see in. <S> CdS is the best photosensitive material in the visible range and photodetectors made from CdS are cheap. <S> The alternative would be a photo diode circuit, which is more complex and requires more components. <S> Source: http://www.resistorguide.com/photoresistor/ <A> First, they were first. <S> As a useful photoresistive material, cadmium et. <S> al. predates silicon devices by decades. <S> Second, they are not semiconductors. <S> This is one of the main reasons why they are still in demand in areas such as professional audio. <S> Third, the property change (resistance in this case) from dark to light (dynamic range) is huge. <S> This means that many applications do not need any amplification or other signal processing. <S> Fourth, they can be made to handle high (compared to silicon devices) voltages, such as offline TRIAC gating. <S> Fifth, reliability. <A> As long as EU maintains a Cadmium exception for PV modules and sensors, etc in RoHS, they are still available. <S> These exemptions came with a promise to setup recycling routes. <S> What makes cadmium selenide and cadmium sulfide such appealing semiconductors to make photocells out of? <S> Inexpensive sensors with a very high sensitivity of <S> 0.8-Ω/Lux spanning many decades, avoiding the need for amplifiers. <A> More a complement to other answers than a full standalone one. <S> One of the aspects which I would like to stress about those devices, apart from their ruggedness and inexpensivess, is that they exhibit a more linear behavior respect to other semiconductor devices when operated as controlled resistors . <S> This characteristic is fully exploited for example by Jim Williams in his design of an ultra-low distortion audio frequency Wien bridge sine oscillator ([1], pp. 29-32). <S> By using a VACTEC VTL5C10 or a CLAREX CLM410 LED/photoresistor coupler instead of a 2N4338 with local feedback, he succeeds in eliminating the resistivity voltage modulation in the amplitude control feedback loop of the circuits of figures 45 and 47, removing a significant amount of distortion (compared to the already low values he achieves) from the output waveform. <S> This is due to the fact that in photoresistors the conduction is ohmic, without any diffusive components, which are instead of paramount importance for example in JFETs (in this respect, see my answer to the question " How current is steady after pinch off voltage? <S> "). <S> Final considerations on the inexpensiveness of CdS/CdSe photoresistors . <S> Their high basic resistivity is not affected too much by the polycrystalline structure they assume when deposed on insulating or metal substrates by sputtering, vapor deposition or other similar techniques, in order to produce photoresistors. <S> This is a far more economic production process respect the ones required by other semiconductor photodevices. <S> [1] Jim Williams (July 1990), " Bridge Circuits Marrying Gain and Balance ", Linear Technology Application Note 43, pp. 48.
The main characteristic of inexpensiveness of these devices is achieved because CdS and CdSe, despite being semiconductors exactly as GaAs and GaN, need not to be grown as a monocrystalline structure for those applications.
Will my circuit charge the battery and power Arduino? I am currently attending High School, so I don't expect too much here. I simply want to know all the recommendations for this circuit (Capacitor values, etc). But I mainly want to know if this circuit will take 120V AC and charge a battery in parallel with the load which will be a future bare-bone Arduino circuit. NOTE: Bridge Rectifier Will Be A NTE5326. Circuit Image: Data Sheets: Mcp73831 LM2576 NTE5326 Bride Rectifier <Q> No, the maximum voltage of the LM2576 is 45V. <S> There are also a few other problems with the schematic above: - You need to have an isolation transformer on AC mains for safety purposes <S> - AC mains can have spikes over 400V, from lightning or other devices. <S> You need protection from these spikes. <S> - AC mains should be fused, so in the event of a fault, it becomes disconnected. <S> EDIT <S> A circuit like this with a transformer would be better, instead of a 7805, put your DC to DC there. <S> Use a step down transformer to get the voltage to the recommended voltage of the DC to DC converter. <S> Source: https://www.elprocus.com/steps-to-convert-the-230v-ac-to-5v-dc/ <A> Nice try but <S> this is DC-DC converter only and 40 or 60V max options. <S> Keep mind AC line can have 120Vrms +/-10% <S> or +/-170 <S> Vpk sine <S> This means even if you had a huge 200V cap it has to be charged up in zero time at some random voltage. <S> All caps have internal effective series resistance or ESR so using Ohm's Law with say 1 Ohm ESR you can expect a 170A firecracker with toxic fumes. <S> The equation to surge charge <S> a capacitor with current is same for batteries. <S> Ic = <S> C ΔV/ <S> Δt, except even small 10Wh Li-Ion cells are ~ 10,000 Farads but 0 to 40V on 100uF can still be 40A if the ESR is 1 Ohm. <S> These values are given in datasheets. <A> One of the big benefits of AC mains power is that it can be transformed quite easily. <S> Just about every device that connects to your wall socket has a transformer of some variety. <S> A transformer does a couple of neat things for you. <S> Firstly, it lets you change the voltage to the level you want and secondly it isolates your circuit from the mains wiring. <S> Now you could get 5 V DC from your mains without using a transformer. <S> You can even do weird things like rectify your AC to DC then invert the DC back into AC using PWM into a transformer to get your DC voltage. <S> There are reasons to do these things. <S> In your case there is practically no reason for you to do any of this though. <S> Commercially available DC power packs are cheap, safe and available in the voltage and current you require. <S> Then instead of worrying about fuses, bridges, transformers and not killing yourself or setting something on fire you can just worry about powering your board and charging the battery :) <S> (Which by the way, depending your your battery chemistry is not a simple thing.) <A> The only reason you'd add a larger than 100 uF cap before the 2576 (or any DC DC converter) is for a smaller source you're pulling current from (I.e. an Alkaloid battery pack). <S> That's not the case with mains, you'll be getting more than ample voltage at all times unless power is out. <S> Use the TI power picker to pick some IC more suitable (will also do the design for you!!) <S> to your application <S> But also, you're exceeding the ratings of the 2576, and probably all the components in parallel with the mains that you had planned to use, there. <S> Also at 120V60Hz, the peak is at 170V, so make sure all your components in parallel with mains there are rated for DC voltage about 25% above 170V just to conservative. <S> Also, you'll want to use a transformer and fuse as laptop2d showed! :) <S> Good luck, and let me know if you need any more help!
As you pull more current to load the voltage goes down which could turn off the 2576, so you want to be sure the voltage is stabilized, so you add a big capacitor (470+ uF, ideally 1000 uF).
What is the right way to float a home lab? I just got myself some new toys for my lab at home like 30V DC power supply, KKmoon signal generator and a Rigol DS1052E. I want to float everything, because I don't want to spend any money on stuff like differential probes or isolation transformers. I am doing 100% DC stuff and want to do some probing in my circuits. My questions are: What is the right way to float my home lab? Do I float my three devices separately? For example, somehow removing the ground from the socket coming from the device? Can I plug everything into a mains power strip and remove the ground of the mains power strip before plugging it into the wall? Please let me know. Thanks. <Q> You can't float everything without an isolation transformer - the neutral will be connected to ground at the entry into the building. <S> For safety any class I equipment does need to remain grounded, in my lab <S> I have an isolation transformer <S> only for the equipment under test, the scope and power supplies still have the case grounds, and are tolerant of the inputs/outputs floating up to 50V from ground (per their manuals). <S> If I need to measure high side DC stuff, I can connect the high side to the scope ground (since the isolation transformer allows that offset) but a differential probe is still needed for measuring small signals with a large offset - it's far cheaper to buy one than smoke an oscilloscope <A> What is the right way to float my home lab? <S> If you want to make measurements that are isolated from ground, the only way to do this is with an isolation transformer if your scope is not isolated. <S> There are very few reasons to do this, a high voltage setup would be one reason. <S> Some AC measurements would be another. <S> Differential probes are best. <S> Do I float my three devices separately? <S> For example, somehow removing the ground from the socket coming from the device? <S> A reason to do this would for breaking a ground loop on the scope, so that is most likely the only piece of equipment that you'd need to do this on. <S> If you are doing this for AC measurements, the scope could also be floated. <S> It is unsafe to do this on power supplies, where will the fault current go? <S> Not to ground. <S> There are better ways to eliminate ground loops, one being a differential probe (kind of pricey). <S> Another would be minimizing the grounds between devices, and making sure they are not plugged in on different circuits or plugs. <S> (I've had a few times where this was an issue) <S> Can I plug everything into a mains power strip and remove the ground of the mains power strip before plugging it into the wall? <S> No, also very unsafe. <S> No path for a fault current. <A> There is no right way to float your home lab. <S> 1) <S> No. <S> 2) <S> No. <S> Don't float any of them. <S> Equipment that have grounded plugs NEED to be grounded for a reason. <S> 3) <S> No. <S> Because again, equipment with ground pins need to be grounded! <S> Having all lab equipment and the device being examined being connected to single power strip at least makes them being powered from same mains phase and having a single point ground reference. <A> If everything you do is DC, all you need is a DMM. <S> Likely what you meant is that it is low voltage but DC to high frequency. <S> Earth ground is advantageous two good reasons; 1) safety the line filter noise currents to the metal frame will go thru you if not earth grounded but your body has stray capacitance to earth line transients 2) <S> performance EMI reduction with lower CM noise which will be induced into your high impedance circuits. <S> You may want a consider a static-dissipative work surface, flooring, shoes, wrist strap, soldering iron. <S> Proper high-frequency DC supply measurements <S> When it comes to measuring supply ripple, you need an earth grounded low impedance AC coupled coax direct to the scope with an earth ground for a low impedance. <S> A floating ground would inject a high common mode voltage that could get inject noise current into your DUT. <S> it is always best to measure AC coupled with an external Cap to scope using coax without a probe terminated with cable impedance using an internal option or using a BNC T with 50R inserted. <S> You don't need a differential probe if you can make one. <S> Most measuremenats can be made with A-B with two matched 10:1 probes. <S> WHen probe ground inductance causes resonance <S> > 20MHz, simply remove clips and use tip and ring. <A> You certainly do not want to float your equipment if you still have earthed stuff around you, or literally under your feet. <S> That is especially true for (grounded) <S> anti static mats and wristbands. <S> That way lies an early grave. <A> if you want to float your instruments use battery powered instruments, trying to float mains powered instuments doesn't work well, and is potentially dangerous. <S> Else power your experiments from batteries or other isolated supplies and then you won't need to float your instruments. <A> It really doesn't sound like there is any reason for you to float your equipment. <S> Why do you want to float it? <S> You should specify the reason it is a requirement. <S> I think what you're actually worried about is ground loops? <S> That would only be an issue with the scope. <S> Do know if your scope is not already an isolated variety? <S> Because if it is you don't need to do anything! <A> First, install GFCI protection <S> If you don't follow any other advice here, definitely do install 6-8ma GFCI protection. <S> Either a GFCI receptacle or a GFCI device elsewhere that uses its LOAD terminals to protect these outlets. <S> This is not absolute protection. <S> Not least, if you get between mains hot and mains neutral, the GFCI will perceive you as just another load. <S> Do ground, just independently <S> Since you have a really good reason, you can ground yourself independently by driving separate ground rods for the lab. <S> This will amplify the effectiveness of the GFCI devices quite a bit, because dirt can't conduct enough to trip a breaker, but can conduct the 8ma to trip a GFCI. <S> This too is not complete, but at least these will keep people from laughing at your funeral.
Right way is not to float equipment that must be grounded.
Why does there flows no current through the common part of the circuit? I saw there was a post asking the same question here but I still don't understand it. I am reading the book Code: The hidden language of computer hardware and software and the book shows the following circuit: where the red wires show the flow of electricity in the circuit. I don't understand why there flows no current through the common. Could someone please explain? Why doesn't the electricy flow like this: So from the the negative terminal of battery 1, through the right bulb, and into the positive terminal of battery 1? Is it because the currents (the one coming out of the negative terminal of battery 1 and the one coming out of the negative terminal of battery 2) are exactly equal and opposite so they cancel eachother out? If that is the case why don´t they cancel out in this image? <Q> Basically, there are two currents flowing in the common line, one for each bulb, but since they are equal and they flow in opposite directions, the effectively cancel each other out. <S> If you draw the current for each bulb lit individually, and then superimpose them, you can see this. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Its easier to see the symmetry if you redraw the circuit. <S> If the circuit is symmetrical, then the voltages of the batteries will be at the same potential because the voltage will be equal due to symmetry of the currents. <S> An equal voltage means no current flow. <S> However, in the real world this would not be possible, there would be some mismatch (it's really hard to match resistances), the batteries would also need to be identical. <S> and all the wires the same length because wires are resistors (just really small ones). <S> simulate this circuit – <S> Schematic created using CircuitLab <S> So from the the negative terminal of battery 1, through the right bulb, and into the positive terminal of battery 1? <S> Yes another thing to consider is if one of the switches are off, both of the switches are off, and if both are on. <S> If only one switch is on, then the current will travel through the 'center wire' through the battery switch and light bulb. <S> Is it because the currents (the one coming out of the negative terminal of battery 1 and the one coming out of the negative terminal of battery 2) are exactly equal and opposite <S> so they cancel eachother out? <S> If all things are equal (which can happen in the ideal world of circuit diagrams) then the currents will cancel out, no current will flow and the voltage will be the same on both of the negative battery terminals. <A> Your second picture is of a different situation. <S> Same in quotes to show we are in the ideal world. <S> This is the exact reason no current flows in the first image. <S> However if you measured the voltage between the negative side of your lamp and your batteries negative terminal there would be an ever so small but quantifiable voltage across the length of wire. <S> It is small because the current has little resistance along the length of wire, therefore little voltage drop occurs along it. <S> Think V=IR for the wire. <S> The current is the same flowing through your lamp and the resistance is from the internal resistance of the wire, very low for normal copper wiring, therefore the voltage across the wire would also be very low. <S> And in this ideal example the current would split equally at the junction of two wires and flow to each battery, with the length of wire there showing half the voltage drop <S> the same length of wire would have shown if you had only 1 wire and battery. <S> Remember that without voltage difference no current flows.
The two negative terminals of the batteries are at the “same” voltage, aka the voltage between them is 0, so no current flows from one to the other.
How can I make 20-200 ohm variable resistor look like a 20-240 ohm resistor? I have a fuel sender in my kit car that goes from 20R to earth (full) to 200R (empty). Unfortunately the gauge (constant current source, measuring resistance to earth?) expects empty to be 240 ohms, so displays '1/4 full' when empty. What is the simplest analogue way to make 20-200R look like 20-240R? (40R in series gives a full tank showing '3/4 full' on the dial: Still not ideal!). So, a great suggestion from Transistor (below). I think I'll change R4 in his/her Figure 1 to a constant current source since car volts can vary quite a lot! I believe the value for R3 (above) will be fairly independent of the transistor specs? Update: Yes, this works nicely, gauge now goes from full to zero. I put R3 on a little trimmer - 720R for 1.6mA. Many thanks transistor! <Q> I have a fuel sender in my kit car that goes from 20R to earth (full) <S> to 200R (empty). <S> Unfortunately the gauge (constant current source, measuring resistance to earth?) expects empty to be 240 ohms <S> , so displays '1/4 <S> full' when empty. <S> Status Spec. <S> Actual <S> Reading <S> Voltage------------------------------------------Full 20 Ω 20 Ω <S> 100% <S> 160 mVEmpty <S> 240 Ω <S> 200 <S> Ω 25% <S> 1600 mV <S> Required voltage <S> 1920 mV simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> (a) What you've got. <S> (b) <S> The voltage reading can be boosted to the correct level by feeding an extra 1.6 mA through the sensor. <S> (c) <S> A simple current source based on 12 V supply and 1920 mV for empty. <S> What is the simplest analogue way to make 20-200R look like 20-240R? <S> R4 looks simple to me. <S> I suspect that the 8 mA source is constant current so that the gauge doesn't fluctuate with revving of the engine (other than that gradual downward trend as you burn up the earth's carbon fuel reserves). <S> To avoid R4 introducing variation you might want to feed it from a stable voltage source - as high as you reasonably can - and recalculate for your new voltage. <S> At full the extra 1.6 mA will increase the voltage through the 20 Ω by 32 mV. <S> On a span of (1920 - 160 =) 1760 mV this represents an error of 36 / 1760 = 2% so with a full tank it will read about 98%. <S> This should be acceptable. <A> I think the easiest way would be just getting a new variable resistor. <A> Per your comment "It's a digital gauge that runs about 8mA into the resistor in all positions", you don't actually need to make it "look like a resistor" from the gauge's point of view - you can just provide the gauge with a low-impedance voltage source, where that voltage is a linear function of the sensor resistance. <S> A fairly straightforward op amp circuit should do the trick. <S> You'll want to output a voltage that's 20*.008=0.16 V at one end of the scale and 240*.008=1.920 V at the other end of the scale. <A> There's no easy way to do it, anyway. <S> You could add a 20ohm fixed in series with a 20-220 ohm sensor, to give 40-240. <S> Not quite full, but empty would be empty. <S> If the sender truly is 20-200, something is wrong for the gauge to expect 240. <S> Bend the float arm up? <S> Are you sure true fuel "empty" is the full travel of the sensor? <S> The simple solution is to add fixed resistance to achieve true empty, and just recognize that 90% represents full. <S> It's doubtful the gauge will respond in a perfectly linear fashion anyway, unless your gas tank is a perfect square or vertical cylinder.
You could use a transistor to switch in an extra resistance but potentiometers are pretty cheap, so swapping out would be the easiest option.
Metal bar on DMM PCB What is this large metal bar inside my DMMs? One of them labeled it ST . They appear to be connected to the COM port or fuse. Is this just a big jumper for the 10 A ammeter? <Q> That is not a simple jumper. <S> That is the precision resistor used to measure the current. <S> You measure current by passing it through a known resistance and measuring the voltage across that resistor. <S> Using Ohm's law, you can calculate the current from the voltage and the resistance. <S> That changes the resistance slightly. <S> You measure a known current with a new meter, then whack on the shunt to make your new meter display the known current. <S> The thick ones like that are usually for the 10A range. <S> The lower current shunts are usually small, precision resistors on the board. <A> It is the current shunt. <S> Your meter probably has a 200 mV full scale range and will read 10.00 A with 100 mV voltage drop across the shunt. <S> From Ohm's Law we can calculate that the shunt resistance = <S> V/I = 0.1/10 <S> = 0.01 Ω. A decent meter will have a proper fuse protecting the shunt. <S> The fuses in your photo look too small <S> so be very careful. <A> Here's a Murata 0.25% current shunt: <S> It costs $20. <S> See the difference? <S> Due to the Positive Transfer Coefficient (PTC) characteristic of metal conductors, heat causes the resistance to increase and yield a false rise in voltage sensed as a current. <S> Generally, voltage drops for current sensing are limited to 50mV for this reason. <S> Additional heatsinks may increase this limit.
If you look closely, you will see that one of them has been trimmed by making nicks in the wire. This is also known as a "shunt" - hence the designation ST for shunt. It is a hollow copper tubing or a "cheap & dirty" 1% current shunt resistor for measuring current on the 10A using voltage (specifically mV).
scope - how bandwidth of scope affects what signals you can see I was wondering if a scope that only has 20mhz bandwidth and the signal you're probing is say 120mhz, can you you still use the same scope to see if a clock is present? Or do you have buy another scope? <Q> Oscilloscope bandwidth is defined as the lowest frequency at which the input signal is attenuated by 3 dB, that is, where a sine wave signal would be attenuated to 70.7% of its true amplitude. <S> So, if you're using a 20 MHz scope, the amplitude of the 120 MHz signal may be almost impossible to discern. <S> Also, keep in mind that a digital signal will contain frequency components at harmonics of the fundamental frequency. <S> The frequency spectrum of this signal consists of a signal at the fundamental frequency and odd harmonics. <S> The amplitude of the harmonics follow a sin(x)/x function in frequency so the third harmonic is about 13.5 dB below the fundamental and the fifth harmonic is 27 dB below it. <S> The next harmonic, the 7th, is 54 dB and below the noise floor of most oscilloscopes. <S> A common rule of thumb for choosing oscilloscope bandwidth is the so-called "fifth harmonic rule. <S> " Using this rule, you'd want a scope with a bandwidth of at least 600 MHz. <S> In many cases, however, this rule leads to an overly high bandwidth choice. <A> You can attempt it but the signal will most likely be too attenuated/distorted to discern. <S> A better solution is to either heterodyne the signal into the scopes bandwidth or get a scope that has higher bandwidth. <A> An oscilloscope cannot 'see' signals faster than it can sample. <S> This is dependent on two things, sampling and bandwidth. <S> If the signal that you want to observe is being undersampled it looks like this: Source: <S> https://www.evaluationengineering.com/home/article/13005137/a-view-of-undersampling <S> It means that you need a faster scope to really tell what is going on, because the signal is moving faster than you can see it. <S> Get a 200MHz scope.
Generally it's the bandwidth that makes the difference.
What to look for when buying a reliable hobbyist soldering iron I wanted to buy a soldering iron for some hobby tinkering, ordered one long ago from Wish! For a few quid, but as you must imagine it's awful. Doesn't heat uniformly, overheats and melts plastic. Tips are bad, i could go on, but I'd rather buy something decent without going mad price wise. I've seen prices from £10 - £300. Soldering irons, sets, kits, stations, extras, you name it. They have different settings, Watts and other characteristics. Which one of these characteristics will help me make an informed decision on what to buy for now, what I may need for more serious projects? Do I go by the price, Watts, extras, origin? Any help appreciated. <Q> Don't underpower, as this may force you to solder for more than two seconds, which is generally bad. <S> 40…50W is okay for the pieces hobbyists want to solder. <S> Use iron coated "long-life" tips. <S> They are totally worth it. <S> A silicone cable for the iron is totally worth it. <S> Temperature control is nice feature because it prevents the tip overheat while in the stand. <S> For the actual soldering it's not so crucial as the heat transfer from the tip to the PCB and pin should only last two seconds. <S> No time to regulate a temperature. <S> Good brands in my view are Ersa and Weller . <S> Ersa has tube-shaped tips and matching irons. <S> I find them easier to change once the iron is a bit rusty. <A> 40-70W Temperature controlled Interchangeable tips <S> Silicone cord <S> Don't know about their quality now. <A> Personally, one of the first things I look for a wide variety of tips, especially chisels, hoof/spoon/bevel tips (they go by different names but <S> the tip that is a conic section, sometimes with and sometimes without a cup ground into the end). <S> Forget conical tips... <S> they're terrible. <S> Tips can make or break things. <S> I'd rather have a inferior soldering iron with an appropriate) tip than an superior soldering iron with an inappropriate tip. <A> I would suggest finding one that uses tips with integrated heating (Hakko T12 are the most popular type). <S> Many manufacturers make them now and they offer multiple advantages over the old type of tips like: - nearly instant heating - faster temperature recovery when in use - possibility to change tips without waiting for it to cool down - incredible selection of good tips Plus the off-brand irons for them work very well and are relatively affordable.
A large variety of good tips is sort of a sign that the iron isn't too much of a cheapo. My Weller (obsolete model) is 30+ years old and still works great.
How do digital multimeters measure capacitance? How do digital mulitimeters (DMM) measure capacitance through their typical 10M Ohm input/output impedance? Providing a logic level of 3.3V, attempting to measure 1F would mean a time constant of 10M seconds (R x C) thus the voltage rise in the capacitor being in immeasurable (in the noise floor.) They also do it within a second or so at 3% accuracy. How on earth is this achieved? <Q> There are many ways to measure capacitance, <S> If you have a waveform generator you can either use a square wave and measure the rise time. <S> Or a sine wave and measure the current and voltage. <S> If you know current and voltage, you know what your load is. <S> If the load is a capacitor, you'd also need phase information. <S> The links below go into more depth on how this is done. <S> Instead of an waveform generator, the DMMs usually have a simpler circuit (usually only generating one or a few frequencies). <S> Instead of an oscilloscope circuits that measure phase and amplitude to do the calculations. <S> This also works for inductance to. <S> Source: <S> https://meettechniek.info/passive/capacitance.html <S> Source: https://meettechniek.info/passive/capacitance.html <A> Edit: <S> The high impedance is only for the voltage measurement setting. <S> The impedance is much much lower when measuring capacitance. <S> According to Fluke : A multimeter determines capacitance by charging a capacitor with a known current, measuring the resulting voltage, then calculating the capacitance. <S> They are not waiting for the RC time constant. <S> It applies a known current for a certain time and looks at the ΔV. <S> They may also do the same thing discharging the cap, in a loop. <S> Higher ΔV means lower capacitance. <A> Measuring a value of 1 Farad in 1 second with a DMM 1% resolution of 0.1mV and a measured value of 10 mV requires battery current when using pulse measurement techniques. <S> Even though RLC meters use a more precise constant current sinewave at selected frequencies to measure voltage amplitude and phase shift to compute all values, they still do not go up to 1 Farad. <S> Ic= <S> CdV/dt= 1F <S> * 10mV/1s = 10 <S> mA <S> which is more current than the DMM normally draws and would reduce battery life. <S> So the Fluke 115 only measures up to 9999 <S> uF. <S> The Keysight portable meters measure only up to 199.99 mF <S> However, if you follow Maxwell's ultracap test procedure, you won't need a $1k+ rack mount RLC meter that does offer 1F readings. <S> But it does take more than 1 second.
The cool thing is, if you have an oscilloscope and waveform generator, you can also measure capacitance, sometimes better than a DMM.
How can I run a 6.5V-100V power meter on 5V? I have an eBay power meter (V/A/W/Wh) that is specced between DC 6.5V and 100V. It's wired with a 75mV 100A shunt, like this: If I wanted to run the thing at 5 volts what would be the easiest way? There's an 3.3V linear regulator on the board (Z1) so I assume the logic runs fine on less than 6.5V. I haven't checked what the LCD backlight runs on, but I guess it would be fine on 5 volts. My first thought was to remove D1 (1N4007) which has a 1 V forward voltage drop and replace with a short, but I'd rather keep the reverse protection. What would be the easiest way to convert this to run on 5V? On 5V it doesn't even power on. When I connect it to a 12V supply it runs fine, except the readings (other than current) would obviously be off. Here's a picture of the circuit board. U2 is the LCD controller. Z1 is a 3.3V linear regulator. Also the 2 points marked "W" read 3.15 volts. Other components I haven't checked. Edit: U3 is a chip marked MXM11P62 and I could only find a Chinese datasheet and here is a Google translation Thanks for the answers... <Q> for 5V operation you'll need to loose the diode D1 and THE voltage regulator formed by R3 R4 R5 R7 Z2 C13 Q1 and feed the apropriate voltage (probably 5v) to the Q1 terminal closest to E4probably best to measure that first. <S> you can get some reverse polarity protectopn by putting a reversed diode in parallel with the input. <S> but if you have a 100A 5V supply that won't work well. <A> So this is what the input stage looks like from your picture (assuming there is nothing on the back): simulate this circuit – <S> Schematic created using CircuitLab Q1 is a power N-MOS ( FQD2N60C ). <S> Its Gate is connected in series with 120kOhms from V+ and the Drain is connected in series with 20Ohms from V+. <S> Z2 is some sort of fuse or diode or diode fuse? <S> Given <S> it's marked as Z <S> I would guess it's a Zener diode acting as a fuse/regulator. <S> It's probably not active in the voltage range you're using... <S> Then we have an inductor L1, with the E3 and E4 on each side (not sure what those are). <S> The Z1 which you said is a regulator seems to have V+ going in the GND pin? <S> I'm guessing there is a GND connection on the other trace which goes to the IN pin. <S> So, my wild guess at this point is that those via's past E4 go on to power the LCD/back-light. <S> Probably at around 5V. With a 5V supply there must be too much of a drop to run the back-light properly. <S> The minimum voltage from the spec is 6.5, which even after the diode drop is still 5.5V. <S> I think your best solution at this point would be to boost your 5V input. <S> The circuit wouldn't take up much space and you could make it part of one end of the cable. <S> Here is something to try though. <S> We know you get 12V out of M1 with 12V input. <S> So it should be safe to connect your 5V input directly to the output of M1. <S> That bypasses all the regulation and voltage losses of that input stage. <S> I'm thinking it probably still wont work, but it's easy to try. <A> Looks like there is a source-follower pre-regulator followed by your 3.3V regulator.
If you just jumper source to drain on the MOSFET it may work well enough at 5V.
Connecting a 5 V signal to a 3 V tolerant pin of a PIC I have a situation that happened in my case, where i'm putting an AC signal that goes from 0 to about 4,5 V in a 3 V tolerant pin of a PIC. The pin in question is RE6 of a PIC32MX470F512L . From the datasheet we see that this pin has a white color while the 5V pin tolerant have a gray color: The signal is a square wave that goes from 0 to about 4.2V. My question is, what happens to that input pin of the pic? Does it get damaged? <Q> if you out 4.2V on it a pic pin that only want 3.3V something will break. <S> Perhaps use a resistive divider. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> The 'non-5V tolerant pins' have an internal high side diode to VDD. <S> If the signal can supply more than 5mA (see the datasheet) the diode will be destroyed, followed by the input circuit to the PIC. <S> So to answer your question, not only <S> will this this input pin get damaged, but possibly other parts of the PIC too. <S> One solution, as Dirk Bruere mentioned, is to place a resistor in series with the input. <S> Any value between 200 Ohms (5mA) and 1 MOhm (~1uA) should work, 10 kOhms being a sensible value (0.1mA). <A> The chip inputs are normally diode clamped with a specified maximum current. <S> As long as you don't exceed that current it should be OK
Another possibility, and something I have used on other devices, is just to feed the signal via a suitable resistor.
Smooth switching between 12 V batteries, with a toggle switch I have a number of instruments (12 volts, drawing a few hundred milliamperes) that occasionally need to be switched between one of two 12 volt lead acid batteries. The toggle switch is break-before-make, so there's a fraction of a second interruption to the supply that causes a couple of the instruments to re-boot. The instruments are black-boxes, and I don't know what's in them or how they work. How can I smooth-out the power drop during the switchover and prevent re-booting? Will a capacitor and resistor in series across the load side of the toggle switch be adequate? The internal characteristics of the instruments are unknown to me (that's part of the problem), so I don't know what sort of interruption to the supply is acceptable. Also, there are several instruments that may or may not be switched on at the time, which adds to the complexity of the issue, so I'm looking for the simplest most generic solution that doesn't require much sophistication - that's why I was thinking of just a 12 V capacitor and resistor across the switch. <Q> You could add two Schottky diodes to the switch, allowing either battery to power the load via a diode. <S> During switchover the voltage will drop 0.35 V (1N5817 @200 mA) below the voltage of the battery with the most charge, and it avoids the current surge caused by adding a capacitor. <S> You could even remove the switch if a 3% power loss is acceptable. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> A little simple maths: In a capacitor charge, Q, and voltage, V, are related by \$ Q = CV \$ . <S> Current is the rate of charge flow so, differentiation gives us \$ <S> I = \frac {dQ}{dt} <S> = <S> C \frac {dV}{dt} \$ <S> You want to calculate your voltage drop for the duration of the switch transfer <S> so we'll rearrange as $$ C = <S> \frac {I}{\frac { <S> dv}{dt}} = <S> I \frac {dt}{dv}$$ <S> So, throwing in some rough figures, we'll say you are drawing 250 mA <S> , you can tolerate a 0.8 V drop and your switch takes 50 ms to throw then $$ C = <S> I \frac { <S> dt}{dv} = <S> 0.25 <S> \frac {0.05}{0.8} <S> = 0.015 <S> \ \text <S> F = 15,000 \ \mu <S> \text F $$ simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> The circuit. <S> @Jasen makes the point that "a large-enough capacitor may damage your switch". <S> As a result there will be an initial current surge through the already closed switch. <S> You can use a beefy switch or add a current limiting resistor in series with C1. <S> Once initially charged the switching current will be close to the load current during each switch transision. <A> This might seem overly simplistic, but I have worked around this in the past with a simple momentary switch across the main toggle switch. <S> Holding it in connects the two 12 V sources together while you flip the main. <S> So at no point is the power interrupted. <S> And with this the two sources are completely isolated during normal operation and cannot be accidentally left connected. <A> You could check out the Texas instruments Power MUX range: link. <S> There are some 12V versions. <S> I have a 5V one to switch LiPo batteries on a microprocessor <S> but I do not think it reboots as it does not matter in my case. <S> They are not that expensive and you can get a evaluation module if you are not happy soldering small footprint components. <A> Get a SP3T switch with make-before-break contacts to connect each battery to the one end contact. <S> And both batteries to the middle contact via a Schottky power diode. <S> That way there will be no "dead time" during the switchover. <S> Finding a suitable switch may be tricky. <A> I use this device for pretty much exactly your problem: http://www.mini-box.com/Y-PWR-Hot-Swap-Load-Sharing-Controller <S> I would assume it's easy for someone with experience in this area to duplicate if you'd rather roll your own. <S> Note <S> : I have no affiliation with the site selling the above, and I'm not sure whether it's currently available <S> being that there's no price listed, only "request quote". <S> When I purchased it many years ago (probably nearly 10) it was inexpensive, though. <A> Could you use two small switches make one break the other? <S> Would it put too much strain on charger? <S> It is a charger <S> I assume? <S> Or would it be too much strain on batteries due to different charge levels? <S> Also, the original circuit diagram would help. <S> This would assist a visual learner such as myself see the current configuration. <S> Or switch it sooner before battery is so dead that it causes a drop. <S> There is on market a smart switch made for automotive for deep cycle/starting battery combination. <S> You mentioned little space so not sure it'll work for you. <S> There is a solution in someone's mind somewhere that will work perfectly.
The point here is that a capacitor acts as a short-circuit when first connected to a power supply because it is completely discharged.
Please advise on mains relay type I am trying to design a circuit to control mains equipment using a microcomputer, probably a Raspberry Pi. The requirement is: The main switch is open (up in the diagram) and (ideally) no current flows. When the main switch is closed (down in the diagram), the Pi boots up. The relay R1 must stay open so the load is isolated. Later, the relay R1 is closed by the Pi, under software control, so that the load is energised. The load stays on, even if the Pi shuts down. When the main switch is opened, the load goes off and the relay R1 is opened, ready for the next iteration. Is there such a relay type, that would be normally open with no input power, and and then latch closed? Alternatively, I am thinking of another relay at C1, to open R1 at step 4. Is this a sensible idea? Please advise on the type of devices for R1 and C1 if appropriate. I am confident of cabling the mains switch, load and relay. Please note that this not about the Raspberry Pi. There is plenty of information available about using the Pi with relays and relay modules. <Q> There are latching relays that are turned on by a momentary application of power to one terminal and turned off by a momentary application of power to another terminal. <S> There may be latching relays with that built in. <S> You need to search to see what is available. <S> You should be able to find products that are described in sufficient detail to allow the customer to understand the function. <S> If a product is not well described, look elsewhere. <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> Pi-controlled latching relay. <S> How it works: <S> When SW1 is first closed RLY1 and RLY2 are off and both contacts are open. <S> When the Pi energises RLY1 (using one of those 3.3 V or 5 V relay modules rather than directly from the GPIO pin) <S> it energises RLY2 and switches on the load. <S> Note that the left contact of RLY2 now feeds its own coil and maintains supply even if RLY1 switches off. <S> When SW1 is switched off everything resets. <S> You're looking for a 2-pole normally-open relay with mains voltage coil. <S> (The normally closed contacts on RLY2 aren't used in this application so they're not required.) <A> Is there such a relay type, that would be normally open with no input power, and and then latch closed? <S> I can't speak for your diagram, but I do know about relays. <S> Relays use a coil and spring to stay on or off, when the coil is powered they switch positions. <S> There are normally open relays and normally closed relays, the trick is to figure out how to wire the relay to function with or without power. <S> If you want the relay to open with no input power, then buy a normally closed relay. <S> This means that it will be closed with no power. <S> Once the coil is powered it will remain open. <S> Another thing to consider is latching relays which use a different mechanism to latch. <S> They switch state if a pulse is applied, but you need power to change state. <S> There are some hobbyist relay boards available to make it easier to control from a raspberry pi. <S> Or some available on ebay . <S> Be careful when working with AC mains know and follow safety guidelines. <S> There are also some relays that are completely enclosed <S> but I couldn't find any for 220V.
If the application of power to either terminal is continuous, you could design a relay circuit that would disconnect the power automatically.
How can I record RF? For audio I can use just sound card, plus OS api to record any signal from 20 hz (below that's blocked via capacitor) to 96khz(that's half of max samplerate). But what if I just want to go higher? As high as it possible! How far could I go and what PC hardware should I use, in order to sample that signals? For example, I want to record broadband signal, and do FFT, to see "what's happenin here?" how this was even recorded? <Q> If your goal is to generate the plot shown in your question, the JRE is correct, you would use a spectrum analyzer (SA). <S> In fact, with a spectrum analyzer, the data you'd get would be essentially the plot you showed, and you wouldn't need to do any post-processing to get it. <S> But, you'll notice that the plot doesn't show any phase information about the signal at different frequencies. <S> And an SA does not typically store phase information. <S> So if there is other processing you want to do that requires the phase information, or requires reconstructing the time-domain waveform of the signal you measured, then an SA will not do what you want. <S> You can buy a digital storage oscilloscope with bandwidth up to over 100 GHz (and sampling rate over 250 GHz). <S> This would allow you to do what you specifically asked for, Take the FFT of the data to get a spectrogram, and to do it for signals up to ~100 GHz. <S> However you must be prepared to spend quite a lot of money to get this capability. <S> AFAIK these scopes retail in the ~$1 million range at the high end. <A> You would use an RF spectrum analyser. <S> You can also use a software defined radio module and something like GNU Radio to capture and analyse the signals. <S> The GNU Radio Wiki lists compatible hardware. <S> Much of it is USB-based, some network-based. <A> To see what is happening, you'll need to record the I+Q information of each signal. <S> This lets you examine the modulation (amplitude, phase, frequency, frequency sweeping, phase-ramps, pseudo-random-behaviors) of each signal. <S> For such as 256-QAM (a rather busy signal), you will need much more information than just the time of zero-crossings. <S> To detect (or make observable) various circuit flaws,such as intra-pulse ringing that the antenna itself did not filter out, you'll need lots of bandwidth. <S> This is in conflict with the broadband thermal noise of a 3GHz unfiltered input. <S> Additionally, to handle 50dB dynamic range (-12dBxx to -62dBx) <S> you'll need another 50/6 = 8 bits of ADC resolution. <S> Fundamentally, the broadband ADC noise floors (even if 50 ohm system) do not permit digitizing AT THE ANTENNA , and you will use PreAmplifiers. <S> Since DC_3GHz amplifiers with low noise figure (the noise density, factoring in the Zsource) are expensive and prone to intermodulation between the weak RF and the strong RF, people tend to implement narrow-band monitoring systems for RF. <S> Friend of mine, who provided unknown services to the USNAVY but knew a lot about signals, reminded me the Vacuum Tubes operating with 30 volt grid-cathode potential were much more robust in the presence of close-in blockers and adjacent-channel energy. <S> Thus the IP2 and the IP3 of tubes was/is crucial for robust communications in the presence of jamming. <S> To achieve these numbers using transistors, you need large resistors in the emitters of the transistors with volts of degeneration voltage ----- as far as I know. <A> The data you show was almost certainly generated by a spectrum analyzer. <S> However, spectrum analyzers only measure power. <S> They can only tell you that power was present at certain frequencies, not what information was transmitted. <S> To see the waveform, you would need to capture the phase information as well. <S> A receiver would convert the signal to a frequency where you can capture it. <S> If you connected the output of AM radio to your computer's mic port, you are capturing the amplitude and phase information encoded into the RF signal. <S> However, this approach is limited to the bandwidth of your audio card and the bandwidth of your AM receiver. <S> If you're adventurous you could hack a Mini-Circuits LNA and mixer to your radio input to extend its frequency range. <S> If you must collect wideband measurements at the highest frequencies possible, then you are talking about serious lab grade equipment. <S> Tektronix sells this mixed domain scope that will show you waveform data at up to 6 GHz. <S> Rhode and Schwarz or Keysight sales reps could set you up with similar equipment at up to 85 GHz. <S> I recommend renting and not buying if possible. <S> You say that you want to see the absolute highest frequency signals possible. <S> Receivers have been demonstrated as high in frequency as 850 GHz . <S> However, there are unlikely to be interesting transmissions in those bands unless you yourself are generating them centimeters away. <S> Also, the receiver described in the paper uses a 40 GHz intermediate frequency, so additional down conversion will be necessary.
The hardware that would allow you to capture the amplitude and phase information of an RF signal is usually some kind of radio receiver.
non-inverting op-amp with reference voltage on negative feedback? Hi, I am having a lot of trouble understanding this configuration. When i first saw it, it thought that the 2.5V reference voltage would force 1.25V on the negative terminal but after opening it up again i saw that R97 and R98 are not going to ground, therefore that assumption is not true. Can anybody explain to me how this particular configuration would work? <Q> One simple approach, if you are familiar with standard op amp circuits, is to use superposition. <S> First, assume that OUT-DAC1 is connected to ground but that REF-2V5 is still attached. <S> What is the output of the op amp? <S> Second, assume that OUT-DAC1 is still attached but that REF-2V5 is connected to ground. <S> What is the output of the op amp, as a function of OUT-DAC1? <S> Add the two results and you have your answer. <A> The opamp is in a negative feedback configuration because the output is connected to the inverting input via R98. <S> That means the opamp will try to make the voltage difference between its inputs (+ and -) equal to zero . <S> The Vdac voltage directly feeds into the + input. <S> So the opamp will try to make the voltage at the - input equal to Vadc. <S> If Vadc = <S> 2.5 V <S> then what does the opamp need to do to make - input also <S> 2.5 V? <S> The voltage across R97 needs to be 0 V (2.5 V at both sides) <S> so no current flows, that means there should also no current be flowing through R98 (because if there was a current, where would it go?). <S> So the opamp's output is 2.5 V as well. <S> Now let's make Vadc = <S> 2.0 V = <S> > <S> That means V(R97) = <S> -0.5 V and V(R98) = <S> +0.5 V <S> So the output becomes Vadc - V(R98) <S> = 2.0 V - +0.5 V = <S> 1.5 V. <S> Now let's make Vadc = <S> 3.0 V = <S> > <S> That means V(R97) = <S> +0.5 V and V(R98) = <S> -0.5 <S> V <S> So the output becomes Vadc - V(R98) <S> = <S> 3.0 V - -0.5 V = <S> 3.5 V. <S> So the amplifier amplifies does: Vout = <S> Vref + 2 <S> * (Vadc - Vref) <S> If you still have trouble grasping this, then assume Vref = 0 V and figure out what Vout will be when Vadc = -0.5 V, 0 V and + 0.5 V. <A> So, the lower part of the circuit becomes a voltage divider and, since both resistors have the same value, the middle voltage becomes the average of both ends. <S> Vn = <S> (Vo + Vref) <S> / 2 <S> By that same argument, you can also say that the positive input (Vp) is the same as Vdac (since no current flows through the resistor). <S> Vp = <S> Vdac <S> Now, if you take the basic op-amp gain equation and isolate Vn, you get: Vo = <S> A <S> * (Vdac - Vn)Vo = <S> A*Vdac - A*VnA*Vn = A*Vdac - VoVn = <S> Vdac <S> - Vo/ <S> A <S> Then you can join both equations and work your way into isolating the output (Vo): (Vo + Vref) / <S> 2 = <S> Vdac - Vo/AVo + Vref = 2*Vdac - 2*Vo/AVo + <S> 2*Vo <S> /A = 2*Vdac - Vref(A*Vo + 2*Vo) <S> / <S> A = 2*Vdac <S> - VrefVo <S> * <S> (A + 2) = <S> (2*Vdac - Vref <S> ) * AVo = <S> (2*Vdac - Vref <S> ) * A / <S> (A + 2) <S> That last equation seems to be a little complicated, but since the ideal op-amp gain is really large (infinite), you may consider that <S> A ~= <S> A + 2 (for A >> <S> > <S> > 0), then it becomes very simple: Vo = <S> (2*Vdac - Vref <S> ) * A / AVo = <S> 2*Vdac - Vref <S> That's it, you've got Vo as a function of Vdac and Vref <S> and I believe it makes it easier to see what Vo does. <A> I think, using superposition, the answer can be written down very quickly: (1) V(DAC)=0: <S> Vout1=Vref*(R98/R97)=-Vref <S> (2) <S> Vref=0: <S> Vout2=V(DAC)*(1+R98/R97)=2V(DAC). <S> (3) Vout =Vout1+Vout2=2V(DAC)-Vref= 2V(DAC)-2.5V .
A theoretical approach would be: Since the ideal op-amp input impedance is infinite, you can pretend the negative input (Vn) does not affect the rest of the circuit.
Creating higher voltage from DC motor? Is it possible to take a regular dc motor, use it to spin some strong magnets over some coils, and get a higher voltage than what's being used to drive the motor?I was thinking; if you're able to create a series of coils around the magnet, wouldn't the output voltage eventually surpass the input voltage? <Q> Absolutely! <S> That is the basis for motor-generators , which, before power semiconductors, were one of the few devices able to change DC voltage with comparatively little loss. <S> Of course, stepping up voltage comes with a concomitant reduction of current, so you don't gain any power . <S> E.G. 12 volts at 30 amps is equivalent to 120 volts at 3 amps, 360 watts. <S> But you don't actually break even. <S> If the motor has an efficiency of 95%, and the generator has the same efficiency (those are high figures), the combined efficiency is 90.25%, so with 360 watts in, you'd get only ~325 watts out. <S> TANSTAAFL , as Heinlein summarized the first law of thermodynamics. <S> Or , maybe not! <S> It's possible to get instantaneous power far exceeding the input power due to a flywheel effect. <S> The motor and generator armatures store kinetic energy as they spin up, so that even with the motor disconnected, energy can be withdrawn until rotation ceases. <S> Sadly, though, you still get less out than what you put in while spinning things up. <S> Heinlein got it right. <A> But the power cannot increase then <S> the output current will be a little less than the input current. <S> Are you thinking of Over Unity to feed the higher output voltage to power the original motor forever? <S> It don't work. <A> You will run into some mechanical problems with your arrangement mostly. <S> However, if you had a DC machine with a field winding instead of permanent magnet excitation, you can control the field strength. <S> The stronger the field, the lower the speed for a given voltage <S> The stronger the field, the higher the voltage for a given speed <A> If using two different DC brush motors, one to drive the other. <S> The output V*I=P, power out is still less than the input ( due to losses). <S> But it works as a DC transformer with the sum of both motor impedances in series. <S> Most motors are rated in V/kRPM, Volts per 1000 RPM for no load , thus the sum of series impedance affects the output voltage by the load resistance. <S> But with no load a 10V/kRPM motor driving a different motor rate 50V/kRPM will produce 5x the output voltage again at no load <S> yet draw ~10% of rated input current at a rated voltage just for the armature field coupling current and nothing out much like small AC transformers. <S> There will be commutation current spikes on the output, so a suitable storage cap is necessary to integrate the current. <S> This will likely give more satisfaction and better results than any DIY generator with massive rare earth magnets due to all the assembly issues of balance, gap leakage, winding/pole design, brush-armature design, etc,etc. <S> Don't exceed RPM of either motor rating unless you want to break something or reverse the motor with a polar cap on output.
You can easily get more output voltage from one motor driving a generator, the same as using an electronic voltage boosting circuit or using a transformer for AC.
Problem with MOSFET making my current dissapear The current of 150 mA has to go around 18 different circuits, one at a time. Now I am trying to use 18 LDOs as suggested below. But now the problem is that the current that is supposed to be 150 mA drops to 10 mA. I was able to figure that the problem is the MOSFET. I plugged only 1 MOSFET without load and the current stays at 10 mA and when I don't use any load just the regulator connect to ground the current is what I expect, 150 mA. simulate this circuit – Schematic created using CircuitLab <Q> If you can find a multiplexer with a high current limit then yes, that is possible. <S> Many chips have a 50mA limit, and multiplexers are typically not used for switching current. <S> It would be better to find a high side switch configuration with a logic level input like this (There should also be integrated high side switches if you need compactness with the current level you desire): <S> Source: 3.3v high side switch <S> Instead of 12V in this circuit, you could use the regulated 150mA current source. <S> You would need one of these circuits for each of your loads (which is an LED?). <A> AN 8-channel analogue mux for 150mA would be rare and thus expensive. <S> I would go for 18 LDO's with an enable input. <S> You can place the current sense at the input of the LDO's. <S> It would also prevent voltage drop. <S> For calibration you can switch them all off and measure the current which you have to subtract. <S> The problem for this solution is that I am trying to measure the resistance of the load and the LDO will interfere in the measurement. <S> I'll be honest: when I wrote this an an answer I was expecting that the current in the ground pin could be more or less ignored. <S> This from the way LDO regulators work in general. <S> I did not check this. <S> (Had no time at the moment). <S> I now have found a datasheet from a manufacturer for a device and <S> the ground pin current is indeed very low: It varies 10uA between null an full load: <S> (Beware that not all manufacturers have this information). <S> I don't know how accurate you need to measure but this error is 0.003%. <S> (Or assume it is linear and subtract 1uA for every 30mA output current). <A> You could use three inverting one-of-eight decoders eg. <S> 74HC138 to drive 18 3.3V (or less) drive P-channel MOSFET gates. <S> For example, AO3401 which have Rds(on) of typically 60m \$\Omega\$ (85 max) with 2.5V drive so they will drop less than 15mV at 150mA. <S> The three address bits on each decoder go to the three LS bits of your address, and the remaining two bits feed the chip selects to decode one of 24 (of which you will use 18). <S> No other components are required. <A> You may also want to consider building a discrete high-side current source. <S> In this case the multiplexer can be a jellybean component like the CD4051 .
Instead of multiplexing the output of the current source, you can add 18 parallel PMOS pass elements and multiplex the gate drive signal. You could try to calibrate it out.
How to use a gas gauge? I must have missed an article, lesson at uni, or something obvious because I'm struggling to work out how to write some firmware to use a gas gauge to get out a rough percentage of battery remaining, e.g. "56%". I'm primarily hardware-focused by trade and so whenever I've integrated them into professional products, the firmware has been handled by either a colleague or a contracted company. Now I'm just doing a design at home by myself and because of reasons, I've gone straight to using this STM part (instead of using a Sparkfun Module or something with pre-written and easy firmware) - because I actually want to learn, not just get something working. So basically I was just after some advice on how they generally work. Obviously each part is probably unique in their own way, but in general I know: They monitor the through-current with the shunt resistor They monitor the battery voltage by tapping off the + and - terminals They monitor charge/energy/power flowing in and out of the battery, by combining these two measurements and some math My question is: how do I get a percentage read-out from this? Especially since batteries all have different capacities and there is surely no way the GG knows what size battery I have plugged in? I'm guessing I have to plug in a fully-charged battery when the system first "fires up" (for example, 400mAh), and then work out the percentage myself in the firmware by constantly subtracting/adding the charge that has flown in/out from the total 400mAh. The bit that confuses me a little is that this then assumes a fully charged battery was first inserted into the system but this definitely isn't always the case - Li-Po/Li-Ion batteries are usually shipped at ~50% charge (if I'm not mistaken) and would be installed into products straight away before being fully charged, thus making all these calculations wrong and pointless. Is there something I'm missing? I can't find any detailed information on how to actually "use" these chips. Any help is much appreciated :) <Q> You need to initialize them somehow, and you're expected to know the capacity of the pack (and, if you want to be really nice to your users, you should update the capacity as the battery ages). <S> At least in the past I've used products that came with notifications that the gas gauge is only good if you've run the battery down and charged it up again. <S> This is consistent with my knowledge of how LiPo cells work. <A> First you need to learn all about Li+ battery models. <S> There are methods since all batteries have many C=QV and ESR values in parallel but you can simplify to a 2nd order approximation. <S> R1C1//R2C2 . <S> The different time constants are what changes battery capacity depending on C rate. <S> However this IC being limited to 2.5A or about 1C max and batteries are optimally shipped at 1/2 to 2/3 SoC. <S> Search my many answers on LiPo capacity and lithium battery models. <S> Second, rather than reinvent the wheel, get the firmware for different kits from all suppliers and choose the best based on your criteria for what is best. <S> E.g. <S> https://datasheets.maximintegrated.com/en/ds/MAX17048-MAX17049.pdf <S> Maxim here does not use Coulomb counting Third, depending on your motivation to research, learn, improve, copy or define your goals and realize them with search and test skills, you will need to verify your design with all the variables of I, dV/dt , temp, mAh, mWh, V, chemistry , aging and calibration in your specs. <A> Gauging the level of battery charge is not trivial at all. <S> Gauge architecture also varies depending on whether it is built into battery, or residing at system level. <S> Start here, Accurate gauging products for any battery system overview.
Accurate gas gauges, for example from Texas Instruments, use a built-in powerful MCU to calculate the charge level based on particular (selectable) chemistry model, accurate charge-in and charge-out measurements, and also track impedance of cell to track battery aging and get more accurate results.
How would you wire small computer to run on both batteries and AC power? I'm trying to use a motherboard (Mac mini 2018 model) for a project that will require it to be able to run off batteries. The project is essentially building a custom laptop using the Mac mini mobo and power supply internally with an mxm GPU board for upgrade able graphics in the future. How would I wire up the batteries with the power supply in order to be able to hit swap between AC and DC power and also keep the batteries charged when plugged into the wall? I could either use the power supply from the external GPU or the power supply from the Mac mini I think. External GPU I’m considering is the Sonnet Breakaway Puck. Max power from the included power supply is 160W or 220W depending on which model I buy and it marketed at being able to power itself and a laptop connected via USB-C so maybe this is enough for both Mac mini power and GPU power? <Q> This is certainly possible. <S> There are DC/DC converters made exactly for this purpose. <S> You might want to google for "dc/dc atx power supply 12v". <S> These converters are available at different power ratings. <S> Many of them are designed for carputers (computers in cars). <S> In the picture you see a small one providing 80 W power. <S> It is mounted as part of the ATX main board connector. <S> Stronger units usually come as separate boards, connecting to the main board via a cable. <S> Image source: <S> Hardware Webwinkel <S> It is also possible to attach a car battery charger to the battery, making operation and charging completely independent. <S> Note that 12 V is the nominal voltage of the battery. <S> Actual voltages for a lead type car battery should be anything from 11.8 (empty battery) to 14.7 V (charging, battery close to full). <A> In theory, you could connect a 375V~400Vdc battery where the PSU converts AC to DC. <S> Possibly get a used 2016 Nissan Leaf battery pack that operates at 375V and hot wire <S> it into the PSU and operate it for 100h. <S> In theory yes, but lethal if you make just a little mistake. <S> UPS solutions with large batteries, seem to be the best choice if you cannot find a laptop to perform as well. <A> First, lets check the feasibility. <S> I put a power meter on my new desktop computer. <S> It is a large tower, but it isn't loaded up with cards. <S> The OS is running on a SSD, this helps keep the power down. <S> It also has a traditional HD. <S> The power varies between 23 and 110 watts. <S> The average is probably about 40 W when doing a mixture of realistic tasks. <S> My large laptop has a 56 <S> Wh battery (0.7 lb ~0.3 kg). <S> So, assuming no losses, this computer could run about 1.4 hours on this battery. <S> This is a small battery compared to the size/weight of the desktop computer, you could use a battery 5-10X <S> this big and still keep the weight reasonable. <S> This is not very efficient, maybe 50-70%. <S> For efficiency, you need to scrap the computer power supply and find or design something that can charge and use a battery directly. <S> Sort of like what is in a laptop, only capable of more power. <S> Is this even possible using a computer power supply to power the motherboard and keep the batteries charged? <S> Probably not, a useful battery is going to have a higher voltage than the desktop will output at any reasonable current. <S> But, a battery powered desktop is feasible, see my last two paragraphs. <A> Is it only a motherboard ? <S> could explain why you want to do that to a desktop instead of just using a laptop. <S> Since you want to get rid of the AC part , the motherboard run off DC voltage (12V max) <S> (-12V min) <S> ATX <S> PIN Layout <S> ATX pin layout reference <S> Instead of taking the route of inverting Low DC to High DC and back just to supply a PSU , you can directly feed DC to the motherboard. <S> There are a couple of ways to do this , one of them is going to be to design your own PSU, using two batteries to supply 12V and <S> -12V, using those voltages to regulate them down to 5V and 3.3V. <S> Another would be to take a PSU and tinker about to use the functions you require from it(which <S> is different for each PSU but should be somewhat similar) which could prove a hassle and perhaps dangerous. <S> ATX <S> POWER SUPPLY CIRCUIT EXAMPLE <S> ATX power supply circuit reference <S> If you're going the first way , make sure you keep in mind (PS_ON,PWR_OK) pins and their functions. <S> Also make sure you supply the motherboard with enough current. <S> A car battery is of reasonable size, and a suitable 12.6V and a lot of juice. <S> But keep in mind this is highly DIYish. <S> You'll have to take into consideration, power protection and battery <S> empty measures to protect both the battery and the motherboard.(battery shouldn't fall below 40% as voltage will go down as well).
For an off-the-shelf solution, you could use a small battery designed for solar cell applications, and run the PC off an inverter.
Flow of current through human body to the floor I'm having trouble understanding the flow of current from a live wire to the floor via a human. Is the floor that we stand on conductive in nature? How does current flow through us if we stand on a wooden floor or tiled floor, and underneath the floors there'd be cement and bricks? So how does a conducting path even come into being if we are in contact with a floor? In the same sense, how does current flow to the mud in the earth ground if the mud is non conducting in nature? <Q> I'm having trouble understanding the flow of current from a live wire to the floor via a human. <S> The human body has typically 100 pF capacitance to ground. <S> Reliance on a conductive path does not mean current can't flow due to capacitance. <S> In the same sense, how does current flow to the mud in the earth ground if the mud is non conducting in nature? <S> Mud conducts due to several reasons, not least that water can be made to conduct quite easily. <A> Sometimes things goes wrong. <S> Floor may become dirty, wet. <S> A human can touch some conductive element connected to large capacity (Earth or other big machine). <S> The most frequent occurrence is wet floor. <A> Everything becomes conducting at a high enough voltage. <S> If you are standing on a dry wooden floor and touch mains live you will probably not get a shock. <S> On that same floor and you touch a high current 20kV PSU you are in a lot of fiery trouble.
Some current is through conduction but also some current is due to capacitive coupling between body and earth. Wet mud is conductive medium.
Name for this logic operation I'm from math.stackexchange and I wanted to know the name of an operation on multiple variables. I thgouth what I wanted was the XOR gate, but this is not the case. When I looked on this site I noticed the XOR truth table was this: \begin{matrix} FFF & 0 \\ FFT & 1 \\ FTF & 1 \\ FTT & 0 \\ TFF & 1 \\ TFT & 0 \\ TTF & 0 \\ TTT & 1 \end{matrix} I would have excpeted, and what I'm after is, this \begin{matrix} FFF & 0 \\ FFT & 1 \\ FTF & 1 \\ FTT & 0 \\ TFF & 1 \\ TFT & 0 \\ TTF & 0 \\ TTT & 0 \end{matrix} Is there a name for this second table as that is what I would like to use and I would like to stick to convention. Thanks in advance, Ben <Q> No, there is no name for that custom logic operation. <S> You'll have to implement the function below in whatever environment you are working in. <S> \$ <S> f(a,b,c)=\begin{cases} \displaystyle 0 <S> & <S> ,\text{when } abc=1 \\ \displaystyle \text{xor}(a,b,c) & ,\text{otherwise} &\end{cases}\$ <S> Or, if you don't want to deal with cases, this function gives the same answer: <S> \$ <S> f(a,b,c)=\text{xor}(a,b,c)(1-abc)\$ <A> I think this truth table would result in something like the circuit below, unless I've made a mistake :) <S> As you mentioned it would be like a 3 Gate XOR (what's represented by your first table) <S> but you have to exclude the case where all three inputs are 1 "True". <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Yes, this gate is called an exclusive-OR (XOR) gate. <S> Some definitions of the XOR gate that has more than 2 inputs state that the output is true if one and only one input is true. <S> This has been discussed at some length before: <S> How is an XOR with more than 2 inputs supposed to work?
This construct doesn't have a specific name it's XOR(NOT(AND(A,B,C)), XOR(A,B,C))
Resistance between VCC and GND drops to 3k Ohms I am kind of lost because of this problem. When my board is connected to my power supply and up and running the resistance between VCC and GND is at about 18M-Ohms. As soon as I power the board off, and it's no longer running, the resistance between VCC and GND drops slowly to about 3k-Ohms, then stays there. What could be causing this? <Q> You can't measure resistance between VCC and GND when power supply drives voltage between VCC and GND. <S> The multimeter is confused because there is an external voltage source. <S> At most you can measure if there is a short circuit or not. <A> What could be causing this? <S> When the board is off this is a little unusual because most often the leakage current through transistors or loads when the power is off is in the 1-100kΩ range for most of the boards I have with voltage regulators on them. <S> If you had something with a high side switch or a relay this could explain why the numbers are so high. <S> When the board is on, it really matters how your meter is measuring current, and often doesn't make sense. <S> If you really want to find the equivalent load, measure both voltage and current going into the board with a nice digital power supply or a power supply and a multimeter to measure current. <S> Then use this equation. <S> \$ <S> R_{eq}=V/ <S> I\$ <A> Multimeters measure resistance by applying a known voltage across and measuring the current, or vice versa, a known current being applied and measuring the voltage. <S> You can't measure devices that are on this way because the voltage of the device is almost always higher than the voltage being applied, overriding it. <S> On top of that semiconductors can have different resistances depending on how they're biased, which could also cause it.
Also, measuring resistance of anything that is not a resistor will give weird readings, as they can have nonlinear behaviour like LEDs or semiconductors.
Why can't all data be sent across 4 wires? I am aware that USB uses a positive, negative and D+/- wires in order to transmit data. The twisted pair are used to negate the effects of interference and electronic noise. I also understand that a cable needs to be thick enough to carry the necessary current, and connections need to be made properly so that high frequency signals are not reflected etc. Based on my limited knowledge I believe this is due to AC impedance being proportional to frequency. However, presuming a high enough quality cable, and a fast enough chipset to handle the data, is there any reason why we cannot connect all common devices over such a 4-cable system? (Ignoring the user experience)? Could PCI-E and all other digital serial interfaces be replaced by a fast enough USB like system? If not, why? <Q> Serial buses are widely used for high speed transfer. <S> This diagram shows the available data transfer / clocking rate of a number of serial and parallel buses. <S> In addition, it is common to implement multiple "lanes" each using serial transfer. <S> Serial buses are able, in practice, to implement higher transfer rates "per lane" and even parallel buses with very wide buses (eg PCI 64 bit) are still unable to match the thoughput of the fastest sinle lane serial buses (eg USB 3.1). <S> The above diagram is from Multi-gigabit serial protocols demystified which addresses your question far better than can be done here. <S> They say: ... <S> There is a physical limitation on the clock rates of parallel buses at around 1 to 2 GHz. <S> This is because of skew introduced by individual clock and data lines that cause bit errors at faster rates. <S> High-speed serial buses send encoded data that contains both data and clocking information in a single differential signal, allowing engineers to avoid the speed limitations of parallel buses. <S> Today, it is common to see high-speed serial links with data lanes running at 10 Gb/sec. <S> Additionally, multiple lanes of serial links can be coherently bonded together to form communication links with higher data throughputs. ..." <S> Also see: Web search super high speed serial bus - much good material <A> You could take a 4-wire cable and use both pairs for data, but then it wouldn't be called USB! <S> I can't at the moment find who said 'What the world wanted was powered Ethernet, what the world got was USB'. <S> Could we make one standard interface that could replace USB, HMDI, Thunderbolt, SATA, Firewire, DVI, PCIe? <S> Sure thing <S> (obligatory XKCD) <A> Sure, that's exactly what USB 3.0 SuperSpeed and related technologies such as Thunderbolt are all about. <S> It isn't just 4 wires any more, but it is a very high speed serial interface. <S> Right now, my laptop is driving a 4K display, 1G Ethernet, and a few other peripherals through a single USB-C connector. <A> All data could be sent over 1 wire if you really wanted. <S> The problem you encounter as you try to send data faster and faster is loss of data integrity. <S> The solution comes as a mix of circuitry at each end and more specialized cables. <S> You then get faced with a second problem. <S> It's going to be pretty hard to convince anyone to use your awesome data transmission method if they have to pay $100/meter for the cable, right? <S> There is also the cost of terminating the cable and how difficult it is to install. <S> You now have several different groups of people come up with several different solutions to the same problem. <S> All of which think their solution is the better one (or more likely the people who invested in finding the solution want to recoup their investment and don't care which is better.) <S> Thus begins your war of competing solutions which all do the same thing. <S> And contrary to what you may have been told, the product with the best marketing, lawyers and lobbyists wins. <S> The best product quite often loses. <A> Sometimes you can't send enough data over 1 pair of wires, so you need several. <S> How many do you need? <S> It depends! <S> USB would rather just use 1 pair because it's cheaper. <S> PCIe would rather use up to 16 pairs because it's faster. <S> Sometimes you can transmit more bits per symbol in order to transmit faster with the same bandwidth (see: Ethernet), but sometimes you'd rather have cheaper transmitters and receivers <S> instead (see: USB (not 3)). <S> Sometimes you want cheap cables and expensive transmitters <S> /receivers (see: Ethernet), sometimes the other way around (see: USB 3). <S> Sometimes you want other features, like ground isolation (see: Ethernet) which means every transmitter/receiver needs an extra transformer in it. <S> The protocol - what the bytes actually mean - is completely different for each one of these. <S> PCIe sends memory reads and writes. <S> USB specifically does not, because then someone could plug an evil USB stick into your computer and read all your passwords. <S> In USB and PCIe, there's one connection (the CPU) which is special and it's in charge of the whole network. <S> In Ethernet, every connected device has the same status. <S> That means none of them are in charge of the network and you may have to hire someone to set it up. <S> Imagine if USB worked like that. " <S> Hello, what IP address should I use for my mouse? <S> Uh huh, and my keyboard?"
Specialized cables cost a lot to manufacture.
How can I get ground from a NEMA 5-15R wall socket without electricity? I have some network equipment that I want to connect to ground (they come with 2-prong wall wart PSUs and have a separate screw hole for a grounding pigtail) - but where would I get ground from in a regular home? For me, the obvious choice would be an existing wall outlet (regular USA 120V 15A NEMA 5-15R ). But I don't need the 120V, I kinda just want to get the ground, connect it to a copper grounding strip or bus bar , and then connect grounding pigtails to that. If that is sane, then I wonder: How would I get the ground out of the wall socket? I guess I could just jam a banana plug or something into the grounding hole, or cut open a power cable and make sure the +/- electrical plugs aren't connected. But that seems hack-ish and dangerous. But there also don't seem to be "simple" NEMA 5-15R-ground-taps available (kinda the exact opposite of this ), which makes me wonder if a) this approach is actually the correct one and b) whether there might be a much simpler/better way to get ground from somewhere in a regular home. (A non-corrosive steel post outside isn't an option really here, no good way to run a wire into the room) <Q> I have seen adapters that are exactly what you want. <S> On the side that plugs into the wall they have one conductive prong for the earth connection and two plastic dummy prongs to fit the live and neutral. <S> On the other side they present the earth connection either as a single banana socket or a screw terminal. <S> So they do exist, but I'm not going to try to find a specific part number for you to order because shopping questions are off-topic. <S> Keep hunting and try using "ESD" as a keyword since these are often used to hook up electrostatic discharge prevention equipment. <A> You have two common options: 1) <S> A plug that is some variation on the left image. <S> They come in many different designs and price points. <S> Be aware that they may also have resistors on some/all of the sockets which could potentially make some unsuitable for your purposes. <S> 2) <S> Use/install a wall plate with an exposed ground screw as shown on the right. <S> You can then simply screw your pig tail(s) to the socket. <S> This should be the cheapest option for you. <S> Cheaper would be of course to just make your own plug. <S> Personally I would buy a $2 plug with removable type prongs, take out the live and neutral prongs and replace them with plastic. <A> you're on the right track with safely making use of the ground pin from a standard outlet. <S> I just did the same search within the last couple months and was surprised at how few options there are -- but keep searching and you will find them. <S> I was also surprised at how quickly you can empty your bank account for such a simple device. <S> Follow the advice from pericynthion and search for ESD related hardware. <S> Here is a small collage photo of solutions I investigated. <S> The last image could be easily modified with a banana jack or ring terminal as needed. <A> The first question you need to ask is what sort of ground do you want and why? <S> ESD grounding equipment contains large resistors to prevent it from passing large currents. <S> On the other hand if you want the ground for safety* or <S> EMC reasons the ESD grounding equipment will be useless. <S> If what you want is a low impedance safety ground then harper's suggestion of buying a rewirable plug and connecting your wire to the ground terminal is the way to go. <S> * <S> Either because you don't trust the supposedly class 2 PSUs to actually be class 2 or because you are worried that the leakage currents from multiple PSUs while safe individually could add up to be hazardous. <A> Go to the hardware store and buy a 3-prong NEMA 5-15 plug for $4 Wire your ground wire to it. <S> Wrap the other terminals with tape. <S> Double-check that your receptacle is wired properly Profit!
If you want the ground purely for electrostatic discharge protection then ESD grounding equipment is appropriate. I would 3D print them, but you could use the removed prong as a stencil and just cut a piece of similar thickness plastic into that shape. There are a lot of options as to how you could build one.
Understanding "Current Draw" in terms of "Ohm's Law" I'm having trouble understanding Current Draw as it relates to Ohm's Law (V = IR). I have a power supply rated at 5V and 500mA. I'm trying to power a string of LED lights. According to my datasheets, each LED draws ~50mA of current. If I have a string of 5 LEDs, that would draw 250mA. If I have a string of 10 LEDs, that will draw 500mA of current. Here's my problem: According to my understanding of Ohm's law, Current = Voltage / Resistance. As I understand it, when I add additional LEDs to my circuit, each LED should contribute resistance to the circuit. If this is the case, according to Ohm's Law, I would expect that current would DECREASE with each additional LED. In other words, as Resistance increases and as Voltage stays the same ... when I divide V by an increasing R, this equation results in a lower I. Instead, it is INCREASING! Am I misunderstanding something here? EDIT: Yes, I was misunderstanding something there. The LEDs on my LED strip are wired in parallel, not in series. Resistances wired in parallel lower the total resistance through the circuit, so current would INCREASE coming from my power supply. Additionally, LEDs don't function exactly like a regular resistors. As Voltage increases, current increases non-linearly, so Ohm's Law cannot apply perfectly. <Q> You have a number of misunderstandings. <S> Ohm's law applies to resistors. <S> LEDs are non-linear elements and therefore Ohm's law doesn't apply. <S> If you have 3 LEDs in series and one has 50mA flowing in it, so do the other two. <S> Total current? <S> 50mA. <S> Your source has to have enough voltage to "overcome" the sum of the forward voltages of the LEDs plus some headroom for whatever is regulating or limiting the current. <S> Elements in parallel have the same voltage across them, and may have different currents flowing through them. <S> The sum of the currents through each element is the total current drawn by the elements from the source. <S> Three parallel LEDs with 50mA flowing in each would draw 150mA from the supply. <S> You have to control the current through LEDs by using a constant current drive or a resistor in series to set the appropriate operating point. <S> So the draw will depend on how you design your lighting system. <S> Series, parallel, drive scheme and target current. <A> A string of LEDs is a bunch of LEDs in series and this means that they share the same current. <S> If the forward volt drop across each LED is (say) <S> 2 volts, then 5 LEDs requires a supply of at least 10 volts by the way. <A> It can often help to flip it upside down and think of conductance instead of resistance. <S> Conductance has a unit of Siemens or S. Conductance in Siemens is 1 / resistance in ohms. <S> C E = <S> I Conductance <S> * voltage = <S> current E = <S> I / <S> C <S> So for instance a 10 ohm resistor has a conductance of 0.1 Siemens. <S> A 5 ohm resistor has a conductance of 0.2 Siemens. <S> What happens if you parallel them? <S> Their conductance is - hold onto your hat - 0.3 Siemens! <S> In parallel, conductances just add . <S> Boy, that's easier to work with. <A> The resistance of an LED is not static, it changes according to the device's IV (current-voltage) relationship. <S> That is more of an aside, since Ohm's Law is not as straight forward as it may appear when you are dealing with active devices. <S> However the explanation to your problem is fairly straight forward. <S> You are adding LEDs in parallel <S> I assume, each LED has a fairly static resistance since current and voltage are stable. <S> I am assuming you are stringing the LED's in parallel. <S> When you add resistance in parallel it decreases the total network's resistance. <S> Look up effective resistance of parallel resistors and you will see.
Well first off I would say that an LED is an active device, which means voltage and current are not linearly related like a passive device such as a resistor. Elements in series have the same current flowing through them.
What is a power factor correction choke (PFC choke) and how does it work? They Exist This Link at Newark displays "Power Factor Correction Chokes", which I did not know existed. I have a linear motor which I suspect really needs power factor correction. Please tell me what a PFC correction choke is, how it works, and more importantly, how I can tell which one to specify for my application. Poor Explanations On-Line The following links ( What is a pfc? ) and ( Why are PFC chokes needed? ) from Wurth were early hopefuls in trying to answer this question, but they were very disappointing, as their english was not very good, and their verbage not terribly elucidating. Why do the job half-way? You just make your company look bad, and I otherwise respect Wurth. Anyway... Our Motor Our linear motor directly connects to the line, at either 110v or 220v, I believe. I am really a software developer teaching myself power electronics, so I have some knowledge, but big gaps, I suspect. I entered pursuing this field through my love of a hobbyist circuit, a self-oscillating boost converter called the Joule Thief , so I am familiar with boost converters, which I recently found out here (EEsx why boost PFC topology is the most used? ) are often the topology of a PFC correction circuit. The motor is performing an actuation, and suspending a small weight, but then applies up to 15 kilograms of force, so varies in its power consumption from about 10 Watts to about 500 Watts. The current power factor seems to be about 30%, and gets much worse as greater force is applied. Some customers use our device constantly, and other customers use our device somewhat infrequently, so perhaps PFC could be an option? Related to the Common Mode Choke? Finally, In telling me what a PFC choke is, please tell me if and how it relates to the common-mode choke (which I believe has a different purpose). Thanks again. Thanks If buying one of these PFC chokes will improve efficiency for our customers, and deliver power to our motor more efficiently, I want to know. Thanks. Edit #1 Though I may have indicated that this device needs help, it is actually in production, and working fairly well at customer locations. In some testing of the device I uncovered an obscure mode where the motor gets full power and then over temps -- but that's only with an administrative console and creatively power-cycling the controller+motor. I really just want the questions in the Title answered. In response to a question, "Must you replace the existing supply or improve it?"Improve, I think... Here is some more information that might help: The linear motor controller is a Parker IPA15-HC, a SINGLE-AXIS SERVO DRIVE/CONTROLLER : 6.3A / 1*100-240VAC (2.5KVA)Links: 1. Brochure 2. Quick Ref Guide 3. HW install'n Guide We wrote the firmware for the controller (in AcroBasic, a firmware Domain-Specific-Language specific to motor control). But the resource who wrote it may not be available, and I have only been at the company for 6 weeks. Here is a first guess at the actual connections in the device, though the motor in the picture is rotary, and ours is linear -- this is a Basic connection diagram pulled from Hardware Installation Guide of IPA15-HC Servomotor Controller at URL 8: <Q> Your motor, being an inductive load, will have a lagging power factor (voltage leads current) and therefore its power factor should be corrected by adding a capacitor in parallel with it. <S> Edit. <S> A power factor correction inductor can be added to a linear load (sine wave), which has a leading power factor, to increase the power factor. <S> This type of power factor is known as a displacement power factor because the current is displaced relative to the voltage. <S> The other type of power factor is known as a distortion power factor where the power factor is neither leading nor lagging. <S> This type of power factor can also be calculated from (real power)/(apparent power) but the concept of cos(phi), used for displacement power factor (sine wave and linear load), is no longer relevant. <S> Distortion power factor being less than unity is caused by harmonic distortion introduced by the non linearization of the waveform due to, for example, a rectifier/capacitor input combination. <S> The harmonics increase the reactive power. <S> This type of low power factor can be improved by the addition of a front-end filter which removes the harmonics and therefore linearizes the load (current/voltage waveform). <S> This harmonics reducing filter could be active or passive, the latter making use of inductors and capacitors. <A> Chokes do not correct power factor in the usual sense of "correcting" or the usual sense of "power factor." <S> Motors that are directly connected to mains power have a low power factor because they are inductive. <S> To compensate or "correct" that, capacitors are used. <S> Loads that rectify and capacitively filter AC power, and other electronic circuits connected directly to mains power, have a distorted input AC current waveform rather than <S> a smooth sine save current. <S> That is harmonic current distortion. <S> Harmonic current distortion has an effect that is similar to power factor. <S> The RMS input current <S> considering the distortion, is higher than an undistorted current would need to be to deliver the required power. <S> Inductance (chokes) inserted in series with the input to such loads will reduce the distortion somewhat. <S> Also harmonic filters can be designed using capacitors, resistors and inductors. <S> If your motors include electronic power conversion controllers, the controllers may need a harmonic reduction design. <S> You can not simply select something and add it. <S> However you could select series input inductors that cause 2.5% to 5% voltage drop at full load. <S> That would provide some improvement. <S> The typical impedance in the distribution system would provide close to the same improvement compared to a distribution system that has a very low impedance. <S> Improving power factor or reducing harmonics will not reduce the actual power used very much. <S> It might even increase the power used. <S> The only cost savings would be in avoiding a penalty that may or may not be charged for low power factor or harmonic distortion. <A> For the definition of the power factor you might have a look here . <S> Ideally (power factor =1) <S> the current of your load is in phase with voltage and is sinusoidal like a ideal resistor. <S> You can employ a special converter circuit (e.g. "active frontend") between grid and motor which shapes the current accordingly. <S> A key component of such a converter would be the AC-side inductor of the converter. <S> In case of the simple diode rectifier, the converter's AC-side inductor would also improve the power factor, but not as good as in case of the active frontend. <S> A simple but very good illustration is shown here . <S> Top, there is just a simple diode rectifier and the power factor is quite poor. <S> Middle, there is a AC-side indcuctor added to the diode bridge rectifier which improves the power factor significantly <S> (current shape is much more sinusoidal). <S> Bottom, there would be a converter actively shaping the current and the power factor is 1. <S> A common mode choke blocks common mode current (the current going usually via capacitive coupling to ground) and works in the frequency range 150 kHz ... 30 MHz. <S> The typical PFC choke is handling the differential current which is driven by the switching frequency of the converter. <S> It very much depends on the converter which is between the grid and the motor in order to figure out if a choke might help.
A power factor correction choke (inductor) would be used to correct a leading power factor (current leads voltage) caused by a capacitive load.
Soldering time for HC49 through-hole crystal without damaging it I do a lot of circuits using through-hole technology, but one part that just does not want to work perfectly every time is the HC49/S crystal even though it is installed correctly. When I replace one crystal with another one of the same frequency, the crystal works correctly. I am wondering: Is there a limit on how long the hot solder tip can touch the crystal lead before a crystal malfunctions? The reason I ask is because the PCB tracks I make for the crystals are about 2mm wide to lower the impedance between the crystal and the microcontroller and I want to make the connections smooth. Datasheets with crystals are hard to come by because I order many on ebay, and some from futurlec.com and some from a local shop. <Q> Is there a limit on how long the hot solder tip can touch the crystal lead before a crystal malfunctions? <S> Yes, but its absurdly long. <S> If you get two or three data sheets for comparable crystals from two or three reputable crystal manufacturers then you should find some guidance, and it should more or less apply to any decent crystal. <A> • Do not forcibly spread or bend the leads into a socket or PCB holes. <S> This will avoid cracking the glass insulation around the leads of the component. <S> • Do not apply excessive soldering heat – <S> Recommended Maximum Temperature is 380 ̊C using a hand soldering iron for a Maximum Duration of 3 seconds. <S> If you neglect these rules, you may damage performance. <S> Using non-franchised distributors with no warranty or support is a high risk. <S> REF Abracon Miniature THT Xtals are < $0.5 (1). <S> HC-49 about $1.50 <A> One possibility (assuming you are using the crystal as part of a tuning fork design as a micro's clock) is that you are not giving it the proper load capacitance. <S> This could mean it's oscillating too slow or too fast for your micro. <S> I'm guessing this as a possibility because you mentioned not having a datasheet for the crystals. <S> You have to get the frequency and the load capacitance right. <S> Adafruit has a good explanation of this on their site. <S> But your micro's datasheet should provide the appropriate crystal frequency and load capacitance. <S> https://blog.adafruit.com/2012/01/24/choosing-the-right-crystal-and-caps-for-your-design/
Basically, if you're not destroying your TO-92 cased transistors, and if you're not subjecting your crystals to mechanical stress, then your crystals will be fine.
How can I control TRIAC firing angle automatically with a DC voltage? I have to build an analog proportional controller for a 127 V, 1 kW AC heating resistance. The power delivered to the heating element must be proportional to the difference between a set point temperature (40°C) and temperature measured with an LM35 sensor, conditioned to work between 0 and 5 VDC. I tried to control the power delivered to the load by varying the firing angle of a TRIAC. However, I have searched online and on power electronics textbooks for ways to control the firing angle, but all the circuits I have found involve either potentiometers (such as dimmer circuits) that make then useless for automatic control, or special triggering circuits of which they provide no information whatsoever. Is there a way to control the firing angle of a TRIAC using a DC voltage without resorting to manual control using potentiometers? Or is there some other way of controlling the power delivered to an AC load using a DC voltage? Reference books or circuit diagrams would be greatly appreciated. Also, any information regarding already existing trigger circuits for triacs (such as integrated circuits for triac firing) would be a lot of help. NOTE: I am not allowed to use an Arduino for this circuit. <Q> Since the slew rate of temperature is slow, no DC controlled pulse is required. <S> It will cycle on and off and regulate to whatever set point you choose with an LDO derived Vref with a comparator and filter cap. <S> The opto-triac is just needs 5 to 10mA active low from the comparator with a current limiting R for the ~ 2.1V IR diode with Anode to LDO. <S> You can use 3.3 to 5V for the LDO. <S> Hysteresis or temperature error depends on the stability of Vref and external AC noise level of temp sensor voltage to ADC as excessive noise may cause it to cycle on and off quickly from a sensitivity of 10mV/ <S> degC. Noise reduction methods include, RC filter from twisted pair or coax as shown in data sheet. <S> Series R and 50pF max or larger R and bigger C. Temp errors will only occur if the noise is pulse like and not symmetrical. <S> If symmetrical AC hum exists on the temp signal, the Triacs will just cycle on and off at equilibrium like a cycle based PWM. <S> Other small sources of error may be from lack of thermal insulation outside sensor and poor conductance to the medium from the outside wall and/or the thermal insulation of the container with minimum thermal difference from heater end to opposite end. <S> Summary <S> You <S> may choose Opto-triac, Triac with thermal resistance and temp rise at rated current, LDO, pot, comparator, RC filters, cables, connectors, and have an indicator which could be a 2V Red LED in series with IR LED which affects series R (voltage drop I= <S> V/R) to get the same 10mA max current. <S> Have fun. <A> Basically, stripped of all the nasty details, you want for your homework project a voltage-controlled delay. <S> The delay should be very small for (say) <S> 0V in and just under 1/2 cycle of the mains for maximum input (say) <S> 5V. <S> That means your proportional controller would output 2.5V (say) for temperature = setpoint, and proportionally more voltage as the measured temperature increases (to reduce power to the load). <S> You can do this by creating a ramp with a constant current source and a capacitor, resetting it at the zero crossing (using a zero crossing detector feeding a BJT or MOSFET. <S> The constant current source can just be a resistor to something like +12V. <S> You then need a comparator to detect when the ramp exceeds the control input and drive the triac gate. <S> In a real application you would need to provide galvanic isolation, probably by using an isolated zero crossing detector (maybe an opto-isolator) and an isolated triac driver (an opto-triac or similar device). <A> Here are high-level block diagrams for the two methods. <S> I agree with Transistor, a Duty Cycle is usually best for a heater. <S> No need to generate (and therefore control) EMI emissions for no reason. <S> simulate this circuit – <S> Schematic created using CircuitLab
Your best solution may be to use an opto-isolated Triac driver to drive the power Triac and achieve ON off control with galvanic isolation and low EMI from the built in zero-crossing switch (ZCS).
Can a desolder pump aerosolize lead particulates? I have been reading up on the dangers of leaded solder. I understand the risk of actually soldering with it are minimal but my question is specifically its removal via "solder suckers." Does this process of removal cause fine enough particulates to make an airborne risk of exposure a viable one? If so what steps can be taken to prevent an airborne risk of exposure? <Q> If you're worried about lead, I would switch to lead-free solder. <S> It takes some getting used to, and you may need a hotter iron, but it works fine. <S> I hand solder 0.5mm pitch parts regularly using Sn99.3Cu0.7 solder. <S> It's better for the environment, in addition to potentially being healthier for you. <S> A simpler change you could make is to use flux and a desoldering braid instead of the solder sucker. <S> The braid has some of its own flux, but some extra can really "wet" the solder to get it out of through holes and crevices. <S> Some of the cheap desoldering braids work terribly, so I'd recommend springing for the good stuff. <S> Get something with a good rating on amazon. <S> And pick up a highly rated flux at the same time. <A> The vacuum action should collect all of the lead. <S> In its molten state, it doesn't separate very easily. <S> If you're working with any solder you should also have an extraction fan going, which would further prevent any particles escaping. <S> Now I think the tools themselves could definitely build up a coating of particles. <S> How much they come loose and form an aerosol I don't know, but cleaning them would probably help. <S> Lead is the known scary substance. <S> But even with lead free solder, aerosol particles breathed into your lungs are bad for you. <S> I think it's less about, what are you doing to protect against the scary lead and more about what are your general safety precautions when doing any soldering work at all. <S> I made a particulate and air quality sensor few months ago, maybe I can try some experiments. <S> I'm going to bet that even just heating the iron up results in particulates escaping into the air though. <A> I definitely always wore a respirator when cleaning it out but no one else did. <S> I don't know if it was fine enough to remain airborne since that would require require a beam of sunlight to make them visible but the room it was in did not have such a window. <S> I assume a manual sucker is no different. <S> As a result, I always always re-arm <S> it immediately after each use to eject anything inside and stick the iron into the nozzle as I do in order to capture and liquify any dust coming out. <S> Regarding lack of warnings, are you looking at the manual spring-activated suckers? <S> Or the motorized vacuum pump ones? <S> I wouldn't be surprised if the manual ones had no warning due to being so cheap and mass produced. <S> I know for a fact fume extractors have such warnings during filter replacement <S> but I never owned a my own personal motorized vacuum pump ( <S> the dust I saw when using them at school was one reason I never considered owning one) to see if the manual or unit had such warning.
If you use one of those motorized vacuum solder suckers, when cleaning it out you would see nothing but a bunch of fine lead dust in the glass cartridge.
How to block reverse current from battery to charger (DC-buck CC/CV module)? The set-up For a project, I have a set-up where the power to the main load comes from either a AC-DC adapter input (24V) or a battery pack (12V to 16.8V - 4S4P 18650 Li-ion cells). The battery pack is connected through a BMS module . Both power supplies are connected to a switching circuit that 'selects' the right source to use (DC if available, battery otherwise), using the LTC4416-1 chip. The DC input is also connected to a charging circuit using a DC-DC buck converter with CC/CV limiting to the BMS/battery pack. The problem For safety, I want to put a reverse current blocking protection between the buck module and the BMS/battery. (To prevent current from flowing back if the DC plug is pulled and thus the buck has no power.) I've read/seen a lot of posts/articles/datasheets/instruction videos/etc about possible options, but can't seem to find the right solution for my situation (supporting charging current that starts @ 4.08A - 16.8V). Options: Specially tailored (Schottky) diodes --> simple/affordable, but a lot of wasted power and heat Dedicated ICs ( like a load switch ) --> can't find one for my specs; either too little maximum current or too low maximum voltage High side switch using P-MOSFET(s) or N-MOSFET(s) --> can't find/figure out the correct diagram/circuit logic for this, since they all handle reversed polarity protection, which is not the case here.. My question is: what IC or (MOSFET) circuit can I use to block the reverse current? NB: Since the whole assembly will be mounted on a panel, there's no reversed polarity issue, only reverse/leak current from the battery to the buck module. <Q> An ideal diode would be the best solution with a suitable low RdsOn FET. <S> D4185 RDS(ON) <S> < <S> 20mΩ(VGS= -4.5V) <S> $3.19 simulate this circuit – Schematic created using CircuitLab <A> How to block reverse current from battery to charger output? <S> I assume here that you are already using the recommended layout of the LTC4416 AND that V1 is the AC-DC supply AND that V2 is the battery supply for your Power Path Switch. <S> Your Power Path Switch circuit will look something like this: Since V1 is also used to drive the Charger DC-DC convertor all you need is to use the G1 gate drive from the LTC4416 to drive another load switch pair. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> If V1 (the AC-DC power supply) is ON, then the output of the Charger is connected to the Battery. <S> If V1 is OFF and you are on battery power then G1 is high and G2 is low. <S> With G1 high the output of the Charger is disconnected from the Battery. <A> You have presented a number of solutions, but skipped over the most obvious one. <S> You're using a DC adapter. <S> This implies you have 120 VAC (or maybe 240 VAC) mains for the charging current. <S> Just find a normally open relay with a coil <S> the is rated for the same as the mains current and has contacts that can handle the DC current. <S> Wire the relay contacts so they complete the circuit when the relay is closed. <S> If mains power is lost for some reason, the DC adapter will be disconnected from the buck module in your diagram.
Connect the coil to the same mains power as the DC adapter.
12VDC to 3 Phase 400V In order top prevent my seldom used deep well pump (3 Phase, 400V) I plan to daily spin it up for a few seconds. Where the pump is located, the is no power supply (I operate the pump using a generator), but I can place there a 12V car battery and a solar panel for constant charging. Is there a way to convert 12V to 3 Phase 400V power? Power is needed just for a few seconds. The pump motor is rated 2.4A <Q> Easiest off-the shelf solution is probably a 2kW inverter powering a variable frequency drive. <A> While it's certainly possible to have a three phase inverter that converts 12V to three phases of 400V, consider the power that your pump needs: <S> P = U·I <S> ~= <S> 1 <S> kW. Do to the way this universe works, you need that 1 kW to come from somewhere, in this case your battery. <S> For a 12 V voltage source to produce 1 kW, you'll need more than 80 A of current from that battery. <S> That's more than most cars will need to start. <S> Therefore, you'll need a very beefy 12 V battery. <S> That'll set you back > <S> > <S> 100€. <S> The inverter needs to be very beefy, too; seeing that three-phase equipment is typically very industrial in nature <S> , that'll set you back > <S> > <S> 1000€. <S> And at that point, you'd not have bought a single solar cell. <S> If you're planning to use that solar system to have off-grid power there, anyway, this might be worth investigation. <S> If not, I'd recommend looking into automating starting your generator. <A> The primary problem is the voltage; a 3 phase inverter requires a DC voltage that is 141% higher than the output AC voltage, so at a simple 12VDC input, the most you can get from it is 8.5VAC and that will not be enough to power up even the control boards of a modern VFD. <S> Typically you need at least 70% of the rated voltage, so for a 400V VFD, you will need at least 320VDC into it. <S> So regardless of the amp rating of the batteries, you would need a minimum of 27 batteries in series to even get a VFD to power itself up. <S> So you CAN get a boost converter either as a stand-alone unit or built into a VFD for your pump, but this is likely what Solar Mike found that "made him sweat" about the price; this type of technology doesn't come cheap. <S> What you might be able to do with some research, technical expertise and a good source of cheap surplus components is to build your own DC Boost Converter to get 12VDC up top 320VDC. <S> It will still not be cheap, but it might be cheapER.
There are what are called "boost converters" that boost the DC up from a low level to a higher level using a compex network of capacitors and diodes with a transistor with a simple firing circuit.
Why do TTL integrated circuits have such complicated schematics for logic gates with so many transistors as opposed to RTL? I'm in the process of building a 4 bit computer out of discrete NPN BJTs and resistors. I'm using RTL, and I've made flip flops, full adders, and demultiplexers, and everything is working fine so far. Why are TTL chips that achieve the same things so much more complicated at the transistor level? <Q> Some of the biggest drawbacks of RTL were: much lower noise immunity ( 1x V be bias vs 2x) excessive static power dissipation for "0" output state due to low pull-up R for low impedance needed to reduce rise time for "0 to 1" output state to drive pF loads. <S> Such as R2= 50 Ohms. <S> Noise immunity and slew rates were very asymmetric if R2 was high ( e.g. 1k) <S> TTL solved these problems with a totem pole output. <S> and raised the input threshold to 2 equivalent diode or V be drops (1.35 to 1.4) the standards for input and output levels never changed as the TTL family increase speed and reduced static power and lowered the collector resistance from 130 to 50 Ohms for the fastest TTL speed. <S> The evolution of TTL came from efforts to increase transition speed, noise margin, reduce power, while retaining backward-compatibility, input thresholds, fanout=10, output levels. <S> These were the most minimal solutions to reach the specs and lower Pd from 74' to 74LS then for 74S' reduce slew time to ~ 1/3 for On and OFF into 15pF load, while preventing shoot-thru with both drivers active. <S> RTL never had a shoot-thru problem with only 1 driver and passive pull-up. <S> A totem pole output impedance is non-linear yet controlled to remain low without large surge currents. <S> Decoupling caps were only needed every 10 IC's, unlike CMOS 1 per IC. <S> Even though TTL appears to be asymmetric for voltage and impedance, the immunity from stray noise and crosstalk is balanced between the logic levels for noise power. <A> Using resistor pullups causes the output rise time to be slow, so TTL uses a "totem-pole" output that drives the output high. <S> This results in much faster operation. <S> RTL logic tends to use more power because large currents flow directly to ground when you need an output to be low. <S> Believe it or not, resistors with reasonable values often consume much more silicon area than a transistor. <S> So, an RTL gate may not be less expensive to produce in volume. <A> RTL came about before TTL, it was just harder to stuff as much stuff onto a chip, and people didn't know as much about analyzing the circuits. <S> In many cases, doing the job of one resistor with two or three transistors may actually take less space on the die.
TTL needed to be higher performance and easier to use.
Purpose of cylindrical attachments on Power Transmission towers Attached below is an image of a Power transmission pole. What I am interested in is the cylindrical shaped objects attached to the transmission tower. Some other observations and relevant information: These objects are not present in every tower but on one in every few towers or so. These towers are from a mixed Residential and commercial neighborhood The towers in question are in Japan. I have not observed these cylindrical objects on similarly sized transmission towers in my Home country A less relevant observation is that even though these are overhead transmission lines, they are insulated, perhaps because of the proximity of the houses and buildings to the towers EDIT: There is a similar question linked here , however, this picture has both a single phase and larger 3 phase transformer while this earlier question had only a single phase one. Further, the question uses different terminology to describe the transformer (cylinder vs canister) <Q> I'm assuming you mean these two: <S> The official name for these is " Distribution transformer ". <S> They are the "local transformers", here's a schematic of how they could be connected: <S> Which is from this question <S> Actual connections and voltages depend on the country so details may be different. <A> The large cylindrical devices as indicated below are power line transformers. <S> Their function is to step down the higher distribution AC voltage down to the common mains line voltages that feed into residences and businesses. <A> The larger DT is 3 phase voltage stepdown, while the smaller one uses only 1 phase for local use residential use. <A> I don't know for sure <S> but I strongly suspect that the top wires are the high voltage distribution and the middle ones are low voltage distribution. <S> I'm not sure about the bottom ones, maybe communications cables. <S> Countries with a lower final distribution voltage are likely to have more smaller transformers, while those with a higher final distribution voltage are more likely to have fewer larger transformers. <S> Larger transformers are more likley to be ground mounted while smaller ones are likely to be pole mounted. <S> I belive <S> this is why you see lots of pole mounted transformers in some countries and realtively few in others <S> (here in the UK you only see them in rural areas).
Those look like transformers to me.
Why is there a negative value on the scada when the analog input wire is disconnected from a field instrument? I'm an apprentice electrician at an fmcg company. I've been seeing a trend recently, at the plant, where the scada actually reads a negative value instead of zero when a field device such as a current transducer or RTD fails, ie the feedback wire going back to the plc analog input card is discontinuous. Should this value not be zero? Moreover, a Flowmeter eprom was recently damaged due to an unexpected current surge so the Flowmeter reads 0g/h even when there's flow going through. This value was - 500g/h (negative 500) on the scada... I mean, if the Flowmeter or any other instrument isn't sending any electrical signals back to the plc, why does it not read a zero value? <Q> It's common in control system design to want to indicate a faulty sensor in a positive (unmistakable) manner. <S> In an analog system the only way to do that is to send a signal that's well out of the normal range of measurement. <S> In the case of temperature transmitters used in heating applications, for example, we usually send a signal that is over-range high, so that the heat will shut off. <S> In some applications you want the opposite. <S> Also it might be worth noting that in a system with 4-20mA transmitters, an open wire will represent an input of -25% of full scale for a zero-based signal. <S> So if 4mA = 0°C and 20mA is 100°C then open (0mA) is -25°C. <A> Small negative values close to zero are essentially noise in the absence of a signal. <S> Larger negative values may arise if the plc has been calibrated with a gain and offset for that input. <S> If the offset would be negative then with a zero signal the calibration would return a negative value. <A> High impedance inputs are prone to EMI. <S> Current transducers 4~20mA <S> at 0mA may not read 0 <S> so your reading indicates an open fault. <S> I wonder if a sensor short circuit would be any different. <S> I don't see any reason why a flowmeter EPROM fault should affect a current transducer or an RTD.
An input of zero (faulty sensor) could otherwise be confused with a valid input.
Why are replacement plugs in the US only rated at 125V even though many of our devices can also be run on 220V? When I search for replacement plugs at Home Depot or Amazon (US), all I see are plugs rated at 125V. Even plugs marketed as "heavy duty" are still only 125V. Here is one such example. The only ones I've found rated for higher voltages are the big 20-amp plugs with non-vertical prongs. Yet all kinds of devices around the house are rated for 110-220V, even ones with small, flimsy plugs. Why are the bigger and seemingly more sturdy replacement plugs only rated at 125V? Is it just a conservative rating? I had been under the impression it was more the wire and power transformer you have to watch out for, not so much the plug. The reason I ask is because I would like to replace a plug on a device with a 110-220V power supply, that I would conceivably take abroad some time. Of course I would use the appropriate plug adapter. <Q> This is a code issue. <S> By code, certain outlets should only be used on a 120 V circuit. <S> And a different outlet should be used on a 240 V circuit. <S> If the 120-V outlet were used on a 240-V circuit, somebody could plug in a device that isn't rated for 240-V. <S> This would likely damage the device, and could cause further damage like starting a fire or electrocuting the user. <S> Your example plug is designed to fit the NEMA 5-15 outlets that are commonly used for 120 VAC, 15 A circuits in North America. <S> Therefore retail vendors describe them as "120 V" plugs. <S> ( image source ) <A> There is no real incentive for a manufacturer to certify a plug to 220V if 99.999% of the users will only use it for 120V. <S> The situation you describe is exceedingly rare. <S> It might be better if you permanently attach a plug compatible with European 220V receptacles and use an adapter in the US. <S> You should be able to easily find the plug rated for 220V, since that is its normal use case. <A> The US has a ~120V residential power distribution system, with 220V available for high power applications, and other voltages and systems available for industrial and lighting applications. <S> Because of that, the vast majority of outlets and plugs are rated for 125VAC. <S> Since manufacturers want to sell their products around the world, more and more devices are "universal input" meaning something like 85-264VAC. <S> There is a use case for US style outlet strips that are rated for higher voltage. <S> That is when you are abroad (e.g. in Europe) and want an outlet strip for your universal input US style plug devices. <S> Then you can use a single adapter and get a strip of US style outlets. <S> These type of power strips exist, and you can find them online. <S> However, it is likely difficult to find standard US style outlets rated for 220VAC, since it could cause damage or fire if a 110VAC only device were plugged into it while powered at 220V. <S> There are thousands of people that do it every day with laptop and phone chargers. <A> Yet all kinds of devices around the house are rated for 110-220V, even ones with small, flimsy plugs. <S> A big reason for this is international markets. <S> Where I work we sell to europe and the US, so all of our products need to work for both voltages. <S> Otherwise, it becomes confusing with the need to stock two separate products. <S> I'd imagine that this is a big reason why your devices work for both. <S> Why are the bigger and seemingly more sturdy replacement plugs only rated at 125V? <S> Is it just a conservative rating? <S> I had been under the impression <S> it was more the wire and power transformer you have to watch out for, not so much the plug. <S> In the US the standards and codes were developed around 120V. Plug width is determined by the voltage somewhat, as electricity can arc through air and a wider spacing supports higher voltages. <S> In the products I build, If I use a higher voltage, I have to make a wider air gap between conductors. <S> This and other factors like cost determine what plugs we use. <S> Normally products come with a C13 or C14 power connector on them, and then the cord determines what it can be plugged into. <S> The devices can autoswitch between voltages. <S> Some of our products cannot, they have a manual switch to determine the voltage. <S> If we needed a higher amperage, we go to a C20 style , <S> since most circuits only support 20A, you see most products supporting C13/ <S> C14 Source: https://www.digikey.com/product-detail/en/qualtek/703W-00%2F08/Q336-ND/1164207&?gclid=EAIaIQobChMIu_b6r_bh4gIVkvhkCh2QBgTxEAQYAiABEgI8-PD_BwE
As for plugs, if the device itself is rated for universal input, then it's likely that the plug and wire is fine for use with an adapter or outlet strip that converts 220V outlets to standard US style outlets. I think the answer boils down to cost.
Identification: what type of connector does the pictured socket take? The picture was taken off an equipment we are trying to connect to. Unfortunately the connector type was not specified in user manual. The closest one I can find based on shape is molex 4 pin female connector, or 4 pin peripheral connector used to send power to CD/hard drive in desktops.The difference is, molex connectors have flat sides, while the socket in picture has curves around each pin. Could anyone offer some clue? <Q> Source: <S> https://www.digikey.com/product-detail/en/on-shore-technology-inc/OSTOQ045451/ED2830-ND/1588283 <S> The terminal block plug can be found below Source: https://www.digikey.com/product-detail/en/on-shore-technology-inc/OSTTS04515A/ED2863-ND/1588621 <A> That is a Camdenboss <S> CTBP9350/4 (or equivalent). <S> The mating plugs are: CTBP9200/4 <S> CTBP92VG/4R <S> They are available from all major distributors (Farnell, RS, Digikey, Mouser, Arrow, etc..). <A> These connectors are most known from the Phoenix Contact Combicon family. <S> The shown socket mates with MSTB 2,5 <S> HC/ <S> 4-STF (1912090) <S> , however the metal plating inhibits the locking screws. <S> So use MSTB 2,5 <S> HC/ 4-ST (1911871). <S> That is assuming it's 5 mm. <S> If it's 5.08 mm then add "-5.08". <S> However with a 4 pin you can just use more force... Or get any of the other terminations they offer, they have a lot of choice. <S> (eg: <S> straight/angled or cage/spring)
Thats a terminal block header probably the same one shown below:
Polyfuse with Crowbar for Over Voltage I am looking to add overvoltage protection to a circuit of mine. A standard way of doing this is with a crowbar circuit with a fuse to blow when tripped, thus disconnecting the circuit. However, I don't want to have to deal with replacing blown fuses. This leads to looking at resettable polyfuses. However, I'm concerned about the condition where the overvoltage is maintained for a period of time - this would lead to the intended effect immediately, followed by a period of no current through the polyfuse, allowing it to cool, at which point we eventually get to a point where enough current flows to raise the voltage past my tripping point and the process repeats until the overvoltage is removed - this seems like unnecessary stress on the components. Is there a better way of managing this situation? I've not really used polyfuses before - how long do they take to "reset"? The datasheet of the one I'm looking at doesn't mention this at all, but perhaps the period is long enough that it wouldn't really matter. Simplified circuit for reference: <Q> Polyfuses don't oscillate like that. <S> They maintain their high-resistance state (allowing a small current to flow) indefinitely, until the current is interrupted altogether by some other means. <S> You'll be fine. <A> Polyfuses don't actually go fully open like regular fuses do. <S> This current (which is far smaller than the fault current, of course; that's the point of using one!) <S> is sufficient to keep the polyfuse warm. <S> It won't cool down until the power is completely removed and the fuse allowed to cool. <A> PTC's do not fail or operate this way. <S> They can change R by several orders of magnitude. <S> However, this design is no longer resettable if you crowbar with an SCR if the PTC current limit exceeds the holding current. <S> This would require manual power cycle and is your choice. <S> A better design would have OVP, OTP and auto restart like all LDO's, but many of these have a high dropout voltage, (>2V) unlike modern MOSFET LDO's which may be preferred. <S> PTC Resettable Fuses act like a self-contained thermistor-controlled oven and are designed for these characteristics well above the maximum operating temperature such as 85'C max and transition at 130'C. <S> This means will be burning hot and are made of flame-proof polymer materials and are suitable for Flame-Retardant substrates like FR4. <S> They come in SMD and radial ceramic packages. <S> Since the proportional gain or sensitivity of the curve is high, the difference in temperature for a wide range in currents is small. <S> So it acts like an analog controlled constant temperature ceramic heater. <S> They must have TUV/UL fire safety approvals. <S> They are defined by these parameters; <S> Current - Hold (Ih) <S> (Max) <S> Current - Trip (It) <S> Time to Trip <S> Resistance - Initial (Ri) (Min) <S> Resistance - Post Trip (R1) (Max) <S> Operating temperature range (normal) <S> Sample datasheet <S> My only concern is MTBF if there is a short. <S> Often, datasheets will say " Life time-up to 10 times longer" , longer than what?? <S> a fuse ? <S> (lol)
When a polyfuse trips, it goes into a high-resistance state, continuing to pass current.
5V digital output to 24V I need to come up with something to convert a 5V digital output signal from a USB-1608G DAQ device with DIO to 24V digital output signal to reset the timer on a watchdog . The watchdog timer will only draw around 7.5mA, just requires around 24V pulse for at least 1mS to reset the WDI period. Any ideas on how to go about this or directions to go in? I am thinking I will use an enhancement nMOSFET, with a Vth of about 2.5V. I am not sure what the best transistor would be to use and how to really configure the circuit so I can get that 24V output. <Q> Your device has a minimum high input voltage of just 2.0 V, so you can trigger it directly with your 5 V signal: <A> If the question was "switch some load against a +24V PSU rail by a TTL gate", I'd say BS170, 2N7000TA or some such. <S> But, you probably need a narrow positive-going pulse. <S> With a single transistor, this would probably mean using a pull-up resistor, which would have to source current all across the 24 V in a "mostly ON" configuration... <S> would generate a lot of waste heat. <S> So, you need a switch to +24V. <S> You need a pair of FET's (N and P polarity) and two resistors, or 1 resistor + 1 zener diode. <S> Since the maximum gate voltage in MOSFETs is usually 20 Volts, or less, sometimes 12 Volts - in the P-FET you'd need to limit gate voltage. <S> You could also achieve what you need with BJT's (1xNPN, 1xPNP) and about 3 resistors = invert the signal in a current-coupled fashion. <S> Or a low-side 2N7000TA MOSFET + a high-side PNP BJT + two resistors to drive the high-side base. <S> Such as Weidmüller 8950700000 or 1126920000 <S> (see pages 30 and 63 in this catalogue ). <S> Sounds like a european device. <S> Not sure what brand to recommend in other parts of the world - for instance GE doesn't ring a bell in Google... <S> Maybe also note that when you need to drive an opto-coupler device with a TTL gate, the TTL logic family can make a difference in terms of delivered output current to drive the "primary LED" of the opto-coupler. <S> Actually if this is an MCU or a computer with GPIO, the output's "source capability" can vary from pin to pin in the chip that's driving your 5V output (i.e. it's not down to its silicon family). <S> Nowadays you'll probably be fine, but if the opto-coupler doesn't open, check the voltage across its input terminals with a digital volt-meter (these have megaohms of input impedance). <A> You should be able to use an open-collector buffer to drive a higher voltage from a 5 V digital signal. <S> Like the 74LS07 hex buffer gate with open-collector. <S> Data sheet says that it has a 30 V maximum output voltage. <S> Open collector means that the output NPN transistor is connected emitter to ground and the collector routed to the output pin. <S> You can use that with a pull-up resistor and you can tie it to your 24 V line. <S> Be aware that not all 74LS* open collector devices can be used with up to 30 V. <S> I see the TI data sheet for 74LS05 only supports up to 7V, but the '06 also does 30V. <S> Both are hex-inverters. <S> Look at all the open-collector items available at Wikipedia's List of 7400-series integrated circuits
Or, if this is in an industrial setup, you could use an off-the-shelf opto-coupler with TTL input and 24V output, in DIN-rail mounted package.
Is it good to wire WS2813 LED strip DI and BI together? I have so far only worked with WS2812 strips and understood, that the WS2813 have a backup data line. But how do I connect the first LED to my Arduino (acts as a controller)? Many tutorials said I should just wire the BI to V0, but doesn't this eliminate the backup functionality? So I thought about wiring both data pins to my data source? Is this a good idea? <Q> This is based on a few sources including the (poor) datasheet . <S> My interpretation is that BIN should be connected to the previous LED's DIN. <S> Then if the one LED fails, the next one will not receive any data on DIN, but it will receive data on BIN. <S> It will switch to backup mode, where it uses the data from BIN, and ignores the data intended for the previous LED. <S> This allows the rest of the chain to continue functioning with only one dead pixel, instead of letting the dead pixel break the chain completely. <S> The chain will still be broken if two pixels next to each other are dead. <A> The WS28xx series of LED drivers are (were?) made by Worldsemi , but there does not appear to be a datasheet for the WS2813 available on the site (yet). <S> It seems that another company, Shenzen Normand Electronic Co may be the manufacturer. <S> Maybe it is a copy or a clone... <S> The datasheet can be found here . <S> In any case, page 2 states that data at BIN and <S> DIN are compared. <S> BIN is used in the event <S> DIN does not receive valid data. <S> It is not well-written; here is the relevant section: The BIN receives the data signal, and then compare the data with the DIN side after phagocytosis of 24bit data, if DIN do NOT receive the signal, then switching to BIN for receiving the input signal, which ensure that any the IC's damage does not affect the signal cascade transmission and make the BIN in state of receiving signal until restart after power-off. <S> I'm amused by the inclusion of phagocytosis , a biological process whereby cells can "eat" large particles by engulfing them. <S> I presume this is a bad translation that refers to the process of receiving and checking the 24-bit data packet common to the WS28xx family of LED drivers. <S> The main purpose of this is not to operate a second LED strip, but rather to allow a single contiguous strip to tolerate failed pixels. <S> Image from Elecrow.com <S> Essentially DIN is <S> a primary data input and BIN is a backup, just as you described. <S> Based on what I was able to find, it appears that you could easily connect data to both DIN and BIN , and if one of the driver ICs fails, it appears that DO will still pass whatever data was received at BIN . <S> If you prefer to not use this pin, you could connect it to ground as some suggest. <S> You may want to test whether connecting <S> BIN <S> to ground causes any additional current to flow, should that be a concern in your project. <S> It could be that it is best left floating (not connected) instead. <S> Measure to be sure. <A> No, not connecting the BIN doesn't eliminate the backup functionality. <S> As for what to do with it, the official datasheet at http://www.world-semi.com/DownLoadFile/117 doesn't say, so I won't speculate. <S> To show that the backup remains consider that the BIN of a WS2813 LED is connected to the DIN of the previous LED. <S> If the first LED is working, then it receives and shows the data on <S> it's DIN <S> and then forwards the next pixel data via DOUT to the DIN of the next LED in the chain. <S> Note that the second LED will now receive it's data on both BIN (direct from the first LED's DIN) and on DIN (repeated by the first LED). <S> If the first LED is non-functional, then the next LED first sees the first pixels' data on it's BIN (and disregards it). <S> It is then expecting data for itself on the DIN channel but receives none. <S> Thus it goes into backup mode and uses the data that came in on the BIN channel direct from the DIN of the first LED. <S> Thus, DIN is the one that needs to be connected on the first LED.
The datasheet does not specify how BIN should be connected (or left disconnected) if the backup data function is not wanted.
Electromagnetic Interference in Cable I am currently building a cable and would like to possible reduce any EMI. Three signals ( GROUND, ANALOG SIGNAL AND VCC) are connected to the encoder. I plan on twisting the Ground and VCC to cancel EMI and shield the twisted wire with aluminum foil. What should I do with the Analog Signal to reduce EMI? I assume the cable to be around 15 ft long. Note: There are motors, processors and radios around. <Q> A three-wire cable is not ideal for such a situation; if small amounts of power are needed, and the power is not switched or current-modulated, the return current inthe GROUND wire might be constant enough not to couple power noise into your signal, but the better solution is NOT to have a 'common' wire for those two functions. <S> Remember, <S> the I*R voltage drop in this wire IS added to the signal. <S> So, a four-wire cable (and if there are connectors, those too have someresistance, so use four-position connectors) will work better. <S> The twisting of the data-wire pairwill help reject B field (adjacent motors etc.) <S> pickup, but (at someextra expense) a coaxial cable will do even better. <S> If high voltageswere present, capacitive noise coupling to the twisted pair is likely,and the coaxial cable is the best choice. <S> This is not an unusual situation, and conbination coaxial/wire-paircable is available commercially (Belden #549945, for instance), orif you want something off-the-shelf, PC video cables (VGA) or S-videocables (two coaxial pairs and overall shield) are readily available. <S> Assembling your own conductors is problematic, because an overall sheathis usually required, and molded-on sheathing is preferred to wrappingwith lots of black tape... <S> There's no way to prevent radio pickup, but common-mode chokes can block itfrom your receiver without hurting the difference signal that is detected. <S> Other RF filtering depends on your data frequencies being different from theinterfering signal, but is often required. <A> I plan on twisting the Analog Ground and Analog Signal to cancel EMI and shield the twisted wire with aluminum foil. <S> Sounds good. <S> What should I do with the Vcc to reduce EMI? <S> I don't think there's anything you can do really, except for placing the VCC far away from your Analog Signal. <S> But, I'm not 100% certain <S> how you've thought you are going to connect ground, so I've made art in paint showing how you should connect the ground to the different parts. <S> Connecting it up as in my paint art below should protect your signal from your VCC and other radiation noises due to good ground shielding. <S> A slight problem is that the shielded wire will have a characteristic impedance . <S> This means that if your analog signal contains frequencies in the 400 Mhz region ((C*2/3)/15ft ~ 43 <S> Mhz, reflections starts getting important when you can fit ~10 periods inside a transmission line). <S> Right, if you got those frequencies, then you should buy a proper shielded cable and do some proper transmission termination at the entrances of the shielded cable. <S> Edit: <S> Though, now when I think about it, I think it's a little bit overkill to twist it as well. <S> You should be fine with just shielding it and connecting the shield to only one side. <A> Twisting the wires won't do anything here since you don't have a differential pair. <S> I don't think shielding will do much either unless terminated properly. <S> If you add shielding it's going to have to be properly 360 degrees terminated to the enclosure shields at both ends and that can be tricky. <S> My recommendation is for you to you build an active cable that has a single-ended to differential amplifier (like an AD8476) at one end with a differential amplifier at the other end, unless your DAQ can accept that directly. <S> By directly, I mean that your DAQ has a balanced/differential input whose input impedance for both lines is equal <S> so you get common mode rejection. <S> That converts your signal to a balanced signal that you transmit over a twisted pair. <S> Might still not be enough though at 15 feet... <S> but as far as I'm concerned that's the minimum that you need.
You can use common-modechokes on the signal-wire pair, and a true differential amplifier as thesignal receiver, so it will only have a 'ground' connection at ONE end,and no ground-loop pickup will result.
When to put resistor on comparator input I am using a open-collector output comparator (ROHM BA8391G) to enable a voltage regulator when Vin > 12V is detected (comparator output will be HIGH when Vin > 12VDC). Vin can be in the range of 12-28V. (Note that I am aware that in reality, the output will not go HIGH until Vin is ~13.4VDC) I am using a voltage divider circuit to feed Vin to the non-inverting (+) input of the comparator and connecting the 3.3V supply directly to the inverting (-) input. I do not plan on using feedback since the Vin voltages will not be very granular. simulate this circuit – Schematic created using CircuitLab Does the 3.3V supply connection to the comparator need a series resistor to limit current? And more generically, when do the inputs need current limiting resistors? I have seen some examples online that do not have a series resistor. Such as this TI design guide However, the datasheet for the component says "Excessive input current will flow if a differential input voltage in excess of approximately 0.6V is applied between the input unless some limiting resistance is used." My interpretation of that is that if the difference between the inputs is >0.6V than there can be excessive current flow...? The largest possible difference between the two inputs is when Vin=28V; Vdiff = 3.7V Here is the simplified schematic from the comparator's datasheet that I am using: <Q> TI parts have 1k series internal inputs to limit current to 10mA with <S> 20V. Rohm parts chose not to include this. <S> But your 30k series will limit the current to < 1mA. <A> Comparators and opamps have high impedance and low current leakage on the input. <S> You can check this by looking at the input bias current in the datasheet. <S> You can think of the input to most comparators and opamps as a resistor having higher than 1GΩ of resistance. <A> Your question needs some attention because you draw a schematic with a TL081 which has JFET inputs meaning that there is an almost zero current flowing into these inputs. <S> But you are actually using the BA8391G which has this internal schematic: <S> I see no JFETs, I see PNP inputs. <S> That means that there will be a small current (typically 50 nA) flowing out of the inputs. <S> This 50 nA will cause a small voltage drop across any resistors at the input. <S> In your schematic the resistors R1 and R2 are of such a low value that this voltage can be ignored as the 50 nA will create a voltage drop of less than 1 mV. <S> If you would be using higher values for R1 and R2 then that 50 nA could be of significance and then you would want a similar voltage drop at the 3.3 V input of the comparator so that both inputs have the same voltage drop. <S> This is why you sometimes see a resistor added in series with an input, not so much to limit the current but to make the DC offset the same. <S> Dave from the EEVBlog made a video about this, watch it here . <S> For your situation this does not really apply as: R1 and R2 have quite low values <S> your application does not require to have the lowest DC offset possible If you do not apply a higher voltage than the comparator's supply voltage and not lower than ground level then no damaging current can flow . <S> You could add a resistor (it does not harm to add a 100 k resistor) <S> but it would not make the circuit better in any way. <S> So: No, it makes no sense to add a resistor.
If the opamp/comparator has voltage protection diodes, then the current can increase if the voltage gets close to the power rails, in this case you would need to protect the diodes that are inside of the opamp and current limit the input with a resistor.
Finding saturation field of ferrite core from manufacturer specs I want to wind my own ferrite core inductors for some power conversion. However, I am having trouble finding out when the cores will saturate from manufacturer's data. For example, this material datasheet gives me "Flux density (nearsaturation)", which is about 300mT (what I expected). Let's call that \$B_{SAT }\$ or something. Now, sometimes I can't find this spec, but there are a few that are suspiciously close. For example, this page tells me the 61 material has "Flux Density @ Field Strength" of about 250mT when H=15Oe (about 1200A/m) is applied. It seems this is a suggested \$B_{MAX}\$ ? I don't know. Here's another table with several values for "Flux Density @ Field Strength", and although the maximum flux density seems about right, the field strength values are all suspiciously round. So, my question is: in cases like this, in which no explicit "field near saturation" parameter is given, what maximum value of the magnetic field should I use in order to calculate the maximum current in the inductor? Do I just rule of thumb 200mT, or is there some way of inferring something from other specs? <Q> Saturation isn't a hard line, but increases as the H field increases. <S> In the graphs below, where would you place the saturation line? <S> It also varies with temperature, which further complicates things. <S> I would place the lower bound at 200mT (if it's the lower bound that matters in your application.) <A> There are two main things that set the maximum field for the magnetic core of an inductor, and we have to respect both of them a) saturation - leading to reduced inductance b) power dissipation in the material - leading to excess core temperature <S> Generally, low loss ferrites have rather soft BH curves, with no 'knee' to put a single number on. <S> The reason your datasheets give you field at a given H is that to get that field, you need to supply that H, and the winding dissipation rises as H^2 (as I^2), so there a large penalty in pushing further round the BH curve. <S> If you find your design is asking you for 'good' value for saturation field to get your volts per turn up, then try doubling the design frequency, and instantly you get twice the power throughput. <S> When you check the maximum field versus frequency figures, you'll probably find the field has dropped by less than a factor of 2. <A> If you don't have a nice graph to go by, then figure that the highest number that the manufacturer mentions is probably the highest that you want to go. <S> (This rule of thumb applies to any data sheet, BTW -- not just inductors, or even electronic parts).
In ferrites, now that we have nice fast switching devices, it's generally dissipation that limits you first, so saturation is rather less important than it would be with, for instance, an iron core operated at mains frequency.
How to monitor the voltage of a bunch of batteries using Arduino? Ive got about 36 batteries that all stay between 2.8v and 3.6v, and I want to be able to accurately monitor the voltage(and therefor the state of charge) of all of them using an Arduino Nano, the two ways I can think of is use some analog multiplexers to get the 36 different batteries down to the 6 analog pins on the Arduino, or to use an analog to digital converter and then multiplex the digital signal. would either of these ideas work or is there a better solution than what I can think of? <Q> You can use analog mux/demux iCs such as CD4051 (8 channels to 1). <S> In fact, you can use 5 of them for the 36 batteries (you'd be left with 4 extra channels) and connect each to one analog input, and then connect all three control pins of each to the same three digital pins outputs in the Arduino. <S> Then you'd be binary counting from 0 to 7 on those three pins and reading all 5 analog inputs on every cycle. <S> I also recommend using some op-amp to shift the voltage range of 2.8V - 3.6V to 0V - 5V. <S> This way you'd get better precision and with some simple math on the Arduino you'll be able to get a much more accurate reading. <A> The batteries are all isolated? <S> Or connected in series? <S> Makes a big difference. <S> If they are isolated, then you can also use 8-input ADC chips such as MCP3208 with SPI interface to quickly read them. <S> You would connect SCK,MISO,MOSI to all of them, and then use a slave select to each one to access a channel at a time.12 bit readings, and faster reads- about 10x faster than using the internalADC for 10-bit readings. <S> If connected in series, you need a different method as the voltage could be up to 129V. <A> Thus it would be like working a handheld multimeter across each battery. <S> If you want to send data serially to something, optoisolated signals would be needed between arduino and the other end.
What I have suggested at arduino.cc is to use DPDT relays to connect each battery independently to an analog input and Gnd of Arduino that is powered indepently and Not grounded to the stack.