source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
Stress testing a PCB’s current handling capability? I’ve produced a simple unregulated power supply PCB, consisting of: AC input terminals Fuse 4 rectifier diodes Filter/smoothing capacitors DC output terminals Only when the PCBs arrived did I get the sinking feeling that the traces connecting the outputs of the rectifier diodes to the rest of the board (which consists of nice chunky pours) may be too thin for the current I need to drive. Doh! What is the best/safest way to stress test one of these boards? I’m happy to kill one of the PCBs in the process of stress testing. If possible, I’d also like to spare the capacitors - during testing, would it be a good idea to leave the caps off? And of course I don’t want to jeopardize the transformer (a large toroid). My idea is to build one of the PCBs (minus the big expensive caps) connect it to some beefy dummy resistors (pulling the desired current) and then to mains. Then wait and see if anything spontaneously combusts, or if the thin traces start melting. Update: I’m not looking for assistance in determining the current handling ability of the trace, or for strategies to transfer heat/increase the trace width. For the sake of science, let’s assume it’s too thin. I’m looking for a general stress-test method to find the real world upper limit of what a PCB like this can safely handle. <Q> You can use one of the online Trace Width Calculator to determine how much is your situation close to the required handling current. <S> it seems that you intend to use your circuit to very high power application. <S> BE CAREFUL please as excessive current can lead to a catastrophic explosion which may result in injury. <A> I would recommend buying yourself a handful of power resistors and simply testing increasing currents until the trace temperature becomes higher than you're comfortable with. <S> There are programmable loads you can buy, but that's probably overkill for this. <S> If you have a variac on hand you can use that in combination with your load resistors to really dial in the max current. <A> If the THIN traces are short in length, then heat can be dumped to thicker regions that serve to heat-sink the thin pieces of copper. <S> The thermal resistance of default copper foil (1 ounce/foot^2, 1.4 mils thick, or 35 microns) is 70 degrees Centrigrade per square of foil. <S> A piece of foil of length 0.2 inches and width 0.02 inches has 10 squares, thus has Rthermal of 700 degree Centrigrade per watt. <A> I’m looking for a general stress-test method to find the real world upper limit of what a PCB like this can safely handle. <S> You can use a variac and a current transformer. <S> The current transformer you can wind yourself, using any traditional transformer and adding only a few secondary windings to it. <S> (notice: <S> the transformer is for short term usage only, it will get hot) <S> The variac can be used at the primary to adjust the current. <S> You can get hundreds of amps like this. <S> But the maximum impedance of the circuit under test depends on the transformer.
| A FLIR camera or non-contact thermometer is useful for this sort of testing; Although you should be aware that these tools can be very inaccurate depending on the surface you're looking at.
|
Why does this AC-DC converter have Live and Neutral inputs specified? I'm using this AC-DC converter (120VAC-5VDC) as a power source for an Arduino-based device. https://www.digikey.com/product-detail/en/recom-power/RAC01-05SGA/945-3043-ND/6677085 The AC-DC converter has input pins labeled Neutral and Live. I'm wondering how essential it is to get the polarity right. A quick test showed no difference, and since the output 5VDC is totally isolated, it doesn't seem like it should be affected by the input polarity. Does anyone know why these are labeled specifically, instead of just "AC in"? <Q> I would guess that there is a fuse or other kind of overload protection on the input, and for safety reasons you would want that to be on the line input. <S> The neutral connection, at least in the U.S., is connected to ground at the breaker box, so the line connection is the more dangerous of the two. <S> If something goes wrong, you would like to isolate as much of the power supply circuitry as possible from the high-voltage line input and not worry as much about the neutral input. <A> Study the data sheet. <S> It appears that there may be an internal fuse in the live line. <S> They also show EMI filter capacitors from -Vout to neutral. <A> In America, 1 fuse needed for Line, as Neutral is earth bonded at source. <S> In EU , it wont remove voltage from both inputs Note7: Refer to local wiring regulations if input over-current protection is also required Note8: <S> For repeat Hi-Pot testing, reduce the time and/or the test voltage <S> Note9: <S> For operation at 230VAC, an external MOV is recommended. <S> The Varistor should comply with IEC-61051-2. <S> e.g. EPCOS S14 series
| So, it doesn't matter electrically but the power supply might be a bit safer to use if you connect line and neutral as they are marked.
|
Is it necessary to add fuse protection (at the inputs) when using multiple DC-DC converters? I would like to know if it is necessary (or recommended) to add fuses at the inputs when using multiple DC-DC converters. I have attached a quick schematic to illustrate what the design would look like if fuses are involved. I guess in principle the fuses are there to protect the other DC-DC converters in case one becomes shorted. However the DC-DC converters I plan to use seem to advertise "continuous short protection" and various other protections as well (ex: PYB20-Q48-S12 from CUI Inc.). Are fuses really necessary if there is already protection in place? Would I be doing potentially more harm than good by adding them to the circuit? (ie: if I end up selecting fuses with incorrect thresholds) Cheers! <Q> The answer depends on what you are trying to accomplish. <S> At a minimum, a single fuse on the +28V coming from the battery before it branches out to the individual feeders is sufficient. <S> Branch fuses, as in your schematic, still achieves the goal of protecting the battery and wiring while providing additional redundancy since one blown fuse won't take down the other branches. <S> Although the DC/DC converters may have 'continuous short' protection, there are other reasons to have the fuse (wiring and battery protection). <A> You must always add at least a fuse after the battery to protect the cabling. <S> You could use fuses for each load, but only if these fuses are lower rated or faster than the main battery fuse. <S> Since you'd want these to blow first. <S> The advantage of these fuses is that one failed DC-DC does not take the entire system offline. <S> And it reduces the let trough energy , reducing fire hazard of the failed DC-DC. <S> The short-circuit protection on the DC-DC converters will be on their secondary side, and of no use protecting the primary side. <A> You must always add a single fuse after the battery to protect the cabling. <S> You could use fuses for each load, but only if these fuses are lower rated or faster than the main battery fuse. <S> Since you'd want these to blow first. <S> The advantage of these fuses is that one failed DC-DC does not take the entire system offline. <S> And it reduces the let trough energy , reducing fire hazard. <S> The short-circuit protection on the DC-DC converters will be on their secondary side, and of no use protecting the primary side.
| The fuse should help protect the battery from driving a short circuit and protect the harness wiring, both of which could cause a fire.
|
Can SPI and I2C be implemented using GPIO pins? Can SPI and I2C be implemented using digital GPIO pins? I.e. can the SDA and SCK pins of I2C and the MISO , MOSI , SCK , and SS pins of SPI be emulated by setting GPIO pins as input and output accordingly? For example in the case of an Arduino/Atmega328p, certain pins have been dedicated for SPI and I2C use. Can the other digital GPIO pins perform the same function? 1 Is there something fundamentally different in how they behave? Maybe an internal register or something to collect the incoming serial data? In the diagram, one can see that the SPI pins are shared with digital GPIO pins. Inside the Atmega328p die, are the two distinct elements/submodules with something like a buffer determining which will drive the pin? Or are they the same thing... 1 For the SCK emulation, assume that somehow you are able to pass the clock pulse to a GPIO pin set in output mode. Note: The Arduino is just an example. I am asking in a general sense. <Q> Sometimes you can bit-bang <S> these interfaces <S> but it will take more resources and may not work on all cases. <S> For example, SPI master can easily be bit-banged but SPI slave at 10MHz is probably impossible on a slow micro, and even at much lower speeds you would likely have to block interrupts. <S> The specified pins are connected to dedicated hardware inside which makes it easier to use <S> and it generally will work better, faster and will use less resources. <S> For example, you can be off doing something else whilst the bus is sending or receiving data. <S> Read the MCU datasheet to see which pins are used and if there are an alternates available. <A> Yes, these protocols can be bit-banged, with two caveats:1) <S> I2C also 2) <S> Your MCU must be running fast enough to support the speeds. <S> As Sphero mentions, an SPI master is easily done in software ("bit banged"); as the micro is in full control of the clocking, it sets the pace for all transactions. <S> To bit-bang a slave means that the software must be ready on time to the incoming clock. <S> To fully implement I2C, the master also needs to monitor the SCL line for variable amounts of time to allow the slave to acknowledge transactions. <A> Yes, it is no problem. <S> It does not take much code space. <S> Since you often use I2C in a blocking fashion i.e. you are waiting for the byte to finish anyway, there is actually no time overhead at all. <S> Atmel has had some truly abysmal I2C hardware, and bit bashing has been necessary for correct function sometimes anyway. <S> You can also pin share, so multiple buses can have one shared SCL pin, and separate SDA's What is very hard to do, is make a general purpose I2C slave in software. <S> This requires hardware. <S> The dedicated I2C pins often have a different input threshold to match the I2c standard. <S> You need to consider the input type (TTL vs CMOS vs Schmitt) for your job. <S> For a long bus, going off board, the dedicated pins with I2C schmitt levels may give better noise immunity. <S> SPI usually runs faster, and <S> the bit bashing is likely to be slower. <S> Also the hardware operation of the chips is simple, clean and works properly - you don't have to work around bugs or badly thought out logic (unlike the I2C hardware). <S> But if you need more SPI pins then bit bashing is fine. <S> (using a cheap analog switch to mux the pin is also an option)
| I2C (or similar "two-wire" protocols) has to use open-drain GPIO pins to support clock-stretching, ACKs, and detect other conflicts that the protocol is designed around.
|
Is there a type of servo that can be de-energized and moved manually while giving input back on its position? Is there a type of servo that can be de-energized and moved manually while giving input back on its position? So say it's at 0 degrees, I turn it to 5 degrees and I get input back from it indicating it is at 5 degrees. Obviously it would have to be de energized or else you would not be able to move it manually Thanks <Q> What you are wanting to do is to break the feedback-loop in a servo system by removing power from the actuator. <S> Unless you are implementing the servo function in your own controller, in which case you have the ability to power the actuator off and read the feedback as before. <S> The case where this is not possible is if the actuator cannot be mechanically driven in reverse. <S> This situation is possible if there are typical worm reduction stages in the gearing or other techniques used to hold the position in the event of a power failure. <S> A work around here is to manipulate the feedback signal to the control system and have the actuator power to your chosen position and then check or know what the error was that you added to the feedback loop. <S> In a typical hobby/RC servo the feedback is from a potentiometer and you could read the wiper voltage and compare it to the potentiometer end. <S> If you have a more elaborate servo system you may have to read out more elaborate absolute or indexed incremental encoders (or other stuff). <A> Are you free to use external component to determine the position?Else with the use of photo sensors or anything, you can use a rotary encoder to always be able to determine the rotation of the motor. <S> By counting the amount of unique (black,white) <S> dots you see measure at that time. <S> You just need to determine a starting position. <S> edit: fixed labels binary,gray as suggested by ratchet freak <A> Sure, one example would be a dual shaft stepper or servo motor with a hollow shaft rotary encoder (incremental or absolute depending on the requirements) <S> mounted on one end, and a crank on one end. <S> Some machine tools have this kind of thing to allow it to be used manually as well as with the CNC controller.
| You can do this in any servo by cutting a wire but as the feedback sensor is INSIDE the servo unit you need to add probe wires to read the position back.
|
Is there a small (6-pin) DIP I can use to generate multi-MHz squarewave clocks with an external crystal? I'm building a circuit that I'd like to run at 8 MHz to begin with, but I want to be able to try it out at 10, 12, 16, 20, and, maybe, 25 MHz. I know that many microcontrollers have the ability to just plug a passive crystal into two pins and the µC will generate a square wave and pass it on to anything else it's connected to which needs a clock. What I'm wondering is if that functionality exists on its own in a nice, small package which will run at 5V. (I know I can build it using Schottky fast inverters and some capacitors and resistors, but I'd rather avoid all that external stuff if at all possible). Alternatively, is there an easy way to generate a continuous range of frequencies of this magnitude (similar to what you can do with a 555 timer at lower frequencies)? I'm not too fussed about the frequency being particularly accurate, I'm pretty sure a 1% variability would be acceptable (2% seems like it's pushing it, but I'd certainly be willing to try it out) Additionally, I've seen a suggestion to use a higher-frequency crystal and use a frequency divider to divide it by four. Is a T Flip-flop the best way to do that at these frequencies? (or, rather, two since one flip-flop is only going to halve the frequency). Does this advice make any sense given that I'm running this on a breadboard? (yes, I know, parasitic capacitance and all that, that's actually part of the reason I'm doing this experiment, I want to see the effect of this parasitic capacitance at the various frequencies and to see whether mounting the breadboard on a grounded copper plate makes any difference) <Q> The LTC1799 can be programmed by a resistor and a link to produce a vast array of frequencies. <S> Is there a small (6-pin) DIP I can use to generate multi-MHz squarewave clocks with an external crystal? <S> It's certainly small <S> It's 5 pins <S> not 6 <S> It's not DIP <S> but you want "small" and DIPs are not small in comparison to SM devices. <S> It doesn't use a crystal <A> The inverter must be an unbuffered type or it will likely do all kinds of undesirable things such as oscillating at two frequencies at once. <S> Here is TI application note on doing just that. <S> Some are indeed in '6 pin' or even 4 or 5-pin packages (eg. <S> 0.8mm or 0.9mm square package so pretty darned small). <S> This is basically what is inside a microcontroller crystal circuit, though usually Rf is internal, and (rarely) the capacitors are inside, so <S> it's essentially no more parts (or just a resistor, <S> something like 1M). <S> You should calculate the capacitors for the appropriate load capacitance of the crystal you have in mind, but if you're off a bit, it will usually just oscillate at a slightly less accurate frequency. <S> You can use something like an 74AC74 to divide down the output (up to about 125MHz), just connected the D input to /Q. <A> If you want a more integrated solution... <S> I would look at a Si514 for this task. <S> It's available in a fairly small (5x7mm) leadless 6-contact <S> SMT package with a bypass capacitor for the only external component, and can be programmed to any frequency within its operating range over I2C. <S> There is one caveat though, and that is that the I2C programming is volatile, although that may not matter for an experimental rig like yours.
| Yes, you can make a Pierce oscillator with one chip and a resistor and the two load capacitors, plus maybe a series resistor if the drive power is too great for your particular crystal.
|
12V DC to 12V AC (50 Hz) Converter / Inverter for low loads (< 1A) I am building a mobile Sound System powered by a car battery. I have a small mixing table that runs on 12V but it needs AC Power (50Hz) and won't work with DC (I tried that, with very weird results). Currently I am using a 12V to 230V Inverter and the provided power supply to convert it back to 12V alternating current. This seems wasteful and I do not want to introduce another voltage level into my design just to power the mixing board. How could one build a simple circuit that does this? I have basic electronics skills (soldering, know about resistance, voltage, current) but never build a circuit board. I would prefer to avoid opening the device, except it is very easy to do the modifications. The mixing board is a Renkforce MX260 USB DJ Mixer, Manual can be found here: https://www.kirstein.de/docs/manuals/pr-dx26-dten-0914.pdf <Q> 12V AC has a 17V peak, on either side of neutral. <S> So that is 34V peak to peak. <S> The simplest way to get a sine wave is, ironically, using an audio power amplifier. <S> Feed in a 50Hz sine wave signal, and adjust the volume control till it reads the required output voltage. <S> The power supply for the power amplifier may need to be +-19V (i.e. 38V). <S> This may be difficult to do with a standard boost controller since it is close to the upper limit of most boost supplies. <S> Additionally, the neutral line will be shifted up from 0 VDC, and it is the neutral which will be 0 VDC from the output of your sound system. <S> This will be awkward. <S> It is probably best to open it up and check the actual voltage after the rectifier, and to supply that from your battery via a boost converter (if needed) and a properly rated diode. <S> (Using a separate diode will save the rectifier diodes, since they are likely rated for lower current.) <S> You can also check the peak voltage on the signal path, and the headroom required for the parts in the mixer box. <S> It may be that no boost converter is needed, if the signals are all under 9V. <S> added Some more light for the photos would have been better. <S> But, the 7912 is visible. <S> So, this is a differential power supply, and requires <S> -12V. <S> So I guess you are out of luck. <S> What do the other ICs say? <S> It may potentially be possible to use two 12V batteries to power this thing, but one may need extra low drop diodes to protect the voltage regulators. <S> Not trivial in the amount of space in the box. <A> The solution you already have is the best trade-off in the given conditions and let me explain: <S> It's a bad idea to have a switched mode power supply near an audio device. <S> They're noisy. <S> But a home made switched mode power supply is worse. <S> You won't get the low level EMI that can be reached (and imposed by regulations) on a commercial product. <S> In the same time I guess that form the same battery you will supply other devices to. <S> Most likely with the signal ground tied to 12V ground. <S> But without looking inside the mixer box you don't know how is the AC power input related with the signal ground so your AC supply must be insulated from 12V battery/signal ground otherwise <S> you might short or overload some internal circuits inside the mixer. <S> Just think what happens if you have a half-wave rectifier inside and you connect the ground to the "hot" wire. <S> A pure analog solution like a 50Hz generator followed by an amplifier and then a 50Hz transformer to raise the voltage from 12V peak to peak (bridge configuration) to 17V peak to peak has a very low efficiency and requires a hard to find 12v to 17V 1A transformer. <S> Modifying an inverter from 230VAC to 12VAC is almost impossible and certainly will alter the EMI compliance. <S> What you can do is to find the smallest inverter, the smallest I could find was 50W <S> so you won't have cooling issues, and use-it with a 12V transformer which you already did. <S> It's the best option from the size, noise ,time spent and cost. <A> I recommend you power it from a 19Vdc Laptop style LiPo battery and then use a noisy charger in between uses. <S> This can be attached externally and retrofit into a similar 24Vac plug. <S> Polarity does not matter, but for sake of convention, positive centre since it is floating. <S> The AC converts to 12V*140~150% <S> so 12Vdc is not enough. <S> ( 17 to 19V is ideal.) <S> If the charger is needed in operation, then a good earth ground will reduce the leakage noise although this instrument does have excellent CM chokes, better than your average laptop. <A> I may be misreading your question but in the reference manual for your mixer, the voltage listed is 110-240 Vac @50/60Hz. <S> So I am not sure you really need 12Vac or where you get that from. <S> Anyway, let's say you still need 12 Vac. <S> Since you've stated you don't have a lot experience with electronics, I think the best way to go about this, is getting as close as standalone solution as possible. <S> For example, you said you tried feeding 12Vdc to the mixer <S> and it didn't work. <S> As mentioned in the comments, it's possible that 12Vdc is not enough since the actual peak voltage of the sine wave is about 17-18 volts. <S> Plus, you don't really have 12Vdc anymore after the rectifier stage—there will be 2 diode voltage drops (for a full-wave recitifier) <S> so what you may actually be feeding to the dc regulators after that more like 10V-11V range. <S> This is boost converter that may work is the MAX618, click here . <S> It can take a voltage anywhere from 3V to 28V and can output up to 28V (adjustable with resistors). <S> It also meets the current requirements (<1A)—there are some tables in the datasheet that show the typical output current you can have for an input voltage (for 12V in and 18V out, can have a load pulling ~850mA). <S> You said that when you tried feeding DC, you had 'weird' results <S> , maybe it had to do with the lower voltage (12Vdc). <S> I just thought I give an idea. <S> Trying to come up with circuit to convert 12Vdc to 12Vac is a lot more complex, in my opinion, and you said you have basic electronics knowledge. <S> Good luck.
| One thing to try could be a boost converter after the 12Vdc so that you get 17Vdc-18Vdc out that (may need to be higher to account for the diode voltage drops mentioned before). The next best is to disassemble the mixer and see the internal power supply schematic, this can save some money and space with much simple solutions.
|
What this NPN transistor circuit do? I need some help to figure out what this NPN transistor circuit do, how it works and why it's needed in order to make the CSR64215 bluetooth chip work. Here's the schematic: And here's what MFB stands for in CSR64215 chip (took it from the datasheet): I'm asking all these questions because I'm about to use this bluetooth chip in my car and the problem I'm facing right now is that when I'm cranking the engine it turns off and back on quickly, but after that it unables to connect to my phone automatically and it's very frustrating as you have to do it manually after all. So basically I'm looking for a fix for this issue. <Q> In the datasheet there's a pushbutton switch to connecting VREGENABLE to Vbat. <S> The circuit you show is similar to the VREGENABLE delay circuit on page 69 of the datasheet: <S> How does this circuit work? <S> When the supply voltage (1V8_INPUT, VBAT in your circuit) becomes active the capacitor will charge. <S> This causes a current to flow through the resistor in series with the capacitor (R7 in your schematic). <S> This then activates the NMOS or NPN which will then pull down the output VREGENABLE (MFB in your circuit). <S> After some time (about RC = <S> 10 kohm * 1 uF = <S> 10 ms, this is a ballpark figure, not very accurate!), a couple of milli seconds, the capacitor is charged and the charging current becomes zero. <S> Then there is no voltage to activate the NMOS / NPN <S> anymore <S> so it opens and the VREGENABLE output (MFB in your circuit) becomes equal to the supply voltage (1V8_INPUT, VBAT in your circuit). <S> So your circuit makes MFB high after some delay, when VBAT is switched on. <A> To expand on my comment and answer the additional question: Note the bug in this (and many similar) circuits : if you switch off and back on quickly enough, the capacitor remains charged and the requisite delay is absent on the second power cycle, possibly causing mis-operation. <S> The usual fix is a diode to discharge the capacitor, by conducting if (in this example) <S> C (lower terminal) goes below 0V. <S> Schematic with bug fix. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> In normal operation D1 does nothing. <S> But when VCC falls to 0, the charge stored on the capacitor pulls D1 cathode negative (below 0V). <S> D1 then conducts, discharging the capacitor much faster than would otherwise happen, to ensure the Delay occurs as expected when power is restored. <A> The circuit, even with the diode is a piece of junk. <S> The 11ms time constant without the diode was pretty short. <S> Either regulate the supply so it doesn't drop during cranking or use a proper reset chip that provides a timed reset pulse of appropriate duration for a complete reset for any brownout of the supply.
| The only reference to "MFB" in the CSR64215 datasheet is the VREGENABLE signal on pin 40.
|
why is the feedback or gate resistance RG necessary? Here the large feedback resistance RG interposed between gate and drain of the NMOS (usually in the megohm range) forces the dc voltage at the gate to be equal to that at the drain (because IG = 0). Also, it says that RG works just like the RS which is to stabilize the bias current ID in the event of changing VGS.my question is why is the RG necessary, isn't "the dc voltage at the gate = the dc voltage at the drain" regardless of the RG? thank you folks <Q> The gate of a MOSFET is floating. <S> There will be a bit of leakage (typically nA or less level at room temperature), and there is capacitance between the gate and drain and gate and source. <S> So applying a voltage to the circuit without Rg will result in the gate taking on some intermediate voltage and slowly drifting up or down as the leakage current charges the capacitance (and <S> the Miller capacitance affects the gate voltage once the drain voltage starts to move). <S> To bias the MOSFET into the active region so it will work as an amplifier, in this case, you want the gate to follow the drain (at low frequencies approaching DC) and the gate to follow the input voltage for higher frequencies, which is accomplished by using a coupling capacitor. <S> So a high value of Rg does not affect the input voltage too much but allows the bias to settle out in a reasonable length of time. <S> For this we want the maximum leakage current multiplied by Rg to be a low voltage, and we want the coupling capacitor plus MOSFET capacitance including Miller capacitance multiplied by Rg to be a reasonable length of time for start-up. <S> For example, if Rg is 1uF and the coupling capacitor is 1uF it would take a few seconds for the amplifier to settle down. <A> I think, the shown circuit will be used as an amplifier. <S> For this purpose, an input signal will be applied - and in this context one key word must be mentioned: NEGATIVE FEEDBACK . <S> Two cases are to be considered: 1.) <S> DC negative feedback is necessary to stabilize the DC bias point against tolerances and temperature changes. <S> For this purpose, an input coupling capacitor is necessary - otherwise the DC feedback signal would be shorted by the signal source. <S> 2.) <S> For signals to be amplified (AC) we also want negative feedback in most cases. <S> For this purpose, an additional Resistor R1 in series with the coupling capacitor is necessary. <S> Now, the feedback factor for AC will be k=R1/(R1+RG). <S> This feedback arrangement is similar to the well-known inverting opamp stage. <S> 3.) <S> Interpretation: <S> With the above modifications, the gain stage has negative feedback for DC as well as for AC signals. <S> Insofar, the circuit can be compared with another alternative which provides also DC and AC feedback: A resistor RS in the path between source and ground. <S> 4.) <S> Comment: <S> For his reason, RG must have a value that is sufficiently large (because it will be reduced due to the MILLER effect). <A> The gate of a MOSFET behaves as a capacitor, for DC analysis we consider it an open so nothing is connected. <S> As nothing is else connected at the gate node, no current can flow so there will be no voltage drop across Rg. <S> So when only considering the DC solution (static voltages and currents), Rg does nothing . <S> So whether Rg = zero ohm (a short) or any other real value (not infinite ohms) <S> **makes no difference. <S> This changes if we would consider gate leakage. <S> This changes if we consider time variant signals to be present. <S> Suppose I inject a small signal current into the drain of the NMOS. <S> When I inject a high frequency signal it will be filtered out by the RC filter consisting of Rg and the gate capacitance. <S> So there will be little AC signal on the gate of the NMOS. <S> If the signal is of a very low frequency (a frequency below the cutoff point of the filter consisting of Rg and the gate capacitance) there is no filtering and the gate of the NMOS will follow the drain voltage. <S> To properly evaluate this behavior you will need to draw a small signal equivalent circuit and analyze it. <S> The resistor actually isn't necessary , it is optional . <S> I mostly do not add a gate resistor in my designs unless I have a valid reason to do so. <S> One valid reason is to influence the frequency response of this type of circuit. <A> Mosfet gates are effectively isolated from drain and source. <S> This means that the trace connected to a gate (but not connected otherwise) can act as an antenna creating spurious triggers or the gate can end up with a voltage in the linear region of the mosfet.
| The values of the two resistors (R1, RG) - in particular RG - determine the signal input resistance, which is a very important parameter for each amplifier.
|
Reduce MOSFET switch off time I am using this switching circuit to switch a lamp. I am controlling a rising slew rate at Vout (from 0-Vcc) that is adjustable by setting R2 with a poteniometer. It's not necessary for my project, but I would like to control the switch-off time for the MOSFET. Here is a my output at R6 with a 3.3v input. As far as I understand it, Vout is staying high after Vin has gone low because the FET will stay on until Vgs is below the threshold voltage, so it makes sense that Vout stays high until Vgs goes below the threshold, but why is the slope after that point so much shallower than the rising Vout slow? How could I reduce the fall-time of the voltage at Vout? This post has shed some light on the issue, but I haven't been able to figure out a good solution yet. I'm somewhat of a beginner to electronics, so any help is really appreciated. EDIT: Simulation with Vg <Q> The FET is turning off slowly because the only thing driving the gate at that time is 10 kΩ impedance. <S> That forms a rather large time constant with the effective total gate capacitance, which makes the turn-off slow. <S> The gate of a FET looks capacitive to the driving circuitry. <S> Slewing the gate voltage quickly therefore requires high current to charge or discharge the gate capacitance. <S> This is why FET gate drivers are capable of 1 A or more for short periods of time. <S> Just loosely pulling it high with a high impedance causes a slow transition, as you found out. <A> A very effective way of reducing the MOSFET turn-off time if you are driving it by a single pull-up (or pull-down, as it is in the case of a P-channel MOSFET) is to use an active pull-down (pull-up in our case circuit). <S> This can be realized simply as follows: simulate this circuit – <S> Schematic created using CircuitLab <S> The circuit works according to the following points: <S> When the current mirror turns on, the \$I_{C1}\$ current flows through <S> \$R_1\$, \$D_1\$ and the MOSFET gate-source capacity \$C_{GS}\$, charging it by increasing the gate charge \$Q_G\$ up to its turn-on value. <S> \$Q_3\$ is off since it is a NPN BJT and its \$V_{BE}\$ is less than zero during this switching phase. <S> When the current mirror turns off, the current stops to flow through \$R_1\$ and and the voltage of the cathode of \$D_1\$ starts to rise, while its anode voltage is kept constant by the (large) gate charge stored in the gate capacitance. <S> When \$V_{BE_{Q_3}}=-V_{AK}\approx 0.6\mathrm{V}\$, \$Q_3\$ turns on and discharges \$C_{GS}\$ quickly though \$I_{C3}\$, turning off \$M_1\$. NOTES <S> This circuit does not require too low values of the pull-up resistor, and this is good since this lowers the static power dissipation. <S> On the other and it requires a diode and a BJT. <S> This circuit is an adaption to a p-channel MOSFET of a circuit for n-channel MOSFET I saw in an old (1979 circa) <S> SPRAGUE manual: <S> once upon a time, the famous capacitor manufacturer manufactured also ICs, particularly a switching power supply controller, and I saw this circuit in the application examples of its data sheet. <A> Yes, this delay is due to charge in input capacitance, which is about 17 nF. <S> The time constant to discharge it over the 10k resistor would be 17E-9 <S> *1E+4 <S> = 170 us, too long. <S> As WhatRoughBeast suggested, 1k fixes it, although the R1 should be lowered to 100 Ohms or something: <S> The result is much better, <S> If shorter time is needed or drive power to be minimised, more sophisticated circuitry is required, as shown in other answers.
| To really turn off a FET quickly, you need to actively drive the gate high (for a P channel FET, low for a N channel FET).
|
Voltage rating for SMD Resistor Is it safe to use the 330K, 1206 pack as shown or to use 2x of 115k,1206 resistors in series? Input is 230v AC. <Q> You have two of these resistor in series, so their voltage capability adds. <S> Each is good for 300 V, so together they are good for 600 V. <S> You say the input is 230 V AC, presumably sine. <S> That means the peaks are 325 V. <S> For insulation, it's the peak voltage that matters. <S> Since 325 V is less than 600 V, you are OK in theory . <S> In practice, stuff happens. <S> The 230 V in might actually be 240 V, so the peak would be 340 V. <S> That still gives you 260 V of margin. <S> Power line spikes also happen. <S> Is that good enough for you? <S> Only you can answer that. <S> To paraphrase Dirty Harry: Do you feel lucky? <S> Well, do ya, punk? <S> Another issue is that the 300 V specified by Vishay only applies if you follow all the rules, including the right separation between pads. <S> The board also needs to be clean, and other traces shouldn't be running closer than some minimum for the voltage you are trying to withstand. <S> Then there are regulatory issues. <S> It depends on how and where the equipment will be used. <S> Different minimum creapage and clearance distances apply depending on what standard you want to claim compatibility with. <A> The real issue is what will break down when you get a 1 to 5kV transient online? <S> How much will dust and humidity degradebreakdown performance and catastrophic follow on current? <S> Then you’ll realize your proposed solution is inadequate. <A> As the maximum element voltage is given as 200V <S> I'd suggest to use two resistors in series. <S> 115k is not part of the E12 series, so I'd switch to 120k instead. <S> From a power dissipation point of view you'll have (230V^2 <S> *2)/240k=~311mW, so per resistor you'll have appx. <S> 160mW <S> what's okay for the 1206 form factor.
| You are OK up to a 260 V spike at the peak of the waveform.
|
Wondering how to get inexpensive 10 mA power supplies for electrochemistry As part of my graduate research on electrochemistry, I'm looking for a way to have 10 or 20 inexpensive, low amperage, constant current power supplies that simply hold at 10 mA with reasonable accuracy, +/- 1 mA. My first thought was to purchase a bunch of wall chargers like these ones , cut the jack off it, split the wires, attach a 10 ohm resistor inline then attach some leads. Then I would buy a power strip and plug all of them in and have one "power supply" per electrochem experiment I'm running. But I'm not sure if that would work because I'm unsure if these adapters are constant current or constant voltage. I definitely need CC. Even if I did make this small army of power supplies, how would I go about measuring them for accuracy? I'm not sure how good my cheap $10 multimeter is at measuring ~10 mA while the electrochem is running, and I'm not sure how much measuring the system affects the current while it's being measured. If anyone has a suggestion for a good multimeter/current measuring device at such low currents, I'd love to hear it. The answers so far are very helpful. Thank you all very much. I have a lot of reading to do to learn everything presented so far. Edit in response to expected voltages and chemistry details: I ran a solvent system yesterday which required 5-7 V (currently using cheap, 10 A power supplies for our initial runs), but today I have another solvent which requires 22 V. I don't think the experiments will require anything more than 25 V. The electrochem experiments involve using rare-earth metals to make/break chemical bonds. We'll be running them with 5 - 20 mL of solvent in a divided cell reaction flask using organic solvents like acetonitrile and acetic acid, and organic salts as electrolytes. The divided cell has a cathode on one side and an anode on the other, separated by a fine frit. The experiments will run for at least an hour, up to 24 hours in some cases. <Q> The data sheet for the LM317 will show you how to connect them, and parts cost will be about 50 cents per channel. <S> Plus, of course, a DC power supply of at least 3 volts greater than the electrochem potential, and at least 200 mA for 20 channels. <A> A better way would be to use a wall-wart connected to one of these: <S> An LT3042 constant current regulator <S> They are low noise and easy to adjust with one resistor to set the current. <S> You can vary the current from 0 to 200 mA <S> and it takes a 2 to 40 V input. <S> You could measure the current with a picoammeter if you have the money. <S> If you don't then just use a regular DMM. <S> The accuracy can be found by going to the manufacturer's website and locating the specifications or buy downloading the datasheet. <A> simulate this circuit – Schematic created using CircuitLab <S> All you need is a current mirror. <S> All the same transistors. <S> In 100pc < 10 cents/channel, if you know how. <S> Sources of error. <S> Noise ? <S> use good EMI design practice <S> Actual mirror is less by 2*hFE <S> /R+emitter <S> so increasing by same cancels this error. <S> e.g. <S> If hFE ~ 100 this cancels a known 2% error by adding a 2 Ohm resistor. <S> Similarily if hFE differs by 2:1 value between transistors, Imirror output has 1% error. <S> R emitter tolerance in error, so use 1% or 0.1% matched arrays in SIP/DIP package etc. <S> Set 10mA <S> using Ohm's Law for R Ref
| The cheapest way is to buy some LM317 voltage regulators, and some 124 ohm resistors. You can get an LT3042 on a dev board . What it will come down to is accuracy and how accurate you need the current measurement.
|
CAN Bus on PCB board Will a CAN bus also work for on-board communication, without twisted pair cabling, between 2 or more microcontrollers on the same PCB board? <Q> There is no need to use CAN transceivers when communication is within one PCB. <S> However you cannot connect CAN controllers directly. <S> You need diodes to prevent collisions. <S> See here for explanation . <A> If you design the PCB with the usual precautions for a signal of that speed, it will be fine. <A> Yes, this can be done, and as it is quite difficult to make a robust multi-master protocol from scratch, CAN is not a bad option for this (though the error detection/recovery is a little excessive for on-board applications). <S> I wouldn't bother using CAN transceivers though, as they are rather pointless and will introduce more problems with regards to energy consumption, minimum node spacing and stub lengths (due to the high energy being put into the transmission line). <S> If you can configure the microcontroller outputs in open collector mode, then you can implement a system by just wiring <S> all the TX and RX pins together onto a single wired OR logic level bus along with a suitable pull up resistor. <S> Otherwise you'll need a series diode on the transmit pin or a discrete transistor. <A> CAN lines (CAN Tx and CAN Rx) have been used in our design too to communicate with different MCU on this same mother board. <S> CAN transceiver was also not used. <S> We had simplified understanding among MCUs. <S> No arbitration was happening. <S> It was always based on query and response. <S> In case you need to have more than two devices to be connected then use dedicated transceivers for all MCUs to protect the MCU and also to be fully complaint with CAN protocol. <S> It also helps in using standard CAN based debugging tools (in case, needed in future)
| Yes CAN is a digital bus which works at up to 1MHz.
|
How to align components for front panels I am struggling with the front panel setup. I need to align 3 types of components: push-buttons, potentimeters and 5mm leds. The potentiometers have a nut to fasten it to the front-panel, for the leds I have small plastic mounting rings. The push buttons would need to go onto a pcb, that I could mount under the front-panel with stand-offs - the height looks good to me: With this approach getting the leds mounted is complicated - not a lot of space and I would push the pins in millimeter perfect so that the led body would click into the panel mount rings. I could also just mount potentiometers and leds into the front-panel and wire things freely, but then I have no idea how to handle the push buttons. <Q> From your somewhat scrambled description you only have problems with LEDs... <S> which is strange because the LEDs are the only components with long flexible leads that could be bent easily to required position. <S> So, bend the leads to get the LEDs as close to required position as possible but do not solder them. <S> With everything else in place attach your perfboard to front panel, guiding LEDs into their holes. <S> Then solder them, while holding steady in required position. <S> If you are OK with LEDs sticking out a bit, push them forward until the flange is flush with back of the front panel before soldering. <S> This will ensure perfect alignment of them all. <A> Often a right angle installation is preferred for this sort of situation, but it seems like you are committed to a vertical one. <S> Often LEDs are placed on molded plastic standoffs which fit between the leads and help establish an appropriate, consistent height. <S> It it also possible to have a small locking bend put in the leads at a specific length by machine for consistency. <S> For the pushbotton you can buy key caps in various heights, have custom ones molded, or for a prototype make them with a 3d printer (just be careful that inter-layer roughness does not cause them to catch on the panel) or from plastic bar stock on a benchtop lathe. <A> One approach would be to mount the pot into a break-off section of your PCB, joined to the rest with a flat cable or wires. <S> Then the nut mounts the pot to the panel and the pcb can be positioned to suit the switch. <S> For the LED, you can position it prior to soldering, or use an SMT LED and a plastic light pipe, which protects the LED pads from the user pushing on the LED.
| Another option would be to switch to bulkhead mount components, and put wiring harness terminating in crimped connectors on them, plugging into headers on the board.
|
Does the Sallen-key filter require a buffer for low power applications? I am designing a circuit which takes an 3uV at 10-10kHz input that filters, applies gain and integrates the analogue signal. I'm thinking of using the circuit below for the topology using two stages consisting of a Sallen-key filter and active RC integrator. simulate this circuit – Schematic created using CircuitLab Vin has a source impedance of 3.4Kohm. In this low power level application, would a buffer be required to feed the sallen-key or would the circuit effectively operate in this system? <Q> Your issue is probably noise. <S> You should start by calculating the thermal noise voltage in 10kHz bandwidth @3.4kohm, and deciding what signal/noise ratio you need to get. <S> That will probably tell you that you need a low noise preamp/buffer before the filter. <S> An active filter is very noisy. <S> You have R1,2,4 all adding thermal noise. <S> You have the input signal attenuated by R1C1 R2C2. <S> Then you have opamps which are mostly fairly noisy. <S> To get the thermal noise voltage down, you need to make the R's much lower than your source R - which means you must buffer. <S> But it also means that you need an opamp which has a low equivalent noise resistance. <S> The best opamps (AD797) have about 500ohms ENR - <S> so you can't make the filter Rs much lower than this or again, noise figure gets worse. <S> This active filter arrangement is noisier than one which has only a single RC per filter stage. <S> If you put OA2 before OA1 (with gain) it would be the preamp, and the whole would be quieter. <S> You will need a preamp before the active filter, with significant gain (40dB / 100x) to get good SNR. <S> LC filters are well worth considering. <S> This whole arrangement performs worse than one L and 2 C's. <A> Does the filter "require" buffers? " <S> Require" and "operate effectively" are strong words. <S> Theoretically, if the input source has an impedance different from zero, and the next stage has an impedance less than infinity, the shape of transfer function of this filter will change. <S> So the answer depends on how much change you can tolerate. <A> In this low power level application, would a buffer be required to feed the sallen-key <S> or would the circuit effectively operate in this system? <S> When you compare the values of R1 and R2 to the input resistance of the amplifier it will normally be much smaller and will not affect the input current of the amplifier. <S> If you get into the Mega-Ohm range with your filter resistance, then it might need to be considered, this will not be the case with most filters. <S> Since the source impedance is <S> 3.4k and the total resistance of the sallen key circuit is in all likelihood in the Gigaohm range (depending on the selection of the amplifier) <S> it shouldn't make a huge difference. <S> Almost no current, nA to fA of input bias current of the op amp is needed, so a few mA for source impedance should be sufficient. <S> Noise is also added by adding in a voltage follower stage (and other costs of power, footprint of the op amp on the PCB, and additional money), so there is a trade off between low noise and impedance buffering. <S> In almost all cases I would avoid the additional voltage follower buffer. <A> 1st you need a minimum SNR spec for 10kHz BW at 3uV input. <S> This leads to a requirement of an low noise amplifier with a current noise density in nA/√Hz and voltage noise density in nV/√Hz. <S> Presumably you want > <S> 60:1 SNR <S> so noise bandwidth from resistors and amplifier for 10^ <S> 4 Hz BW requires noise to be <S> > 3uV/50/100 = 0.67 <S> nV/√Hz <S> This will be a challenge as low Noise Op Amps tend to be 10x this amount. <S> https://training.ti.com/ti-precision-labs-op-amps-noise-lab?cu=14685 Rohm has a new LNA for audio . <S> You are asking the wrong question. <S> It should be how can I measure the following signal that is below thermal noise? <A> Vin has a source impedance of 3.4Kohm. <S> As with most filters, the source impedance needs to be known. <S> Most filters assume that the source is near-enough zero ohms <S> but, if you source impedance is 3.4 kohm then the value for R1 (as calculated when assuming a zero source impedance) <S> should be lowered by 3.4 kohm when fed from a source impedance of 3.4 kohm. <S> Of course if R1 is naturally quite high in value (100s of kohm or more) then lowering R1 won't be absolutely nesessary. <S> With R1 = <S> R2 <S> you maximize the Q of the circuit and so altering one with respect to the other actually lowers the Q. <S> This method is used to modify Q to what is needed in the filter to obtain the desired performance. <S> I am designing a circuit which takes an 3uV at 10-10kHz input <S> If your op-amp is specified as having an equivalent noise density of 1 \$nV/\sqrt{Hz}\$, over a 10 kHz bandwidth (your signal range) <S> the equivalent noise will be 1 <S> nV x \$\sqrt{10000}\$ = 1 uV RMS. <S> So be aware that you need very good op-amps for this plane to fly. <S> I have ignored low frequency noise values and the tendency for equivalent noise to be higher in the DC to 1 kHz range. <S> You need to carefully select your op-amp and possibly down-grade your expectations if working to a tight budget. <S> I have also ignored equivalent input current noise density. <S> You need to consider all these things.
| No, it wont (most of the time). If you have out of band signal that needs filtering before the preamp, an LC low pass filter would be best.
|
What's the minimum amount of transistors I need to operate a stepper motor? I would like to know the minimum amount of transistors to operate a stepper motor. Could I pilote it with one transistor or I need one transistor for every coil? Thanks in advance! Edit: the minimum number N of transistors I should connect to ports to drive the stepper motor. For example, if I have 4 coils, I think I should have 4 bjt to drive my motor . My question is actually: does exist a stepper motor with 4 coils that could I drive with only one of these bjt like this? (I know this last circuit is for dc motor but somebody told me I could drive a stepper motor with this same circuit.... is that true?) <Q> What's the minimum amount of transistors I need to pilote a stepper motor? <S> To make a stepper motor rotate, at a minimum you need to switch ends of some coils between open, and connected to a power supply. <S> This does not require transistors. <S> You could, for example, manually make the sequence of connections, use relays, or other mechanical means. <S> A interesting demonstration would be to set up brushes on a shaft to go thru one step sequence. <S> Each rotation of that control shaft would cause one step in the stepper motor. <S> It would be kindof like a "electrical gearbox". <S> You could add a little disclamer to the bottom: " <S> No transistors were abused in the making of this demonstration" . <A> For an ordinary stepper motor, you do indeed need four transistors or comparable switches for a unipolar motor, and 8 for a bipolar one. <S> However, there are some variations. <S> 3-wire steppers exist, mostly as the low-torque open-loop mode of brushless DC motors. <S> There is also a way of wiring a high impedance stepper-like motor with a phase shift capacitor to be operated from a single-phase AC supply. <S> In theory that could be generated with a single transistor. <S> And then there are special single-coil stepper motors as found in battery powered clocks. <S> These are low torque and are not electrically reversible(!) . <S> Regardless of the direction of the current applied, they always step in the same direction determined by the physical topology of magnetically permeable materials forming the flux path. <S> However, as a result you need only a single transistor or similar switch to step them. <S> You could almost argue that this is a variation on a solenoid pushing a ratchet, only it is the magnetic design rather than a mechanical ratchet pawl which makes it work. <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> A typical stepper motor with two coils. <S> It should be obvious that to generate a rotational sequence that one transistor is not enough to switch even a two-coil stepper motor. <S> DC motors and stepper motors are quite different. <S> DC motors run continuously and are not capable of stepping.
| I don't know what you mean by "pilote", but if you are asking what the minimum number of transistors are to operate a stepper motor, then the answer is 0. The minimum number of switches required is shown in your first diagram: four.
|
Fuses - Are there any voltage conversion for the break-off Anyone knows the very common glass fuses in electronics etc. But I am uncertaion about the breaking conditions. Example: A fuse rated as 5A/250V, it is the breaking point. But I have seen such used in devices with a much lower voltage, like 12V or 24V. The breaking of the fuse is based on a maximum energy generated as heat to melt the internal lead by Ohm'S law, aka P = UxI. But this does not correlate with the current (A) at different voltages. In the example, the nominal is P = 5A*250V = 1.250, which used with a 24V case, would be (I = P/U) = 1.250/24 = 52A which is way beyond the rated 5A. In other words: We have different currents at different voltages to generate the same energy, if we are to follow Ohm'S law and that the breaking requires the same energy in any case. This is a little confusing, because it must be the current that are the dominator and the current is driven by the voltage, so the voltage is certainly a factor... <Q> Your calculation gives the power dissipated in the load. <S> A fuse blows by the power dissipated in the fuse - not the load. <S> The fuse resistance will be very low and the power to blow the fuse will be correspondingly low. <S> The current rating is that nominal value which will blow the fuse in a certain time. <S> Figure 1. <S> GDC fuse time vs current. <S> Source: Cooper Industries . <S> Note in Figure 1 how the 1 A fuse can sustain about 1.8 A indefinitely (1). <S> On the other hand for a 1 s trip time (2) the fault current would have to be 3 A (3). <S> How about the resettable fuses (with button) ? <S> Is this the same ? <S> because they are voltage rated too. <S> They will have the same limitations. <S> Find a datasheet and study it in the light of my Figure 1. <S> If you take my approach you will learn the new words and practice pronouncing them then start to figure out what they mean from the context in the datasheet and further reading. <S> Read, read, read. <S> It's worked well for me. <A> I guess you are confusing the rated voltage, breaking capacity and the holding current. <S> Fuses are specified under IEC 60269. <S> This standard defines time/current intervention curves based upon P=RI^2 fuse element dissipation. <S> The higher the power, the lower the intervention time. <S> This is not directly related to voltage. <S> Voltage ratings on the fuse are related to the maximum voltage (AC voltage, notice that most cartridge fuses are specified in AC only, and DC voltage, if specified, is generally lower) that they are able to break. <S> This is somehow correlated with the breaking capacity, expressed in kA. A small fuse would not be able to open high current sparks inside its body. <S> As the current increases and the open circuit voltage increases, electric arcs are more difficult to open. <S> This consideration is valid for domestic circuit breakers too: your short circuit protection device shall be able to stop the maximum short circuit current at the specified point and be operational at the mains voltage. <S> One last thing: as obvious there is no such a "ideal" voltage source. <S> Whenever you short two wires together, there is an inherent resistance of the power distribution system, the wires, and the fuse. <S> So, your short circuit current is never "infinite". <S> A fuse has an iherent short circuit current limiting capability (I^2dt) that is the increment of internal resistance with the current, that helps with higher currents. <S> To put the things together, have a look at the datasheet of a fuse such the following: <S> http://m.littelfuse.com/~/media/electronics/datasheets/fuses/littelfuse_fuse_209_datasheet.pdf.pdf 1A rating: it means (more or less) <S> it will sustain up to 1A RMS currents at indefinite time350V rated voltage: the maximum open circuit voltage <S> the device is guaranteed to be able to openInterrupt rating: 100A @ 350Vac the breaking capacity of the fuse <A> The contributers has kindly responded to answer the question to my best understanding of the problem. <S> Thanks all !! <S> ...sometimes the solution is more simple than You think... <S> In addition I will add a little comment <A> Typical small fuses are designed to blow in watt seconds across fuse above a minimum W holding power loss in the fuse and an insulation voltage rating <S> You can compute this from the curves.
| The voltage rating is the maximum voltage that can be reliably interrupted without forming and sustaining an arc across the burnt-out fuse wire.
|
Why isn't the BIOS' ROM chip made using CMOS technology? After reading a computer hardware course on BIOS/CMOS, I'm still unable to determine the reason why the BIOS' ROM chip isn't built using CMOS technology, and why it is connected to a separate chip called "CMOS" for storing the configuration information. This is from the lecture note : Programs are stored on the system BIOS chip, while the changeable datais stored on a CMOS chip CMOS Group of Hardware : Hardware that is common, necessary but maychange – RAM, hard drives, floppy drives, serial and parallel ports I know that the BIOS is stored in a flash memory, and that CMOS MOSFET technology dissipates less power compared to other implementations. Why is it only the BIOS ROM that doesn't use CMOS, like other storage devices - what exactly is the advantage? And why can't the BIOS configuration information be stored in its own ROM chip instead of the "CMOS chip"? <Q> You're mixing up implementation technology with colloquial terms for functionality. <S> CMOS - Complementary Metal Oxide Semiconductor - is a method of making logic and related circuitry using both N-Channel and P-Channel field effect transistors. <S> One of its defining characteristics is extremely low static power consumption - power is almost only used when changing state. <S> As a result, a CMOS static memory chip can retain its contents for years on a battery, and is a handy place to store semi-permanent information. <S> BIOS and related startup code has traditionally been stored in PROM or EPROM devices. <S> EPROMs in the era of the IBM PC were typically made in pre-CMOS technologies like NMOS, but the critical distinction is that these were not typically writeable when installed in the computer, but only in a special programmer. <S> Further while many contemporary systems and clones used EPROMs, the actual production versions of the IBM-PC used cheaper non-reprogrammable PROMs (pinouts were typically compatible in use). <S> The PC-AT design then added a battery backed CMOS memory for storing customizable settings, and also (perhaps in the same device) a persistent real time clock. <S> This came to be colloquially referred to by end-users as CMOS, though it was of course only a particular usage enabled by a then rapidly spreading chip technology. <S> Today of course we no longer use parallel E/PROMs for BIOS, but rather use serial NOR flash and transfer the contents into faster RAM for execution. <S> Modern FLASH chips are in fact made of CMOS-derived technologies. <S> And they typically can be reprogrammed in circuit. <S> It's really up to the system designer if they want to put semi-permanent configuration information in a battery backed RAM, or in reprogrammable flash - the end user or post-boot operating system may have little actual visibility into a distinction. <S> But even if flash is used for settings, there's still typically going to be a low power real time clock that keeps running on battery. <A> Back when the PC was first invented, most of the logic on it was power-hungry NMOS and TTL chips. <S> Nowadays, nearly all of the logic is CMOS, including the power-hungry CPU and the flash EEPROM that holds the BIOS. <S> So in a sense, your question is based on an invalid premise — the flash EEPROM is CMOS. <S> However, for whatever reason, the term "CMOS" in a PC still refers to only the RAM and RTC functions. <S> If you're asking why the BIOS isn't stored in volatile RAM rather than nonvolatile flash, that's because batteries fail, and erasing the BIOS would effectively "brick" the computer, requiring specialized hardware to get it going again. <A> I think you are confusing two usages of the "CMOS" acronym. <S> There are chips built entirely of the complementary MOS transistor technology. <S> In fact almost all chips these days are built this way including much of the digital control circuitry on a Flash chip. <S> The other usage of CMOS has persisted in the PC industry since the earliest days to refer to the chip that stored some settings and the real time clock with an attached battery. <S> Back in those days (early '80s) <S> the bulk of the large chips in a PC were NMOS technology and the miscellaneous logic chips were bipolar transistor logic (TTL, LSTTL etc). <S> The only CMOS chip used was the RTC chip and so became known as "the CMOS". <S> These days the RTC is no longer a separate chip on a PC architecture device. <S> Instead it is built right into the motherboard chipset (which incidentally is produced with complementary MOS circuitry). <S> It is rare that any BIOS these days uses the legacy battery backed RAM in the RTC part of the chipset to store settings. <S> Instead the BIOS uses a few pages of the SPI Flash storage device to save its settings in a non-volatile way. <S> As such there are minimal settings that get lost in a PC when the battery runs down or is disconnected. <S> The minimal settings that are lost on battery power removal are certain ones that control the power up and reset behavior of the chipset and are in fact not even stored in battery powered RAM cells but instead in special low power flipflop latches that are powered from the coin cell battery. <A> See also https://superuser.com/questions/989499/what-does-a-cmos-chip-look-like : this provides us with a handy link to the original MC146818 datasheet. <S> This chip was memory-mapped in and provided 64 byte locations. <S> 14 of these were for the clock, leaving the rest as general-purpose RAM. <S> The whole chip was kept powered by the battery while the PC was off, in order to keep the real-time clock ticking.
| CMOS was very new and the only circuits in the PC that used it were associated with things that needed to run on battery when the power was off, such as configuration RAM and the real-time clock.
|
What is the recommended battery chemistry for digital multimeters? I would like to know if the different internal resistances of different battery chemistry somehow affects the calibration of a digital multi-meter. If so, then what would the optimal battery chemistry be for commercially available multimeters. For instance, would low self-discharge Alkaline batteries contribute to a more accurate reading than rechargeable Nickel-Cadmium batteries? Or vice-versa?Since Capacitors have ESR, I'm assuming so do batteries. Do certain battery types give a better ERS rating? Does this even matter for digital multimeters? <Q> What is the recommended battery chemistry for digital multimeters? <S> I would like to know if the different internal resistances of different battery chemistry somehow affects the calibration of a digital multi-meter. <S> Low power hand-held meters consume very little power at all <S> so this means they consume just a few tens to hundreds of microamps (when on) <S> and this will not cause a significant volt drop across the battery internal resistance so it won't affect calibration. <S> In addition, it is likely that meters use precision references to generate reference voltages and these chips will still be operating fine when the battery voltage has dropped to a level such that the LCD display is beginning to look a little low contrast. <S> If you need more clarification then you should post a specific circuit from a reputable supplier so that it can be analysed. <S> Footnote - my old Tandy DVM was bought in the early 90s and is still going strong on the original battery. <S> I expect I'll need to replace it in the next ten years or so. <A> Does this even matter for digital multimeters? <S> In a properly designed multimeter: NO . <S> A multimeter does not rely on the voltage of the batteries as a reference. <S> If it would then 1% accuracy multimeters would be impossible to make. <S> The batteries have to supply a DC voltage in the range that the meter can use and be able to supply the required current. <S> Most meters have very low power requirements so they do not load the batteries that much. <S> If the meter has a display backlight, that might consume most of the power. <S> If a meter gives a different reading of the same voltage with different batteries but the low battery indicator is not shown then you that is a poorly designed meter. <S> When it does not complain about the batteries, the reading must be constant and accurate (assuming it is properly calibrated). <A> Assuming 9V battery, you won't get much more life out of alkaline than so-called "Heavy duty" Zinc-Carbon cells (because the current draw is light). <S> I use Panasonic brand Zinc-Carbon cells from the dollar store, unless there's a case lot of 9V industrial alkaline cells in the store room. <S> Spot retail prices for the 9V Duracell batteries (eg. drugstores) can be on the extortionate side. <A> Multimeters use complex integrated circuits that are designed to work with a range of supply voltages, because they mean to be portable and therefore use batteries, and all batteries tend to drop their voltages as they worn out and age. <S> To accommodate this variable range, the DMM ICs have built-in voltage regulator(s) for important internal circuitry, and use internal self-calibrating techniques to keep their specified accuracy of measurements. <S> And DMMs don't consume any heavy bursts of current when taking measurements (they use steady, continuously running integrators, not some fast high-consuming sampling ADC), so the ESRs of batteries (in fear of voltage sagging) don't make any difference as long as overall battery voltage stays above certain level. <S> (I guess this was the false assumption that led to this inquiry). <S> Therefore, DMMs are effectively "de-coupled" from power supply, and therefore can use ANY kind of batteries, high-ESR, low-ESR, whatever (as long as their voltage is above certain level) without affecting their functionality. <S> Of course, batteries with low self-discharge would be the best.
| If you have a reputable meter the device's data sheet or manual will tell you what battery chemistry to use and specifically what battery they recommend.
|
Current limiting resistor on peltier element I have a 12v/22A DC switching power supply and 9 peltier elements rated for 12v/6A. I would like to limit current to 2A per peltier element. I don't know how to calculate the impedance (in ohms) that I need. Intuitively, by ohm's law, every peltier element's impedance is 12v÷6A=2Ω and the impedance I'm aiming for is 12v÷2A=6Ω. Does this mean I need a 4Ω current limiting resistor in series with the peltier element? Also, what power (watt) rating does my resistor need? <Q> If you can tolerate that your resulting current isn't exactly on target, then job done! <S> This is far more efficient than burning excess power in resistors, especially as you're starting from an SMPS. <S> While the Peltier current varies a little with its thermal conditions, they are so inefficient that it's not unreasonable to model them as a resistor which changes a bit. <S> If you can turn the voltage down on your SMPS, this will reduce the current. <S> If not, then a DC-DC buck converter is reasonably inexpensive, if you want finer control of the current than just splitting the voltage across several in series. <A> The Peltier Device has a nonlinear rise in resistance with lower power applied, which you must derive from datasheet graphs. <S> So it must be regulated with a constant current source or an active current limiter. <S> The reason for this is the resistance and power absorption changes with temperature difference. <S> It may mean the device has to dissipate the same power as the Peltier Device, so separate heatsinking is necessary. <S> Current sensing can be done with a 50mV to 100 mV shunt and scaled down Vref to a comparator driving a BJT or FET switch. <A> Short answer- <S> the 4Ω is based on assumptions that aren't true, but it probably wouldn't be too far off. <S> The 6A rating of the Peltier device will simply be a maximum allowable current based on device construction, ie any more and you could damage it. <S> Add to that <S> the fact that a Peltier device can also generate a voltage which may be positive or negative depending on the temperatures of the two sides (see https://en.wikipedia.org/wiki/Thermoelectric_effect ). <S> Plus it will also have a small internal resistance. <S> A 4Ω resistance will provide at most 3A from 12V to a Peltier device at 'neutral' conditions (ie no temperature difference, but note that will change after power is applied). <S> If it were me, I would do some tests with an ammeter and an assortment of resistors. <S> Keep in mind that 3A at 12V is 36W which needs to be dissipated somewhere, so the resistors will get hot. <S> You'll probably need a handful of 10W or higher resistors. <S> EDIT: <S> Because you have 9 peltier devices, another option is to put them in series/parallel. <S> Perhaps start with three strings of three. <S> Then you avoid losses in the dropping resistor. <S> +--P--P--P--+ <S> | <S> |---+--P-- <S> P--P--+--- <S> | <S> | <S> +--P--P--P--+
| If the Peltiers are rated at 12v/6A, then I would try measuring the current taken by 3 in series.
|
What heuristics are there (if any) to know how close a circuit is to a function? I'm working on an AI project for circuit minimization. I'm trying to think of a heuristic to tell me how close a certain circuit is to representing a certain function. For example, if I need to implement a XOR function, than a circuit consisting of a single OR gate will be closer to representing the XOR in comparison to a circuit consisting of a single AND gate (because all is missing is a single NOT gate). Are there any such heuristics in order to sense how "close" a circuit is to the final circuit? We have tried scoring the circuits by counting the number of correct outputs according to the truth table, but this fails. For example, if we have a circuit that for every input outputs the negation of the correct output, then its "score" would be 0 according to this heuristic, but in fact it is very close to the final design, and all that is missing is to not the output. Thanks <Q> You could base your "cost function" on DNF fault classes . <S> For a start, you could consider the following set ENF: expression negation fault (a -> ! <S> a) <S> TOF: term omission fault (a -> a | b) <S> TIF: term insertion fault (a | b -> a) TNF: term negation fault (a | b -> <S> a | !b) <S> LOF: literal omission fault (a -> ab) <S> LIF: literal insertion fault (ab -> a) <S> LNF: literal negation fault (ab -> a!b) <S> For example, the distance from AND (a&b) to XOR (a&!b <S> | ! <S> a&b) would be 1 LIF and 1 TOF, while a distance from AND to NAND would be 1 ENF. <S> You'll have to experiment with weights you assign on different fault types in your cost function. <S> Another idea you may want to consider is to take the problem from the other end: instead of generating minimal functions and optimize for correctness, you could generate correct functions and optimize for minimalism. <S> It's much easier to come up with a reasonable cost function in the latter case, and you don't have to actually reach the optimum in order to get an acceptable solution. <A> Many other machine-learning algorithms (e.g. for perceptron training) use a performance metric such as quadratic estimation error, error covariance, or whatever makes most sense. <S> Let's call this parameter <S> \$J\$. <S> In general, the goal of the algorithm is to reach an epoch (an iteration) in which \$J\$ is at a minimum (either local or global). <S> This can be achieved by employing numeric optimization concepts, such as gradient-descent and second-derivative methods. <S> In the described example, where only a NOT operation would end up obtaining a correct answer, the performance \$J\$ is at a maximum (the circuit is wrong all the time). <S> However, tweaking the system just a little bit results in \$J\$ at a global minimum (right all the time). <S> This means that when evaluating the derivatives at the current point there should be a steep gradient vector pointing toward the correct solution. <S> Ideally, the algorithm employed would evaluate such gradient properly and iterate towards the correct solution. <S> However, if this gradient is too steep, this may cause a numeric ill-condition, in the sense that changing the solution just a little bit causes huge fluctuations in \$J\$. <S> If this happens, then a proper scaling of \$J\$ and better granulation of system parameters should be employed. <S> Perhaps an appropriate choice for \$J\$ would be the Hamming distance between results. <A> Your score should be specialized to the circuit you are interested in. <S> From the sounds of it, you are looking to score a circuit as a black box. <S> The actual configuration of the gates is not important, but the outputs are. <S> Presumably, from the comments, you don't know the ideal circuit already. <S> Consider two cases. <S> One is a simulation of a synapse. <S> This is a rather smooth problem to solve. <S> A solution which outputs a 99% answer is probably very close to a "correct" answer. <S> Contrast this with a circuit designed to do SHA-1 checksums. <S> A solution which outputs a 99.99999999% answer is unspeakably far from a "correct" answer for such a circuit, because the measure of "correctness" for a cryptographic checksum is very demanding. <S> It's the application of your circuit that will define your best scoring metric. <A> Our intelligence is actually Analog with trillions of memory and sensor inputs each with different weighting or gain and offset factors which may be non-linear too. <S> The time sequence or logical sequence and combinations may be also part of a decision with each potential result having different weighting factors on the inputs and consequences to decide upon. <S> So when you say almost , you can mean any of these thresholds or weighting or timing or sequence operations must be defined to make it “Artificial” or resemble human response. <S> This is why experience for fuzzy logic is so powerful. <S> Would you like experiential testing with fuzzy logic and confidence factors or define all these “almost” factors up front? <S> e.g for 5V logic 2.2v is almost a logic “1” . <S> If it is moving in that direction we need a linear or Proportional <S> (P) and Derivative (D) gain factor to give it more binary “weight” for “almost” <S> Every memory decision we make is billions of these analog computations with multiple comparator outputs with negative and positive consequences and feedback loops. <S> It is NOT simply to be or not to be? <S> Of course it depends how “intelligent” this design wishes to become! <S> Answer: {Heuristics and present state} and <S> “almost” of each, can have any importance, depending your spec for “almost”. <S> Cross correlation function is one analysis method for both analog and digital systems.
| Digital fault coverage with test vectors for detection and correction are another method.
|
Buck topology for a 3.3V to 1.1V for a SoC I have been given this circuit in a design guide and it does not make sense for such a complicated circuit to be implemented just to get 1.1V out. It requires 3.3V (input) and will give 1.1V out. The 1.1V is used to run digital functions in the chip; so I can imagine it possibly pulling too much current. Can I not use a simple voltage divider to get the 1.1V? This image was obtained from this document (page 12). EDIT: This is related specifically to a system-on-chip (SoC) application. I am trying to simplify the design without losing its functionality. Is the inductor necessary and all that. <Q> You could use a linear regulator which would be somewhat simpler (no inductor) but much less efficient. <S> Most of them won't go down to 1.1V because their reference is higher than that. <S> It looks like the current drawn by the core can exceed 130mA, so the regulator would be dissipating hundreds of mW from a 3.3V source. <S> The suggested switchmode regulator is very efficient and not very expensive. <S> It uses synchronous switching so you don't even need an external Schottky. <A> Can I not use a simple voltage divider to get the 1.1V? <S> Sure you can. <S> It's not a good idea, but you certainly can do it. <S> From the data sheet, the 1.1 volt bus has a range of 1.05 to 1.2 volts. <S> The 1.1 supply drives a number of digital lines whose state (and therefore current requirements) varies wildly, from potentially zero to some max. <S> From page 29 of the data sheet , a maximum of 76 mA seems a reasonable number to design around. <S> 1.05 volts over 76 mA gives a nominal digital load impedance (for high current) of about 14 ohms. <S> To allow a 15% rise when the load is removed requires the Thevenin resistance of the voltage divider be about 1/6 of this value, or about 2 ohms. <S> Then, roughly speaking, the divider will be a 2:1 divider with values of 3 ohms and 6 ohms. <S> Total resistance is 9 ohms. <S> From this, we can calculate the power dissipated in the divider, and it is about (3.3^2)/9, or about 1 watt. <S> And that's with no margin. <S> If we restrict the voltage swing on the divider to 1/2 the specified range, the power dissipation goes to 2 watts. <S> Assuming the specified regulator has an efficiency of 80%, at 1.1 volts out and 76 mA <S> its power dissipation will be about 20 mW. <S> Plus, of course, the 1.1 volt level will vary by a few millivolts over the current range, rather than a much larger swing. <S> So, yes, you can use a voltage divider. <S> You'll dissipate something on the order of 100 times as much power, but you certainly can do it. <A> It has several advantages over a simple resistive divider: <S> It provides a regulated voltage that is not sensitive to supply voltage or load current variations. <S> It can supply several hundred milliamps of current, not something you would want to do with a resistive divider. <S> You would primarily be heating the resistors. <S> It has a high conversion efficiency of typically over 90% <S> I guess you are talking about supplying the core voltage of the ST8500 chip referenced in your linked document? <S> I strongly recommend to use the DC/DC-converter and not a resistive divider. <A> From the data sheet you refer <S> I assume you are using the ST8500 modem chip . <S> From that we can see the 1.1V power requirements are as follows: <S> Depending on frequency this could be up to \$ (3.3 - 1.1) \text{V} \cdot 128 <S> \text{mA} = 0.282 \text{W} \$ of losses using a linear regulator.
| This is certainly possible but a switch mode will have lower losses which may explain the design in the application note. You cannot use a voltage divider in any practical sense, the load current varies too much. In the datasheet of the chip it mentions the peak power consumption of the 1.1V core voltage to be 420mW. This is a stepdown DC/DC-converter using the buck topology.
|
How to check (with DIY methods) if an Inverter returns a Square or a Sine Wave? I do not have an Oscilloscope, but I want to check if my 12V DC to 230V AC inverter does produce a sine or a square wave. Any way to verify that? I know how a sine wave and a square wave sound, so converting this to audio might be a possibility? Maybe with a transformer? Just some input ideas. <Q> I would try a soundcard. <S> Connect a resistive load (eg. light bulb) to the inverter. <S> Wrap <S> a piece of wire around one of the cables leading to the bulb (DO NOT CONNECT DIRECTLY), connect to mic input and try recording. <S> You should be able to see how (un)clean the power is. <A> One way is to find the difference between peak and average of the half-waves. <S> Use a diode full wave bridge to rectify the output of the inverter. <S> Put a 1 MΩ resistor across the output of the full wave bridge. <S> Measure that with a ordinary voltmeter. <S> Now add a 10 nF capacitor across the resistor. <S> This cap should be rated for 1 kV or more. <S> Such caps are readily available up to 10 nF or so. <S> Measure again with the meter. <S> If the voltage is basically the same as before, then the output is a square wave. <S> For a sine wave it should go up substantially, like 30 to 40 percent. <A> With a high fps camera set to manual exposure, a big resistor (>~10k), and a couple of scrap LEDs (not white) back-to-back in parallel you should be able to measure the brightness -- does it change smoothly or in steps? <S> But you are working with mains if you build something like that, even if it is isolated from ground. <S> How easy it is to read the brightness of a spot from a video <S> is up to you <S> (I've written Python to do this for a series of stills but never coded any video analysis). <A> Here is what I would do: First make a simple 100:1voltage divider to drop your voltage to a few volts. <S> Then make a 12 dB/octave high pass filter and 12dB/octave low pass filter, both with the 3 dB cutoff centered at 75 Hz. <S> Apply the low voltage to each, and with an appropriate value load resister on each filter output, measure and compare the AC voltages coming out of the filters. <S> A true sine wave input will show very little output voltage from the high pass filter, and the low pass filter will show very little attenuation of the voltage (compare input to output). <S> A modified sine wave or square wave will show significant AC output from both filters, and the low pass will show some voltage attenuation. <A> but I want to check if my 12V DC to 230V <S> AC inverter does produce a sine or a square wave. <S> Any way to verify that? <S> Be aware that the answer is very likely "neither". <S> Olin's answer will distinguish a plain squarewave from a sinewave but it won't distinguish a "modified sinewave" from a "true sinewave". <S> Your idea of using a transformer is a good one, it will reduce the voltage to a safe level and provide isolation. <S> You can then use a resistive divider to further reduce the voltage to a volt or so and limit the current, then feed that in to the line input of your sound card and record the waveform. <A> Given the limitations of your measuring equipment, might you short circuit the whole problem by finding the manufacturer's specs, manual or data sheet? <S> It may tell you what the output waveform is. <A> http://www.sillanumsoft.org/ <S> You'll have to divide down the 230V to a much smaller level, like 2V, and then you can monitor it on your PC. <A> Here's another approach: if you say you can "listen", then first make sure that you attenuate the signal properly, and isolate it (if applicable), then use a first order highpass for 50Hz (a differentiator might also work, but it might be too sensitive, depending on the inherent pole; highpass better). <S> The two sounds, incoming and outcoming, <S> should sound <S> the same if it's a sine (or very similar, considering filtered high-frequency switching noise). <S> Else, you'll hear garbage in, and garbage out. <A> There are (A/D) adapter cards and plug-ins (USB) that allows a computer to run an app that provides the functions of an oscilloscope. <S> I'm sure there are cheaper ones available (depending on accuracy and features you need), and perhaps you can borrow one. <A> For this, you need to setup your camera and environment in such a way that you can make 2 pixtures from the same lightbulb, connected first to your normal power outlet, and then to the power outlet of the UPS <S> If your camera has a manual expose mode, you can use this, and the lightning output of the bulb connected to the normal household power should be significantly weaker. <S> If your camera has no manual expose mode (most phones), open the resulting pictures, and see if the lighting time is significantly different <S> This difference is lighting output is caused by the fact that lightbulbs use the average voltage, while the UPS with it's square wave is designed to match the peak to peak voltage of a normal outlet, as most advanced electronic devices use diodes to rectify the power
| Use a PC oscilloscope that uses your PC sound card to take samples of signals. Since you want to notice the difference between a sine wave and a square wave (as opposed to a sine wave and a modified sine wave), you could use a camera and a lightbulb for this.
|
Unsure how arduino is interpreting RS232 signal Disclaimer: I am a novice. I have an RS232 connection with an RFID tag reader which I am monitoring via software on a desktop computer as well as an Arduino. The device is configured with 8E1 parity. The arduino is (to the best of my knowledge) set up for 8N1 parity. Both the computer and arduino connect directly to the reader, and receive the exact same signal. The arduino is reading a tag as follows: 10 00 62 00 10 29 C0 0F 00 39 12 C0 56 00 8D 0A The computer is reading the same tag as follows: 30 00 E2 00 30 69 80 0F 00 59 12 80 96 00 0D 0A With my (limited) understanding of parity, I can't figure out the conversion here. How is the arduino interpreting these bits to obtain those values? <Q> Thanks for all the help. <S> After doing some investigation with an oscilloscope, I've figured out what's going on: Sample pure data from reader (LSB first, spaces added for clarity): 10 0000 11000 10 0000 00000 <S> 10 0100 01110 <S> 10 1011 00001 <S> 10 0101 00000 10^s 0 <S> ^3 <S> ^p^s <S> ^0 ^0 <S> ^p^s <S> ^2 ^E <S> ^p^s <S> ^D <S> ^0 <S> ^p^s <S> ^A ^0 <S> ^s <S> For a data value of 0 3 0 0 2 E D 0 <S> A 0 <S> -> 30 00 E2 0D 0A <S> s is the stop indicator, p is the parity bit, and others are the hex data. <S> What is happening on my arduino is that the parity bit is being read as the most significant bit for the second half of the byte, then the previous least significant bit is used to overwrite the new least significant bit of that half-byte. <S> Applied to the previous example: 11000 - <S> > <S> 100000000 -> 000001110 - <S> > <S> 011000001 -> 000100000 - <S> > 0000 <S> which produces: 0 1 0 0 2 <S> 6 D 8 <S> A 0 -> 10 00 62 8D 0A explaining the conversion that you see in my original example at the start and end bytes: 30 00 E2 0D 0A - <S> > 10 00 62 8D 0A <S> If for some reason anyone else runs into this incredibly specific problem, I've converted the data back in the arduino logic with these functions (no they're not optimal): <S> byte fixBits(byte rc) { <S> byte five = rc & 0x10; <S> byte six = getParity(rc) << 5; <S> byte hex1 = <S> (rc & 0xF0) << 1; <S> byte hex2 = rc & 0x0F; return ((hex2 | hex1) & 0xCF) <S> | five | six; // bit masking}byte getParity(byte rc) { <S> int sum = 0; byte test = rc; for (int i = 0; <S> i < 8; i++) { sum += test & 1; test >> 1; } return sum & 1;} If anyone can describe exactly why this is happening I'd be curious to hear it, but otherwise this issue is solved. <A> You have two options: Configure the Arduino to read the parity bit by passing <S> SERIAL_8E1 <S> as the second argument to Serial.begin() . <S> Once you've done this, the data should be received normally. <S> Configure the device to not send a parity bit. <S> (The manual implies that this is an option.) <S> The method that you've come up with is nonoptimal. <S> It's likely to result in unpredictable, data-dependent read errors. <A> Parity bit will not be part of data. <S> If you have an oscilloscope or a logic analyzer plugin and monitor the bits one by one. <S> You will understand. <S> Ardiino is not configured to expect parity bit. <S> Presently, arduino will be reporting errors for cases where parity bit is not one. <S> Monitor UART error status registers. <S> Arduino is expecting the location where parity bit is put (by the RFID reader) to be one always.. <S> (STOP bit) <S> How is the computer interpreting these bits to obtain those values? <S> Computer will not operate on the received data. <S> It will extract data from databits position as is.. <S> And then computes the parity.. <S> If the received parity doesn't match with computed parity, a parity error flag will be set in the error register. <S> It is then task of the program to check it status whenever the data is received from the RFID.
| Your tag reader is sending serial data with a parity bit, and the Arduino isn't configured to expect that.
|
STM32F4 How are Preemption Priorities and Sub-Priorities used? I have started working with ARM-based microcontrollers. I not understand subpriority and preeemptionpriority. For example: NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x00; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x01; Why would we use these? <Q> The Preemption Priority allows an ISR to be preempted (interrupted) by another interrupt of higher priority. <S> When the higher-priority interrupt is completed, the lower-priority interrupt continues from where it left off. <S> Subpriority, on the other hand, has nothing to do with preemption. <S> Say that you have two interrupts of the same priority which are both pending. <S> The interrupt handler will choose which one to service first, based on their subpriority. <S> Once the first one is completed, the second one will begin. <S> It may seem unlikely that two interrupts can happen at the same time. <S> One common situation where this could happen is if you have an interrupt service routine that takes a long time. <S> During this routine, multiple other interrupt triggers may have taken place. <S> If so, the subpriority will determine which one is handled next. <S> Finally, keep in mind that as the actual priority increases , the priority value decreases . <S> That is, Priority=1 will be serviced before Priority=2 . <A> M3 or M4 core supports up to 240 interrupts. <S> You will need priority to be assigned to interrupts. <S> Rather than defining 240 priority levels architecture groups a bunch of them together. <S> So, an intuition will be 12 main groups (group A,B,C,...) <S> and each group has say 10 interrupt sources.. <S> So, if there is already an interrupt being serviced in group A, then, another interrupt in same group A will not be serviced <S> I til first interrupt is serviced completely. <S> On the contrary, while serving first interrupt, if another interrupt occurs from a group of higher priority, then current interrupt service will be paused.. <S> Then the sub priority will come into play to choose which ISR to execute. <A> From stm32f4-discovery.net <S> NVIC_IRQChannelPreemptionPriority <S> With this parameter you set interrupt priority, number from 0x00 to 0x0F. <S> Let’s say we have to use USART receive interrupt and <S> ADC conversion finished interrupt. <S> USART is more important than ADC, so USART will have lower number than ADC. <S> NVIC_IRQChannelSubPriority <S> With this parameter you set interrupt priority, number from 0x00 to 0x0F. <S> Let’s say you have 2 USARTs enabled, but USART1 is more important than USART2. <S> So USART1 will have lower number than USART2. <S> or STM32 Interrupt Service Routine Priority <S> NVIC_IRQChannelPreemptionPriority <S> is used to determine if an interrupt that occurs after can overtake previous interrupt that is being serviced. <S> NVIC_IRQChannelSubPriority is used to determine priority if two interrupts occur at the same time. <S> (If NVIC_IRQChannelSubPriority is not determined, the position in the NVIC table is used to determine the priority.)
| Sub priority helps when two interrupt occurs from the same group at the same time..
|
Understanding Vgs(th) on a datasheet I am trying to understand the Vgs threshold on this datasheet. it says that the maximum is 1.45v but I have switched with 3.3 from a microcontroller. am i damaging the mosfet using this voltage? <Q> Even though you've picked an answer, I note that it doesn't really answer your question about Vgs(th). <S> (Sorry, Andy.) <S> Note that on the data sheet, Vgs(th) is specified at Vds = Vgs, and the current level is 250 uA. <S> In this case, the maximum is simply the maximum required to produce 250 uA. <S> If you give the gate less voltage, you may get less current (or maybe not, depending on the unit). <S> It's possible that you might get lucky as low as 0.65 volts (the minimum). <S> So in this case, if you like, "maximum" sort of means "minimum", in the sense that it is the minimum required to guarantee 250 uA. <S> This is entirely different from the maximum limits found elsewhere, which define what you can do without potentially damaging the device. <A> No, the FET's doing great! <S> You're doing fine. <S> Heck, even on the first page of the datasheet, they mention some specs at \$V_{gs}\$ of 10V! <S> On the contrary, the gate voltage may even be too low for some purposes. <S> Check out the first chart on page 3 of the datasheet, the \$I_d\$ vs \$V_{ds}\$ at select \$V_{gs}\$ voltages. <A> From the first page of the datasheet, the maximum Gate-Source Voltage ±12 V <S> So no, you are not damaging the mosfet. <A> Maximum voltages and other limit values are specified under "Absolute maximum ratings" usually: - <S> So the gate-source voltage should not exceed <S> + or - 12 volts and, as a design recommendation I'd keep below +/- <S> 10 volts. <S> And, if you look at the forward characteristic of the device here: - There is very little reason to go to a gate-source voltage beyond 5 volts. <S> If you need that extra bit of conductivity with higher than 5 volt operation on the gate you should consider a better device.
| The threshold voltage is the minimum voltage at which the MOSFET even starts to turn on (see the \$V_{gs(th)}\$ line, where they specify the \$V_{gs(th)}\$ at \$I_d\$ of 250 µA).
|
Do I need a BMS for Li-ion batteries connected only in parallel? I have a device that runs on a single cell Li-ion / LiPo. The physical case for that device allows me to put in one to three 18650 cells. Unfortunately given the disposition of the cells, I can't buy a 2 or 3 pack already assembled. The device already has a charging circuit. The maximum load will be 300 mA and the maximum charge current will be 500 mA. Given the above, if I connect 3 cells in parallel (1S3P), do I need a BMS (Battery Management System) or any additional protection circuit? I'll take care to have them at the same voltage level before connecting them together to avoid current flow between the cells. TL;DR; Does a 1S3P Li-ion 18650 pack need a BMS? <Q> You do not need a full-blown BMS. <S> Your stated charge/discharge currents are way below 18650 ratings (so you can get away without thermal sensor) and parallel cells do not need balancing. <S> But you do need a protection circuit. <S> As a minimum a combination of discharge cut-off and discharge current limit. <S> Current limit should be set slightly above your max 300 mA load, not the battery rating as typical protection circuits do. <S> The above assumes that your existing charging circuit has proper charge cut-off. <S> One missing thing here is automatic disconnect of a faulty cell. <S> But not many BMS can do that anyway. <S> It can be done with fuses. <A> Depends. <S> What do you want the BMS to do? <S> When I design a BMS, the first thing it does is safety: <S> Temperature monitor for charge/discharge Over current events (with a software fuse) <S> Charge control stopping over discharge events <S> The only other tasks a BMS will do are things like: state of charge some basic functionality (if you're doing something very basic, complicated functionality should be taken out of the BMS to make sure the safety tasks are taken care of) cell balancing (if you have a series pack of cells) <S> So, as you have your charger outside the BMS, the question is how safe do you want you pack to be? <S> If it's just for you, you know what you're doing, and you can control the environment, charge and discharge patterns and all that <S> , then there is no reason to have any BMS at all. <S> Personally, I'd say yes you do. <S> But if I'm quickly throwing something together, I have been known to go without. <A> You shouldn't plan on using the battery of 3 individual cells in parallel. <S> The pre-assembled packs are likely to contain cells with tightly matched characteristics. <S> The manufacturer would select the cells from batches of thousands before making the assembly, which you have no luxury of having. <S> The major reason is that the weaker cell in parallel configuration will be subject to overcharging on each charge-up cycle, which would lead to accelerated irreversible damage to cell electrodes and/or separators. <S> This is not due to "overcurrent" or "overvoltage", the charger has proper limits for these, but due to overexpose the weaker cell to charging voltage for longer than it should be, since the charger has no means to monitor how the current is split between cells and properly terminate the charge process. <S> Unless you have current monitors and individual switches for each cell.
| You should use pre-assembled packs if you really need high-discharge current or better capacity. If you're selling it, then you need a BMS as safety is (should be) paramount.
|
Battery Life Calculation, Sleeping and Wake modes I have a circuit that consumes 1.6μΑ during sleep mode and 40mA during awake mode. The awake period lasts for 3 seconds and the circuit is on awake mode every 30 minutes. The circuit is powered by this battery (the link leads to the datasheet). I used this battery life calculator because i do not have the knowledge to do the maths on my own. I know that as the circuit working the capacity of battery is decreasing as well as the voltage. But as the battery voltage is decreasing there are a few components that cant work under 3.0 volts. I am trying to say that there is point where the battery will be capable of feeding power the circuit but some components are not going to work because the voltage will be lower than their voltage threshold. For example, if i have a battery at 8500mAh 3.6V and at 2.9V are still left 1000mAh i dont care because my circuit doesn't work at 2.9V. Is the rest capacity "wasted"? Is that thought wrong? Does the attached calculator take care about that too? Because i didn't see in the equations nothing about voltage. Many thanks <Q> This isn't that hard that you need an on line calculator. <S> First determine the average current consumption: <S> In sleep mode, the current (1.6 uA) is so much smaller than the wake mode current that we can assume that this 1.6 uA is used 100% of the time. <S> In wake mode we have 40 mA for 3 seconds every 30 minutes = <S> 30 <S> * 60 = 1800 seconds. <S> That is a duty cycle of: 3 / 1800 = <S> 1/600 = 0.00167So <S> those 40 mA peaks average out to: <S> 0.00167 * 40 mA = 66.7 uA <S> Total average current consumption: 1.6 uA + 66.7 <S> uA = <S> 68.3 <S> uA <S> Now we look in the datasheet to see what battery capacity that gives us given a discharge to 3.0 V. <S> The nominal capacity of this battery is 8.5 <S> Ah. <S> Let's look in the graphs if that is the value we can use. <S> Battery capacity decreases with increasing load current but the load current for that 8.5 <S> Ah is 4 mA, <S> a lot less than the 68.3 uA we need. <S> So yes, we can use the 4 mA value, <S> our 68.3 uA is so small that the battery's capacity is not deteriorated by it. <S> From graph 1 we can determine to which voltage the battery is discharged in the capacity test. <S> All curves are quite flat above 3.0 V so when the voltage is below 3.0 V then the battery is quite empty already. <S> So that 8.5 <S> Ah is valid for discharging to 3.0 V. <S> So let's continue with that 8.5 <S> Ah. <S> 8.5 <S> Ah means the product of current and hours is 8.5 Ah. <S> So: 8.5 Ah / 68.3 uA (from above) = <S> 124451 hours = 5185 days = <S> 14 years ! <S> In practice batteries for long life applications are often only guaranteed for a 10 years lifetime. <S> The 14 years exceeds that. <A> Yes, the rest of the battery is "wasted," but it's not so bad as it seems. <S> If you look at the discharge curves on page 2, the 60mA curve is most similar to what you'll see in your 30mA "active" mode. <S> That curve is rated at 7.2A-H, but that's based on 60mA average current... <S> you're only drawing about 68uA average, so time is more your enemy than power drain as far as battery life goes. <S> (If not for self-discharge, you'd get a good 15 years out of the battery. <S> However, it will probably last only 2-4 years anyway, depending on environmental conditions.) <S> The 60mA curve shows voltage under load, so it can be used to determine how much energy is "wasted." <S> The remaining battery capacity at any point on the curve is the area under the curve from that point to the end. <S> At 60mA, you can see that when the battery voltage reaches 3V, the curve is nearly vertical and there's only a tiny sliver under the curve between 3V and 2V. <S> Compared to the total area under the curve, it's miniscule and not worth worrying about. <S> You in particular won't have to worry about it because the battery's life will be determined largely by self-discharge. <S> The second chart on page 6 here indicates that at 0.4mA, or 1/47500C, the battery loses 4X as much capacity due to self-discharge at 60C as it does at 25C. Keeping in mind that the loss is over a shorter time period, run the numbers and it indicates that the self-discharge rate at 60C is almost 6X the self-discharge at 25C. <A> one important specification is the cut off voltage of your system, the voltage at what your system stops working, 3V in your case. <S> So as you say the rest of the capacity will remain in the battery but your circuit won't be able to use it, so yes a lower cut off voltage will help to use more capacity of the battery and enlarge the life of your device. <S> I don't see that that is taken into account in the calculator, it uses a generic 0.85 to reduce the nominal capacity. <S> Also doesn't take into account the self discharge, on that technology depending of the manufacturer can be around 1%. <S> Another point to have in mind, is the temperature, it can highly affect the battery and in your case taking a look to the datasheet will stop working below -10ºC. <S> But of course depending on your application that can be important or not.
| So when used in a product you should instruct the user to replace the battery every 10 years for optimal performance.
|
Are there any single supply OP amps with negative supply voltage? I learned that basically the only difference between a "single supply" OP amp and a dual supply one is that the former can drive much closer to the negative supply rail. Furthermore if I understand correctly, if you enable a "single supply" OP amp to drive closer to the positive supply rail too, then it becomes a rail-to-rail OP amp. Then my question, which I believe is something not unnatural to come up with at this point, is that there can be "negative single supply" OP amps which drives close to the positive supply rail but not negative. Has there been any such product, at present or in the past?Or is it meaningless to develop such a product (e.g. it costs more than an rail-to-rail device so it makes no sense.)? It may be a stupid question but I will be glad if you could share me your knowledge. Thank you in advance. EDIT: I am sorry that I must have clarified that I am not asking about how to handle negative input with generic OP amps but about some existence (or possible application) of a weird device easily imagined to be validly designed. I wanted to know whether there is (or has been) an "inverted" version of the so-called single-supply OP amps which has the capability to operate around the positive supply rail but not around negative in terms of the output voltage, so that it can be typically used with negative supply (thus I called them "negative single-supply OP amps"). Such device would be advantageous over rail-to-rail OP amps if it could be sold cheaper and the users are sure that they are never operating near the negative supply. This is analogous to "positive single-supply OP amps" which are preferred because of lower cost when the users are sure they are never operating near the positive supply rail. I understand there is very little demand for such a product because the range of application is limited, but I kept wondering because I have seen far weirder devices. I apologize for the lack of explanation in the original post. <Q> The term 'single supply op-amp' is rather outdated now. <S> In the bad old days, op-amps had both an input range (common mode voltage, or VCM) and an output range that stopped a volt or three short of both rails. <S> As many applications required operation around ground, they had to have both positive and negative rails. <S> Now, there are many amplifiers built with an input range that includes both rails, and whose output range goes very close to the rails, at least at low current. <S> These are full rail-to-rail, or R2R amplifiers. <S> If you want to use them directly with signals around ground, you still need a positive and a negative rail. <S> For AC application like audio, you can AC couple, so the circuit inputs and outputs can be around ground, but the amplifier works correctly within its rails, whatever they are. <S> For DC applications, while level shifting is still a possibility, it's far more convenient when operating with positive voltages close to ground, to use an amplifier whose VCM includes the negative supply, and which can drive close to the negative supply. <S> Then, the negative supply can be connected to ground. <S> Amplifiers like the popular LM324 have a VCM and an output that includes the negative rail, so can be used in this way. <S> When people design such circuits to interface with logic, or car electrics, they tend to think in the few positive volts above ground, and not worry too much that they can't get a full positive output, or that the VCM stops 2v short of the positive rail. <S> This is the 'single supply op-amp'. <S> Connect the negative rail to ground. <S> Use it near ground, as long as the signal is still strictly positive. <S> Don't go negative. <S> Don't use it near the positive rail, but you didn't want to do that anyway! <S> Summary <S> To operate either side of ground, use positive and negative supplies. <S> To operate close to ground but never below, use an amplifier whose VCM and output includes the negative rail, which you ground. <S> To operate close to both rails, use a full R2R amplifier, whether the negative rail is grounded, or sent to a more negative supply. <A> It isn't needed, if an op amp is in the inverting configuration signals beyond the rails can be used. <S> Take for example this circuit: <S> They also have 'beyond the rails' op amps that extend slightly ( ~300mV ) beyond the rails to allow for a slightly larger range, of course the output limit still applies. <A> An important aspect of the input range including ground/vcc, was that some input stages, suffer inversion when one of the inputs goes beyond the rails/rated range. <S> So instead of signal merely being clipped and distorted, it tries to shoot down the other way. <S> Obviously this is far worse for this signal distortion, and much worse for a comparator where the result becomes completely wrong. <A> Amplifiers with rail-to-rail input work to near or beyond the positive rail. <S> Some specialized high-side current sense chips have an amplifier that has inputs that function near the positive rail. <S> There are some inexpensive JFET-input amplifiers that will typically work to the positive rail at room temperature, but it is not guaranteed.
| A negative voltage can be shifted up with a single supply op amp.
|
Need a switch/circuit breaker that stops power supply to equipment when power comes back after outage I need a switch that stops power supply(220VAC) to led tv when power comes back after outage. So i need a circuit breaker that breaks the circuit when power supply is off and needs manual switch on from this circuit breaker device when power supply is on. I have two ideas: I feel its possible using microcontroller and relay but i think it would be costly and time consuming to make such device. I am also having idea about using magnetic coil as in magnetic circuit breakers but not confident about its effectiveness. As i am unable to find such device on commercial websites, so i need help in finding such device if commercially available and/or making such switch/circuit breaker in a simplest and cheapest possible way. <Q> Consider using a COTS item called a Magnetic Switch commonly used in conjunction with wood working power tools. <A> Well, a latching relay configuration is what you're looking for: simulate this circuit – <S> Schematic created using CircuitLab Idea is simple: when you press the pressbutton SW1,you connect the relay's coil to your power outlet. <S> It then energizes, and closes the integrated switch in the relay, connecting the output to the input voltage. <S> At the same time, it also connects the relay's coil to the input voltage, so that the relay's coil stays connected even after you release the button. <S> The relay has then latched . <S> When the voltage on Live in drops out, the coil loses energy, the relay opens, and you have to press SW1 again to energize the coil. <S> Things needed: Power cord to connect to your wall outlet momentary switch SW1 an outlet that you can connect your screen's power plug to a Relay rated with (in parenthesis the values that I assume, based on the assumption that "power often failing" statistically means you might be in India) <S> coil voltage = grid voltage (220V) switched voltage = grid voltage (220V) <S> switched current = maximum current draw of a device pluggable into outlet (12 A) <A> The normally open (NO) contact of the relay re-inforces power to the coil via the contact closing <S> and so if you stop pressing the trigger button, the relay has latched. <S> This can be optionally "tested" by the reset switch. <S> If power is removed the relay unlatches until power is returned and the trigger button is pressed. <A> The AC Relay must be rated for line transient voltages (>3kV) and Amps derated motor surge currents or Hp . <S> Alternative <S> $15 Magnetic Relay Woodstock D4157 110/220 Volt Single Phase <S> On/Off Switch <A> The plug-through Earth Leakage / Residual Current (ELCB/RCD) devices just happen to do this. <S> You have to press RESET <S> /ON to latch them on after a power cut. <S> They do this, because they happen to use a self-latching relay arrangement (as described by Marcus) <S> It also happens to be an RCD, but you don't care about that. <S> Note this behaviour is generic to RCD's that have the RESET and TEST buttons. <S> So the wall socket versions also do exactly what you want
| A standard latching relay circuit seems appropriate for this: - When AC is first applied you need to press the trigger switch to activate the relay and that also activates the load.
|
74HC/HCT: What to do with unused inputs and why? If I'm using an IC in the 74HC or 74HCT family, and I'm not using all the input pins, I understand that I should not leave them unconnected because they will float. But what exactly should I do with them, and what are the pros and cons of the different options? For example, if I'm using the 74HCT08, which has four AND gates, and I'm only using two of the gates, what should I do with the inputs of the other two gates? I've seen various recommendations in various places, such as... connect them directly to Vcc connect them directly to GND connect them to Vcc through a pull-up resistor connect them to GND through a pull-down resistor What are the pros and cons of each of these options? Which option is best for stability and low power consumption? <Q> There are a few considerations that have not been mentioned in other answers. <S> Sometimes the unused input plays an important role in the logic of the part. <S> An example would be a 4-input gate where only 3 inputs are actually used. <S> In this case the logic level that you tie the unused input to must be selected properly or else the logic function of the used functions will not work. <S> In some business / industrial segments it is necessary to test all functions in each part on the board even if they are not used. <S> This is done to ensure that some nascent fault in a chip does not expose to a higher chance of catastrophic failure of the part. <S> The addition of pull ups or pull downs on each unused pins allows automated test equipment to toggle the pins which would not be possible if they were hard tied to VDD or GND. <S> There are cases where it is handy to keep unused gates available for possible future rework to tweak the design in the case of bugs found, need to invert or combine signals or other things. <S> Pins hard tied to VDD and GND are very much harder to rework <S> so added pull ups or pull downs provide access pads for the rework. <A> The default answer for CMOS inputs is to connect them directly to either ground or power. <S> I would let routing dictate which. <S> If it doesn't matter, connect them to ground. <S> If you have a ground plane, then ground is the net that you can connect to while causing the least additional routing congestion. <S> In some cases, you can tie inputs to outputs. <S> It can end up in either one of two stable states, but you don't care which one. <S> The advantage of that is possibly less routing congestion, especially if the three pins are next to each other. <S> Of course this trick of tying inputs to outputs doesn't work with gates that invert. <S> Then you'd either make a oscillator or end up with the inputs floating at the absolute worst voltage for power dissipation. <S> Added <S> This has all been assuming these are inputs to totally unused gates, which is what I interpreted the question to be about. <S> For example, if you are using only 3 inputs of a 4-input AND or NAND gate, then the unused forth input must be tied high for the gate to work as intended. <S> Likewise, unused inputs to used OR or NOR gates must be tied low. <S> It is not necessary to tie CMOS inputs high or low thru resistors. <S> This is not because CMOS inputs have series resistors built in, because they don't. <S> It is because no high inrush current will flow nor any harm caused by holding a CMOS input at the power or ground level, even during power-up. <A> Connect to either Vcc or GND. <S> It makes no difference. <S> With no load on the outputs, the current in the internal transistors will be about the same. <S> Or use a pullup or pulldown - again it makes little difference, with the proviso that you'll use more parts than necessary, and if the resistor fails open, the floating inputs may cause baffling symptoms which will be all the harder to track down since there is "obviously" no need to check out the unused gates. <S> I speak from experience when I say that an unused gate can produce mystifying symptoms on the output from a used gate in the same package. <S> Pullup/pulldown techniques are largely a hangover from earlier, pre-CMOS families. <A> It doesn't really matter which of the options you choose, all will do what is needed in 99.99% of the cases. <S> And in that 0.01% of the cases that this isn't true <S> you will know and have good reason to do something different. <S> I can't think of any examples where this would be the case though. <S> so there isn't going to flow any current anyway. <S> That leaves connecting to ground or supply as the only options, which one you choose doesn't matter, whatever is more convenient. <S> CMOS logic circuits only use current when they're changing states so that's why you should apply a fixed state at the inputs. <S> Whether that's zero, one or a combination of both doesn't matter at all.
| The polarity of unused inputs to used gates can certainly matter, and then you may not have a choice whether the input must be tied high or low. I'd probably start out with them all connected to ground in the schematic, then maybe switch some to power during routing if it makes things easier. Using a resistor is pointless as CMOS logic inputs are very high-ohmic For example, tie all three pins of a AND gate together.
|
Non-Electrical-Engineer-Here: Can I use a 5v 2A power supply with any 3.3V regulator? I have a 5V 2A DC power supply I plan to power a custom arduino with. However, I'm also using a NRF24l01+, which requires 3.3V. So, I'm in the market for a 3.3V regulator, but I'm unsure of which one to buy. Some have output current of 500mA, and some I've seen that cost more have output of 3A. Does it matter which one I buy? I'm partially worried about frying the NRF24l01+. But I don't have enough of an understanding of voltage versus current and what can connect together. I'm more of a plug-and-play kind of person. <Q> Find out how much current your NRF24I01+ needs and get a regulator that can provide at least that much current. <S> Also, get a low dropout regulator that can operate with a 5V input and provide the 3.3V output. <A> Higher current output capacity of your transformer or voltage regulator doesn't mean that the actual current will be exactly the same. <S> The important concept for a non-electrical engineer like you is that the amount of Current drawn doesn't depend on the output capacity of the source (although it can limit the current ), <S> it depends on the load and in this case your nrf24L01 <S> +. <S> So don't worry buy any regulator that fulfils the minimum current limit you require (I guess which for a single nrf is 12mA at full power without PA LNA module ) and don't worry about the maximum current rating of the regulator . <S> The rating signifies the max current it can provide not that it will necessarily, which entirely depends on your nrf. <S> To save the extra component hassle you may very well power your nrfs using the 3.3v output of your arduino itself as it can provide a max of 150 mA of current. <A> If you look at the NRF24l01+ data sheet the current consumption is in the ten's of mA, so a power supply capable of 500 mA is more than enough.
| After having chosen a regulator, determine how much power it will dissipate and provide adequate heat sinking.
|
How to use a relay to "lift" 12v ground of a two 12v battery system First off, sorry about the long title as I don't know a better brief of my situation. Project: I am converting a bus into a trailer to be pulled by a semi truck 5th wheel style. The bus has it's own electrical systems that I don't want to take away, but i need to control the stop lights, etc from the semi truck when it is attached. The semi truck by design of course can power lights on a trailer so I will be using it in this way to control the lights on the bus. I want to have a bypass switch. If the bus is powered on by the master disconnect switch, then I need it to lift the ground from the semi truck power feed...thus turning off the control of the lights from the truck battery Concept: Here is what i think will work using a 5 pin relay. Your input will greatly help me. Explanation: I'm thinking to tap the bus positive, post master disconnect switch, to feed relay point 86. 85 goes to the bus ground. This same ground is where 87a, via 30 allows the semi truck to complete the circuit to control the lights. Application: When the bus master disconnect switch is switched off ( normal usual operation ), the ground from the truck connects to the bus allowing the truck system to control the bus lights. When the bus master disconnect is switched on ( rare but to operate the bus systems independent from the truck ), the ground from the truck should "lift". This will assure that both battery systems are not powering the same circuit. Is this a good way to do it even though I'm only working with 12v on either side of the relay? Am I missing something? <Q> You are imagining a problem where there is none and likely to create headaches for yourself. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> It should be clear from the schematic that the only connection between the two systems is the common battery negative chassis connection. <S> Without a positive connection between the two systems no current can flow between them. <S> The result is a system that will work on any tractor unit, doesn't rely on trailer battery condition, is simple, standard and reliable, and can be maintained by any decent mechanic. <A> Assuming that both are chassis ground it would be risky to disconnect the power systems by trying to disconnect ground. <S> You really should disconnect the +12V connection. <S> You haven't shown how the +12V will be connected to the bus lights. <S> I assume that you intend to connect the +12V from both batteries together? <S> This is also a bad idea. <S> If one battery is lower than the other you will draw very large current over that connection. <S> Not a good idea. <S> I would recommend a heavy-duty SPDT switch, break-before-make, that lets you connect the +12V in the bus to either the bus battery or the truck battery, but never both at the same time. <A> You're not going to be able to reliably separate the trailer and tractor grounds while the trailer is hitched, any system that relies on that is likely to fail with lots of smoke <S> But there is no need to isolate the grounds if the live wires are not interconnected. <S> Disconnect the wires for the signal lights from the bus electrical system, and connect them instead to the trailer signal socket.
| Using a relay as you have shown is a make-before-break, meaning that both +12V are connected together for a short time until the relay switches. The solution is to wire a multicore cable with regular trailer plug on it along to the back of your trailer, ground the negative to the trailer chassis and wire the cores to the lights, disconnecting and insulating the original tail lamp wiring.
|
Does SNR improve at higher sampling rates for a low pass filtered signal? Let's say we want to extract 1Hz signal from a noisy signal by using a LPF. And assume we have sampled it with 100Hz sampling rate. If we would have sampled it with 1kHz sampling rate and use the same LPF would the SNR be better? Why? <Q> I see quite a few misstatements and possible misconceptions both in the answers and in the question, so let’s break down what is meant by “noise.” <S> Analog noise within the same bandwidth as the signal. <S> Analog noise outside of the bandwidth of the signal. <S> Quantization noise introduced by the ADC. <S> I interpreted your question as implying option 1. <S> Increasing the sampling rate will do absolutely nothing regarding that noise. <S> No ifs or buts. <S> That noise is there to stay. <S> Other answers only apply to options 2 & 3. <S> If your analog filter is not steep enough and you still have strong noise components above the bandwidth of the signal (option 2), particularly near the sampling rate and its multiples, then increasing the sampling rate and using an appropriate digital filter will allow you to (1) relax your analog filter requirements and (2) completely remove that out of band noise. <S> Regarding option 3, that’s the basic operating principle that makes sigma-delta converters possible. <S> You can gain 1/2 bit per each doubling of sampling rate, as long as your signal is large enough to remain uncorrelated to the sampling noise. <S> Interestingly, this is one place where out of band noise works in your favor, as it breaks the sampling noise correlation to the signal. <S> I.e., it serves the function of dithering (or, as physicists call it, stochastic resonance). <S> For slow enough signals this is a great advantage, using this technique I have obtained ~20 bits of resolution out of 12 bit converters by purposefully designing the analog anti-alias filter to introduce several bits of out-of-band random noise and oversampling by a factor of 4096. <A> The SNR would be better, firstly because noise mostly being a higher frequency component would have a lesser chance of being aliased of 1Hz when sampled at 1kHz than at 100Hz Secondly <S> SNR is directly proportional to bandwidth or just look at Hartley shannon’s law C = <S> Blog_2 <S> (1+SNR) <S> Where C is the digital bandwidth and B is the analog bandwidth <A> You have a 1Hz signal, with superimposed noise out to high frequencies. <S> Now impose a 4-pole filter, lowpass filter, at 10Hz. <S> Thus energy at 100 Hz is down 80dB. Or about 12 bits. <S> At 30Hz, the noise energy is only down 40dB, or 7 bits. <S> If the antialias filter is only 4-poles. <S> Thus the ability of more samples to be useful will depend on how you rolloff the noise. <A> Oversampling can give you a chance to run an additional high-pass filter digitally. <S> This can reduce out-of-band noise, and you can then reduce your sampling rate. <S> If you don't do that, it still gives an advantage if the noise is not correlated with the signal. <S> Your signal adds coherently, giving you 6dB of gain for doubling the sample rate. <S> Your noise adds incoherently, giving your 3db for the same doubling. <S> You just got 3dB SNR improvement for 2X the samples. <S> Of course you have to sample at 4X to get 6dB improvement, and 8X for 9dB, <S> so there's practical limitations.
| Increasing sampling rate, using an appropriate digital filter at a higher resolution, and decimating the output of the filter to the needed rate, allows you to increase the resolution of your samples.
|
What builds up a comparator? I'm trying to understand how comparator (used in 555 timer) able to compare two voltages. I'm searching for comparator schemantics but all I get is the triangle symbol. AND gate has a symbol "D", and if I search for " AND gate schemantics " It'll show me two transistors that builds up an AND gate. What builds up a comparator? <Q> What builds up a Comparator? <S> Many data sheets contain semi-idealized details of their internal circuitry such as the ubiquitous LM339: - You could probably model this up using a sim and it will give adequate results. <S> Try reading a few data sheets. <S> Here's the LM311 for instance: - <S> And this link may help you understand them a bit more. <A> The differences are. <S> Comparators don't have to worry about controlling the frequency response to provide stability. <S> Comparators are designed to tolerate running in saturation, since that is where they will spend most of their time. <S> Comparators often have open collector outputs. <S> So how do they work, lets look at the LM339 <S> simplified schematic that Andy posted. <S> Each input has a pair of PNP transitors (other designs may use a single BJT or FET <S> and/or my turn the design upside down to use N type devices but the principle is the same). <S> These try to steer the current down whichever branch has the lower input voltage. <S> At the bottom of both branches is a "current mirror". <S> This tries to make the current in <S> it's right hand branch match the current in it's left hand branch. <S> When in+ is higher than in- more current is steered down the right hand branch. <S> However the current mirror limits the current in <S> it's right hand branch to match that in it's left hand branch. <S> The rest of the current flows through the base of the next transistor turning it on. <S> This in turn pulls the base of the output transistor to ground turning it off. <S> An external pull-up will then pull the output high. <S> When in+ is lower than in- more current is steered down the left hand branch. <S> The current mirror tries (and fails) to make the current in <S> it's right hand branch match that in it's left hand branch. <S> In doing so it pulls the base of the next stage low turning off the transistor. <S> This allows current to flow from the right hand current source into the base of the output transistor turning it on and pulling the output low. <A> The designer of that Legendary 555 timer wrote a free ebook about designing circuits. <S> You can download it for free at Designing Analog Chips <S> On page 127 (or 9-1) of that book comparators are explained! <S> Here is a simple example of a comparator straight from that Ebook: <S> I know Q3 looks funny <S> but it is actually a current mirror with the input connected to the collector of Q1. <S> The "bit that does the magic" is really the differential pair Q1 and Q2, Q4 is there to increase the gain of the comparator. <S> The Ebook will show you loads of basic circuits used in chips. <S> If you're interested in that it is a good read.
| Comparators are fundamentally similar to op-amps, there is a differential input stage followed by one or more single ended amplification stages.
|
Can I use a power strip with max 250v to a 120v power outlet without a converter? I'm going to move to Canada from EU. From my research, most people said that if someone from US moves to EU, they'll need a power converter otherwise it might fry the thing. My question is, if I use a power strip from EU (max 250v) to the 120v power outlet, would I need a power converter? And if I plugged things on the strip with 100-240v and some other plugs (probably the same or 200v), would it work or do I need a new power strip? Thank you! <Q> You can use your EU power strip in the US with a plug converter. <S> In general, applying a higher voltage than an electronic component's rating is bad; applying a lower voltage shouldn't hurt. <S> The limitation is on current handling. <S> Say you have a 2400W load. <S> At 240V, you'd draw 10A from the power strip. <S> At 120V, you'd try to draw 20A, which may cause a circuit breaker to open-circuit, hopefully before it damages the power strip. <A> A power strip is just dumb conductors, with insulation round them, with connectors. <S> You use it simply to connect things conveniently, several to a socket, or further away than their power cord would permit. <S> If the connectors are suitable, then a 240V power strip is usable in 120v and 240v land, but due to the limitations of the insulation, a 120v power strip should only be used on 120v. <S> Follow the maximum current guidelines, not the power, if you use a power strip at a different voltage. <S> It's the current that heats the conductors and heats the connectors. <S> Many modern electronic appliances have a 'universal' input voltage range, typically 90v to 265v, these can be used at 120v or 240v without modification and without a voltage converter. <S> Given the size and cost of voltage converters, it's almost always best to leave appliances in their 'right voltage' country, and buy a new one for your new location. <A> There are generally two limitations: <S> The quality of the conductors determines the maximum current, e.g. 10A. <S> The quality of the insulation determines the maximum voltage, e.g. 300V. <S> Your 250V powerstrip will work for 120V outlets, but since its current limit is unchanged the maximum power is reduced by 120/250 (about 50%). <S> 120-240V power adapters will adjust to the voltage provided (they can sense that) but cannot account for the current limits. <S> This might be a problem, because these adapters will draw double the current at 120V - they still need to deliver the same power. <S> Now a few laptops won't fry a generic 250V powerstrip, as they typically can handle <S> 16A. <S> And even 16A at 120V is still 2000W, more than enough for laptops. <S> But don't use it for heavy equipment, such as a clothes dryer. <S> Those can draw 3000W, which would be fine at 250V/12A but not at 120V/25A.
| If the appliance you want to use is rated at a different voltage to what's coming out of the wall, then you will need a voltage converter, regardless of whether you're using a power strip anywhere to help connect things.
|
Does this appliance break UK safety laws? Good evening. I recently purchased this active suction SMD pick-up tool from AliExpress: When it arrived, it seemed to work fine. However, when I opened it up (to investigate the feasibility of adding a switch), I was less than impressed with the build quality and safety of the unit. (I was also staggered at the amount of empty space inside, but that's beside the point.) The inside looked like this: Closer examination showed obvious green corrosion on the ends of the wires; poor soldering; and damage due to a lack of strain relief: I also noted that the capacitor was rated for 100V, which is far less than the operating voltage of the unit. Tests determined that the AC voltage drop across the capacitor was far less, however this probably did not take peak voltage into account. At the very least, I would need to fix the solder joints and heatshrink the exposed contacts for safety. Either that, or demand a refund from the seller - and if I'm going to complain, I need to know what exactly I'm complaining about. I need to know if this device can legally be sold. Therefore, my questions are: Does this device break any specific UK laws or regulations, that I could complain to the seller about? Do I need to replace the capacitor with a higher voltage one? If so, what voltage? I'm running on a standard ~240V supply, but I gather capacitive droppers should ideally be rated higher than that. Presumably I need to add a fuse of some sort? (Again, does the lack of a fuse violate UK law?) <Q> Superficially that looks like a 'standard' triac dimmer circuit, and the capacitor isn't going to see more than a few 10's of V at worst. <S> The live wiring, although exposed inside the case, is not exposed outside the case - so isn't any more unsafe than it would be if the circuit was built on a PCB. <S> The oxide on the grey-insulated wire is probably from an aggressive flux in the solder. <S> Not ideal, not particularly dangerous. <S> The quality of soldering looks something like I did when I was 10 years old, but I guess you get what you pay for ... <A> 1) what makes you think it is intended for sale in the UK? <S> You bought it on AliExpress <S> so 99.9% chance <S> Since you imported the device from China <S> it is basically your responsibility to decide if it is safe (enough) for your purposes. <S> If a seller still sells it (s)he would be violating UK safety laws. <S> 2) <S> This is not a capacitive dropper but probably a TRIAC based dimmer circuit. <S> If you want to play it safe use a capacitor rated for 400 V. <S> It is not that critical since there's always the resistor in series with that capacitor. <S> 3) <S> I don't know about UK law but since there could be a fuse in the mains plug already that could be enough "for legal purposes" (bit since these are often several amps, it might not do much to protect this circuit). <A> No it does not pass UK/Euro safety laws. <S> Basically a single fault (e.g. ingress of liquid) could cause dangerous voltages to become exposed. <S> Even though there is no metal case to be earthed, the of appliance ought to be double insulated to meet safety standards . <S> It only just qualifies as being single insulated, as far as I can see. <S> is there mains voltage on that pot? <S> Is it even rated for that? <S> Is the shaft metal or plastic? <S> Also, is there any fuse at all? <S> It looks remarkably easy for the live conductors to short together. <S> What protection is there for the supply circuits? <S> Appallingly shoddy, even by Chinese standards. <S> Fix it or ditch it. <A> If the unit does not bear the CE marking (minimum standard) (not to be confused with the china export mark) then it should not be used here in the UK. <S> As low voltage directive applies to electrical equipment. <S> I would advise a fuse to protect cable flex. <S> I can't recommend fuse size as we have no wattage or current draw provided here.
| Since the DIAC (small blue device) will probably take care that the capacitor never sees more than 50 V it might be "safe" to leave the capacitor in there. You will not find this device for sale in UK shops because indeed it does not meet basic safety regulations. it comes directly from China where they don't have proper safety regulations and/or ignore those regulations. A fuse is never a bad idea.
|
how do electrical arcs occur? I was under the impression that arcs form due to high voltage, that the breakdown of air was typically 3 million volts per meter. However, arc furnaces typically use low voltages, around 30 to 40 volts, and high amperages, usually a couple hundred amps. Do arcs form from high amperages too, or do they form from high power or what? <Q> You can read about arc furnaces here . <S> The first thing you might notice is that your description only applies to small furnaces. <S> A mid-sized modern steelmaking furnace would have a transformer rated about 60,000,000 volt-amperes (60 MVA), with a secondary voltage between 400 and 900 volts and a secondary current in excess of 44,000 amperes. <S> However, even 400 to 900 volts is not enough to produce an arc over any reasonable distance, so your question remains valid. <S> And the article supplies the answer: <S> The electrodes are lowered onto the scrap, an arc is struck In other words, the electrodes make direct contact with the metal to be melted, so voltage is pretty much irrelevant as long as it produces adequate current. <S> In fact, Lower voltages are selected for this first part of the operation to protect the roof and walls from excessive heat and damage from the arcs. <S> Once the electrodes have reached the heavy melt at the base of the furnace and the arcs are shielded by the scrap, the voltage can be increased and the electrodes raised slightly, lengthening the arcs and increasing power to the melt. <A> Arcs require high voltage to start . <S> The breakdown voltage of air varies considerably with humidity and other factors, but figure roughly 1 kV per mm. <S> However, that's only to start the arc. <S> The gasses in the air become a plasma, which conducts electricity much much better than regular air. <S> As a result, it takes much less voltage to sustain the arc. <S> This is why the voltage across the arc can be low, like a few tens of volts or even less, as long as sufficient current continues to flow to keep maintain the plasma. <A> What you want is Paschen's Law <S> Paschen's law is an equation that gives the breakdown voltage, that is, the voltage necessary to start a discharge or electric arc, between two electrodes in a gas as a function of pressure and gap length.[2][3] <S> It is named after Friedrich Paschen who discovered it empirically in 1889.[4] <S> Paschen studied the breakdown voltage of various gases between parallel metal plates as the gas pressure and gap distance were varied: With a constant gap length, the voltage necessary to arc across the gap decreased as the pressure was reduced and then increased gradually, exceeding its original value. <S> With a constant pressure, the voltage needed to cause an arc reduced as the gap size was reduced but only to a point. <S> As the gap was reduced further, the voltage required to cause an arc began to rise and again exceeded its original value. <S> For a given gas, the voltage is a function only of the product of the pressure and gap length.[2][3] <S> The curve he found of voltage versus <S> the pressure-gap length product (right) is called Paschen's curve. <S> He found an equation that fit these curves, which is now called Paschen's law.[3] <S> Basically, once air ionizes is becomes quite a good conductor. <S> Passing a high current through it keeps it ionized.
| Basically, enough power needs to be put into the arc to balance the losses due to convection and radiation.
|
How to apply a rule to only one component in altium? I would leave the insulation of copper with 0.35 mm across the board except in a microcontroller. It requires that the insulation allowed is 0.2 mm because of the distances between the pad. How to make a rule unique to this component? <Q> As this problem regards with the footprint itself, instead of being a problem of a whole net or component, you can proceed making a rule just for the footprint. <S> I've done this with success: <S> Design <S> > <S> Rules <S> > <S> Clearance > New Rule Change the new rule priority to the highest, or if you have plenty rules, arrange it correctly to make it work. <S> Enter the new rule properties with double click <S> In "Where The First Object Matches", select "Custom Query" Write "HasFootprint('NameOfYourFootprint') <S> Set the desired values in the Constraints tab, then accept. <S> Now we are going to re run the design rule checker. <S> Tools > Reset Error Markers <S> Tools > <S> Design Rule Checker > <S> Run Design Rule <S> Check Hope <S> this works for you too. <A> Draw a room, then use the "WithinRoom" query. <A> If you are willing to be a little less automated, you can run DRC for the board, confirm that the only errors are those associated with the footprint, then relax the rule. <S> If editing happens subsequently, traces will be allowed to be closer anywhere on the PCB of course.
| I think you can put a directive via a box around the MCU on the schematic to assign a net class to the nets associated with the MCU using a Blanket Directive and then apply the rule to that net class, however it will relax the clearance rules for all parts of those nets anywhere on the PCB.
|
How to make an Arc welder out of 3500v bug zapper transformer? I got a transformer from old bug zapper it has 3500v output , can I use it to make an Arc welder by removing the secondary windings and put 10 gauge wire windings instead.I saw some videos on youtube to make it using microwave transformer, can I use the same concept?Thanks in advance. <Q> You mentioned replacing the secondary with 10-gauge wire - I'm guessing that you have some understanding of the thicker wire's greater current-carrying capacity, which you would need for an arc welder. <S> The problem here is that the magnetic core - the steel laminations - also have a maximum magnetic flux carrying capacity, just like the wire has a maximum current-carrying capacity. <S> The bug-zapper manufacturer would have used the lowest-cost (smallest) laminated core that met the power needs of the zapper - which are MUCH less than what you'll need for an arc welder. <S> You would find that the secondary current would max out at a too-low value. <S> One caution - if you do get hold of a microwave transformer, DO NOT power it up on the bench top. <S> Microwave transformers are one of the few devices that supply both high voltage and relatively high current - and are pretty much guaranteed to kill you if you get across the HV side. <S> Not sure about bug zappers, but I'd be very cautious with that as well. <A> No real way of knowing without having specific specifications for the transformer. <S> Be aware that an ARC welder works with high current and low voltage. <S> On the other hand the 10awg wire you propose is generally considered to be good for 30A carrying capacity and that may limit performance. <S> Most welding rigs go up to several hundred amps. <A> However, it might have enough voltage to make a very small Jacob's ladder display. <S> In air at STP, a spark between rounded wires can jump ~1 mm/1,000 volts, so the separation between wires at the bottom should be ~3mm. <S> Because the ballast inductor limits current, it should be safe to operate the ladder for a minute at a time, allowing the transformer to cool between uses. <S> Safety notes: <S> Put the arc in a ventilated enclosure. <S> Make sure the transformer and base of the enclosure is grounded.
| The transformer you show, going by the size of the connecting wires and of the transformer itself, could not handle enough power (V x A, approximately), to weld anything thicker than metal foil.
|
Will lower voltage power source supplement/charge higher voltage power source? I would like to add a 4.5V 1.5W solar panel to supplement an existing electrical setup in my vehicle. My current setup is an Arduino and other electronics wired up to an "add a fuse" in the car fuse box. Aim is for the solar panel to provide power to the electronics and maybe top up car battery in sunlight and car battery to provide power in the dark. I have read other questions on the StackExchange about placing differing voltage sources in parallel and understand that there would be a reverse current into the solar panel from the 12V car battery. But I could not find a good explanation of what would happen when using a diode in front of the lower voltage source. If I place a diode such as 1N5400 rated 50V 3A in series in front of the lower voltage source, will the diode cause the current to only flow away from the lower voltage source and the lower voltage source would either: supplement power to the load? charge the higher voltage source (car battery) if there was any extra power? diode absorbs the reverse current forever since the car battery has a higher voltage? In this case would a zener diode make any difference? In the diagram below V1 would be car battery and V2 would be the solar panel. simulate this circuit – Schematic created using CircuitLab If this is realistic design, are there any protection circuits I need to prevent overcharging with such a low voltage solar panel? Thanks for the help. <Q> Your circuit won't work ! <S> Current only flows to where having lower potential than the source. <S> So, in your case, the battery will power the solar, rather than vice versa. <S> The diode in your circuit won't conduct since it is reverse-biased. <A> Think of voltage as water level in a tank. <S> If you connect a tank siting on the ground that has 4.5 meters of water to one next to it, on the ground, with 12 meters, is the water going to flow from the lower to the higher, without help? <S> In the same way, the 4.5 V solar panel cannot "push" electricity uphill against the 12 V battery. <S> It is possible to make a power converter to "pump" the 4.5 V up to 12 V, but that is well beyond the scope of your question. <S> Three 4.5 V panels could be put in series to charge the car battery, but continual unregulated charging will dry out the battery, destroying it. <A> That doesn't work. <S> The 12V from the car battery will "pull up" the 4.5V from the solar panel. <S> The Diode D1 will block the current from flowing into the 4.5V source (beside some leakage current), so nothing will hapen. <S> If you'd like to use two voltage sources you might want to add a switch to select either one of these two. <S> simulate this circuit – <S> Schematic created using CircuitLab
| If you are willing to charge battery with such low power low voltage solar panel, consider to use boost converter and car battery charger instead.
|
Can I use a mosfet as a switch to power arduino? I have a project in which I intend to use a NE555 timer to turn the arduino on/off on specific intervals.I don't want to use the ne555 output directly because of the current limitations of the chip. I was wondering if I can connect the timer output to a P-channel Mosfet gate and get my output from its drain? Here is the schematics.The resistor is supposed to be arduino board. Since there is no way to really simulate this I wanted to be sure before I assemble the circuit so I appreciate if you could point out any possible problems. <Q> Yes, that will work, but you don't need the 50Ω resistor as it will only waste power. <S> The second thing is you may not need to use this circuit at all! <S> Why? <S> because you can get an arudino to use very little current in a sleep mode , like 10uA of current. <S> The supply current is at least 3mA for an NE555 and <S> the 555 timer needs to be operating all of the time. <S> The aruidno only needs 10uA to sleep so a 555 timer wastes 300x more current. <S> And you can simulate circuits like this: <S> (you can click on edit below the image and then click simulate) <S> I have simulated the load as 10Ω, which would be a peak load of 500mA for an arudino. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> The mosfet has a threshold voltage minimum of -4V. Rule of thumb-wise, this means that -5V (relative to your +5V rail, so 0V) on the gate will not be nearly enough to turn it on fully, so you'll have to do one of the following: <S> Have your 555 output swing from +5V to about -3V <S> to -5V. <S> You don't want to do this. <S> Too complicated. <S> Pick a new MOSFET that has a threshold voltage closer to, say, 1.5V. <S> May I suggest something like the <S> MCH3333A <S> from On Semi? <S> For an arduino you don't need more than maybe 500mA continuous current, and even that has plenty of margin. <S> Also, I would suggest something similar to the following drive circuit (mainly the part about using pin 7): simulate this circuit – <S> Schematic created using CircuitLab Pin 7 is the open-collector output and will allow you to fully turn off the MOSFET. <S> Unless you do something like run your 555 at like 9V, the Pin 3 output may not quite reach 5V and could possibly not fully shut off the MOSFET. <S> This design will bring your Vgs to at least -4.3V when turned on and "relax" your Vgs to 0V when turned off. <A> Yes, you can use MOSFET for this and you already got some answers how to do it properly. <S> What I'd like to suggest though, is use "Power-down" sleep mode (0.1 uA!) of your Arduino and wake it up using interrupt from external timer chip, like these: TPL5111 (0.04 uA!), TPL5110-Q1 , TPL5010-Q1 etc. <S> You will save much more power doing it this way. <S> Here is an example how to use this method with RV8523 RTC chip .
| In general yes, but the circuit as you have shown will probably run into trouble with that particular mosfet unless you do some weird business with your 555.
|
Analog Audio Signal over dedicated Ethernet/Twisted Pair Cable I need to send an audio signal over 3 meters and back again on the same line (the plan is to put an on/off switch and a volume regulator at the end of the line). Additionally I would like to send 12 volts power in the same cable, with small amperage. Is it possible to use an Cat5 Ethernet cable for that purpose? I have those in abundance, and want to avoid buying a dedicated cable for that purpose. I would use following signals: Audio Right In Audio Left In Audio Ground In Audio Right Out Audio Left Out Audio Ground Out 12 V + 12 V - <Q> I think a good question to ask here is: <S> what kind of audio signal? <S> If you can spare e.g. an Opamp per channel and end, plus the power for that, and a terminating relatively low resistor (e.g. 120 Ω, 47Ω, or even less), then you'd waste power, but you'd get a very stable transmission. <S> Audio <S> Right <S> In Audio <S> Left <S> In Audio Ground <S> In Audio <S> Right <S> Out <S> Audio Left Out Audio Ground <S> Out <S> Don't do that – your twisted pair cable is meant for differential pairs . <S> So, instead of transmitting ground (which is just a recipe for all kinds of avoidable hum and DC currents), convert your single-ended audio on the transmitting side into a differential one, and transfer that on a twisted pair (blue / blue-white, and so on): <S> Blue: <S> left -> <S> + <S> BlueWhite: left -> - Brown: <S> right <S> -> + <S> BrownWhite: <S> right -> - Green: left <- + GreenWhite: left <- - Orange: <S> right <- + OrangeWhite: <S> right <- - Converting from single-ended to differential can be done using inverting op-amp circuitry, or opamps with differential output, or dedicated differential line driver ICs, or signal transformers. <S> 12 V + 12 V - Nah. <S> Ethernet cable's not a good conductor of current, so you'd avoid this. <S> Also, if you use a signal transformer on the end, you can just use the center tap to impose DC over your differential audio signal, and can avoid having dedicated power pairs. <S> That's how Power-over-Ethernet works! <A> Cat5 cable intended for ethernet has four twisted pairs. <S> There will be significant capacitive coupling between pairs, but each pair is twisted at a different pitch so that the coupling is largely common mode over reasonable lengths. <S> To minimize crosstalk, keep the signals low impedance and definitely make them differential on each pair. <S> The main problem is that you're one pair short. <S> If this is a one-off then, just run another two wires for power and ground. <S> If you really have to cram all this analog information plus power onto a 4-pair cable, then transmit power as a DC common mode offset between two of the pairs. <S> A totally different approach is to send the audio data digitally. <S> That eliminates crosstalk and other noise pickup, and doesn't require separate physical wires for separate channels. <S> At only 3 meters, you should be able to use a bit rate of a few MHz with relatively simple drivers and receivers at each end. <S> Let's do the math. <S> Let's say the audio is "HiFi" quality. <S> That requires 16 bits/sample at over 40 kHz sample rate. <S> Let's use 50 kHz. <S> That comes out to 100 kBytes/s per channel. <S> For two channels, that's 200 kBytes/s, which is 1.6 Mbit/s raw data rate. <S> Add some overhead for protocol at low and high levels, and you need 3 to 5 Mbit/s. <S> That really should be doable over 3 meters rather easily. <S> Of course if you only need to transfer "voice" quality, then the data rate requirements are significantly relaxed. <S> 8 bit samples at 8 kHz, especially with a little companding, can do quite a nice job of transferring voice. <A> That means, use balanced audio to eliminate interference. <S> And THAT means, you need 4 pairs (L/R out, L/R return) leaving no room for DC power. <S> Fortunately (if your power needs are relatively low) you can use a trick called "phantom circuits" to communicate power : dedicate at least one (possibly 2) pairs to 0V, and another to 12V, carrying power as common mode voltages on each pair. <S> Ethernet has started adopting this (as POE) <S> but it's much older than that. <S> Marcus's answer just popped up as I was editing my comment into an answer : follow the original colour codes to keep the pairs together, as he suggests. <A> Audio level matters. <S> How much signal is already there affects how noticeable noise will be. <S> If this is a "speaker" level signal of more than a few watts, it'll probably be too powerful for the cable <S> and you might suffer attenuation and heating in the cable. <S> If this is a "line" level or headphone extension, it'll work fine unless it's in an electrically noisy environment. <S> If this is a microphone level, or going into another amplifier, then you'll amplify the noise and it will probably be noticeable. <S> Especially from high-power radio sources like cellphones.
| To send audio across Cat-5, follow the practice of the original purpose of those sockets - NOT Ethernet but audio (telephone systems).
|
Would I need a zero-crossing SSR for a reflow oven controller? I'd like to follow this guide to create a reflow oven controller: https://apollo.open-resource.org/mission:resources:picoreflow But I am confused on the zero-crossing SSR. Does it need to be zero-crossing to control the heating element? I already have a very old SSR for which there isn't even a data sheet, so I am unable to tell whether it has zero-crossing. <Q> The oven itself won't care where in the power cycle the heater is switched on and off. <S> The time constant of the heater should be many times the period of a power line cycle, so timing details at the level of power line cycles don't matter. <S> However, the rest of the world might care. <S> Switching at the zero crossings reduces the voltage and current transients. <S> That in turn reduces conducted and emitted interference. <S> If I were doing this, I'd try to switch at the zero crossings. <A> The design/guide is for using the oven AND a fan controlled from seperate zero-crossing SSRs. <S> The oven is just a resistive heating element and could be controlled from a non-zero-crossing switch <S> but it's more likely that the fan would be better served with a zero-crossing current detecting SSR as they show: - <A> The element won't care, and if the control cycle is slow (on-off time), it doesn't matter. <S> Your electric stove has mechanical simmerstats which are not zero crossing. <S> Zero crossing is the right thing to do, if you were buying a new SSR. <S> I made one from a fan type toaster oven, and originally intended to make it programmable, IOT, green-tech, burn unicorns, etc. <S> I simply discovered that it heated up 2x as fast as the reflow profile, so I wired the two elements (top and bottom) in series, reducing the power, and giving a perfectly acceptable temperature ramp. <S> No controller needed. <S> Popping the door 1" open gave the correct ramp down. <S> You need a LOUD end temperature alarm, or much better, use a self energising relay and a thermocouple sensor set so that the heater power is turned off when peak temp is reached. <S> You can also just use a stove simmerstat to set the heater power, and therefore the ramp. <S> (but just control the heater elements not fan too)
| If this is a commercial product, you may need to switch at the zero crossings to pass EMI (electromagnetic interference) requirements.
|
Capacitance Measurement With Oscilloscope simulate this circuit – Schematic created using CircuitLab I'm trying to determine the capacitance of a sensor, but the oscilloscope's internal capacitance is loading the measurement too much. What is an appropriate method to determine a low picofarad capacitance using an o'scope in this situation? (o'scope internal capacitance is 24pF). <Q> Make a measurement of 'nothing', that is your scope's input capacitance. <S> Then make a measurement of the 'sensor', that is your scope's input capacitance + the sensor's capacitance. <S> Subtract. <A> Hmmm... this is tricky business. <S> Here's what comes to my mind: <S> based on your description, you seem to be trying to measure with a cable connected directly to the scope. <S> A 10x passive probe will cancel out the effects of the scope capacitance by adding a series capacitance (take a look at http://www.ni.com/product-documentation/14825/en/ if you want to learn more about it), but you'll still be left with some capacitance, typically in the order of 15pF. <S> If you use an active probe it can get down to just ~1pF; consider using some sort of buffer amplifier (with low parasitic input capacitance, of course) between the capacitor and the scope probe; if you have more than one identical scope probe, check whether there is any significant difference in the waveform when only one probe is connected versus when two probes are connected. <S> If there is no significant difference, ignore the probe's input capacitance; calculate the total equivalent capacitance when the probe is connected based on the waveform characteristics then subtract the known probe capacitance (this may be tricky if you don't have confidence in the value of the probe capacitance, you could measure with 1 probe and 2 probes to have 2 data points); also keep in mind that the time constant for R=1kΩ and C=24pF (assuming the unknown capacitance is not much higher than that) is only 24ns, which means that your signal generator needs to provide rise and fall times shorter than that for you to have any hope to measure anything. <S> Good luck! <S> :^) <A> Hopefully you know, how a 10:1 passive probe can show the waveform right regardless the input capacitance of the oscilloscope and the probe wire. <S> Make your own same doing compensation circuit. <S> Connect the signal source to the input of the scope through a resistor and your sensor connected in parallel. <S> Find a resistor which placed in parallel with your sensor shows square wave perfectly. <S> Let that resistor be = <S> Rx. <S> The unknown capacitance of the sensor is Cx. <S> Solve the following balance-equation: <S> Rx <S> * Cx = <S> R4 <S> * C2 where R4 and C2 are the input resistance and capacitance of the scope. <S> Be sure there's no long wires making unknown extra capacitance in parallel with Cx or C2. <S> You can add an extra resistor in parallel with the scope input to make a smaller Rx be enough. <S> Otherwise you must have Rx=several megaohms.
| If you use an actual scope probe, it will reduce the capacitance load on the circuit.
|
How to supply electrical current to a motor-powered rotating shaft? I want to supply electrical current to a motor-powered rotating shaft. The current supplied is of the order of 400-600 amperes (AC or DC). In what ways can it be done? Shaft speed is around 1400 RPM. The voltage applied is 220 volt for AC. For DC, the voltage will be lower. I am on the conceptual stage, so I may be missing on few details. I have a hybrid power source that can supply DC as well as AC as output. So I require this setup so as to work on both as the need arises. <Q> The obvious approach is to either use a slip ring or a roll ring . <S> 1000A at 1400 <S> RPM is possible for either approach <S> (do your own thorough search for commercial suppliers, the links are merely intended to be informative). <S> The slip ring uses brushes, the roll ring uses spring rollers. <S> There are other methods possible, but not so applicable for DC. <S> There will be significant electrical noise generated by the moving contacts so if you have sensitive instrumentation nearby it can be affected. <S> The roll ring will likely be quieter electrically. <S> Roll rings are used in the ISS to transmit solar power across a rotating joint. <A> Essentially this is just a brush. <S> You can get slip ring assemblies with many channels, though I suppose if you want the current on the shaft itself, you would need one one-channel slip ring at each end. <A> You can also generate the current on the shaft itself by putting a set of generator rotor coils there. <S> This is done in alternators to get the field current for the rotor, while also allowing a small regulator current. <S> To get DC, the rectifier is on the shaft rotating. <S> Not usually high currents then.
| The way to supply current to a rotating object is with a device called a slip ring .
|
Will a 3HP motor ever use less electricity (power) than a 1.5HP You have two motors, one being 1.5HP and the other being 3HP. All other ratings are the same (e.g. motor efficiency ratings). You attach a load to each motor. The load on each motor is identical at any given point in time. This load will range from no load to some stall load (obviously the stall load would be greater with the 3HP motor). So for example, no load on each, take reading (how much power draw), add load, take reading of power draw, add more load, take reading of power draw...all the way to stall load...take power reading. My question is, up until the smaller motor stalls, will the larger motor ever consume less power? Same goes for say a 2HP vs a 1.5HP. Can someone point me to the formula for doing this type of calculation? <Q> For most motors sold for general purpose use or purchased by manufacturers for use products, the motor manufacturer will provide reasonably complete performance data. <S> That would generally include input power or efficiency at 1/4, 1/2. 3/4 and full rated load torque. <S> For many motors, manufacturers will provide performance curves that include a continuous plot of efficiency or power vs. load torque. <S> The efficiency curve shows zero efficiency at no load, rising rapidly as load increases and then leveling of somewhat above 1/2 load. <S> Peak efficiency often occurs at or slightly above rated load, but sometimes occurs closer to 1/2 load. <S> There will probably not be very much wasted power. <S> You should not use a 3 Hp motor unless you absolutely can not be confident that the load is <S> less than 2 Hp even then, you should consider replacing the motor if you later find it is larger than necessary. <S> Here is an example of a motor data table that provides the information needed for this type of comparison <S> : Note that the table and the above discussion assumes a 3-phase induction motor, the type of motor usually used for fixed-speed motors <S> 1-1/2 Hp and larger. <A> The answer is <S> no if the following conditions are what you are asking about: <S> All motor ratings are equal except hp - meaning you are using both motors at those ratings. <S> Both loads are identical Motor is assumed to be running continuously at a steady state. <S> Identical system inputs (you did not specify this) <S> It’s important to note that when you say, will it ever use less power, you would typically mean real power because that is how we determine efficiency. <S> This ratio helps us compare different sized motors since it will always be less than one. <S> Also real power does the mechanical work. <S> Efficiency = <S> PowerOut <S> /PowerIn <S> Since you have already stated that the motors have the same efficiency, and same load, this number will be the same for both under the assumptions listed above. <S> It’s possible that you could be asking about using less reactive power. <S> Reactive power does not do work. <S> A hp rating is essentially, what is the maximum power that can be consumed by a load connected to that motor. <S> That way you can determine the maximum amount of work that your motor can do. <S> Now if you have both your motors on different supply frequencies that is one way to change power consumption depending on the load. <S> However you have not mentioned supply conditions <S> so I do not know the situation you are inquiring about. <A> In order for the load to be the same on both motors, the load cannot be more than 1-12HP. <S> "Same" efficiency would imply a percentage of total power, not a hard value. <S> So a 3HP motor that is 90% efficient at a 3HP load will have 10% losses of it's max rating, but may be 80% efficiency at 50% load, i.e. 1-1/2HP, so the losses are 20% of the 3HP capacity. <S> Whereas the 1-1/2HP motor will be at 90% eff at 1-1/2HP load. <S> So I highly doubt you will EVER see a 3HP motor using less energy on the same load as a 1-1/2HP motor.
| Since higher power motors are generally have a higher peak efficiency than lower power motors, there is a possibility that a higher power motor will use a little less power than a lower power motor at some load, but that would rarely be the case and the difference would be quite small. If you have a 1.5 Hp load, you really should use a 2 Hp motor if there is any chance at all that the load might actually be more than 1.5 Hp or might increase as the machine ages or the process changes. Once again though, since all the ratings (except hp) are the same and the load is the same, you will have the same consumption.
|
ESD protection on analog signals I have a board which has its microcontroller pins directly breaking out to a breakout header. I am fairly certain the board won't be in ESD safe environment when being tested. I decided to get fairly standard ESD diodes and placed it across all Digital pins. They have capacitance in the pF's so shouldn't cause any distortion there. My question is if it is okay to place ESD diodes on analog inputs to the micro. Is there any way i reduce acuracy of these inputs? I have been told in the past to avoid using ESD diodes on very high speed signals (in my case it was MIPI-DSI), as the very low capacitance can become significant. I am just wondering if there are other cases (analog inputs being one) where this concern should be taken? Thanks! <Q> First I'd like to stress that all microcontroller chips already have on-chip ESD protection, without that they would become almost impossible to handle. <S> But it is indeed a good idea to add extra protection to pins which can be touched from the outside and/or interface with other boards <S> etc. <S> You can just treat the Analog pins the same way as the Digital pins and add the same protection. <S> Under normal operation the extra ESD devices will not conduct and therefore cannot harm the signal. <S> You will not reduce accuracy at all. <S> Again let me point out that the pins will already have ESD protection inside the chip. <S> Typically that is a circuit like this: The 2 diodes on the left are additional external diodes, not how they are in parallel with 2 of the on-chip diodes. <S> Only for very high frequency signals <S> either analog or digital (like MIPI) <S> ESD protection can influence the operation. <S> But very often cables and PCB traces add more capacitance that the small ESD protection devices. <A> If the signals fed to your analog inputs are really small, you should be aware that ESD diode will have its leakage current (nano amps or micro amps) and that will create shot noise, especially when there is a high DC bias on the input. <A> But TVS Diodes are maybe what you need.
| Actually, there are low-capacitance ESD diodes for high speed signals.
|
Saving data without a microcontroller? Is there a way to save voltage data directly (without a microcontroller) to anywhere, like EEPROM, SDCARD, etc.? For example, I am using an MPX pressure sensor which gives 0V to 5V analog output. Instead of converting voltages to pressure in a microcontroller and saving (which takes time, money, space, etc...), first, I want to save analog data, then taking these data to my computer for the conversion of voltages to pressure. <Q> You can't use a EEPROM or any other storage means that is digital without first converting your signal to digital. <S> Using a microcontroller is the obvious and simple way to do that. <S> However, if you really want to satisfy your inner cave man, acquire one of these: <S> This stores analog data from a few 10s of Hz to a few kHz. <S> You'll have to consult some clay tablets to learn how to use it. <S> One problem you will have is that the frequency of interest is probably lower than what it can record. <S> The solution is to have your signal drive a voltage-variable oscillator, then record the output of that oscillator. <S> In other words, FM-modulate your low-frequency signal. <S> There are ICs that implement the voltage-controlled oscillator function, but that would way too sensible and clash with your retro goal. <S> Get a few of these: and make your own. <S> After the data has been stored, you "rewind" (see clay tablets) the storage medium. <S> Then "play" it into a PC sound card. <S> The PC finds the frequency of the signal, from that converts back to the voltage, and from that determines the actual data value. <S> Or, you could just use a microcontroller and consume less time, money, power and space. <A> You could do an analog-to-digital conversion (using an appropriate chip) to convert your analog to digital. <S> For the next step, writing to an SD-card practically requires a processor. <S> If you really don't want to use an MCU you would end up designing and building one yourself from simpler building blocks. <S> That is an interesting educational project, about 0.5 man-year for a student who is good in both programming and electronics. <S> An EEPROM will be a bit easier to write the values, but reading the values to your PC would be more complicated. <S> In the balance it would still be much easier than the DIY MCU, but still quite a project. <S> When you look around you everyone uses MCU's for almost all projects, including data logging like you want. <S> Guess why! <A> What you are trying to do sounds like logging. <S> There are lots of data loggers out there sold commercially. <S> If you want to log voltage readings you can try googling "voltage logger". <S> Such devices write a log file to a storage device (sd card, thumb drive etc.) from sensor readings. <S> Technically this uses an MCU internally. <S> But you never see the MCU, you never have to develop software for the MCU <S> and you never touch the MCU. <A> The answer depends on your definition of "directly". <S> I could imagine the following setup (far from "direct", but without an MCU): Target memory: parallel EEPROM ADC with an (eg.) <S> 8-bit parallel output <S> A set of registers to make a counter Timing chip (eg. <S> NE555) <S> Another EEPROM that would be programmed with a state machine + some gates that would basically advance the counter and issue write commands of the parallel ADC data to the EEPROM. <S> Alternatively the whole setup above could be implemented in an CPLD or FPGA, not an MCU. <S> You could also use a Motorola MC14500B controller, which is not an MCU. <S> In practice, today, the cheapest, smallest, fastest and most reliable option is an MCU. <A> Since you consider using a computer to "convert voltages into pressure", you need to use the data format that is understandable by computers - which is a digital format. <S> Therefore something must convert the analog output of your sensors into digital form first, "digitize" the voltage. <S> Thus there must be an Analog-to-Digital Converter in between. <S> Converting the digitized voltage into pressure readings (using maybe some tables or conversion formulas if the conversion is nonlinear) is a good task for your PC. <S> Technically you don't need a MCU to perform this conversion, a dedicated FPGA with hardwired algorithms can control all data sampling and communications. <S> But MCU is more convenient, especially if it already has an ADC built in. <S> And you don't need to spend your time on building MCU+converter <S> Some DMMs have this data acquisition capability, or you can get a dedicated DAS from places like DATAQ.com. <S> The DAS would come with all necessary data logging software, and you can store the data anyway <S> you wish, SD, or else. <S> Understandably the conversion from your sensor to usable pressure data will cost you some money, nothing comes for free. <A> Yes, you can... sort of. <S> Look for ISD chips , designed for dead simple and cheap applications, where you need to record and replay analog signals. <S> Used in talking toys, musical postcards, and the like. <S> I doubt they are accurate enough for your purpose, though. <S> http://www.nuvoton.com/hq/products/isd-voice-ics/isd-chipcorder-family/?__locale=en <A> That's the cheapest solution if you don't want to use uC. <S> Or your can fund $$$ for institutes, research centers,... <S> so they can speed up the research of analog memory, the thing you need right now.
| , there are devices called "data acquisition systems" (DAS), or "data loggers" that will do it for you, sample/convert analog data, and communicate them via convenient interface as USB (or RS232). No, you can't store an analog value as-is on a digital storage medium like an eeprom or an SD card. Since your only requirement is not using uC, you can use USB-SPI bridge to interface a SPI ADC with PC.
|
Is there a guide how to identify connectors? I have a couple of connectors which I like to identify. Most of them are on my motorcycle. This forum contains lots of questions about individual connectors and I don't want to add another one. There must be a professional way how to identify connectors. But how? In the moment I start with this page https://www.digikey.com/en/resources/connectors/index and then I go down to the details. Sometimes that works fine, but often there are still a couple of choices which look almost the same. And sometimes that company just does not have the connector I am looking for. And then? Is there are clear practical way step by step how to identify any connector? Edit: Maybe I should ask as part of this question if it is possible at all to do this. Do (motorcycle) manufacturer use existing connectors? Or do they (often) have their unique connectors which can't be bought anywhere else? <Q> There is no simple “one-stop shop” for identifying connectors. <S> The motor cycle manufacturers are liable to use different connectors to the car manufacturers as there is likely to be more exposure to the elements. <S> So, basically different industries different connectors - the choice or design of a particular connector will depend on its function, space available, ambient conditions (wet, dry, corrosive, heat/cold cycles etc), amount of use - disconnected often or never... <A> In my experience, there are lots of automotive (and motorcycle) connectors and they are usually sold outside of Digikey or Mouser. <S> I tend to start with a simple Google search (for example, "Suzuki 1981 GS550 igniter plug") and work through the listings, looking for manufacturer names, clues, etc. <S> Searching by number and gender of pins works too ("Suzuki 6 pin female connector", for example). <S> Look closely at photos to make sure you're on the right track. <S> Sometimes you'll find a connector in the same family with a different color or number of pins. <S> There are also online stores that supply hard to find (or hard to purchase in Qty <1,000) <S> connectors in kits, specifically for hobbyists. <S> One of my favorites is Corsa Technic . <S> They also usually carry crimp tools for the connectors they carry. <A> please be aware... <S> the html could easily blind you and/or make your eyes bleed <S> automotive connectors are often inferior motorcycle connectors <S> Japanese Japanese Japanese motorcycle connectors are the best IDENtifying the connector is just step one. <S> USUALLY replacing with same connector is the best thing-UNLESS that connector has proven over time TO SUCK!!!
| No...but...2 websites that are useful as far as identifying connectors http://www.cycleterminal.com/motorcycle-connectors.html and https://www.easternbeaver.com/Main/Elec__Products/Connectors/connectors.html Once you find a manufacturer, you can go to their website and search by pin count, rows, color, gender.
|
Why Micro-controller Pin is connected to ground via Capacitors? I am analyzing a circuit which uses an Micro-controller to measure analog signals rms in digital form. There is one connection of circuit that i am not sure what it does. See the Figure. Here Vref of MCU is connected to ground via two parallel capacitors. This micro-controller is chinese made so its datasheet is avaiable but not very detailed. Data sheet shows that Vref is internally connected to VDD/VCC which is 3.3V. Though i am not sure because i think it should be zero, because it compares input analog signal to detect its +ve and -ve cycle. (According to datasheet: Vref is an external voltage input pin)Capacitor in question are in red rectangle...I need to know these facts: what would be the functions of capacitors if Vref is internally at VDD/VCC?? What would be the functions of capacitors if Vref is an Input Pin and it is grounded via these capacitors?? <Q> Vref usually means the reference voltage output of the built-in ADC (or DAC, or analog comparator). <S> A reference voltage circuit is basically a very low current voltage regulator (a poor power supply, but very stable). <S> Capacitance on the output of regulators helps to improve stability and reduce noise. <S> You can think of those capacitors like regular decoupling capacitors on the output of an LDO. <A> Many MCU and other digital ICs do have embedded voltage regulators, usually linear LDO type, for various functions. <S> The regulators may feed internal core at lower voltage (saving power or to meet internal CMOS node specifications), can provide standard 3.3V power from 5-V input for, say, USB PHY, or, as in this particular case, the regulator provides some reference voltage for ADC or whatever. <S> The embedded LDOs save product designers cost, eliminating many external components. <S> However, most LDO regulators need a sizable load capacitor to be stable, usually with certain ESR, usually carefully specified in datasheets. <S> These big capacitors can't be implemented using silicon technology, they are too big for that, so they must be connected as external components. <S> Typically these voltage outputs have not much extra capacity, and are not intended to be loaded with something else, with some exceptions. <S> That's why you frequently see some MCU pins with only capacitors attached, and nothing else. <A> These might be filter capacitors. <S> Usually their being used to improve digital signal. <S> For example, you could see how capacitor works on image below: <S> Without capacitor we would have a wave rather than "line". <S> So it could help to stabilize voltages.
| Components like ADCs are "using" voltage from this regulator (drawing current).
|
Can I use an L7805CV with an AC input? I am trying to switch a small water pump (for a pet fountain) according to the output of a PIR sensor. A couple of years ago I setup a circuit on a breadboard and tested it with the pump - it worked! Unfortunately, I don't have schematics or photos of the circuit anymore. The circuit is powered by the power adaptor of the water pump (12VAC output). Using the L7805CV it should regulate to 5VDC (for the PIR sensor). The PIR sensor activates a transistor which uses the same 5VDC to activate a relay. The relay should then switch the original 12VAC. I am a bit confused why that worked back then. I tried a similar setup now and the L7805CV gets hot, but there is no power output. Can I source the L7805CV with AC power? (without using a diode bridge) If not, is it correct that I could use a diode bridge to convert the 12VAC to 12VDC and use that as an input for the L7805CV? Update: After reading your comments/answers, it came back to me that in the working circuit I had been using a 9V battery as an input for the L7805. Sorry My current (wrong!) circuit is attached: <Q> 12VAC <S> * 1.414 = <S> ~17VDC <S> With this 17VDC input and 5VDC output - if your current drawn is high , definitely your 7805 will get hot so you may need a small heatsink to dissipate the heat and keep the junction temp. <S> of 7805 less than absolute maximum . <S> hope this helped ! <A> A diode bridge with a 10uF cap would probably best to drive a 12V relay coil more efficiently than a 5V coil. <S> You only have 3.5W power @ 12Vac and relays from 8 to 10A contacts for motors must be derated <S> can draw 100 to 400mW of power . <S> The efficency loss using an LDO effectively multiplies the power consumption. <S> So how much power margin is in the supply or how hot it gets <S> depends on the choices you make in the circuit design. <S> My choice would be 12vAC full wave rectified without cap for contacts then a series diode to cap for low power demand of LDO to drive PIR detector and switch which draws from 12Vdc unregulated, unfiltered DC output. <S> This could draw < 0.1W from a 8A 12Vdc Panasonic relay leaving 3.4W for the pump. <S> simulate this circuit – <S> Schematic created using CircuitLab LDO and PIR not shown. <S> Depending on final selection of relay , 100uF may be needed. <A> Other than what @A.Kumar suggests, you can rectify the AC voltage and use a voltage divider to get unregulated ~8V before feeding the voltage to the IC. <S> That will solve the heating issue of the IC and you 'may' not need a heat-sink unless and until you are not drawing too much current.
| No buddy , you can not connect 12VAC directly to 7805 as it is not meant to be operated with ac voltage , better use bridge rectifier and capacitor afterwards to smoothen the DC output and then feed it to the 7805 to get +5VDC.
|
Why don't flyback diodes in H-bridge damage power supply? I'm currently learning about driving a small DC motor (~ 5V). My research so far indicated that a L298N might be a good choice to quickly get something up and running. However, I'm also trying to understand what is exactly happening (i.e. the internal H-bridge) and there is something which isn't really clear to me. The example circuit in the datasheet on page 6 uses four flyback diodes in a configuration that seems to be common for H-bridges (since other sites recommend similar H-bridge circuits). The configuration, neglecting the L298N for a moment, essentially looks like this: Now, if I understand it correctly, these diodes provide a path for the motor to keep the current flowing when the MOSFETs get switched off to prevent large voltage spikes. The path for this current however seems to go right through the power source in the reverse direction . That is, reversed relative to the direction of the current that a power source normally supplies. This is indicated in the figure below. Since I'm relatively new to the world of electronics, this seems like a weird thing to do. I get that this works on paper if the power source is a ideal constant voltage source. But is this actually safe in real life? Let's say I'm using a few alkaline batteries to power my project, then this reverse current seems like recharging. And the Wikipedia page about alkaline batteries says: Attempts to recharge may cause rupture, or the leaking of hazardous liquids which will corrode the equipment. Or what if I'm using a lab power supply or even a voltage regulator as a voltage source? How these reverse current are handled doesn't make a lot of sense to me and I'm worried that I might blow up my equipment..Could somebody enlighten me about why the circuit above is actually safe? And if it isn't safe, then why are a lot of sites recommending it and what circuit should I use instead? <Q> The diodes serve two distinct purposes. <S> Under regenerative braking, they return the generated voltage to the power supply (where with suitable electronics, it can be used to recharge the battery). <S> Note that unless the motor is being run above its normal speed, the generated voltage will be no more than the supply voltage, so it is within the voltage rating of the power supply. <S> So the power supply can normally withstand this - but if it can't absorb current (either to charge a battery, or dump it into a braking resistor) there will be little or no braking effect. <S> Then to answer the actual question - the supply CAN be damaged by high voltage spikes, so its designer must take precautions to prevent that damage - like an inductor (ferrite bead) in series, and ample decoupling capacitors across the supply, and possibly a transient suppressor or varistor to absorb HV transients <S> Note there isn't generally enough energy in these spikes to do any damage whatsoever to a primary cell, so relax if you're connecting the bridge straight to a battery. <S> But regulated supplies that aren't designed to drive motors may be a problem. <A> If the motor is producing power, the net power into the motor must be positive, so the net current out of the batteries must be in the direction that drains them, so you are fine. <S> If the motor is being regeneratively braked, then power can flow out of the motor and can push the supply voltage up and charge the batteries (this is used to advantage in electric vehicles). <S> It's not something you generally need to worry about with a small motor connected directly to primary cells, but if you have a supply that cannot sink current (eg. <S> a rectifier + filter) it could cause issues if the capacitor isn't large enough. <A> Am not very familiar with motors, but will hazard an answer here. <S> When modeling electrical circuits, say with SPICE, or similar package, the DC power supplies are usually modeled as short-circuits to ground. <S> This is usually explained somewhat briefly in textbooks on elementary electrical engineering. <S> Recall also that a DC power supply will generally employ capacitors across its output, usually for the purpose of smoothing out ripple. <S> These capacitors act as "shorts to ground" for transient currents. <A> Normally the high side drivers are used for direction on brush motors or stepper and BLDC pole switching while the low side for PWM to limit current, torque and acceleration. <S> When the low side driver turns off the voltage rises and current continues as it decays with a short to V+ <S> so current does not circulate thru the battery or supply when turned off. <S> It continues on the high side driver and the opposite motor polarity high side diode. <S> This alternates with polarity and direction in the same fashion blocking the current to the supply as it continues to circulate thru the opposite driver until several L/R time constants .
| The diodes also return inductive spikes (from the motor brushes) to the supply, and these may be hundreds of volts, for a very short duration, which can prove destructive to power supplies.
|
Measure frequencies fast and precise I need to measure frequencies between 25kHz and 150kHz with a precision of minimum 50Hz. I'm using a MCU 8051(C8051F382 Silicon) with 48MHz clock, and need the measure to be done under 100us, so I can't use CD4040/prescaler to get many counts. I need a high precision because my reference isn't stable, it drifts during day. Is PLL an alternative? I'm using 8051's PCA module so I can get x counts per period, but under 48M clock and 100k target my count is 480 but to get to 481 or 479 it needs like 99.8K or 100.2K, and I needed to get a tick every 50Hz not every 200Hz. My target will be an inductive loop and it will need to detect a motorcycle above it. UPDATE: Tried to use the frequency without CD4040, my clock can't handle all the stuff I need, 150kHz is only about 6us to do everything I need, so I'm back to CD4040 using div by4. Tried to oversample but did no good, still good at lower frequencies, still awful at higher frequencies. For now I'll try to lower all my frequencies while I can't think a better way to do this. <Q> You said "I need to measure frequencies between 25kHz and 150kHz", but you didn't say anything about the max rate of frequency change. <S> Assuming the frequency is changing slowly you could get the result "almost" instantly. <S> Arrange the timers as free-running counter. <S> On each incoming front of measured signal load current value of the free-running counter into memory. <S> Store last, say, 64 values. <S> And at the moment when you need to know the frequency - just subtract some previous N-th value of the free-running counter from the last value. <S> That would be the number of oscillator ticks between the last front and N-th front back in time of measured frequency. <A> Technically, you only need 1 pulse to get a frequency. <S> PLL is only good for relatively constant frequencies as well. <S> In a system with fast changing input PLL will only increase latency. <S> In short - you need to carefully analyze your requirements. <S> If you need "fast and precise" instantaneous frequency you can do it by measuring only one period. <S> If you are OK with average frequency over some time interval then the desired latency and rate of input changes are the defining factors in choosing sample size. <S> Sample as many times as you can in desired interval <S> and you will be OK. <S> However if input changes too fast then you might have to reduce sampling size to get any meaningful value. <A> 50Hz/150kHz =3333 ppm resolution <S> You need at least 3333 counts in 100us for 50Hz resolution or a PLL converts from 25KHz to 33.33MHz to 150MHz or a divide by ratio of 1332 with a slew rate of <10ms. <S> 502MLFT. <S> :MFG IDTIC CLK MULTIPLIER PLL 8-SOIC <S> One could round up to a convenient RPM solution . <S> The use PLL clock to count in 100us and get a minimum of 25k*1332 <S> *0.1ms <S> = 3363 counts which meets your resolution and Acquisition time specs. <S> Plan B measure time interval using 48MHz clock for 10 cycles <S> read result, invert result minimum count of 48M/150k to get 3200 counts for 10 cycles or more for better resolution <S> This may be simpler in hardware.
| You can increase precision by averaging several pulses of constant frequency, but if you input is changing all the time then averaging will reduce a precision of instant frequency measurement.
|
How efficient is a Peltier TEC1-12706 and TEC1-12715 I need to know some details about Peltier coolers before moving into making an air-conditioner. I have watched several videos on YouTube that demonstrate making air-conditioners with Peltier thermo-electric coolers. They show that there is a decrease in temperature, on the cool side, which is about -10 °C to -20 °C. We also know that Peltier coolers have an avg delta T max of ~65 °C. But I am a bit confused about this T max . I think it is generally about 30-40 °C because in practice absolute conditions can't be maintained. So, does the hot side temperature depend on the surrounding temperature?How much temperature decrease, would I get if the surrounding temperature is 40 °C with 12 Volts? I also want to know if it is efficient for cooling a 10 ft x 10 ft room. I think using 5/6 Peltier cooler can handle that, but is it efficient? Or should I use a compressor? And should I use only a heatsink with a fan, or a heatsink + fan + watercooler, for cooling the hot side? <Q> We'll start with the easy one first: Do not try to cool a room with TECs. <S> It simply will not work. <S> Forget it. <S> Don't even think about it. <S> Cooling loads for room air conditioning will run in the hundreds of watts. <S> OK, with that out of the way. <S> Yes, hot side temperature will depend on ambient. <S> And since, in order to shed heat, the heat sink has to get above ambient, that's a lower limit. <S> Typically, a TEC heat sink will be cooled via forced air, which reduces the heat sink temperature. <S> Second, the temperature differential will be closely linked to the amount of heat you're trying to remove. <S> The 65 C number you've run across is for essentially no heat flow. <S> Any increase in heat removed will reduce the temperature difference. <S> I suggest you play around with a TEC calculator such as this one . <S> Consider the following starting point. <S> 1) <S> Ambient temperature is 40 C2) <S> Desired room temperature is 20 C3) <S> the heat sink is maintained at 60 C <S> (Note: <S> this is roughly the "Ouch!" point where you can't keep your finger on it.)4) <S> The heat load is 500 watts. <S> For instance, that's the heat put out by 5 resting adults. <S> Unless the room is very well insulated, you might get that amount of power just from the external temperature coming through the walls and air leakage. <S> Run the calculator. <S> See Qmax? <S> A 12706 has a Qmax of about 60 watts, so you'd need about 32 modules. <S> Each one would be run at about 3 amps. <S> From the 12706 data sheet you'd want to drive your modules at about 9 volts. <S> Total dissipation would be about 860 watts. <S> And before you think that's not unreasonable, you'll need to price out a heat sink which will mount 32 modules and provide a thermal impedance of .023 deg C/watt, which is the temperature difference between hot side and ambient (60 - 40) divided by the dissipation (860 watts) at 860 watts total. <S> Trust me, this is a monster. <S> Get an air conditioner. <A> does the hot side temperature depend on the surrounding temperature? <S> Yes. <S> The hot side is being heated with the heat transferred from the cold side, plus the I x V that is driving the Peltier. <S> That heat needs to be transferred away from the hot side by some mechanism: conduction, convection, or radiation. <S> The rate of all of those mechanisms will depend on the temperature of the material around the hot side. <S> How much temperature decrease, would I get if the surrounding temperature is 40 °C with 12 Volts? <S> This isn't answerable, because the surrounding temperature isn't the only factor that determines the temperature. <S> You also need to know what kind of heat sink is attached to the hot side, and what's its effective thermal resistance. <S> This will itself depend on whether you're providing forced air over the heat sink or just relying on natural convection. <S> Of course you also need to know the heat being transferred from the cold side, which depends on the temperature of the cold side. <A> Don't use the 12706 because the performance very low when apply to air conditions. <S> Don't use the water cooler because it will warm up very fast. <S> Air is enough. <S> You will need TEC1-2715 about 250W, and effect thermal I saw <S> was 135W.Let try with 4 TEC first. <S> 4 fan and heat dink out side, 4 fan or 1 big fan inside. <S> To get maximum performance, the heat sink should steal heat fastest as possible. <S> Normal PC heat sink worked good for 04905 (25mm), so you may need heat sink big as 4 time the CPU's heat sink, about 20cm x 20cm. <S> Now the inside surface (cold surface need some more heat sink and a fan to help mix up the air with cold source). <S> U will need one 6V car fan is enough. <S> Ok. <S> 4 tec 12715 about $4 each -> <S> $16Heat sink must DIY and may be cast aluminiumMaybe <S> 1 kg <S> Al is enough for project, and it about $10 ? <S> Next is 4 drone fan with gear and big blade: $15. <S> Or u buy two to four 48000rpm motors only will cost $3 to $6.The <S> absorb heat sink in line style will help easy assemble flow and reduce motor as less as possible. <S> The fan in room is 6V car fan about $7. <S> Yep, about 1kW input, 500W effective (50%).$39, with the power supply, the price will higher, about $89 total
| Assuming you're using a heat sink of some sort, the best hot side temperature you can get will be ambient.
|
How can I see an output from SCL? I am new to electronics, circuits, etc. Currently I am reading I2C and synchronous serial communications. As I understand, two devices must be connected to the same CLOCK wire so that the slave knows at which rate to interpret data because it might not have an internal clock. Now, I wanted to see how fast SCL pin on Arduino Uno oscillates by connecting a LED to it and GND and expected the LED to blink fast. Of course, as I believe, I attenuated the frequency to 1 by using Wire.h library and calling Wire.setClock(1); as it is said here . The LED still didn't blink as I expected - once a second. What is wrong? How does SCL behave actually? Does it oscillate from 0V to 5V periodically or I must manually do this in the code? EDIT The complete sketch was as follows #include <Wire.h>void setup() { // put your setup code here, to run once: Wire.setClock(1);}void loop() { // put your main code here, to run repeatedly:} EDIT 2 I built a circuit. The LED is turned on but it doesn't blink. I also tried changing the frequency in the code from 1 to different values up to 100000. EDIT 3 It blinks! But I am not sure is it actually SCL making it blink. I added Wire.begin() in setup() and started together with ending a transmission in the loop() . But it doesn't react to changes in setClock(frequency) . Also I tried to put a delay or send long random text with Wire.write() between Wire.beginTransmission(0xA3) and Wire.endTransmission() . Then it just blinks once (maybe multiple times but fast) in the beginning and then stops blinking just being on. The complete code is #include <Wire.h>void setup() { // put your setup code here, to run once: Wire.setClock(32000); Wire.begin();}void loop() { // put your main code here, to run repeatedly: Wire.beginTransmission(0xA3); //arbitrary address Wire.endTransmission();} <Q> The minimum frequency your I2C clock is capable of running at (see end for details) is far higher than you will be able to see - <S> your eyes physically cannot see it blinking at >30[kHz] . <S> At most you'll see the LED being slightly dimmer than expected as data is being sent - might look like a single blink for the entire I2C packet. <S> Additionally if you have wired up your LED from the pin to GND, you will also see nothing as I2C is open-drain. <S> That means it can only sink current. <S> You would have to connect the LED with anode to +5V (via resistor), and cathode to the SCL pin. <S> But again you wouldn't be able to see anything. <S> I see it is not from your picture. <S> Furthermore, the I2C clock is not constantly running. <S> The clock output is produced only when you send data. <S> As your code never sends an I2C packet (the loop() function is empty), the I2C core will never generate a clock. <S> Once you start generating packets, you still wont see the clock blinking at its actual frequency. <S> You might see it "blink", but the duration of the blink will actually contain multiple I2C packets. <S> This is exactly the same as how you can make an LED dimmer by using PWM - <S> you see the dip in brightness, but you cannot see the actual PWM frequency. <S> Due to hardware limitations, the ATMega328 cannot run the I2C clock rate at 1Hz (using hardware I2C). <S> Regardless of what the API you are using allows you to enter. <S> The formula for calculating baud rate is: $$f_{SCL} <S> [Hz] = <S> \frac{f_{CPU}}{16 + 2\cdot <S> TWBR\cdot <S> Prescaler}$$ <S> Where the \$TWBR\$ register is an 8-bit value. <S> \$Prescaler\$ is at most 64, but in the case of Arduino is set to 1 (can be gathered from the source code calculation being used). <S> This gives: $$f_{SCL(min)} [Hz] <S> = <S> \frac{16[MHz]}{16 <S> + 2\cdot 255\cdot 1} = <S> 30.418 <S> [kHz]$$ <S> The setClock API is shockingly written as it provides no form of error checking. <S> In your case when you try to set a value of 1, this will try to write a value of 7999992 to the 8-bit \$TWBR\$ register, causing an overflow that will actually set the I2C rate to 30.418kHz. <A> You CANNOT drive the SCL at 1 Hz at normal MCU clock rates (16MHz). <S> Read the TWI setup information in the ATMega328P datasheet , see page 266 Since the TWBR is an 8 bit register the divisor in the bit rate formula is limited (also limited by the prescaler). <A> Others have addressed the problem of slowing the I2C transmission speed set by the Arduino bus-master. <S> Using a LED in an attempt to watch fast digital signals is a poor substitute for an oscilloscope, but we must sometimes use inadequate tools. <S> May I suggest a slight change to your test circuit, to improve chances of seeing something useful.... <S> Our eyes see pulses of light in a dark background much better than we see pulses of darkness in a light background. <S> Near as I can tell from your photo, the LED probe you have constructed is wired as follows. <S> R1 keeps the LED lit, until SCL pulses pull down toward ground, creating momentary darkness: simulate this circuit – <S> Schematic created using CircuitLab <S> The above circuit does work, but might work far better if SCL pulses actually lit up the LED - when no SCL pulses arrive (I2C bus is idle) <S> the LED would then be dark. <S> The following circuit does exactly that, lighting up only when SCL pulses are active. <S> Furthermore, it will be more likely that I2C devices attached to the bus will work properly: <S> simulate this circuit <S> Note that there is no ground connection. <S> The Arduino SCL pin actively pulls down to ground. <S> Current flows from the +5V supply, through the LED, into the Arduino's SCL pin, and inside the chip finds its way to ground. <S> When the I2C bus is idle, Arduino's SCL pin floats to logic high, and no current flows: the LED is dark. <S> You still may not actually see individual SCL pulses (your eyes blend together pulse rates faster than about twenty-per-second). <S> But you'll have a somewhat better chance of seeing bus activity.
| If you want to view the clock signal, you will require some form of logic analyser.
|
How to Measure Very Large Capacitance e.g. Super/Ultra Capacitors I have recently acquired a couple of mysterious ultra/super capacitors from my brother. Apparently he doesn't remember any of the specifications or even brand... To further complicate matters, they have no meaningful identification information stamped or printed on them. (There is a bar code label with alphanumeric code but a quick Google search using it found nothing.) Looks like it's time to fire up the Scooby-Doo Mystery Buss, 'cause were going on an adventure folks. First, I figured I'd try to measure the capacitance. Since my LCR meter isn't specified for enormous capacitors like these, I had to get creative with my test equipment. Taking basic physics into account, we have that capacitance is proportional to the stored charge per volt across the capacitor: $$ C=\frac{q}{V} $$ where the accumulated charge in the capacitor is the integral of the current through the capacitor: $$ \int i(t)dt=q$$ Using a current source to charge the capacitor we can simplify the calculations, using only delta measurements of the charge and voltage across the capacitor. $$ C=\frac{\Delta q}{\Delta V}=\frac{i\Delta t}{\Delta V} $$ With my Advantest R6144 current source I can then charge the capacitor at a set current and simply measure the voltage across the capacitor using my Tektronix DMM4050 in the trendplot mode. Picures of Test Setup However, this is where I start to see some rather large numbers. It's possible the capacitor really is ~2200 farads, but that seems a bit high. Admittedly, the capacitor is quite large at ~5.5" long by ~1" radius. And now some questions for the fine folks of Electrical Engineering Stack Exchange: Is this method a viable means to measure super capacitors? Or is there a more suitable method that I can apply to measure them? Also, does the capacitance of super/ultra capacitors significantly change vs. voltage of the capacitor? E.g., are these measured results predictive/indicative for higher charge voltages. I would reckon the capacitance should fluctuate some, but I doubt its that much. Probably at worst it's a few hundred farads, but I'm no expert on the matter. Also, and somewhat more importantly, how would I find the maximum charge voltage without destroying the capacitor? Would a constant current charge of say 100uA over a few weeks till the voltage reaches some sort of equilibrium with self discharge work. Then back off a couple hundred milivolts and call that the max charge voltage. Or will it just reach a tripping point and self-destruct while spraying electrolyte all over my lab? Finally, how do you determine the polarity orientation of the capacitors? These are not marked in any way, and both terminals are identical. I cast my bet with the residual voltage stored in the capacitor. I assume the dielectric absorption/memory effect from previous charging knows the correct direction... At any rate, it's sort of fun to try and determine the characteristics of these capacitors. But it's still a touch aggravating that there are no useful markings on them, like polarity orientation, manufacturer, ect. <Q> From the images of the cell in test setup photo they appear to be similar to the Maxwell DuraBlue line of Ultracapacitors. <S> See this datasheet for more information. <S> The Maxwell application note 1007239 , <S> This line of "supercapacitors" has a maximum working voltage of 2.85 VDC and a typical capacitance of 3400 Farads. <S> Most other "supercapacitors" in this type of package have a maximum working voltage of 2.7 VDC. <S> Be cautious an internal short in these devices can result in a spectacular failure event. <S> You may want to have non-conductive, non-water based fire suppression system available (sand, chemical, CO2, Halon etc.). <S> Based on the posted test setup photos you will likely melt the alligator clips before you exceed the maximum charge or discharge current. <A> This is Maxwell's process for measuring C from their test spec. <S> \$C= <S> C_{dcd}=\dfrac{I_5*(t_5-t_4)}{V_5-V_4}\$ <S> The Capacitance is charged and discharged at rated current but measured by the rated from Urated to 50% Urated. <S> Note that the voltage sags towards the previous voltage due to an additional RC time constant in parallel. <S> (i.e. memory effect) <S> Here it is show to be around 5% of full scale of 10% for a half voltage discharge. <S> This memory effect indicates another "double layer electric effect" capacitance between 5% and 10% of C. <S> What this means is like in batteries, if you charge and discharge much slower ( at least 10x slower) then the storage capacity increases 5~10%, similar to the best low ESR Li-ion batteries , which are advertised as having no memory effects ( relative to NiCad.) <A> My usual way is to measure the resistance with a normal multimeter. <S> Assuming that the test voltage/current is more or less continuously applied, you'll see the "resistance" reading increase in comparatively linear manner over time. <S> Rougly averaging this increase in the unit "Ohm per second" gives you the inverse of the capacity. <S> For example, if the readout increases about 10 Ohms every second, the capacity is about 0.1F. <S> You should check with some known capacities first that your multimeter is of the continuously measuring type where this approximation is good enough.
| Test Procedures for Capacitance, ESR, Leakage Current and Self-Discharge Characterizations of Ultracapacitors, may be helpful.
|
Separate grounding for analog and digital portions of circuitry A datasheet suggests separate grounding for analog and digital portions of circuitry ( http://www.ti.com/lit/ds/symlink/am26c32.pdf#page=12 ). Is this to say that the IC's outputs should have a separate ground to the IC's power supply (VDD)? If so, how is this possible when all components operate from the same supply? <Q> Separating analog and digital ground planes is good practice and helps reduce noise. <S> Its not true that all components must operate from the same supply. <S> Infact, you can have separate power supplies for the digital and analog circuitry. <S> They may be supplied from the same source originally, but filtered as not to interfere with each other. <S> Here is an example of this: https://m.eet.com/media/1049897/C0130-Figure3.gif <A> Is this to say that the IC's outputs should have a separate ground to the IC's power supply (VDD)? <S> If so, how is this possible when all components operate from the same supply? <S> I suppose your referring to this: Separate grounding for analog and digital portions of circuitry is one of the simplest and most-effective methods of noise suppression. <S> One or more layers on multilayer PCBs are usually devoted to ground planes. <S> A ground plane helps distribute heat and reduces EMI noise pickup. <S> Make sure to physically separate digital and analog grounds, paying attention to the flow of the ground current. <S> The current will return back to the source (usually the ground pin of the cable tied to the power supply ground). <S> In the DC world this usually means the shortest path (assuming resistance of the ground plane is equal and the plane is continuous). <S> In the AC world this means the lowest impedance path, which usually means the return current will follow the trace that is carrying the AC signal because of mutual inductance. <S> Regardless, if a return current crosses through an analog subsection, it will show up as a (usually small) voltage. <S> This voltage offset will cause noise in an analog subsection. <S> The best thing (in my experience) is to find where the return current is going and orient the analog subsection so currents do not cross through it. <S> This allows you to maintain a simple grounding system, with a continuous ground plane. <S> Another way to do it is with slots in the board: <S> Source: <S> Staying well grounded A problem with slots is they turn the PCB into a dipole antenna, and if the design needs to be FCC compliant, it may fail. <S> Another way is to isolate the grounds with digital isolation, and or a star ground. <S> Both of which I wouldn't recommend. <A> Is this to say that the IC's outputs should have a separate ground to the IC's power supply (VDD)? <S> The method is a good PCB layout techniques and involves separation of AGND and PGND on the board into two separate ground planes connected to each other at one point . <S> Where AGND is signal ground and PGND is the ground connection over which higher pulsed currents flow. <S> These connections can be: single point (series or parallel), multi point (for high frequency or low frequency signals),etc . <S> These ground connections are selected based on frequency and noise. <S> The datasheet suggests you to use an approach like in this picture: Also, the separation should be maintained across whole PCB and to not cross sensitive analog section with noisy digital ground.
| Ground separation does not mean to "have a separate ground to the IC's power supply".
|
So which direction do electrons really flow? As I understand it, electrons (which are negatively charged) flow towards positive. As a convention, we say that current flows from positive to negative. Is this to say that what you connect the positive terminal of a battery to, say, VDD of an IC, and the negative terminal to the IC's GND, what is actually called the "positive terminal" is really ground/negative? Are the electrons flowing from "positive" to VDD, or "negative" to GND, etc? Are the flowing electrons themselves responsible for the work done, or is it the "holes" moving in the opposite direction? <Q> Conventional current goes from positive to negative, which is the opposite of electron flow which goes from negative to positive. <S> Neither the electrons nor the holes are responsible for doing the work, it's simply the flow of charge that does the work. <S> The direction of the flow of charge, the electrons, or the conventional current, is not relevant to the amount of work that is being done. <S> In electronics, when we say "current", we refer to conventional current . <S> If for any reason would we would want to refer to electron flow, we make sure to say so. <S> The reasons for this are mostly historical. <A> Positive is positive. <S> If a pin is "positive" in relation to another pin, then the voltage difference between that pin and the reference pin is positive. <S> In your example VDD is connected to the "positive" terminal, which means the voltage at that pin is higher with respect to GND. <S> Electron current is therefore from GND to VDD. <S> Conventional current is from VDD to GND. <A> Voltage is electrical potential energy per charge, i.e. EPE/q. <S> If moving an electron from Point A to Point B takes 1 electron volt of work, then the voltage difference from A to B is 1eV/(-1e) = <S> -1V <S> (note that the notation is a bit confusing, as the 'e' in 'eV' stands for "electron", while the 'e' on the RHS stands for "elementary charge"). <S> Conversely, if an electron travels between two points with a voltage difference of +1V, then it will perform 1eV of work. <S> If we define current as the signed flow of charge, then a positive charge traveling from the positive terminal to the negative terminal is a positive current from the positive terminal to negative. <S> A negative charge flowing from negative to positive is also a positive current; the negative sign from going the opposite direction and the negative sign from opposite charge combine to give a positive current. <S> "Positive" and "negative" are a bit misleading, as there's no "absolute zero" of voltage. <S> The "positive" terminal is simply the one with the higher voltage, and the "negative" one is the one with lower voltage. <S> If one Coulomb of electrons travels from one terminal to another, and the second terminal has a voltage that is 5V higher than the first, then we have -1C of going across -5V of voltage, giving (-1C)(-5v), or 5J, of work. <S> The electrons do work by being negative charge going across a negative voltage difference. <S> As something that's somewhat analogous, if you release a helium balloon (negative weight), it will float upwards, and the work done will be the weight of the balloon times the signed change in height. <S> Both the weight and the displacement will be negative, giving a positive amount of work done by the balloon.
| Electrons "flow" from negative to positive, so if a pin is at higher voltage, they will flow towards it.
|
How to reduce noise in this circuit? I'm using a Raspberry Pi in a circuit I'm building that includes a few elements. Elements in the circuit: PWM driver to control 3 servos Mic board for recording Class D Amplifier that drives 2x3W 4ohm speakers 4inch HDMI screen Limitations: I can use only one power source plugged into the wall to power the whole system. I'm currently using a 5V 10A power supply. The enclosure is very small so adding space consuming components can be challenging. Problems: Driving the servos causes the low voltage indicator to show up on the pi. The power supply is rated for 5V 10A and the peak current draw is ~3A. The amplifier is picking up noise from the circuit causing an audible hiss/crackle from the speakers. Things I've tried: I tried adding large decoupling capacitors - 1000uf/4700uf right at the Pi's power and at entry point of power supply. The Pi is powered from it's GPIO pins. No difference. Added additional decoupling capacitors in values ranging from 0.1uf to 10uf right before the amplifier. No improvement. I measured the voltage at the Pi using a multimeter and it never drops below 5.1V even when the servos are being driven, so why the low voltage indicator? The noise in the circuit isn't caused by the servos. When I remove the servos there is still noise being picked up by the amplifier. Similarly removing the amplifier doesn't help get rid of the low voltage indicator while servos are running. Things that worked: The only thing that works is powering the Pi from a different 5V supply and sharing common ground. This gets rid of any noise from the speakers and the low voltage warning. However due to Limitation #1 this is not feasible. Things I've thought about: Pairing a higher voltage power supply(12v,24v) with a buck regulator to create 2 +5V rails.Use one rail for Pi and one for servos/audio. Not sure if this is even possible or how it would be done? Finding a power supply which has two +5V outputs. No luck finding one yet. Also seems overkill. Image of the circuit What can I do to reduce noise in the circuit to get rid off the low voltage warning and speaker noise? <Q> I made up some values for the example circuit, so don't count on those exact values being effective. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Most of the main electical network of the cities are noisy enough. <A> Audio does not like switching of any type. <S> Consider for testing purposes trying with a separate power supply for the audio (grounds need to be connected) and see what happens to the noise. <S> If that works they you can consider using a higher voltage wall wart then an an analog regulators well bypassed. <S> Consider placing a CLC style pi filter in front of the regulators. <S> Be careful of the inductor if not properly bypassed it can cause the regulator to oscillate. <S> Because of the capacitance you appear to be using I would consider placing a diode across the regulators with anode to output and cathode to the input. <S> If the input power fails rapidly the diode will protect the regulator from reverse voltage. <S> This is not a problem with some regulators. <S> In the high end audio gear I have the digital power is separate from the audio power.
| A CLC style pi filter might be effective. If you change your power source with isolated ground dc-dc converter, you may kill the noise source.
|
How to make a low pass filter of current, instead of voltage? Is there a way to low-pass filter current, rather than voltage? Let's suppose there is a circuit consisting of a current source and a load. The current source may have a little bit of current noise at high frequencies. I'd like to figure out what can be inserted in between the source and load in this case to suppress that. (Note: the load may not be resistive, and may have strong nonlinearities) <Q> A shunt capacitor will filter it. <S> It will of course lower the high frequency impedance from the infinity of a current source. <S> So putting a series L after the cap will restore it. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Aside from that, you need to make a low noise current source. <S> LM317's would not be a good place to start. <S> You are not giving any idea of what noise , voltage or current levels, and how constant-current it needs to be, so hard to make any suggestions, but a simple emitter follower can be very quiet, close to the thermal noise from R2. <S> simulate this circuit <S> In the emitter follower R2 sets the current, ie the current rises until the voltage across R2 is too high, and base current can't flow. <S> A simple emitter follower has poor current regulation, but good high frequency performance as there is no feedback involved. <S> simulate this circuit <S> Here is an arrangement that gives excellent regulation, low noise at low and high frequencies, and also allows you to switch the LED at very high frequencies, without compromising the noise. <S> lots of caps to filter noise, both big electros and small ceramics <S> the voltage ref has its noise filtered to give a quiet reference to the opamp. <S> the opamp gives an accurate constant current we use an emitter follower, as it has intrinsic constant current at high frequencies without the opamp doing anything instead of turning it on and off, we steer the current between the test led, and a second matched led. <S> This means that the currents and voltages stay constant during switching. <S> The constant current circuit can have noise filtering, yet still be switched at speed. <S> We filter the supply to the leds to reduce the noise input from the power supply. <S> This is the circuit I used in optical instruments for turbidity, transmission and flourescence. <A> Filters must have at least one resistive termination. <S> If you drive your circuit with an ideal current source and the load is purely reactive, then you cannot make a filter that works. <S> If your load has some real impedance (e.g. series resistance of a coil) you can design a singly-terminated filter to work with that situation, see for example <S> p. 104 in the Matthaei Young and Jones book . <S> These will also work if instead your load is reactive, but your source is not ideal, ie has some finite internal resistance. <A> In contrast, a current source has a high impedance, so if you use a series inductor, it would need to be a large value. <S> A capacitor in parallel would be effective, but that makes the current source behave like a voltage source, because a large peak current could be drawn. <S> Perhaps you need two stages: Filter the current source to remove noise with a capacitor. <S> Add a current regulator or limiter in series, after the filter. <S> Depending on regulation, current and voltage needs, this could be a simple series resistor, an IC regulator, e.g. this LM317 circuit , or it might involve multiple components.
| A voltage source has a comparatively low impedance, so a small filter choke in series helps, because it has a higher impedance than the source for AC (or varying DC).
|
Why would a buck converter IC fail and blow up? I have a deployed design in which we are experiencing a high (~4%) failure rate in the 12V to 5V step-down buck converter portion of the PCB. The buck converter's role in the circuit is to step down 12 V input (from a connected lead acid battery) to 5V, which is then fed to a USB-A receptacle for battery charging purposes. All returned units have the same characteristic blown-up buck converter IC. The IC is a TPS562200DDCT from Texas Instruments (reputable manufacturer, so I hear) Here is the datasheet. Here is a picture of a failed unit: Here is the schematic: Here is a look at the PCB design file for that section of the board: In analyzing the failure of the buck converter IC, I think that you can ignore the low battery cutoff circuit. That portion of the circuit simply uses a reference voltage and low-side pass FET to cut off the battery's negative terminal from the rest of the circuitry when the battery's voltage drops below 11 V. It seems to me that an external short circuit on a device connected to the USB receptacle would not be a culprit, since the TPS562200DDCT has overcurrent protection built into it: 7.3.4 Current Protection The output overcurrent limit (OCL) is implemented using a cycle-by-cycle valley detect control circuit. The switch current is monitored during the OFF state by measuring the low-side FET drain to source voltage. This voltage is proportional to the switch current. To improve accuracy, the voltage sensing is temperature compensated. During the on time of the high-side FET switch, the switch current increases at a linear rate determined by VIN, VOUT, the on-time and the output inductor value. During the on time of the low-side FET switch, this current decreases linearly. The average value of the switch current is the load current IOUT. If the monitored current is above the OCL level, the converter maintains low-side FET on and delays the creation of a new set pulse, even the voltage feedback loop requires one, until the current level becomes OCL level or lower. In subsequent switching cycles, the on-time is set to a fixed value and the current is monitored in the same manner. If the over current condition exists consecutive switching cycles, the internal OCL threshold is set to a lower level, reducing the available output current. When a switching cycle occurs where the switch current is not above the lower OCL threshold, the counter is reset and the OCL threshold is returned to the higher value. There are some important considerations for this type of over-current protection. The load current is higher than the over-current threshold by one half of the peak-to-peak inductor ripple current. Also, when the current is being limited, the output voltage tends to fall as the demanded load current may be higher than the current available from the converter. This may cause the output voltage to fall. When the VFB voltage falls below the UVP threshold voltage, the UVP comparator detects it. Then, the device shuts down after the UVP delay time (typically 14 μs) and re-start after the hiccup time (typically 12 ms). So, does anyone have any idea how this could have happened? EDIT Here is a link to a reference design that I used to come up with component values and operating points for the buck converter using TI WEBENCH Designer: https://webench.ti.com/appinfo/webench/scripts/SDP.cgi?ID=F18605EF5763ECE7 EDIT I have done some destructive testing here in the lab and can confirm that I get a very similar-looking pile of melted plastic where the Buck converter used to be if I plug in the battery with reverse polarity. Since our choice of battery connector does provide a relatively high chance of accidental reverse polarity plug-ins (say, 4% chance --> wink wink), it would seem likely that this is responsible for the majority of the failures we observed. <Q> I suspect overvoltage on the chip, with a second possibility inductor saturation as @oldfart suggested in a comment. <S> Your supply bypass is an electrolytic capacitor, a little far from the chip and is a small electrolytic so it has a relatively high ESR (and, unfortunately, an ESR that will increase as the capacitor ages). <S> I suggest testing it with a supply with long wires and test at the limits of the supply range. <S> Put an oscilloscope on the power rails and see how big the spikes are. <S> A ceramic 22 µF capacitor with an electrolytic ( <S> e.g. 1000 µF/25 V 105 °C) in parallel, if you have room, would be much better. <S> Check that <S> the "22 µF" ceramic is over 10 µF at the maximum operating voltage. <S> It should be as close as practical to the chip. <S> And, of course, it's best to follow the suggested layout practices in the datasheet as closely as practical. <S> Inductor saturation is a different issue- <S> it would tend to occur at minimum supply voltage where the input current is maximum. <S> You can test it by bypassing your undervoltage lockout and reducing the input well below the minimum normally expected. <S> Symptoms would be excessive power dissipation in the chip. <A> Problem: cheap high ESR capacitor and ignoring design application notes. <S> Edit Ignoring car applications if it does not apply, take note of requirement for low ESR capacitors. <S> For this design two TDK C3216X5R0J226M 22 μF output capacitors are used. <S> The typical ESR is 2 mΩ each. <S> The calculated RMS current is 0.286 A and each output capacitor is rated for 4 A. Note that 22 μF * 2 mΩ = <S> τ = 0.044 <S> μs is excellent ceramic performance, where low ESR electrolytic capacitors are < <S> 1 μs and general purpose electrolytic capacitors <S> > <S> > <S> 100 μs. <S> Since f > <S> > 50 kHz this is critical for regulation and improved with three of the suggested parts in parallel. <S> It is impossible to achieve this low ESR*C = <S> τ in an aluminum electrolytic capacitor, even with ultra-low ESR types. <S> This is why ceramic is used in this design. <S> If the ESR is too high and reactive step loads are applied <S> then there is more chance for instability, higher ripple voltage, and overshoot. <S> If you do not have automotive design or test specifications or a DVT test plan with stress testing, this design had not been completed properly. <A> The datasheet recommends C4 to be a low ESR ceramic capacitor (20 µF to 68 µF). <S> You seem to have a 22 µF electrolytic. <S> All datasheet examples show two 10 µF in parallel. <S> The actual value probably depends on the frequency. <S> I have no idea if this may or may not be a problem. <S> But... I've had MC34063 fail, because the input capacitor was inappropriately low or had high ESR. <S> Failure usually occurred at power off, but that may not be relevant here. <A> Through destructive testing here in the lab, it would appear that the most likely cause of this melted pile of buck converter innards was application of reverse polarity to the buck converter. <S> Thanks to all for your insights, I will definitely be using them to improve the next iteration of this design. <A> The board layout also does not show much in the way of using copper as a board level heatsink for the part. <S> You may need to either come up with a heat spreader, use a package that has an integrated thermal pad and/or find another part in a lot beefier package. <A> If you intend to re-visit the design, choosing a part with a more tightly controlled Enable threshold would allow the whole low voltage cut-off circuit to be replaced by a simple potential divider on the EN pin. <S> This cost saving would pay for the new device and might give some budget for some protection components. <S> The TPS562200 could current limit at up to 5.3A. <S> The inductor is probably highly saturated by then.
| The input ripple current, in combination with stray inductance from wiring can lead to overvoltage on the chip input. I would suggest that the very small part is getting way to hot when a load is placed on it and just burns up.
|
Capacitors in parallel with voltage sources Why can't capacitors be connected in parallel with ideal voltage sources? In various questions involving it we were asked to ignore the capacitors, by our teachers without valid explanations. <Q> The problem is that you can not connect an ideal voltage source of a given voltage in parallel with an ideal capacitor that has some initial voltage different from the source voltage. <S> Once these two are connected, our definitions of "ideal voltage source" and "in parallel" demand that the voltage across the capacitor instantaneously changes. <S> Now, since $$ <S> i_C = C\frac{dV}{dt}$$ we have a finite change of voltage in zero time, which requires an undefined/infinite amount of current. <S> Therefore, such a connection is not valid within our definitions of ideal circuits. <S> In the real world, all wires are also resistors and there are no ideal voltage sources, so what you see is a very large current flowing through the capacitor until it reaches the voltage of the source. <A> In DC power sources, you will see large capacitors in parallel with the output used to filter the DC voltage output. <S> After this initial charge, the capacitor "may be ignored" when computing circuit voltage drops and current flows. <S> The capacitor will have very little current flow and the voltage would be equal to the DC source so can be "ignored". <A> ... if you connect a charged capacitor, specifically, one charged to a certain voltage different from the voltage source, you are creating a short circuit between two nodes at two different voltage levels (I'm referring to circuits here, not real circuits connected by copper conductors). <S> KVL forbids this. <S> Just as KVL forbids voltage sources in parallel, etc. <S> In fact, KVL can be restated as the law that says voltage changes must take place across devices, not conduction paths. <S> Even if they are at the same voltage level, basic linear circuit theory no longer applies because you won't be able to come up with a unique solution to the current drawn from each of the capacitor and the voltage source. <S> However, in real circuits, all conductors have some resistance, so you're not going to have an issue if you connect a 9V battery to a suitable capacitor using basic copper wire. <S> If you did the same using a DC power supply you won't charge up the capacitor as the power supply detects the lack of resistance and will not operate.
| In an "ideal" DC voltage source (like a fully charged car battery), putting capacitors in parallel with the battery terminals will initially change the total circuit current until the capacitor is fully charged wherein the current drawn by the capacitor is negligible.
|
How does Galvanic isolation work? I am unable to understand how does galvanic isolation work either via an optocoupler or a transformer. In an optocoupler, the input side current caused LED to emit infra red light which basically switches on the photo transistor on the output side. In case of any voltage surge on the input side or any noise, the input current will vary henceforth the light output and thus the collector current on the output. So how does isolation works? Or am i missing something really basic. Similarly for the transformer. <Q> The point of isolation is to provide a facsimile on the output of what appears on the input yet floating from the input. <S> For example you want to generate a 5V sine wave from the mains. <S> A suitable transformer will do this for you and will allow you to tie one side to earth making an inherently safe voltage. <S> Without the isolation the output could be potentially fatal. <S> In other cases we do not need an accurate representation of the input just a digital signal to say for example <S> "Is the mains more than 90V?". <S> An Opto is likely to be used for this but would allow this information to be passed safely to the output. <A> Current cannot flow from one side to the other. <S> Sure, current on one side can control current on the other, but the LED in an optoisolator can sit 100 volts above or below the phototransistor without causing any problems. <S> Really, the whole point is to be able to pass some sort of information (analog or digital) across an isolation barrier that current doesn't cross. <S> Take an isolated switching power supply, for example. <S> They will usually contain a transformer and an optoisolator. <S> The primary side of the transformer will be connected to mains voltage through a switching transistor and the secondary side will be connected to a load of some sort, perhaps a computer or cell phone. <S> Obviously you don't want your computer case electrically connected to the 120 volt supply, as this can kill you if you provide a path to ground. <S> So the transformer galvanically isolates the primary and secondary, allowing energy to pass through in the form of an oscillating magnetic field while preventing any current from flowing across the isolation boundary. <S> To efficiently regulate the output voltage, the switch (on the line side) needs to somehow be connected to the load side so it can control the output voltage. <S> An optoisolator serves to provide this feedback connection by converting the output voltage to light, which passes back through the isolation barrier without allowing current to flow across the barrier. <S> The end result: a safe, efficient, isolated power supply that won't kill you if you provide a path from the output to ground. <A> Both opto-couplers and transformers accomplish this. <S> In some cases capacitors are used.
| Galvanic isolation means that there is no conductor path connected between the two sides.
|
Using Chassis as a conductor for DC Power Supply Return Is it considered a good practice to use the chassis as a return path to a DC Power Supply? I have been given a rack mounted device that switches 480 volt power on/off remotely. The remote feature is handle via a Raspberry Pi which is powered via 120v to 5v power supply ( http://www.mini-box.com/OpenUPS ). I was surprised to find that the return pin on the 5v power supply is tied directly to the chassis and the GND on the Pi is also tied to ground and they are using the chassis as the conductor for the return path. There is only a positive 5v wire going between the power supply and the Pi. Is this considered good practice? <Q> I would think not. <S> For one, if either device was removed from the chassis (by the unwary) for fault diagnosis then the operation would fail and damage may result. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> (a) What you've got. <S> (b) <S> Standard wiring practice with ground at one point. <S> (c) Ground at two points and 0 V line connection. <S> Grounding at both devices as in (c) risks ground loops which are problematic in low-voltage signal circuits. <S> In your case with both devices on the same chassis it might not be a problem. <A> It's generally not a good idea to rely on the chassis as the return conductor. <S> Magnetically coupled interference happens because a stray magnetic field is coupled into a magnetic loop in your circuit. <S> The smaller the cross-sectional area of your magnetic loops, the smaller the interference. <S> Consider twisted pair ethernet. <S> This has little susceptibility to interference because the twists mean the area between the conductors is small. <S> If you use the chassis as your return path, your currents are travelling around a loop that is probably several centimetres across, and so gives a wide area to receive interference. <S> With a conventional two-conductor power cable, the loop is only the distance between the conductors - less than a millimetre. <S> What about cars? <S> Cars use the chassis as ground. <S> But they're full of high current components (lights, pumps, etc) <S> that aren't susceptible to such interference - when connecting to a device that is sensitive, like a radio or an ECU, there will be a ground wire on the connector. <A> Nope. <S> It was common practice in old tube amplifiers but it is not a good technique by today's standards. <S> And such a device would be rejected by any cert required (UL or what have you). <S> There should be one point in the unit (usually a PCB <S> but it could be a barrier strip or similar) where all grounds converge. <S> One of those grounds should be from the Pi (presumably neatly with it's 5V in which would then go on to the supply). <S> Then run a separate thick wire from the convergence point to the chassis with a proper bolt that has a toothed washer. <S> But there should be no return currents in that wire or through the chassis. <S> It is simply an earth safety connection.
| Additionally, you may not have a good low resistance connection depending on factors like corrosion.
|
Delayed, active low, short pulse for reset I am attempting to create a circuit using a TUSB2036 usb hub IC that automatically starts when it is powered on. The datasheet states for the inverted RESET pin RESET is an active low TTL input with hysteresis and must be asserted at power up. When RESET is asserted, all logic is initialized. Generally, a reset with a pulse width between 100μs and 1 ms is recommended after 3.3-V Vcc reaches its 90%. My understanding is that this means I have to supply a delayed (to allow the power to fully initialise), active low (because the RESET pin is active low), ~1ms pulse that is triggered when the power is connected. Is this correct? If so, how would I go about doing this? I have tried using a 555 timer but I can't get it to work. I tried looking up monostable 555 timer circuits but they all the ones I found are effectively pulse extenders which is not what I need. I also found this question that also used a 555 timer but I was unable to use the circuit in the answers to generate a pulse that is short enough. Is using a 555 timer the way to do this or is there a different IC that do this simpler. I don't really have any particular constraints apart from the usual cheaper and simpler. Thanks. <Q> Just use an RC from +3.3V to GND with a time constant of ~10ms or so as shown below. <S> The voltage on the cap should stay below threshold long enough to reset the part. <S> This is a standard low cost way of implementing an active low power up reset, especially when the input already has hysteresis. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> You need a circuit called " voltage supervisor and reset IC ", there are hundreds of variants like TLV803, APX811, MAX809, etc. <S> You don't need to generate minimally short pulse, anything longer than required minimum would do the job. <A> While you can certainly use a 555 for this, I would highly recommend using a dedicated reset IC for this instead. <S> They are called voltage supervisors. <S> As for the nature of the pulse it would actually be better to power up the part with <S> the reset input asserted (meaning held low) and then release it high 100us to 1ms after VCC has reached 90% of its nominal value, rather than letting reset power up with VCC and then pulsing it later. <S> The purpose of keeping reset low as VCC ramps is to prevent the outputs from doing anything weird as VCC rises, so holding that input low ensures that part is held in reset until such a time as the part is within the voltage range where its operation is guaranteed. <S> Here's an example digikey search for voltage supervisors: https://www.digikey.com/products/en/integrated-circuits-ics/pmic-supervisors/691?k=&pkeyword=&pv183=2553&FV=ffe002b3&quantity=0&ColumnSort=0&page=1&pageSize=25
| There are ICs whose sole purpose is to monitor a voltage and produce a reset signal.
|
Do resistors of same color code but different size have the same resistivity? Picture has three resistors with the same color code (in this case brown-black-black) but different sizes. My question is if they have the same resistivity because I know resistivity is indicated by color code. <Q> resistor of same color code but different size have the same resistivity? <S> No, they have the same resistance . <S> Resistivity is a bulk property of material. <S> The resistance, however, is the same (within tolerance, looks like 5%) between each of the resistors. <S> It's a little hard to tell, but the color bands seem to be BRN,BLK,BLK. <S> If so, then each resistor is 10 Ω ±5%. <S> The two main differences between the large and small resistors are: Power capability. <S> Large resistors can dissipate more power before getting too hot. <S> Voltage capability. <S> Larger gap between the leads usually results in higher voltage handling. <S> For such relatively low values, the maximum voltage can only occur in short spikes, else the resistor would get too hot. <S> This metric is more relevant for high-Ohm resistors where the voltage is not limited by power dissipation. <A> Resistivity is a bulk property of a material. <S> These three resistors are likely all made of carbon film (wrapped around some kind of central core). <S> They might all be made with the same material, or they might be made of slightly different materials with different resistivity. <S> The advantage of the larger part is mainly greater power handling capability. <S> At the same internal temperature, the larger part will shed more heat to the atmosphere around it, so it will not heat up as much for the same current. <A> In my experience with small throughhole resistors. <S> The colour of the bands gives you the resistance (not the resistivity, resistivity is a property of a bulk material not a component) and the tolerance <S> The background colour usually indicates the technology, the beige colour in your picture generally means carbon film while a light blue background generally means metal film. <S> Other colors are likely more special types. <S> For carbon film resistors the body size normally relates to the power rating. <S> ⅛W carbon film resistors are about 3mm long and about 1.8mm in diameter. <S> ¼W carbon film resistors are about 6.5mm long and about 2.5mm in diameter. <S> ½W carbon film resistors are about 8.5mm long and about 3mm in diameter. <S> 1W carbon film resistors are about 11mm long and about 5mm in diameter <S> I think your two smaller resistors are ⅛W and your larger resistor is ¼W <S> but since your picture has no reference for scale it is difficult to be sure. <S> For metal film resistors <S> the power rating is sometimes but not always higher than a carbon film resistor of the same body size. <S> It is not uncommon to see 0.4W metal film resistors in a "⅛W" body size and 0.6W metal film resistors in a "¼W" body size. <S> However it is also common to see metal film resistors with the same power rating as carbon film resistors of the same body size. <A> Resistance <S> Yes, the resistance is similar, the color code only decides what the resistance is (plus/minus some accuracy, also color coded). <S> Wattage <S> However, what is not color coded is the wattage (how many Watts the resistor can handle). <S> Mostly bigger resistors have more wattage 'capability'. <S> The small resistors in your picture are probably 1/8 W (see comment from J below), and the bigger ones 1/4 W. <S> Both are suitable for microcontroller usage. <S> Test <S> If you want to be sure about the resistance, use a multimeter. <S> If you have many and you don't mind blowing one, you can use a small circuit to let one melt to know how many Watts it can bear. <A> Resistors come in different sizes depending on how much power they can safely dissipate. <S> Larger packages dissipate higher wattage. <S> No matter what the size, the color code is the same. <S> For non-cylindrical and some large cylindrical resistors, the resistance is indicated with letters and numbers printed on the package. <S> What you have in your picture look like 1/2 W and 1/4 W resistors.
| Since the geometry of each resistor is different, it is quite likely that the resistivity of the material the resistors are made of differ between the resistors. They have the same resistance.
|
12 or 24 volts for longer run time I know the difference in series and parallel and 12 or 24 volts it's a simple concept. What i would like to know is, which gives more run time on their respective inverters or does 24 volt just reduce draw from batteries? I will be buying a 1200 watt inverter 12 or 24 and only using it for aprox. 900 watts for a few hours at a time. <Q> As a general rule the higher the source voltage the more efficient the MOSFETs are at converting one voltage to another, or to AC. <S> It has to do with current flow through wires and the MOSFETs and the transformer. <S> That is one of the reasons many portable UPS systems use two 12 volt batteries in series, not in parallel. <S> If they were in parallel the converter would have to work harder to overcome DC resistance to the higher current, which would be wasted away as heat. <S> There is talk of 36 and/or 48 volt car voltages, as the manufactures could use smaller gauge wire, so less copper and less cost in copper and weight. <S> (For exposed wiring UL limits the voltage to 48 VDC or 36 VAC in the US, as this starts to create a mild shock if touched.) <S> Another example of why a higher source voltage makes for a more efficient converter <S> ; The Toyota Prius uses a 200 volt battery which it can boost to 500 volts to pass up a slow driver. <S> A 200 volt source makes for a very efficient buck/boost converter. <A> The run time does not depend directly on the battery voltage. <S> The amount of energy in the battery is roughly equal to the battery voltage times the ampere-hour rating of the battery. <S> The product of this multiplication will have units of watt-hours. <S> It sounds like you want something like 3000 watt-hours out of the inverter <S> so you'll need to make sure the battery has at least that much energy. <S> If it were me, I'd want to have at least 50% more energy in the battery than I expected out of the inverter. <A> If you have, for example, two 12 volt 100 Ah batteries, you should get the same run time with them connected in parallel (for 12 volts, 200 aH) with a 12 volt inverter, as you would with them in series (for 24 volts, 100 aH) with a 24 volt inverter. <A> 24v will give you lower line losses, which could also factor in to runtime if the length of your conductors from the battery to the inverter are substantial. <S> This is assuming you are comparing a 12v and 24v battery with equal AH ratings and a 12v to a 24v inverter with equal efficiency ratings (even from the same brand, one may have higher efficiency than the other at the load range <S> you intend to run it at.
| If you double the source voltage you could say you need just half the amps to get the same wattage output, but you also gain a few percent more efficiency in the conversion process. To first order, the run time depends on how much energy is stored in the battery.
|
Can capacitors amplify signals? While reading a topic on opamps, I came across this topic. It said, other devices like capacitors amplify signals differently for different frequencies, while opamps amplify signals irrespective of the frequency (sustained gain.) I haven't heard of amplification using capacitors. I wish to know how does it do and can we find the frequency response of amplification using capacitors? <Q> I havent heard of amplification using capacitors. <S> wish to know how does it do and can we find the frequency response of amplification using capacitors <S> It depends on your definition of "amplifier". <S> Wikipedia defines it like this: - An amplifier, electronic amplifier or (informally) amp is an electronic device that can increase the power of a signal (a time-varying voltage or current). <S> It is a two-port electronic circuit that uses electric power from a power supply to increase the amplitude of a signal applied to its input terminals, producing a proportionally greater amplitude signal at its output. <S> The amount of amplification provided by an amplifier is measured by its gain: the ratio of output voltage, current, or power to input. <S> An amplifier is a circuit that has a power gain greater than one. <S> It is unambiguous in stating that the power gain is greater than 1 <S> but this is just one definition. <S> If you took a definition of an amplifier as a device that increased the voltage of a signal then you could argue that a transformer is an amplifier. <S> You could also argue that an RLC filter was also an amplifier because it can provide significant voltage gain such as in this tuned circuit: - Picture source . <S> At resonance the voltage amplification is 20 dB or a gain of 10. <S> There is of course no power gain because there is no "extra" power source that can provide power. <A> simulate this circuit – Schematic created using CircuitLab <S> The shown - purely passive - RC-circuit has a gain larger than unity at an angular frequency of w=1000 rad/s. <S> However, the gain is only slightly above unity (app. <S> Vout/V1=1.06).Such a circuit can be - and is - used in RC oscillators using unity gain amplifiers. <S> Comment: I wouldn`t say that in the circuit we have "amplification by capacitors". <S> Rather, we have a kind of signal enhancement caused by superposition based on different phase shift effects, <A> A capacitor is a passive component, so it can't amplify. <S> Full stop. <S> That text isn't good. <S> What it probably meant to say is that, using capacitors, you can build frequency-selective circuits (for example, an R-C low pass filter). <S> And what it meant to say was maybe that Opamps can be used in configurations that are not frequency-selective (within the limits of the opamp). <S> All in all, get a better textbook. <A> An ideal capacitor, no <S> it is not possible, however: <S> Pump it with double the frequency of your signal and use it as a parametric amplifier.
| I believe it is possible (though probably not particularly useful) to get power gain from a ceramic capacitor due to the voltage-capacitance nonlinearity.
|
Logic circuits use current source or voltage source? Main question: Do logic circuits use a current source or a voltage source? My assumption is that they use current sources because the standard is to use voltage as the indicator of input and output values (usually 0V and 5V). EDIT: There appears to be some confusion about my understanding. So here are my assumptions: I am assuming Ohm's law V = IR , meaning that with a constant current (current source), resistance controls voltage, but with a constant voltage (voltage source), resistance controls current. I am assuming that (approx) 5V output/input means the bit is a 1 and (approx) 0V output/input means the bit is a 0. Circuits change the voltage, by 1) using resistors to control the voltage range of the power, inputs, and output directions, and 2) using voltage controlled transistors to control the actual logic. Secondary questions: If a current source, then would it be safe to assume that using a battery or a 5V/10A power supply (usually voltage sources by my understanding) would be a bad idea with standard logic circuits? And what would the amperage of a good current source be for a logic circuit? <Q> There are two common types: 1) Voltage source switched logic CMOS (Very low static current ) <S> Although not 0 Ohm voltage sources , logic families exist for 300 Ohm high V (CD4xxx) 50 Ohm 74HCxx and 25 Ohm 74ALCxx <S> Although dozens of CMOS families now exist, they offer different voltage ranges and speeds. <S> 3~18V lowest speed, 5V standard speed , 3 V lower power or high speed, <S> < 3V etc <S> examples 2) <S> Current Model Logic (CML) <S> aka ECL. <S> at very high speed ( GHz ) <S> CML is optimized for 50 Ohm sources and 400mV swing. <S> usually differential <S> so Vcc current is constant and noise free. <S> Older TTL is asymmetric current bias but defined by voltage threshold and input current can tolerate floating inputs unlike CMOS but generally low current High"1", higher current low V"0". <S> Input Threshold is 2 Vbe drops. <S> Logic is always defined by Voltage thresholds with std. <S> margin for noise. <S> so in between "0" & 1" depends on temperature, supply voltage , supplier, tolerances and noise so it is switched rapidly. <S> Some may argue CMOS logic ( with validity) <S> that CMOS is just Voltage controlled conductors to Vdd and Vss that conduct a known small amount of current in between and nothing unless loaded in either state or a dynamic amount of current according to capacitance load (pF) and frequency of switching. <S> (Ic=CdV/dt) <A> Look at a typical 7400 NAND gate (which is similar to many digital output stages) , with the output stage being formed by Q3 and Q4: <S> Source: <S> https://www.physics.mcmaster.ca/phys4d06/Lab/chapter6.htm <S> There are a few things that can be said about this: <S> It's not strictly a voltage source, ideal voltage sources would keep the voltage constant as we increase the load (the current) <S> we see the voltage drop. <S> If it were a voltage source, the voltage would not drop as we increased the load (as shown below in the graph. <S> If it were a voltage source, you'd see a straight horizontal line no matter the load <S> It's not strictly a current source, ideal current sources would keep the current constant no matter the load and the voltage would vary on the output to keep the current constant <S> , we don't see that either. <S> Source: <S> http://www.nutsvolts.com/magazine/article/understanding_digital_logic_ics_part_2 <S> So what is going on? <S> The answer is transistors can be thought of as resistors or varying loads. <S> Logic circuit output stages are more like resistors, or switches with resistance. <S> Although we can configure transistors to function like current sources, this requires feedback, there is no feedback in most digital output stages. <A> The difference is that CML/ECL logic consumes about the same (usually huge) current from Vdd regardless if it is doing some logic operations or not, while consumption of CMOS-based logic ICs depends on how frequently the internal gates switch. <S> In static mode CMOS-based ICs consume nearly nothing, and consumption grows linearly with increased clock rate. <S> This allows for more efficient use of energy by trading consumption for on-demand performance, which allows for "low-power modes" and eventually design of very energy-efficient computation devices. <S> In no case industrial digital logic ICs use power source of constant-current type, partly because most internal and external interfaces are defined as certain voltage levels, which would be difficult to maintain if not using constant-voltage Vdd.
| All logic integrated circuits use constant voltage supply (Vdd), regardless if the internal logic is current-switch-driven, or use voltage-controlled switches (or "variable resistors", or "voltage-controlled transistors" if you wish).
|
High side current sensing with LM358 Basically I want to measure high side current through a 1 Ohm shunt with this configuration: The circuit works perfectly in a simulation. However on a bench it doesn't produce any meaningful output. The only voltage that I see on the output is a constant 700 mV. When I put a load on a circuit and draw more than 1 amp the only thing that changes is that a small ripple adds on top of the 700 mV offset. When I check the voltage drop on the resistor with a voltmeter it is the expected 1 volt or so. When I place the 1.2 Volt battery instead of the resistor at the inputs, the output is almost exactly the voltage applied, so the circuit works fine in that case. I thought that maybe I am trying to operate the opamp too close to the rails so I tried to use voltage dividers as so: Still the output was the same 700mV. I can't understand why does the circuit measure the battery voltage and can't do so with the resistor voltage drop. I'd switch to the low-side measurement however I already have the power PCB printed with the shunt on it so I am still trying to make it work, and also want to understand why this circuit doesn't work. Edit:Here is the opamp output vs load current graph, where the load is changed from 2 amps to 0 amps. Edit N2: I made changes according to some of the suggestions and now the circuit works relatively well. First of all I increased the loop's impedance by increasing the resistor values. Next I biased the opamp to 1.5 volts. I also fiddled with power supply itself to reduce noise. The circuit looks like this: Thanks to everyone now it at least doesn't spew out random nonsense and increases voltage with applied load. I haven't checked for linearity yet but it's a start. <Q> The LM358 can't get to the negative rail perfectly. <S> There is a typical 50uA current sink in the output circuit that allows it to get close, particularly when it is dealing with a resistance to ground as a load or a very light load to >0V. <S> You, on the other hand, have a 20K resistance (R19+R20) to ~8.5V (R23/R24) which is 425uA, which overpowers the current sink. <S> Given that, you're going to get more than 1 diode drop at the output. <S> If you bias it upward so that 0A = 1V you should be able to get a linear output. <A> The input common mode range of the LM358 DOES NOT include the positive supply rail. <S> Adding the resistors will work but the 1kohm needs to develop at least 2 volts across it to bring the common mode voltage down to data sheet values. <S> Your modified circuit should work. <S> What does the simulator give as a result? <S> It gives almost exactly half of the voltage across the resistor. <S> 480 <S> mV at 1 amp current draw. <S> Do you have output linearity down to zero amps? <S> It's about half the value because of the 1 kohm potential dividers reducing the voltage by about 2. <S> It looks quite linear until you get down to approx. <S> 100 mA range: - <S> I thought this might happen: With a single supply rail the LM358 is going to struggle below 50 <S> mV. <S> You could try addding a 1 kohm resistor down to 0 volts on the 358 output. <S> Alternatively, you bias the resistor values so that 0 amps would produce say 100 mV intentionally. <S> Which side of R16 have you got the load - this does matter because if you have it opposite to your schematic then it won't work and will do what you have found. <S> @Andyaka <S> The lower voltage side goes into the inverting input. <S> I also exchanged the sides to double check, with the same result. <S> Try replacing the chip. <A> Your circuit is very sensitive to resistor tolerances. <S> Using two resistor dividers 1/2 in cascade as you did do not result in 1/4 divider but less. <S> See the somehow equivalent schematic I did altering a bit <S> the + input divider. <S> The result is OA output saturation since a negative output is not possible. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Click simulate this circuit , simulate , DC sweep ,run DC sweep to see the results. <A> Another suggestion is to use dedicated IC for high side current measurements like ZXCT1009 or MAX4172
| Maybe the chip is damaged. Try to use a better differential amplifier like MCP6H01, it gives better results and its application is well explained by many microchip application notes.
|
How do they make photo lithography lens so accurate? How are the lenses and other apparatus required for projecting a miniaturized version of the circuit using photo lithographic technique for IC manfuacture made? Its known that even the tiniest spec of dust can ruin an entire chip so do you make sure the lens is perfectly clean and devoid of any distortions or scratches that may ruin the projection? <Q> Actually, for the most part dust on the lens surface won't produce intolerable results at the wafer. <S> At the lens surface the image being projected is not in focus, so a dust particle will not produce an image of the particle at the wafer. <S> The everyday example of this used to be called the "screen door effect", although don't bother to Google it - the meaning of the term has changed. <S> It used to refer to the fact that a screen door can be optically opaque from a distance, but transparent up close. <S> Put your nose up against a screen door and you can't see the screen pattern. <S> What you do see is a slight blurriness. <S> This means that cleanliness is, as the saying goes, next to godliness, particularly in clean rooms. <A> Lenses are indeed a very important part of lithography machines. <S> Also not only one lens is used but an array of different lenses to get the best results. <S> However, except for optics there is a gigantic complicated system built around it with hardware and software compensation of everything you can imagine like temperature, pressure and form of the wafers. <S> Lecture 16 – Introduction to Optical Lithography might give an insight to what you are looking for in more detail. <A> As others have pointed out, dust on the lens is not a big deal because it's far from the focal point. <S> It's also usual that this kind of stuff goes on in a cleanroom. <S> However the lens does have to be made to very tight specs. <S> If we are talking about laser scanning the type of lens is an f-theta lens (meaning that they focus the laser onto a flat plane), and they are usually telecentric (meaning that although the beam enters the lens at an angle it comes out perpendicular to the target, regardless of position. <S> It happens that I have been working on this type of system recently (not semiconductors but similar technology) and the lens quality turns out to be critical. <S> Factors that do matter are having a focal length which remains constant, and focusing to a consistently round spot, across the field of view. <S> That's what you pay the real money for. <S> If you are interested in the lens design, here is a nice explanation.
| So a resist projector will undergo scrupulous cleaning before it is installed - it's just that a single speck on the lens surface is unlikely to cause significant issues.
|
What makes a high speed USB cable high speed? I was shopping around for USB 2.0 cables. Some manufacturers claim their cables are "high speed". My understanding is that the electronics on the device determine the speed, not the cable. I understand that the length of the cable has an effect on the speed (but probably negligible, like nanoseconds). So, what makes a USB 2.0 cable, high speed?(One can search the internet for "high speed usb 2.0 cable" to find instances.) What is the average speed difference between a high speed cable and a cable not high speed? <Q> USB is defined at several data rates. <S> 12 Mbps is called "Full Speed" 480 Mbps is called "High Speed" 5 Gbps is called "SuperSpeed" 10 Gbps is called "SuperSpeed+" A USB product marketed as "High Speed" should be conforming to at least the USB 2.0 specification, and capable of carrying a 480 Mbps USB High Speed signal. <S> Some of the specifications that are related to the bandwidth capability of the cable include Characteristic impedance Attenuation Propagation delay (Intra-pair) <S> skew <S> There are also requirements on things like the diameter of the wires, placement of the USB logo on the connectors, etc. <A> The cable is extremely important for being able to support the required bitrate on the Data Lines and other requirements of the specification. <S> As speed requirements increase, impedance matching, attenuation, shielding, cross-talk become important, these are specifications used by the cable designer to choose a design and materials to produce their product. <S> The USB Consortium determines the specifications to be considered a compliant cable. <S> Looking briefly at the USB Cable and Connector Specification has some more information. <S> This document is incomplete for our purposes but has some useful information. <S> As an example of what kind of cable specific paramaters are critical for this cable <S> Presumably, the requirements for the higher speed grades are even tighter. <S> As an aside, USB Compliance tests the entire cable assembly as a whole, so some of these requirements impact the choice of connector and materials there as well as the cable itself. <A> For example, many initial USB 1.1 cables used for LS(1.5 Mbps) transmission rate were unshielded. <S> More recent USB cables are using shielded cable assemblies, and marked as "FS/HS cables". <S> To make a cable designated as "HS", (480 Mbps rate), the cable must meet certain quality requirements such as be reasonably uniform at 90 Ohm differential impedance along the entire cable, and have decent soldering fan-out inside cable's overmold, where the cable is soldered to connector contact. <S> Not all cables are made equal, and if the cable doesn't pass several certification tests (like valid eye diagram at far end of the cable), it can't be called "HS" cable. <S> Some cables can have differential impedance outside the 90+-20 Ohm window, and will likely fail with USB HS devices/hubs. <S> So a manufacturer of such cable wouldn't risk to put "HS" label on their production. <S> The difference between "HS" and non-HS cable is not in frequency they can pass through, but would it work in HS mode without errors or not. <S> In no case you should trust the manufacturer designation unless the cable has USB-IF certification logo, in this case just like this one, A good cable manufacturer would also provide USB-IF Test ID for the cable. <S> In all other cases it is a gamble with signal fidelity and potential intermittent failure in communication. <A> The speed of the cable depends on the tolerance of the construction and the materials used. <S> A high speed cable has lower loss insulation and better control of the spacing between the conductors in order to minimize the total loss between the source and destination. <S> At very high speeds such as 10Gbps, different higher cost materials such as Teflon must be used so that the signal is not reduced by losses associated with the insulation. <S> USB 2.0 cables are really not all that high speed anymore. <A> As other answers have said, the difference between the cables is in their construction, and therefore the electrical properties. <S> The reason for this, is that eventually your digital data will be carried by an analog signal. <S> The analog signal is distorted as it is carried along the cable. <S> If it is distorted too much, the electronics at the receiving end will not be able to to recover the information from the signal. <S> (Such as when a radio signal is too weak for you to make out anything intelligible from it.) <S> The characteristics of the cable listed in other answers, such as impedance and skew, determine how the signal is distorted as it travels. <S> Typically, the higher the frequency, the more sensitive to distortion the signal is. <S> Higher bitrates (USB 'speed') require higher frequencies in your analog signal. <S> Accordingly, the cable must be made to finer tolerances. <S> The length of the cable affects speed, but not because of the 'delay' through the cable, but rather the longer the signal travels through the cable, the more it is distorted. <S> The better the cable matches the ideal properties, the less distorted the signal is per length, and the longer the cable can be and still work. <A> The cable characteristics determines the speed of the transmission line. <S> Cable impedance (characteristics impedance) vs frequency. <S> Cable reactance vs frequency. <S> Resistance component. <S> Interpair and intrapair skew and airgap. <S> Generally, airgap will not be the issue for cable. <S> USB 2.0 operating speed is <S> 480 Mbps and USB 3.0 is 5-6 Gbps. <S> To transmit data at these speeds, the characteristic impedances must be maintained for signal integrity.
| USB cables may have different construction (shielded and non-shielded), and may have different materials for wire jacket making the signal to attenuate differently at different data speeds.
|
How to strip pieces of insulation in a wire? I would like to strip some insulation from a wire (like shown in the image below, the green area should be only the metal inside, no insulation). I was wondering how I could possibly do this. Cutting at both edges (of the green highlighted part) is no problem, however, how do I remove a the insulation that is now stuck in between the insulation. I was thinking about burning at the green highlighted parts, but would that be hurting my health if it heats up later on when the wire is being used? I could not find anything on the internet (some people mentioning "multicore", but that leads me to other results), nor anything on this forum. I do not have extensive knowledge, I just do this as a hobby so please go easy. I would like to connect some items in serie, so I therefore thought: Why not cut in between the wire and solder those to the pins. If this is wrong, please tell me. EDIT: As suggested, slicing the wire in the direction of the wire and then peeling it of seems to work. This is how it should look like: <Q> First make the circular cuts around the wire to define the bits you want to remove. <S> Then take one of the bits to remove and bend it in half loosely at that point, angle it away from you, and use a sharp craft knife to carve it away like you're sharpening a pencil. <A> One other method I use is to gently pre-loosen the insulation (bend the wire or tap it on the round corner of a 2x4 with another round corner of a 2 by 4 along <S> it's length. <S> If the insulation is stuck on 14 guage and above you will hear and audible clicking as it releases. <S> Then rather than making 2 cuts and slicing off the tube of insulation between them from the side, you can make a single cut and slide the insulation of the entire wire down by pulling the wire through your strippers (taking care not to score it. <S> If necessary cut with one size die and then use a slightly larger size to pull. <S> Just keep moving down the remaining insulation and repeating. <S> This works well down to probably 18 or 20 guage for most wire and often with smaller wires if they have cheap insulation. <S> The smaller the wire is, the more likely I am to score the insulation with razor or strippers and pull it down with my fingernail to avoid scratching copper. <A> Always did this by careful use of a sharp knife - take care or you cut more than just nails... <S> Did this so often on car wiring : <S> 14/010 etc... <S> The best way I found was to place the wire on a wooden block then with the knife blade at the point of cut gently roll the wire : light pressure goes through the insulation and you get a nice even cut - with less risk to fingers... <S> Then for the middle waste bit - it is possible to angle the blade to cut a helix and the waste comes off <S> easy - no flexing... takes practice though... :) <S> Having had to repair burnt wiring looms in cars had plenty of practice... <A> It would work for serie too, as it only is 1 wire for the + –. <S> No it won't. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> Your "serie" connection is a series of devices short-circuited by the wire. <S> There will be no voltage across the devices. <S> In this example the LEDs will not light. <S> I would only like to make a + rail, the - of each individual led should of course be connected to a pin on for example an Arduino. <S> That will be a "parallel" connection. <S> simulate this circuit Figure 2. <S> Using the wire as a busbar. <S> When I have done as you want I strip each section and move it along as required to open each section. <A> If the current you are drawing is not that high (~100mA or less), you could use "magnet wire" - <S> this is basically copper wire coated in a thin insulating layer of polyurethane. <S> The beauty of this sort of insulation is that you can strip it at any point by simply heating to 390*C with a soldering iron. <S> You can also get thicker wire with the same insulation (used to make inductors and motor windings) for higher currents. <A> IF I understood the problem correctly, you could use a wire stripper like this one <S> As you can see in the image it's pretty simple to remove the insulation from any point, middle or edge. <S> It is also a necessary tool if you want to dive in electrical circuits and electronics. <A> If you're not going to be flexing the wire after installation, you might find it easier to simply finesse the whole situation. <S> Cut to length, slip on and adjust your exposed areas, then heat up. <S> The whole process will be much less finicky.
| Get a piece of bare wire (if necessary by stripping the insulation from regular wire - use an Xacto knife to make a long slit), then get some heat-shrink tubing.
|
Flyback Diodes For Inductive Loads With Long Wire Runs I have a project that uses several high power DC solenoids (50 VDC) that will have ~10 feet of wire between them and the driver board. This is for pinball machines. These solenoids typically come with flyback diodes pre-installed on their terminals which makes sense and is very common with any switching inductive load. However, when I look at schematics for the old driver boards from their heyday in the 80's and 90's I see flyback diodes there too. Is there a reason you would want flyback diodes at both ends of the wire run? simulate this circuit – Schematic created using CircuitLab <Q> To draw the circuit with some extra stray components simulate this circuit – Schematic created using CircuitLab <S> Only D1 is necessary. <S> D2 can only control the kickback from L1. <S> The kickback from L2 is not controlled by D2. <S> If L2 is large enough, if there's enough wire or it runs in a loop rather than as a pair twisted with its return, then there could be enough energy stored in L2 to concern Q1. <S> Solenoids are often sold with D2 incorporated, to simplify the circuit. <S> It doesn't hurt to have both D1 and D2, as it affords some measure of redundancy. <S> Some FETs have an 'unclamped avalanche' rating, for use as solenoid drivers without D1. <S> They will safely take a specified kickback energy without failing. <S> This is rarely the case for BJTs. <A> Not really. <S> The diode continues the coil current in the same direction so ideally it is across the transistor. <S> But more important is to have the supply decoupled near the transistor and use a paired wire to avoid open loops. <A> If the wires are short you don't need the diode at the driver end. <S> Having a diode from the transistor drain to Vdd is effective at protecting the transistor with or without the diode at the solenoid and regardless of wire length. <A> D2 is not required. <S> The current in the wires does not change direction (which could make for a noise problem) and as Tony points out, the protection is there for the driving device. <S> For example you might put D2 in series with a Zener diode (no D1) to maximize the losses when Q1 turns off.
| The only time it makes sense to put the protection at the remote (inductor) end of the wires is where you need the field to collapse very quickly.
|
Reversing USB power polarity, but no black wire My goal is to create a USB-to-USB cable with reversed polarity in order to charge an old Gameboy Advanced SP. I could just go on Amazon and buy a charging cable, but I do enjoy a fun little project now and then, and I like learning about the workings of electronics. According to the tutorial I watched , I just need to attach the black end of one cable to the red of the other and vice versa. Unfortunately, one of the cables I want to use has some non-standard wiring. I could just find another cable with normal wires, and if this doesn't work out I might, but hooray learning and such. Here is the cable and what I know about it (sorry the image is a bit crap, I hope it's good enough): Red, green, and white. I know what those are. Or at least what they should be . Thin wires which were braided around the foil shield. One forum post answer I read said that was ground, but the video I watched had a black wire in addition to a bunch of small wires outside the shield, so I'm not entirely sure. Three identical looking thin wires which I'm thinking may be shielding-ground wires . A bundle of very thin, threadlike wires. I'm assuming they're wires, but they are very very thin and might just be structural support or something. Other than that, I don't know. At the moment my best guess is that I would connect the red wire from the other cable to the bundle of wires that are wrapped around the shield (2 in the picture), and then the black from the other cable to the red on this cable. Unfortunately I don't have equipment to test out this theory, so I'm not sure. Any clarity would be most appreciated. Thanks! <Q> Charging cables do not change polarity as you are suggesting. <A> 2.) is likely drain, so in cases where you were using the foil shielding, you would connect this to a drain connector on only one end (which if I remember correctly is just a designated ground). <S> The shielding is sometimes used as a conductor for ground, and to shield a wire with multiple connectors in it the shielding does have to connect through both connectors. <S> 3.) <S> It's not perfectly clear to me whether these have copper cores, but they appear to be conductors, so either data wires for the USB connector, or they're combined as 1 if they're copper. <S> 4.) <S> Looks like fibreglass or plastic filler rope. <S> If it's outside the ground/drain layer it's a pullstring for splitting the insulation. <S> I assume this is one end of a usb cable you cut apart. <S> If this is the case, I recommend disassembling the connector on the part you cut off. <A> Well, with a little help I managed to figure it out. <S> @K <S> H recommended I take apart the other end of the cable, which I hadn't considered. <S> It was a micro USB with a metal casing on the plugs, so a real pain to get into, but after some prying and slicing and a tad of sawing, here's what the connections look like: <S> Basically, it turns out that the three silvery wires (probably tinned copper) are ground, the thin threadlike stuff was probably just reinforcement, and the braided wire (as stated in @K <S> H 's answer) is the drain/shield-ground. <S> On a side note, the contraption seems to be working perfectly! <S> The Gameboy is charging, and is functioning as normal. <S> Impressive, considering it's probably been 10 years since it was last turned on. <S> Anyways, thanks for all the help! <S> I learned a lot, and hopefully this will be useful for someone else.
| Definetely DO NOT connect the red positiive wire from one cable to the black (or shield) negative wire of the second cable (and vice versa) - that would cause reverse polarity on one device, which would almost certainly damage one or both devices.
|
How to find out which end of a dead battery is the anode, and its voltage The battery pack for an old rc car I played with as a kid, has died. Salt crystals everywhere, smells like vinegar. The pack consists of 8 batteries of AA-size connected in series. The red markers in the pic below are mine. Both sides of the individual batteries look identical. Tried to measure the direction of the voltage, but my multimeter is only getting brief, spotty measurements I dont think I can trust. I´m unable to find info from the manufacturer, and there are no labels with relevant information. cf. also attempted voltage measurement attempted voltage measurement #2 closer view of single battery I´m hoping through the clever use of duct tape and paper clips to make a new battery pack. Is there any way to be reasonably sure of the magnitude and direction of the voltage so as not to destroy the car? Also, would it help if I knew what the battery salts taste like? <Q> I see the two wires are red and black. <S> Very likely the red is positive and the black negative. <S> This is a very common convention, but of course, there is no guarantee that any one pack is wired according to the convention. <S> One way to check this is to use a bench supply set to 9 V and a low current limit, like 100 <S> mA. <S> Either way, figure about 1.2 V per cell during most of their operating life. <S> With 8 cells, that comes out to 9.6 V. <S> 9 V should be safe to apply to the device but still allow it to operate. <S> The 100 mA current limit will likely be exceeded if you try to run any of the motors. <S> However, the point of the test is to see if the electronics power up and react properly. <S> If that works, and the current limit is hit when you try to command any of the motors to run, then you can try increasing the current limit. <S> It might take as much as a few amps with motors running. <S> Putting any remnants of the old batteries in your mouth is a bad idea. <A> If it's quite old, it's not lithium, it's nickel-cadmium or "NiCd," and in that case it's 1.2V cells, for a 9.6V battery pack of eight cells in series. <S> Don't build, just buy. <S> They're still common. <S> Search on (amazon?) <S> for 9.6V nicd battery pack, <S> and you'll find lots. <S> Usually they're shrinkwrapped into a slab. <S> They probably have a different connector though. <S> Maybe you'll even get the exact connector if you try: 9.6V nicd battery pack RC car <S> https://www.google.com/search?q=9.6v+nicd+battery+pack+rc+car <S> And ... <S> WASH HANDS CADMIUM POISONING !!! <S> Not as bad as lead or mercury, but still. <S> Ache-y flu-like symptoms, "Cadmium Blues" and even nickel salts are pretty evil. <S> Wear gloves, and thoroughly damp sponge-wipe the battery chamber on the RC car multiple times. <A> I have a similar battery pack, recently measured. <S> One end of each battery has a crimp ring, which is its positive end. <S> Your battery pack seems to be a series-string of eight batteries:
| See if the device operates with + applied where the red wire went and - to where the black wire went. You say this device is old, so these are probably NiMH or possibly even NiCd batteries. Rinse your sponge well after, and perhaps throw it away.
|
Simplest/Cheapest Way to Create 4.5A Test-Load for 12Vdc Step-Down Regulator I'm looking for the simplest/cheapest (but safe!) way to build a 4.5A test-load for an LMR14050-based 24Vdc to 12Vdc/5A step-down voltage regulator circuit. LMR14050 Datasheet Circuit Schematics Thanks! Edit (30.7.18): I commented on the responses below, but it seems my follow-up questions may be rather hidden in all the text, so I figured I'd enter them here to: As it's a bit hard for me to find the suggested bulbs, I thought of hooking-up 9 of these alternative 5W bulbs from eBay in series to give me more or less the power draw I'm after - Would these bulbs work for the intended purpose? Also, what would be the recommended capacitor value for each bulb? Edit (31.7.18): So apparently the bulbs I found aren't suitable - does anyone know where I can order the correct bulbs (i.e. each drawing 500mA more or less at 12Vdc) online? <Q> These are available in power ratings starting at about 5 Watts all the way up 55 Watts or more. <S> The ones that I use in my shop draw about 1A each <S> and I simply use as many as required to get the desired load current. <S> Incandescent lamps have the advantages of being low cost and readily available. <S> These are 1141 lamps <S> Lamps similar to these and <S> their sockets can be had almost for free if you visit a local automobile wrecking (salvage) yard. <A> I would just use a couple of power resistors. <S> Just monitor the voltage under load and make sure it stays at 12V. <A> For fun, get a single 2 ohm resistor, rated at 10 watts (yes, you are dissipating 40 watts). <S> Place this in a beaker or flask 2/3 filled with WATER. <S> Connect this water-cooled load to your 12 volt supply. <S> Enjoy the bubbles.
| Automotive incandescent ight bulbs are what most people use for 12V load testing. If possible, get a power resistor with hollow core.
|
Why there is no brushless field wound DC motor One classification of DC motor separate them into Brushed and Brushless, and then the brushed are further broke down into series wound, shunt wound or externally wound. Brushless motors, on the other hand, are permanent magnet. I dont understand why we cant have brushless shunt wound motor, for instance. Why brushed motors always dont have permanent magnet. It seems that certain combinations simply dont exist. <Q> First, not all brushless motors use permanent magnets (PM). <S> Some are switched-reluctance , e.g stepper motors, or induction motors , particularly large polyphase motors. <S> BTW, one characteristic of PM steppers is that they can be self-locking or cogging, acting as if a detent keeps the armature in position. <S> Second, it's a matter of definition. <S> A shunt-wound motor uses the same power source in parallel for the field and armature, using a mechanical commutator. <S> Replace the commutator with a Hall-effect sensor and electronic switch and it's a brushless motor, but the term "shunt-wound" is not applied. <S> They're still the same basic design, though. <A> It is part economics and part technical conflicts. <S> If you have a huge 5,000 HP motor to pump oil from deep in the ground then 4,160 VAC windings are far cheaper than permanent magnets. <S> I have not heard of permanent magnets being used on motors over 200 HP, but they may exist someday. <S> Small motors give you lots of options. <S> A universal motor can be AC or DC and reversible. <S> Brushless ball-bearing motors are used when long life is important. <S> To a large degree the type of power available to use plays a part as well. <S> AC motors with no electronics tend to have low cost and can be brushless if high torque is not needed. <S> If DC power is available then powerful brushless motors are an option if cost is accounted for, else go cheap and use brush type motors. <S> For cost, which often determines the type of motor used, powerful and expensive permanent magnets are used with a VFD for electric or hybrid cars, as the cost is built into the car. <S> For a disc player it is hard to justify anything but a brush type motor. <S> An electric hand drill uses a universal motor as it is reversible, runs on AC or DC, and the brushes are made easy to replace. <S> Any other type of motor would cost more and weigh much more. <S> This answer may not cover all scenarios but should point out the more obvious reasons for choosing one motor type over another, and why some combinations do not make cost or engineering sense. <A> A motor with a commutator has a stationary magnetic field (stator field) that can be provided with either permanent or wound-field magnets. <S> The magnetic field of the rotor (armature field) remains in a relatively fixed position with respect to the rotor. <S> For the rotor to turn, while the rotor magnetic field remains relatively stationary with resect to the stator, the commutator must switch the rotor current to a different combination of rotor conductors every few degrees. <S> AC motors of all types and brushless DC motors have a rotating magnetic field that resides in the motor stator. <S> Most have a magnetic field in the rotor that rotates synchronously with the stator field. <S> The rotor field can be supplied with permanent magnets, with a wound or cage rotor by induction, with a wound rotor energized through slip-rings, or with a wound rotor energized by a rotating exciter. <S> There are also AC motors that have only a rotating stator field that produces torque in the rotor by acting of the magnetic reluctance of a rotor with salient poles. <S> The above description divides motors into two general classes, those with commutators and those without. <S> The concept of series, shunt, separately excited and stationary permanent-magnet stator fields pertains only to commutator motors because of their fundamental design concept. <S> Motor without commutators are fundamentally different as a class and therefore have different sub-classifications. <S> Universal motors are fundamentally DC commutator motors with series fields. <S> The many types of motors were invented over many years as improvements from the standpoint of performance, reliability, manufacturing-cost etc. <S> As new designs prove their performance and reliability and the cost of manufacturing them has become competitive, they have gained market share. <S> Some designs have proven to be more advantageous than others in different ranges of torque and power ratings. <A> The point of having a brushed DC motor is mainly to provide electrical connection to the coils on the rotor on the motor. <S> It can also be used to provide commutation (reversal of poles at intervals of rotation). <S> This necessitates permanent magnets or a second exciter winding on the rotor. <S> In the case of an exciter winding, a winding in the stator energizes a second winding on the rotor, which causes current to flow in the primary rotor winding. <S> It is this field that the field of the stator interacts with to cause the motor to rotate. <A> this is mainly because brushless motors have no windings on the rotor. <S> If you put elecromagnets on the rotor you need some way to get power to them.
| If you are unable or don't want to use brushes in your motor design, you still need to have a magnetic field attached to the rotor for the stator field to interact with. The value of various performance aspects, physical size and weight and other factors weighed against cost also keep a wide variety of designs in use.
|
avrdude: error: program enable: target doesn't answer. 1 Before I can program my ATmega32 through USBasp but now only in 30 times or more try I can program ATmega32. I get this error avrdude: error: program enable: target doesn't answer. 1 program command avrdude -c usbasp -p m32 -u -U flash:w:pd.hex What's problem and solution? When I try with -F option, I get below message. avrdude: Device signature = 0x887b15avrdude: Expected signature for ATmega32 is 1E 95 02 <Q> I was pulling my hair out as I had received 20 Atmega328P's and the first one I was able to get programmed with my USBasp Programmer, but swapping the processors I was not able to program on breadboard or within an UNO. <S> Thanks to some posts <S> I felt confident it was a fuse setting where it was speaking too fast. <S> I have an external 16MHz crystal in my setup <S> so I used: /Applications/ <S> Arduino.app/ <S> Contents/Java/hardware/tools/avr/bin/avrdude -P <S> usb -v -C <S> /Applications/ <S> Arduino.app <S> /Contents/Java/hardware/tools/avr/etc/avrdude.conf <S> -v -B <S> 10 -c <S> usbasp -p <S> m328p <S> -U lfuse: <S> w:0xFF: <S> m -U hfuse: <S> w:0xDE:m -U efuse: <S> w:0x05: <S> m <S> I found most of this command in other forums but the magic I needed was the " -B 10 " to get it to only speak at a 10us clock rate. <S> Once I did this command line command on my Mac, I was able to use the Arduino GUI to do a Burn Bootloader or Upload <S> Using Programmer without issue. <S> /sw did not auto clock down to find a happy setting. <S> I am using the Amazon HiLetgo which claims "USBASP V2.0" but has very back-level firmware as well, so I needed to update that with the latest (2011) usbasp from Thomas Fischl named: usbasp.2011-05-28 that was a pain also <S> but it's a one time deal though I am waiting on a second programmer to arrive and I will have to re-flash it also. <A> The problem is given in the error message: <S> target doesn't answer <S> Possible reasons are: Incorrect/slacky wiring : <S> Might seem unlikely if you did not change anything since you've successfully programmed the avr before. <S> However, expecially if using a breadboard or jumper cables: Double-Check your connections. <S> Also test for short-circuits between signals. <S> Hardware failure : <S> Overvoltage, a short circuit or drawing too much current from the avr can damage the device so that it is simply broken. <S> Clock speed : If the clock is too high for your target, you cannot program it. <S> Decrease the baudrate by using the -b -option with avrdude. <S> Fuses : <S> Supply voltage missing or not stable. <S> Use a proper supply and bypass capacitors. <A> You should connect the protocol SPI of USBasp to the microcontroller. <S> These are MISO, MOSI, SCK and RESET. <S> Then connect an XTAL of 16MHz with 2 capacitors of 22pF to ground. <S> Finally, connect a resistor of 10K ohms of RESET to VCC. <S> Check: <S> https://www.electronics-lab.com/burning-the-bootloader-on-atmega328-using-usbasp-programmer/
| Improper settings of the fuses might have locked you out, e.g. by disabling the reset pin. The problem seems to be the USBasp board
|
How do I measure very low frequency noise? I'd like to measure low-level noise in the 1 Hz to 100 kHz range, for example at the output of a LDO. For higher frequencies a spectrum analyzer would do the job, but most only go down to the MHz range. I have access to an Agilent E7495A which goes down to 500kHz (kinda), and I have seen a few go down to 9kHz (Agilent E4411B), but I've never seen a 1 Hz analyzer. TI for example has a whole video that describes how to measure LDO noise: https://training.ti.com/engineer-it-how-measure-ldo-noise-and-psrr They show using some kind of analyzer, but what is it? What is the usual type of instrument used for this? Spectrum analyzer connected in a special way, audio analyzer, something else? <Q> A Windows PC can do this for free with Audacity. <S> You still need the coax cables, Faraday shield box if necessary and an AC coupled 50 ohm load. <S> View into a scope and amplify as needed from 0.1 V to 1 Vpp <S> Then measure for 1 minute for a smooth response as shown below. <S> Then feed the noise into your audio input and calibrate with a sine wave. <S> Some PC's have a DC-coupled mic input, with low offset and others have some HPF. <S> You would choose a 1 Hz HPF. <A> You need something with low noise that can do FFT's, and can sample up to ~2x your measurement frequency. <S> What you need depends on how much noise there is. <S> A switchmode or a poor linear regulator is relatively easy. <S> A low noise regulator is likely to need a low noise instrument. <S> Below 100Hz, and especially below 10Hz, the cmos inputs of many devices will be worse than the DUT. <S> If its very noisy, a digital scope might work. <S> LDO's and random LM317, 7805 etc, often have very nasty noise peaks in the 10's of kHz caused by their feedback. <S> These can be easy to see with anything that has FFT. <S> A good <S> 14 bit digital oscilloscope <S> can do it. <S> Good soundcards can cover part of the range. <S> Some used to sample at up to 192kHz (i.e. you can measure to 96kHz), and down to 20Hz. <S> Below 20Hz the ADC often has a digital highpass function built in that you can't get access to turn off. <S> Below 10Hz you may be able to use a good digital multimeter. <S> Note that using the FFT results is quite confusing, when you want to make some absolute value measurements. <S> When you have a single frequency signal, the fft produces a correct value, and the value does not change with samplerate/fft-bin-width. <S> When you look at the broadband noise, the the amount of energy in one fft bin, depends on how wide that bin is. <S> Change the samplerate, and the values all change. <S> You must normalise the value to power-spectral-density (psd) i.e divide the power by the bin width. <S> However when you have both single bin spikes, and broadband noise, you have to decide which is which, and normalise them differently. <S> You will also notice in TonyEE's graph,that there is not a nice smooth accurate line, but rather a great hairy mess, which you can't read the value of. <S> This is because the FFT contains an enormous number of tiny frequency bins, which have wildly different values in adjacent bins (it's noise after all). <S> To clean this up, you need to "thin" the spectrum, summing multiple adjacent bins, so that you have far fewer bins - say 20 bins per decade, with logarithmiclly equal widths. <A> This can be done by using the audio frequency spectrum analyzers (e.g. SR785 or SR1 or venerable HP3562A). <S> They have input noise of <S> ~10-20 nV/rHz which is well below the noise level of things like the LM7805/7905. <S> Of course, better would be something built in this century. <S> An instrumentation amp (either 3 opamp or the AD620) with some AC coupling can be used to amplify ahead of a commercial digitizer like LabJack or even the microphone input on your laptop. <A> Some LDOs operate near 1uA Idd, controlling the gate of a huge PMOS device. <S> With various internal circuits and stages that each need 100nanoAmps to operate, and needing an onchip feedback voltage divider, that voltage divider may be your noise-floor defining circuit. <S> Assuming 100nA (0.1uA) through the divider and 5 volts across the divider, the total resistance is 50MegOHm. <S> Assume the divider is formed of 2 resistors, each of value 25MegOhm. <S> The noise floor of the divider will be 25Mohm || 25Mohm = <S> 12.5MegOhm. <S> The noise density will be 4 nanoVolts/rtHz <S> * sqrt(12.5Mohm / 1Kohm) or 4nV <S> * sqr(12,500) = 4nV <S> * 110 = 440 nanoVolts/rtHz. <S> In 10KHz bandwidth, this scales up to 440nV <S> * sqrt(10,000 Hz) or total integrated noise of 440nV * 100 = 44 microVolts RMS. <S> Because of this (large) noise floor, people designing high-end vinyl-playback systems --- particularly the preamplifers for Moving Coil cartridges, design their own discrete high-idling-current power regulators. <S> Often the topology of choice is a shunt-regulator. <S> You can find discussion of this in "diyAudio", under "simplistic njfet riaa". <S> Notice you are trying to measure 44 microVolts RMS, if you are using a 1uA LDO.For even lower noise LDOs, with some having 1uV total integrated output but quite HIGH idling current because in general the path to low-noise is to use LARGE transistors. <S> And those large transistors have lots of parasitic capacitance that require high currents to achieve adequately high bandwidth in the feedback servo regulator amplifier loop. <S> Thus you need a low-noise preamplifier, AC coupled, between the LDO output and your modern scope with FFT or your spectrum analyzer.
| A low noise preamp with low pass filter, or using several simple analog filters to break the noise into 3 decade bands will also help, with a low resolution system.
|
Why do some MOSFETs have a resistor in series with the gate, and others have a resistor from gate to ground? I have seen many people connecting the mosfet in two configurations the first is when the resistor is in series with the gate and the second is when the resistor is in parallel with the gate which circuit is best when the input into the gate is a logic 1 (5V) or logic 0 (0V)? <Q> The resistors are used for different purposes. <S> It's often good to have both. <S> The parallel resistor is to ensure that the MOSFET turns "off" if the input becomes open circuit or floats. <S> This could be because of a connector or a microcontroller GPIO being tristated (eg. <S> during brown-out reset). <S> If you are switching a large MOSFET with a high frequency PWM you need to have a much lower value series resistor from the driver, if any, compared to simply switching a relay or on/off control of a motor. <S> For example, you could use a 1K series resistor and 100K from gate-to-source. <S> That would only reduce the drive voltage by 1%. <A> The resistors serve two different purposes. <S> The parallel resistor makes sure that the gate voltage goes to ground if the logic input is disconnected (or weak). <S> The series resistor limits the gate current during switching. <A> It's important to observe that when both resistors are used, the value of the pull-down (or pull-up) resistor will more strongly effect the voltage level at the gate. <S> This is because the two resistors form a resistor divider. <S> Thus the pull-down resistor may need to have a large value. <S> This keeps the ratio of voltage across the pull-down resistor to the "series" resistor larger. <S> Example: if the driver output is 5 V, and both resistors are 10K, the voltage at the gate is 5*(10k/(10k+10k)) = <S> 2.5 V, which may or may not be enough. <S> If the pull-down resistor is 100k, the voltage at the gate is 5*(10k/(10k+100k)) <S> = <S> 4.55 V, which is much closer to the original driver level. <S> Here is a link to a web-based simulation . <S> You can change the resistor values by double clicking on them. <S> The "TP" (test point) value shows you the voltage on the gate of the MOSFET. <S> Play around with it to get a better idea of what's going on.
| The series resistor slows the switching of the MOSFET (which reduces the drive current and EMI at the expense of a bit of switching loss on each transistion) and can provide a certain amount of protection for the driving circuit if the MOSFET becomes shorted gate-to-drain. In addition to the other answers, and for completeness, note that it's not uncommon for both resistors to be used, and that the "parallel" resistor as you call it may also be connected to a higher voltage than ground, if the circuit needs it.
|
Voltage divider as supply voltage Is voltage divider is a good option for supply voltage to an IC ? I am working with a 555 timer, MAX232 ,an Inverter SN74LVC and with a 12V relay. I heard that voltage devider is not a best way to step down 12v to 5V for supply voltage. <Q> Is voltage divider is a good option for supply voltage to an IC ? <S> No. <S> At the least use a linear regulator. <S> If efficiency is important and your electronics skills are a bit more advanced, you might want to use a buck converter. <A> The problem with voltage dividers is twofold. <S> The output voltage is dependent on the input voltage, often a nominally 12V supply will be some sort of unregulated high power supply that may vary significantly from it's nominal value. <S> The output voltage is dependent on the output current, to keep the output voltage stable the current drawn by the divider must be significantly greater than the expected variation in output current. <S> For a typical electronic load whose current draw can vary from near zero to whatever <S> it's maximum demand is this means you end up wasting significaly more current down the divider than you end up delivering to the load. <S> As a result voltage dividers are generally only used for signal/control applications, not as part of the power supply path. <S> For example lets assume your electronics can draw between 0 and 10ma and can tolerate a 5% variation in supply voltage. <S> Lets further assume that the 12V supply is a perfect 12V. <S> We design our voltage divider so that off-load <S> it is at the upper end of the acceptable range, <S> 5.25V. <S> So the top resistor has a value of 6.75x and the bottom resistor has a value of 5.25x <S> Now lets put an actual value on that top resistor, the voltage across it must change by no more than 0.5V when the current drawn by the load changes from 0 to 10ma. <S> So it's value must be at most 0.5 / 0.01 <S> = 50 ohms. <S> The bottom resistor will then need to be approximately 38.9 ohms. <S> So under no load we are wasting approximately 0.91 W in the top resistor and approximately 0.709W in the bottom resistor. <S> Under full load we will be wasting a bit more in the top resistor and a bit less in the bottom resistor but the ballpark will be similar. <S> In other words we are wasting over a watt and a half to supply a load that draws a maximum of 0.05W <S> Reality will be even worse, our resistors will have a finite tolerance and our 12V supply will likely not be exactly 12V, so we will have to waste even more power to get a stable output. <A> If you had a constant load, this would work, which none of your loads are. <S> The feedback regulates the voltage no matter the current. <S> Source: Art of Electronics
| Voltage dividers change voltage under load, A better way is to use a zener and resistor, and the best way is with feedback in a voltage regulator.
|
PCB Trace Impedance Matching on microcontroller I'm doing research for the best antenna for a 2.4 GHz connection from our device to a local router. The problem is that our device will have varying loads connected to the other pins of the micro controller. My question is will the varying loads on other pins of a micro controller will effect the impedance matching for the antenna? I have tried searching this with no avail. I have no experience with antennas so pardon if this is a trivial question. <Q> No, it should not have any influence, to my knowledge. <S> Output impedance (that your antenna has to match) is a property of the power output stage inside the microcontroller. <A> Each pin on a MCU has an individual driver. <S> If one pin drives a matching antenna network, any other pins are driving something else independently. <S> Of course this assumes that the power rail for the MCU is solidly driven by power supply and properly bypassed, so any cross-talk over (presumably) common power rail is minimized. <S> The only bad case could be if the antenna driver has its impedance control via some analog circuitry set by a bias resistor, all derived from the same power rail as the antenna driver itself. <S> Then any rail ripples will change the driver impedance proportionally to ripple amplitude. <A> Your MCU has internal rails/busses for VDD and GND. <S> As output drivers go through HI or LO to TRISTATE/OFF, the impedance of the GND and VDD rails will indeed change. <S> Thus the GND (likely also the Substrate of the silicon) will experience varying impedance to GND of the PCB. <S> Will this be a problem? <S> Get a Network Analyzer and characterize the RF pin. <S> Or drive that pin with a 0.1 volt square wave with 1nanoSecond edge, and examine how the edge undershoot/overshoot changes as the MCU program runs through its various tasks.
| But varying loads on other pin shouldn't have any effect on impedance matching.
|
Why am I getting shocked from "hot" line and touching "ground" (Earth) So I live in an EU country and don't have Earth grounding for my house. Still I am getting shocked when touching "hot" line (220VAC) and standing on "ground" (Earth). How is this possible? From my understanding it needs to close a circuit to generate a current flow through my body. I heard of some sort of capacitance that can close the circuit, but didn't fully understand the concept. (It will close the circuit between "ground" and neutral through air ?? So current will flow through me, ground and neutral) So to extend this idea, if getting a "hot" line somewhere far from civilization will cause a current to flow through me and then "ground", going back to the source. Neutral line is not touched in any way. Just floating. <Q> You are completing a circuit. <S> So the circuit is from the hot side of the supply to the "hot" line you are touching, through you, into the ground, along the ground, into the earthing conductors for the building, through the ground-neutral link into the neutral side of the supply. <S> See also 2nd diagram at shock current path <A> You probably do have earth grounding. <S> The "neutral" wire is probably grounded somewhere where you can't see it. <S> When you touch the hot wire, current flows through your body and maybe your shoes to the floor, and eventually back to the source, through ground and maybe through some part of the neutral wire. <A> It is normal for the neutral to be grounded at the transformer. <S> It may be grounded in other places as well, such as in other people's homes. <S> So the circuit is from the transformer, along the hot wire, through you to the ground, through the ground to the earth rod at the transformer, through the connection between earth and neutral at the transformer. <S> May I suggest a couple of things? <S> Stop touching the hot wire. <S> One day you will be better grounded than usual. <S> It only takes about 30mA to kill a person. <S> Get your home electrics fixed. <A> Grounding is a safety measure - it's done to prevent too high voltages inside electric equipment in cases of serious high voltage line faults or lightning. <S> Think for example a water pump. <S> The local ground potential jumps due a lightning strike or a HV line drops down. <S> The water pump goes under enormous stress if the electric supply system doesn't get the same potential jump. <S> Grounding brings the potential jump to the electricity supply wires and nothing special happens - except maybe a violent arcing in the protection tubes of the local electicity delivery transformer station. <S> The wires which bring the electricity to your house are connected to the same transformer than the lines which supply the neighbour. <S> If you have omitted the local grounding of the neutral line, the neighbour can be more careful. <S> As a side product you have a voltage between your local ground and the live voltage line. <S> As a bonus you get a reduced voltage between your local ground and the neutral line in case of HV faults and lightning. <A> There exists some 100pf of capacitance around your body, effectively turning you into antenna. <S> The human body also has roughly 2kΩ of resistance at 220V, so whatever your standing on or touching can become a pathway (which means the pathway is roughly 500kΩ, people generally start feeling current at 0.25uA. <S> Everything has resistance, even air (although its usually 10^7 Ohms or greater), the floor (wood is ~100k), walls and the foundation of your house all have resistance. <S> While it is probably quite high, its not as high as you would think. <S> Interesting table, resistance of the human body: <S> Source: Wikipedia Electric Injury <A> "I live in an EU country and don't have Earth grounding for my house." <S> That is a common situation in some countries, but is NOT the case in the USA. <S> For the "EU" style system, imagine a power company transformer somewhere near your house. <S> That transformer steps down a very high AC voltage (1000-5000VAC) to the 220VAC that you expect and routes that lower voltage to one or more customers via a pair of wires. <S> There is no formal (i.e. deliberate) grounding provided; both of the 220VAC wires are ideally floating, not connected anywhere to ground. <S> However, there are at least two causes why touching a 220VAC wire at the same time as earth/ground can produce a shock (or worse). <S> First case: <S> The transformer itself has capacitance between its high voltage AC input and its low voltage (220VAC) output; this means that AC current can flow through that capacitance from the high voltage primary wires into one or both of the low voltage secondary wires. <S> [All capacitors can pass AC current of some amount, with little being required to shock a person.] <S> The current flows through the capacitance, through the low voltage wire, and through you to earth. <S> Meanwhile...somewhere (perhaps many kms away) there is a connection from the high voltage wires to earth via either another capacitive path or via a direct connection. <S> After shocking you, the current passes through the earth all the way back to the distant ground (either direct or through capacitance) of the high voltage wire...completing the necessary loop for current flow. <S> Second case: 220VAC is available to your neighbor using the same wires that provide 220VAC for you. <S> However, your neighbor has either deliberately or accidentally made a connection (either direct or via capacitance) between one of his 220VAC wires and earth. <S> That means that the wire your neighbor has NOT made a connection to is now 220VAC relative to earth--it is no longer floating. <S> If you touch the wire your neighbor has not grounded, you will certainly be shocked (or killed). <S> In reality, both cases (and others) can exist at the same time, complicating the analysis but still shocking you. :)
| In most homes there is a connection between Earth/Ground and Neutral at or near the point where the electrical supply enters the building.
|
Proper insulation of wires connecting to the submersible pump (5V) I'm building a simple plant watering station, which uses a relay-controlled submersible water pump (this one) . The intent is to submerge the pump into a large enough water container to avoid frequent refills, but this means that the point where the pump's relatively short wires are extended will be submerged as well. So here's the question: what is the correct way to insulate such joints? I'm currently using shrink tubing but I doubt it seals it well. Is there a better way? <Q> Low-cost waterproof tubing and splices are found on Amazon. <A> I am not going to comment on how well this survives long term immersion, or that it is best for this job... <S> To make heatshrink waterproof you use a hot melt gun to smear hotmelt onto your wire, ensuring that it is continuously wetted all the way round, and for a 1" length. <S> Then you heatshrink over it, which melts the holtmelt into a continous seal. <S> You only need the minimum hotmelt for full wetting. <S> If I was doing it for under water, I would do the two wires separately. <A> There are a wide variety of commercial to-code solutions to this. <S> Search for “waterproof wire connectors”on Amazon to see some. <S> Both butt crimp types and gel-filled wire nuts would work for you. <S> But for such a simple application, even $7 for a bag of connectors is probably overdoing it. <S> Put a fuse in the line to protect the power supply, solder the wires, clean them, and then wrap with plastic electrical tape. <S> With relatively clean water, that’ll last for years. <A> Thank you for all the options. <S> Looks like, given the gauge of the wires, waterproof terminal connectors would be an overkill, whereas the sealing quality of shrink tubing could be questionable. <S> Turns out Liquid Electric Tape <S> was exactly the right tool for the job. <S> Thank you, crj11!
| You can get "waterproof" shrink tubing that is lined with hot met glue. If you use clear heatshrink you can see if it is all sealed ok, and later, if water got in.
|
Controlling the power through a heating element? I need a 25mm x 30mm 120V 200 watt band heater. Unfortunately, the only 25mm x 30mm 120V band heaters I have found are 300 watt. What sort of circuit could I construct or purchase that could regulate the current flowing through a large heating element like that? Ideally looking for something off the shelf. I'm used to limiting current (say, through an LED) with a small resistor. I have no clue how to design for something high current like this. Doesn't have to be adjustable, literally all I want to do is ensure the heating element dissipates 200 watts, not 300. I'm guessing the element is resistive. My power supply is 250 watts, so I'm not trying to dissipate any power in the control circuit. <Q> You can't get the power down to 200 W with resistors unless those resistors can handle their share of the power. <S> In other words, the resistors would need to be more heaters. <S> If your heaters are 300 W, putting two in series would double the resistance and halve the power. <S> Or you can find another resistor (a power resistor or heater) which will bring you to exactly the power you need: at 120 V, your target current will be 1.66 A. <S> The resistance that will give you this is 72 Ω. <S> Your current heater is 48 Ω, if the given wattage is accurate. <S> So you need to add an extra 24 Ω of resistors/heaters that can handle 1.66 A. <S> The power will be I²*R , and if you split it over two resistors, metal power resistors should be able to handle that. <S> Another way to arrive at the exact power output you need is to cut out part of the waveform with a solid state AC dimmer (I think something based on a triac). <S> The peak current output will still correspond to a higher power than your power source is rated for, but the average power can be tuned to be the power you want. <S> I'm not sure whether AC can be dimmed with PWM, but if so, that's also an option analogous to using the triac. <A> Assuming you mean 120 V AC , there are two simple ways to reduce power. <S> A transformer can be used to buck the AC line voltage down to 98 VAC. <S> The 300 W heater has a warm resistance of 48 ohms, so would dissipate ~200 W at the reduced voltage. <S> Since the cold resistance might be a trifle less, it would initially draw more current, so a 3 amp secondary rating should be safe. <S> For example, either Hammond 167M20 , which is rated 20 VAC @ <S> 3 A, or Hammond 166M24-BULK , at 24 VAC @ <S> 3 A, would probably be within your required tolerance. <S> Be careful to check the output voltage, first open circuit, to be sure the secondary is phased to buck line voltage, and under load, to be sure it's close to 98 VAC to the heater. <S> Phase control is easy to implement and uses a small device, but needs calibration and might go out of adjustment, while the transformer is heavy and bulky, but reliable. <S> N.B. <A> AC: use a lamp dimmer <S> If your power source happens to be somewhere in the range of normal grid voltage and AC: A resistive heater is indistiguishable from an incandescent light bulb (if you close your eyes). <S> So, a dimmer for halogen lamps will work. <S> (internally, that's a phase-fired controller, but really, for your purposes: it only turns on the heaters for a percentage of time). <S> They can be had for a couple of € at furniture stores and construction / home improvement stores. <S> There's ready-to-use PWM controllers for that, including FET gate drivers. <A> 150W is probably close enough. <S> Just use a diode. <S> simulate this circuit – <S> Schematic created using CircuitLab
| A phase-control device such as a light dimmer can easily handle 200 W, but calibrating to exactly that power might be an issue, as is insuring that in the event of failure of the control, power would never exceed 200 W. In any case, use a thermal fuse to prevent overheating. DC: follow piojo's advice ... and just use PWM with a MOSFET as switch (no need for overly large flyback protection diodes, can probably use one with an integrated one), setting your duty cycle to whatever makes the device output what you need.
|
Broken stepper motor - Too high of a load? I am using a NEMA 17 (17HD4005-22B) with a Big Easy Driver and an Arduino Uno R3. I am using the motor to move a threaded rod, which then pumps a liquid. The system basically functions as a linear actuator. After trying to move a much too high load, I noticed that the stepper motor was not turning correctly. It moved erraticaly forwards and backwards a couple of steps. I also noticed to following: When I give it the signal to turn, I can turn the shaft very easily with my hand in either direction When it is powered and without any signal to turn, I can turn the shaft easily with my hand in either direction most of the time. If I crank the potentiometer all the way, I can not move it anymore I connected the motor to the stepper drivers of an i3-clone printer, and the motor does not turn. The previous two observations remained I connected the Big Easy Driver and Arduino to one the motors of the 3D-Printer and the 3d-printer motor did not turn Both windings of the broken motor have the same resistance My doubts: Is it possible that the high load caused the stepper to break? Is it possible the driver is also broken? How can I check any these possibilities? <Q> Motors fail from inadequate current controlled torque. <S> Your testing and results in your question must include; coil DCR of each motor, current setting / rating, max acceleration, max velocity threshold for slip errors <S> It unlikely you have a faulty motor and more likely <S> excessive acceleration for the new load. <A> A quick Google on the part number reveals that your stepper motor is a four-wire stepper motor, rated for 2.4VDC and 1.3A. <S> That works out to 1.8 ohms for the coil resistance, and your measurements are close to that. <S> You don't say whether windings are shorted together, but I strongly doubt that they are. <S> My FIRST guess would be that your controller is not able to supply enough current to drive or hold the motor. <S> In motion, or in hold, your controller must supply 2.6 amps (1.3A to each winding). <S> Stepper motors generally don't break if the applied mechanical load is too high. <S> They just sit there, slipping steps and getting hot. <S> You don't mention a heat sink on your controller. <S> My guess is that you've smoked your controller. <A> It's probably the motor controller. <S> If the motor were to fail usually its from heat and it either seizes up or the winding's fail. <S> If the motor works, then it must be the driver. <S> My bets are that the driver is broken.
| To check the driver, get a motor that you know works and use it with the driver. Check the windings with an ohm meter and make sure the winding's are continuous and low resistance (or check the datasheet if it has a winding resistance).
|
Electrically Grounding a Large Heatsink to PCB Layer Ground I have a 100x100mm board that is directly attached to a same sized heatsink on one side (touching heat producing IC packages). The board is 4 layer, with a large ground middle layer. Is there any reason I should NOT be connecting the heatsink screw hole mount pads to this middle ground layer? <Q> Is there any reason I should NOT be connecting the heatsink screw hole mount pads to this middle ground layer? <S> One reason not to is that you may turn the heatsink into an antenna and unintentional radiator if your ground is especially noisy. <S> This is an unlikely scenario though and is very much dependent on the design. <S> In most cases grounding the heatsink electrically will help cut back on noise. <S> The other reason is if the heatsink could bleed heat back into the PCB in an area you may not want it. <S> Something to think about and design for. <A> Being a large, conductive part that is not intended to carry current, if it is in proximity to line voltage conductors (in the same case and not mechanically separate for example), it should be grounded to the case, which should be bonded to the bonding(green conductor). <S> If this is the case and it cannot be grounded (eg. being used as a conductor) <S> it should be mechanically separated from the user (protected by casing) and possibly insulated. <S> Reason <S> this matters is that if you're involving line voltage, the ground for your circuitboard is actually the white wire(neutral/identified conductor), not the green one, and it is important to use the white wire for all current that is intended to flow, and the green wire for all current that is not intended to flow. <S> If you're designing a device that does not come into contact with line voltage, I'm pretty sure you just need to worry about RF effects and if you want you can use it as a large ground bus. <A> The internal ground plane should be used as a heat spreader. <S> This means there should be thermal vias from the heat source(s) to the ground plane. <S> There is no reason the heatsink should not be electrically as well as thermally connected to the ground plane. <S> Even without thermal vias the internal ground plane will spread the heat to the heatsink mounting holes.
| In technical literature is very often recommended to use the ground plane as a heat spreader and the component's thermal pad be connected to the ground plane.
|
"Capacitor" for regulating AC line voltage? I have an issue with my air conditioner. When it clicks on, the lights in my apartment dim for half a second. If this was a car audio system, I would just wire some large caps up to the battery to smooth out those current spikes. However, this is an AC circuit and a cap won't work here. So what's the equivalent? What can I install on my circuit to help smooth out these spikes and prevent that annoying voltage sag? Changing the wiring of my house etc is not an option, I need to fix this myself, so please don't suggest that. <Q> You can choose to use a separate breaker and power distribution cable, but if the ACU draws excessive surge starting current and your Voltage line drops more than 10% , all you can do is use regulated LED lighting to reduce the effects. <S> Capacitors perform the job of stabilizing voltage and providing the necessary jolt ( combined with higher current ) to start the motor in the first place. <S> In an air conditioner, capacitors are connected to the compressor motor for start and run operation. <S> Your residence wiring or ACU load is sub-standard during startup and this may be outside your control. <S> ACU compressors often draw 300% to 500% of rated power during startup. <S> Check the start-cap for failure. <S> Ref <S> Essentially the Start Cap must be very big to act as a Power Factor ( pf ) Correction to the low inductance starter winding and thus reduce the reactive load current on the line causing voltage sag during startup. <S> It must be rated for large ripple current and high voltage. <S> It reduces the line current loss thus raising the voltage to improve start times to normal and reduce light dimming effects. <S> In other words, the motor startup has higher reactive current which is partly supplied by the negative reactance of the caps. <S> Ideally all of it, but this may be costly and very bulky. <S> I do not know the exact pf criteria they choose for residential start motor caps but the intent is to reduce the surge ratio above rated load current. <S> Anyone? <S> But I found this <A> Ask around your building to see if it also happens in other apartments. <A> If the inrush current were only a problem when turning on the appliance, a soft starter would make sense. <S> Unfortunately, in this case, the appliance may turn itself on unsupervised. <S> A large thermistor can be used with air conditioners to tame inrush current, which can easily be over 10x the steady-state current. <S> Needless to say, with the power level involved, it must be selected and installed carefully. <S> As it would become part of the permanent installation, in many countries a licensed electrician would need to install it: if a fire resulted from do-it-yourself installation, you would not be able to claim insurance. <S> As for selecting the thermistor, you could contact an applications engineer at a suitable manufacturer for advice. <S> There are several suitable manufacturers. <S> Ametherm is one example. <S> They have a guide to selection for air conditioners on their website here . <S> Added <S> See the comments below this answer. <S> Despite what manufacturers would have you believe, this isn't an appropriate solution!
| If it happens only in your apartment then maybe your air conditioner is too powerful for your electricity or only one connection from the main electrical panel to your apartment is faulty and dangerous (it might cause a fire).
|
Illuminate an LED when a ground switch is open I have a switch that connects the negative side of a solenoid to ground when closed and I need to have an LED that is illuminated when the switch is open. I was thinking of using a transistor to do this but I am not sure exactly how to incorporate it with the solenoid. Any help is greatly appreciated! <Q> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> LED on when SW1 is open. <S> How it works: <S> When SW1 is opened up to 5 mA (24 V / 4k7) will flow through SOLN, R1 and D1. <S> The circuit relies on the solenoid having a high holding current (say, > 20 mA) relative to the required LED current so that the LED current does not keep the solenoid on when SW1 is opened. <S> When SW1 is <S> closed R1/D1 is shorted out and the LED will turn off. <S> When SW1 is opened the inductive spike which might damage D1 is shunted by D2. <S> If you wish to be more precise with the D1 current calculation then add in the DC resistance of SOLN to the current calculation for the LED. <A> A few milliamperes will flow through the solenoid when the switch is open, but that probably won't cause you any trouble. <A> Just whipped this up, hopefully it helps :) <S> simulate this circuit – <S> Schematic created using CircuitLab <S> When the switch is open: <S> The gate of the N-Channel is pulled up to whatever voltage is set by the divider. <S> Usually you wouldn't even need the divider, and could simply tap onto the end of the solenoid. <S> But the MOSFET you choose most likely won't be able to handle Vgs = <S> 24V, so use the divider to set an appropriate voltage. <S> Here I have set it to 8V, which will absolutely turn on 99% of MOSFETs, but is also well under the typical 12-15V max Vgs rating. <S> While the solenoid is in series, there is 0A flowing into the gate at steady-state, and so it's as if the solenoid isn't even there and is a short-circuit. <S> When the switch is closed: <S> The input of the divider will be 0V, and so the gate of the N-Channel MOSFET will be driven to 0V. <S> Therefore, Vgs = 0V. <S> So the MOSFET will be off <S> and so the LED will also be off. <S> You can play with the value of R2 for different LED brightness levels. <S> For a 24V rail, and a typical 3Vish forward voltage drop LED, 1K is a good starting point for 20mA which is your typical hobbyist LED current. <S> Also make sure you choose high-impedances for the divider, like I have here. <S> This is because "technically" the solenoid is always on, as current flows through the divider. <S> But if you make these hundred Kilo to Mega range, the solenoid is practically off and chewing next to 0W of power.
| If the solenoid normally draws much more current than an LED, just connect a resistor and LED from the negative side of the solenoid to ground.
|
C struct v union in embedded programming - why? Is there anything that a union can do that a struct cannot? I know that one might use a union to save memory space, but these days it hardly matters. <Q> The use of a UNION permits formatting a particular storage allocation to different variable types or layouts. <S> This can be used to advantage in a number of ways. <S> Here are a couple of examples. <S> You have a UNION that defines the various record layouts for packets of data that arrive from a communication channel. <A> The difference between a Union and a struct already has been explained. <S> If you know there is only one value (which can have different types) than use a union. <S> optionally you need another variable that keeps track what type the union is. <S> Like: union { <S> uint8_t value_8; <S> uint16_t value_16; uint32_t <S> value_32;};enum EUnionType { VALUE_8, VALUE_16, VALUE_36 } _unionType; The enum _unionType can be set to VALUE_8/16/32 to denote what type the union has. <S> About memory: Memory IS important, especially for some microcontrollers which have less memory (e.g. Arduino Uno with 2 KB). <S> And if you have 400 of these unions (in an array) it is a difference: <S> Struct: 4 + 2 + 1 bytes = 7 bytes, per element. <S> Times 400 = 2,800 bytes - <S> > Does not fit in memory. <S> Union : 4 bytes * 400 <S> = 1,600 bytes - <S> > Fits in memory. <A> Within a union, every element is stored at the same memory location, e.g. union{ uint32_t a; uint8_t b[4];} If you modify b[], you also modify a, because they're using the same physical adress. <S> It's convenient, if you have use data as different types. <S> Within structures, each element is places one after the other with different adresses. <A> As already described, Union is a kind of predefined typecast, where all elements will share the same memory space, so is pretty handy to do data serialization and deserialization (as long both systems share the same endianness) <S> As example: For accessing the second byte of a 32bit int using union: #include <stdio.h>#include <stdint.h <S> > <S> int <S> main(void) <S> { union{ uint32_t a; uint8_t b[4]; } test; test.a = 0xAABBCCDD; printf("Hello, world! <S> %x\n", test.a); printf("Hello, world! <S> %x\n", test.b[1]); return 0;} The exactly same thing could be done with a type cast: <S> #include <stdio.h>#include <stdint.h <S> > <S> int <S> main(void){ uint32_t test = 0xAABBCCDD; printf("Hello, world! <S> %x\n", test); printf("Hello, world! <S> %x\n", ((uint8_t*)&test)[1]); return 0;} <S> The difference is that the union already "packed" the access for you, allowing you to access the same data in a "clearer" way.
| You can use the UNION to efficiently unpack data from one variable type to another such as overlaying a "uint_32" with a "uint_8[4]" to unpack bytes from a dword.
|
Constant Current LED Driver with Raspberry Pi Zero W I have a 12 V DC source that I'm wanting to run a Raspberry Pi Zero and a couple of 3 W IR LEDs. I'm not using the Pi to control the LEDs in any way. The LEDs are just to provide lighting at night for a camera running on the Pi. I have a cc/cv buck converter to run constant current to the LEDs at 1600 mA. If I limit the output voltage to 5 V, could I run the Raspberry Pi off the same buck converter? Or do I need to do this in 2 parts with one converter to reduce 12 V to 5 V for the Pi, then run another separate converter to keep the constant current for the LEDs? <Q> Aside from various possible disaster scenarios, the Raspberry Pi power consumption varies widely perhaps from 0.4 to 1.5W. That would cause the light output from your IR LEDs to vary considerably, so I don't think it's a good idea. <S> I suggest running both converters from the 12V input rather than chaining them, for better efficiency. <A> It's not terribly uncommon to chain together power supplies. <S> For instance, many higher end electronics have a VSYS which is typically the switched voltage between 5V USB and battery voltage. <S> That then gets bucked down (or even lowered with an LDO depending on what's being powered) to the voltages needed by the processor, sensors, flash etc. <S> I'm not sure what type of 12V supply you're using <S> but if you're using a battery you will have to be careful about the quiescent current of the buck when it's not in use. <S> From a cost perspective though it makes sense to run everything off the same constant voltage supply but you need to be sure that as Spehro mentions that the transient current from the processor may cause issues. <S> If your supply is rated higher or equal to the max of the Pi and the LEDs you should be good. <A> A CC LED driver doesn't have a definite voltage output. <S> The voltage will be determined by V(f) of connected LEDs, in accord with their (individual) I-V curves. <S> If you LED has V(f) <S> = <S> 1.6 V (+- 0.1 I guess, depending on current and temperature), you can connect 3 LEDs in series to your CC driver. <S> Then the total voltage would be 4.8 V (+-). <S> This should be enough to power the Raspberry Zero. <S> As a matter of fact, LEDs can be used as "parametric voltage stabilizers" instead of Zeners, with about same quality of voltage regulation. <S> So 3 LEDs should form a sufficient stabilizer, since RPi uses PMIC (PAM2306AYPKE), which is tolerant to 5.5V. <S> So this should work if you put 3 LEDs in series. <S> It will have some effect on LED brightness. <S> Or make your Rpi code to consume constant power, and adjust the CC limit accordingly. <S> Of course if one of your LEDs suddenly dies (which do happen with them), your Rpi might be in trouble, so you might want to design some extra protection from overvoltage unless your CC doesn't have one. <S> But you said you can set the driver to no more than 5 V, then you should be fine from all angles.
| The only small concern is that the Rpi might have variable power consumption, which will eat into your fixed CC budget, and steal some current from LEDs as Spehro Pefhany noted . If constant brightness of LEDs is important, you will need to use a separate DC-DC 12V-5V converter to feed your Rpi.
|
Fluctuating ADC reading for 4-20mA pressure transducer input I am working on a project of water pressure measurement, in which I used a pressure transducer which gives me output between 4-20mA current form. I am using a 250 ohm resistor to convert current into voltage, and then I give this voltage to ADC of an Arduino Uno channel 0 (A0). The ADC reading is continuously fluctuating up to 10 decimal numbers (ADC value varies + - 5 counts.) I have also checked by connecting a multi-meter and measuring the sensor current reading for a particular pressure. The current reading is stable (does not even fluctuate 1 or 2 points.) Also I have checked voltage value after 250 ohms +Ve and ground. The coonverted voltage is also showing very stable. Why is the ADC reading fluctuating? I am using an Arduino Uno, it doesn't have any changes in AREF, AVCC etc. Please suggest effective solution. My code is as follow.. const int analogInPin = A0; // Analog input pin that the potentiometer is attached toint sensorValue = 0; // value read from the potvoid setup() { // initialize serial communications at 9600 bps: Serial.begin(9600);}void loop() { // read the analog in value: sensorValue = analogRead(analogInPin); // print the results to the Serial Monitor: Serial.print("Reading: "); Serial.println(sensorValue); delay(1000);} <Q> A variation of 10 counts out of a maximum 1023 is about 1% of full scale, not bad for an Arduino. <S> This is equivalent to about 50 mV <S> and you probably have that much noise on the input signal and AREF. <S> If the problem is noise and the noise is a random fluctuation <S> then you should be able to improve the readings by averaging. <S> Try summing 16 or 32 values and then dividing the result by 16 or 32. <S> (I proposed 16 and 32 because they are integer powers of 2 so performing unsigned integer division with these values is easy and fast...shifting.) <A> Your multimeter averages over a good part of a second <S> so it's not really measuring the same thing. <S> Look at the ADC input signal with an oscilloscope , set to AC range with a sensitivity of perhaps 100mV or 250mV/division. <S> Since your ADC is 10 bits and 5.0V reference, you are reporting (as added in the comments) +/-5% peak-to-peak variation out of 5.0V full-scale, which is +/-250mV (and about +/-50 <S> ADC counts). <S> That will tell you how real that signal is. <S> It could also be affected by interaction between your serial communications ground and any grounding in the sensor circuit. <A> As @Spehro Pefhany has already pointed out, you should use an oscilloscope to view your signal rather than a multimeter. <S> Here are some good general practice which you should follow: <S> Always have a bypass caps near to your 'AREF' pin to remove any potential noise. <S> Although you can't get away with all of the noise. <S> Instead of taking one measurement every time to 'see' a measurement, take mean of, for example, 10 readings at some interval. <S> This is simple but very effective. <S> Put a low pass filter (LPF) in front of ADC to remove any noise from the input signal. <S> But be careful about designing that LPF. <S> Try the above tips to have more accurate measurement. <A> If the problem is noise related you may be able to reduce the error via averaging. <S> Just change your code to the following and see what happens. <S> const int analogInPin = A0; // <S> Analog input pin that the potentiometer is attached toint sensorValue = 0; <S> // value read from the potvoid setup() { // initialize serial communications at 9600 bps: Serial.begin(9600);}void loop() { //compute average of 32 sensor readings sensorValue = 0; for(int i=0;i<32;i++){ // read the analog in value: <S> sensorValue += analogRead(analogInPin); delay(31);//wait 31ms } sensorValue = sensorValue / 32; // print the results to the Serial Monitor: <S> Serial.print("Reading: "); Serial.println(sensorValue) <S> ;} I chose a 32-sample average because you can only add 32 ADC readings without overflowing a 16-bit signed integer. <S> If you move up to 32-bit integers you can average larger data sets. <S> Also, if your noise is related to the 60Hz power frequency, you may get better noise cancellation by changing the 31ms delay to 1/2 of a 60Hz cycle (which is roughly 8ms).
| It could be caused by actual variations in pressure or vibrations of the sensor.
|
Very Long Range Beam Break Trigger Sensor I am having trouble locating solutions for a long range trigger sensor. Want to detect an approaching vehicle 300 feet or more down the road from a pole mounted device. My first thought was a laser or IR beam break sensor, but the only ones I have seen need a reflector at the target point and the unit registers the absence of the reflected beam when obstructed. I cannot put a reflector in the middle of the road. Only device I have ever seen that works similar to what I need are laser range finders but I would have no idea how to reverse engineer one. This sensor would supplement a PIR dome lens sensor in a security application. Can't give too many specifics but the PIR works great for pedestrians. However there is an inherent delay within my system between trigger time and when the system becomes active, meaning that fast moving vehicles are long gone before the system activates. <Q> One idea: Use a CW microwave radar motion detector (=an intrusion alarm device). <S> You must find the needed reflector size and focal length by making experiments. <S> There's a couple of traps: Vehicle speed can be out of the detection range (=too high doppler shift) and your local law can limit the allowed beam power densities. <S> Detector's transmitter can be legal as is, but when all power is directed to a narrow beam, the beam can be illegally strong. <A> Another possibility, if you (or your customer) owns the road in question is to install an electromagnetic vehicle detector. <S> You install a single conductor cable mechanically protected under the surface of the roadway in a loop about the size of a compact car's outline or a bit smaller. <S> Apply an AC signal and measure the current. <S> A car being present above the loop will act as an iron/lower reluctance core and increase the inductance of the loop, affecting current. <S> If you see a square pattern on a roadway with cuts across the corners before an intersection, this is where a sensor has been cut in after the fact. <S> A double bladed concrete saw cuts a trench for the conductor, with the corners cut to avoid bending the somewhat rigid cable too harshly, the cable is laid into the trench and the gaps are patched with asphalt/tar/cement as appropriate. <S> You may also be able to simply mount a second PIR sensor at the side of the roadway and at an upstream location. <S> If you have networked lighting controls, this could be quite viable, cheap and easy. <S> Even without it may be a good option. <S> There is a wide range of available sensitivity, and you can get their trigger area down to a fairly small cone or wedge with some types. <A> Take a LED (array if needed) producing 1 watt of IR. <S> Run that thru a lense system to generate 6" diameter beam of low dispersion. <S> Aim that beam down the road, or across the road as some slight angle. <S> Modulate the beam at 30kHz, so TVremote controls are not a problem. <S> This is your transmitter. <S> Use a 1" lense, focused on a photodiode, to monitor that portion of road 300' away. <S> This is your receiver. <S> Assume the Receiver is 200 feet from the intersection of the TX beam and the RX beam. <S> When the car intersects the TX beam, that 1 watt of IR energy at 30kHz will be scattered; assume the scattering is uniform over a hemisphere; we now have an energy density to use for some math. <S> The RX lense, 1" diameter, is 200 feet from the car. <S> The area of a hemisphere 200 feet in radius is 0.5 <S> * (area of sphere with radius 200') <S> or0.5 * 4 <S> * PI * 200 <S> *200, or 6.28 * 40,000 or 250,000 square feet. <S> In square inches, to easily work with our RX lense, we scale 250,000 by 144 (inch/foot)^2to 40,000,000 square inches. <S> Thus we've just computed the RX system will have energy of 1 watt / 40Million or25 nanoWatts of energy. <S> Modulated at 30kHz. <S> Now you have a simple sensor problem. <S> Assume the car is in the beam for 10 milliSeconds, <S> so you know a noise bandwidth. <S> Power is 25 nanoWatts. <A> I think you've already said a beam break solution is not going to work, so it was perhaps a poor title for your question. <S> If you want to detect an object at 300ft then the arc posed by the target object is quite low (around 1deg for a car front view) and you need a sensor with equally high angular resolution. <S> I'd suggest you might experiment with something like this Garman Lidar unit (good out to 120ft) which can give you a 3D point in space detector. <S> This would be as close to 'beam-break' as you could get with a single non-moving sensor. <S> There are quite a number of single plane/point Lidar solutions you can investigate. <S> If you want to experiment with lower resolution (area saturation) sensors you could try the TerraRanger EVO range, with the new EVO 60M a possibility. <S> You can get these in the US from Robotshop . <S> I doubt this is going to work at your required range though. <S> but they are professional prices too. <S> This Ibeo automotive Lidar would fit the bill, or perhaps this SICK LD-MRS unit would be ideal, both of these are 4 plane Lidar. <S> Autonomous Stuff carries a wide range of Lidar.
| Place the sensor in front of a big enough parabolic reflector to get narrow enough transmitting beam and big enough echo signal catching area. If this is a professional solution then there are lots of Lidar units available that will provide the required resolution and range ...
|
How do I keep the "detected" state ON in a PIR detector until a human has left the detection area A PIR detector stops alarming after a while, if a human in the detection area doesn't move. How do I keep the alarming state ON as long as there's a human in the detection area even if he doesn't move? <Q> PIR sensors do not actually sense the presence of a person, they sense the motion of some large thing that has a significantly different temperature than the surroundings. <A> Assuming there's no large temperature differences in the room you can try to rotate slowly the detector forth and back few degrees with a motor mechanism. <S> I bet the intruder cannot follow it accurately enough. <S> Other possiblities: after a detection start to monitor possible ways off. <S> As long as nobody hasn't gone assume there's still someone (not good <S> if there's enough room for 2 or more and they know the logic) <S> use another detection principle - a static one which doesn't need motion. <S> There are many of them. <S> For ex. weight on the floor, changed normal camera image, changed IR camera image, changed ultrasonic standing wave pattern, incrased losses in a big induction coil, reduced capacitance between the walls, detected breathing sound, increased CO2 or other gases in the air etc... <S> persuade the human to want to move. <S> Have for example a massive tesla coil discharge to increase the restlessness <A> A possible solution considering that the human has already been detected by the PIR sensor and your notes: "... stops alarming after a while ... <S> How do I keep the alarming state ON ...? <S> ": A relay (K1) with two contacts (K1_1 and K1_2) can work such as a flip-flop (interlocking in true) storing the ON state. <S> The additional switch shown (or transistor) could to RESET the system.
| If a person stops moving then a PIR sensor will not detect the presence of the person; that's just a fundamental characteristic of the sensor.
|
How to connect/disconnect signal line electronically? I sometimes do electronics projects as a hobby and as far as I know if you want to switch something in a circuit electronically, transistors are the way to go. And I have used them successfully before to control high current loads such as LEDs or DC motors with a micro-controller. But what I'm trying to do now is to turn a TTL serial connection on and off. As if I was physically disconnecting the TX wire from my micro-controller's RX pin. And I have realized that every tutorial I've ever read about using transistors as switches ( this one for example) assume that you are using the transistor to turn a load on or off. I found a few similar questions on the Internet but they all are drifted away from the subject one way or another and left unanswered. ( This and this for example). I have actually managed to do it myself, with the following circuit: My though process behind this is: A transistor connects the Collector to the Emitter when it is saturated, so when I "turn on" the transistor, TX should get connected to RX . And it actually works! When nothing is connected to the base my micro doesn't receive anything. When I connect 5V to the base the micro starts receiving serial data. I'm outputting this data to a serial console and it's valid, non-gibberish data. But having learnt from previous experiences, after achieving this I started searching the Internet to see if this is the proper way to do it. But I couldn't find anything about how to switch a signal/data line on and off. As I mentioned, they are all about switching loads using NPN or PNP transistors to connect to GND or VCC respectively. What I want is something that acts exactly like a physical switch, that I can put anywhere in the middle of my wire and connect/disconnect it. Which my circuit seems to be achieving. So am I doing it right or am I just getting lucky? I have a feeling that I'm just getting lucky. <Q> This is probably not the best way to do this, as the voltage will drop 0.6V across the transistor (assuming its saturated, which it's probably close). <S> For 3.3V TTL the Vih is 2.4V or 2.0V depending on what you have, so odds are you'll still turn on the logic your connecting to. <S> But this isn't the way to do this. <S> There are better options. <S> A TLL buffer with an enable line would probably be the best: <S> Source: <S> https://www.allaboutcircuits.com/textbook/digital/chpt-3/special-output-gates/ <S> There are lots of chips available if you search a distributor (like digikey) <S> Another way would to use a switch with a low resistance: <S> The low resistance keeps the voltage from dropping. <A> You are just getting lucky. <S> When the transistor is saturated it allows current to flow from collector to emitter, it does not connect these two pins. <S> More importantly, for an NPN transistor to be in saturation <S> the voltage on the base must be about 0.7V higher than the voltage on the emitter, so you generally won't be able to get the emitter voltage up as high as the power supply voltage. <S> If you want something you can put anywhere in a circuit that behaves like a physical switch then you need an electromechanical relay. <A> Here's something that can do this generically: <S> It can be simplified for some applications. <S> The practical upshot is that if the CONTROL input is more than one threshold above ground, it will conduct from A to B. <S> No external power is needed other than the control line. <A> I finally managed to find a guide about how to switch a signal on/off. <S> Basically you have three signals. <S> An Input , an Output and a Control signal which decides whether your Output is enabled or not. <S> The most common way to achieve this is using an AND gate. <S> In this scenario when your Control signal is low , the output signal will be disabled and forced low : <S> And when your control signal is high the Output signal will be enabled (i.e. the same as your Input signal): <S> Refer to the guide for more information: https://training.ti.com/tlm-app-enable
| In short, you need to use logic gates.
|
How do I power a device with a 4-directional 4-pin connector? I have an idea and I would like you to point out what's wrong with it Let's say I have a matrix of square 12.7 mm cells. Every cell is a connector to which an independent little piece ("little piece" is a building block) may be connected. Actually, it's a little puzzle/sandbox game (a hobby project) where you have to build a circuit out of small building blocks like wires, logic gates, sensors and so on. Every little piece has 4 contacts connected to it: +5V, CLK, RST, GND. Originally I wanted to make 4 rings: the inner is RST, then CLK, then +5V, then GND. I'm planning to make the little pieces as PCBs at some cheap prototyping website or just at home. Making a PCB for the connector board is an overkill and will be quite expensive. I could buy some perfboard on Aliexpress and solder everything but this would be too prototypish, IMO. On the other hand, connecting the 4 rings or similarly put pin sockets in some plastic container with holes is very complicated, so I decided to switch things up a bit. Now I have just 4 pins. Pins A, D are both =RST, and pins B and C always have different values: CLK and ~CLK. Therefore, the little pieces can go either way, and that's important. The little things would identify which two pins are complementary CLKs and which are RST using an XOR gate. The power is collected into a capacitor through a bridge rectifier in case both CLK and ~CLK go low or if the piece needs extra current. simulate this circuit – Schematic created using CircuitLab This is the internals of a "little piece": simulate this circuit My questions are: 1) Are there easier ways to do this? Are there readily available sockets or designs for my purpose? 2) What obstacles and problems will I encounter actually designing everything (apart from size constraints, although I can make a little piece occupy several cells)? 3) How to choose the right R and C values for a given frequency? <Q> 1) Are there easier ways to do this? <S> Are there readily available sockets or designs for my purpose? <S> Connectors can be hard, usually searching a distributor like digikey in the connectors section is the best way to find the right connector. <S> Another thing that might be valuable is to find a distributor catalog and look through it to get an idea of what's available. <S> Even a 2x2 0.1" header might be best for your purposes, or 4 seperate 0.1" headers. <S> The real question is: do you want the connector to be the mechanical link, or a fastener? <S> 3) <S> How to choose the right R and C values for a given frequency? <S> RC filters form either low pass or high pass filters. <S> High pass filters block DC, so only AC currents can pass through them. <S> Filters block frequencies. <S> Either filter's cutoff frequency is at $$cuttoff = <S> \frac{1}{2\pi R C}$$ <S> If I wanted to keep 10Hz and block everything over 100Hz <S> then I'd make a low pass filter with a cutoff somewhere in between. <S> Then I need to choose RC values, Lets say I have a 1k resistor, so I start there and solve for C <S> , I'll try 20Hz. <S> I get a C value of 0.8uF <S> but those capcitors are hard to come by in a value like that <S> so I round it to 1uF. <S> Then I solve the cutoff for an R of 1k and a C of 1uf which would give me <S> 15.9Hz <S> then I decide if that would be acceptable for my requirements. <A> I suggest you design a board consisting of polarised connectors, that is, connectors that can be plugged only one way in, and in this way detecting what orientation was the functional block inserted in isn't required. <S> I also suggest you feed each of these blocks with power (ie. 3.3V and GND pins) plus a set of signals to get all the blocks connected between them, using any communication protocol you like, such as CAN bus. <S> Avoid expensive light communicating blocks. <S> It may even be easier/cheaper to make the motherboard be responsible of calculating the result of a certain pattern of connected blocks than to make the blocks themselves perform a particular task. <S> In this scenario, an MCU/FPGA would detect what blocks have been connected and in which order and then output the simulated result. <A> Figure 1. <S> Pin header strips can be cut to length and used to make PCB connectors. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 2. <S> Possible multi-orientation configurations. <S> The plug-in board only needs one line of four pins that can pick up on any of the above. <S> The biggest concern with this arrangement is to prevent someone inserting with an offset of one pin and destroying your board.
| The simplest way of solving this might be to "key" one of the connections by using three pins and one socket on one side and three sockets and a pin on the other.
|
Photoresistor power switch for arduino, does this look correct edit: uploaded schematic: I am a novice, this diagram may not be correct but should convey the attempt. I want to turn-on power to an arduino microcontroller when it is dark. I white-boarded an example and uploaded the diagram below. Power Using a photoresistor and a transistor, I plan to switch the high side that carries power to the arduino from a 5v dc adapter (eventually a battery pack). Arduino: https://www.arduino.cc/en/Main/arduinoBoardDuemilanove ARD_PWR: 5v regulated power input of arduino ARD_GND: ground port of arduino ARD_OUT_1: An output pin of thearduino, with 5v ARD_OUT_2: Another output pin of arduino,with 5v LEDS I plan to control 5v power to the LED's through the arduino's output ports, and use 200Ω resistors to regulate the current on the ground side. Question: How do I determine the resistor values for R1 and R2. I'm new to EE and ohm's law, sorry. Is my logic sound? Is this terribly inefficient? Reference <Q> Daniel has an excellent approach - keep the microcontroller powered and alive always. <S> Since a photoresistor has high resistance in darkness, use it to charge a capacitor on one of the microcontroller's input pins. <S> It will charge slowly in darkness, much faster when illuminated. <S> Any microcontroller is very adept at measuring this charge time. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> If C1 starts at zero volts (discharged), it's voltage will rise exponentially to about 3V in half a second. <S> In total darkness, charge time will be longer. <S> Leakage currents of the input pin have not been accounted for, but are usually quite small. <S> Once a logic high has been sensed at the input pin, you can change it to be an output pin , so that C1 can be discharged back to zero volts. <S> This will take about 500 microseconds. <S> Once discharged back to zero volts, the pin is changed back to an input pin , and a timer is started. <S> When the input pin changes from logic 0 to logic 1, the timer is stopped - the time taken is a measure of "darkness". <S> It is also possible to use the microcontroller's analog-to-digital converter to measure the speed of voltage rise on C1. <S> Most microcontrollers have a low-power state that draws very little current from its supply (V1). <S> If current consumption from the supply is to be minimized, the microcontroller can spend most of its time asleep, awakening once in awhile to test for darkness. <S> In this case, C1 might be made much smaller to minimize the time taken for its voltage to rise. <S> Do keep LDR1 optically isolated from the LED light sources. <A> The main problem with your plan is that the resistance of the LDR changes gradually as the light level changes, which means that the power supplied to the Arduino would also change gradually. <S> What you need is something that snaps fully on when it's dark and then snaps fully off when it's light. <S> You could cascade several stages of transistors to increase the gain. <S> Use a power PNP for the final stage and omit R2... <S> it should be zero ohms. <S> I understand that this advice may not lead you to an actual circuit, but I fear that this is a little over your head. <A> A problem such as this can be more accurately implemented with photodiode and TIA Op Amp design or an active “light sensor”. <S> PD's have far more accurate tolerances than LDR's, so you do not need a pot to adjust. <S> A single transister is a comparator using the Vbe reference voltage but the gain is not very high compared to a comparator and the reference voltage is subject to variations with bias current <S> but it may be adequate. <S> Then all you need to do is aim it in the right direction to avoid night light errors and determine the thresholds for On and Off. <S> Instead of a wide angle detector, it can be a narrow tube of heat shrink to block unwanted light. <S> If the reflected light detected from a night light is lower than ambient light then the sensor optical design is simpler. <S> I suggest to analyze existing designs and find how error tolerances are discussed to understand more. <S> Then study comparators for threshold with hysteresis. <S> The answers to these depend on your keyword searches. <S> A simple design must meet all the detail requirements, so keep asking yourself, what is input & output tolerance, so you understand the transfer function tolerance , where it matters. <S> https://www.google.com/search?q=ldr+light+switch+design&num=50&client=firefox-b&tbm=isch&tbo=u&source=univ&sa=X&ved=2ahUKEwjk04r39dHcAhVH1qwKHSWRD3gQsAR6BAgBEAE&biw=818&bih=810 <A> The approach of turning power to the Arduino off only makes sense if you are using something like an Arduino UNO or the like where there are devices (Serial to USB) and indicator LEDs that would result in unavoidable current draw. <S> If you are using just the ATMega328P (with no ancillary chips) it makes more sense to simply put the MCU to sleep. <S> You have very poor control unless you have definite hysteresis points defined. <S> Perhaps something along these lines: simulate this circuit – Schematic created using CircuitLab <S> Here I've suggested a TinyLogic device, the NC7SV57 . <S> This device is configurable and shown here <S> it's a 2 input NOR gate used to drive the gate of a P-Channel FET. <S> The configuration of the NC7SZ57 is as follows: <S> The second input is used by the MCU to ensure that once you've powered up you can use a DIO pin from the Arduino to ensure the power switch remains on (set the IO pin high) until you decide to change the status. <S> When the Arduino is powered is off this pin is held low by R2 so that only the LDR input is used. <S> It's also worth reading about using an LED as the optical sensor in a solution where you can put the MCU to sleep. <S> This has the advantage that you don't need high gain <S> op-amps, level comparators, LDR or photodiode. <S> All you have to do is use two DIO pins to drive one of your LEDs (a bit like an H-bridge). <S> You can then use a timing loop to ascertain the light level.
| The logic you propose using the LDR with a transistor will not work well since the Arduino could be turned off at any time (an unintended consequence) if the light level drops (such as a hand over the LDR). Perhaps the photoresistance rises to 500Kohms as darkness approaches. I would suggest that you need some form of logic on the input and would be much better using a FET rather than a transistor as the power switch.
|
Single supply from dual supply? I've got a power supply delivering +/-28V, referenced to a common ground. In addition, I have a device (an isolated DC-DC converter, RS3-4815D ) which accepts 36-72V input voltage across its V+ and V- pins. Noob Question: Obviously I'm seeing the opportunity for 56V (28V and 28V from the power supply) to power my device. How can this be wired? This is a followup to the answer to this question . <Q> Just connect +28V to V+ and -28V to V- as this will give you 56V. <A> Generally it's okay to just use the two rails with your isolated converter, however there is a precaution you can take to be sure: <S> That is to add two Schottky diodes (eg. <S> 1N5819 <S> or the SMT equivalent for a small supply), one across each supply (reverse biased, of course). <S> That ensures that if one supply rail is much stronger than the other and there is a surge from your isolated supply (either at power-up or because the output gets shorted or overloaded) <S> you cannot reverse bias any device that is living off a single supply-to-ground. <S> For example, suppose you had a single supply op-amp connected between +28 and GND, and your isolated converter drew more than the supplies could deliver (say because some numbskull shorted the output with a test probe). <S> It's possible the +28 could go below ground while the -28 is still supplying a lot of current. <S> That could drive a lot of current through the (now reverse biased) <S> op-amp power pins, possibly destroying it. <A> The issue I see, is if the Power Supply and the Device share a common Ground . <S> For example, if the GND of the power supply was an Earth Ground and the "device" output was also referenced to Earth Ground . <S> Or, the same if both are referenced to a common chassis ground . <S> In that case, it could result in significant problems, like the -28V <S> might be connected by a low impedance path to GND , essentially a short circuit .
| It should work to just connect +28V to V+ and -28V to V- as this will give you 56V (as in Jeff Wahaus ' answer).
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.