text stringlengths 83 79.5k |
|---|
H: Does volts or amps increase the strength of an electromagnet?
I'm trying to make an electromagnet that's strength is constantly getting incremented by small amounts every second. I need to know, which would have a greater effect on the electromagnet's strength, amps or volts? (I know increasing the turns and/or density of the magnet wire will increase the strength, but I am looking for answers other than that particular one.)
AI: Firstly, voltage plays no part in the strength of an electromagnet, it's only the current through the windings that generate the field. Consider a super-conducting magnet with zero resistance windings. There's no voltage, no power dissipation, and a large magnetic field.
However, most of us don't have the luxury of using a super-conductor to wind our magnets, we have to make do with a good-conductor, like copper. As it has resistance, we need to apply a voltage across it to push a current through it. This results in bad things like heating in the coil, whose temperature needs to be limited if it's to keep working.
For any given wound magnet, we do not have independent control over voltage and current. The magnet coil defines the ratio of those, it's called its resistance. If we apply a voltage, then (voltage/resistance) current flows. If we connect a current source, then the voltage across the coil responds, and becomes (resistance * current).
The limit for both voltage and current is given by the coil's cooling. If we operate the coil for a very short time, we can increase the power supply, and allow the heat to be stored as a temperature rise in the windings, as long as we switch off before the coil overheats, to let it cool down before the next pulse. |
H: Amplify PWM Signal from exactly 0-3.3V to 0-5V
I am converting a chinese lasercutter to be controlled using a Smoothieboard. The PSU is controlled by a TTL High / Low to "arm" the laser as well as several safety measures.
When the laser is armed, the power is controlled by a PWM signal. This PWM signal from the Smoothieboard is output at 3.3V, and then converted to a 5V PWM signal using the recommended Logic Level Converter (From SparkFun, we soldered our own circuit because we couldn't wait for delivery).
This all works like a charm apart from one little detail. The circuit on the logic level converters' signal side always has around 0.4 volts when not active. This means that when our laser cutter is travelling with a G0-command, it is still armed, thus burning with around 7mA (compared to 28mA full-power). It has to be 0 volt when travelling.
We already measured the signal from the Smoothieboard using a picoscope, and it shows 0 volt when low, 3.3v when high: without the LLC connected. So issue is supposedly to be found in the circuit.
In the name of "Logic" level converter, I kind of understand that 0.4 volts is a binary low, but this is not what I desire in my project.
The problem is temporarily solved by disarming and arming between G0-moves, but this seems like a bad way.
What kind of circuit can I use to solve this problem?
Thank you in advance.
AI: 2N7000 won't be fully turned on with 3.3V Vgs so it is unable to pull the output to ground, there will be a residual voltage as you noticed.
You can use a 74HCT logic gate for 3.3V to 5V logic level conversion. Your can use any gate you want like a 74HCT08 AND gate with both inputs to the same signal.
simulate this circuit – Schematic created using CircuitLab
Depending on the output current you want, you can also put all 4 gates in parallel. If it's just to drive a logic level input, no need to.
If the cable is longer than a few tens cm, add a 33R resistor at the output of the gate to avoid signal reflection. |
H: Building a numeric potentiometer for AC current
I'm building a bench to calibrate a device that measures AC currents. As I won't build something accurate, the current will be measured with a current clamp and a multimeter (voltage mode).
For the current load, I first tried a diode bridge with big capacitors and after it, a DC current load (voltage / current converter).
The result is a non sinusoïdal voltage at the clamp output due to the diode voltage which leads to 0 current when the input voltage is less than twice the diode voltage. Like in this screenshot (orange = input voltage, yellow = clamp output (volt)).
The problem is that the multimeter does not integrate correctly the non sinusoïdal voltage of the clamp and outputs a wrong rms value. If I plug the multimeter in-line as an ampere meter, the measure is correct but I need the clamp because I will measure currents that are beyond what the multimeter can do
That's why I want to build a device that operates likes a rheostat. Its resistance should be defined by a microcontroler and the current vaweform should be proportionnal to the voltage waveform.
Maximum dissipated power is around 60W (for the purpose of my specific design, I can add a serie resistor to drop the power in the device down to 20W)
Input voltage: 6V 50Hz AC sinusoïdal.
How can I do?
AI: I will interpret this as an AC electronic/active load, basically a "resistor emulator" for AC. I'm thinking about several solutions:
Oldskool
Several relays, switching resistors of values in powers of 2 in parallel or in series. Basically a 4-bit number, and each bit controls a resistor. Say you have 4 relays, and resistors of 1,2,4,8 ohms.
If they're in series you can make any value between 1 and 15 ohms.
If they're in parallel, then the binary number controls the inverse of the resistor value, which is basically the current.
Simple PWm
In this case we would generate a PWM signal, switching a low value resistor in circuit with an AC switch (like a pair of back to back FETs).
Current is proportional to V/R multiplied by the duty cycle, which makes this an adjustable resistor.
Add a LC for smoothing... |
H: DALI Signal Voltage Range and Power Supply connection confusion with WAGO
In an attempt to solve this problem, I was cross-checking my connections several times. During this, I thought it will be interesting to see the DALI signal coming out of WAGO DALI Module as opposed to the signal coming out of my board. I was surprised to see that, the DALI signal voltage range from WAGO DALI module is very low compared to what is given in the standard. I was expecting a signal range like (18V HIGH - 0V LOW [with appropriate tolerance]) but I got something around 1.7V.
Now, I am wondering if my power supply connection and understanding is correct at all! and I want to understand the basic DALI signal flow between DALI PHY and DALI Slave. Here with the WAGO Module, I am using 18Vdc, 1.1A 787-1007 module as the power supply.
Q1.I could not exactly understand how and why is this voltage level stepping down from 18V to the range of ~1.5V.
This is how the Wago DALI Multi-Master Module block diagram looks like
Q2. How is the current limiting to 250mA carried out in the above circuit?
AI: First you should check that your scope settings match your probes regarding probe attenuation eg 1x, 10x. Second you should detach any other loads from the PSU to see if voltage goes back up when unloaded.
Q1. Maybe the PSU module 787-1007 is damaged due to it being used as a DALI bus power supply when it is not such a thing - it is a power supply for the 753-647 DALI multimaster module. See Page 14, section 3.1 of the 753-647 datasheet - "These power supplies do not provide direct power to the DALI bus, but only indirect power supply via the DALI Multi-master Module". This means you connect the DC output of the 787-1007 to the U pins on the 753-647, and take the DALI signal from that module. See section 6.3.2.2 for wiring diagram.
Q2: The current limiter isn't shown in that diagram but is in the 753-647 module. |
H: What do the inductors L2 and L3 do in the following rf power amplifier circuit?
I found a circuit online about an rf power amplifier working in the 88 to 108MHz FM spectrum. The circuit diagram is shown below
I understand that an amplifier needs an inductor and a capacitor in a resonant circuit to build the output waveform without distortion. But why are there 2 inductors over the collector of the transistor and another inductor L2 near the output.
AI: This should explain your questions: -
EDITED SECTION
I was clearly wrong about C5 - upon further inspection it has nothing to do with being part of a tank circuit so apologies for that. And L1 is therefore not a tank inductor but just a collector load of about 240 ohms at midband broadcast FM frequencies.
Here's another attempt to fix my earlier stupidity: - |
H: Is an all-pass filter a linear phase shift filter?
Im in need of an application that needs to add linear phase shift to a signal similary to the one produced by a Bessel Filter, meaning constant delay, my question is: does a standard 1st order all pass filter provide a linear phase shift? if not, what circuit provides a linear phase shift similary to a Bessel filter, whilst providing linear amplitude response?
The type of all pass filter im familiar with is the following
simulate this circuit – Schematic created using CircuitLab
AI: I think what you are looking for relates to the term group delay. Here's an example of 1st order to higher order all-pass-filters: -
Group delay is: -
In signal processing, group delay is the time delay of the amplitude
envelopes of the various sinusoidal components of a signal through a
device under test, and is a function of frequency for each component.
Back to your question...
does a standard 1st order all pass filter provide a linear phase
shift? if not, what circuit provides a linear phase shift similary to
a Bessel filter, whilst providing linear amplitude response?
With reference to the picture above, you should be able to see that a 1st order circuit doesn't provide linear phase shift however, if you increase the number of stages then you get an improvement.
The picture was taken from Chapter 16 Active Filter Design Techniques by Texas Instruments |
H: Connect to Xilinx Zynq 7030 via JTAG connection?
Imagine you are trying to write Bare Metal applications on a Xilinx Zynq 7030 board.
Since burning sd cards all the time gets tiresome, you want to establish a JTAG connection. You get a JTAG HS3 programming cable, set up your lovely ARM DS-5, write a nice test "Hello world!" program.... and then what?
How would you establish a connection between your workstation and the Zynq board via JTAG? What are the next steps?
AI: I'm going to quote the Vivado Programming and Debugging Manual here:
Open the Hardware Manager.
Open a hardware target that is managed by a hardware server running on a host
computer.
Associate the bitstream data programming file with the appropriate FPGA device.
Program or download the programming file into the hardware device.
Your programming cable is even explicitly mentioned in the manual. Follow the steps of chapter 4 starting on page 23 and you should be fine.
EDIT: By a freak chance, I found this document while looking for something else, it might be useful to you(the Xilinx Doc tool is a crazy thing). There is a project type literally called "Bare-Metal Executable".
There is even a video called "Zynq Bare-Metal Application Development". |
H: Resistance in parallel with MOSFETs
Here I have a P-channel transistor (Q1) and two N-channel transistors (Q2 and Q3). I would like to know more about the resistors (R1 and R2) in parallel with these MOSFETs.
Are these resistors pull-up and pull-down resistors? Or do they have something to do with the value of the tension of VGS of these MOSFETs, to allow the MOSFETs to act as a switch?
AI: They are pullup/pulldown resistors than ensure the gates take the correct voltage in the absence of any input.
The gate of a MOSFET is basically a capacitor. Pressing the ON button in this schematic charges the gate of Q3 with respect to the source, turning it on. When the button is released, the gate discharges through R3 and turns Q3 off again. Without R3, the gate would simply stay charged and Q3 would stay turned on.
The same happens with Q1 and R1: turning on either Q2 or Q3 turns on Q1, and R1 ensures that when Q2 and Q3 are both turned off that Q1 turns off too.
Assuming the gates are driven with a low enough impedance, the resistors have no effect on the value of Vgs. |
H: Series RLC Max Voltage calculation Problem
I am confused on how to calculate frequency for VLmax and VCmax.
Is there a better way to find other than d(VC)/df = 0 and d(VL)/df = 0 ?
AI: I'd solve the transfer function H(s) with the capacitor across the output (as per a 2nd order low pass filter) then move on to solve for L at the output. With C at the output you have: -
So, if you do a little algebra, \$H(s) = \dfrac{1}{s^2LC+sCR+1}\$
Then put it into the standard format to solve for s: -
\$H(s) = \dfrac{\frac{1}{LC}}{s^2+s\frac{R}{L}+\frac{1}{LC}}\$
Maximum is when s = 0 so using the quadratic solution for s....
\$s = \frac{-R}{2L}+/-\sqrt{\frac{R^2}{4L^2}-\frac{1}{LC}}\$
Now if you know your peaking filters the terms after the +/- are complex conjugate poles aligned with frequencies of: -
+/- \$j\sqrt{\frac{1}{LC}-\frac{R^2}{4L^2}}\$.
It looks like your answer is missing an \$L^2\$ - you just have "L" without it being squared. You also have 2 in front of the L instead of 4: -
Thanks to jonk for spotting my error |
H: Bypass the open circuit
I have a circuit in which bulb is attached, I want to let arduino know if bulb is functional or fused. Obviously when bulb will be fused it will become open circuit. I am using mains AC to power the bulb and I want to make feedback signal to send to an arduino
My bulb is running on 220 V controlled through relay.
I have connected the bulb in series with an AC - 5V DC converter, however, the bulb flickers when connected this way.
simulate this circuit – Schematic created using CircuitLab
How do I detect whether the bulb is conducting or blown?
AI: The switching power will only draw as much current as it needs to power the 5V side of the circuit. Since you're drawing almost no current, the buck converter will only turn on every so often to keep the output voltage at 5V.
Instead, you might want to try wrapping a single turn of wire around one of the wires going to the bulb, and connecting it to a rectifier and zener diode. Something like this.
simulate this circuit – Schematic created using CircuitLab
(Note, may work without all of the components shown)
Alternatively, you could use a photoresistor/photodiode to sense whether the light is on. Just make sure if your bulb is incandescent that you don't melt your wires. |
H: STM32F446 I2C peripheral won't assert repeated start condition
I am writing some register level firmware for my STM32F446 to use the I2C peripheral to talk to an accelerometer. The sequence of events i need to do is as follows
1) START
2) SLAVE ADDRESS+Write
3) SUBADDRESS (command byte to specify which register address on the peripheral i want to read from)
4) REPEAT START
5) SLAVE ADDRESS+Read
6) Collect data from slave
7) STOP
On a logic analyzer i can see that i am correctly doing steps 1-3, but when I need to assert the repeated start it seems to not do so correctly. I am setting the I2C1->CR1 register bit 8 (from zero) high with this function:
void repeat_start_I2C1(){
//set start bit
I2C1->CR1 |= (0x1 << 0x8);
}
which seems to work for my first start but it is not generating the repeated start, because it is not generating the repeated start my read function (used in step number 5) gets stuck in a while loop waiting for the status register bit SB to go high before proceeding (SB goes high after each start/repeat start and it is necessary to clear before sending slave address):
void address_read_I2C1(uint8_t addr){
//wait for SB bit to be set
while(!(I2C1->SR1 & 0x1));
//write slave address with LSB set for receive mode
I2C1->DR = (addr << 1) | 0x1;
}
Here is an image of the full transmission as it it occurs up until the false repeated start which occurs directly after 0x2D+ACK (the subaddress command byte, i.e., step 3).
Here is a close up of the false repeated start
As you can see at the +1us tick mark the SCL (top line) and SDA (Bottom line) go low at the exact same time (up to the resolution of the logic analyzer) instead of SDA->SCL as needed in a start condition (which can be properly seen in the first image.
I paused during debug while it was stuck in the while loop and noticed that the Status Register 2 BTF bit was high indicating that transmission was finished and this may be the reason why it is unable to assert start correct? But i don't understand the procedure i must take to fix it so that it can repeat start.
EDIT:
a user suggested i might be leaving out a step to clear the address status bit before sending a command byte, but i simpyl forgot to show this function
//Write byte to I2C1
void write_I2C1_byte(uint8_t cmd){
uint8_t tmp;
//wait for ADDR=1 then clear by reading SR1 and SR1
while(!(I2C1->SR1 && 0x02));
tmp = I2C1->SR1;
tmp = I2C1->SR2;
//wait for TxE=1 to denote data register ready to accept transmission data
while(!(I2C1->SR1 && 0x40));
I2C1->DR = cmd;
}
This function carries out step 3 in my list of steps by clearing ADDR by reading the SR registers and then sending a byte to DR. I compile with no optimizations so tmp does not get cut from the code for not being used.
EDIT 2:
A user asked what pull-up resistors are set to for the gpio connected to the peripheral, here is the init function that set the pull-up resistors to pull lines high (spaced out relevant lines):
inline void init_i2c1() {
//set GPIO to correct pin modes for I2C1
//PB_8 IC21_SCL
//PB_9 I2C1_SDA
// enable GPIOB clock
//RCC->AHB1ENR |= RCC_AHB1ENR_GPIOBEN;
RCC->AHB1ENR |= 1 << (1); //set GPIOB clock enable bit
//enable I2C1 Clock
//RCC->APB1ENR |= RCC_APB1ENR_I2C1EN;
RCC->APB1ENR |= 1 << (21); //set I2C1 clock enable bit
//PB_8 IC21_SCL
// set the mode to alternate funtion
GPIOB->MODER &= ~(0b11 << (8 * 2)); // clear bit field using 2 bit mask
GPIOB->MODER |= 0b10 << (8 * 2); //set bit filds to 0b10 to enable alternate function mode
// set output mode to open drain so it can be pulled low
GPIOB->OTYPER |= (1 << (8));
// set GPIO speed
GPIOB->OSPEEDR &= ~(0b11 << (8 * 2)); //clear
GPIOB->OSPEEDR |= (0b10 << (8 * 2)); //fast speed - 50MHz
//******************************************************
// Set Pull up Resistors
GPIOB->PUPDR &= ~(0b11 << (2 * 2)); //clear
GPIOB->PUPDR |= (0b01 << (2 * 2)); // pull up
//******************************************************
//Set Alternate Function I2C1 using Alternate Function Register High
GPIOB->AFR[1] &= ~(0b1111 << (0*4)); //clear field
GPIOB->AFR[1] |= (0b0100 << (0*4)); //set for alternate function 4 (I2C 1)
//PB_9 I2C1_SDA
GPIOB->MODER &= ~(0b11 << (9 * 2)); // clear bit field using 2 bit mask
GPIOB->MODER |= 0b10 << (9 * 2); //set bit filds to 0b10 to enable alternate function mode
// set output mode to open drain so it can be pulled low
GPIOB->OTYPER |= (1 << (9));
// set GPIO speed
GPIOB->OSPEEDR &= ~(0b11 << (9 * 2)); //clear
GPIOB->OSPEEDR |= (0b10 << (9 * 2)); //fast speed - 50MHz
//******************************************************
// Set Pull up Resistors
GPIOB->PUPDR &= ~(0b11 << (2 * 2)); //clear
GPIOB->PUPDR |= (0b01 << (2 * 2)); // pull up
//******************************************************
//Set Alternate Function I2C1 using Alternate Function Register High
GPIOB->AFR[1] &= ~(0b1111 << (1*4)); //clear field
GPIOB->AFR[1] |= (0b0100 << (1*4)); //set for alternate function 4 (I2C 1)
//set up I2C1
//disable I2C1 to set up
I2C1->CR1 &=~ (1 << 0); //Peripheral enable bit
//set clock frequency to 100kHz
I2C1->CR2 &=~ (0b111111);
I2C1->CR2 |= (0b001000); //set I2C peripheral frequency to 8lMHz
I2C1->CCR &=~ (1 < 15); //clear the 15th bit to set it to Sm mode
//Calculate the Clock Control Bits
// CCR[11:0] in decimal = ((1/2)(1/targetFrequency))/(1/PeripheralFrequency)
// it is 1/2 the target period because the CRR defines Thigh or Tlow (half the period)
// CCR = ((1/2)(1/100E3))/(1/8E6) decimal to hex
// CCR = 0x28
I2C1->CCR &=~ (0b111111111111); //clear the lowest 12 bits
I2C1->CCR |= (0x28); //clear the lowest 12 bits
//Set TRISE
//TRise is the maximum rise time divided by the peripheral clock period + 1
//TRISE = floor(Trise_max/Tpclk)+1
//For Sm mode the max rise time is 1000ns
//thus we have ((1000E-9/(1/8E6))+1) = 9
I2C1->TRISE = 0b001001; //set TRISE to 9
//Program the I2C_CR1 register to enable the peripheral
I2C1->CR1 |= (1 << 0); //Peripheral enable bit
}
EDIT 3:
According to the STM32F446 Errata sheet section titled 2.4.3 Mismatch on the “Setup time for a repeated Start condition” timing parameter Apparently there is some cases where the setup time for repeated start is violated in I2C standard mode speeds between 88-100KHz (which i am currently operating in since i am at 100KHz). The required minimum Repeated Start setup time is 4.7us but looking at my logic analyzer output i have less than 3us between SCL going high and when the SDA line seems to attempt a repeated start. Though this problem is not supposed to occur if the slave is not stretching the clock and the SCL rise time is less than 300ns which my pictures both indicate so i am unsure why the setup is being violated.
I will try lowering the frequency below 88KHz as suggested workaround in the Errata, and will report back.
EDIT4: reducing SCL to below 80KHz did not do anything, in fact it made it worse. Now the first start condition has the same behavior (glitching downward at the exact same time as SDA). But this only happens intermittently, sometimes it works and sometimes it does not...
EDIT5: SOLVED. External pull-ups are very necessary... stupid nucleo board...
AI: I've just checked against my code for the F401 - I hope that the I2C peripheral is still the same for the F446.
Your general approach is a match with mine (which works fine after heavy rework of the code from an interrupt driven approach - which was horrible).
But I do have an additional step between 2) and 3) which you haven't mentioned:
1) START
2) SLAVE ADDRESS+Write
--> 2.5) Clear Address Bits (read SR1 and SR2)
3) SUBADDRESS
4) REPEAT START
5) SLAVE ADDRESS+Read
6) Collect data from slave
7) STOP
I found the I2C peripheral to be quite brittle and ugly to use. Bbeware not to read too much or too little from the registers as the internal state machine seems to be heavily dependent on the correct sequence of the read and the writes to the registers.
Especially the part about reading the registers can give you a debugging hell as the read of the debugger will trigger the state machine just like a read of your code, so as soon as you stop and inspect the registers (sometimes the debugger does it all automatically) the read happens and the peripheral will do something again.
If you need to know a value at a certain point, store it inside a variable as you cannot rely on what the debugger is showing if you halt at that point. But then again that read might alter the behavior already. Read the reference manual very very carefully.
In response to the edit:
//Write byte to I2C1
void write_I2C1_byte(uint8_t cmd){
uint8_t tmp;
//wait for ADDR=1 then clear by reading SR1 and SR1
//// check address sent succeeded, data bytes transmitted, bus busy, and in master mode)
//while(!( (I2C2->SR1 && 0X02) && (I2C2->SR2 && 0x07) ));
while(!(I2C1->SR1 && 0x02));
tmp = I2C1->SR1;
tmp = I2C1->SR2;
//wait for TxE=1 to denote data register ready to accept transmission data
while(!(I2C1->SR1 && 0x40));
I2C1->DR = cmd;
}
This code contains bugs - the waiting for the bits. You accidentally use && instead of & to check for a set bit.
And you commented that tmp isn't getting optimized away because you have compile with no optimizations. tmp wouldn't get optimized away as the registers are (if nothing went wrong there) declared volatile, thus the compiler is not allowed to optimize away the read from SR1 or SR2.
After inspecting the captured waveforms a bit closer, it looked like there is a glitch on the SCL on the restart condition. This might just be a wrong capture or a real glitch, which could very well throw off the peripheral as it is closely coupled to what is going on on the SCL line.
After clearing up, that the internal pull-ups were used, I suggested to use external 10k pull-up resistors (in a comment).
The reason why is that I have encountered strange behavior of GPIO pins under control of a peripheral. Namely some of the SPI pins wen't into high impedance mode after a transmission (which caused EMI problems). So I'm not trusting that the internal pull-up will remain always active.
It could also be just that the internal pull-up is just not strong enough. They typically range in between 30k and 60k ohm, so they are quite a bit weaker. |
H: Component Symbol identification; Rectangle with large T-shape
I've been searching for days and still have not come up with an answer.
What is this symbol?:
The component in question was found on this mosfet amplifier schematic from the 1980s.
AI: This looks like preset potentiometer wired as rheostat.
Here you can find the following definitions: |
H: Short circuit = no power?
Now I want to build stuff and I'm really interested in learning things (consider I'm starting from scratch).
So I'm reading all of this website and the following line in this article got me scratching my head for some time:
[about the power rating of a circuit]
Likewise, if we have a short-circuit condition, current flow is present but there is no voltage V = 0, therefore 0 x I = 0 so again the power dissipated within the circuit is 0.
I'm quite sure that you can melt stuff when connecting it to both ends of a battery. Not that I tried it myself but even touching both ends of an AAA battery with a metal wire produces sparkles and heat. Is it really correct that there is no power dissipated within the circuit in a short-circuit condition?
Also, I remember that there couldn't be an electron flow in a circuit if there was no voltage drop between both ends of the circuit. Then, isn't the line I quoted kind of contradictory?
AI: You should not be so hard on your professor.
Much of the confusion newcomers to EE struggle with is that we talk about theoretical IDEAL circuits as part of the teaching process. In ideal circuits things often act rather contrary to your intuitive and experimental notions of how things actually work.
Things like short circuits, transformers, diodes, and pretty much everything else we work with, have ideal models we use to describe and understand them within the scope of how we try to use them. The reality is far more complicated and much harder, if not impossible, to define entirely.
As such the definition of a "short circuit" is in fact an "ideal component". It is a resistance with zero resistance, that is \$0\Omega\$. That is, the force of the battery will act through it with no opposing force. Pushing on nothing, you do no work, and no power is dissipated.
In real life of course, the wire you use to short out the battery has some small resistance. The battery itself also has some internal resistance. Since both of those are small, the resultant current is very large. That means lots of power is dissipated in the wire, and in the battery and things quickly get rather warm.
As I said, do not be so hard on your professor. A lot of EE is accepting the ideals at face value while realizing that reality is rather different. The ideal models give us a base point to work from which allow us to design things to a working level of accuracy without getting lost in the chaos of real world effects.
However, we always have to be mindful that the ideals are a myth. |
H: "Perfect" transistor using an op-amp
The U1:A(+IP) represents my input (0 to 6V).
I am trying to power a lamp which requires at most 6V@100mA, the input will vary between 0 and 6V but it doesn't provide enough power for the lamp (the input comes from another op-amp used to convert current from 0 to -2mA to a voltage between 0 and 6V).
As wikipedia states, this circuit is a Voltage follower boosted by a transistor :
This particular circuit is very interesting as it provides these curves (for both voltage and current in the lamp) :
However, I am not able to figure out why this works, why is it able to work between 0 a 0.7V, when the transistor shouldn't let anything through ?
Thank you everyone, thanks to you I understand better how this circuit works.
AI: It's no great mystery here...
In this configuration, the op-amp adjusts the output voltage according to the difference between the plus and minus pins to try and make those inputs equal.
When that happens the output must be \$Vbe\$ above whatever voltage is on the positive input.
As such this circuit will work all the way down to zero volts. That that point the base will be at \$Vbe\$.
Trying to go under zero volts at the input however will not work since the transistor can not sink current into the emitter.
However:
This circuit should be used with caution. Under certain stimuli, and depending on the op-amp, it is prone to oscillate.
Also, be aware that the start up current for that lamp may be more than the transistor can handle. Measure the cold resistance of the bulb to calculate the start-up current you can expect. Use of a base resistor to limit the current would be prudent.
Be careful with the power here too. The transistor needs to dissipate as much power as the light-bulb at 6V. That may be asking too much of a little 2N2222. If you don't know the watts, measure the current through the bulb when you apply 6V to it, and multiply that by 6.
Adding a series resistor.. ~50R 1W above the transistor to share some of the power dumping and limit the current may also be wise here. |
H: Stepper motor voltage / resistance per phase
I am trying to run this stepper motor (XY42STH34-0354A), but I am encountering two odd issues with its performance: slowing of the motor in 1/32 microstep mode, and a "soft cap" of the RPM where the speed of the motor barely changes despite increasing the RPM parameter.
Here are the motor specs:
Rated voltage: 12V
Current/phase: 0.35A
Resistance/phase: 34ohms
Inductance/phase: 33mH
Holding Torque: 20N-cm
I'm currently using a DRV8825 stepper motor driver with the motor using a 30V supply and am controlling it with an Arduino Mega, using this stepper library I found online. I believe that all my wiring is correct, and I've properly set the current limit on the DRV8825 to the rated current limit of 0.35A following the instructions on the Polulu website. The motor runs smoothly within a certain RPM range at all microstep settings.
When I use the 1/32 microstep mode of the DRV8825, it is noticably slower (~20%) than that of the other modes (1/16, 1/8, 1/4, 1/2, 1) for the same RPM setting, but other than that, works great (smooth, no rattling or other odd behavior). I think the motor may speed up slightly as the microstepping setting gets more coarse (towards fullstepping), but it's small enough that I really can't tell.
The second thing I noticed was that despite increasing the RPM setting, my motor hits a maximum of about 4-5rps. There is a range of RPM settings (300-900RPM) in which changing the RPM value won't result in any noticable difference in the speed of the motor, which is what I refer to when I say "soft cap". Exceeding that limit causes the motor to jitter.
Could anyone help me understand why the motors are behaving this way? Looking at some other NEMA17 stepper motors online, I see that they have a lot lower voltage ratings (2-3V) but much higher current/phase (1-2A). Could it be that the driver I chose isn't correct for my stepper's specs, or that the lower-voltage higher current types run faster or better? Thank you.
AI: With high step count stepper motors the inductance of the coils plays a big part in limiting the speed you can drive it at a given terminal voltage.
simulate this circuit – Schematic created using CircuitLab
Notice with the circuit above that the coil current has dropped to under a third of the nominal holding current at 12V resulting in less torque. Further there is a significant phase shift in the current which, in a closed loop system, will result in a further difference in applied torque if you do not correct for it in the switching angle.
This reduction of torque translates into a lesser top speed for any given shaft load.
If your stepper driver is current regulated, using a larger supply voltage will reduce this effect and allow the motor to run faster for a given load.
Your other alternative is to source a motor with significantly less inductance. |
H: ESP8266 ESP-01 drive 6V led with GPIO with 2AA batteries as source
I have an ESP-01 with two AA Batteries directly connected as power source.
I have a button and led wired up to the GPIO. With a standard led it is bright enough when I add new batteries, but after time the led lights very low.
Now I want to connect a button with integrated 6 V led to GPIO. How can I drive the 6 V led with 3.3 V GPIO?
The ESP-01 is in idle in deep-sleep and if I press the button the reset is performed and after the ESP has done it's work it goes to sleep again.
AI: You could use a low current boost converter, something like this |
H: S8050 datasheet typo?
I have some S8050 transistors and was looking for the stats of them in the datasheet. I found some strange values for the Ib/Ic relation:
Shouldn't the unit on the y-axis be A instead of mA? The datasheet of all S8050 subtypes have A on this axis. Ib 1.5 mA = Ic 0.25 mA would be a DC current gain of 0.167, as far as I understood.
AI: It is an obvious typo. If you check Mouser - Fairchild SS8050, \$I_C\$ is in Amps. |
H: 3 pole breaker and wire amp rating
In the main panel, there are 3 wires for 3 phase power going from 3 pole 40A breaker to a sub panel. the breaker is (CKIPSAL 4CB340/6 C40)
The wires are in 2 cables.
Each of these wires has 7 strands 19 SWG each. Online search reveals that 19 SWG handles 4.13amp. which tells me that the wire is expected to handle 29amp (7 x 4.13)
If the breaker should protect the wire, then why it is 40amp when the wire is 29amp? i.e. I expected to see the breaker amp less than the wire amp rating.
AI: Based on your data, your 7 wires of #19SWG are 0.40" (1.016mm) in diameter each.
That makes 1600 circular mil (0.81 sq.mm.) each. x7 = 11200 circular mil (5.672 sq.mm.) the bunch.
By contrast, 10 AWG is 10400 circular mill (5.26 sq.mm.) 10 AWG is legal for 30A@60C, 35A@75C, and 40A@90C in the National Electrical Code, which is more conservative than European codes.
This wire is slightly bigger than 10 AWG, so it should be fine at 40A if the wire, terminations and wire routings are safe for 90C, maybe even 75-ish C.
A bigger problem is the wire in two cables. That is not permitted in the US electrical codes, and for good reason - it will turn anything between the cables into the core of a transformer and induce non-trivial amounts of energy, making heat and vibration which can work-harden, fracture or abrade cables. It may be permitted inside a chassis if UL/CSA/TUV etc. approves it, which they may not. |
H: Thermocouple noise causing spurious reading with SSR
I have a thermocouple PID SSR heater as shown, based on the MAX31855 ( datasheet ). I get spurious readings when the arduino is plugged into my laptop, my laptop is plugged in to its charger, and the SSR is active.
I'm getting a lot of spurious readings coming from the chip, which frequently returns error codes indicating a short to ground (SCG Fault), short to V+ (SCV Fault), or both simultaneously (not sure). These errors are quite frequent (up to several readings in a row), depending on read rate (1-10 Hz) and whether the SSR is currently on. SSR on = way more likely to error, see graph below. When temp input is above setpoint, there are very few spikes. I can ignore these errors and get a quasi-accurate reading, but the result is a several degree excursion.
(Temp read °C is in orange , PID (raw) output (+200) is in green, X axis is in seconds. Output of PID algo is clipped to [0,1] so any negative number is pinned to 0. )
Slowing the chip read rate seems to improve the readings, but only slightly, and at the expense of PID responsiveness. This system is very touchy, and a PID misfire of only a second can cause a multi-degree excursion.
I tried modifying the firmware to turn off the SSR (and wait 17 ms to ensure zero-crossing) during the temperature reading, but it does not really seem to help.
UPDATE:
I must note that the above setup is taken on my workstation - arduino microUSB plugged into laptop, which is plugged in to laptop power supply, ethernet, HDMI to second monitor, and keyboard. When I unplug the power brick, no improvement, but when I unplug EVERYTHING from the laptop save for the arduino, the spiking goes away. Ground loop?
Laptop peripherals unplugged @ 550s.
UPDATE 2:
I just A/B/A/B tested plugging in the power brick. The spiking readings definitely correlate with the power brick being plugged in. Question is, why? I've updated the image to show the earth connections more explicitly.
UPDATE 3: I measured a 1kΩ resistance between the laptop power brick's negative (Vdd) and earth ground. This is probably the punchline. I suspect line noise is propagating from the SMPS through earth ground or maybe live/neutral, coupling to the TC, and screwing with the MAX chip's readings.
AI: Earth Grounding the Laptop thru VGA or the case can assist in diverting charger noise creating a large common mode noise to shift the PID control signal crosstalk to SSR and to thermocouple signal. Perhaps the PID compensation needs to be adjust to make the system more stable and less sensitive to HF noise ( D gain )
You have not shown all the earth ground connections in your wiring schematic so it is not clear to you why the ground loop is causing signal noise.
The SSR , must be a ZCS type.
You could add a CM line filter to the SSR output and consider shielding your uV thermocouple signal.
The temperature control system exhibits a 20 second oscillation so it is clear the PID parameters are not optimized, but a secondary issue.
There are 100 or 120 half cycles per second available for switcher heater power, there ought to be plenty of time to anticipate the probe temp and regulate the heater but the PID output is clearly noise during the heating phase of the 20 second cycle when temp is below average. The lack of spurious signals after 550s clearly indicates the SMPS for the laptop charger is contributing to thermocouple noise which is inverted to PID output. |
H: Short circuit = zero voltage?
Reading this question and its answers (as well as other questions), it seems that in an idealized short-circuit with zero resistance, one concludes the voltage is zero.
This seems completely wrong.
The justification is given by V=IR. Assuming current is finite you would indeed conclude that V=0. But why would you assume finite current?
Yes, real-world currents must be finite, but real-world resistances must be nonzero. This is an idealization; the idealized values don't have to be physically attainable.
And, in a real-world approximation of an ideal short circuit, one sees very large current; nonzero voltage, infinite current, and infinite power seems like a much more accurate idealization than the finite current, zero voltage, zero power idealization.
Thus my question. Is this idealization of finite current and zero voltage really the common one to make? And why?
Edit: to make it explicitly clear, in this idealization, the parameters of the ideal circuit are allowed to attain idealized values — specifically, a priori, a literally infinite for current is allowed (for mathematical precision, I mean the extended real number ∞). With R=0 and I=∞, Ohm's law puts no constraints on the voltage; every extended real number value for V is consistent.
AI: No resistance. Finite current. No voltage across. These are the assumptions for an ideal conductor. That makes the short circuit look like an ideal conductor. When doing benign [small signal] circuit analysis, the ideal conductor assumption is useful. When analyzing something less benign that can glow and melt, ideal conductor assumptions might no longer be useful.
Different kinds of assumptions for different kinds of problems. |
H: 'Leftover' voltage when using constant current
I came across this circuit,
simulate this circuit – Schematic created using CircuitLab
Which states that the current through the LED is equal to 0.5*R2/1000. I'm not 100% sure how to come to that conclusion, but that is only a part of my question (a part that I am still happy to have answered! :))
My main concern is as follows: Let's say I choose R2 = 40 ohms and the current through the LED is therefore 20 mA. And let's also say that, from the datasheet, the forward voltage of the LED is 3 V. From Ohm's Law the voltage across the resistor is equal to 0.02 * 40 = 0.8 V. What happens to the remaining 1.2 V from the constant 5V DC voltage source?
I'm reluctant to test this circuit without knowing the answer in case it causes excessive heating or damage to my components.
AI: The remaining voltage will be dropped across Q1. Or, the voltage across Q1 will vary to ensure that 20 mA flows through the LED and R2. |
H: Type-C Cable : Different between Active cable, Passive Cable, EMCA
Please anyone help me to clarify different btw Active cable, Passive cable, EMCA.
Their definition seem difficult to understand.
Additional, in USB-TypeC Specification from usb.org:
Active cable : An Electronically Marked Cable with additional electronics to
condition the data path signals.
So what's meaning of "electronics condition the data path signal" ? And what is its purpose?
Thank you!
AI: "Active cable" has "additional electronics" called "re-driver". USB 3.x signal pairs are unidirectional. When a signal propagates along a cable, it gets unevenly attenuated and loses its original shape. A re-driver takes input signal, and amplifies and shapes it up (adds de-emphasis and equilization) to correct the signal degradation over physical channel (cable's transmission line). The other channel works in opposite direction. General description can be found in here, and details in this ElectronicsDesign article.
Re-driver ICs are manufactured by several companies like TI, NXP, Pericom/Diodes, PI2EQX502 is an example. |
H: Voltage through resistor connected to tesla coil
I have been reading up about tesla coils and wondered what happens in a tesla coil circuit.
If I have a tesla coil producing around 40KV in close proximity (around 10mm spark gap) to a metal pin that is connected to a 1 ohm resistor and then ground, what value would I expect to see if I measured across (assuming that there was an arc between the tesla coil and metal pin):
The spark gap
The resistor
Would the total voltage that I measured be equal to the 40KV from the tesla coil, and would the voltage across the resistor be equal to or a lot less than the 40KV of the tesla coil?
Thanks
AI: DC gas-discharge voltage (post-breakdown spark-gap voltage) isn't simple, and depends on the spark-length, value of current, the type of metals, the time-length of the spark, the temperature of the metal surface, the gas mixture, initial gas temperature, dust contamination, etc. Spark-plasma is a fairly good conductor. Roughly expect the voltage along the spark to be somewhere between ten and a few hundred.
So, the voltage across the resistor will briefly be about 40KV, minus the small voltage which appears across the spark. VERY briefly.
After some nanoseconds, the voltage of the Tesla Coil will have collapsed. Its stored energy was discharged. (A Tesla Coil's secondary coil is something like a capacitor, also something like an energy-storage inductor.) The energy which had been stored in the Tesla Coil will mostly end up inside the spark-plasma, with some being deposited into your 1-ohm resistor. Use a much large resistor value if you want the energy to mostly end up inside the resistor.
Find books on DC gas-discharge at one atmosphere. It's an ancient topic, so not much exists online. Here's the V-I curve for a fairly long discharge in a neon tube:
https://www.plasma-universe.com/File:Glow_D.jpg |
H: Voltage divider in voltage mode control of Buck converter
What is the need of voltage divider in buck converter?
I am not able to understand that why can't we connect output voltage as a feedback voltage to the error amplifier
AI: If the output voltage you want is equal to the reference voltage used by your buck controller, you may be able to connect the output directly to the feedback pin.
But usually, the reference voltage is a fairly low value like 0.8 or 1.2 V. A typical controller will adjust the duty cycle until it sees an equal voltage at the feedback pin.
So if you want a higher output voltage than that, you should create a voltage divider that will produce the reference voltage value at the feedback pin when the output has reached the voltage you want.
Conceivably, somebody could produce a controller IC that allows you to supply your own reference voltage, but voltage dividers are cheaper and easier to make than good references, so most customers would prefer the controller IC provide a fixed internal reference and let them just make a voltage divider. |
H: Ethernet RMII on two layer PCB
INTRODUCTION: I'm aiming to design an Ethernet connected system as a hobby ( ie. plenty of time but not wishing to spend much ). My design constraints would ideally be sticking to a 2 layer 100mm x 100mm PCB with 0.3mm min holes and 0.15mm min track/clearance, up to 0.6mm thin total stackup. The cost of producing a 4-layer PCB in my known manufacturer exceeds that of components at the quantities I need ( only one really, but up to 10 PCB go for the same cost in my particular case ).
MY APPROACH: A ATSAME54N20 microcontoller with built-in Ethernet MAC connected with a RMII to a KSZ8091RNA PHY in Altium Designer.
QUESTION 1: What are my odds of success? Maintaining 68ohms characteristic impedance to GND ( GND still not poured ) for RMII traces seems impossible even with the 0.6mm total height stackup option, yet maximum trace length is less than 30mm, with traces like CLK being 4mm long. Are ringing and reflection problems likely to arise in a circuit like this?
QUESTION 2: Both TX traces are routed together and separate from RX ones, though no length matching was done. Should I consider tight length matching tolerances?
QUESTION 3: The highlighted NET spares vías by going through two unused pins which would be set to high impedance. Is this common practice? Is signal integrity affected by doing this? Is using vias better practice?
NOTE 1: I found topics discussing running traces through NC pin pads, in my case I'm wondering about well documented unused pins. I also came across this post, yet I'm planning to reflow solder this board myself and lack experience in doing so, thus I would prefer to avoid cutting pins off and dealing with uneven surface tension forces acting on the chip.
NOTE 2: 100ohm differential impedance tracks from the PHY to the magnetics haven't been run yet, but they come out of the PHY without coming close to the RMII signals.
NOTE 3: I take this opportunity to thank the community for their knowledge and help. I hope someone finds my post useful in the future !
FOLLOW UP:
All RMII nets were length matched to 29.9mm +/- 0.1mm.
Unused pins weren't used for running traces.
Stackup consists of a 1.6mm total thickness board and no controlled impedance was made.
GND still needs to be poured, along with some 3.3V polygons, not breaching under any tracks.
Is this design better?
Does it look like it could work?
FOLLOW UP 2:
- A coplanar waveguide with ground was implemented for a closer impedance match.
The most comprehensive answer to the correct transmission line impedance for RMII traces I found was Wikipedia:
The RMII signals are treated as lumped signals rather than transmission lines; no termination or controlled impedance is necessary; output drive (and thus slew rates) need to be as slow as possible (rise times from 1–5 ns) to permit this. Drivers should be able to drive 25 pF of capacitance which allows for PCB traces up to 0.30 m. At least the standard says the signals need not be treated as transmission lines. However, at 1 ns edge rates a trace longer than about 2.7 cm, transmission line effects could be a significant problem; at 5 ns, traces can be 5 times longer. The IEEE version of the related MII standard specifies 68 Ω trace impedance. National recommends running 50 Ω traces with 33 Ω (adds to driver output impedance) series termination resistors for either MII or RMII mode to reduce reflections. National also suggests that traces be kept under 0.15 m long and matched within 0.05 m on length to minimize skew.
Some others include the RMII v1.2 spec:
All connections are intended to be point-to-point connections on PCBs. Typically these connections can be treated as electrically short paths and transmission line reflections can be safely ignored. Neither a connector nor a characteristic impedance for electrically long PCB traces is within the scope of this specification.
The output drive is recommended to be kept as low as possible to minimize board level noise and EMI.
And a Sun Microsystems guideline:
Like the MII signals, the GMII signals will be source terminated to preserve the signal integrity per the following equation:
Rd (Buffer Impedance ) + Rs (Source Termination Impedance = Z0 (Transmission Line Impedance).
All RMII nets were length matched to 40mm +/- 0.1mm.
Unused pins weren't used for running signal traces.
Unused pins were used for GND and 3.3V connection.
Stackup consists of a 1.6mm total thickness board.
Is this design better?
Does it look like it could work?
Is tying some pins to 3.3V or GND acceptable? I could do without this practice.
How many vias should I place along the coplanar waveguide? There's extra space for more vias ATM.
GND traces between signal traces get up to 0.15mm wide, is this OK?
Thanks in advance for your kind help answering ! I really appreciate it !
AI: I think you'd be good for 100BaseT (50MHz RMII signals), although for other reasons I think this is still a risky design. I don't have the time to go through a thorough timing & impedance analysis, but I can offer the following off-the-cuff comments:
a) Whilst I have no idea where you're located or whether you have access to a credit-card, 4-layer PCBs are very affordable from many PCB fabricators. OSHpark.com comes to mind. By dealing with this limitation, your (b) problem (next point) is avoided too.
b) Connecting to "NC" pads is risky and pretty much a no-no in a professional setting. Maybe they're really "NC", or maybe they're "reserved" for some future use on a updated piece of silicon that not only goes into a new closely related IC, but also future manufacturing of this IC. Obviously there'll be lead-frame in there, but maybe also bonding wire to silicon. You just don't know, not today, and not in the future. This is why the mfg says "No Connect"! That "well documented" (says who?) NC today could become connected to some silicon tomorrow. But maybe this doesn't matter in your situation for a one-off.
c) Signal speed through copper on FR4 is about 6"/15cm per ns. Judging from the KSZ8091 datasheet (7.0 Timing Diagrams), I think you'd want your timings to be accurate to within 1ns. So you've got plenty of space (length) to work with here, way more than your currently 'cramped' layout; from a timing perspective you don't need to be that close to the MCU. Personally I wouldn't get too caught up on timing & length-matching in this situation, I don't think it'll matter. Having said that, it's good practise for these fast signals to be the same length, because this does matter in faster designs. Good thing you have the space to pull the PHY chip further away from the MCU to give you space for length-matching.
d) Signal Integrity & impedance: With your bottom-side ground being 0.6mm away, it doesn't get you much coupling or impedance control. This is why 4-layer PCBs exist :-). If I were you I'd use that extra space (distance between PHY & MCU) available (from a timing perspective) to also add some 0402 resistors in series with these 50MHz signals (placed closest to source), so that you've got the option to slow them down and bring the R component of your impedance up, in case ringing (reflections) is a problem. If you do stick with a 2-layer, then I'd also use that available space between PHY & MCU to add some Ground-connected copper pour on the top-side between these high-speed signals.
Interestingly, I saw something curious in Netgear's cheap GS305 (right), and even cheaper (left) GS105 5-port Gigabit Ethernet switches. IIRC, being Gigabit, these will be ~250MHz signals out to the magnetics, where one would think impedance control would be more important. Then again, I suspect their magnetics are only rated for 10/100BaseT, not 1000, but they seem to be getting away with that, too!
The GS105 even cheaper model is only 2 layers: |
H: switch mode power supply diodes
Hello I have a question on switch mode power supply diodes.
Usually switch mode power supplies have a rectifying diode at the transformer output.
Do these diodes regulate the transformer output or do they just rectify the output?
For example a transformer with a 12 volt output ac when the diode is put on the output and then filtered charges the capacitor at peak voltage will then be higher
so what i want to know is i have a switch mode power supply that has a winding and the a diode i have never seen before (a black diode with a green band)
and there is no voltage regulator just a 35v capacitor and inductor and then another capacitor like the circuit shown on the output
So is this type of diode a normal diode how would i determine what it is
(also the SMPS is out of a dvd player)
it has a similar winding but negative. which works but this diode is burned out
I know diodes have a voltage drop that why I'm asking this i just want to substitute it.
AI: CR2 is a normal diode. At least it's a normal fast diode, a slouch like 1N4004 will not do. It's likely to be a schottky, which is fast and lower forward drop then a silicon diode.
Regulation of output voltage is achieved by adjusting the amount of power Q1+T1 pushes into the output pi filter.
The box marked 'ref' is really a difference amplifier with one input set to a reference voltage, which detects the output voltage, and controls the power transferred as required. |
H: opamp voltage offset balance resistor for varying input Z
I'm using a non-inverting amplifier to amplify AC signal, datasheet of my opamp say this
balancing resistor be used to reduce the offset errors, balancing resistor equals the parallel combination of R IN
and R F
But my input terminal(+) has an impedance (LC filter) which will vary according to the input frequency, now I cant choose the fixed balancing resistor, how to solve this problem
AI: But my input terminal(+) has an impedance which will vary according to
the input frequency, now I cant choose the fixed balancing resistor,
how to solve this problem
If your input source has a DC impedance then this is subtracted from the 7.5 kohm and what remains becomes Rb.
If your input source is capacitively coupled then you need to use a resistor from +in to ground and this would be 7.5 kohm in the example.
Alternatively, choose an op-amp with much lower input bias currents. You'll still need a resistor to ground though if capacitively coupling.
The bigger picture is that the op-amp will have an input offset voltage and this can only be countered by Vos nulling. So, if you don't use a Vos nulling circuit, there's no point worrying about resistance matching if the bias current induced error voltage is significantly less than the op-amp's inherent input offset voltage. |
H: Floppy / Brushless DC motor speed regulation
I have a non working TEAC FD-235f 161-U, which is a rather rare (nowadays) 3-1/2" Amiga floppy drive.
A cap had leaked over the PCB and eaten away at the traces. I jumper wired the broken traces and replaced the cap with a through hole 4,7µF electrolytic cap.
https://imgur.com/a/zD79Z
I know its not pretty but its the best I could pull off with my shaky hands.
I triple checked the new connections and they are ok with no solder bridges on the little pins or anything.
The drive is still not reading any disks. When inserting a disk, the flywheel spins up to 800rpm (while it should be exactly 300) and the head is clicking a few times as if it was reading, but it stops and goes back to 1.3 boot screen.
My multimeter is giving me a reading of 13,5hz at the hall sensors output pin, which would equal something around 800rpm.
I noticed the cap I replaced had the wrong value, the original one had 10μF. Though replacing it with a correct one didn't do anything to the rotation speed.
I even tried a different ceramic resonator from a similar drive, and also removed the VCC from the hall sensor to see what happens. Nothing, rpm stayed the same.
I wonder if the hall sensor is involved in speed regulation at all.
Big problem is that I cannot remove the flywheel to see where the motor is powered from, because the screwhead is b0rked but still firmly attached.
I can confirm the hall sensor is working properly (as is my multimeter, I just did an aural RPM check by duct taping something to the flywheel which produces one click per revolution, recorded that and measured the time between clicks. 13,5hz is correct, the drive is really spinning at around 800-810 rpm. Darnit
Neither my meter nor my newly aquired scope is able to verify the correct operation of the resonators (because of limited bandwidth), which should generate a signal of one Mhz for 300rpm. Since two resonators produce the same result I can only assume - with my limited to non existant knowledge of brushless dc motors - that the controller IC must have gone bad. I dont have a similar one or I'd just swap and test.
Sorry for this wall of text. So my question is, what could be the possible causes of a brushless DC motor exceeding the nominal RPM of 300 by 500?
Could it be that it has MORE hall sensors below the flywheel that I can't get at (yet?)? Wouldn't the motor not move at all if the controller would have gone bad?
This tech is so old that I can't find schematics for this device, not even datasheets for the controller IC of the motor or the resonator.
AI: I wonder if the hall sensor is involved in speed regulation at all.
It's not. That hall sensor is only used to generate the 'index' pulse which indicates the start of the track. It produces one pulse per revolution.
Could it be that it has MORE hall sensors below the flywheel
Yes. It will probably have 3 hall sensors between the coils. If any of these sensors weren't working the motor probably wouldn't run because the commutation sequence would be wrong.
It also has an 'FG' (frequency generator) coil, which is a zig-zag track on the PCB under the outer edge of the rotor. If the FG track was broken the motor would speed up trying to match the reference speed setting, which is the symptom you have.
I suspect that either the FG track is corroded near the capacitor, or there is something wrong with your repair (broken track, bad joint, short) which is affecting the FG circuit.
Example FDD spindle motor with rotor removed:-
Example FDD controller speed control circuit (BA6486FS):-
I cannot remove the flywheel to see where the motor is powered from,
because the screwhead is b0rked but still firmly attached.
Try softening the glue with a soldering iron, then grab the outside of the screwhead with sidecutters and turn it. Note that this screw may have a left-hand thread! |
H: Placement of ESD resistor
We have a circuit that has a 6V input for charging. We want to protect the device from ESD on the input, but have some discussion on where to place a resistor. The two differences we are looking at are below.
In the first case, we have the argument that the series resistor will slow the input charge somewhat, making life easier for the ESD diode and thus making it more effective.
In the seconds case, we have the argument that the ESD diode is left alone to do its job, and the series resistor can help absorb whatever the ESD diode doesn't handle.
Is there a common practice where to put the resistor and if so, why?
simulate this circuit – Schematic created using CircuitLab
simulate this circuit
AI: The series resistor indeed does "slow down" the ESD pulse but that's not the complete story. The function of a series resistor is also to dissipate the energy of the ESD pulse and also limit the current. Limiting that current can make the ESD pulse longer which is good as the pulse will be "less intense" (longer in time at a smaller current) and therefore easier to handle by the ESD diode. For this, the first solution is the best.
The second solution is worse as a severe ESD pulse can break the diode as there is no extra series resistor to lower the current. Also here the resistor relies on the ESD protection present in U1.
Another/additional solution for this charging input, provided it will only be used for DC, is to add a capacitor. For example in parallel with D1 you could place an (electrolytic) capacitor of 1 uF to 10 uF or any other value you have available. In combination with the first circuit (diode at the left) that would really slow down the ESD pulse and provide very good protection. |
H: Extend linearity range of this opamp circuit
Sorry if my question is too naive, I'm new to this. I am trying to design a controlled current source for currents up to about 1A (diagram below). My requirement is that the current depend only on the value of a single voltage source and a single resistance (which I can precisely choose).
simulate this circuit – Schematic created using CircuitLab
The problem is that the output voltage of the op-amp = gate voltage of MOSFET is becoming equal to the rail voltage, causing saturation at about 300mA itself (i.e. before reaching 1A). Is there a way I can improve the above circuit to prevent the op-amp from saturating and getting a 1A current?
EDIT: I've changed the design following τεκ's answer and swapped the FET and Load. This should ensure that FET's source voltage doesn't go above 5V, but the gate voltage still goes to 14V and saturates the op-amp.
Thanks in advance.
AI: With a 5 ohm sense resistor and a 5 volt control signal you will get 1 amp through the load if the load's value of resistance is low enough. For instance, if the load is 10 ohms then you need 15 volts at the source of the MOSFET to drive 1 amp through 10 ohms plus 5 ohms.
Plus you need another 2 to 10 volts more on the gate to get enough conduction (generalism alert) through the MOSFET. So, given your values, even if the load was zero ohms, you will need a supply voltage that is at least 7 volts and more likely 10 to 15 volts. This assumes the op-amp output is rail-to-rail.
I will note that you have shown V2 as 1 volt and this could only ever push 200 mA through 5 ohms.I assume this is an error on your part as is not putting a ground symbol at the bottom of R1. |
H: Why do generators have to rotate at a slower frequency if demand outpaces the supply?
EU residents might have noticed that some of the clocks in their house have been running out of sync with other clocks. Apparently, the cause for this is that power suppliers had to reduce the frequency at which the AC network alternates the current flow. I understand that the speed at which these clocks tick is based on the frequency of the AC network, so thus far it makes sense. The thing I don't understand is that according to reports, the reason the power suppliers had to reduce the frequency was because a regional provider in the Balkan did not provide their fair share of power to the grid. I read the article of the Swiss power grid website at https://www.swissgrid.ch/swissgrid/en/home/experts/topics/frequency.html which states:
If the consumption of electrical power is lower than production, the frequency is higher; if consumption is higher than production, the frequency is lower. The reason for this is as follows: the electrical generators of an electricity grid rotate more readily and faster when consumption is low. Consequently, they rotate with a higher frequency. Conversely, the electrical generators rotate more laboriously and with a lower frequency when consumption is greater.
So the generators have to rotate at a slower pace if demand is greater than supply. Why? I mean, I don't even understand how the grid remains functional if demand is greater than supply. usually if demand is greater than supply, part of the demand doesn't get fulfilled. I might misunderstand how the power grid as a whole deals with a situation like that. I especially don't understand what the link is between the undersupply on the grid and the mechanical speed of the generators. I know basically nothing about the power grid, so that doesn't help either.
AI: So the generators have to rotate at a slower pace if demand is greater than supply. Why?
That is not exactly true. Power torque X speed. To increase power it is not necessary to increase speed; torque can be increased. Torque is increased by increasing the throttle setting. All generation systems have some kind of throttle mechanism. However, the operation of the throttle is not instantaneous. That leads to a brief reduction in speed when the load (demand) increases. As the various generators connected to the grid slow down, their throttles are automatically adjusted to correct the speed decrease. Electrical grids generally have enough reserve capacity to handle the increased demand. If there is not enough reserve, the voltage and frequency drop may persist for an longer time.
When the demand drops, the generators will run faster than normal for a brief period. That would tend to correct the clocks so that there would be little or no net error over the course of 24 hours. However, if the grid capacity is not sufficient, extended periods of reduced voltage and frequency will result. |
H: When can free-floating electrical contacts become dangerous (e.g., start a fire)?
In general, when should free-floating electrical contacts be considered potentially dangerous? Danger may be direct (e.g., due to electrical shock) or indirect (e.g., due to fire risk).
In this question on SE.SuperUser, a poster asks if it's safe to have two wires for a power switch exposed in their household. Their concern seemed to focus on electrical shock to a person or pet.
The dangers of electrical shock to humans is discussed in these questions:
"How much voltage is “dangerous”?"
"Safe current limit for human contact?"
This YouTube video claims that 12V can start a fire:
Can 12 volts start a fire? Yes! Wake up people. Every day I hear people say "oh it's only 12v it can't do much". Shock wise, you're safe. Fire wise, treat it like line voltage, do it right, and safely. Because this can happen in your car, or even a charger. Electricity is electricity. It causes heat, and under the right condition, a fire...
Keep this in mind with your car audio installation too! Do it right, and make sure it's fuse protected!!
-"Can 12 volts start a fire?", YouTube
Presumably, we can construct hypothetical scenarios in which extremely tiny voltages or currents can trigger an unstable system. This question intends to focus on realistically possible scenarios that could accidentally happen in everyday environments, e.g. in households.
Question: In general, when should free-floating electrical contacts be considered potentially dangerous? Danger may be direct (e.g., due to electrical shock) or indirect (e.g., due to fire risk).
Alternative statement: Bob has an open circuit with two exposed contacts on his bedroom floor, built into into clothing (as part of some prototype wearable device he's working on), or in closet, pantry, desk drawer, or some other messy location where he/someone-else/misc.-items may come into contact with the electrodes. The power source behind the electrodes maintains a potential difference of \$v\$ between them, up to a maximum current of \$i_{\text{max}}\$. As a reasonably educated electrical engineer, Bob understands the potential danger of coming into contact with these electrodes. Over the domain of voltages/current-limits \$\left(v,~i_{\text{max}}\right)\$, in what regions would Bob be:
unconcerned with any potential danger;
mildly concerned with potential danger;
worried;
reasonably certain something bad'll come of it?
Clarifications
Something is "dangerous" if any of the following apply:
Any person or pet coming into contact with the free-floating electrical contacts might suffer physical pain or/and any type of observable physical harm.
It's potentially possible for the electrical contacts to cause any sort of common household item to catch fire when exposed to the electrical contacts at length.
The electrical contacts could foreseeably cause observable damage to common household items, the house itself, etc..
As for risks:
I'm primarily looking for heuristics. The goal is to separate "reasonable safety concerns" from "absurdly paranoid concerns".
Contrived risks may be omitted. This is, I'm sure that we can come up with hypothetical scenarios, e.g. where the electrical contacts trigger a measuring device that intentionally starts a fire; however, I'm concerned with risks that might be accidentally encountered.
Risk-qualification's going to be fuzzy, and that's okay. Perfectly valid answers may declare there to be a grey zones in which the presence-or-absence of danger is unclear/fuzzy.
The electrical contacts may be qualified by:
Being either AC or DC current.
Having any constant voltage between them.
Having any current-limit.
An ideal answer might provide a heuristic that a normal person could use to assess how they should feel about the potential danger from two exposed electrical contacts randomly scattered in their home of a known voltage-difference with a known current-limit for both AC and DC.
AI: The answer is going to depend a lot on what you mean by dangerous. You have to pick a pretty clear definition to measure against before you can answer this question. So let's use EN61010 Safety requirements for electrical equipment for measurement, control, and laboratory use. General requirements. Because I have that to hand. Safety standards for other electronic equipment have similar requirements.
Shock risk
EN61010 defines something as hazardous live if the voltage is over 33Vrms (or 70Vdc) and either the current is over 500uArms (2mA DC) or there is more than 45uC stored in a capacitor.
Fire risk
The standard considers circuits of less than 30Vrms (or 60Vdc) and limited to low currents such that power is less than 150W, and well separated from other higher energy circuits to be a low fire risk. Circuits which don't meet this level must use extra insulation against shorts, or a fireproof container etc. This level is based on there not being anything particularly flammable inside the device where the potential source of ignition is, the levels would be lower around a pool of petrol or a load of dry paper.
Single Fault
This is a more complicated concept. No one failure in the device should allow something dangerous to happen. For example, if there is some mains wiring, and that is separated from the case only by an air gap, that is not OK. The wire could break loose, touch the case, and give the user a shock. You would have to add some extra insulation, or attach the case to a low-impedance safety ground. The point is that a 5V/1A logic supply is not automatically considered safe if it is derived from mains with a transformer and rectifier. To be considered safe, the transformer must meet certain standards so a failure could not result in the low-voltage side getting mains voltage. |
H: Question about digital modulation
So there are several ways to transmit a bitstream but where is the actual info when my carrier is a sinewave?
My basic understanding is we have symbols (phase,amplitude or frequency), we assign bits to these symbols and by modulating or changing those parameters (APSK,BPSK,FSK..) the receiver knows (or tries to decide) what got sent from the transmitter.
So the symbols can be seen as graphical representations of the associated bits?
AI: Your unmodulated carrier is a sine wave. When modulated it can look like this: -
That's called On-Off-keying (OOK) and very similar to morse code. It could look like a version of OOK called ASK (amplitude shift keying): -
And below is an image of ASK, FSK and PSK: -
So the symbols can be seen as graphical representations of the
associated bits?
The words you use do not ring true. Look at the pictures. |
H: Typical wavelength range for solar cell measurement
Why is a wavelength range of 300nm-1100nm usually used to investigate the properties of solar cells (EQE, current generated, etc.)? Is it to reduce spectral impact? I also don't understand what is meant by spectral impact...
AI: Silicon's band gap is about 1.1 eV, corresponding (by chance) to about 1.1 um wavelength. Therefore a silicon solar cell will have practically no response to longer wavelengths than 1.1 um, and it would be senseless to measure its response in that band.
The solar radiation reaching the earth drops dramatically below about 300 nm:
(source)
So measuring the solar cells response below 300 nm would not reflect its ability to extract power from sunlight. |
H: Impedance matching: L-network or micro strips?
I'm trying to embed a u-blox neo6m gps module to an stm32 controlled board. I'm planning to connect the module to an SMA connector and use a 50ohm antenna.
The datasheet of the neo6m states that the impedance of the connection between the module and the antenna must be 50ohm. The datasheet only contains info about the microstrip impedance matching method. However, all the schematics I found online implement LR networks to match the impedance. An example is below,
My questions are: Can I use any of the two methods to match the 50ohm impedance?
Also, if I used the L-network method, would there be anything specific(trace dimensions, planes under the network etc.) I'd need to do when routing the network to the antenna and the module?
Finally, does any of the two methods have advantages over the other? If so, what are they?
AI: I think you are misinterpreting the example schematic. The circuit formed by L1 and R4 is not a matching circuit - it is instead a bias tee/filter used to get the DC voltage from VCC_RF onto the RF line (this voltage is used to power an active GPS antenna).
You can sanity check this by looking at the inductor value. Notice that jwL = j*2*pi*1.6e9*27e-6 gives ~270j kOhm impedance at GPS frequencies - matching components will typically have much lower impedances, and would be more likely to have values in the nH. This inductor is intended to completely block RF, not to match it.
There is no mention in the datasheet of what the impedance of the RF_IN pin is. Typically, if an IC requires an external matching circuit, it will list an input impedance (which may take the form of "R+jX ohms", or "R ohms || ?pf"). Since no input impedance is listed, if you tried to match the chip, what would you match to?
The correct answer is that the chip itself has a 50 ohm RF_IN pin, and should be connected to a 50 ohm microstrip trace, and then to a 50 ohm SMA connector. No other matching circuit is required. If using an active antenna, you DO need R4 and L1, but not for matching.
When using a passive antenna only, R4 and L1 are NOT required, as seen in the following figure from the Hardware Integration Guide |
H: Should circuit breaker be installed before hand switch?
I am a student of mechanical engineering so I am not very familiar with electronics. Recently I started working on a project where I am researching a control system for a motor which does some work. The system is powered by 3 phase AC electricity + ground + neutral which comes from 5 pin socket. The 3 phases then are directly connected to a hand switch (ON/OFF) and then to a circuit breaker. My question is as follows: as a standard or following safety requirements, would it be better, if phases are first connected to a circuit breaker and then to a hand switch?
Thanks in advance.
AI: You said that the power comes from a 5 pin socket. If we assume that you mean a wall outlet, then ostensibly there is already a circuit breaker protecting this circuit. If so, then where you place the selector switch is immaterial now, as the circuit would ALREADY be protected upstream. So you could consider the "hand switch" as an isolator, then the circuit breaker as the motor protection device. Perfectly legitimate if all of those things are true, AND assuming all devices are properly selected and rated for the intended use. |
H: Voltage loss over wire
I need to run 12v across 30 feet of 18 guage wire. The device on the other end consumes 2 amps.
I have a 12v power supply (rated 3A) and I want to ensure the device on the other end gets the full 12v.
I found this post voltage loss calculation but I'm not clear on something. If my power supply can put out 3A and the device only needs 2A, does that mean there will be no voltage loss? (there is no sense wire) Will the full 12v arrive but there will be current loss?
I'm missing something basic here...
UPDATE:
I found 18 guage copper wire has resistance of 6.385 Ohm/1000 feet. so 6.385 * 60feet/1000feet * 2 amps = .76v loss.
From the comments it's apparent that voltage loss is unavoidable. So if I need 12v at the other end of the wire, I will need a power supply with 12.76v output (or adjustable). I already purchased a 12v switching power supply from ebay today for $8 - perhaps i bought too soon. Can these power supplies be adjusted (crack open the case)? Do 12v power supplies really put out exactly 12v? (Or do they put out 13v assume loss on wire, etc)
AI: If my power supply can put out 3A and the device only needs 2A, does that mean there will be no voltage loss? (there is no sense wire)
I'm afraid not but the loss that does occur at 2 A will be less than that for 3 A.
Will the full 12v arrive but there will be current loss?
Current loss implies a partial short-circuit between the feed and return wire - e.g., poor or leaky insulation - and this is unlikely with modern insulating materials. As explained above the voltage will drop.
If you have an option, you could transmit the power at a higher voltage and reduced current and step down to 12 V at the load. AC won out over DC due to the ease of voltage transformation to minimise transmission line losses.
I don't know the exact current draw of the device yet, but I'm told 1 - 2 A is most likely. Its a computing device so it might be sensitive to the full 12v.
It is close to 100% certain that the computing device will use either 5 V or 3.3 V internally for the logic. The 12 V supply will be regulated down to the required voltage. There may be some other components such as display or backlight but these are most likely to be tolerant of a volt variation in voltage. i.e., The device requires 12 V nominal.
If there is no adjustment pot accessible from outside there won't be inside a sealed unit. |
H: How do these buttons work?
I can see traces that connect the corners of where the button is mounted, but it seems to me then that the contacts should be always connected via the metal dome button. There's nothing in the middle on the PCB where the button makes contact whenever it's actuated. Could someone explain to me how these particular switches work?
Thanks!
AI: Notice that the top two contacts (1, 3) in your picture are not connected to the bottom two contacts (2,4). Presumably the switch connects between those two points.
They could be surface mount membrane switches. A membrane switch is basically two conductors separated by a thin membrane that keeps them apart until they are pressed together by an external force. This is what is used by most devices that have flat plastic keypads, like a microwave oven.
Another possibility is that they are capacitance based, and pressing down the dome increases the capacitance, thus causing the trigger. You might be able to figure this out by looking at the chip they are connected to. Some MCUs have built in capacitance switch circuitry and there are also dedicated capacitance switch controllers. |
H: What is the difference between MCPWM and LEDC PWM?
The ESP32 microcontroller has MCPWM units (Motor Control PWM), used to control motors, and LED Control PWM. The ESP32 docs say the LEDC can be used to generate PWM for other purposes as well, and in fact I am using it to drive a servo. However, what makes it different from the MCPWM, which also produces a PWM signal?
AI: According to the ESP32 documentation, the LEDC module has both 8 bit and 16 bit PWM units, so it has a high-speed mode and a low-speed mode. It can drive most LEDs at 1 KHZ or laser LEDs at 100 KHZ, or high-powered LEDs at 500 HZ.
You can use it to amplitude or frequency modulate analog oscillators or audio gain control for sound effects. Your imagination is your limit.
The MCPWM has limited speed but wide pulse-width adjustment. Motors are mechanical devices so feeding them ultra-fast or ultra-short pulses would do no good, unless low pass filters were added, which would waste power.
Motors will work with somewhat fast PWM due to their inertia and high inductance, which acts as a low pass filter.
Normally a motor speed control stays within the range that the motor can filter naturally, due to its inductance. The capture inputs for the motor generate ISRs to judge if motor is overloaded, or an absence of load.
The same ISRs can be used to judge motor current vs. expected current and detect cogging due to a dynamic load. The motors can be synchronous to internal optional clocks.
Here are the links to the datasheet.
LED PWM Control
Motor PWM Control |
H: Multiplexer not switching any audio input
I have designed this audio switch. 1 out of 4 TRRS inputs is selected.
I am testing it but it does nothing.
I press the switch to switch the next channel and nothing works.
The idea here is:
the 555 debounces the key and a pulse is injected on the flipflop when the button is pressed.
the flipflop is a 2 bit counter, producing a sequence from 00 to 11 as the button is pressed repeatedly.
the two bits from the flip flop selects one of the four channels of the MAX359E switch.
The leds display 00, 01, 10, 11, depending on the input selected, obviously...
I am not sure what to do with the mic input in relation to the input/output capacitor. This is because some TRRS inputs, like iPhone's, send a voltage on the mic line, to supply the mic. If I put a capacitor it will remove that voltage...
Any ideas why it is not working? I may have connected something wrong on the test board. I have double checked the connections several times but at this point I may be tired and not seeing the problem or the circuit is bad designed...
Any ideas? Thanks
EDIT: I have modified the circuit according to WhatRoughBeast suggestions.
AI: The most obvious thing I see is that your mux inputs are not ground-referenced. That is, you should have a largish resistor to ground on each analog mux input. If you don't, there is no way to control the "resting" level of the inputs. Try something like 100k.
Second, tie your floating R and S inputs on IC6 to ground. NEVER leave a CMOS input floating - you won't believe the weird things that can happen.
EDIT - In response to a question in the OP comments, you stated that "doesn't work" means that you get no sound from headphones.
Well, there you go. You're not going to, either, with the MAX359. I'm going to assume that you understand impedance/resistance. If you look at the datasheet characteristics (page 2), the very first line is ON resistance, and you should note that typical will be about 1.2 k. A headphone (earbud) will typically have an impedance of about 32 ohms. This means that the signal power at the headphone will be about (32/1200)^2 of normal, or something like 1/1000 of what you expect.
You might try something like this: start by cranking your iphone volume all the way up. Now, make sure that your area is really, really quiet - and I do mean quiet. No background music. Wait a few minutes listening to dead silence. Now put on your head phones and listen, switching between channels and see if you can't hear a faint signal on your desired channel.
The MAX359, and virtually all analog mux ICs, are simply not intended for power switching. They are intended to drive high-impedance loads, such as the input to a subsequent amplifier stage. So, I'd suggest you get an amplifier stage to connect your output to. And a simple op amp won't do very well either, since their outputs are usually not real happy driving loads of less than 500 - 1k or so. Plugging into a headphone amp would be close to ideal.
END EDIT |
H: looking for a device or tester to know if car is electrified
I'm new here and definitely not an electrical expert - so please forgive any lack of clarity and errors in my terminology or tags.
We live in a rural area and drive a plug-in hybrid electric vehicle which we love. However, recently an electrical-related problem has arisen which is causing us great anxiety. There has been a significant increase in rats throughout our region. They climb into engine compartments and chew on (and can destroy) car wiring.
This can be an expensive nuisance in a conventional car - but in an electric vehicle it can be deadly if they chew through the orange wires (higher voltage – I’ve been told 300V). The mechanic that first noticed evidence of rats under our hood told us that if they damaged those wires, the current could arc, thereby electrifying the car body – and electrocuting anyone who then comes along and touches any metal part of the car.
He warned us to take immediate steps to address the issue, so since then we’ve been employing all the rat deterrents we can muster. My husband has been checking under the hood every day before using the car – very, very cautiously and with great anxiety for both of us, as to do so requires him to touch the car.
My question is this: is there some kind of device that we can use to find out whether the car has been electrified, BEFORE we touch the vehicle? i.e. something that would (for example) light up, or make a sound, or some other clear indication, if the car was electrified and therefore dangerous? Perhaps something that we leave attached to the car while it’s in the carport, or maybe a portable device that has insulation on one end (the end we would hold) and conduction on the other end (which we would touch against a metal part of the car). Surely there must be some sort of relevant testing device in existence?
FYI: I checked with the car manufacturer and they do not know of such a device (although I expect it would be of great interest to other EV owners as well). I know that we could purchase insulated safety-rated boots and double-layer rubber/leather gloves, like the mechanics who work on electric cars use – but it’s not practical to don heavy gear every time we want to use the car or even just brush by it as we leave the house.
I appreciate any help we can get on this. Thanks very much.
AI: EDIT -
While addressing the larger picture, I did fail to answer the specific question. The device you want is called a voltmeter. The most common version encountered nowadays is the Digital Voltmeter (DVM). To use it , you hold one lead in one hand, making contact with the exposed portion of the probe, then touch the probe of the other lead to whatever point on the vehicle you want to check. The resistance of the meter will limit any current flow through you to safe (and probably undetectable) levels.
In doing this, your body will act as an antenna, and produce a certain about of erratic reading, but a real voltage will produce a jump and a steady reading.
END EDIT
Sorry, but your mechanic is simply wrong - at least in detail.
If you short any part of the wiring to the car body, you will not produce a hazard to someone touching the body. To do this would require two separate shorts: one at one potential to connect to the body, and another at another potential to connect to a dangling wire which contacts the ground. Without two separate connections at different voltages no current can flow and there is no hazard. Classic example - how do birds and squirrels sit and walk on power lines?
Even if the body panels are metal (and hybrids often aren't, in order to save weight), the enamel/paint will act as an excellent insulator, so simply touching the body will not allow current to flow. This condition of insulation does not apply, of course, to touching exposed metal such as trim and door handles. Nonetheless, just touching an exposed metal surface will have no effect unless some other part of you is touching a different metal surface which for some reason is connected to a different exposed wire from the first.
Murphy's Law applies here, of course, so there may be weird situations which will bite you, but they tend indeed to be weird.
Much more likely, for exposed conductors, is simply burning out electronics or literally shorting out the battery with an attendant pyrotechnic display and possible fire. Not to mention killing the battery.
So, rats in the wiring is indeed something to worry about, but "electrocuting anyone who then comes along" is not really on the list. |
H: What is this circular rod with wired wrapped 'coil' and ceramic capacitor?
Found this in a battery compartment, glued with white gum, however not connected to anything.
It is a ferrite circular rod of 3cm, diameter 6mm and wrapped with some wire (12/13 windings) and connected to a ceramic capacitor of unknown size (very small capacity I think).
I have really no clue what it supposed to be, any ideas?
AI: I'm using 3 pieces of information to suggest a hypothesis as to the function of that device:
It's an LC tank circuit, and so will have an RF resonant frequency (which could be calculated from the values of the inductor and capacitor).
This LC circuit is not connected to anything and so its function must be self-contained, not part of the equipment it was found inside.
It was effectively hidden, by being in the battery compartment (of whatever this equipment is).
Hypothesis:
Perhaps it's a device which allows the device to be detected as it passes a suitable RF transmitter e.g. as used by some shoplifting detector systems, hire shops & even office asset detectors?
Although current systems using that technique can have flat stickers with the L and C formed internally, they use the same basic technique of an LC tank circuit as in your photo, whose presence can be detected when it is "excited" by a transmitter tuned to the LC circuit's resonant frequency. Yours could be a home-made equivalent, or an early version of that technology.
Whatever the equipment where you found it actually is, that LC circuit would allow someone to detect when it passed a certain point (where a suitably tuned transmitter was fitted). |
H: Kicad PCBnew: Cannot figure out why DRC reports unconnected pads
I'm very new to KiCad and PCB design in general (this is my first project). I have just about finished up my first PCB and upon running the DRC realized that two of the pads in my schematic were being reported as unconnected. Here is a screenshot of the whole schematic (the red rectangle is where the two unconnected pads are):
Here is the circuit with the two 'unconnected'two highlighted with the red circles:
I have tried rerouting the PWR tracks in many different ways but the DRC always reports these pads as being unconnected. Hoping someone with more experience will be able to help!
Also if anyone notices any issues with my design please let me know! The board is essentially a 6-channel relay board with some extra bits that are project specific.
EDIT: Thought I should add in a screenshot of the DRC:
AI: It happened to me several times.
You have to draw new connection from the pad to the track. One of the pads is not connected to the track despite it's one over each other. |
H: What is ΔICC term stands for in datasheet?
This is the datasheet of the MUX (74LVC1G157) I am working with. While I was doing the power calculation, came to the following parameter, ΔICC.
1) What is this additional supply current stands for?
2) What is the significance of this value?
AI: To avoid the "additional supply current" Vin must be 0V or Vcc.
Note that ΔIcc is spec'd as Vcc-0.6V.
This implies the beginning towards Vgs(th) output crossover conduction currents which with thermal drift in threshold cause the nominal additional current to reach 500uA max. |
H: What is the total power consumption of a flipflop?
See the datasheet of D flip-flop (74V1G79).
Here the total power calculation is given as follows,
Average operating current = Switching current + Supply current.
But if there is a load in the output side of the FF, (Assume the case of ring counter with output side also with same FF 74V1G79) then total current will be as follows,
Average operating current = Switching current + Supply current + load current.
This is my understanding. Following things need to be clarified.
1) Whether this understanding is correct or not?
2) How can I get the load current? (Checked in the datasheet, but nothing related output drive current found)
Edit
Assume the switching frequency as 500 kHz.
AI: Assume that \$C_{PD}\$ is charged each time the flip-flop is clocked and assume Vcc = 5 volts. Also assume that \$C_{PD}\$ is discharged at the same rate (just for convenience in this example I'm giving). Different logic configurations will have different results so I'm just giving an example.
Energy put into \$C_{PD}\$ when charged = \$C_{PD}V_{cc}^2/2\$ and this is discharged (turned to heat) by the discharge process cyclically at the operating frequency F. This then tells us the power consumed is \$FC_{PD}V_{cc}^2/2\$. If we divide power by the supply voltage \$V_{cc}\$ we get the average current lost by charging up and discharging this capacitor, \$FC_{PD}V_{cc}/2\$ .
I note that from the blue box in the question, the dynamic average current is stated as \$FCV_{cc}\$ so maybe this can be justified elsewhere in the data sheet but, for the physics of charging and discharging a capacitor at frequency F, my answer is correct.
How can I get the load current?
You say in your question that the load is another identical flip-flop hence, you can perform the same maths as above to calculate average load current. I don't know what output frequency is being produced but presumably you do so. do the simple math!
If you also have a resistive load that is switched on and off then the average current for that is simple ohms law multipled by duty cycle.
\$I_{cc}\$ is listed in the data sheet on page 3. |
H: Low cost power supply redundancy
I'm looking at coupling the output of two computer PSUs, driving a fairly stable high power project (around 300-400W peak) most likely using all output rails (12V, 5V, 3.3V) all well within the rated limits of a single PSU. Ignoring issues balancing load between rails on a single PSU, I want to use a second supply as a backup to take the load if the first one fails.
I have two questions for the electrical engineers out there:
1) can I simply use two high current power diodes as simple backflow prevention to allow failover to occur reasonably transparently, by using a common ground and tapping off +12V between the diodes below?
+Vin (1) ~ o----->|----o----|<-----o ~ +Vin (2)
+Vout
I'm thinking of using one or more bridge rectifiers to do this, purely from a cost perspective - they're cheap and ready to use (rated ~50A, maybe more). I'd be applying +V from each PSU to the each of the two AC inputs and taking the output off the + terminal. Is there any problem inherently with this design?
2) I'm having trouble understanding the datasheets, I'm trying to work out (a) what the forward voltage drop will be if I feed in 12V, 5V or 3.3V, hence what the heart dissipation requirements will be, and (b) determine if the voltage drop or heat dissipation requirements are going to be too high for my requirements, in which case I'll work out a relay-based solution instead. Take this one for example:
http://www.farnell.com/datasheets/2341003.pdf
It lists "Forward voltage per leg" as 1.2V, is this the voltage drop? At what temperature? Or is it the minimum forward voltage?
Should I be looking at Schottky diodes instead, as a 1.2V drop is significant on a 3.3V line? Are there any other options I could consider?
AI: 1) Is there any problem inherently with this design? - To maintain optimal cross regulation, the feedback voltage reference for the SMPS control loop is derived generally from one or more secondary outputs which have the lowest voltage/s and the highest power drawn. Having said this, your scheme could work well if the load connected to the output rails are 'not' voltage sensitive and can tolerate the series diode drops (in your suggested scheme, one diode drop per rail irrespective of the diodes selected). Adding Schottky diodes (or similar low Vf Diodes) could likely affect the circuitry powered; especially on the 3.3V rail. Note that the forward voltage of Schottky diodes increase with higher currents drawn. Since your application is meant as a 'back-up' (i.e. Output load is within the power rating of a single Power supply), you needn't ensure that voltages on each of the regulated outputs (especially on the high current rails) being diode-'OR-ed' are closely matched.
2) "Forward voltage per leg" as 1.2V - This implies that while drawing 25A through each diode instantaneously, this single diode would drop an absolute maximum of 1.2VDC; as per your proposed scheme of using 2 of 4 diodes in each Bridge. |
H: Battery level on battery indicator drops when i connect a load?
I've got this cheap battery level indicator that has 4 battery level segments, it is connected to a 12V-18AH lead acid battery that I to charge my laptop and my 1W light bulb.
I really can't seem to understand the behavior of it, as soon as I plug the charger to charge the battery it goes full (4 segments on) instantly, then goes back to original state as soon as I remove it.
And when I start charging my laptop, it always drops a segment, then goes back as soon as i remove it as well.
I feel it's more of a load indicator?!
I would appreciate an explanation for this please.
Sorry for my english.
AI: This indicator is working by watching the voltage across the meter, and that's all it is doing. A battery's voltage decreases as it discharges, so the voltage gives you a rough measurement of the charge level.
However the voltage also decreases depending on the amount of current being taken from the battery. This effect is greater (more decrease) on smaller batteries.
A charger is like the opposite of a load. It pushes current the other way through the battery, which causes it to charge and which causes the voltage to rise above the normal battery voltage. |
H: Right hand rule for clockwise and counter clockwise direction
If the conductor 'CD' rotates in clockwise direction in the figure, voltage will be induced on it. What will be the polarity of the voltage on terminal of the conductor 'CD' when the conductor rotates in clockwise direction according to the right hand rule.
If the conductor CD rotates in counterclockwise direction what will be the polarity of the conductor 'CD' on its terminnal? Will it be same like when the conductor was moving in clockwise direction or will be opposite that that according to the Fleming's right hand rule?
?
AI: Just consider a single conductor connected to an ammeter: -
Picture source
So, if the conductor is moving upwards (as shown), Fleming's right hand rule tells us that current will flow into the page (as shown): -
Align your hand so that your index finger is pointing left to right to correspond with the field line directions of north to south in the top picture.
Now, if the force was downwards you would have to rotate your hand through 180 degrees to keep the field in the same direction but now your thumb (movement) would be pointing down. This means your middle finger (current) is pointing outwards from the page.
So that's the currents but what drives that current? An induced voltage drives the current and that has a polarity that must reverse direction to drive current in the opposite direction.
If the conductor CD rotates in counterclockwise direction what will be
the polarity of the conductor 'CD' on its terminnal?
If CD is moving down through the magnetic field and is beginning this process at the top (as shown in the OP's diagram), then a voltage is induced that pushes current in the direction D to C (note that N and S are in opposite places on my diagram to the OP's).
Notice also that rotation direction is irrelevant because the same voltage (amplitude and polarity) will be produced when the wire moves downwards through the magnetic field irrespective of whether it takes a counter clockwise or clockwise route. |
H: Practical way to generate 1500V?
In designing the power supply for an radiation detector, I need to supply up to 1,500V at 2 mA from mains (170 Vdc).
I've largely considered a flyback converter, but cannot find a flyback transformer with a voltage gain of N=~16 (for a voltage gain of 8 at 50% duty cycle) rated for 1,500V at the output winding.
Looked into charge pumps/voltage multipliers some, but not yet in depth.
Also just recently learned about CCFL inverter transformers, but still need some time to understand them better.
This project requires a small size and weight, so using a large transformer is not preferred.
What are other ways to step up voltage which I may look into?
AI: Try researching Geiger counter power supplies. They don't produce 1500 volts but they do lend themselves for modification such as this design: -
Picture from MAXIM website.
As you can see, the output stage is a Cockcroft-Walton voltage multiplier, so you can add more stages and get more output voltage. Alternatively, you build two of these (with fewer added CW stages) and make a bipolar supply that spans +/-750 volts.
The circuit above runs from 5 volts, but the principle is the same for any DC supply voltage; you make a (circa) 50 kHz oscillator and amplify it to produce a large peak-to-peak voltage swing, then use the CW multiplier to make a larger DC voltage.
More Geiger Muller tube power supply images |
H: Shouldn't internal input resistance of a transistor be almost zero?
I am absolute beginner in electronics and the whole transistor thing is not looking very intuitive to me. Suppose this problem, in active region input terminal voltage almost remains constant with change in input current for a transistor. So, in terms of h-parameters, shouldn't \$h_i\$ (i.e. short circuit input impedance) be almost zero instead of a significant (typical 600-900 ohm) value?
AI: So, in terms of h-parameters, shouldn't \$h_{i}\$ be almost zero
Consider that the input to a BJT (in a common emitter configuration) is basically just driving a forward biased diode. Here's what a 1N4148 looks like just as an example. BJTs will be a little different in terms of collector voltage influences but well-within the same ball-park: -
So if you looked at the slope of the graph you could calculate dynamic input resistance versus forward voltage. At 0.8 volts the forward current is approximately 10 mA. At maybe 0.75 volts in, the current is about 8 mA. This means the dynamic input impedance is (0.8 - 0.75)/0.002 = 25 ohms.
At about 0.6 volts, the forward current is about 1 mA and if the voltage reduced to 0.55 volts, the current would be about 0.8 mA. Thus the dynamic resistance is now about 250 ohms. |
H: Alternative to LM317
I am working on a battery charging circuit based on a solar panel and require a constant voltage supply of, let's say, 5.0 V to the battery. However that's not what one gets from the solar panel. This calls for the use of a voltage regulator.
The constraint here is that I shouldn't be wasting much power from the solar panel through a standard linear regulator like the LM317. Is there any alternative to this?
AI: When using a solar power source your voltage input has a very wide range from zero up to more than you need, hopefully.
Using a standard linear regulator will therefore only work when the solar panel is producing more voltage than the minimum required for the regulator to control the output voltage. If the voltage from the solar panel is less than that the regulator will simply pass it through with a voltage drop.
Further, a linear regulator's efficiency drops off quickly as the input voltage rises. This wastes power and creates issues with heat control of the regulator.
For applications like this you need to use a buck-boost, also known as step-up/step-down, switch-mode regulator. Example
These circuits use pulse width modulation control of current through an inductor to efficiently convert the input voltage into your desired output voltage.
When the input voltage is higher than your desired output they operate in "buck" mode. When the input voltage is less they utilize boost mode.
You can expect efficiencies in the high nineties when operating in buck mode and at least in the eighties in boost mode.
There are numerous cheap and small buck-boost regulator boards available on-line. Chose one that outputs the voltage level you need and accepts the kind of input voltage range you expect to receive from your panel. Make sure the device has the current capability you need.
NOTE: You may however still need some sort of circuitry to disconnect the power source when the voltage drops below your required low limit. Better boards may already include that feature. |
H: A question about impedance on a multiplexer
I have designed this audio multiplexer
This is a 4 input TRRS audio switcher. Remember TRRS (4 pins: mic, left, right and ground).
I press a button and I change the input that I want to send to the output.
This switch is supposedly to work as a "universal" switch for all kinds of inputs and outputs.
Unless I connect the output of this circuit to a pre-amp, the output will always be a headphone.
But this is my problem:
Apple earbuds are 23 ohms, Audio-Technica ATH-M50 is 38 ohms, Sony MDR7506 studio headphone is 63 ohms and more pro headphones have higher impedances.
How do I deal with this?
Suppose this switcher were created with a rotary mechanical switch. Then, the input that I select would be directed to the output. So the impedance of the device at the input of my circuit would be "passed" to the output. End of story.
But this is digital. Is the behavior the same? Should I do something or let this the way I have designed and simply add a pre-amp before the output to amplify any signal that is too low?
AI: Apple earbuds are 23 ohms, Audio-Technica ATH-M50 is 38 ohms, Sony
MDR7506 studio headphone is 63 ohms and more pro headphones have
higher impedances.
How do I deal with this?
I'd add a small stereo power amplifier at the output just prior to the headphone socket like you mentioned. You don't really want to be passing HiFi currents through an analogue switch like this because of non-linearities in the channel.
Or just swap-out the part for a type with much lower impedance and see if it sounds OK. The MAX309 is functionally compatible and has impedances about one-tenth of the part you are using for instance. However, if you do go down this route you will need to think about making your capacitor signal couplers bigger in value. |
H: Proper Spectrum Analyzer settings to match sweep speed to pulsed signal interval
I was trying to measure received signal level of a pulsed signal (at 433MHz) sending packages of 64 bytes with an interval of 1s. As shown in the attachment, the settings of Spectrum Analyzer are RBW=100 kHz, VBW=300kHz, sweep time=2.5 ms and span=2.0 MHz.
The first problem is the conflict between signal integrity and sweep speed:
When the attenuation got more and more significant (the TX is moving inside a lossy medium), the received signal amplitude got reduced a lot which made it more difficult to detect. That's why I had to broaden the received signal by reducing span and RBW. The result is the received signal seemed to be much "slower" than the transmitted one (which transmitted a package per second). The interval of spikes on SA of the received signal is much longer than 1s. I can't tell if those pulses failed to arrive or I missed them due to I swept too slow.
Derived from the first problem, the second problem is with multiple readings/samplings at fixed intervals:
As I was measuring in a complicated environment, I should take multiple samples of SA reading at each location. And I think I should take the readings with a fixed interval (such as I read SA every 2 seconds or so). However, as the received signal was very "slow" in SA display and didn't follow any periodic norma, I would read many noise floor levelled signals if I read at a fixed interval.
Is any rule of thumb to set the sweep time and RBW so that the above problems could be eliminated?
AI: When dropouts are expected in RF telemetry, I find it easier to go on zero span sweep with SA centered so that any drift can be captured in carrier plus modulation BW. Then using the SA as a scope using very slow sweep to capture say 10 burst events as you find the deadspots in the antennae. Thus 1s/div
Minimize RBW and VBE to optimize SNR on display without errors from Tx drift and SA being too narrow.
For missing bursts, you are only interested in the top 20dB BW and not -60db. |
H: Should the error term of PID be normalized?
By "normalized", I mean +/-1 ~= the maximum error the system can reasonably be expected to experience, or divided by the setpoint.
Background: I am working on a PID controller for an SSR heater which is very responsive (5°C/s up, 0.5-1°C/s cooldown). The setpoint is in the range 100-400°C. In code, this is implemented as:
$$u(t) = K_pe(t) + K_i\sum_{t}e(t) dt + K_d[e(t)-e(t_{-1})]dt^{-1} + K_k$$
(Summation is just an accumulator and Kk is a small steady-state correction)
This form is pretty common in a lot of the open-source PID code out there. However, it occurred to me that if I were to switch to °F, suddenly my K terms would be off by 1.8. This does not feel very mathematically "pure" to me. Furthermore, I found when trying to Ziegler-Nichols tune it, my critical oscillation is ~24s, but when I put this as Ki, I got wild fluctuations. After some digging, I found the equation listed as
$$u(t) = K_c\left( e(t) + \frac{1}{T_i}\sum_{t}e(t) dt + {T_d}\Delta e(t)dt^{-1} + K_k \right)$$
And I had a lightbulb moment. Is this the more "pure" form to use? This makes more sense when dealing with transfer function analysis and the like.
AI: If e(t) and u(t) are nondimensionalized then Kp is unitless, Ki has units of time^-1 and Kd has units of time. Otherwise they have units from the process.
In the second formulation you've made a mistake. This is the one to use.
$$u(t) = K_c\left( e(t) + \frac{1}{T_i}\sum_{t}e(t) dt + T_d\Delta e(t)dt^{-1}\right) + K_k $$
Then Kc has units from the process and Ti and Td have units of time. This is good because Ti and Td are on the same scale and only Kc has process units. e(t) and u(t) do not need to be normalized because just Kc relates their units. |
H: How to use phasor algebra to solve for capacitive reactance?
I have an RLC series circuit.
Voltage supplied by volatage source as a function of time: \$V(t) = 230 \sin(\omega t+\pi/4)A\$.
Current in circuit as a function of time: \$I(t)=10\sin(\omega t - \pi/6)V\$
The value of the resistance is \$5\Omega\$ and value of inductive reactance is \$8j\Omega\$. I need to find the value of capacitive reactance \$X_{C}\$.
I tried to solve like this (using phasors i.e. polar representation):
$$230/\sqrt{2}e^{j\pi/4} = (5 + 8j + X_{C})(10/\sqrt{2}e^{-j\pi/6})$$
$$\implies 23e^{j(\pi/4+\pi/6)}-5-8j =X_{C}\implies X_{C}=(0.95+14.21j)$$
[Ohm's Law]
However, while writing this, I realized that the left hand side's real part is not equal to the right hand side's real part. When I solve for \$X_{C}\$ I get \$(0.95+14.21j)\Omega\$ which is impossible since \$X_{c}\$ (capacitive) must be imaginary with a phase factor of \$-j\$.
I'm confused about how to use phasor algebra to solve this problem. Any help will be appreciated.
AI: This is how I solved, taking cos as reference to phasor equations:
$$V(t) = 230 \sin(\omega t+\pi/4)$$
$$I(t)=10\sin(\omega t - \pi/6)V$$
let \$(\omega t+\pi/4) = \phi\$
we know:
$$sin\phi = -cos(\pi/2+\phi)$$
$$\implies V(t) = -230cos(\omega t+3\pi/4)$$
$$ I(t) = -10cos(\omega t+\pi/3)$$
Therefore in phasor form, it V and I can be represented as:
$$V = -230 e^{j3\pi/4}$$
$$I = -10e^{j\pi/3}$$
As everything is in phasor form, now we can apply ohm's law directly:
$$230e^{j3\pi/4} = (5 + 8j + X_{C})(10e^{j\pi/3})$$
$$\implies 23 e^{j5\pi/12} = (5 + 8j + X_{C}) $$
$$\implies X_c = 23 cos(5\pi/12) + j 23 sin(5\pi/12) -5 - 8j$$
$$= 5.95 + 22.21 j - 5 -8j$$
$$= 0.95 + 14.21j$$
This will satisfy the given conditions in the question. As we can see the obtained expression for \$X_c\$ has a real part or resistive part and a positive imaginary part or inductive reactance part. Pure capacitance will only have negative imaginary part, i.e, with phasor -90 degrees. |
H: How to create circuit for low voltage trigger of a relay
I have the relay in the picture above and have it powered with 5 volts.
My question is how do I wire up the trigger. Correct me if I'm wrong but I'm assuming that if I send 5v 2a to the trigger pin it will fry it. so how do I drop the multage and or amperage to safely operate this relay. No information came with the relay for the voltage/amperage requirements.
AI: My question is how do I wire up the trigger.
You have provided a diagram that shows you. Connect the 'T' input to GND (DC-) once for each change of state.
Correct me if I'm wrong but I'm assuming that if I send 5 V, 2 A, to the trigger pin it will fry it.
You don't send 5 V to it. You connect it to ground.
Circuits only draw the power they need. If you plug a 20 W lamp into your domestic supply it will draw the current it needs not what the supply is capable of.
... so how do I drop the multage
'Multage' is not an engineering term I am familiar with.
and or amperage to safely operate this relay.
You don't. It will look after itself.
No information came with the relay for the voltage/amperage requirements.
We recommend: "No datasheet? No sale."
The current required by the module will be 99% determined by the resistance of the relay coil. If you have a multimeter and can find the coil pins you can then measure the coil resistance, R. The current, I, can then be worked out from \$ I = \frac {V}{R} \$.
If, for example, the coil resistance is 200 Ω then the current required will be
\$ I = \frac {5}{200} = 0.025 \ A = 25 \ mA\$. |
H: Reading Specs on Motor Drivers
I am looking at a couple motor drivers for a robot I am working on, but I have run into the issue of not really understanding spec sheets and knowing what specs I need to look out for to make everything work. Some of these come up easily on google and others do not.
So what are the specs to normally look out for when wiring up motors and motor drivers?
And what is logic voltage vs drive voltage? (L298n)
Number of channels? (L9110s)
Max continuous per channel? (L9110s again)
AI: IC chips have a logic level that specifies what voltage levels will be read as logical low/0 or logical high/1. The most common values are 5V or 3.3V for logical high/1 and 0V for logical low/0. Drive voltage is the range of voltage the chip can provide to drive the motor itself.
Two channels will simply allow you to drive two motors independently.
The maximum current per channel is the current the chip can provide per channel(surprise!). Meaning in simple terms that once the max current of 800mA is reached, the chip will "cap off" the current. This allows you to determine e.g. whether your chip can drive your chosen motor correctly or not. |
H: PIC16F84A wont run my program on a breadboard
I have written a program on the PIC16F84A and it seems to work perfectly on the PIC testing board. After i had created the program and assembled it onto the PIC, i placed it onto the breadboard and connected all of the inputs and outputs and power lines.
I am using a 2.2 Kohm resistor and a 23 pico farad capacitor for my oscillator values. i have also connected MCLR to V+ WITHOUT a resistor. The rest of my connections are perfect.
However, when i press the push switch to add an input there is no output onto my LED.Do you know if there is a problem with my MCLR connection or is my oscillator speed the fault here or is it something else?
I have tested the program repeatedly to make sure the chip is not damaged or the program is wrong.
AI: Make sure you've set the configuration word correctly for the RC oscillator. Particularly important if your oscillator configuration differs from the "PIC testing board".
Also, you are well below the recommended minimum resistor of 5K\$\Omega\$ for the RC oscillator. It's likely to not work, especially at low supply voltage. Try it with something like 10K and 100pF and see if it runs (albeit slowly). After you confirm that configuration.. |
H: How does this radio transmitter circuit oscillate?
I am trying to understand how this circuit operates.
I understand how the circuit works on the right side of the transistor, but the oscillation stage with the crystal confuses me.
It appears that the crystal has no feedback from the output of the oscillator. I researched this and found out that the collector-base capacitance of the transistor provides a feedback path, but wouldn’t that only give a 90° phase shift instead of the 180° phase shift required for positive feedback?
I have seen similar circuits where a variable capacitor is included with the crystal to adjust frequency. Would that give the phase shift for the remaining 90°?
AI: Yes, it could oscillate, but in a SPICE simulator, it didn't. Not quite. A few component changes did start oscillations. The 7MHz crystal equivalent circuit is a guess (C1, L2, R5, C2):
The base-to-emitter capacitance of the 2N2222 is large enough that this is a Colpitts-type oscillator. |
H: How do relpol RM84-2012-25 relays work?
Again, I am asking noob question because I have no background in electronics. In some installation that I am trying to understand there are those kind of relays, use as a logic for buttons (switches):
I read the manual of relpol, and although I know how relays generally work, I don't quite understand the logic behind it. Can someone kindly explain?
Edit: Just to clarify, I don't understand which wire corresponds to which number on circuit e.i 22,12,24,14 and etc while on the circuit there are 1-2(coils), 4-7 commons and 3 5 7 normally open.
Thanks in advance.
AI: That information is shown in the datasheet.
Figure 1. Relay pinout with alternate numbering systems.
You can be forgiven for being confused if just looking at the relays. (Forgiveness for not reading the datasheet would be different.)
The relays in your shaky photo show the pinout using the numbers 1 to 8. These are shown in parentheses on the pinout diagram.
The relay bases may be from a different manufacturer and show the European contact numbering scheme on them.
A1: DC+
A2: DC-
11 to 12: Normally closed contact 1.
21 to 22: Normally closed contact 2.
The standard would use
13 to 14: Normally open contact 1.
23 to 24: Normally open contact 2.
but in this case the contacts are changeover type so
11 to 14: Normally open contact 1.
21 to 24: Normally open contact 2.
How it works:
When the coil is de-energised contacts 11-12 and 21-22 are closed.
When the coil is energised contacts 11-14 and 21-24 are closed. |
H: Warming up metal plate safely
I want to design a riddle:
1. 12 metal plates on the wall
2. 8 plates at room temperature.
3. 4 plates at 40-45 Celcius(104-113 Fahrenheit), it is important the plate doesn't exceed the temperature limit for safety purpose.
4. players have to identify the 4 warmed plate by touching.
5. the riddle should be run 8-10 hours continuously a day.
The problem I am trying to solve is how to warm up the 4 plates safely for such duration.
Possible options:
1. Simply have a heater blowing hot air behind the 4 plates.
2. Let the plate act like a resistor and apply power to it.
Any recommendation is appreciated.
AI: Figure 1. A 20 W wire-wound resistor.
The simplest thing would be to just heat the plates using a resistor mounted on the back. You could get a hunch of how much power you will need for this by carefully placing your hand on a 20 W lamp to feel the amount of heat it gives out. That should give you a rough guide to how much power you need per plate. Remember that your plate will be dissipating the power over a wider area so the temperature will be lower.
For safety you will need a low voltage supply. Let's say you go for 12 V which are common.
Next from \$ P = \frac {V^2}{R} \$ we can calculate the resistance. If we choose a 20 W resistor it will get very hot at the rated power so we should run it at 10 W to make it safe to touch. So rearranging the formula you can calculate \$ R = \frac {V^2}{P} = \frac {12^2}{10} = 14.4 \ \Omega \$. 15 Ω is the nearest standard value.
One or two of those wired in parallel on each plate should do the job.
Connect all your heaters in parallel.
Total current will be \$ I = \frac {V}{R} \cdot n \$ where n is the number of resistors. |
H: Can no-connect pins on EEPROM ever be connected to VCC or GND?
I created a circuit in which all the address inputs of an AT28C256 are connected to outputs of shift registers (74HC164).
In the future I will do many of these circuits, however I haven't yet decided if I need the full 32KB of memory.
Let's just assume that I later decide I need only 8K of memory for my application (for example, AT28C64).
After looking at the datasheets, I notice the difference in pin-out between the two chips is that on the AT28C64, A13 and A14 are replaced with NC (no connects).
Is it OK anyway to connect such pins to outputs of shift registers (and be able to make a AT28C64 like a drop-in replacement for AT28C256) or are the NC pins internally connected to something?
All chips in my question are DIP ICs.
AI: The datasheet of the AT28C64 makes it pretty clear: There are "No Connect" (NC) pins, those are not connected in the chip so you can hook them up to a voltage. There are also "Don't connect" (DC) pins which you shouldn't connect but the DIP package doesn't have any of those. That's the obvious part.
The not so obvious part is that there are multiple versions of the AT28C64 and some of them have a READY output instead of a NC on pin 1. To avoid shorting things out, you should put a 330 Ohm (or so) resistor in series with pin 1 of the EEPROM so that if you plug in an AT28C64 with a READY output, the current gets limited.
With that resistor in series with pin 1, swapping in an 8K ROM instead of the 32K one should work just fine. |
H: Quadrature encoder - Most efficient software implementation
Simply put, I'm controlling a DC-motor with a dual-channel encoder with a microcontroller for a personal project, and I'm trying to find the "best" software-based implementation of the following state-machine given in this TI reference manual:
Before doing any actual research on the topic, I, being a hot-headed idiot, quickly tried to use a (software implementation of a) D-flip-flop to get the motor direction, and then increment or decrement a counter according to the direction. Half C, half pseudo-code here:
uint16_t counter = 0;
uint8_t direction = 0;
void interruptEncoderA(void){
if(getInput(encoder_a) == 1){
direction = getPinValue(encoder_b);
}
direction ? counter++ : counter--;
}
void interruptEncoderB(void){
direction ? counter++ : counter--;
}
The interrupts happen on both edges of the corresponding channel. This naive implementation has some very clear problems. For instance, when the motor is going back and forth between the edges of encoder B, it will keep counting on the same direction.
I know that this question may actually be somewhat subjective, or maybe even dependent on hardware architecture. What I'm really looking for are your takes on efficient, elegant and simple solutions. If possible, provide a short description of the pros and cons of your answer, or any other insights which you think might prove useful.
Also, feel free to change how the interrupts work. If it is more suitable to only have one interrupt that fires at each clock edge of either encoder A or B, or maybe if you prefer 4 interrupts (one per edge, per channel), go for it. Just make sure it's obvious.
Also, just to make it clear, this question is about a microcontroller implementation, not HDLs.
This question actually has a really nice solution to this problem. My take on this implementation will be in the answers.
AI: Here goes my own implementation.
Using a LUT, one can store the increment that must go into a counter, which determines the position of the rotor.
The index of the LUT is a combination of the current state, the last known state, and the last known direction:
Bits 0 and 1 (the 2 LSBs) are the current state (A and B values, respectively), while bits 3 and 2 are the previous state.
Bit 4 is the previous direction. If a state is missed, the motor is assumed to be going in the same direction as in the last state, thus recovering from a missed step.
Pros: No need for signal debouncing. Small code footprint. Will recover from missed steps.
Cons: CPU time wasted when motor is stopped or rotating slowly. Polling frequency needs to be higher than 4x the maximum encoder frequency (2x per edge, 2 channels).
Pseudo-code here:
int32_t counter_lut[32] = {
//Direction = 1
0, // 00 to 00
-1, // 00 to 01
+1, // 00 to 10
+2, // 00 to 11
+1, // 01 to 00
0, // 01 to 01
+2, // 01 to 10
-1, // 01 to 11
-1, // 10 to 00
+2, // 10 to 01
0, // 10 to 10
+1, // 10 to 11
+2, // 11 to 00
+1, // 11 to 01
-1, // 11 to 10
0, // 11 to 11
//Direction = 0
0, // 00 to 00
-1, // 00 to 01
+1, // 00 to 10
-2, // 00 to 11
+1, // 01 to 00
0, // 01 to 01
-2, // 01 to 10
-1, // 01 to 11
-1, // 10 to 00
-2, // 10 to 01
0, // 10 to 10
+1, // 10 to 11
-2, // 11 to 00
+1, // 11 to 01
-1, // 11 to 10
0, // 11 to 11
};
uint32_t counter = 0, direction = 0, lut_index = 0;
void encoderInterrupt(void){
lut_index |= getInput(encoder_A)<<1 | getInput(encoder_B);
counter += counter_lut[lut_index];
if (counter_lut[lut_index] != 0){
direction = (counter_lut[lut_index] > 0) ? 1 : 0;
}
//Prepare for next iteration by shifting current state
//bits to old state bits and also the direction bit
lut_index = ((lut_index << 2) & 0b1100) | (direction<<4);
}
Tested to be working perfectly on a 100 counts per revolution encoder, with a gearbox of 12.5:1 and maximum 260RPM (after gearbox), making it 5000 state transitions per revolution (100 counts * 12.5 * 4 encoder signal edges), for a maximum of ~22000 state transitions per second.
The sample frequency is set to 100kHz, and the interrupt priority is above all other interrupts, which is not a huge deal considering how little code the CPU actually has to execute. This was tested on a 144MHz Cortex-M4 microcontroller. |
H: 2xAA + 5V Boost Converter: Unexpectedly Low Current Output
I'm quite new to electronics, and decided to make a mobile powerbank for my Raspberry Pi Zero / Phone out of 2xAA Batteries and a 5V, 600mA boost converter with USB output. However, I'm getting an unexpectedly low output of only 0.08~0.10mA @ 4.5~5V when charging! I'm trying to figure out why this is.
My components are:
2x Panasonic AA Batteries at full charge. I'm having a very hard time researching the amount of current these are able to provide, but as far as I understand from the datasheet and a bit of googling, they should be able to output 1000mA above 1.2V
1x 0.9~5V 5V 600mA Boost Converter
2x Small Alligator Clips soldered on to the positive and negative through-holes of the boost converter.
1x AA box where I mount the batteries in series.
By my reckoning, my two batteries should output roughly 1A @ 3V, which equates to 3 Watts. But I'm getting only 0.08A @ 5V, amounting to a mere 0.4 Watts! Even given room for generous inefficiency, something doesn't seem to be adding up. I know that 3xAA chargers can output 500mA @ 5V, so in the real world, I would expect to get at least 1.5~2 Watts output with 2xAA's.
I've also tried some rechargeable NiMH batteries that I have, and had even worse results; only 0.2 Watts.
Why am I only getting a tenth of my expected output?
How can I go about debugging this?
AI: Boost converters are rated by input current, so a 600mA boost converter can't make 600mA at 5V with a 3V input
With alkaline cells you should design for 1V per cell unless you want to waste money replacing the AAs when they still have 80% charge,
For 600mA at 5V from 2xAA input you should use boost converter rated at more than 1.5A. eg: XL6009. |
H: Turn on MOSFet with Optotransistor
I am building a pcb where I will be switching a bunch of MOSFets which are optoisolated. My plan is to do this with optotransistors.
A typical circuit for a transistor controlled MOSFet, which I'm seeing online, is as follows:
simulate this circuit – Schematic created using CircuitLab
My concern about this circuit is that it seems to be inverting. When the input is high the MOSFet is turned off and vice versa.
Would the following circuit be a viable non-inverting replacement?
simulate this circuit
NOTE: Transistors showing second half of optoisolators
AI: Remove R1 (replace it with a short) and it'll work fine with an optotransistor in place of Q1.
It will not work with a regular transistor, however, since Q1 is wired as an emitter follower and won't deliver the full gate voltage. (It will only deliver the input voltage, minus a diode drop, to the gate.) |
H: What is the purpose of this FET load?
I'm used to seeing a load resistor in the place of the yellow highlighted (Q2) section of this FET amplifier circuit.
This is the input section of a guitar overdrive effect, so any distortion created is likely not a problem.
Is this an active load to increase gain or something more / something else entirely?
AI: Is this an active load to increase gain or something more / something else entirely?
It looks like it.
R4/5 set a nominal DC level on the gate (thanks for providing reference designators, makes this bit so much easier), setting a mean level at Q2 source.
Q1 is a single-ended amplifier. R3 biasses its gate to ground, so it self biasses so the current through R6 equals its Vgs-th.
C6/R2 form AC feedback, setting the gain in conjunction with the input R1. As it's fed back, it has a low output impedance.
As it draws current from Q2, the change in voltage at the output feeds back via C4/C3, passing almost all of that change in voltage to the gate. The source follows the gate. The effect of this is to get a large change in source voltage with a small change in current, so presenting a high impedance. I suspect C3 is used to reduce the feedback gain to slightly less than unity, to avoid possible instability in Q2.
This sort of feedback to increase impedance is often called 'bootstrapping', a humorous reference to attempting to pull yourself up by your bootstraps. |
H: Instrumentation amplifier noise amplified
I built a simple circuit with an instrumentation amplifier (PGA204AP) in order to clean a differential signal from noise. The signal is generated few meters away from the acquiring point and the cable (twisted pairs shielded) pass through a very noisy environment.
The circuit is the following :
The shield of the cable is grounded in the Op.Amp side, and in the other side it is not connected. As you can see, the input of the Op amp is filtered through a differential mode filter (R1 R4 and C2) with the cut-off frequency set to ~60kHz, and a common mode filter (R1-C1 and R4-C3) with the cut-off frequency set to ~1MHz.
At the output of the PGA204 I put a 2nd order low pass filter with the cut-off frequency set to ~500kHz.
I tested the circuit with no input, just to see if the noise from the environment would have been attenuated: the noise present in the environment was the following (measured with the scope directly from the cable) :
250ns/div
5us/div
So clearly there was a very strong noise a 2MHz, but once I connected the instrumentation amplifier, the noise was amplified (more than doubled). So I decided to put this 2nd order filter just to see if this 2MHz noise would have been eliminated. But the result was the same, and this seems very strange to me because two completely independent devices have the same issue.
In addition, I tested the device with some noise produced with the signal generator at the input (noise applied at one input, and the other input had it as well thanks to the twisted pairs cable) and the result was the following:
Upper ones are the two inputs, lower one is output. It seems pretty good.
What I'm not sure about this 10k resistor (R5) between V- input and ground. I've been told to put it for the bias current but doesn't it interfere with the LP filters at the input?
Is there something else I should pay attention to with these filters? Suggestion for the next tests I should do in order to solve the problem?
AI: LM358 has very low gain-bandwidth product (1MHz) therefore the Sallen-Key filter topology you used might not work well as a lowpass above a few tens of kHz. What happens is the HF jumps over the opamp through C5, and at HF it doesn't have enough feedback to keep its output pin low impedance, so the HF just goes on to the output. Also as Scott says in the comments, the slow opamp can slew limit on the HF noise, and distort the LF signal.
I recommend simulating its transfer function. See Fig.8 on this document.
Now, looking at the PGA204 datasheet page 6, your 2MHz noise is outside of the PGA204 bandwidth, so it should be attenuated a little bit (or a lot depending on gain, which you don't mention). Also on page 6, note how CMRR depends a lot on frequency and gain setting, CMRR at high frequency isn't very good, so you do need a passive filter at the input to get rid of the HF common mode noise.
If your noise is common mode you have to be careful about common mode to differential mode (CM to DM) conversion at the input of your amp. This occurs when the input impedance between the two halves of the differential pair is unbalanced. It can also occur anywhere on the signal path if an impedance imbalance occurs between the two halves of the pair, for example in the sensor (aka "source impedance"), so you need to check this.
The 10k resistor will play a part, but the most likely culprits would be C1 and C3 if they are low-precision parts like X7R ceramics. A difference in the values of C1 and C3 will create an impedance imbalance at HF between the two inputs, and convert CM noise to DM, which the PGA204 will then amplify.
So, I suggest trying this:
Use a common mode choke on the input, it should have enough inductance to raise the impedance significantly at the noise frequency and above. Or increase R1/R4 to a higher value, decreasing the capacitors value accordingly.
Make sure the filter caps are precision (1%) like C0G ceramics.
Duplicate R5, one resistor per input.
Check your shield connection
If substantial current flows in the shield, make sure it doesn't go through a sensitive ground node on your PCB. |
H: Electrostatic in an Arcade Machine (Arduino)
I set up an arcade machine, which consists of an Arduino, a coin validator, a 12 V adapter, and a PC. It works as expected, when I insert a coin, a signal is captured via Arduino. The output normally stays at 0 V, goes to 5 V when a coin is inserted for a brief period.
The problem is time to time, when I touch the metal part of the coin validator (see picture), it mistakenly sends a signal as if a coin is inserted.
When the metal part of the coin validator is removed, this problem stops.
We use grounded AC socket and connected it to the ground of adapter and Arduino, but it did not solve the problem.
How can I solve this problem, or what might be the source of the problem?
I talked with the seller, and he said our circuit is correct, but he never heard such a problem. It is also possible that wooden part (MDF) plays a part here.
Schematic is below (1K resistor)
EDIT:
I connected only Arduino to PC directly with USB cable, and removed the coin validator, resitor and adapter from the system. When I touch the interrupt pin with a jumper cable, it reads a signal.
AI: You need 10 K pull-up or pull-down resistors and capacitors on input pins.
For 5 V logic, 10 nF to 100 nF works fine. |
H: What is the point of two fuses in series?
I've got a 12V power adaptor (3.8A). And it got two fuses in it (T3.15AL250V, 3AL250V, one of which (3.15A) has blown, along with mosfet, current sense resistor, 450V cap, and IC. I replaced all failed parts, except the fuse (soldered jumper, since I don't have 3.15A fuse for now).
What is the point of two fuses in series? I've never seen anything like this before.
AI: @Qeeet On the first picture, you drew the jumper and the 3.15A fuse as separate objects linking different node (?). Anyway, you have one trace protected by one fuse, another one protected by another fuse. The explanation is that the 3A fuse blows when the MOV (it's definetly a MOV, not a cap) clamps under accidental voltage surge. The 3.15A doesn't blow in this situation whereas it would blow when there is a short circuit but no voltage surge. Probably the 3A is fast acting, since in case of voltage surge you want to react ASAP. And the 3.15A is slow acting as temporary overcurrent may happen in normal situations and become critical only when it lasts more than a few seconds. |
H: backtick in verilog numeric constant
So I was writing some verilog in quartus and wondering why the heck it was misbehaving.
I eventually discovered the problem was some constants where I had inadvertantly used a backtick instead of a single quote. For example I had 32`hdeadbeef instead of 32'hdeadbeef.
What I find surprising is that this compiled, did I find a bug in quartus? is this some obscure bit of verilog syntax? if so what does it mean?
AI: I have just been reading the IEEE standard about macro's and defines. There is nothing in there which says that the macro name must be known. (In your case `hdeadbeef would not match any define).
However I can imagine them not defining that as that would be too far fetched.
Using common sense I would say it is a bug in the parser.
Speculating:
The following is allowed:
`ifdef this_variable_is_not_defined
So maybe the code for that got also used for `this_macro_does_not_exist |
H: Unstable 11-13.8 volts to 12v regulator. DC-DC buck or Zener diode, how to do it better?
I have 12v power source Mean well PSC-60A with UPS function and acid buttery.
In datasheet says, that output can be regulated from 12-15V - but it's not true, because tested results for output was:
from 11v(when not connected to 220v and buttery discharged)
to 13.8v(when connected to 220v and battery charged)
impossible to regulate output to 12v on charging(min about 13v)
regulating output voltage affects to battery charging voltage (
How to get a output with voltage of not more than <=12 volts (+/- 0.5V) with max 2A load on peak (avg load 500-800mA) from this 11-13.8v source ?
Output should be less or equal to 12v.
Which option is better, how right:
use DC-DC buck converter, like D-SUN MP1584 ?
or simple shunt regulator with zener like 1SMB5927BT3G ?
Help me please with this.
Part of used scheme
AI: If all you need is to ensure your load doesn't ever see more than 12V, placing a good and hefty LDO like the MIC29302-12WT will do it. It will need some small heatsink, but especially if those 2A are only short bursts, even the smallest ones will ensure it won't overheat. Take care to look into the datasheet on the capacitor requirements for the input and output of the LDO and place those capacitors physically close to its pins.
On the other hand, if your load requires 12V and cannot live with less than 11V, you may want to place a step-up converter that outputs 12.5V, then follow it with the LDO. If your power supply gives off 13.5V, the step-up converter won't try to do anything, and it is almost the same as if it weren't there. |
H: How Do They Make Surface Mount Capacitors and Resistors?
With the ever decreasing size of surface mount resistors and capacitors, how do they make such small components?
AI: There isn't a lot of written material on the net about discrete component manufacturing. If a picture is worth a thousand words, is a video is worth even more?
Here is a very informative video about ceramic capacitor manufacturing. It starts with a roll-to-roll process with ceramic-coated tape that is patterned, stacked, and laminated. The layers are then mechanically diced into individual components. A large part of the process occurs AFTER the near grain-of-salt sized components are separated, including putting on the contacts.
The video for resistor manufacturing is not as impressive, since it's just an animated representation, but it does show all of the steps. The process begins with a ceramic substrate that is molded with a grid of grooves on one side so that it can eventually be snapped into individual components. There are screen printing steps for the resistance layer, contacts, encapsulation, etc. The process also includes laser trimming the resistance value and separating the parts, but I couldn't find any videos of these steps in an actual production line.
Given the precision and the number of steps required to create these tiny components, it's amazing that they cost so little. I guess that's the magic of economies of scale.
(And don't forget that after the parts are made, you still have to put them onto tape so that they can be easily accessed by the pick and place machine.) |
H: How does an IIR filter change depending on the approximation used?
What are the main differences between the filters when using Butterworth, Chebyshev type I, Chebyshev type II or Elliptic aproximations.
AI: A simple Wikipedia tour (B,CH,E) will tell you everything, but fear not, I can copy and paste some information that is already stated there.
This is how the different filters behaves like:
Image was grabbed from the Wikipedia page.
Given the same order of a filter, the following information holds true:
The Butterworth filter:
Has the lowest ripple in the passband and stopband
Has longest transition band
Requires a higher number of order to get a similar short transition band like the elliptic filter.
The CH1 filter:
Has ripples in passband
Has nearly no ripples in stopband
Has shorter transition band than Butterworth
Has longer transition band than Elliptic
The CH2 filter:
Has nearly no ripples in passband
Has ripples in stopband
Has shorter transition band than Butterworth
Has longer transition band than Elliptic
The Elliptic filter:
Has ripples in passband
Has ripples in stopband
Has the shortest transition band for any given order.
A low order in analog domain means few number of components. Adding more components, like inductors, capacitors can cost a lot.
A low order in digital domain means a few number of additions, multiplication and time delays. Performing an addition, multiplication or a time delay does not cost that much.
You use the elliptic filter if you are okay with ripples in the passband and stopband. This depends on whatever you are working with.
If you want what Butterworth offer but don't want to pay the full price, then use CH2 or CH1, depending on what that matters the most.
If you are dealing with high quality equipment, and/or you are working with digital filters which means a higher order filter is very cheap, then you can easily use a butterworth filter. The best kind of filter, and the most expensive order wise. |
H: Am I using AC relays correctly?
My original question was put on hold because a number of people found it confusing. Drew figured it out, however, and set me down the right path with relays (not diodes). There is still one issue outstanding, so I'm updating my question based on my newfound understanding of relays.
THE BASICS
I'm wiring a vintage traffic light for novelty use in my home.
I purchased a controller that sends load to the G-Y-R lights in
sequence, same as you see on the street.
I'm trying to customize the behavior of the lights a bit.
Instead of:
Phase 1 (G)
Phase 2 (Y)
Phase 3 (R)
I want this:
Phase 1 (G and Y simultaneously)
Phase 2 (Y and R simultaneously)
Phase 3 (R)
The solution that Drew provided — a relay — works perfectly for Phase 3. Meaning when R gets juice from the controller, the current can't also advance to the Y through the relay.
Originally I didn't describe the desired output of each phase because I didn't think it necessary. However, now I see that without two additional relays, during Phase 1 (G and Y), current will advance to the R through the relay. And during Phase 2 (Y and R), current will advance to the G through the push-in wire connector.
QUESTION: even if that last paragraph isn't clear, as illustrated below will the three relays succeed in channeling the current to only the colors indicated during the active phase?
AI: Ok, assuming we're dealing with AC here...
As others have mentioned, you're probably going to want to use relays for this. AC-IN/AC-OUT Solid State Relays are cheap and simple to use. For example this one: https://smile.amazon.com/SSR-25AA-80-250V-24V-380V-Machinery-Control/dp/B01MZ2B0LA
Just hook up a relay in parallel with your controller, so that either the controller or the relay can turn on the RED light. Then hook up the input of the relay to your yellow light signal.
See terrible paint edit below: |
H: How does one calculate the resistor in parallel with the MOSFETs?
I would like to know more about the resistors again in parallel with the MOSFETs in the picture. The Si2365EDS is a P-channel transistor and the 2N7002 is a N-channel transistor. How does one calculate the resistor in parallel with them? How does one know when the value of the tension of VGS is definied and the tension in which the state of the MOSFET will act as a closed circuit(when used as a switch)?
AI: The values of gate-source resistors are generally not precisely calculated. Their function is simply to ensure that, with no external voltage applied (and note that "no voltage" does not mean "zero voltage") the leakage current from the gate will produce a voltage sufficiently low (less than 0.1 volt, let's say) that the FET will not turn on.
In the case of the p-type, the datasheet gives a gate current at 4.5 volts of 1 uA. So a 100k dropping 1 uA will only have about 0.1 volts, and the FET will remain off. But, you say, the gate is then not at 4.5 volts, so how does this count? Note that, with 8 volts on the gate the leakage current is 10 uA, so it's reasonable that, for a lower voltage than 4.5, the current will be even less. Like I say, these aren't precision calculations.
100k is a nice convenient value, and you can get them in surface-mount packages (not always available for much larger values), so the designer went with it.
A smaller value could easily be used, such as 10k or even 1k. However, you don't specify what is driving PB0, so depending on source you might want to avoid low values. And if the voltage source is actually a battery (as your symbol indicates), R3 should generally be larger rather than smaller to minimize battery drain. In this case, using 100k will work for all 3 FETs, so there was no need to provide tailored values to each.
The exact value used might well depend on the rest of the circuit. For instance, if whatever provide PB0 uses 10k resistors and no 100ks, you might well use 10ks just to minimize the number of different parts you have to order.
So, like I say, these values aren't something to spend a lot of time on. Almost anything below about 1M will work just fine. I suspect the designer uses 100k reflexively for GS resistors, and assigned the value almost without thinking. |
H: VHDL: Simple UART TX not working
As a first step towards learning VHDL and using FPGAs, I want to implement a simple UART transmitter which only transmits a constant bit-sequence according to the UART protocol with 9600 8N1 configuration.
I'm using a Altera Cyclone II EP2C5T144C8N board which has a 50MHz clock.
The transmitter is supposed to cycle through all the bits in the bitstring repeatedely on every rising clock of the 9600 Hz clock, which is generated by a counter beforehand.
The VHDL code is as follows:
uart_test.vhdl:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;
use IEEE.std_logic_unsigned.ALL;
entity UART_TX is
Port (clk9600: in std_logic; -- 9600 Hz clock
TX : out std_logic -- TX pin
);
end UART_TX;
architecture Behavioral of UART_TX is
-- dummy data
-- idle (1) for a 3 cycles, start bit (1 to 0 transition), 8 bits of data ('A'), stop bit (=1)
constant bits_to_transmit : std_logic_vector (0 to 12) := "1110100000101";
signal current_bit : std_logic :='1';
signal current_index: integer range 0 to 12 := 0;
begin
process (clk9600) -- on every clock tick
begin
if rising_edge(clk9600) then
-- grab the current bit (in first iteration current_index = 0)
current_bit <= bits_to_transmit(current_index);
-- increment index by one (automatically overflows back to 0)
current_index <= current_index + 1;
end if;
end process;
-- assign TX the current bit
TX <= current_bit;
end Behavioral;
Top level entity blinky.vhdl:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;
use IEEE.std_logic_unsigned.ALL;
use WORK.all;
entity blinky is
Port (clock50: in std_logic; -- internal 50MHz clock
TX_out : out std_logic; -- transmit pin
clock9600: out std_logic -- 9600Hz clock out for debug
);
end blinky;
architecture Behavioral of blinky is
-- counter for frequency dividing 50 MHz to 9600 (Clk period is 50000000 / 9600 / 2 = ~2604)
signal c : integer range 0 to 2604 := 0;
signal internal_clk9600 : std_logic := '0';
-- component prototypes
component UART_TX is
Port (clk9600: in std_logic; -- 9600 Hz clock
TX : out std_logic -- TX pin
);
end component;
begin
process begin
wait until rising_edge(clock50);
if (c<2604) then
c <= c+1;
else
c <= 0;
internal_clk9600 <= not internal_clk9600;
end if;
end process;
clock9600 <= internal_clk9600;
my_uart_tx : UART_TX port map (clk9600=>internal_clk9600, TX=>TX_out);
end Behavioral;
The output on the TX pin is not what I expect. It transmits the 'A', then 3 garbage characters, then 'A' again. I captured the signals with a logic analyzer:
This does not correspond at all to the bit sequence I have programmed above. It seems that it inserts 0 bits after it has cycles through, which throws off the UART decoder? The 9600 clock looks however right.
Question: What is wrong with the code that causes this?
Side note: The RTL viewer shows a circuit which looks okay to me.
AI: I'm not a VHDL guru, but I think your comment
-- increment index by one (automatically overflows back to 0)
is misleading, and you have to explicitly reset the index after 12. |
H: Output impedance of circuit with ideal op amp
I have the following circuit which I'm asked to calculate the output impedance Zout, assuming the op-amp is ideal.
I use the following equivalent circuit:
simulate this circuit – Schematic created using CircuitLab
I get:
$$i_1 = \frac{V_x}{R_{i}+R_1}$$
$$V_i = -\frac{V_x R_{i}}{R_{i} + R_1}$$
$$i_2 = \frac{V_x - A_{vo} V_i}{R_2 + R_o} = \frac{V_x}{R_2 + R_o} + \frac{A_{vo} V_x R_{i}}{(R_{i} + R_1)(R_2 + R_o)}$$
$$I_x = I_1 + I_2$$
$$Z_{out} = V_x/I_x = \left( \frac{1}{R_{i} + R_1} + \frac{1}{R_2 + R_o} + \frac{A_{vo} R_{i}}{(R_{i} + R_1)(R_2 + R_o)} \right)^{-1} \approx \frac{R_2}{1 + A_{vo}} \approx 0$$
$$\implies Z_{out} = 0$$
Using the fact \$A_{vo} = \infty\$, \$R_{i} = \infty\$ and \$R_o = 0\$ for an ideal op-amp.
The solution says \$Z_{out} = R_2\$. My question is : what's wrong in my approach?
Thanks
AI: For Vin that does not saturate the output of A1 when loaded, Zout=0
When A1-out saturates Zout= R2.
U1 is no longer linear with linear feedback so the gain is zero when saturated |
H: One pulse to ON/OFF bistable latching relay
I've been trying to design a latching relay driver circuit, with using a push-button switch. Basically when the circuit is powered on, first press in push-button switch make the relay SET, then the second press will make the relay RESET state.
I've searched online and find this normal relay driving solution. But I couldn't figure out how to implement this into single coil and/or dual coil latching relay. I guess dual coil latching relay is easier to drive than the single coil one.
Any help is appreciated. (if possible please provide falstad simulation)
AI: There are many ways to do this. Discrete, D FF /2 counter Astable FF
Choose whatever Relay meets your needs and select Base R to drive 5% of Coil current. Use Darlington and 1% if this exceeds 20mA.
Avoid crosstalk of power grounds between Relay and CMOS , like the plague. |
H: Trigger a circuit with square wave
I have a circuit that develops an 800Hz square wave of 5 volts and about 200mA (it's a buzzer oscillator) when energized, I want to detect this square wave and turn on another 5v circuit with a separate power source (an audio playback IC) when the square wave is present, and then turn it off when the square wave is absent. I could do this with an arduino and interrupts, but is there a way to do it in analog? I'm looking for the lowest component count (cost) and complexity possible... if I just run the 800hz signal through a capacitor can I use the smoothed output to switch a transistor? I really just need to get a "hi" output while the square wave is present, and "low" when absent. I can trigger the target device either by switching its power or using a ttl signal.
This seems like it should be a very basic question, but I'm very much a novice...
AI: Many ways to do this. You intend to do a logical function (turn on - turn off) which suggests a comparator. First circuit uses a transistor. The square wave must be larger than 0.6V peak-to-peak. If it is, the transistor turns on - its collector current pulls R1 down near zero-volts. Capacitor C1 is pulled down as well, but starts to charge back to the supply voltage during the last half of the 800 Hz. square wave. \$ R1 * C1 \$ time constant should be significantly longer than the 800 Hz. period.
simulate this circuit – Schematic created using CircuitLab
You could use a proper comparator chip to do a similar function.
When the square-wave amplitude exceeds the threshold voltage set by R2, its output goes low, otherwise output is high. The output stays low because of the RC time constant of R1 & C1 at its output. The time constant should be longer than the 800 Hz. period (1.25 milliseconds).
At the input, a diode clamp prevents a large amplitude square wave from going too far negative. R3 establishes a zero-volt reference:
simulate this circuit
A disadvantage of these circuits is that any frequency (not just 800 Hz) will cause the output to go low. And a low frequency will output multiple pulses - use this circuit if 800 Hz. (or higher frequency) is expected.
If you want to detect only 800 Hz., then a more complex circuit is required. A LM567 can provide a frequency-selective output indicator.
A 4046 phase-locked-loop can perform a similar function: CMOS Phase-Locked-Loop Applications |
H: \$ Z_{out} \$ of VCCS ;confusion
How can we evaluate the approximate output impedance of the VCCS (Voltage controlled current source) based circuit at port \$ V_0 \$ ?
My Approach:
To calculate \$ Z_{out} \$,equivalent circuit will be :
Applying KCL at \$ V_0 \$ ,we get:
$$\huge I_t + g_m v_{R_{in}}= \frac{V_0}{100k} + \frac{V_0}{R_{in}}$$
$$\implies I_t + g_m (-V_0) = \frac{V_0}{100k} + \frac{V_0}{10M}$$
$$\implies I_t = 0.01 V_0 + \frac{V_0}{100k} + \frac{V_0}{10M} \quad , \text{as} \space g_m= 0.01S$$
$$\implies \frac{10^7}{10^5 + 10^2 + 1}=\frac{V_0}{I_t}$$
$$\implies Z_0 = 99.89 \Omega \space \approx 100 \Omega$$
But answer is given as \$ 100k \Omega \$ !!
so where is my mistake? please help...
AI: Initial quick look ...
Current source has infinite Zout, but it's in parallel with 100k, which would reduce it to 100k, but there's feedback, which will change it from 100k, so it can't be 100k!
So what's the feedback doing?
The 100k, and VCCS input 10Mohm are negligible compared to the 1/100ohm transconductance. So the circuit reduces approximately to the VCCS with the feedback path.
If we try to measure Zout by injecting a current Iout into the output, then its voltage will change, which changes the input voltage. The input voltage has to change the right amount to sink Iout, so will change by Iout/gm, or by 100ohms*Iout, giving and output impedance of approximately 100ohms. The effect of the 10M and the 100k will change that figure slightly, in the 3rd or 4th decimal places.
Has the given answer an added 'k' as a typo? |
H: Transistor to turn 3 Amp motor on/off
I have 3Amp (max) 12v DC brushed motor and power supply. I'm thinking of turning this motor on/off and (maybe) control its speed with a transistor. I'm not an expert in electronics at all (I'm a programmer).
Another variant is using relay, but I see transistor as a better solution. To control transistor I want to use Arduino signal.
So I tried to search for a transistor that can maintain 12v and 3amp and use signal of 0-5v, but it seems there are no such transistors. So my question to you - is my way of solving this problem is right? Or should I use relay for it (but obviously I can not control the speed of the motor with the relay).
AI: Consider that DC motors can have start currents up to 10x rated currents, you either must have a soft start or drivers rated those currents and Pd heat loss from voltage drop.
Consider a 3A * 12V motor uses 36W at full load but 360W (peak) at start if full voltage is applied. Losses of <2% are desirable for thermal design but also affect the cost of the drivers, so tradeoffs are required.
A full bridge is used for bi-directional control.
Depending how you control the soft start (acceleration) with coasting or braking and you can decide what power you need. When coasting the motor turns into a generator.
e.g of a high power driver. https://www.pololu.com/product/1451
Cheap and hot driver |
H: Wave from the piezoelectric material is not what I expected. Did I miss a step?
The wave from the piezoelectric material may be
sine wave (classmate told me )
AC wave (but not sine, I suppose it from the paper)
DC wave (from the oscilloscope it seems like a DC wave, not AC wave)
Steps:
Red oscilloscope line connects to the red line. Black oscilloscope line connects to the black line. No load (resistor or capacitor), as in the picture shown below
Here are the wave situations, shown in the oscilloscope
no press: a horizontal wave which has noise
at the time I press: the horizontal wave goes down
at the time i release: the horizontal wave goes up
After that, the horizontal wave returns back to the original, and this is the reason: I think the wave produced from the piezoelectric material is a DC wave, because there is no AC wave, only DC. However, I read some papers and articles from the internet, and they all said that the wave from the piezoelectric material is definitely not a DC wave. So, did I miss any steps before I tested the wave with the oscilloscope1?
I saw a waveform from this pdf ( Chinese version), and in Fig 14 & 15 there is a voltage waveform, as shown below.
1I’m using a WaveRunner-8000 oscilloscope.
AI: The signal is AC, it goes positive and negative, the frequency is the frequency that you press it.
This piezo disk device is a transducer it converts flexing into the movement of electric charge, flex it one way and charge is pushed into the wires allow it to relax and the charge is pulled back the other way. |
H: 10k Resistor Pull Up/Down Standard for 74 series chips
I've been having some issues lately with the usage of 10k ohm resistors as pull down resistors for 74ls series chips. Most people seem to choose 10k resistors as their default pull up/down value but I've found that the pins seem to float a little anyway when trying to pull down on the TTL 74ls series chips. My solution was to switch to a smaller value that I had on hand such as 1.1k ohm. My question is why 10k is the default assumed by many making electronics projects, and why might I be having a problem with this value that is eliminated by using a lower resistance value?
I haven't been playing with hc series much lately so I am unaware if the problem is particular to the 74ls series.
Edit: I also experienced this problem with a 28C16E EEPROM chip and solved it with 1.1k instead of 10k. Could this be related to noise in my power supply setup (c.M.T-305D set to ~5V DC)?
Edit: I notice people seem to have interpreted the pull down resistors as being used when the input is unused (could be tied directly to ground for 74ls or 74hc). This was not what I meant. The case for these pull down resistors is with the use of dip switches or I/O with a 5V bus.
AI: Unused high inputs for 74S and 74 series logic with multiple emitter inputs should be connected to Vcc through a resistor ( for protection of the input). The resistor can be calculated as follows (from these ancient scriptures):
If you run the numbers you will see that 1K to 10K or even higher is fine for a pullup (but you'll get less EMI immunity with the higher values).
For other logic families (74HC and other CMOS types, 74LS) the inputs can be connected directly to Vcc. (74LS is really DTL logic, there are no multiple emitter inputs).
There is no reason not to connect any unused 74x input you want low directly to GND (use a 0 ohm resistor if you want to make it removable for some reason). Anything higher will reduce the noise immunity.
Of course you can also connect the unused input to an output that has the desired logic state. For example, grounding the input of an unused 74S04 inverter and using the output to drive up to the maximum fanout of inputs high
If it isn't really unused and you actually need a pull-down- a 250 ohm resistor will drop about 400mV at 1.6mA (numbers that mean something with the old 7400 series logic- 400mV is the maximum output voltage for 400mV noise immunity and 1.6mA is the maximum input current).
The input current for 74LS logic is 1/4 as much (400uA), so 1K is the maximum pull-down for 74LS logic that still guarantees 400mV noise immunity. If you were doing some kind of funky diode logic this might be useful.
Keep in mind that the input current is much less for a high input (40uA) vs a low input (-0.4/-1.6mA).
On modern CMOS logic, the choice of pullup or pulldown resistor is largely a matter of noise immunity, speed (to charge input and stray capacitance) or in extreme low power situations, of leakage. Internal pullup/pulldown resistors are necessarily a trade-off and tend to be on the high side for high-EMI environments, so we often add lower value resistors in parallel. On the low side, drive capability comes into play.
For example, for I2C bus pullups the bus capacitance vs. pullup resistor value can come into play. |
H: Can't run code in Keil for STM32L433RCT6P on NUCLEO-L433RC-P
Recently at Embedded World 2018 in Nuremberg I got, for free, NUCLEO-L433RC-P with STM32L433RCT6P chip onboard. I want to broaden my knowledge in STM32 chips. Before, I did simple stuf on STM32F4.
All the jumpers on the board are placed correctly.
I opened STMcubeMX, selected the NUCLEO-L433RC-P board from board selection and used all the default settings for it. I also did a version with selecting the STM32L433RCTxP chip directly, not the board, and setting everything manualy. My end goal was to blink a LED.
I folowed this tutorial only for guidance, did not change RCC or SYS or anything like that: https://www.youtube.com/watch?v=BJdXR0Al6os
This is where problems began. After generating code and opening Keil I got the update window and updated everything for STM32L433RCT6P. Under boards there was no NUCLEO-L433RC-P to be found or updated. After closing that window this appeared (I tried and tried again while going through all the options):
At this point I just tried writing code an seeing what would happen. I have checked everithing in options for targer and compiled everything. After clicking the Download button if got the same thing for both scenarios:
What am I to do to fix this?
Versions: Keil V5.24.2.0, STM32CubeMX 4.24.0
AI: Device not found in available Device Family Packs.
Use PackInstaller: 'Check For Updates' to update the list of supported devices.
Keil doesn't know the device. Since Keil 5, it doesn't by default come with all supported devices. You have to install devices manually via the Pack Installer.
In the log:
No Algorithm found for: 08000000H - 08000F53H.
Since Keil does not know the device, it has no idea how it should even begin to program it. It needs firmware to load in SRAM and run to be able to program flash. This comes with the pack installer.
Error: Flash Download failed - "Cortex-M4"
That's just the least descriptive error message you get on almost every error.
Get used to it. |
H: 3 watt LED driver
is this schematic good for driving a 3 W LED (700 mA, 3.3 V)?
P1 is a 12V lead-acid battery input, P2 output.
AI: Is the schematic good?
No, it's not a good schematic.
Criteria for good schematics are, among many others:
sufficient spacing to make them easily readable
Improved readability by consistent alignment,
grouping
and rotation of components, as well as
a consistent direction of signal flow, and
consistent and meaningful symbols.
Regarding the most prominent shortcomings in these three categories:
There is no reason to pack everything as closely as you do. Your component labels should not be overlayed by wiring.
Why didn't you even try to put P1 and P2 on the same height, for example? R2 and R1 form some kind of voltage divider, between the SMPS output voltage and ground, right? So it would have made sense to rotate them vertically, put ground at the bottom and horizontally align them.
This is just one example: a good schematic would group related components together whilst putting unrelated functional units further away for clarity. So, in a good schematic, R1 would be close to U2, and not to U1.
Rotation of your components is terrible! Ground always points down. Never up, never sideways. Why does U2 have it's first pin the furthest down without any need?
It's usual to support the reader by putting the input left, the output right. This would have made it easier for me, for example, to understand what the job of the LM2576 (by the way, you missspelled the most important part in your schematic...) is, and what the job of the LM317 is.
Your U2 symbol isn't great. It's better to not only number pins, but give them names that clearly mark what they're doing. Also, usually, for things like that, a box with pins on both sides is a good idea. I don't know the circuit editor you're using, but this is really a standard component and you should be able to find a library that has a better symbol for the part. Something's also a bit off about your LM317 symbol – why is ADJ part of the symbol outline, but IN and OUT are clearly pin names?
Is the circuit good?
Well, you don't tell us anything about the input voltage, so it's impossible to say whether you've dimensioned the inductor, the diode and smoothing cap of the LMxxxx SMPS correctly. I assume you just went and used the power supply calculator on TI's homepage, with your input voltage and a >700mA output current at something like 5V output voltage to give the LM317 some room to work with, so it's probably OK. If you didn't, do it now.
You really don't need a linear regulator just to achieve constant current. Instead, you could just, instead of using a voltage divider on the LMxxxx output voltage, sense the output current with a shunt resistor after the LEDs. That would make your constant voltage supply a constant current supply, and you could get rid of the power-wasting, finger-burning LM317. It would also eliminate the need for the HUMONGOUS C1 (as your LED really doesn't care about ripple, usually, and you just need a smaller C1 to achieve loop stability). |
H: Design a filter that allows frequencies below 5 kHz to pass freely, but all frequencies above 5.2 kHz must be undetectable
My biggest challenge with this question is its ridiculously steep roll-off rate.
I am assuming that the signal is undetectable if its gain is -20 dB. This means that, within the transition band of 200 Hz, the signal strength needs to drop by 20 dB.
If my calculations are correct, this filter requires a roll-off rate of 1200 dB/dec. That requires 60 poles, which is obviously not feasible.
I would like to use an analog active filter with minimal ripple in the pass band. A large phase shift is not too important.
One potential solution is to use a notch filter at 5.2 kHz. However, frequencies above the bandwidth of the notch filter are still not sufficiently filtered.
Please point out any flaws in my logic and or propose potential solutions. Thank you.
AI: You have assumed a 20dB/dec per filter order roll-off for your filter. This is not true for all filter types.
Let \$f_0 = 5 \mathrm{kHz}\$ and \$f_{\mathrm{stop}} = 5.2 \mathrm{kHz}\$. Then $$\frac{f_{\mathrm{stop}}}{f_0} = 1.04.$$
Have a look at this fourth order elliptic filter taken from the Wikipedia article.
Although it does not quite meet your requirements you can see it is feasible. A higher order elliptic filter can achieve what you are after.
You should keep in mind that elliptic filters can do disturbing things to the phase of the signal. Since you did not mention anything about your phase constraints, I have assumed that an elliptic filter is suitable. |
H: help identifying TVS diode
My Precor M9.23 treadmill stopped working, and after reading the troubleshooting manual and looking at the motor control board, the led indicated that the board is bad. Upon removal of the board, I saw that one of the diodes had failed (blown open). I can't see any indications on the diode to know what to replace it with, but attached is a close-up image of the blown diode, a similar circuit board with the diode intact, and a close-up showing the intact diode in question (small black/gray cylindrical, I believe uni-directional).
2 questions, should I attempt to replace the failed diode, or is it's failure likely the result of some other failed component? I'd rather not replace the entire board if possible, it's ~$300 US.
What can I replace it with? I can't make out what the markings mean. It's roughly 10 mm in length.
I've tried looking for the circuit diagram for this board, or better pictures of the TVS diode, but no luck.
Thanks.
AI: This failure is the tip of the iceberg. TVS stands for transient voltage suppressor. It's job was probably to clip unusually high voltages to keep the rest of the circuitry safe.
If the above is true, then sufficiently high voltage at sufficiently long duration and low impedance came along to blow out the TVS. This means it no longer served its protective function, so the high voltage most likely proceeded to blow out other components. Very likely, there are several dead components now on that board.
Basically, that board is toast. Unless you have a schematic or a service manual, there is little you can do about it except replace it.
However, before replacing the blown board with a new one, try to figure out what killed the first board. Did you have a nearby lightning strike? Is the unit intended for 120 V and was somehow plugged into 240 V? If you don't identify the problem, you can't know the new board won't be subjected to the same over voltage, and fry as soon as you install it. |
H: Short sound when toggling a light indicator
What is that “click” sound we hear when a light indicator turns on or off on some very simple devices, like the lights that tell us when some flatirons or ovens are heating up?
I can’t open the circuitry of my oven just to find out what controls the light. What electric or electronic device which makes a little “click” when toggling its output could be used to control a light? And why would this device be better than a LED/transistor pair? (I’m speaking of recent devices, built in this decade, not my great grandmother’s charcoal flatiron!)
AI: The click is likely a bimetalic strip that turns on or off the oven heater. The light is also attached to the same heater circuit so gets switched on or off. Devices in this decade still have them as they are the cheapest way to control high wattage heaters. The "led" is likely only a neon bulb, or if indeed a led, it is often connected with just a current limiting resistor. |
H: Should the primary winding of a transformer have more or less resistance to increase efficiency?
I'm a bit unclear about how to think of the energy transfer in a transformer and how it would be optimized. On the one hand, if the primary winding of a transformer is more resistive than the rest of the equivalent circuit (the power source's internal resistance and any connecting wires), most of the voltage drop would be across the transformer, but on the other hand, if the resistance of the primary winding was lower than the connection to the transformer, the I^2*R losses of the primary winding would be lower. Basically my question is, assuming the entire primary side of a transformer has some given and constant resistance, would the transformer be more efficient if the primary winding had the highest possible portion of the resistance or the lowest portion of the resistance?
AI: I think you are on the wrong track with this question. The primary winding should have ideally zero resistance but it needs an impedance to prevent it shorting out the AC power applied. So, it has inductance and, for a typical power transformer that might be in the realm of 10 henries for 50/60 Hz applications.
The transformer equivalent circuit is shown below: -
With the secondary unloaded (not connected to a load) the primary impedance is due to \$X_M\$. Core losses and other resistive losses are shown as resistors. Leakage inductances are shown as \$X_P\$ and \$X_S\$. |
H: approximately how long will it take for 171v to drop to 100v with a 75w light bulb?
I'm not an electrical engineer, but I do have a question regarding voltage and timing.
Approximately how long will it take for 171v to drop to 100v with a 75w light bulb?
Im only looking to figure out how long it would take to discharge a battery.
The battery I am discharging is a 2005 Honda Accord Hybrid IMA 144V Nickel-Metal Hydride battery.
6.0 Ah
AI: Using your figures: 171 Volts and 75 Watts means 75/171 = 0.4436 Amps.
6 AH / 0.4436A = ~13.7 Hours.
Your battery will not slowly go from 171 Volts to 100 Volts. It will stay close to 171 Volts and when it gets empty drop rapidly.
You state "144V Nickel-Metal Hydride battery." so I don't understand where your 171 Volts comes from. |
H: Understanding Minimum Output Voltage of Cascode Current Mirror
I guess that I have some serious trouble understanding how to get the saturation equation for the cascode current mirror right which is known from all the textbooks as
$$
V_{out} = 2 V_{DS, sat} + V_{th}
$$
It's quite intuitive to get to the point that the gate voltage at Q4 needs to be
$$
V_{G, Q4} = 2 V_{DS, sat} + 2 V_{th}
$$
Now when looking at how a MOSFET is saturated we use \$ V_{DS} \geq V_{GS} - V_{th} \$. So applying this to Q4, why do we just simply do
$$
V_{D, Q4} = V_{out} = V_{G, Q4} - V_{th} = 2 V_{DS, sat} +V_{th}
$$
? That doesn't work for me because we look at \$ V_{G, Q4} \$ with respect to ground, so for me it makes sense to write
$$
V_{out} = V_{G, Q4} - V_{S, Q4} - V_{th} = V_{G, Q4} - V_{D, Q2} - V_{th}
$$
But we don't know \$V_{D, Q2}\$. When assuming \$V_{D, Q2} = V_{D, Q1}\$ we get
$$
V_{out} = 2 V_{DS, sat} + 2 V_{th} - V_{DS, sat} - V_{th} - V_{th} = V_{DS, sat}
$$
which obviously is nonsense... So where did I get stuck or where did I go seriously wrong?
Any help is greatly appreciated!
AI: so for me it makes sense to write
$$
V_{out} = V_{G, Q4} - V_{S, Q4} - V_{th} = V_{G, Q4} - V_{D, Q2} - V_{th}
$$
But that does not make sense as
$$
V_{G, Q4} - V_{S, Q4} = V_{GS, Q4}
$$
So you're calculating Vds of Q4 and not Vout.
You should add the Vds of Q2 into the equation. |
H: E.V. Motor Driver (DC). How to protect parallel MOSFETs and the driver?
Overview:
I have an electric quad that I have heavily modified. The motor will need to be replaced every now and then because I am driving a 48 volt motor with a 72 volt supply that can give extremely high currents (6 12V motorcycle batteries) . This is no problem as I dont mind getting a new motor periodically. I am looking to exploit the limits of this small vehicle!
(components below linked to Mouser datasheets)
Gate driving Problem:
I am using a microcontroller to drive a Gate Driver to drive a MOSFET that powers a DC motor (with Flyback Diode of course). There are two power supplies; one to power the motor (72V) and the other one powers the control circuitry (including Gate Driver) (12V). MOSFET Gate is pulled to ground with a 5W 220ohm resistor (probably too low/unnecessary resistance). Everything shares a common "star" ground.
Every time I try to test this circuit I notice 3 things happen:
(1) The circuit seems fine initially at very low throttle before the motor even start to turn (I can hear the 500HZ PWM signal hum). (2) When throttle is increased slightly more to rotate the motor, the Gate Driver]1 BLOWS UP! (3) The MOSFETs are then ruined as Gate and Drain are shorted. As well as Source and Drain.
I have a large toggle switch to shut off the circuit in an emergency. The switch connects the Source on the MOSFET to Ground (turning it off breaks the motor circuit mechanically and reliably in an emergency event).
Instinctive Solution?: Add a Diode between Source and Drain on the MOSFET? Increase PWM frequency? Reduce the Gate-Source resistor to 10K. Add a 220ohm resistor between the Gate Driver output and MOSFET? All the above?
AI: Each FET has about 4" of wire in the Source, or 100 nanoHenries.
Should you be switching a current of a mere 10 amps in each FET, in 10 nanoSeconds, the inductive kick will be
Vinductor = L * dI/dT
Vinductor = 100nH * 10 amps / 10 nanoSeconds
Vinductor = 100 volts in the Source wiring.
Thus your FET gates experience 100 volt spikes.
As the gates go short, the spikes are connected to the PowerDriver IC, and destroy that IC.
USE a sheet of copper foil under your high speed (power driver) and its Surface Mount bypass caps, and the same sheet of copper foil under your several power MOSFETS. On back side, you should install some copper bus-bars to handle the 100 amps you expect to switch.
Each millimeter of FET lead (source, drain, or gate) or of wiring or thin PCB trace, is approximately 1 nanoHenry inductance; the formulas also depend on cross-section of the FET lead, or the bond wires inside the plastic, or the copper wiring (thin) I see in your photos; very wide foil has less inductance, with a natural-log dependency; GND plane over VDD plane will reduce the plane's inductive contribution by 10:1 (from memory, this is my rule of thumb for planes), but the other "wires or leads" still add ~1nanoHenry/1milliMeter.
============================
By the way, you at present have no means of encouraging the FETS to share those high currents. Try 0.01 ohms in the source, which is 20 squares of default thickness copper foil for the default foil weight of 1 ounce/foot^2.
You are at the mercy of how matched the FETS are, if they are at the same temperature and gate-drive voltage during the turnoff and turnoff voltage slewing.
At 10 amps per FET, that I*R drop produces 0.1 volts across the 20 squares, and 0.1 volts is plenty of signal to change the output of an analog comparator.
[I had error in prior sentence; I'd written "produces 0.2 volts across."]
Allocate one analog comparator per FET; combine the outputs with a 4-input NAND or 8-input NAND, that NAND connected to "SET" pin of a latch, and the latch output controls the "Enable" pin of your Gate Driver.
If you attempt to monitor the current in individual FETS, the intense and rapidly changing electron movement causes intensely-fast changes in the electric fields (some of which gets labeled "magnetic field") and simply measuring that 0.1 volts across 0.01 ohms may be impossible.
Suppose you make the Source-resistor 0.1 ohms. Then at 10 amps and 1 volt across the resistor, its power is one watt. Now you have a heat removal issue.
Lateral (sideways) movement of heat thru FR-4 epoxy-fiberglass is very poor, so you need a heat-removal plane under the source resistor. The default thermal resistance (spreading edge_to_edge, not face_to_face) of foil is 70 ° C per watt per square of foil.
The gate-driver IC cannot have long leads; inductive spikes/kicks will kill it.
Draw and post a schematic, with all high current and fast-changing current paths indicated; you need to think about managing the inductive spikes/kicks; both ends of any diodes need low inductance.
You have a combined mechanical / inductance / high-current / fast-edges / heat-removal / bypass-capacitor-placement challenge. Draw lots of sketches as you think about this. Memorize the speeds of the FETs and the gate-driver ICs; examine the circuits provided by the manufacturers for R+C time-constants; are the R+C components setting the edge speeds? to slow down the edges and thus reduce the inductive risks? |
H: AMI 7838? (identify this part)
Help appreciated identifying part and finding datasheet.
Top reads:
AMI 7838
S2114L2CC (might be a 5 not an S)
Bottom reads:
7835A1
1560
KOREA
18 pin ceramic DIP, gold plated? pins
AI: As Janka said in comments, this is a 2114 SRAM (more specifically, 2114L low-power version). The clues are:
2114 (2114L) in the part number
18-pin DIP package (I used 2114 devices in that 18-pin ceramic DIP package shown in the photo, as well as plastic DIP).
the date code of 7838 (YYWW format) on the top, matches the era of the 2114 (late 1970s to early 1980s)
The AMI mark in the part number isn't American Megatrends Inc. (the BIOS manufacturer often referred to as "AMI"), as they aren't a semiconductor manufacturer. However, I haven't found definitive evidence which company used that mark - I thought it might have been AMI Semiconductors (later taken over by ON Semi) but I'm not sure. [Found more details about the manufacturer - yes, it's the predecessor to AMI Semiconductors - see update below.]
Example 2114 SRAM datasheets from other manufacturers:
Fairchild 2114L datasheet
NEC uPD2114L datasheet
Update: Found the manufacturer - American Microsystems Inc. (AMI) who were later renamed AMI Semiconductors and then bought by ON Semi.
They used an S prefix before their part number, as seen in the S2114L2CC part number.
They had a packaging facility (to mount the silicon dies into the DIP packages) in Korea, which matches the marking in the photo.
I found the datasheet for that device - but it's in a 20.6 MB PDF file:
American Microsystems Inc. (AMI) MOS Products Catalogue, Winter 1979
See page 35 in the PDF file (marked page number "2.4") which includes the S2114L-2 which I suspect is correct for that device (the -2 indicates a speed rating).
For different formats of that scanned AMI data book, see the archive.org page here. |
H: Op amp integrator output has DC offset even when a coupling capacitor is used
Please help me understand why this op amp integrator output has a DC offset. Why doesn't the coupling capacitor block it?
EDIT: Running the simulation for longer time resulted in the expected output behavior
AI: A couple things to keep in mind.
In your setup, you have a gain of 20V/V (at dc and before the cutoff frequency \$\frac{1}{2\pi R_fC_f}=723\text{Hz}\$), your opamp will stop amplifying at this gain values for frequencies greater than 723Hz. After that frequency, the gain decreases 20dB/dec.
This is way lower than the frequency of your input signal (11.63KHz). After 723Hz your circuit acts as an integrator, and that is why you get a triangular wave instead of the square wave.
I ran a quick test on LTspice:
Notice I downsized the feedback capacitor so that I have still a square wave for an input frequency of 11.63KHz. The cutoff frequency where the opamp will integrate the signal instead of amplifying is now about 200KHz. This may not what you want to do with your circuit...Another thing I think is important, is to run your simulation starting your dc sources at zero volts. That way, you will get the real transient response. This is very useful when using capacitors and inductors. Just check the box that says 'Start external dc voltages at 0V', it will be the same as having a step input.
Here is the input and output:
Also notice I added some resistance to after the dc blocking cap at the output. This form a high-pass filter with cutoff frequency determined by the capacitor and the resistor at the output \$\big(\dfrac{1}{2\pi R_5C_3}\big)\$. The value of the resistor is important here because if it's too great (an open, for example), you may end up passing the dc component of the signal. Just choose C and R in a way that you get the frequency you want. 100K would have worked too.
Why does it take longer to reach steady state? Because of the RC time constants. At the input, you have a 47\$\mu\$F capacitor, along with the 5K\$\Omega\$ resistance. The feedack resistor also influences this time constant (100k\$\Omega\$). The time constant is \$\tau = (47\mu \text{F})(5\text{k}\Omega+100\text{k}\Omega)= 4.935\$ seconds.
Now, initially V+ is greater than V- (in linear mode V+ \$\approx\$ V-) so the output will saturate at about +9V. This is the voltage that will charge the input capacitor (your input signal is essentially 0Vdc). At the 4.935 seconds the voltage at the capacitor will be about 0.63*9V = 5.67V. But as soon as V- reaches the offset voltage of 4.5Vdc (present at V+ through the divider), the opamp will enter the linear region (now V+ \$\approx\$ V-) and the V- voltage will stay there. So, it takes a less than \$\tau\$ to reach 4.5Vdc. But the takeaway here is that the time constant could be reduced by downsizing the capacitor at the input, that way you don't sacrifice your dc gain.
For example, take a look at how much time it takes the inputs to come together and not surprisingly, the output starts to behave at that point:
If you downsize the input capacitor (1\$\mu\$F), this is what you get:
Look how quicker the inputs (V+ and V-) get close to each other, and the opamp behaves linearly. |
H: Mosfet part number? How to find a replacement otherwise?
I did a quick google search based on the numbers on this Mosfet and found nothing. How would you go about finding a datasheet and replacing a part like this?
GP7NabOHDa
CCos1
MRC - 502
This part is located on an Ametek 1000W blower. I believe it is used to control the speed of the motor.
AI: You've misread the part number. This is an ST GP7NC60HD IGBT.
Steps I took to identify this:
Recognize the ST logo (lower left).
Go to st.com.
Type the recognizable letters "GP7N" into the search bar; the rest of the part number is suggested as a search result. |
H: Do 1/8W resistor and tantalum capacitor consume less electricity?
I used 1/4W resistors and electrolytic capacitor to combine a circuit originally,and found that the output voltage is less 2V,this is not my expectation ,so i replace them with 1/8W resistors and tantalum capacitor ,and the voltage become from 2V to 3V.
Compared with 1/4W resistors and electrolytic capacitor, do 1/8W resistor and tantalum capacitor consume less electricity? I surf the internet and find that 1/4W or 1/8W means the power that resistors can sustain,it doesn't mean how much power that the resistor consump.So i am confused now.
AI: Without knowing the details of your circuit, it's hard to really answer your question or to help you understand whatever is confusing you. That said, power dissipation in these components isn't too hard to understand.
Resistors
simulate this circuit – Schematic created using CircuitLab
The power rating designation of a resistor is the amount of power the part can dissipate $$P = IV = I^2R = V^2 / R$$ indefinitely without causing lasting effects on its primary rating, it's resistance. That is to say, if you connect a 10 V DC source to a 1 kiloohm resistor, Ohm's law dictates a current flow of $$I = V/R = (10 V)/(1000 Ohm) = 10 mA$$ which means that resistor will be dissipating $$P = I^2R = (10 mA)^2(1000 Ohm) = 100 mW = 0.1 W$$. This is well below either 1/4 W or even 1/8 W. However, if you replace that first resistor for one with a resistance of 220 Ohm, the circuit would now draw $$I = V/R = (10 V)(220 Ohm) = 45.5 mA$$ and the resistor would need to dissipate $$P = I^2R = (45.5 mA)^2(220) = 0.46 W$$ Enough to burn either a 1/4 or 1/8 watt resistor! Note that you can compute the power directly in this simple example using the voltage of the source and the resistance, but I showed my work using current to hopefully more strongly outline the link between current and power dissipation here.
Capacitors
The story of power dissipation in a capacitor is more complex. There are Ohmic losses akin to the resistor above linked to the Equivalent Series Resistance (ESR) of the capacitor. There are also dielectric losses, but these are predominantly a high frequency phenomenon.
If you're working with DC signals, you can consider power dissipation of any healthy capacitor zero. |
H: difference between max3387ecug+ and max3387ecug+t
can I know what the difference is between MAX3387ECUG+ and MAX3387ECUG+T, the MAXIM datasheet doesn't seem to point the difference.
AI: T, T&R, T10 | Part is furnished on tape-and-reel. T or T&R indicates the standard reel quantity for the given package, usually 2.5K. T10 indicates a reel quantity of 10K.
source |
H: Can a capacitor be used as a dipole antenna?
Can a parallel plate/cylindrical/spherical capacitor be used as a dipole antenna? Isn't a dipole antenna like a capacitor with a small capacitance?
AI: The search-term you want is: "patch antenna."
Yes, parallel-plate capacitors are dipole antennas (especially true at self-resonance, usually up in GHz.) If the plates are smaller than quarter-wave (or the gap is smaller,) then an impedance matching network would be used to boost the volts for electrically-small dipole-mode.
But self-shielding capacitors such as wrapped cylinders won't make good antennas. They're not symmetrical, and one plate isn't exposed to the outside world. They're still dipole antennas, but mostly because of their connecting leads, and they're shorted out by relatively gigantic capacitance.
A very recent innovation in iphone antennas from Fractus Inc. is a tiny 2mm cube with metal faces, plus a series inductor for resonance. It's intended for upwards of 5GHz, see "ground-plane booster:"
http://www.microwavejournal.com/articles/29138-antenna-less-wireless-a-marriage-between-antenna-and-microwave-engineering?v=preview
http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=5723706 (PDF) |
H: Analog Mux as Cheap I2C Mux?
Just looking to have two devices on a single bus with the same address. There are many I2C multiplexers available, but they seem to cost ~4x what a 2x 2:1 analog multiplexer costs.
Any reason I can't use an analog multiplexer for I2C running a 100kHz bus?
For example a TI TS3A5223RSWR is 0.63 cents, and based on the data sheet, supports bi-directional analog signals with a small ~1 Ohm impedance.
AI: Analog multiplexers work just fine for I²C signals (if you keep the impedance and parasitic cpacitance small enough, which is usually not a problem).
I²C multiplexers are more complex because they are controlled through the I²C bus itself. You need one if you do not have a spare GPIO pin to control it. |
H: Simplest way to get regulated 12V from 10-18V input
Getting a regulated 12V DC supply can be extremely simple with something like a LM7812. However, I am trying to get a regulated 12V output with a supply that can range from 10V to 18V. My thought is to regulate down to 9V and then back up using a step-up regulator. Is this the simplest solution available?
AI: You need a buck-boost regulator. Linear Technology makes a wide range of them. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.