text
stringlengths 83
79.5k
|
---|
H: Calculating the resistor for a 12V pushbutton
Please note: Although this question tangentially involves a Raspberry Pi, this is really more just a pure electronics question at heart.
I'm trying to connect my Raspberry Pi 1 Model A to this pushbutton. I believe my pushbutton will be wired to the voltage source (PWR) which is a 5V pin on the Raspberry Pi (hereafter RPi) as well as to a 3.3V input pin ("GPIO pin"). When you push the button, it's contacts touch and connect the circuit/path between the RPi's PWR pin and an input GPIO pin...I think that's how its supposed to work.
I've also seen wiring diagrams of this in action, and believe I need to put a resistor in between the pushbutton and the input GPIO pin. If this is incorrect, or if the resistor needs to be placed somewhere else, please begin by correcting me!
My question is: how do I calculate the required ohms of the resistor? This particular pushbutton is rated at 12VDC at 500mA.
AI: The actual switch rating is not important, as long as it's high enough to cope with what you're doing, which it is. You should NOT use the PWR pin for this, as the raspi inputs work on voltages 0V-3.3V, and are NOT 5V tolerant. You're sort of confusing two different circuits here. Normally, we would use this circuit:
simulate this circuit – Schematic created using CircuitLab
In this case, R1 sets (pulls up) the voltage at the GPIO when the switch isn't pressed. When the switch is pressed, the voltage at the GPIO is 0, which means there is a current flowing through the resistor and the switch to ground. You want this current to be fairly low, well below the rating of the switch. It doesn't have to be at all precise, so a 10k resistor is usually used (I say usually because that's what I always use, and it's a common value when you just need a medium value resistor). This means that the current flowing through the switch will be 0.33mA.
However
The raspberry pi actually has built in resistors, so you don't need to add an external resistor. The circuit is as follows:
simulate this circuit
You can also, if you want, use the internal pull down resistors, and connect your switch between 3.3V and the GPIO. I can't really think of a reason to do one over the other, except that a lot of chips only have internal pull-ups, and ground is usually pretty accessible in a circuit, so it's easier to use pull-ups and gnd. |
H: Computing a mathematical expression using half and full adders
I am new to logical desing and I am not sure how to start the exercise.
The problem:
Assume that we have 2 assinged numbers of 2 bits (A = a1 a0 and B = b1
b0). Desing a combinational logical circuit that computes the S = 4A +
3B and uses half and full adders, only.
What I am thinking is to use 2 full adders to compute the "4 * A", another 2 to compute the "3 * B" and another one to compute the S = 4A + 3B. This mean that I will need 5 full adders in total.
Is this the best and most efficient solution? I guess no but I can't think something better.
Is this diagram right?
AI: First, realize that multiplying a binary number by a power of 2 can be done by simply shifting the number, and no adders are required. Also, 3B can be written as 2B + B.
So your required calculation becomes
a1 a0 0 0 (4 A)
b1 b0 (B)
+ b1 b0 0 (2 B)
----------------
s4 s3 s2 s1 s0
If you notice that it doesn't require an adder to add 0 to something, you can simplify this to
a1 a0 b1 b0 (4 A + B)
+ b1 b0 0 (2 B)
----------------
s4 s3 s2 s1 s0
I believe this can be implemented with 2 half-adders and one full-adder, but I'll leave it to you to work out how and to draw it as a schematic diagram. |
H: What is this broken component?
This is an IP Camera circuit and after i put accidentally 12vDC instead of 5vDC this component has died with smoking. I want to replace this component with new one but i didnt figurate it out what is this component and have a closer look under magnifier find some clues as u can see pictures below.
This component have 5 lead
Barely seen a write "A14P" maybe, but not sure
U10 sign left side of component.
Please help what is this component so i can order new one and replace it.
This is the full size circuit if it helps
AI: Fried bugs in an SOT23-5 package with carmelized epoxy toxic fumes
http://www.ti.com/lit/ds/symlink/tlv62565.pdf
p.s.
There is another SMPS , U20 which is likely for 3.3V USB and other logic chips.
Since this SMPS is located near the speaker port, I am having second thoughts about the function of this regulator. By tracing the output, you may find it is used as a boost regulator like +12V used for Speaker port amplifier (not visible) and the MOTOV1 port. Shorting either of those outputs may have contributed to the problem of fusing the regulator. Although they tend to have UVP, OVP, OTP features that only works if the sense input is not damaged. So handle with care and use a very low current limited lab supply in your experiments and gradually raise the current limit to 50mA with a preset voltage. |
H: Getting CL of XTAL
I'm using a dsPIC30F4011 in my project and I want to put a 6MHz XTAL between OSC1 and OSC2 pins. The circuitry goes like this:
I want to know the values of C1 and C2 in the circuit, and I read somewhere that the formula is:
The XTAL I've bought came with this datasheet. There it says:
The thing is that the exact load capacitance is not specified, it depends on which XTAL I buy. But in the one I've bought there is no serial code or something that could tell me the specific I need. Although, in the datasheet appears an almost specific "effective series resistance" (100 Ohm max for 6MHz).
So, is there a way to get the specific load capacitance of a crystal resonator knowing its effective series resistance?
Edit (Thanks to SamGibson):
Is there a way, method or circuit to get the load capacitance of an XTAL?
AI: Load capacitance and crystal ESR are unrelated, these are two different characteristics and design parameters.
The load capacitance is the necessary parallel load for a crystal to produce its specified resonant frequency. This value is designed in by manufacturer. By virtue of Pierce oscillator schematics, the load capacitance is split into two in-series caps, so the C1/C2 values must be a doubles of the required load, and must be corrected for parasitic capacitance of traces, pads, and IC pins. If the effective load capacitor deviates from specifications, the oscillator frequency will deviate slightly.
The ESR is a measure of crystal quality, and depends on particular crystal geometry and materials used for fabrication, metal coating, and wire bond support. The ESR value is important for starting and maintaining circuit oscillations. If the ESR is too high, the circuit will fail to start. The criteria for safe stable operations is that the crystal ESR should be 5 times smaller than so-called "negative resistance" of the circuit. The necessary margins can be easily determined by putting a non-inductive variable resistor in-series with crystal, and finding at what value the oclillations stops. This value of extra resistor should be about 5x of the expected ESR of crystal.
For more explanations and details, please consult with corresponding application notes.
ADDITION: if you don't have technical specifications for the particular crystal, you need to characterize the crystal. If it oscillates in your circuit, it is relatively easy - you need to measure the resulting frequency at the OUTPUT of xtal circuit using high-impedance low-capacitive probe (<1pF). Then compare the frequency with nominal. It will be a fairly delicate measurements, since crystal pullability is usually just ~50 ppm for 10 pF of load mismatch. For more hints check these posts, 1, 2, and 3.
If it doesn't oscillate, reduce caps until it does, or you need to get a special test board with high-quality driver to do the job. |
H: Does a capacitor store voltage?
I’m a bit confused about capacitors. I understand they store energy in a field by accumulating opposite charges on the different plates. So a 1 farad capacitor will store 1 coulomb of charge if subjected to 1 volt if I understand the math right.
1 coulomb is also 1 amp-second, so this capacitor can supply 1 amp of current for 1 second.
Now what I don’t understand is where voltage comes into this. Can this theoretical capacitor only run 1V loads? Why? Wouldn’t a .5 farad capacitor subjected to 2V also store 1 coulomb of charge? What would be the difference between the charge stored in these two capacitors?
AI: Answering the second comment to the question.
Yes, that is exactly correct. They would both be storing 1C of charge. Think of a capacitor like a (perfect) balloon where the larger the capacitance, the larger the balloon volume and the more you expand the balloon, the higher the pressure inside the balloon.
Imagine one really huge balloon, and one really tiny balloon (this is only to illustrate the point.)
Imagine you wanted to fill both balloons with 5 lung fulls of air, and afterward, you pinch off the orifice. I think it is easy to imagine the really huge balloon not being very full at all after 5 lung-fulls, where the small balloon is almost full to bursting.
The pressure in both balloons corresponds to the voltage, and the amount of air in each balloon (5 lung-fulls) corresponds to the amount of charge stored in each capacitor.
Does this help illustrate the relationship between charge, capacitance, and voltage? |
H: If you plug in a bridge rectifier directly to a power outlet, and touching one of the outputs, isn't it like touching live wire?
If you touch the output of the Full bridge Rectifier, and the circuit is powered directly from the city power, does it shock you with every positive wave of the 120ac? How about a half bridge rectifier? Its only one diode, but what happens if you touch the other end of the output, and how does this guy not get shocked: https://www.youtube.com/watch?v=sI5Ftm1-jik (2:00), and how does switched mode wall adapters isolate the live wire? This is so confusing!
AI: First of all, it is always good practice NOT to touch live power wires. In the case of the video you mentioned and, almost all appliances and power supplies, there will be an isolation transformer connecting the mains to the circuit you are touching.
For a single phase, there are live, neutral and earth wires, on the mains side. The neutral and earth wires will be connected together and, ideally, be at the same potential. If you touch the live wire, you will likely form a circuit to the earth and be shocked. If a 1:1 isolation transformer is in between, you'll just have live and neutral wires effectively with no direct connection to earth, and if you touch the live wire on the secondary side, it is less likely a connection to earth will be formed (it can still happen though so don't touch)
There is a good discussion of this here: https://www.soundonsound.com/sound-advice/crosstalk-readers-writes. |
H: Testing a 32-bit (or any "square" shaped) microcontroller
I know there are certain shaped microcontrollers that can fit onto a breadboard without using an actual PCB, like the Arduino. One can use normal jumper wires and utilize the breadboard to their own discretion with this type of microcontroller below.
This is just a picture I found on the internet so I am not asking about how to configure a microcontroller on a breadboard.
Since there are different shapes of microcontrollers (particularly 32-bit or higher microcontrollers), there would be no easy way to test those types of microcontrollers.
How would you be able to test these types of shaped microcontrollers? Obviously placing this on a breadboard could short circuit particular connections within the chip. Would we have to just place it on a PCB and then connect each pin with a jumper wire to connect it to a breadboard?
AI: You can buy adapter pcbs. Just solder the smd part on it, and pin headers on each side. Then you can just plug the assembly on a regular breadboard. I have a small stock of these boards for various shapes of smd parts. See the picture. |
H: Battery life when using voltage booster
I have connected a 3.7v-4000mah battery to a load via a voltage booster MT3608 (3.7V to 12V) . load current is 100ma. how long does battery can work?
AI: For this you will need to consider your batter capacity in watt-hours. So for your 3.7V 4000mAh battery, plugging into the equation mAh * V / 1000 = Wh, you get 4000mAh * 3.7V / 1000 = 14.8Wh. Now we can convert it back using 12V for our V value in the equation and get (14.8Wh * 1000) / 12V = 1233.33mAh. And with a 100mAh load that would be approximately 12.33 hours of runtime with an ideal DC/DC converter. However, you'll likely have a roughly 90% efficiency and therefore see only 12.33 * .9 = 11.09 hours of actual run time (thank you MatsK for reminding me that practicality is nearly never ideal).
I have a feeling I forgot something so others shall feel free to correct me or point out errors. I'm writing this on mobile so can't currently format it, maybe later. |
H: Split Collector Lateral PNP Transistor SPICE Subcircuit
This question relates to the book Designing Analog Chips by Hans Camenzind.
I need to simulate a simple (one transistor) lateral PNP current mirror:
I am trying to understand how one can model a "split collector lateral PNP transistor" (Q1) using a SPICE sub-circuit.
The book provides a SPICE sub-circuit for lateral PNP transistors (to model substrate currents at saturation, in addition to normal device operation):
Mainly:
* Lateral PNP Transistor subcircuit
* (modeling substrate currents at saturation and normal operation)
* Inputs: 1 (collector), 2 (base), 3 (emitter), 4 (substrate)
.SUBCKT pnp1 1 2 3 4
* dev <nets> model
* -----------------
QP11 1 2 3 qp1
QP21 4 2 1 qp2
QP31 4 2 3 qp3
.ENDS
In addition to the PNP device model parameters. (which I am not providing here).
My main question is how do I go about changing the lateral PNP sub-circuit to a split collector type?
I was inclined to simply add an extra port to the Lateral PNP sub-circuit (i.e. c1, c2, b, e) and keep the collector of Q11 as an internal net, then split this net into two wires connected to the c1 and c2 ports, however:
How does one add "wires" to a SPICE sub-circuit (i.e. to divide currents but keep voltages the same). "Wires are not valid circuit elements, transmission lines are, but this seems really overkill.
I also thought about adding 0 Ohms resistors as "wires" but this seems like a rather hacky solution.
Also is simply splitting the currents a decent model for a split collector lateral PNP?
I know I am probably over-looking something or over-thinking a simple problem.
Any pointer in the right direction will help.
AI: Use two PNP devices with emitters and bases tied together. Place the collectors where you wish.
The layout is the key. Vertical PNPs, with a common EB feeding into collector well with 2 well connections to form the 2 collector outputs, may not model your actual lateral PNP. But who will know? |
H: How to measure the inverse saturation current of a diode?
I'm trying to measure the inverse saturation current of a diode, for using it in the Schockley equation. I would like to know what is the best circuit for doing this. I already tried the following circuit, but I can't detect anything.
simulate this circuit – Schematic created using CircuitLab
I'm using a 0-30V direct current power supply, a resistance of 230 ohms and a IN4001 diode. Do you have any suggestions?
AI: The last time I made some diode leakage measurements, I used a cheap (distributor's own brand, <£10) DMM, with 1999 full count, 10M input impedance, and a 200mV range, as the current meter.
On that range, the full scale is 200mV/10M = 20nA, with the nominal current resolution 100uV/10M = 10pA.
You can use an external shunt to get a higher current range for big diodes, use an external 1.1M resistor for 200nA full scale, and 100k for 2uA.
It's worth using a variable power supply, and inching it up from zero, so as not to embarrass your meter's 200mV range with a leaky or failed diode. I found (and the Schockly equation will tell you) that once above a couple of volts, the reverse leakage current is more or less constant.
FWIW, I measured about 35nA for a BAT42 (schottky), 4nA for a 1N4148, and failed to measure (so <10pA) the current for a BAS116 which is advertised as a 'low leakage' diode.
If you want to measure lower currents, then you need to build a pico-ammeter round a low bias op-amp, next-hack's answer shows you how.
Two cautions when working like this. (1) You might want to verify that your meter is actually 10M input impedance on the 200mV range, put an external 10M in series with it, and check that halves the reading when supplied with a voltage. (2) When using non-native ranges like this, the decimal point will usually be in the wrong place. I am skilled at moving it the wrong way in my head, so I simply enter the voltage I read into a spreadsheet, and the relevant resistance in another column, and let it do the sums. |
H: How to implement a filtered user button
I want to add a user button to my schematic design, so I first take a look at what I consider it could be a good source: the ST Discovery board schematic.
Their use case is the same as mine: user button, microcontroller configuration unknown, Vdd at 3.3 V.
Their button looks like this:
I think I understand most of it (correct me if I am wrong):
R35 may protect the microcontroller (i.e.: PA0) in case the user configured that pin to be an output (high/low) rather than input (high impedance). Otherwise if PA0 is set to low, pressing the button could be dangerous.
R39 lowers the Vdd-GND current when the button is pressed (no need to waste current).
The capacitor should filter the button bouncing and I guess it should charge/discharge through a resistor as well (R38?).
Now, here is what I do not understand: when the button is not pressed, considering stable conditions, at one side and the other of the button we have Vdd and GND potential, same with the capacitor. So...? (initial thoughts that I know must be wrong, but anyway...)
When we press the button, are not we shorting two cables at different potentials with no resistor in between? (3.3 V from the power source with 0 V from the condenser)
My intuition would have lead me to put the R38 between Vdd and the switch, rather than between Vdd and the capacitor, but it seems my intuition is bad (STM engineers must be right and I must be wrong).
So, maybe what happens is that when the button is pressed, the lower part of the capacitor (as drawn in the schematic) becomes 3.3 V instantly and then the upper part becomes 6.6 V? (and then discharges through R38)
If that is correct then I guess that if at that exact instant we release the button again (imagine the button bouncing), the upper part of the condenser keeps the 6.6 V potential and goes smoothly to 3.3 V back again and the lower keeps the 3.3 V and goes smoothly as well to 0 V? Otherwise the de-bouncing would not work, right?
Could someone clarify how this works?
AI: First of all, note that the capacitor is "not fitted". Therefore is not mounted on the actual schematics.
But let's suppose C38 is there!
R39 lowers the Vdd-GND current when the button is pressed (no need to waste current).
R39 pulls down the voltage when the button is pressed.
It also charges the capacitor, when you release the button.
The value is chosen a) to keep the vcc to gnd current low, b) to have a certain time constant.
The capacitor should filter the button bouncing and I guess it should charge/discharge through a resistor as well (R38?).
The capacitor filters the bounces. When you press the button, it is quickly discharged through R38. The function of R38 is to limit the initial discharge current, which could be also detrimental for the switch (even though the cap is only 100nF, so it has a minimal resistance). It also limits the discharge rate.
When we press the button, are not we shorting two cables at different potentials with no resistor in between? (3.3 V from the power source with 0 V from the condenser)
No, you are just shorting the capacitor, through R38.
My intuition would have lead me to put the R38 between Vdd and the switch, rather than between Vdd and the capacitor, but it seems my intuition is bad (STM engineers must be right and I must be wrong).
The resistor could have been in series to the switch, but the capacitor should have been in parallel to this series. (In other words: in your schematics, place "vdd" on the left of R38). This can be done because R38 is very small compared to R39.
So, maybe what happens is that when the button is pressed, the lower part of the capacitor (as drawn in the schematic) becomes 3.3 V instantly and then the upper part becomes 6.6 V? (and then discharges through R38)
Yes, this is what happens.
If that is correct then I guess that if at that exact instant we release the button again (imagine the button bouncing), the upper part of the condenser keeps the 6.6 V potential and goes smoothly to 3.3 V back again and the lower keeps the 3.3 V and goes smoothly as well to 0 V? Otherwise the de-bouncing would not work, right?
No. To get the numbers, let's suppose you're so quick that you press the button so fast, that you instantaneously bring the 3.3V to the lower terminal, and then you release fast enough (that should be in a time much smaller than R38*C38, i.e. 10us!) so that the capacitor voltage is not appreciably changed. First, the capacitor voltage cannot vary instantaneously. The potential of one of its terminal can, but then, since the voltage across the capacitor cannot change instantaneously, the potential on the other terminal will change accordingly.
When you press the button, the lower terminal goes instantaneously to 3.3V. The capacitor is charged at 3.3V, therefore the upper terminal goes instantaneously to 6.6V. Then you release it very quickly. The lower terminal goes back to 0V, because of R39. If it didn't, that potential would be 3.3V, and current would flow through R39. But if you write the equation of the mesh Vdd-C-R38-R39 (R35 is connected to an input, let's suppose it's ideal so no current flows into/out of it), you'll see that Vdd-Vc is zero, so there is zero current. So the lower terminal of C38 is at 0V.
Finally a word on C38.
If it is present, when you power on the circuit, it will act as if you pressed the pushbutton, i.e. it will give a high level pulse on PA0. This is because the capacitor is initially discharged, therefore the potential of the two terminals are at the same value (3.3V).
The designers maybe later realized that
They didn't want such pulse.
Any debounce can be performed in software.
EDIT:
As reference, here is a case study on the bounce times of several switches: http://www.eng.utah.edu/~cs5780/debouncing.pdf |
H: How do power generators generate AC at a constant frequency?
As far as I know, alternating current is generated at power plants by converting rotational energy to electricity. The frequency of the AC depends on the rotational frequency of the rotor. In USA, the frequency must be 60 Hz, correct me if I'm wrong.
However, I don't know how power plants can maintain such constant frequency. This might be easier in nuclear or thermal plants, but how about in case of wind turbines, where the wind speed isn't constant, and hence, the turbines can't spin at the constant rate?
I tried looking around, and I found this Reddit discussion. I however do not trust Reddit as a reliable source, so I wish to get a reliable answer here.
So, in short, how does a generator generate constant frequency despite inconsistencies in the energy source (such as irregular wind flows)?
AI: First you need to understand that because the grid is alternating current, and the generator and motor are wound in such a way, that the magnetic field inside the stator (the fixed housing) will rotate around at a speed determined by the frequency and the machine type. This rotating field can be made by the grid, or the rotor, a rotating (electro)magnet.
Wind turbines are an exception to this. Most generators are synchronous machines. Meaning that the magnetic field on the rotor, matches that present at the stator.
This applies to permanent magnet generators and most generators found on ships and in emergency power systems. Also rental diesels and most on site power plants.
Wind turbines use asynchronous generators. This means that the stator field rotation does not have to match the rotor rotation. This is similar to induction motors with slip.
When the wind is pushing, it will try to push the rotor beyond the speed of the alternating magnetic field on the stator. This generates energy.
When the wind is not pushing, the rotating stator field will try to take the rotor with it, making a fan. This obviously isn't the ideal case, hence some electronics prevent this.
The major disadvantage is that these cannot start easily from blackout, but they are cheap. Compared to DC-AC converting wind turbines.
I have skipped the process of synchronizing the generator to an active grid. But this basically means that you match the voltage, speed and phase so that there is 0 volt over the circuit breaker, thus no current will flow when turned on. After this, more mechanical power can be given to convert to electricity.
This is a danish wind company with some extra info. |
H: Charging an ideal capacitor through an ideal diode, forever
Some context for why I am asking the question:
I have application in which I am to charge a supercapacitor from a voltage source which is equal to the the cap's rated voltage. As such I considered using a diode in series with the voltage source in order to realise a reduction in capacitor voltage. This had me thinking about how such a real circuit would work, and how its ideal counterpart would work.
The ideal problem
In the following schematic please assume all circuit components to exhibit ideal behaviour:
Assuming the voltage source starts at 0V, and is then set to 3.3V, the capacitor will begin charging. The capacitor voltage will be equal to the source voltage less the diode forward voltage drop, Vfwd. Vfwd decreases with current, a behaviour that is described by the Shockley diode equation:
where
I is the diode current,
I_S is the reverse bias saturation current (or scale current)
VD is the voltage across the diode
VT is the thermal voltage kT/q (Boltzmann constant times temperature divided by electron charge)
n is the ideality factor, also known as the quality factor or sometimes emission coefficient.
This equation suggests that given any voltage across the diode, some current should flow. If left forever, the voltage on the ideal capacitor should therefore approach equilibrium with the voltage source.
So before I move on to the real problem - in the ideal circuit above, what would the voltage on the capacitor, Vc, tend to if left forever?
AI: The Shockley diode equation yields non-zero current for non-zero voltage, therefore the capacitor will charge up as long as there is a difference between capacitor and source voltage (\$V_C < V_1\$), i.e. \$V_C\$ will get arbitrarily close to \$V_1\$ if you just wait long enough. |
H: Atmel UART - use interrupts or cyclic implementation?
I want to write a program that intercepts serial communication between two microprocessors. Therefore I chose the Atmega 162 featuring two UARTS. Now I want to decide if I write the code using interrupts (which makes things more compilacted)
or just in a cyclic way
read from UART
process data
write to UART
The packets are fixed size are 42 bytes on one line and 12 bytes on the other line. Between the single packets is a gap with ~1 ms.
The question: Do you agree to use the cyclic (fixed) way instead of interrupt driven way?
Theres no code up to now, but here you can find the project page
AI: The answer to this partly depends on how much other processing is going on in the system, what processor it is and how fast the micro is running. If you were doing nothing but taking in serial data and mirroring it out then you'd possibly be fine.
However, if you are doing a load of processing and there is the slightest chance that before you come back to poll the UART more than one byte of data will have been received, then you have to have it done with interrupts.
I would argue that interrupts don't add that much complexity, writing to a buffer, filled in the interrupt service routine that is emptied and processed when the processor has time is not that complicated at all and regularly a vital part of embedded firmware.
I believe there are industries such as the nuclear industry and other safety-critical industries where interrupts are forbidden, but other than that they are a staple part of coding and well worth learning how to implement. |
H: Star delta phase difference
All I read online is that in a Y-Δ connection of a 3-phase transformer the voltage(phase and line if I'm correct) on the secondary side leads the primary one by 30 degrees phase.
Does that happen regardless of which connection is the primary? I mean does it matter if the star is the primary and delta the secondary? Will the secondary always lead by 30 ? Or could it lag 30 behind depending on the connection?
AI: The easiest way to think about this, is that it comes from the conversion between Y and \$\Delta\$ configuration.
See this question for the math:
Why does a delta/wye transformer make 30 degrees phase shift ?
To answer your question, converting to \$\Delta\$ gives a leading 30 degree phase shift and converting to Y gives a 30 degree lagging phase shift. Both Y-Y and \$\Delta\$-\$\Delta\$ give no phase shift.
edit: this assumes we keep our abc phase connections in the same order. |
H: Perfboard/Stripboard insulation techniques and what material to use
I most often make circuits on perfboard.
Below is an example of a circuit, both bottom and top sides:
This circuit will be in a case but outdoors for many months.
In case of some rain leakage or humidity or rust ect, I want to protect this circuit by isolating it.
I saw some people use an epoxy like thing in both sides. I couldn't find any detailed information in my search.
I'm totally ignorant about this. What kind of material should I use and should I pour and cover it both sides?
AI: As in the comments the most common solution is conformal coating.
This is similar to a varnish, they can be dipped or sprayed on and are intended to form a waterproof seal without pinholes so they are often formulated with very little solvent to minimise final porosity. They may also contain silicone which is hydrophobic in nature and further repels water from breaks and edges of the sealant. Some of these require a baking step to work as advetised.
Your alternatives are a non-acid cure silicone sealant, these types are available in automotive and electrical grades. The household and construction grades most commonly make use of acetic acid which is corrosive.
You can also use a potting compound, again there are special types for potting electronics that may be polyester resins, epoxy resins or even silicone elastomers. Some products can have catalysts that are corrosive in nature and these should be avoided.
In some situations you could just use a moisture barrier that is not a solid such as grease/vaseline or even submerge your circuit in oil. These are messy but oil is commonly used in industrial and x-ray transformers due to the self healing nature of its insulation characteristics from high voltage breakdown.
An alternative in your case as you mention a specific time that the unit will be deployed in the field is to use a moisture scavenger/desccicant. If you seal your case from direct water entry and there are only a few small holes that air can enter you could keep the air inside very dry with something like silica-gel, anhydrous calcium chloride or a molecular sieve material. These will all eventually saturate but if the desccicant is large in proportion to the air exchange it should easily last for months outside of a steam bath or car wash.
Using strip board as opposed to a production PCB does somewhat increase your problem as the substrate material is usually the phenolic paper laminate instead of the less water absorbing epoxy glass laminate. However once you use one of the moisture mitigation technologies there is no real difference.
My first choice would be to seal the box lid and openings with electrical silicon sealant and leave a generous desccicant pack inside.
My second choice would be to dip it into an electrical conformal coating compound if you can locate it.
Your choices are also affected by how much or how often you expect to have to service the circuitry. |
H: SPI timing of 25LC1024
I'm using an EEPROM chip from microchip, it's doc gives the read/write timing as below:
I'm a little confused. From FIGURE 1-2, I think it will read data in at the rising edge of SCK. But from FIGURE 1-3, it only gives a "holding" time (t13) from the falling edge, and the minimum value of \$t_{10}\$ is 50ns, the maximum value of \$t_{13}\$ is 50ns, so it's not safe for master to read data in at rising edge. So I think the the master should better read the data in at the falling edge!! Then this will in conflict with the read timing.
AI: Then make sure the clock speed is a bit less than 20MHz. That way the clock low time \$t_{10}\$ is longer than the "Output valid from clock low" \$t_{13}\$ which will make the bit valid during clock rising edge. |
H: How to limit current for voltage regulator/decrease power dissipation?
I need to power a 5V device that needs more or less 1.2A in order to work correctly. I'm using a 13.8V power source with two diodes in series (1N4007) to limit the voltage to roughly 12V. I tried using the voltage regulator AZ1084T, since it has 5.0A of maximum output current, but even with a large heat sink attached it was heating up a lot, like 117°C (and the maximum admissible temperature on the datasheet is 125°C).
So, just to test, I replaced the AZ1084T by the old and good LM7805CV, which has 1.5A of maximum output current. It worked just the same, heating up just the same (and that's a good thing, because this one is much cheaper). But how can I avoid the heat? I'm pretty sure it's the power dissipation from 12V to 5V that's causing it, but this voltage regulator was supposed to work with that input voltage.
I tried this scheme, using TIP127 to "split" the current, but my device won't even turn on (the measured output current was showing peaks of 2A~3A, which kept turning off the power source which limit current is 1.7A).
Anyway, any suggestions on how to split the current while maintaining the output voltage or on how to decrease the power dissipation are welcome.
AI: Just because a regulator is able to output 5 A of current, does not mean it can do so over it's entire input range - especially not without a good amount of heatsinking (potentially with fan). The reason both of the devices heat up the same is because they have to get rid of the same amount of power, given by
$$P = (V_{in}-V_{out}) \cdot I$$
which in your case is about \$(12\ V-5\ V)\cdot1.5\ A = 10.5\ W \$, which is a lot of heat! (there is a reason computers have big heat sinks with fans on top).
You have a few options. You can look at going to switch-mode powersupplies, which are far more efficient (because they don't lower the voltage by turning the excess into heat).
Alternatively, you can look at using multiple regulators in series - Use a regulator to go to 9V, then to 7V, then to 5V. This way, the load is spread out over multiple regulators and each has less power to dissipate (of course the total dissipated power is the same!).
Finally, you can look at using external components like you already were doing. You mentioned having issues - I would suggest trying that topology with lower loads and a good amount of protection on the powersupply end to see what is going on - could be that you are getting some kind of instability. |
H: How do I do to solder the adapter in the port and still use the same usb port without ruining the notebook?
I have a laptop that the wireless network card does not work, but I do not want to use my usb input for putting an external adapter, my idea is to open the laptop and solder the adapter inside the notebook in the usb port and still use the port externally.
How do I do to solder the adapter in the port and still use the same usb port without ruining the notebook?
AI: Your idea "to open the laptop and solder the adapter inside the notebook in the usb port and still use the port externally" won't work, a USB port can't be just forked into two devices. Since you failed to provide any other details about your "a laptop", all advises to solve your problem will be speculative.
There could be several variants to embed a WiFi USB device into a laptop, although I doubt very much that mechanical restrictions will allow you to do this. You can find another USB device in your laptop that you don't want to use, like a fingerprint sensor, modem, or webcam. Then you can re-direct corresponding wires to your new USB adapter. However this would require a bit of reverse engineering of connectors and very fine soldering skills and fine-tip soldering iron.
If the system has the M.2 connector and it already is used for, say, SATA, it is theoretically possible to re-use the USB2 wires from M.2 connector if they are implemented, and if BIOS support is not preventing the use of the slot if SATA is already there. Again, this would require having fine bi-axial micro cables to implement, and exceptional soldering skills.
In short, an attempt to do this kind of rework will likely render your laptop ruined. It is likely a time to get a new one. |
H: Are S/R flip flops still relevent in digital design?
As I understand it, and please correct me if I'm wrong, one of the main drawbacks of using an S/R flip flop is that it can find itself in an illegal state with both S & R both with a logic value of 1.
The J/K flip flop remedies this by having a clock circuitry prevent the forbidden state.
With this in mind, are there any uses for S/R flip flops in digital design, or have they all been abandoned in favor of J/K and D flip flops?
AI: SR flip-flops are still useful in constructing asynchronous sequential logic circuits. Normal clocked flip-flops internally are just of that kind. Complex sequential circuits are at least on paper possible to construct using SR flip-flops, but designers generally use clocked flip-flops to keep the gate and transmission delays out of the major role. Complex sequential logic simply is much more easy to design and test if all state changes happen as clocked. |
H: 5V to 3.3V and 5V to 1.8 or 5V to 3.3V and 3.3V to 1.8V buck converters
I have a 5V power supply that is converted to 3.3V using a buck converter. Now I want a 1.8V supply. What is the industry standard way to feed a 1.8V buck converter? Do we feed it from the 5V supply or from the 3.3V supply?
From an efficiency point of view, I understand that the most efficient way may depend on the loads. Still, on buck converters, the efficiency gets worse, generally, as Vout is further away from Vin. But if I feed the 1.8V converter from the 3.3V one, I already have the power loss of the first one, albeit maybe getting a small boon from the increased current draw if I am on the side of the efficiency curve that favors an increase in current.
Nevertheless, what is generally done in this case? Two buck converters converting from the same supply, or one converting from the other?
AI: As you said yourself, there might be a fine balance in terms of overall efficiency. And cost. You gain a bit here, but lose a bit there. If you have curves of efficiency versus load and input voltage, you probably can calculate theoretical optimum. However if the load is variable independently, the optimization space will explode, and some use models would need to be involved. It could be a good semester project for a third-year EE student.
However, there might be one advantage of having 5->3.3>1.8V arrangement. Usually a microprocessor system requires certain power-on sequencing, and usually higher voltage needs to come up first, middle-one next, and lowest one last. In sequential arrangement this sequencing will come naturally, while in parallel arrangement you would need enable inputs and RC delays. But again, the sequencing might have certain special timing, which will be easier to implement with proper RC on enables than in sequential arrangement.
Actually, a better way is to implement complex power rails using a programmable PMIC with multiple outputs. This is the "industry standard" today. |
H: Relay Contact Rating (DC Power) at different DC voltages
To note, I have Google searched this question for the last 2 hours with many contradicting answer and searched Stackexchange with no clear answer.
I need to determine if a relay with a Contact Rating of 10A 250VAC/30VDC can handle 25A at 12VDC and if it would be able to handle lower amperages at higher DC voltages.
A few websites suggest as long as the power does not exceed 300W, any voltage/ current combination is okay and other websites say that is incorrect.
Attached is the Relay Specifications for reference, however this is more of a general question about relays.
Thank you very much
AI: You need to comply with all of :
From the datasheet:
Max. Switching Voltage:250VAC/30VDC
Max. Switching Current:10A
Max. Switching Power:300W 2500VA
When NOT switching (so steady state on or off) the ratings are:
Contact Rating(Res. Load):10A 250VAC/30VDC
And no, you cannot trade one for the other, so 10A max and 30V max independently.
Note also that the contact rating is for a resistive load, it will be much lower for switching a capacitive or inductive load. |
H: Why is the current control knob in DC voltage source kept at maximum initially?
In a DC Voltage Source(0-15-30V), why do we need to keep the current control knob at maximum at the beginning?
Note : I am using this DC Voltage Source for basic experiments of electronics like getting characteristics of P-N junction diode, zener diode, etc. This advice came from my instructor in the course 'Electronic Devices and Circuits Laboratory' and is also mentioned in the laboratory manual.
AI: Best practice when initially setting up a bench supplies is to set the voltage first with no load.
Since the current limiter will hold the voltage at a lower level if set too low, it is prudent to turn it all the way up initially to make sure that the voltage indicated is indeed the regulated voltage not the limited voltage. Once the voltage is set it is then prudent to wind back the current limit to a level you expect not to exceed with the load you are about to attach.
If you do it the other way around with a load attached the voltage you see may in fact be the limited voltage. If the load current drops it can cause the output voltage to suddenly rise to the higher set-voltage level and may damage your load.
Generally when powering an unknown load or circuit of unknown quality, it is prudent to start at zero volts, wind the current limit to max, then slowly increase the voltage while monitoring the current meter manually. If you see the current increase too rapidly, back off the voltage and try and figure out the cause. |
H: Replace laptop's usb surge protection chip
I am fixing an old laptop from 2008 (eMachine e525) on which everything works fine expect the 2 usb ports that are not powered.
I found this video¹ from Ingmar M. on youtube (very helpful video, thanks!) and I tried, like him, to desolder the 6 pin chip that is said by this user to be a surge protection component. Now the 2 ports are working fine.
I would like to know if I can replace this component so that I can safely plug usb devices. The problem is that I am not able to find a corresponding datasheet. The text on the tiny component reads (I think) "0635" on first line then "0926" on the second line. Orientation of the chip: the text is written alongside the longest dimension, if placed in reading position then the usb connectors are located north of it and there is an orientation dot in the south-west corner.
¹ Even if the video is about a e527 computer the motherboard looks identical to the one in my e525.
I used my multimeter in continuity mode to identify the pinout:
The 6 pin chip is visible in the center of the image:
Here it is removed:
AI: This chip is for protection of laptop against ESD. Functionally it is optional, the ports must be fully functional even is this chip is removed.
If you want to restore full protection, you need to search for "TVS" diodes on, say, Digi-Key database, select 6-pin devices, with proper package (based on pin pitch), and then look into each datasheet to find matching pinout. Your part looks pretty much as IP4220, just drawn upside down. |
H: Grounding and unisolated power supply
Okay I need to understand this concept because I'm playing with mains and I do not want to fry myself...
A little background : I'm quite good with low voltage stuff as well as logic level design but I've a big lack on switch mode power supplies . Due to a project requirement to implement a custom smps I've developed an unisolated one through the help of an engineer that works quite well (5v 0.4 amp).. leaving away the discussion about the unisolated power supply that goes into an abs encapsulated box with no end user interaction so it's perfectly safe and legally fine , I run into a problem ... as soon as I've connected the entire device to a serial converter , both burned out ... I've asked to my engineer what happened and he told me to run the device through an isolated 1:1 transformed to bring down the ground to earth ... we'll I'm actually a little lost , I understand that the neutral or hot wires becames the reference ground in my smps and that connecting them to a different ground that's on a different potential level may cause what I actually experienced , but I don't understand why my usb cable has earthed ground and why an isolation transformed changes the potential level on my input ac... I hope to have explained that in the right way !! Thanks !
AI: If it's a desktop PC then the metal case, all the shields of all the cables, and the internal GND, are all tied to protection earth.
So USB GND is tied to Earth.
The other side of your USB-Serial converter has GND tied to mains.
Thus you shorted Live to Protection Earth and exploded whatever bits of electronics were in the way... I hope the lights were out in the lab after this. If you still had power, this means you have no RCD so you are at risk.
Now, if you had used a laptop running on batteries, then nothing would have blown, since the laptop is floating. However... every bit of metal in and on that laptop would have been at live mains potential.
Also everything that is connected to it via USB.
This includes lots of stuff you're supposed to put your fingers on: mouse, keyboard, that shiny aluminium case... so many ways to kill yourself!...
The insulation transformer turns your uninsulated SMPS into an isolated one, so it could work. I have no idea why you chose to make an uninsulated supply, maybe to save a few cents?...
Note: put the isolation transformer on the DUT, not on the PC! If you supply the PC from an insulation transformer, then you'll be in the "laptop" case, and you're gonna fry.
If you insist on the uninsulated SMPS, a much better solution to talk to your micro is to simply isolate the USB-serial interface with optocouplers. Then, there s no need for an isolation transformer. Serial is easy to isolate. Also this will save your PC USB port from unhealthy voltages.
But of course, no fingers shall go near the live device... |
H: When to use milliamps or just amps?
So I'm doing this assignment that requires me to find missing elements in a power formula (Power = I (Current) * E (Voltage). The formula is easy enough but I'm not sure on the units to use for I.
From what I understand there are 1000mA (also equal to 1 amp) in 1 Watt. So if that is right should I just use amps if over 1 Watt? Or should I just use mA whenever the Watts are in decimal format? I'm really confused by this.
For context here is the homework. No I'm not looking for homework to be done for me just trying to understand when to use which unit.
AI: All equations are written in base units like Watts, Volts and Amps.
So Watts = Amps * Volts...
If your quantities are in sub units, like mA you need to adjust the equations appropriately or understand the relationships between sub units.
When starting out, or for clarity, it is normally best to translate everything into the base units first then chose the units of the result as appropriate after to make the answer more clear and concise.
For example:
P = ? I = 400mA E= 200V
Use \$P = 0.4A * 200V = 80W\$
Or if you like you can do it long hand..
\$P = 400mA/1000 * 200V = 80W\$
Later you can take short cuts when you get a better understanding of how the units affect one another..
like
milli-AMPS * Volts = milli-Watts
Example:
N. P = ? I = 5mA V = 5V
\$P = 5mA * 5V = 25mW\$
Perhaps you can figure out what units power is in when you use
\$mA * mV = ?\$
Addition:
Because we routinely use different scales when referring to quantities it is however very important to show the units in your math and results.
In your example image for question 2 you show the answer .005. Unfortunately, that answer uses implied units which is a bit if a no-no and will cause someone to ask... ".005 what?"
The correct answer should be 0.005A, or better, 5mA which is clearer. |
H: MOSFET Mode determination
I am looking into using a MOSFET in the ohmic region at a given VGS. However I am having trouble interpreting the typical I-V curve of a MOSFET.
Surely the y-axis parameter, i.e. the drain current, is generally the parameter that is changed by the x-axis parameter. But in this case, surely it is the y-axis parameter that is changing the x-axis parameter. Or to ask it another way, how can I accurately model the VDS change in a circuit?
AI: Does the current through a resistor determine the voltage across it? Or does the voltage across the resistor determine its current? Both models are equally true, and either model could be more useful for analyzing a circuit, depending what is connected to the resistor.
One way to look at the MOSFET is that its drain-source channel is a nonlinear resistor, with an I-V curve determined by the gate-source voltage. And like any other resistor, in some cases you might want to use the voltage to determine the current; and other times you might want to use the current to determine the voltage.
It just happens that we conventionally graph this characteristic with the voltage on the x-axis (usually associated with the independent variable) and the current on the y-axis (usually associated with a dependent variable). Either way (if you included channel length modulation and parasitic resistances in your model) there would be a 1-to-1 relationship between voltage and current, and you can use the graph to find either one, given the other. |
H: opamp heating in voltage controlled current source
Well, I have a serious problem with heat in my circuit. I was trying to build a voltage controlled current source. Everything went fine in the building process. But when I turn ON the power supply the TIP122 gets very warm and so do the IRF820. I know this guys tend to get hot when dissipating some considerable amount of energy, however, my circuit just intent to deliver some hundreds of mA. And the main problem: the TDA2822 is getting very hot. Hotter than all the transistors together. Although all that dissipated thermal energy, the circuits works pretty well TBH.
Any help is appreciated!
Cheers.
AI: The IRF820 is poorly suited for this application- choose a logic-level MOSFET with a low Rds(on). Your output current will depend on the value of Rds(on) + R1 so if you stay with this circuit you would probably want Rds(on) to be extremely low compared to 10 ohms.
Since the IRF820 may not turn on fully it may get hot.
The TIP122 will get hot when the circuit is dropping a lot of voltage at high current- that is just the math of the situation.
Worst case is 5V in (0.5A if the MOSFET was very low resistance) into a short, or 3.5W, which will require a heatsink of some kind.
Finally, the amplifier output current may be large-
if the load goes open- which will cause the op-amp to heat- add 1K in series with the base.
The resistor will also dissipate another 2.5W worst case, and that will tend to heat nearby components (the total 2.5W+3.5W = 6W which corresponds to 0.5A and 12V.
Rather than adding the power MOSFET as you did, I would tend to consider switching the input to a more precise single-supply op-amp using a CMOS analog switch. Then you have only the 10 ohm resistor to ground. The amplifier you are using is not really specified for DC applications. |
H: How to find the equivalent resistance for this network of of resisitor using the basic parallel/series combination?
You can only use the simple techniques you use to combine parallel and series resistors. Nothing else.
The difficult thing about this network of resistor is that: every node besides a and b has 3 or more branches connected to it, so none of them are in parallel.
Each resistor has 1 Ohm resistance.
AI: This can be solved with a Star-Mesh transform.
The centre 6 resistors C-H can be replaced by a 4-resistor star, which can be all 1/4 Ohm, if I have it right.
See [this question]
(Under what conditions is the star-mesh transform invertible?) for a more thorough discussion. |
H: Power connection vias on 4 layer PCB
I am new to PCB design. I am creating a 4 layer PCB with the following layer stack:
Signal (1) - GND (2) - Vcc (3) - Signal (4)
Now, I'll need Vcc and GND on both the signal planes. This means I'll need blind vias from 1-2, 1-3, 2-4, 3-4 but the PCB manufacturer I chose said that they cannot do blind vias like that - it has to be 1-2, 3-4 and such. Now I am stuck and have no idea how I shall route Vcc and GND. Please help.
AI: Usually you just use normal vias that go all the way through. This usually isn't a problem unless you need to worry about stubs (RF, though back-drilling is an option) or you're shooting for very high density where the through vias will get in the way. |
H: Electric Fan Power Consumption
I am not sure but I believe the usual electric-fan switches its resistance value to change the power output.
Q1. With that case, does the resistor consumes the power?
Q2. Do switch #1, #2 and #3 consume same amount of power?
If the answer for both Q1 and Q2 are true, then turning the electric-fan to #1 doesn't save much energy compared to turning it to #3?
AI: If we are talking about ceiling fans and regular desktop fans, then No, it is not a change in resistance.
Check this thread for explanations on speed switches for electric appliance motors
Calculating the capacitor values to control ceiling fan speed
This thread also covers the topic in detail
https://diy.stackexchange.com/questions/16620/how-do-i-shut-off-the-ceiling-fan-without-a-pull-chain |
H: Power Supply Card of Float Charger 150A
Please, can someone explain me how the transistors here reduce the voltage from +40 VDC to +15V in the positive side (upper part of circuit)
These are the voltages observed across different components of the power supply card.
O/P Positive side : + 15.40
O/P Negative side : - 13.79
R1 0.525 VDC R2 0.445 VDC
C1 44.6 C2 44.8
R3 14.40 R6 18.16
R4 9.57 R5 12.05
C3 29.40 C4 26.94
ZD1 5.08 ZD2 5.20
R9 10.28 R10 8.48
R11 9.70 R14 7.89
R12 5.65 R13 5.82
R7 4.71 R8 0.536
There is a striking difference between voltage drops across R7 & R8 which are current limiting resistors. Is R7 responcible for TR1 heating up ?
And which is causing difference of O/P voltages on both sides ?
AI: Figure 1. The region of interest.
On power-up all transistors are off. \$ V_c \$ = 0.
As the input voltage rises \$ V_a \$ will rise and TR1 will begin to turn on. \$ V_b \$ will rise 0.7 of a volt "behind" \$ V_a \$ because TR1 is wired as an emitter-follower.
Similarly \$ V_c \$, the output voltage, will follow 0.7 V behind \$ V_b \$. Note that R7 limits the current in TR1 to a safe value.
As the output voltage rises R9 and ZD1 will form a voltage regulator holding TR2's emitter at the voltage determined by ZD1. Note that there is no junction at 'e' on the schematic. It is a cross-over.
As the output voltage rises further \$ V_f \$ rises and TR2 starts to turn on. This steals the bias for TR1 and holds \$ V_a \$ slightly above the Zener voltage - maybe a volt or so.
The output voltage is now stable. If it tends to rise TR2 turns on more pulling it down. If the voltage falls due to increasing load TR2 turns off a little allowing more bias into TR1 turning on the big fellow some more to raise the output voltage. |
H: How does a CM choke reject common-mode noise while allowing the signal of interest?
As far as I know a CM choke is nothing but a transformer(?).
How does it block common-mode noise and pass the signal of interest? Should we think of it as an LR filter? And how to size it if we know the signal of interest? A pictorial explanation with a circuit diagram ect helps to understand.
Edit:
Below are two scenarios where an isolated(floating/battery powered) sensor S signal is measured by an ADC device and the system is single ended. The coaxial cable’s two wires somehow are victim of CM noise. As you see the CM noise is the spike superimposed on the half sine wave desired signal:
So in the first scenario(upper diagram) I can see how the CM blocks this spike now.
But in the bottom diagram there is an attempt to remove the same spike with a LPF where the LPF’s ground is the signal ground as usual. Will this attempt also remove the spike or not?
AI: How does it block common-mode noise and pass the signal of interest?
Let's say you have an unspecified 1:1 transformer and wire the primary to a 1 V 1 kHz AC source. The output from the transformer will be a 1 V, 1 kHz voltage as expected. Now if you were to apply a separate 1 V, 1 kHz to the secondary no current will flow in the secondary because it's like putting two identical batteries in parallel.
Let's also say that the transformer is ideal in that each winding has infinite inductance. In the scenario painted above there will be zero current taken from the primary and secondary sources. This, in effect is the device blocking common-mode voltages i.e. two identical AC sources are applied to both input and output and no current flows.
If you applied different AC sources there could of course be significant current flow. So this tells us how re-wiring a 1:1 transformer as a common mode choke works.
But, the primary and secondary inductances are nowhere near infinity so there will be current flow but, that current flow reduces as frequency increases so, a common mode choke performs better as frequency rises but, up to a point and that point is determined by the winding capacitances and the core losses.
Should we think of it as an LR filter?
Thinking of it like a transformer is just fine but remember the limits mentioned above as frequency gets too high.
If I use a CM choke I cannot use it for conveying DC signals ?
Transformers don't work at DC so, DC passes unhindered. |
H: IO Cathode PINOUT
I have to connect a peripheral 1-Wire 13.56Mhz RFID Reader
https://doc.ruptela.lt/pages/viewpage.action?pageId=884781) to a device.
The only info I have from the device ((FM-eco4/4+ ruptela: http://www.ruptela.com/product/fm-eco4/) ) is this one:
PIN WIRE COLOR DESC
10-32 V Red Power supply 12/24 V (range: 10-32 V)
Chassis Black Ground connection
DIN1 Pink Digital input, threshold 4 V
DIN2 Blue Digital input, threshold 4 V
DIN3 White Digital input, threshold 4 V
DIN4 Yellow Digital input, threshold 4 V
AIN1 Grey Analogue input (range: 0-30 V)
AIN2 Green Analogue input (range: 0-30 V)
DOUT1 Purple Digital output open collector up to 32 V, 1 A
DOUT2 Orange Digital output open collector up to 32 V, 1 A
1-Wire POWER White/red 1-wire power supply, 5 V
1-wire DATA Green/yellow 1-wire data transfer
PINOUT from the peripheral
Green : Green LED cathode (-)
Brown : Red LED cathode (-)
Probably that's such a stupid question because I have no electronics background at all, but by life things I have to do it
AI: You said:
PINOUT from the peripheral
Green : Green LED cathode (-)
Brown : Red LED cathode (-)
However, according to the datasheet for the "1-Wire 13.56MHz RFID Reader", linked on the web page you gave, the pinout is actually:
The data transfer occurs using the 1-Wire pin. I don't see any information which suggests the LED connections must be connected at all. They might be included to allow external LEDs to be added, in case the LEDs in the RFID reader are hidden due to its mounting location, for example.
Since you are connecting two devices, both from the same company, then you should be asking them for support and information about how to do that. |
H: Why a CrowBar is called a Crowbar?
I know the naming can be funny , but still it amuses me why a over voltage protection circuit is called a crow bar . https://en.wikipedia.org/wiki/Crowbar_(circuit)
AI: Which part of the very first paragraph of the Wikipedia article is not clear?
... much as if one were to drop a crowbar across the output terminals of the power supply.
The notion is that a steel crowbar is more rugged than anything else in the circuit, so it diverts all of the available current, unconditionally protecting the downstream circuit while simultaneously forcing something else in the upstream circuit (hopefully a fuse or circuit breaker) to burn out or trip off. |
H: Several questions about the ADC LTC2323 function, I'm new in electronics
http://www.manuallib.com/pdf/2014/0707/linear-ltc2323-16-input-adc-datasheet.pdf
this adc is part of a little project I have to interface and fpga with this adc.
I want to understand how does the source signal input in the ADC and how does it come out from it, not so interested in how it's produced inside. Excuses for my basic understanding of electronics.
Several questions:
1) As I can see, the source signal is an analog wave: This source signal is from -0.3v to 0.3v?
2) which pins are to be connected to the source signal? AIN1+ and AIN1-? what about the AIN2+ and AIN2-?
3) What's the purpose of REFOUT1,2 ??
4)The general function of the ADC, is like this? Please correct me!: the ADC "pick up" an "instant" value of the source signal in an exact time, this value which varies from -0.3v to 0.3v is converted (through successive approximation) and the result is successively latched to the SDO in 12 cycles (who can be also successively be picked up by my ADC interface on my FPGA),
5) Those 12 bits represent the binary fixed point (with fractions) representation of the "instant" value processed for the ADC in that exact time?
6) So this all happens for this small instant before getting the next "instant" value from the wave, so the process start over again?
It would be like:
1) 0.000
2) 0.111
3) 0.112
4) 0.113
...
?) 0.299
?) 0.3
then...
?) 0.299
?) 0.288
...
?) 0.000
?) -0.299
?) -0.3
if it's so, what tells me how many fractions will this value have, -0.299 or -0.2999 or -0.299999? and lastly, how many of this values will adc give me per wave (from 0.0 to 0.3v and 0.0 to -0.3v).
AI: Wow, much questions. I'll try some of them, however, the topics are far too vast to get complete answers in a few paragraphs. You have some reading to do...
1-3) The chip is primarily designed to convert differential analog signals. It can support 2 differential signal input pairs. Each differential signal is comprised of 2 input wires. The voltage on all of these input wires must always be greater than 0 volts (no negative voltages). For a true differential input, the signal to be converted (or digitized), is Vadc = (Vin+ - Vin-). Remember, both Vin+ and Vin- must be positive voltages, but if (Vin- > Vin+) then Vadc will be negatively signed.
There are other input configurations possible, but the general rules listed above will still need to be observed.
Refout is used to specify what the acceptable input voltage range is (see pg 16 of the datasheet).
4) Sample a voltage, and produce a number that when properly scaled, represents what voltage is observed in relation to the possible full scale range. I this case, the full scale range for the produced number is 16 bits wide, resulting in a single bit representing 1 part in 65,535 possible unique values. The actual result will not actually be this precise, but the chip will try its best.
For instance, if Vref = 4.096V, then the allowed voltage range for Vin+ = 0 to 4.096V, and for Vin- = 0 to 4.096V. Vadc now has a range of +/-4.096. This gives a best-case resolution of (8.192V/65,535), or 0.125mV.
The resulting Vadc is internally scaled for a range of 0 to 65,535 counts (the 16-bit range), with the digital value being represented as a signed integer (with a range of -32768 to +32768). When Vadc = -Vref (-4.096V in our example), then the converted value would be -32768 counts. When Vadc = 0V, then 0 counts. When Vadc = 4.096V, then 32768 counts (and each voltage in between is digitized to its nearest corresponding count).
This number (with a possible value in the range of +/-32768) is sent out the serial line over 16 clock cycles. One clock cycle per bit.
5) Yes, almost (but for 16 bits). The conversion takes time, and there will be an amount of time uncertainty that you must understand. See the datasheet, Understand the "Timing and Control" section (pg 20), and figure 21. There are 2 serial output interfaces, one for each Vadc channel.
6) Understanding the timing is critical to getting the best performance from an adc. Read and fully digest the datasheet. You will need to understand every bit of it or you will not get the desired results from the chip.
The quality of signals that the external circuit supplies to the adc chip inputs is also critical. Read about buffering & driving adc inputs as well before committing a circuit design to a pcb.
Good luck. |
H: Problem with mixed CMOS op-amp supply voltages on a square to saw wave converter
I am designing a square wave to saw wave converter by first integrating the square wave into a triangle wave, then toggling between the triangle wave and it's inverse, using 2 CMOS 4066 switches triggered by the original square wave.
The output is an incomplete saw wave because of the triangle wave going too negative relative to the 4066 supply voltage.
I know I could fix this by scaling and adding a DC offset to the triangle waves at the input of each 4066 switch. But for a number of reasons I want to keep the waveforms balanced with no DC offset. I also want to keep the circuit as simple as possible because it will be repeated many times in this project.
Can I power the with 4066 and 4069 with -12v to +12v so as not to cause this problem? If so what is a simple way to shift the logic level of the input to the 4069 to the right level?
AI: You can run the 4000 series parts off a bipolar supply but the voltage is limited (IIRC the limit is 20V total which works out to ±10V) and you need to level shift the input signal, this is perfectly doable with a comparator and a few resistors but it's still an extra part.
Or you can use a modern part like the ADG1219. It's a 2:1 mux rather than a plain switch so you don't need an inverter and it has a seperate pin for the logic ground so you can run it off a bipolar supply while controlling it with a unipolar signal. |
H: How to allow a motor to free spin?
In my circuit my motor terminals are connected to the output of a VNH5019A motor driver https://www.pololu.com/product/1451. When the circuit is no longer powered I want to allow the user to freely rotate the motor (a dc motor) output shaft (which in my application has a load attached to it that I want the user to be able to move if power has disappeared). Currently if I rotate the motor fast in one direction and then suddenly change direction I can feel a "resistance" to the movement in the new direction. I assume this is because the motor is generating a voltage which opposes the movement in the new direction. Can anyone explain to me what is happening and suggest a modification to my circuit that would prevent this from happening?
AI: The reason you are noticing it is worse at higher speeds will be because of the fly-wheel effect. The energy stored in the rotating core if proportional to the square of the angular velocity... So twice as fast = four times the energy.
Momentarily shorting the leads will cause the motor to brake rapidly dissipating much of that energy as heat in the coil. |
H: When would I not want to replace a PN diode with a Schottky diode
When repairing or maintaining equipment, or even during design revisions, why would I, for electrical reasons (not interested in the potential financial aspects) not want to replace a PN junction with a Schottky diode? Three reasons I can come up with:
Leakage: Schottky diodes have, in general, larger leakage
Biasing: If the PN junction is used to bias other devices (such as is sometimes done in BJT output Class AB amplifiers)
Switching applications: We might desire to use the slow reverse-recovery in RF switches.
Are there any others? In my specific case, I am replacing diodes in a older HP 6253A powersupply. The powersupply has several 3A rated PN junctions in the signal path which look very corroded, and I have a number of 6A Schottky diodes I am looking to replace them with. Is there any reason why I wouldn't want to do so?
AI: While Schottky diodes generally have a lower forward voltage drop and faster recovery time, they are also more susceptible to reverse surges. In my experience a Schottky diode will fail at a lower reverse voltage (or during a transient) that a standard silicon diode would handle without a problem. It all comes down to your application, what the diode is doing, and what sort of electrical events you expect it to see. There is no right or wrong answer here. |
H: PIC32MX Timer 1 Interrupt on Uno32
I have Chpkit Uno32 with PIC32MX320F128H, I am trying to enable interrupt and I have written the following code:
// PIC32MX320F128H Configuration Bit Settings
// 'C' source line config statements
// DEVCFG3
// USERID = No Setting
// DEVCFG2
#pragma config FPLLIDIV = DIV_2 // PLL Input Divider (2x Divider)
#pragma config FPLLMUL = MUL_20 // PLL Multiplier (20x Multiplier)
#pragma config FPLLODIV = DIV_1 // System PLL Output Clock Divider (PLL Divide by 1)
// DEVCFG1
#pragma config FNOSC = PRIPLL // Oscillator Selection Bits (Primary Osc w/PLL (XT+,HS+,EC+PLL))
#pragma config FSOSCEN = OFF // Secondary Oscillator Enable (Disabled)
#pragma config IESO = OFF // Internal/External Switch Over (Disabled)
#pragma config POSCMOD = XT // Primary Oscillator Configuration (XT osc mode)
#pragma config OSCIOFNC = OFF // CLKO Output Signal Active on the OSCO Pin (Disabled)
# pragma config FPBDIV = DIV_1 // Peripheral Clock Divisor (Pb_Clk is Sys_Clk/1)
#pragma config FCKSM = CSDCMD // Clock Switching and Monitor Selection (Clock Switch Disable, FSCM Disabled)
#pragma config WDTPS = PS1048576 // Watchdog Timer Postscaler (1:1048576)
#pragma config FWDTEN = OFF // Watchdog Timer Enable (WDT Disabled (SWDTEN Bit Controls))
// DEVCFG0
#pragma config DEBUG = OFF // Background Debugger Enable (Debugger is disabled)
#pragma config ICESEL = ICS_PGx2 // ICE/ICD Comm Channel Select (ICE EMUC2/EMUD2 pins shared with PGC2/PGD2)
#pragma config PWP = OFF // Program Flash Write Protect (Disable)
#pragma config BWP = OFF // Boot Flash Write Protect bit (Protection Disabled)
#pragma config CP = OFF
#include <p32xxxx.h>
#include <sys/attribs.h>
void __ISR(_TIMER_1_VECTOR, ipl4) Handler(void) {
LATFbits.LATF0 = ~LATFbits.LATF0;
IFS0bits.T1IF = 0; // Clear interrupt flag
}
int main() {
T1CONbits.TCKPS = 3;
PR1 = 0xFFFF;
IEC0bits.T1IE = 1; // Enable Interrupt for Timer 1
IFS0bits.T1IF = 0; // Clear interrupt flag for Timer 1
T1CONbits.ON = 1;
__asm__("EI");
TRISFbits.TRISF0 = 0;
LATFbits.LATF0 = 1;
while (1);
return 0;
}
PS : I know this question is so repeated but I read most of the datasheet and reference manual and have been stuck with it for a while.
AI: _ISR macro adds an interrupt if and only if the Multi-vector mode is enabled.
So to enable it use
INTCONSET = _INTCON_MVEC_MASK;
Otherwise, to go with Single vector mode use _ISR_SINGLE__ instead as following
void __ISR_SINGLE__ Handler(void) {
if(IFS0bits.T1IF){
LATFbits.LATF0 = ~LATFbits.LATF0;
IFS0bits.T1IF = 0; // Clear interrupt flag
}
} |
H: VL6180x sensor breakout stays on despite removed VIN
I'm experimenting with a couple of VL6180x distance sensors on breakouts (http://www.ebay.com/itm/172823051918, the blue ones).
Because the sensor resets its i2c adress when the power is removed, and because I want to use more than one, I need to be able to set the desired adress after boot.
My idea to solve that was to simply turn on the VIN to the sensors one after the other, and set the adress before the next one turns on. Unfortunately it seems like the sensors get power somehow even without any VIN connected. I'm guessing it's through the pullup resistors on the i2c bus.
How can I solve this? Do I have to add something to break the i2c bus connection together with VIN, or are there other better ways?
(Since the project they're intended for have limited free space, I'd prefer a solution with a low component count)
AI: So that's just a breakout board for this? http://www.st.com/content/ccc/resource/technical/document/datasheet/c4/11/28/86/e6/26/44/b3/DM00112632.pdf/files/DM00112632.pdf/jcr:content/translations/en.DM00112632.pdf
If so, you can hold the GPIO0 input (the 0 on the breakout board) low to put the chip into a reset state. This means you will need to dedicate an I/O line to each board, but that way you can bring them up one at a time without doing crazy things to the I2C bus itself. |
H: Using Bench Power supply to charge NiCd pack
I have an 18vdc battery powered drill hat works fine but the charger has died and a replacement is $54. Almost double what I paid for the drill plus battery plus charger two years back. Battery was still holding a good charge.
The label says, 18vdc 1.2Ah Battery pack
I did some searching and am using a bench power supply charging it in Constant Current mode at 0.750A but the voltage to get that current rate is 24vdc and rising slowly. I have it right alongside me and cannot feel any appreciable heat build up after 30-minutes.
The rising voltage bothers me, is it OK to let it charge like this or should I clamp it at a set voltage. I can't do both this power supply as one setting limits the other.
AI: Don't be fooled by early results when checking temperature. They heat rise past 70% charge accelerates quickly from internal gas pressures and charge transfer inefficiency dissipates more heat.
from batt U.
Figure 1 shows the relationship of cell voltage, pressure and temperature of a charging NiCd. Everything goes well up to about 70 percent charge, when charge efficiency drops. The cells begin to generate gases, the pressure rises and the temperature increases rapidly. To reduce battery stress, some chargers lower the charge rate past the 70 percent mark.
Therefore do not exceed 1.46V per cell * 13 cells = 19V
The charger from Dewalt is only rated at 18V with a current rating of 2A.
Dewalt DW9116 7.2V - 18V NiCd Battery Charger New for DW9057 DW9094 DC9071 $34.90 Ebay.
The fact that you need to drive 24V just to get 0.7A indicates your batteries have aged significantly and are on their last legs.
I know from past experience manufacturing and testing burp chargers this can rejuvenate NiCd batteries. Can you make a pulse switch with low <10% duty cycle at 24V ? Then track your Amp-seconds of charge and useage and see if that improves it.
http://batteryuniversity.com/learn/article/how_to_restore_nickel_based_batteries
Which reminds me I have to fix my Hitachi LiPo cordless drill after left out in the rain. |
H: Input coupling to Class AB amp with diode bias. One capacitor or two?
When AC coupling the input signal to a Class AB (Push-Pull / Complementary Pair) which is diode biased I see two different approaches:
Signal connected between biasing diodes with single decoupling capacitor:
Signal connected directly to each transistors base with separate capacitors:
What is the practical difference between these two approaches? Is one better than the other?
Here is an editable circuit showing the basic idea of the 2nd approach (NB: values are not that realistic):
simulate this circuit – Schematic created using CircuitLab
Here's another simulation of a the first circuit (courtesy of Tony Stewart).
AI: The purpose of the diodes is to set a bias voltage between the transistors' bases, which sets a small idle current through the push-pull. This makes it work in class-AB and lowers crossover distortion. However the diodes should be thermally coupled to the transistors, to prevent thermal runaway. Also, emitter resistors should be used for this reason.
Anyway.
As long as both diodes conduct, say a few mA current through the diodes, their dynamic impedance will be rather small, like 10-20 ohms, so the transistors will be driven from a low impedance. What matters here is that this bias current is generated by resistors R1 and R2.
So, when we want high positive output voltage (and presumably high output current) voltage on R1 will be low as TR1 is driven to a voltage close to the positive power rail. Since TR1's base current comes only from R1, this is a problem: for a high enough output current, TR1's base current will suck out all the current R1 can provide, so D1 will turn off and it no longer works.
The second configuration will work better if the two input caps are large enough to have low impedance at the frequency of interest: in this case, AC base current is provided from the signal source through the caps, and R1/R2 only set the DC operating point.
Thus the second configuration is a better choice, if the extra performance is required. It would also allow higher values for R1/R2 since it solves the problem of the resistors having to be small enough to let enough current through for the base current required for maximum output current. |
H: Driving a Strange 12-Pin, 7-Segment, 4-Digit LCD display
I am putting together a project that requires a 4-digit numeric display and wound up ordering this. Unfortunately, something I completely failed to notice when ordering the LCD was that its pin assignments seem to be... incredibly bizarre. At least to my relative lack of experience.
The LCD provides four "COM" pins (COM0-COM3) and eight additional pins (two per digit). The way the segments are connected to the segments results in each of the COM pins selecting not a digit but rather a (for lack of a better term) row of segments: A and F, B and G, C and E, and D and the decimal point. The eight additional pins then allow you to select one or both of the segments in a row or rows for a given digit.
For instance, if COM1 is active, then I can make visible the E and/or C segments of as many digits as I wish.
The trade off for this is that it is utterly impossible to display any digit besides seven in a single cycle. So in order to use this LCD to display an arbitrary number, it seems that one must update it at four times the rate one otherwise would use.
Bluntly, this seems to me and my inexperienced eyes like a totally pointless convolution. Allocating one pin per anode and one pin per segment would have taken the same number of pins. Updating the LCD at a higher frequency seems like it would increase power usage and wear, if anything.
Perhaps someone more experienced with these sorts of items can shed some light on the matter. Is there any benefit whatsoever to allocating the pins like this?
AI: 2049...
The trick is one needs to get refreshing per digit out of your head and think about updating the whole display two "rows" at a time instead.
The layout of the segments is more dictated by the routability of them on the glass. Unlike PCBs, vias are not available so crossovers can't happen. |
H: What does the "2" indicate in 2:4 format for Excellon drill files?
For Excellon drill files, I know that the number after the colon indicates the precision, i.e.
2:3 has 1 mil resolution
2:4 has 0.1 mil resolution
2:5 has 0.01 mil resolution
However, I don't know what the number before the colon indicates. What does the "2" mean?
AI: The number before the colon designates the whole number digits, while the number after the colon indicates the number of precision digits.
For example, the number "37.294" would be represented in the following way:
3:4 - 037.2940
2:4 - 37.2940
2:3 - 37.294 |
H: Adjustable LDO output became unregulated
I designed a simple LDO circuit using LM1084 (circuit A as in the picture) to power a small MCU board (circuit B) and the two circuits are connected with a 40cm wire because of installation constraint.
When the circuit B is not connected, circuit A can output 7V as expected. However, after circuit B is connected, the circuit A output dropped to about 2.4V.
I understand that R45 should be as close to ADJ pin as possible, and the PCB picture below shows the actual layout. Is this considered close enough?
I understand that the wire resistance could deteriorate the output as explained in the LM1084 datasheet, but it seems that would happens only when R45 is close to the load side, which I thought was not the case here.
So would anyone please advise how the voltage drop happened and how I can solve the problem?
AI: The datasheet strongly recommends that R45 in your schematic be 121 ohms and not variable. For a 7 V output, R46 would be about 550 ohms. A 1K pot would center up nicely. |
H: Need detailed working or explanation of SCAN register in DSPIC
I am not able to figure out the working of SCAN register in DSPIC30F2010.I need to read 4 analog inputs in ADC and for that need to set the sampling and conversion
AI: From dsPIC30F2010 datasheet,
The inputs are selected by the ADCSSL register. If a particular bit in
the ADCSSL register is ‘1’, the corresponding input is selected. The
inputs are always scanned from lower to higher numbered inputs,
starting after each interrupt. If the number of inputs selected is
greater than the number of samples taken per interrupt, the higher
numbered inputs are unused.
Code example is here (for 4013, but the idea is the same) |
H: Reliability and MTBF
For an electronic device the the MTBF requirement is 4500 hours per year for 10 years, what does this MTBF mean and how to convert it into hours?
AI: MTBF means mean time between failures, so on average every 4500 hours there is a failure. This is for the first 10 years. Since there are about 365.25 * 24 = 8766 hours per year, this means an average of 8766/4500 = 1.948 failures per year. |
H: A weird heat sink
I recently come across several items employing a special type of heat sink structure .
Usually I see plate fin heat sink or pointy fin heat sink, they all have fins that are uniformly distributed.
Like this(Wakefield-Vette 655-53AB)
or this (Wakefield-Vette LTN20069)
.
But the ones listed below, however, have a non-uniform fin structure that I assume there should be some reasons behind.
Does there anyone here happen to know what's the name, origin and mechanism behind this kind of structure?
A CPU heat sink,
a high power radio device,
AI: The hole in the center is used to clamp the heatsink down and apply pressure to the IC it cools. This was a quite popular design back when thermal adhesive tape was not available or deemed not reliable enough. Today it has largely gone out of fashion but for applications where thermal tape cannot be used (e.g. high power application where the lower thermal resistance of thermal grease is needed). Incidentally, because this design was quite popular, it was available very cheap from multiple vendors. A lot of manufacturers still stick to these even though they use thermal adhesive tape, because they are cheap. Kind of an economic motivated cargo cult. |
H: Does a rated 5V, 2.1/1A charger provide a constant current?
I use power banks often to charge my iPhone. The default charger is a 5V/1A charger (which I assume provides constant current).
However, the power bank has 2 output ports - able to provide 5V=1A and 5V=2.1A - Does this mean it provides constant current or does it mean that the device will extract the current upto that maximum?
AI: You might think that your phone is directly charged from the powerbank/charger, well it is not.
The powerbank or charger only have the job to provide 5 V up to
the current stated on the device. So 5 V, 1A means a load (like a phone that's charging) can draw up to 1 A. The voltage is and must be 5 V. The phone determines how much current it chooses to draw.
How much current the phone will draw depends on signals on the 5V USB outputs of the powerbank or charger. If the powerbank or charger does not provide the correct signal the phone will "play it safe" and only draw 0.5 A or 1 A depending on the model.
The phone has the actual battery charging circuit, it MUST be in the phone as it needs to "know" what voltage the battery must be charged to, how much charge it has and what temperature the battery has.
Also the phone charging slowly when the battery is 80% full is actually a good thing and should also happen when the phone is charged from the 1A socket. Lithium based batteries MUST be charged more slowly when they're almost full. If this is not done the battery will wear out more quickly.
Also when the battery as at a very low charge, the charging current must be kept lower. Only at around 30% - 70 % charge is it OK to charge with the maximum current. The phone's build in charging circuit takes care of this so it happens automatically. |
H: Measuring Low Magnetic fields
Im working on a project where I want to measure low magnetic fields in a wire. The range I want to measure is 0.1 - 10 mG or 0.01 - 1 µT in low frequencies (DC - 500Hz) (This range (0.1 - 10 mG) can be larger but I want a accurate measurement in this range).
I looked into hall sensors and current sensors that use the hall effect but these are for larger fields most of the time (and large currents). I thought about using a current clamp and calculating the magnetic field from that, but that relies on the distance from the wire (and with these small field you make it really inaccurate).
At what other things should I look so I can move on in this project?
AI: You might look at the Fluxgate Magnetometer More details here and a DIY project here
It is not a particularly hard project if you know some basic electronics, or maybe you could buy a readymade one, although they are going to be a lot more expensive than the Hall Effect one you get in phones. However, they can measure down to the nano-Teslas
A fluxgate magnetometer consists of a small, magnetically susceptible
core wrapped by two coils of wire. An alternating electric current is
passed through one coil, driving the core through an alternating cycle
of magnetic saturation; i.e., magnetised, unmagnetised, inversely
magnetised, unmagnetised, magnetised, and so forth. This constantly
changing field induces an electric current in the second coil, and
this output current is measured by a detector. In a magnetically
neutral background, the input and output currents match. However, when
the core is exposed to a background field, it is more easily saturated
in alignment with that field and less easily saturated in opposition
to it. Hence the alternating magnetic field, and the induced output
current, are out of step with the input current. The extent to which
this is the case depends on the strength of the background magnetic
field. Often, the current in the output coil is integrated, yielding
an output analog voltage, proportional to the magnetic field. |
H: Is it always good to have positive slack in STA?
You may find this question easy. But it has been confusing me for a while now I really wanted to make it clear out of my mind. The problem is: Is it always good to have a positive slack along a timing path? Since slack is calculated as Required_Time - Actual_Arrival_Time, through which implies, in case of a positive slack, the Actual signal always comes earlier than expected. Then problems: I know it's good for setup time, but, isn't it a problem to hold time? Why people are only complaining about -ve slack but not +ve slack? Really thanks if you guys can help me out!
AI: ... in case of a positive slack, the Actual signal always comes earlier
than expected.
This is not true. The expected time for a signal is a window between min type (hold) and max type (setup) timing requirements.
Modern P&R tools (e.g. IC Compiler) try to fix both hold and setup violations. If a data path is very fast, the tool inserts delay cells and/or buffers to meet hold timing. After it succeeds, there is nothing to worry about the positive slack for setup timing.
For synthesis, hold checks are not much accurate, because clock tree synthesis (CTS) is not performed yet (done by the P&R tool). It's very common to see hold violations in post-synthesis STA. They are negligible to some degree and expected to be fixed by P&R. If I catch a real hold issue in synthesis, it's mostly (to my experience) caused by level-triggered cells (e.g. latches).
The final checkpoint is post-P&R STA. If there is no hold and setup violation, forget about the positive slacks. If hold violations exist, there must be something wrong with the timing constraints and/or the design. Positive slacks (of setup checks) are not the root cause of hold violations themselves. |
H: Pole calculation -180 not +180 phase
Gain in feedback system is defined by:
\${V_{out} } /{V_{in}} = A / (1+Af) \$
We have a pole when \$|Af|=1\$ and \$\angle Af =-180\$
Any complex number can be expressed as \$z=r(cos \theta +j\sin \theta)\$
But when \$\theta=180 or -180 , cos \theta=-1\$ in both cases and sine is zero.
So why in the definition, it says the phase is \$-180\$ deg not positive \$180\$, to me both yield the same result.
AI: The big reason for preferring -180 is: feedback control for causal systems. In causal systems, only delays are possible which correspond to a minus-signed phase shift.
In non-causal systems, which can respond to "future" data, it is perfectly sensible to be able to have positive-signed phase shifts. This is possible whenever data is not time dependent. E.g. You have an image and your feedback control system is a filter operating on that image. |
H: Lightning Rod Hack By Using Satellite Dish
Our condos' rooftops don't have lightning rods per se, but they do have satellite dishes and AC units mounted there as well. Would these, if properly grounded (and these should be) act as lightning rod "hacks?" This question just hit me like, well, a bolt of lightning !!
AI: Lighting is a lot of energy dumped in a small amount of time. The grounding wire used (most likely from the existing power network) is most likely not rated to handle that kind of surge.
Proper lighting rods and their grounding wires are very generous in their current carrying capacity to minimize the energy absorbed due to internal resistance and heavy enough to make sure there is enough thermal mass to stay cool enough to not melt the wire and/or set fire to your house. |
H: Arduino and motor driver l298n separate power supply circuit
I have an inquiry regarding the l298n motor driver.
I encountered a problem while using it. It's like this: every time i attach the wires of my dc motors into the board's "motor A" and "motor B" connectors, my dc motors wont move. I re-checked my code to see if there were errors, but there were no errors both in syntax and in logic.
I also noticed, that when i test the voltages at the connectors, there is no voltage output. But every time i remove my dc motors from the connectors and test the voltages at the connectors, there is voltage output. I am confused and i dont really know how to solve this problem. I've searched as much as possibly could in the net, but to no avail.
I am hoping you guys could help me. i would really appreciate it.
Below is a diagram of my circuit. As you can see i plan to power the arduino and motor driver separately, since i am using bigger motors.
AI: You need to make a connection from arduino ground to the driver board ground and supply 5v from arduino board to driver's board 5v input. |
H: What does a slash over a line in a circuit diagram mean?
In the following diagram (from the book by William Stallings, Computer Organization and Architecture), what does the slash / over the lines mean?
For example, there is a / through the line labeled s + w on the top. Why is it there, and what does it mean?
AI: It represents a bus or a set of parallel lines, and the value next to it is the number of individual lines. |
H: 50 hertz sine wave in oscilloscope when I touch it
I bought a new PicoScope USB oscilloscope and noticed that when I touch the tip of the probe with my hand I see a 50 Hz signal of 2 volts on the screen. What is causing this? (Or rather, how is the mains 50 Hz sine wave getting through me to the scope?)
AI: There is a small capacitance between you and the power network. Also there is another, different capacitance between scope's ground and power network. Input impedance is high enough, usually 1Mohm, so you create a kind of voltage divider between power network, oscilloscope's probe and it's ground.
This is a purely capacitive phenomenon. Calling it an "antenna" is a bit misleading and is not any better than others slogans. |
H: How to Plot X/Y in Java Circuit Simulator
Does anyone know how to select the Y variable when doing an X/Y Plot in Java Circuit Simulator? I tried many things and none have worked.
AI: To create an X/Y plot in Falstad's Java Circuit Simulator, do the following:
Right click on the component that you would like to measure for your 'X' variable.
Select 'View in scope'.
Right click on the waveform and uncheck 'Show Voltage' or 'Show Current' to isolate the 'X' variable that you would like to plot.
Right click on the waveform again and select 'Plot X/Y'.
Place a scope probe where you would like to measure the voltage.
Right click on the waveform again and choose 'Select Y'.
Lastly, left click on the probe that you would like to use as your 'Y' axis.
Note that you can only measure voltages on the 'Y' axis of an X/Y plot! |
H: Help with capacitor circuit calculations
Hopefully somebody will be able to help me better understand how to calculate capacitor change and everything else. I just started studying them. The problem and my attempt to solve it is below.
How would I go about to get E (energy) and Q for each capacitor? thanks!!!
EDITED AFTER COMMENTS
GIVEN:
C1 = 20 uF
C4 = 2 uF
C6 = 70 uF
C8 = 10 uF
V(total) = 3 kV
Find V voltage, E energy, Q electrical charge for each capacitor.
simulate this circuit – Schematic created using CircuitLab
First I simplify the circuit and calculate C46:
simulate this circuit
$$ C_{46}=C4 + C6 = 2uF + 70uF = 72uF $$
$$ C_{total} = \frac{1}{\frac{1}{\text{C1}}+\frac{1}{\text{C8}}+\frac{1}{\text{C46}}}=\frac{1}{\frac{1}{\text{20}}+\frac{1}{\text{10}}+\frac{1}{\text{72}}}=6.1017 uF=6.1017*10^{-6} F $$
$$ Q = Q1 = Q8 = Q46 = 6.1017*10^{-6}*3000 = 1.83051*10^{-2} C $$
$$ V1 = \frac{\text{Q1}}{\text{C1}} = \frac{1.83051*10^{-2}}{2*10^{-5}} = 9.15255*10^{2} V $$
$$ V8 = \frac{\text{Q8}}{\text{C8}} = \frac{1.83051*10^{-2}}{1*10^{-5}} = 1.83051 * 10^{3} V $$
$$ V46 = \frac{\text{Q46}}{\text{C46}} = \frac{1.83051*10^{-2}}{7.2*10^{-5}} = 2.5424 * 10^{2} V $$
$$ E = \frac{\text{V*Q}}{\text{2}} = \frac{3000*1.83051*10^{-2}}{2} = 2.7458*10^{-2} J $$
$$ E1 = \frac{\text{V1*Q1}}{\text{2}} = \frac{9.15255*10^{2}*1.83051*10^{-2}}{2} = 8.3769 J $$
$$ E46 = \frac{\text{V46*Q46}}{\text{2}} = \frac{2.5424*10^{2}*1.83051*10^{-2}}{2} = 2.3269 J $$
$$ E8 = \frac{\text{V8*Q8}}{\text{2}} = \frac{1.83051*10^{3}*1.83051*10^{-2}}{2} = 1.6754 *10^{1} J $$
$$Q4 = C4*V4 = 2*10^{-6} * 2.3225*10^{3} = 4.6450*10^{-3} V$$
$$Q6 = C6*V6 = 7*10^{-5} * 2.3225*10^{3} = 1.6258*10^{-1} V$$
$$E4 = \frac{\text{V4*Q4}}{\text{2}} = \frac{2.3225*10^{3}*4.6450*10^{3}}{2} = 5.3940*10^{6} J $$
$$E6 = \frac{\text{V6*Q6}}{\text{2}} = \frac{2.3225*10^{3}*1.6258*10^{5}}{2} = 1.88796*10^{8} J $$
AI: If we consider two capacitors in series
simulate this circuit – Schematic created using CircuitLab
Then we know \$ V_{C1} + V_{C2} = V_{tot} \$ but we have no way of determining how this is shared because lets say \$ C1 = C2 = 1 \mu F\$ and \$ V_{tot} = 300 \text{V} \$ for example then there is nothing to say the voltage has to be shared equally because one capacitor may have had some initial charge which makes this claim invalid. Also since no current is flowing at DC the voltages across the capacitors will be dominated by the leakage resistance of the capacitors and not the capacitor values.
If we are assuming a purely theoretical answer then we can ignore leakage resistance and if we assume all capacitors were initially fully discharged we can assume that \$ Q_{C1} = Q_{C2} \$ since \$ Q = \int i \text{ dt} \$ and since all capacitors initially had zero charge and have had identical current flowing in them at all times since.
With that caveat in place the approach to this type of this problem is:
Calculate total capacitance (you have done this already).
Calculate total charge \$ Q = C{tot} \cdot V{tot} \$.
Calculate the charge in each series element, they all have the same \$ Q = Q_{C1} = Q_{C2} \$.
Calculate the voltage across each capacitor \$ Q = C \cdot V \Rightarrow V = \frac{Q}{C} \$
Calculate the energy in each capacitor \$ E = \frac{1}{2} \cdot C \cdot V^2 \$ |
H: Recapturing side and back lobe radiation from a directional antenna
When you look at the radiation pattern for a directional antenna, you see a major lobe where the greatest concentration of radiation is found and side and back lobes that have much less concentrated radiation.
I was wondering what methods, if any, have been developed to "recapture" the side and back lobe radiation and concentrate it in the main lobe for greater antenna performance?
AI: The goal of all directional antennas ("antennae"?) is to redirect energy into the desired direction.
For example, look at the ubiquitous Yagi antenna:
(image from CISCO)
In this case, there is one element behind the radiating element which is know as the "reflector". This acts as a mirror to direct that energy to the forward direction. There are also a number of elements in front of the emitter, called director(s), which focus what would be "sideways radiation" towards the front.
Note that the reflector and directors are parasitic. That is, they aren't driven, and only affect the radiation pattern based on their geometries.
So, when you look at a radiation pattern that shows back and/or side lobes, those lobes represent the energy that's left over from the attempts to direct it forward. |
H: What are the things to be taken care of while buying a crystal oscillator?
I need an external crystal oscillator for PWM output of 10kHz using dsPIC30F2010
AI: Typically you can either buy a crystal and place your own components around it, as usually described in various MCU data sheets, or you can buy a self contained oscillator module. If you are new to electronics the latter course is preferable because crystals can be quite sensitive to PCB or prototyping layout. |
H: Can a GPS receive its signal from within the engine compartment of a vehicle
I want to place the GPS and GPS antenna inside the engine compartment of a vehicle. Will the device acquire an accurate fix?
AI: Probably not, GPS works with extremely weak EM signals from the GPS satellites. These EM signals cannot pass through metal. So if the hood is metal: no, won't work.
Also, if the engine runs on petrol, it has an ignition. This produces disturbances which will disturb GPS reception.
Even on a diesel which has no ignition there are many parts with active electronics in the engine compartment which will harm GPS reception.
All in all: I think you would be extremely lucky if the GPS worked at all. |
H: What does this op-amp circuit do? (part of an ECG)
I would like create an ECG circuit based on this schematic (from the AD620AN datasheet):
I don't know this part of the circuit and how it works. I know this is called a right leg driven circuit which is reducing the effect of the noise. But I don't know exactly how negative feedback works in this case. Can someone help me?
AI: The right leg driver tries to drive the average voltage of the body to cancel out noise. The right leg is chosen because it is far from the heart, so any signal injected on there will be common mode to two electrodes near the heart.
The right leg drive is much more tightly coupled to the body than ambient noise it picks up from capacitive coupling to things like the AC power in the room.
The network in the feedback path of the right leg driver opamp provides some low pass filtering of the signal. |
H: Splitting induvidual WS2812B LEDs
My motherboard has a WS2812B header for use in addressable RGB LED strips. However I am not using them for those strips, as instead I would like to use the signal to separately control several other RGB LED devices (fans, reservoir, GPU, monoblock, ...). The WS2812B connector itself is rated at 3A (5V) and needs to be split up into 12V RGB signals (I'm sure 500 mA or so will be fine).
I have some experience with Arduino programming and have the equipment to solder, but any solution that makes it work will be fine. However, it is paramount that there is no way that I can damage my motherboard.
To further clarify, this header on the motherboard has the following pins: +5V, Data and Ground. The motherboard is the ASUS ROG Zenith Extreme. You can find the header I'm talking about on page 40 of the manual.
Is this even possible? Is there already some device that makes this work? How would I go about making this work?
Thank you in advance,
CX
AI: If you have "dumb" RGB strips that require 3 PWM signals, you can get WS2811 chips individually WS2811 @ AliExpress.
If you get LEDs that have WS2812B chips inbuilt (note: they don't need to be in a strip, they can be individual) then you just route the signal from LED to LED around your case. |
H: Damaged Solder Joint?
So I bought a SEGA CD off ebay and everything was fine until I decided that the duct tape that was holding the battery is was a poor substitute for a battery holder.
So I took my Model 1 apart begun to unsolder the joints that held the battery down. However, one of the parts snapped off and my attempts to empty the hole and remove the remains may have damaged it in the process. Below pictures of the hole that may be damaged.
I've tried applying more solder and removing, solder wick, solder sucker, nothing. I will admit I put my iron directly on top of it hoping it would melt the solder inside causing the pin to drop out but that didn't work.
At this point, I'm considering using a small drill or a jewelers filer to clean out the hole however I'm only considering this last option which I will probably put off for a while due to how uncomfortable I am of using them on a PCB.
So basically, what are my options? What can I do to save the PCB? Can I simply drill or clear out that hole with a drill/filer and fill it with solder to fix it?
Edit:I'm using a 25W Soldering Iron. Picture was linked in comments.
AI: The hole may still contain part of the leg that was originally soldered there. In addition, because the hole is attached to a plane you will need significant heat in your soldering iron to keep the solder hot enough to properly melt into a sufficient fluid to soak it up with wick.
Try heating it again with a little bit of fresh solder that contains flux till it melts all the way through, then with a suitably thin piece of single strand wire, poke it through the hole till while keeping the heat on till it clears whatever is still in the hole. Then keep pushing, or pull the wire through the hole. The wire should eventually take the remaining solder with it.
It is important the tip is hot enough and large enough to have a decent contact area. If your tip is too small, or you are too aggressive and apply too much force you will just auger out the pad which is bad.
If the board is double sided, drilling through is an option, but if it is multi-layer I would advise against this, especially if the pad connects to the inner layers or planes.
Once you clear the hole, install the new part and carefully solder from both sides then check the connections with your ohm-meter. If need be add a jumper wire to the nearest good trace or plane. You may need to scrape off some etch resist with a knife to do so.
ADDITION: Since that looks like a tandem connection, i.e. both go to the same place, if one is damaged electrically (e.g pad on one side only) you may get away with using it without rework, though mechanically it will be weaker. |
H: Converting 32 bit 2's complement to decimal number
I have data coming from a V9261F energy measuring chip (link to datasheet), that sends it data through a UART to my Arduino microcontroller. When I read register 0x0119, I read the active power measured by the chip. But the problem is that this feedback is in 32 bits 2's complement and I can not decode it.
Starting from the 4th byte in the stream are the data bytes in which the measured variables are stored (see data sheet pg 56 - 57). For reading register 0x0119, this should be in databyte 10 - 11 - 12 and 13 (D1) respectively 0x55, 0xE7, 0x0E and for databyte 13 0x00.
So the feedback for the active power all the bytes combined I have is 0x000EE755 -> subtract 1 (for 1 complement) = 0x000EE754 -> invert it to become decimal number = 0xFFF118AB (4293990571 dec).
But this insane big number should only represent an active power of 6.2 Watts.
What do I do wrong with converting from the 2's complement to decimal? How should this represent 6.2 watt?
AI: I think you have a misunderstanding of what "2's complement" means. A positive 2's complement number is identical to a positive binary number (the most significant bit must be zero). So for 8 bits we have 0x00 (zero) to 0x7F (127). Numbers less than zero go from 0xFF (-1) to 0x80 (-128). To make a negative number positive so you can display it as a minus sign in front of a positive number you can calculate the 2's complement as you show above. Note the special case of 0x80.
So with 0x000EE754 you have a positive number of decimal 976724. There is a scaling factor between that and 6.2 of 6.3478E-6.
Probably what you want to do is to convert the number into a floating point number and do the calculations in floating point. It's already in 32-bit signed integer format. |
H: current through the smoothing capacitor in bridge rectifier
Can any one tell the reason for the current through the smoothing capacitor to be pulsating in the full bridge rectifier.
I have attached the screenshots of the circuit and the wave form obtained in Multisim.
AI: The diode will only conduct current to the capacitor when the cyclic voltage from the transformer exceeds the voltage remaining on the capacitor. At other times the diode will block and therefore there will be only a leakage flow of current (very small).
Given that most folk want a DC output that is fairly smooth (i.e. the capacitor is large) the voltage on the capacitor causes the diode to be reverse biased most of the time and the diode will only allow current when the cyclic voltage from the transformer is at or near the peak of it's waveform. Thus, the diode ceases to conduct once the voltage from the transformer starts to reduce. |
H: Ideal Transformer equations when the secondary winding is short-circuit?
This is my problem
Now I know that ideally $$V_1/V_2 = 1:α$$ and $$(J_1-J_3) = α (J_2-J_3)$$
where J1 is the current of the left mesh, J2 is the current of the right mesh and J3 is the current of the mesh in the middle(the one that passes through Zx)
If V0 = 0 then that means that ZL is short-circuited thus $$V_2 = 0$$ as well. Can I use equation of currents for the ideal transformer if V1/V2 can't be used?
AI: The component jwL is transferred to the secondary and its new impedance is: -
\$\dfrac{j\omega L}{N^2}\$ where N is the transformer ratio primary to secondary.
This then simplifies the circuit and allows you to remove the transformer because once jwL transfers to the secondary, you can replace the transformer with a voltage source of Vin/N feeding into jwL/\$N^2\$.
The problem then boils down to solving a potential divider formed by Zx and jwL/\$N^2\$. At the top of the potential divider is Vin and at the bottom of the potential divider is Vin/N and, at the centre point is 0 volts. ZL plays no part in this analysis because it connects to the centre point and the centre point produces 0 volts.
Here's how V2 becomes the new input voltage and jwL transfers to the secondary: -
"ratio" = N in the picture.
And the next step is to ignore the transformer completely and just treat the problem as a potential divider with one voltage being Vin and the other voltage being V2 aka Vin/N.
The unknown impedance will be capacitive BTW. |
H: Decoupling capcitance
Just a quick question about decoupling capacitors here, hopefully will be something nice and easy!
Let's say you are designing a circuit with 4 IC's that all need a decoupling capacitor. Some datasheets specify the minimum value of decoupling capacitor that should be on the PCB. Let's assume all of the datasheets to these IC's say a minimum of 100nF is required.
If all of the IC's are powered from the same rail, and each one has a decoupling capacitor of 100nF, will this not then mean they are in parallel, and hence lower the capacitance? With 4x 100nF capacitors, will this mean that each IC now has a decoupling capacirot of around 25nF value?
If a datasheet says their IC requires a minimum decoupling capacitance of 100nF, will there be any issues from this now?
As a visual aid:
simulate this circuit – Schematic created using CircuitLab
If we just ignore the function of the IC's and just focus on the input, we see all 4 are connected in parallel between V+ and GND, is this not the exact same configuration as this:
simulate this circuit
This, as we all know will give us a total capacitance of 25nF(ish). Am I right in thinking that this is how it would work? And are there any instances where this could cause issues?
Apologies for this question. As soon as I read the answer by Andy aka, I realised how silly it was! Must have been a long week this one!
AI: Paralleling capacitors means the net value is the sum total so 4x 100 nF capacitors in parallel means the net capacitance is 400 nF.
If the capacitors are in series then the net capacitance would be 25 nF but this isn't the case in the scenario you described. |
H: High power LED on aluminium core PCB
I'm working with a high power LED(40W heat dissipation) on a single layer aluminium core PCB.To calculate the required heatsink it did the following:
\$P = 40W\$
\$Rjc = 0.6K/W\$ (datasheet)
\$Rcpcb = 0.77K/W\$ case to PCB. This is the thermal resistance of the isolation layer(MSC TC-Lam 1.3, 100µm)
\$dT = (Rjc + Rcpcb) * P = ~55K\$
In summer \$(Ta = 45°C)\$ this would require a heatsink with \$(Tjmax - dT - Ta)/P = (110 - 55 - 45) / 40 = 0,25K/W\$ which is hard to achieve without forced air flow(not allowed in the environment)
The only parameter I can change is Rcpcb.
Question: The manufacturer can mill through the isolation layer, but is there a way to connect(solder) the thermal pad directly to the aluminium core?
Are there any other ways to get the heat away?
AI: I needed this TO220 to dissipate a lot more than a TO220 can. The limiting factor was the silpad at the back (similar to your case). So I soldered it on a flat piece of copper and mounted that on the heatsink. The much larger silpad area does wonder to heat removal!
Since this is a one-off I suggest doing the same, reflow the LED on a big chunk of copper, and bolt that on the heat sink with thermal grease. |
H: Using Matlab to send digital signal from National Instruments device
I currently have a circuit set up with an NI USB-6501 connected to a mux and was wondering how to use MATLAB to send a digital signal from the NI device to the mux.
AI: The link provided by Warren is for analogue. Click here for digital.
From what I understand you are trying to get Matlab to send a digital signal to the NI and then the NI sends a signal to the MUX. If that is what you are trying to do then you need have code in your NI to take the data received from Matlab and transmit it to the MUX.
You need to distinguish are you only trying to communicate with the NI or are you trying to programme the firmware of the NI using Matlab as well?
If you are only trying to communicate with it then that link is all you need (provided you have already coded the NI to handle the data) |
H: class AB amplifier distortion
Building a simple class AB audio amplifier to drive a 16 ohm, 5 watt speaker from my phone streaming music. I have found many circuits on line, and am just building a simple version. The circuit is as below
simulate this circuit – Schematic created using CircuitLab
I am getting alot of distortion from this circuit, and alot of times the audio cuts out completely. I figured it was either because the power supply was too small, the connections were crummy, the speaker was too big (doubtful, but really wasn't sure what the problem could be) or the transistors are not biased correctly. I tried some different power supplies and got the same results, so I don't think that is the problem. I tried a different speaker and got the same results, so I don't think that is the problem either. I soldered everything on a perfboard, and crimped or screw terminaled external connections - same result. I am down to a biasing problem, but I am not sure how to obtain the proper bias. Most of the circuits I found were very similar to this.
One big difference is alot of circuits use TIP31/32 transistors or something like that for the output stage. Could the problem be in these BD135/36 transistors I am using? I scavenged them from a tv control board or something and didn't have any TIPs, but I thought this should work. Transistors test fine. I took a bunch of measurements I could post if those would be helpful. I did notice that at one point the NPN transistor in the push-pull stage was very warm while the PNP was cold with no input signal, which also led me down the path of improper biasing. However, I have not been able to repeat that phenomenon, which I also found weird. Right now, all three transistors are running pretty cool, which I think is a result of the transistors not conducting properly due to improper biasing.
AI: The original:
R1 is bootstrapped to the output, so it acts more or less like a current source to bias the diodes D1/D2.
The diodes are not thermally coupled to the transistors, but this is mostly a class B amp, so the rigk of thermal runaway is low. Still, 2N3904 to drive a 8 ohms speaker is.... mmeeeehhh... low current transistor.
R2 is essential, as it provides feedback! Without it distortion will be huge.
And more important, R2 sets the output DC operating point (in a way that doesn't work...)
Fix:
R2 needs to be 10k, not 100k.
Add 1.5k resistor between Q3 base and ground.
This makes a voltage divider. Q3 will keep its Vbe around 0.65V, so the feedback voltage divider will keep the output around 4.3V or midsupply. This sets the DC operating point. Without the second 1.5k resistor, DC operating point is dependent on Q3 base current, which is not known.
Add 1.5k to 10k in series with the input cap, since this thing takes a current input (more or less...) it will have too much gain without the resistor. |
H: What is the purpose of the gate runner on a semiconductor die?
With reference to the image of a FET die below, the gate pad is used to make connections from the die out to the device package. But what is the purpose of the gate runner? Why does the gate connection need to run around the device like that? Is any electrical connection made to it?
AI: Judging from the figure, the gate runner is the metalization that delivers gate current to the physical gate. Understand, first, that the active FET area covers most of the die and that a large FET is generally constructed as a massive array of much smaller FETs. If you think of it this way, you can see that the terminal signals for the drain, source, and gate need to be distributed across the surface of the die.
The physical gate material for most FETs is poly-silicon, which has substantial resistance. So making contact to the gate at a single location near the bond pad and relying on the poly to distribute the gate current across the die would result in a large effective gate resistance, Rg. Rg is generally an un-desirable parasitic (slows down switching speed, etc.). So, metal is used to distribute the gate current across the die, with local contacts to the gate poly along the length of the "runner". |
H: Calculating a good charge current for 3s156p 18650
I have built a 3s 156 p Samsung 22p pack to use as a house battery in my van. I'm trying to find a charger for it. Currently I am using my balance charger tenergy tb6b. Here is a screenshot with the data sheet on it. How would I use this information to calculate charge current and any recommendations on a charger. So I need to find an AC/DC charger for it when on shore power and considering the Genasun GV-10 for solar charging.
Thanks in advance!!!
AI: You "could" charge at 2150mA * 156p = 335.4A or using CC to 4.2V then off at 10% of CC, but this is not wise over the lifetime of the battery as cells fail the rest must take up the current which accelerates failure of the while pack. Even with this being 2x nominal current of 167.7A only saves 0.5hr/3hr or 16% of the time.
It is wise to use nominal current and this power represents 168A*4.2V*3 = 2.1kW.
A 140W Solar Charger is only 6.6% of your storage capacity and there can be significant charging losses in the battery and charger. This might support 1kWh per day of use assuming > 8 hrs of full sun per day with solar tracking.
Choices of charger and Solar power source require that you define your Solarity index and Energy consumption patterns max/day, avg per week and budget for a power source + charger.
The van's engine alternator might be a good source if avail. with 4.2V*3 = 12.6V from 14.2V using a LiPo regulator with balancer. Dodge Van alternators can be upgraded to 180A I believe and if there is room to add a 2nd alternator, it can be modded to act as an exclusive LiPo charger.
p.s.
I assume you have the skills to make this safe and reliable. Otherwise, better check your Van insurance for fire from DIY battery failures.
Multiple Thermal sensing is critical with intelligent power management. |
H: When do I connect to negative terminal or ground?
Easy question (or at least I think). I've installed a siren in my vehicle which calls to pull power direct from the 12 volt battery. I currently have the circuit completed by connecting to the negative terminal on the battery. I've been told that sometimes it is best to connect to a grounding point on the vehicle like the frame.
Is this necessary for my situation or ever?
Thanks in advanced!
AI: The negative of the battery is connected to the chassis so run your postive to the battery (make sure it is fused) and connect the negative of your siren to the chassis. Look for any bolt nearby, use a ring terminal and fix it down. However do make sure that the chassis surface is bare metal (sand it down), any significant amount of paint will result in a bad connection and cause problems. |
H: Integrating on-off-on-off switch with Raspberry Pi GPIO pins
Please note: Although this question involves a Raspberry Pi, I believe it an electronics/wiring question at its heart.
I'm new to electricity & electronics and I'm trying to get this simple on-off-on-off switch to work as a pushbutton to my Raspberry Pi 1 Model A.
By default, this switch works as follows:
You press the switch, its "closed" and is considered on, but is routing power through the left pin
You press it again and that makes it open/off
You press it again and that makes it closed/on, but now its routing power to the right pin
You press it again and its off; if you press it again we rinse and repeat this cycle
However I would like to wire the left/right pins together to effectively transform this into a typical on/off switch whereby the behavior is:
You press the button and its closed/on, routing power to the line joining the left and right pins together
You press it again and its open/off; if you press it again we rinse and repeat this cycle
I believe the wiring diagram for this type of setup is:
So to begin with, if that wiring diagram is incorrect, please begin by correcting me!
Assuming its correct, then this is my best attempt to wire it to my pi:
So:
Attach left & right pins on the pushbutton together and then route them to the GPIO input pin
Route the middle pin on the pushbutton the GND on the RPi
Can anyone take a look at this and help nudge me along? Have I joined the left & right pins correctly? Do I need a resistor anywhere (if so how strong and where does it need to go)? Am I wiring the joined left/right pins to the pi correctly? Am I wiring the switch to power & ground correctly? Thanks for any-and-all help!
AI: Yes, that's exactly right, assuming you accurately described the switch. Simply tie the left and right pins together, no resistor needed.
Don't forget the pull up resistor in your schematic. From 3.3V to 10K ohm resistor to the gpio pin. |
H: Range of 1 volt radio wave
I have a simple question how much radio wave produced by 1 VOLT can reach in KM , i mean it will be detectable in which range , without any mountains walls ..etc just on flat surface with air?
AI: Given 0.632vpp is 0dBm (i.e. exactly 1 milliWatt) across 50 ohms, we'll use that power level. What distance, for 0dB SNR (good for Morse Code) in 10Hertz bandwidth? At 30 MHz (near the CB allocation)? With quarterwave antenna?
The required energy from the receiver antenna is
-174 dBm/rtHz
+10dB for 10Hertz BW (good for several dit/dah per second)
+0 dB SignalNoiseRatio
+0 dB noise figure of receiver, and any matching loses
total -174 + 10 = -164dBm; -160 is 10^-8 volts below 0.632vpp or 6.32 nanoVolts.
We have -164dBm or 6.32nanovolt/sqrt(2.5) = 5 nanoVolts peakpeak.
The total path loss 164dB, line-of-sight, no antenna losses or multipathing.
[read Andy answer for more details on realworld problems]
Path Loss is 22 dB + 10 * log10([distance/wavelength] ^2 )
Our allocation for distance/wavelength is 10^[(164-22)/20] = 10^142/20 = 10^7.1
Thus distance can be 10^7.1 times one wavelength.
Lambda (30MHz) is 10meters, thus distance can be 100,000,000 meters
or 100,000 kilometers. 30Mhz is good frequency for long range RF communication. |
H: Is a hardware register the same as a processor register?
I have tried searching for the difference between these two terms but everything I find gives ambiguous results. What is the difference between a harware register and a processor register, if there is any?
AI: A processor register is a storage element inside the processor which is used to hold numeric values, addresses, status or control bits which are involved in internal processor operations.
A hardware register is a storage element inside peripheral hardware (eg. an I/O port or DMA controller) which is separate from the processor. These are used to configure and control the peripheral hardware or hold data and status information relating to the peripheral.
As with most definitions, there are grey areas. Some architectures have processor registers in external memory or I/O space. Others have internal CPU registers which control peripherals or are connected I/O pins. |
H: Analog circuit to maintain a minimum current?
I am looking to get a USB battery pack for use with both my phone and my bluetooth headset, but my bluetooth headset has a drain of only around 50mA when charging, and it seems that most battery packs have a minimum current draw of 50mA, below which they will shut off (presumably to prevent vampire currents from draining the battery pack). This is essentially the same problem posed in this question, but the answer there relies on the fact that the person asking the question is trying to power an Arduino (and can use the GPIO-boards to modify the current draw). Is there a more generic, preferably analog circuit that will provide a minimum current draw on a battery?
I have a preliminary design using one op-amp and sense resistor as a current sensor, then using the voltage difference between the current sensor and a fixed voltage to drive an NPN transistor, but I think I've messed up the feedback somewhere, because once the load current drops below the threshold, the fallback current goes to the rails. See the circuit diagram:
You can download the Qucs .sch file from this gist. My questions are: is there a better approach to an analog circuit that provides a minimum current? If so, what is it? If not, how do I fix the feedback on this so it provides exactly the desired current?
Note: For simplicity's sake I used traditional op-amps with negative and positive rails, but once I nail down the general approach, I'm going to need to adjust this so that it can be powered with the battery itself, so only 0V and 5V rails. I don't think it should make a big difference, but it's important to know I suppose.
Edit: For practical purposes, I think that this answer on a similar question (HT Ali Chen) actually makes a lot of sense - since the battery packs tend to stay on whenever the momentary current draw is above the specified value, it seems to me that some circuit with a low duty cycle would likely be the simplest and most power-efficient, but that can always be implemented in addition to the answers below, so that doesn't change this question.
AI: Here's a poor man's 2-BJT version.
POT+Q1 set the voltage at the base of Q2.
(V(R2)-Vbe(Q2))/R1 sets the current.
This circuit, however, is too sensitive to V1 variations. Furthermore (depending on the resistor values), there could be an excess current, for heavier loads (smaller YOUR_LOAD values in Ohm).
simulate this circuit – Schematic created using CircuitLab
A better solution is the "not so poor man's" 6 components solution (capacitors excluded).
Some remarks:
You must use an OP amp capable of going down to 0V (both input or output).
You can change it so that it regulates the positive rails (you must use another op-amp and modify the circuit accordingly)
You need an OP amp capable of driving 50mA. (LM358 can't so this circuit will work only if you load has a minimum consumption). You can add an output npn BJT or MOSFET (toward Vdd), instead of changing OP amp. Watch out for OP Amp (or BJT/MOSFET) power dissipation!
A decoupling capacitor is recommended.
A filter capacitor is recommended between the non inverting input and ground.
simulate this circuit |
H: custom built computers
When buying an off-the-shelf computer I assume it gets tested to make sure for example that the power supply meets the regulation, the battery and usage does not exceed the limits etc.
How does it work when building or substantially customising a laptop/desktop, is it the case that the parts are approved individually and therefore the whole system is approved to be sold in the UK or is it completely not regulated?
AI: There are several 'regulations'.
The power supply bears the brunt of complying with many. Mains safety, mains-borne EMI, low power when in standby, power factor. The rest of the computer is at low voltage DC, so doesn't influence these.
Fire risk should be handled on a part by part basis, with them being fused internally or otherwise protected from drawing too much current, or being metal cased so that a burning component in a part doesn't spread to others.
Transmitted EMI should have also been pre tested part by part, but the connected system obviously cannot be tested for that until it's assembled. Here, the case, with its conductive flanges can improve the system EMI. I'll wager that custom-built computer suppliers don't test each machine they build for radiated EMI anyway, as it's a difficult and expensive test to do properly, but rely on the parts and case. |
H: Thevenin network without resistance?
I'm trying to find the Thevenin equivalent network for the circuit below.
But whenever I solve the equations, I always end up with V(t)=2V_a - 3i_s and
can't get any expression showing V(t)~i(t) relationship. There's no way Thevenin resistance does not exist, but I can't get the grip of where i(t) appears..
I've tried short-circuit(V=0)/open-circuit(i=0) method along with putting test voltage between the terminals. The problem is that I can't get any expression that relates i(t) to V(t). Can somebody help me and find the v-i relationship for this circuit?
Thank you for reading my question.
AI: Thevenin voltage is obviously 10va(t) as the voltage source is directly connected to the open circuit terminals.
It is also obvious that the thevenin resistance is zero as any load connected to the terminals will be driven directly by the voltage source (which is taken to be ideal an therefor doesn't have any internal resistance).
The rest of the circuit doesn't have any influence on the connected load. |
H: BGA prototyping practices
I'm working with a few BGA chips of a very fine pitch 0.5mm even smaller sometimes. What is the practices for being able to essentially breakout all the connections from these chips? I've just been dead bugging them for now but that's a very time consuming process and it has caused damage to a few of my chips before.
AI: 0.5mm BGA gets expensive: look here page 11.
If you do it properly (as shown in the document) you'll need vias with 0.12mm drill and 0.25mm pad. This is not basic cheap PCB prototyping, it's real high quality manufacturing. You can get 4-layer for $40 these days, but not with these tolerances, this will cost several hundreds.
If you put the solder balls on top of vias the solder will get sucked in, I don't know if it would work.
I'd recommend a BGA prototyping board but couldn't find any in 0.5mm pitch. YMMV. It may very well be cheaper to buy the chip manufacturers' eval board. |
H: op-amp circuit explanation
Hi everyone I'm studying Op-Amp but I can't understand this point in the AC circuit :
In the first picture it says Vo = Ic * Rc,
and in the second picture I have the value of Ic,
when I try to apply this in the given formula before the answer is wrong. Why?
This second formula is used instead of the first one?
Is there is a difference ?
AI: You're first picture has no component called \$R_c\$, but we can clearly see that \$V_o = I_c R_c\$ does not apply for the second picture, but instead it is
$$V_{R_c} = I_c R_c \qquad V_o = V_{cc} - I_c R_c$$
But when doing a AC-Analysis \$V_{cc}\$ is removed, as it is a constant voltage source, and therefor \$R_c\$ is short-circuited to ground. Then you actually have \$V_o = I_c R_c\$.
Attention: AC-Analysis vs. DC-Analysis
We use DC-Analysis to find the bias-/working-point. With the small-signal-model we can use, altough being restricted to a bounded input voltage, a linear model for easier analysis of the circuit, despite the nonlinear behavior of a transistor.
Microelectronic circuits from Sedra&Smith is a very good source of information if you're new to electronics. |
H: What is the practical advantage of using mirrored signal outputs eventhough what matters is balancing the wires?
Some devices output differential outputs since both wires carry varying signals which are mirrored. Most devices on the other hand output one signal carrying and one GND wire. There is also differential-ended wiring and single-ended wiring. My question will be about "external" interference type of noise(EMI or RFI or maybe capacitive coupling) impinging upon both wires.
After some reading, if I'm not wrong I came to understand the fact that what we really want is "the same noise should appear upon each line" regardless of it is a differential or single ended wiring. And the noise must be common(common mode) so that the differential amplifier can cancel it out.
As far as I understand, there are two main ways to make the noise common. One of them is twisted pairing. The idea here is the wires are very close to each other because they are twisted and the same magnetic filed or electric field hits upon both wires. The second method to make the external noise common is to make the total output impedance(from source to receiving end) of both wires equal, so if an EMI happens both wires would induce the same voltage at the same time.
Upto here was just a summary of my understanding to show/check to whom read this.
Here is a simple illustration of a single-ended and a differential-ended wiring:
If they are both using twisted wiring and they are all balanced, they would both reject the common mode noise.
So what is the point to send the signals in mirrored fashion if one can balance and twist a single-ended wiring as well? Is that because something is practically easy to establish in differential/mirrored outputs? I really couldn't find a good answer to this.
edit illustration for a comment:
AI: As has been mentioned by peufeu, if you use balanced differential drivers you create twice the p-p voltage and hence the SNR is doubled because noise can be assumed to remain as it was previously. But, there is another subtlety that was alluded to in the question and this relates to impedance balance.
Quite simply, if the balanced driver had an output impedance of 20 ohm (ignoring the output feed resistor R5) you would need to add 20 ohm to the balancing drive resistor (R6) that connects to 0 volts to keep balance.
But it's a bit harder than this because the output impedance of a driver chip will likely vary across its bandwidth so, it's much easier to use a dual inverting driver and equal values for R1 and R2 (right hand diagram). |
H: Why is there an extra resistor on the opamp in the LM399 datasheet?
While looking at the LM399 datasheet, I noticed on the portable calibrator application there is a 5k resistor between the output of the opamp and the noninverting input. It looks like it forms a voltage divider with the 200k resistor, but I cannot figure out why they have that in there?
LM399 - Datasheet
AI: The LM399 requires that its operating current is between 0.5 mA and 10 mA but the 200 kohm cannot supply enough current for proper operation but, it can be used to "start up" the device.
The voltage may not be very accurate during start up but it will be a few volts and the op-amp will produce some amplification and then deliver enough current through the 5 kohm to properly bias the LM399.
Given that the output will have stabilized at around 10 volts, the bias current into the LM399 will be approximately 10 volts minus 6.95 volts divided by 5 kohm = 0.61 mA i.e. in the range for proper operation.
Additionally, it will keep that current fairly constant because the 10 volt output will be constant. This means little self heating (current is 20% above minimum required) and this current will not change even if the supply input rises from 12 volts to 18 volts. |
H: How to determine a current is AC or DC by use of analog multimeter?
How can one determine a current is AC or DC by use of an analog multimeter? Or its workaround with rudimentary tools or equipment ?
AI: Analog multimeters are normally based around a DC microammeter. Each DC volt range adds a suitable series resistor to limit the current. AC voltage ranges add an extra rectifier.
So try measuring the voltage on an AC range. If in doubt, start at a high voltage and work down. Then switch to the equivalent DC range.
If the meter reads on both AC and DC, it's DC. If it only reads on AC, then it's AC. |
H: Why AND gate is positive Logic?
Why AND gate is considered as Positive Logic and OR gate as Negative Logic
AI: What is de Morgan's Rule for AND Gate?
Answer:
AND = the negative logic rule using the OR gate.
Whereas the AND could replace an OR gate using the negative logic, where 1=true, 0=false for positive logic.
These two reciprocal equivalent rules are called de Morgan's Rule
simulate this circuit – Schematic created using CircuitLab |
H: Resistors before every led?
I'm working on lighting up an entire LEGO city from my nephew. But the problem is I need a lot of leds with different amperes and voltages ( I'm gonna put them in parallel). So my 2 questions are :
Do I need to put a resistor before every led? or can I just put a resistor in front of a bunch of leds ( I have around 15-25 leds per resistor)?
I need for most of my leds about the same value of the resistor (around 150 Ohms). Can I put the resistor of exact 150 Ohms (1% tolerance) in front of the leds? or do I need to set the value a little bit higher with an extra resistor?
EDIT: also in the comments: 41 yellow and red leds have 2 volts and 20mA
About 30 white leds have 3.5 volts and 20mA and about 10-20 leds have 2.6 volts and 70mA
AI: You should use a resitor for every series string of LEDs. Put as many LEDs in series as can be driven by the available supply voltage, minus a little. Then size the resistor so that you get the right current thru the string. Only string together LEDs that you want to run at the same current.
For example, let's say you have a 12 V power supply. You have a bunch of LEDs that you want to run at 20 mA, and that drop about 2 V in the process. 6 in series would come out to 12 V, leaving nothing for the resistor. Therefore, you'd put 5 in series. Those should drop 10 V. The resistor drops the remaining 2 V. You find the resistor value by Ohms law. (2 V)/(20 mA) = 100 Ω. Since 20 mA is the maximum spec, and you therefore don't want to exceed it, the next larger common size of of 110 Ω would be appropriate. |
H: Are switched jacks ever used for in-system-programming connections? (If not, why not?)
It seems like a switched jack would be a straightforward way to make pins do "double duty" in a uC-based application. That is, the "normally closed" connections of the jack could connect the programming-related pins to the application circuit, but when the "programming cable" was connected, you wouldn't have to worry about interference from or damage to the application.
Is this done? If not, is it b/c switched jacks are just way too expensive for this use? Is the wiring just too long and noise-sensitive? Other reasons?
AI: There are several issues with switched connectors in an ISP app:
Too few pins!
Switched connectors are only available in configurations with a few (2, 3, maybe 4) contacts -- many in-circuit programming interfaces need more connections than that.
Too big!
Switched connectors are usually of the audio-jack style, and many of the more exotic configurations require a chunkier connector body, typically only seen in 6.35mm, which makes the connector quite large and costly, compared to more typical ISP connectors.
Too bouncy!
Like any other switch, the switches in a switched connector contact bounce -- this could throw off the circuit if a "live" connection or disconnection was made. While the connector contacts experience contact bounce as well -- the programmer can work around this by tristating its side of the connection, allowing hotplugging of the programming connector safely, something that'd go away in your proposal. |
H: Effects of using voltmeter w/ 20 kΩ impedance across 35 kΩ resistor?
Our professor assigned the following question:
Describe both quantitatively and qualitatively the effects of using a
voltmeter to measure the voltage across a 35 kΩ resistor if the
voltmeter has an input impedance of 20 kΩ. Assume the 35 kΩ resistor
is in series with another 35 kΩ resistor.
All I know from the reading and lecture is that your voltmeter needs to have a much higher impedance/resistance than the circuit resistance in order to avoid the meter loading effect, which causes instrument misreadings. How MUCH higher impedance/resistance does the voltmeter need to have in relation to the circuit resistance? I don't know how to do the math (the "quantitative" part). Is what I said sufficient enough for a "qualitative" explanation?
I emailed my professor yesterday morning. He never got back to me, and this was due last night.
EDIT:
Here's what I tried to work out...Using 10V as the Voltage from the Voltage Source, I figured out that the Voltage Drop across each resistor should be 5V when everything is in series. But I don't know what to do when the voltmeter is attached to a resistor. Do I calculate everything as if it's all a parallel circuit now? Is only R1 and VM1 part of a parallel circuit, whereas R2 is still only part of a series circuit?
The answer key says:
Quantitatively: If the applied voltage is 10 Volts, you should measure
5.0 Volts across each resistor, but you actually would measure 2.667 Volts
I need to know how he got 2.667V in his example...
AI: First off, I removed the battery symbol. It's enough to specify a ground (you get to pick any one wire [aka: node] and call it \$0\:\textrm{V}\$) and the source voltage point.
Second, it doesn't matter which of the two \$35\:\textrm{k}\Omega\$ resistors you measure across (you should get the same answer either way), so I placed one end of the voltmeter at the "ground" (zero) reference point and the other end at an "interesting" point. If you look this over, you should be able to see that it asks the same question as does your newly added schematic.
Third, I've separated out the internal meter resistance as a discrete, added resistor to the schematic. The idea here is that now the voltmeter has "infinite" resistance and so it does not affect the circuit, anymore. But to keep the behavior the same, I had to add \$R_{METER}\$. Given your own schematic, I think you can see why this would still be the same question.
simulate this circuit – Schematic created using CircuitLab
Now, you should know how to calculate parallel resistances. So you can compute the equivalent single resistor you could use to replace the pair of \$R_2\$ and \$R_{METER}\$.
But before I go there, you can look at the resistors as instead being conductors. (In electronics, the symbol \$G\$ is used instead of \$R\$.) So \$G_1=\frac{1}{R_1}\$, \$G_2=\frac{1}{R_2}\$ and \$G_{METER}=\frac{1}{R_{METER}}\$. The total conductance of \$G_1\$ and \$G_{METER}\$ is just the sum of the two, because adding another conductance makes the whole thing more "conductive," right? So, if you add the conductance of \$R_2\$ and \$R_{METER}\$ and then convert that paired conductance back into a resistance again, you'd have the result of this as the paired resistance value of the two:
$$R_{METER}\mid\mid R_2=\frac{1}{\frac{1}{R_{METER}}+\frac{1}{R_2}}=\frac{R_{METER}\cdot R_2}{R_{METER}+R_2}=12.\overline{72}\:\textrm{k}\Omega$$
Now, it's just a voltage divider made up of two resistors. \$R_1\$ is still the same, but you now have a new replacement resistor that replaces the pairing of \$R_2\$ and \$R_{METER}\$. (Above computed value.)
From this divider, you should be able to calculate the resulting voltage.
Note that \$R_{TOTAL}=R_1+\left(R_2\mid\mid R_{METER}\right)\$ and that if you compute \$I_{TOTAL}\$ from that and \$V_{TOTAL}=10\:\textrm{V}\$, that this will NOT tell you the current through \$R_2\$. That's because \$R_2\$ must share this total current (all of which does have to flow through \$R_1\$) with \$R_{METER}\$.
An entirely different approach would be to construct the Thevenin equivalent before attaching the meter to it. This would be:
simulate this circuit
Once again, you have a new voltage divider circuit that will yield the exact same result. But a different approach to getting there.
Note here that a different \$R_{TOTAL}=\left(R_1\mid\mid R_2\right)+R_{METER}\$ is computed and that if you then compute a different \$I_{TOTAL}\$ from this (and \$V_{THEVENIN}=5\:\textrm{V}\$), that this will actually tell you the current through \$R_{METER}\$. That's because while \$R_1\$ and \$R_2\$ must share this total current, all of it does have to flow through \$R_{METER}\$. So you can compute the voltage by multiplying this current times \$R_{METER}\$. |
H: Help identify oscilloscope
If someone could identify the following it would be much appreciated. I am
assuming it is an oscilloscope of some sort.
The device needs a lot of TLC; grounding the inputs leaves a small Lissajous like figure on the display, so all is not well.
If I could get a manual that would help, I do not have the nous to go in on my own :-(.
AI: The OS-8 is a series of oscilloscopes built for the U.S. Navy/U.S. Army, I'm not sure exactly which manufacturer yours is from, but an "Instruction Book" is here, which includes instructions for "Corrective Maintenance" as well as both a pictorial wiring diagram and schematic wiring diagram, which will prove invaluable if you need to service it (and are also quite pretty, see pages 46-47). It appears the the OS-8C/U and the OS-8E/U are very similar, so manuals for one are sufficient for the other.
See also TM11-1214A, the technical manual for the OS-8C/U, which is very similar to the document above, but not identical (perhaps Army vs. Navy). It seems that this oscilloscope was manufacturered by Carol Electronics Corp. (Martinsville, WV) but it could also be from The Hickok Electrical Instrument Co. (Cleveland, OH).
You may find the time base behaviour to be a little strange, because this scope uses a "repetitive time" horizontal sweep, rather than a triggered sweep, which is what most modern oscilloscopes use or emulate. In other words, the sweep is driven directly by a sawtooth generator, and the sweep frequency must match (or be an integer multiple) of the input signal to get a stable display, and therefore it's rather difficult to measure the actual time shown by the scope. |
H: When an open-drain output asserts low, where does the line capacitance discharge?
I was looking at the auto-retry functionality of the TI part TPS2553 (datasheet http://www.ti.com/lit/ds/symlink/tps2553.pdf) and came across something I didn't understand and thought it a good opportunity to ask a general question.
I am going to refer to the picture below to ask this question using it as an example but really I am unsure about this in any situation where you have a line pulled up with a resistor and connected to an open drain output with some similar capacitance.
Referring to the picture below, when the part senses an overcurrent condition, the FAULT pin pulls low. My question is, when this happens where does Cretry discharge to? The only place I could see it discharging is directly into the FAULT pin. However there is no resistance between Cretry and that pin and the FAULT pin specifes a 10mA max current from the datasheet. So wont there be a big current spike when it discharges since there is nothing to limit the current, and this would damage the pin as it's outside the recommended sink current for the pin (datasheet actually specifies absolute max of 25mA sink current for FAULT)? Am I wrong in my understanding about how/where the cap discharges, the fact that the current spike exists assuming I am right about the previous point, or am I misunderstanding the significance of said discharging current spike if I am right about previous 2 points?
Again I am not just asking about this specific case but using this as an example to ask this question. I wonder too about I2C lines. When the I2C driver pulls the line low, where does the charge that was on that line discharge to?
AI: The charge on \$C_{RETRY}\$ goes to ground through the \$\overline{FAULT}\$ pin.
Although there is no external resistance, the internal transistor that switches that pin to ground will not be a short circuit, but will have a lowish current limit. As you are being told by the manufacturer to make that connection for that purpose, you can assume it's OK to do so.
The absolute max current specification on that line specifies a continuous current. This puts a lower limit on the size of \$R_{FAULT}\$.
The energy on \$C_{RETRY}\$ ends up being dissipated as heat in the pin driver transistor. This is a small and limited amount of energy which has to be distributed in the thermal mass of the transistor, unlike the energy due to a continuous current which is unlimited, so has to be dissipated. |
H: How to derive an equation for the delay time to LED shutoff?
The question asks to create an equation for the time delay for the LED to turn off in terms of capacitance(CT), reverse current (IL) of the 1N4148 and the threshold voltage (Vt) of the MOSFET for the circuit below.
The hint given was that we can treat the 1N4148 as a current source with a value of 2 nA.
From the experiment that I performed, Threshold voltage = 1.824 V, Capacitance = 0.01uF, resistance = 600Ω, yield the LED turn off after 8.71 seconds.
I feel like I would use the capacitor equation, i=C dv/dt,
solving for dt, and plug in the values above. Is this a step in the right direction to solve this question.
AI: I'd have said your formula would be:
dt = (Ct * (Vbatt - Vth)) / IL
This gives a time value of 15.88 seconds
The circuit starts with a Vgs = Vbatt --> 5V and will discharge linearly from there to the 1.824 V, the FET Vgs(threshold) value.
Note that the LED may appear off long before this point is reached, since at very low currents there may be no visible light emitted to the human eye.
If you set up an experiment with real components, who knows what time value you would actually measure. The capacitor may be =/-10 - 20% and the diode reverse current would be highly variable too.
Even if the Vgs(threshold) was very accurate, as said earlier, the LED would appear off while there was still some current flowing, even if you used a sensor to measure the light output.
In an experimental configuration it might be worth adding a high value resistor from Drain to Vbatt (perhaps 100 kOhm) and use an oscilloscope to measure when the V(Drain) rises to Vbatt - LED forward voltage level. |
H: Is this a flip-flop?
What does this circuit do? It looks a little bit like a flip-flop to me, but it doesn't exactly match the circuit for an SR flip-flop on Wikipedia.
Is this just a different way to implement an SR flip-flop, or is it something else entirely?
Thanks!
Edit: To clarify, DTR and RTS in this circuit are both 3.3V level signals, not RS-232 level signals. This circuit comes from this schematic. (So, DTR and RTS are coming from the CP2104 USB-to-serial converter chip.)
AI: It's a cute way of drawing the schematic. A less-cute drawing would look like:
simulate this circuit – Schematic created using CircuitLab
Now, it is pretty easy to see that the RTS line needs to pull down (be LO) in order to have an impact on RESET and that the DTR line needs to pull down (be LO) in order to have an impact on GPIO0. Both the RESET and GPIO0 lines are also now very clearly also simply "open-collector outputs," so they will need some kind of passive pull-up (at least) in order to have a definite output voltage in all cases.
With only a very slight moment's consideration, it's also clear that if both DTR and RTS are pulled LO then neither GPIO0 or RESET are actively pulled down. The same is also true if both DTR and RTS are pulled HI. So the only way either of GPIO0 or RESET can be actively held LO is if RTS and DTR are different from each other, with the one held LO actively controlling its associated output by pulling it LO, too.
So if DTR=HI and RTS=LO then RESET is actively pulled low and if RTS=HI and DTR=LO then GPIO0 is actively pulled low. Otherwise, neither GPIO0 or RESET is actively pulled LO.
The above assumes that DTR and RTS are logic-level signalling. However, those lines may be RS-232 signals since those pin names are also often found with RS-232 devices. You don't say. But if they are, then everything I mentioned above is put into jeopardy. With RS-232, a MARK is from -3 to -15 volts and a SPACE is from +3 to +15 volts. And it's rather likely that the whole scheme winds up damaging the two BJTs as well as whatever is connected to GPIO0 and RESET. |
H: Ferrite transformer at mains frequency
Is it reasonable to use a ferrite transformer from a big SMPS (LCD TV power supply) as a mains transformer, assuming I split the transformer in half and rewound the coils to provide the proper impedance? Ferrite transformers are generally operated at high frequency, but I don't know enough about transformers to know what happens if they are operated at low frequency.
I just want to know if it would have a reasonable efficiency, I'm not planning to do anything with it myself.
AI: It is fully possible, but you will need a lot of turns to keep the peak flux density below saturation. Because of this, you will quickly run out of winding area. This in turn will call for angel-hair thin wire to make it fit. Thus high resistance and losses. Use \$ U_{rms}=4.44 \cdot f \cdot N \cdot A \cdot B \$. With ferrite, B would be in the 0.3 T range. A normal laminated iron transformer would go to about 1.2 T and give you a better core-voltage-turn-to-winding-area-ratio for 50-60 Hz.
Also, think about Al for the core and your number of primary turns. I'm sure it's possible to supply the magnetizing inductance, but that current times your primary resistance will determine your static loss for the transformer. |
H: STM32 Flash mass erase from IAP
It might be a silly question but I can't figure out in what cases a flash mass erase from in-application programming (IAP) is relevant, as it would erase the user code as well?
For STM32 devices, ST provides example code in reference manuals like this one:
A.2.4 Mass erase sequence code example
/* (1) Set the MER bit in the FLASH_CR register to enable mass erasing */
/* (2) Set the STRT bit in the FLASH_CR register to start the erasing */
/* (3) Wait until the BSY bit is reset in the FLASH_SR register */
/* (4) Check the EOP flag in the FLASH_SR register */
/* (5) Clear EOP flag by software by writing EOP at 1 */
/* (6) Reset the PER Bit to disable the mass erase */
FLASH->CR |= FLASH_CR_MER; /* (1) */
FLASH->CR |= FLASH_CR_STRT; /* (2) */
while ((FLASH->SR & FLASH_SR_BSY) != 0) /* (3) */
{
/* For robust implementation, add here time-out management */
}
if ((FLASH->SR & FLASH_SR_EOP) != 0) /* (4)*/
{
FLASH->SR = FLASH_SR_EOP; /* (5) */
}
else
{
/* Manage the error cases */
}
FLASH->CR &= ~FLASH_CR_MER; /* (6) */
I don't understand how the CPU can reach the instructions from (3) to (6).
Shouldn't they be erased already?
AI: The program might not be running from flash. The STM32 can run code from SRAM or external memory (via FMC); code running from these locations could safely* erase flash memory.
Some STM32 parts also have two banks of flash memory. Code could be running from one bank and erasing the other bank.
*: Well, mostly safely. A power failure during an erase/program cycle would leave the part blank. |
H: How can a common mode choke filter differential noise?
Consider the following schematic, where there is a 10V offset voltage source with 1V ripple, two selfs mounted in common mode choke and a 100 Ohm resistor. Everything here is "ideal" (no parasitic resistance or capacitance etc.).
Since the current that enters into one winding is equal to the current that enters into the other winding, I would expect that this pair of windings has no effect regarding the AC analysis of the voltage between the two terminals of the resistor. But look at the AC analysis of this voltage in the image below: obviously, the ripple is strongly filtered. How can it be?
AI: You're wiring the common mode filter wrong (look at the dots!). In this way, you're creating a differential mode filter. The current of V1, in fact, enters both on L2 and on L1 from the dot side. This way, the magnetic flux, instead of cancelling each other, is summed.
In a common mode filter, instead, the differential current enters the first winding the one dot, and exits the other winding from the dot. |
H: Output frequency of asynchronous and synchronous counter
I read that output frequency of asynchronous counter will be \$\frac{f_{in}}{2^n}\$ where \$n\$ is number of flip flops and \$f_{in}\$ is input frequency.
In synchronous counter will the output frequency always be \$\frac{f_{in}}{2}\$ ? As clocks are activated simultaneously for all flip flops, each flip flop will get activated simultaneously but only during a positive or negative edge so all flip flops will have output frequency \$\frac{f_{in}}{2}\$.
Am I correct ? I didn't find information about output frequency of synchronous counter anywhere.
AI: If you have a binary counter, modulo M = 2^N, where N is the number of flip-flops, then the frequency of the most significant bit (I assume this is what you're referring to with "output frequency") will be f/M = f/(2^N), where f is the input frequency. This regardless if the counter is synchronous or asynchronous. (Yes, in a synchronous counter, the clock is fed to all the flip-flops, but there is some combinational logic which, taken the outputs of the current state, will determine the inputs of the next state, to actually have the counter to ... count).
The duty cycle will be 50%.
If your counter is modulo M, with M < 2^N (think of a decade counter such as 74LS90), then the frequency of the MSB will be f/M, but:
The frequency of the MSB is no more f/(2^N), despite there are N flip flops.
The duty cycle may not be 50%. |
H: MIC6270 comparator - input voltage higher than supply rail
I've read in various places (such as here) that you can't safely feed an input voltage to an op-amp / comparator that's above its supply voltage, even when within maximum ratings.
However, the datasheet for the MIC6270 states a 2-36V supply, and also states (general note 6, page 2):
Positive excursions of input voltage may exceed the power supply level. As long as the other voltage remains within the common-mode range, the comparator will provide a proper output state.
This seems pretty clear, but I'd like to double check - am I correct in thinking that this means the input voltage can above the supply voltage?
(Aside: my potential use case here is a signal that will be fed into the comparator of around 18V on one input and ground on the other. Supply will be 3V and the comparator output fed directly to a microcontroller pin. I was going to put a voltage divider on the signals going into the comparator, but if I don't need to do that then great.)
AI: In addition to note 6, note 4 of the "Electrical characteristics" shown in the datasheet also explicitly states:
The input common-mode voltage, VIN+, or VIN–
must not go below –0.3V. The upper end of the common-mode voltage
range is V+ – 1.5V at 25°C, but either or both inputs can go to +36Vdc
without damage, independent of VV+.
Therefore, if the inputs are within 36V, there won't be damage, but the common mode range must be within V+-1.5V, otherwise the part might not work correctly.
In your case, if I understood correctly, you want to power it with 3V, and put one input to 18V. Regardless the other input, the common-mode voltage will be larger or equal to 9V, therefore it will exceed 3V - 1.5V = 1.5V. Therefore your solution might not work. Use a resistor divider if possible, to bring the VCM within the specified range.
EDIT: (following what @berry120 got from Microchip as an answer).
Despite note 4, Microchip answered that it's enough that at least one of the two inputs is within the common mode voltage range.
In fact, here's what Microchip replied:
Most comparators (this device included) only require that one input
remains in common mode range for it to function properly. As long as
one input is in the common range mode, the other input can accept a
voltage greater than Vcc. If you power the device with 3V, you must
ensure that one of the inputs does not go over 1V or below -0.3V for
the whole temperature range.
Still, if your signal goes from 0V to 18V, then comparing that signal (or better, its divided version) with 0 will lead to unpredictable results due to offsets. To check if 18V is above a certain value, compare it to a value larger than 0 (e.g. 0.5V or so), so that, when the input voltage goes to 0, the comparator will compare 0.5 to 0, and not 0 to 0 (plus offsets).
By the way, is not so uncommon that in some IC you can feed a voltage higher than the supply: think about a 5-V tolerant IC, powered at 3.3V.
In addition, on some ICs, you can also safely tie an open drain/collector output above Vcc/Vdd. For instance the output of comparator LM311 can be tied up to 40V (abs maximum rating), even if you power it at 5V. |
H: How to identifiy this "2222 063 90025" vintage capacitor?
I am restoring an old stereo valve amp and would like to test (and replace if needed) some components. I don't know the history of the amp, but it's made in New Zealand and looks to be from the 1960's or 70's, but I could be wrong.
There are a couple of capacitors that need identifying. The first and larger one is clearly marked 50 \$\mu\$F, however, it has three legs. What I would like to know about this capacitor is:
Do the three legs signify a 2-in-1 capacitor?
What does the product code of 2222 063 90025 signify (tried here, but no luck)?
What do the triangle, square and circle symbols indicate?
How do replace this capacitor?
Capactior product code:
Capacitor from below, with 3 pins:
AI: It's a three section electrolytic capacitor, with the three symbols indicating which pin is associated with each capacitor positive lead.
The three capacitors share a common negative terminal (the can) which you will observe is grounded by virtue of being bolted to the chassis. I see soldered lugs on the can to reinforce that connection.
Commonly used as the power supply reservoir capacitor in a vacuum tube amplifier.
Note that one section has a lower rated voltage : you'll see it's connected to the others via a high-ish resistance, to provide a well filtered (quiet) supply to the sensitive preamp stages.
Circuitry will be easy to trace out and will look roughly as below...
simulate this circuit – Schematic created using CircuitLab
If you can't find a replacement, you can use three separete 50uF 450V capacitors. Bonus points for assembling them into a lookalike can...
(A bit more reading suggests this was a Philips part number) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.