text stringlengths 83 79.5k |
|---|
H: How to find what is eating up current in electronic circuit?
I have 2 exact electronic circuits, with one malfunctioning while the other is functioning. The total current consumed by the malfunctioning circuit is 0.48 A, while the functioning PCB has 0.271 A.
My question is, how can I know which parts in the PCB is eating up this current difference?
What I tried so far is, to compare the resistance of the ICs in both of them to notice if there is any difference. Because:
V = IR
And so if resistance is low, current will be high. But this process is taking too long, I still have so many electronic parts to compare e.g. ICs, capacitors, transistors...etc. There are more than 300 parts in that PCB.
Is there an efficient way to find out which part to replace that is causing the high current without taking too much time?
Also: The problem isn't in powering up the PCB, it runs up just fine, but the problem is after it runs, in one of the driver ICs perhaps. I can add more details but I doubt it would be helpful.
More details
The above picture is the backside of the PCB, in the right-up, there are 2 similar driver ICs which I think might be causing the problem. They don't heat up though.
AI: The difference in power consumption is about a watt (assuming 5V power). That's enough to get a reasonable size component noticeably warm (or perhaps remove a bit of skin if it's a small part such as an SOT-23 or SOIC-8). So look for charring or smell with the power off. If safe and feasible you might be able to probe the circuit with a finger you don't need too much.
Aside from some kind of software related issue (you have not disclosed the nature of the circuit so ignore if that's not a relevant concern) one possible problem is a CMOS chip that has been damaged and draws a lot of Vdd current. It will get very hot and (of course) wont function properly. It's even possible to have hairline shorts in the PCB that open and close with heating. If this is a production unit you will want to find the root cause whatever it takes, but sometimes it costs a heck of a lot more than the unit itself is worth.
You can also use traces as kind of a current shunt if you solder thin wire-wrap wires to instrument the board. A current change of 100mA is easily measured with a multimeter set to the lowest voltage range.
Edit: Aside from the (stressed) driver chips, also look for any tantalum cap (those orange parts) that has a charred or discolored look to it. Failures of those are not uncommon. |
H: Simulation of MOSFETs as high-speed switches
I’m trying to simulate high-speed switches (2xSPDT) made of MOSFETs.
The MOSFETs should switch so that while “I2” flows into output, “I1” flows into “U_1” (or vice versa).
I couldn’t interpret the behaviour of the currents flowing into the output. Did I cause an error somewhere in the circuit? Did I make a mistake when setting up the circuit?
Here is the circuit.
And here is the result of the simulation.
I add diode//Res to the gates according to advice of Tony Stewart EE75.
Now the circuit looks like:
And the result of that looks like:
But the behaviour of the currents seems to not be ok. I need your help.
AI: The spikes in Id show a clear lack of deadband in the crossover timing. Correct that with suitable 1us +/-50% delays with asymmetric rise times to gate or inputs using a diode // R. (I.e fast turn off, slow turn on)
consult App notes for details. |
H: How to find nature of RLC circuit?
If a resistance value, XL value and XC value are given, how do we determine the nature of the circuit (whether it's capacitive, resistive or inductive)?
The only thing that comes to my mind looking at the 3 given values is the impedance.
Is there any specific formula or any other way how to tell?
AI: Saying resistive, capacitive, or inductive just means which behaviour is dominant. It's not a precise term and one of those things students might try too hard to ascribe precise formal definition to when it is inappropriate. In my opinion it is rather unimportant. Things are what they are with varying shades of grey.
So just combine Xc and XL since they oppose each other (whether parallel or series) to get the net reactance. Capacitive reactance are negative and inductive reactance is positive so whatever sign your result has tells you the net effect. That's precise.
It can only be considered resistive if the resistance is much larger than the net reactance to the point where the net reactance is negligible. That's not so precise.
In practice it's pretty obvious what you have when the machine is in front of you taking measurements and have more than numbers on a piece of paper that someone made up. |
H: Why are Li-ion batteries not being used in aircraft but are widely used in electric vehicle market?
This might seem a very naive question. Maybe the comparison of electric vehicle to aircraft is hugely inappropriate. But I couldn't find a clear answer in web search.
Lithium-ion batteries have a high power-to-weight ratio, high energy efficiency and good high-temperature performance. Even then they are not preferred to be used in aircraft.
If safety is the concern, aren't there enough protection mechanisms which have enabled their widespread proliferation in electric vehicle market.
Why is the weight to power-to-weight advantage not being exploited by aerospace industry? What are the other aspects to be considered- extreme environmental conditions or so?
EDIT:
OP has added in comments (but not here) that "I am referring to the regular usage of batteries in aircraft. Not for propulsion".
AI: Primarily because it is easier to escape from a burning car than it is to escape from a burning aircraft. That said, the 787 does utilize Lithium based batteries (although not for propulsion) and there have been issues resulting in design changes to reduce risk in the event of a battery fire such as containment and venting overboard.
2013 Boeing 787 Dreamliner grounding |
H: Getting electric power to a pivoting front door
I have a front door which I want set up with electronic unlocking. Ive ordered a compatible motor for my system which requires 12v DC plus a separate 12v pulse to operate the mechanism. This all fits inside the door. The problem is how to get power to the motor because the door is pivoting, so there are no hinges. I don't want to have cables showing so I plan to drop power from above to the pivot point. My worry is how to drop cables that won't pinch when the door opens or closes.
I looked into pancake slip rings but can't find anything suitable. The door is held in place by a solid spindle about 2cm in diameter, the top of the door has a 1cm gap to the frame and the door is about 10cm in depth.
Any ideas. I've attached a photo.this is looking along the top of the door
AI: I don't have an answer to how to make the cable pass without beeing visible, but I have a few alternatives that also get to "nothing visible" in the end :
Putting the locking mechanism in the wall instead of in the door : no moving electronics, no wires having to rejoin the door.
Wireless energy transmission : something similar to wirless mobile phone charging : you have the energy emeter just above the door, and the receiver in the top of the door. The most basic way would just be 2 coils of wire one next to the other (placed in paralel in the geometrical sens).
Having some contacts only when the door is closed (using som springs for exemple).
For solutions 2 and 3, you will probably get no power when the door is open, so you will need to add a small battery.
Just but a "big" battery into the door, and change it once in a while (or recharge it in place). NB : take care to add some kind of alarm when the battery is nearly empty, but in some way that doesn't empty too much more the battery (for exemple on bip each 10 minutes if you can hear it from the living room) |
H: Placing the BPF and impedance matching on the output and on the input
I am working on solving a problem, namely I need to add input and output matching to my circuit and I am not sure where I should put them. Additionally, in the circuit I want to use a bandpass filter at 2.4 GHz - should it go before the output matching or after it? (Here is the aplication note btw: https://www.analog.com/media/en/technical-documentation/data-sheets/hmc414.pdf )
I understand that the input impedance matching must be at the input of the circuit (as the name would suggest, but maye it's not that clear). In this case, where should the output impedance matching be placed?
And again - in the case of using a bandpass filter, should it be after TL3 and C3 lines? What about the matching at the output in this case? Should it be after this filter or before? I'm afraid that I will do something wrong.
AI: The question seems to conflate and confuse multiple parts of the signal chain. They should really be considered one at a time where feasible.
At the input: the datasheet makes it clear that RFIN is already matched to 50 ohms and doesn't require additional matching:
This pin is AC coupled and matched to 50 Ohms.
Between amplifier and filter:
On the amplifier output, TL1/TL2/TL3 are the 50-ohm matching + bias-tee as discussed on one of your past questions.
If your bandpass filter has 50 ohm input impedance, then you just put it downstream of C2. If the filter needs a different impedance or special matching, then you'll need to design a matching network that matches the amplifier's output to the input of the filter, perhaps performing calculations with the help of tools such as ADS or a Smith Chart.
After the filter: If the output of the filter is not already matched according to the filter datasheet, you'll need to design a similar matching network to match its output impedance to whatever load you plan to connect (likely 50-ohms if it's coax or a 50-ohm antenna). If the filter already has a 50-ohm output impedance, then you're done - connect it to your coax/50 ohm microstrip/load. |
H: Making duty cycle with CTC mode in AVR without using interrupt
I am writing a program to make an output with a 30% duty cycle and a frequency of 3 kHz using an ATmega32 microcontroller. My controller's frequency is 8 MHz and I am going to decrease it to 1 MHz by using a prescale of 8.
I need to utilize the CTC mode of the microcontroller but I can not use an interrupt in my program.
I don't understand why the program I have written doesn't work properly; on the oscilloscope I can not see the 3 kHz frequency with 30% duty cycle which I want to achieve.
I would appreciate it if you could look at my code and help me find the issue.
#include <avr/io.h>
#include "global.h"
int main(void)
{
DDRD = (1<< 7);
OCR1A = 110;
TCCR1B = (1 << WGM12) | (1 << CS11);
TCNT1 = 0;
while(1)
{
while(!CHECKBIT(TIFR, OCF1A));
{
sbi(TIFR, OCF1A);
toggle (PORTD, 7);
OCR1A = 223;
}
while(!CHECKBIT(TIFR, OCF1A))
{
sbi(TIFR, OCF1A);
toggle (PORTD, 7);
OCR1A = 110;
}
}
}
AI: A semi-colon is a ;.
So because your second while loop is missing a semi-colon, the code that should run and set new compare value only after the interrupt flag is set, the code actually runs and sets new compare value until the interrupt flag is set.
As the while loop is so short, it can toggle the pin every 1.5 microseconds, which is 12 clock cycles at 8 MHz. |
H: Power indicator LED for 230VAC light circuit
I would like to add a (power) indicator light (LED) in box where a 230VAC light is switched on.
The issue I have is that there is no "neutral" line in the switch box (to put the LED over). It only opens or closes the phase line.
To me, the only way would be to put a light (LED) in series with main light.
What light/LED would that need to need be? It would need to be an LED that only has a small voltage drop but can handle the "high" current drawn by the main light (three lights of 4 watts).
See attached scheme as an illustration.
What would you recommend?
AI: If you were to put a red LED in series, as in the circuit below, the minimum voltage drop would be ~1.8 V, reducing the efficiency of the circuit, as well as causing a slight imbalance in wave shape.
A better option would be to wind a few turns of AC mains wire through a small ferrite toroid core, and wind a few turns of finer wire through it, connected to the LED and a series resistor. A small toroid will saturate with the high, 50 or 60 Hz current in a household device at mains frequency, so the output to the LED will be far less than would be calculated from turns ratio. You'd need to experimentally find the value for the series resistor that lights the LED, but that doesn't burn it out, perhaps 100 Ω. |
H: LiSOCl2 battery EOL monitor review
I'm working with a device which will use Lithium thionyl chloride (non-rechargeable) batteries as a backup source; their discharge curve is quite flat and AFAIK you can't tell how is the battery in terms of whether it's good or about to die (EOL) unless you apply a dummy load. There are other more complex methods but my application requires me to save every penny and the client just wants to know if the battery is good or dead. Now the circuit is working but I would like to make sure If I'm actually doing it correctly or outright far from the right path.
My concerns:
If this method of applying a dummy resistor when needed and measuring from the ADC at that time a legit method?
If I should be concerned that the voltage divider and the ADC might eventually drain the battery, I added a MOSFET to cut off or connect the path between the battery and the voltage divider and ADC.
AI: That solution is good. A couple of points.
When on backup the P-FET will be biased on slightly by the voltage drop across D27. The threshold voltage of Q5 needs to be significantly higher than that to ensure it can be switched off properly.
When powered normally the VDDSYS should be no lower than the voltage when on backup or again Q5 may turn on.
I would add a capacitor across R90. The input of the ADC of the MCU will probably be equivalent to a capacitor of about 20pF charged to zero volts when the voltage is sampled. This has to charge through R190 in parallel with R106. The voltage will drop for a short time when sampling. There is normally a maximum source resistance of 5-10k ohms defined in the MCU data sheet. You are just within acceptable range but capacitor of a 1000pF or so will speed up the sampling and also provide a bit of filtering that may be desirable. Make sure the software does not attempt to read the voltage too quickly after Q5 is enabled.
If you have a GPIO available it would be useful to provide separate control for Q5 and the load resistor R92. You can then read the voltage with a light load and a heavy load to better determine the battery condition.
Edit:
The recommendations in the answer from Jonathan S. are also worth including. If the ability to check the battery at light load as well as heavy load is required T5 can be left in the circuit and R56 connected to the battery positive instead of VDDSYS. That will reduce any sensitivity to Q5 threshold voltage. |
H: Why is voltage and current at a node 0?
I am studying through Kirchoff's current law and following with a multimeter.
As per the law, I could see the current entering and exiting the node is same, 0.17mA. Also the voltage is 2.56 volts.
Voltage before node
Voltage after the node
When I measure the voltage at the node (series connection between the two parallel circuits,) it is zero.
Why is the voltage and current at the node zero?
Voltage at the node
Update:
The same thing happens when I measure this with voltage as well. Getting reading of 2.58V in nothe the places, but 0 at the node.
AI: From what I can see from your pictures, in the first two pictures you are measuring the voltage across resistors, and if you have a current through them then you surely get a voltage. But, in the last picture I can see that you are measuring voltage across a wire, and since a wire doesn't have a resistance (at least not in low frequencies) you won't read a voltage. We could help you better if provide your schematic. |
H: Thermocouple K Type using a jack plug instead of the normal connector
I have a few thermocouple K Type using the classic two lead connector.
I would like to change that connector to a male jack type like this:
So I can connect it to the female connector that has waterproof cap:
The problem is that the jack connector lacks of screws as the original yellow one. Is it possible to solder the leads to the jack plug terminals? Any advice on how to do it please.
Thanks
AI: Be careful what metals you use in the current path. Any change in alloy will create a voltage that can be thermally sensitive. Connectors are typically the same material as the wires all the way up to the sense circuitry. Here is an example of positive and negative terminal metals used in the connectors for each color of the common double-spade thermocouple connector. |
H: What happens when a capacitor gets a current over its rated current?
An example capacitor is rated 400 V and 5 A.
What would happen to it, if it was given a continuous current at e.g. 50 A?
Would there be Thermal Runaway as would happen with a battery that is fed a continuous current that is too high?
AI: The current limit for a capacitor (AC, obviously you cannot have long duration DC) is generally dictated by its ESR (equivalent series resistance) and heating. Prolonged excess current will heat it to too high a temperature. Usually the first to fail will be the dielectric. In a plastic capacitor, it could soften and mechanically fail to keep the plates apart, which would result in a short circuit. In an electrolytic capacitor, with the 10x abuse (100x power) that you are considering, the electrolyte would boil, and the resulting steam cause it to vent or explode.
If you exceed the rated current by a smaller margin, running hotter would cause the life of an electrolytic to be severely reduced, due to increased rate of loss of electrolyte. |
H: Where is the third antenna on this avalanche beacon PCB?
I have been looking at the pictures of the internal circuitry of a Barryvox S avalanche beacon on the FCC ID website. I cannot open mine, since that would void the warranty.
This beacon, as all modern ones, features three antennas aligned with the three axes with the goal of improving signal detection.
Two of the antennas are very easy to spot
. See, for instance, the very last picture. I cannot find the third antenna, though.
Is it the metal, C-shaped rod that it is visible in the same picture? Wouldn't that make for a lousy antenna?
Avalanche beacons operate at 457 kHz, I expect a "serious" antenna for such a low frequency.
AI: The third antenna is this spool choke.
Too short for an answer apparently |
H: Finding output power of a three-phase inverter from V and I
I have made a simple three-phase inverter in Simulink. I have the output waveforms for the line-voltage and current as shown below, where the voltage is in plot 1 (I have split the waveforms for clarity) and the current is in plot 2:
This is as I expected; however, how would I calculate the output power?
Would it be correct to find the RMS for the voltage and multiply with the current because otherwise the power out will turn on and off as the voltage does? I can't seem to understand it myself so any help is very appreciated
AI: Would it be correct to find the RMS for the voltage and multiply with
the current because otherwise the power out will turn on and off as
the voltage does?
No that would not be correct. Look at this extract from your waveforms: -
I've focussed on the middle/maximum point of the blue voltage waveform and, I've looked at the phase difference between it (if it were a sinewave) and the current waveform. There is a 30° phase shift. That's not surprising if you have a 3 phase wye connected load; comparing line voltage and phase current for a resistive wye load always produces a 30° phase shift like this.
So, if you calculated \$V_{RMS} \times I_{RMS}\$ you would get an error.
The only way to find the power is by emulating the two-wattmeter method: -
Image from here. It measures true power put into a load on a 3 phase system.
To emulate it you need to calculate power twice (a la 2 wattmeter method). Power can be calculated by taking instantaneous values of the voltage waveform and multiplying each by the instantaneous value of the current waveform. Then average the resulting power waveform to obtain power. You need to respect that fact that the sampling of each waveform needs to be done at a rate that is several times faster than your 3 phase fundamental frequency and, given that the voltage waveform is basically rectangular in nature, it's probably sensible to go for something like 100 samples per cycle if not more).
Repeat for the "other" wattmeter and add the two powers to get true power consumed by the load. Of course, if this is just a simulation then it's a lot easier. |
H: Help identify IC
This is an LED light from AI, PRIME 16HD model.
I have identified the IC that seems to be burned; it looks like it's some kind of voltage regulator. I think the markings are: BN0D 18.
Maybe someone can identify it. I googled for it and obviously couldn't find anything. I sent a question to AI support, but I'm still waiting for an unlikely positive answer.
AI: Found it, and deleted my previous answer. How ironic was finding the IC after saying "almost impossible to find" (facepalm).
Anyway, here it is: AOZ1282
What we did wrong was to Google "BN0D" instead of BN0. A simple search for "smd marking BN0 sot-23-6" brought the result. |
H: Finding Phase Angle
How would I go about finding the phase angle at different times?
For example at 50 Hz with a full cycle time of 20 ms I know at 10 ms the phase angle would be 180°.
What calculation could I use to find the phase angle based on how many milliseconds I am into the cycle?
AI: Assuming at t=0 you have a phase angle of zero, you just need to use proportions. You're correct that with 50 Hz, the cycle time is \$1/f\$ = 20 ms, and 10 ms in (half a cycle) means you're at 180 degrees, and we can generalize that example and use it to check the formula below.
Since a full cycle of time 1/f means a phase angle of 360 degrees, your formula generalizes as:
$$ \phi = 360\deg \cdot \frac{t}{1/f} = 360\deg \cdot f \cdot t$$
(phi in degrees, t in seconds, f in hertz). This matches up with your example: 360 degrees * 10 ms * 50 Hz = 360 degrees * 0.5 (dimensionless) = 180 degrees.
If you wanted radians, remember that a full cycle is 2 pi radians, so you'd simply replace 360 degrees with that in the above formula. |
H: Can a push button with a single click using an Arduino have more than one function?
I've tried to google this and failed, but I am trying to figure out if I can use a momentary push button and some controller like an Arduino UNO (which I have) to activate two LED lights, one after the other. My example, say I push the button, the blue LED lights up first for 5 seconds, and right after it shuts off, a red LED lights up for 3 seconds then stops, and all done with a single push.
If I want to do it again, I simply press the button again. Any links or advice would be most appreciated. I am very new to the world of controllers, so I likely am using the wrong wording to do proper searching.
AI: Yes, it can be done easily.
Supposing you connect a normally open button between ground and pin 4 of Arduino, your blue LED with a 330 ohm resistor in series between pin 5 and ground, and your red LED with a 330 ohm resistor in series between pin 6 and ground.
Then the following program should work and match your example (not tested, but it compiles):
#define PIN_BUTTON 4
#define PIN_LED_BLUE 5
#define PIN_LED_RED 6
void setup() {
// put your setup code here, to run once:
pinMode(PIN_BUTTON, INPUT_PULLUP);
pinMode(PIN_LED_BLUE, OUTPUT);
pinMode(PIN_LED_RED, OUTPUT);
digitalWrite(PIN_LED_BLUE, LOW);
digitalWrite(PIN_LED_RED, LOW);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(PIN_BUTTON)==0) //button pressed
{
digitalWrite(PIN_LED_BLUE, HIGH); //turn on blue led
delay(5000); //wait for 5000ms = 5s
digitalWrite(PIN_LED_BLUE, LOW); //turn off blue led
digitalWrite(PIN_LED_RED, HIGH); //turn on red led
delay(3000); //wait for 3000ms = 3s
digitalWrite(PIN_LED_RED, LOW); //turn off red led
}
} |
H: Possible problems of AC energy metering using rectified waveforms
I'm building an energy metering circuit with discrete parts and precision is not a big deal in this case. One friend had the idea of rectifying both the voltage and current waveforms before sampling them with a MCU. His idea is the following: we put big enough capacitors after the rectifiers so the ripple is neglectable; since the voltage "V" (ideally) will be sqrt(2)*Vrms and the current "I" will, for a constant linear load, (ideally be) sqrt(2)*Irms, then the RMS power will be Prms=V*I/2 and the energy will be the sum of Prms on a given interval. By rectifying the inputs and sampling them directly with the ADC he hopes we'll no longer need the op-amps for sensing and also simplify the firmware (as multiple samplings will no longer be needed for calculating the RMS values of voltage and current in a given interval). The phase shift between current and voltage would then be accomplished by two zero cross detectors (one for voltage and one for current) that in turn would trigger timer interrupts on the MCU, and the time differences would be used to calculate the power factor.
I can't see the shortcomings of this (for approximately constant and linear loads, at least), but obviously they exist because every metering circuit I've came across don't rectify the voltages/currents. So I'd like to know your opinions on this idea...
AI: For linear loads and no distortion of the supply voltage, the described scheme seems fine. With any distortion, the harmonic content will contribute little or nothing to real power, but will likely register harmonic voltage and current as delivering real power. |
H: Possible fixes to a power supply thermals issue
The question applies to a buck converter design on my board:
Here is a 3D view of this section:
Layout of this section:
L1:
L2:
Layer 3 is power and layer 4 is again a full ground plane.
Here is the Webbench link to the design i was trying to follow:
https://webench.ti.com/appinfo/webench/scripts/SDP.cgi?ID=D3257B665103C7EC
The design was intended for 8A current to drive a long strip of LED's.
However, as i connected it across the load the power supply seems to turn off (5V led turns off) around the 5A mark. The diode and FET appear to be getting very hot and my copper pour is clearly not doing a good job. I believe it might be hitting a thermal shutdown because as i reduce the current it turns back on. In hindsight the FET looks awfully tiny to support 8A.
The issue is i don't have enough time to get another design sent out and need a 'quick fix' to work for now buying me time till the next iteration.
Is there something i can do to make it work at a slightly higher current? Some kind of heat sink or if i could put a perf board on top of the inductor with a higher rated mosfet?
AI: What you can try :
add a fan blowing on your FET
add a heat sink on top of your FET (can be combined with fan)
if the PCB itself is hot (at least under the FET), then IF PLANE FOR IS NOTHING BUT GROUND, you can put your PCB on a big metal plate acting as a big heat sink for the PCB itself. Be carefull : if you have anything else than ground on the bottom side, the metal plate will cause a short circuit. If you can't put the plate, you might put another fan on the bottom
if you can, just run your PCB outside or in the fridge : you gain already 20°C
replace your FET by one supporting higher current (with heatsink if needed), and just run wires from your PCB to your new FET |
H: Can I connect a DC-DC step-up converter to a DC-DC step-down converter in series?
My problem is I need 3A at 5V from an 18650 cell.
I bought a DC-DC converter that should do that, but they are garbage specifically the XL6009 it seems that they'd prefer to operate in high voltage vs. low. They come around 40V stock and when I try to turn them down... most won't go lower than 18V.
So... what if I use one to step up to whatever voltage (where it doesn't change over time, I noticed that) and I use a similar DC-DC converter but step down eg. LM2596, will I be okay or is there going to be a situation where they're fighting each other?
The reason for the 18650/3A is for a multi-servo robot.
AI: As long as the currents and voltages are compatible, you can use the output of the step up converter as an input for the step down converter.
However, it is not very efficient (you need 2 converter on your robot, each one having usually arroud 20% energy loss (if not more if you take cheap ones).
So I would rather suggest either to use a step up dedicated to go from 2.7-4.2V to 5V (there should be plenty, as it is used for example for powerbanks, or all other applications requiring 5V from a single lithium cell).
Or you can go the other way arround, and take a 2S or 3S Lipo and a step down converter |
H: How do appliances change their resistance when voltage changes?
Assuming all connections are DC (avoiding any RMS, phase, and impedance calculations), if the power of an appliance is constant, and I change my country from a 240 V to 120 V one, my appliance will draw more current in the 120V country.
For that would it change its resistance? If yes, how does it do that? Do all appliances have a variable resistance? Can I use a 60 W light bulb cross country?
AI: You start your question with a false assumption: that something like a 60 W light bulb has a constant power. Instead, it has a constant resistance, and is rated for 60 W wherever it is intended to be used.
A resistive load (like an incandescent light bulb) rated for 60W is assigned that rating based on the intended supply voltage. Using Ohm's law we can determine some other properties. We know the intended voltage (120 V) and its power rating (60 W), so we determine its resistance:
\$R = E^2/P\$
\$120^2 / 60 = 240 Ω\$
Now that we know the load (bulb) resistance, we can apply the higher voltage (240 V) to see what happens.
\$P = E^2/R\$
\$240^2 / 240Ω = 240 W\$
Since the filament in the bulb is not designed for 240 watts of power dissipation, it will burn itself out quickly.
Other loads, like computer power supplies, can sometimes operate at different supply voltages. (Sometimes it is necessary to toggle a switch, and sometimes the supply can auto-compensate.) In switching power supplies like that, they can often accommodate a wide variety of supply voltages. The device depending on that power supply can then consume a more-or-less constant power from one region to another.
A device that can handle different voltages doesn't alter its resistance to maintain a given power output, and therefore is not said to be a "resistive" type of load. Instead, it could be characterized as an inductive and/or capacitive load. |
H: I2C seems to work but all register reads return 0s
I'm debugging an audio codec WM8962B via I2C. I wrote basic code for a manual I2C read operation of a given register. I'm using PSoC 5LP to do it.
The 7bit slave address is 0x1A and I'm trying to read the device ID [CUST_ID] and [CHIP_REV] to make sure my interface works as expected. The default value is 0x069F for the word. I'm expecting to see 0x06 (0b00000100) for the upper byte and 0x9F for the lower byte.
Below is the output on the scope.
I compared my output to a defined multiple I2C byte read sequence below:
The START, STOP, ACK and NACK bits all seem to line up and agree with the SCL/SDA transitions. However, no matter what register I read from I get only 0s. What could this indicate and what am I overlooking?
Here's my code:
AI: The I2C waveforms on the scope shot look like valid I2C, so that rules out common errors like forgetting to include SCL/SDA pullup resistors, or having too much bus capacitance, etc. At the bit/datalink level, the waveforms look fine. The device is acknowledging its write and read addresses.
According to the Cirrus WM8962 Datasheet, On page 185, Figure 63 "Control Interface 2-wire (I2C) Register Read", shows the register address as two 8-bit fields A15-A8 and A7-A0. But in your scope shot your firmware is only sending 8 bits of register address before the repeated start. So this incomplete address field may be why the WM8962 is not sending back the expected device ID data. |
H: Would there be any safety issues if the input voltage on the primary coil is bigger than what the rated voltage is?
I have a neon sign transformer that converts 120 V to 12 kV which is the rated voltage. Using the 1:100 ratio would it be safe to have the input voltage be 140 V converted to 14 kV when the specified input voltage is 120 V? I am working with 60 mA. Is it also safe to connect the NST to a variac?
AI: It possibly might work, but more information is needed to answer that question.
How close to saturation is the transformer? It's unlikely the manufacturer added more silicon steel than needed, so it is probably close to saturation at 120 VAC. In that case, the extra voltage goes into heating the transformer, not output.
How much power can the transformer dissipate? Increasing voltage 20% increases heating by 44%, if resistive heating predominates.
What is the breakdown voltage of the insulation? If the transformer arcs over inside, it's kaput. |
H: Are USB cables active circuits?
I always assumed a USB cable between two devices is just a collection of wires. I recently saw some pictures when shopping for cables indicating they have internal circuitry.
Could someone clarify if USB3.0 cables are only wiring or is there an active device within the A end?
AI: Depends on what you mean by usb cable.
Standard USB A/B cables, no they should just be wires. USB C to USB A/B cables can have resistors for signaling for power. USB C with high current carrying capabilites have EMark circuits to enable the high current capabilities.
There are any number of non-standard cables that have built in circuits as well. Usb to USB network cables, or USB cables with leds or lighting, for example. |
H: How to calculate the GDDR5 Capacity from this table?
How to get 4Gb capacity from this table?
I understand it this way:
(1) total address is 14 + 6 + 4 = 24. each address (atom) is 32bit. So total capacity = 2^24 * 32bits = 512 Mbit.
I am not sure where is the 8x factor missing from the calculation.
Best,
Neo
AI: GDDR5 uses an 8n-prefetch architecture.
Which basically means for a chip with 32-bit data bus is that with read or write commands, you can't (by default) access a single arbitrary 32-bit location, but a "block" of 8 concecutive locations of 32 bits in a burst.
So in short, internally the 4Gb chip can be thought to work with 16M addresses of 256 bits that are just accessed via a 32 bit external interface. |
H: How to string compare const uint8* in a ESP32 microcontroller chip
I'm sending data from an ionic app (typescript) to an ESP32chip. Data from the app uses protocol buffer format. Here's the code:
this.provisionMgrAction.setAction('stop');
let bytesOfStuff = await this.provisionMgrAction.serializeBinary();
BleClient.write(this.deviceID, serviceID, characteristicID, bytesOfStuff);
On the ESP chip side (code in C), data is received as "stop". The log (ESP_LOGI line below) prints value of inbuf as "stop" (without quotation marks).
esp_err_t custom_prov_data_handler(uint32_t session_id, const uint8_t *inbuf, ssize_t inlen,
uint8_t **outbuf, ssize_t *outlen, void *priv_data)
{
if (inbuf) {
ESP_LOGI(TAG, "Received data: %.*s", inlen, (char *)inbuf);
if (strcmp(inbuf, "stop") == 0) {
ESP_LOGI(TAG, "print something");
}
}
}
But strcmp doesn't seem to work. I'm presuming it has something to do with the fact that when "stop" is sent over BLE from the client side app to the ESP32 chip, it comes without a null character, though I'm not sure how to confirm that. In any event, how do I make sure that strcmp equates the value of inbuf to "stop"? Do I need to add a null character to inbuf? If yes, how do I accomplish that? Or do I need to compare inbuf to "stop\0"? The length of inbuf (inlen) is printed out to be 2 more than the number of characters in the message that is transmitted to the chip over BLE (in this case, 6).
AI: Yes the problem is the '\0' character that is missing.
You could use strncmp and specify the length (here it would be inlen -2 I guess, the 2 more might be checksum or something like that)
Like
if (strncmp(inbuf, "stop", inlen - 2) == 0)
That should work.
Also, be cautious if you sometime answer from ESP32. Depending on the app side you would also need a termination character (for example on Android Studio Java I needed to add '\n' because I called ReadLine function).
So based on the values extracted in hexa from the buffer you can get your info using
if (strncmp((char *)&inbuf[2], "stop", inlen - 2) == 0) |
H: How can a slave device (microcontroller) communicate with a master device (Raspberry Pi) in SPI communication?
I saw several posts for SPI communication where they only explain that if a master wants to communicate with a slave, it will turn the CS/SS line low for the respective slave device.
In my application, the slave device (microcontroller) needs to send the data to the master device (Raspberry Pi) at irregular intervals. How can I let the master device know that slave wants to communicate? When the master needs to communicate, it will pull the CS/SS line low. Is there anything that the slave can do if it wants to talk to the master?
I saw some posts on this website itself that state that some devices use interrupts to let the master device know that the slave wants to send anything. Does the Raspberry Pi have the feature to detect interrupts from a slave device, or I would need to do polling from the Raspberry Pi side so that it is always ready whenever MCU sends data? Is there any other way?
AI: Polling is a very common way, if you need to periodically update data from a slave device anyway.
As you already mentioned, you can also have a slave signal the master, when new data is ready. The advantage is, that you only actually need to request data when you know that it changed. If you have to transfer a large chunk of data and do not want the master to be busy transferring data all the time, his can be beneficial.
Signaling can be done using normal GPIO pins. If you need a fast response, an input with interrupt support can be helpful. |
H: What is the function of " *| " operator in Verilog?
What is the function of the "*|" operator in Verilog?
parameter LANES = 4,
parameter CONVERTERS = 4,
parameter SAMPLE_SIZE = 16,
parameter SAMPLES = 1
wire [SAMPLES*SAMPLE_SIZE*(CONVERTERS+(LANES-CONVERTERS%LANES)*|(CONVERTERS%LANES))-1:0] tx_dataout;
AI: *| is not a single operator, but the combination of two different ones. Unary reduction OR |, followed by a multiplication *.
The code:
CONVERTERS+(LANES-CONVERTERS%LANES)*|(CONVERTERS%LANES)
is equivalent to:
CONVERTERS + ( LANES - ( CONVERTERS % LANES )) * ( |( CONVERTERS % LANES ))
Basically if CONVERTERS is a multiple of LANES (modulo remainder is 0), then |(CONVERTERS%LANES) will be 0, otherwise it will be 1. This is then multiplied by the (LANES-CONVERTERS%LANES) part to set ot to zero if a multiple, otherwise resulting in LANES-remainder.
This could be rewritten equivalently as:
CONVERTERS + ((CONVERTERS % LANES) ? (LANES - CONVERTERS % LANES) : 0)
Albeit the former preserves the the width of the constants.
Alternatively you could use:
CONVERTERS + ((LANES - CONVERTERS % LANES) % LANES) |
H: Is it possible (and worth it) to store non-const program data in FLASH rather than in RAM?
I'm the situation that my program stack variables take 24kB, and global variables take 27kB. My MCU's SRAM is only 40kB.
Would it be possible to store part of the data anywhere else? For example, in FLASH memory.
AI: Since matlab/simulink generated code is being used, performance doesn't seem to be an issue. If a development kit is the basis for the development, with access to IO pins, a SPI SRAM may be an option:
Just an example. Chose one with compatible specs (voltage etc). |
H: How many times can a register bit be changed in AVR?
I am writing a program for an ATmega328P.
I have a while loop inside which I am enabling the UART receiver complete interrupt flag using the command UCSR0B |= (1 << RXCIE0).
In some conditions, the while loop will execute infinite times. Does setting the receive complete interrupt flag in the register UCSR0B have any problem with the write cycles of a register, or does a register have a maximum number of write cycles?
AI: Generally registers have unlimited write cycles as they are RAM.
While this doesn't affects RXCIE0 bit, some considerations should be taken while dealing with other registers. For example some can trigger an interrupt, while other cause EEPROM writes, etc. |
H: USB Power Inside of Freezer / Fridge
Background of the project:
I am doing my own DIY Keezer (keg freezer) which basically turns a chest freezer into a fridge that will hold kegs with the assistance of a temperature controller. The temperature controller plugs into the wall, the freezer plugs into that, and the temperature controller has a thermal sensor that goes into the freezer.
When building this Keezer, I am adding a riser in between the top freezer area and the lid (which you take off) and install all of my tap handles and gas lines, which essentially creates a large open pocket at the top of the freezer. This dead spot creates a warm climate at the top, which apparently varies depending on the freezer size and who was building it. You can overcome this feat by adding a fan to circulate the air.
Just an FYI, the desired temp will stay around the desired 38° Fahrenheit, it will never truly "Freeze".
I want to use a USB fan. I would like to install a power grommet through the riser, with the plug-in being on the inside of the freezer. The USB fan has a controller on it as well.
So to my question:
Using the products below, will the freezer being at 38° Fahrenheit, cause any negative experiences?
https://www.amazon.com/gp/product/B07PPVM1P5/ref=ox_sc_saved_title_1?smid=A1S0CF6D9DSSI6&psc=1
https://www.amazon.com/gp/product/B07V5LJ5L2/ref=ox_sc_saved_title_1?smid=A1AV40UDU1XL8S&psc=1
AI: Condensation forming on/inside the controller module can cause issues. It's better to keep that outside of the fridge, so only the fan is on the inside and all the other electronics are outside.
This is especially true for a mains power AC socket and usb power supply like you shown. At the very least it would have to be gfci and condensation would be a pita.
The fan likely will not have issues running at 38 degrees. A quick Google search of DC fans shows most operate down until 14° F/-10° C.
But unless you are going to actually use the speed setting on that module often, just buy a freezer rated fan and power it directly. Less headache. A 12V fan ran at 5V will be much quieter too while still providing some airflow. Otherwise just use 12V power.
Ideally you could buy a 120/240V AC freezer fan and wire it directly into the freezers power so no need for external power adapters. |
H: Can step down transformers malfunction in such a way that they become live?
I know a few things about electronics, but transformers are still an unknown for me. I know AC to DC converters use them to isolate live voltage from the DC output, or at least I think that's what they're used for.
Dumbed down, the transformer is just a bunch of wire coiled over a core, that's usually made of steel (at least for larger transformers) which is very much conductive. Couldn't it ever malfunction in such a way (wire melts or something) that the 2 sides of the transformer become connected and the output becomes live?
Say I have a 240VAC to 24VAC transformer. Is there any chance the output can reach 240V if the transformer overheats or breaks down in any way?
AI: Yes, this can be a real problem. And I have seen it happen ... on a 1950's amplifier that had been stored in an attic for years ... possibly slightly damp. Admittedly that was a step UP transformer, apart from the heater windings...
Some transformers have an "inter-winding screen" which you connect to ground by a good solid connection. Apart from reducing electrical noise, if the insulation on the 240V winding does break down, it connects to that ground connection and harmlessly blows a fuse or trips a breaker instead of making your circuit live.
(At least that's the intent : use 3-pin mains leads, make sure you use the correct fuse, and test your breakers at the recommended interval!)
Others are "double insulated" so that if one layer of protection breaks down, the other still provides protection. This may involve the primary and secondary windings being on separate bobbins, for example (in an old C-core transformer) or separate sections on a split bobbin. Such transformers may have the double insulation symbol (box in a box) on the label.
Yet others can be used in a double insulated system where another barrier (such as a plastic enclosure) ensures that even if the secondary becomes live, there is no way to touch the circuitry (such as USB connectors) without tool use to open the box. |
H: How to implement a ground loop isolator in an audio circuit that connects to USB and line out of a laptop?
I'm working on an audio interface that utilises a microcontroller and a CS42448 audio codec. When receiving USB power and receiving audio from a laptop, there is a ground loop. Otherwise, it works fine (like when transmitting audio from a phone and powering it from a power bank).
The schematics below show how I'm powering the circuit. The ferrite beads I use to separate digital devices from analogue (one side of the board is all analogue, the other digital, the ferrites go in between).
My question is, how can I implement a ground loop isolator for this application? I understand that a switch for lifting the ground on one side could be enough, but I want to find a solution that doesn't need a manual switch. I have used optocoupler and dc-dc isolators before, but I'm not sure how I should connect them in this context. How is this normally done? I'm looking for a simple solution without overflowing the board with too many new components.
simulate this circuit – Schematic created using CircuitLab
AI: Given that your circuit doesn't communicate with the laptop via USB, there's no need for a digital isolator: Just place an isolated 5V DC/DC converter in the 5V power path right after the USB connector. Your entire circuit is powered from an isolated source then and there can't be any ground loops anymore. Depending on the power requirements, this might be a little expensive, however.
If a DC/DC converter that can handle your entire amp's power is too expensive, you can alternatively place a resistor (1k or so, plus maybe an inductor / bead) in the ground line of the audio connection and use an instrumentation amplifier to recover the difference signal between the audio ground connection (at the other side of the resistor) and the audio signal lines. I've done this in the past with an amplifier that I powered from the 12V supply of my computer. It's not as effective as isolating the supply voltage, though, and you'll need an in-amp with good CMRR.
simulate this circuit – Schematic created using CircuitLab |
H: LTspice - Staircase saturation transformer
I am trying to simulate on a full bridge converter a staircase saturation transformer. I was thinking by adding a very little resistor on one leg of the full brigdge converter, it will in any case saturate the transformer. It would have shown that what ever the magneic material you take, due to the disparity of the components and PCB traces, it would saturate your transformer if there is no current control mode to regulate the flux density balance of the transformer
My simulation would integrate a non linear inductance for showing the effect of saturation. But I have some troubles to just make the staircase of linear inductor. Here is the simulation:
The "R_disparity" resistor represents the disparity between the two legs. Normally as I do not apply the same voltage at each time on the inductance it would make the inductance current diverge, but it does not work.
It does not diverge... Does anyone have an idea of what is happenning?
Version 4
SHEET 1 2016 1476
WIRE -1536 -528 -1536 -560
WIRE -1536 -416 -1536 -448
WIRE -976 -384 -1248 -384
WIRE -688 -384 -976 -384
WIRE -432 -384 -688 -384
WIRE -240 -384 -432 -384
WIRE 176 -368 160 -368
WIRE 320 -368 256 -368
WIRE 448 -368 384 -368
WIRE 544 -368 448 -368
WIRE 720 -368 624 -368
WIRE 720 -304 720 -368
WIRE -976 -288 -976 -384
WIRE -432 -288 -432 -384
WIRE -1248 -272 -1248 -384
WIRE -1024 -272 -1056 -272
WIRE -480 -272 -512 -272
WIRE -240 -272 -240 -384
WIRE 160 -272 160 -368
WIRE -1024 -224 -1056 -224
WIRE -480 -224 -512 -224
WIRE -1536 -208 -1536 -240
WIRE -1056 -192 -1056 -224
WIRE -512 -192 -512 -224
WIRE 720 -176 720 -224
WIRE 160 -128 160 -192
WIRE 272 -128 160 -128
WIRE -1536 -96 -1536 -128
WIRE -1248 -96 -1248 -208
WIRE -976 -96 -976 -208
WIRE -976 -96 -1248 -96
WIRE -816 -96 -976 -96
WIRE -432 -96 -432 -208
WIRE -432 -96 -736 -96
WIRE -240 -96 -240 -208
WIRE -240 -96 -432 -96
WIRE 272 -96 272 -128
WIRE 160 -48 160 -128
WIRE -976 -16 -976 -96
WIRE -1248 0 -1248 -96
WIRE -1024 0 -1056 0
WIRE -432 0 -432 -96
WIRE -240 0 -240 -96
WIRE -480 16 -512 16
WIRE -1024 48 -1056 48
WIRE -480 64 -512 64
WIRE -1536 96 -1536 64
WIRE 160 112 160 32
WIRE 176 112 160 112
WIRE 320 112 256 112
WIRE 448 112 448 -368
WIRE 448 112 384 112
WIRE -1536 208 -1536 176
WIRE -432 208 -432 80
WIRE 224 304 -112 304
WIRE 464 304 224 304
WIRE 464 336 464 304
WIRE 224 352 224 304
WIRE -432 368 -432 288
WIRE -112 384 -112 304
WIRE -112 384 -384 384
WIRE -352 432 -384 432
WIRE 224 464 224 432
WIRE 464 464 464 416
WIRE -1248 480 -1248 64
WIRE -1056 480 -1056 48
WIRE -1056 480 -1248 480
WIRE -976 480 -976 64
WIRE -976 480 -1056 480
WIRE -688 480 -976 480
WIRE -512 480 -512 64
WIRE -512 480 -688 480
WIRE -432 480 -432 448
WIRE -432 480 -512 480
WIRE -352 480 -352 432
WIRE -352 480 -432 480
WIRE -240 480 -240 64
WIRE -240 480 -352 480
WIRE -688 512 -688 480
FLAG -1536 -96 0
FLAG -1536 -240 Vgate_A_D
FLAG -1536 64 Vgate_B_C
FLAG -688 512 0
FLAG -1536 208 0
FLAG -1536 -416 0
FLAG -1536 -560 Vin
FLAG -688 -384 Vin
FLAG -512 -192 0
FLAG -1056 -192 0
FLAG -1056 -272 Vgate_A_D
FLAG -512 16 Vgate_A_D
FLAG -512 -272 Vgate_B_C
FLAG -1056 0 Vgate_B_C
FLAG 224 464 0
FLAG 272 -96 0
FLAG 720 -176 0
FLAG 464 464 0
FLAG 464 304 primary_voltage_drop_due_to_secondary_load
SYMBOL ind2 1472 -352 R270
WINDOW 3 126 -288 VRight 2
WINDOW 39 86 -1 VRight 2
SYMATTR Value Hc = {Hc} Bs = {Bs} Br = {Br} A = {A} Lm = {Lm} Lg = {Lg} N = {N}
SYMATTR SpiceLine Rser = 0
SYMATTR InstName L2
SYMATTR Type ind
SYMBOL voltage -1536 -224 R0
WINDOW 3 -876 49 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value PULSE(0 {Vgate} 0 {1/(Fsw*1000)} {1/(Fsw*1000)} {D/Fsw} {1/Fsw})
SYMATTR InstName V1
SYMBOL sw -976 -192 M180
SYMATTR InstName S1
SYMATTR Value MySwitch
SYMBOL sw -432 -192 M180
SYMATTR InstName S2
SYMATTR Value MySwitch
SYMBOL sw -976 80 M180
SYMATTR InstName S3
SYMATTR Value MySwitch
SYMBOL sw -432 96 M180
SYMATTR InstName S4
SYMATTR Value MySwitch
SYMBOL voltage -1536 80 R0
WINDOW 3 -1027 55 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value PULSE(0 {Vgate} {1/(2*Fsw)} {1/(Fsw*1000)} {1/(Fsw*1000)} {D/Fsw} {1/Fsw})
SYMATTR InstName V3
SYMBOL voltage -1536 -544 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V4
SYMATTR Value {Vin}
SYMBOL voltage 160 -288 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V5
SYMATTR Value PULSE(0 {Vin*Ns/N} 0 {1/(Fsw*1000)} {1/(Fsw*1000)} {D/Fsw} {1/Fsw})
SYMBOL voltage 160 48 R180
WINDOW 0 24 96 Left 2
WINDOW 3 -1020 23 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V6
SYMATTR Value PULSE(0 {Vin*Ns/N} {0.5/Fsw} {1/(Fsw*1000)} {1/(Fsw*1000)} {D/Fsw} {1/Fsw})
SYMBOL diode 320 128 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D1
SYMATTR Value MyIdealDiode
SYMBOL diode 320 -352 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D2
SYMATTR Value MyIdealDiode
SYMBOL ind 528 -352 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 5 56 VBottom 2
SYMATTR InstName L3
SYMATTR Value 50µ
SYMBOL res 704 -320 R0
SYMATTR InstName R2
SYMATTR Value 4
SYMBOL voltage 160 112 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V7
SYMATTR Value 0
SYMBOL voltage 160 -368 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V8
SYMATTR Value 0
SYMBOL f 224 432 R180
WINDOW 0 24 80 Left 2
WINDOW 3 24 0 Left 2
WINDOW 123 24 -28 Left 2
SYMATTR InstName F2
SYMATTR Value V8
SYMATTR Value2 {Ns/N}
SYMBOL diode -224 -208 R180
WINDOW 0 24 64 Left 2
WINDOW 3 -179 35 Left 2
SYMATTR InstName D3
SYMATTR Value MyIdealDiode
SYMBOL diode -224 64 R180
WINDOW 0 24 64 Left 2
WINDOW 3 -179 35 Left 2
SYMATTR InstName D4
SYMATTR Value MyIdealDiode
SYMBOL diode -1232 64 R180
WINDOW 0 24 64 Left 2
WINDOW 3 -179 35 Left 2
SYMATTR InstName D5
SYMATTR Value MyIdealDiode
SYMBOL diode -1232 -208 R180
WINDOW 0 24 64 Left 2
WINDOW 3 -179 35 Left 2
SYMATTR InstName D6
SYMATTR Value MyIdealDiode
SYMBOL res 448 320 R0
SYMATTR InstName R1
SYMATTR Value {R_disparity}
SYMBOL res -448 192 R0
SYMATTR InstName R3
SYMATTR Value {R_disparity}
SYMBOL e -432 352 M0
SYMATTR InstName E1
SYMATTR Value 1
SYMBOL ind -720 -112 R90
WINDOW 0 5 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName L1
SYMATTR Value 2m
TEXT -1848 -664 Left 2 !.param Hc = 10 Bs = 0.3 Br = 0.2 A = 10u Lm = 1m Lg = 0.725m N = 17
TEXT -1848 -720 Left 2 !.param Fsw = 16k D = 0.45 Vgate = 3.3 Vin = 400
TEXT -1000 -520 Left 2 !.tran 200m
TEXT -592 -752 Left 2 !.model MySwitch SW(Ron=.1 Roff=10Meg Vt=1.65 Vh=-0.5)
TEXT -592 -696 Left 2 !.model MyIdealDiode D(Ron=.1 Roff=10Meg Vfwd=1)
TEXT -1848 -768 Left 2 !.param Ns = 3 R_disparity = 0.01
AI: In case you wanted to simulate a saturating transformer -- judging by the floating inductor from your schematic (not shown in picture but included in the code) -- all you had to do was to include the Chan core in a coupled inductor's circuit. You could have gone the ltwiki way and that would have been a very nice setup, but you can get away a bit cheaper:
Since the Chan core does not allow coupling, L2 here represents it and L1 (the primary), together with L4, L5 (the secondaries), form an ideal transformer with quite large values (1 H for the primary). The Chan core is in parallel with the large value of L1, which means the majority of the current will go through L2, while the coupling ensures that the voltage ends up in the secondary (I've ogled your values to ~4.3 ratio).
Now, the parameters for L2, as set by you, seemd a bit strange: A=10u means A = 1e-5 m2 = 0.1 cm2 which, for the ~70 V output and 4 Ω load is nowhere near enough. Then Lm=1m means the magnetic path length is 1e-3 m = 1 mm which, again, is much too short. So I've changed them to what you see in the picture: 5 cm2 and 10 cm (some guesses), but I also reduced the gap length by a factor of 1000, since as it was it would have helped the core in case of imbalance (even if not enough). Then, the number of turns for this core was simply too small, fully saturating the core and giving kA worth of current through it; so I increased the value, even if it seems a bit unrealistic. Finally, the imbalance resistor was increased to 1 Ω, and the .MODELs for the switch and the diode were slightly touched.
At any rate, the new core has an inductance of ~67 mH, which is more likely for the chosen switching frequency, but still seems large for the given power, so it's now only about 15x smaller than L1. The values could be increased, but be careful that you don't upset the solver.
The plot shows high initial saturation, then some borderline saturated current (the peaks are wavy), then the saturation increases on one side, only (the upper plot, zoomed in at the end), due to the extra resistor. If you add the "ltwiki way", you'll get something very similar:
Note that, as you see it above, the coupling is implied to be 1 due to the lack of leaking inductances. In case you want to play with it, below is the code for this last one:
Version 4
SHEET 1 2016 1476
WIRE -1536 -528 -1536 -560
WIRE -1536 -416 -1536 -448
WIRE -976 -384 -1248 -384
WIRE -688 -384 -976 -384
WIRE -432 -384 -688 -384
WIRE -240 -384 -432 -384
WIRE 176 -368 160 -368
WIRE 320 -368 256 -368
WIRE 448 -368 384 -368
WIRE 544 -368 448 -368
WIRE 720 -368 624 -368
WIRE 160 -320 160 -368
WIRE 720 -304 720 -368
WIRE -976 -288 -976 -384
WIRE -432 -288 -432 -384
WIRE -1248 -272 -1248 -384
WIRE -1024 -272 -1056 -272
WIRE -480 -272 -512 -272
WIRE -240 -272 -240 -384
WIRE 160 -272 160 -320
WIRE -1024 -224 -1056 -224
WIRE -480 -224 -512 -224
WIRE -1536 -208 -1536 -240
WIRE -1056 -192 -1056 -224
WIRE -512 -192 -512 -224
WIRE 720 -176 720 -224
WIRE 160 -128 160 -192
WIRE 272 -128 160 -128
WIRE -1536 -96 -1536 -128
WIRE -1248 -96 -1248 -208
WIRE -976 -96 -976 -208
WIRE -976 -96 -1248 -96
WIRE -912 -96 -976 -96
WIRE -832 -96 -912 -96
WIRE -480 -96 -608 -96
WIRE -432 -96 -432 -208
WIRE -432 -96 -480 -96
WIRE -240 -96 -240 -208
WIRE -240 -96 -432 -96
WIRE 272 -96 272 -128
WIRE 160 -48 160 -128
WIRE -976 -16 -976 -96
WIRE -1248 0 -1248 -96
WIRE -1024 0 -1056 0
WIRE -432 0 -432 -96
WIRE -240 0 -240 -96
WIRE -480 16 -512 16
WIRE -1024 48 -1056 48
WIRE -480 64 -512 64
WIRE 160 80 160 32
WIRE -1536 96 -1536 64
WIRE 160 112 160 80
WIRE 176 112 160 112
WIRE 320 112 256 112
WIRE 448 112 448 -368
WIRE 448 112 384 112
WIRE -1536 208 -1536 176
WIRE -432 208 -432 80
WIRE -1248 480 -1248 64
WIRE -1056 480 -1056 48
WIRE -1056 480 -1248 480
WIRE -976 480 -976 64
WIRE -976 480 -1056 480
WIRE -688 480 -976 480
WIRE -512 480 -512 64
WIRE -512 480 -688 480
WIRE -432 480 -432 288
WIRE -432 480 -512 480
WIRE -240 480 -240 64
WIRE -240 480 -432 480
WIRE -688 512 -688 480
WIRE -272 640 -336 640
WIRE -208 640 -272 640
WIRE -64 640 -128 640
WIRE -384 656 -448 656
WIRE -1168 720 -1200 720
WIRE -1024 720 -1088 720
WIRE -960 720 -1024 720
WIRE -848 720 -912 720
WIRE -752 720 -848 720
WIRE -656 720 -752 720
WIRE -544 720 -656 720
WIRE -448 720 -448 656
WIRE -448 720 -544 720
WIRE -272 720 -336 720
WIRE -96 720 -272 720
WIRE -912 736 -912 720
WIRE -272 784 -336 784
WIRE -208 784 -272 784
WIRE -96 784 -96 720
WIRE -96 784 -128 784
WIRE -1024 800 -1200 800
WIRE -960 800 -1024 800
WIRE -448 800 -448 720
WIRE -384 800 -448 800
WIRE -96 800 -96 784
WIRE -272 864 -336 864
WIRE -64 864 -272 864
FLAG -1536 -96 0
FLAG -1536 -240 Vgate_A_D
FLAG -1536 64 Vgate_B_C
FLAG -688 512 0
FLAG -1536 208 0
FLAG -1536 -416 0
FLAG -1536 -560 Vin
FLAG -688 -384 Vin
FLAG -512 -192 0
FLAG -1056 -192 0
FLAG -1056 -272 Vgate_A_D
FLAG -512 16 Vgate_A_D
FLAG -512 -272 Vgate_B_C
FLAG -1056 0 Vgate_B_C
FLAG 272 -96 0
FLAG 720 -176 0
FLAG -912 -96 A
FLAG -480 -96 B
FLAG -1200 800 B
FLAG -1200 720 A
FLAG -64 640 x
FLAG 160 -320 X
FLAG 160 80 y
FLAG -912 784 0
FLAG -848 800 0
FLAG -752 800 0
FLAG -656 800 0
FLAG -544 800 0
FLAG -384 704 0
FLAG -384 848 0
FLAG -64 864 y
FLAG -96 800 0
SYMBOL voltage -1536 -224 R0
WINDOW 3 -876 49 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value PULSE(0 {Vgate} 0 {1/(Fsw*1000)} {1/(Fsw*1000)} {D/Fsw} {1/Fsw})
SYMATTR InstName V1
SYMBOL sw -976 -192 M180
SYMATTR InstName S1
SYMATTR Value MySwitch
SYMBOL sw -432 -192 M180
SYMATTR InstName S2
SYMATTR Value MySwitch
SYMBOL sw -976 80 M180
SYMATTR InstName S3
SYMATTR Value MySwitch
SYMBOL sw -432 96 M180
SYMATTR InstName S4
SYMATTR Value MySwitch
SYMBOL voltage -1536 80 R0
WINDOW 3 -1027 55 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value PULSE(0 {Vgate} {1/(2*Fsw)} {1/(Fsw*1000)} {1/(Fsw*1000)} {D/Fsw} {1/Fsw})
SYMATTR InstName V3
SYMBOL voltage -1536 -544 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V4
SYMATTR Value {Vin}
SYMBOL diode 320 128 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D1
SYMATTR Value MyIdealDiode
SYMBOL diode 320 -352 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D2
SYMATTR Value MyIdealDiode
SYMBOL ind 528 -352 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 5 56 VBottom 2
SYMATTR InstName L3
SYMATTR Value 50u
SYMBOL res 704 -320 R0
SYMATTR InstName R2
SYMATTR Value 4
SYMBOL voltage 160 112 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V7
SYMATTR Value 0
SYMBOL voltage 160 -368 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V8
SYMATTR Value 0
SYMBOL diode -224 -208 R180
WINDOW 0 24 64 Left 2
WINDOW 3 -179 35 Left 2
SYMATTR InstName D3
SYMATTR Value MyIdealDiode
SYMBOL diode -224 64 R180
WINDOW 0 24 64 Left 2
WINDOW 3 -179 35 Left 2
SYMATTR InstName D4
SYMATTR Value MyIdealDiode
SYMBOL diode -1232 64 R180
WINDOW 0 24 64 Left 2
WINDOW 3 -179 35 Left 2
SYMATTR InstName D5
SYMATTR Value MyIdealDiode
SYMBOL diode -1232 -208 R180
WINDOW 0 24 64 Left 2
WINDOW 3 -179 35 Left 2
SYMATTR InstName D6
SYMATTR Value MyIdealDiode
SYMBOL res -448 192 R0
SYMATTR InstName R3
SYMATTR Value {R_disparity}
SYMBOL ind2 -768 704 R0
WINDOW 3 369 152 Right 2
WINDOW 39 64 184 Right 2
SYMATTR Value Hc = {Hc} Bs = {Bs} Br = {Br} A = {A} Lm = {Lm} Lg = {Lg} N = 1
SYMATTR SpiceLine Rser = 0
SYMATTR InstName L7
SYMATTR Type ind
SYMBOL f -848 800 M180
WINDOW 0 24 -3 Left 2
WINDOW 3 -10 -26 Left 2
SYMATTR InstName F1
SYMATTR Value Vp1 {N1}
SYMBOL f -656 800 M180
WINDOW 0 27 -4 Left 2
WINDOW 3 -11 -29 Left 2
SYMATTR InstName F2
SYMATTR Value Vs1 {N2}
SYMBOL f -544 800 M180
WINDOW 0 29 0 Left 2
WINDOW 3 -8 -27 Left 2
SYMATTR InstName F3
SYMATTR Value Vs2 {N2}
SYMBOL g -960 704 M0
WINDOW 0 16 4 Left 2
WINDOW 3 5 118 Left 2
SYMATTR InstName G1
SYMATTR Value {N1/Rp}
SYMBOL res -1008 704 M0
SYMATTR InstName R1
SYMATTR Value {Rp}
SYMBOL voltage -1184 720 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName Vp1
SYMATTR Value ""
SYMBOL g -336 624 R0
WINDOW 0 6 5 Left 2
WINDOW 3 2 117 Left 2
SYMATTR InstName G2
SYMATTR Value {N2/Rs}
SYMBOL res -288 624 R0
SYMATTR InstName R4
SYMATTR Value {Rs}
SYMBOL voltage -112 640 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName Vs1
SYMATTR Value ""
SYMBOL g -336 768 R0
WINDOW 0 0 2 Left 2
WINDOW 3 2 119 Left 2
SYMATTR InstName G3
SYMATTR Value {N2/Rs}
SYMBOL res -288 768 R0
SYMATTR InstName R5
SYMATTR Value {Rs}
SYMBOL voltage -112 784 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName Vs2
SYMATTR Value ""
TEXT -1000 -464 Left 2 !.param Hc = 10 Bs = 0.3 Br = 0.2 A = 500u Lm = 100m Lg = 0.725u N = 45
TEXT -1848 -720 Left 2 !.param Fsw = 16k D = 0.45 Vgate = 3.3 Vin = 400
TEXT -1000 -520 Left 2 !.tran 2m
TEXT -592 -752 Left 2 !.model MySwitch SW(Ron=.1 Roff=10Meg Vt=1.65 Vh=-1.65)
TEXT -592 -696 Left 2 !.model MyIdealDiode D(Ron=.1 Roff=10Meg Vfwd=0.7 vrev=1k epsilon=0.1 revepsilon=1)
TEXT -1848 -768 Left 2 !.param Ns = 3 R_disparity = 1
TEXT -944 656 Left 2 !.parma N1=N N2=ceil(N/4.3) Rp=0.1 Rs=10m
[edit]
Given the line of comments, the infinite current that you're expecting will only be valid if there was no resistance, or if the voltage would be applied indefinitely.
So, as a reduction to your case above, think of the whole setup as an RL circuit driven by an imbalanced source. If you look at your circuit, the bridge applies positive, then negative voltage on a source, so it can be reduced, for the sake of analysis. To make things a little bit easier for the explanation below, don't think of the source as a pulse, but as a sine of the same frequency. Therefore, the setup is: a biased sine source driving a series RL load. The values are 1 Ω and 1 H, and the source is of the form \$1+2\sin(\omega t+\phi)\$. This is how the math goes:
$$\begin{align}
H(s)&=\dfrac{sL}{R+sL}=\dfrac{\dfrac{R}{L}s}{s+\dfrac{R}{L}} \tag{1}\\
h(t)&=\mathcal{L}^{-1}\big(H(s)\big)=\exp\left(-\dfrac{R}{L}t\right) \tag{2} \\
s(t)&=1+2\sin(\omega t+\varphi) \tag{3} \\
y(t)&=\int_0^t{s(\tau)h(t-\tau)\text{d}t} \\
{}&=\int_0^t{(1+2\sin(\omega\tau+\varphi)\exp(-\dfrac{R}{L}(t-\tau))\text{d}t} \\
{}&=\dfrac{2 L {{R}^{2}} \sin{\left( \omega t+\varphi\right) }-2 {{L}^{2}} R \omega \cos{\left( \omega t+\varphi\right) }+{{L}^{3}} {{\omega}^{2}}+L {{R}^{2}}}{{{L}^{2}} R {{\omega}^{2}}+{{R}^{3}}}-\dfrac{\left( 2 L {{R}^{2}} \sin{(\varphi)}-2 {{L}^{2}} R \omega \cos{(\varphi)}+{{L}^{3}} {{\omega}^{2}}+L {{R}^{2}}\right) }{{{L}^{2}} R {{\omega}^{2}}+{{R}^{3}}}{\exp\left(-\dfrac{R}{L}t\right)} \tag{4}
\end{align}$$
It's a beauty, but if you'll replace \$\omega=2\pi 5,\;R=1,\;L=1,\;\phi=-\pi/6\$ and plot this, you get:
LTspice very much agrees with the mathematical answer, composed of a pulssating part and a transient part: |
H: Christmas lights in series with one broken bulb
I read this about Christmas mini-lights in series: "When one bulb's filament breaks, current stops flowing, so the remaining lights go out, and the full 120V appear across the broken filament. This means that even though the bulbs are designed to operate at 2V, they have to withstand 120V across the broken filament."
What does it mean "120V "appear across the broken filament"? Is this because the other bulbs are cold so their resistance is near 0Ω?
And what does it mean "withstand 120V across the broken filament"?
AI: Let's use resistors instead of lightbulbs...
With N identical resistors of value R in series, total resistance will be N*R. With a voltage source V, a current V/NR will flow, and there will be V/N volts across each resistor.
If one resistor (lightbulb) is removed, the circuit is open, so there will be no current.
With no current, there is no voltage drop across the remaining resistors (R*I=0 because I=0), therefore the full voltage V appears across the missing resistor. |
H: Best way to "cut" a connection on a pcb
Imagine you have some traces on a PCB, that connect from point A to point B.
I would like to have control over that connection. I want to be able to enable/disable the connection from a distance (microcontroller included).
What is the best way to enable/disable the connection? Transistors, switches.... Something that the microcontroller can control, and that then can control the connection to the trace...
What is the best component to use for this purpose?
AI: Without knowing anything about the signal, I'll say the most universal solution is an analog transmission gate. The signals must remain within the range of the power supply to the T-gate.
Depending on the signal characteristics, there are several simpler/cheaper options available. Can you describe the signals to be on these traces? |
H: Can I use this US extension cord in Europe?
Long story short: I need an extension cord to charge my EV when the standard charger does not reach the socket. I spent hours researching what options I have and most review websites I found were US-based. The most highly recommended extension cord was this bad boy:
https://www.amazon.com/Camco-Extension-PowerGrip-Convenient-Carrying/dp/B004809YBE#
But I live in Europe, specifically in Romania. Here we use 230V with 16A, which means 3680W. Given that the Camco cable:
Features 30A male and 30A female connectors
Is rated for 125V/3750W
And supposing that I get the highest quality US<>EU plug adapter, could I use this US cable to charge my EV in Romania? And would it be safe?
I know that I could instead shop for a standard European 2.5mm^2 extension cord. In fact, that's what I will most likely end up doing. Nonetheless, I'm curious to find out the answer to my question.
AI: You could get as many “no” as “yes” answers. Will it work? Sure. Should you use it? Probably not.
No, this product is not CE marked, its importation is actually illegal.
Yes, it is rated for 30 A, while you’ll draw only 16.
No, it is rated for 130V, while you’ll have up to 240V.
No, those plugs are not designed for 240V
No, using adapters (two of them in addition) is definitely not recommended especially in higher power situations (and you will probably have a hard time finding adapters for those plugs which are not the basic US plugs)
I would be surprised if you could not find a better and cheaper option using local plugs. In addition, since it would need to support lower intensity (amps) it can use smaller gauge wires (cheaper and lighter).
Note that there is no such thing as an “EU” plug. There are many different standards in use in Europe, not all of them being compatible.
Last point of note: never use an extension cable while it is still rolled up, especially at higher intensity. The cable is just one big resistor which is going to generate heat as current goes through it. Spread out, that’s not an issue, but rolled up that can be a bit too much heat for the cable. |
H: About power dissipation of capacitors and inductors & I-V phase difference
For instance, The Art of Electronics (by Horowitz & Hill) states that
ideal capacitors cannot dissipate power, even though current can flow through them, because the voltage and current are 90° out of phase.
This reasoning has always baffled me since \$\small P = V \cdot I\$ and if we consider multiplying two sinewaves that are 90° out of phase, the resulting wave is not a flat zero line.
The fact that ideal capacitors and inductors store the power (later releasing it) seems to explain the phenomenon and make a lot of sense, but the phase explanation seems be the more common one.
As I see it the current "leading" the voltage across a capacitor is pretty easy to understand somewhat intuitively, but if the power dissipation would depend on it, both capacitors and inductors would instead dissipate half the power compared to resistors (assuming alternating voltage/current of course).
So, am I just getting something totally wrong or is the out-of-phase explanation flawed?
edit:
I finally found the error in my own reasoning. I somehow thought that multiplying two identical sinewaves with each other would result a wave that would be centered on the same axis as the original ones ie. also having positive and negative values. But with in-phase sinewaves the negative values of course line up and result in only positive values.
Only when the waves (functions) are exactly 90 degrees out of phase is their product centered on zero axis and thus "spends" as much time on the negative side as on the positive.
AI: If the voltage across a capacitor is described as sin(x), then the current through the capacitor (being 90 degrees out of phase) can be described as cos(x). The power is given by the product of voltage and current. For a capacitor, this is proportional to sin (x)*cos(x). This product is given by sin(2x)/2 which is a sine wave. Thus it is positive for half the time and negative for half the time. This means that power goes into the capacitor half the time (stored in the electric field) and that same power is released back to the circuit during the other half. The net power dissipated in the capacitor is zero. |
H: Bipolar stepper motor doesn't spin but vibrates
I got a problem with controlling a bipolar stepper motor. It doesn't spin but vibrates.
Here is the schematic of my stepper driver:
DVDD supplies 5v DC.
Here is the wiring map from the motor's specification:
here are the motor and how I wired it up to my PCB:
There are some hints about acceleration and high torque in the specs as well.
Full disclosure: I am not sure what to do with this info, I am not an electrical engineer.
Now, I have tried to write a simple python script to drive the stepper. However, all my best efforts ended up with the motor vibrating.
import RPi.GPIO as GPIO
import time
delay = 0.005# time to settle
drv_m1 = 8 #GPIO08
drv_step = 20 #GPIO20
drv_dir = 26 #GPIO26
drv_nfault = 21 #GPIO21
def setup():
GPIO.setmode(GPIO.BCM)
GPIO.setup(drv_m1, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(drv_step, GPIO.OUT,initial=GPIO.LOW)
GPIO.setup(drv_dir, GPIO.OUT, initial=GPIO.HIGH)
GPIO.setup(drv_nfault, GPIO.OUT, initial=GPIO.HIGH)
setup()
try:
while 1:
GPIO.output(drv_step, 1)
time.sleep(delay)
GPIO.output(drv_step, 0)
time.sleep(delay)
except KeyboardInterrupt:
pass
GPIO.cleanup()
I have tried a varius delay values (between 0.0001 and 0.1) and tried out using PWM with frequencies as low as 100hz to 14000hz with no luck.
Any ideas what could be causing the problem here?
AI: You're using the wrong chip. The DRV8428P that you're using is not a stepper driver, it's just a dual H-bridge. Your code is therefore simply switching one of the stepper motor's coils on and off, making it vibrate.
You need an actual stepper motor driver that has "step" and "direction" input pins. Alternatively, you'll have to generate the waveforms for the stepper coils manually. |
H: Interpreting spec sheets for an inverting op amp
I'm interesting in putting together an inverting op amp to take a signal voltage from 10 V to 0.01 V (Gain = -60 dB). By signal voltage I mean the current input and output will be low (e.g., <1 mA).
Searching suppliers, I haven't found an op amp where their gain plots reach -60 dB.
This makes me wonder, can I simply interpret the gain plots to mean +X dB for non-inverting configurations and -X dB for inverting configurations?
Gain plot examples,
Or
Here is the second plot's spec sheet for a little more detail:
https://cdn.sparkfun.com/assets/8/4/9/e/1/DS-15946.pdf
AI: You are confusing open loop gain and closed loop gain. The gain in the data sheet plots is open loop gain and is very high as this is how op amps are designed. It is independent of how you are going to use the op amp (that is, inverting or non-inverting).Feedback is used in the actual circuit using the op amp to set the desired gain. The configuration of the feedback resistors determines whether it is an inverting or non-inverting amplifier. When the open loop gain is much higher than the closed loop gain the closed loop gain is primarily set by the feedback resistors and is independent of open loop gain. In your case, you actually want attenuation (-60 dB) rather than gain so you don't even need much open loop gain. A simple inverting amplifier for which the resistor ratio is 1/1000 will provide what you want. You didn't mention the frequency range of your signal. That will also help determine which op amp you should use. |
H: Why can't I use a 12 V DC power supply, voltage divided to get a 9 V drop across a resistor, to power a 9 V DC motor?
I have a 12 V DC power supply and a 9 V DC motor available to me. I want to use the 12 V power supply to power the 9 V motor, and I expected I could do this with voltage division.
I built this circuit, and tested it to confirm that there is 12 V between power and ground, and tested across the 220 k resistor to confirm there was 9 V across it. When I connect the motor across the 220 k resistor, the motor does nothing and when I test across the resistor it now says 0 V. Why does this happen? How can I change my circuit to make the motor spin?
There is a circuit diagram, I was connecting the motor between nodes labelled 'A' and 'B'.
AI: A resistor divider does deliver a voltage similar to the one you desire, just like you say and found out. But it also presents a series resistance, too. That series resistance then stands in the way of your motor.
Here's a circuit that is the equivalent to your constructed circuit:
simulate this circuit – Schematic created using CircuitLab
It's that inserted equivalent resistor that is preventing the motor from running.
The value for the equivalent series resistor (\$R_1\$ above) is just the parallel equivalent of the two resistors you used in the divider. You could redesign the resistor values to get a lower value. But then you'd also be wasting more power and may have to buy physically larger resistors. In general, you don't get to win this game. It's almost always a losing proposition. Especially when discussing motors.
The next step up in complexity is to use a BJT so that the effective resistance is driven down. It looks something like this:
simulate this circuit
BJTs have something called \$\beta\$ ('beta') that boosts the current compliance (more capable of supplying current to the load.) Put another way, the circuit above with the NPN BJT can be mentally replaced with the first circuit I mentioned above, but where the value of \$R_1\$ is divided by approximately \$\beta\$. And since modern values of \$\beta\$ can be quite large (in the hundreds), the equivalent series resistance is far lower than without the BJT in place.
Doing this allows the actual resistor divider to concentrate on the job of setting the voltage you want without excessively wasting power, while allowing the NPN BJT to pass along a lot more current if the motor requires it. It's slices up the job into two parts, handing off one part to the resistors, just as you already knew about, and handing off the other part -- delivering current that bypasses those resistors -- to the BJT.
(A small note. The design voltage for the resistor divider in this BJT circuit needs to account for the small base-emitter voltage of the BJT -- likely less than one volt -- setting a slightly higher target voltage for the divider so that the desired motor voltage is achieved.)
Will just one BJT be enough? I've no idea. All I've done here is to extend your idea by adding just one part to improve it. Likely, the situation may require still more thought.
You've said nothing much about the motor, itself. If it is a toy motor, then even a relatively small BJT may be able to handle the job. But if it is a treadmill motor, then you are in for a much more complicated circuit. |
H: Simulating a single ended to differential circuit not working as intended
I am trying to simulate the circuit recommended in this TI article.
However, my simulations are not matching what is expected. What I am doing wrong?
AI: Your differential inputs are not at the same DC input and the output is clipping, trying to achieve this.
Observe the specs for CM input range
Bias accordingly, the input or the -ve reference or both in this case
with high gain, the offset must be chosen wisely
i just read the datasheet and noticed this.
Edit
" For proper operation, the input common-mode voltage to the input terminal of the amplifier should not exceed the common-mode input voltage range"
Your Vocm is at the +ve rail when you want the Vocm to be 0V. So the outputs were clipped or cut-off. |
H: Finding a pass-through demultiplexer with latch/register on output
I'm currently working on an Arduino project with lots of digital IO (21 outputs, 8 inputs) and no analog IO. This is more than the number of digital pins on an Arduino Nano, so I started looking at muxes to expand the number of output pins. I quickly came across the HC4067 with 16 outputs which seemed perfect, except for the fact that it (and most muxes) are non-latching, ie only one output can be active at a time. If I was controlling an array of lights that might work, but alas I'm controlling a variety of things that need to be constantly on.
Thus, I began looking for a mux with a register or latch, or just a transparent 16-bit register/latch I could plop down after the mux. Most that I've found seem to not work well for me because of my requirements:
Hand solderable by someone (me) with rather basic soldering skills
Not an absurd number of pins. Goes hand in hand with the previous. I've seen a few transparent latches that I think may work, but they had 48 pins for an 8 bit latch.
I must be able to toggle an arbitrary pin without affecting the others (ie, Not a shift register, unless I'm misunderstanding how shift registers work)
Transparent when selected/No clock required - most outputs will change on human scales, but I did have to stick a 2400 baud software serial RX on this mux, and I'm not sure how to add a clock pin into SoftwareSerial.
Selected pins hold the last values. ie: I could set all outputs on at a time, or half, etc (manual latching is fine)
Digital 5V logic compatible, current on the order of an Arduino (20-40mA) (Output-only is fine)
So is there either a 16-output demux with a latch/register (preferred), or a latch that I can plop down after the mux above that meet the above requirements? I'm fine with two 8 bit ones, though I'd prefer avoiding smaller ones.
Second, I think most of my failure googling these bits stems from my lack of knowledge of the proper terminology and if I want latches, registers, buffers, multiplexer, transparent, inverting, etc. What would be the proper names for what I'm looking for?
AI: Sounds like "addressable latch", 74LS259 is one example (PDF link) |
H: Spanning the voltage gap between microprocessor and P-MOSFET
I need to control a high-side FET from an STM-8, to enable solar charging of 2x18650. The only pins I have left are PD4 and PD5 which are true open drain outputs: that would be perfect if I could use them to drive the P-MOSFET directly, but the pin voltage is limited to +6.5V, and my solar panel could supply up to 10V. The output does not have any protection diodes, and the STM8 spec states that no injection current is allowed for these pins.
The simplest circuit I can think of is this one, and it has a couple of disadvantages:
the pull-up means that, if the microprocessor stops, charging is activated.
the current is flowing through the pull-up resistor to the open-drain output any time when you are not charging, ie when you can least afford to waste current.
Is there a simpler alternative way to do this?
AI: It's not simpler, but you could do something like this:
simulate this circuit – Schematic created using CircuitLab |
H: Do 1MHz 3.3V through-hole oscillators exist?
I'm beginning my first MCU project and I'm having trouble finding a suitable oscillator. I want to run an ATtiny261 at very low power. It will be lighting up different combinations of LEDs based on look-up tables, indexed by analog sensor ranges. The data sheet advises using an external oscillator when using the ADC.
Since I'm prototyping this on a breadboard and generally don't have a lot of experience with soldering small parts I've been trying to find all through-hole components. I'm having a lot of trouble finding any through-hole oscillators that are sub-2MHz and 3.3V:
At Mouser as soon as I select through-hole the options start at 3MHz (with the exception of a 455KHz option, which seems incompatible with the specs in the ATtiny261 datasheet).
On the other hand, if I select 1MHz, 3.3V oscillators the options are limited to SMD components.
Is there a fundamental electrical reason I'm having trouble finding these parts or is the industry just moving away from through hole parts so completely that these parts simply aren't made anymore?
If these parts simply don't exist, is my best option to use a plain crystal component and build my own oscillator circuit based on a tutorial like this one?
AI: I want to run an ATtiny261 at very low power...I'm having a lot of
trouble finding any through-hole oscillators that are sub-2MHz and
3.3V:
Crystal oscillator modules tend to draw quite high current (typically 10-30 mA) which is incompatible with very low power operation. They may be OK for breadboard prototyping, but you probably don't want to use one in the final product.
or is the industry just moving away from through hole parts so
completely that these parts simply aren't made anymore?
Yes. What's worse is a lot of newer ICs are only available in lead-less packages like BGA and WSON that can't be soldered by hand at all. This is no problem for the industry because hand soldering is avoided as much as possible to keep costs down etc., but is annoying for prototyping and hobbyist use. This has lead to the rise of pre-populated 'breakout boards' for specialized smd parts that cannot easily be hand soldered.
is my best option to use a plain crystal component and build my own
oscillator circuit based on a tutorial like this one?
You could do that (I recommend the 'CMOS Crystal Oscillator') but your best option might be to use a 'plain crystal' with the ATtiny's own crystal oscillator circuit. This will be easier to build and use fewer components, and may have lower current draw. The only downside is that it uses up another I/O pin. |
H: Circuit type that uses three operational-amplifiers
I was given a problem-based learning assignment that told me to find and explain the *circuit that consists of 2 or more LM741 op-amps. Based on my research, I only managed to find a "three op-amp instrumentation amplifier." That's a circuit structure that can amplify the differential signal while stripping off any common-mode voltage. It clashes with other team's topic, though, so I'm here to ask if there is any other circuit type that fulfills the question criteria that I mentioned above.
I just need suggestions on the circuit type's name and will do the research on my own afterward.
AI: In response to the last question of your posting I can list some very versatile filter circuits.
Under B) you can find so-called "Biquadratic" or "universal filters), which - at the same time - can provide three basic filter functions: Lowpass, highpass, bandpass (bandstop).
A) Two-opamp topology:
GIC-Filters (Generalized Impedance Converter) - most versatile topologies,
B) Three-opamp topologies
KHN-Filter (Kerwin-Huelsman-Newcomb),
Tow-Thomas,
Fleischer-Tow,
Akerberg-Mossberg,
Berka-Herpy,
Parallel structures |
H: Question regarding wiring setup for a battery balancer
Given this schematics (it is a battery balancer for 6 x 12V lead-acid battery, wired so we have a 24V system).
Can someone please explain me why the inner black wires (the ones connecting + to -, so we link the batteries in series) are connected between them?
I understand the logic to measure/discharge a "channel" (right or left one) but I don't understand how linking the common wires (what I put in the green part) works.
Thanks!
AI: If you don't link middle points together, you will have 3 different battery packs to balance separately and 3 separate balancing circuits. You will add both cost and complexity for no aparent gain.
On the other hand, if you connect the middle points together, there is a good chance of weaker and stronger batteies distributing between the sides of the circuit in a pattern that lowers the need of balancing. |
H: Why doesn't the voltmeter show the charging voltage when connected to a solar controller's battery connection?
My understanding is, for charging to occur, a solar charge controller needs to output at a higher voltage than the battery's voltage.
If so, why, when you test the battery connection of a solar charge controller while it is charging, a voltmeter reports the battery's voltage, and not the charging voltage? Or, how does a solar charge controller accurately report the battery's voltage, while it is charging at a, presumably, higher voltage?
AI: A solar panel is a current source over most of its characteristic, and the solar charger sets a charging current for the battery (usually until a pre-set maximum voltage has been reached).
While being charged with a (constant) current, it is the battery itself that determines the voltage; the charger doesn't set a voltage. It does move to a next step in the charging algorithm when a pre-set maximum voltage is reached.
So it is the battery setting the voltage, and this is the voltage you are measuring when it is being charged.
As it is connected to the charger with near-zero-resistance wires, this will of course also be the voltage you measure at the charger output. |
H: DRV8801 H-Bridge : need for freewheeling diodes?
I'm designing a PCB using a DRV8801PWP.
However, I'm a bit unsure if I need to add freewheeling diodes myself or not.
In the typical applications, they don't show them, but I didn't found either an explicit mention that I don't need them.
Some information that might be relevant :
supply voltage : 12.6V max
motor current : about 1A max (stalling)
motor's load has rather low inertia (some motors are used in rough torque control (ie nearly immobile), and the others for the wheels of the robot (low speed, high reduction ratio)
So do I need to add free-wheeling diodes?
AI: The IC has body diodes quoted in the data sheet: -
These are the bulk diodes in parallel with the output MOSFETs. Here they are again: -
However, I'm a bit unsure if I need to add freewheeling diodes myself
or not.
You might only need to add them if you plan on using multiple DRV8801s in parallel (read section 9.3 - parallel configuration).
So do I need to add free-wheeling diodes?
Are you planning on using parallel connected DRV8801s? |
H: Turn on an LED using opposite sides of 2 different batteries
I know this is a very beginner question but I'm not even sure what to lookup to learn about its details, so here it goes.
Why won't this turn the LED on? does't the current flow from positive to negative?
Why can't positive side of a battery move to the negative of another battery?
AI: simulate this circuit – Schematic created using CircuitLab
Two independent batteries floating in space. There is no reference between them. No current can flow. Connecting a meter between the batteries on either end will give a reading of zero volts.
The batteries are connected in series. There is a 3 V difference between the top and bottom. In your proposal the batteries should go flat immediately because the the charge would somehow go from one to the other.
Here's the same situation but rather than a direct connection a lamp has been wired between the cells. Since no current flows the voltmeter reads 0 V.
To allow current to flow a closed loop must be formed. Here when SW1 is closed current can flow and the lamp will light.
The circuit of Figure 4 rearranged in the more conventional flashlight arrangement.
Why can't positive side of a battery move to the negative of another battery?
Because the overall charge in the battery must remain the same. If current leaves one terminal (forget about electrons - just think of conventional current flow from positive to negative) then the same current must come in the other terminal. With any break in the circuit that can't happen.
If what you proposed could happen then the batteries in a flashlight would go flat very quickly after insertion even if the switch was open. |
H: Downconversion using frequency divider vs. mixer
Let's say you have a 1 GHz signal that you want to receive and demodulate. I am familiar with the superheterodyne receiver, where an LO of 1 GHz is mixed with the RF signal, and the output is then used.
On the other hand, it seems that we can also use a frequency divider, e.g., a divide by 2 or 4 or even 8, where the 1 GHz can be reduced to a lower value.
What is the performance difference of each? And why are frequency dividers not as commonly used as LO mixers?
AI: it seems that we can also use a frequency divider, e.g. a divide by 2
or 4
The disadvantage of dividing the frequency (for systems that use frequency modulation) is that when you divide the carrier frequency, you also divide the frequency deviations and, eventually, you reach a point where the number carrier cycles per logic "1" bit becomes exactly the same as for a logic "0" bit i.e. it fails to work.
The following picture hopes to show that dividing by 2 reduces the detection window available in the receiver's demodulator (called "space filter" and "mark filter" in the picture below): -
Clearly, dividing by 4 reduces the space and mark filters by another factor of two.
Image taken and modified from this site and from this document specifically. As you can see, for each division by two the mark and space filters required by the demodulator gets tighter and tighter to implement. This inevitably requires more complication if things start to get tight. There are some chips that do this; I've used them when demodulating 400 MHz where the chip in question implemented a divide by 4 before using a mixer. Not ideal but, a divide by 4 didn't degrade what we needed to implement.
It was a high speed data link with an FSK/FM deviation of about 15 MHz for a very bespoke aerospace application.
Some example numbers
If the centre frequency is 1 GHz and the data rate is (say) 100 kbps, for a maximum FM deviation of 100 kHz (for example), you would naturally expect to see an average of about 10,000 cycles of carrier per bit. For a logic "1" data bit this might be 11,000 cycles and for logic "0" it might be 9,000 cycles.
So, if you divided the raw modulated carrier by (say) 1,000, you'd get 11 carrier cycles for a logic "1" and 9 carrier cycles for a logic "0". In other words, you haven't got a big count difference between the two logic levels. If you decided to divide by 10,000 you wouldn't be able to distinguish between logic "1" and logic "0" at all.
Clearly if you divided by 100 instead, you'd count 110 cycles for logic "1" and 90 cycles for logic "0" and that is a more reliable count difference.
The bottom line is that each division is degrading the signal compared to superheterodyning the original modulated carrier down to a lower frequency because, the spectrum width of the down-converted signal remains exactly as it was at 1 GHz. |
H: PCB tracks as wide as possible or just as wide as needed?
what is the best practice regarding the width of PCB tracks?
There are of course a few hard constraints :
wide enough to keep voltage drop acceptable
wide enough to prevent excessive heating
at least as wide as the minimal width allowed by the manufacturer/manufacturing process chosen
not wider than there is space on the PCB to route them
That gives a range, but often it is quite large, specially for low current tracks.
So how best to chose within this "acceptable" range"?
There might be a few additional soft constraints :
if one can avoid the smallest width everywhere, then it might be wise to do so (might be less expensive, or allow to switch more easily to another manufacturer with less precise process).
for high current tracks, making them larger gives a lower resistance so a bit less energy loss (always nice)
But how to choose the width for signal tracks?
always the minimal width
always a little bit wider than the minimal width (to reduce the risk of defects on PCBs at manufacturing?)
always as large as possible (once everything placed and routed, just increase the width of each track as much as possible)
something else?
Well, basically, how to select the best track width when the hard constraints give a big range oof allowed widths?
AI: PCB tracks as wide as possible or just as wide as needed?
The answer depends upon the use of the PCB tracks, and what is parallel to the tracks on the PCB.
PCB tracks with a ground plane parallel to them will have capacitance proportional to their area. In some cases, the components driving a signal will have a difficult time if the capacitance of their load is too great. In such cases, "as wide as possible" is NOT the right choice. Rather, the right choice is "just as wide as needed".
Similarly, if the PCB track is carrying a signal whose rising and falling edges are short enough, or whose frequency is high enough, the PCB track together with its return path (possibly through a ground plane or return track parallel to the track) will have a characteristic impedance. Changes to the tracks width will cause changes to the characteristic impedance. Each sudden change to characteristic impedance will cause signal reflections. Enough of these, or changes of sufficient size, and the signal will be degraded. In this case the right choice is NOT "as wide as possible", but "with a constant width".
However, if you are routing a DC voltage to some component, there is no harm in the route having significant capacitance, nor harm in variations of characteristic impedance. In fact, the trace capacitance may be beneficial, and the trace resistance detrimental. In these cases, the right choice may be "as wide as possible", rather than "only as wide as is strictly necessary" |
H: Pull output down if either of multiple pins are pulled down
(Sorry in case I used the wrong terminology, let me explain.)
Context
I have a relay board I'm controlling. It has 8 relays, and 8 low level triggering pins for control.
7 of the relays I want to control separately from each other, while the 8th should trigger if any of the other 7 are triggered.
Question
I know how to control a pin from HIGH to LOW. But how would I implement this "OR" logic in hardware? If it has triggering on HIGH, I would have put a diode between every pin and the 8th pin, that would have pulled it HIGH if any of the others were.
So I understand I could fix it in code, but I rather have something that is sensitive to corner cases.
AI: Just use standard diodes. 7 of them. If any pulls low, it will pull the 8th input low. Although if you have extra GPIO for that it might be simpler to do it in software. |
H: HP 8568B J1 Connector identification
Can anyone identify these 4 individual RF connectors? I think it's some sort of RP-SMB, but it could be something more foreign. I would need to buy 4 cables to connect up the spectrum analyzer.
Digging through ebay, the expected connector looks like this:
The original cable is HP P/N 85662-60093, and costs wayyyy too much for a cable.
Thanks.
AI: The connector looks like a variant of 13W3 which was used by professional workstations with high resolution analog monitors before LCDs entered the scene. The round connectors are true coax for high frequency with proper impedance and proper shielding as opposed to DB15.
Image from Wikipedia:
If you search for the connector type, you should be able to find a 5 coax variant of it.
Found by OP: It’s DB-5W5. https://www.mouser.com/ProductDetail/Amphenol-FCI/DBO5W5S500G30LF?qs=1Qbx6cv8UfUX9x4NKVoy8w%3D%3D |
H: SMD "power" resistors : what constraints on PCB layout
I'm looking for current sens resistors. As those are rather big (and beeing for now the limiting element for my PCB size), I would like to stop using over-rated one and take some with "just" the power rating needed.
So I was wondering what exactly the powerrating means?
If for exemple I choose a 0.5W resistor. Does that mean that it is meant to be used at 0.5W, or that it might get destroyed at 0.500001W?
And how about power dissipation (the datasheets I looked at have no information about it) : can I do my layout as "bad" as I want and have the 0.5W rating, or do I need to have a layout optimized for heat dissipation if I want to get the ratings from the datasheet?
If you want a more specific use case, there is the one I'm currently working on :
using the resistors for measuring motor current (usualy for now 0.1A nominal, worst case 1A for about 1 minute (motor stalling), driver has internal *5 voltage amplifier for sens resistor voltage)
resistors in the range 0.2-0.3 ohms
I started my design with 0.2 ohms, 3W, 2512 package (wanting some margin to switch to bigger motors if needed, the driver can handle 2.5A, so 0.2*2.5^2=1.25W, so 3W seemed safe). Now I realized that the resistors are too big to fit, so I'd rather loose the possibility to get bigger motor than increase the size of the PCB.
-I would like to go down to 2010 package or smaller (nb : I mainly care about length, so for exemple 1812 is also perfectly fine)
one of the resistors I was think to use now is this one : 0.5W, 0.24 ohms, 1812 package
air temperature will be 30°C max (while testing at home), 14°C max in real use (it's for a caving robot)
AI: The manufacturer generally specifies a footprint (or multiple) for their parts. In the case of your 0.5W resistor, it's the standard reflow soldering footprint for the 1812 package size. The resistor will be able to withstand the rated power indefinitely with the manufacturer recommended PCB footprint and an ambient temperature of 70°C (as specified in the datasheet you linked).
It won't immediately break if you apply slightly higher power than it's rated for, especially at lower temperatures (below 70°C). Make sure that the components around the resistor don't heat it up excessively (I wouldn't place a linear regulator right next to it, for example). Most resistors can also withstand higher pulse loads as long as the maximum power rating is observed on average. That means you can pulse the resistor with 1W for a second, then turn it off for another second, and it'll be fine.
You can also get resistors with a higher power rating in the same small package. These are then simply designed to operate at higher temperatures under load. High-power resistors operating at something like 200°C under load isn't unheard of.
TL;DR: As long as you don't put more than 0.5W through that resistor on average and don't exceed an ambient temperature of 70°C because of other components heating it, you can lay out your PCB however you want and it'll be fine.
2.5A is way too much for that 0.5W resistor, though - that'd be 1.5W of power dissipation. 1.5A is the most it can take continuously. It might be able to handle 2A for limited amounts of time (i.e. for a few seconds during a fault condition) but you will risk failure if you do that.
An example of a 1812-size resistor ("wide" style) that can take 1W at 70°C is the RCWL1218R220JNEA from Vishay Dale. It's just designed to run hotter (as can be seen by its 155°C maximum temperature rating). You can comfortably push 2A continuous through it and 2.5A during (time-limited) faults won't kill it either. |
H: The sign on each voltage is the polarity of the terminal encountered first as we travel around the loop?
I'm currently studying the textbook Fundamentals of Electric Circuits, 7th edition, by Charles Alexander and Matthew Sadiku. Chapter 2.4 Kirchhoff's Laws says the following:
Kirchhoff's voltage law (KVL) states that the algebraic sum of all voltages around a closed path (or loop) is zero.
Expressed mathematically, KVL states that
$$\sum_{m = 1}^M \nu_m = 0 \tag{2.19}$$
where \$M\$ is the number of voltages in the loop (or the number of branches in the loop) and \$\nu_m\$ is the \$m\$th voltage.
To illustrate KVL, consider the circuit in Fig. 2.19. The sign on each voltage is the polarity of the terminal encountered first as we travel around the loop. We can start with any branch and go around the loop either clockwise or counterclockwise. Suppose we start with the voltage source and go clockwise around the loop as shown; then voltages would be \$-\nu_1\$, \$+\nu_2\$, \$+\nu_3\$, \$+\nu_4\$, and \$-\nu_5\$, in that order. For example, as we reach branch 3, the positive terminal is met first; hence, we have \$+\nu_3\$. For branch 4, we reach the negative terminal first; hence, \$-\nu_4\$. Thus, KVL yields
$$-\nu_1 + \nu_2 + \nu_3 - \nu_4 + \nu_5 = 0 \tag{2.20}$$
Example 2.5
For the circuit in Fig. 2.21(a), find voltages \$\nu_1\$ and \$\nu_2\$.
Solution:
To find \$\nu_1\$ and \$\nu_2\$ we apply Ohm's law and Kirchhoff's voltage law. Assume that current \$i\$ flows through the loop as shown in Fig. 2.21(b). From Ohm's law,
$$\nu_1 = 2i, \ \ \ \ \ \nu_2 = -3i \tag{2.5.1}$$
Applying KVL around the loop gives
$$-20 + \nu_1 - \nu_2 = 0 \tag{2.5.2}$$
Substituting Eq. (2.5.1) into Eq. (2.5.2), we obtain
$$-20 + 2i + 3i = 0 \ \ \ \ \ \text{or} \ \ \ \ \ 5i = 20 \ \ \ \ \ \Rightarrow \ \ \ \ \ i = 4 \ \text{A} $$
Substituting \$i\$ in Eq. (2.5.1) finally gives
$$\nu_1 = 8 \ \text{V}, \ \ \ \ \ \nu_2 = -12 \text{V}$$
Note the following explanation by the authors:
To illustrate KVL, consider the circuit in Fig. 2.19. The sign on each voltage is the polarity of the terminal encountered first as we travel around the loop.
Suppose we start with the voltage source and go clockwise around the loop as shown; then voltages would be \$-\nu_1\$, \$+\nu_2\$, \$+\nu_3\$, \$+\nu_4\$, and \$-\nu_5\$, in that order. For example, as we reach branch 3, the positive terminal is met first; hence, we have \$+\nu_3\$. For branch 4, we reach the negative terminal first; hence, \$-\nu_4\$. Thus, KVL yields
$$-\nu_1 + \nu_2 + \nu_3 - \nu_4 + \nu_5 = 0 \tag{2.20}$$
So now take example 2.5. Following this explanation, going clockwise, we would get
$$-\nu_0 + \nu_1 - \nu_2 = 0,$$
where, by Ohm's law, we have \$\nu_0 = 20\$, \$\nu_1 = 2I\$, and \$\nu_2 = 3I\$. Note that, as stated by the authors, the polarity of the terminals was used to determine the sign of the voltage; we then use Ohm's law to determine the voltages themselves. But, in the authors' work, they begin by determining the signs of the voltages, as I did, but then they seem to insert the signs again into their calculations using Ohm's law. Is this not double-counting the signs of the voltages? This seems to be in contradiction with their stated instruction, since they stated that the sign on each voltage is the polarity of the terminal encountered first as we travel around the loop. Ohm's law is just \$V = IR\$, and if we use \$V = IR\$ with the values given in figure 2.21, without adding any extra signs that are outside the scope of Ohm's law (which, it seems to me, is what the authors did), then we get \$\nu_0 = 20\$, \$\nu_1 = 2I\$, and \$\nu_2 = 3I\$. Therefore, by my work, we would get
$$-\nu_0 + \nu_1 - \nu_2 = -20 + 2I - 3I = 0 \ \Rightarrow I = -20 \ \text{A}$$
It seems to me that either the authors' claim that "the sign on each voltage is the polarity of the terminal encountered first as we travel around the loop" is incorrect or their work for example 2.5 is incorrect. Am I misunderstanding something? How can the authors' claim that "the sign on each voltage is the polarity of the terminal encountered first as we travel around the loop" make sense with their work in example 2.5? Are they not double-counting the signs of the voltages?
EDIT
I just noticed that this part of the textbook seems to contain an error:
Suppose we start with the voltage source and go clockwise around the loop as shown; then voltages would be \$-\nu_1\$, \$+\nu_2\$, \$+\nu_3\$, \$+\nu_4\$, and \$-\nu_5\$, in that order. For example, as we reach branch 3, the positive terminal is met first; hence, we have \$+\nu_3\$. For branch 4, we reach the negative terminal first; hence, \$-\nu_4\$.
The authors write \$+\nu_4\$ and \$-\nu_5\$, but, going clockwise, it should be \$-\nu_4\$ (as contradictorily stated afterwards) and \$-\nu_5\$, right?
AI: You are misreading what it's about. Imagine you have a battery of 9 volts connected to two series resistors of 5 Ω and 4 Ω. Clearly there will be an amp flowing (a side issue) but, of relevance, we can say this: -
$$\text{9 volts} = V(R1) + V(R2)$$
Now, if you rearrange that formula into this: -
$$\text{9 volts} - V(R1) - V(R2) = 0$$
You have to respect the terminals so, if going anticlockwise and starting at the battery, it has to be regarded as +9 volts but, the voltages on the two resistors have to be regarded as negative because we went anticlockwise and, in doing so, we encountered the most negative terminal of each resistor first.
If we went clockwise we would develop this: -
$$\text{-9 volts} + V(R1) + V(R2) = 0$$
And, that is exactly the same mathematically as when travelling round the loop anticlockwise.
If you happened to label the voltage across a particular resistor in a reverse direction, you would inevitably find that the resulting solution for that particular voltage was numerically negative. |
H: How does this offset and gain amplifier work
The circuit below is meant to scale and offset Vin to Vout:
In the actual application Vin is a battery voltage (4 to 5.5V ish) and Vref is a fixed regulated voltage derived from it (3.3V). The op-amp is supplied from the same voltage as Vref, and Vout goes to the input of an ADC. The idea is to make the use the full range of the ADC (approximately 0.3V to Vref-0.3V) cover the smaller range of Vin.
The question is: how should I read a circuit like this to interpret gain and offset?
I think I understand basic inverting and non-inverting op-amps and the four resistor differential amplifier like the one in this answer. I also think I understand the similar circuit in figure 2 in TI's application note Designing Gain and Offset in Thirty Seconds which I found in another answer.
The potential divider A and B is required to bring Vin within the supply range of the op-amp, and it looks to me like the potential divider RH and RG is defining the offset voltage which would be subtracted from the voltage labelled Vcm.
However, the way I understand op-amps (please improve this) is that assuming the output isn't saturated then the voltage on the two inputs is the same. Since no current flows into or out of the non-inverting input here, the voltage on both inputs is defined only by Vin and the values of A and B. Since no current flows into the ADC input, all the current driven or sunk by the op-amp output goes through RF, but then I am stumped.
If the voltage at the inverting input is the same as the non-inverting input, why do we need both RH and RG? Suppose potential divider A and B is set up so that the input voltages are around 2V, the current from RF will be sunk by RG and isn't RH is just wasting power? but then how is the offset defined?
Is the relationship between Vin and Vout a simple gain and offset or more complicated?
AI: You can convert VREF 0, RH and RG to their Thevenin equivalent circuit which is a voltage source, Vth in series with a single resistor Rth.
Then considering the simpler situation where RF/Rth is equal to B/A we can say that:-
VOUT = (VIN-Vth)(RF/Rth) = (VIN-Vth)(B/A)
The differencing amplifier is multiplying the difference between the inputs (VIN and Vth) by the gain which is equal to Rf/Rth or B/A. |
H: 7 segment display input inverted
I was going through the tutorial in https://www.101computing.net/bbc-microbit-counter-using-a-7-segment-display/ using a 7-segment display I got from an electronics shop about 10 years ago. Everything works except that the signals are inverted.
When I output 0, LEDs switch on and when I output 1, the LEDS switch off.
I'm just wondering whether I've got a wiring error somewhere or whether there are two types of 7-segment displays - ones where 1s switch on the display and ones where 0s switch on the display.
AI: The tutorial calls for a common-anode display. The common is connected to Vdd.
When you output a 0 the LED segment should turn on, and when you output a 1 it should turn off. So it is doing the expected thing. Image from here
With a common-cathode display, the common would typically be grounded, and a high input (with a series resistor) would cause the LED to turn on.
There are various reasons to prefer one type over the other, mostly to do with the relative strength of drivers used. Usually, I find common-anode is preferable. |
H: How does this oscillator work in radio transmitter?
I have a hard time understanding how the oscillator works in this circuit. The oscillator uses varicap diodes V1 to change the frequency of oscillation.
But this circuit is very different from a standard Colpitts oscillator which uses two capacitors and an inductor. In a standard Colpitts oscillator the gap between capacitors is grounded, while it's connected to resistor R8 here. Why?
I actually don't even understand what the purpose of C7 and C8 is when the tank circuit is already formed by V1 and L. And a standard Colpitts oscillator has a tank circuit connected to the collector to make a transistor produce a 180 ° phase shift, but here it's connected to the emitter, so there's no phase shift.
I don't understand where it does get enough phase shift to make it oscillate.
How to find the frequency of oscillation?
AI: I have a hard time understanding how the oscillator works in this
circuit. The oscillator uses varicap diodes V1 to change the frequency
of oscillation.
It's a bog-standard common-collector Colpitts oscillator: -
But this circuit is very different from a standard Colpitts oscillator
which uses two capacitors and an inductor.
No, it's a standard configuration of the common-collector Colpitts oscillator. It uses two capacitors and an inductor (C7, C8 and L) with V1 tweaking the net capacitance and producing frequency modulation.
In a standard Colpitts oscillator the gap between capacitors is
grounded, while it's connected to resistor R8 here. Why?
No, there are three standard Colpitts BJT oscillators and you just haven't come across the common-collector version. Do some research on Google. An example: -
Image of the three standard Colpitts oscillators taken from here.
I actually don't even understand what the purpose of C7 and C8 is when
the tank circuit is already formed by V1 and L
The tank isn't formed wholly that way. You need to do some research as to why it relies on C7 and C8 and, the varactor V1 modifies things to perform FM modulation.
And a standard Colpitts oscillator has a tank circuit connected to the
collector to make a transistor produce a 180 ° phase shift, but here
it's connected to the emitter, so there's no phase shift.
No, there are three standards and, it appears, that you have only been previously introduced to one of them. All three produce a 180° phase shift.
I don't understand where it does get enough phase shift to make it
oscillate.
Try this, for instance, with full derivation of oscillation frequency
Or this similar answer
Or this explanation.
How does this oscillator work in radio transmitter?
Study the theory behind the common-collector Colpitts oscillator first then, recognize that the voltage produced by the microphone will modulate the capacitance across the inductor (via the varicap diodes) and, from that, it's clear that this is a frequency modulator.
Q2 is just an RF amplifier. Please also note that it is likely to be illegal to use it.
Simulation using BC547 - aiming for around 100 MHz
It's oscillating at 100.6 MHz. |
H: Artificial grounds to remove static electricity on a metal frame?
I am a vex robotics student. Our team has an issue where ports on our robot core stop working due to static electricity buildup on the metal frame around the motors. Is it possible to make an artificial ground to suck in static electricity on the metal frame with a capacitor or battery? (We can't do a ground to a house or anything cause the robot is controlled remotely)
AI: You could use wire or a conductive paint such as Aquadag or window defroster repair paint to connect parts so that static is "grounded" from the wheel to the chassis. The problem is that the ground of the ports is not connected to the ground of the chassis, not that it needs to be connected to an "earth ground". |
H: Is 3.3 v necessary for basic functionality of any SATA drives ? How to check if a drive uses it?
Am I correct in understanding that no SATA hardrive needs 3.3V for "basic" (identification/read/write) operations?
Should a drive have 3.3V specs written on its front along with 5V and 12V if it uses 3.3V? (I don't recall seeing 3.3V specs on harddrives myself, but maybe my drives are not that modern)
TL;DR
I'm investigating glitches on my PC. Working hypothesis is failing old PSU. I'm trying different connections of power peripherals. I've connected one SATA harddrive with Molex-SATA adapter I see errors at Linux boot time. I'd like to rule out MOLEX factor.
Wiki SATA
3.3 V is supplied along with the traditional 5 V and 12 V supplies.
However, very few drives actually use it, so they may be powered from
a four-pin Molex connector with an adapter.
The new Power Disable feature (similar to the SAS Power Disable
feature) uses Pin 3 of the SATA power connector. Some legacy power
supplies that provide 3.3 V power on Pin 3 would force drives with
Power Disable feature to get stuck in a hard reset condition
preventing them from spinning up. The problem can usually be
eliminated by using a simple “Molex to SATA” power adaptor to supply
power to these drives.
Here is also about it: https://www.reddit.com/r/DataHoarder/comments/7fx0i0/wd_easystore_8tb_compendium/
The issue as the HGST document explains is that P3 (Pin 3) functionality was re-defined for SAS spec, and then later it was pushed into SATA Rev 3.3.
Q: When was this feature introduced on SAS HDDs?
A: With the introduction of 12G SAS, a new SAS standard, SAS-3, redefined P3 (Pin 3) from “3.3V Power” to “POWER DISABLE”, i.e. “Reset”. At that time, the STA (SCSI Trade Association) researched the marketplace and determined that there were no conflicting legacy concerns.
It was known that there could be legacy compatibility issues. It seems this re-defined P3 spec was pushed on manufacturers by
datacenter owners that wanted to save money from having a tech forced
to manually pull and reseat a specific drive (reset) under limited
cases of drive lockups.
AI: Some older drives that meet older sata specs may actually use 3.3V. Some or many may not need it.
Yes, if they need 3.3V, then they should list that on the label. Whether they do or not is up to the manufacturer. It's bad policy to require a voltage not listed but it happens.
Only way to tell if it needs it is to omit it and it fails, include it and it doesn't. Or check what revision of sata it conforms to, by the label or by an online search. |
H: Can \$\Gamma\$ remain complex while calculating return loss?
I'm working on adding .s1p touchstone export support to the xnec2c NEC2 antenna simulator for Linux. I would like the S11 dB values in the .s1p to have both real and imaginary values.
NEC2 calculates Gamma by breaking it into real-valued components \$Z_r\$ and \$Z_i\$. It then does a real (ie, not complex) calculation to obtain a real-valued Gamma:
\$\Gamma = \sqrt{
\frac{
(Z_r-Z_0)^2+Z_i^2
}{
(Z_r+Z_0)^2+Z_i^2
}
}\$
S11 is then calculated as a real value using Gamma above as:
\$S_{11}\ = 20 log_{10}(\Gamma)\$
My question: Is it correct to calculate a complex Gamma from the real values \$Z_r\$ and \$Z_i\$ by creating a complex number \$Z = (Z_r+Z_i {\bf i})\$ and then calcule Gamma as shown in the Wikipedia article about reflection coefficient?
\$\Gamma =
\frac{
Z-Z_0
}{
Z+Z_0
}
\$
I ran the numbers and I get the same result for the real S11 value, but I have no way to validate the imaginary value. Is this a mathematically correct way to do this? Is it the "right" way?
If this works then I can split \$Z\$ into its real and imaginary parts for writing to the .s1p file's S11 real and imaginary columns. Here is the actual C code that generates the real-valued gamma and s11 variables:
zrpro2 = impedance_data.zreal[idx] + calc_data.zo;
zrpro2 *= zrpro2;
zrmro2 = impedance_data.zreal[idx] - calc_data.zo;
zrmro2 *= zrmro2;
zimag2 = impedance_data.zimag[idx] * impedance_data.zimag[idx];
gamma = sqrt( (zrmro2 + zimag2) / (zrpro2 + zimag2) );
s11[idx] = 20*log10( gamma );
And here is my proposed change based on that:
double complex z_load = impedance_data.zreal[idx] + I*impedance_data.zimag[idx];
double complex cgamma = (z_load-Zo) / (z_load+Zo);
AI: I'll keep it short:
Yes, the computation of: $$\Gamma=\frac{Z-Z_0}{Z+Z_0}$$ can be properly composed in the way you suggest.
It's also the case that your first equation isn't correctly written, though in contrast to that your actual C code is written correctly to calculate the result. (Comment is no longer true as this has now been corrected in the question.)
You can readily derive the real-number magnitude calculation from the above complex rational (by applying the complex magnitude or absolute value to the rational) as: $$\mid\, \Gamma\! \mid=\sqrt{\frac{\left(Z_\mathcal{R}-Z_0\right)^2+Z_\mathcal{I}^2}{\left(Z_\mathcal{R}+Z_0\right)^2+Z_\mathcal{I}^2}}$$
Note that this isn't the same as you wrote in your question.
However, you did get the right computation in C.
If you need help figuring out how to apply the absolute magnitude using the complex conjugate, I'll expand on that. But I think you should easily manage that much on your own. |
H: Voltage terminology in plain english
The terminology I've seen to describe voltage is confusing. It's like there is no way to accurately state (in one or two words) that voltage is present. For example, in an open circuit, people often say that the entire supply voltage "appears" at the two open conductor ends. Does voltage "appear", does it "exist", does it "occur"? When two long wires are connected to the two battery terminals, does the voltage "propagate" down the wires? Does it "manifest"? Does it "appear"? I'd like to be able to use simple English to explain what is happening regarding the voltage.
AI: One or two words is not really enough, if you want to state 'that there is a voltage between these two nodes'.
That can be restated as 'if you connect a DMM between these two nodes, you'll get a reading', and 'if you take some charge from one node to the other, work will be done'. This second one is the most fundamental definition, if somewhat incomprehensible without the right background.
In casual conversation, we can describe a voltage as existing, occurring, appearing (either as having been there all the time, or appearing just now), and if you hit a thesaurus, I'm sure the list could be expanded several fold. It doesn't really matter what words are used to describe existence. 'Exists' is good.
I use 'node' rather than 'wire', as in electronics, a node is essentially a point, so by definition all connections to it will have the same voltage, or potential. A wire is an extended thing, and if a wave is passing along it ... When two long wires are connected to the two battery terminals, does the voltage "propagate" down the wires? (yes, at the speed of light) ... then it can have a different voltage at different points along it, until the waves have dissipated (wave energy radiated away, or absorbed by resistance) and the wire reaches steady state. If there's a load on the end of a pair of wires, then wire resistance will drop a little voltage along the wires due to the current flow, so people often simplify things by requiring an open circuit on the wires.
I'd like to be able to use simple English to explain what is happening regarding the voltage.
The simplicity of the English you can use depends on your audience, and which aspects you're trying to convey. I'd go for the DMM definition by default, as it's a real experiment people can do with batteries and wires, and worry about waves and charges only if people want to delve deeper. |
H: How Does an Adjustable Transistor Size CMOS Driver Work?
Background
The source-terminated reflected wave switching scheme is a familiar one. One just needs to add a source-series terminator, which added together with the driver's output impedance equals the line impedance.
I have, however, recently seen the following passage in Right the First Time Vol.1 [p.156] by Lee Ritchey and John Zasio:
There is no need for a separate series resistor if the driving voltage source impedance can be controlled to be equivalent
to the transmission line impedance. The drive transistor size can be adjusted so that it produces a half amplitude transition
into the transmission line. The impedance of the ON drive transistor acts as the termination. Figure 36.5 shows a half-series transmission line with a series terminated driver and load.
Questions
I'd like to know:
how this adjusting the drive transistor size is accomplished. I'm assuming the author means on-the-fly adjustment, and not manufacturing adjustment.
I've seen ASICS on which you can select a drive strength. I'd presume this is the same thing, or isn't it? Here's an excerpt from the datasheet of such an ASIC:
AI: The approach to do this is alluded to in the datasheet snippet you linked, which mentions "fingers", or separate parallel gates in a wide MOSFET that forms the output driver. These fingers connect to parallel sources and drains, so when all of the gates turn on together, the arrangement acts as a transistor whose effective width is the sum of the constituent parts.
I don't have an image of an output driver that I'm allowed to share, but the diagram below shows how this kind of layout can be done (using low-voltage core transistors in a 180 nm process from TSMC). I'd imagine that output driver transistors (as opposed to fast, small core transistors) would be longer, wider, and perhaps have additional protection to protect against latchup and other damage induced by the outside world.
Note that each gate is separate (although I connected them to the same net), sources/drains are shared to save space, and everything's in the same diffusion (with dummies) for better matching. This particular design also shows a cascoded transistor, which might be desired in some cases (e.g. if the actual output drive were current-controlled by running the output transistor segments as if they were segments of a current mirror).
By only driving a selected subset of the gates, a desired width (and hence drive strength) can be achieved. |
H: Why isn't my PN2222A Transistor Working as Expected?
At the moment I am trying to learn how transistors work, so I set up a simple circuit to test my knowledge using a PN2222A transistor.
3 V is from a battery pack containing two AA batteries. 6.6 V is from a somewhat depleted 9 V battery (8.3 V open circuit) that is experiencing a bit of voltage sag when connected to the rest of the circuit.
Here is what I expect:
The base current should be Ib = (3 V - 0.6 V)/220Ω = 0.0109 A. I have confirmed this in practice with a multimeter by measuring 2.35 V across the 220 Ω resistor.
As per the datasheet, the DC current gain is at least 35, so the transistor should pass Ic,allow = 35 * 0.0109 A = 0.382 A. The battery is able to supply 6.6 V / 50 Ω = 0.132 A. This is less than Ic,allow so no problem. In practice, however, I measure the voltage across the 50 Ω resistor to be 1.5 V, so Ic = 1.5 V / 50 Ω = 0.03 A.
So, I appear to be getting a DC current gain of hFE = 0.03 A / 0.0109 A = 2.8 which makes no sense.
Any ideas?
AI: Simple fix:
After rebuilding the circuit, the transistor behaved as expected. Most likely I had the collector/emitter reversed. Since the transistor was technically "working" I didn't think to check this, but now I know that it will still function backwards at low gain.
Thanks Tony Stewart EE75, jonk, and gbarry for the explanation. |
H: Designing IGBT driver: question about datasheet specs
Summary
I'm trying to design a driver for a high voltage, IGBT driver, using an optocoupler for isolation, and have a question about whether this design is compatible with some of the numbers in the datasheet, and whether this is a viable approach.
Background
For reference, the full datasheets are here (https://www.mouser.com/datasheet/2/427/VISH_S_A0003099403_1-2568458.pdf https://www.galco.com/techdoc/fuji/2mbi300ta-060_dat.pdf), although I will try to include all relevant information in this question.
Here is a simplified schematic of my design:
For this question, I'm focused on the high side driver. This is using a bootstrapped configuration, with the capacitor and diode to ensure a positive voltage from the IGBT's gate to emitter. The optocoupler lists a operating voltage from pin 8 to 5 of 15v:
Questions
I'm assuming while the high side of this configuration is on, the voltage coming out of the capacitor is going to sag due to leakage. I'm concerned there may not be enough margin to keep the optocoupler voltage high enough, but I'm not sure how much margin I need or how I should compute that.
When turning off the high side IGBT, is it sufficient to use the lower optocoupler transistor to connect G1 to E1 to shut it off, or should the gate be pulled to a negative voltage relative to E1, like a depletion mode MOSFET? I ask because I've seen other designs that use a negative power supply for this node, but I don't see anything in the IGBT datasheet that seems to indicate that.
Is there anything else I'm missing?
AI: Your IGBT does not require a negative voltage to turn off. The data sheet specifications for turning off are made with zero volts from gate to emitter.
You can use negative Vge to slightly improve turn off time.
For the sizing of the power supply capacitor, look at the specification for the gate emitter capacitance. The gate capacitance is charged up on each cycle. IF you size your power supply capacitance at 10 times the gate capacitance, you can see that your power supply capacitor voltage will be depleted by 1/10 of it's original charge.
There is 400 nA leakage in the G-E circuit. So, if you are using very low frequency repetition rate, your power supply volts could sag.
For your # 3 item: make sure that you leave a small amount of time after turning off Q1 before turning on Q2 to prevent shoot through (both transistors on).
Make sure your diode is fast or ultra fast for reverse recovery losses. |
H: Way of calculating Gain of Yagi-uda antenna at a particular location
Suppose that I have a 9-element Yagi-uda Antenna. My goal is to calculate the gain function of the antenna as function of zenith and azimuth angles, i.e. \$G\left(\theta, \psi\right)\$. As far as I read there is no close formula that I can use.
So, what is the way to calculate the \$G\left(\theta, \psi\right)\$? Is it through calibration, i.e. go to the field with a drone and measure the received signal strength and then do what with that?
Or I think it is equivalent to know how to calculate the radiation pattern for each angle.
AI: What you are referring to is antenna characterization.
If you are a big company with lots of money you can go to some specialized laboratory with an anechoic chamber. They will then study the far field pattern of said antenna.
If you are some person working in you garage your best chance may be to modelize your antenna in a simulator. Run it to obtain again the far field pattern.
With the far field in your possession, you could now proceed to find/extrapolate a corresponding function. Which will give you the corresponding gain for a position.
Note:
A Yagi antenna can be seen has made from a lot of discrete antenna (9 in your case + the reflector). Each antenna effect is summed to obtain the directivity. This give a far field pattern with lots of lobes. These lobes depend on a lot of factor, making a direct calculus really complicated and repetitive. (A job for a computer)
Note 2:
If you are looking for a simulator, I can recommend you ANSYS HFSS, and 4NEC2. Respectively for the two previous cases. |
H: Are the following boolean expressions correct according to De Morgan's laws?
Are the below boolean expressions correct according to De Morgan's laws?
I am trying to realise a three input NOR gate using a four input NOR gate, but I suspect I did a wrong transform.
\$\:\:\:y=\overline{a+b+c+d}=\overline{a+b+c}\:*\:\:\bar{d}=\:\:...\$
\$\:\:\:y=\overline{a}\:*\:\:\bar{b}=\overline{a}\:*\:\:\overline{b+b}=\overline{a+(b+b)}=\overline{a+b+b}=\:\:...\$
AI: is correct as written. "If you break/unbreak the over-bar, you change the sign". If you mentally assign a variable (call it u) for "a+b+c", then you are equating ~(u+d) with (~u)&(~d) which is correct and is clearly breaking-the-overbar-while-changing-the-sign. So 1) is good.
is also correct, although you took a strange detour. For any x you can replace it with (x + x) and similarly with (x & x). So, ~a * ~b becomes immediately ~(a+b) which is of course ~(a+b+b) and similarly ~(a+a+a+a+a+b+b+(aa)+(bb)+(bb)+(aa)) and so on. |
H: Identify zeroes of circuit by inspection
In a circuit, we can approximate the poles of the transfer function by calculating the AC Resistance and Capacitance at every node. For every node we get a pole so a change of slope in the Bode plot by -20db/dec. Is there a similar way of approximating the zeroes of the transfer function, so we get a clearer picture of the circuits frequency response?
AI: Inspecting a circuit to determine if there are zeroes is part of the fast analytical circuits techniques or FACTs as described in my book on the subject.
The first thing is to place each energy-storing element in its high-frequency state and check if the stimulus can propagate through the circuit to form a response on the output. See the circuit below:
If you place \$L_1\$ in its high-frequency state (open-circuit it) while \$C_2\$ is kept in its dc state (open-circuited), you see that if you apply a stimulus at \$V_{in}\$ then you can follow the signal which through \$R_2\$ finds its way to the output node: you have response if you open-circuit \$L_1\$. It means that this element contributes a zero in the transfer function. Now, place \$C_2\$ i its high-frequency state (short-circuit it) and check if the stimulus still makes it to the output while \$L_1\$ is back in its dc state (a short circuit). Yes, you have a response then a second zero.
Now, where are these zeroes located? To find where they are, you have to find the impedance condition in the circuit where, for a certain stimulus frequency, you null the response. In other words, for a given frequency - the frequency of the zero you want - , the stimulus is blocked somewhere in the circuit. Either a series impedance becomes an infinite value or a branch is shunted to ground. In the below circuit, when \$Z_1\$ approaches infinity, the stimulus is lost and when \$Z_2\$ becomes a transformed short, there is no current in \$R_4\$ and the output is nulled. Both of these conditions reveal where the zeroes are located:
Once you have solved simple equations - in your mind with some habit - the numerator of the transfer functions comes up immediately in a factored form. When you acquire the skill to run these manipulations in your mind, then the determination of the transfer function becomes lightning-fast - comme l'éclair : ) |
H: What's the function of a feedback coil?
I have seen many different high voltage circuits that require high voltage. A few of these circuits use transformers, however I only ever notice a primary and secondary coil. When taking apart a transformer or seeing one online, I almost always see a feedback coil, and I have no idea what they do, I can't find any questions on this stack exchange about it.
These are all examples of a feedback coil, is there any general purpose for it, what does it do?
AI: Your transformer is out of a microwave oven .The winding that you say is a feedback winding is a low voltage winding that powers the magnetron filament .In your circuit the feedback coil provides positive feedback to sustain oscillation. |
H: Why do car blinkers seem to synchronize and then diverse from each other?
When I am on the road, the blinkers of other cars seem to sync together for a few clicks and then they diverse again.
Is this just me seeing it wrong - so on fact they never sync - or is there some reason behind it's timing?
AI: Figure 1. Beating of two frequencies. (Illustration by Transistor.)
Any two systems operating at differing frequencies will "beat" at the difference between the two frequencies. So if one turn signal / indicator / blinker is running at 60 flashes per minute and another at 62 then they will come into phase twice per minute.
Links:
Beat (acoustics). |
H: Choose the cutoff frequency from the sampling rate
I want to use a low pass filter for the input of my ADC, and I would like to choose the most appropriate cut-off frequency based on the sampling rate of the ADC, which is 40 SPS. Is there a simple mathematical relationship or practical rule to evaluate the most appropriate fcut? For now, I'm using 20Hz as a temporary value, which is already fast enough for my purpose.
Thank you.
AI: The Nyquist sampling theory states that your sample rate needs to be at least 2 times the highest frequency component of your input signal to prevent aliasing.
Aliasing is a phenomenon where higher frequency components “fold” back into your signal and cause interference. It’s not very desirable. If your cutoff frequency is 1/2 your sample rate, that means signals at 20 Hz will be attenuated by 3dB, and the rolloff rate beyond that depends on the order of the filter you use. This means that you will have some aliasing, but the aliasing caused by higher frequencies will be weaker than if you had no filter.
How much aliasing you can tolerate depends on the application, but it’s good practice to make the cutoff frequency as low as you can tolerate, and the filter order as high as you can tolerate. This will be the best approach to preventing aliasing in your digital signal and filtering out high frequency signals. In general, I typically try to make the cutoff frequency of my anti-aliasing filter to be 1/10th of the sample rate, but this isn’t always necessary, and it’s not always good enough either. |
H: Managing high power battery pack voltages
I have a few upcoming projects that will require some higher power battery applications where voltage swing needs to be limited. Both will be powering electric motors.
The first on will be ~1.3-1.5 kW, 24 V motor (7s21700 battery). The second will be a 10 kW, 72 V (20s21700 battery) motor. So the 4.2-2.5 V swing per cell is going to put me outside my acceptable voltage range on both projects.
I could limit the charge/discharge voltages but that would just suck because I don’t want to lose that storage. So the obvious theoretical answer is a buck/boost converter.
Practically speaking though I have never designed a 150 A buck/boost converter. I played around with some sims without much hope and was met with a rather unreasonable set of components (do they exist? Sure, but I would like to not have to sell a kidney to build this thing).
I have searched around for a few night but I haven’t found anything of real value. So thats the background.
Questions:
A: Am I missing some pretty obvious solution here?
B: If not, is a DC/DC converter of that size feasible (space for cooling isn’t a big issue)?
C: If it is feasible, any pointers? It's definitely going to be trickier than a little 2-3 A one.
One last thing: the reason I need the voltage to be pretty constant is because these will be used in marine applications where variation in power output directly affects the handling.
AI: You set up your design so you do not need to regulate high power items. For example, motors are not picky about power quality so designing a full blown regulator is a huge waste of money, time, effort, and efficiency.
So if you can run the motor directly off the power source you do that.
If you need more control over the motor then you use a motor driver. So if you want a motor to run at constant speed even though battery voltages vary, you use a motor driver to control the speed.
If you look into motor driver designs, you will see they are essentially specialized strip down regulators. They do not provide a nice clean, high quality output as a regulator but the motor doesn't need that. Because the motor driver does not need to burdened with all the requirements of a regulator, it can be simpler, more efficient, and handle higher power. One other concession is motor drivers 99.99% of the time only ever step down voltage from a DC source. This increases simplicity and efficiency.
Do not boost voltage for motors. Do everything you can to set things up so you don't have to. Every bit of effort you invest into that at the start will more than pay off for itself in the future. Use slightly higher voltage batteries and step down if need be. Or always run at below 100% duty with enough headroom so you can increase the duty cycle to maintain performance as the battery voltage drops.
In addition, motor drivers are not regulators. They are used to control and commutate (if necessary) the motor. They are not designed to let you run a motor off an inappropriately high supply. This is due to the fact their outputs are not as clean as a regulator. The supply voltage on the other side of the motor driver is still very visible to the motor, unlike with a regulator. So don't use run a 24V motor off a 48V battery by perpetually running the driver at at 50% duty cycle.
Speaking of setting up your design to find your way out of complexity: For higher power levels, you would try and choose higher voltage motors so that the currents you need to deal with are less. So the first thing you should try and do is find higher voltage motors to reduce the currents.
Your hands might be tied in a few odd cases, but try really really hard at the start to set things up so you don't have all that extra complexity later on. You will hate yourself if you don't. |
H: MPU6050 losing orientation
I've been playing around with an MPU6050 (GY-521 board) with a Nucleo L476RG.
I think I'm reading the gyroscope correctly, but it seems like the values are only changing when the sensor is moving, and when it stops, the orientation goes back to 0, 0, 0.
Is this normal? I though the sensor would keep track of the orientation with respect to its initial reference frame. This is how I'm initializing and reading the sensor data:
void mpu6050::init(I2C_HandleTypeDef& hi2c) {
uint8_t check, data = 0;
HAL_I2C_Mem_Read(&hi2c, MPU6050_ADDR, WHO_AM_I_REG, 1, &check, 1, 1000);
// If the device is present
if (check == 104) {
// Write 0x0 to power management register to wake up the sensor
HAL_I2C_Mem_Write(&hi2c, MPU6050_ADDR, PWR_MGMT_1_REG, 1, &data, 1, 1000);
HAL_Delay(100);
// Disable FSYNC and set accelerometer and gyro bandwidth to 44 and 42 Hz, respectively
// data = 0x03;
// HAL_I2C_Mem_Write(&hi2c, MPU6050_ADDR, CONFIG_REG, 1, &data, 1, 1000);
// Set data output rate for 1khz, formula is: sample rate = gyro output rate / (1 + reg val)
data = 0x07;
HAL_I2C_Mem_Write(&hi2c, MPU6050_ADDR, SMPLRT_DIV_REG, 1, &data, 1, 1000);
// Set gyroscope full scale range
// Range selects FS_SEL and AFS_SEL are 0 - 3, so 2-bit values are left-shifted into positions 4:3
HAL_I2C_Mem_Read(&hi2c, MPU6050_ADDR, GYRO_CONFIG_REG, 1, &check, 1, 1000);
uint8_t config = check & ~0xE0;
HAL_I2C_Mem_Write(&hi2c, MPU6050_ADDR, GYRO_CONFIG_REG, 1, &config, 1, 1000); // Clear self-test bits [7:5]
config = check & ~0x18;
HAL_I2C_Mem_Write(&hi2c, MPU6050_ADDR, GYRO_CONFIG_REG, 1, &config, 1, 1000); // Clear AFS bits [4:3]
data = 0x0;
HAL_I2C_Mem_Write(&hi2c, MPU6050_ADDR, GYRO_CONFIG_REG, 1, &data, 1, 1000);
// Set accelerometer configuration
HAL_I2C_Mem_Read(&hi2c, MPU6050_ADDR, ACCEL_CONFIG_REG, 1, &check, 1, 1000);
config = check & ~0xE0;
HAL_I2C_Mem_Write(&hi2c, MPU6050_ADDR, ACCEL_CONFIG_REG, 1, &config, 1, 1000); // Clear self-test bits [7:5]
config = check & ~0x18;
HAL_I2C_Mem_Write(&hi2c, MPU6050_ADDR, ACCEL_CONFIG_REG, 1, &config, 1, 1000); // Clear AFS bits [4:3]
data = 0x0;
HAL_I2C_Mem_Write(&hi2c, MPU6050_ADDR, ACCEL_CONFIG_REG, 1, &data, 1, 1000);
}
}
// Read accelerometer registers
// Each axis for accel readings is split between high and low registers
// There's a total of 6 bytes of data (1 for each register) to read
void mpu6050::read_accel(I2C_HandleTypeDef& hi2c, float& Ax, float& Ay, float& Az) {
uint8_t accel_data[6];
// Get High register reading, shift 8 bits and OR with low register reading
HAL_I2C_Mem_Read(&hi2c, MPU6050_ADDR, ACCEL_XOUT_H_REG, 1, accel_data, 6, 1000);
HAL_Delay(100);
int16_t accel_X_raw = (int16_t)((accel_data[0] << 8) | accel_data[1]);
int16_t accel_Y_raw = (int16_t)((accel_data[2] << 8) | accel_data[3]);
int16_t accel_Z_raw = (int16_t)((accel_data[4] << 8) | accel_data[5]);
// convert raw values to g's
Ax = accel_X_raw / 16384.0;
Ay = accel_Y_raw / 16384.0;
Az = accel_Z_raw / 16384.0;
}
// Read gyroscope registers
// Each axis for gyro readings is split between high and low registers
// There's a total of 6 bytes of data (1 for each register) to read
void mpu6050::read_gyro(I2C_HandleTypeDef& hi2c, float& Gx, float& Gy, float& Gz) {
uint8_t gyro_data[6];
// Get High register reading, shift 8 bits and OR with low reading
HAL_I2C_Mem_Read(&hi2c, MPU6050_ADDR, GYRO_XOUT_H_REG, 1, gyro_data, 6, 1000);
HAL_Delay(100);
int16_t gyro_X_raw = (int16_t)((gyro_data[0] << 8) | gyro_data[1]);
int16_t gyro_Y_raw = (int16_t)((gyro_data[2] << 8) | gyro_data[3]);
int16_t gyro_Z_raw = (int16_t)((gyro_data[4] << 8) | gyro_data[5]);
// convert raw values to deg/s
Gx = gyro_X_raw / 131.0;
Gy = gyro_Y_raw / 131.0;
Gz = gyro_Z_raw / 131.0;
}
With the sensor on a bread board on my table, if I rotate it 90° clockwise only and then leave it, this is what the output looks like:
Should the Gz value not stay at -90°?
AI: (MEMS) gyroscopes measure rate of change, not angles or orientation. A gyroscope at rest has a zero rate of change, and will show zeros.
You need to integrate over time to get a rotation angle. Better still, combine the gyroscope data with the accelerometer data to get the orientation using a complementary filter, a Kalman filter, or an other algorithm.
The MPU6050 comes with something the manufacturer calls MotionFusion, which (I assume) can do the sensor fusion calculations for you. |
H: Deriving headroom for the 34063
I've hit a design dead-end because, after running the numbers for an SP34063A-driven SMPS, it seems it doesn't have enough headroom. This was not described directly in either the OnSemi or TI application notes I worked through, but instead a consequence of timing constraints.
I had intended to make a standard buck configuration with
Vin = 12V
Vout = 10V
Vf ~= 500 mV for a DSS12UTR at 1A peak
Vsat ~ 1.0 < 1.3V in Darlington mode
5.2 < timing charge ratio ~ 6.5 < 7.5
The intended topology:
Based on the application note's description of
I have
$$
\frac {t_{on}} {t_{off}} >
\frac {V_o + V_f} {V_i - V_{sat (\min)} - V_o }
$$
$$
\frac {t_{on}} {t_{off}} > 10
$$
On the other end, the application note says
which just evaluates to
$$
\frac {t_{on}} {t_{off}} <
\frac {I_{charge}} {I_{discharge}} (\min)
$$
$$
\frac {t_{on}} {t_{off}} < 5.2
$$
For the original design figures, these inequalities are disjoint so it's non-implementable.
This suggests that I either need to decrease Vo below 9.187 V, or increase Vi above 12.969 V, neither of which I can do in circuit; so I'd have to go with a different SMPS, maybe SEPIC but more likely LDO at this point.
Is this analysis correct?
AI: This suggests that I either need to decrease Vo below 9.187 V, or
increase Vi above 12.969 V, neither of which I can do in circuit; so
I'd have to go with a different SMPS, maybe SEPIC but more likely LDO
at this point.
Is this analysis correct?
It looks about right to me (or at least the conclusion is correct).
In Emitter Follower configuration the typical saturation voltage is ~1.4 V, leaving only ~0.6 V of theoretical headroom when going from 12 V to 10 V. But that would require an on/off ratio of >17:1, which this device cannot do.
More modern switching regulator ICs use FETs for lower voltage drop, and some have synchronous rectification which eliminates flyback diode voltage drop. Many of these can work with an input-output differential of less than 1 V.
If your average operating current is low and the input voltage doesn't go much above 12 V then an LDO regulator might be a good alternative. It will get a little hotter and may need a heat sink, but efficiency should still be acceptable for most purposes, and it could have 'quieter' output (less ripple and noise).
SEPIC is required if the input-output voltage differential may dip below the dropout voltage of a buck or linear regulator. |
H: Correct way to attach a power cable to this kind of female plug?
I am trying to figure out how to connect AWG16 power cables to the plug shown in the picture. The plug will be a power source (220V 10A) in a plastic enclosure.
Can I just insert the cables into the plug's "rings", twist them and isolate them with an insulation tape? or there is a better approach?
Thank you.
AI: The wires should be soldered to the terminals on the socket. I would also add heat-shrink tubing over the connections as insulation.
Just passing the wires through the holes and twisting and taping them will not make a reliable connection. |
H: Analog mux with active low enable.I/P and O/P state when enable is High
I am using this mux (74LV4051D,118)from Nxperia for one of my applications.The functional table is given below.
When the Enable is High S0, S1, S2 are don't care, and the switch is off.
May I know when Enable is high,can I assume both I/P (S0-S2) and O/P(Z) are at high impedance state.
AI: May I know when Enable is high, can I assume both I/P (S0-S2) and
O/P(Z) are at high impedance state.
Focus on the last line of the table in your question: -
A switch being off will mean high impedance. Inputs S0 to S2 will remain high impedance (because they are inputs) irrespective of the state of the enable input. |
H: How to interpret internal_ram data section in NXP
In .lcf (linker configuration file) in my project, in SRAM memory there is an internal_ram section:
And in my case this internal_ram section is overlapping .bss, heap, and stack sections after compilation.
Because of that, I wonder what is being stored there if stack and heap variables have their own sections?
AI: In the linker script you have posted, internal_ram does not overlap into heap nor stack.
If the compiled program does, that means that you have filled the RAM with static allocations and that you are now overwriting the heap and stack areas. Doing so will cause data corruption and eventually program malfunction.
Some compilers warns about this, but not all.
You must use less RAM (maybe you can change some memory allocations to const, i.e. move to flash?), or change the size of heap/stack in order to avoid this. Or use a device with more RAM. |
H: Operating region for transistor in capacitance multiplier
I want to understand what is the desired operating region for a transistor in a capacitance multiplier circuit being used to remove power supply ripple.
Consider the circuit in the attached image. From what I understand, depending on R1 and R2, for a given signal with some ripple, the base voltage will either be low, causing the base-collector junction to be reverse biased, and the transistor will be in the active region, or the base voltage will be higher, causing the collector-base voltage to be lower, and the transistor will be in saturation. Is this correct?
Which of these is a more desirable mode of operation for the transistor? My understanding is that we don't want the transistor to be in the active region, because then if the load draws more current, there will be a proportional rise in base current and a drop in the base, hence output, voltage. On the other hand, in the saturation region, a change in output current will not lead to much of a change in base current, hence no change in base or output voltage. Is my understanding correct?
If my understanding is correct, we should bias the base so that it is very close to V+, in which case, should we not just omit R2?
AI: It's an emitter follower circuit and this means that the emitter voltage follows the base voltage. That's the simple way of putting it. In fact the emitter voltage must be about 0.5 volts to 1 volt lower than the base voltage in order force sufficient current into the base. This is because the base-emitter region is equivalent to a forward biased diode hence, we say that the emitter "follows" the base but, maybe, 0.7 volts lower (in simple terms).
So, we have to accept that fact first: the emitter is around 0.7 volts lower than the base voltage and remains roughly 0.7 volts lower than the base voltage irrespective of the load current.
But, we don't want ripple on the collector to cause this type of voltage regulator to "drop-out". Yes, it's a type of voltage regulator and yes, it can suffer from "drop-out" should the ripple on the collector be too big. To avoid this we make sure that the potential divider formed by R1 and R2 lowers the base voltage by an amount sufficient to ensure that the base voltage is always lower than the lowest "valley" voltage on the collector when there is ripple present.
We also ensure that the values of R1 and R2 are low enough so that any extra current taken into the base (due to emitter load variations) do not significantly cause the base voltage to droop too low. A rule of thumb here would be to choose R1 and R2 values that are about ten times the resistance of the lowest load resistor value on the emitter. So, if the emitter load might be 50 Ω, we would choose R1 and R2 to offer an equivalent resistance to the base of no more than 500 Ω.
So, the transistor will be in its active region
But, as always, there will be compromises and, under extreme values of ripple voltage on the collector, it may just start to hit the saturation region. This is down to how much ripple you can tolerate and for how long. There is no general rule here; it's entirely dependent on what the voltage on the emitter needs to be to suit the requirements of what is connected to the emitter.
Which of these is a more desirable mode of operation for the
transistor?
Generally, it's desirable for the transistor to operate in its active region.
If my understanding is correct, we should bias the base so that it is
very close to V+, in which case should we not just omit R2?
No, that wouldn't be very good because then you are relying on base current (with zero current amplification in the BJT) for supplying load current. Generally you want the average voltage on the base to be a volt or so below the valley voltage on the collector when ripple is present.
Footnote - in my experience, it's better to use more capacitance on the power feed line than expect miracles from these types of circuits. |
H: Why do we need to connect the load before NPN transistor
I am trying to use transistor as switch and getting confused with the workings.
For a NPN transistor, Collector needs to be connected to +ve and emmiter to -ve.
If we look at the schematics below, in both the diargrams, I am connecting the collector to + and emitter to the - .
simulate this circuit – Schematic created using CircuitLab
simulate this circuit
Now, to provide a signal to the base,when I connect base to +ve terminal of bread board, it works for scenario , but not for scenario 2 (diagram on right).
AI: simulate this circuit – Schematic created using CircuitLab
Figure 1. (a) The NPN circuit redrawn. (b) The PNP circuit redrawn.
In (a) the low-side NPN is driven hard and is fully saturated. As a result there is a very low voltage drop across it leaving most of the voltage available to the load.
In (b) the high-side NPN is working in voltage follower mode which means the emitter tracks the base voltage with about 0.7 V drop due to the base-emitter junction. There is only 8.23 V available to the load.
For a 9 V, low-current application it works OK. If you were running lower voltage then the loss in available voltage may become a problem. If you're running a high current load then you will find it difficult to drive the PNP base hard enough without additional loss in base voltage. In addition, don't forget that you'll generally be driving the base from another transistor so there will be further voltage loss in that.
Note also that the power dissipated in the transistors will differ in proportion to the voltage across them. The low-side NPN is saturated so will dissipate little power. The high-side is not and will run hotter.
Low-side NPN switching is reliable, efficient, solves level shifting from the driving voltage to the driven voltage and is very flexible. |
H: Can a system get immediately to the sinusoidal steady state?
Suppose we have a theoretical LTI causal system with zero initial conditions and we apply a sinusoidal input at t=0. If the system is initially at rest, will the output be equal to H(ω)cos(ωt+Arg(H(w))) for every t>0 or t has to tend to infinity to get that output? Given that the output is the sum of the ZS and the ZI response, we should expect it to happen immediately, however I am not sure that is indeed correct. In fact I think that the eigenfunction property for LTI systems holds for infinite time after the sinusoidal input has been applied to the system. Could someone clarify that one for me? Thanks!
AI: The system output will be the superposition/linear addition of two solutions, the steady state one which occurs from t=0 to infinity, and the transient one which also starts at t=0, but dies out to infinity.
In order to see only the steady state output, the transient solution has to be zero.
If we take our system as a parallel RL, then zero initial conditions means zero current in the L. If we apply a cosine voltage, then the initial transient is zero, and the system settles straight into its steady state. If we apply a sine voltage, then the initial transient dies out with an L/R time constant. This is why 'zero voltage switching' is the worst possible way to apply AC power to a transformer. |
H: Does the effective reluctance of an air gap between two windings increase from circulating air?
If I have an inductor next to another copper coil (I don't exactly know the lingo for a coil receiving power from an inductor), and there is a significant but not large air gap between the two coils, will the reluctance change if more air is passing through the air gap? What I mean is that I would like to change the reluctance of the air gap by pumping through a fast stream of air through the air gap. Will this increase the reluctance of the air gap?
The application is a DC generator that can change the amount of power that is transferred between the rotating of a shaft by a human to a lipo. I would like a mode where the shaft can spin almost freely when circulating air is being pumped (in the case that the answer to my question is a yes), and a mode where the shaft is very hard to spin due to the horsepower of the generator. Thank you.
AI: The way to modify the airgap reluctance is to change its width, either by squeezing the pole pieces together (or stretching them apart), or inserting some ferromagnetic material. Decreasing the gap will reduce reluctance, increasing it will increase reluctance.
Indeed if you attempt to measure the changes in permeability of the air itself (e.g. using Bernoulli per another answer) you will need to consider the mechanical rigidity of the core, or the lowered pressure in the gap can pull the poles together enough to affect the very delicate measurement you would need.
More practically you can partially insert or withdraw a ferrous metal foil, or tapered wedge, or a blob of ferrofluid (ferrous particles suspended in oil) and control its position with your stream of air. |
H: Accuracy of analog multimeters
What accuracy should I expect from an analog multimeter that cost 50$ when measuring resistance?
It's measuring 1.5 kilohm correctly, when measuring a 10 ohm resistor it's about 30% off. I tested it against my digital multimeter. Return it as "broken" or is this what I should expect in this price range?
Voltcraft VC-2030
https://asset.conrad.com/media10/add/160267/c1/-/gl/001009621ML03/instrukcja-obslugi-1009621-multimetr-analogowy-voltcraft-vc-2030a-cat-iii-500-v.pdf
AI: The problem probably isn't the inherent accuracy of the meter. One of the other answers has covered that - the accuracy should be in the range of a few percent.
The more likely cause for really wrong readings (30 percent off is really messed up) is improper use.
Your meter has two things you need to adjust so that you get accurate readings on the ohms scale:
Null adjust the meter movement.
Zero adjust the ohms function.
The manual tells you where they are, but doesn't go into enough detail about them.
Number 3 is the meter movement null adjustment.
Unplug the leads, and adjust the null adjust so that the needle is on the 0 mark for volts and current (left side of the scale.)
Now connect the leads and switch to ohms mode.
Short the leads together and adjust number 6 so that the needle is on 0 ohms (right side of the scale.)
Now measure your 10 ohm resistor. The result should be much better.
Number 6 appears to be the red ring around the function selector knob.
The manual shows it in gray, so it is hard to see. The photo is a (little) bit clearer. You can see that the red ring is separate from the knob and the markings around it.
Remember to use the mirror.
Move your head back and forth until the needle covers its own reflection in the mirrored part of the scale. This makes sure that you are correctly reading the value under the needle rather than off to one side. |
H: Why must VOH > VIH and VOL < VIL for a combinational device?
I understand why VOH > VIH and VOL < VIL for a sender/receiver relationship between component A and B. In order for the receiver (component B) to be compatible with the sender (Component A), if VOH of B < VIH of A, then an input voltage between VOH and VIH cannot be interpreted by A.
However, I do not understand why VOH > VIH and VOL < VIL for the transfer voltage characteristic of a buffer (A single component), according to this website (https://computationstructures.org/notes/digitalabstraction/notes.html, under section 5.5 and 5.6). It states that
Note the dimensions of the rectangular gap between the shaded regions: its width is Vih−Vil, and its height is Voh−Vol. The height is necessarily greater than the width, since the height includes our noise margins Vil−Vol and Voh−Vih that are excluded by the width.
From my understanding, the transfer voltage curve just plots Vout vs Vin of a buffer. Why can't I just define my buffer to have V1OH < V1IH and V1OL > V1IL? Then any other components that wants to connect to my buffer needs to have V1OH > V2IH and V1OL < V2IL
I also referred to similar questions but I still cannot understand what is happening here:
Thresholds in Static discipline
Why VOH > VIH and VOL < VIL?
I am a non-ECE student that is self-studying the subject, so forgive me if I made any conceptual errors.
AI: When designing a digital circuit you need a definition what voltage levels represent the HIGH vs LOW state, and every output must provide voltages that conform to that definition.
For a single line, the input receiving the signal must clearly understand the output voltage level:
The input understands any voltage greater than VIH as HIGH, so we have the requirement that the output's HIGH must be produced as a voltage VOH greater then VIH, otherwise understanding HIGH gets unreliable.
The input understands any voltage less than VIL as LOW, so we have the requirement that the output's LOW must be produced as a voltage VOL below VIL, otherwise understanding LOW gets unreliable.
Whenever the output produces a voltage between VIL and VIH, the input doesn't know how to interpret that, and the results are unpredictable.
Inputs typically allow a limited time span for the transition between valid LOW and HIGH voltages. If the transition is too slow, bad things like oscillation might happen.
When designing a complex circuit, you don't want to examine the data sheets for each and every input and output, you assume that they all obey common "family" conventions. So, while technically the buffer's VIL and VIH are irrelevant for its output VOL and VOH (unless you connect the output back to the input of the same chip), you can see them as representative for all logic gates on your board.
Most of the time, digital chips are designed in a way that makes them compatible with a broad range of chip families (as long as you don't mix supply voltages like 3.3V and 5V). But if you want to be super-safe, check the output specifications of every single signal line against the input requirements of the receiving chips. |
H: LM358P doesnt respond to inputs
I am currently building a Li-ion cell capacity tester. The circuit has two parts, one that charges the cell, and one that discharges it, but I have removed the charging components to make the circuit easier to read (I can add them if needed).
simulate this circuit – Schematic created using CircuitLab
The transistor is there to stop the discharging but when I tested I just pulled it to ground. The 12 V rail comes from a PC PSU. The 0.1 V at the non-inverting input comes from a voltage divider. Datasheets: op-amp, MOSFET, transistor.
So here's the problem: when I connect the battery the op-amp output doesn't react at all. With no battery it's at max voltage (as expected), but it should reduce the output voltage when the inverting input exceeds the non-inverting input voltage.
After frying one shunt I added a 1 Ω power resistor in series with the battery and checked the voltages: output = around 11 V, non-inverting = 0.1 V and inverting = 0.34 V. How is this possible?
I changed the op-amp and got exactly same behavior. I also tested a second op-amp to make sure the pins were in the correct order on the chip and they were.
If someone realizes what I'm missing here or can suggest something I could try please answer.
Edit: circuit redrawn hopefully better.
AI: As shown, the body diode conducts in the MOSFET and the gate has little effect. Further, the voltage across the 0.1\$\Omega\$ resistor is then negative, which will destroy the LM358.
It's not really clear what you are trying to do. I might guess it's an attempt at a constant current sink, but for that you will need a reference voltage to determine the current.
Edit: Okay now that you've redrawn it and added the 100mV source- the resistor needs to go in the source so that the feedback voltage is positive wrt ground. You have around 10V of drive available so the slight reduction in Vgs is of no consequence.
It's possible this circuit, as drawn, will oscillate without some compensation but it may be okay with an LM358. Hopefully you have an oscilloscope available. |
H: Mathematical function a of an integrator in series with a non inverting op amp
I am trying to understand the circuit given below so I can make a mathematical model of it.
The circuit consists of an integrator with a reference (offset) voltage and a non inverting op amp connected in series. All of the parameters are constant except Vin = Vin(t), VoutB = VoutB(t) and VoutA = VoutA(t). They are a function of time. Also, lets assume that both of the op amps are rail-to-rail for simplicity. I estimated the output voltage function of OpAmpB to be:
$$V_{outB}(t) = \Bigg(1+{R_f\over R_{inB}}\Bigg)Vin(t)\tag{1}$$
with the limitation:
$$0 \leq V_{outB}(t) \leq V_{powB} - 5.1V\tag{2}$$
I assume that the limitation above exists because of the Zener diode. I found out that at this link: Zener diode at inverter op amp's output. Next, I estimated the output function of the integrator to be:
$$V_{outA}(t) = V_{ref} + {1 \over R_{inA}C_f}\int_0^t{\Big(V_{ref} - V_{outB}(t)\Big)dt}\tag{3}$$
Since Vref is a constant, I estimated the mathematical function of the integrator to be:
$$V_{outA}(t) = V_{ref} +{V_{ref} \over R_{inA}C_f}t - {1 \over R_{inA}C_f}\int_0^t{V_{outB}(t)dt}\tag{4}$$
Finally, by substituting equation (1) into equation (4), I got the final expression for the output voltage of the circuit:
$$V_{outA}(t) = V_{ref} +{V_{ref} \over R_{inA}C_f}t - {\bigg(1+{R_f\over R_{inB}}\bigg) \over R_{inA}C_f}\int_0^t{V_{in}(t)dt}\tag{5}$$
with the following limitations:
$$0 \leq V_{in}(t) \leq {{V_{powB} - 5.1V}\over \bigg(1+{R_f\over R_{inB}}\bigg)}\tag{6}$$
$$0 \leq V_{outA}(t) \leq V_{powA}\tag{7}$$
The problem is, I do not know how does the resistor Ro effects the output voltage VoutA(t). To me that resistor seems like it does not effect the circuit so it is not in the mathematical model of it. Am I wrong? If yes, can somebody please explain to me why? Also, does the Zener diode effect the output voltage VoutA(t) in any other way except the limitation of the opAmpB output voltage?
Thank you for your time.
AI: The problem is, I do not know how does the resistor Ro effects the
output voltage VoutA(t). To me that resistor seems like it does not
effect the circuit so it is not in the mathematical model of it. Am I
wrong?
Your analysis of Ro is correct. It represents a load on the op-amp output and it's not a very hungry load so can be largely ignored. If it were below 1 kΩ I'd start to be concerned but it's 10 kΩ and shouldn't really be a problem.
Also, does the Zener diode effect the output voltage VoutA(t) in any
other way except the limitation of the opAmpB output voltage?
It limits the ability of the op-amp (B) to drive large positive voltages onto the Vout node but, given that the supply is 24 volts, in most cases, it will not affect things at a first order level. However, because your first op-amp stage has a voltage gain of 4.3, it doesn't take much of a voltage level on Vin to cause limiting problems at the Vout node. Anything much above about 3.5 volts on the input is going to run into trouble here. |
H: Chip antenna and uFL/SMA connector routing
I created a PCB on which, depending on the mounting variant, I would like to place a Johanson Technology 0868AT43A0020E antenna or a uFL / SMA connector for an external antenna. I have a few questions:
Should I put any element before the matching circuit (C3, L2, C4)?
Should the element (R9/R8) that will be the jumper selecting the RF output be 0 Ω or a capacitor?
There is a route in the antenna documentation like in my picture, can it be the mirror image (out from left side)?
AI: Even a track stub on the antenna track may funtion as an inductor, so ideally you wouldn't have sharp corners or stubs along the antenna track. Maybe the resistors could share a pad and would be in 45 degree angle from the track (90 from each other)
Resistor is fine and the simplest solution. You can get away with a capacitor, but you need to consider all combinations, parasitics and non-idealities.
Yes, it can be the mirror image too.
Btw, I would keep the fiducial out from the antenna area, as it has a copper area.
Also, often you can have a wider section of ground plane in between the antenna and other components, even if it means having a longer antenna track. Check the application note for antenna track distance to gnd plane etc recommendations. |
H: How would I connect my noise source to a circuit in LTSpice?
I have a very basic question about connecting voltage sources to circuits in LTSpice.
I started with the macromodel test fixture for the OP27.
I really like the way the positive and negative rails are defined in the macromodel test fixture. I would like to use the same approach for a noise source.
I would like to connect my noise source below to R3.
I am unclear as to how I would connect the noise source to R3 in the LTSpice interface. It is probably very simple. But, I have not found any instructions on how to do this.
I know that I could move the noise source close to the circuit and attach it with a wire. I would like to connect the noise source in the same way that the op amp rail sources are connected.
Do I need to manually edit the SPICE netlist or can I connect the noise source in the LTSpice interface?
Could someone point me to any references that might describe the steps?
The following circuit works. However, I would really like to put the noise source over to the side with the op amp rail voltages.
AI: You can add labels in the LTSpice GUI to give a net a specific name. The default hot key for this is f4 I believe, but there’s an option in the toolbar for this as well. Just add a label to the noise source and another label with them same name to R3. |
H: Is there a way to keep internal 1.1V of atmega328p always on?
I have an application with Arduino, where some of the analog pins need AVCC as their reference voltage, while another one needs the internal 1.1V as the reference voltage to obtain a measurement with better precision than comparing against 5V.
I just found out that switching from AVCC to 1.1V internal requires a 5ms delay. The following code works:
void setup() {
ADMUX = 0b01000011; // configure ADC
ADCSRA = 0b10010111;
ADCSRB = 0;
DIDR0 = 8; // disable A3 digital
Serial.begin(9600);
}
void loop() {
ADMUX = 0b11000011; // select channel 3 and 1.1V ref
delay(5);
ADCSRA |= 64; // start conversion
while ((ADCSRA & 16) == 0); // wait for conversion to complete
ADCSRA = 0b10010101; // clear the conversion complete signal for another time
int bat = ADCL;
bat |= (ADCH << 8);
Serial.print("a3=");Serial.print(bat);
// read touch A6
ADMUX = 0b01000110; // select channel 6 and AVCC ref
ADCSRA |= 64; // start conversion
while ((ADCSRA & 16) == 0); // wait for conversion to complete
ADCSRA = 0b10010111; // clear the conversion complete signal for another time
int touch = ADCL;
touch |= (ADCH << 8);
Serial.print(", a6=");Serial.println(touch);
}
However, if I change 5ms to less, then the result of measurement against 1.1V is wrong. It is less. The less the program waits, the lower value. This indicates that when the 1.1V regulator is not selected, it is switched off and it needs 5ms to power up. I did not find anything of this sort in the datasheet, but I could have overlooked it.
Interestingly, in the analogRead() function of Arduino, there is a mysterious commented-out delay(1):
// without a delay, we seem to read from the wrong channel
// delay(1);
uncommenting it does not help as 1ms is not enough for this end. Therefore the code that uses analogReference() and analogRead() does not work at all, since analogReference() only changes a global variable and the actual switching is done only in analogRead(). Even subsequent analogRead() does not help (as it only takes about 20 usec), one has to wait those 5ms for the 1.1V guy to warm up.
So I was wondering - is there a way to keep it heated to avoid wasting so much time in the main loop? OK, I know I could use state variables like heating1v1 = true and measure the time, but maybe there was another way...?
And of course, it can be a feature of this particular mega328, which is probably some clone... so your original atmel microchip can be in a better shape. I tried two different boards with the same outcome.
AI: It just seems to be the way it works with most AVR chips. You could make your own reference on the board if you need a fast accurate one. Or you can look to see if the 100nF cap is across AREF as noted here: https://forum.arduino.cc/t/bug-with-analogreference/22994/19 which when removed brought the ADC set to internal 1.1V ref to ready in microseconds not milliseconds. Of course a decoupling cap is recommended for noise reduction (or a full lc setup), they ended up using a 10nF cap instead for half a millisecond ready time, and or using another pin to ground and drain the cap to make it ready faster as well.
That said you probably want to calibrate the internal reference as it's not fairly accurate in it of itself. Just fyi. |
H: Stepper motor ABCD versus A+A-B+B-
I am replacing a stepper motor and am checking that the wiring is the same as my old motor. All of the wires are colored the same: black, green, red, blue. But my old motor uses the convention black A+, green A-, red B+, blue B- and includes this diagram.
My new motor includes a very similar diagram. But with some added detail and labels: black A, red B, green C, blue D.
Can I treat the wiring the same to my stepper driver?
AI: Yes, as long as you get the coil connections in the proper order everything should work. |
H: Change Notification Interrupts PIC32
I am attempting to code a program for a PIC32 where pressing the S1 button lights up the LED, and releasing it turns it off, LED2 is also blinking - using interrupts.
The pressing and releasing works, but after pressing the button, LED2 stops blinking and stays on its state. Below is a snippet of my pseudocode. Where did I go wrong?
void __ISR (_CHANGE_NOTICE_B_VECTOR, IPL4SOFT) CNB_Intrr (void) {
LATA = ~PORTB;
}
int main(void) {
TRISA = 0; // LED1
LATA = 0;
TRISB = 1; // S1
PORTB = 1;
TRISC = 0; // LED2
INTCONbits.MVEC = 1; // MVM mode
asm volatile ("di");
CNCONBbits.ON = 1;
CNIE1B = 1;
IPCxbits.CNBIP = 4;
IPCxbits.CNBIS = 0;
IFSxbits.CNBIF = 0;
IECxbits.CNBIE = 1;
asm volatile ("ei");
while(1) {
// LED2 blinking
LATC ^= 1;
delay_s(1);
}
}
AI: I'm not too familiar with PIC32 but I imagine you need to clear the interrupt flag in your ISR, otherwise your ISR gets re-triggered forever and keeps everything else from running. |
H: Switching voltage regulator - exceeding output voltage limits
I have been designing a digitally adjustable step-down voltage regulator. Mainly because of the availability and price I chose:
MCP1612-ADJI/MS
I followed the datasheet and created the following schematic:
My plan is to use a DAC integrated in the MCU (ATSAMD21E18A) as shown in the schematic to adjust the output voltage from 1.5 V to 5 V using a 0.. 3 V DAC signal.
My concern is, that with a setup like this, I could "force" (introduce a specific voltage to the feedback pin) the regulator to output voltages like 5.1 V. Could this damage the regulator, or will it just cap on a 100% duty cycle without affecting performance?
VCC is approximately 5.. 5.5 V
AI: This is a buck regulator, it's physically impossible for it to output a higher voltage than its input voltage. When you request it to output a voltage that it can't produce, it will drop out of regulation and go to 100% duty cycle. It won't get damaged and will continue to operate normally once you request a "sane" voltage again. |
H: Routing traces to and from a 48 pin microcontroller becoming a mess
I have a 48 pin microcontroller with VCC = 5V. I'm becoming worried that I have the traces too close and all the vias and crossing traces may mess with the signals' integrity.
Are there examples and general guidelines to routing traces in such a situation?
Do you see anything in the picture that stands out?
I only have a 2 layer board to work with.
AI: I have designed boards for some years and a few things do stand out.
First of all please note that this is partly very subjective. For certain (mainly low speed) signals, good enough is good enough. So please keep in mind that you don't need to apply the things I suggest to still end up with a working layout.
This type of design can work perfectly on two layers. It will take some more effort then a four-layer board, but I feel like your design doesn't require this for shielding or EMI related matters.
First of all, working with a two layer board can cause some difficult situations with managing your power planes. Your top and bottom traces will eat up the available space for getting the power to your devices, and sub-par layout can be the result of this. The most important thing you want to do is keeping the area used for routing the signals very small, with minimal layer jumps. If you 'block' a power plane, you can jump this with lots of vias to another layer, but this will get messy and jumping the signals to other layers instead is preferable if possible. The easiest way to to this is to bring the signals together some more. If it is just some low speed IO or serial stuff there is no reason you cant do this.
How this can be done in your layout:
Keep the bottom traces as short as possible. I see quite long runs. This is not necessary, and you need either the top or bottom to route as many power planes/traces as possible. Once you are in the clear (signal is away from crowded uC), then continue routing on top layer
Use your routing grid better. There are lot of uneven spaces. I route on 1mm, with an alt grid of 0.1mm, with 0.2mm traces. This gives very easy control over the interval of the traces, and also give the means of routing groups of signals almost like a bus.
Don't take the signals so far away from the uC before using vias. This will just take up valuable space on the top layer. For example, if you pull the vias on the three traces above C52 all the way to the pins, the three signals above that will have no trouble being run all the way towards D21 without changing the layer. You could even decide to route the trace below R15 on the bottom layer instead for even more routing efficiency.
This is personal preference perhaps: really what is up with the curved lines? It is really difficult to route signals nice and tight together with this style of trace. It is only making things less organised and harder for yourself.
Make better use of the space under the chip. It is going to be harder to debug so make sure you are up for this but for example: take the four vias under the chip all the way to the bottom left corner, and route the three signals on the top left of the chip all the way to the bottom right corner, and only then jump to bottom layer. Even better, bring all the top vias close to the chip and route the signals on the top-left not underneath but around the uC in a clock-wise manner.
Don't make those very sharp corners on pads, like on D51 or the top-right pin of the uC. This can create small slivers of copper/etching that are hard to clean for the PCB manufacturer. These slivers can detach during further assembly and create shorts. More of a concern on inner layers, but still good practice
USE PLANES!!!! really, this is quite important. Route as many signals on the top layer, and fill the bottom layer with supply planes (either ground or vcc), and use two vias to bring the power to the top decoupling capacitor, and then straight to the pins. Avoid long runs on these kind of traces.
I have a burning passion for board design so I'd be happy to review any changes you make. I have a two-layer MCU example somwhere, I'll try to find it for you.
Edit: I didnt find my two layer design, but i have one four layer design that only uses the top layer for signals with the occasional jump to the bottom layer. If you lay it out like this your bottom layer will leave plenty of space to deliver power to the MCU pins an decoupling capacitors:
Notice that despite having SPI and SWD bus running trough the MCU , the impact on the bottom layer is not that bad. Still room for improvement though looking back on this design :) Just beware of cutting ground plane under large signal busses (return currents etc.). I have an internal ground plane in this board, if you do not then you will have to be extra careful in this regard.
You could lay out signals tighter than this. Your board should have the space you are looking for, as long as you have a methodical approach.
Have fun routing! |
H: MOSFET PWM issue
I want to dim an LED and have connected a P-channel MOSFET to switch the high side. I added a N-channel MOSFET as a driver. The schematic is attached below.
I'm applying a PWM sine signal from an STM32.
Problem:
If I measure the voltage on the drain of the N-channel SI2302 to ground, I see that the voltage is increasing from 0 to around 1.5 V and after that it's saturated at 5 V for the rest of the cycle until the duty cycle drops again. So instead of a nice oscillating sine curve from 0 to 5 V, I get a partial sine curve which is somehow clipped...
The voltage between drain of the P-channel MOSFET and ground is always at 5 V except for a short drop to 0 V.
How do I prevent the circuit from saturating?
AI: That 10 kΩ pull-up resistor (R29) is too high value for any somewhat high frequency switching.
A MOSFET has some gate capacitance, that must be charged/discharged for the device to switch on/off. Charging that capacitance takes some time, and with low enough drive capability, pretty long time.
With low PWM frequency and lower value of R29 you could possibly get away with driving the MOSFET like this.
For less heat losses in the P-MOSFET and/or for higher PWM frequency, you should use proper push/pull driving for the gate of Q7. |
H: Can a diode bridge be connected to a high input voltage?
I'm trying to rectify an AC current at 220V. Many written tutorials don't mention any transformer before the diode bridge and many video tutorials use transformers that provide an output of 6V or more.
In my understanding, diodes can withstand only very small voltages in forward bias since current is an exponential function of voltage. With only two diodes working at the same time during each half cycle, every diode will get no less than 3V in case of a 6V transformer. If no transformer is present, each diode will have 110V across it.
An electrician I know stated that many power adapters (such used by laptops) use a transformer after the bridge, which would imply that the diode bridge is connected to the mains ! He also added that some diodes can withstand 1000V, like the 1N4007 diode (I even read that on some websites) but when reading the datasheet for the 1N4007 diode, 1000V is the maximum reverse voltage, not the forward one, and during rectification, the diode needs to work both ways, so it will hold in reverse bias but it would normally burn in forward bias.
Am I missing something or understanding something wrongly or are all the tutorials I came across wrong? And also how much voltage can a rectifier diode withstand in forward bias, isn't it very close to 0.7V?
AI: Edit: As Andy pointed out, I didnt quite pick up on the fact that you are trying to feed the primary of the transformer with DC. This will in fact be very damaging to all components involved, and potentially hazardous as well. please do not do this! You will blow something up, load or no load! The only reason power supplies can even operate like this, is because it is rapidly switching on/off the incoming HV DC power towards the tranformer in order to simulate some kind of AC. A diode bridge straight into a transformer is no good. Disregard everything I said in the comments about the transformer, as this is not applicable to your situation. The answer @Andy aka provided goes into more detail about why some power supplies can be made to work while having a rectiefied input. My apologies!
Your reasoning is almost on point. Diodes can happily be connected to mains voltage depending on how you use them. With power supplies this is indeed very common as you pointed out.
If you had 1000V of forward voltage on a diode, that would indeed be strange for the scenario's you are describing. The forward voltage of a diode however isn't determined by just the voltage on one if its 'legs', its measured across the device. And this voltage is developed based on the current that is flowing trough it.
https://www.farnell.com/datasheets/639187.pdf
This picture is directly taken out of the 1N4007 datasheet. Perhaps this will make it easier to understand the forward current and forward voltage relationship. The remainder of the supply (mains?) voltage is dropped by the thing the rectifier is powering.
As other people are pointing out as well, the only way to develop such a high voltage with a forward biased diode (conducting diode), is to force the current/voltage trough/across it by shorting it, bypassing the load or essentially having the diode itself as the only load. If you connect a diode across mains like that it will fail very quickly and violently. |
H: SMD, reflow or hot-air gun?
What are the advantages and disadvantages of using a reflow oven vs a hot air station for prototyping SMD PCB? Do you need an oven or would an air station work?
AI: The advantage of a reflow oven is that it evenly heats everything in a controlled and automated way. Assuming the oven is well calibrated you can precisely reproduce the manufacturers reflow profile, hopefully resulting in reliable soldering and very low probability of damage to components. The disadvantage is usually cost, and that cheap reflow oven often do not precisely track the programmed profile.
The advantage of hand reflow with hot air is that it is fast, doesn't require a reflow oven, and for prototyping can work quite well. The disadvantage is that it is hard to reflow large boards evenly, so except for very small PCBs you will probably end up applying too much heat to some areas and too little to others. Further problems occur with plastic components, which tend to be hard to reflow without melting because you don't have that fine control over temperature. For example, I would not use hot air to reflow a large 10" wide PCB with many surface mount components and plastic connectors, but I have done 1" PCB modules with hot air and found that it worked fairly well because the boards were so small I could evenly heat them. |
H: UTD 2052 oscilloscope: read data from .sav file
I just recently got an oscilloscope and was happy to try it out. Now I have a problem with reading the data. The model I am using is the UTD2052 50 Mhz scope.
I can save the data to a USB drive in the format .SAV (file is in drive link). Now I can't seem to find any software to convert this file into Excel or CSV. The only software that works is WaveAnalyzer; screenshot:
.
But I need the raw data. Any ideas how to open the file?
AI: I have no idea whether there exists a way of decoding that (Windows ME/XP-era?) proprietary binary format, but if you are desperate for some numerical data you can use WebPlotDigitizer to extract data.
Eg.
You may have more patience in selecting points or tweaking the autoextract settings than I did. |
H: Why do you need resistors for components, like ADS1115?
I am trying to design my first own PCB and before I always have used breadboards or Prototyping boards. On them you use smaller PCBs, that come with the components on it, to connect it to you circuit.
When you design your own PCB you integrate the smaller PCB into your own PCB and on these smaller PCB there often are resistors.
I know that they restrain the flow of current to protect the components, but when do you have to use them, when you know what current, for example a microcontroller, is going to provide and that that current won't destroy it.
And if you have to use them which ohm is the right amount? How do you calculate that?
For example:
Why are there resistors here on a board for ADS1115? Would you also need them, when you supply it with the correct voltage and current?
Thanks
AI: The resistors are the R part of the Ohm's law. You should really start with it, because your assumption that "they restrain the flow of current to protect the components" isn't a complete "picture".
Now when you are asking to describe ADS1115 board, instead of submitting a picture of it, you can searched for a schematic instead. Because it's an open source hardware from Adafruit.
It is much more descriptive than a board image. Well, it's a very simple board and I've could tell the same from the picture... but always think about schematic if you try to understand some device. Even if you don't have it, try to draw it from the board. If you have one, you can use tools to pinpoint connections.
Ok, so all resistors are 10K. As you can see SDA, SCL and ALERT are in series resistors with Vdd. These are so called pull-up resistors. That sets the state of the ALERT pin to determined state - when nothing drives it HIGH or LOW, it's pulled-up (search for more info on the pull-up resistor) to a HIGH state. If the ALERT event are generated by the ADS1115, it pull it LOW to a ground through it's internal transistor. Similar thing goes for the SDA and SCL lines, except for they are always supposed to be pulled up by the specification of the I2C bus they resemble. I2C bus are open drain type, that means that the devices on it can only pull it LOW to ground, so it's required to have a pull-up with external resistors for the same reasons.
ADDR line are actually pulled to ground with pull-down resistor. The schematic (and the datasheet) describes how it sets the I2C address of this slave device.
As for the value, 4.7-10K values are pretty common in most circuits as a pull-up/pull-down. Their value affects the current & signal edge. Sorry, but I'm not going into the details here as this has been described like dozens of times. And once you understand the Ohm's law, you might get a better picture and can come back with more detailed question. |
H: What happens to the permanent magnet flux of this synchronous motor?
Considering a synchronous motor with permanent magnets (1 pair)
If there is a synchronous motor with permanent magnets and I was given the initial permanent magnet flux
Y_mp = e0(at 15 rps) / w (at 15 rps) = 168.3 V / 94.2 rad/s = 1.79 Wb
Y_mp = 1.79 Wb
Then I found out the base speed of the motor, w = 85.9 rad/s, and then I find out the current iq as 28.3 A and the torque = 3/2p * iq * Y_mp = 3/2128.3A1.79 Wb = 75.9855 Nm
so the Torque = 75.9855 Nm
Now, what happens if the base speed is doubled? Such as having w = 171.8 rad/s, what would happen to the permanent magnet flux? Will it change? If so, is there a way to calculate the new permanent magnet flux? I need that in order to calculate the new torque after the base speed was doubled.
AI: Unless the number of magnets is changed, the base speed can be changed only by changing the base frequency and base voltage. That would not change the available torque or the flux of the permanent magnets. The operating torque is determined by the load. |
H: 5G and aircraft?
I just read the statement of a company,
"We are frustrated by the FAA’s inability to do what nearly 40
countries have done, which is to safely deploy 5G technology without
disrupting aviation services, and we urge it do so in a timely
manner"
But I don't see any reason to make a rush changing to 5G (except for commerce). I recall recently the outphase of 2G. So there is functional and operating 3G, 4G, LTE services running around, so it isn't a fundamental service (right now), because if these operations are delayed, probably you aren't black outing no one, and in the case of, the 5G devices has 4G/LTE support/fallback at least.
And besides if FAA has requesting a delay in operations starts, at least have the rational doubt about it. As per se, there seems to be some proximity between the frequencies and indeed its a safety measure to avoiding the overlap with the right filters. But this is relative only to the altimeters based on radio waves.
AFAIK, there is no extensive study about the total integrity of the aircraft and control system, and in the case of interference to asset the extent of it.
But it seems that all it rely on the power output antennas, so its hard to measure if there is an issue, but it is reasonable possible.
So is there any paper or document published or ongoing that supports the saying
which is to safely deploy 5G technology without disrupting aviation services,?.
Is so what is the methodology used?
Thanks in advance.
UPDATE
I don't want to get outside the scope of the site, but the recent petition from Airlines for America to FAA and FCC, details the aspects about why it is considered dangerous.
And the concern is about the altimeter and satellite communications links, (I guess they are referring to gps, internet and navigation services).
Under the justifications given, IMHO, its reasonable to provide certain safeguards.
I think the main issue has to be with the power of operation of the 5G networks.
While many countries have adopted rules, and some have begun
deployment, the allocated frequencies for 5G internationally are
generally farther away from the radio frequency band used by radio
altimeters. In addition, the permitted power levels are often
significantly lower than those authorized in the U.S. Many other
countries have also effectively utilized a combination of exclusion
zones around airports, lower power levels and directional changes to
antennas to mitigate interference.
Cited from https://www.airlines.org/5g-frequently-asked-questions/
And this is a point since if the power is too much, this will make render the filters noneffective or inaccurate and under ICAO rules there will be only operations in VFR mode (i.e.: the runway is visible enough to departure and landing).
But still there seems to be no more analysis or papers supporting or denying these statements.
AI: Why not make the change - the speeds of the C-band 5G cells approach that of broadband? It's the next evolution. Radar altimeters do operate in C-band - commercial aviation radio altimeters operate in the 4.2-4.4 GHz band, which is separated by 220 megahertz from the C-Band telecommunication systems in the 3.7-3.98 GHz band.
The theoretical risk is that the filters in the altimeters may not be good enough to separate the two bands. And the use of radio altimeters in aircraft is for very low visibility precision approaches, which are fairly rare.
As far as other electronics like cell phones Paragraph (b)(5) of 14 CFR 91.21 leaves it up to the airlines to determine if devices can be used in flight, allowing use of "Any other portable electronic device that the operator of the aircraft has determined will not cause interference with the navigation or communication system of the aircraft on which it is to be used. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.