text
stringlengths 83
79.5k
|
---|
H: Built difference amplifier "tail" vs. SPICE models
I am working on a difference amplifier example lab 5L.1 from Art Of Electronics Hands on Lab Course (I am not a student). I simulated three types of "tail" circuits using SPICE. Then I built the three types of "tail" circuits using MMPQ3904 array for the Q1 and Q2 pair and discretes 2N3904 for the mirror and sink circuits. I see basically the same clean output in physical circuits for ALL 3 scenarios (no common mode noise on the output). However, in SPICE, as I assume is more correct, I see the "long tail" circuit with common mode signal on top of the output. The sink and mirror are clean in SPICE. I thought the physical implementation of the "long tail" would show at least some noise as well. Is that a correct assumption?
AI: Starting Point
Here's the basic idea, with some added parasitics worth a moment's thought:
simulate this circuit – Schematic created using CircuitLab
Above, I added the other collector resistor. The reason I did is because of \$r_{o_{_1}}\$ (Early Effect parasitic.) Without the added voltage drop across \$R_{C_{_1}}\$ there's a larger voltage drop across \$r_{o_{_1}}\$ and this leads to an unexpected increase in \$Q_1\$'s collector current that isn't matched in \$Q_2\$ under the same circumstances. I'm not saying you cannot operate the circuit well (reasonably so) without \$R_{C_{_1}}\$. It will work fine without it. It's just that if you are nitpicking tiny details, the differences will get in your way and confound your analysis. It's better if you simply remove that effect at the outset so that you won't waste time digging through some mysterious rabbit data-hole.
I've also added parasitics \$r_{e_{_1}}\$ and \$r_{e_{_2}}\$. These are actually pretty important for the purposes of quantifying the expected voltage gain (and to a smaller degree for your purposes, understanding temperature stability.) I'll talk more about this voltage gain issue, shortly.
Finally, I added the relatively unimportant (mostly) base bulk impedances \$r_{b\,'_{_1}}\$ and \$r_{b\,'_{_2}}\$. So long as the base current isn't too significant (and it won't be so long as you keep the voltage difference between A and B below a few tens of millivolts) the drop across these won't amount to much. But you may need to be aware of them, at times. So I added them. The values for small signal BJTs will be about the value I show -- perhaps to twice that much.
(I didn't add the bulk Ohmic collector and emitter resistances. Even in small signal BJTs they are usually under a few tenths of an Ohm.)
Response of VOUT to CM Changes
Let's assume away all the parasitics and just focus on the most important detail. This is the fact that if you lift both A and B by the same voltage (we are assuming an ideal voltage source directly applied to both bases) then the voltage across \$R_{E_{_3}}\$ increases by exactly the same amount (okay, slightly less for a variety of reasons, but one of them being that an increased collector current implies a larger voltage difference between the base and emitter of a BJT.) This means that the shared sink current increases and, assuming it divides equally to each BJT, causes of change of half that current variation in \$R_{C_{_2}}\$. That's most certainly going to cause the voltage at B to decline. So, right away, we know there's a problem using a resistor as a current sink.
How much? Well, assuming \$V_A=V_B\$, then \$\Delta I_{R_{E_{_3}}}=\frac{\Delta V_\text{CM}}{R_3}\$ and therefore \$\Delta I_{R_{C_{_2}}}=\frac12 \frac{\Delta V_\text{CM}}{R_3}\$ so then \$\Delta V_{\text{OUT}_\text{CM}}=-\frac12 \Delta V_\text{CM}\cdot \frac{R_{C_{_2}}}{R_{E_{_3}}}\$. With both resistors the same, as in your circuit, this works out to half of the common mode change. So if you change it by one volt, I'd expect a change at the output of half a volt in the opposite direction of the common mode change.
Now this would not be such a problem if you replaced \$R_{E_{_3}}\$ with something that acted a lot more like a current sink.
This doesn't mean you cannot use a resistor. It only means that if you do use a resistor, you need to be able to calculate some kind of estimate about the effect of common mode changes upon your output so that when you analyze the output you do see, with respect to changes you make in the common mode voltage, you at least will better understand the observations.
Residuals -- A Diversion
There's an important point to bring up here that has nothing to do with circuits but everything to do with understanding quantitative measurements. This is the concept of residuals.
When you make quantitative observations ("measurements") of some process variable (voltage, current, temperature, mass, your happiness at the moment on a scale of 1 to 10, or whatever), there will be theoretical considerations, which together with the specifics of some circumstance, can be applied in a rigorous way to develop mathematical formulae that you can use to generate numbers -- quantities -- that we imagine "predict" those observations.
The difference between the predicted values and the observed values are one of the following sources:
Known applicable theories that were neglected when developing the mathematical formulae
Unknown applicable theories that need to be further investigated to improve current theories
Random events (anything where we don't hope to develop newer theories to explain)
Unknown and unknowable quantum entanglements
In our large scale statistically-emergent-phenomena world, we never really worry about #4. And #3 is chalked up as "noise" that comes in a few different but common flavors (until/unless someone comes up with a predictive theory at which point it's not noise anymore.)
So as you peel back the layers, one at a time, you increasingly know more about various effects, which operate at varying levels of importance and/or in differing circumstances. And you can improve upon the quantitative predictions given any particular circumstance. So things will match up better.
What remains, after all known appropriate-to-circumstances theories have been comprehensively applied, is called the residuals. There may be new theories to be found in that unexplained residual data. Or the residuals may pass a series of statistical tests to determine if that data fits one or more of the types of random Poisson events that can integrate into more commonly understood things such as the ever-famous Gaussian distribution.
You should consider your physical experiments in this way. Start with some basic and very simplified theory about how things work. Take measurements and compare them with your earlier, more prosaic ideas and look at the residuals. Then, if you know some more theory worth applying, apply it and see what residuals remain. Repeat until your own knowledge is exhausted. Then write something here, as you did, to see if anyone can add additional ideas that help further explain your residuals.
Voltage Gain -- A Diversion
Assuming \$R_{E_{_1}}=R_{E_{_2}}\$ and that your signal's voltage amplitude is small (say, \$\le 1\:\text{mV}_\text{PP}\$) and the signal source impedance is negligibly low:
You should expect to see a voltage gain at the output that is \$A_v=\frac12 \frac{R_{C_{_2}}}{R_{E_{_2}}}=50\$
#1 will be wrong because it neglected \$r_{e_{_2}}\$, so we now compute \$r_{e_{_2}}=\frac{V_T}{I_{E_{_2}}}\approx 37\:\Omega\$ and then re-estimate \$A_v=\frac12 \frac{R_{C_{_2}}}{R_{E_{_2}}+r_{e_{_2}}}\approx 36\$
#2 will be wrong because it neglected the varying gain and current in \$R_{E_{_3}}\$ which varies with signal, neglected the ohmic resistance in the emitter, and so on
But now, at least we have a sense of the expected voltage gain. It will probably slightly less than predicted in #2. But not so far from it that we should be bothered. Yet there will be unexplained residuals and we can pursue those as deeply as we wish, as there ARE plenty of existing (unexplored here) theorIES remaining to be applied, if you've a mind for it.
But now that you can do something about computing a gain and now that you have something with which to estimate the effect of a common mode voltage upon your output, as well, you should be able to do something about theoretically predicting an output given your combined input signal.
Summary
Now, the problem with experimentation is exactly how you choose to generate the input signal to A and B. I have signal generators here on the shelf. But they have \$50\:\Omega\$ outputs (well, that's one choice they offer -- the others are worse for these purposes.) I also have bench power supplies with very low output impedances, capable of many amps. But are you using a bench supply that's capable of automatically moving sinusoidally? Or are you just using another signal generator for that common mode voltage purpose? Your own LTspice schematic suggests two signal generators to me.
When you do things "physically" on your workbench, are using two signal generators? If so, are their ground floating? (I doubt it.) My signal generators have one side of their \$50\:\Omega\$ output tied directly to the Earth-ground pin of the mains plug. If I were using two of them, one side of both signals would be tied together simply because they are both plugged into mains outlets when operating. So if you are using two similar signal generators, then you probably will NOT have floating outputs. And that's important to know, if so. You can't just go connecting stuff up without knowing, in detail, all of the implications of those connections you are making.
So now you need to explain, in detail, how you are wiring up your physical testing. I very much doubt it is anything like what you did with your LTspice schematic, even in principle. This is why I was complaining in comments about your schematic.
So I'll leave things here, for now. You need to be very detailed about what tools you have on hand and how you are arranging them in your physical setup. With sufficient details about those tools, it's possible to recommend a reasoned hookup to perform some tests as well as some idea about what you should expect to observe. (Or else, simply explain the differences you say that you see between the physical implementation and the LTspice simulation.) For now, I must beg off until more information arrives from you. But at least, you have an idea about possible difficulties between what's in your head, what's in LTspice that you write up, and what's on your workbench when you are stuffing parts together to see what happens.
|
H: High Current Buck Converter with wide input voltage
I'm currently building a powerbank with PD outputs that are capable of outputting 5 amps at 20 volts, but my battery pack is 33.6V (8S Li-ion). I've managed to find a possible buck converter IC (XR76208EL-F), but it seems to me that it won't handle that much current at 20 volts. Also space is limited so I insist on using smd components. Could anyone suggest me a suitable buck converter IC for my requirements? Thanks!
AI: The datasheet provides an example application diagram which shows it can output 8 amps at 3.3VDC which is 26.4W and it is far from 100W. But other than that this is my only concern.
Buck converter power levels don't work the way you think they work. If a buck converter can output 8A, it pretty much do that anywhere in its operating voltage range. The operating voltage range (and maximum stepdown ratio) are somewhat independent of that.
Besides, it's easier for a buck converter to step down smaller ratio than a larger ratio, and your ratio of 33.6V to 20V is much smaller than the application schematic's 24V to 3.3V.
|
H: MOSFET 24V high-side switch
I'm trying to control 24V solenoids using logic level inputs at 5V. The following circuit works when replacing both power loops with a single 9V battery, except that the voltage across the gate and source is not 0 as expected when the switch is closed.
When attached to the actual components with the correct voltages, the MOSFET always powers the drain, regardless of whether the switch is closed.
Can anyone tell me why the circuit works differently than in the simulation? How can I improve it?
https://www.circuitlab.com/circuit/p6ahpvb2fx5s/24v-output/
Edit: The load (solenoid) is represented by R8 in this schematic
AI: The following schematic is intended to offer the following features:
Extremely low drive current required from the I/O pin because the BJT is operated in active mode instead of saturated mode. Therefore the I/O pin voltage (sinking or sourcing in this circuit) should be very close to the MCU rails and the control line will work even with rather feeble drivers.
Predictable gate-to-source voltage near the preferred value of \$-10\:\text{V}\$ for optimal operation.
Fully resistive paths from gate to both power rails.
Diode path for dissipating energy from relay's magnetic field collapse.
Optional capacitor to counter the BJT base-to-collector capacitance from exceeding \$-10\:\text{V}\$ gate-to-source voltage when switching off. (PFET has its own capacitance that is probably more than sufficent, though.)
Optional zener to protect PFET gate.
simulate this circuit – Schematic created using CircuitLab
Most relays are specified to operate at 70% of their rated voltage, so I'm not too worried about wrapping the circuit with a large capacitor. I'd probably avoid it unless experience proved otherwise.
Edit
Feel free to use most any diode for the above circuit. Any of the 1n400x will work fine, as well as the 1N4148. A better (but more expensive) circuit might use a zener oriented in the opposite direction as the diode as a way of increasing the coil voltage when its magnetic field is collapsing and thereby shortening the time required.
Also, since the above circuit is operated in active mode you will need to modify \$R_4\$ if you change the MCU rail voltage. In the above circuit, you should want about \$2.6\:\text{mA}\$ in \$R_4\$. So, if you used a \$5\:\text{V}\$ rail, you'd want to change \$R_4\$ to about \$1.5\:\text{k}\Omega\$. (I calculate \$R_4=\frac{V_\text{CC}−700\:\text{mV}}{2.6\:\text{mA}}\approx 1.65\:\text{k}\Omega\$.) That's the only change needed, though it is also possible to make adjustments to \$R_1\$ and \$R_4\$ together, if you prefer.
|
H: Can HASL finish be used for castellated pads?
I am designing a PCB that uses castellated edges to connect to the parent board. I would like to use HASL finish to save on costs for prototyping, but I am concerned that the non-planar surfaces of the module may pose assembly issues. Is it common at all to use HASL for castellated boards, or do I need ENIG to ensure successful assembly?
AI: HASL works fine for PTH, even large holes, I see no reason for it to not work with castelation.
It does somewhat bind you to a solder chemistry, (lead or lead-free) and also has a shorter shelf-life than ENIG
|
H: Convert 0 -2.5 V to 0 +2.5V for measure with adc
I have a negative voltage which I want to measure using an ADS1115, but it can t measure negative voltages.
Can anyone recommend a simple schematic / device etc which is capable to just invert the polarity and not affect the voltage? E.G. If input is -(minus)1.5V I want to transform it into +1.5V
Thank you in advance
AI: Can anyone recommend a simple schematic / device etc which is capable
to just \$\color{red}{\text{invert the polarity}}\$ and not affect the voltage
It all depends on how close to 0 volts you want the circuit to perform linearly. If "100%" then you need a negative power rail. If you can live with a dead-band of a few milli-volts when the input signal is close to 0 volts then you can use an LM324 in an \$\color{red}{\text{inverting}}\$ configuration or, an LT1078 (an improvement on the LM324): -
When the input is positive, because the op-amp circuit is an inverting configuration, the output clamps at near to 0 volts. If the input is negative (below ground) then the amplifier works as a normal inverting amplifier and produces a positive output.
The LT1078 is good in this respect because its output can fall to nearly the 0 volt rail. Not many op-amps will be suitable except maybe the LM324 but it has an input offset voltage of a couple of milli-volts whereas the LT1078 has an input offset voltage of 70 μV.
So, it comes down to what compromises you are prepared to accept. The LT1078 (lightly loaded) can swing down to within 1 milli-volt of the ground rail. Only you can say if this is acceptable.
If you want to digitize high speed signals then you'll need to use a small negative rail for the op-amp to prevent output saturation delays distorting the signal.
|
H: How can I tell if my banana fits in the banana hole?
Are all banana plugs the same? Can I use these Fluke brand banana plugs and plug them in to this Extech brand phase rotation tester? Will they fit?
What defines banana plugs anyway? Is there an ISO standard or something?
MSC Direct has a better picture of the phase rotation tester that makes it look to me like it uses standard "banana" connections.
But what really IS the standard for banana connections, and how can I be sure that my banana fits into the banana hole?
AI: The actual connector part will fit without problems - a 4mm banana connector always fits the same across all vendors.
Unfortunately the plastic protection is not standardized - I experience problems every now and then. Either the plastic is too long or the thicker part of the connector starts too early or the tiny plastic cap in the middle of the banana plug just got stuck in the socket. Some devices only accept straight connectors as well.
TL/DR: Impossible to say without actually trying it.
|
H: Metal Oxide Varistor connection
How do I select the MOV for a multiple operating voltages. Consider the diagram below, when switch is in position 2-1 and 5-4 (both primary winding are connected in series), I can apply an input voltage up to 230V and when switch is in position 2-3 and 5-6 (both primary winding are connected in parallel) then I can apply up to 115V at the input. How can I select the MOV voltage rating and how do I connect the MOV in this circuit? Can I just connect MOV with working voltage of 115V parallel to each primary winding?
AI: How do I select the MOV for a multiple operating voltages.
What actually are you trying to protect? What are you trying to protect against?
I wish to prevent high voltage being applied on input side such as
from surges.
To protect what?
ICs from over voltages on the secondary side
Then use a voltage regulator on the secondary side. This will protect your circuits if designed correctly and, you probably need one anyway irrespective of surges.
Voltage regulators have maximum input voltage rating. Over voltage on
primary of transformer causes higher voltage on secondary, much higher
than the maximum input voltage rating of the regulator, right?
Voltage regulator circuits can be designed to easily operate over a 4:1 DC voltage range AND cope with spikes due to surges. But you have to begin by "understanding the enemy" and that enemy is usually indirect lightning surges because they can be long-enough to force a small surge into the secondary circuit.
The transformer can actually help deal with surges because surges are usually earth referenced and the transformer is really good at dealing with the rejection of common-mode surges occurring on the primary.
And, in addition to all that, when dealing with the low voltage DC side of a circuit, TVS diodes can be more effective and longer-lived than MOV devices because MOVs can only protect against a limited number of surges before they (tend) to go short circuit. A TVS is more reliable and they can be chosen with greater accuracy.
|
H: What was the point of an "alignment scope" like Kikusui 5091, and can anything be done about it's dismal horizontal bandwidth?
I got this Kikusui 5091 used for US$ 50 bucks, as a reward for my pretty successful attempt to create a digital raster display from scratch on my oscilloscope, and finishing off my Game of Life in hardware that updates a 256 x 256 pixel field at real time 60 Hz frame rate (with the option of going up to 512 x 512). I find my oscilloscope screen too tiny.
But after buying that Kikusui 5091 scope I found out that it might be very different from a normal oscilloscope, as it's vertical frequency bandwidth is specified DC - 10 kHz only and especially its horizontal bandwidth is specified as only DC - 1 kHz. Only one kiloherz? That would limit the frame rate for 256 lines to only 4 frames per second! 4 Hz frame rate is bad.
So, why would that be so bad? What would be the point of such a scope?
Let me see if I understand this right on a high level:
Real oscilloscopes use electric field deflection which allows for much higher bandwidth because you don't have that massive inductive impedance of the deflection yoke to counteract. You apply voltage and with resistance held low the deflection field generating "capacitor" is quickly charged and discharged and reverse charged. Not so with a coil where you must pull current changes with crazy voltages against massive momentary impedance.
But the CRTs for real oscilloscopes need to be much longer for the screen size, so essentially if you want a larger screen, the mechanical trouble of a tube that might have to get a meter in length is just not worth it any more, so that's why they invented all these intricate complicated "fly back" circuitry, and added significant horizontal blank time to video standards such as NTSC to allow for the fly-back to occur.
Is that about right? And this means, if I want to have a prayer to use this Kikusui scope for anything like video, I would have to modify that horizontal deflection stuff, or maybe I would flip X and Y sawtooth and image coordinates such that I scan up and down lines that go right to left. Then at least I could get a 40 Hz frame rate at the 250 x 250 resolution.
Any other trick?
Might it at least be good for a vector screen? (Which is another thing I want to experiment with soon.)
AI: You're in worse shape than you think.
It's true, you flip the image axes to take advantage of the higher bandwidth of the scope Y axis. You could then modify your raster scan so that one line goes up, then the next line goes down, then up, etc, in order to avoid the delays caused by the retrace time.
Your problem is the Z-axis modulation frequency, which is abysmal. It suggests that you can get a visible change in intensity in 10 usec. Problem is, a 256 x 256 raster will have 65,536 pixels, so you'll only get about 1.5 frames per second.
What this does very nicely is, indeed, a vector display. As long as you're not trying to display too many vectors per second.
If you go the vector route, be aware that for consistent trace brightness you'll need to manipulate your axis generator so that the spot velocity remains reasonably constant.
|
H: Why is this 240V / 20A motor labelled 3HP?
Here's the motor badge:
As far as I know, 115 V x 40 A = 230 V x 20 A = 4600 watts which is equivalent to ~6.2 HP, all presumably @ full load.
So what does the "3 HP" mean?
I know that in some cases the "marketing HP" is often loosely based on reality but usually that is in the sense of inflating the HP number to exaggerate capability. This obviously doesn't fit that pattern.
AI: The current marked on a motor should be the continuous, full-load operating current. The power marked on a motor should be the full-load mechanical power delivered by the shaft. A 3 Hp motor should deliver about 2240 watts. 2240/4600 is 0.487. That tells you that the motor's full-load power factor multiplied by its full load efficiency is 0.487. For a rough estimate, you could say that full load efficiency = full load power factor = square root of 0.487 = 0.7. That is not very good, but single phase motors generally have a lower efficiency than a comparable 3-phase motor. The power factor can vary quite a bit.
Since this motor was likely made more than 55 years ago (postal zone rather than zip code) and is a design type (repulsion-start, induction run) that was abandoned long ago, you can pretty safely assume that it is not very good in terms of efficiency and power factor.
More About Interpreting Motor Nameplates
There are online resources that explain in detail how to interpret the nameplates (rating plates) of motors that have been manufactured to international standards. Note that rating plates or labels that have less information than the one pictured in the question likely do not conform with international standards. Interpret those with great caution.
More About NEMA
NEMA is the National Electrical Manufacturers Association of the United States. It is a standards developing organization led by people associated with manufacturing companies. NEMA is accredited by ANSI, the American National Standards Institute. ANSI is a private, not-for-profit organization dedicated to supporting the U.S. voluntary standards and conformity assessment system. ANSI is the official U.S. representative to the International Organization for Standardization (ISO) and, via the U.S. National Committee, the International Electrotechnical Commission (IEC).
Motors and generators that have a rating plate like the one pictured in the question are generally assumed to conform with the applicable NEMA Motors and Generators standard, such as ANSI/NEMA MG 1-2016. Data marked on the rating plate should be interpreted with reference to that document. There is an ongoing effort to “harmonize” NEMA MG 1 with the similar IEC standards. The basic meanings of the data items have been pretty well harmonized. Items like “CODE F” and “DESIGN M” must be interpreted by referring to tables published in the standard. It may be possible to find important MG1 information and tables quoted or reprinted in documents that are freely available online.
|
H: 3.3V regulator does nothing for first ~12 seconds after power-on, then outputs 5 volts
In my circuit I'm using a TPS78633DCQ low-dropout regulator to regulate my 5 volts power input down to 3.3 volts. However, when powering up the circuit board for the first time today and measuring the voltages, I was getting 5 volts on the 3.3 volt rail.
There was no smoke or anything — I was watching quite carefully for this during the first power-on — and none of the chips on the board were getting hot when I felt around with my fingers; I was also very careful to check for shorts not just to ground but from each rail to every other rail before turning it on, and there weren't any.
On probing it with my oscilloscope and examining it while turning it on, it looks like the regulator isn't actually turning on at all until 10-12 seconds after first applying power, and when it does it jumps all the way to 5 volts:
(yellow is 5 volt rail, pink is 3.3 volt rail)
Note that this is on an assembled printed circuit board, so I don't believe it's possible this could be a grounding problem; the ground and thermal pins both have vias directly to the internal ground plane as close by as I could manage.
This is the power supply section of my schematic:
U17 is the 3.3 volt regulator that appears to be behaving incorrectly; initially I suspected it may have been assembled with an incorrect chip, but the chip on the board at the very least has the correct markings:
Here's my full schematic, pcb layers, and EDA project, for reference:
Full Schematic (pdf)
PCB Layers (pdf)
EasyEDA Project
Note that other 1.8 and 1.1 volt rails did come up to their correct voltages after that, so those regulators are at least functional (were able to regulate down the 5 volts rather than the 3.3 they ought to have been getting).
However having 5 volts on the 3.3 volt rail did exceed the voltage rating on the TS3USB221 muxes (datasheet says 4.6V absolute max for VCC) and TUSB4041 hub chips (datasheet says 3.8V absolute max for VDD33), so it most likely has damaged this board. Hopefully I can fix the problem with the regulator on the other boards before powering those ones up.
What is going on here? Did I not connect the voltage regulator (enable pin?) correctly, or something? Were my boards assembled with a wrong/counterfeit chip despite the markings? I have never seen a behavior like this before, and I have essentially no idea what to actually do about it.
For the moment, I can remove the regulator from my other boards and feed their 3.3 volt rails with a bench supply (in order to test the other features of these boards), but I don't even have any concept about how I would redesign the circuit to make this not happen.
AI: Short answer : The TPS78633 NR pin is incorrectly connected to 3.3V output, and it is causing the issue.
This overrides the internal Vref of 1.25V with the output voltage, and it tries to set the output voltage high enough so the divided feedback matches the reference voltage, so basically, the regulator just fully passes input voltage to output.
|
H: Problem with understanding EPROMs and how they're written to
I've got a problem understanding how an EPROM (UV-erasable) works.
This question may seem very dumb, but what would happen, if I just try to write contents to an EPROM, which has already been written to? Will it just not work? Or will the contents on the EPROM be corrupted? I don't really understand why I can't just overwrite the whole thing, without erasing it first through UV-Exposure.
Maybe somebody with a better understanding of this can explain it to me. Thanks in advance for your help.
AI: EPROM cells can only be electrically written 1->0 and can only be erased with UV 0->1
So you can electrically overwrite as many times as you like, and get the correct result, provided you never want to change a 0 to a 1.
To change even one cell from 0-1 you have to erase the entire array (well, unless you're really accurate with a UV laser and/or masking the bare die, but that's more like hacking).
|
H: Realization of network function and positive real function
I just studied
'network realizibility theory' from 'Franklin F.kuo's ' book and it mainly talks about postive real functions from start to finish and to me what I understand that for a function to be realizable it should be a positive real function and as one of it's property suggest that poles and zeroes should be in Left half of plane .
But then how 'all pass filter' can be realized ? As it's zeroes are mirror image of poles about imaginary axis i.e if poles are in negative half then zeroes will be on right half of a plane and so it is not a positive real function then how does it's realization possible?
AI: The poles are the ones that must be in the left-half plane, which means the denominator must be a positive real function. Since the zeroes need to be reflected along the imaginary axis, then the polynomial at the numerator cannot be a positive real function, anymore. And this is completely fine, since the zeroes can be anywhere, they don't influence the stability. It's the realpart of the poles that affect the exponential term (transient).
Let's analyze two generic, allpass transfer functions, for a 1st and a 2nd order system:
$$\begin{align}
H_1(s)&=\frac{s-a}{s+b} \tag{1} \\
H_2(s)&=\frac{s^2-a_1s+a_0}{s^2+b_1s+b0} \tag{2}
\end{align}
$$
Applying the inverse Laplace transform results in the impulse response. For the 1st order t.f. there is only one expression for the impulse reponse:
$$h_1(t)=-(a+b)\mathrm{e}^{-bt} \tag{3}$$
The presence of \$\mathrm{e}^{-bt}\$ shows that the function is of the form \$\mathrm{e}^{-x}\$ and thus will always be convergent. It's also dependent on the \$b\$ from the denominator, since \$-(a+b)\$ is just a constant.
For the 2nd order t.f., the impulse response will depend on whether \$b_1^2-4b_0\$ is greater than (overdamped), equal to (critically damped), or lesser than zero (underdamped). But all three will have one term in common: \$\mathrm{e}^{-b_1t}\$. Notice that it's identical to the 1st order t.f., except there is\$b_1\$ instead of \$b\$. Also notive its sign, and the fact that it's only a function of \$b_1\$, not any of the numerator terms.
Now, a 2nd order equation is very well defined in terms of it's roots \$r=\pm\alpha\pm j\beta\$ as:
$$s^2-2\Re(r)s+|r|^2=s^2-2\Re(r)s+\Re(r)^2+\Im(r)^2=0$$
This shows how, as long as the real part of the roots of the denominator are negative, the equation will result with a positive \$b_1\$ term, and \$\mathrm{e}^{-b_1t}\$ will always be convergent. Again, no term from the numerator.
Let's put the theory to practise. Here's a simple example in Octave of a 4th order allpass with random roots:
r=-randi(10,1,2)+1i*randi(10,1,2); r=[r;conj(r)](:), ...
num=poly(-r), ...
den=poly(r)
r =
-9 + 3i
-9 - 3i
-3 + 2i
-3 - 2i
num =
1 -24 211 -774 1170
den =
1 24 211 774 1170
The numerator is simply the poles with their real part positive. If what you say is true, then the system's step or impulse response should explode (i.e. should not be convergent):
Eppur si muove.
Since the question was not about building a SPICE example, I didn't think I should insist on that part, but, as per jonk's comment, I'll extend this answer for future prying eyes.
In case the SPICE approach is obscure, there are three things that are at the base of it:
the voltage across a capacitor is \$v=\frac1C\int_t{i\,\mathrm{d}t}\$
in LTspice (since this is what I used), current sources are a lot more convergent-friendly than voltage sources
in LTspice, Laplace sources are very reliable in .AC (frequency-domain) analysis, but can be quite awful in .TRAN (time-domain)
With these in mind, a current source with a capacitor in parallel will act as an integrator for the voltage across it. It will also replace a \$\frac1s\$ Laplace expression. Using a VCCS will allow a voltage feedback, so now the first canonical form of a transfer function can be built:
The difference between this and the first schematic is that in the latter, the nodes have summers, while the former shows a chain of integrators, which means they're multiplying. The reason for the SPICE version is simplification: why use summer and gain and integrator, when you can use one Swiss-army integrator? However, this means that the terms, as shown in the canonical form, if left untouched, will come out at the end of the chain all multiplied in the SPICE version. To circumvent that, take advantage of the fact that it is a chain, and so the last term can be divided by the previous one, then the previous one to the one before that, and so on. Now, when multiplied, they will simplfy on the way to the output leaving the terms clean. That's why, in the SPICE schematic, I left all the terms visible (i.e. I didn't just use the result of those divisions), so that even a value like {24/1} would make it clear that there are two terms in there, and how they got there.
Usually, long transfer functions are split into 2nd order sections. Here they would have resulted in \$s^2\pm 18s+90\$ and \$s^2\pm 6s+13\$, but I left it as a whole for better viewing of its terms.
As a last note, G13 and L1 (bottom right) form a differentiator, since \$v=L\frac{\mathrm{d}i}{\mathrm{d}t}\$. The input is a step function, and V(s) gives just that. A step function, in Laplace domain, is \$\frac1s\$; this is multiplied with the transfer function. Differentiating this results in a clean transfer function, whose inverse Laplace is the impulse response. Thus, differentiating the step response gives the impulse response, V(d).
|
H: SOP-4 Package Footprint Standard
I've got a TCMT1102 Vishay optocoupler. Its a 4-pin SMD part but there is no standard package type associated on the datasheet - i.e SOP, SSOP, TSSOP etc. Vishay has a footprint document that describes this footprint as a "SOP-4 miniflat" according to the dimensions. Based on the footprint doc I assumed its a SOP-4. But when looking at the IPC-7351 standard, section 9 there is no description for a "SOP-4." The lowest SOP pin count is SOP-8. And when referencing this package classifications document there is no description for a SOP-4, SSOP-4, or TSOP-4.
Additionally, the linked CAD Model for the TCMT1102 Digikey page is not in alignment with the datasheets dimensions.
Is SOP-4 a non-standard footprint? Where can I get this footprint?
AI: Many IC manufacturers use non-standard footprints - or make up their own.
Whether or not SOP-4, or any package for that mater, is a multi-manufacturer standard package is somewhat irrelevant. You should always follow the manufacturers datasheet and recommended footprint, even for more standard packages.
As to where to get the footprint, you either need to make it yourself for whichever tool you use (for something this simple, you could probably duplicate and modify an existing package), or find a CAD footprint from the manufacturer or tools such as UltraLibrarian.
If you find a CAD footprint from a secondary source such as vendor (e.g. Digikey), always double check that it matches the parts datasheet. If there are discrepancies, trust the parts datasheet.
|
H: Can i tie the enable pins directly to the rails?
i am having trouble with the spaces on my circuit and removing the two pull-up/down resistor on the enable pins would solve my problem ( if of course it doesnt cause other problems). I was wondering if i could completely removes the resistor and directly tie them to the rails. They are not connected to a GPIO that toggles them they are meant to be a fixed state.
The first is the pull up from the enable pin of LP5907. There already seems to be a weak 1M ohms pull down built to it internally.
Second is the TMUX1574. This also have a weak 6M ohms pulldown internally.
Would it be safe to skip these resistors?
AI: From the datasheet you link for the first one.
the application does not require the use of the shutdown feature, the EN pin can be tied directly to the IN pin to
keep the regulator output permanently on.
No pullup needed.
For the second:
Active low enable: When this pin is high, all switches are turned off. When this pin is low, SEL pin controls the signal path selection. Internal 6 MΩ pull-down to GND.
You can leave it disconnected and it will be on. If 6 Megaohm isnt enough for a stable on, you could connect directly to ground without issue.
|
H: BJT npn transistor circuit analysis
I'm trying to solve the following circuit, obtaining all the currents and voltages.
I'm using mesh analysis method, but I'm ending with wrong results.
So I assumed by default a clock-wise loop for \$I_b\$ and the same for \$I_c\$.
The \$\beta=100\$
I setted the equations to obtain base current \$I_b\$:
$$5-50000(I_b-I_c)-0.7 = 0$$
and deriving from the \$beta\$ the collector current \$I_c=100 I_b\$ I obtained with substitutions:
$$4.3 - 50000I_b + 50000(100I_b) = 0
$$
that gives me:
$$I_b=0.87\mu A$$
this result is too small and different from the results obtained from the simulation with the software every circuit.
This problem should be very easy to solve. How can I set the equations correctly to solve this kind of problem?
Thank You.
AI: Quick Note
The schematic you show here is from LTspice, I believe. It's default NPN BJT has \$\beta=100\$ and \$I_\text{SAT}=100\:\text{aA}\$. Your "EveryCircuit" link is very unlikely to use the same default model. So LTspice probably will simulate different values. Just FYI.
Nodal Analysis
The nodal method is probably the easiest for solving this problem:
$$\begin{align*}
\frac{V_\text{B}}{R_1}+I_\text{B}&=\frac{V_\text{CC}=5\:\text{V}}{R_1}\\\\
\frac{V_\text{B}}{R_1}+\frac{I_\text{SAT}}{\beta}\cdot\left(\exp\left[\frac{V_\text{B}}{V_T}\right]-1\right)&=\frac{V_\text{CC}}{R_1}\\\\
V_\text{B}+\frac{R_1\cdot I_\text{SAT}}{\beta}\cdot\left(\exp\left[\frac{V_\text{B}}{V_T}\right]-1\right)&=V_\text{CC}\\\\\text{conveniently set: }\quad V_{R_1\:\text{SAT}}&=\frac{R_1\cdot I_\text{SAT}}{\beta}\\\\V_\text{B}+V_{R_1\:\text{SAT}}\cdot\left(\exp\left[\frac{V_\text{B}}{V_T}\right]-1\right)&=V_\text{CC}
\end{align*}$$
That solves out readily (see Appendix below for details) as:
$$V_\text{B}=V_\text{CC}+V_{R_1\:\text{SAT}}-V_t\cdot\operatorname{LambertW}\left(\frac{V_{R_1\:\text{SAT}}}{V_T}\cdot\exp\left[\frac{V_\text{CC}+V_{R_1\:\text{SAT}}}{V_T}\right]\right)$$
Spice Comparison
From which, using LTspice parameters and only the simplified portion of the model besides, I get \$V_\text{B}=833.4\:\text{mV}\$ using the above formula. Running LTspice on this I get \$V_\text{B}=829.1\:\text{mV}\$ which I consider quite close since I'm using a highly simplified subset of the model that Spice programs use.
Short Summary
So that's how you solve these kinds of problems with mathematics. (Use Wolfram Alpha to solve the first equation, if you need to. It's not hard to do on paper, though.)
With that base voltage worked out, everything else just falls out readily.
In the case of your "EveryCircuit" simulator, you'd need to find out the model parameter values it uses to get close to its simulation values. That's a different problem. But I'm sure it uses similar techniques to other Spice programs.
Solution Appendix
The solution steps are that were skipped above are:
$$\begin{align*}
V_\text{B}+V_{R_1\:\text{SAT}}\cdot\left(\exp\left[\frac{V_\text{B}}{V_T}\right]-1\right)&=V_\text{CC}\\\\V_{R_1\:\text{SAT}}\cdot\exp\left[\frac{V_\text{B}}{V_T}\right]&=V_\text{CC}+V_{R_1\:\text{SAT}}-V_\text{B}\\\\\frac{V_{R_1\:\text{SAT}}}{V_T}&=\frac{V_\text{CC}+V_{R_1\:\text{SAT}}-V_\text{B}}{V_T}\cdot\exp\left[-\frac{V_\text{B}}{V_T}\right]\\\\\frac{V_{R_1\:\text{SAT}}}{V_T}\cdot\exp\left[\frac{V_\text{CC}+V_{R_1\:\text{SAT}}}{V_T}\right]&=\frac{V_\text{CC}+V_{R_1\:\text{SAT}}-V_\text{B}}{V_T}\cdot\exp\left[\frac{V_\text{CC}+V_{R_1\:\text{SAT}}-V_\text{B}}{V_T}\right]\\\\&\text{swap sides and apply LambertW,}\\\\\frac{V_\text{CC}+V_{R_1\:\text{SAT}}-V_\text{B}}{V_T}&=\operatorname{LambertW}\left(\frac{V_{R_1\:\text{SAT}}}{V_T}\cdot\exp\left[\frac{V_\text{CC}+V_{R_1\:\text{SAT}}}{V_T}\right]\right)\\\\V_\text{CC}+V_{R_1\:\text{SAT}}-V_\text{B}&=V_T\cdot\operatorname{LambertW}\left(\frac{V_{R_1\:\text{SAT}}}{V_T}\cdot\exp\left[\frac{V_\text{CC}+V_{R_1\:\text{SAT}}}{V_T}\right]\right)\\\\&\text{and just solve for }V_\text{B}
\end{align*}$$
Final Summary
Most folks just assume a base-emitter voltage (educated guess or good experience) and proceed on that assumption. It's very reasonable to do that, too. (I like to think so because that's how I usually do it.)
But when you ask:
How can I set the equations correctly to solve this kind of problem?
Then you have now opened the door to a different kind of answer, which I've provided here.
There is a way to produce a closed equation as a solution for an equation developed using nodal analysis and a simplified version of the non-linear hybrid-\$\pi\$ equivalent for the Ebers-Moll equation for BJTs. The above shows you how to do that.
(The LambertW function is such that: \$u=\operatorname{LambertW}\left(u\, e^u\right)\$ and is the inverse function for \$f\left(u\right)=u\, e^u\$. In short, it solves or \$u\$ when you know \$u\, e^u\$.)
The basic idea is pretty simple. But when you insert non-linear equations into the mix then some extra skills are required to get a closed solution.
This isn't the way it is solved in Spice programs, though. They use a set of steps, where a linearized version of the non-linear equations are used for each step incrementally, and eventually arrive at a very close (but numerical) solution. They don't try and create closed mathematical answers, as that can be almost impossible as a circuit's complexity increases.
|
H: Is it possible to wire a DPDT switch so that each position creates an output? (3 outputs)
I am controlling three LEDs, and need to be able to toggle between them individually with a switch. Is this achievable with a DPDT switch? I'm not sure where I can find a switch that has one input and three possible outputs.
AI: Here's one way to do it using an ON-OFF-ON switch like this one:
one half of the switch in either on position shunts D3 preventing it from illuminating, this wastes about 20mA in the off position the LED lights
the other half selects between the other two LEDs when on
simulate this circuit – Schematic created using CircuitLab
|
H: Essential difference between normal irda mode and low-power irda mode?
guys, I'm learning stm32f401x mcu. All I have is an rm0368 reference manual pdf file. No mcu chip right now. From the manual, I learnt that PSC instead of USART_BRR is used to generate baud rate in low-power irda mode. I'v also read the irda spec pdf file, but it didn't help (perhaps I just missed important things). So what's the essential difference between normal irda mode and low-power irda mode, from the point of view of usart circuitry? Does the term 'low-power' refer to the entire irda module in a finished product (due to weaker radiation power), or does it refer to the irda block inside the mcu chip (due to shutdown of certain sub-block under this mode) ? Thx.
---- a related question on pulse generation in low-power irda mode -------
In normal irda mode, we use USART_BRR to generate baud rate from PCLK. So the pulse width is basically 3 * (Tpclk * DIV_Mantissa), DIV_Mantissa is a 12-bit long number.
While in low-power irda mode, PSC[7:0] is used to generate irda low-power baud rate from PCLK. The manual says "Instead, the width of the pulse is 3 times the low-power baud rate which can be a minimum of 1.42MHz". I assume that in this mode, the pulse width we can obtain is 3 * (Tpclk * PSC), where PSC is an 8-bit long number.
How can I get a longer pulse with a smaller divisor?
AI: IRDA has a Range^2 dropoff in received energy.
To be "low power", you either transmit over a shorter distance,
OR
you use longer pulses allowing longer integration time against deterministic and random noise. Longer pulses require a lower data rate.
Now reread that PDF, with these ideas in mind.
|
H: What is the purpose of these capacitors?
I have an amp (denon pma-1060) that has small 330pF ceramic caps directly soldered between it's speaker outputs and the chassis. But I don't know what is the purpose of them. Why are they there?
AI: Normally such values are used to suppress RF noise due to leakage in the power transformer. It is not so much about any shock hazard as it is to remove static from the speakers that may exist on the AC power line.
The power transformer has capacitive leakage (100s of pF) and these are an attempt to neutralize that problem.
|
H: (Experiment) What if I run a DC motor with unfiltered sine pulse DC voltage?
I have read a lot about using high frequency square/rectangular wave pulsed DC for motor speed control aka PWM-ing, but my question is a bit different.
What if I run a DC motor with a low frequency unfiltered sine wave pulsed DC? Let's say that I want to run a 12V linear actuator motor from the low frequency 50/60Hz AC mains voltage, using a suitable step down transformer and rectifying diodes but no capacitors or any sort of filtering. My assumption is that full wave rectification should work better than half wave.
What are the possible outcomes regarding energy efficiency and longevity of the motor with this setup?
AI: The main effects of running a brushed DC motor on unfiltered DC are increased loss and heating due to the higher ratio of rms to average current, and increased noise and vibration caused by the motor changing speed in time with the rectified waveform.
This will reduce efficiency and may reduce longevity, but probably not enough to worry about in most applications. It is often done in mains powered appliances such as hair dryers and heat guns, which use PMDC motors powered via a bridge rectifier.
|
H: What technique (ultrasound/infrared) should I use to detect seeds inside a fruit?
This fruit is simplistic as there is a thin skin surrounding it. Inside it is a tiny ball of liquid and that is where the dense seed forms. The is seed much more denser in comparison with the liquid and the skin, you could almost neglect their presence in regards to density. So my purpose is to manipulate the wavelength of a wave such that it penetrates the skin but reflects of the seed if it is formed. Like the Rutherford gold foil experiment. I am aware of techniques such as the "Fourier transform infrared spectroscopy" but I am not an expert on this.
AI: You cannot realistically change the "frequency" of the infrared emitted from an infrared LED.
The wavelength is more or less a fixed range determined by the semiconductor material of the LED.
The current through the LED will probably have some (slight) influence on the the center of the range, but not enough to do anything useful. You will not vary the frequency from 300GHz to 430THz.
Think of colored LEDs. The color is determined by the semiconductor material that forms the diode junction in the light emitting diode. You can't "tune" a blue LED into a red one.
In the same way, you can't change what range of infrared wavelengths an infrared LED emits. There are infrared LEDs available that have their peak sensitivity at different wavelengths, but the differences aren't as drastic as what you seem to want.
Infrared detector diodes have similar restrictions, though not as bad as the emitter.
Infrared detectors are also often sensitive to visible light as well as infrared. You still won't get the range of wavelengths you want out of an infrared detector diode, though.
Most of the things you could use for distance detection have similar restrictions.
Ultrasound is often used to detect the distance between two objects. The emitter and detectors are usually piezoelectric crystals, though, that operate over a fairly narrow frequency range. That's the same problem you have with infrared.
Radar is another method used to detect distances. Any typical implementation will also use a particular frequency or (relatively narrow) frequency range.
Maybe you should explain what you are trying to do. There might be a common way to do it that other folks use all the time.
Now that you've explained what you are really trying to do, it seems that what need to do is something like "egg candling."
You are trying to tell if seeds are growing inside a pod.
The simplest way I can think of to do that is to just look "through" the pod with a bright light. Either by eye, or use a camera to record progress as the seeds grow.
Just hold your pod to a (very) bright light, and look through the pod for shadows.
It looks like this for an egg:
Borrowed from the linked page on egg candling.
|
H: I2C Communication in AVR
The first step in a TWI transmission is to transmit a START condition. This is done by
writing a specific value into TWCR, instructing the TWI hardware to transmit a START
condition. Which value to write is described later on. However, it is important that the
TWINT bit is set in the value written. Writing a one to TWINT clears the flag. The TWI will
not start any operation as long as the TWINT bit in TWCR is set. Immediately after the
application has cleared TWINT, the TWI will initiate transmission of the START condition.
This is a statement from the datasheet of ATmega328P (pg 223). What I don't understand is why is it necessary to set the TWINT bit, when I have an operation to perform (i.e. to transmit the START condition)? After all, it has mentioned:
The TWI will not start any operation as long as the TWINT bit in TWCR is set.
And what does the application has cleared TWINT mean? If I am not wrong, application is the program to be uploaded into the micro-controller. If this is true, then the program should first set the TWINT bit and then reset it again. I am not getting the point it is trying to explain.
AI: The first thing to do is to send the start. When it is sent, the I2C peripheral sets TWINT bit and waits for the software for more commands what to do next. The software then updates whatever things are necessary to do next, and then clears the TWINT bit to zero so the peripheral then continues to do what it was told. So it must be kept set until everything is configured and set to zero to continue.
Basically, TWINT being set means previous operation is done and waiting for next operation.
And due to how the TWINT flag and many other flags work, it is not cleared by writing a zero bit, it is cleared by writing a one bit.
|
H: How to implement an interconnection matrix in VHDL?
I was reading through the documentation of the AXI standard when I came across the interconnection matrix shown below. In short, the interconnection matrix provides a path for several masters to connect to several slaves at the same time. If there was only 1 master, then the interconnection matrix is basically a demultiplexer. However, with many masters, it is much more powerful. I was wondering how we can design such a thing in VHDL.
AI: The AXI Interconnect Matrix is an example of a cross point switch, also known as a crossbar (pg 11 of the AXI IP documentation explicitly calls it that).
Below is a block diagram of a simple one I designed for a project I am working on:
In this example we have two entities that can read/write from one of 3 blocks of RAM. From L-R, the inputs (arbitrarily chosen as data and control signals can flow either way) are fed to 2 demuxes while they outputs are fed by 3 muxes. Control of what connections are actually used is governed by a separate Control Logic block.
The actual VHDL for this is rather simple. You just need to design a a Mux (if or case statement), a Demux (same as mux) and some control logic. By using generate statements to select the number of muxes/demuxes required you make a quite elegant structure that is fantastically scaleable.
|
H: LTspice - Measuring the resonant frequency
I would like to measure the resonant frequency automatically in LTspice, i.e. with the command ".meas" of the following waveform. Is it possible to do it by using the FFT plot? I have tried something, but it seems to me to be relatively complicated and I think there is a better way :)
Here is the schematic if it can help you.
Thank you very much and have a nice,
AI: There are a few ways you could do it. One would be with the FFT. If you only need a quick result, you could simply perform an FFT analysis straight on the waveform, as it is. You'll see something like this:
This is the resultof a 1024 points FFT, without binomial smoothing. It's ugly, because no special care has been taken care of -- it's an exponentially decaying waveform, not an exact number of periods, compression is on, no imposed timestep, bla, bla -- for which the cursor reads 1.6Hz. Given the resolution, it's close enough to 1.59 Hz.
If you want more precise numbers, .measure is the way to go. Then you could use these commands (using the previous picture as reference, since I can't read the axes in your picture):
.meas t1 find time when v(x)=0 cross=2
.meas t2 find time when v(x)=0 cross=4
.meas t3 find time when v(x)=0 cross=6
.meas t4 find time when v(x)=0 cross=8
.meas f1 param 1/(t2-t1)
.meas f2 param 1/(t3-t2)
.meas f3 param 1/(t4-t3)
I started with cross=2 to avoid possible mis-readings due to the initial zero response (it looks like you, also, have something like that). To avoid re-running the simulation (sometimes they can take days and many GB of data), you can add those lines ina text file, save it in some meaningful name, then use the File > Execute .MEAS script (with the waveform window active). For this example, these are the readouts:
t1: time=1.31504 at 1.31504
t2: time=1.94466 at 1.94466
t3: time=2.57432 at 2.57432
t4: time=3.20397 at 3.20397
f1: 1/(t2-t1)=1.58826
f2: 1/(t3-t2)=1.58817
f3: 1/(t4-t3)=1.58817
which, again, given no special care has been taken (compression, timestep, numdgt), it's close to the real result. Note that using the .meas commands implies knowing beforehand how the waveform is and where to measure. That's why using an external script is a good choice.
Or you could concoct your own frequency detector, but that would imply burdening the matrix solver with yet another payload.
PS: You, too, have a nice dot
|
H: Do beam-forming devices expect a particular antenna configuration?
Do beam-forming devices expect a particular antenna configuration? For instance, do they expect the antennas to be a certain distance from one another? Or parallel to one another? Etc.
Background Info:
I have a beam-forming capable WiFi router located in a utility room. I would like to detach the antennas and add extender cables, so I can run them to various parts of the attic. I am concerned that whatever calculations are necessary to perform beam-forming may include hard-coded values based on the current configuration, e.g., each antenna is placed exactly 2 inches apart, and parallel to one another.
AI: Yes, it will be important to keep all antenna extensions equivalent to ensure the propagation delays are equal. You will want to keep any changes equivalent to each antenna to minimise efficiency loss. It’s probably best to keep the spacing the same, if you do increase the spacing, it's probably best to increase it between all the antennas.
I have done this before and found that in the technical doumentation the manufacturer recommended how to reposition the antennas and defined a maximum cable length, so it might be worth looking if your model has the same.
|
H: MOSFET load switch design review
Is there any problem with the below circuit for controlling power supply (as a load switch)?
Hi,
I am using this circuit to switch power supply to a load. I have gone through the datasheets and this looks likes it is okay. But, could someone please confirm if the the circuit used is alright?
The load current does not exceed 10A. The load can be a resistive load or a power supply to another module (not an inductive load).
(I know the MOSFET I used is rated for very high currents).
There is no strict requirement on the switching frequency (less than 1Hz) .
The supply voltage is 9V-12.6V. The control voltage is 3.3V.
EDIT: [pdf datasheet links]
https://www.diodes.com/assets/Datasheets/DMG6602SVTQ.pdf
https://www.mouser.in/datasheet/2/308/FDD8896_F085-D-1806946.pdf
AI: The control voltage is 3.3V
The main problem
The gate activation voltage for Q7 is only 3.3 volts!
It will not turn-off the PMOSFET inside Q7 and the circuit will be permanently energized.
Or, ditch the dual MOSFET device (Q7) and use a BJT in common emitter with a load resistor of circa 1 kohm (aka a level shifter). General idea: -
This can only realistically be overcome with either a control voltage that matches the supply voltage (9 volts to 12.6 volts) or by using an extra input transistor forming a level shifter. This is a show-stopper until fixed. The words below assume it has been fixed.
Given this: -
There is no strict requirement on the switching frequency (less than
1Hz)
Using a level shifter isn't going to be a problem.
The secondary problem
Always check with the manufacturer's website to see if the a device is not recommended for future designs and if so, is an alternative available: -
However, given that this device is probably best replaced with the common emitter level shifter shown earlier, this is moot.
Shoot-through problem
This can be overcome by using a 100 Ω resistor in series with the drains on Q7. The shoot-through current will be limited to a maximum of 12.6 volts ÷ 100 Ω = 126 mA. If that is too much choose a 1 kΩ resistor etc.. The added resistance will slightly slow down turn on or off but, given that you are only switching at 1 Hz and the gate capacitance of Q2 is only circa 3 nF, a response time of less than 5 μs isn't going to be a worry.
But if you fix the main problem using a BJT level shifter, this problem goes away.
Load volt-drop
If you can live with Q2's volt-drop of 40 mV when the load takes 10 amps then you're basically good to go. That's a typical value and may be twice this amount across a batch of devices.
MOSFET leakage (\$I_{DSS}\$) into load
When Q2 is off, it might produce typically 1 μA into the load but, again, this is a typical value and it might be as high as 100 μA. If this isn't going to cause activation of some low power circuits in the load then fine.
|
H: Accelerometer wiring
I try to connect an EVAL-ADXL345Z-M (Data sheet) to an adafruit-feather-m0-adalogger (Data sheet).
4 wire SPI is desired.
Is it correct to connect it like:
Adafruit Feather M0 to ADXL345;
GND to GND;
MISO to SDO;
MOSI to SDA;
3V to VS;
3V to VIO;
Port 10 (depends on code) to CS
Thanks!
AI: Looks right to me,
ADXL345 > Net < Feather
GND > GND < GND
SCL 14 > SCK < 24, Pin 20
SDA 13 > MOSI < 23, Pin 19
SDO 12 > MISO < 22, Pin 21
CS 7 > CS < SW Defined
Vdd I/O 1 > V+ < 3V
Probably want a decoupling cap on the supply to the ADXL345 as well.
|
H: 12 AWG galvanized steel high tensile wire okay for running 12 volt 7 A DC?
I need to run 12 VDC about 50' along a fence that already has several 12 gauge galvanized steel wires running on it. It is going to be pulling less than 7 A at most. I can make sure the lines are not touching, but they are in the air and exposed to the elements. Will this work? and will I see significant voltage drop (greater than 5%)? My battery is a 115 Ah deep cycle lead-acid and I have a 12 V appliance that needs at least 11.5 V that consume about 4 A.
Also, dumb question I want to ask, but does negative line need to run all the way back to the battery? and if so, can that touch metal t-posts posts that are 2' in the ground? I am wondering if metal the fence itself was connected to the negative battery lead and my hot (+) were copper, insulated and direct would this help significantly?
AI: If you look up the resistivity of 12 AWG wire wikipedia, then it runs at about 5 mΩ per metre. If you look up the resistivity of various steel alloys Kaye and Laby you'll see that carbon steel is about 10x the resistivity of copper, or about 50 mΩ per metre.
50' is about 15 m, or 30 m there and back. 30 * 50 mΩ = 1.5 Ω, which at 7 A will drop 7*1.5 = 10.5 V.
That means if you short circuit the far end, even then you won't draw much more than 7 A. You don't stand a snowball in Hades chance of running 12 V at that current down your steel wires.
Now depending on where you want to spend your money, you could run copper wires of a slightly heavier gauge along your fence, or you could boost the voltage at the sending end, say to 48 V as being a common voltage for converters and around the maximum 'touch safe' voltage recognised by most authorities, and step it back down again at the receiving end. This reduces your current by a factor of four, and so the reduced voltage drop of <3 V is now compared to a much higher voltage, so proportionately less loss.
|
H: Use a single Voltage translator for multiple I2C with same voltage
Let's assume our Microcontroller is running on 3.3V and we have multiple I2c devices running on 3.3V and some on 5V. Can I use a single Voltage translator such as PCA9306 to run all 5V i2c devices, or do I need a voltage translator per each device which is not 3.3V? (All share same GND)
Image just for demonstration
simulate this circuit – Schematic created using CircuitLab
AI: Sure, a single level translator will work just fine for whole 5V bus.
As the MCU uses 3.3V supply, all the I2C devices with 3.3V supply should be directly connected to the MCU I2C bus, and this bus must have the I2C bus pull-up resistors to the same 3.3V supply.
Then the level translator can be between 3.3V and 5V bus segments, and the level translator can be a special chip or just FET pass gate built from discrete components. All the 5V powered chips can be on the 5V bus side which must have the I2C bus pull-up resistors connected to the same 5V supply that powers the 5V chips.
The total bus pull-up resistance should be large enough that current does not exceed 3mA in total, or whatever the weakest chip supports. For example the 5V side can have 4k7 pull-ups and 3.3V can have 3k3 pull-ups and the sum of currents needed to pull low by any chip is only near 2mA.
|
H: How to use Luenberger observer for induction motor rotor flux estimation?
I have implemented field oriented control algorithm of three phase induction motor with speed sensor. Now I would like to improve the rotor flux estimation algorithm with Luenberger observer usage. My idea was to use the state space model of the induction motor in following form:
$$
\begin{align}
\frac{\mathrm{d}}{\mathrm{d}t}
\begin{bmatrix}
i_{s\alpha}\\ i_{s\beta}\\ \psi_{r\alpha}\\ \psi_{r\beta}
\end{bmatrix}
&=
\begin{bmatrix}
-\alpha & 0 & \beta & \gamma\cdot\omega_m \\
0 & -\alpha & -\gamma\cdot\omega_m & \beta \\
R_r\frac{L_h}{L_r} & 0 & -\frac{R_r}{L_r} & -\omega_m \\
0 & R_r\frac{L_h}{L_r} & \omega_m & -\frac{R_r}{L_r}
\end{bmatrix}
\cdot
\begin{bmatrix}
i_{s\alpha} \\ i_{s\beta} \\ \psi_{r\alpha} \\ \psi_{r\beta}
\end{bmatrix}
+
\begin{bmatrix}
\delta & 0 \\ 0 & \delta \\ 0 & 0 \\ 0 & 0 \\
\end{bmatrix}
\cdot
\begin{bmatrix}
u_{s\alpha} \\
u_{s\beta}
\end{bmatrix}
\\
\\
\dot{\mathbf{x}}_T
&=
\mathbf{A}_T\cdot \mathbf{x}_T + \textbf{B}_T\cdot \mathbf{u}
\\
\begin{bmatrix}
i_{s\alpha} \\ i_{s\beta}
\end{bmatrix}
&=
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0
\end{bmatrix}
\cdot
\begin{bmatrix}
i_{s\alpha} \\ i_{s\beta} \\ \psi_{r\alpha} \\ \psi_{r\beta}
\end{bmatrix}
\\
\mathbf{y}_T
&=
\mathbf{C}_T\cdot\mathbf{x}_T
\end{align}
$$
where
$$
\alpha = \frac{R_s + R_r\frac{L^2_h}{L^2_r}}{L_{s\sigma}+\frac{L_h}{L_r}L_{r\sigma}}
$$
$$
\beta = \frac{R_r\frac{L_h}{L^2_r}}{L_{s\sigma}+\frac{L_h}{L_r}L_{r\sigma}}
$$
$$
\gamma = \frac{\frac{L_h}{L_r}}{L_{s\sigma}+\frac{L_h}{L_r}L_{r\sigma}}\cdot p_p
$$
$$
\delta = \frac{1}{L_{s\sigma}+\frac{L_h}{L_r}L_{r\sigma}}
$$
System state consists of components of the space vector of the stator current in the stator reference frame along with the components of the space vector of the rotor flux in the stator reference frame. Input to the system consists of the components of the space vector of the stator voltage in the stator reference frame. Output of the system consists of the components of the space vector of the stator current in the stator reference frame.
Based on the inspection of the above mentioned system matrix it is obvious that this matrix is rotor speed dependent (\$\omega_m\$). This is not a problem because I have the information about the rotor speed (I have been using the foc algorithm with speed sensor). My intention is to use the standard Luenberger observer i.e. variant for linear time independent systems and in each sampling period evaluate the elements of the system matrix based on current value of the rotor mechanical speed at first. Please can anybody tell me whether this approach is correct or whether it is necessary to use the the extended Luenberger observer which is dedicated for non-linear systems? Thanks in advance for any ideas.
EDIT:
Transformation of the state space model from the T equivalent circuit into the inverse gamma equivalent circuit:
The goal is to have the state space model for the inverse gamma equivalent circuit. It means that it is necessary to transform the matrices \$\mathbf{A}_T, \mathbf{B}_T, \mathbf{C}_T\$ above with some trasformation matrix usage.
The transformation matrix can be found based on following relationship between the above mentioned state space model for the T equivalent circuit and the inverse gamma equivalent circuit:
$$
\hat{\mathbf{i}}_{s\Gamma^-1} = \hat{\mathbf{i}}_{sT} \\
\hat{\boldsymbol{\psi}}_{r\Gamma^{-1}}= \hat{\boldsymbol{\psi}}_{rT}\cdot\frac{L_h}{L_r}
$$
The previously mentioned formulas can be written in matrix form
$$
\begin{bmatrix}
\hat{\mathbf{i}}_{s\Gamma^{-1}} \\
\hat{\boldsymbol{\psi}}_{r\Gamma^{-1}}
\end{bmatrix}
=
\begin{bmatrix}
\mathbf{I} & 0 \\
0 & \frac{L_h}{L_r}\cdot\mathbf{I}
\end{bmatrix}
\cdot
\begin{bmatrix}
\hat{\mathbf{i}}_{sT} \\
\hat{\boldsymbol{\psi}}_{rT}
\end{bmatrix}
$$
In case we express the state vector for the T equivalent circuit from the last matrix equation, we have
$$
\mathbf{x}_T
=
\begin{bmatrix}
\hat{\mathbf{i}}_{sT} \\
\hat{\boldsymbol{\psi}}_{rT}
\end{bmatrix}
=
\begin{bmatrix}
\mathbf{I} & 0 \\
0 & \frac{L_r}{L_h}\cdot\mathbf{I}
\end{bmatrix}
\cdot
\begin{bmatrix}
\hat{\mathbf{i}}_{s\Gamma^{-1}} \\
\hat{\boldsymbol{\psi}}_{r\Gamma^{-1}}
\end{bmatrix}
=
\mathbf{T}
\cdot
\mathbf{x}_{\Gamma^{-1}}
$$
Now we can substitute the \$\mathbf{x}_T\$ into the state space model for the T equivalent circuit
$$
\dot{\mathbf{x}}_T = \mathbf{A}_T\cdot \mathbf{x}_T + \textbf{B}_T\cdot \mathbf{u}
$$
$$
\frac{\mathrm{d}}{\mathrm{d}t}\left(\mathbf{T}\cdot\mathbf{x}_{\Gamma^{-1}}\right)
=
\mathbf{A}_T\cdot\left(\mathbf{T}\cdot\mathbf{x}_{\Gamma^{-1}}\right) + \mathbf{B}_T\cdot \mathbf{u}_T
$$
$$
\dot{\mathbf{x}}_{\Gamma^{-1}} = \mathbf{T}^{-1}\cdot\mathbf{A}_T\cdot\mathbf{T}\cdot\mathbf{x}_{\Gamma^{-1}} + \mathbf{T}^{-1}\cdot\mathbf{B}_T\cdot\mathbf{u}_T
$$
respectively
$$
\mathbf{y}_{T}
=
\mathbf{y}_{\Gamma^{-1}}
=
\mathbf{C}_T\cdot\mathbf{T}\cdot\mathbf{x}_{\Gamma^{-1}}
$$
Based on that we have know how to transform the matrices of the T state space model
$$
\mathbf{A}_{\Gamma^{-1}} = \mathbf{T}^{-1}\cdot\mathbf{A}_T\cdot\mathbf{T}
$$
$$
\mathbf{B}_{\Gamma^{-1}} = \mathbf{T}^{-1}\cdot\mathbf{B}_T
$$
$$
\mathbf{C}_{\Gamma^{-1}} = \mathbf{C}_T\cdot\mathbf{T}
$$
At this moment we can substitute into the transformation equations
$$
\mathbf{A}_{\Gamma^{-1}}
=
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & \frac{L_h}{L_r} & 0 \\
0 & 0 & 0 & \frac{L_h}{L_r}
\end{bmatrix}
\cdot
\begin{bmatrix}
-\alpha & 0 & \beta & \gamma\cdot\omega_m \\
0 & -\alpha & -\gamma\cdot\omega_m & \beta \\
R_r\frac{L_h}{L_r} & 0 & \frac{-R_r}{L_r} & \omega_m \\
0 & R_r\frac{L_h}{L_r} & \omega_m & -\frac{R_r}{L_r}
\end{bmatrix}
\cdot
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & \frac{L_r}{L_h} & 0 \\
0 & 0 & 0 & \frac{L_r}{L_h}
\end{bmatrix}
$$
$$
\mathbf{A}_{\Gamma^{-1}}
=
\begin{bmatrix}
-\alpha & 0 & \frac{L_r}{L_h}\cdot\beta & \frac{L_r}{L_h}\cdot\gamma\cdot\omega_m \\
0 & -\alpha & -\frac{L_r}{L_h}\cdot\gamma\cdot\omega_m & \frac{L_r}{L_h}\cdot\beta \\
\frac{L_h}{L_r}\cdot R_r\cdot\frac{L_h}{L_r} & 0 & -\frac{L_r}{L_h}\cdot\frac{L_h}{L_r}\cdot R_r & -\frac{L_r}{L_h}\cdot\frac{L_h}{L_r}\cdot\omega_m \\
0 & \frac{L_h}{L_r}\cdot R_r\cdot\frac{L_h}{L_r} & \frac{L_r}{L_h}\cdot\frac{L_h}{L_r}\cdot\omega_m & -\frac{L_r}{L_h}\cdot\frac{L_h}{L_r}\cdot R_r
\end{bmatrix}
$$
$$
\mathbf{B}_{\Gamma^{-1}}
=
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & \frac{L_h}{L_r} & 0 \\
0 & 0 & 0 & \frac{L_h}{L_r}
\end{bmatrix}
\cdot
\begin{bmatrix}
\delta & 0 \\
0 & \delta \\
0 & 0 \\
0 & 0
\end{bmatrix}
=
\begin{bmatrix}
\delta & 0 \\
0 & \delta \\
0 & 0 \\
0 & 0
\end{bmatrix}
$$
$$
\mathbf{C}_{\Gamma^{-1}}
=
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0
\end{bmatrix}
\cdot
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & \frac{L_h}{L_r} & 0 \\
0 & 0 & 0 & \frac{L_h}{L_r}
\end{bmatrix}
=
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0
\end{bmatrix}
$$
Now we can substitute for the \$ \alpha, \beta, \gamma, \delta \$ into the matrices \$\mathbf{A}_{\Gamma^{-1}}, \mathbf{B}_{\Gamma^{-1}}, \mathbf{C}_{\Gamma^{-1}} \$. We also have take into account that the inverse gamma equivalent circuit contains following parameters: total leakage inductance \$L_L = L_{s\sigma} + \frac{L_h}{L_r}\cdot L_{r\sigma}\$, magnetizing inductance \$L_M = L_h\cdot\frac{L_h}{L_r}\$, stator resistance \$R_S = R_s\$ and rotor resistance \$R_R = R_r\cdot\left(\frac{L_h}{L_r}\right)^2\$. After simplification, we have
$$
\mathbf{A}_{\Gamma^{-1}}
=
\begin{bmatrix}
-\frac{R_S + R_R}{L_L} & 0 & \frac{R_R}{L_M\cdot L_L} & \frac{1}{L_L}\cdot\omega_m \\
0 & -\frac{R_S + R_R}{L_L} & -\frac{1}{L_L}\cdot\omega_m & \frac{R_R}{L_M\cdot L_L} \\
R_R & 0 & -\frac{R_R}{L_M} & -\omega_m \\
0 & R_R & \omega_m & -\frac{R_R}{L_M}
\end{bmatrix}
$$
$$
\mathbf{B}_{\Gamma^{-1}}
=
\begin{bmatrix}
\frac{1}{L_L} & 0 \\
0 & \frac{1}{L_L} \\
0 & 0 \\
0 & 0
\end{bmatrix}
$$
$$
\mathbf{C}_{\Gamma^{-1}}
=
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0
\end{bmatrix}
$$
As far as the equation for the moment of the induction motor. We can use the equation for the moment based on the T equivalent circuit
$$
M_T = \frac{3}{2}\cdot p_p\cdot \frac{L_h}{L_r}\cdot\Re \{ \mathrm{j}\cdot\hat{\boldsymbol{\psi}}_{rT}\cdot \hat{\boldsymbol{i}}^{*}_{sT} \} = \frac{3}{2}\cdot p_p\cdot \frac{L_h}{L_r}\cdot(\psi_{rxT}\cdot i_{syT} - \psi_{ryT}\cdot i_{sxT})
$$
Then we can substitute for the space vectors \$\hat{\mathbf{i}}_{sT} = \hat{\mathbf{i}}_{s\Gamma^-1}\$ and \$\hat{\boldsymbol{\psi}}_{rT} = \frac{L_r}{L_h}\cdot\hat{\boldsymbol{\psi}}_{r\Gamma^{-1}}\$. After simplification, we have
$$
M_{\Gamma^{-1}} = \frac{3}{2}\cdot p_p\cdot(\psi_{rx\Gamma^{-1}}\cdot i_{sy\Gamma^{-1}} - \psi_{ry\Gamma^{-1}}\cdot i_{sx\Gamma^{-1}})
$$
AI: I agree that using the \$\omega_m\$ to produce a time-varying observer is a valid and intuitive approach. The "theoretical correctness" of it will mostly depend on two aspects, and both will require some reading and research on your part.
(1) the criterias you want to guarantee for the closed-loop system. This mostly concerns stability guarantees and perhaps some pole-placement objectives.
(2) the design method you will be using (i.e. how the gain coefficients of closed loop are obtained).
My suggestion is that you start by modeling \$\omega_m\$ as an uncertain parameter within \$\omega_{min}\$ and \$\omega_{max}\$, so now your system is "bounded by a polytope". This will produce LMI (linear matrix inequality) constraints that can be used to guarantee quadratic stability of the system. Such constraints can also easily be coupled with \$H_2\$ or \$H_\infty\$ design objectives to produce a convex optimization problem. There are plenty of papers available on the topic if you search using these keywords. Good luck!
Additional question in comments: eigenvalues of the above mentioned system matrix in symbolic form?
You can always use a symbolic calculator to figure this out. Just did it using WolframAplha:
Just replace \$a=-\alpha\$, \$b=\beta\$, \$c=\gamma\omega_m\$, \$d=R_r\frac{L_h}{L_r}\$, \$e=-\frac{R_r}{L_r}\$ and \$f=-\omega_m\$
|
H: Find the differences between two signals with an opamp
I have been trying to find an answer to this question and I am sure I probably just don't know what the circuit is called so I am unable to find it. Basically I want to take two input signals that for example are exactly the same (ex. 1Vp-p @ 1hz) and put it through an op amp to only get the differences. Image below of what I am kind of thinking:
So for the above circuit the two buffer opamp's create 2 signals that are the exact same. Then the second opamp stage add's a gain of 2 to each individual signal. The thought on the third stage is to take the the two signals and cancel each other out to have a 0Vp-p output signal. To do this I thought just putting each signal to the input of an opamp with no gain would give this result since the voltage on each input terminal would be the exact same. But when I simulate it with the circuit above it only acts like a buffer. The through is that I can then add noise to one (or both) of the signal paths and only have the 3'rd opamp output the noise and no signal, which then I could sum the two similar signals together and remove the non-common noise.
Sorry for the question I am not an electronic engineer (just a hobbyist) and I am just trying to learn things by trying and then looking up/asking questions.
AI: But when I simulate it with the circuit above it only acts like a
buffer
Try adding the resistor in the green box below: -
You need to make the right hand op-amp a proper differential amplifier as used inside such devices as Instrumentation Amplifiers: -
Note that R3 in the above circuit is the addition I made to your schematic.
|
H: HDMI Video to RCA Audio
Some 20 years ago I created an audiovisual art installation, connecting RCA Video output from a TV set to a HiFi system's audio-in, just plain via cable, in order to "hear" the video signal. Also vice versa, sound from the HiFi system to the TV set, in order to "see" the audio signal.
I was wondering if the first part "hearing the video signal" would be somehow possible nowadays with a laptop having a HDMI output.
There are some HDMI to RCA cables out there. Would it work, to connect the RCA video output jack to the HiFi system's audio in?
Or is there more required? Maybe something like a converter first?
Or are there better solutions to achieve "hearing the video signal"?
AI: The signal on RCA Video output is called "composite video".
You can find "HDMI to composite video converters" online, with an HDMI input and a RCA output with composite video. If the product specification says "composite video output" it'll be the same signal that was on oldskool RCA video outputs, so that should work for your project.
|
H: What are some quick, cheap hacks for determining the source of EMI in my house?
TL;DR - Without dumping a bunch of money, is there a quick MacGuyver-y way to help diagnose what's causing the EMI in my house?
Longer -
I have the curse that I'm a little too technical to be helped here by dummies.com, but not sophisticated enough to have or use the tools I imagine most of you would recommend.
Several times per day - sometimes hours without issue, sometimes firing once every 5 seconds - the wifi blips for a few seconds. I've caught command line ping dropping packets for about 2-5 seconds, on computers throughout the house. Notably, we realized the baby monitor also cuts out for just a few seconds at the exact same time ping goes down.
So it would appear my house is regularly awash in brief bursts of EMI, that's causing connectivity issues (especially a problem with video conferencing in the current covid-19 lockdown world). But I have no idea what to buy or rent to help me triangulate where this is coming from or what it could be. I have some dim memory that magic things can be managed with an oscilloscope and simple length of metal plugged into it operating as an antenna.
How can I find EMI?
(Meta - if there's a better place besides electronics.stackexchange.com for this please leave a comment)
UPDATE (for more information, as requested in comments)
The Baby monitor and its receiver is an Infant Optics DXR-8, audio and video over 2.4ghz wireless (NOT wifi / tcp-ip, but some point-to-point proprietary). In fact, shielded twisted pair cat5 appears undisrupted (but not a fix for everything getting disrupted in our wifi world). The wifi is 5ghz AC + 2.4 ghz N (both ranges/protocols impacted). To my knowledge, I'm not particularly close to any unusual EM sources - e.g. airport, military base, transformers - though I guess you never truly know. It is relatively dense population (single family residences every 35 feet) - I'm wondering if a neighbor has one of these "weaponized" routers that disables other people's wifi, but need some kind of proof before I go pounding on doors. All of this aside, to keep the question within format for stackexchange, assume generic American residential suburbia, and let's see if we can dream up a gimmick that works generally. Anything further peculiar to my immediate situation I can answer in comments.
AI: A yagi antenna and a cheap SDR might be good to play around with. Make sure the antenna and SDR work in the frequency range of interest (so if you want to look for wifi signals, then the antenna and SDR need to work in the 2.4GHz range.) MSI SDR is an SDR I like because it has a range of 10kHz to 2Ghz (but you need 2.4GHz). RTL-SDR shows an SDR solution for 2.4Ghz.
SDR's are software defined radios, you can download spectrum analyzers for free and see which bands are carrying radio information.
Keep in mind that you may not be able to find exactly what the source is because of reflections and attenuations of walls and other objects. The antenna could also have a lobe in the back so read up on antenna patterns (or look at the one you buy, antennas are not perfect by any means, they have different lobes and nulls which changes the gain with direction)
|
H: Use of clamp diode in ULN2003A
I'm planning to use a ULN2003A 7-channel Darlington driver (datasheet) to control 4 to 7 LEDs in common-anode configuration from a Teensy MCU:
(The "trident" is a common-anode RGB LED).
The ULN2003A has a set of "clamp diodes" or "free wheeling diodes" which I gather are present to protect against voltage spikes when switching inductive loads. Those diodes are common-cathode out to pin 9 on the IC:
My questions are:
Do I need to connect pin 9 to anything if I'm just driving LEDs? (My guess is no.)
If I were driving motors or something and needed diode clamping here, what would I connect pin 9 to? The positive voltage of the motor side?
AI: It's in the datasheet - https://www.ti.com/lit/ds/symlink/uln2003a.pdf?ts=1596498695539&ref_url=https%253A%252F%252Fwww.google.com%252F
8.4.1 Inductive Load Drive
When the COM pin is tied to the coil supply voltage, ULN2003A device is able to drive inductive loads and
suppress the kick-back voltage through the internal free-wheeling diodes.
8.4.2 Resistive Load Drive
When driving a resistive load, a pullup resistor is needed in order for ULN2003A device to sink current and for
there to be a logic high level. The COM pin can be left floating for these applications.
Your LEDs are not 'inductive', so you don't need to use that pin.
Motors are one possibility. Driving relay coils is probably the more likely scenario they were considering.
|
H: Where can I buy a 4 terminal P-Channel Enhancement MOSFET?
I have a simulation working with a 4 terminal MOSFET. I'm looking for experimentally verifying my circuit but I cannot find the P-Channel Enhancement MOSFET with a separate body connection to order online. The body is not connected to source but it is tied to VDD in my case, hence I would need to access the body terminal of the MOSFET.
Also, I know that PSpice has the IC and component part numbers. I could not find a 4 terminal MOSFET in there as well.
Thank you in advance!
AI: The ALD1107/ALD1117 is a dual/quad matched P-channel MOSFET array with a separate body connection. I have used these in a teaching environment to mimic simple CMOS integrated circuits. We were also able to use a model for those transistors. The ALD1106/ALD1116 is the same thing, but a N-channel array.
|
H: How to select a single component in Altium Designer using the PCB filter?
Using the PCB Filter, how can I select a single component easily (not its primivites)?
Every now and then I have a complex component (such as an on-board PCB antenna which consists of copper traces, pads, keep-out regions, etc.) that I need to select by itself in order to lock/unlock primitives, for example. The problem I run into is once I've unlocked primitives, selecting the component again becomes a challenge due to non-component items (vias, polygons, etc.) scattered around that prevent selecting with a rectangle or lasso easily. Shelving polygons, hiding objects such as vias, and so on works, but is time-consuming.
(IsComponent Or IsComponentBody) and InComponent('AE1') is an expression that worked, but is there a simpler one?
(Altium Designer 20.1)
AI: Option 1:
In the properties tab, when nothing is selected, you can change the selection filter:
Enable selection of components and disable all other selections.
(Apparently this doesn't work well in single-layer mode --- disable single-layer mode before selecting a part)
Option 2:
In the PCB panel, find the component you want to select and double-click it.
This will select the part and zoom the PCB view to the part.
|
H: Are USB and/or Ethernet payload agnostic?
I'm working on a project in which I'm trying to reduce the number of conductors in a high-bandwidth, multi-signal communication interface that requires a fiber connection for isolation and a back channel. From my research, it seems that Ethernet and USB meet bandwidth requirements, but I'm wondering whether, for example, I can transmit both I2C data and the primary content data from a video IC over one or the other simultaneously. I Suppose that if possible it would require significant time in the firmware weeds.
Thanks in advance--new to the EE industry and I feel lucky to have you all as such a great resource...
AI: but I'm wondering whether, for example, I can transmit both I2C data and the primary content data from a video IC
Yes and no.
Yes, in theory, you can -- but you have to translate it onto Ethernet, and then get it off. There's not an I2C pin on an Ethernet phy, nor is there an HDMI pin.
To get either of these working you'd have to get it into a processor, extract the meaning, send that over Ethernet, and decode it at the other end. You'd run into complications with the video content if it's got DRM (digital rights management) enabled, and I can guarantee you that I am not smart enough to tell you how to deal with that.
|
H: Why are PCIE's coupling capacitors so large
I was looking at the PCIE specification, and I don't understand the
requirement for coupling capacitors. For 2.5GT/s, the standard requires
AC coupling capacitors of 75nF to 265nF. I tried to analyze the number
like in this article in
High-Speed Digital Design Online Newsletter. The line is terminated at
both ends, the capacitor faces 100Ω, the RC time constant is 7.5µs to
26.5µs, or 19000 to 66000 bit intervals. Since we're using 8b/10b
encoding and there are at most 3 ones or zeros in a row, the RC time
constant only needs to be large compared with 3 bit intervals, so the
capacitance should only need to be large compared with 12pF. The
requirement of at least 75nF seems unnecessarily large. Why is that?
If the capacitance were allowed to be around 100pF, the capacitors can
even be made into the chip.
The requirement for coupling capacitors can be found
here,
page 357, section 4.3.13.
AI: The larger AC coupling value passes the low-speed 'ping' pulses used for sensing the presence of a link partner. The TX PHY sends the pulses, then watches the signal using the known R-C time constant to detect an open or terminated line.
Here's an excerpt from an article describing this:
"Receiver detection: PCIe uses an ingenious means to recognize both the presence of a physical link and channel width. The specification exploits the fact that an un-terminated, ac-coupled transmission line will have a very different charge time when the line is terminated versus open. Each PCIe transmitter, at the commencement of linkup, produces a low-frequency “ping” on each of the differential TX outputs. The transmitter includes a simple detection circuit to monitor the line response to this ping. With no receiver attached, the edge rate (and amplitude) of the line change is much higher than when a receiver is present. Because the specification has a defined range of coupling capacitance and the receiver termination, a distinct, detectable time constant range defines when a receiver is present or not."
From here: https://www.electronicdesign.com/technologies/communications/article/21762833/pci-express-and-the-physical-journey-to-gen-3
Once the link partners have found their connections, then the 8b/10b linkup and training process begins.
|
H: Arduino analog input value oscillating, why does the DMM work and arduino not so much
I am measuring voltage output from a device with 10 kohm output impedance with an arduino analog input pin. I see what I would expect with a multimeter, but with the arduino I get either garbage, or at best, oscillating measurements that average out to about what I would expect.
I know the impedance of the analog pins to be 100 Mohms, while on the DMM, it would be around 10 Mohms, so I wasn't expecting the Arduino to be useless while the DMM works fine.
I finally found that shorting the outputs with a capacitor gives me what I'm expecting, but don't really understand why. Resistors helped but I still saw oscillation, and I assumed, being an issue seemingly with impedance, that resistance mismatch was the culprit.
AI: The MCU in Arduino has a successive approximation ADC.
It works by briefly taking a voltage sample via a multiplexer into a small storage capacitor to handle multiple input channels with one ADC.
With a high source impedance, the sample/hold capacitor may not have time to fully charge, and thus the sample of the voltage does not resemble the actual voltage.
So the impedance of an analog input pin is not 100 Mohms, as it is momenrarily charging a 14pF capacitor with 1kohm series resistance, and there can be current in or out of the pin.
Therefore the source impedance must be low enough to charge the sample/hold capacitor to within 0.5 ADC counts during the sample time.
Assuming the MCU on your Arduino is an AVR, the ADC specifications say it works best when the source impedance is 10k or less. It seems that your sensor is having a high output impedance.
Also if the sensor output cannot handle the gulps of periodic sampling capacitor charging, it might become unstable and exhibit ringing when the empty capacitor is suddenly connected for charging.
The same is basically when you do have a filter capacitor at the AVR input to have low enough short-term AC impedance, so you can take one measurement without much affecting the value. But if the filter cap is charged by a 1 Mohm resistor, it will still have a high long-term DC impedance, so it takes long to charge the capacitor back to original value, so taking measurements too often will slowly discharge the filter capacitor.
So there are many reasons why analog measurements made with Arduino won't work when compared to a multimeter. The Arduino does not have a built in signal conditioning and buffering like a multimeter has. The required analog input stage should be built between sensor and MCU.
|
H: Differences in CMOS fan-out between the two logic level
I was taught that a number of inputs A CMOS gate can drive when it's output is low differs from the number of inputs it can drive when its output is high.
Is it because of different properties of the P channel and N channel MOSFETs, and if it's not the case, why is it, then?
AI: That may have been true at some point, or it may not have been a CMOS output.
CMOS outputs typically use symmetrical output strength, but it means that the weaker PMOS transistor can be made larger than the stronger NMOS transistor to compensate the strength.
LS TTL outputs do have asymmetrical drive strength, but LS TTL inputs also have asymmetrical input drive current, so they also match up.
|
H: Designing a Peristaltic Pump Driver with IRFZ44n Mosfet
I'm making a peristaltic pump controlled by an arduino. The pump is controlled by a PWM from arduino to a IRFZ44N Mosfet. I have added a pulldown resistor for the gate, and also diode and capacitor for the pump in paralell Here is my schematics, I think it will explains better:
But the problem is, after I have turned on the pump on high PWM (i.e: analogWrite(outputPin, 200)) after sometime the pump would turn on continuously for a while and the arduino would resets. Any idea why does this happens?
The peristaltic pump is 12V 5W, and here the VCC in the schematics is 12V
AI: Turns out, as Colin suggested. I should have added a decoupling capacitor on my voltage source to prevent brown out. So, here is my updated schematics in case someone needs it in the future:
|
H: Which connector is it?
Could you please help me to identify this connector ? Could you please advise me a reference for a corresponding mating connector ?
Additionnal information:
24 pins.
0.5 mm pitch.
Edit: Successfully solved thanks to your help. It is a AXK5S24047YG connector, to be used with a AXK6S24447YG mating pair.
AI: Seems to be a Panasonic P5KS Series connector, likely the AXK5S24047YG, or a similar one from the series. A mating connector for this one would be an AXK6S24447YG or similar.
See the datasheet and the obligatory Digikey link.
Obligatory Digikey link
I found this by searching Digikey, going to the Connectors, Interconnects category, then Rectangular Connectors - Arrays etc, then punched in the known values into the search: 24 pins, 2 rows, 0.5mm pitch, Center Strip Contacts.
I have no affiliation with Digikey, I just find their parametric search good.
|
H: Merging two different HDMI cables
I have two brands of broken HDMI cables that I need to join to make them longer.
Can't join them by color, because they are completely different. Plus, one of the cables has all the wires, the other floats some of the pins.
So,
What are the most fundamental pins to transmit audio and video between PC and TV ?
Does the shield/shell have to be connected or is it optional ?
Wikipedia treats the pins as "data", but that doesn't tell me anything, even though I know digital image and video are data.
I would connect all the available wires, but it's quite difficult in my case here. If one is not important, I intend to leave it.
Edit:
Let me make an additional question, if there's still time:
How can the HDMI I have here work normally (at least before it lost one of the endings) having only 14 wires ?
It is missing wires 2, 5, 8, 11 and 13
There are 5 extra/individual shields, but the multimeter is not picking them on those missing pins.
AI: Unfortunately, they are all important. Including cable shields. Except maybe the UTIL and CEC lines if you don't need the features they provide.
|
H: Finding the transfer function of a opamp circuit with 3 opamps
I have the following circuit:
I know that \$\text{sig}_+\$ is a voltage that is \$n\$ times bigger than the voltage at \$\text{sig}_-\$.
Question: If \$R_g\$ is a coil with the value \$63\space\text{mH}\$ and \$R_3\$ is a capacitor with value \$10\space\text{nF}\$ and \$R_f=R_1=R_2=R_4=10\space\text{k}\Omega\$ and \$n=10\$ what is the gain of this circuit at \$f=10^6\space\text{Hz}\$?
AI: Well, I am trying to analyze the following circuit (assuming an ideal opamp):
simulate this circuit – Schematic created using CircuitLab
When we use and apply KCL, we can write the following set of equations:
$$
\begin{cases}
\text{I}_8=\text{I}_1+\text{I}_4\\
\\
\text{I}_1=\text{I}_2\\
\\
\text{I}_2=\text{I}_3\\
\\
\text{I}_5=\text{I}_3+\text{I}_9\\
\\
0=\text{I}_4+\text{I}_7\\
\\
\text{I}_5=\text{I}_6\\
\\
\text{I}_6=\text{I}_7+\text{I}_8+\text{I}_9
\end{cases}\tag1
$$
When we use and apply Ohm's law, we can write the following set of equations:
$$
\begin{cases}
\text{I}_1=\frac{\text{V}_1-\text{V}_2}{\text{R}_1}\\
\\
\text{I}_2=\frac{\text{V}_2-\text{V}_3}{\text{R}_2}\\
\\
\text{I}_3=\frac{\text{V}_3-\text{V}_4}{\text{R}_3}\\
\\
\text{I}_4=\frac{\text{V}_1-\text{V}_5}{\text{R}_4}\\
\\
\text{I}_5=\frac{\text{V}_4-\text{V}_6}{\text{R}_5}\\
\\
\text{I}_6=\frac{\text{V}_6}{\text{R}_6}\\
\\
\text{I}_7=\frac{\text{V}_7-\text{V}_5}{\text{R}_7}
\end{cases}\tag2
$$
Substitute \$(2)\$ into \$(1)\$, in order to get:
$$
\begin{cases}
\text{I}_8=\frac{\text{V}_1-\text{V}_2}{\text{R}_1}+\frac{\text{V}_1-\text{V}_5}{\text{R}_4}\\
\\
\frac{\text{V}_1-\text{V}_2}{\text{R}_1}=\frac{\text{V}_2-\text{V}_3}{\text{R}_2}\\
\\
\frac{\text{V}_2-\text{V}_3}{\text{R}_2}=\frac{\text{V}_3-\text{V}_4}{\text{R}_3}\\
\\
\frac{\text{V}_4-\text{V}_6}{\text{R}_5}=\frac{\text{V}_3-\text{V}_4}{\text{R}_3}+\text{I}_9\\
\\
0=\frac{\text{V}_1-\text{V}_5}{\text{R}_4}+\frac{\text{V}_7-\text{V}_5}{\text{R}_7}\\
\\
\frac{\text{V}_4-\text{V}_6}{\text{R}_5}=\frac{\text{V}_6}{\text{R}_6}\\
\\
\frac{\text{V}_6}{\text{R}_6}=\frac{\text{V}_7-\text{V}_5}{\text{R}_7}+\text{I}_8+\text{I}_9
\end{cases}\tag3
$$
Now, using an ideal opamp, we know that:
$$\text{V}_\text{k}=\text{V}_{+_1}=\text{V}_{-_1}=\text{V}_2$$
$$\text{n}\cdot\text{V}_\text{k}=\text{V}_{+_2}=\text{V}_{-_2}=\text{V}_3$$
$$\text{V}_x:=\text{V}_{+_3}=\text{V}_{-_3}=\text{V}_5=\text{V}_6$$
So we can rewrite equation \$(3)\$ as follows:
$$
\begin{cases}
\text{I}_8=\frac{\text{V}_1-\text{V}_\text{k}}{\text{R}_1}+\frac{\text{V}_1-\text{V}_x}{\text{R}_4}\\
\\
\frac{\text{V}_1-\text{V}_\text{k}}{\text{R}_1}=\frac{\text{V}_\text{k}-\text{n}\cdot\text{V}_\text{k}}{\text{R}_2}\\
\\
\frac{\text{V}_\text{k}-\text{n}\cdot\text{V}_\text{k}}{\text{R}_2}=\frac{\text{n}\cdot\text{V}_\text{k}-\text{V}_4}{\text{R}_3}\\
\\
\frac{\text{V}_4-\text{V}_x}{\text{R}_5}=\frac{\text{n}\cdot\text{V}_\text{k}-\text{V}_4}{\text{R}_3}+\text{I}_9\\
\\
0=\frac{\text{V}_1-\text{V}_x}{\text{R}_4}+\frac{\text{V}_7-\text{V}_x}{\text{R}_7}\\
\\
\frac{\text{V}_4-\text{V}_x}{\text{R}_5}=\frac{\text{V}_x}{\text{R}_6}\\
\\
\frac{\text{V}_x}{\text{R}_6}=\frac{\text{V}_7-\text{V}_x}{\text{R}_7}+\text{I}_8+\text{I}_9
\end{cases}\tag4
$$
Now, we can solve for the transfer function:
$$\displaystyle\mathcal{H}:=\frac{\text{V}_\text{o}}{\text{V}_\text{i}}=\frac{\text{V}_7}{\text{V}_\text{k}}=\frac{\text{n}\text{R}_7\left(\text{R}_6\left(\text{R}_1+\text{R}_2+\text{R}_3\right)+\text{R}_1\text{R}_5\right)+\text{n}\text{R}_4\text{R}_6\left(\text{R}_2+\text{R}_3\right)-\text{R}_7\left(\text{R}_1+\text{R}_2\right)\left(\text{R}_5+\text{R}_6\right)-\text{R}_3\text{R}_6\left(\text{R}_4+\text{R}_7\right)}{\text{R}_2\text{R}_4\left(\text{R}_5+\text{R}_6\right)}\tag5$$
Now, applying this to your circuit we need to use (from now on I use the lower case letters for the function in the 'complex' s-domain where I used Laplace transform):
$$\text{R}_2=\text{sL}\tag6$$
$$\text{R}_6=\frac{1}{\text{sC}}\tag7$$
$$\text{R}:=\text{R}_1=\text{R}_3=\text{R}_4=\text{R}_5=\text{R}_7\tag8$$
So, the transfer function becomes:
$$\mathcal{h}\left(\text{s}\right)=\frac{\text{v}_\text{o}\left(\text{s}\right)}{\text{v}_\text{i}\left(\text{s}\right)}=\frac{\text{C}\left(\text{n}-1\right)\text{R}^2\text{s}+2\text{Lns}+3\left(\text{n}-1\right)\text{R}}{\text{Ls}\left(\text{CRs}+1\right)}-1\tag9$$
Because we are working with sinusodial signals, we can write \$\text{s}=\text{j}\omega\$ where \$\text{j}^2=-1\$ (the imaginary unit) and \$\omega=2\pi\text{f}\$ with \$\text{f}\$ is the frequency in Hertz. So, we can write:
$$\underline{\mathcal{h}}\left(\text{j}\omega\right)=\frac{\text{C}\left(\text{n}-1\right)\text{R}^2\left(\text{j}\omega\right)+2\text{Ln}\left(\text{j}\omega\right)+3\left(\text{n}-1\right)\text{R}}{\text{L}\left(\text{j}\omega\right)\left(\text{CR}\left(\text{j}\omega\right)+1\right)}-1\tag{10}$$
Now, we can find the amplitude by finding the absolute value of \$(10)\$ and using your given values:
$$\left|\underline{\mathcal{h}}\left(\text{j}\omega\right)\right|=\frac{1}{7}\sqrt{49-\frac{767436000000000}{\omega^2+100000000}+\frac{900000000000000}{\omega^2}}\tag{11}$$
So, at \$\text{f}=10^6\space\text{Hz}\$ we have \$\omega=2\pi\cdot10^6\space\text{rad/sec}\$, we get:
$$\left|\underline{\mathcal{h}}\left(\text{j}\cdot2\pi\cdot10^6\right)\right|=\frac{1}{7}\sqrt{49-\frac{767436000000000}{\left(2\pi\cdot10^6\right)^2+100000000}+\frac{900000000000000}{\left(2\pi\cdot10^6\right)^2}}=$$
$$\frac{\sqrt{\frac{225+1325689 \pi ^2+1960000 \pi ^4}{1+40000 \pi ^2}}}{7 \pi }\approx1.0337\tag{12}$$
I used Mathematica to solve the transfer function:
In[1]:=FullSimplify[
Solve[{I8 == I1 + I4, I1 == I2, I2 == I3, I5 == I3 + I9,
0 == I4 + I7, I5 == I6, I6 == I7 + I8 + I9, I1 == (V1 - Vk)/R1,
I2 == (Vk - n*Vk)/R2, I3 == (n*Vk - V4)/R3, I4 == (V1 - Vx)/R4,
I5 == (V4 - Vx)/R5, I6 == (Vx)/R6, I7 == (V7 - Vx)/R7}, {I1, I2,
I3, I4, I5, I6, I7, I8, I9, V1, V4, Vx, V7}]]
Out[1]={{I1 -> (Vk - n Vk)/R2, I2 -> (Vk - n Vk)/R2, I3 -> (Vk - n Vk)/R2,
I4 -> (((R1 - n R1 + R2) R5 - (-1 + n) (R1 + R2 + R3) R6) Vk)/(
R2 R4 (R5 + R6)), I5 -> ((-R3 + n (R2 + R3)) Vk)/(R2 (R5 + R6)),
I6 -> ((-R3 + n (R2 + R3)) Vk)/(R2 (R5 + R6)),
I7 -> (((-1 + n) R1 R5 - R2 R5 + (-1 + n) (R1 + R2 + R3) R6) Vk)/(
R2 R4 (R5 + R6)),
I8 -> (((R1 - n R1 + R2 + R4 - n R4) R5 - (-1 + n) (R1 + R2 + R3 +
R4) R6) Vk)/(R2 R4 (R5 + R6)),
I9 -> ((-R3 - R5 - R6 + n (R2 + R3 + R5 + R6)) Vk)/(R2 (R5 + R6)),
V1 -> ((R1 - n R1 + R2) Vk)/R2, V4 -> ((-R3 + n (R2 + R3)) Vk)/R2,
Vx -> ((-R3 + n (R2 + R3)) R6 Vk)/(R2 (R5 + R6)),
V7 -> ((n (R2 + R3) R4 R6 - (R1 + R2) (R5 + R6) R7 +
n (R1 R5 + (R1 + R2 + R3) R6) R7 - R3 R6 (R4 + R7)) Vk)/(
R2 R4 (R5 + R6))}}
In[2]:=FullSimplify[(((n (R2 + R3) R4 R6 - (R1 + R2) (R5 + R6) R7 +
n (R1 R5 + (R1 + R2 + R3) R6) R7 - R3 R6 (R4 + R7)) Vk)/(
R2 R4 (R5 + R6)))/Vk]
Out[2]=(n (R2 + R3) R4 R6 - (R1 + R2) (R5 + R6) R7 +
n (R1 R5 + (R1 + R2 + R3) R6) R7 - R3 R6 (R4 + R7))/(R2 R4 (R5 + R6))
I also found the amplitude function for the transfer function using Mathematica:
In[3]:=FullSimplify[
Sqrt[(ComplexExpand[
Re[-1 + (3 (-1 + n) R + 2 L n (I*w) + C1 (-1 + n) R^2 (I*w))/(
L (I*w) (1 + C1 R (I*w)))]])^2 + (ComplexExpand[
Im[-1 + (3 (-1 + n) R + 2 L n (I*w) + C1 (-1 + n) R^2 (I*w))/(
L (I*w) (1 + C1 R (I*w)))]])^2],
Assumptions -> L > 0 && C1 > 0 && n > 0 && w > 0 && R > 0]
Out[3]=Sqrt[(L^2 (1 - 2 n)^2 w^2 + C1^2 (-1 + n)^2 R^4 w^2 +
R^2 (9 (-1 + n)^2 + 4 C1 L (-1 + n^2) w^2 +
C1^2 L^2 w^4))/(L^2 w^2 (1 + C1^2 R^2 w^2))]
Now, using your values we get:
In[4]:=L = 63*10^(-3);
C1 = 10*10^(-9);
R = 10000;
n = 10;
FullSimplify[Sqrt[(
L^2 (1 - 2 n)^2 w^2 + C1^2 (-1 + n)^2 R^4 w^2 +
R^2 (9 (-1 + n)^2 + 4 C1 L (-1 + n^2) w^2 + C1^2 L^2 w^4))/(
L^2 w^2 (1 + C1^2 R^2 w^2))]]
Out[4]=1/7 Sqrt[49 + 900000000000000/w^2 - 767436000000000/(100000000 + w^2)]
And, we can use the limit:
In[5]:=FullSimplify[
Limit[1/7 Sqrt[
49 + 900000000000000/w^2 - 767436000000000/(100000000 + w^2)],
w -> 2*Pi*10^6]]
Out[5]=Sqrt[(225 + 1325689 \[Pi]^2 + 1960000 \[Pi]^4)/(1 +
40000 \[Pi]^2)]/(7 \[Pi])
In[6]:=N[%5]
Out[6]=1.0337
|
H: Power loss into RCD snubber
Here is what I read from Ridley Engineering http://www.ridleyengineering.com/images/phocadownload/12_%20flyback_snubber_design.pdf :
I do not get why if we increase the clamp voltage, ie, if we reduce the capacitor and increase the resistance, we reduce the dissipation as the energy to dissipate is always the same and depends only on the leakage inductance of the transformer. Nevertheless i could understand that if we reduce the time during which the inductance release its energy, the transition between the on state and the off state will be faster and then there is less losses. But this has nothing to do with power loss into the snubber. Could someone explain it to me ?
Thank you very much !
AI: I don't think that the assertion is theoretically true.
The snubber (aka diode-RC clamp) power dissipation will be the same if you halve the capacitance. The power dissipation is produced by the resistor because it needs to "reset" the voltage acquired by the clamp capacitor after it received leakage inductance energy during flyback. It has a certain length of time to reset that voltage hence RC must be fixed.
So, if you half the capacitance, you must double the resistance.
Given this well-known formula for capacitor energy (W): -
$$W = \dfrac{1}{2}\cdot CV^2$$
You can re-arrange for voltage: -
$$V = \sqrt{\dfrac{2\cdot W}{C}}$$
So, if you halved the capacitance, voltage would rise by \$\sqrt2\$.
The power dissipated by the resistor would be related to the peak voltage thus: -
$$P = \dfrac{V_{PK}^2}{R}$$
So if the capacitance halved, R would double and \$V_{PK}\$ would increase by \$\sqrt2\$: -
$$P = \dfrac{\sqrt2^2\cdot V_{PK}^2}{2R} = \dfrac{V_{PK}^2}{R}$$
In other words no change in dissipation.
There may be other nuances I've not considered of course but for a simple circuit, I believe the power dissipated by the clamp is unchanged when C changes.
|
H: Use of choke to create analog ground: mistake?
Not infrequently I see designs that implement an analog ground like in the following schematic:
This is a breakout module that includes an electret microphone module and amplifier that could feed into the A/D converter of an arduino or similar. (It's Adafruit 1063, not to pick on them particularly, just an example).
The feature of interest is the choke FB1 in the ground line to create a separate "AGnd" Analog ground. I think the intent might be to run the Max4466 amplifier on a clean ground, separate from the noisy digital ground.
Now, it's certainly a good idea to separate AVCC from VCC with a choke, (as is done here with FB2), and bypass it with a cap to ground (not done here).
However, the choke in the ground conductor is a problem. The microphone and amp inputs are referenced to AVCC, but the amp output is referenced to the external ground. The consequence surely must be that half the noise on (external) VCC (JP1 pin 1) appears at the analog output (JP1-pin 3).
And indeed, this circuit produces very noisy output, when used, for example, with an Arduino and an SD card module as a sound recorder. (SD cards are latter notorious for VCC noise while writing.) This is greatly improved by replacing FB1 with a short, and adding better filtering in place of FB2.
My question:
In general, is there ever an argument in favor of putting chokes in the ground network to create ground branches that have some high-frequency isolation? My inclination is that grounds should always be as low-impedance as possible, with due regard to current flow issues, return paths etc to avoid unwanted voltage drops (star ground considerations etc), and not deliberately partitioned with chokes. But I've seen the addition of chokes to ground branches enough to wonder whether there is some argument in favor.
AI: That's old practice.
PCB paritioning does not mean what you think it means. Partitioning means to separate components to different regions of the same single continuous ground plane so return currents of a noisy section don't flow under a sensitive section. Partioning components is better than splitting the ground plane (which is what your schematic is doing is called). It's really easy to make things worse by splitting than if you just did nothing in particular.
|
H: Can you use an op-amp like this to detect current?
For a model train track, I'd like a simple circuit which can detect current. In the past, I used an opto-coupler in combination with 2 diodes. A current flowing through these diodes would cause a voltage drop of 1.4 V over the opto-coupler. This was enough to steer the opto-coupler open. The 1.4 V voltage drop was a problem, because it lets trains make a noticeable jump in speed. So I am looking for a replacement.
There are other methods to detect current, but most of them are relative large circuits with too many components.
So I drew this experimental circuit. The idea is that a very small current flowing through a 0.2 Ω resistor, would create a voltage over the op-amp, causing it to drive the LED when this voltage is positive. I am aware that the voltage would be negative 50% of the time. But an Arduino can filter the signal further.
So my question is: Will this circuit work? Is the connection between the 0 V and 16 V supply needed? Or would it work without it as well?
AI: Seems simple, but you should be concerned about some points:
any intermittent contact in the rails could generate high voltage, caused by motor inductance, which I sincerely don't know how it would be managed in a scaled model train and its rails.
depending of current needed by train’s motor, voltage drop in 0R2 might be too small (still ok) but might be above 0.4Vpeak, if any current exceeds 2A. In this case, an OpAmp as LM358, according to the datasheet, would withstand Input Voltages from -0.3V to +28V.
So in the above scenario, the input side of LM358 is NOT protected.
Suggestions:
1 - I would suggest adding in parallel to your 0R2 sensing resistor another 2 Schotkky diodes (as 1N5817, 18 or 19) in anti-parallel to limit the maximum voltage drop to +/- 0.3V (up to 1A) or +/- 0.6V (up to 5A for 100cycles > 1s).
2 - Then, using a voltage divider of R1= 10K (between 0R2 sensing and +input) and R2= 2K2 (between +input and Ground), would further limit Negative Voltages (< 0.3V) and Positive ones to never apply input voltage above Vsupply = 5V.
3 - Output LED will be powered in the “rectified” sensed AC. In case its flicker in the optocoupler might not be OK, adding almost any diode + electrolytic capacitor, between OpAmp and output resistor will solve that flicker. Oversizing the capacitor might even stretch the pulse duration, if also desired.
With such output, you could even drive the base of any medium power transistor as TIP31 to drive lamps, solenoids or relays directly (reminding to use a diode to absorb inductance’s voltage spike).
Summary:
I would give a try in your idea using an LM358, but protected by 2 diodes and a voltage divider. Any LED + resistor at the output will give you optical feedback of its functionality, where the output could then be used to further drive any desired load.
|
H: How to connect unused MOSFET from Dual N-channel MOSFET?
This question may be stupid but how should I connect an unused FET in a dual-channel MOSFET ?
I using this one multiple times on my board but in one case I'm using only one MOSFET. I'd like to know how I should connect the unused one ? I guess I should connect the gate to the source (through a resistor) but what about the source pin ?
AI: Assuming you can't switch to a single MOSFET package which would probably be cheaper, you can simply terminate the pins.
Three options:
If the source of the MOSFET you are using is grounded, then connect all three pins (Gate/Source/Drain) to ground (or even just gate and source). No need for any resistors.
If the source of the other MOSFET is not grounded, connect the gate and source of the unused MOSFET both directly to the source of the used MOSFET. Again, no resistor required.
Leave the pins floating, but with gate and source tied together.
There isn't much danger of anything conducting, as the circuit is not like digital inputs whereby you might get shoot through currents from floating inputs. Though keeping the gate and source tied together is no bad thing.
|
H: TPA0253: Help Understanding Mono Output
I'm working on implementing an audio amplifier into a circuit design, and I am trying to understand the output configuration for the speaker using the TPA0253. I will be using a 8 ohm, 1W speaker for my design. For my project, I plan on using only a mono speaker with the input being stereo. So I chose this IC because I wanted something that would easily convert stereo to mono.
From what I understand, the output to the speaker uses a highpass filter. If I was to use a single speaker without a headphone connection, how would I draw the schematic, and would I need a highpass filter on both the mono+ and mono- pins?
AI: If I was to use a single speaker without a headphone connection, how
would I draw the schematic
Page 2 of the data sheet above shows you how to do this (see above).
Or if you want to use your schematic look for the nodes Lo/Mo- and Ro/Mo+ and connect the node called STEREO/MONO to Vdd via 100 kohm.
|
H: CNY70 from 5V to 3.3V
I have CNY70 connected this way:
And I need to determine the value of R2 for OUT to be from 0V to 3.3V.
I don't know how to calculate it, please help.
EDIT: Input is the 5V and output goes to microcontroller similar to Arduino, but its inputs can't take Voltage higher than 3.3V. So I need to get the output to 0V - 3.3V. I am sorry for being misleading.
EDIT 2: It goes into one of the microcontroller's analog inputs. Not the power supply.
Thank You!
AI: You cannot do it by modifying the value of R2.
You can add a series 510\$\Omega\$ resistor between the +5 and the reflective sensor collector.
|
H: Solar-powered DC motor for mini fountain
I'm working on a small water fountain that's powered by solar panels, and I would love some help identifying a root cause for a water pump dying. This is my build so far:
Water pump
Solar panels
I have 4x 6V-100mA solar panels in parallel, so I can generate 6V at 400mA. Under full sun, the panels's voltage is around ~7V and under this voltage, the pump draws 240mA (it is rated for 220mA)
I get 3h of direct sunlight every day so the pump will turn on, and turn off 3h later
My first run was great, but the pump died after 3 days of usage.
I identified several possible causes:
running at 17% above the rated voltage (I didn't expect this was going to be such a problem as I'm used to 1.25 safety rating)
low quality pump (I found a very similar model on Amazon that recommended to use them for experimentation only)
Turning on and off every day, beeing worse than running continuously
[not the case] dry run burn out (the pump never worked under dry conditions
I've ordered a better pump that should be more suitable for this usage, but the size is starting to be an issue. Any thoughts on what's the most likely reason for the pump dying in the first place? (if there is hope that such fountain can run on small pumps like that one, it is great as it can fit many other projects)
Bonus question: as the light increases slowly, the pump starts drawing high current while not running as it hasn't reached its starting conditions. How much of an issue is that?
AI: The Bonus question is almost certainly the culprit. Under that condition, it is essentially the same as when the motor is stalled, or locked rotor condition. When a motor is not spinning it does not generate any back EMF and so will act as a short. The only current limit is in the DC resistance of the wire and/or the current limit of you source.
This condition creates a lot of heat, and can/will melt the insulation on the wire (even magnet wire insulation). The other thing it can do is heat up the bearing or bushing for the rotor, which once that deforms also kills the motor.
A solution to the above, would be to use some sort of circuit as @Chris Stratton is describing in the comments of the OP.
|
H: Reason of using diode between common mode choke legs
I'm investigating SMPS circuits. And I couldn't understand why there is a diode beetween common mode choke legs (I don't know exactly but it seems like signal diode) What is the main reason of using diode on there ?
Circuit guess
Bottom side
Full photo
AI: It is a gas discharge tube (GDT) in a glass package.
In some power supplies they are shunting one of the common mode choke coils, so this is not an unique design.
It makes somewhat sense that it seems to shunt high voltage transients so that they bypass the common mode choke neutral coil.
|
H: What determines the frequency of alternating current?
I am certain this question has been asked before but I search and cannot see anything just yet. I read most AC current is 60 cycles per second in the United States and some say 50 but that does not matter to the question.
I am thinking a typical electric generator belonging to a hydroelectric plant generating power. The generator has some value for the revolutions per second as the water produces mechanical motion to spin its rotor. As the rotor spins the polarity switches from positive negative and visa versa. Is it the case that this value is the same as the 60 cycles per second that feeds into my home?
The transformer I believe does not affect frequency so must the frequency produced at the generator match the value at the electric plug. It is such a precise value I have difficulty thinking it is the speed of the generator but I do not know so I ask.
AI: It's a market evolution, and partly a product of Edison's sour grapes in losing the DC vs. AC war with Westinghouse.
tl; dr version: 40 and lower flickered with lights, 50 was acceptable, 60 worked better with arc lights (flicker again), higher frequencies than those were less compatible with generators and induction motors, based on Tesla's work. So Westinghouse ultimately settled on 60Hz.
Edison, meanwhile, had a hand in AEG (Germany) choosing 50 as a way to create a separate (some would say, monopolistic) market in Europe. Edison was kind of a jerk that way.
More about all that here: https://www.quora.com/Why-is-60Hz-AC-used-in-America-What-are-the-advantages-and-disadvantages-of-using-60Hz
|
H: Understanding the 2N2222 transistor, Where is this voltage coming from
I was using Proteus to simulate NPN transistor then I saw this
Both Switches are open. Why I see 3.12 Volts
AI: I get the same result.
Ammeters go in series. Voltmeters in parallel. If you check properties of voltmeter, it is a 100M\$\Omega\$ in series with emitter. It is a simulation, not reality. The program has to come up with a number and 3.12V is it.
Make the following changes and your circuit will work.
You do not need two switches. Essential, as you have it wired, the 2N2222 is functioning as a switch. You need resistors on base and collector. I chose at random. And voltmeters go in parallel. Ammeters must be changed to mAmmeters.
|
H: Is EMI/EMC still a big concern for a PC case?
I've recently started looking into researching potential concerns when it comes to using a non-metal material for a custom PC case, specifically wood. I've seen people talk about heat, electrical grounding, and EMI.
I've found that the first two are not that big of a deal to worry too much about, but what I'm unsure of is the last one; EMI.
Some people have reported no detectable interference from their devices, while others have reported the opposite (one even said their power supply alone was at fault).
My knowledge on the topic is only second-hand from such reports (of which I'm not sure how much can still be applied to today, as technology improves over time), and it seems to me that some of the concern comes from the individual parts that a case with a full metal enclosure can simplify the solution for, though my question is:
Should there still be concern for proper EMC shielding in a PC case, especially when one is using parts from well-known reputable brands for their computer?
AI: First off PC's emit a large amount of EMI, even with the case properly grounded they can cause AM radio signals to be completely 'drowned out'. A PC has multiple clocks and DC DC converters with very large switching currents and emits radiation. If your a 'nice' person you'll use a properly grounded case that is made of metal or other shielding material.
If your selling PC's they should be FCC certified.
As far as building them yourself and as far the law is concerned is a grey area, technically a device sold in a residential area should have an FCC certification. But a computer you build yourself isn't sold as a complete unit and isn't subject to authorization by the FCC (which costs thousands of dollars). The FCC suggests that you use a well grounded case. If you did cause interference with someone else's radio bands, the FCC could order you to shut the device off or fix the problem.
A personal computer is a special type of digital device -- a computer
that is marketed for use in the home. Computers that are marketed
through retail outlets or through mail order catalogs, and
advertised to the general public, are considered to be
personal computers. In order to prevent the radio noise generated by
the digital device from interfering with radio communications, digital
devices must be designed to contain the noise. This is accomplished
by: 1) designing the digital circuitry in a manner that minimizes
radio noise emissions; 2) enclosing the circuitry in a well-grounded
case that prevents radio noise from escaping; and, 3) including a
well-filtered power supply that keeps the radio noise from leaking
onto the electrical power lines.
Source: UNDERSTANDING THE FCC REGULATIONSFOR COMPUTERS AND OTHER DIGITAL DEVICES Page 2
What happens if a digital device causes interference?
Digital devices that comply with the FCC technical standards and have
been certified and marketed in accordance with the FCC rules may not
cause interference and must accept any interference that they
receive. This means that the user of a personal computer may
be required to shut the computer off if it is found to be
causing interference to any authorized radio communications, such as
police, fire, TV or radio,even if the computer has been certified and
has an FCC ID tag on it to prove it. In the event that this happens,
the user will be allowed to resume use of the computer only after the
cause of the interference problem has been eliminated.
Source: UNDERSTANDING THE FCC REGULATIONSFOR COMPUTERS AND OTHER DIGITAL DEVICES Page 14
|
H: CNC feedback mechanism
The GRBL library for Arduino looks very comprehensive but I like to understand how things work before I try to build them. Something I don't understand is how these systems get positional feedback.
I know it is common to set a Z point for a given tool, but this is just an offset. As far as I can tell from my reading it all depends on a combination of timing and stepper motors successfully executing exactly as instructed. I find it hard to believe that nothing ever gets out of synch.
Is there some kind of ongoing reality check other than stop switches to prevent out of bound travel? How does it work?
How do they measure slop and backlash to compensate for them?
I can think of ways I might try to do it but I've never seen my imagined feedback systems on any "real" CNC machine, so I have to ask.
Thanks to Spiro for a fabulous answer, but it led to me finding this response to a request for closed loop support in the GRBL github issues. It's the position of the maintainers.
I think the general idea is to never run into the problem of losing position. The motors and drive system need to be robust enough to handle the cutting forces. For open loop control, like Grbl, this is mandatory. For closed loop, this is still pretty much mandatory. In my view, closed loop control only gives you the ability to catch the error. In a properly size CNC system, the errors willl be nonexistent or very rare.
Well... crumbs. How am I supposed to build a fancy machine that finds the crookedly mounted billet and figures out its own offset and rotation ?
My desire for feedback arises more from fears of belt stretch but as Spiro points out ball screws are a better answer. A really expensive better answer, but that's not Spiro's fault.
AI: Many hobby systems these days are completely open-loop. The controller sends pulses to stepper motors and the stepper motors move incrementally a certain number of steps. There are hybrid servos which pretend to be steppers as far as control signals go, but actually have feedback to shaft motion, so they are closed loop at least to some degree. With open-loop steppers it's possible to lose steps because commanded acceleration or speed is excessive for the conditions or if the torque required is too great. That generally results in a ruined part, because remaining motions take place from a position that is not where the cutter actually is located.
The machine is homed on the table, the workpiece is located with respect to the machine coordinate system (manually it can be done with and edge finder, for example) so the machine knows where 0,0,0 is on the workpiece. Big VMCs usually have a probe consisting of a ruby ball on a probe that can locate the workpiece from features that already exist (for example, finding the center of a bored hole).
Good CNC systems at least have ball screws which don't suffer from backlash because they are preloaded with more pressure than the motion will require. It's possible to do limited correction for backlash by always approaching a position from one direction, and that's what manual machinists will do. To get fully closed-loop feedback you need something like Heidenhain scales on the machine to give the motion controller real-time feedback and real servomotors. For that kind of system, the motion controller is a fairly powerful computer, something like a DSP and/or FPGA implementation.
If you're using GRBL, Mach 3, Linux CNC you'll probably use an edge finder, coaxial indicator etc. just like you would on a manual machine. For rougher work, you can home the table to switches and assume the workpiece is accurately enough located wrt the machine coordinate system. If you have a jig to locate the workpiece on the table that can be pretty good for series production.
|
H: Input voltage control by resistor, is this method is correct or not?
In my application I have a requirement to switch 40V to 5V with the help of a linear voltage regulator. My load circuit consumes approx 7 to 8 mA.
Due to the unavailability of any specific model of a linear voltage regulator, I am using 7805 for this purpose. But the input voltage limit of 7805 is 35V.
I already tried a voltage divider method put before 7805 to control the input voltage level, but that method has other issues because of the internal resistance of the 7805.
Here I applied one input resistor to control input voltage flow.
Circuit:
Now due to 7mA of load, and (2.2Kohm, 1-watt) resistor, the voltage drop of the resistor is (7/1000)*2200 = 15.4V.
The input voltage of 7805 is ( 40 - 15.4 ) = 24.6 V in this scenario which is less than the safe limit of 7805.
Is this solution is suitable for this type of application, or there is another efficient way to solve this kind of thing?
AI: Here I applied one Input resistor to control Input voltage flow.
This solution won't work if there's a possibility for the load to be disconnected or for its current to drop significantly because then the 7805 input will be subjected to ~40 V.
If you know the load will always be there and always draw at least 3 mA, then this is viable.
If you want to be safer about it, you could add a 30 or 35-V zener in parallel with C1.
or there is another efficient way to solve this kind of thing.
You could choose another regulator that allows more than 40 V on its input.
|
H: Why does wire not have large capacitive reactance?
For capacitive reactance, I am presented this formula:
$$X_C = -\frac{1}{2\pi fC} $$
Where clearly, the capacitive reactance is inversely proportional to the capacitance.
This confuses me.
We usually talk about capacitive reactance in relation to capacitors, which have a rather high capacitance. From this formula, I would expect their reactive capacitance to be small, and the reactive capacitance of elements with low capacitance to become very high. That is, a simple wire should always have a much higher reactive capacitance than a capacitor.
What am I getting wrong here? Does this formula only apply to the circuit-elements we define as capacitors? If so, what makes them so special that we can apply this formula to them, but not to other elements which also have a (very small) capacitance?
AI: The same formula applies. Wires have low capacitance to their surroundings so they have high Xc. Capacitors have high capacitance in comparison so they have low Xc. Thus the wires are a smaller AC load (less current flows) and capacitors are a larger AC load (more current flows).
It is no different from resistance, high resistance means small load and small current, low resistance means high load and high current.
|
H: How to instantiate module with variables
I declared alu_result as a reg because I need it to be a variable data type for my case statement. But when i do this, I cannot pass it my write_data in my datapath_tb module. Is there some work around where I can get this to work?
module alu(input [31:0] input1, input2, input [2:0] control);
parameter SIZE=32;
reg [31:0] alu_result;
reg overflow;
always @(*)
begin
case(control)
0: alu_result = input1 & input2;
1: alu_result = input1 | input2;
2: alu_result = input1 + input2;
3: alu_result = (input1 < input2)?1'b1:1'b0; //unsigned, no additional bits to worry about
4: alu_result = input1 ^ input2;
5: alu_result = ~(input1 | input2);
6: alu_result = input1 - input2;
7: alu_result = (~(input1 + 1) < input2)?1'b1:1'b0; //2's comp is ~ & +1
default: alu_result = input1 & input2;
endcase
if(alu_result > 32'hFFFFFFFF)
begin
overflow <= alu_result;
end
end
endmodule // alu
module datapath_tb();
parameter SIZE = 32;
reg clk;
reg write;
reg [4:0] write_addr;
reg [31:0] write_data;
reg [4:0] read_addr1;
reg [4:0] read_addr2;
wire [31:0] read_data1;
wire [31:0] read_data2;
// Instantiate the register file
Register rf_1 (.clk(clk), .write_en(write), .write_addr(write_addr), .write_data(write_data), .read_addr1(read_addr1), .read_addr2(read_addr2), .read_data1(read_data1), .read_data2(read_data2));
// Instantiate the ALU
alu #(SIZE) alu_1 (.input1(read_data1), .input2(read_data2), .alu_result(write_data)); //Line in question
// Create a clocking signal
always begin
# 10;
clk = 1;
# 10;
clk = 0;
end
initial begin
// Write DIGIT0 into register 0
// Write DIGIT1 into register 1
end
endmodule
AI: Declare your module ports as:
module alu #(parameter SIZE=32) (input wire [SIZE-1:0] input1, input2,
wire [2:0] control,
output reg [SIZE-1:0] alu_result,
reg overflow );
|
H: Need assistance to understand Power and Ohm's Law
Hello I'm looking at a light bar on a vehicle and the specifications say it draws 7.5A at 9-32V and the light bar says it has 36 x 5 Watt LED lights which would make a total of 180 Watts that this device uses is this correct?. My confusion is how can it draw a constant 7.5A at each voltage between 9-32V? If the voltage increase how does affect energy used over time if the current is still flowing to the device at the same speed? and if is powered by 32V at 7.5A this would be a total of 240A which is too much for the device. Would the internal resistance be changing to keep a constant current of 7.5A?
Thank you
AI: The light bar you described seems like it could be using an internal regulator to actually power the lights. It's possible that this has a maximum output power rating regardless of what you provide to the light bar. This regulator will take the 9-32V input and convert it to potentially a 12 / 24V rail that is actually powering the LEDS.
If you could share a link to what LED bar was used that might help us explain what's happening.
Just to clear up your maths and question about Ohm's law, with the provided information you have said that the Light Bar states Max current of 7.5A and an operational voltage range from 9-32V.
The image below shows the equations you should be using to calculate this, to calculate power with the values you have you should do I X V = P. If you want to work out the max current we should do P / V = I. Knowing this we can
Knowing this we can calculate all possible combinations, as shown below,
Assuming the 7.5A limit is used across all voltages you will be current limited at any voltage below 24V meaning the maximum power output would drop as shown.
From my calculations you can see that the Current rating provided lines up perfectly with the 24V @ 7.5A = 180W so it's likely the numbers you are reading are referenced to a 24V supply. This is also quite a common supply rail for LED's so that seems to make sense.
|
H: DIY colpitts oscillator not oscillating
I am trying to make a FM transmitter. For the oscillator part I picked a colpitts oscillator as it seemed relatively simple and I could get the pretty high frequency needed for FM with it. I built the Oscillator on a breadboard but unfortunately nothing I tried got it working. I was thinking would it be possible that the inductance of the wires was effecting it?
I simulated the circuit on "LT spice" and it worked. I also made a lower frequency version of it on my breadboard and it worked also, so I'm not too sure whats going on
This is an imagine of the circuit diagram that I drew up.
Thank you
AI: Breadboard is likely to have higher parasitic capacitance between tracks than either of your filter capacitors (10 pF and 5 pF) - this means trouble
The 100 uH inductor is quite possibly self-resonating below the frequency you are aiming for and this means you won't get sustained oscillations.
For both of the above try lowering the inductor value (L1) by ten (or more) and increasing C2 and C6 by ten (or more).
L3 at 1 uH should be significantly higher than L1 for proper operation.
Choose inductors that have a self resonant frequency (SRF) above the desired oscillation frequency. If the data sheet for an inductor doesn't mention SRF, don't use that inductor.
One last point - the values you have in your schematic are for running at around 8.7 MHz - is this what you intended? I point this out because an FM receiver runs at 88 to 108 MHz.
|
H: Does the value of the voltmeter change after closing the circuit?
At the start the voltmeter reads a specific value (I guess it is the value of the voltage of R2, right?)
Question:
If circuit closes, what value does the voltmeter read?
My answer is: It does not change!
Is my argumentation correct?
AI: is my argumentation correct?
No.
This assumes the voltmeter has infinite input impedance: -
When the switch is open, the voltmeter reads the voltage across R1.
R3 is irrelevant in this situation and might as well be a short circuit.
When the switch is closed, the voltmeter reads the voltage across R2
|
H: How to wire this pogo pin header strip
manufacturer number (Mill-Max): 855-22-010-10-001101 datasheet (2x5 pins)
Can I directly solder something to the bottom pins ? The manufacturer has some solutions but it requires expensiv tools which I don't want to buy. What could be a good solution ?
AI: Yes you can solder to the .016 DIA side of the connector no problem, this part is meant to be inserted into a Plated (Non-plated would work too) Through Hole PCB slot then soldered.
I'm not sure what the Manufacturer solution would be other than a development breakout PCB?
|
H: Need help to understand inductor based non-isolated offline buck converter
Here ADGJ IC is used in offline buck topology.
Can anyone share the schematic of it.
Picture taken from sonoff mini and shelly1 board is attached below
AI: The circuit appears to be based on the MPS MP17x family of offline non isolated power supplies with versions rated at from 60 mA to 600 mA output.
While these ICs are useful, it must be noted that
THE CIRCUIT IS LETHALLY DANGEROUS at all times.
The output is not isolated from AC mains and ALL parts of the circuit should be regarded as being at mains potential at all times.
These devices are only suitable for applications where ALL parts of the circuit and anything powered by it is provided with mains grade insulation and isolation.
IF L & N inputs are swapped (as happens) then Output GND will be hard connected to Live and Vout will be at mains live less a few volts DC.
Here are links to a family of related datasheets.
Here is the product page for the MP173 with up to 280 mA output. The circuit below from that page should be familiar.
MP173 data sheet here
Cicuit provided by @TheMastermind
|
H: How a little extra current can affect a motor
I want to run a 12V, 19 watts DC motor. Which should use 1.5amp of current. Now, I have a 12v DC, 2 amp power supply adapter. How it will affect the motor in the long term. Will it burn the motor for this little extra current?
AI: When running at its rated speed, the motor will draw just as much current as it needs to. The supply will not attempt to force more current into it.
However, a current limited supply could make a difference on startup, and on overload.
Assuming the motor is a permanent magnet brushed DC motor, then its stall current will typically be up to an order of magnitude more than its rated current. When switched on at rest, it will attempt to draw the stall current. Connected to a car battery, your motor will be able to draw that current, and so will accelerate very rapidly.
If the motor is connected to a current limited power supply, then what happens will be determined by how the supply behaves when it's overloaded. Some power supplies will simply current limit, and your motor will accelerate slowly up to rated speed. Some power supplies will shut down and restart again after a short delay. If the delay is short enough, it might burp up to speed. If it's a long delay, it may just repeatedly kick. Some supplies can shutdown and refuse to restart until the load is removed.
If you stall or overload the motor in use (in misuse), the same will apply. Having a limited current supply rated not too much about your rated current will protect the motor somewhat from overheating.
If the supply 2 A current limitation is not determined by some protection kicking in, but by how much it can supply without getting hot, then things are a little different. On startup, your supply is likely to be able to supply more than the rated 2 A for a short while, so your motor will come up to speed fairly quickly. If you overload it though, then you're likely to cook both your motor and your supply.
|
H: Pinning convention for Panasonic P5KS connectors AXK5S24047YG and AXK6S24447YG
I am making KiCAD libraries for this connector pair. What is the standard pin number convention for such connectors ? What is the first pin ? The datasheet by Panasonic does not tell much on pin numbers.
AI: The 'First' pin is not really a standardised thing for connectors like this. In my experience this would come down to your workplace’s general design conventions.
For example, my workplace would pick based on the top down view of the PCB side Connector (All connectors of the same type would be mounted in the same orientation if possible). We would select the left connector on the chamfered side and indicated it with a white rectangle on the Silk screen around the pad Pin '1' as shown below,
Panasonic would not tell its customers what pin is 1 on a part like this as different companies have their own design rules they like to follow.
|
H: How do VA and W ratings of UPS supplies compare with mAh ratings for power banks?
I'm trying to figure out how to power a few devices during power outages. I've looked into UPS devices and also portable phone power banks. My biggest problem is how to compare the devices, apples-to-apples. The UPS we're looking at claims to provide 600VA/330w, and it has only 120V (AC) outlets. The power bank claims it provides 20,000 mAh. It has both USB ports and a 120V (AC) output. How do I evaluate how long each device will last? It would be helpful to know how to convert VA or W from the UPS and mAh from the power bank in like terms.
We have two devices to power. First, we'd like to be able to charge a Moto e4plus phone. The battery itself is rated to 5,000 mAh. It charges through USB, and as far as I can tell it draws 1.9A while it charges at 5v. A full charge takes 2-3 hours.
The second device is our cable modem. The modem is a Technicolor TC8305C. The modem plugs in to the AC mains and the label says it draws 1.2A. The modem itself does have the capability to use its own battery for reserve power. We don't have one, but I've attached a picture of one. Perhaps that might give a clearer picture of what DC power it actually consumes.
Thank you!
AI: To make an "apples to apples" comparison, you'd need the capacity rating for both devices in watt hours.
What you have is VA for one device and mAh for the other.
VA (volt amperes) and watts are a power rating.
mAh (milliampere hours) is (sort of) an energy rating.
The unit "watt" doesn't have time factored into it. Energy always has time factored into it.
You can't compare the two ratings without more information than you've given.
A UPS will often have a power rating and a time rating (600 VA for 10 minutes, for example.)
The powerbank rating is usually the capacity of the battery rather than a rating that directly tells you how much energy you can get out of it for how long.
Energy is the product of voltage, current, and time.
Your power bank gives you the product of current and time for the battery discharge, but doesn't give you the voltage of the battery.
The UPS gives you the product of voltage and current for the output, but no time.
You cannot calculate the available energy from either one, and are missing different bits of information you would need.
You can't really make a valid comparison of the two from the information you are given. It's like comparing an apple core and an orange skin. Does not compute.
I'd find a UPS that gives you the VA rating and a runtime. From that you can estimate how long your devices will run.
Multiply VA by the time in minutes. Call that E.
Multiply the volts and current for each device to get a VA rating for it. Add up the VA ratings for all of your devices. Call that P.
E divided by P will give you an estimated runtime in minutes that you can expect from the UPS. It will be somewhat pessimistic because the VA ratings for the devices will be the maximum rather than average values.
|
H: Servo motors: does neutral position imply a 50% PWM duty cycle?
I'm working on a project using a Savox SB-2290SG servo motor. The datasheet I received is only 3 pages long, and includes limited information on the control interface. I've posted the relevant datasheet snippet below.
While the datasheet does list the acceptable range of pulse widths, it never mentions the overall duty cycle or PWM frequency. For example, if I want to command this servo into the neutral position, I know I need a pulse of 1500 microseconds, but how long should I wait between pulses? Another 1500 microseconds? 3000 microseconds? 10,000 microseconds? It doesn't appear that that PWM wave I need is fully defined by this datasheet.
Does 'neutral position' imply a 50% duty cycle? Is the datasheet missing key information? Or am I misunderstanding something about how to control servo motors?
Update: I reached out to the manufacturer, and they informed me that they use a 333 Hz frequency during their testing.
AI: Does 'neutral position' imply a 50% duty cycle?
No. The RC servo standard is not duty cycle despite being called PWM. It is the actual time length of the pulse and not its duty cycle that they care about. 1.5ms is center. 1 and 2ms are the extremes.
That's what this says:
Most servos expect a pulse at least every 20ms (50Hz). For analog servos, the pulse is not remembered and is directly used to drive the servo. The motor is only moved whenever the pulse comes in so this directly affects response and torque. Too low a frequency and analog servo will be sloppy and weak. Too high and it overheats.
Digital servos can remember the pulse and independently update the motor at a different frequency so the possibility exists that they will work with frequencies lower than 50Hz until it becomes so low the servo thinks the signal has been lost and goes into fail-safe. Some digital servos can handle as high as 333Hz. I expect yours can handle 333Hz. This was not listed.
|
H: Raspberry Pi, SSR, Solenoid Valve Power (Multiplexing?)
Background
I have a RaspberryPi-controlled irrigation sprinkler system that I am working on. I would like the RaspberryPi and the Solenoid Valve (when the Solid State Relay is closed) to pull power from the same source. I would like to verify I have calculated the correct resistance in the diagram that results in a 5V supply to the RaspberryPi (and that all other connections look ok).
Method
The Pi and SSR are in parallel thus both subject to the same 120VAC
A Pi normally draws 2.5A using 5V resulting in an effective resistance of 2.04 Ohms (V=IR)
Treating the Pi loop as a series circuit, I can get the current across the resistor R by obtaining R_eff=R+2.04 and I=V/R_eff
I must then find the voltage drop across the resistor R that results in 5V supplied to the Pi: 5V=120-dV_R which is the same as dV_R=120-5V=115V
I know how have:
dV_R=115V
and
I=120/(R+2.04)
and
dV_R=I*R
Solving these equations results in R=46.92 Ohms
Did I do all of this correctly?
Components
Solenoid Valve
SSR
Raspberry Pi Model 3 B+
Another Thought
If the 120VAC power is coming through 12-14AWG wire, what is the best way to "connect" that to the resistor that meets the Pi power supply? That is, on paper these connections look fine to me but in practice, how would you do this?
AI: The raspberry Pi cannot be connected through a resistor to AC mains. One because it is AC, and the Pi requires DC. Secondly, because it is not safe (AC mains should be isolated). Thirdly, because there is no regulation.
By regulation, the Pi is a variable power load, the 2.5A is a max spec, so sometimes it might need less than 2.5A. Lets say it needs 1A then you would need a 115V/1A = 115Ω resistor (or if you had a fixed resistor of 46Ω then it would only drop 55V and the pi would be exposed to more than 60V which would fry it)
You need a 120V AC to 5V DC power supply
|
H: Low Pass Filter to Isolate DC component
I have a question based on low pass filtering. If I input a signal to this low pass filter, why does the output file have an AC (of very low frequency).
The input signal is$$ v_i(t) = 2 + sin(2*pi*100Mhz*t)$$ According to the filter response, the $$ sin(100Mhz*t) $$ should be attenuated by a very large number, thus resulting in a coefficient << 0 and leaving the DC component of 2 left. The output however is $$ v_o = 2 + sin(2*pi*0.1t) $$
Where does that AC signal come from?
AI: Where does that AC signal come from?
The AC signal comes from the source, a passive linear filter can only change the amplitude and the phase, it cannot change the frequency of the waveform that it is filtering.
So the AC diagram shows the amplitude for all frequencies, and the chart below (in the OP) shows the output for one frequency.
|
H: Capacitive Switch To Distinguish Between Metal and Plastic
I have an application where a rotating plastic wheel has ferromagnetic inserts on the circumference of the plastic wheel (they don't stick out). Shown below in the picture is the plastic wheel (black) with ferromagnetic inserts (red). This could be accomplished with a hall-effect edge detection sensor like the Allegro ATS616LSGTN-T but I don't want to use it because the magnet in this sensor will cause drag (due to the reluctance effect); this is my only reason for wanting to avoid using hall-effect sensors.
I am wondering if it would be possible to create a capacitive switching sensor to distinguish between plastic and metal given the wheel is rotating around 3500 rpm.
AI: I am wondering if it would be possible to create a capacitive
switching sensor to distinguish between plastic and metal given the
wheel is rotating around 3500 rpm
That's about 58 revs per second and, you might be able to do it with this: -
I believe you can get prototype boards to do some testing and if it works you can move on to a high speed sensing machine if you do require a higher sample rate. I've designed and built capacitive probes and sensor circuits that are good for a bandwidth of nearly 100 kHz so it's certainly possible with the sort of resolution as seen by the TI chips set above.
But, possibly a simpler way is to use the ferromagnetic properties of the inserts and build a mini metal detector that runs at (say) 100 to 300 kHz. It would be a low power AC excitation so it won't disturb the inertia of the rotating wheel.
Or just buy an optical sensor and paint a stripe on the wheel. These are very effective and can work at a distance of several cm. Again I've used these when testing rotating electronics on a spin-rig running at several tens of thousands of RPM.
|
H: Understanding Solid state relay specifications
I've been looking for a solid state relay that can switch 240V from a 3.3V signal.
Looking at DigiKey, with a very large selection, I'm not sure how to filter my search (screenshot attached). How do I interpret the "Voltage Input" and "Voltage Load" criteria compared to the coil and switching voltage for regular relay ? (screenshot attached)
The names seem pretty self explanatory but I'm surprised there aren't any 3V DC controlled SSRs - hence the uncertainty
AI: 3-32 is a very common input range, which means it will work with 3.3V drive.
If I search on "In stock", output type: AC, AC-DC or AC zero cross, and all with minimum input voltage up to 3V, and "output current" min 5A max 35A I get 122 results.
|
H: Error in the minimum value of the operational amplifier output
I designed a circuit to control the speed of a 24V coller. For this I used the operational amplifier TCA0372DW.
As I am going to control the output voltage through a PWM signal that comes from the STM32, it was necessary to create an RC filter to convert the PWM signal into analog.
0% duty cycle = 0V
50% duty cycle = 1.65V
100% duty cycle = 3.3V
I determined the gain of the amplifier as follows: Vo / Vi = (R30 / R27) +1
With that I have a gain of approximately 7.3.
Theoretically for:
Vi = 0V ------ Vo = 0V
Vi = 1.65V ------ Vo = 12.045
Vo = 3.3V ------ Vo = 24.09
But this is not happening for input voltages near 0V. With the minimum input value I have at the 4V output and this affects the functioning of my system.
I know that there is a saturation in the amplifier that makes it never reach the maximum value of 24V. But I couldn't understand why for values close to 0V the output remains at 4V.
AI: Page 3 of the spec sheet indicates that the output swing of that part is 1.3V to 22.7V nominal. If you want it to go all the way to the rail, you need a rail-to-rail part or a negative supply.
Your first stage is probably pegged at somewhere around 0.6V (it's allowed to perform better than the spec). The factor of 7 gain in the second stage brings it up to around 4V.
|
H: I2C Bus With Conflicting Pullups
I am attempting to set up an I2C bus off of a Raspberry Pi that will have two slave devices. One of these devices already has built in pullup resistors, but the other does not. Is there any way to run them both on a single bus? Can I add a pullup resistor to the bus and expect them both to work? Or is this maybe something I can only figure out through testing?
AI: Usually the I2C bus requires only two pull-ups, on SCLK and on SDA. If one of your devices has those pull-ups, then it may be just enough. You can look into RPi GPIO datasheet to see how much current it can sink (as well devices datasheet), therefore having two slave devices, each with its own pull-ups is not a good idea - the overall resistance can become too low, thus the bus current over max. allowable.
|
H: Can we or should we parallel H-bridge module for increse current?
Can we parallel H-bridge input and output for increse current?
For specific I select 2 case
L298N (BJT based)
TB6612FNG (Mosfet based)
For L298N as shown in datasheet suggested to parallel chanel to increse current.
For TB6612FNG It have designed dead time.
If we can or we already did it.
The question are
How to ensure it will not short-circuit between chanel?
What about load sharing? if to chanel not share load equally, that means maximun current not twice value of 1 chanel.
AI: If this is about parallel controlled IC's it may not work unless there is a way to synchronize them. If the datasheets do not specify being able to sync with other IC's then you cannot do so.
Individual MOSFETs with same part number, and hopefully same batch number will track each other very well. If there is a source resistor used to sense current all parallel MOSFETs need to use the same current sensor. Internally a MOSFET is an array of parallel transistors used to build up the current rating, so parallel MOSFETs share loading very well.
As for preventing "shoot-through" the PWM controller and design topology help insure there is dead-time so that 1 MOSFET is switched OFF before the other MOSFET is turned ON.
|
H: Is it possible that the line frequency can change along the distribution network?
We use single-phase 220-230V~/50Hz here in Turkey. The line frequency may vary ±5%.
One of my colleagues told me that he measured the line frequency in a factory (probably a customer's factory that we sold electricity meters) as 70Hz.
I have nearly basic knowledge of electricity generators and distribution networks, but I think most of them could have identical (or nearly identical) specifications/properties. I know the line voltage can jump up to 240V or even 250V. But, how can the line frequency change? What can cause this?
AI: It’s not possible to tie different AC grids together unless they’re synchronized both in frequency and in phase.
Perhaps your friend is measuring a feed in his factory that has some harmonics on it kicked back from equipment? Or, they’re on a stand-alone system.
|
H: How does one use a transistor connected in either series or parallel with the load in a linear regulated power supply?
Let's say using a transformer and a rectifier to bring the voltage supply to roughly 18 DC (little voltage ripple which solved by using polarised capacitors) and I use a LM7812 regulator to bring down the capactior to 12V DC
How would I incoparted a high power transistor connected in either series/parallel with the load in a linear regulated power supply?
Edit: I want to be able to design a linear regulated power supply but with a bjt near the load, I'm on the basics of understanding electrical engineering and it's a requirement for my project however I'm not sure how to incorporate the transistor onto the linear regulated power supply. since the purpose of a transistor is to amplifer the current, would that impact the amount of voltage towards the end? My goal is to design a LRPS with a transistor. therefore I want to accomplish a goal to have such design to be able to supply electrical power to a load
AI: Your question relates to two types of regulator circuits - 'Series' and 'Shunt'.
In a series regulator circuit the load voltage would be maintained by dropping the excess voltage across the series transistor.
In a shunt regulator circuit the load voltage and that maintained across the shunt transistor would be one and the same.
Generally, series and shunt regulators, available in 3 terminal packages, would be adequate for the required load current.
Otherwise additional external transistors would be required.
|
H: Calculating ESR of a capacitor
Here is what I used for calculating ESR:
Here is a random datasheet which gives the ESR under certain conditions:
Suppose I want to calculate the ESR @ 100 kHz for the 220 µF capacitor:
I apply the following equation:
$$
\mathrm{
ESR = \frac{0.1}{2*PI*100^{3}*220*10^{-6}}
}
$$
Which is not equal at 0.18 Ohm which is given in the datasheet.
Where is my error?
We actually do not know at which frequency the dissipation factor is given, but I supposed that it is given for 100kHz.
AI: Suppose I want to calculate the ESR @ 100 kHz for the 220 µF capacitor :
You can't just use the \$\mathrm{tan\delta}\$ value, which is mostly given for 120Hz in the datasheets, for calculating ESR at 100kHz. Because, as it's described in the calculation method, the equivalent series inductance, L, is neglected at frequencies up to 1kHz.
ESR values given in the datasheets are not calculated values. They are measured at the factory/production. And the measurements include the effect of L and r. That's why your calculations and the datasheet values don't match.
|
H: Op-Amp output inconsistent with theory
I was just playing around with a few Op-Amp circuits, and suddenly got stuck on this simple one.
As the circuit shows, the Op-Amp output is connected to its non-inverting input terminal, so it should NOT act as a voltage buffer. However, as my image shows, its a different story (simulated with NI Multisim 14.0, however I got same results using EveryCircuit) We have virtual short. Output is 5V.
I expected -15V (Inverting input terminal would rise, differential voltage would go -ve, output would rush to -ve rail, and differential voltage still stays -ve).
I also cannot understand the output frequency of 50kHz. Why would it oscillate with such a small peak-to-peak voltage? I can't justify this observation. Is this a problem with the simulation software?
AI: No - it is not a problem of simulation software. Surprisingly, the result is correct - but not realistic. What does this mean?
Theoretically, the result would be correct under two environmental conditions:
No power switch-on transients (power available since (t-infinity))
No external disturbances (noise, etc).
During simulation, the program automatically assumes these two conditions - unless you specify other conditions.
However, if you would switch-on both (or one) supply voltage at t=0, a transient analysis would reveal that the circuit is saturated due to positive feedback.
The situation can be compared with a mechanical model: A system of two balls - one lying upon the other one - could be stable as long as there is absolutely no external disturbance. But this is NEVER the case. The same applies to the real opamp usage: Power switch-on transients, supply voltage is not absolutely constant, noise,...)
I think, in 99.9% of all cases, the simulator does not fail but the user (misinterpretation of the results)
Comment: But there are two indications that the simulation result is "problematic" (not wrong, because the simulator was correct) and should be investigated in detail (under real conditions):
In your simulation, the output is positive - even with an input at the inv. node.
An AC analysis would show a rising phase function (which is also not realistic).
|
H: Schottky diode failure
TLDR:
What are possible failure sources for a schottky diode? Overheating, overvoltage, overcurrent (leading to overheating) anything else?
Long version
I am currently measuring our new prototype device. It works fine, does not draw more current than expected and stays relatively cool (hottest point on the PCB is 50°C at the buck converter.)
In front of the buck I have a schottky diode for reverse voltage protection:
I left the device running for some minutes, current draw on the 3V3 rail was below 500mA, 24V current must have been below 100mA. Then I saw a small lightning, like ESD, and the device stopped working (no current draw).
On closer investigation I found a small hole in the middle of the schottky diode package, and the diode was open circuit.
I would rule out ESD, as the device was lying on the desktop and nothing touched it. The device was powered by a lab power supply. Any ideas why the component failed?
AI: Any ideas why the component failed?
The maximum repetitive peak forward current for the BAT54J is specified as 300 mA in the data sheet. Take note: -
Simple math about the converter
To achieve 3.3 volts on the output of the buck converter requires a duty cycle of about 0.1375 assuming the converter operated in CCM. In other words: -
$$\text{Duty} = \dfrac{3.3\text{ volts}}{24\text{ volts}} = 0.1375$$
If the load was 500 mA, the power out would be 1.65 watts and that power has to be passed through the diode from the 24 volt rail in 13.75% of the time.
So, the average current from the 24 volt rail is 1.65 watts ÷ 24 volts = 69 mA but, given that this average is delivered in only 13.75% of the time, the peak current would be: -
$$\dfrac{69 \text{ mA}}{0.1375} = 502\text{ mA}$$
And this exceeds to peak stated in the data sheet.
Just rough and ready calculations of course.
A proper estimation would need more information such as: -
The duty cycle of the buck converter because if it's working in DCM the current peak demanded by the converter may be several times that estimated if the duty is significantly smaller.
The ESR and ESL of the 10 uF capacitor (it could be a show-stopper). Cheap capacitors are not going to be cost effective in this part of the circuit and can vastly increase the diode current.
More information about the CM choke for instance, what self-resonant frequency it has and how closely coupled the windings are. This can also be a show-stopper.
|
H: Is charger with USB C connector and 13V output in line with standards?
I have bought cordless rotary tool. The charger which is included in the package is equipped with USB-C connetor, and the charger has rated output at 13V @ 1.5A.
Is this "legal" according to USB specification? This does not seem to be a smart charge so I think it cannot vary it's output according to the downstream device preference.
Am I correct that this charger would damage an USB-C device (tablet, phone, earphones, ...) which would be expecting 5V and only then negotiate higher voltage according to USB-C PD standard?
AI: 13V is a very unusual voltage for a USB charger. The only way to achieve it within the USB standard is to implement USB Power Delivery 3.0 plus PPS (Programmable Power Supply), which allows to change the voltage in small increment. Even then, the maximum voltage would either be 12V or 20V.
This charger could still be safe if:
It initially delivers 5V only.
Detects that it is connected to this specific tool and then increases the voltage.
However, I've seen web pages stating that it constantly delivers 13.2V. With a multimeter, you should be able to verify this claim.
If it is true, then this charger is very dangerous for all USB hosts and devices with a USB-C port. Watch out.
|
H: Essential parts of a USB connector, stripping to bare bones
I have a very specific question.
I want to create a very thin storage device solution.
A picture is worth a thousands words so here you can see the hardware I have:
This is the image of a USB pen drive without the outer casing.
Now, I am very happy with the circuit board, NAND chip etc. in terms of performance and thickness.
However the USB connector is 12mmx11mmx4mm much too thick. Pretty much a deal-breaker.
When I peer into the USB connector hole, I see 4 golden strips.
Can I remove the outer casing for the USB connector and simply keep the four golden strips and still connect functionally to USB ports, or does the outer casing of the connector(with two holes on top and two on the bottom) contain some crucial components for I/O?
Finally, can I find a very thin port for this USB flash device so that the whole structure will be less than 0.5-1mm thick?
Structure:
USB circuit board -- USB connector -- USB port -- cable
As you see, both the first part and the last part are thin enough,I am trying to reduce thickness on the intermediate parts.
AI: This has already been done. This is the basically the smallest you will get a USB Type A dongle,
You can get smaller Security dongles (Not storage ones) without the shielding like these,
We may start to see smaller Type C USB dongles in the next few years, but I struggle to see why anyone would want this?
EDIT - Okay so these actually exist for authentication,
|
H: Are FPGAs for experimentation alone?
I have been reading about FPGAs recently and found that they have a lot of applications in many fields. I also read an article that they are used for testing purposes alone. Are FPGAs only for that? Also please tell me the disadvantages of the FPGAs compared to the ASICs. Are FPGAs slowly being used more in many fields like military, space, image processing etc? Are they very useful compared to the ASICs?
AI: I also read an article that they are used for testing purposes alone.
That is so ridiculous that I think you misunderstood the article. FPGAs are used for various applications, including data processing in specialized applications, and as glue logic in low volume applications where developing a fixed function ASIC would not be viable. Open up all kinds of electronic equipment and you will find an FPGA, or often many.
Also please tell me the disadvantages of the FPGAs compared to the ASICs.
Compared to an ASIC implementing the same function, an FPGA is slower, uses more power and costs more money per unit. The advantage is that it is much cheaper in low volumes and can be reprogrammed inexpensively.
Are FPGAs slowly being used more in many fields like military, space, image processing etc?
They have already been widely used in those fields for decades, although use in space can be tricky due to radiation hardness.
|
H: How do we initialise unpacked arrays in Verilog?
Suppose I declare an unpacked array of size say 8 bits wide.
reg b[7:0];
If I want to assign b[7] = 1,b[6] = 1, b[5] = 1, ......b[0] = 1, then apart from assigning value to each bit is there a way to assign any combination of bits say 8'bA8, to b?
For instance if I execute this code(below) in verilog:
module tb();
reg [7:0]a;
reg b[7:0];
initial begin
$monitor("a = %b,b = ",a);
a = 8'hA8;
b = 8'hA8; // Line 7
end
endmodule
I get this error:
C:\iverilog\bin>iverilog -o a test.v
test.v:7: error: Cannot assign to array b. Did you forget a word index?
1 error(s) during elaboration.
I am using Icarus Verilog on a command prompt on Windows 10 operating system.
AI: Remember, b[7:0] means an array of eight 1-bit numbers. In your example you are trying to initialise it with a single 8-bit number, which is not the same thing.
For Verilog, you have to initialise each element in the array one by one:
b[0] = 1'b0;
b[1] = 1'b0;
b[2] = ...
You could also use a for-loop and localparam to initialise it, by storing the packed initialisation value in the localparam, then using the for-loop to copy it in to your unpacked array. As a bonus, the loop can be parameterised allowing you to change the size of the variable if you desire.
integer i;
localparam b_init = 8'hA8;
initial begin
for (i = 0; i < 8; i = i + 1) begin
b[i] = b_init[i];
end
end
You could also try $readmemb or $readmemh if your synth tool supports it to load a binary or hex file of eight 1-bit numbers.
For SystemVerilog, you can do array initialisation:
reg b [7:0] = '{1'b1, 1'b0, 1'b1, ...};
|
H: Isolating an existing RS485 tranceiver
I have a heat pump with an RS485 interface. Via a simple RS485 chip. No isolated interface, no isolated power supply to it.
I want to add a power meter at 400+ meter to it and want to properly isolate the heat pump from that line. Speed is 9600Baud. Is there an isolator solution that comes to mind? I could not get further than converting RS485 to Tx and Rx, and then take a properly isolated RS485 chip as the interface. I think this is overdoing it (1), but I also hadn’t figured out how to do the Driver Enable of both ICs (2). The latter made me think that I want to understand how to do it as simple as possible.
What would be the simplest way isolating bidirectionally used Half duplex RS485?
AI: An Isolated RS485 Repeater is probably the simplest solution for your job.
|
H: LM318 Voltage Follower Self-oscillation and Output Noise
I've been trying to tame an LM318 opamp in order to replace the LM741 in a circuit because I need to buffer a higher frequency sine wave than the LM741 likes (1Mhz).
The datasheet shows the following example circuit right on page 1:
Ok, so I build this up, and am feeding a 200kHz signal at 0.6V peak-to-peak offset to a small, positive value, with a +5 and -5V rail:
However, instead of buffering the voltage, the amplifier starts to self-oscillate:
Not what was supposed to happen, so I decided to solder the circuit to perfboard, but much to my disappointment with the same result.
I thought maybe adding a resistor before the oscilloscope at the output would help so as to not drive a largely capacitive load, but that made no measurable difference
After lots of research I came across a post that recommended decoupling pin 1 and 8 of the opamp with a tiny capacitor (I used 5pf, but tried other values, larger didn't have a visible effect), and it seemed to tame the beast a bit, but the output was still distorted. Note that this is not mentioned anywhere in the datasheet. however, in the internal diagram on page 15 there seems to be C3 (28pF) connected across pins 1 & 8 internally, so not sure why a tiny 5pF would make a difference here.
This sure isn't by design, so my question is basically, what am I doing wrong in using this device and how can I fix this?
Is it not suitable for this purpose and I should consider a different chip?
AI: You are using a solderless breadboard, which is not ideal. There are parasitic capacitances of similar order of magnitude to the 5pF capacitor.
If you increase the 5pF to 10 or 15pF it will probably stabilize it, but of course on a PCB it will behave a bit differently.
You should have the 100nF bypass capacitor directly from pins 4 to 7 (power supply) close to the chip. I don't see where your lower "GND" is connected to the upper one, but the capacitor should be much closer.
So, no don't (necessarily) consider a different chip, in fact a higher performance chip might be worse. Consider a better construction method such as a PCB.
|
H: What exactly is 1.x and 2.0 power scalar V/f control in VFDs?
These are terms that I have come across in multiple operating manuals for VFDs and usually, they just mention that it's used for variable torque applications. My doubt is "what exactly is it?" and is there a mathematical formula that I can use to derive this relation between voltage and frequency? I read some articles that say that this has something to do with affinity laws for pumps and fans, but am unable to understand how would one derive the V/f relationships using that.
Any help or even a general direction towards additional sources which could help me in this regard are appreciated. Thanks for your time!
AI: It is about efficient operation of your pump/fan. Affinity law says load torque is proportional to square of speed for fan or pump load. If you analyse a induction motor with equivalent circuit you will find that it is slip which determines efficiency. There is a slip value band from 0.05 to 0.15 where your machine operate with highest efficiency. Your motor is designed to operate at maximum efficiency at rated operating point. Most of the time V/f relation is derived from rated operating point. But then in lower speed operating region slip goes beyond 0.05 and efficiency performance degrade. Parabolic V/f relation can tackle that problem. It can ensure high efficiency even in low speed operation maintaining the slip band.
Hope this helps you.
|
H: What voltage or node are the BJT substrates connected to in a bipolar process opamp IC?
I've been recently experimenting with converting transistor-level SPICE models of ICs into subcircuits. One thing I try to keep consistent with my subcircuits is that they remain floating; i.e. no internal connections to node 0 (aka GND). This represents the real world more accurately, and also allows for inserting noise sources or series resistances into the ground pin on the subcircuit. Any internal connections to node 0 would bypass these external effects. I've successfully made behavioral opamp subcircuits which easily satisfy this.
Then, I moved over to trying my hand at an LM741 since its internal transistor-level schematic is available in the datasheet (page 7). When I parsed the netlist into a text file to make the subcircuit, I was reminded that all BJT substrate nodes in SPICE are by default connected to node 0. If I was making a logic IC or regulator IC subcircuit, I would simply remap the node 0 connections to whatever the ground pin on the subcircuit is. However, this is an opamp and has no ground pin. Just VCC and VEE supplies.
So this begs the question...what are the BJT substrates in a bipolar-based opamp IC connected to? Are they connected to VEE? Are they left floating? Are they shorted to each individual emitter? I know next to nothing about IC design, and this situation piqued my curiosity.
AI: Substrate is normally connected to the most negative voltage in the circuit (Vee in the case of the 741) since it is p-type. Since the emitter and base are built on top of the collector diffusion in a vertical NPN, the collector-substrate junction characteristics are of interest.
Lateral PNP transistors as you'd find in the 741 are going to be different, I assume one would have a particular model for such transistors built in the process in question and not use the standard PNP model.
|
H: Why does radio reception consume so much energy?
On low-power radios, the current consumption for reception is similar to the consumption for transmission. For example, the Texas Instruments CC2652 System-on-Chip datasheet claims these values:
Active-Mode RX: 6.9 mA
Active-Mode TX 0 dBm: 7.3 mA
I've read an explanation that the most energy hungry component is the local oscillator, which generates the high-frequency carrier wave and needs to do that both for reception and transmission. However, it's not clear to me why would the generated sine wave need to be with similarly high amplitude in the case of reception, compared with the case of transmission. An alternative hypothesis is that running all of the (other) analog and digital RF components is what consumes the energy. Can you clear up the confusion?
AI: In short: receiving is much more complicated than transmission.
You'll notice that whatever you measure in the real world is overlaid with noise.
The problem "seeing all this noise with a bit of signal in it, how do I know what the transmitter meant to transmit" is the central problem that communications engineering tries to solve.
So, to receive a couple of bits correctly, your receiver needs to:
receive, even if there's no signal on the air, to notice when there's signal. That means the whole receive chain, and a couple-of-megasamples-a-second ADC runs.
Detect something like a preamble. That usually involves a correlation. That means, for every new sample (couple of millions per second), take the most recent e.g. 2000 samples and compare them to a known sequence
When there actually is detection of signal, correct all influences of the channel that are bad for your type of transmission. Depending on the system, this involves:
Frequency correction (no two oscillators in this universe are identical. Your receiver has a different frequency than your transmitter, and that breaks basically everything that isn't very basic. You need to estimate the frequency error, which typically involves tracking phase errors, or doing statistics, and then multiplying with a synthesized sinosoid or adjusting a power-hungry oscillator)
Timing estimation (your sampling is not synchronous to when the transmitter transmitted a symbol. fix that. Typically involves complex multiplications, time-shifting filters or adjustable and power-hungry oscillators.)
Channel equalization (your signal doesn't only take the shortest path. Multiple reflections reach the receiver. If the time difference between the shortest and longest path are not negligibly small compared to a symbol duration, you need to remove the echoes. Typically, involves solving an equation with a lot of unknowns or something similar, and application of a filter, which is quadratically in complexity to channel length, at best)
Phase correction (your channel still might rotate the phase of your received symbol. Calls for a phase-locked loop or some other control mechanism)
Symbol decision (great! After all these corrections, you, if everything goes right (it almost certainly doesn't do 100%), you only got the symbol that was sent, plus noise. So, which symbol was sent? Do a guess based on a defined decision algorithm, or do a guess and say "I'm 89% percent certain")
Channel decoding (The transmitter didn't just transmit the data bits – it added forward error correction redundancy, which allows you to correct errors that you still make. These algorithms can be very computationally intense.)
|
H: Reason for minimize PCB tracd width?
As I know we need larger trace width to handle higher current but some PCB got small PCB trace for signal. Why they don't use large trace if it's no any disadvantage?. Are there any reason or factor for minimizing trace width? (ignore space constrain)
AI: Impedance control (discontinuities), and parasitic capacitance (two sides of the same coin really) if you are running over a ground plane.
In addition, the larger a trace is, the higher the chance you might have to narrow it down to squeeze it past something and that introduces an impedance discontinuity. Sometimes it's difficult to tell in advance if you might run out of room and if your trace is too big you have to reduce it down which might mean you have to re-arrange a bunch of stuff.
Also, it can make it more difficult to solder. More heatsinking. I guess this could also cause tombstoning in some cases if you have a small component with landings sitting right on the a giant trace.
Also, have you ever routed a board? It can be mind numbingly tedious to keep on changing trace widths. I used to try and make my traces match the width of the pads, but after running into so many traces that run to multiple components each with different pad sizes I threw my hands up in the air and just used the same 0.3mm trace width for every signal when it was not critical.
|
H: How to compute the resistance and voltage of this schematic?
I have the following diagram I've set up in a simulator:
However I have no idea how they get 3.75V at that point (the upper left spot is a voltage reader) nor do I really even know how to apply Ohm's Law for series and parallel resistors because things are sort of joining at corners and I can't easily just pick two and say "these are in series" or "these are in parallel" because there's other "stuff" in between them. How do I wrap my head around this better?
AI: Here's how to solve it step by step (without knowing anything about thevenin equivalents). You have to be able to understand how to do these kinds of reductions before you can get into thevenin analysis.
FIrst, ignore that 3.75V sense point for the moment. The 10k and 20k touching it are in SERIES. Look at the diagram until that's clear in your head. Effectively that's a 30k resistor.
Next, note that the other 20k which is connected in PARALLEL to that '30k' resistor. Again, look close until that sinks in. THis gives an equivalent resistance of (20k || 30k) = 12k.
Note it helps IMMENSELY to redraw the circuit every time you make one of these substitutions!!! (Actually at your level this is REQUIRED - Again I can do this in my head only because I've done this many many times before).
That 12k is in SERIES with the 20k connected to ground.
So overall that resistor network is 12k + 20k = 32k
Good so far???
Now apply the voltage divider equation to that 12k/20k ladder. You'll find the voltage to be (20k/(12k+20k)*5V) = 3.125V. So now we know there is 3.125V across that last 20k connected to ground. That means the rest of the mess has (5V-3.125V)=1.875V across it (i.e. if you place a voltmeter from 5V to that node, you'll get 1.875V)
This means there is 1.875V across the leftmost 10k/20k combo.
Again apply the voltage divider equation and you'll find the point of interest (between the 10 & 20k) is 0.625V
But that is relative to the node, NOT to ground. You have to now add the voltages to get to your solution (3.125 + 0.625) = 3.75
There is no way to get around doing these kinds of problems in a step by step orderly manner. It takes effort and attention to detail. The math part is pretty easy by comparison.
|
H: Encoder direction change during index pulse
I have a quadrature encoder with an index pulse, and I would like to keep track of angular position over multiple turns. The microcontroller I am using has counters that count both index pulses (revolutions) and phase edges. Each time an index pulse is seen, the revolution counter is incremented (or decremented if going in reverse) and the edge counter is reset to zero.
Everything works fine for a normal 'clean' transition through the index pulse. However, if I am unlucky and the direction changes during an index pulse, then the counter that tracks revolutions (i.e. counts index pulse edges) becomes incorrect. It increments the revolution count at the rising edge of the index, but does not decrement it at the falling edge (which corresponds with the same physical position as the rising edge). The result is that the revolution counter is one count higher than it should be.
Is it common to use encoders with an index pulse to track multiple turns? What can be done to avoid this problem?
I am considering using only the first index pulse to reset the edge counter, and then ignoring all subsequent index pulses (just allow phase edges to accumulate instead). The downside is that without the index pulse to reset counts, the accumulated counts may drift over time if used for long periods with occasional missed pulses.
AI: The proposal in your last paragraph is a good and common way to handle this. For increased robustness, you can detect index pulses after the first and compare them to the accumulated location, modulo one full revolution. If they don't match to within the ambiguity of one quadrature count, you have a couple of options for how to respond. I would start by simply throwing some kind of alarm, so that after some duration of testing you'll be able to decide whether or not you actually do ever get periods of missed quadrature pulses. If it turns out you do, you can do a little math to have it snap the accumulated position to the nearest integer number of revolutions.
|
H: SPI slave randomly missing bits in response
I've connected an MCP3008 to a raspberry pi. First on a solderless breadboard, where everything worked correctly. Then on a prototyping board, where the only difference is that the chip is externally powered. The problem is now that the response from the slave is occasionally missing bits (the slave fails to pull the signal up for every bit that it should). Here is a series of readings taken at a 0.01 s interval:
[3.4, 3.39, 3.29, 0.0, 3.4, 3.4, 3.4, 2.55, 0.0, 2.98, 3.39, 0.0, 3.39, 3.3, 3.19, 3.4, 2.98, 3.4, 3.4, 0.58]
The readings are normalized for Vref = Vin = 3.4.
I've tried:
Redoing the soldering,
replacing the MCP3008,
adjusting the SPI frequency (currently at 1.35 MHz),
checking the connections and voltages using a multimeter
using the piscope to examine the serial communication (tricky, because if I set the frequency low enough to get a good reading, the chip rarely returns any values at all)
grounding unused inputs
The PCB has copper wire from the header to the chip for the SPI interface, about 5cm long. As far as I can see, that should be fine for SPI. SpiDev is set to use mode 0.
Any other ideas as to what might be going wrong would be hugely appreciated.
Update:
Connecting the Raspberry Pi ground to the external ground solved the issue, so it looks like the lack of common reference voltage caused the mcu to sometimes not pull high above the necessary threshold.
AI: Question
The OP is testing MCP3008 with SPI speed 1.35MHz, and found results inaccurate. How come?
Answer
Update 2020aug17hkt2136
MCP3008 and MCP3208 Programming Notes
Now that all basic MCP3201 functions have been tested OK, it is time to move to MCP3008 and MCP3208, both of which are more complicated that MCP3201 (Note 1). Some differences are listed below. (1) MCP3201 only need to read two bytes to get results, no writing command to select which channel is to read. For MCP3008 and MCP3208, three write read bytes are need, as illustrated below.
Note 1 - The nice thing is that (a) MCP3008 MCP3208 have the same 16 pin DIP pinouts, (b) the config pins are identical (see Table 5.2 of both datasheets). In other words, there are little changes need to be made converting MCP3008 to MCP3208 and vice versa.
Update 2020aug17hkt1511
Now I have wired two MCP3201s for troubleshooting and cross/self calibration. I found that the accuracy is < 0.5%, max/min difference for 10 samples < 0.015V.
Next step is to test and calibrate MCP3208 and MCP3008.
(5.3) MCP3201 Testing Program V1.3 - tlfong01 2020aug15
Update 2020aug13hkt1601
Now I am using a scope to display the SPI signal waveforms of loopback two bytes 0x5b, 0x5c at 1 MHz. Reading or converting MCP3201 and MCP30008/MCP3208 is as simple as reading two/three bytes. The following screen capture shows the two bytes loopback testing. The MCP3201 conversion wiring is the same, except MOSI and MISO is not shorted, but all signals are connected to MCP3201.
(5.1) MCP3201 Testing Program V1.1 tlfong01 2020aug12hkt1612
(5.2) MCP3201 Testing Program V1.2 tlfong01 2020aug12hkt1613
Update 2020aug12hkt1540
(5) MCP3201 Testing Program V1.0 tlfong01 2020aug12hkt1442
The OP is using SPI speed 1.35MHz to do the testing. Now I am testing MCP3201 the accuracy of converting a voltage of 1.68V with the voltage reference also 1.68V (Vcc/2) without using any by pass capacitors at MCP3201 Vcc and voltage reference. I tested over a range of 10kHz to 10 MHz. I found that the readings at 1 MHz or over is unreliable. So from now on I will only test at 1Mhz or below.
Now I am testing again, this time only on 100kH, 400kHz, and 1MHz, and over 100 samples. I found there is not much accuracy advantage using lower 100kHz and 400kHz, so from now on I only focus on 1MHz.
Update 2020aug12hkt1148
The OP mentions that he is using more than one MCP3008 to do swap troubleshooting. I always do swapping testing and troubleshooting, but I usually use samples from two shops, because from time to time I find that the whole lot I buy from one shop is bad. The other thing is that eBay shops are not always good. I usually buy from manufacturer's authorized shop (eg MicroChip authorized shop at TaoBao).
Now I am writing just one python program to calibrate all three ADCs, MCP3008, MCP3201, and MCP3208. I can actually calibrate all three at the same time with different SPI ports, each with multiple readings, with max, min, mean, and error values. MCP3008, MCP3201, and MCP3208 have the same SAR ADC architecture, and the SPI commands are extremely simple and newbie friendly, there is no need to access any device register, making one conversion is as simple as reading three bytes for MCP3008, MCP3208, and only two bytes for MCP3201, as illustrated below.
Since MCP3201 need two bytes instead of MCP3008/MCP3201 three bytes. So sampling time is roughly 2 bytes / 3 bytes, or 33% shorter.
Update 2020aug11hkt2116
The OP has found that improper grounding causes inaccurate conversion results. I might also investigate the effect of using digital ground vs analog ground or Vcc ground etc.
But I think the most important factor of conversion accuracy is SPI speed. I know 4MHz might be the upper limit, but I am interested to know if 2MHz or 1MHz is optimum, or if I should use even lower, perhaps 400kHz and 100kHz for higher reliability.
My test plan now is to first try one channel MCP3201 because the wiring and software is very simple, and techniques acquired can easily scale up to 8 channel MCP3208 and MCP3008.
I am starting the prototype hardware without any by pass caps for both Vcc and Vref. If I find results bad, then I will add bypass caps to compare and contrast.
Update 2020aug10hkt1652
My incomplete answer has inspired the OP to find the solution himself, as explained in his edit.
I am learning more things that might cause noise problems and inaccurate measurements, eg how to use bypass caps to stabalise the reference voltage source (ref 4), as illustrated below:
Update 2020aug07hkt1219
Now I am searching my old lab log to hopefull find something useful to suggest the OP to troubleshoot. I read my old schematic and found two things the OP might consider.
(1) Use separate analog grounds and digital grounds, as shown in the schematic below.
(2) Use a digital voltage reference with small series resistance, to maximize sample and hold capacitor current, so to prevent the not enough time filling up at high frequencies.
(3) Use one differential input channel, instead of single ended, to avoid noise problems. The three other not used differential inputs should be grounded, also to prevent noise, (ESD, back EMF) surge/spike problems.
(4) The schematic also reminds me that MCP3008's Chip Select (CS) pin is also used to "Shut Down". The Op might not be aware that there shutting down might need some time to wake up, otherwise the next conversion might not be accurate. This is just brainstorming, and I have not looked into this minor details for these particular hip, but I do have annoying experiences of not being aware that some chips's initialization and waking up take a long time, in the order of milliseconds.
(5) One more thing is that the OP is powering MCP3208 with 5V. In this case Rpi 3V3 logic SPI signals should NOT directly drive 5V device. I almost always do not use directly Rpi's 3V3 GPIO/UART/I2C/SPI signals. I always shift up Rpi'3 3V3 signals to 5V (using TSX/TBX0102/4/6/8)
I forgot if there is any other precautions things I need to observe. So I searched my reading logs and found the following:
Update 2020aug07hkt1149
I made a careless mistake in reading the datasheet, resulting a wrong conclusion. Please ignore this wrong answer. I will try to improve my answer later. My apologies.
Part A - Datasheet spec summary
A.1 - max data rate = 20ksps (Errata - should read 200ksps).
A.2 - conversion time = 3 SPI byte transactions, or 24 cycles.
Part B - Circuit analysis
B.1 - Example Case 1 : SPI Frequency = 1MHz, => conversion time = 24us.
B.2 - Max sps = 1/24us ~= 40kHz.
B.3 - Conclusion: 1MHz means 40ksps is too high for MCP3008 to handle.
Errata - Conclusion is wrong. Max sps of 200ksps should imply max SPI frequency around 4MHz
Part C - Troubleshooting suggestions
C.1 - Suggest to lower SPI frequency from OP's 1.35MHz to 100kHz (Note 1) and test again.
Notes
N.1 - Spec says min frequency > 10kHz, or sample and hold cap leaks.
N.2 - Volt source Rs < 1k, or sample and hold cap input current too small to fill up in time.
N.3 - Using SPI frequency might have a same trouble as N.2 above: sample and hold cap does not have enough time to fill up.
N.4 - My always dodgy calculation is not proofread.
References
(1) MCP3004/3008 2.7V 4-Channel/8-Channel 10-Bit A/D Converters with SPI Serial Interface - MicroChip 2000feb
(2) MCP3008 for Rpi Tutorial - M Sklar, AdaFruit, 2019jul
(3) MCP3008 ADC readings not accurate Problem - tlfong01, rpi.stackexchange 2029may 22
(4) Bypass cap on reference voltage? - EE SE 2020aug09
(5) MCP3201 Testing Program V1.0 tlfong01 2020aug13hkt1442
(5.1) MCP3201 Testing Program V1.1 tlfong01 2020aug12hkt1612
(5.2) MCP3201 Testing Program V1.2 tlfong01 2020aug12hkt1613
(5.3) MCP3201 Testing Program V1.3 - tlfong01 2020aug15
(6) Raspberry Pi 4 Multiple SPIs - 2020jan26
(7) Add more than 2 SPI slaves - 2015, Viewed 23k times
Appendices
Appendix A - MCP3008 Operation
Appendix B - The OP's missing bits in his MCP3008 ADC Conversion Results
I was curious which bits were missing. So I converted the decimals to binary to try to find a clue.
dec 3.40 = bin 11.01100110011001100110
dec 3.39 = bin 11.01100011110101110001
dec 3.30 = bin 11.01001100110011001101
dec 3.29 = bin 11.01001010001111010111
dec 3.19 = bin 11.00110000101000111101
dec 2.98 = bin 10.11111010111000010100
dec 2.55 = bin 10.10001100110011001101
dec 0.00 = bin 0.000000000000000000000
My thought for 15 seconds and jumped to the conclusion that the missing bits should be random, so I give up diving deeper.
Appendix C - MCP3201 Test Program V1.0 Listing
# Program:
# adc_util01_v111.py tlfong01 2020aug12hkt1314
from time import sleep
import spidev
import inspect
from datetime import datetime
import spi_util_01_v108 as spiutil
# *** 1. Program Config ***
programTitle = 'adcutil_01_v111'
# *** 2. System Utilities ***
def printBeginProgram():
print(' Begin program ' + programTitle + ' tlfong01 ' + timeNowStr)
#print(' ')
return
def printEndProgram():
print('\n End program ' + programTitle + ' tlfong01 ' + timeNowStr)
return
def printTitle(title, indentFormat):
print((' ' * (indentFormat[0])), title.ljust(indentFormat[1]))
return
def printTitleNoNewLine(title, indentFormat):
print((' ' * (indentFormat[0])), title.ljust(indentFormat[1]), end = '')
return
def printTitleString(title, indentFormat, string):
printTitleNoNewLine(title, indentFormat)
print('=', string)
return
def printStarLine():
print('')
printTitle(('*' * 100), indentFormat480)
print('')
return
def printBeginExecFunction():
functionName = inspect.stack()[1][3]
title = 'Begin Execute Function ' + functionName + ' ' + timeNowStr
printStarLine()
printTitle(title, indentFormat480)
print('')
printTitleString('Function Name', indentFormat640, functionName)
return
def printEndExecFunction():
title = 'End Execute Function ' + inspect.stack()[1][3] + ' ' + timeNowStr
print('')
printTitle(title, indentFormat480)
printStarLine()
return
def convertOneByteNumToFourCharStr(oneByteNum):
tempStr = ((hex(oneByteNum))[2:])
if (len(tempStr) != 2):
tempStr = '0' + tempStr
fourCharStr = '0x' + tempStr
return fourCharStr
def convertTwoByteNumToEightCharStr(twoByteNum): # new <<<<<<<<<<
tempStr = ((hex(twoByteNum))[2:])
tempStr = '0' * (4 - len(tempStr)) + tempStr
tenCharStr = '0x' + tempStr
return tenCharStr
# *** Time Now String ***
timeNowStr = str(datetime.now())[0:16]
# *** Format string for print functions ***
indentFormat480 = [4, 80]
indentFormat608 = [6, 8]
indentFormat610 = [6, 10]
indentFormat615 = [6, 15]
indentFormat630 = [6, 30]
indentFormat640 = [6, 40]
# *** Repeat Times and Pause Dict ***
repeatTimesDict = {
'1 times' : 1,
'10 times' : 10,
'100 times' : 100,
'1000 times' : 1000,
'10000 times' : 10000,
'100000 times' : 100000,
'1000000 times' : 1000000,
'10000000 times' : 10000000
}
sampleSizeDict = {
'1 sample' : 1,
'10 samples' : 10,
'100 samples' : 100,
'1000 samples' : 1000,
'10000 samples' : 10000,
'100000 samples' : 100000,
'1000000 samples' : 1000000,
'10000000 samples' : 10000000
}
pauseSecondsDict = {
'0.001 second' : 0.001,
'0.002 second' : 0.002,
'0.01 second' : 0.01,
'0.1 second' : 0.1,
'10 ms' : 0.01
}
# *** Write/Read Device Register Functions ***
def testAdc(spiPortName, adcName, spiSpeedName):
# 1. *** Set SPI speed ***
print('\n # *** Set SPI Port Speed ***')
spiutil.setSpiPortSpeedBySpiPortNameList([spiPortName], spiSpeedName)
print('')
# 2. *** Test SPI loopback (for troubleshooting only) ***
#spiutil.testLoopbackTwoBytesSpiPortNameList(['SpiPort00'], '0x5b', '0x5c')
# 3. *** Test ADC ***
if adcName == 'MCP3208':
pass
# / to continue, ...
print(' ADC 12 Bit Results =', hex(adc12BitResults))
if adcName == 'MCP3008':
pass
# / to continue, ...
if adcName == 'MCP3201':
print(' *** Read', adcName, 'Conversion Results ***')
#spiPort = spiutil.spiPortDict[spiPortName]
#recvArray = spiutil.spiSendRecvTwoBytes(spiPort, 0x00, 0x00)
#adcResults = (((recvArray[0] & 0x3f) << 8) + recvArray[1]) >> 1
adc12BitResults = readMcp3201(spiPortName)
adcVolts = (adc12BitResults / 0xfff) * 3.3
print(' MCP3201 Results in 12 bits binary (expect fff/2~= 0x0800) =', convertTwoByteNumToEightCharStr(adc12BitResults))
print(' in V (expect 3.3V /2 ~= 1.65V) =', "%.2f" % adcVolts, 'V')
return
def readMcp3201BinaryResults(spiPortName):
spiPort = spiutil.spiPortDict[spiPortName]
recvArray = spiutil.spiSendRecvTwoBytes(spiPort, 0x00, 0x00)
adcBinaryResults = (((recvArray[0] & 0x3f) << 8) + recvArray[1]) >> 1
return adcBinaryResults
def readMcp3201DecimalResults(spiPortName):
adc12BitResults = readMcp3201(spiPortName)
adcVoltResults = (adc12BitResults / 0xfff) * 3.3
return adcDecimalResults
def repeatReadMcp3201(spiPortName, pauseSecondsName, repeatTimesName):
spiPort = spiutil.spiPortDict[spiPortName]
pauseSeconds = pauseSecondsDict[pauseSecondsName]
repeatTimes = repeatTimesDict[repeatTimesName]
for count in range(repeatTimes):
#recvArray = spiutil.spiSendRecvTwoBytes(spiPort, 0x00, 0x00)
#adcResults = (((recvArray[0] & 0x3f) << 8) + recvArray[1]) >> 1
adc12BitResults = readMcp3201(spiPortName)
sleep(pauseSeconds)
return adc12BitResults
refVoltDict = \
{
'0.00V' : 0.00,
'1.68V' : 1.68,
'2.048V' : 2.048,
'3.30V' : 3.30,
'4.096V' : 4.096
}
spiSpeedNameListDict = \
{
'All speeds name list' : ['10 kHz', '50 kHz', '100 kHz', '400 kHz', '1 MHz', '2 MHz', '4 MHz', '5 MHz', '6 MHz', '8 MHz', '10 MHz']
}
def testAdcMultipleSpiSpeedsMultipleTimes(spiPortName, adcName, refVoltName, speedNameListName, sampleSizeName):
spiPort = spiutil.spiPortDict[spiPortName]
print(' Test Config: SPI Port =', spiPortName, ';', 'ADC =', adcName, ';', 'Speed List =', speedNameListName, ';', 'Sample Size =', sampleSizeName)
print('\n ', '----------'.rjust(10), '----------'.rjust(10), '----------'.rjust(10), '----------'.rjust(10),'----------'.rjust(10),
'----------'.rjust(10), '----------'.rjust(10),'----------'.rjust(10))
print(' ', 'SPI Port'.rjust(10), 'Speed'.rjust(10), 'Mean Raw'.rjust(10), 'Mean Volt'.rjust(10), 'Error (%)'.rjust(10), \
'Max Volt'.rjust(10), 'Min Volt'.rjust(10), 'MaxMin Dif'.rjust(10), end = '')
print('\n ', '----------'.rjust(10), '----------'.rjust(10), '----------'.rjust(10), '----------'.rjust(10),'----------'.rjust(10),
'----------'.rjust(10), '----------'.rjust(10),'----------'.rjust(10))
refVolt = refVoltDict[refVoltName]
speedNameList = spiSpeedNameListDict[speedNameListName]
sampleSize = sampleSizeDict[sampleSizeName]
for speedName in speedNameList:
# *** Set SPI speed ***
spiutil.setSpiPortSpeedByName(spiPortName, speedName)
# *** Read ADC Multiple Times***
# repeatTimes = 1
binResultList = [0.0 for x in range(sampleSize)]
decResultList = [0.0 for x in range(sampleSize)]
for count in range(sampleSize):
if adcName == 'MCP3008':
print('Not available')
if adcName == 'MCP3208':
print('Not available')
if adcName == 'MCP3201':
recvArray = spiutil.spiSendRecvTwoBytes(spiPort, 0x00, 0x00)
binResult = (((recvArray[0] & 0x3f) << 8) + recvArray[1]) >> 1
decResult = (binResult / 0xfff) * 3.3
error = ((refVolt - decResult) / refVolt) * 100
binResultList[count] = binResult
decResultList[count] = decResult
maxDecResult = max(decResultList)
minDecResult = min(decResultList)
meanDecResult = sum(decResultList) / sampleSize
maxMinDiff = maxDecResult - minDecResult
print(' ', spiPortName.rjust(10), end = '')
print('', speedName.rjust(10), end = '')
print('', convertTwoByteNumToEightCharStr(binResult).rjust(10), end = '')
print('', ("%.3f" % decResult).rjust(10), end = '')
print('', ("%.1f" % error).rjust(10), end = '')
print('', ("%.3f" % maxDecResult).rjust(10), end = '')
print('', ("%.3f" % minDecResult).rjust(10), end = '')
print('', ("%.3f" % maxMinDiff).rjust(10), end = '')
print('\n ', '----------'.rjust(10), '----------'.rjust(10), '----------'.rjust(10), '----------'.rjust(10),'----------'.rjust(10),
'----------'.rjust(10), '----------'.rjust(10),'----------'.rjust(10))
return
# *** Main ***
def main():
printBeginProgram()
# *** Read MCP3201 ADC result with list of SPI speds ***
print('\n # *** Test MCP3201 ADC with Ref Voltage = 1.68V, and a range of SPI speeds ***')
testAdcMultipleSpiSpeedsMultipleTimes('SpiPort00', 'MCP3201', '1.68V', 'All speeds name list', '10 samples')
printEndProgram()
return
if __name__ == '__main__':
main()
# End of program
# *** Sample Output ***
'''
>>> %Run adc_util_01_v111.py
Begin program adcutil_01_v111 tlfong01 2020-08-12 13:40
# *** Test MCP3201 ADC with Ref Voltage = 1.68V, and a range of SPI speeds ***
Test Config: SPI Port = SpiPort00 ; ADC = MCP3201 ; Speed List = All speeds name list ; Sample Size = 10 samples
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SPI Port Speed Mean Raw Mean Volt Error (%) Max Volt Min Volt MaxMin Dif
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 10 kHz 0x07ff 1.650 1.8 1.652 1.646 0.006
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 50 kHz 0x0802 1.652 1.7 1.652 1.646 0.006
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 100 kHz 0x07ff 1.650 1.8 1.650 1.647 0.003
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 400 kHz 0x07fe 1.649 1.9 1.651 1.649 0.002
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 1 MHz 0x0803 1.653 1.6 1.655 1.650 0.005
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 2 MHz 0x07cc 1.608 4.3 1.608 1.604 0.005
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 4 MHz 0x06ce 1.404 16.4 1.406 1.404 0.002
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 5 MHz 0x0773 1.537 8.5 1.539 1.535 0.004
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 6 MHz 0x02ff 0.618 63.2 0.618 0.618 0.000
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 8 MHz 0x02ff 0.618 63.2 0.618 0.618 0.000
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
SpiPort00 10 MHz 0x02e0 0.593 64.7 0.593 0.593 0.000
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
End program adcutil_01_v111 tlfong01 2020-08-12 13:40
>>>
'''
# *** End ***
End of answer
|
H: Setting minimum output voltage of boost converter with potentiometer and resistor
I am designing an LED light project using this Cree XLamp LED, (Forward voltage is 36V, forward current is 2400mA) and I am looking for a way to limit the output voltage of a boost converter by adding a potentiometer and a resistor. For reference, this was demonstrated in this video. However what I don't quite understand is how he chose to select a 6.8k ohm resistor to run in series with the added potentiometer.
What I believe is confusing me is the basic usage of Ohm's law. By my understanding, when the potentiometer is fully at the left and there is no resistance (through the pot), the total resistance is 6.8k. The output voltage of the boost converter is 6V. When fully at the right, the resistance is 9k ohms, and the output voltage is 12V. How can this be? What should go through my mind when trying to pick the resistor to use, since I'm wanting to use a different LED? Essentially, what is happening that lets the resistor determine the minimum voltage of the boost converter?
I know there's too many questions in my mind to ask them all, so I'll stick with the root of my confusion. Hopefully someone can understand my madness!
Thanks.
AI: I watched enough of it to get what you're missing. It was obvious to me in a few seconds (but only because I'm already familiar with how those power supplies work)
That new resistor/pot combo is connected to an EXISTING potentiometer (the blue box). So what he's done is modify the resistance curve of the existing pot, not introduce a completely new element.
In the factory, a worker would tweak that blue pot until the output is right. But it would have a limited range - Maybe able to tweak the output +-0.5V (made up numbers). That's not enough range to do what the video guy wanted, so he modified it's total possible range.
Now as to HOW that affects the circuit....
The existing pot used to trim the output voltage of the supply taps into the output, and is tied to the controlling IC, giving the IC the ability to "read" the output voltage. The controlling IC monitors this tap and adjusts its output such that the tap reading is what it expects it to be.
Adding that potentiometer is basically tricking the IC into thinking the output is something other than what it is, and the IC responds by adjusting its output.
An analogy...
Consider the speedometer in your car. If you are going 50MPH, you only know this because the speedometer tells you that you are going 50MPH.
Inside the speedometer are a few gears that are designed such that when the car is going 50MPH, a needle on your dash points to the '50' mark.
Now suppose somebody opens up that gearbox and changes the gear ratio. They make it such that when the car is going 60MPH, your needle points at 50MPH.
So you think you're doing 50 but you're actually doing 60.
That's what this guy did to the pot. He manipulated it to report an erroneous reading back to the IC and trick it into boosting or cutting its output beyond the range that blue pot could do by itself.
He got lucky the power supply could support the new range. Just as if the guy messing with your speedometer adjusted it to report 470MPH as 50MPH, doesn't mean your engine could actually get the car going 470MPH. What would probably happen is it'd report you as going like 10MPH and you'd peak out there (while actually cruising at 90...)
However what I don't quite understand is how he chose to select a 6.8k ohm resistor to run in series with the added potentiometer.
To answer that, you'd need to know the value of that blue pot and any other resistors around it. The blue pot is not connected directly between output & ground. There's likely a resistor from output to the pot, and another from the pot to ground. You'd need to draw out all those resistors and analyze the circuit to figure out why 6.8k was the 'right' value.
A far easier way to accomplish what he did would be to modify those two extra resistors I described, rather than add a whole new pot. If those two resistors are made, say, 1/2 their current value, the range of voltages the blue pot could adjust to would increase significantly.
Why not just do that to the production pieces??? It's because they want to limit the possible range of output, and also give the ability to precisely control the output voltage. That blue pot is a '10 turn pot', meaning you turn the screw on the top 10 times to move the pot through its entire range. That makes very fine control of the resistance and therefore the output voltage possible - like to the millivolt level probably. The resistors set the total possible adjustment range - If they were not there, you would lose precision (because each turn of the pot now represents much more change in total resistance) and it would be really easy to accidentally fire up the power supply at a target output way out of it's possible range and smoke the device.
I might point out that it's highly unlikely you'll get a supply that's nominally designed to output in the 6-12V range to get up to 36v. Your best bet is just source a 36v power supply and forget about tweaking anything.
Maybe you can get a nominal 24 or 48V supply tweaked to hit 36V, but not a 12V supply - that's way too far. Especially at the current levels you're talking about. Don't get locked into thinking only about output voltage. The power supply can only deliver so much power (P=V*I remember). If you ask it for more "V", you'll get a reduction in the amount of "I" it can deliver.
|
H: What is making this LM386 circuit so distorted?
I found this circuit on a YouTube video and tried copying it down into a circuit for testing, but the audio that comes out of it is really low quality and distorted. I don't expect sterling quality out of a quick hobby circuit like this, but I do expect something better than what I'm getting. This copying comes with the caveat that I don't really know where to find the video anymore. The schematic, however, is a faithful reproduction of what I have built, complete with all alterations from spec.
I had to fudge some of the capacitor values, given what I have on hand. I added in separately the part where the two channels get mixed with 1K resistors, as I just have the one speaker here and this seems an acceptable way to mix two channels. The audio source has just been my phone, as it's the most convenient thing on hand with the jack in question. The physical circuit is built on a mini solderable bread-board without power rails on it. I know that I should have kept it on a solderless one until I had it thoroughly debugged, but I got excited and locked myself into harder changes.
My questions are:
Is there anything about this circuit that suggests excess distortion?
I think I accidentally swapped the order of R3 and C4. Most other circuits seem to have the resistor closer to ground. Is this a problem?
I had to fudge the numbers on a bunch of the capacitors, making them somewhat bigger than was called for. In general with circuits like this, what range of sizes should the capacitors be and should I err on the side of bigger or smaller when I don't have an exact match?
Just what is the purpose of C3? I see it in some example circuits but not in others. The datasheet was not enlightening for me.
AI: Input signal voltage can be too high. Max input voltage for the chip is +/- 0.4V before it is damaged and phone output could easily exceed that, so you should use volume control pot at input. Power supply can be too weak, especially if it is a 9V battery, so it does not provide enough current.
No, it does not make any difference
The values look fine. Datasheets usually tells example circuits and why each part is necessary and what it does and effects of changing values are sometimes documented. This is an audio amplifier, changing values by a reasonable amount will have little performance effect, and frankly the part is so old that it specifies capacitor values that are hard to find these days.
C3 at the bypass pin is a bypass capacitor to filter noise and ripple from the internal bias node it connects to. Which also reads in the datasheet.
|
H: Concept of Bootstrapping in Electronics
I was trying to study about bootstrapping in electronic circuits.
When I checked in Internet Wiki says it is a method to improve the input impedance of an amplifier.
In the power electronics context, it has another definition.(https://techweb.rohm.com/knowledge/dcdc/dcdc_sr/dcdc_sr01/829).
Here it has another meaning (https://m.eet.com/media/1152270/24127-45890.pdf).
Could you please clarify bootstrapping?
AI: Bootstrapping, in both usages, means the arrangement of TWO nodes of the circuit that are coupled in such a way that one (controlled) node will closely follow the (controller) node.
If an emitter-follower uses the emitter output voltage to drive the collector voltage, then the Cob is removed from the Cin computation. This requires a large resistor in the collector to VDD, otherwise the emitter would not be able to move the collector voltage. A bipolar with Cob of 5pF, and a bootstrap cap from emitter to collector of only 5pF, will not optimally minimize the input capacitance; notice this is positive feedback, and some configurations of this are called "oscillators".
Another use is in high_side switching, using N-Channel FETs; a special capacitor Cboot must be charged up, and then charge is stolen from Cboot to control the Cgate of the FET during each switching cycle.
Also, the standard OpAmp non_inverting gain configuration is "bootstrapping" in that differential input capacitance is largely ignorable, as is differential input current. Thus the primary Rin (aka Zin) becomes the common_mode behavior. Note the Miller Multiplication (by non_cascoded input diffpairs) remains a problem; and during slewing, there is no Miller Multiplication, making the Cin become highly NON_LINEAR and upsetting the settling behavior.
Please read the comments by "jonk" and examine his links.
|
H: Purely Solid-State Circuit Withstanding 1kV, able to source 125mA
I'm looking to design a purely solid-state circuit that can perform the following:
Handle an AC Source with Vpk=1kV and act like an open circuit. (Schematic 1)
When the source is removed and replaced with a 10Ohm load, source 125mA from a 2.5V Source. (Schematic 2)
I realize the most obvious choice for this problem would be a mechanical relay, but I am trying to find a purely solid-state solution. There are 1.5kV solid state relays (extra 0.5kV is for safety measures), but the highest current I've found for these is 45mA and their internal resistance is too high (300Ohms). Have been simulating various combinations of BJTs, Diodes, and SCRs for about 4 hours so far and still have not been able to find a solution. Main limitation has been that P-Type MOSFETs and BJTs max out at 600V.
Any help you can provide would be greatly appreciated, and I realize that 'no solution' is a potential answer. Thanks
AI: There are HV BJT Transistor, SiC MOSFETs, IGBTs, HV Triac
simulate this circuit – Schematic created using CircuitLab
|
H: PIC processors - assembly vs. C?
I have heard that earlier PICs that are quite tiny are to be programmed using assembly and not C. Later PICs had hardware instructions to make them easy to be programmed via C language. However, I am not sure what this means.
AI: Later PICs had hardware instructions to make them easy to be
programmed via C language. However, I am not sure what this means.
Early PICs had limited memory and were quite slow so the code had to be small, efficient, and not waste precious RAM. It is possible to get close to assembler efficiency with a well-tuned C compiler by using various tricks, but with a small program it's often easier to just write it in assembler. With larger programs the advantages of C come to the fore (source code more compact and easier to read, more portable, better type checking, less chance of making silly errors etc.).
However early PICs also had hardware limitations that made it difficult for C compilers to produce good code, including:-
Strictly 8 bit operation. The default integer size in C is normally at least 16 bits. Using 16 bit integers wasted precious RAM and dramatically slowed down processing. C's poor handling of integer overflow can make working in 8 bits tricky.
No user stack. The stack on early PICs was only used for storing return addresses
and could not be accessed by program code. This made local variables and re-entrant functions harder to implement and less efficient.
Very small return stack. Some early PICs only had a 2 level stack. This severely limited the ability to nest subroutines.
Limitation on code placement. Some PICs could only call subroutines in even 256 byte ROM pages (eg. on PIC12C508 all subroutines have to be placed in the first 256 bytes of ROM).
No interrupts. Some PICs had to do everything by polling, so cycle counting was the norm for getting accurate timing. This is not compatible with C, which cannot guarantee that code will use any specific number of cycles.
Inefficient access to data in ROM. The 'Table Read' instruction reads a data byte by doing a 'computed goto' to a 'RET N' instruction that returns the immediate data byte embedded in the instruction. This is slow, wastes ROM space and cannot cross a 256 byte page boundary.
Paged RAM and I/O register access. PIC12/16 chips often have several banks because there is not enough memory space for linear addressing. The compiler may not be able to determine which bank is currently selected at run time, so has to insert more bank switching instructions than might be necessary with carefully crafted machine code.
|
H: What is the 5th wire used for in the USB optical mouse?
I know that USB cables usually have 4 wires - power, ground, data+ and data-.
In this optical mouse cable I have there is a 5th. It is black, but also thicker than the others, almost suggesting that there is more than one wire in it.
What is it? My best guess is that it is another kind of ground wire.
AI: That would be the cable shield, which is connected to USB connector metal chassis.
|
H: Chaining Power Amplifiers
Problem
I found an old (but not in use) garage door controller. The receiver is still intact but can't be reached from souterrain. The sender transmits a single tone on 27MHz in the citizen band. The signal is very weak, I measured 2Vpp (which equals to 10dBm, 10mW). I wondered if it is possible to boost the signal. I have a few of those "5MHz - 6GHz Broadband amplifiers" lying around, which you can get on ebay: https://www.ebay.com/itm/5M-6GHz-Low-Noise-RF-Amplifier-Ultra-Wideband-20dB-Medium-Power-Amp-Board-sz98-/283714550135 Is it possible to chain those amplifiers to sum up their gain?
Experiments
I asked the seller and he states, the modules can be connected together to add the gain of both modules. I connected the RF-Out of stage 1 to the RF-In of stage 2 with a 50Ohms cable and added a 50Ohm dummy load to the RF-Out of stage 2. I was quite suprised that the Gains of both stages were not added, on RF-Out I can read 3.7 Vpp so there was basically no "gain addition".
Questions
Are those modules generally not suitable for TX power amplification or would I need other modules?
Someone posted that one could use a Wilkinson splitter and combiner by first splitting the signal, guiding it through two amplifier modules and then combing them again. Will this sum up the amplification power of the modules used?
Both modules use the same 5V power supply. I have read somewhere this should be avoided. Also true for this case?
In general, can the Vpp output voltage outrank the supply voltage?
Edit
According to the comments and answers, my whole idea points into the wrong direction. That means, leaving the sender where it was the last years or increase gain on the receiver side (better antenna, LNA or upgrade the system with newer technology).
AI: The module you talk about has a supply voltage of 5 volts
It has a maximum output power of 100 mW
That's 2.24 volts RMS into a 50 ohm load
That's 6.32 volts p-p
That sounds about right for a class C output driver running on 5 volts
The problem isn't the addition of gains (dB) but the module running out of ability to produce more power on its output terminals due to only having a 5 volt supply.
Of course expectations of performance from goods supplied via ebay should be taken with a large pinch of salt especially if the device isn't "backed" by a decent PDF data sheet and some form of recognition that the manufacturer is bona fide and has adopted a minimum of quality standards during design and build.
Are those modules generally not suitable for TX power amplification or
would I need other modules?
I'm sure they are but their provenance is highly debatable
In general, can the Vpp output voltage outrank the supply voltage?
Yes with a class C output driver stage and a tuned collector tank.
|
H: How to count these spikes?
This signal is from an instrumentation amplifier,
read from Arduino MEGA2560 ADC,
loop delay 10ms (rate 100Hz)
I need to count high spikes only, (in below figure, 6 high spikes can be observed)
Edited -
its and ECG signal and signal was sampled at a rate of 100Hz
AI: It can be done by using some high pass filter to remove DC bias, then you differentiate the signal to detect high dv/dt. At each high dv/dt you set a flip-flop. If the FF is set you compare the amplitude threshold and you clear the FF when dv/dt becomes negative.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.