text
stringlengths 83
79.5k
|
---|
H: Why is my 74HC04 not inverting my input?
My Situation
I have this:
https://www.tinkercad.com/things/gUv4whDvcO3-fabulous-crift/editel?tenant=circuits
Or if that fails:
Schema (I think this is right, I have not used schemas much before as I have only recently started my journey into electronics (Well, a couple of months ago, but I started with the basics then)):
simulate this circuit – Schematic created using CircuitLab
My Question
When the first dip switch is off, the output of the hex inverter is high - correct
When the first dip switch is on, the output of the hex inverter is also high - ???
Where have I gone wrong? I have checked with the multi-meter and the input is 5V or 0V, however it always gives my 4.64V of output power, regardless of the input. This means that my LED is always on! I have no clue on what is wrong here...
Thanks for the help
AI: Figure 1. The original circuit.
The other side of the switch needs to be connected to ground (0 V).
simulate this circuit – Schematic created using CircuitLab
Figure 2. Without a ground connection on the switch the input is always pulled high by the resistor.
These sort of problems can be spotted much more easily on a schematic than on a wiring diagram or "cartoon" as the schematic shows the "schema" of the circuit.
|
H: Why don't we make CPUs with 1000s of layers to make use of space in the third dimension?
I am wondering why don't we make processors such as CPUs with 1000s of stacked layers to make use of space in the third dimension now that we have three-dimensional transistors. To be clear I'm referencing making something of a rectangular-prism shaped processor.
To be clear there's a vast amount I am not aware of when it comes to processor manufacturing, I am not an electrical or computer engineer, but I am very curious. I am aware of the heating problems this would cause considering an even more dense packing of transistors and the manufacturing problems considering you would have to laser etch through so much silicon, but unlike enlarging the size in width and height there wouldn't be problems with making the most of the circular silicon wafers, and unlike with that you would be keeping the parts very close which means it wouldn't slow down the speed of the electricity getting from one part of the processor to the other because the processor already has 1000s of transistors stacked horizontally and vertically.
I am curious if you could solve the heating problems by laying down thin intermittent heatsinking layers, while keeping the vertical throughput. And fix the manufacturing problems partially by using separately etched wafers every 10 layers or so. Could this be possible or are there lots of problems I'm not thinking of (and I'm sure there are)? Thanks.
AI: The two killer reasons are yield, and heat.
Yield. Every time you do a process step, you get less than 100% perfection. Let's say you get 99% perfection per step. In a process with 20 steps, you would be down to 82%. In a process with 1000 steps, you would be down to 43 ppm, 43 successful builds for every million wafers started.
Heat. Our existing designs are already limited by how fast we can extract heat from the bottom of the die. So neither the opportunity to generate more heat, nor the opportunity to generate that heat further away from where it can be dissipated, is of any real use to us.
Those said, there are some devices building up into the 3rd dimension, bonding several finished wafers together, which mitigates the yield issue. Those stacked wafers tend to be memory, which don't use anything like the power of a CPU, which mitigates the heat issue.
|
H: How to find the secondary inductance value in flyback transformer?
I try to design smps converter with flyback topology. Parameters are below:
Vin = 100V(dc) (constant)
Vout = 50V(dc)
D(on) = 50% (So, D(off) = 50%)
fsw = 70 kHz
Np/Ns = 2
According to my calculations inductance of the primary Lp = 236µH.
What is the value of inductance of the secondary? How to calculate it?
In my opinion:
Ls = Lp x (Ns/Np)^2
Ls = 236µH /4 = 59µH (I'm not sure if this calculation is true for flyback topology)
Normally, Current changes (ΔI) on primary and secondary must be equal. Because of the D(on) = D(off), slope values of current ramps must be equal.
BUT !
(Sp: slope of primary current; Ss : slope of secondary current)
Sp = Vin/Lp = 100V / 236µH = 423729 Ampere/seconds
Ss = Vout / Ls = 50 / 59µH = 847458 Ampere/seconds
Why are they not equal? I don't know my mistake
[UPDATE - 27.07.2020 - 13:28]
This image is at page 3 in AN4137 app note by OnSemi
If current changes is not equal, how can I calculate current change for secondary?
AI: The square of the ratio of the turns ratio works irrespective of how you drive the transformer. So, if primary is 236 µH and secondary winding has half the turns of the primary then the secondary inductance is 59 µH.
The primary and secondary current slopes will only be equal when using a 1:1 transformer and input and output DC voltages are identical. The slope determines the voltage i.e.: -
$$V_{OUT} = L\cdot \dfrac{di}{dt} = 59 \text{ µH} \times 847458 \text{ A/s} = 50 \text{ volts}$$
And
$$V_{IN} = L\cdot\dfrac{di}{dt} = 236 \text{ µH} \times 423729 \text{ A/s} = 100 \text{ volts}$$
Normally, Current changes (ΔI) on primary and secondary must be equal.
That is true for a 1:1 transformer but not an N:1 transformer where N isn't 1.
If current changes is not equal, how can I calculate current change
for secondary?
If the transformer steps down 2:1 then, because ampere-turns have to be equal on primary and secondary, the secondary current must be twice the primary current. Ampere-turns are transferred from primary to secondary at the moment the primary is disconnected so this is a valid approach.
|
H: Colpitts Oscillator
I am implementing the following oscillator circuitry on my breadboard:
I am using the LM324n op amp and a solderless breadboard. The oscillator is tuned at about 500KHz resonant frequency, but when I hook my scope's probes there is no signal present at the output. could this purely be because of the breadboard? (coupling/decoupling, capacitance between traces and ...) or is it a faulty IC, since i think this specific IC has been lying around since late 90's! but it seems to work fine when working as a normal inverting amplifer.
I also tried reducing the gain (before theoretically stopping the oscillation) to check if its the GBP value being exceeded, but to no avail.
any help would be greatly appreciated.
AI: The LM324 has not got enough open loop bandwidth to sustain a gain of 3.3 at 500 kHz. Try running at a lower frequency to prove this. If you made the inductor 1000 uH you would get oscillation: -
And, if you made C1 = 10 nF (inductor still at 1000 uH) you would get a tad more amplitude: -
But see how the op-amps's slew rate limiting is converting this into a triangle wave. If you went even lower in frequency (L = 10000 uH and both capacitors at 100 nF) you will begin to see a sine wave evolving from the noise: -
But, because there is nothing in the circuit to limit gain (yes, you need a gain control system in a sinewave oscillator), the sinewave gets bigger and bigger until it hits the maximum output swing that the LM324 can muster. It's now a sort of square wave.
|
H: How should I design a heat sink for an SMD power MOSFET?
I really like the specs of the Infineon OptiMOSPower-Transistor IPT007N06N, but how would I keep this beast cool?
Usually I use regular aluminium heat sinks (with water cooling or a fan) for MOSFETs in this power category, but this has to be soldered onto a PCB. Would I create a larger copper area and then attach a heatsink to this, or is there a way to keep the PCB itself cool? What is the usual the strategy here and are there any sample designs?
Datasheet of IPT007N06N (pdf 1.2 MB): https://datasheet.octopart.com/IPT007N06NATMA1-Infineon-datasheet-43351903.pdf
AI: Depends on your power levels. From the datasheet you'll get a temperature rise of 62C/W on a minimal copper area, but this goes down to 40C/W with a larger cooling area. A multilayer plane (if you can fit it) with plenty of vias for extra area and copper makes 6cm^2 not all that much. If you look through datasheets for other TOLL-88 packages (or similar, Infineon has weird packages), you'll usually find recommended PCB layouts. At 0.75mOhm rdson, 25C ambient, and Mercury in retrograde you could put 56A through that part before hitting 120C on your junction. The datasheet says you can go as high as 175, but I never take power semis even close to that. (With the minimal copper area you're looking at ~45A to hit 120C).
If this still isn't enough for you, then start looking into heatsinks. The whole point of these packages is to save space, and heatsinks do not do that...
Of course, my analysis only works if you are not switching frequently as it does not take turn-on and turn-off losses into account. It assumes your max ambient is 25C, etc, etc. I'll leave calculating your actual power consumption to you.
|
H: Help needed using convolution to calculate a system's impulse response
I have a circuit with the transfer function \$G(s) = \frac{1}{(s+1)^2}\$ and I'm asked to calculate the impulse response of the circuit. After looking into it I know that I need to use convolution with the delta function to solve this.
I've managed to get as far as forming the integration to solve this, but I'm struggling as it seems to be quite a complex integration. I'm not sure if I've gone wrong somewhere leading up to it, so I was hoping someone could have a look through what I've done so far, and also help me with the final integration. I'll post my working first and I'll explain the integration problem at the end.
So the transfer function \$G(s) = \frac{V_o(s)}{V_i(s)} \therefore V_o(s)=G(s)V_i(s)\$, where \$V_o(s)\$ is the output response and \$V_i(s)\$ is the input impulse.
To find the output as a function of time: $$v_o(t) =L^{-1}\{G(s)V_i(s)\}=g(t)\ast v_i(t)\\ g(t) = L^{-1}\{\frac{1}{(s+1)^2}\}=e^{-t}t\\v_i(t) = \delta(t)\\ \therefore v_o(t) = g(t)\ast v_i(t)=e^{-t}t\ast \delta(t)$$
So the convolution integral will be:
$$\int_{0}^{t}g(t-\tau)v_i(\tau)d\tau = \int_{0}^{t}e^{-(t-\tau)}(t-\tau)\delta(\tau)d\tau$$
This is where I get stuck as I can't solve this integral. Firstly I'm not 100% sure about the integral of \$\delta(\tau)\$, but I believe it equals 1? Is this correct?
I'm also not sure if I should be including that second \$(t-\tau)\$ bracket, I thought maybe the integral should be \$\int_{0}^{t}e^{-(t-\tau)}\delta(\tau)d\tau\$. This seems much easier to solve.
Can anyone point me in the right direction/correct me if I've made an error?
AI: I was hoping someone could have a look through what I've done so far,
and also help me with the final integration.
You don't need to perform that integration.
In the s-domain the unit impulse is unity hence, you have calculated the response already and did the inverse transform correctly. The answer is \$t\cdot e^{-t}\$. The great thing about transferring to the s-domain is that if you can also transfer the time domain input signal to the s-domain, you have a fairly simple calculation and there are on-line resources (such as this one) that can do the inverse manipulation for you.
|
H: Reading sketch from Arduino UNO
I'm new to Arduino and spent shockingly long on an RFID code variant. Unfortunately someone then snuck into my flat and nicked my laptop. The sketch however is still on my Arduino UNO, is there a practical way to recover it in a format that would be useful? Or would my time be better spent trying to recreate it from scratch?
I've come across some references to bootloaders/HEX/temp files but I'm not sure how that would work or if it would result in anything useful at the end of the day.
Thank you for your help!
AI: You can't. I'm sorry about your laptop, and about the lost code.
You could probably download the binary program that runs on the hardware.
Downloading the binary gives you the binary, not the "sketch" (which is the source code). It's the compiled binary. There's no way to get back to the source code but to reverse-engineer it, which is probably way, way harder than re-writing it from scratch, since you know what it was doing.
Also: software developers, and especially embedded developers like you, should be in the habit of working with source version control systems. Exactly because code gets lost, and exactly because not every code version is perfect.
It's the first thing I request any student that works for me sets up: Get git, watch the git-scm videos (DO IT NOW. It's 20 minutes of time that you will get back in less than a week if you work with code that you sometimes have to "rewind" to figure out how to do something right. And I bet you had to do that a couple of times, right?), and maybe read a chapter or two into the git book. Every single of my students doesn't want to do that (especially when they are under time pressure), and then regret not doing it earlier when they really have to do it. With git, and private git repos, eg. on gitlab, github, bitbucket,... you get proper source backups, and a way to rewind, try new things without having to make copies of everything, document your progress.
|
H: What is the difference between magnetic and primary inductance?
I try to calculate ramp compensation resistor (Rcomp) for flyback SMPS converter design. For this, I examined slope compensation section at page 15 in NCP1252 datasheet by OnSemi.
But, there is a parameter which I don't understand. Calculations are below as screenshot:
Mixed point !!!
Ns/Np = 0,085
Lout = 27µH
Lmag = 13mH (?) WHY?
As I know, L2 = L1 x (N2/N1)^2
So, Lout = Lmag x (0,085)^2 = 27µH --> Lmag must be 3,7mH
But, Lmag = 13mH in NCP1252 datasheet
Are magnetic and primary inductance different each other?
AI: Are magnetic and primary inductance different each other?
No, they are not different unless you want to take into account leakage inductance (2 to 5%). I think you are not understanding the type of circuit they refer to: -
Page 16 and 17 are referring to a 2 switch−Forward Power supply specification and they use an extra inductor in the output circuit seen as L1 in the above schematic. That will be the 27 uH they refer to: -
|
H: Using P-Channel mosfet with arduino
I want to drive a 12v inductive load with arduino (a motor) . This device has 3 wires a common GND and one wire to go in one direction an another one to go on the opposite direction, as it has a common GND If I understand it correctly I can't use a NChannel mosfet. following diferents ideas on the internet I came up with the following design:
A few questions :
Why is R4 really necessary?
What's the use for Q1 , I have seen diffent designs using only Q2, if I was driving a 5v device (the same as V as the arduino could Q1 being removed?
AI: For your current circuit:
Why is R4 really necessary?
You need a way to make sure that the source and the gate of the PMOS are the same potential to keep it OFF. That way, when Q1 is not ON, R4 will guarantee that the PMOS remains OFF. Remember that a MOSFET is turned on when there is enough potential difference between gate and source, \$V_{GS}\$. In a PMOS, you need to pull the gate voltage, sufficiently, below of that of the source in order to turn it on. In your circuit, when the PMOS is ON―which happens when Q1 is ON― \$V_{GS}\approx -V_{in}\$ (a little less because of the drop across Q1).
Another good point brought up in the comments, without R4, when Q1 is ON, it would short \$V_{IN}\$ to ground. That is, of course, if you were to replace R4 with just a short circuit. If you took it out, leave that open, you wouldn't short VIN to ground but the previous paragraph explains what could happen.
What's the use for Q1 , I have seen diffent designs using only Q2, if I was driving a 5v device (the same as V as the arduino could Q1 being removed?
Yes, you could live without Q1 under this case you mention. If VIN, however, were some voltage like 12V, then you still need Q1 to protect the arduino's GPIO from the higher voltage.
|
H: Possible contradiction between Ohm's Law, KCL, KVL and Faraday's Law of Induction?
Let's say, we have a loop of wire of length \$L>0\$. Let's say, hypothetically, it is a loop of non-ideal wire. That means that the wire has a resistance per unit length \$ρ>0\$. Let's further assume that there is a changing magnetic flux through that loop of wire. Faraday's Law of Induction, as it is widely understood, dictates that a current will be induced in that loop of wire. Let's call that current \$I\$ (where \$I>0\$).
Now, for the sake of argument, let's divide that wire into infinitely many segments of infinitesimal length. Let each of those segments have length \$dl\$. That means that each segment will have resistance \$ρdl\$, and since each segment has the same current \$I\$ passing through it (KCL), the voltage drop across each segment should be \$Iρdl\$ (Ohm's Law).
Starting at any point in the loop of wire, we can sum up the voltage drop across each infinitesimal segment for the entire loop (the segments are in series):
\$\int\limits_{0}^{L}Iρdl=IρL>0V\$
Now, since we start at any point in the loop and come back around to the same point, that means that the voltage at that point (relative to itself) is both \$0V\$ (trivially) and \$IρL\$, which is a contradiction since we assumed that neither of \$I\$, \$ρ\$, and \$L\$ is \$0\$.
This is essentially a long way of saying that KVL finds itself contradicted. But I took this long way to avoid answers such as "KVL simply doesn't work with magnetic fluxes". But how can it not work? What did I do wrong in all those steps? Which assumption was incorrect?
AI: This is essentially a long way of saying that KVL finds itself contradicted.
Kirchhoff's Voltage Law is a law from circuit theory that is valid in the lumped circuit approximation. One of the requirements for the lumped circuit approximation is that there be no significant changing magnetic flux passing through the circuit. If this requirement is violated then we absolutely don't expect KVL to apply.
What did I do wrong in all those steps?
When you said, " since we start at any point in the loop and come back around to the same point, that means that the voltage at that point (relative to itself) is both 0 V (trivially) and ..." you have already assumed that the lumped circuit approximation is valid and that there are no changing magnetic fluxes through the loop.
You assumed KVL would apply in a circuit where it doesn't apply.
Which assumption was incorrect?
The assumption that there was no magnetic flux through the circuit being evaluated
But I took this long way to avoid answers such as "KVL simply doesn't work with magnetic fluxes".
You basically demonstrated the reason why KVL doesn't work in circuits with changing magnetic flux.
If you want a reason why KVL doesn't work in this scenario, then your logic is exactly that reason. It's because in this scenario the integral of the EMF around the loop is not zero but something that depends on the changing magnetic flux through the loop.
If you want to model this circuit within the context of the lumped circuit approximation and KVL, then you should treat each element of the loop not as a small resistor, but as a small section of the secondary of a transformer (with the primary being whatever is generating the magnetic flux through the loop). Then you have a term for the voltage across each element that won't sum to zero as you go around the loop and you won't get a contradiction.
|
H: Effects of twisted pair in 120V AC
In Square D's marketing copy for their plug on neutral load centers, they have a photo for demonstrating "cleaner wiring" in which the hot and neutral wires are twisted inside the panel before reaching the breaker. I agree it looks neater, but it got me thinking and I know just enough about electricity to be confused. I assume the practical answer is that a slow (~1 turn per inch) human-made twist in the last couple feet of a cable that runs 30-40 feet will have no real impact, but I'm curious.
In low-voltage DC data wires, twist is used to reduce emitted EMI and reject received EMI. In a typical home I doubt contractors care about the noise on the voltage line, but as someone with a lot of sensitive electronics it interests me. But I've also seen it suggested that the increased capacitance between the twisted wires could increase current drain, which in turn could cause nuisance trips of AFCI breakers.
And I pretty much only understand electricity at all in DC. I don't know or understand what impacts AC may have on this.
So what kind of impacts, if any, could we expect to see from twisting a previously parallel load/neutral pair, carrying 120V AC?
AI: There is no electrical reason for the twist; it merely serves to keep the two wires physically associated with each other once the Romex jacket is removed. It both "looks neater" and is easier to do subsequent work on.
There is no increased capacitance (the distance between the wires doesn't change), except for the fact that the twisted wires need to be slightly longer than the untwisted wires.
Also, even if there were some increase in reactive current, this would have no effect on an AFCI (which is looking for high-frequency noise) or GFCI (which is looking for a current imbalance between the two wires).
Note that excess capacitance between hot and ground (not neutral) can pass enough current to trip a GFCI. I've seen some kinds of plug-in power line filters do this.
|
H: Attiny13 odd behaviour sometimes
I'm programming ATTiny13's to use on a custom PCB and have noticed an odd behaviour at times.
My ATTiny is connected to an Arduino Nano as per the diagram shown here, so pretty standard. I then use the following code on it:
#include <Bounce2.h>
#define BUTTON_PIN PB4
#define led1Pin PB0
#define led2Pin PB1
#define led3Pin PB2
#define led4Pin PB3
#define switchPin PB4
#define delayInterval 100
Bounce debouncer = Bounce(); // Instantiate a Bounce object
uint8_t val; // variable for reading the pin status
uint8_t val2; // variable for reading the delayed status
uint8_t buttonState; // variable to hold the mode switch state
int lightMode = 2;
void setup() {
PORTB |= (1 << PB4); // set PB4 as input & activate internal pull-up resistor for PB4
pinMode(led1Pin, OUTPUT);
pinMode(led2Pin, OUTPUT);
pinMode(led3Pin, OUTPUT);
pinMode(led4Pin, OUTPUT);
}
void loop() {
val = digitalRead(switchPin); // read input value and store it in val
delay(10);
if (val != buttonState) {
if (val == HIGH) { // check if the mode button is pressed
if (lightMode == 0) {
lightMode = 1; // turn LEDs on
}
else {
if (lightMode == 1) { // if LEDs on
lightMode = 2; // make it flash
}
else {
if (lightMode == 2) { // if LEDs flashing
lightMode = 3; // make it wave
}
else {
if (lightMode == 3) { // if LEDs waving,
lightMode = 0; // turn LEDs off
}
}
}
}
}
buttonState = val; // save the new state in our variable
}
// Now do whatever the lightMode indicates
if (lightMode == 0) { // LEDs-off
PORTB |= (1 << PB1); // HIGH
digitalWrite(led2Pin, LOW);
digitalWrite(led3Pin, LOW);
digitalWrite(led4Pin, LOW);
}
if (lightMode == 1) { // LEDs-on
digitalWrite(led1Pin, HIGH);
digitalWrite(led2Pin, HIGH);
digitalWrite(led3Pin, HIGH);
digitalWrite(led4Pin, HIGH);
}
if (lightMode == 2) { // LEDS-flashing
digitalWrite(led1Pin, HIGH);
digitalWrite(led2Pin, HIGH);
digitalWrite(led3Pin, HIGH);
digitalWrite(led4Pin, HIGH);
delay(100);
digitalWrite(led1Pin, LOW);
digitalWrite(led2Pin, LOW);
digitalWrite(led3Pin, LOW);
digitalWrite(led4Pin, LOW);
delay(100);
}
if (lightMode == 3) { // LEDs-waving
digitalWrite(led4Pin, LOW);
digitalWrite(led1Pin, HIGH);
delay(100);
digitalWrite(led1Pin, LOW);
digitalWrite(led2Pin, HIGH);
delay(100);
digitalWrite(led2Pin, LOW);
digitalWrite(led3Pin, HIGH);
delay(100);
digitalWrite(led3Pin, LOW);
digitalWrite(led4Pin, HIGH);
delay(100);
digitalWrite(led4Pin, LOW);
}
}
What I have noticed is that some times I program them, and the button click just doesn't work. Nothing wrong with it, but the behaviour is not the same.
These are programmed to start with lightmode 2, so it cycles through every LED. I press the button once, it turns off the LEDs. I press it again, it turns them all on. I press again and nothing happens.
The odd thing is that this happens on only a few IC's but not all of them. These all come from the same batch and are using the same programming methodology.
I am using the MicroCore library to program them.
Would appreciate any advice.
Thank you!
AI: If you are testing your design with the programming lines still attached, don't do that. You should disconnect the Arduino programming lines from your Attiny, reset it, and then test the design.
|
H: Differential amplifier and different ground
I am designing a circuit to measure the voltage across the output of buck converter. With different ground for the buck converter and the micro controller, with respect to which ground will the ADC measure?
For the circuit shown above, the ADC will measure the output with respect to which ground? Isn't the input to the ADC floating?
If the above circuit is not a good design practice or if it doesn't work, will the below circuit work provided the output voltage of the first op amp is within the voltage range of the second op amp?
AI: The grounds are floating.
There are two problems with the designs:
The design will be susceptible to any kind of noise, because the GND2 is floating with respect to GND1. EMI could cause GND2 to be a higher voltage (and the second board will function like an antenna)
There is no return path for the current flowing from the board with GND1 to the board with GND2 (in the diagrams in the OP). This means the only return path for current will be through the air and the current will be very very small, not enough to overcome the input bias current needed almost all amplifiers.
You'll need some kind of connection between grounds. If you want to isolate the grounds between boards use an isolation amplifier such as the adum3190. These amplifiers use chopping to pass the analog signal through an isolation transformer, then reconstruct it. (you still need to provide a ground from one board to the next, but the grounds are not tied together on the same board). If your trying to save on wiring, there is simply no way to pass an analog signal between boards without a return path for the current (it's like trying to get current from a battery without connecting a wire to the other terminal).
Source: https://www.analog.com/en/products/adum3190.html
will the below circuit work provided the output voltage of the first
op amp is within the voltage range of the second op amp?
There will be no reference for the ADC to base the voltage because GND1 is floating, it will pick up a reading but it would be similar to connecting a wire to the ADC and air.
For the circuit shown above, the ADC will measure the output with
respect to which ground? Isn't the input to the ADC floating?
The ADC is always referenced to it's ground GND2 (many ADC's have built in voltage references that are referenced to ground).
will the below circuit work provided the output voltage of the first
op amp is within the voltage range of the second op amp?
Probably not, it will depend on the voltage of GND2 and if GND2 is only connected by air, then no current will flow between boards and there will be no way for a voltage to be determined by the buffer amplifier.
|
H: What does ring and cylinder symbol mean?
I'm seeing an odd symbol in a schematic provided in a datasheet for the power management chip ADP5091: a ring that goes through a cylinder. The cylinder is connected to the inductor (SW pin) and the ring is connected to the low side transistor of the boost converter. I've tried googling this symbol but unfortunately I can't find anything. Could someone please help me out with this? Thanks in advance!
AI: It looks like a current transformer. It would make a lot of sense if there was a current sensor of some type in the circuit. It monitors the current swing in the boost inductor, to switch off the low side FET when the inductor current exceeds some threshhold.
Whether it's a real current transformer (I'm not sure how they could integrate the magnetics in an IC) or an active device that behaves like one is another matter. There's no description of it in the data sheet. Hearth in comments suggests it could be a Hall sensor, which I think is probably more likely than a flux coupled transformer.
|
H: why is there dark fiber?
Dark fiber (unused fiberoptic cables) is a confusing term for me. Why would any company build so much excess capacity? Such a business decision seems unwise. There are even companies that brand themselves as 'dark fiber providers' which is even more confusing.
https://www.ufinet.com/services/dark-fiber/
Was the expectation of utilization massively overestimated? Or is switching and multiplexing tech rendering it cheaper to use few fibers?
I realize this is not technically an EE question but am hoping that some real EEs have insight into why this has happened. If the mods feel a different forum is more appropriate I can move this post there.
AI: Dark fiber (unused fiberoptic cables) is a confusing term for me. Why would any company build so much excess capacity?
The marginal cost of adding one more fiber when digging up a street is very, very small relative to the cost of digging up the street in the first place. So when you decide to dig a trench across the country, string a fiber across the ocean, etc you typically put more than one in place so that in the future you don't have to do it all over again when you need more capacity.
In addition, much of the cost of the fiber link is actually the equipment at the ends of links (WDMs, receivers, pump lasers for amplifiers, etc). Burying a lot of dark fiber therefore allows you the option of paying to install more lines sometime later in the future (by buying more receivers) for a relatively small up front cost (just whatever it costs to put one more fiber in the trench).
|
H: Super low duty cycle circuit
I am looking for a way to recharge some glow in the dark paint in a way that isn't noticeable to others. My idea is to use a very fast pulse of light from a bunch of UV LEDs every few seconds, but where the pulse is below the human perceptibility range.
My first thought was a 555 timer, but that seems to struggle at less than 50% duty cycle as I look at all the online calculators. I dug up a digital PWM that I found in a drawer, but its lowest setting is 1% duty cycle and 1Hz.
I was thinking something more along the range of 0.01% duty cycle at 0.25Hz. What would be an appropriate way to solve this if not with a 555? Since I don't know exactly what the human perceptibility range is for a strobe of light, it would be nice to be adjustable so I can let it be on as long as possible as I test it.
AI: A flickering or flashing UV LED will be more noticeable than one that is continuously on at low power.
Just use a resistor from the forklift's 12V to power the LED
|
H: How to initialize a 16x2 I2C LCD in 4-bit mode with an STM32 MCU?
As part of an alarm clock project, I am trying to interface a 16x2 I2C LCD with an STM32F103RB microcontroller. The LCD uses an I2C backpack and only utilizes D7-D4 meaning 4-bit mode must be used. However, I am having trouble getting the device initialized in 4-bit mode. When I attempt to print a single character to the LCD, it prints two characters. For example when sending 'c', a 'o' and '?' get printed. Also, when sending a command to clear the display no characters are cleared which lead me to believe this is the issue. I have tested similar code on a Raspberry Pi, and the commands and characters are written properly to the LCD controller. The LCD model is the LCD1602. The c code I am using to drive the display is shown below:
/*
* lcd1602.c
*
* Created on: Jul 24, 2020
* Author: someone
*/
#include "lcd6502.h"
static uint8_t addresses[32] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F
};
void writeNibble(I2C_HandleTypeDef *hi2c, uint8_t reg, uint8_t nibble) {
uint8_t setup = 0x00;
uint8_t data = 0x00;
uint8_t closing = 0x00;
if(reg == 1) {
setup = 0b00001101;
HAL_I2C_Master_Transmit(hi2c, LCD6502_ADDR, &setup, strlen(setup), 100);
HAL_Delay(10);
data = (nibble << 4) | 0b00001101;
HAL_I2C_Master_Transmit(hi2c, LCD6502_ADDR, &data, strlen(data), 100);
HAL_Delay(10);
closing = (nibble << 4) | 0b00001001;
HAL_I2C_Master_Transmit(hi2c, LCD6502_ADDR, &closing, strlen(closing), 100);
} else if (reg == 0) {
setup = 0b00001100;
HAL_I2C_Master_Transmit(hi2c, LCD6502_ADDR, &setup, strlen(setup), 100);
HAL_Delay(1);
data = (nibble << 4) | 0b00001100;
HAL_I2C_Master_Transmit(hi2c, LCD6502_ADDR, &data, strlen(data), 100);
HAL_Delay(1);
closing = (nibble << 4) | 0b00001000;
HAL_I2C_Master_Transmit(hi2c, LCD6502_ADDR, &closing, strlen(closing), 100);
}
}
void writeByte(I2C_HandleTypeDef *hi2c, uint8_t reg, uint8_t byte) {
uint8_t highNibble = 0x0F & (byte >> 4);
uint8_t lowNibble = 0x0F & byte;
writeNibble(hi2c, reg, highNibble);
HAL_Delay(5);
writeNibble(hi2c, reg, lowNibble);
}
void initLCD(I2C_HandleTypeDef *hi2c) {
writeNibble(hi2c, CR, 0b00000010);
writeByte(hi2c, CR, 0b00101000);
writeByte(hi2c, CR, 0b00001111);
writeByte(hi2c, CR, 0b00000001);
}
uint8_t readNibble(I2C_HandleTypeDef *hi2c, uint8_t reg) {
uint8_t setup = 0x00;
uint8_t data = 0x00;
uint8_t closing = 0x00;
uint8_t byte = 0x00;
if(reg == 1) {
setup = 0b00001111;
HAL_I2C_Master_Transmit(hi2c, LCD6502_ADDR, &setup, strlen(setup), 100);
HAL_Delay(1);
HAL_I2C_Master_Receive(hi2c, LCD6502_ADDR, &data, strlen(data), 100);
HAL_Delay(1);
closing = 0b00001011;
HAL_I2C_Master_Transmit(hi2c, LCD6502_ADDR, closing, strlen(closing), 100);
} else if (reg == 0) {
setup = 0b00001110;
HAL_I2C_Master_Transmit(hi2c, LCD6502_ADDR, &setup, strlen(setup), 100);
HAL_Delay(1);
HAL_I2C_Master_Receive(hi2c, LCD6502_ADDR, data, strlen(data), 100);
HAL_Delay(1);
closing = 0b00001010;
HAL_I2C_Master_Transmit(hi2c, LCD6502_ADDR, closing, strlen(closing), 100);
}
return data;
}
uint8_t readByte(I2C_HandleTypeDef *hi2c, uint8_t reg) {
uint8_t highNibble = 0x00;
uint8_t lowNibble = 0x00;
uint8_t byte = 0x00;
highNibble = readNibble(hi2c, reg);
HAL_Delay(1);
lowNibble = readNibble(hi2c, reg);
byte = (highNibble << 4) | lowNibble;
return byte;
}
void lcd_putc(I2C_HandleTypeDef *hi2c, uint8_t c) {
writeByte(hi2c, DR, c);
}
void lcd_puts(I2C_HandleTypeDef *hi2c, uint8_t *s) {
// uint8_t address = 0x00;
while(*s != '\0') {
// if(readByte(hi2c, 0) & 0b01111111 == 0x0F) { // ignore the busy flag
// // Set the DDRAM address
// writeByte(hi2c, 0, )
// }
lcd_putc(hi2c, *s);
s++;
}
}
AI: Problem is using strlen on bytes, if you want to send one byte just use 1 as the length.
|
H: Is most of non-isolated power supply "safe"?
I need a large power supply (a little over 1kW) for a consumer appliance that only has a single on/off switch and some non-conductive handles. An off-the-shelf isolated supplies run at least $60 for a sketchy Chinese supply that only supports either US or EU mains, whereas I could probably produce something similar to the following schematic for <$20 that would support both US and EU mains:
A lot of the cost savings would just be because I can afford to run the supply "dirtier" (higher ripple current) on input bulk capacitor(s). Even the output can be somewhat dirty, but I would plan to clean it up by using "smart" switching on the input to the buck converter.
However, safety is a concern. While from what I could tell from regulations there is no requirement that the power be isolated for my application, I would feel pretty bad (not to mention the financial ramifications) if someone got hurt somehow using a non-isolated design (e.g. got water into it and got shocked, if that's even possible). However, it seems like only a small portion of a non-isolated circuit is actually dangerous. As annotated in the schematic, is it true that mains is only dangerous to the extent that high voltages are involved, and that stepped-down but non-isolated voltages later in the circuit are "safe"?
Also note: I would plan to earth ground the metal case of the device (such that a short to live, and potentially neutral, would blow a fuse). And also, I would definitely have whatever final design I came up with reviewed by some experts; I'm just wondering if this is a plausible direction, given that using an isolated supply would probably make the product economically infeasible.
Edit: I'm going for 48V and actually closer to 1.2kW.
Sorry for not clarifying, but that ground symbol was not meant to mean that the circuit was connected to Earth (which would short the bridge), but rather just something I placed as required by the simulation software. The output side would be disconnected from any of L/N/G prongs, which I guess could cause some common mode voltage swing. However, the metal case would be earth grounded (and isolated from the rest of the circuit). Then if the live or the ground reference of the output side connected to the case the fuse would blow, but I guess if the pre-bridge neutral connected to the case, that may not be detected if there isn't an RCD (or I could add a low-rated fuse on the Earth ground path).
AI: No, even if that was only a 5V supply for digital logic, it is hazardous and unsafe. So at least your rectangle of unsafe voltages is too small. It will extend to all components and wires going into the box. That is because what you drew as the 0V or ground symbol, will actually have peaks of minus 325V in EU and half of that in the US during the negative sine wave cycle. So your supply voltage is not safe and it must not come contact with humans and it must not have connections to any other devices external to the box.
|
H: Question about open drain
In which region does a NMOS work when its drain is open circuit? Let's say the input is high voltage lavel, how can I determine whether it is saturation of triode region when drain is open?
AI: When the drain is completely open, there's no current :-) You need to think about a load on the OD = e.g. a pull-up resistor or a constant current source. Maybe your reasoning can take off from there.
|
H: Help in understanding a IR repeater schematic
I'm relatively new to electronics projects, as a hobby. So please bear with me. I want to build an Infrared Repeater as a small project. I've found a component which I think will work nicely for the job. TSMP4138. Its an IR sensor, which will output a modulated signal. In the datasheet (which is linked), there is an example application circuit. For the purpose of my own learning, I want to understand all the components in the schematic, and why they are there. There are 3 resistors, and 2 capacitors in the diagram which im struggling to understand their use. If anyone could help me with some explainations, it would be greatly appreciated.
I do understand that the two IR LEDs (TSAL6400) need to have a resisitor, but I cannot work out the calculation to understand why its a 3ohm resistor.
AI: It looks like a simple design if you can learn to choose a driver transistor for these parts.
The design for 300mA might appear simple with these values using the model I made for this IR LED nominal values.
But getting there takes some trial and error with good NPN switches and effort in simulating datasheets.
Necessary details
You won't be able to work out the LED current until you have lots of engineering experience with diodes and transistor properties.
Once that is accomplished the solution is simply to match the transistor to the design specs and tweak the resistor values as required.
I can estimate the diode's quadratic VI properties into a linear curve over the desired linear range of current.
Although the LED can handle 1A max it is also limited to an ABSOLUTE MAX of 160mW and 85'C so choosing a safe margin is wise. The duty cycle is expected to 50% with continuous 20~30kHz carrier and then reduced by the amplitude modulated data stream. Thus 320 mW peak might be a safe peak value and possibly with 50% 0's & 1's 640mW peak.
Looking the VI chart for this LED 1.6V @ 330mA = 528mW may be a safe peak limit pending review on the data pattern.
There is always going to be some error involved with LED variances, ambient temperature etc so having good design specs is critical to this process of choosing R values, currents and transistors. There can be a lot of errors made in assumptions.
Now digitizing the Log I vs Vf chart and converting to linear I get the following spreadsheet using a 2nd order Polynomial curve fit:
Note I computed the average of 3 Voltages and divided by 3 curre ents to estimate the tangent slope or series resistance of the diode for each current level. Then I tweaked some graph reads to smooth the curve.
The result is a rough estimate formula for diode resistance and voltage based on a curve fit with a very small residual error.
To use the power limits above I chose from 240 to 360mA $$V_f= 1.2+I_f*5.5 Ω$$
Now the same can be done for the power transistor and I expect an Rs or Rce value around 1.5Ω which I know from experience is about a package rated for approx 1 W to achieve that low Rs value. A PN2222A being quite low is around 4Ω might require a lower Re =0 and get too hot.
Two LEDs going to 5V simply does not make sense as the LED voltage is not 2V unless you go to 800mA peak and a lower duty cycle for power with a bigger power transistor.
hFE is also a huge variable because in order to get say 300mA I started from here.
Ve= 0.90V
Vbe=0.75V
Vb=Ve+Vbe=1.65V which means Ib= (3-1.65)/680Ω= 2mA
thus hFE=300mA/2mA=150
When Vce drops below 1 at 10% of rated current the hFE drops towards 10% of its peak current gain. So hFE = 150 is unrealistic for a power switch and 20 to 50 is more reasonable than 10.
Here is my proof of design
Vf= 1.46V @ 230mA
Vce = 845 mV @ hFE=100
Vre = ~ 700 mV @ 230 mA across 3Ω
I won't complete the design with a transistor choice, but I just want to show you that it is not simply Ohm's Law unless you figure out the quasi-linear values for each part and choose binned high hFE value power transistors or low RdsON Nch FET which would be more expensive in high volume but much simpler for design.
This design can be easily made to work yet hard to predict Ic and standard deviation since saturating transistors have extremely wide tolerances on Rce=Vce/Ice and hFE.
Added Notes
Let me be clear, the base and collector current is not well defined in this unregulated 3V design. The transistor is well into saturation yet will never operate at the same conditions defined in the datasheet for Vce(sat) @ Ie with Ic/Ib = 10 = hFE. It will end up with hFE being much higher than 10, yet less than the linear region with Vce=10 as defined in tables, but a nominal value may be found in figures, but not easily. So my strategy is to create a linear saturation algorithm for Vce(sat)= Vth+Ic*Rce exactly as I did for the LED in the desired quasi-linear bulk ohmic range.
After doing this for hundreds of designs, there is a relationship between the saturation resistance and Pmax for all diodes and transistors that is reliable when used over a limited range instead of the usual quadratic behaviour.
e.g. \$V_{cc}=V_{led}+V_{ce}+I_c*R_e\$
using my data for a MMBT2222A-7-F (NPN) Vf=0.05+Ic*2Ω
\$3V= {1.2V+If*5.5Ω} + {0.05+Ic*2Ω} +Ie*3Ω \$
3V= 1.25V+ I*(5.5+2+3=10.5) (simplifying, let I=If=Ic=Ie) and solving I=167mA means Re may have to be reduced from 3Ω to 2Ω for this device.
This is all from datasheets for T=25'C which won't be true if the device heats up and current will increase as Vbe and Vf reduce with rising temp.
|
H: Reed switch only triggers with scope probe connected
I've run into a very odd problem. I've created the attached circuit, designed to cut power supply when a magnet is brought near the device. It works perfectly with the reed switch disconnected from the circuit. However, when everything is powered up, the reed switch doesn't react to the magnet at all unless I put an oscilloscope probe on pin 2 (NC) of the reed switch, at which point everything works as expected. Datasheet for the reed switch.
AI: You're reed switch will pull your enable pin high when closed, but will float the pin when open.
When you connect the scope probe, this acts like a large (1MOhm) pull-down resistor which will set the enable pin low when the reed switch is open. This is important as the internal pull-down resistor on the pin is disconnected when the device is enabled, so cannot be relied upon.
A simple fix is to connect a pull-down resistor, say 10k or 100k, between EN and GND. This will pull the pin low when the reed switch is open and ensure the device is shut down.
|
H: How does this modified H-bridge circuit work?
I am trying to design a circuit which will have as an input a single microcontroller pulse which will cause a circuit with two 555 timers to output two consecutive pulses which are able to have their pulsewidths adjusted through potentiometers. I want to create a circuit which will take these two square waves and produce alternate positive and negative pulses of a much higher adjustable voltage (between 10v and 48v).
I have found this circuit on the internet which I've modified slightly to use 48V instead of 110V and simulating it shows that it does what I want it to do however I would like to understand how it is actually working. I recognise that the four central transistors (2 NPN and 2 PNP) form an H-bridge configuration however I don't understand exactly what the other transistors in the circuit are doing. My question is what is the purpose of Q5/Q6 together with the capacitor and zener diode combination on the base and the capacitor and 1k resistor between the emitter of Q5 and base of Q1 (or emitter of Q6 and base of Q2)? How were the values in the circuit selected to perform this functionality?
I'm trying to understand the circuit from a design perspective.
edit:
The Zener/Capacitor combination seems to be the simplest kind of voltage regulator that there is and I think it's purpose is to keep Q5 or Q6 always on by dropping any excess current from the V1 supply across itself to ground.
AI: First of all, there is an error in your schematic. R4 needs to be connected between R3 and the base of Q1. Similarly for R8 on the other side. As shown, the circuit will not work — all of the transistors in the H bridge will be turned on simultaneously, shorting out your power supply. But even with this fix, you must never operate this circuit without the pulse generators "A" and "B" connected, for the same reason.
Getting back to your actual question, Q1 is switched on and off by the logic-level pulse coming from "A". Obviously, if Q1 is conducting, then Q3 must not be. Q5 is being used as a common-base switch in order to make that happen.
D1 is supposed to be a zener diode (however, that's the wrong symbol in your schematic) with a rating that's roughly equal to your logic-high voltage on "A" — probably 4.7 or 5.1 V. Along with R5 and C2, it holds the base of Q5 at a constant voltage. When A is low, Q5 is turned on, which also turns on Q3. But when A goes high, Q5 is now cut off, and so is Q3.
Note that a separate circuit for the base of Q6 on the other side is not really necessary — the bases of Q5 and Q6 could be connected to the same zener diode. Or indeed, they could simply be connected directly to the same power supply that's driving your "A" and "B" pulse generators.
|
H: LTspice simulation problem when changing the load
I have this simulation. I tried to do a simulation for observing cross regulation problem:
Here are the results:
The two outputs are equal and stable which is normal.
Nevertheless when I change the load on one secondary, it is completely unstable. I must always have the same loads to have stable outputs. I do not understand why it happens.
----------EDIT--------------------------------------------------------------
SHEET 1 884 680
WIRE 560 -272 384 -272
WIRE 656 -272 624 -272
WIRE 800 -272 656 -272
WIRE -96 -256 -432 -256
WIRE 96 -256 -96 -256
WIRE 384 -240 384 -272
WIRE 656 -240 656 -272
WIRE 800 -240 800 -272
WIRE 96 -208 96 -256
WIRE -432 -192 -432 -256
WIRE -96 -192 -96 -256
WIRE 384 -112 384 -160
WIRE 656 -112 656 -176
WIRE 656 -112 384 -112
WIRE 800 -112 800 -160
WIRE 800 -112 656 -112
WIRE 656 -96 656 -112
WIRE -432 -80 -432 -112
WIRE 560 -48 384 -48
WIRE 656 -48 624 -48
WIRE 800 -48 656 -48
WIRE -96 -32 -96 -128
WIRE 96 -32 96 -128
WIRE 96 -32 -96 -32
WIRE 384 -16 384 -48
WIRE 656 -16 656 -48
WIRE 800 -16 800 -48
WIRE 96 0 96 -32
WIRE 224 0 96 0
WIRE 96 32 96 0
WIRE 48 48 -128 48
WIRE 224 48 224 0
WIRE -128 64 -128 48
WIRE 48 96 16 96
WIRE 384 112 384 64
WIRE 656 112 656 48
WIRE 656 112 384 112
WIRE 800 112 800 64
WIRE 800 112 656 112
WIRE 656 128 656 112
WIRE 96 208 96 112
WIRE 224 208 224 112
WIRE 224 208 96 208
WIRE -128 256 -128 144
WIRE 16 256 16 96
WIRE 96 256 96 208
FLAG 656 128 0
FLAG -432 -80 0
FLAG 96 256 0
FLAG -128 256 0
FLAG 16 256 0
FLAG 656 -96 0
SYMBOL ind2 80 -112 M180
WINDOW 0 36 80 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName L1
SYMATTR Value {Lmag}
SYMATTR Type ind
SYMBOL ind2 400 -32 M0
SYMATTR InstName L3
SYMATTR Value {Lmag}
SYMATTR Type ind
SYMBOL TVSdiode -112 -192 R0
SYMATTR InstName D1
SYMATTR Value TVS
SYMBOL diode 240 112 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D2
SYMBOL sw 96 128 M180
SYMATTR InstName S1
SYMBOL voltage -128 48 R0
WINDOW 3 -305 273 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value PULSE(0 10 0 {transient_time} {transient_time} {D/freq} {1/freq} {Nbcycles})
SYMATTR InstName V1
SYMBOL diode 560 -32 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D4
SYMBOL cap 640 -16 R0
WINDOW 3 -91 54 Left 2
SYMATTR Value 1µ Rser = 1m ic = 0
SYMATTR InstName C1
SYMBOL res 784 -32 R0
SYMATTR InstName R2
SYMATTR Value 15R
SYMBOL voltage -432 -208 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 50
SYMBOL ind2 400 -256 M0
SYMATTR InstName L2
SYMATTR Value {Lmag}
SYMATTR Type ind
SYMBOL diode 560 -256 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D3
SYMBOL cap 640 -240 R0
WINDOW 3 -91 54 Left 2
SYMATTR Value 1µ Rser = 1m ic = 0
SYMATTR InstName C2
SYMBOL res 784 -256 R0
SYMATTR InstName R1
SYMATTR Value 15R
TEXT 136 -104 Left 2 !K L1 L2 L3 1
TEXT -448 -504 Left 2 !.model sw sw ron = 10n roff = 10meg vt =0.5 vh = -0.5
TEXT -440 -400 Left 2 !.param freq = 100k D = 0.2 Nbcycles = 500 transient_time = 1/(2*freq*1000)
TEXT -440 -368 Left 2 !.param Lmag = 100u Lleak = 1p Coupling_factor = sqrt(1-Lleak/Lmag)
TEXT -448 -480 Left 2 !.model d d ron = 10n roff = 10meg vfwd = 0.7 vrev = 1k epsilon = 0.1 revepsilon = 50n
TEXT -448 -456 Left 2 !.model tvs d ron = 0.1 roff = 10meg vfwd = 100 vrev = 100 epsilon = 1 revepsilon = 1
TEXT -448 -320 Left 2 !.tran 0 {Nbcycles/freq} {(Nbcycles-50)/freq}
AI: There are a few quirks you should know about simulators, in general: they are number crunching programs and, as such, they work with a finite underlying precision; in this case, double. Regarding precision, it is advisable to avoid too many orders of magnitude difference between adjacent variables (and not only) in the matrix solver. For example, using 10n = 10e-9 and 10Meg = 10e6 next to each other (in the .model for the VCSW and the diode) means the difference between those values is 1e15, which is sensibly close to 2.22e-16 in the case of double. Changing Ron=10m is a much better choice. If you're worrying that those 10m might influence negatively your simulation, don't, the values are small enough even for a real-life case; the influence will be so small it would not be perceived. But, if you're that worried, try 10u...100u, it should suffice even for sub-unity loads. The same for the diode's revepsilon, 50n -> 50m (epsilon and revepsilon model the quadratic regions for the diode, greatly helping convergence).
So the solution is to replace those three values. What you saw was the effect of an ill-conditioned matrix, which somehow worked in the first case, when the two secondaries were identical and, thus, the matrix solver could (presumably) make some simplifications, but not in the 2nd case, when everything needed to be treated separately.
There's one thing you should know: the coupling factor. You are explicitely using k L1 L2 L3 1, despite declaring Lmag and Lleak as .params (but you knew that, didn't you?). However, LTspice internally limits k to ±0.999'999 (whithin float precision). Your chosen values for Lmag=100u and Lleak=1p translate in a coupling factor of sqrt(1 - Lleak/Lmag) = 0.999'999'995, which is beyond the limit. This doesn't affect the simulation, just so you know that it won't work as you think it should.
Two last mentions: the number of cycles for the PULSE() source is not a mandatory parameter, so it can be omitted, and the .model card for the VCSW specifies vt=0.5 vh=-0.5, which means that the thresholds will be at 0 V and 1 V. But the driver swings from 0...10 V, which is useless for level=1. If the level is not specified, it defaults to 1, otherwise, the level=2 VCSW is never fully on or fully off, because the transfer function involves a hyperbolic tangent -- which also means that the derivatives are continuous everywhere.
|
H: LDOs in series and impedance
I am unable to understand one thing. I have a 2 LDOs in series , the first a regular LDO with a normal impedance and second is a shunt regulator with an ultra low impedance .
What will my load see... the 2 impatiences added or only the last impedance (from shunt regulator)
AI: it should be the last regulator in the chain with ultra low impedance. Do you have a schematic or part numbers for these regulators ?
|
H: Why does attaching the case to the PCB ground plane cause the audio to cut out on my cassette player?
I bought a NIB (new in box) cassette recorder on eBay recently but have had problems with the audio from the start. The issue was that touching the dials could cause the audio to crackle, go quiet, or cut out entirely.
It took some time and a lot of triage to narrow the issue down to something unexpected. The problem is with the screw that connects the PCB ground to the case. The reason it appeared to be the dials was because the PCB was being nudged slightly against this screw (it was very confusing to locate this problem!).
Here is an overview of the PCB:
This is the point at which the PCB ground plane connects to the metal inside (the housing is all plastic):
The issue is when I add the screw here and begin to tighten it. Screwing it in enough to achieve continuity between the case and the ground plane does not create any noticeable distortion. But if I continuing to tighten it then the audio will begin to crackle, become very quiet, and then cut out entirely. This only affects the audio signal; the tape continues to play as the motor spins.
I tried adding a steel washer to ensure a good contact with the ground plane but it made no difference with the previous description:
I made sure that this was not a fault of the PCB due to pressure or flex. I flexed the board manually and applied pressure to the location where the screw would be with my finger as well as the back of my plastic screwdriver. The audio is perfect without the screw being present but this also remove all continuity with the case:
What I don't understand is why this only happens if the screw is tightened. Simple continuity with the case does not cause the audio to cut out. For example, the tape is playing just fine as I bright the ground plane with the case here:
This issue occurs whether the cassette player is powered by batteries or the DC barrel jack. The player also has an option to be powered by AC with what I think is an AC/DC converter inside (not visible in the photos).
I could use a non-conductive screw or a plastic washer to "fix" the problem but then the case is no longer grounded.
I am interested in a solution that solves the problem safely but I also want to u the audio cuts out only when the screw is tightened and not just from achieving continuity with the case.
I am new to electronics. Shouldn't the case always be connected to ground for safely in the event that it somehow becomes live?
UPDATE
I added a small piece of heat shrink between the screw and the ground plane contact to test for sure whether or not this was a mechanical issue. I was able to tighten the screw fully without any of the previously described issues. This does not appear to be a problem with mechanical stress around the area. Continuity between the screw and the case was confirmed as well as no continuity between the screw or case with the ground plane of the PCB when the heat shrink was used.
UPDATE
The answer provided by JRE indicated the cause of the problem. Sure enough, there was a large filter capacitor on the reverse side of the board that was just barely touching another metal standoff. The degree of which it touched probably changed as I handled the board but it would always short itself when the ground screw was fully tightened.
I bent the capacitor back and the problem went away. It was probably some kind of filter capacitor that connected up with the speaker; grounding it caused the audio to cut out.
I'm glad that I tested it only with batteries or my fused power supply connected. I guess that means that the chassis could have been live if I'd used the AC adapter?
AI: Your PCB is attached to a metal plate. There are components on the PCB between the PCB and the metal plate.
Very likely there is a component that is just a little too tall. As long as the screw isn't completely tight, there's a tiny gap between the component and the plate. If you tighten the screw really tight, the component touches the plate and causes a short to ground.
Take out the PCB, turn it over, and look for parts that stand up higher than the others. See if those "too tall" parts can touch the metal plate.
|
H: bjt diode analogy confusion
I am studying bjts and one thing keeps me troubled. Bjts are shown as 2 diodes put together back to back but when I study this (let's say for npn), it is okay for base current flow to emitter as the diode between them is forward biased but I see that no current should flow from collector to emitter as there is diode which is reverse biased in between collector and base, which is on the way to emitter from collector. However, we get a current flow from collector to emitter anyways. Can you explain so that I can better understand Bjt circuits.
AI: When the middle region, the base, is very very thin ( microns or less, in modern BJTs ), there is interaction between the forward-biased emitter_base junction and the reverse_biased collector_base junction.
What type of interaction? You might find this answer amusing. A guy with 10_year_old PhD in semiconductor_physics (in other words, lots of training and then 10 years experience and lots of time to discuss his evolving intuition with other people) explained the BJT behavior to me, like this:::::
"When the emitter_contributed carriers enter the base region, with the purpose of colliding with base_contributed carriers and CANCELLING the base carriers, MOST of the emitted carriers miss their targets and are very rapidly sucked over to the Collector region where there is a HIGH VOLTAGE GRADIENT."
Summary: the bipolar transistor depends on emitted carriers MISSING THEIR TARGETS almost all the time, and being collected in the collector.
The ratio of misses_to_hits is the very very useful BETA, which gives power gain to that mélange of junctions and dopings and external contacts we call a BJT.
Why is BETA important? Its basically the # of electrons OUT, per electron in.
==========================================
The challenge in the earliest BJT prototyping was achieving the extreme closeness between emitter and collector contacts, so their junctions could interact.
The first production BJTs were "point contact"; the base was a huge blob of doped silicon, with the Emitter and Collector being tiny regions thrown at the base material, with two tiny wires touching the Em and Col regions.
Eventually, the production houses discovered "planar" multi-layer fabrication.
However, one source of BJTs in modern semiconductor production is still the Point Contact, in the form of FETs and their underlying WELL.
The Source and Drain become the Emitter and Collector (often with no functional difference nor physical difference). The tub in which the FET was constructed is the WELL, and that is your base.
One horrid failure mechanism for semiconductors is "triggering the parasitic bipolar behavior", which means transient charges become high enough to turn on the "base region" and that turns on the collector current. This is called the BIPOLAR SNAPBACK failure.
I once had to diagnose a legacy FET IC in extremely high volume production [approaching 100,000,000 pieces a year] that would occasionally fail at various (undefined) conditions; the various users just returned the failed ICs with "It failed; we don't know why." And they would not discuss what they had changed, because "We've never had these fail before. That is why we buy this Part from your company." yet you knew the failures were in a new design with difference PCB layout and perhaps at higher clock rates, etc.
Turned out, under HIGH TRANSIENTS, mainly ringing on VDD pins with slewrate of 1volt/1nanosecond (or 1 Billion volts/second transient), the capacitively injected charges would ----- turn on the parasitic bipolars under the FETs.
Cure was to insert lots more "BASE" contacts, which we normally called "Well ties".
How did this happen? The ICs were characterized, decades prior, with DC_conditions. With DC_conditions, only leakage currents had to be gathered up by the Well ties, and sparse Well ties were adequate.
Took me about 3 months of fairly dedicated thinking, and staring at a Hanamatsu Recombination_Detection microscope, to realize the problem.
The trick was to find a way to "tickle the tail of the Dragon", to have the FETs enter the snapback behavior ---- but not self_destruct !! ---- and then have the circuit quench the snapback behavior so the localized heating would not destroy the FET under test, then do this again and again at high speed, so the microscope could produce photographs of the regions getting hot.
|
H: Capacitor - About Dissipation Factor and Ripple current (mA/rms)
I m actually reading a capacitor datasheet which specifies the ripple current and the dissipation factor. This one:
https://datasheet.octopart.com/CA035M0100REH-0607-Yageo-datasheet-12513699.pdf
As you can see the ripple current and the dissipation factor are given for a frequency. But clearly I will not operate at this frequency... And I would like to know how the ripple current (which is adviced to do not reduce the life time of the capacitors) evolve in function of the frequency? Same question for the dissipation factor.
Thank you very much and have a nice day! :D
AI: I'm going to use a different capacitor data sheet to more easily explain this. Consider a 100 uF 35 volt capacitor such as this one from Farnell: -
The important things to note are in red above. It has a quoted ESR of 0.16 ohms and the dissipation factor is calculated as: -
$$DF = \dfrac{\text{ESR}}{X_C} = \text{ESR}\cdot 2\cdot\pi\cdot f\cdot C$$
Corrected below - error in decimal places impacted the words and the analysis hence, there are changes.
If you plug in the numbers (at 120 Hz) you get a dissipation factor of 0.01206 and this is ten times lower than the quoted figure of 0.12. If you calculated ESR using a DF of 0.12 you get 1.59 ohms at 120 Hz. Given that we know that the real series resistance is 0.16 ohms, 1.43 ohms of the 1.59 ohms at 120 Hz is due to dielectric losses.
Personally, I like to see dielectric loss placed in parallel with the capacitor so, if you want, you can convert the series 1.43 ohms to a parallel resistance of 124.44 ohms and your equivalent capacitor becomes this at 120 Hz: -
This makes more sense to me because at low frequencies, the dielectric will have a large voltage across it whereas at 100 kHz, due to the capacitive reactance being so low, the dielectric will not be presented with a large voltage at the specified ripple current.
But clearly I will not operate at this frequency
Well, my advice is to find a component that covers the operating frequency you want for the ripple current. The Panasonic device has a ripple current specified up to 100 kHz and I would much rather trust this one than one that is unspecified at higher frequencies.
I would like to know how the ripple current (which is advised to do
not reduce the life time of the capacitors) evolve in function of the
frequency ?
The ripple current is defined by your usage of the capacitor in your circuit. If you can't estimate it, run a simulation and get an answer that way. I can't tell you what ripple current your circuit has; there are certain things that you have to calculate based on your knowledge or your circuit.
Same question for the dissipation factor
The formula for DF is given higher up. Note that ESR is defined at 100 kHz so this is a decent benchmark for quality if you are using high frequencies. The device in the question is more suited as a bulk capacitor in a regular transformer-bridge rectifier power supply because 120 Hz is the ripple frequency when the AC is at 60 Hz.
Regards the lifetime of the capacitor, the one in the question is rated at 85 °C whereas the one I linked is rated at 105 °C and that usually means that the Panasonic device will endure 4 times longer. Every 10 °C above the working ambient temperature doubles the endurance time.
|
H: Capacitance of 2 angled conducting plates
I have to determine the capacitance of 2 conducting plate (fringe fields are ignored) with a certain area (5m^2 here) with a gap separating them (4mm here). The second plate is inclined at an angle of 45 degrees. The dielectric between the plates has Epsilon_r = 1.5
Now I have found a solution online by applying the boundary problem, and the result is 444pF. However, in my major we don't cover differential equations so we have to solve this problem using the "Gauss' method" by assuming one plate has a charge Q while the other has a charge -Q then getting the electric field and the voltage. From there we can get the capacitance by C = Q/V
Now, if we ignore the fringe field the electric field would only by in the direction of the angle Phi (assuming cylindrical coordinates are used).
However that doesn't achieve the final results after getting the voltage. What's wrong here? What's the correct procedure to solve this problem?
Here is how the book list the way to solve these problems:
AI: Those steps described by the textbook apply mostly to situations where there is a lot of symmetry in the problem so that you can easily calculate the voltage between the conductors knowing only the total charge on the conductors. You will have to be more creative than following the recipe described in the text.
The charge distribution on these conductors will be very strongly nonuniform, with most of the charge accumulating closer to where the conductors almost meet. Most of the contribution to the capacitance will come from these regions, where you could make a decent assumption that the electric field lines run along lines of constant \$\rho\$.
For this problem, I would suggest you start by assuming a known voltage difference V between the plates. You need two key insights to solve this problem:
You can approximate the E-field as being constant magnitude along lines of constant \$\rho\$, but as a function of \$\rho\$. This is an 'ignore the fringe field' approximation.
You can find the surface charge density at a distance \$\rho\$ based on the electric field at a distance \$\rho\$. Hopefully you have done this before in a separate problem (hint- infinitesimal Gaussian pillbox near the surface of the conductor)
From that you will perform an integration like Dave Tweed is describing to get the total charge on each plate, which will depend on V. I think you know the rest.
|
H: PCB low power self heating component separation
I am an EE that is fresh out of college and and starting at a smaller company, and I have a question about electronic self heating, and how to keep heat from spreading in a PCB to heat sensitive components, such as thermistors that are being used to measure ambient temperature, currently there is issues in a few designs, where the temperature inside the housing increases by half a degree C with traces run directly to the thermistor without thermal reliefs or and care to trace size. The devices I have seen having trouble are usually attempting to read ambient temperature at .25% accuracy between the ranges of -20 to 85c (currently done on some designs by having two separate boards in the enclosure with small wires run between the two)
The "hot" components are mainly the switching supply, and the MCU, in most cases for some designs I am looking at, they run at 10-20 mW, and the PCB size would generally be around 2in x 4in.
Would it be better to run large ground planes underneath these components to try and dissipate the heat on that side of the board? Or would the heat just transfer to the pcb's dielectric and heat up the thermistor that way?
Also, would it be better to run thinner traces with thermal reliefs to the thermistor to cut back on heat transfer through the traces, or would it be better to run wider traces to try and dissipate heat before getting to the thermistor?
The common value of thermistor I am looking at is a 10k-2 NTC.
AI: Here is an approach to thermal isolation while maintaining some mechanical strength -(the chip is an ovenized buried zener voltage reference- it would have a urethane foam insulator over it in actual operation): As well as the wide routed slots, notice the thinner ones to the left and right and the slots to the top and bottom.
The copper, even 34\$\mu\$m copper, will conduct a lot of the heat, so narrower and longer traces are called for, as well as limiting the amount of laminate (thermal conductivity is proportional to cross sectional area divided by length).
The thermal conductivity of PCB laminate is anisotropic and is much higher parallel to the surface than through the PCB due to the direction of the weave in the fiberglass cloth. For that reason, rotating the pattern 45° might make a noticeable difference.
But, personally, I would V-groove or mouse-bite the PCB with a thin soldered or socketed jumper over it and then snap it off and assemble it with insulation between the two if accuracy is that important.
Or you could consider just faking it and compensate for the error due to the other circuitry either with a second sensor or a thermal model. That would make an interesting project to burn some time if you're not busy.
P.S. Sometimes you can make use of power dissipation by mounting the hot parts towards the top of a ventilated enclosure so that air at room temperature is drawn in at the bottom, over the sensor. I suspect your power levels are way too low for that to be a useful effect in this case, though.
|
H: Shared IC tape out
I have a IC design about 300*300 micrometers. Due to the high cost of IC tape out, is it possible to fabricate the IC jointly with other people?
Does the company have such a service?
AI: All the majors (TSMC, GlobalFoundaries, Samsung, SMIC, etc.) offer 'shuttle' (multiproject) wafer services. They have regular scheduled runs.
GF: https://www.globalfoundries.com/design-services/multi-project-wafer-program
Samsung: https://www.samsungfoundry.com/foundry/homepage/anonymous/mpwService.do?_mainLayOut=homepageLayout&menuIndex=0307
TSMC: https://www.tsmc.com/english/dedicatedFoundry/services/cyberShuttle.htm
SMIC: http://www.smics.com/en/site/multi_project
It's a common service for any fab really, especially ones with older or specialty processes.
|
H: Are aluminum electrolytic capacitors suitable for encapsulation/potting?
Because aluminum electrolytic capacitors generally incorporate a venting mechanism for over-temperature/over-pressure events, are they suitable for complete encapsulation in potting compound?
Specifically, I am evaluating the compatibility between a surface mount 10V Nichicon UWT-series cap and a polyurethane-based potting compound used in automotive applications.
Is it OK to pot this type of capacitor? If encapsulation is not recommended, what alternate types should I consider for 100µF bulk capacitor purposes?
AI: Here are some cautions from TDK:
Seems like partially potting a capacitor with a top vent (letting the top part poke out) may be acceptable.
Be careful about the temperatures, PU potting compounds are exothermic when curing and can get very hot.
|
H: Beginner's LTSpice Question: Why does my sine wave look so bad and how can I fix it?
I'm planning on building a Spice circuit with variable-gap capacitors. The capacitance in general will be something like C = eps*A/(g0+g'), where g' is the oscillation that occurs on top of the nominal gap position, g0. My first thought was to make a behavioral voltage source that would ultimately be the g' variable.
Prior to making the real circuit, I wanted to mess around with this concept in a beginner's fashion. Below is the general idea, where I have some frequency input and an amplitude called "disp," representing the gap change.
Here is where the problem comes in. When the disp variable is 1e-4, everything seems fine (sine wave with the correct amplitude). But when I go to 1e-5, I get the following picture. I imagine this is some sort of resolution issue? But I wanted to ask and see if there is a solution or if my initial plan is not the smartest way of going about things. I also tried using a normal voltage source with the parameters inputted as the frequency/amplitude of a sine wave. Thanks in advance.
AI: That voltage is rather low.
Simulate->Control Panel and set Absolute Voltage tolerance to something smaller like 1E-7 or 1E-8.
|
H: Lossless compression technique for digital signals in an embedded system
Here's the scenario:
I have an embedded system where an ADC logs a 16-bit potentiostat sample every 2 seconds. The system continues to record data for weeks, making memory usage a concern.
Instead of using up 16-bits of storage for each of the millions of samples, how can I losslessly compress the signal as it is logged? Ideally I'd like to break up the signal into 15 minute compressed segments. I'm sure there's a standard out there for this, but I can't find it.
If it helps, the signal will most often have very low deltas between samples (low frequency).
AI: Compression is all about finding the redundancies in the data and removing them. Since you don't seem to be able to tell us much about your actual data sets, this answer will have to be very generic.
I gather that "potentiostat" data is continuous, varies slowly in general, but might have small deviations from sample to sample. One good way to encode this in 15-minute (450 sample) blocks would be to fit a first-, second- or third-order (or more, depending on the general nature of your data) polynomial to the block of data to capture its overall shape.1
The block would then be encoded as the parameters to that polynomial (perhaps four 16-bit numbers), plus the individual sample deviations from that polynomial, which presumably can be much smaller numbers — perhaps 450 3- or 4-bit numbers, for a total of 1414 or 1864 bits instead of the original 7200 bits — a compression ratio of roughly 4 or 5 to 1.
If you find that you can't use a fixed width for the sample deltas, consider using Huffman encoding to represent them — small values get short codes, while the presumably rarer large values get longer codes. You should still be able to get a compression ratio around 3 to 1, again, depending on your data.
1 If it turns out that the data has a cyclic component, it might be more useful to use autoregression or Fourier analysis to identify the key periodic components (frequency, phase and amplitude), and then record the individual sample deltas from the function defined by those parameters.
|
H: Charging lead acid batteries in parallel?
I recently got my hands on eight 12V 9AH lead acid batteries. Could I simply place them in parallel and charge them with a battery tender without any special measures? Are there any risks involved? Could it damage the batteries?
AI: Most lead-acid batteries charge at a constant 14
4 volts, so charging several in parallel is really just a charge-current issue. If the charger cannot supply enough current it will likely lower the charge voltage to protect itself. As the batteries charge up the voltage will rise, but should NOT go over 14.4 volts, or you could "cook" the batteries, releasing deadly vapors and ruin the batteries ability to hold a charge.
In a nutshell, you can do this but stay away from "wimpy" chargers. Ideally it should have charge current equal to the sum of the AH values of all connected batteries. This means their is a limit to how many you can charge in parallel, as the charge time gets to be untenable. A good 20 amp charger should be fine.
Note that many lead-acid batteries may have a 13.8 volt idle charge rating, so be sure before you invest in a charger.
|
H: Using a 9V battery instead of a DC power supply
I have a DC power adapter that has the following specs:
Input Voltage: 100-240V AC, 50-60Hz, 0.5A
Output Voltage: 9V DC, 1.5A
I am interested in taking a 9V battery and a snap adapter so I can use my device away from my outlet. However I am not sure how to ensure the output will be 9V DC and 1.5A (specifically the 1.5A).
How can I take a 9V battery plus a snap adapter and create a power supply that would be equivalent to the DC power adapter? Do I need to add a 6 Ohm resistor in the loop to ensure that I = V/R or is that too simple?
AI: 9 volt batteries are designed for low current long life applications. Even if you could draw 1.5 Amps at 9V in an ideal setup, with a typical 500 mAh 9V alkaline battery, you would get less than a 3rd of an hour life on it. In reality the battery chemistry will reduce the voltage and current capacity as the current draw increases. From https://www.powerstream.com/9V-Alkaline-tests.htm you can see that a 1 Amp draw for a good battery may only give 90 mAh of capacity and the voltage drops below 7V real quick. That means you will get 7 minutes of battery life. Expensive.
Ideally what you need is modern technology. Aka a nice lithium battery pack with 9V output. You can find these offthe shelf with a usb Power delivery enabled power bank with a USB PD or Quick charge trigger module to get 9V out. These will have safety measures in them and should easily give a few hours at what you need.
Alternatively hack your device. Some devices will have internal regulators or components because they run at a lower voltage, and you may be able to bypass them.
|
H: Why have extra resistor in switch debounce circuit
I am using a Laird BL654 module in my project, and using the dev board schematic to help me. On the reset switch they have an external pull-up of 10k (R112) (in addition to the internal one on the module of 13k), which I understand is to give robustness against ESD. The capacitor C63 I understand is for debounce. What is the 150 ohm resistor for (R34)?
AI: For many reasons. First of all, the external 10k pull-up is not connected by default, and the 10nF capacitor is not populated either. So forget that those exist.
Without knowing any details what the reset connection looks like in the module, it is quite typical for microcontrollers to have a capacitor on their reset pin, so inside the module the MCU could have a capacitor on the reset pin too.
If there is capacitance directly over a pushbutton, pushing the button would short the capacitor and it would discharge with a large current spike. These pushbuttons and capacitors are not rated for such large currents and repeated button pushing could damage the pushbutton contacts or the capacitor.
Also the pushbuttons are not perfect, there might be several rapid transitions shorting and releasing the button contacts when it is pushed. This causes rapid current changes, or high di/dt. The wiring has some inductance, so high di/dt causes voltage spikes due to the inductance, and the voltage spikes may exceed what the module reset pin tolerates without damage. Also there can be high rate of change in voltage dv/dt which can couple capacitively to neighbouring wires.
So when the button has resistance in series, it limits discharge current from any capacitances to safe level that the button and capacitors can handle. This will result in lower changes in current, which will lower the voltage spikes from inductances. Also dv/dt is lower so there is less coupling.
So in short, the resistor is there to limit and slow down current and voltage changes so they don't cause trouble or damage.
|
H: Nodal Analysis using voltage sources
Find v and i in the circuit of Fig.3.11
I modified the circuit like:
and renamed the nodal voltages:
Now applying KCL at the supernode,
$$i_1+i_2=3.5....(i)$$
We know, $$i_1=\frac{v_1}{\frac{12}{7}}, i_2=\frac{v_2}{\frac32} (\text{Note that }\frac{12}{7}=1.714)$$
From equation(i) we get
$$\begin{align}\\
\frac{7v_1}{12}+\frac{2v_2}{3} &=3.5\\
\implies 7v_1+8v_2 &=42.......(ii)\\
\end{align}\\
$$
To get the relationship between \$v_1\$ and \$v_2\$ we apply KVL to the following circuit
$$-v_2+v_1+6=0\\
\implies v_2=v_1+6.....(iii)$$
Now, from equation (ii),
$$7v_1+8(v_1+6)=42\\
\implies 15v_1=-6\\
\implies v_1=-0.4V$$
From equation (iii),
$$v_2= -0.4+6=5.6V$$
So, \$i_1=-\frac{7*0.4}{12}=-0.233A\$.
Hence, from the main figure \$v=-0.233*3=-0.699V\$.
But, in my book the answer is \$v=-400mV\$. Please tell where is my mistake.
AI: Well, I am trying to analyze the following circuit:
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}_1=\text{I}_x+\text{I}_2\\
\\
\text{I}_x=\text{I}_3+\text{I}_4\\
\\
\text{I}_1=\text{I}_2+\text{I}_5\\
\\
\text{I}_5=\text{I}_3+\text{I}_4
\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}_\text{i}-\text{V}_1}{\text{R}_1}\\
\\
\text{I}_2=\frac{\text{V}_1}{\text{R}_2}\\
\\
\text{I}_3=\frac{\text{V}_2}{\text{R}_3}\\
\\
\text{I}_4=\frac{\text{V}_2}{\text{R}_4}
\end{cases}\tag2
$$
We also know that \$\text{V}_x=\text{V}_2-\text{V}_1\$.
Now, because you've to do the math to solve this. I will present a Mathematica code that will solve this problem:
In[1]:=FullSimplify[
Solve[{I1 == Ix + I2, Ix == I3 + I4, I1 == I2 + I5, I5 == I3 + I4,
I1 == (Vi - V1)/R1, I2 == (V1)/R2, I3 == (V2)/R3, I4 == (V2)/R4,
Vx == V2 - V1}, {Ix, I1, I2, I3, I4, I5, V1, V2}]]
Out[1]={{Ix -> ((R3 + R4) (R1 Vx + R2 (Vi + Vx)))/(
R1 R2 R3 + R2 R3 R4 + R1 (R2 + R3) R4),
I1 -> (R3 R4 Vi + R2 (R3 + R4) (Vi + Vx))/(
R1 R2 R3 + R2 R3 R4 + R1 (R2 + R3) R4),
I2 -> (R3 R4 Vi - R1 (R3 + R4) Vx)/(
R1 R2 R3 + R2 R3 R4 + R1 (R2 + R3) R4),
I3 -> (R4 (R1 Vx + R2 (Vi + Vx)))/(
R1 R2 R3 + R2 R3 R4 + R1 (R2 + R3) R4),
I4 -> (R3 (R1 Vx + R2 (Vi + Vx)))/(
R1 R2 R3 + R2 R3 R4 + R1 (R2 + R3) R4),
I5 -> ((R3 + R4) (R1 Vx + R2 (Vi + Vx)))/(
R1 R2 R3 + R2 R3 R4 + R1 (R2 + R3) R4),
V1 -> (R2 R3 R4 Vi - R1 R2 (R3 + R4) Vx)/(
R1 R2 R3 + R2 R3 R4 + R1 (R2 + R3) R4),
V2 -> (R3 R4 (R1 Vx + R2 (Vi + Vx)))/(
R1 R2 R3 + R2 R3 R4 + R1 (R2 + R3) R4)}}
Now, using your values we get:
In[2]:=R1 = 4;
R2 = 3;
R3 = 2;
R4 = 6;
Vi = 14;
Vx = 6;
FullSimplify[
Solve[{I1 == Ix + I2, Ix == I3 + I4, I1 == I2 + I5, I5 == I3 + I4,
I1 == (Vi - V1)/R1, I2 == (V1)/R2, I3 == (V2)/R3, I4 == (V2)/R4,
Vx == V2 - V1}, {Ix, I1, I2, I3, I4, I5, V1, V2}]]
Out[2]={{Ix -> 56/15, I1 -> 18/5, I2 -> -(2/15), I3 -> 14/5, I4 -> 14/15,
I5 -> 56/15, V1 -> -(2/5), V2 -> 28/5}}
So, the answers are \$\text{v}=\text{V}_1=-\frac{2}{5}=-0.4\space\text{V}\$ and \$\text{i}=\text{I}_3=\frac{14}{5}=2.8\space\text{A}\$.
|
H: PCB copper fill
Hi I am new to PCB design and Im still learning. I am wondering what is the reason behind copper fills? I searched online but I could not find an good explanation of the reason of using the copper fills.
AI: It can be used to create a ground or power plane to where all your components ground and power pins can connect to usings vias and there is no need for traces.
It also works as noise innmunity and also a a thermal dissipator
|
H: LC Power filter not achieving modelled attenuation
I am testing an LC power filter and my real world measurements of high frequency (~1.5Mhz) switching spikes show that the attenuation is not remotely close to what my design model suggested.
Situation / Requirements
I have a 6A 7.5V Mean Well SMPS. GST60A07-P1J
It powers ~250 WS2812 addressable RGB LEDs
It's noisy, but an otherwise excellent supply. Even with only a small resistive load of 22 Ohm at ~300mA, (without the WS2812 attached, which run PWM internally so that would be worse) the output looks like this - AC coupled, so zero centered:
The main control loop of the SMPS is rippling at ~ 1Khz. This part is fine because we can clean that up with an LDO. What is not fine, is those switching spikes. They are about 400mV+ peak-to-peak and have very high frequency content which an LDO will not filter. Here is one of those spikes:
Just a visual estimate says that fundamental oscillation of that spike is about 1-2Mhz. My rudimentary FFT capability says there is content above the noise floor up to 5Mhz, which seems about right.
The challenge is that this same power supply needs to also supply the micro controller which runs the WS2812s and also includes some relatively simple analogue circuits and some rudimentary single channel audio. So I am trying to clean this mess up before feeding it to the uC and the analogues. I only need about 200mA of clean supply for the "brains". During testing I am using a 5V LDO, but the final design will be 3.3V.
Attempted solution
The only solution I know how to filter such high frequency content in a power line is a passive LC filter. Semiconductors can't keep up. LDOs PSRR drops quickly. "Capacitor multiplier" type circuits suffer from the same issue - the BJT can't keep up.
I am using the highest HF PSRR LDO I know of downstream of my LC filter: The slightly dated LM2931. This deals with the 1Khz SMPS loop ripple just fine, but it barely touches those spikes.
So I attempted to design and test such an LC filter. I loosely followed this process.
I selected a corner frequency (fc = 1/(sqrt(L*C) * 2pi) of ~1kHz by chosing this RLB0712-101KL 100uH inductor this 100uF Tantalum Capacitor. Note these are through hole components, the final design will be SMC.
I modelled the filter in ngspice with this model circuit (parasitic model components calculated from datasheets, according to that article):
The AC sweep simulation shows this:
Which is as expected from design and shows Vload / Vinput = -52db down (~ 66 - 14) @ 1Mhz and better up to 5Mhz. That would be a great result indeed, as the 400mV spikes would be squashed by factor 400x ( 10^(52/20) ) to ~ 1mV.
Reality
I built a simple test rig on vero board. I kept all leads super short and the whole circuit is just 15x15mm including LC filter and LDO stage with 2 more caps:
So what's the result? Quite disappointing really. I get this:
The yellow channel is the input from the SMPS, and the blue channel (note the scale is 10x less) is the "FilterOutput" node on above schematic - equivalent to Vload in simulation. The peak-to-peak averages in that screenshot show at best a 10:1 attenuation. Not 400:1. (The LDO does fine in getting rid of the 1Khz ripple, that's not the focus here, but it barely further improves the spikes).
Questions
Is my approach "sane"? Did I miss a trick?
Why am I getting 40x less attenuation than the design simulation suggests? Component model? Through hole? Vero board construction ? 1-5Mhz is not very HF, really?
What can I do to squash the spikes? Use a second stage LC filter? Recommended approach to design equations? 4th order Butterworth? Link to article?
Many thanks
AI: I suspect that your scope probing is not ideal. Did you use this type of probing measurement to reduce to "loop" pick-up formed by a conventional scope's probe: -
You can do a simple test to prove it is your probe technique - connect probe top to where the earth clip connects and see what is picked-up - ideally there should be no signal picked up because probe tip = grounding point. I'll guess that you pick-up quite a bit of noise and spikes if you try this.
SMPS's are notorious for screwing with a badly connected probe and you probably need to use a ground spring: -
See also this article on the same subject entitled Power Tip #6: Accurately Measuring Power Supply Ripple.
|
H: What can I use to make n (4) analogue values selectable by a digital pin?
Using an arudino nano as the micro controller, I would like to read a few voltages around my project board.
These values are being read by way of a simple voltage divider circuit for values up to 25v, using 30KΩ and 7.5KΩ resistors on each point I want to read.
My micro-controller only has 1 analogue port free but has many digital ports free. I was wondering what IC would I use to make the voltage to read from any specific sensor selectable via a digital pin and software?
I am very new to this work, so your kindness and patience is greatly appreciated :)
AI: yes you can use a 4:1 analogue multiplexer such as a TMUX1204 or similar device. Do a search for Analogue Multiplexers and you will find many suitable parts ...
|
H: In a circuit schema, why the voltage at the battery anode is conventionally 0V while the voltage at cathode is usually the voltage of the battery?
I will try to explain where my question is coming from.
Knowing that voltage is the electric potential energy per unit of charge at a given point.
And knowing that electrons are pushed from - to go to +
To me that means that the electrons won't have potential energy when arrived at +
And they have the most when starting from -
They should have more potential energy where they are leaving from and less where they are arriving.
That would mean that electrons have more potential energy at - than at +
So in an AA battery (1.5V) I would expect that the voltage at the anode (-) is 1.5V and the voltage at the cathode (+) is 0V
But I am learning the opposite from my course and I do not understand why it is so.
AI: Conventional current is "upside down" with regard to electrons, due to some arbitrary choices of labelling made centuries ago. That's why I normally suggest ignoring them and focusing on conventional current and voltage analysis.
Electrons are negatively charged. Each electron has a charge of minus 1.602176634×10−19 coulombs.
You could label the "negative terminal" -1.5V and the "positive terminal" 0V. Then your negatively charged electrons flow away from the negative side of the field (because similar charges repel) towards the positive side of the field.
(Electrons themselves do not really "carry" energy, the energy is embodied in the field, and the ability of the field to do work on electrons is the energy.)
|
H: MCU controlled power-on sequence
I would like to implement the power-on sequence of an IC. It has 3 different power supplies plus the clock, which has to be enabled after the power supplies. I am considering employing a ATTINY202 for the implementation, while the LDOs all belong to TLV755P family. Clock has not yet been decided, but it will have an EN pin as well.
Now, my main concern is about the initialization (programming) phase of the MCU, on boot. When the MCU boots, until it has complete its own power up sequence and programs itself, the outputs are in High-Z state. That means that the EN pin of the LDOs are, and please correct me if I am wrong, floating. I could not explicitly locate in the datasheet what happens if the EN pin is unconnected, in chapter 7.3.2 Enable (EN), so I am forced to assume that the behavior is undefined.
So, I am worried about that tiny fraction at the very beginning of powering up the PCB. I am thinking of tightening all EN inputs to the ground via a 10 kΩ pull-down resistor, to ensure that nothing is on the LDOs and clock output, but I don't like the idea of the constant current consumption.
Am I missing something? Is the power up time of the MCU insignificant to worry about? Also, could I use 100 kΩ / 1 MΩ pull down resistors safely, to further limit the current?
AI: The pin is floating, so you must pull it down to ensure the regulator remains off. That is indicated in the (typical) 10nA EN input current shown in the datasheet.
There is no maximum listed so you're gambling with resistor value if you make it really high, but let's assume 1uA is safe. So you could use a ~1M resistor or 100K. And maybe parallel it with 100pF so that startup transients have less chance of turning it on (and don't make the PCB layout too too horrific like having the control line closely capacitively coupled to switched Vcc by running it 100mm on the wrong side of the board).
If the startup sequence is for something like a $5000 gate array (or if the cost of a field failure is otherwise quite high) you might want to use hardware to ensure the startup rather than a microcontroller. There are dedicated chips for sequencing and supply supervisory functions that you can buy. Cost might be a bit higher but you don't need to maintain firmware etc., and they generally have guarantees as to operation under unpleasant conditions you may not have considered such as brownout input voltage.
|
H: Equivalent transformer model AN1679/D
I found the following transformer model in the AN1679/D written by ON SEMICONDUCTOR. The document is really interesting and very well explained.
Nevertheless, I do not understand this point, how the two model are equivalent :
If I try to put Ll2 which is at the secondary to the primary, I do not find the relation given :( Here are my calculs :
$$
\mathrm{
L_{l2}*\frac{dI_{0}}{dt} = \frac{N_{p}}{N_{s}}(V_{p}-V_{L1}) -V_{0}
}
$$
and
$$
\mathrm{
L_{l2'}*\frac{N_{s}*dI_{0}}{N_{p}*dt} = V_{p}-V_{L1} -V_{0}
}
$$
We then express each relation equal to
$$
\mathrm{
\frac{dI_{0}}{dt} = \frac{dI_{0}}{dt}
}
$$
For express Ll2 in function of Ll2', and we get the correct relation only if Ns = 1 and Np = 1...
Did I do an error ? I m really interested by this subject !
For informations :
Thank you very much and have a nice day !
AI: We are referring the secondary inductance to the primary to simplify calculations.
For an impedance $$Z = \frac{V}{I}$$.
If any impedance \$Z_s\$ on the secondary is referred to the primary the equation is:
$$Z_p = \frac{V_p/V_s}{I_p/I_s}Z_s = \frac{N_p/N_s}{N_s/N_p}Z_s = \left(\frac{N_p}{N_s}\right)^2Z_s.$$
This can also be checked by calculating a short-circuit test \$(R_\text{load}=0.)\$ The same ratios apply to the inductance \$L\$.
|
H: How do I design preamplifier and amplifier (for a speaker) circuits from scratch?
I am 3rd year electronics student.
I want to design a speaker from the circuit level.
As this is my first time, I have no clear idea how to start and where to start.
Can anyone please suggest to me how to design the pre-amplifier and the amplifier circuit for a speaker from scratch?
AI: Can anyone please suggest me some thing how to design the
Pre-Amplifier and the Amplifier circuit for a speaker from scratch
Start with a specification of what you intend to achieve in terms of performance, power output, distortion level, power supply range, spectrum, input impedance, tone controls, output load impedance requirements, power efficiency etc.. Then, add a block diagram so that each piece of the jigsaw can be designed individually (thus making the job easier to make progress on).
Then research each block using google and put together a circuit. Next is run the circuit using a simulation package and that's when you come back here for answering the problems you may face. If all goes well with that you layout a PCB and solder on the components and fingers-crossed it works but it's likely you'll need to pay another visit back here to debug some things and you might need an oscilloscope to help.
|
H: Designing a haptic feedback motor vibrator circuit
I'm having a Vive Virtual Reality device which has one digital output pin.
Here is the specs for the digital output pin:
My plan is to use a 2N2222 transistor connected to that digital output, with a reverse diode parallel to the vibrator motor to protect for reverse back current from the motor inductance.
Is it sufficent ? is there any other alternatives circuit diagram that would work ?
I plan also to connect several motors, is one transistor like 2N2222 enough for driving 3 motors, which one motor consumes 300mA at peak, motor voltage 12V ?
AI: It would be better to use an n-channel MOSFET such as AO3400A. No base resistor required and it will easily handle the 900mA peak with 3.3V drive. You still need the diode across the motor, of course.
|
H: Can FSMs be Timed and Recursive?
I am reading a textbook Circuit Design with VHDL, 3rd Edition by Volnei Pedroni. There, he claims that there exist 3 categories of finite-state machines - namely, regular, timed (where the output depends on the time as well as on the input), and recursive (where the output also depends ont he previous outputs):
So here's the question: to those two other FSM categories fall under the strict mathematical definition of an FSM? Is it even valid to call them finite-state machines?
UPD: Is the circuit below (which has an "auxiliary register" in addition to the state register) still an FSM?
AI: Timed and recursive state machines are much more common than untimed state machines, at least among state machines that are deliberately designed as state machines rather than circuits designed by some other process that happen to also have the features of state machines. What makes you think these types aren't normally considered "state machines"?
Within the field of digital logic, if a circuit doesn't have recursion (aka feedback) and doesn't depend on time, then we usually call it "combinatorial logic" and consider it as not a state machine.
|
H: How does the Yamaha DX7 digital analog converter work?
The Yamaha DX7 keyboard seems to have a quite sophisticated DAC and I wonder how it works. It is mostly specified as 12-bit DAC running at a sampling rate of 50kHz, but this doesn't tell the whole picture it seems.
The broad bus is the main system data bus, the small busses coming in from the left source in the waveform generating digital IC. The analog audio signal exits by the bottom left and are mixed together later.
There is in fact an BA9221 12-bit DAC IC. But it does not run at 50kHz, but actually 16 times as fast, as the 16 voices the DX7 can play simultanously are time-multiplexed on this IC. This can be easily seen by scope.
However, the BA9221 reference voltage is not fixed but can be controlled by a resistor network wired to an multiplexer (IC46) by the system's digital data bus lines D0 - D2 . No clue on what this depends. The smaller sister model keyboard DX9 seems to lack this multiplexer.
The BA9221 output is fed into another resistor network whose outputs are connected by a digitally controlled switch (IC41), controlled by the digital oscillator IC via the signals SF0-SF3. These signals are individually switched by the voice multiplex frequency and seem to depend on the actual waveform played, each line exhibiting a different pattern. So we can expect this to modify the original signal in a multiplicative way I guess.
The is finally switched again by another digitally controlled switch (IC52). There are two outputs generated, these will mix down to a single signal later (not pictured), there is only one mono output. After analog volume control and amplification the signal is feed to the output jack.
So I would like to know how this exactly works and how to describe its characteristics in nowadays terms. It is obvious that a single channel 12bit signal won't reproduce the signal faithfully. And I wonder why this is so complicated and what is achieved by the all those additional parts.
AI: Indeed all 16 channels are time multiplexed and stored into sample/hold stage for later summation. The sample/hold stage is controlled by the SH pins from the OPS. I have no exact details how it works, but there are two sample/hold stages so most likely half of the channels are summed together into one S/H stage, for reason I don't know. Maybe they are alternated by odd/even channel, or 8+8 channels, due to analog performance, leakage, etc. It can be solved by taking a look at SH pins with scope (I don't have a DX7, please figure out if you do).
The DAC itself is 12-bit, but external to the DAC is an analog multiplexer which can divide down or shift the analog value so the result has a 12-bit precision but larger range. Sort of like floating point values, with 12-bit mantissa and 3-bit exponent to halve the value 0 to 3 times. The analog shift stage is controlled by SF pins from the OPS.
The DAC reference input comes from a 8-level R2R DAC, whose digital value is loaded by DACCE pin from the MCU. It is set by the volume entry slider. So it's a 8-level volume control. When compared to TX7, it has 64-level but it has a fixed DAC reference and the volume level is set with a VCA later in the analog path.
Basically, they had no reasonable cost DAC available with reasonable performance, so to get the wanted analog performance, they had to put more common 12-bit DAC there and do analog shifting and summation of channels.
|
H: Writing to a Register happens one or two clock cycles after asserting write enable?
I am using the code shown here Verilog: Writing to a Register Happens A Clock Cycle Late and that user posted a picture where output would change 2 cycles after asserting write enable. That post got an answer which seemed reasonably good to me. However, I decided to simulate the exact same code and create a testbench for it and in mine, output appears only 1 clock cycle after asserting write enable. Could somebody explain to me why is different if I'm doing the exact same thing?
The only difference I can spot is we're not using the same simulator but how could that be the reason?
This is testbench:
`timescale 1ns / 1ps
module test_regblock_tb;
parameter tclk = 10;
reg clk = 1'b1;
reg rst = 1'b1;
always
#(tclk/2) clk =~clk;
initial begin
#(tclk*10);
rst = 1'b0;
end
reg [4:0] RegA_Name = 4'd5;
reg [4:0] RegB_Name = 4'd6;
reg [4:0] RegC_Name = 4'd7;
reg [31:0] RegA_In = 32'd0;
reg [31:0] RegC_In = 32'd0;
reg RegA_WrtEn = 1'b0;
reg RegC_WrtEn = 1'b0;
wire [31:0] RegA_Out;
wire [31:0] RegB_Out;
RegisterFile regblock(
.CLK(clk),
.RegA_Name(RegA_Name),
.RegB_Name(RegB_Name),
.RegC_Name(RegC_Name),
.RegA_In(RegA_In),
.RegC_In(RegC_In),
.RegA_WrtEn(RegA_WrtEn),
.RegC_WrtEn(RegC_WrtEn),
.RegA_Out(RegA_Out),
.RegB_Out(RegB_Out)
);
initial
begin
#(11*tclk);
RegA_In = 32'd126;
RegA_WrtEn = 1'b1;
#(tclk);
RegA_WrtEn = 1'b0;
#(50*tclk);
$stop;
end
endmodule
AI: The problem is with your testbench's use of #(tclk*N) followed by the use of blocking assignments to your design's inputs—it's a race condition. Your testbench should be using non-blocking assignments to any signals synchronized to the rising edge of tclk. Or you can adjust your testbench initial block so that the signal changes do not coincide with the rising edge.
|
H: Is it possible for a DC LDO to be able to take in AC and DC
I have an LDO TPS7B69 which takes in up to 40V DC and regulates it to 5V. This LDO typically takes in DC, but I would also like it to be powered by AC 40 volts peak max at 50Hz or greater.
Rectification would first come to mind, and I would prefer using a full bridge rectifier since it will utilize both positive and negative cycle thus not needing huge caps values, which also help against Reverse Input protection (?) when using DC. But I do not know if a DC input on the FBR would also yield a DC output. I personally think it would work since it would just be like a peak voltage on an AC.
Is my approach acceptable? Are there any better ways to do this?
AI: It is a standard practice to make linear power supplies by rectifying AC into a reservoir capacitor and use that unregulated DC voltage to create regulated DC voltage.
However, with such a high input voltage, the regulator has to dissipate a lot of power as heat. So depending on which regulator IC package you have and how much current you would like to draw, it might or might not be possible depending on how much the regulator temperature goes up.
Use the formula provided by analogsystemsrf to calculate how large capacitance you need.
|
H: How to safely power a large LED strip project
I'm making an LED matrix with a board and 4X WS2811 strips (5 m length, 150 LEDs). Each strip is 45 W, takes 12 V and is 3.75 A. I have connected them in series and injected a 12 V, 60 W/5 A adapter for every strip. It's powered by an Arduino Uno and all grounds are connected to the ground in the Arduino.
My question is, can this safely be power on from a single household outlet? I believe here in Canada each outlet can handle 15 A. So if this is true, is it unsafe to power all of these from a single outlet? The reason I want it to come from a single outlet is because I can turn on all adapters at the same time from the switch on my power bar.
If this is not possible, can the adapters be spread out from different outlets and simply turned on by connecting or disconnecting the Arduino?
I've attached a primitive schematic I made to the best of my abilities.
AI: Canada uses 120V outlets. The amperage of the circuit is typically 15 or 20 amps. But that is at 120V. 12V 5A is provided after the power supply regulates the input down. Without taking into account efficiency, 12V 5A is the same power as 120V 0.5 Amps, or 60 Watts. Add in efficiency costs as no power supply is perfect, it's likely 0.6A input. Look at the label on your supply and it will tell you what the input amperage is. That's the amperage you need to worry about on your power strip/outlet/circuit.
If this is on a small localized display, you should consider using a 200 to 240 Watt 12V supply, like maybe a PC power supply. Less issues with multiple supplies.
|
H: Where to connect tristate pin of oscillator?
I'm trying to use this oscillator in a project but am unsure of how to connect the tristate pin.
I believe I should NC it but don't want to mess up my design if that is not the case.
https://ecsxtal.com/store/pdf/ECS-5032MV.pdf
Tri State Function
Pin 1 Output
0.7 * Vdd Min or NC Active
0.3 * Vdd Max. High Impedance
Thanks!
AI: You are correct - leaving it open will enable the oscillator.
One way of covering your bases is to put a resistor in your PCB but don't stuff it if not needed. In this case, it would be between the tri-state pin and the positive power supply.
Putting such a component in the PCB also allows you to wire something to that point if you need to test it or to modify the operation of the circuit - if you just leave it as no-connect there will not be a pad to wire to.
In general, it is good practice to use a resistor if you ever need to pull a signal up to Vcc or down to ground, it provides flexibility in testing (for example you could disable the oscillator to inject another signal for testing) or easily modify the circuit.
|
H: Inductor dimensions as a function of time(?)
While perusing the text book "Foundations of Analog and Digital Electronic Circuits" by Anant Agarwal , I came across this text in the section on inductors:
Why are the dimensions of the inductor a function of time if the geometry of the inductor varies from the toroidal shape?
AI: Note that these dimensions will be functions of time if the geometry of the inductor varies.
The 'geometry' of a toroid could be thought of as a topology, and a few dimensions. The topology is the fact that it's a toroid, and the dimensions are the length and cross section of the ring.
If the geometry varies, then the dimensions vary, by definition. If they vary with time, then they vary with time. The author is stating a tautology (something that's automatically true by definition or by construction) that's unhelpful and confusing, at least in the case of the toroid, which tends not to vary its dimensions.
There are inductors that vary their dimensions with time.
One type of pulse generator sets up a magnetic field in an inductor, then uses explosives to rapidly compress the inductor into a smaller volume. These are single-use!
A railgun uses two parallel rails, with the projectile forming a shorting link between them. As the projectile moves along the rails, the loop area enclosed by the rail, projectile, return rail loop changes, and so does the inductance. One of the design parameters quoted for any given railgun design is the change in inductance per distance of projectile movement.
|
H: What's the effect of shorting the wiper terminal with one of the ends of a trim pot?
EDIT: I realized I didn't draw the schematic properly. Previously, the 100 Ohm resistor wasn't there.
I thought I'd done the math correctly for this, but clearly something conceptually isn't straight for me. I need a 5K potentiometer, but the sources I've looked through didn't have it in the package I'd like. I did see a 10K pot in the package though. So I thought by shorting the wiper terminal with one of the ends of the trim pot I'd be able to half the maximum possible resistance offerable by the pot.
$$\frac{1}{R_{total}} = \frac{1}{R_{wiper}} + \frac{1}{10000}$$
$$\frac{1}{R_{total}} = \frac{R_{wiper} + 10000}{10000 \cdot R_{wiper}}$$
$$R_{total}=\frac{10000 \cdot R_{wiper}}{R_{wiper} + 10000}$$
Since the highest resistance Rwiper can reach is 10K, the resulting highest value would be
$$R_{total}=\frac{10K \cdot 10K}{10K + 10K} = \frac{10K \cdot 10K}{2 \cdot 10K} = 5K$$
I could also make a graph by plotting the function of Rtotal.
By this point I was convinced. I tried to measure the resistance on a spare 10K pot lying around, but I saw that maximum value remained 10K. Why is this?
simulate this circuit – Schematic created using CircuitLab
AI: The formulas do not match the picture. In the picture, the resistance between ground and 5V can be set between 0R where the wiper bypasses the resistance and 10k where the wiper selects full resistance.
To whatever position you set the wiper, it will short out the unused portion of the resistance when it is connected like in the picture, so it will have no effect.
|
H: Laser scanning: why are things like deflection and mirrors used instead of just a mount and servo?
In the Wikipedia article for laser scanning, it is said that laser scanning is the controlled deflection of laser beams, visible or invisible. It then lists some of the technologies used, such as mirrors. But why is deflection necessary? Why do we need to use these intermediary components, such as mirrors, to direct the laser beam? In particular, couldn't we just attach the laser to a servo, as done here and here, and do laser scanning in this way? What benefit does deflection have over using a servo? It seems to me that using the intermediary components for deflection is just superfluous, outside of, perhaps, specialized use-cases.
I would greatly appreciate it if people would please take the time to explain this to me.
AI: A few thoughts:
Weight: moving a lightweight mirror will be easier than moving the laser assembly.
Speed: related to weight, the system response can be much faster.
Reliability: no flexing of wires which may fracture or break.
Infinite rotation: Mirrors can be made in a prism fashion to do a raster scan by continuous rotation. (See the checkout laser scanners for example.) With constant rotation speed there is no non-linearity caused by acceleration and deceleration.
|
H: Why is there a spec for min fall time in I2C Fast Mode?
Why is there a spec for min fall time in I2C Fast Mode but not in standard mode?
Is it fine to use I2C standard mode with a fall time of 5n?
AI: Originally there was only Standard Mode with up to 100 kHz clock support. It did not have any specification for limiting the fall time speed and for compatibility this was never changed. But when the new Fast Mode that goes up to 400 kHz was specified, they specified slew rate limiting to reduce electromagnetic interference from the fast transitions.
|
H: How to achieve four quadrant operation of the field oriented control of the three phase induction motor?
I have been developing software for field oriented control of the three phase induction motor. I have been facing a problem how to incorporate changing of rotation direction into the control software.
The requirement is to achieve a state where the motor is able to operate in all four quadrants of the torque-speed plane i.e. the machine shall work in motoring (braking) mode for both directions of rotation.
The rotation direction of the three phase induction motor is in my opinion given by the phase sequence of the stator three phase voltages which are basically produced by the three phase voltage source inverter in my situation. The problem which I have is how to incorporate change in the phase sequence of the stator three phase voltages in case the output of the control structure (the controllers of the torque and flux components of the stator current) is the desired space vector of the stator voltage.
Can anybody help how to do that? Thanks in advance for any ideas.
AI: The FOC already does all of this. If the motor's actual velocity is higher than it's velocity setpoint, then you will have a generator mode. You can even control the torque with Iq setpoint. For example:
if n>0 // positive direction
Iq= -Iq_set; // negative torque (braking)
elseif n<0 // negative direction
Iq = Iq_set; //positive torque (braking)
The above pseudo algorithm however is yet implemented by simply giving the velecotiy setpoint = 0. If the external load will try to spin the motor, the FOC will brake it.
This is a block scheme of FOC with velocity control. In case you want to have a torque mode only, then you disable the speed controller and you set the torque directly by changing the Iq setpoint. This block is for PMSM, for the induction motor would differ in Id setpoint calulation and it would have an extra rotor flux estimator.
|
H: Is it possible to draw a border on row on 20x4 LCD?
I have 20x4 LCD, and I am using the LiquidCrystal_I2C library to communicate with the screen via Arduino.
I want to build a menu with that screen, and I want to illustrate the "currentHover" option.
For example:
If it is not possible, I would love to get other ideas.
AI: No, it is not possible.
You must use something else, like the blinking or static cursor, or existing characters, or custom characters to indicate the line somehow.
|
H: Super capacitors in series vs voltage up converter
If I connect super capacitors in series, I'm able to raise the voltage by the sum of the capacitors' voltages, but I lose 1/2 of each of the Farad capacity for each of them in series. Correct?
If I connect these super capacitors in parallel, I have the sum of the Farad capacity without loss of charge. Correct?
So if I instead use an up-converter to increase the voltage instead of connecting the super capacitors in series, I would have a huge amount more storage available. Is my logic correct here?
Even if the up-converter is only 92% efficient, It beats the 50% loss per capacitor in series. Right?
AI: Take two one Farad capacitors and charge them to 1V. Energy stored in each is 0.5 Joules.
As capacitance is defined as the ratio of charge over voltage, the charge in each capacitor is one Coulomb.
Connect them in in series, and you have two Volts across them. Discharge them through an integrating current meter, and one Coulomb charge is measured, as the same current path flows through both. The total capacitance of the combination is 1 Coulomb/2 Volts = 0.5 Farad. The total energy is one Joule, either because you have two capacitors at 0.5J or from the formula ½C∙V².
Connect them in parallel, you have one Volt across them. Discharge them, and you measure two Coulombs as the current from each are added together. So the total capacitance of the combination is 2 Coulomb/1 Volts = 2 Farad. The total energy is one Joule, either because you have two capacitors at 0.5J or from the formula ½C∙V².
But in both, you can swap the capacitors over from one topology to the other at a given state of charge and the capacitors themselves don't change.
If both capacitors are fully charged, so the energy stored is at the maximum, and switching topology would mean "a huge amount more storage available", then you could charge them in one topology then use a relay to switch them to the other, and use this extra energy to charge another bank, and so create a perpetual motion machine. In reality, the amount of energy storage capacity is the same.
|
H: Reducing IR proximity sensor module power consumption
I have built a rechargeable automatic hand sanitiser using an IR proximity sensor(HW 201.) It consists of an IR proximity sensor module, TIP 32 transistor, 3-6 V DC pump, TP4056 charging module and a 3.7 V Li-Ion 3800 mAh rechargeable battery.
I'm facing an issue with power consumption.
The battery drains too fast - it is empty after 1 or 2 days.
The IR sensor consumes about 20mA even during idle state (when not sensing hand.)
Is there any option to reduce the power consumption using 555 timer IC or any other programmable MCU (no Arduino?)
How can I make a low power consuming IR proximity sensor circuit?
AI: Remove the two LEDs (over by the connector in your picture.) Lighting them uses current. Not much, but you don't really need them.
Increase the resistor in series with the IR emitter LED.
(2.) will probably have the most effect. It will probably also reduce the detection range.
Use a camera to find out which of the two LED like things is the IR emitter (on the right end of your picture.)
I expect it will be the clear one.
In any case, you can "see" IR with most digital cameras (smartphone cameras, photo cameras, webcams, etc.) Look at your sensor through the viewfinder of your camera and see which is lit up.
Trace the connections to that part. You will find a resistor in series with it.
I expect that resistor will be some few hundred ohms.
Replace it with a larger value resistor. A value of two or three times the original should be a good starting place.
Try your sensor out. If it works reliably, run it for a couple of days and see how your battery holds up.
Try a larger value to get a longer run time, but keep in mind that a larger resistor will shorten the detection distance and at somd point the detector will not work anymore.
|
H: Need help selecting the right speed controller for a 3-phase AC motor
This a three-phase single-volt 5-HP AC motor salvaged from a treadmill with a busted controller board.
The goal is to salvage the treadmill. Originally I was trying to repair the controller board.
I've decided to try a simpler approach of replacing all the digital stuff with just a basic manual motor speed controller. But I'm having trouble selecting the right part for the job.
More about the motor. Six wires in total. Three wires control the phases, one for ground, the other two are thermostat leads.
All I'm really looking for is a hand dial that controls speed reliably and smoothly and doesn't burn out the motor or create jerky motion. My understanding is that some sort of VFD regulator is required. But I'm having trouble selecting one that would result in reasonably smooth performance from 0 mph to a reasonably high speed without damaging the motor.
Speed/distance sensors and digital interfaces are cool, but maybe in some future project. I need to walk before I run. Pun intended.
AI: The motor current rating indicates that the motor is not a 5 Hp motor by international standards. You should be looking for a 3 Hp VFD. There VFDs on the market at that power level that can provide the required output voltage and current with single-phase input power. There are models rated for 120 V, single-phase input and 230 V, three-phase output.
You don't need one of the highest performance models on the market, but you need more than a variable-torque model that is designed for fan or pump duty. The fan and pump VFDs are often designated as "standard duty" while the models that have higher starting torque and better low-speed performance are often called "heavy duty." You may find different terminology used.
Most of the ability to operate at low speed without burning out the motor is in the motor design. The motor that you have was designed for use in a treadmill. It is marked 5 Hp with a current rating that is more like 2.5 Hp or less. You don't need 5 Hp for a treadmill, but you do need a motor that can provide the torque of a smaller motor at low speed with continous operation. That is what the manufacturer is really trying to sell my calling it 5 Hp.
|
H: Does boosting voltage using MT3608 from 3.7V to 10V module reduces the Lipo battery capacity?
Suppose say, Iam trying to boost the voltage of my 3.7 Lipo battery to 10V using MT3608 STEUP UP CONVERTER and I need to run 3 LEDs(connected in series) which takes 9V (3v for each LED)
If my LIPO battery specifications are 3.7v and 750mAh, how long does my LEDs last with that battery if my voltage had been boosted to 10v?
After boosting my voltage to 10v from 3.7v, Do the capacity of battery still be 750mAh or does it reduce? If it reduces how much will be the output capacity at 10V. Explain in brief
P.S : I know that number of hours a LED can light up from my LIPO battery can be calculated by 750mAh/30mA = 25hrs (assuming my LED takes 30mA forward current and 3V forward voltage).
I would like to know the boosting circuit effect on my battery capacity
AI: With a 100% efficient power conversion from 3.7 volts to 10 volts, any current taken from the boosted 10 volts will be seen as 10/3.7 (2.702) times as much on the battery so, it's probably better to just consider the battery capacity as unchanged but, in these circumstances it will be dispensing 2.702 times as much current.
Given that the efficiency of a boost converter is probably around 90%, you should account for this also. This would mean that every amp taken at 10 volts will be more likely equivalent to 3 amps at 3.7 volts.
assuming my LED takes 30mA forward current and 3V forward voltage
Three series LEDs will take the same current and this will be equivalent to 90 mA from a 3.7 volt battery. I'm assuming here that the 1 volt difference between 9 volts and 10 volts is used for a circuit for maintaining a constant current into the LEDs.
how long does my LEDs last with that battery if my voltage had been
boosted to 10v
The added complexity here is that as time passes, the battery voltage diminishes and to produce the same 10 volt boosted output requires a larger step-up ratio and, in terms of current drawn from the battery this means more current. So, it's quite a complex relationship if you factor in the diminishing terminal voltage across the battery.
|
H: Bi-directional motor control with 3 push buttons
I am trying to create a system where there are 3 input buttons (PTM) and a dc motor output. The motor needs to be bidirectional.
The 3 buttons are: forwards, stop and backwards.
once the forwards or backwards button is pressed, the motor keeps running until the stop button is pressed, or if the other button is pressed in which case the motor will turn in the opposite direction.
It would need to be a latched system (I don't need to hold down the button) and have some protection against unintended input (for example if I accidentally press 2 or all the buttons at the same time, it should ignore it).
I am trying to not use any microcontroller (Arduino) or software on this project. Ideally, something with logic gates, transistors and a motor driver chip (l293d) will be good.
Any suggestions on the circuit for this project or where I can start?
AI: Two TPDT electromagnetic relays would suffice.
Here's the schematic.
|
H: Can you split an AC power cord into a 'y' to feed two AC loads?
I usually work with low voltage DC stuff, like little Arduino circuits and things. I've had no problem powering multiple things from a single power source that need roughly the same voltage (or using buck converters to step things down, or whatever).
However, I recently had a need to have two AC loads plugged into a single outlet. The positioning of the thing sort of necessitated a 'y' shaped power cable, something like this:
I tried to take a couple of extension cords and splice them together like this, but failed in a way that involved blowing a breaker and a lot of smoke. Obviously I was doing something wrong.
I am curious if cords like this are simply just heftier wire and maybe a different solder than I'm used to... or if there's something else going on inside that "splice block" you see there in the middle. Can you just split an AC cord into a 'y' like this or is there something else going on?
I've tried searching for other questions and Googling for the answer, but I don't think I even know the right terms to search for. I come up with a lot of discussion about doing this for DC power, but nothing about AC.
Note: terminology corrected to "AC loads" that I'm connecting to the cable rather than "AC power sources" - however, even though that's not the right term, not knowing that and being able to search under the wrong term is helpful so other beginners like me might find the answer and learn the right term - as noted, I didn't even know what to Google - so... this little "AC power source" explanation block is here for searchability.
AI: Yes they exist, however i dont recommend you do them yourself as mistakes are deadly. Just purchase a proper Y wire online.
Your mistake was probably shorting the live and neutral wires together. This should be avoided at all costs. The commercial wires dont have anything special in them, just doing the wiring the correct way arround and with proper soldering.
|
H: Can a piezo disc be connected directly to a op amp?
I'm trying to use a piezo disc as a sensor do detect slight vibrations, I see the signal on an oscilloscope, it needs to be amplified. But I can't manage to amplife it.
For this, I wanted to use a simple inverting op amp circuit :
I also tried by replacing the power supply by two 9V batteries and using the the middle as a virual ground. without much more sucess.
Is there something I'm missing ?
Do I need to add something ?
Will the version exclusively powered by the esp32 work ?
Thank you very much in advance.
AI: Is there something I'm missing?
Yes. The piezo is a very high-impedance source. Your R2 effectively does nothing, and your R1 value is way too low to create any voltage gain.
You can think of a piezo sensor as essentially a capacitor. The piezoelectric effect causes a small amount of charge to move into or out of this capacitor.
Do I need to add something?
Delete R2 and make R1 much larger, on the order of megohms.
Will the version exclusively powered by the esp32 work?
You need to define "work", but the answer is probably not well. It would be better to bias the inputs to half the supply voltage for single-supply operation.
Also, the output of the LM324 is not rail-to-rail. It can pull to ground, but at only up to 50 µA of current.
|
H: Regulated Ground
this is more of a concept question than a physical circuit question. I am not an electronic engineer and only build electronics as a hobby in my free time so I do apologize if I am missing something simple. Before continuing with my question I did try and search around for a answer to my question but was unable to find it.
In general if you are using a transformer (not a battery powered circuit) your "ground" or "neutral" connection is not physically connected to the neutral wire from your outlet (even if it was I think my question would still apply). In any case if you are driving a load with a lot of wattage wouldn't there be voltage transients (I think I am using the words "voltage transients" correctly) on the ground plane? We use decoupling capacitors near a IC due to the fact that there are resistances and inductances in the VCC/VEE planes which cause the voltage to drop when current is drawn (also not to mention the fact that no regulator would be able to perfectly handle this issue anyway). But if for example you have a motor or speaker load wouldn't the current passing through the load cause the voltage on the ground place to change as well (I mean the ground plane isn't magical it would also have resistance/inductance)? Also, the fact that the ground plane would just travel straight back to the transformer.
On to the dead straight question. Would it be worthwhile to create a "regulated" ground (for example with a lm317/337) if your project was noise sensitive (1mV of noise would be noticeable)? Or does something I am not understanding come into play that makes it irrelevant and the ground will always be 0 volts?
Thanks for reading this far, and thank you for answering if you do so!
Edit:
Regulated Ground Plane Example:
AI: The Ground can be clean, if designed to be clean.
Or, as you suspect, horribly dirty with OHMS Law predicting
V = I * R (for DC; where the R is 0.0005 ohms per square of foil on a PCB)
and
V = I * Z (for AC; you should use the 0.0005 ohms, plus any inductance)
or
V = L_inductance * dI/dT (for transients --- the real world)
voltages.
The inductance of a square Ground will be low low nanoHenries, or even high picoHenries.
But 100 milliAmps changing in 2 nanoSeconds (a MCU driving a heavy load), and that current seeking a return path (to the VDD bypass cap, etc) will have this voltage in the Ground
V = L * dI/dT = 2 nanoHenries * 0.1 amp/2 nanoSeconds = 0.1 volts.
Sometimes you can use SLITS in the GROUND foil, to steer return_currents into regions that tolerate lots of Ground Spikes.
Consider this
Should I really divide the ground plane into analog and digital parts?
======================================================
If you establish "local batteries" for separate circuits, with large capacitors to supply the local transient currents, with series resistors of value 1 Ohm or 10 ohms that insure some separation of the sensitive circuit's VDD and the bulk/global DC, then variation of the GROUND currents can be very small.
I've discussed the "local battery" in a number of stackX answers.
By using differential_pairs in your pre_amplifiers (most opamps use diff_pairs in the input stage), you can take advantage of the substantial Power Supply rejection ratio (PSRR).
Note that transformers for audio signals will inherently provide a useful isolation of Ground DC currents.
Using separate power supplies for Preamps and for power Amps is a good idea.
Power transformers will have 100s of microAmps at 60Hz coupled into the secondary winding, and that current WILL FIND A RETURN PATH.
Notice high end phono turntables include a 5th wire from the turntable chassis, to be attached to the Preamp chassis. That helps reduce the 60Hz current (from power transformers) that use the cartridge wires as return paths.
Even if the cartridge is totally floating; there are still EFIELDS from the wires or cartridge shell to other metal parts in the turntable.
|
H: Isolation Circuit Question - How does this feedback work?
I am completely stumped. I have been troubleshooting this circuit for some time, and is what powers another circuit. The thing is, I have no idea how this thing works (not well as of late, due to other design errors past this section of the project.) I am new to the engineering side of things, and am a little lost when it comes to diagnosing circuits.
Apparently, this thing works, trouble is, the designer got canned, he left no notes, and I can't find anything else like it out there on the web. U12 is a UC3842B current mode controller, Q9 PN #TSM850N06CX RFG , and the optoisolator, U15 is PN# CNY17F-1S. But, I have no idea how the jeezless thing is getting proper feedback through the optoisolator. I also am not sure on how the isolated voltage is set, I can only assume T1 is acting like a 1:1 transformer, and I have no idea how the Isense pin is being used here.
The data sheet for U12 leaves something to be desired, and I think I just need a little guidance to how to figure out how things work.
AI: The thing is, I have no idea how this thing works
The whole circuit is a flyback converter so there's your first term to start googling.
But, I have no idea how the jeezless thing is getting proper feedback
through the optoisolator
The TL431 acts like a voltage comparator - as soon as the "right" output voltage appears on the isolated output, it turns the UC3842 off (via the opto-isolator) and the DC output voltage drops a tad (under load) and then (microseconds later) the TL431 signals to the UC3842 that there is an under-voltage situation. This type of feedback can be a little unstable and can lead to a bang-bang control of a sort.
The threshold at which the "regulation" occurs is when the junction of R66 and R67 is 2.5 volts (that's the reference voltage inside the TL431). If you do the math, that allows 1.042 mA through R67 and R66 - this means that the output voltage regulation point is 21.25 volts nominally.
I have no idea how the Isense pin is being used here.
Because a flyback converter circuit stores magnetic energy in the 1st half of the cycle without reference to the output winding, you have to use a current limiter to protect the transformer from core saturation - that is what Isense is being used for. A fixed amount of energy is stored in the primary winding and, in the 2nd half of the cycle, that energy is released from the secondary, via D2 into the output reservoir capacitor that appears to be missing in your circuit.
|
H: Buck Converter design, which is better? 48V->12V direct conversion or 48V->24V->12V conversion for 12V application
I am designing a 1KW DC-DC buck converter with Vin(51V battery pack with Vnom = 48V) for driving four 250W motors. Is it advisable to step down the voltage directly from 48V to 12V or should I first step it down to 24V and then to 12V? This is the first time I am designing a converter for this much power. Could you also help me with some resources to go through before the design?
AI: I'd go straight for a single stage dual phase converter like this: -
One for each motor should do the trick.
Be warned though, this is not something to be undertaken without good tools and PCB design skills. You will certainly find more designs available if you split the power requirements by four and concentrate on a single regulator per motor load.
Stepping down in two stages will not be as power efficient and, this is to be wholly avoided if you are talking about a total power of a kilowatt or so.
Here's a good starting point - it's the selection tool I quickly used to refine a search that enabled me to select the LTC3892 above.
I've just noticed that the site I linked is playing up so here's what I searched on: -
And try this link instead.
Similar tools available from TI also.
|
H: Can anyone shed light on why a I2C PCF8574 LCD driver would only be using I2C 'read' operations to 'write' to the device?
I am trying to understand a simple I2C driver for a HD44780 with soldered PCF8574 daughter board, I'm still relatively new to electronics engineering (read: 20 years out of date), but an old hand with c.
The I2C board eludes me, other than I know it's based on a PCF8574, from the markings on the IC. The supplier did not give me enough information to go on to identify it, but it's a very common board, you can pick up from most electronic hobby shops- shown below.
Anyway, I can successfully drive the device from a Pi, using the following source code, modified from elsewhere:
#include <wiringPi.h>
#include <wiringPiI2C.h>
#define LCD_BACKLIGHT 0x08 // On
// LCD_BACKLIGHT = 0x00 # Off
#define ENABLE 0b00000100 // Enable bit
int fd;
void lcd_toggle_enable(int bits) {
// Toggle enable pin on LCD display
delayMicroseconds(500);
wiringPiI2CReadReg8(fd, (bits | ENABLE));
delayMicroseconds(500);
wiringPiI2CReadReg8(fd, (bits & ~ENABLE));
delayMicroseconds(500);
}
void lcd_byte(int bits, int mode) {
//Send byte to data pins
// bits = the data
// mode = 1 for data, 0 for command
int bits_high;
int bits_low;
// uses the two half byte writes to LCD
bits_high = mode | (bits & 0xF0) | LCD_BACKLIGHT ;
bits_low = mode | ((bits << 4) & 0xF0) | LCD_BACKLIGHT ;
// High bits
wiringPiI2CReadReg8(fd, bits_high);
lcd_toggle_enable(bits_high);
// Low bits
wiringPiI2CReadReg8(fd, bits_low);
lcd_toggle_enable(bits_low);
}
void message(const char* text) {
while(*text)
lcd_byte(*text++, 1);
}
int main() {
fd = wiringPiI2CSetup(0x27);
lcd_byte(0x33, 0); // Boring init code.
lcd_byte(0x32, 0);
lcd_byte(0x06, 0);
lcd_byte(0x0C, 0);
lcd_byte(0x28, 0);
lcd_byte(0x01, 0);
delayMicroseconds(500);
message("Hello world"); // my function, works fine.
}
This actually does sort of make sense- and I have happily driven the display from an MCU using the D0-7 / RST / RW / E pins in both 8 bit and 4 bit mode, so the individual hex instructions are readily understandable, because it seems effectively the lcd_byte function takes the value of D0-7, and the state of the RS flag.
What strikes me as odd, but perhaps it's just a kludge that this device uses, is that EVERY call over I2C is to READ a register, but clearly has the effect of setting the D0-7, RST, RW and EN pins.
Can anyone explain this behaviour, and is there a good reference documentation that would explain the supported I2C commands in relation to driving this board? (e.g. backlight state is being sent in every byte, but again, without documentation all I am doing is reverse engineering the protocol for now).
And secondly- I had some luck briefly with the LCD powered at 5v, but had SDATA and SCLOCK connected to a 3.3v MCU, with a common ground. I was able to at least turn the backlight off but this suddenly isn't happening. Did I get lucky? Or should I be able to drive the I2C pin logic from a 3.3v MCU provided I have a shared GND and the LCD is 5v? (I'm aware that due to the VO pin, I would need to run the display at 5v to get usable contrast, without soldering extra bits to the HD44780).
AI: The PCF8574 has no concept of registers, as it has a single data register.
The standard protocol of reading a register means first the register address is transmitted, and then the data is read back.
Therefore, when the I2C library is commanded to do a register read, the PCF8574 understands the transmitted register address as data write. Also, when the I2C library continues to read data, it actually just returns the data register contents.
So, why someone would use I2C register read function to write data? No idea. But it works.
Perhaps the code was written by someone that does not know the API has also a function to write a single data byte. Or maybe it did not work or exist when this code was written.
Frankly, this means that for each API call to read a register, there are four bytes transmitted on the I2C bus, which makes this extremely slow.
|
H: How do TVSS and Circuit Breakers (thermal-magnetic) interact with each-other?
In EU you can find thermal-magnetic circuit breakers all other the places in buildings and it's not uncommon to have daisy chains of them (meaning a main panel will have one, which is connected to another secondary panel which has another one, etc).
First of all I am not whether having daisy chaining of breakers increase surge protections (against lightning or shorts)?
Also, say we have a TVSS in the mix now (e.g. one found in a UPS), what is the electrical relationship between that and the breakers? Do the breakers add protection or do they subtract it to the efficiency of the TVSS? Or does it not matter at all?
Thanks a lot!
AI: Breakers are for overcurrent. TVSS is for overvoltage. They protect against different aspects of different things. They have nothing to do with each other.
Lightning already traveled thousands of feet through the air. The little air gap in a circuit breaker isn't going to do anything to stop the lightning even if it were fast enough, which its not.
Series breakers don't increase protection (in that protection doesn't increase by stacking breakers). They just let you tailor protection for different parts of the system. Each breaker is protecting something known at the time of installation in the system from igniting, but downstream current-handling capability and loads are unknown and could be much smaller. So if you want to protect specifically for those loads you add breakers that trip sooner in series specifically for that load. It also lets only part of the system trip without bringing down everything, and allows you to shutdown part of the system for maintenance without bringing down the whole system.
In your example, you have a main panel leading to a secondary panel. Just one secondary panel? Or multiple secondary panels? If multiple secondary panels, the current capability of those panels is probably less than the main panel which means the main panel would have a larger breaker since it must carry all the current, while the secondary panels have smaller breakers since they only carry a fraction of the current running through the main panel.
So if something goes wrong downstream of the secondary panel, only that panel trips and it trips at a value low enough to protect that panel. If it was the main panel that had to trip, the secondary panel would be long gone and on fire since the main panel would only trip if the secondary panel passed the same current that the main panel was expected to trip at.
If something goes wrong within the main panel or itself or after the main panel but before the secondary panel, then the main panel trips. The breakers secondary panels could have never protected against that something happening upstream of them.
|
H: Variable-Gap Capacitors in LTSpice
I have seen several blog posts that discuss the concept of a nonlinear capacitor (or inductor) here, here, and here. Thanks to a concerned citizen for the references.
I'm still struggling with the execution of this for my capacitor. Below is a screenshot of the capacitor I care about in a schematic. I ultimately want this variable-gap capacitor to have a time-dependent capacitance, given by C = eps*A/(g0+g(t)). You can ignore the "disp sin(wt)," that was simply messing around.
I have made simple circuits with a behavioral voltage source and I have changed the capacitance to be expressed in terms of charge, i.e., Q = x*C (where C was just some constant, for testing, as shown below). In that equation, x is the voltage drop across the capacitor, per the LTSpice manual. I looked at the current through it and that is simply the derivative of the charge, so I end up with a cosine wave due to the sine wave voltage input. This makes sense.
My notion as of now is to try and get the current in this second image to be equal to the variable-gap capacitance (by using some behavioral voltage source that is a function of g(t)). But even if this were to work (which it may not, please let me know otherwise), I'm not sure how to link this to the capacitor in my original schematic. I can't figure out how to set the capacitance value equal to a current (i.e., how do I link the capacitance in the first figure to the capacitance in the second figure?). I have tried net labels.
I hope my explanation was clear and I appreciate any time/effort provided in explaining things.
Sincerly, a mechanical engineer with little Spice experience
AI: As per the manual, x is a special variable and for C it's the voltage across the device (so \$i=C\frac{\mathrm{d}v}{\mathrm{d}t}\$, thus \$v\$ is derived), and for L it's the current through it (so \$v=L\frac{\mathrm{d}i}{\mathrm{d}t}\$, thus \$i\$ is derived). But x is not a mandatory variable, that is, just because it's there it doesn't mean you have to use it; it just provides a commodity for notations, in case you use it.
That said, the manual also says:
LTspice will compile this expression and symbolically differentiate it with respect to all the variables, finding the partial derivative's that correspond to capacitances.
Thus having an expression as Q=x*V(ref) means both x and V(ref) will be differentiated. For your case, you have a rational expression w.r.t. the variable, g(t). Then, mathematically, your expression will need to be integrated so that its derivative will give you the variation for the resulting capacitance:
$$\int_x\frac{A\epsilon}{d\pm x}=\pm A\epsilon\log(d\pm x)$$
Let \$x\$ be represented by V(g), which is the voltage that gives the "raw" displacement of the plates. Then, the expression that needs to be used with a behavioiural capacitor is:
Q = A * epsilon * log( d + V(g) )
for d + x, and
Q = -A * epsilon * log( d - V(g) )
for negative d - x. You could also use:
Q = sgn(V(g)) * A * epsilon * log( d + sgn(V(g)) * V(g) )
but you should be careful because sgn() is a discontinuous function, and differentiating that will most probably cause more problems than not. Note that there is no x, and the only time-variable is V(g).
But if this is used in LTspice, it doesn't work as expected:
V1, by generating a unity 1 V/s ramp, will make its derivative 1, leaving the value of the capacitor to be read in Amperes. C1 is supposed to have what I explained above, but the current through it doesn't show the expected graph. That's because V(g) is a sine in itself, which means the formula becomes (\$m\$ being the magnitude of V(g)):
$$\int_t\frac{A\epsilon}{d+m\sin(\omega t)}\mathrm{d}t=\frac{2A\epsilon}{\omega\sqrt{d^2-m^2}}\arctan\left(\frac{\frac{2d\sin(\omega t)}{\cos(\omega t)+1}+2m}{2\sqrt{d^2-m^2}}\right)$$
If you plug in the values, you end up with the expression of C5, which is shown separate of the rest and truncated, since there is a lot of noise in there.
Fortunately, there are alternatives in making a time-variable capacitor, shown in the three boxed versions to the right. All three are plotted against I(Rtest) which is supposed to give the correct variation and, sure enough, they all are the same, but C3 and C4 have numerical issues, while I(B2), the tried-and-tested version sine SPICE itself, is the most reliable here.
The group E1, C2, and B2 form an equivalent variable capacitor. C2 is supposed to have the fixed capacitor's value, but here I omitted d to allow the expression for B2 to be written in a more readable format. The usage is in the very similar manner described in this answer.
Here's the source for the .asc file, copy-paste and save as some_name.asc (be careful to not end up as some_name.asc.txt!):
Version 4
SHEET 1 1776 880
WIRE 480 80 384 80
WIRE 160 96 112 96
WIRE 736 240 656 240
WIRE 816 240 736 240
WIRE 960 240 864 240
WIRE 208 256 112 256
WIRE 288 256 208 256
WIRE 816 256 816 240
FLAG 288 320 0
FLAG 112 336 0
FLAG 112 176 0
FLAG 160 96 g
FLAG 208 256 cap
FLAG 384 160 0
FLAG 736 320 0
FLAG 816 304 0
FLAG 864 320 0
FLAG 960 304 0
FLAG 656 240 cap
FLAG 480 160 0
FLAG 464 496 0
FLAG 464 432 cap
FLAG 608 576 2
FLAG 608 656 0
FLAG 608 416 1
FLAG 608 496 0
FLAG 464 656 0
FLAG 464 592 cap
FLAG -128 800 0
FLAG -128 736 cap
SYMBOL voltage 112 240 R0
WINDOW 0 39 73 Left 2
SYMATTR InstName V1
SYMATTR Value pwl 0 0 1 1
SYMBOL cap 272 256 R0
SYMATTR InstName C1
SYMATTR Value Q=A*epsilon*log(d+V(g))
SYMBOL voltage 112 80 R0
WINDOW 0 39 73 Left 2
SYMATTR InstName V2
SYMATTR Value sin 0 10u 1k
SYMBOL bv 384 64 R0
WINDOW 3 -13 128 Left 2
SYMATTR InstName B1
SYMATTR Value i=-A*epsilon/(d+V(g))
SYMBOL e 864 224 R0
SYMATTR InstName E1
SYMATTR Value 1
SYMBOL cap 944 240 R0
SYMATTR InstName C2
SYMATTR Value {A*epsilon}
SYMBOL bi2 736 320 M180
WINDOW 0 27 -3 Left 2
WINDOW 3 -20 -27 Left 2
SYMATTR InstName B2
SYMATTR Value I=i(c2)/(d+v(g))
SYMBOL res 464 64 R0
SYMATTR InstName Rtest
SYMATTR Value 1
SYMBOL cap 448 432 R0
SYMATTR InstName C3
SYMATTR Value Q=v(1)
SYMBOL bi2 608 576 R0
SYMATTR InstName B3
SYMATTR Value I=A*epsilon/(d+v(g)) Rpar=1g Cpar=1 ic=0
SYMBOL bi2 608 416 R0
SYMATTR InstName B4
SYMATTR Value I=idt(A*epsilon/(d+v(g))) Rpar=1
SYMBOL cap 448 592 R0
SYMATTR InstName C4
SYMATTR Value Q=v(2)
SYMBOL cap -144 736 R0
SYMATTR InstName C5
SYMATTR Value Q=5.752862898435809f*atan(0.1020620726159658*((10*sin(6283.185307179586*time))/(cos(6283.185307179586*time)+1)+2))
TEXT -48 432 Left 2 !.tran 2m
TEXT -48 512 Left 2 !.parma A=0.1m epsilon=8.854p d=50u
TEXT -48 472 Left 2 !.opt plotwinsize=0
TEXT -48 560 Left 2 !.meas i1 find i(c1) at 0.4m\n.meas i2 find i(c1) at 1.2m\n.meas t1 find i(b2) at 0.4m\n.meas t2 find i(b2) at 1.2m\n.meas xx param epsilon
RECTANGLE Normal 1104 368 608 208
RECTANGLE Normal 1040 528 384 384
RECTANGLE Normal 1104 688 384 544
RECTANGLE Normal 560 368 64 208
|
H: Photocurrent in photodiode smaller than expected
I have a question regarding the usage of the phototransistor SFH 203 P, which I want to use for a project, where I need a small fall- and rise-time. The data sheet (I think) implies that if I use the photodiode as follows (in reverse bias) I should get a photocurrent of about 800µA (see page 3 under "Rise and fall time of the photocurrent").
simulate this circuit – Schematic created using CircuitLab
But unfortunately I only measure 2.3µA with bright room lighting. Did I misinterpret the datasheet, use the wrong circuit or is my photodiode maybe broken?
AI: Actually, that sounds about right. I don't know where you got the 800 µA figure from — both the table and the graph indicate much less.
"Bright office lighting" is about 500 lux. The sensitivity of the SFH 203 P is specified as minimum 5 µA, typical 9.5 µA @ 1000 lux.
The graph in the middle of page 4 agrees with this.
The rise and fall times were measured with a much brighter pulse of light than room lighting -- probably a laser or flashtube. Interestingly, none of the graphs go up that far, implying that that would not be a "normal" regime of operation.
|
H: Bench Power Supply Current Rating
When a bench power supply is rated for 0-30V, 0-5A, does that mean that it can supply more than 5A at voltages below 30V while keeping the max power constant, or is there a hard cap on the current?
AI: The supply can deliver up to 5 amps at up to 30 volts.
The voltage and current ratings are both maximums, and are independent of each other - you can't expect to get 10 amps at 15 volts.
|
H: What is the purpose of PLL in a general microcontroller
An ARM Cortex-M4 based microcontroller like TM4C123GH6PM is designed with multiple clock sources with a processor core clocked at 80MHz provided by the PLL, which, from what've read in NI-What is a PLL? and All About Circuit - What exactly is a PLL?, is some sort of feedback x oscillator circuitry that detects phase shift and stabilizes input frequencies through feedback. I don't understand how PLL relates to microcontroller. I'm not sensing any phase shift or trying to stabilize any signal here, and I don't get how the PLL magically produce a 400MHz clock.
Why is this PLL embedded in the microcontroller? If I want my processor to clock at max 80MHz as written in the specs then I just use an 80MHz external crystal. If some peripherals like USB require faster clock sources then I use a faster crystal and divide the clock to supply multiples of slower clock to other devices. External crystals are more accurate than internal oscillators anyway, so why bother stuffing a PLL in between an accurate external crystal and the processor, especially when I'm not dealing with any high frequency or RF application?
AI: The PLL lets you be flexible with clock speed even after you've built the board, and of course, it lets you generate many different frequencies from the one onboard oscillator.
Honestly, just having a PLL so you can generate many frequencies off the onboard RC oscillator makes it worth having a PLL. That way you can operate flexibly with no external oscillator at all if you don't need one. From there, it's not too much more effort to make it so you can also re-route that PLL to an external oscillator.
The PLL lets you produce clocks faster than what is possible in a quartz crystal. Even though MEMS oscillators are available which can oscillate at much higher frequencies than quartz, you still might not want to operate directly off of one since a 400MHz external oscillator requires you to route a 400MHz trace.
As for how the PLL works. Do you know anything about music? Do you know how you can listen to a song and clap to the beat? You just keep equal timing between each clap and adjust the timing until each clap lands on a beat. Easy, right?
Now, do you know how you could do two, or even four claps per beat? A PLL does the same thing. You count your own claps and make sure the time between each clap is equal, but you adjust the time between claps until every fourth clap lands on the beat that you hear in the song, at which point you stop adjusting. In that way, you can produce a clap that is four times as fast even though the beat of the song is four time slower.
|
H: A large resistor in series (parallel) with a small resistor has the resistance of the larger (smaller) one, roughly?
I am currently studying the textbook The Art of Electronics, third edition, by Horowitz and Hill. Chapter 1.2 Voltage, current, and resistance says the following:
A large resistor in series (parallel) with a small resistor has the resistance of the larger (smaller) one, roughly. So you can “trim” the value of a resistor up or down by connecting a second resistor in series or parallel: to trim up, choose an available resistor value below the target value, then add a (much smaller) series resistor to make up the difference; to trim down, choose an available resistor value above the target value, then connect a (much larger) resistor in parallel. For the latter you can approximate with proportions – to lower the value of a resistor by 1%, say, put a resistor 100 times as large in parallel.
This explanation seems contradictory to me:
to trim up, choose an available resistor value below the target value, then add a (much smaller) series resistor to make up the difference
The author said that a large resistor in series with a small resistor has the resistance of the larger one, roughly. So why would using a resistor below the target value, and then placing it in series with an even smaller resistor, be equivalent to a large resistor that satisfies our target value?
to trim down, choose an available resistor value above the target value, then connect a (much larger) resistor in parallel
The author said that a large resistor in parallel with a small resistor has the resistance of the smaller one, roughly. So why would using a resistor of value above the target value, and then placing it in parallel with an even larger resistor, be equivalent to a small resistor that satisfies out target value?
to lower the value of a resistor by 1%, say, put a resistor 100 times as large in parallel.
And how does the reasoning then lead to this?
Perhaps I am misinterpreting what the authors are saying here. I would greatly appreciate it if people would please take the time to clarify this.
AI: The authors have confused things by combining the series and parallel situations in one sentence. I would re-write it as follows:
"A large resistor in series with a small resistor has the resistance of the larger one, roughly. So you can “trim” the value of a resistor up connecting a second resistor in series: to trim up, choose an available resistor value below the target value, then add a (much smaller) series resistor to make up the difference."
For the series case, the equivalent resistance of two resistors in series will be the sum of the two resistor values. If you want a 110 Ohm resistor, you could use a 100 Ohm and a 10 Ohm resistor in series.
"A large resistor in parallel with a small resistor has the resistance of the smaller one, roughly. So you can “trim” the value of a resistor down by connecting a second resistor in parallel: to trim down, choose an available resistor value above the target value, then connect a (much larger) resistor in parallel."
For the parallel case, remember that the equivalent resistance of two resistors in parallel will be less than the resistance of the lower value resistor.
|
H: Op amps with load impedance matching
I have a THS3491 Op amp, and want to use non-inverting configuration.
Reading through the datasheet, all the specs are defined with \$R_L=100\Omega\$.
So, does this mean I have to attache \$ 49.9\Omega \$ resistor in SERIES with \$ 50\Omega\$ load (Oscilloscope, for example) to match impedance? Just like above image?
If I do that, then the output voltage will be halved, so I got worried about the maximum output I can get.
Reading again the datasheet, I found in the page 1, output voltage swing is \$28V_{p-p}\$ at \$\pm 16V \$ supply and \$R_L=100\Omega\$
(I am still not sure about the maximum voltage I can get. Is "output voltage swing" parameter I should be interested? or "input/output voltage range" parameter? (below table) )
If \$28V_{p-p}\$ is only output I could get with \$R_L=100\Omega\$, then at the end, the oscilloscope will read only \$14V_{p-p}\$. Is this correct?
In summary, I have three questions.
To use THS3491 op amp with noninverting configuration, do I have to put \$ 49.9\Omega \$ resistor in SERIES with \$ 50\Omega\$ load?
If I want to know maximum output voltage of THS3491 op amp, what is the parameter? "output voltage swing"? or "input/output voltage range"?
If I use \$ 49.9\Omega \$ resistor in SERIES with \$ 50\Omega\$-load oscilloscope, only \$14V_{p-p}\$ will be observed, is this correct?
AI: No (not for what you want to achieve)
The datasheet lists HRout (headroom to either supply) which is 1.5V. So max. output voltage will be 28V - 2*1.5V = 25V. But you need to watch out for the output impedance which is 0.17 Ohms. So if your load resistor is e.g. 0.17V, you will get less than 25V/2=12.5V at the output.
No, but it would be correct if this amp had an output impedance of 50 ohms.
|
H: op amp biasing... why are voltage sources reversed biased +/-?
I'm still trying to understand the theory of audio signal processing, namely guitar amplifiers. The main thing that got me started down this path was a broken amp that I have. I have since figured out the problem and I know how to fix it but I've also been looking at the schematics for it as an example circuit to help me learn the answers to other questions. I will attach, as long as it is ok for educational purpose, two cutouts from schematics that go with the amp (or close to it) and ask a question. I have many questions but I'm focusing on just one: What is the purpose of the two voltage sources (in both schematics, which are different sections of the overall amp circuit) that are both connected via diodes that are reverse biased? I've marked the areas with red. I think I have a guess, but I don't know if it is right.
I included both of these sections to show the similarity, they are nearly the same circuit. The main difference is the input source is expected to be different as the first is a guitar in jack and the second is an effect return jack. Let's focus on the first from here on out. I will try to explain how I think the circuit works, please correct anything that is wrong. The signal comes in at JS1. It seems a little complicated, my guess is it is dealing with the option of "balanced TRS" input, but anyway it goes through a little section I think is a filter and maybe has something to do with impedance matching with the coil looking thing (On the real amp). I'll ignore the details about this section because it doesn't pertain to my real question. And then the signal line hits a resistor R50 and a capacitor C28. I'm not sure what R50 does except maybe just to be part of the voltage divider effect with R49. The C28 capacitor is probably like a DC filter to ensure clean AC. Then there is a split to a 1M resistor R49, which I think is the other half of a voltage divider to set the input impedance and get a high voltage/low current signal to move on to the op amp + input. Then there is a leg to a capacitor C57 which I think is an AC filter to remove unwanted frequencies (not in audio spectrum) IE noise. Lastly, before going to the op amp's noninverting input, there is a connection with +/- 15V. These are my question. Both connections go through a diode that is reverse biased, D1, D2. This seems at first odd and ostensibly useless, but my guess [WAS WRONG!]. The correct reason is given below by several helpful answerers, it's a voltage clamp to protect the op amp, disallowing any voltage that exceeds +-15 in case it somehow was supplied from the external input source. Thanks in advance for your help!
AI: The name of such circuit is a diode clamp or diode limiter.
Assuming the dioded are ideal, they do nothing until they get forward biased, and they only get forward biased if input voltage exceeds the range of power supplies, i.e. goes above positive supply, or below negative supply.
It limits the voltages at the op-amp input to be within supply voltages to protect the op-amp input from getting damaged from accidental overvoltages fed in via audio input.
|
H: What is the maximum voltage of a coin cell battery?
The nominal voltage seems to be 3V for a coin cell battery (e.g. motherboard battery), but what the maximum of a fully charged battery fresh out of a package from the factory? What is the theoretical max?
AI: That depends on the chemistry.
For non-rechargable lithium manganese dioxide batteries that would be theoretically 3.4V.
However, you can also buy rechargable lithium cobalt oxide button cell batteries, which is theoretically 4.2V, just like any other lithium-ion battery.
|
H: Transistor confusion
I am trying to control a 6v DC motor using Arduino, by feeding a PWM signal to the base of an NPN transistor hooked up to the motor circuit as shown in the schematic below.
simulate this circuit – Schematic created using CircuitLab
Individually, both circuits work fine; if I remove the transistor the motor spins and if I try to control the brightness of an LED using the output of D5 that also works, but when I introduce the transistor, it fails. I've tried both with the motor + transistor and an LED + transistor, but same problem: nothing happens.
My assumption is that it has to do with my choice of transistor - that a 2N4401 is just not the right kind for this - but if that's the case, I don't really understand why this one doesn't work, or what to look for in one that would work.
(I would also be willing to accept that I have completely misunderstood how transistors work and that there is something else wrong.)
AI: simulate this circuit – Schematic created using CircuitLab
Figure 1. Make sure that you have a ground connection between the two power supplies.
Without the V1- connection to the 5V- there is no return path for Q1's base current.
simulate this circuit
Figure 2. The circuit re-drawn in the conventional format.
With the redrawn layout it is more clear what is happening.
We can see that R1 is pulling D2 down to ground and that SW1 will pull it high when pressed.
Positive voltages are at the top of the schematic. See +5 V and V1+.
Base resistor added for Q1 to limit the current drawn from D5. Without it the output will be overloaded.
DC motor coil current flows from top to bottom.
It's now very clear that D1 is normally reverse biased (since it's point upwards). It will allow a circulating current through the motor when Q1 switches off. This will protect Q1.
Using the ground symbols makes it instantly clear which points are connected to 0 V and eliminates some wires.
|
H: Can the capacitance of a proximity sensor be increase by adding layer to the capacitor?
Would adding layers to the capacitor of a proximity sensor from lets say 1 (A) to 4 layers (B) help with increasing the capacitance and at the same time the distance that can be sensed with a proximity sensor?
AI: Unfortunately, this won't work. In order to increase the sensitivity, you'd have to increase the area of near contact between the capacitor plate and your hand. Since all the plates you've drawn are connected to the same node, there's no electric field between them...only between the top plate and the finger. Reducing the thickness of the insulator would proportionally increase the capacitance.
|
H: Multiple processes value of signal
If i have 2 separate processes in 2 different components
One with:
address_regIM <= address_regIM + 1
And another with:
y <= address_regIM
If address_regIM has an initial value, what will be the value of y?
Will it be the incremented value or the initial value since all process statements are executed in parallel?
AI: If both processes are triggered by the same event, y should get the value of address_regIM before the event occurred. If the process containing y is somehow triggered by the actions of the process that changed address_regIM, it will get the incremented value. For each tick, it goes evaluate then assign, since if assignment triggered reevaluation on the same tick, you could get into infinite loops by (for example) putting x <= y in one process, and y <= not x in another.
|
H: HDMI cable sparks and shocked me
I just owned a desktop PC and as display I connected my TV through HDMI cable.
Today I changed the HDMI cable to one that can handle 4K resolutions. So I disconnected the old HDMI cable and then with the new cable I connected first the PC side and the the TV side and I got a spark in the metal part of the HDMI plug when I was trying to connect it. Also if I touch the TV HDMI port a get a little shock in my finger.
The TV only has a 2 prong power cord, so it doesn't have the earth pin.
Does this is potentially dangerous to my PC?
I've read this in different forums but there are very spreaded ideas:
It is very risky and that could fry the GPU.
The earth pin is not necessary because the TV has plastic case (I know that ground is needed to avoid electric shocks to users when live wire touches the chasis but this is not the case)
Coax cable can be the best way to ground a TV (if it has 2 prong plug cable)
Some manuals (of TV with 2 prong plug cable) says that to connect an HDMI device everything needs to be powered off and unplugged from any source to make the connection (this makes sense so the TV will be grounded with the HDMI cable so no shocks and fried GPUs)
Nothing will happen those sparks will be uncharged by the grounded device.
Any of these Ideas are true? (Especially #4)
I really don't know if is safe or not to connect all again.
Thanks in advance.
Edit:
Just to give more information...
The TV and PC are connected to AVR outlets of a voltage regulator. Also a modem and a Nintendo switch dock are connected there.
The modem has a phone line that is plugged into the voltage regulator phone line protection.
The Voltage regulator has 1000W capacity. And the outlet where is connected is grounded properly.
The TV and modem are connected through Ethernet cable. Also the Nintendo Switch dock is connected through HDMI cable. Nintendo switch dock does not have earth pin.
AI: This is just equalization of voltage between the two isolated and ungrounded (thus floating) switchmode power supplies in your TV and PC.
It is not dangerous, since the chassis exterior of the connector will always connect first on all connectors where this could cause damage.
Unless you own non-compliant cables or somehow manage to contact the pins before chassis.
However, on some cheap equipment this discharge may cause some operational glitches.
This potential difference, usually around half of mains voltage, could be tingly for you. Especially if the leakage current of all connected power supplies adds up (eg: blu-ray + xbox + tv).
You have the GFCI to prevent hazardous circumstances on any equipment failure.
Coax is not guaranteed to be grounded, ask your service provider. Usually you have to provide earthing of the entry point yourself. If it is grounded, then yes, all devices it is connected to do have some ""ground"". But the discharge will still occur if only one of the devices is connected to ground.
There seems to be some misunderstanding in the comments about devices that do not have grounding, eg: the device has a 2-prong plug. These devices may have exposed metal for connectors, such as USB or HDMI, and these devices are not dangerous.
Standards dictate they may have some non-harmful limited leakage current, you may recognize these class of devices by double square symbol.
A device that does not have this symbol, but has a two-prong plug, are non-compliant and can be seen as dangerous.
|
H: Is this an acceptable circuit for debouncing a Raspberrry Pi input pin?
I am trying to design a circuit to debounce an input switch on a Raspberry Pi. The switch is for a doorbell, so it doesn't need to register multiple valid presses that are close together in time. There will be at least a second between any two actuations.
I have done some research, and the thing that confuses me, is that I'm not sure if both R2 and R3 are required, or just one (and in that case, which one). My understanding is that a value of 300nF for the capacitor, and 100k for the resistor, to give a time constant of 30ms, should be ok.
(Where R1 is the internal pull up resistor)
As I understand it, removing R3 would make the switch short the capacitor, which breaks the debouncing effect. Remving R2 would mean that when the switch is released, there willl be a large inrush current from the pin into the capacitor (which might damage the pin?). The thing I don't understand, is whether the time constant calculation should reference R2, R3 or both.
(I know I could just copy this from somewhere, but I would like to learn.)
AI: You are correct about R3. However, R2 is not necessary: when the button is released, the capacitor will charge slowly due to the resistance of R1. When the button is pressed, it will discharge slowly due to the resistance of R3. In fact, R2 can even cause a problem: with the button pressed, the capacitor voltage will not reach ground (since R2 and R1 will form a voltage divider).
As for the time constant, it should take all resistances "seen" by the capacitor terminals into account. When the button is pressed, this is \$(R_1 + R_2) || R_3\$ (found by shorting power to ground and solving for the equiv. resistance between the two capacitor terminals).
When the button is released, the time constant for charging is based on the resistance \$(R_1 + R_2)\$. As you can see, even with R2 gone, inrush is limited by R1.
There is another issue here: the steady-state voltage when the button is pressed. This voltage will not be ground, but rather is \$\frac{R_3}{R_1 + R_3}\$ (ignoring R2). This voltage will be far too high with your choice of R3. You can get rid of R2 and R3 altogether: the capacitor will charge rapidly from the button, but this inrush is generally acceptable at the size you mention, while the pull-up resistor's current will still be acceptable to avoid GPIO damage.
|
H: Establishing Safe Operation Range for Lipo Battery with Buck Boost Converter
I have a circuitry that I need to power up with lipo battery. I need to regulate battery to 3.3V with buck-boost converter, since LDO can not be able to provide required current output and causes heating problem etc. In order to safely work with lipo, I need to disconnect the load when battery drops to 3.1-3.2 V. Therefore I checked for the buck-boost converters with UVLO property but I could not be able find buck-boost converter with 3.1V minimum Input Voltage. Hence, I wonder how appropriate to plug a simple diode between input of the buck-boost converter and Positive terminal of the battery for establishing 0.7V Voltage drop in order to being used with 2.5V minimum Input Voltage Buck-Boost Converters?
Datasheet of the Buck Boost Converter I am planning to use.
(https://www.ti.com/lit/ds/symlink/tps63050.pdf?ts=1596197768219&ref_url=https%253A%252F%252Fwww.ti.com%252Fpower-management%252Fnon-isolated-dc-dc-switching-regulators%252Fbuck-boost-inverting%252Fbuck-boost-inverting-split-rail-converters-integrated-switch%252Fproducts.html)
AI: The regulator you listed may continue working down to 1.7 volts - that is its UVLO level so, adding a diode in series with the power rail to the device is not going to work AND, the diode will represent a big power loss in normal operation because it's conducting power supply feed current. This defeats the object of using a switching regulator in many ways.
Instead, use a comparator circuit and resistors to turn off the EN input when the voltage drops down to 3.1 volts. Here's the sort of circuit that would work to protect the battery: -
Taken from this article subtitled "Li-Ion Battery Undervoltage Lockout".
You don't have to use SW1 to directly turn the battery off to the TI chip because you can flip the inputs of the comparator and drive the enable pin directly. Or just use it as it stands with a P channel MOSFET.
Version with inputs flipped - note that R4 moves also: -
Simulation
Note that R1 has changed to 4.9 Mohm to make this operate correctly around 3.1 volts: -
I'm varying the battery voltage between 2 volts and 4 volts (blue trace) with the comparator output (red trace) flipping accordingly around 3.1 volts.
|
H: BJT Pair on Voltage Regulator Output
What's the purpose of the BJT pair on the output of this regulator? Note: +VD is used to power several IC's.
It almost looks like a way to power +VD from two separate sources. If so, I guess I'm not clear on what happens with the BJT's when both sources are applied.
AI: Pin 1 of the ribbon cable connector allows the target board to supply power to the serial adapter.
So it's probably better to "see" that section of the target board supply as the following:
simulate this circuit – Schematic created using CircuitLab
Note, above, that I've changed the viewpoint for \$Q_2\$ so that it is oriented correctly. The reason is that it's actually a BJT operated in reverse mode (active or saturated), which means \$\beta_{2_\text{SAT}}\$ will be rather low -- on the order of 1 or 2, maybe less. Meanwhile, \$\beta_{1_\text{SAT}}\$ will be much higher -- excessively convervative if estimated at 10, and much more likely operating okay nearer values of 40 or 50.
So there's quite a difference in the load currents that can be supported by that single resistor, \$R_2\$, when comparing the \$V_\text{D}\$ rail and the \$X_\text{PWR}\$ rail. And I think that's really the main point of this exercise. The connector pin on the target board is supposed to provide power to the serial adapter module. But it's an exposed pin and can be shorted or otherwise accidentally abused. If a short or an excessive load is placed on pin 1 (XPWR), then \$Q_2\$ just won't be able to saturate and the output voltage will drop to a safer level and so will its "collector" (reverse-emitter) current.
Meanwhile, \$V_\text{D}\$, which is safely and securely used by the target board itself (a known quantity and where fumble-fingers can't as easily screw things up) is being supplied via a higher-saturation-beta BJT, so it can handle a higher load current at its forward-collector.
However, \$R_2\$ does limit the total load that can be delivered either to \$V_\text{D}\$ or to the external pin to the adapter. So it's really a very nice way to handle things.
\$V_\text{BASE}\approx V_\text{CC}-700\:\text{mV}\$; available base drive current is about \$I_{R_2}\approx\frac{V_\text{CC}-700\:\text{mV}}{R_2=6.81\:\text{k}\Omega}\$.
This is one of those cases that reminds us why maintaining proficiency with a variety of discrete BJT design concepts still remains relevant today.
(A final note of smaller interest is that the voltage drop across the collector and emitter leads of a reverse-operated BJT, in saturation, is slightly less than it may be when forward-operated. So \$Q_1\$'s saturation voltage drop will likely be a little more than \$Q_2\$'s saturation voltage drop. Assuming sufficient base current is available for both BJTs, I'd expect the ratio of collector-emitter voltage drops between the two to be about a factor of 2 or 3. This has the nice effect that the voltage at \$X_\text{PWR}\$ will be closer to \$V_\text{D}\$ than \$V_\text{D}\$ is to \$V_\text{CC}\$. So those two rail voltages should be pretty close, so long as the load on \$X_\text{PWR}\$ is sufficiently light. I'm pretty sure that the designers of this circuit were aware of this, as well, and appreciated this side-effect, which came along for "free.")
|
H: CAN Bus Nominal Impedance
I understand the reason for choosing a termination resistor of 120 Ohms for the CAN bus to avoid reflections but why was the nominal impedance of the CAN bus cables required to be 120 Ohms by the ISO 11898-2?
AI: You mean, why not 220 ,100 or 75 or 50 Ohms?
It was conveniently close to what some wire pair gave for impedance , based on ratios of conductor to insulator diameter for certain Ribbon wire, twisted pair etc.
I think 93 ohms was common at one time for low capacitance coax on arcnet or something like that. Ribbon cable was 120 ohms and many others, due to voltage rating and thus insulation to conductor ratio. Thinner insulation with a lower gap between conductors is lower impedance so 120 Ohms is I recall the typical 60~70 pF/m (est.) and 500 to 1000 nH/m (ballpark) but \$Z_o=\sqrt{\frac{L}{C}}\$ so I'll let you work it out.
|
H: 12V or 220V for energy efficiency?
I just saw a DIY solar panel setup, in which a single panel produces 12V output, which is then passed through a controller and stored in a 72Ah 12V car battery.
The stored electricity is mostly supposed to be used for night lighting of the outside, and currently consists of a single 12V 3W LED lamp (and of course the associated night-time detector.)
The question is, is there any sense (from energy efficiency perspective) to use an inverter and 220V lamps and other loads, if the required items can be had in 12V versions?
I would assume 220V loads would be more energy expensive to run, as the voltage converter adds another step in energy conversion and every step results in some energy loss. However, as I understand, high voltage lines are a better way to transfer electricity across larger distances. The distances involved here are hardly likely to exceed 10-12m though.
AI: Your hunch is correct. Voltage conversion, particularly from DC to AC, will cost due to conversion losses.
You are also correct that higher voltage reduces transmission losses. You can compensate for this at low voltages by reducing cable resistance by increasing the cable cross-sectional area.
There are many online calculators for this.
Figure 1. jCalc (picked at random) seems quite comprehensive.
|
H: Estimating SOC using coulomb counting with DSP
I am trying to estimate the SOC of a battery using the Coulomb Counting technique. I am implementing the following equation on a DSP inside PSIM:
$$
SOC[K] = SOC[K-1] - \frac{I_{Bat}}{Q_{Bat}}\cdot{Ts}
$$
//Performed at T=0 of the simulation
double SOC[2] = {0.0, 0.7};
double Ts = 1/12000.0;
//Performed on each simulation step
I_Bat = in[2];
SOC[0] = SOC[1] - (I_Bat/(2.5/2000.0))*Ts/(3600.0);
out[1] = SOC[0];
SOC[1] = SOC[0];
The initial state of charge of the battery is 0.7. The results I am getting, however, are not very precise:
Actual SOC in red. Estimated SOC in blue.
Am I missing something in my implementation or is there a way to increase its accuracy? Thanks for your time.
Update: I am gathering the I and Q as follows:
For I I am sensing the battery's current with a gain of 1. And as for Q I am using the battery's nominal capacity.
AI: As mentioned in the comments, trying to estimate the SOC with only a current-based method is not going to be precise since there are other variables you're not accounting for.
Coulomb counting relies on integration and that is its main drawback -- any measurement offset, error, or otherwise uncertainty grows without bounds over time until you reset the estimate.
Your basic equation is correct but imagine what happens if the current measurement device has an offset (e.g \$I_{\text{OFFSET}}\$):
Your equation now becomes:
$$ \text{SOC[n]} = \text{SOC[n-1]}-\dfrac{I_{\text{BAT}}+I_{\text{OFFSET}}}{Q}\Delta T $$
$$ \text{SOC[n]} = \text{SOC[n-1]}-\dfrac{I_{\text{BAT}}}{Q}\Delta T +\epsilon $$
Where
$$\epsilon= -\dfrac{I_{\text{OFFSET}}}{Q}\Delta T$$
You can see how this error term propagates through each SOC estimate and in fact, for \$n\$ measurements, the cumulative error is
$$\text{Error[n] = }n\cdot \epsilon$$
The source of the error could be one thing or a combination of many other effects such as model error, measurement error, uncertainty, etc. I don't know the specifics of your model but for this method to work better, you need to somehow take them into account and "reset" the integral error that will continue to grow to such a point that the true and the estimate diverge significantly.
|
H: Correctling a sign in a simple circuit with parallel resistors
I've a simple circuit with two parallel resistors, but my derivation of the circuit equations gives a sign the opposite of what I know to occur, so I'm looking for help fixing the error as well as a general strategy for keeping the signs correct in the future. Consider the circuit:
The voltage law on the left gives
$$v=v_1 \Longrightarrow v=i_1 R_1$$
and the circuit law at the top node gives
$$i = i_1 + i_2.$$
Now, I know that the voltage drop across the parallel resisitors should be the same and equal to v. However, when I consider the voltages on the rightmost loop, I see
$$v_1 + v_2 = 0 \Longrightarrow i_1 R_1 + i_2 R_2=0$$
To me, if I have polarity labeled, even if it doesn't matter for resistors, I place positive flow into + as the left and positive flow into - on the right. This is reversed for negative flow. That said, this leads to the incorrect equation above. If we do the outer loop, this gives the correct sign with
$$
v = v_2 \Longrightarrow v = i_2 R_2.
$$
which would imply, correctly, that
$$
i_1 R_1 = i_2 R_2.
$$
As such, what is the correct sign convention in this case in order to give the correct result? What is a general strategy for determining the sign and maintaining consistency when the current is divided at a node?
AI: Your problem is here:
However, when I consider the voltages on the rightmost loop, I see
$$v_1 + v_2 = 0 \Longrightarrow i_1 R_1 + i_2 R_2=0$$
As you go around the loop you're entering one resistor at the "+" terminal and the other resistor at the "-" terminal, so you need to give one of these a negative sign.
Then you'd have
$$v_1 + v_2 = 0 \Longrightarrow i_1 R_1 - i_2 R_2=0$$
which is exactly what you expect.
|
H: Why are the parts more expensive than a Pro Micro?
I have just started studying electronics and I am having a good time. In the past my experience would have been to use cheap boards, such as the Pro Micro.
What I find confusing is that parts, such as an oscillator, is often more expensive than a cheap $3 Micro Pro, which could have done the same thing with a few lines of code!
What are the benefits of using electronics parts, when a cheaper development board could do the same thing?
AI: If you start at mouser or digikey or equivalent and look at the multiples of thousands of part prices. so something might be $1.00 in single quantity but it might be $0.20 in quantity of 10,000 and also understand IF and when you buy in those quantities you can do better than the mouser/etc price going through a distributor. They make a profit, early raspberry pi's perhaps not, but in general there is a profit, in quantity, with quantity prices, on an automated production line, (and other cost reductions like quality), the whole board with profit can cost less than the most expensive single part on the board.
If your goal is to make a robot on your garage then just buying already made boards is often the way to go. If you are instead evaluating a part for some mass produced product you want to make, or if you want to learn more about the part like how to field upgrade it or you want a similar part from that vendor that does not have a hobby/eval board then you would either sample a part for free or buy a few at full price, make a pcb at full price, etc.
So you may end up paying $10-$20 for something that only has a few components and is less complicated than the $3 board (and you solder yourself), but it is specific to what you want rather than something generic. Then if you go into production then you shop around, you decide if you are buying the parts or having the contract manufacturer buy the parts (they buy in very high quantities and get the best pricing, but they add profit when they essentially sell you the parts), how to test it, etc, the whole process.
Another way to look at this. For whatever parts are available start shopping for car parts, doors, hood, quarter, panel, battery, wheels, driveshaft, transmission, engine, etc. Same deal you cant build that car for remotely the price that you can just buy an assembled one.
Economy of scale.
|
H: Is using a wire rated the same as its circuit's fuse OK?
I want to add a kill switch on the fuel pump relay in my car, which includes extending a line connected to a 15A fuse.
I bought some 15A auto wire, but on reflection I'm not 100% sure if that's right. Since the wire is rated the same as the fuse, is there a chance it will melt instead of/at the same time as the fuse in the event of an overload, or am I overthinking it?
AI: If the wire is rated to safely carry 15 Amp, it will be able to carry a much higher current before melting. It can safely be protected by a 15 Amp fuse.
|
H: Texas Instruments fully differential op amp app note: I'm having difficulty understanding an equation (single ended to differential video conversion)
I am developing a circuit to convert single-ended video to differential, based around the TI article "Converting single-ended video to differential video in single-supply systems" by Jim Karki. The article describes how to bias a FDA using a Thevenin equivalent to eliminate offset errors in the output.
Conceptually it all makes sense, and I can make sense of everything except for Equation 4 on the 3rd page (see the included image). The equation states that the gain of the circuit is G = 2 x (Rf/Rth)x(Rt/(Rs+Rt)). What I don't understand is why the second term, Rt/(Rs+Rt) is included here, when it already is included in the calculation of Rth (the Thevenin resistance) along with the video input's source resistance. It isn't as simple as just saying that the effects of Rt & Rs cancel out the 2x at the beginning of the equation (as would be the case with most video systems), because Rt and Rs are not the same resistance in the final solution.
Part of me thinks I can see the logic, but I can't formulate a consistent explanation. Because the circuit I am designing is slightly different, I really need to understand all of the steps rather than lazily copying what is in the paper!
EDIT: I corrected the erroneous Rs to Rt in one of the equations as pointed out by one of the commenters
Here is a link to the full article:
https://www.ti.com/lit/an/slyt427/slyt427.pdf
AI: The equivalent circuit is this:-
simulate this circuit – Schematic created using CircuitLab
\$ \frac{R_T}{R_S+R_T}\$ accounts for the voltage division produced by RS (source impedance) and RT (termination resistance). This reduces the input voltage and therefore the gain of the circuit, which is why the term is included in the gain formula.
The values of RG1 and RF are chosen to lower the input impedance to 75 Ω, which further reduces the input voltage (to half the unloaded source voltage). However the op amp gain term \$\frac{R_F}{R_{TH}}\$ already takes this into account because RTH is the combined Thevenin equivalent of RS, RT, and RG1.
Note that unlike an op amp the different amplifier does not create a virtual earth at its inverting input, so its input impedance is not simply RG1. The calculations required to get the desired input impedance and gain are described in TI's app note slyt301 Input impedance matching with fully
differential amplifiers.
|
H: Diode in RC Filter
Is a diode ever used in an RC filter in the configuration below to stop charge from the capacitor flowing back to the source when it falls below the cap voltage (kind of like a peak detector)? Or why isn't this done?
AI: You can do that, but it stops being a RC low-pass filter when you do:
When you say "R1 and C1 form an RC low-pass filter", that means you assume the output signal is the voltage over C1, which means that whatever "sees" that voltage has a high input impedance and doesn't actually draw significant current from the RC circuit.
That means in your lower circuit, there's no way for charge on the capacitor to ever be conducted in opposite direction to what the diode allows.
Therefore, instead of a low-pass filter, which would pass lower frequencies, and especially constant input voltage, you'd be charging the capacitor only. Not a filter! Once that capacitor has reached any voltage, you can never see a voltage below that, no matter what the input is.
If you really want a peak detector, yep, what you describe is how you'd do it (you'd choose a smaller capacitor though in practice, and a resistor value low enough for a short pulse to still charge your capacitor).
In a peak detector, you'd also need some way to "reset" your capacitor, so something like a transistor with the collector-emitter in parallel to the capacitor, which you can turn on to discharge the capacitor. through external control (e.g. a microcontroller).
At that point, it might make sense to simply low-pass your input signal (no diode) and sample it with a microcontroller sufficiently fast and do the detection digitally.
|
H: Op-amp circuit oscillation
The ideal op-amp is connected to a power source \$V_s\$ at t = 0. Initial charge on the capacitor is 0.
Then it is given that \$V_{OUT}\$ swings to positive value and \$V^-\$ starts increasing. \$V^-\$ increases till \$V_{TH}\$ and then starts decreasing, till it reaches \$-V_{TH}\$ and starts increasing again. Thus it is a periodic cycle with oscillations between \$V_{TH}\$ and \$-V_{TH}\$. \$V_{TH}\$ is to be determined along with the oscillation period.\
I wrote the following two equation for the op-amp terminals
$$V^+ = \frac{R_3V_{OUT}}{R_2+R_3} \; \; \; \; \; \; \; \; \; V^- = V_C \; \; \; \; \; \; \; \; \; \dot{V_C} = \frac{1}{R_1C}(V_{OUT}-V_C)$$
And since op amp is ideal \$V^- = V^+\$ at all times.
What I could not understand was how would \$V^-\$ reach to a threshold voltage? Because after the capacitor voltage reaches \$V_{TH}\$, when it starts to decrease, the current across \$R_1\$ will become 0 momentarily, before switching direction. At that moment \$V^- = V_{OUT}\$; which will violate the equation of positive terminal.
AI: The concept of virtual ground cannot be applied to this circuit. It is applicable only to circuits where the net opamp circuit is in negative feedback mode and it is the negative feedback which ensures that \$V- = V+\$. Here the opamp circuit has positive feedback via R2 and R3. The output of the opamp is driven to saturation due to this positive feedback. Hence \$V-\$ need not always equal \$V+\$.
"Because after the capacitor voltage reaches VTH, when it starts to decrease". The terminology "starts to decrease" can only be applied to a real opamp with finite slew rate. For an ideal opamp with infinite slew rate, the output instantly changes from \$V_s\$ to \$-V_s\$ (It doesn't go through zero voltage). So there is no time instant where the current is zero. Current also instantly changes sign.
Before switching
\$V^+ = +V_{TH} > V_C = V^-\$. So \$V_o = +V_s\$. (consistent set of eqns)
current \$I = (V_s - V_C)/R\$. and \$V_C \rightarrow V_{TH}\$.
Instantly after switching
\$V_C = V^- > V^+\$. So \$V_o = -V_s\$. So \$V^+ = -V_{TH}\$. (consistent set of eqns)
\$I = (-V_s - V_C)/R\$.
i.e. current is non zero always.
With ideal components which can have infinite slew rate and discontinuous outputs, the intuition breaks down and you have to rely on which set of equations are consistent and which are not. In your case current = 0 assumption leads to a set of inconsistent equations (as you have noticed). That means that current doesn't reach such a condition.
|
H: RC circuit not ideal sampling
I have this circuit and I have to find \$x(t)\$, starting from \$ x_c (t) \$
I know that, at \$t=0\$, the switch is closed, so the capacitor is charged and, at the moment \$ x(n)T_c \$ the switch is open and the capacitor discharge on the resistance (with an exponential trend and an RC constant).
So I wrote that \$ x_c (t) = x(nT_c)s(t - nT_c) \$ where \$ s(t) = e^{- \frac{t}{RC} } \$ if \$ 0 < t < T_c \$ and \$0\$ for the rest.
But now I’m blocked. My book finds \$S(f)\$ and after the equalized filter transfer function.
I obtained that \$ S(f) = \frac{RC}{1 + RCf} \$ but this result is completely different from my book \$ f_c = \frac{1}{T_c} \$ and we assume Nyquist condition is verified.
AI: As OP has mentioned,
\$s(t) = \exp(-t/RC)\$ for \$0 < t < T_c\$, elsewhere zero. i.e. it can be re written as
\$\color{red}{s(t) = \exp(-t/RC) \cdot (u(t) - u(t - T_c))}\$
\$s(t) = \exp(-t/RC) \cdot u(t) - \exp(-(t-T_c + T_c)/RC) \cdot u(t - T_c)\$
\$s(t)= \exp(-t/RC) \cdot u(t) - \exp(-T_c/RC) \exp(-(t-T_c)/RC) \cdot u(t - T_c) \$. taking Laplace transform (and using time shifting theorem),
\$S(w) = \frac{1}{w+1/RC} - \exp(-T_c/RC) \cdot \frac{\exp(-T_c \cdot w)}{w+1/RC}\$
\$S(w) = \frac{1}{w+1/RC} (1 - \exp(-T_c/RC) \cdot \exp(-T_c w))\$
The above equation is what seems to be present on top of page 22.
Note that I have used \$w\$ as the Laplace variable since \$s\$ is already being used for another purpose.
|
H: Common emitter bandwidth and probing
I am trying to design a simple RF amplifier for a 1MHz AM signal (for low-power transmission). My modulator (JFET-based) outputs ~800mV peak-to-peak. My power supply is 9V, and I want near the largest possible amplification without distortion (class A operation) - my modulator outputs a reasonably-clean sine with next to 0 harmonic distortion, so I might avoid filtering.
This is what I came up with:
simulate this circuit – Schematic created using CircuitLab
Reasoning:
As I understand, voltage gain is Rc/Re which is 6.8 here. That should mean an output of Vout = 800mV*6.8 = 5.44V, reasonably big and there is still a big room for non-precise Q point setting. I picked those two resistor values based on what I have at hand.
I want to set the Q-point so the output is at 4-5V. That should be at 0.74-0.59 mA. To enable a more precise setting, the lower resistor (1.7k) is a 10k pot.
As I understand, the BC238 should be capable to this amplification at this frequency, the datasheet has a 85MHz transition frequency at 0.5mA, so it should still have a bandwidth of f' = f / 6.8 = 12.5 MHz.
I built up this circuit on a piece of copper board I cut lands into with miniature powertool with a diamond cutting bit. I used an old analog signal generator to provide the test signal, set it to ~800mV 1MHz (rather imprecise due to it's analog nature, sadly), and monitored the output with a scope. With a 100MHz 10x probe on the 1x setting I got ~700mV, and on the 10x I got ~300mV. I am not sure what is the real output voltage (700mV or 3V). (this is solved, see edit 3)
In any case, the resulting signal is smaller than the expected output. I understand that internal capacitances in the transistor start to attenuate the signal at higher frequencies, but this drastic effect was unexpected for me. I feel like I might have overlooked something simple.
PS:
I have already tried adding a small (6nF-1u, the later was an electrolyt cap) cap between ground and emitter. That kind-of fixed the gain problem (both on 1x and 10x probe settings) but distorted the signal highly, the output more resembled a sawtooth than a sine.
So questions:
what is / how to find my real output voltage?
how can I increase the maximum working frequency of this amplifier?
is there a simple but fatal design flaw in my circuit?
Edit 1
I measured output voltage at lower frequencies. This generator can only go down to .1MHz, so from there I collected 10 data points up to 1MHz. Measurements were rather inprecise (the voltage display on my scope changed rather quickly, possibly the generator also is not perfect), but should be accurate to +- 10mV. All measurements were done on the 10x setting.
| f | mV |
|----|-----|
| .1 | 500 |
| .2 | 500 |
| .3 | 490 |
| .4 | 460 |
| .5 | 450 |
| .6 | 410 |
| .7 | 380 |
| .8 | 370 |
| .9 | 350 |
| 1 | 310 |
(all those number were the measured voltages with a x10 probe, so the real ones should be those x10)
The downward going trend is still apparent from this dataset. At 100kHz, I measured a 4.2V signal with the 1x setting, which I still do not understand.
Edit2
Measured two more data points - f=10kHz I got 5.04V from 800mV input, and at f=1kHz I got 3V from 400mV input. Those numbers are all around what I have expected.
The measurement problem (difference with x1 and x10) might be because my probe loads the circuit differently, and I have a big (6.8k) output impedance, but I am not sure of that.
Edit3 - probing
I am pretty sure now that the measuring problem is due to the different loading on my circuit in the x1 vs x10 mode. I experimented with a 10k-10k voltage divider and a 10V signal (1MHz). With x10, I measure 500mV that equals 5V, which is around correct. With x1, I only get around 1.5V, so I should really only trust the x10 readings.
So the question remaining is that why is gain dropping so much in this circuit?
AI: Nothing fatal with the circuit. It's DC bias is reasonably set, and it will amplify. One problem is no effort to include even a simple representation of a load - any load will reduce gain. Resistors chosen are too high. Many very wideband amplifiers work with 50 ohm sources and 50 ohm loads. They might pull tens of milliamps or more from their DC supply. 800mV input might be a bit high, risking amplifier non-linear behaviour. At 1MHz, 50 ohm impedance at input/output is perhaps overkill, but this amplifier's high impedance will result in providing very little output power.
Probing the transistor collector with a 'scope probe adds capacitance, which combines with the 6.8k collector resistor to form a low-pass filter - which attenuates higher frequencies. You only need a loading capacitance of about 20pf to cause noticeable attenuation at 1 MHz. A 1X 'scope probe might have more than 100pf capacitance. A 10X 'scope probe might have 11pf.
Estimate a resistance (and perhaps capacitance) of your intended load. Add this to your circuit's output, coupled through an appropriate-size capacitor. You will find that gain is adversely affected.
Try scaling amplifier resistors downward, biasing that transistor with more collector current.
If these measures can't produce enough gain @ 1MHz., consider a tuned amplifier, with the 6.8k resistor replaced by an inductor resonated by a parallel capacitor. Doing so may risk making an oscillator, but makes achieving a reasonable power gain easier. Tuning to 1MHz is not particularly easy for a beginner, and coupling power from the collector to a load impedance adds complication too.
|
H: Do Induction Motors only work if the rotor's coils have a finite resistance?
I just did some calculations, and to me it seems that the induction motor only works when the rotors coils have finite resistance:
I will show that for a single conducting loop, whose current is driven by change of flux due to the exterior magnetic field, the torque on the loop will be zero when the current is zero, and when the voltage is zero as well.
I assume that the stators coils produce a rotating magnetic field. For the sake of the question, I I'm switchting to a rotating frame of reference, that rotates with the same frequency, by which also the rotor rotates. In this system, the only thing that is moving is the rotor (unless it's rotating with the same frequency. I assume that there is a "slip", so in the reference frame of the outer magnetic field, the rotor rotates to the right).
I'm aware that a rotor doesn't consist of only one loop, but of many, and that they are arranged in different angles. I still think that for the sake of the question, it's enough to draw one loop.
In the 2nd picture, the voltage induced in the loop BY THE OUTER ROTATING MAGNETIC FIELD ALONE is at max, because the change in magnetic flux reaches an extreme point when the magnetic field lines are perpendicular to plane of the loop.
The voltage drives the current in the loop. Because the loop is an inductor itself (it creates a magnetic field as well), the current is behind the voltage by 90 degrees.
That means the current is at max in reverse direction in the first picture.
However, In the situation of the first picture, there isn't any torque acting on the rotor, because the torque generated by Lorentz forces acting on the charges sums up to zero.
In the 2nd picture, current would generate the maximum possible torque. But here (since current is behind voltage by 90°) the current is zero.
Question: Is it wrong to just look at the 2 cases that I described here? Or do we in general need to introduce resistors into the rotors circuit, to change the phase-shift between voltage and current?
AI: Using the usual equivalent circuit, the electrical power converted to mechanical power is calculated as the power dissipated in R2x(1-s)/s where R2 is the rotor resistance. That would seem to require a finite rotor resistance. The rotor resistance is quite small in most induction motors, but the other impedances in the equivalent circuit are also quite small, so the rotor resistance is not small in comparison.
If you look at the torque vs speed equation Torque-Speed Equation for Induction Motor, it looks to me that it does not fail if R2 = 0.
You may also want to look at When load increases in rotor of induction motor how does stator draws more current? for more detail about the equivalent circuit.
As commented by @MikeWaters, there is not much reason to pursue this unless you are interested in a superconductor rotor.
Re Comments
Increasing the rotor resistance results in higher slip at a given torque as shown below. Resistance can be increased and decreased by changing the rotor bar size and material and be connecting external resistors through slip rings. The highest slip without external resistance that is commonly offered is about 13% at rated torque. Slip in the area of 1.5 to 2 percent seems to be available with aluminum rotor bars. Copper rotor bars must be able to provide slip a bitbelow 1.5%.
The equivalent circuit is used in motor design, but the design process is a lot more than that. With most motors, more than one equivalent circuit or more branches in the rotor circuit are needed to model changes in the rotor resistance when the slip is high. The simple circuit works only for rotor bars that do nor extend very far into the rotor from the surface. In order to provide higher torque at high slip, the rotor bars are extended more deeply or split into a surface part and a deep part.
If the motor is intended only for use with a VFD, the motor could be designed with big copper rotor bars close to the surface. That seems to be the strategy used for the early model Tesla cars.
An induction motor is not supposed to be able to develop torque without slip, but I don't know what happens as the torque vs. speed curve becomes vertical. That seems to be what will happen as R2 approaches zero.
Calculations
The following shows the results of progressively reducing R2. T1 represents a curve for the equivalent circuit that I believe represents a motor that was actually constructed. I don't remember where I got the data. T2 shows the "normal" effect of reducing rotor resistance, the peak torque remains the same but occurs at a lower slip. T3 shows a slight rise in peak torque but a more drastic reduction in torque on the high-slip side of the peak. T4 and T5 show the peak torque falling with reduced R2. Per unit values of R2 are 1, .7, .23, .14 and.02 for T1, T2, T3, T4 and T5 respectively. The equivalent circuit used omitted the magnetization branch.
|
H: Why are bipolar transistors used for switching applications?
I noticed that many sites targeted at hobbyists recommend bipolar transistors (mostly NPN) to switch things on and off. Bipolar transistors definitely have their purposes especially in analog circuits, but if you want to switch a relay for example, a MOSFET is a lot easier to work with a lot less downsides.
They can easily switch many amps of current without requiring current themselves.
They (almost) don't drop voltage across source and drain which means they won't get hot even at high currents and they are as cheap as bipolar transistors.
Are there any pros to using bipolar transistors in switching applications I am overseeing?
UPDATE:
The sites I was talking about where Adafruit and similar sites.
I never really looked into THT parts since I only work with SMD parts at work. I just checked Digi-Key and although they have very good and cheap SMD FETs their selection of THT FETs is very limited much more expensive and with higher drive voltages... I suppose THT FETs are commercially only used to drive really high currents.
Summarized you could say that since hobbyists are normally limited to THT, suitable BJTs are more easily accessible and a little less sensitive to ESD while tinkering.
Basically I just wanted to know if I was missing something and should use BJTs over FETs at work in some cases.
AI: 1: Bipolars are cheaper
So you can do larger experiments with the same budget.
2: Bipolars don't die an instant death from ESD
So there's less risk of the user giving up on electronics because "nothing works as described".
3: bipolars are good enough for many tasks.
V_ce(sat) < 0.1V is typical
4: most "logic" MOSFETs need inconvenient drive voltages
getting 5V drive from a raspberry pi is going to take an extra MOSFET.
5: The MOSFETS that do exist for 3.3V operation are terrible compared to BJTs they cost ten times as much and aren't half as good.
|
H: whats does the ESP-01S LED indicate
I recently bought an ESP-01S module and it only has one blue LED on it (unlike the other ESP8266 modules) and when I connect the 3v3 and gnd, it blinks twice.
I was wondering what does this LED indicate? is it only power? or maybe connected to the RX and TX pins?
Unfortunately, I couldn't find a complete schematic of the board or a detailed datasheet. The only datasheet I found was this which didn't include details.
Also, when I tried to power the ESP up, I noticed that the wires spark when I try to connect the 3v3; Does that mean I'm not supplying the module correctly? I'm using the 3v3 and the GND pin on arudino Due
AI: The led is connected to GPIO2/UART1_TXD as seen in the Chinese datasheet https://docs.ai-thinker.com/_media/esp8266/docs/esp-01s_product_specification_zh_v1.0.pdf
It flashes on power on because like all esps the gpio2 is toggled during boot.
|
H: Buck converter without inductor in a NiMH charger (Zilog AN0259 application note)
After doing some reading online, it seems that you can't really build a step-down converter with only a filtering capacitor and without an inductor, because the losses occuring during charging of the capacitor would lead to low efficiency.
However, I'm looking at a application note from Zilog: "AN0259 - Low-Cost NiMH Battery Charger Using the Z8F0830": https://www.zilog.com/docs/z8encorexp/appnotes/AN0259.pdf which is using exactly that circuit - a capacitor is charged with a 10 kHz PWM signal, which in turn charges the NiMH battery. No inductor is present in the circuit.
What makes this circuit work in that situation? Or maybe it acts as I described above - it has high losses, but the designers just roll with it?
AI: The circuit you mentioned could be described as a pwm current source. It uses its relatively large 2 ohms current sensing resistor, as well as the resistor R3 at the base of Q1 to limit its output current.
A quick simulation shows that there is significant power dissipation in the other Q1 (BD140) during the on phase of the pwm cycle. So to answer your question: It looks like the designers just "rolled with it".
If you consider using this circuit i would like to advise against it since it relies solely on software intervention in case of overcurrent. Also, there is no fuse.
|
H: How would you combine DC power, bi-directional serial data, and an RF signal on a single 50-Ohm coax feedline?
I would like to power a remote device and communicate with it over some serial protocol on the far-end of a 50-Ohm coax feedline (RS232, i2c, SPI, etc), while at the same time sending/receiving an RF signal (144-148MHz ham band).
A bias tee is simple enough to get power down the line, but how could I add serial communications?
Are there existing components or ICs to facilitate such a data encapsulation?
What bitrate can you achieve?
AI: They weren't originally designed for it, but I have seen applications that use bidirectional radio chips such as the TI CC1101 to pass control/status data in both directions through a coax alongside DC power and another RF signal.
The chip handles a lot of the details and is relatively easy to set up with a microcontroller. In fact, in one design, a very simple "soft core" microcontroller embedded in an FPGA takes care of it. The data rate can be set anywhere from 0.6 to 600 kbps.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.