text stringlengths 83 79.5k |
|---|
H: Can high audio input level cause video loss or video distortion in camcorder?
Today I met with a vendor regarding the installation of a PA system at our facility. We currently record meetings with a handheld camcorder mounted on a tripod, and we're looking to add microphones in order to feed a clearer signal into the camcorder's audio-in jack directly from the mixer board.
This guy is supposed to know audio equipment, and at first he seemed knowledgeable until he made one statement that left me confused: he said that if we input an audio signal that is too high into our camcorder, the camcorder will stop recording video (i.e. the video will be either distorted or blanked out) until the audio levels are correctly adjusted.
Short of actually zapping circuitry inside the camera with an exceedingly high voltage and causing it to stop working, what on Earth is he talking about??? How could a high audio level affect the recorded video feed in any way?
Note also that he had no idea which camcorder we use because I never told or showed it to him. He was speaking in generic terms and applying this statement to all camcorders.
After he said this, I started seriously questioning if anything else he'd said could be taken seriously.
Any light to be shed on this?
AI: The only thing I can imagine is that this guy had a bad experience a long time ago with an analog tape based camcorder. I could conceive of a situation in which a badly-designed unit would allow an excessively hot signal from the audio track to bleed over into the adjacent sync track. Any decent unit would have been designed to limit the audio level before this could possibly happen.
I assume your modern camcorder is both digital and uses solid-state storage. In which case, there is no possible way for the audio signal to affect the video (or vice-versa). |
H: DC Motor Winding Insulation Material
As I understand it, the field coils and armature windings in a DC motor are insulated and this insulation can 'burn off' if the motor overheats, causing a short circuit to develop. What is the material coating the windings and coils in a DC motor? In the examples of the insides of DC motors that I have seen, the windings still retained the look of copper wire - does this mean that the coating is transparent? If so, is this always the case or are there winding coatings that are not transparent?
AI: Wire used for motor windings, transformers and other electro-magnetic applications is called magnet wire. Magnet wire insulation is similar to polyurethane varnish. However is is developed specifically for electrical insulation use. As you have observed, the insulation is quite thin yet able to withstand the normal operating temperature and voltage required for motor windings. It is not completely transparent. It is sometimes colored green or other colors that do not look like copper. The most common color is similar to copper. There doesn't seem to be any particular reason to use other colors. |
H: Calculating grounded emitter amplifer distortion (Art of Electronics 3rd Ed.)
Referring to section 2.3.4 A1 (pages 94-95) of the Art of Electronics 3rd Ed., I'm having difficulty understanding how to calculate distortion of a grounded emitter amplifier. The book says:
Because the gain is proportional to the drop across the collector resistor, the nonlinearity equals the ratio of instantaneous swing to average quiescent drop across the collector resistor:
$$\frac{\Delta G}{G} \approx \frac{\Delta V_{out}}{V_{drop}}$$
where Vdrop is the average, or quiescent, voltage drop across the collector resistor Rc.
Now in the example in the first paragraph of page 95, Vcc = +10V and the output is biased to half of Vcc hence Vdrop = 5V. The authors were successful at comparing measured distortions to predicted values. The results were 0.7% distortion for 0.1V output sinewave amplitude and 6.6% for 1V amplitude. I tried to "predict" the distortion but either my math or general understanding is wrong. For the first instance, I said the ratio of instantaneous swing to be 0.2V and the average quiescent drop to be 5V:
$$ \frac{\Delta V_{out}}{V_{drop}} = \frac{0.2}{5} = 0.04 $$
Or 4%.What is the mistake I am making?
AI: The problem occurs because \$r_e=\frac{k\:T}{q\:I_\text{E}}\$ and because the gain is \$A_V=\frac{R_\text{C}}{r_e}\$ with the emitter grounded. Ignoring the base's recombination current, \$I_\text{E}\approx I_\text{C}=\frac{V_\text{CC}-V_{\text{C}}}{R_\text{C}}\$, so:
$$A_V=\frac{R_\text{C}}{\frac{k\:T}{q\:\frac{V_\text{CC}-V_{\text{C}}}{R_\text{C}}}}=\frac{R_\text{C}}{\frac{k\:T}{q}}\cdot\frac{V_\text{CC}-V_{\text{C}}}{R_\text{C}}=\frac{V_\text{CC}-V_{\text{C}}}{\frac{k\:T}{q}}$$
Note that the collector resistor disappeared. Also, you should know that \$V_T=\frac{k\:T}{q}\approx 26\:\text{mV}\$ at room temperature. So the above equation, discounting temperature variations, becomes:
$$A_V=\frac{V_\text{CC}-V_{\text{C}}}{26\:\text{mV}}\tag{1}\label{eq1}$$
In your example, \$V_\text{CC}=10\:\text{V}\$ and the nominal \$V_\text{C}=5\:\text{V}\$, so with the signal value at its midpoint the gain is about \$A_V\approx 192.31\$. But with \$V_\text{C}=5\:\text{V}+100\:\text{mV}=5.1\:\text{V}\$ then \$A_V\approx 188.46\$ and with \$V_\text{C}=5\:\text{V}-100\:\text{mV}=4.9\:\text{V}\$ then \$A_V\approx 196.15\$. Roughly, this is about a gain change of \$\pm 4\$ riding on an average gain of about \$200\$ (rounding things up a bit.) That works out to about \$\pm 2\:\%\$.
But this is the "peak" figure, as the text mentions. The text suggests that you divide this value by 3, as a rule they provide, to get the "waveform distortion." This computes out to \$ 0.6\overline{6}\:\%\$ and they round it to \$\pm 0.7\:\%\$.
(I suspect they mean by this to imply total harmonic distortion. If so, the calculation for this is complex and beyond the scope of my answer in order to prove their rule of thumb answer. But there are also several different meanings for distortion, too. And a complete comparison of them here would be far, far beyond my desire. So you will simply have to accept their approach for these purposes. They have the tools on hand for the analysis and were able to empirically test their estimates. So let's leave it at that.)
It's simple enough for you to use the above formula, using \$V_\text{C}=5\:\text{V}-1\:\text{V}=4\:\text{V}\$ and also \$V_\text{C}=5\:\text{V}+1\:\text{V}=6\:\text{V}\$ to work out, after dividing by 3 again, their figure of \$\approx 6.6\:\%\$.
Again assuming that \$I_\text{C}\approx I_\text{E}\$ and using an emitter resistor to degrade the gain (intentionally, often quite substantially), equation \$\ref{eq1}\$ becomes:
$$A_V=\frac{1}{\frac{26\:\text{mV}}{V_\text{CC}-V_\text{C}}+\frac{R_\text{E}}{R_\text{C}}}\tag{2}\label{eq2}$$
(If you need a walk-through to see how that equation arrives, I can provide it. I'm leaving it this way so that you have to do some work to see if you can arrive at the same place on your own.)
So long as \$\frac{R_\text{E}}{R_\text{C}}\gg \frac{26\:\text{mV}}{V_\text{CC}-V_\text{C}}\$, for all \$V_\text{C}\$, then the gain is \$A_V\approx \frac{R_\text{C}}{R_\text{E}}\$.
But from the textbook's statement that the quiescent value of \$V_\text{E}=250\:\text{mV}\$ and assuming that \$I_\text{C}\approx I_\text{E}\$, we know the value of \$\frac{R_\text{E}}{R_\text{C}}=\frac{250\:\text{mV}}{5\:\text{V}}=0.05\$.
So using equation \$\ref{eq2}\$ to estimate the distortion, using the same peak values of \$V_\text{C}\$ as before, we get \$A_V\approx 18.12\$ @ \$V_\text{C}=5\:\text{V}\$, \$A_V\approx 18.08\$ @ \$V_\text{C}=5.1\:\text{V}\$, and \$A_V\approx 18.15\$ @ \$V_\text{C}=4.9\:\text{V}\$. Roughly, this is about a gain change of \$\pm 0.034\$ riding on an average gain of about \$18.1\$. That works out to about \$\pm 0.2\:\%\$. Dividing this value by 3, you get a figure of about \$0.07\:\%\$. Which is very close to the textbook's statement about the results of the analyzer's figure.
If you redo the calculations now using \$\pm 1\:\text{V}\$ variation rather than \$\pm 100\:\text{mV}\$ variation, you'll again find that the results are quite similar to their analyzer results. |
H: What are the minimum and maximum number of cycles consumed when executing an interrupt on an STM32F0 MCU?
Assuming I set an external GPIO interrupt to highest priority, how many cycles does an STM32F0 MCU take to:
start executing the interrupt handler code
return from the interrupt
I expect that the answers will be ranges, but I might be wrong.
Will these two figures, plus the time my interrupt handler code takes to execute, equal the number of cycles "stolen" from the main loop?
AI: Look at the exception entry timing diagram on this page.
Stacking
Entering the ISR on an Cortex M3 uses 12 clock cycles. For your ARM core and for leaving the ISR, maybe you can find a similar diagram.
The "stolen" cycles should equal all cycles used for entering, executing and leaving your ISR. |
H: Determining equivalent resistance to find the cutoff frequency
I am designing a low noise circuit for a precision application and require a stable voltage supplied to the circuit. I have determined that the MAX6250 voltage reference best suits my circuit. A snippet of my schematic can be seen below:
I have added the output bypass capacitor to filter some high frequency noise and would like to know the theoretical cutoff frequency of the low pass filter created by C4. Am I correct in thinking that the equivalent resistance for the LPF is ~0.01Ohm, due to the output impedance of the MAX6250 at low frequencies? Or is the output impedance irrelavent and the resistance is (1k+R_in+500)||R_in, where R_in is the input resistance of the LT1007 (in the giga-ohm range).
AI: The impedance the capacitor sees is the output impedance of the MAX6250 in parallel with approximately R4 (because the virtual ground at U2 input is imperfect, especially at high frequencies) and U4 input. At low frequencies it’s clearly dominated by U1. From the below graph, also at high frequencies pretty much.
So clearly it will have effect mostly above 10kHz (impedance of the cap is about 7 ohms there). We don’t know the output impedance phase though. It’s possible the chip may be unstable at, say 20nF but not at 20pF and not at 2.2uF. |
H: Soldering tab terminals without using holes
I cannot find any information about a practical problem I encounter.
If we don't have crimping tools, when soldering wires to tab terminals with holes as below:
Do we need to pass the wire through the hole before soldering?
But sometimes the wire is much thicker than the hole, in that case is it fine to solder the wire tip on the tab terminal's surface?
I couldn't find any examples about this.
AI: These are Spade terminals, for use with Spade Crimps. You should buy a Crimp Tool to crush these. They are both cheap.
You should not solder to these terminals, as the relay will be at risk of damage from the heat of the iron. Also, when the relay wears out it will be more difficult to replace. |
H: Protecting two layers of PCB with electric tape?
I have soldered several small PCBs, and I want to stack them together (using hex spacers).
However, since lack of (vertical) space it could be that some components (on the top) might touch the wires/solder junctions (on the bottom) of the PCB above.
What is a good way to prevent this?
I was thinking about thin wooden or plastic plates between the layers, however, this will cost some (vertical) space, especially where the wires/solder junctions from the above PCBs are lower than the top components of the PCB below.
So another way I thought was to use two 'layers' of electrical tape, stick together (with the 'glue' sides towards each other). So it is like a flexible 'plate'.
Would such a thin (< 1 mm electrical tape 'layer') be enough to isolate signals around 5 V, and very low current (DMX512 signals)?
AI: Kapton tape is a widely available industry standard product for this scenario. You can view the specs here - from table 3 you can see that it has a dielectric strength of over 100kV/mm, plenty strong enough for your purposes. It comes in different thicknesses but any standard 'off the shelf' kapton tape will suffice.
I'd recommend it over electrical tape as electrical tape tends to leave a sticky residue and is thicker, which may be undesirable given your height restrictions. |
H: What are these CAN frames / messages?
I'm writing software for a project that sends data to me using a CAN bus. The software runs fine in small test scenarios with 3-4 bus members, however with increasing members the bus sends data with very high addresses and new (non hexadecimal) data I haven't seen before:
First and last 4 frames for reference
(1541503830.323881) can0 011#008955EA0AC30AC8
(1541503830.412314) can0 030#0A770A8E00100000
(1541503830.412758) can0 61F#0A770A8E00100000
(1541503830.413049) can0 69F#0A770A8E00100000
(1541503830.413889) can0 **00C480A7**#0A770A8E54707FF3
(1541503830.414182) can0 **09014E9F**#0A770A8E54707FF3
(1541503830.414464) can0 **029D3E9F**#0A770A8E54707FF3
(1541503830.414753) can0 **1A7D3E9F**#0A770A8E54707FF3
(1541503830.415040) can0 **1A7D3E9F**#0A770A8E54707FF3
(1541503830.415329) can0 **1A7D3E9F**#0A770A8E54707FF3
(1541503830.415618) can0 **1A7D3E9F**#0A770A8E54707FF3
(1541503830.415904) can0 **1A7D3E9F**#0A770A8E54707FF3
(1541503830.416192) can0 **1A7D3E9F**#0A770A8E54707FF3
(1541503830.416475) can0 **1A7D3E9F**#0A770A8E54707FF3
(1541503830.416764) can0 **1D3E9F0F**#0A770A8E54707FF3
(1541503830.417872) can0 030#0A770A8E0FF30FF5
(1541503830.466440) can0 031#0A7D54580A8E0A99
(1541503830.514830) can0 008#0000000000000000
(1541503830.520243) can0 032#0000000000000000
Here I see way too high addresses. Other unknown data:
(1541503837.081060) can0 020#0AC20AF90AE10ACC
(1541503837.081271) can0 020#0AC20AF90AE10ACC
(1541503837.081478) can0 020#0AC20AF90AE10ACC
(1541503837.081689) can0 020#0AC20AF90AE10ACC
(1541503837.082138) can0 448#**R4**
(1541503837.133876) can0 01F#**R4**
(1541503837.135442) can0 03C#0AC20AF9
(1541503837.135886) can0 0DF#0AC20AF9
(1541503837.136202) can0 75F#0AC20AF9
(1541503837.136781) can0 65F#0AC20AF9
I don't think 0x448 is used by us, also non hexadecimal data?
I need a direction to work on, am I looking at faulty hardware, or are these specifics of the CAN protocol I'm not yet aware off?
The data was logged using candump -L can0 on Linux, socket can as driver and a standalone MCP2515 as CAN interface, connected via SPI. The other members also use the MCP2515 however directly soldered on PCB.
Additional data logged with candump -e -d can0:
can0 02F [8] 00 04 00 FA 00 02 00 00
can0 010 [8] 0A BA 0A F3 0A D8 0A CD
can0 011 [8] 00 88 55 C1 0A B6 0A AC
can0 012 [8] 00 01 00 02 00 10 00 00
can0 08812DD7 [8] remote request
can0 1FF7D75F [8] remote request
can0 1EFAEBFF [8] remote request
can0 1FFBFBDF [8] remote request
can0 0FEF7FFF [8] remote request
can0 1BFFFDFF [8] remote request
can0 1FEFFDFF [8] remote request
can0 1FEFFDFF [8] remote request
can0 1FEFFDFF [8] remote request
can0 1FEFFDFF [8] remote request
can0 1FEFFDFF [8] remote request
can0 1FEFFDFF [8] remote request
can0 1FEFFDFF [8] remote request
can0 1FEFFDFF [8] remote request
can0 1FEFFDFF [8] remote request
can0 1FF7FFFF [8] remote request
can0 1FFFFFFF [8] remote request
can0 008 [8] 00 00 00 00 00 00 00 00
can0 009 [8] 00 00 00 00 02 58 00 00
can0 00F [8] 00 04 00 00 00 10 00 00
can0 030 [8] 0A 71 0A 82 0F F4 0F F1
-- snip --
can0 02F [8] 00 04 00 FA 00 02 00 00
can0 010 [8] 0A B4 0A F3 0A D6 0A CD
can0 011 [8] 00 89 55 A8 0A B5 0A A5
can0 012 [8] 00 01 00 02 00 10 00 00
can0 1FFFFFFF [8] remote request
can0 5BD [1] remote request
can0 6DF [1] remote request
can0 008 [8] 00 00 00 00 00 00 00 00
can0 009 [8] 00 00 00 00 02 58 00 00
can0 00F [8] 00 04 00 00 00 10 00 00
can0 030 [8] 0A 8C 0A 91 0F F0 0F F2
AI: What you see looks like remote frames: it's a feature of the CAN bus which allows to transmit certain frames on request rather than periodically. Simply put, a regular frame is transmitted by a single node, first ID, then length, then data. With a remote frame, the node which wants the data transmits the frame ID and length plus a special bit (RTR), and waits for the node which handles that frame to transmit the actual data.
448#**R4** means that a node has requested the remote frame with ID of 448 and DLC of 4, but nobody on the bus volunteered to supply the data. |
H: Short-circuiting the primary coil of a transformer to keep it warm
I saw this problem somewhere and I wanted to give it a try, but the numbers I've got seem to be pretty outlying.
We have a 25kV / 4160V transformer which is out of circuit for now. To protect it from humidity in a freezing cold conditions, we need to keep it warm by short-circuiting its primary coil and connecting the secondary coil to a 208V, 3ph line. How much heat will be generated in this way? The transformer specifications are as follows.
My try:
Since the primary coil is short-circuited, all the loss occurs at the core. And since it is operating at 5% of its nominal voltage, the coil loss will be 5% of its nominal value, i.e. about 650 watt. Though I suspected that since the loss is proportional to V^2 then it would be even lower, but nonetheless, the numbers are way too lower than what I've been told (which was 57% of the full-load loss).
So I would appreciate if anyone guide me on how to approach such problems.
AI: 4160*0.066 (6.6% impedance) = 274V on the secondary for full secondary current into a shorted primary.
Then the current will be 76% of full load by simple ratio (208/274), so the power losses will be 0.76^2 = 57.6% of full load losses. This obviously makes an assumption that iron losses are linear with flux, which they are not, but it is a reasonable working model.
Note that there is primary current flowing so all the copper losses work in the usual way, it is NOT just core loss. |
H: electrical homework help
I need to solve exercise 57. I need to determine the voltage between points A and B in diagrams (a) and (b).
What I think so far:
The voltage on 10 ohm resistor is = 0.1A * 10Ω = 1V
The current on 20 ohm resistor will probably be 0.1A too (I think, I'm not sure). In this case its voltage is 2V (0.1A * 20Ω)
UAB = Upower-Ur1-Ur2 = 4.5V-2V-1V = 1.5 V
Is it correct?
Thanks for your help.
AI: If we apply the first law of Kirchhoff we can tell that the current in both resistors (in both circuits) is the same, as you said. Thus, the voltage fall on the 10 ohm resistors is 1V and the other is 2V. Now, you have to apply the second law to determine V between A and B.
We need to add al voltages (including the source) and equal them to 0. The only thing to have in mind is the "direction" of that fall. In the first, is is against the direction so you'll need to substract, whereas in the second you'll need to add.
Vab1 = +1.5 V
Vab2 = -7.5 V |
H: Kirchoff law exercise
I need to determine the current across the 4 ohm resistor (name it I1).
What I calculated, thought out so far :
Current of 2 ohm resistor : I=5V/2ohm=2,5A. I Think this current is flow towards the A point (because the current and voltage direction is always the same on passive components, is it true?)
The currents on the A point is : 5A+2,5A=7,5 A comes in , and 3.5 flows out. 7,5A-3,5A=4A
This means 4A needs to flow out from the A point , i think it's flow toward the one ohm resistor.
Voltage on 1 ohm resistor is U=4A*1ohm=4V
I cannot calculate from there the current through the 4 ohm resistor.
AI: You're almost there. Use KVL to find the voltage on either side of the \$4\Omega\$ resistor. Because you know the voltage across the \$1\Omega\$ resistor, you can solve for the voltage across the resistor you care about by applying KVL. |
H: STM32f103 DMA with PWM repeating values
I have a Blue Pill (STM32F103) and connected to it a ws2812b led strip. I am trying to send data to the led strip via PWM over the TIM2 peripheral (Pin A0). To change the duty cycle of the TIM2 PWM I use a DMA channel. This works perfectly at lower speeds (eg 100khz) but as soon as I get near to the required 800khz of the leds the MCU seems to send some pulses twice, this would make sense if I overload the bus, but from what I have gotten out of the datasheet it should be able to handle 800 kbyte/s.
What makes the entire thing more complicated, is that I am trying to write this in Rust and there is no code I could compare mine too. I will try to post the relevant parts of the code and explain it as good as I can.
Main Code:
// setup pwm
let mut pwm = p.TIM2
.pwm(
c1,
&mut afio.mapr,
800.khz(),
clocks,
&mut rcc.apb1,
);
let max = pwm.get_max_duty();
let one_duty = (max * 16 / 25) as u8;
let buf = singleton!(: [u8; 25] = [one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, one_duty, 0]).unwrap();
// set duty to zero
pwm.set_duty(0);
// enable pwm output
pwm.enable();
// enable the dma and wait for it to finish
pwm.write_all(channels.5, buf).wait();
WriteAll function code:
pub fn write_all<A, B>(
self,
mut chan: $c1_chan,
buffer: B,
) -> Transfer<R, B, $c1_chan, Self>
where
A: Unsize<[u8]>,
B: Static<A>,
{
{
unsafe { (*$TIMX::ptr()).dier.modify(|_, w| {
w .tde().set_bit()
.cc1de().set_bit()
}); }
let buffer: &[u8] = buffer.borrow();
chan.cmar().write(|w| unsafe {
w.ma().bits(buffer.as_ptr() as usize as u32)
});
chan.cndtr().write(|w| unsafe{
w.ndt().bits(u16(buffer.len()).unwrap())
});
chan.cpar().write(|w| unsafe {
w.pa().bits(&(*$TIMX::ptr()).ccr1 as *const _ as usize as u32)
});
atomic::compiler_fence(Ordering::SeqCst);
chan.ccr().modify(|_, w| {
w.mem2mem().clear_bit()
// priority
.pl().high()
// size in memory
.msize().bit8()
.psize().bit32()
.minc().set_bit()
.pinc().clear_bit()
.circ().clear_bit()
.dir().set_bit()
.teie().set_bit()
.htie().set_bit()
.tcie().set_bit()
// enable
.en().set_bit()
});
}
}
My question is: why is DMA not fast enough even though it should be as stated by the documentation?
AI: I found a solution while writing this question. I thought I post it anyway since it might help other people. After calling write_all I call wait, which constantly polls the result. This occupied the bus and slowed down the DMA transfer.
Edit: I did not set the right clock multiplier, so the MCU ran at only 8mhz. When running faster, it works great. |
H: AVR: Pullup vs Pulldown on button input?
So I know the Atmega328p (What im using now) has Pull-up resistors available to be activated. And I know when reading input we could either make a button cause a PIN to go high or low....but is there an advantage to either?
Obviously making the button go to GND when pressed is easiest since there are Internal Pullup's available...but is there possibly an advantage to making an external pulldown and then making the logic level go high when pressed?
I seem to see the first (easier way) used more, but I was curious if there was an advantage to either one.
AI: Datasheet shows that
the noise margin is a little wider for the High logic input state.
input current is microamperes, no serious difference between Hi and Lo states.
Obviously the same noise field cause more voltage to wire+pull-up resistor than to wire + to GND conducting switch. Conclusion: Use pull-up resistors.
This is true of course when only external resistors are compared. If you compare internal pull-up vs external pull-down, of course the external pull- down resistor reduces noise, because it must be quite small to win the internal pull-up. This can make someone to think that the question was originally a trick.
NOTE: In severe conditions, for ex. near radio transmitters (including wlan and phones) the difference is nonexistent, serious design effort is needed to filter the noises out of the signals. |
H: How far can a terminating resistor be from the literal end of a CAN bus?
I'm wondering if anyone knows if there is an upper limit for the distance a terminating resistor can be from the literal end of the CAN bus or where the last node is.
We have an HMI that is connected to the CAN bus and it is located beside a panel. We are wondering if it is acceptable to have the terminating resistor within the panel itself (via a terminal block) and a harness would run from there to the HMI. The cable distance would be about 10' (including strip length and distance between the panel and HMI).
We are hoping this will be acceptable purely for aesthetics, because this will eliminate the amount of loose wires hanging near the HMI.
I've gone through the TI physical layer instructions and did not find any such constraint.
I'm guessing the distance would only be an issue if the line impedance increases dramatically due to the length of cable but I'd like to know for sure.
Thanks.
AI: What you have is essentially an unterminated stub. This TI application note mentions on page 9 the maximum length allowed for a stub according to the CAN specification. It is 0.3 m, slightly longer than your 10, therefore I think you should be fine.
If you can change the slew rate of your CAN driver, as they suggest, then you might have longer unterminated stubs, but it does not apply to your case, since your HMI panel probably cannot change its slew rate.
edit: Oops, mixed 10 inches with 10 feet, which is way larger than the maximum allowed stub. |
H: A question about triac output of zero crossing SSR relay
In a zero crossing SSR if the output is a triac, would the gate be fired/triggered every 180° or would the gate be applied a constant voltage all the time?
I'm asking because in both cases the load will pass the whole aleternating current.
EDIT:
First of all, the question is not about the phase control; it is about ON OFF control either with a random or with zero crossing relay.
Below is a hand drawn figure for clarification:
As you see as long as the control input of the SSR Vcon is ON the AC is always ON. I also added the time points A, B, X and Y.
But when the Vcon is turned ON at time A, the zero crossing circuit waits a bit more for Vac(or Iac?) to approach almost to zero and at point X the gate triggers to turn ON the AC power. Similar relation is valid for point B and Y.
And all these are for to minimize L*di/dt.
So this type of ON OFF zero crossing control can be used for inductive loads(?). But phase control cannot be used for inductive loads because there is no zero crossing mechanism there?
But my main questions are the following:
1-) In my hand drawn figure, how would the gate voltage look like?
2-) If a relay is used for turning ON a device for one day and turning it OFF for one day, would one still needs a zero crossing option. Because in this case the triac will only turn ON or OFF at non-zero voltage only two times a day. (In some cases ON OFF action is many times a second so zero crossing helps to prevent spikes; but if the function of the relay is just to turn ON for very long time the switching action will happen only one time when turning on and one time when turning off. Is it still required to use zero crossing in that case?)
I hope my questions are more clear now.
Edit 2:
At turn ON zero crossing prevents high current for capacitive loads.
But for the inductive loads the following reference is interesting:
And here is comparing resistive and inductive circuits at off time:
And plots:
The first plot is mimicking zero crossing control signal and showing line voltage.
The middle plot is the voltage across a pure resistive load 220 Ohm.
The third plot is the voltage across R L the inductive load.
What is the way to prevent such peak in real? (Same peak across the triac as well)
AI: The gate current comes from the load, and will be triggered near the zero crossing if it is to be on, so every 180°.
There is no guarantee that there will be no DC component in the load current, if that is what you are asking, but it usually works out that way. If you were to pathologically provide pulses to the SSR timed to be near alternating zero crossings you could make it into a rectifier (for some, probably most, SSR designs).
Edit:
You should think of gate current, not gate voltage. In the example, the gate current will generally consist of spikes perhaps 100-200 microseconds long around the zero crossing.
Zero cross switching is mostly for EMI reduction. If the device is switching infrequently, the EMI is less bothersome, as with mechanical relays. Of course the thyristor will not switch off until the current drops below the holding current (usually considered close to zero compared to the load current). |
H: Convert 36 V lawn mower from Lead Acid to Li Ion batteries - charging / danger
I have a 36 V lawn mower with a battery container with three 12 V SLA batteries in series.
I am thinking about switching to LiIon batteries for more run time (and hopefully more recharge cycles). I can find batteries that fit physically, and putting them in series is easy.
I don't think the SLA charger will charge LiIon batteries correctly. I found 36 V LiIon charges online. But...it is safe?
I thought LiIon batteries packs need a thermal sensor input to the charger to prevent overheat/damage during charging. All the LiIon charges I found are 2 pin output.
Is it safe to charge 3 LiIon in series? Or do I need to charge each 12 V individually?
I found someone doing exactly this project but using small cells (YouTube). However, he does not discuss if/how he changes charging circuit or running circuit.
AI: I wouldn't charge separate packs in series.
If you have a pack with series cells (if it is a 12V one, it must have series cells), the balancing electronics is built into it if it is any good. (As well as the emergency shutdown mechanism.) If it doesn't have it built into it, the battery will blow up in your face during usage anyhow, so why worry about charging :D
If you have separate cells you can charge them with, per se, a lab power supply, or with any other power supply on which you can set a maximum current and a maximum voltage. They won't explode.
The problem arises when there are multiple cells in series and one of them charges faster then the rest of them. That is the one which will blow up.
(But to be honest, in my experience, if the cells are from the same batch, the aren't likely to fall out of step with each other.) |
H: Ultrasonic Sensor Serial Output Grounding Issue
I have a small circuit which uses a Maxbotix Ultrasonic sensor (Datasheet: https://www.maxbotix.com/documents/HRLV-MaxSonar-EZ_Datasheet.pdf) to take distance measurements and then transmit them over bluetooth with a BLE Nano 2 IC. The circuit is powered by 3 AA batteries. My problem is that the circuit only works when I physically touch the circuit thereby providing (I assume) additional grounding. To be specific, this sensor outputs TTL Serial data; the data is garbage unless I am touching the circuit.
I am a novice when it comes to circuit design. Can anyone please advise how I might go about solving this problem?
Updated Schematic
simulate this circuit – Schematic created using CircuitLab
AI: My first reaction:
Try a high side switch to toggle the power to the 1043 instead of the current MOSFET configuration. This will preserve your ground reference for the serial communication.
Or, for a quick test, hard-wire the 1043 to be 'On' all the time and see if the problem goes away.
You can hard-wire the 1043 to be always 'On' by:
Removing the MOSFET1
Connect the GND terminal of the MB1043 to the negative terminal of your batteries.
simulate this circuit – Schematic created using CircuitLab |
H: What is the purpose of these capacitors in this State Variable Filter schematic?
I need some help understanding this schematic. It's a state variable filter based parametric equalizer. What are the capacitors C4, C5 and C6 for? Are those coupling capacitors like C1 and C7? Are they necessary? Because, if I simulate the schematic without them, I still get the same function.
Thanks for your help.
AI: They are DC blocking capacitors, to keep the whole circuit AC coupled. In particular, they keep any DC current from flowing in the 'frequency' pots, which could cause audible scratching when the knob is adjusted. If you look at the circuit, the only ground references are at R11 and R14.
The reason it simulates OK is probably because your simulator has all matched op-amps (you could try leaving them out and then doing a Monte Carlo simulation on the op-amp offsets), and because the sound of a DC-biased pot being adjusted isn't something you can simulate. |
H: Little torque of single phase asynchronous motor
I have a single phase asynchronous motor rated 230V, 500W. It has three terminals labeled U, V, W. I connected L1 to U and N to V (other way round makes no difference though). Between V and W is a 500V 18µF capacitor.
Without load the motor starts spinning and reaches top speed within two seconds. However when I put light load it starts rotating very slowly and is accelerating only slowly too. Once it reaches maybe ~ 2/3 of it's top speed of 2340 RPM (labeled, not measured) it get's much more torque.
Is there anything I can do so the motor has more torque when starting, without affecting torque at top speed? Maybe replacing the capacitor but to what value?
AI: This is the usual behaviour of asynchronous motors. See their torque-speed characteristic:
The acceleration depends on the difference between driving machine torque and working machine torque at any particular speed. If your working machine has a pretty high torque at low speeds, you may even run into this situation:
Here, you cannot even reach the green operating point. The machine is stuck on the left. You need a clutch to run this working machine with this driving machine.
Using a bigger starter cap may improve things a little bit but don't expect wonders. The problem isn't the cap but the machines you have. |
H: What is the best approach to calculate the transfer function of this RC circuit?
I want to calculate the transfer function of the circuit below. I tried to calculate the equivalent impedance of each block and work my way with voltage dividers until I get to V3, but this method is very long and I wonder if there is better way.
AI: Mesh analysis
Nodal analysis
Stepwise mesh-then-nodal, working backwards. This only works for ladder circuits like this, but it's kinda fun:
Assume everything is in the Laplace domain. I should have capitalized my signal names, but I didn't, I only just realized it, and I'm lazy:
Label a \$v_2\$ and \$v_1\$ in the obvious spots.
Assign currents \$i_1\$, \$i_2\$, etc., to \$R_1\$, \$R_2\$, etc.
Calculate \$i_3\$ as a function of \$v_3\$.
Calculate \$v_2\$ as a function of \$v_3\$ and \$i_3\$.
Calculate \$i_2\$ as a function of \$i_3\$ and \$v_2\$.
Etc., until you get back to \$v_i\$
Now start substituting like mad (in simple steps, which is why I like it) until you get the great big nasty formula for \$v_i\$ as a function of \$v_3\$. Then do just a teeny bit more algebra so that you have \$\frac{V_3}{V_i}\$. |
H: Do SMD resistors have to be reflowed black side up, or is black side down okay?
I reflow my own boards in a toaster oven. When I drop my resistors off the paper tape, I always flip them over to black side up before I place them. Should I bother if it doesn't really matter?
AI: There are several reasons to put the alumina (white) side down. For small production/hobby runs it may not matter.
You can tell if the resistor has been overloaded for whatever reason as the passivation/element color will generally change under high continuous heat.
Depending on the technology, the contact dimensions may not be the same on the top as on the bottom. Pad geometry assumes alumina side is placed into the paste.
It's a little easier to clean which can be an issue in high resistance components. Passivation layers typically have varying heights/roughness, unlike the flat alumina base.
Wear and tear under mechanical stress, passivation layers are not as tough as the alumina substrate so if the board rubs against it it will eventually get damaged (usually only a problem on thin board under mechanical loads). |
H: When I rework an SMD capacitor or resistor, it will sometimes stick to the soldering tip. Does this high temp then destroy it?
When I rework 0402 capacitors, then often stick to the tip of the soldering iron. My iron is set at 350. I then discard the cap because I am worried the sustained temp for a few seconds has destroyed the cap. But has the cap actually been destroyed, or possibly damaged? I see the temp rating is much lower than 350.
AI: I can't give you a scientific answer, but I have had capacitors and resistors stuck to my tip and I always use them as if nothing happened. I never had an issue to date.
Also, you are probably looking at the temperature rating which only concern the specifications. That is, it will only really be, let's say 1nF, if it is at those temperatures, but higher temperatures won't necessary damage it. Try looking at the reflow profile specified in the datasheet, or the absolute maximum ratings. I think it only matters if the temperature changes too fast; I don't think that high temperatures in it self do much harm.
Although, this says it might crack: |
H: What kind of part is this?
What kind of part on the board below? Or it's a part of another part?
AI: It's an AMC (Advanced Mezzanine Card) hot swap ejector handle.
Similar to one of these.
There are three positions the latch can be in, a switch to tell the card that withdrawal is anticipated, and typically an indicator that indicates when it is safe to remove the card. Images from here. |
H: Measuring MOSFET input capacitance?
Am I calculating total input capacitance or gate capacitance or none of the above? And are my calculations even correct to begin with. The point of this is that I want to know what gate capacitance im dealing with to properly chose a gate resistor to give me the rise time I need, more or less.
So I have the following circuit using the old IRF540
simulate this circuit – Schematic created using CircuitLab
I am probing the gate directly and get the following readings:
I am loosing 500 mV somewhere but anyways:
My voltage at 1 time constant is:
(This is where the dashed vertical line is)
So measuring the time from 0 V (solid vertical line) to the 1 time constant line (dashed) you can see is about 530 ns. So my time constant is 530 ns and the gate resistor is 100 ohm then:
Is my logic correct that this is my input capacitance? And given will this vary if I have same Vds but a Vgs that is NOT equal to Vds?
Extra points: Where are my 500 mV?
AI: You are measuring the lump capacitance in accord with this standard model,
You even have observed the Miller Plateau.
The capacitances do depend on applied voltages however, see this ROHM article. As VDS increases the capacitance decreases.
Brief description of methods used to characterize individual capacitances can be found in this Vishay Siliconix appnote AN-957, see Fig.17, 18, and 19. Three configurations of a capacitance bridge are used, and then individual caps are algebraically determined. |
H: Q: Amplifier's Output filter not having the Correct Cut off frequency
I am trying to design a output filter, a simply one (First order) just to play around with and for some reason when I run the simulation of it its not the correct Cut off frequency which it was designed for.
There's already a High Pass Filter at the input of the Amplifier Fc = 0.320Hz.
simulate this circuit – Schematic created using CircuitLab
This make sense as 560K R and 1uF C has a Fc ~= 0.318Hz
Bode Plot of Node 1:
Bode Plot of Node 2:
But whats happening here? Why isn't the FC ~=0.284Hz but its 581mHz?
And if I change the Fc to something like Fc = 20Hz with RL = 8 it works perfectly
Whats going on?
AI: You have two factors at play here. One is the output impedance of the amplifier, which seems to be of the order of 100-150 Ohms. This impedance gets added to the 560 Ohm load, which shifts the -3 dB point. The other factor is that you have two RC filters in series, one is 500k/1uF on input, and the other is 500R/1mF on output. Transfer function of these two sequential filters is a product of two RC functions, and phase also shifts, which again shifts the -3dB point into higher frequency area. |
H: Typical application for FAN5333B
I have an issue regarding the typical application for FAN5333B LED driver.
According to the spec, SW output can achieve 30V to GND.
Can this influence the input voltage which is typically about 5V ? Both point are directly connected for DC.
AI: The FAN5333B is a boost converter.
It pulsates current trough the SW pin and uses the magnetic field in the inductor when SW is off to boost the voltage. It specifies a typical Vout of 30V, which is after the diode. The switch pin is allowed to go up to 35V, which it will. Since the SW voltage will pulsate.
This does not have an effect on Vin, except that the circuit draws high current in short pulses.
It has a 1.5MHz Switching Frequency, which requires tight board design.
ps: if you have not used buck or boost converters before, I suggest using a lower frequency to increase your success. |
H: Audio Frequency Response Offset in dB
Say I have some audio device with the following absolute frequency response:
I want to shift the curve up, so that the 1kHz point is the 0dB point, and everything else is relative to this point. Am I correct, that I cannot simply add 0.35dB to the entire curve, but need to compute back to Vout from:
dB = 20log(Vout/Vin)
add whatever voltage is necessary to the initial Vout to make the 1kHz point 0dB (we'll call this added voltage "curve offset voltage"), then offset all of the Vout values across the measurement range with that same curve offset voltage to obtain the frequency response relative to 1kHz?
Initially I just added +0.35dB to the entire curve but after thinking about it, I don't think that makes sense, since it would be changing the output magnitudes at each frequency exponentially.
AI: ... add whatever Vout is necessary to make the 1kHz point 0dB, then offset all of the Vout values across the measurement range with that same "offset" voltage to obtain the frequency response relative to 1kHz?
You will make the +0.35 dB adjustment by amplifying the signal by +0.35 dB and not by adding an "offset" voltage. This will raise the whole curve by +0.35 dB.
Initially I just added +0.35dB to the entire curve but after thinking about it, I don't think that makes sense, since it would be changing the output magnitudes at each frequency exponentially.
Not exponentially. "Ratiometrically" would be a better description.
That's what most amplifiers or attenuators are designed to do. Think of a potentiometer in a volume control application, for example. It attenuates by a fixed ratio across the full spectrum (ignoring any parasitic capacitance).
One of the handy features of using decibels is that we can just add them rather than multiplying ratios and, for audio work, it gives a linear value which is a good approximation to the ears' perceived volume. For example, if we had a -3 dB attenuator followed by a +5 dB amplifier and a -9 dB attenuator we can get the full circuit gain as -3 + 5 -9 = -7 dB. |
H: A simple circuit to turn on door LED when someone visit me
I want a simple circuit do an alarm light that tell me someone visited me.
When someone visits me and in the case no one answer the door, I want to know that.
So I want a press button switch outside the door that will turn on a LED inside the house and will not turn off until I reset it inside the house.
How simple that can be done?
Best to make use of my existing rechargeable USB battery that is used for phones.
AI: What you are looking for is called a latch.
Before you get there through, break down your project into smaller parts.
Start by learning how to turn on an LED using a button to activate a mosfet.
Then add the latch. And finally a battery (don't recommend using rechargeable one for safety). |
H: How to drive 4-pin fan
I've been attempting to get this 4-pin brushless dc pc fan working for some time now.
It has a red (+) black (-) blue (PWM in) and yellow (tachometer out).
I only want this fan running at maximum speed and I have seen people run these, like in this video without the PWM blue wire. However, they are still using the tachometer output, which I think it unrelated... I still cannot get it working.
I think I've tried any combination of wires connected to either + or ground.
Any ideas?
AI: Connect +12V to red and 0V to black leave the other wires unconnected. If that doesn't work the fan is busted.
This is based on the assumption that this similar to the AFB series fans. (and every other common 12V tacho/pwm fan), I could't locate the AFC series on the Delta electronics web-site.
some of their other fans have blue as tachometer out and yellow as pwm in. |
H: Why are FPGAs so expensive?
I mean compared to ICs (ASICs) with similar complexity, speed etc. Let's compare Ethernet switches to Kintex FPGAs (note that the most expensive switch from the list is circa as expensive as the cheapest Kintex):
FPGAs are well structured ICs (like RAMs). They can be scaled and developed easily.
The design tools (Vivado, Quartus, etc.) are expensive too, so I think the price of an FPGA is the price of the IC (and development) itself excluding the cost of support and the tools. (Some non-FPGA vendors give free tools whose development cost includes the IC price.)
Are FPGAs produced in lower quantities than other ICs? Or is there any technological harness?
AI: FPGA chips include both logic and programmable connections between logic elements, while ASICs include only the logic.
You'd be amazed at how much chip area is devoted to the "connection fabric" in an FPGA — it's easily 90% or more of the chip. This means that FPGAs use at least 10× the chip area of an equivalent ASIC, and chip area is expensive!
It costs a certain amount to do all of the processing on a given silicon wafer, no matter how many individual chips are on it. Therefore, to a first approximation, the chip cost is directly proportional to its area. However, there are several factors that make it worse than that. First, larger chips mean that there are fewer usable sites on the wafer to begin with — wafers are round, chips are square, and a lot of area is lost around the edges. And defect densities tend to be constant across the wafer, which means that the probability of getting a chip without a defect (i.e., "yield") goes down with chip size. |
H: Equivalent circuits with one or multiple resistors
I am designing a circuit but I am facing a repetitive design that require too many resistors. The problem comes down to answering if the next two circuits are equivalent in terms of voltage drops:
simulate this circuit – Schematic created using CircuitLab
simulate this circuit
Note that there are actually n resistors: R2,R3,...Rn. All values are known and can be different from each other(R2<>R3<>R4<>...<>Rn) and R1,R2,..Rn have the same values in both scenarios (the values on the drawing are incorrect).
The question is as it folows: Is the voltage drop on R2,R3,...,Rn same in both scenarios?
AI: Clearly not!
Consider if R2 is 0 ohms, then in the op circuit there is NO VOLTAGE developed across any of R2-Rn because they are all short circuited by the 0 ohm R2. Clearly further in the first circuit the voltage is the SAME across all resistors R2-Rn because they are in parallel.
In the second case you have a number of individual potential dividers, so having a zero ohm resistor for R2 only means the voltage drop across R2 is zero, it says nothing about R3-Rn which may all have different values and form different potential dividers. |
H: Using a residual current device when there is an isolation transformer
In a system, currently there is no circuit breaker and RCD, but there is an isolation transformer as in the diagram below:
simulate this circuit – Schematic created using CircuitLab
As you see the transformer has no earth wire connection.
What would be the safety approach for the secondary side? Can we say that the transformer already isolates the earth so an RCD is not necessary both at secondary and primary sides? Or is there still some benefit to have an RCD before the isolation transformer.
I mean if the secondary in above diagram is earthed accidentally the isolation will be defeated; in that case would the RCD in primary side still trip if someone touches the live chassis of the load?
AI: What would be the safety approach for the secondary side? Can we say that the transformer already isolates the earth so an RCD is not necessary both at secondary and primary sides?
Yes, but only until the first earth fault occurs. Until that happens the circuit is isolated and theoretically touching either wire will not result in electric shock. In practice, capacitive coupling between the primary and secondary may cause a small current to flow.
The problem is that there is no monitoring of the circuit so the user will not be aware of the first fault grounding one of the output wires thereby making the second one live.
Or is there still some benefit to have an RCD before the isolation transformer.
It will protect the user if the transformer chassis were to go live.
I mean if the secondary in above diagram is earthed accidentally the isolation will be defeated;
Yes, but you won't get a big fault current as you would by accidentally shorting the L wire to earth. This can be very useful in fault finding, for example.
Clarification 1: If you plug a defective piece of equipment into the mains and there is an L-E fault a very large fault current may flow. With the equipment plugged into the secondary no fault current will flow. This gives you time to trace the fault.
... in that case would the RCD in primary side will still trip if someone touches the live chassis of the load?
No. The L + N current in the primary would still sum to zero so the RCD would not trip.
simulate this circuit – Schematic created using CircuitLab
Figure 1. Float monitoring.
By adding a couple of very low wattage (high resistance) lamps or secondary voltage-rated AC LED indicators the secondary voltages will be pulled to centre around earth voltage (0 V). For example, if the secondary voltage is 200 V then the lamps will cause the secondary to be like a split-phase 100 - 0 - 100 secondary. Both lamps will glow at half voltage.
If an earth fault occurs on one 'phase' that lamp will go out and the other will go to full brightness.
This may be useful in your application.
From the comments:
"Yes, but only until the first earth fault occurs." Yes to what?
See Clarification 1.
About having RCD before primary first you write "It will protect the user if the transformer chassis were to go live" then you write "No. The L + N current in the primary would still sum to zero so the RCD would not trip."
The transformer itself has a metal core and may have a metal case. The RCD would protect the user should s/he touch the live core or case.
RCDs work by monitoring the live and neutral wires by passing them both through what is a small current transformer. If everything is OK the current in on the live wire returns on the neutral and cancels out exactly resulting in a sum of zero. If there is an earth fault some of the current returns to the supply via the earth path, the neutral current is reduced and now the sum of live and neutral currents is non-zero, the RCD detects this and trips in milliseconds. |
H: Motor Braking Issue
I have the following schematic using the motor below. (I did not create the schematic) The only information I have on the motor is what is on the information plate. The current schematic works, somewhat. When the motor flag hits the sensor, it takes too long for it to stop as shown in the third picture. (The white tape was added for clarity) It still stops it but the flag almost makes it through the sensor. If the 12v battery is fresh it doesn't stop it quick enough and the flag is completely out of the sensor by the time it stops. As the battery drains, it starts working correctly and stops in the center of the sensor as in the last picture. What can I change or do to ensure the motor stops better as soon as the sensor is hit? Also to note, I am not an electronics guy, I just know enough to be dangerous. The run/stop is a signal from an 8051 coming from another board.
AI: My guess is that when the battery is 'fresh'(ly charged?) the motor runs too fast to stop in time with the current braking effort.
Some possibilities:
1) You could try to advance the sensor a bit, but that'll only mean that the accuracy is determined by the battery.
2) You're really not 'an electronics guy'. Then you can buy another control board as shown in your picture and connect everything in parallel. This will give the DC motor a twice as big braking current without modifying, and, being dangerous enough, destroying the one circuit you have.
3) Or, if you are more into electronics than you like to admit, you could put another (same type) power MOSFET with duplicate braking resistor in parallel with the existing braking MOSFET + resistor and pray that the driver will still work correctly.
It's not HF switching, so I don't see much of a problem with this.
Get (exactly) the same type of MOSFET as the current braking one and another (I think it is) \$2 \, \Omega\$ resistor of the same power as the one in place. Place the new MOSFET as close as possible to the existing one, especially the gate and source connection, to prevent 'ringing' of the gate circuit. Connect the source and the gate to the same contacts as the current one, connect the drain to the new braking resistor and connect the other end of the braking resistor to were the top of the first is connected.
Provide the same cooling as the existing MOSFET and braking resistor.
4) As in 3), but then with a buffer to accommodate the higher gate driving currents. |
H: Can Induced electromotive force affect itself?
At first, I want to say that I'm not English speaker, so my question might be very hard to understand. And also this question must be a silly question because I can't find any question like this...
I heard when current varies, inductor make induced electromotive force.
then it disturbs flow of current.
I have a question at this point. When it disturbs current, is this meaning that current slightly altered? I mean that the first altered current make V(=-L dI/dt), V affect dI/dt, then altered dI/dt affect to V', and V' affect to dI'... and so on?
Is (1) L related to sum of all the effect of I, I', I'', ... or (2) just first I?
Or (3) after I(=I', I'', ...) is too small, so ignore it and just calculate and get result(=inductor transient graph)?
To sum up, when I see the graph through magnifying glass, the graph will be smooth or rough(Because speed of field is c, not infinite speed)?
Thank you for reading this silly question. But this was hard to me.
AI: The induced voltage across the terminals of an inductor due to a changing current flowing through that inductor is inductance multiplied by the rate of change of current.
It’s as simple as that. For instance, if the current is ramping at 1 amp per second through a 1 Henry inductor, there will be an induced voltage of 1 volt. It’s a cause and effect thing and there is no iterative formulation needed. |
H: Reducing the order of transfer function while maintaining same response
Scenario:
I have been going through Ogata Modern Control Engineering book and working through several exercises to improve my understanding of basic control principles. I came across the following example which I am struggling to solve.
I am stuck with reducing order of my transfer function while maintaining the same (or very similar) response.
I am modelling a system which includes a mechanical and an electrical part. The overall transfer function for my system is 5th order.
The time constant for the electrical part is very small when compared to the mechanical time constants and due to this we can replace the electrical system with a gain and get an equivalent 4th order system.
As an example, my system is similar to this (taken from Ogata's control book):
This is my transfer function, and it includes both the mechanical and electrical parts of my system:
I want to reduce the 5th order system, to a 4th order system, while maintaining the same response.
What I have tried:
In order to know whether I have reduced the system correctly, I designed the block diagram for my model on Simulink.
This is the response to a chirp signal:
My idea was to use the above response, to see whether I have reduced the transfer function correctly.
Next, I proceeded to find the poles, zeros and gain of my system. To do so, I used this piece of code available on MathWorks, with the 5th order TF above:
b = [0.0001 10];
a = [0.005 5.00010060 0.661600001 61.01102010 2.1101 10];
fvtool(b,a,'polezero')
[b,a] = eqtflength(b,a);
[z,p,k] = tf2zp(b,a)
The output was as follows, which is exactly what I had expected:
and the equivalent PZ-map:
The above results show the pole associated with the electrical circuit, which is far to the left. This can be removed, thus reducing the order of the transfer function from 5th order to 4th order.
Next, I proceeded by using zp2tf to eliminate the pole on the far left as follows, however the output does not seem to make sense.
z = [-100000]';
p = [
-0.04 + 0.0347i % *100
-0.04 - 0.0347i
-0.02 + 0.0041i
-0.02 - 0.0041i
];
k = 0.0200;
[b,a] = zp2tf(z,p,k);
[bnew,anew] = zp2tf(z,p,k);
bnew/200
anew/200
ans =
0 0 0 0 0.0001 10.0000
ans =
0.0050 0.0500 0.0001 0.0001 0.0000 0.0000
I was expecting the above to result in a 4th order system, but clearly I am doing something wrong with my approach.
I am stuck with replacing the electrical part of the block diagram with a simple gain block, while maintaining the same (or very similar) output response.
How can I get the equivalent block diagram model for the fourth order system?
Any pointers, tips and/or advice on what I should do would be appreciated.
AI: The system has two complex poles and one regular one:
Pole Damping Frequency Time Constant
(rad/seconds) (seconds)
-1.68e-02 + 4.07e-01i 4.13e-02 4.07e-01 5.94e+01
-1.68e-02 - 4.07e-01i 4.13e-02 4.07e-01 5.94e+01
-4.32e-02 + 3.47e+00i 1.25e-02 3.47e+00 2.31e+01
-4.32e-02 - 3.47e+00i 1.25e-02 3.47e+00 2.31e+01
-1.00e+03 1.00e+00 1.00e+03 1.00e-03
The highest one is at 1krad, and could be eliminated, you could also get rid of the lowest two:
%I see three time constants
tfmotor = tf([0.0001 10],[0.005 5 0.6616 61.1 2.11 10])
damp(tfmotor)
%find all basic transfer functions
[r,p,k] = residue([0.0001 10]*2000,2000*[0.005 5 0.6616 61.1 2.11 10]);
%eliminate highest frequency time constants
[b,a] = residue(r(2:5),p(2:5),k);
tfmotorReduced = tf(b,a)
damp(tfmotorReduced)
[b,a] = residue(r(4:5),p(4:5),k);
tfmotorReduced2 = tf(b,a)
damp(tfmotorReduced2)
%use impulse to show all frequencies (hit it with a dirac delta function, to make all frequencies ring.
figure;impulse(tfmotor,'b'),hold on,impulse(tfmotorReduced,'r'),impulse(tfmotorReduced2,'g')
legend('5-pole system','High frequency pole gone','Only lowest freq pole')
%better way to simulate, you can use chrip, step or any function for input
t = 0:0.001:10;
y =lsim(tfmotor,chirp(t,100,10,1),t);
figure;bode(tfmotor,'b'),hold on,bode(tfmotorReduced,'r'),bode(tfmotorReduced2,'g')
legend('5-pole system','High frequency pole gone','Only lowest freq pole')
Edit
The first pole is at 0.4rad (shown in black)
The second pole is at 3.4rad (shown in yellow)
The third pole is at 1krad (shown in red)
If you are only concerned about building a controller (a 2nd order controller) the main pole at 0.4 rad you would be able to control the biggest amplitudes, but it would have some vibration at 3.4krad because the controller wouldn't be able to respond. A 4th order controller could take out the frequencies at 3.4rad. Right now the pole at 1krad is negligible (very low in amplitude) and you wouldn't need to worry about it for a controller
Remember that for a 24bit 5V ADC -130dB would be near the nV level, so unless you need that kind of accuracy, after -100db it probably doesn't matter because you won't even be able to build a controller to control that level of accuracy in the presence of noise. (you would also need a precison DAC) The other caveat is if you built this with analog electronics for the controller, you'll still have noise after -100dB. Building controllers in the presence of noise is a topic for another day. |
H: what voltage will 7805 deliver as output if input is lower than 5 volts, lets say 3 volts
I am looking at the 7805 specs sheet and there is one chart I find missing. It is the relationship between output voltage with input voltage, specifically when input voltage is lower that 5 volts, the "nominal" output voltage.
I think it would be desirable to have 0 volts on output until 7805 can provide 5 volts, but I think this is not the real situation.
So, my question is : what voltage will 7805 deliver as output if the input voltage is 3 volts ?
Any pointer is welcome. Thanks.
AI: You can see typical behavior shown in the datasheet:
Around 3V in it will start to turn on so the output voltage will be fairly unpredictable with that input voltage (probably will vary from unit-to-unit and with temperature).
It sounds like you want some kind of supervisor functionality. There are many such chips and there are a few regulators that provide an output "power good" signal when the output voltage is fairly close to regulation. |
H: What does a transistor do?
Let's say I have a regular motor circuit using an arduino. The motor is a standard motor with a motor controller and I connect it to my arduino and get the code working but I realize that the motor is going a little slow.
If I add a transistor to the circuit the right way, does that make my motor run faster or does it not have any effect at all?
AI: Transistors allow you to switch and amplify voltage and/or current. If the motor driver is weak, you may be able to use the motor driver to drive the transistor which will switch the power rail voltage through the motor which may correct your power problems at the motor. A transistor on its own cannot increase voltage or current. It can only lower a voltage/current down to 0 from the maximum. So if your board is driven with a 5V power rail, you cannot get 10V out of it.
If you're interested in increasing voltage or current, you should look into switch mode power supplies which use either inductors or capacitors with transistors to alter the voltage/current ratio to better serve the load. Note that this doesn't increase power, it only changes voltage to the downside of current or vice/versa.
Also note that amplification of transistors isn't increasing the power of a signal, it's taking a signal and creating a transformed version of it using energy from the power rails.
To answer your question succinctly, a transistor is a switch controlled by another voltage/current. |
H: Does this experiment show that Kirchhoff's Law hold when there's a changing magnetic field involved in a circuit?
In this video, the electrical engineer and youtuber Mehdi Sadaghdar (ElectroBOOM) disagrees with another video from professor Walter Lewin.
Basically, professor Lewin shows in an experiment that if we have two different resistances connected in a closed loop, and if we generate a changing magnetic field using a coil, the voltage at the endpoints of the two resistances will be different, contrary to the expectations from Kirchhoff's Voltage Law (KVL).
simulate this circuit – Schematic created using CircuitLab
According to the experiment, the left voltmeter VM1 shows a voltage different from the second voltmeter VM2. Lewin then concludes that KVL does not hold when there's a changing magnetic field. The mathematical reason that he gives is that the magnetic field is non-conservative, and KVL can be derived from Maxwell's equations only when the field is conservative. He then says that this experiment is a proof of his claims.
Mehdi, on the other hand, points out two things: first, that the way the probing was done is incorrect. The changing magnetic field has an effect on on the probe wires, and that's one of the reasons why the voltmeters change value depending on the position.
Second, he says that because there's a loop, then the loop is behaving like an inductor, and together with the coil it's forming mutual inductor:
simulate this circuit
I understand Lewin's derivation of the KVL, so I understand that there's an issue with the non-conservative magnetic field, but at the same I think Mehdi is right: that loop is an inductor, and the way Lewin is probing the circuit looks wrong to me. So where is the mistake here?
Does KVL hold in the circuit above?
Is the probing being done right?
Does the circuit have a mutual inductor that should not be ignored?
AI: The lumped component models to which KVL is applied are just that--models. Like all models, they are only accurate to the extent that they represent the relevant characteristics of the system they reflect. The simple loop of two resistors model does not represent the susceptibility of the conductive path that constitutes the circuit to induced EMF, therefore this simple model will not reflect the behavior of the real circuit in the real world where induced EMF is a thing that happens.
The simple model can be made more accurate by including inductors between the resistors and an additional inductor that represents the solenoid that provides the changing magnetic field. By considering the coupling of these inductors it is possible to incorporate the induced EMF into the model and thus achieve results that better reflect reality. A reasonably complete model of the situation in Lewin's demonstration would look something like the following (source), which is also what Mehdi Sadaghdar shows. Note that the results of simulating this lumped element model closely resemble those of Lewin's demonstration.
This idea of refining a theoretical circuit model by adding lumped elements to represent parasitic terms (that is, inherent characteristics of a system that are not intentional but are relevant to the system's behavior) is not exclusive to situations where there is a changing magnetic field, and is in fact a common and useful practice in electrical engineering. For example, the behavior of a MOSFET switch can be more accurately modeled by including elements to represent CGS and CGD.
In this case, the inductors represent an electrical phenomenon that is governed by the physical relationship between the elements of the real world circuit. As such, if the circuit is physically rearranged, the inductors in the model must be adjusted to reflect the electrical characteristics of this new physical relationship. This is also a well-understood aspect of electrical engineering, where, for instance, the physical proximity of two tracks on a PCB must be understood as affecting the way the signals in those two tracks interact.
At a certain point, when the rates of change in the circuit state become fast with respect to the physical size of the components of the circuit (including wires/PCB tracks!), the lumped element becomes unwieldy at best and inaccurate at worst, at which point things like transmission line models come into play, but the lumped model remains quite useful in dynamic systems operating well into the MHz range.
So on the whole, Lewin's claim that KVL does not work for the situation he demonstrates is basically correct, but only because the circuit model used does not represent elements that are crucial to understanding its real world behavior.
As a side note, it may look as if Lewin doesn't understand what's happening in this circuit, however he clearly does when you examine the specific language he uses in the lecture and in other materials. From this supplement:
Suppose you put the probes of a voltmeter across the terminals of an inductor (with very small resistance) in a circuit. What will you measure? What you will measure on the meter of the voltmeter is a "voltage drop" of Ldi/dt. But that is not because there is an electric field in the inductor! It is because putting the voltmeter in the circuit will result in a time changing magnetic flux through the voltmeter circuit, consisting of the inductor, the voltmeter leads, and the large internal resistor in the voltmeter
This makes it clear that Lewin considers the voltmeter and its leads part of the circuit, and as he has stated, the path taken through the changing field affects the integral and therefore the voltage indicated by the meter. This is precisely the effect that Mehdi Sadaghdar describes in his video, just observed from a physics perspective (Faraday et al) instead of an EE perspective (parasitic inductances). I'm not sure why Lewin has not chosen to acknowledge this equivalence, other than that he considers the latter a 'right answer for the wrong reasons'.
Edit to add:
In this video, Lewin more clearly expresses his objection to formulating the problem in a way that reflects KVL. For this circuit:
simulate this circuit – Schematic created using CircuitLab
Lewin shows that, starting at the bottom left corner and moving clockwise, the closed loop integral of \$\overrightarrow{E}.\overrightarrow{dl}\$ is as follows (note that no term is shown for the inductor because it is assumed to be ideal, ie, superconducting):
\$ \oint \overrightarrow{E}.\overrightarrow{dl} = -V_{0} + IR + \frac{Q}{C}\$
Because of these two identities:
\$\oint \overrightarrow{E}.\overrightarrow{dl} = -\frac{d\Phi_{B} }{dt}\$
\$-\frac{d\Phi_{B} }{dt} = -L\frac{dI}{dt}\$
We can describe the circuit using this equation:
\$-V_{0} + IR + \frac{Q}{C} = -L\frac{dI}{dt} \$
If we wanted to get something that resembles KVL, we can simply move the term that describes VL to the other side of the equation:
\$-V_{0} + IR + \frac{Q}{C} + L\frac{dI}{dt} = 0\$
Of this latter form, Lewin says moving the inductance term to the left "doesn't make the equation wrong, but the physics stinks!" because we now neither side of the equation wholly represents \$ \oint \overrightarrow{E}.\overrightarrow{dl}\$. |
H: C Language Pointers Question
Not sure if this is the correct place to post a programming based question so will have a go anyway.
Attached below is a piece of code and a table where I have to fill in the blanks. Just to clarify, the question essentially is, ("The table should contain both the address and value of each integer variable after the last line of code has been executed.")
The bottom table is my attempt and the boxes with a '?' are where I don't understand:
I do understand pointers but I am getting confused with the pointer to a pointer variables I think.
By the way this is based of a 32-bit micro-controller, hence the hex values.
Would be great if someone could explain the step by step logic I should be taking with this code to fill in the table.
Thanks
AI: The * unary operator is called the dereference (or indirection) operator, and it dereferences a pointer to the value stored to where it points.
For example:
int main(){
int a;
int *b;
a = 3;
b = &a;
return (*b);
}
The function above would return the value 3.
The operator can also be cascaded. For example, *(*z). Here *z would return whatever value is stored in the location that z points to. In the case that z was pointing to a pointer (i.e. int **z = &y and y is a pointer), then the second indirection would return the value at the location pointed to by the pointer that z points to (in this case, the value of y).
The & unary operator is called the address-of operator. It's function is pretty self-explanatory:
int main(){
int w; // assume this is stored at 0x0000
int x; // assume this is stored at 0x0004
int y; // assume this is stored at 0x0008
w = 3;
x = w;
y = &x;
....
In this example, x == 3 and y == 4 (or y = 0x0004h). |
H: Is a self-locking relay the same thing as a latching relay?
This self-locking/inching WiFi relay can be configured to work in self-lock mode, in either NO or NC mode.
I’m not sure if self-locking means the same thing as latching. Wikipedia says:
A latching relay maintains either contact position indefinitely without power applied to the coil. The advantage is that one coil consumes power only for an instant while the relay is being switched, and the relay contacts retain this setting across a power outage.
The device above has a SRD-05VDC-SL-C 5V Relay component, and I saw a video where someone took one apart and it appears to have a copper coil which leads me to beleive this is using an electromagnetic current to close/open the contacts.
What happens if the coil is charged and then power is removed from the relay? Wouldn’t the contacts drop? If so, then how could the relay maintain the current state?
BTW this relay specifically states it is latching and uses the same component, so maybe my understanding of how the SRD-05VDC-SL-C 5V works is incorrect.
AI: According to Mozar Tips YouTube video the relay is not latching.
According to the Amazon link the unit is HiLetgo 5V 1 Channel Latching Relay Module with Touch Bistable Switch MCU Control. It's not the relay that is latching - it is the module.
Figure 1. The board sports an STC 15F104E MCU. That's what's doing the latching.
Any device using the SRD-05VDC-SL-C relay will open its NO contact when the power is removed.
A latching relay is shown below.
Figure 2. Go to HomoFaciens and click "Start animation" to see how the pawl mechanism is advanced on every impulse of the relay coil. |
H: KiCad pad clearance problem
I set up a clearance of 0.256 mm, however, this distance is only applied between the ground and traces. When it comes to ground and pads, this distance is small. I am wondering will be the copper removed from that purple area, between the pads and the ground (see image), and what is the purpose of that purple layer in manufacturing process?
AI: Look at the Layer Manger on the right. You will see the various layers and their meanings.
I suspect that your purple layer is the F.Mask or front solder mask layer. This will prevent soldermask from being applied over your through hole. There will be copper only where you see the inner gold ring.
If you want to increase the pad clearance, you should click on it and press 'E' for edit. Then look at the "Local Clearance and Settings" tab. There you can override the clearance for a single pad to increase it from the default. You can also set this clearance at the footprint level by choosing the footprint and pressing 'E', then going to the same tab. |
H: How do you connect a device pin AIo when there is only AI0+ and AI0-
I am new to electronics and I faced this problem. I tried to search about it but got lost.
Here is the sensor and the DAQ device
https://docs-emea.rs-online.com/webdocs/13ec/0900766b813ecfc2.pdf
https://sourceforge.isae.fr/attachments/download/1824/IO_myRio_msp.png
Thank you
AI: The device will measure the voltage between AIx+ and AIx-. If you want to measure a single ended voltage, connect - to GND and + to the signal. Let's suppose you connect the potentiometer between GND and the power supply and you want to measure the voltage on the middle pin: Connect the middle pin to AI+, and AI- to GND. |
H: How is this a High Pass filter?
Might be a dumb question, but isn't this a Low Pass filter? If not can someone explain me how it is a High Pass filter?
This is the link for the complete document: http://www.circuitbasics.com/design-hi-fi-audio-amplifier-lm3886/
AI: It's not, in that figure that is a voltage follower with a capacitive load with a resistor in series.
You need two impedance to create a divider, one in the feedback loop and one somewhere else. A high pass filter needs DC blocking.
The diagram should have looked like this to illustrate the high pass portion of the entire circuit (I realize that it doesn't have a DC bias, this is for illustration only) : |
H: Is there a practical way to create/inject some visible interference into a nearby AC mains?
I have this 230 to 6V rms step-down transformer. I use it to observe the mains voltage.
But recently I needed to create some interference or spike in the mains. So I first tried the following:
I used a filterless power strip. I coupled the transformer's primary side to one of the sockets of the power strip. And at the adjacent socket I plugged a heat gun. I sometimes very randomly saw some tiny fluctuation and that disappeared.
My approach was to see the interference from the nearby AC socket. What type of load would create a visible interference or spike? Or is there any other practical way to achieve this. I want to create a spike or interference by a load and observe that from a nearby AC socket via a scope and a transformer.
More over is there a safe way to observe the Line to earth or neutral to earth voltage on scope? I mean if I use the transformer secondary for the line can I connect the scope ground to the mains earth safely?
AI: For EMC testing to meet standards, a so-called CDN (coupling-decoupling network) or LISN (Line Impedance Stabilization Network) is used. You may be able to find schematics and instructions for making such a network. I have built LISNs (for measuring noise created by circuits) from such information and they worked fine for pre-compliance testing.
Here is the internal schematic of a commercial device. As you can see it's a decoupling network on the mains input and a coupling network on the other side to allow injection of signals.
As far as creating nasty noise without any fancy equipment, I've found a classic 100/140W Weller soldering gun to be a good informal source of noise (photo from Amazon.com). Certainly they are better used for creating noise than for soldering for 99% of electronics purposes. |
H: Do I need a relay for my LED bars?
I installed two 4" 18 watt LED light bars on my ATV. It is currently wired to the factory switch on the ATV handlebars and there is no relay being used. I have had to replace the right LED bar twice because it has died on me. Is this because I didn't use a relay? Will the relay help?
As a side note, the battery seems to be failing and not holding a charge well (old battery). When I start the ATV (can't use electric start, pull only), the lights will turn on but they will start to dim unless I rev the engine.
The ATV is a 1995 Polaris Magnum 425 4x4.
AI: Change your battery first.
Unlike cars which use alternators, ATVs and motorcycles get power from very simple stator generators. How it works is that there's a permanent magnet on the flywheel which excites a stator coil, which is followed by a bridge rectifier. Unlike an alternator, regulation is done by measuring the output voltage and then shorting the stator coil to ground with SCRs.
How does the system convert rectified AC pulses to DC? It treats the battery as a capacitor. And unlike a car, the system is 1-phase, so the voltage does drop to 0 twice every revolution.
When the battery fails, the pulses and noise aren't filtered out, the regulation becomes poor, and you get overvoltages, killing the LEDs. |
H: why capacitor connect serially with resistor on the earth pin
I have this grounding mat, inside the electrical socket as shown in the picture, there are a capacitor and 100k ohm resistor connected serially to the earth point, the grounding mat is supposed to get negative electrons from the earth to our body, to neutralise our body free radicals, I can understand the 100k resistor is the same as resistance as our dry human body, to limit the current, but I don't understand why they place the capacitor, as it is open circuit, it will not be able to get an electron from the earth. Any reason why there is a capacitor?
AI: The resistor's there for your safety
Static-dissipative grounding apparatus (such as wrist straps and mats) will always have a high-value resistor between you and the metallic connection to the earthing system. This is because most of the time, you will be connecting this to the mains earth in your building via a mains receptacle, and a direct connection could prove quite disastrous if you connected to an improperly wired receptacle (where the ground terminal on the receptacle was connected to something other than a ground wire).
The other component is indeed most likely a polymeric-PTC resettable fuse, by the way. (Many static-dissipative setups get along just fine with resistors alone. I can't tell from here if they added it due to concern about resistor power or voltage ratings, or for personnel-safety reasons, though.) |
H: Trouble with Eagle's BGA autorouter
Personally I'm having trouble with eagle's bgaAutoRouter when I use it, it's not doing the bga tracks and routes and I'm wasting a lot of time looking for how to make it work. my settings in image.
DRILL = 0.05MM
ALT = 0.125MM
layer = (1+2*15+16)
eagle version = 9.2.2
BGA STATUS = 0.0% do not leave that percentage
datasheet bga
where I'm wrong that I can not solve this puzzle ?
AI: You cannot have 2mm minimum via diameter, if the datasheet recommends 0.2mm via diameter. Observe the recommendations in section 8.5.1 BGA 216 0.8mm Pitch Design Example below.
The autorouter will be failing because the rules are too strict to place tracks and vias. Routing is impossible without reducing the minimum via size, track width and reducing the clearances. Check with your PCB fab house on their capabilities. |
H: How to solve a circuit network involving a resistor parallel to a voltage source using only nodal analysis?
I have been stuck on this for the past week and this week i just dont seem to find out what am i doing wrong. Please help me spot my mistake. Here you can find My circuit on multisim. Please provide me with as much details as you possibly can nothing you write will be considered redundant by any word and help is appreciated much.
AI: There's actually a fourth node in your diagram, at the junction of E1 and R1. But that one and V2 have known voltages, so the problem reduces to just two unknowns. I get the following equation:
$$
\begin{bmatrix}
\frac{1}{R1}+\frac{1}{R2}+\frac{1}{R4} && -\frac{1}{R4} \\
-\frac{1}{R4} && \frac{1}{R4}+\frac{1}{R5}+\frac{1}{R6}
\end{bmatrix}
\begin{bmatrix}
V1 \\
V3
\end{bmatrix}
=
\begin{bmatrix}
\frac{E1}{R1}+\frac{E2}{R2} \\
0
\end{bmatrix}
$$
This allows you to solve for V3, and once you know that, you can get \$I_x = \frac{V3}{R6}\$. |
H: How do I fix the speed of a generator?
If I need to generate power at a specified frequency, then I need to make sure that the rotor of the generator rotates at a specified speed (rpm). But when I am rotating it with steam or water how do I control this speed? It seems to me that the mechanical forces that rotate the generator somehow has to balance to achieve this. How exactly is this done?
AI: Electrically
Some systems do this electrically. The generator either generates DC, or the variable-frequency AC is rectified to make DC, and then an inverter makes the desired AC frequency. Common on more modern small wind turbines.
Mechanically
Other systems are mechanically controlled to get the desired frequency. The mechanism used would be called a governor. Most simple mechanical governors are not very accurate, so this would not be good enough for a grid connected device. It is also possible to make more accurate governors which work mechanically in a similar way to the paragraph below, these are commonly used on internal combustion engines.
With Feedback
Another approach, and probably the most common is to have some form of feedback. A microcontroller monitors the frequency being generated, and adjusts the mechanical system via some form of servo to get the right frequency. For example, it could open and close a sluice gate to adjust the water flow through a turbine. A more complicated system could adjust both a sluice gate and the turbine blades to keep the correct frequency while also varying the output power.
Grid Synchronous operation
In some cases, it might not be necessary at all. If you have a small wind turbine, connected to the mains grid near a coal power station, you could just hook it up and forget about it. The huge turbines in the power station will stabilise the grid frequency, and fix the rotation speed of the wind turbine. If the wind blows harder, you'll just get more current, and a slight power factor shift. Note that as more and more wind turbines get added, the folks who run the power station will get less and less happy about this, so the grid operator will eventually ban it. |
H: Sending few commands with BLE without microcontroller
I am completely new to electrical engineering, but I am trying to build a small device with three buttons circuit, each one of them would send a different command to the mobile phone via Bluetooth low energy module (I would like to use EYSHSNZWZ Bluetooth Low Energy Module for its size).
So the main question, can I run this idea without any microcontroller? Can I even connect it without the microcontroller?
AI: Do you need the smallest possible form factor or is it acceptable to start with a larger breakout board to work out your design and miniaturize from there?
SparkFun has a breakout board specific to this bluetooth module and a nice tutorial to get you started with the programming environment, getting the chip into bootloader mode and uploading your program:
https://learn.sparkfun.com/tutorials/nrf52832-breakout-board-hookup-guide
I haven't used this specific BLE module but if you follow their instructions and run in the Arduino IDE you'll basically just be looking to set a hardware interrupt on 3 of your GPIO pins with a handler that would help debounce and queue a command to be sent by a periodic task handler. |
H: What's the purpose of this circuit section?
I'm experimenting on VCA circuits and found the same (or similar) pattern in many linear VCA projects found in internet using LM13700 OTA.
The specific section I'm curious is made by an Op-amp, a transistor, a diode and some passive parts, and is used to feed Control Voltage to OTA's Iabc "amp bias input". In this example image, is composed by parts R2, IC1A, D1 and Q1.
Can somebody explain the purpose of this section?
It seems to me like a voltage-to-current converter (it makes sense, since CV is a voltage and Iabc is a current), but I'm not sure.
AI: Yes, that's exactly what it is. The current through R2 is CV1/3.3K and that current (minus a small amount of base current) flows from the collector of Q1 into the bias pin.
The bias pin is a couple diode drops above the negative rail so the maximum current is about (1.5V - V-)/8.2K before Q1 saturates.
The diode D1 protects Q1's base-emitter junction against reverse breakdown. |
H: If you have two identical but oppositely wound inductors does the inductance effectively cancel?
I was just curious if the effect inductance of a branch of a circuit would cancel if you put two identical but oppositely wound inductors in series. It's not something I have come across.But looking at the change in signs I imagine this to be the case.
Someone mentioned it to me regarding wound resistors in a circuits, and splitting them into 2 resistors in series, with opposite winding to reduce/attempt to cancel the inductance.
I have also recently needed to place several surface mount inductors in series, and I have no way of identifying which end is which, or the winding directions. They are not all the same make or model.And I have had difficulty measuring their inductance.
AI: It depends of the extent of their mutual inductance. Roughly speaking, if they are wound on the same ferrite core, they have a large proportion of their inductance that is mutual (as in a transformer for instance), so they would mostly cancel. If, as it seems to be in your case, they are separate components, they are wound on separate cores and have little mutual inductance.
In case of air inductors or resistors as mentioned, the distance between them and exact geometry has to be taken into account and only an electromagnetic simulation software can tell how much is canceled, but that would be much less than a complete cancellation. |
H: Systems similar to TI's PRUs
I have been working with TI's PRUs on the am335x, equipped on the BeagleBone Black. I would like to know if other hardware manufactures offer similar systems. I am doing my Bachelor Thesis on this topic. So, it would be nice if I had some other system to compare to.
So far I have found nothing like it. The BeagleBone Black seems to be somewhat of a hybrid between a Raspberry Pi and an Arduino.
Edit:
I'm not looking for a recommendation to buy anything. For my thesis I need to compare the system that I'm using with their possible competitors. I think it's interesting to know what systems are out there apart form the one that I'm working with (the am335x).
AI: NXP's S12X series of processors has an "XGATE coprocessor to achieve higher performance or emulate peripheral modules"...
https://www.nxp.com/products/processors-and-microcontrollers/additional-processors-and-mcus/8-16-bit-mcus/16-bit-s12-and-s12x-mcus:S12S12X
They (NXP) also have various processors that include eTPUs (Enhanced Time Processor Units)...
https://www.nxp.com/products/processors-and-microcontrollers/power-architecture-processors/mpc5xxx-55xx-32-bit-mcus/ultra-reliable-mpc56xx-32-bit-automotive-and-industrial-microcontrollers-mcus/enhanced-time-processor-unit:eTPU |
H: How can i add voltage regulator to unregulated DC adaptor?
I would like to add L7809 voltage regulator to an unregulated DC adaptor,as
it is shown in the photo.
In the data sheet,there is a figure for application circuit that included 2 capacitors(bottom photo).
I understand that i need to add to the voltage output of the L7809 the 0.1uf capacitor in parallel,but do i need to add in parallel to the L7809 input the 0.33uf capacitor in addition to the existing smoothing capacitor or the already existing smoothing capacitor(which is part of the unregulated adaptor)should be connected alone to the L7809 input without the addition 0.33uf capacitor?
AI: The low value ceramic capacitor such as 0.33uF or 0.1uF are normally needed to be placed as near as possible to the power inputs of Integrated circuit only if the main smoothing capacitor is significantly far from the IC.
The distance of about 6 inch can be considered far in most cases. So if the main electrolyte capacitor is very near like almost adjacent to your 78xx i.c the decoupling ceramic capacitor can be redundant.
The purpose of the ceramic capacitor is to decouple high frequency noise into the local ground so that it won't cause any harm to operations of the chip in the 78xx. The capacitor does this by creating low impedance path to high frequency noise and effectively shorting it out. |
H: How to control two separate circuits with one switch?
I have two separate circuits with different types of diodes. One circuit draws 3,5V and the other draws 9V. How can I wire this up so that one switch can turn both circuits on or off? As far as I understand I can do this with a relay. What kind of relay would I use?
This is NOT a duplicate of former question
Controlling Two Circuits with One Switch
...as some of the people here seem to believe.
AI: Use a dual-pole switch. DPDT or DPST.
That’s two separate switches that share mechanics.
The same naming convention also applies to relays. |
H: Amateur radio practice exam question
The question is as follows:
An interfering signal from a transmitter is found to have a frequency of 57 MHz (TV Channel 2 is 54 - 60 MHz). This signal could be the:
And the options are as follows:
A) crystal oscillator operating on its fundamental
B) second harmonic of a 10 metre transmission
C) seventh harmonic of an 80 metre transmission
D) third harmonic of a 15 metre transmission
Now in my mind options B and D are the same frequency as the second harmonic of a 10 meter transmission is 30 MHz*2=60 MHz and the third harmonic of a 15 meter transmission should be 20 MHz*3=60 MHz. I don’t see how one answer could be more correct than the other.
AI: The 15 metre band is 21 - 21.45 MHz, so the third harmonic will be above 63 MHz - too high. 10 Metres is 28 - 29.7 MHz, so the second harmonic will be 56 - 59.4MHz - looks like B is the right answer.
You have to look at the defined band frequency limits, rather than the frequency calculated from the band name. |
H: How can I convert binary into multiple 7 segment displays
I've been trying to make a decimal calculator using binary adders that feed into 3 x 7 segment displays. I cant find an efficient way to do this. If someone could point me to the correct resources, or maybe show a circuit that you made that is similar, that would be greatly appreciated.
AI: If you're doing this with discrete IC's, like 74xx series, you need a binary-to-BCD converter. Searching on that phrase turns up the DM74185 [http://www.utm.edu/staff/leeb/DM74185.pdf] (the companion DM74184 goes the other way). BCD is Binary Coded Decimal -- 4 bits per digit, encoding 0-9. Then the outputs of those can go to BCD-to-7 segment converters, to the display.
For a 3-digit display (0-999), that's 10 binary bits, and you would need 5 or 6 of them. The data sheet shows how they get cascaded together.
However, further search on those part number comes up a little light, so those chips might not be common anymore.
In modern times, you would build a calculator with a microcontroller. But if you want a hardware learning experience, you could do this on an FPGA, like the Go Board [https://www.nandland.com/goboard/introduction.html]. You would use Verilog or VHDL to describe the circuit you want. It's not like programming a microcontroller; you're describing a circuit that gets "wired up" in the FPGA, just as if you built it from gates. But there is a significant learning curve for the tools and methods. |
H: Protecting opamp inputs when powered down
I'm designing a circuit with an opamp buffer at the input, which runs of batteries.
As the input does what it likes, the input of the opamp can see voltage even when the opamp is powered down. As the opamp inputs are rated at +0.5V V+ (rail) and -0.5V V-(rail), it is common practice to bolt diodes across the inputs of the opamps to the rails.
My question is, where does this current go? Say the positive rail is at 0V and 5V is applied to the input, so the diode (seen in the diagram below) clamps at 0.7V. Well, this makes sense but it's a positive rail so it's not grounded, its just sitting there floating, so where does this current flow? Surely this will just cause the positive rail to flow to Vin-Vdrop = 4.3V. Same goes for the negative rail just vice versa. Can anyone explain how this works?
I have attached supporting works below.
simulate this circuit – Schematic created using CircuitLab
AI: Yes, it will tend to raise the voltage on the positive rail from zero to something else. The situation may be fine for the op-amp if the rail never exceeds a safe value, but it could cause other issues with other devices on the same rail.
If you want to actually clamp it you should have some series resistance before and preferably after the diode and clamp the rail to some safe voltage if there is insufficient load on the supply to do so. For example, if you can put 10K resistors on the inputs you will only have 1mA flowing with 10V applied so that may be adequate protection without any external diodes at all.
Keep in mind that an ordinary silicon diode will not prevent significant current from flowing through the protection diodes in the op-amp, the current will be shared to some degree. Adding a series resistor can help reduce the amount that flows through the op-amp inputs. Schottky diodes tend to have less forward drop at the same current so they will hog most of the current, however they are also very leaky in comparison so they can affect your analog circuit. |
H: Voltage drift in lock in amplifier
I am testing out the lock in amplifier with just a single resistor, but there seems to be a downward drift in the in phase voltage. What could possibly cause this to happen? Could it be some grounding issue?
Thank you for your time.
AI: It could be real- you could be heating the resistor with the applied signal and you could be seeing the temperature coefficient of the resistor. |
H: Is there a preferred order VHDL case/when and rising/falling_edge statements in processes?
What pitfalls are there in putting my rising_edge check within a case/when block?
I have VHDL that uses code similar to the first example below and simulates correctly and is synthesizable. However, it is not behaving in accordance with the simulation.
process ( clk_in, rx0_busy, reset_n, spi_cs_n, spi_sclk, tx_state )
begin
case tx_state is
when ( RESET )=>
if ( rising_edge( clk_in ) ) then
...
Is it better form to write VHDL more like below, with the clock edge driving the case/when? If so, why?
process ( clk_in, rx0_busy, reset_n, spi_cs_n, spi_sclk, tx_state )
begin
if ( rising_edge( clk_in ) ) then
case tx_state is
when ( RESET )=>
...
AI: These are two different circuit description:
In the first assume the mux1 gets an asynchronous tx_state signal in the first and then evaluated with a synchronous system(REG1)
The second, in rising edge of the clock every input evaluated, then feed to a multiplexer.
In this case, mux4 has ~1/clock_speed time to evaluate the output.
simulate this circuit – Schematic created using CircuitLab
The implementation difference!
if you implement the first one, for instance, assume you have a "data_from_pin" then the compiler should care about delay(delay between data_from_pin and tx_state and ...), The compiler knows the tx_state pin is asynchronous and may change before clock edges multiple of time, the timing of system should be exactly true.
The first circuit generates many timing constraints and warning for mapping and place and route,
But the second circuit knows every timing of output is based on an old clock and all inputs are stable for evaluation of new state machine. |
H: MSP430 USB Module and Baud Rate Detection
I am working on a project which uses the USB module integrated into the MSP430F5529, specifically using the MSP-EXP430F5529LP development board from TI. I am using the USB API provided in MSPWare.
The host talks to my device over MODBUS, and I am saving the current baud rate in NVM. Generally, to change the baud rate, I write a value to a MODBUS register. The device reads this value and configures its UARTs accordingly, so that it can act as a bridge between USB and a TTL device.
The problem is that not all MODBUS implementations will use this MODBUS register as a baud rate config, so writing to that address may not be intended to change the baud rate. Therefore, this method has to go.
I was hoping I might be able to detect the baud rate being used to communicate over the USB signal. The first thought was to use a timer to measure the width of the start bit, and use that to calculate the baud rate. The issue with this is that 1) I need to send an entire dummy byte over USB to my device in order to detect the baud rate, before starting normal communication. The other issue is that the way the MSP430 USB API is built, I do not seem to have access to the individual bits as they come in, but rather the message is stored in a buffer which is then provided after the message is completed. I would not be able to time the start bit in this event.
I don't believe there is a way to just "know" what the baud rate of the host is without sending data, since that information (to my knowledge) is not communicated over the bus. Please correct me if I'm wrong.
How might one go about determining the baud rate of a USB connection, preferably without sending a dummy byte first? I'm not entirely convinced this is even possible, it seems to be asking for the impossible, but I figured someone here would be able to give me a definite answer.
I have been through the TI documents describing the USB module, the API, and their application and have not yet found a solution to this problem.
AI: The baud rate of the USB connection has no relationship with the baud rate of the UART side of a USB to UART converter. Regardless of the baud rate requested by the application, the data that is sent by the application will be packetized and sent over the USB connection at whatever rate the USB link is configured for (according to speed capabilities of the host and device). It is up to the device to set the baud rate of its UART interface to that requested by the application. The requested baud rate should come in as one of the configuration SET messages sent by the host.
This appnote is for a different platform, but has some information on how this is done: https://www.xmos.com/developer/download/private/AN00124:-USB-CDC-Class-as-Virtual-Serial-Port(2.0.2rc1).pdf
You will have to look in the documentation for your API to see how (or if) this configuration data is exposed. If it is not exposed, you may need to dig through the libraries to find a place where you can intercept that SET message and act on it appropriately. |
H: Read temperature sensor from microcontroller to Android application (via microUSB)
I'm working on a concept for a project, and I'm having difficulty determining whether this application is possible.
I will have some misc. microcontroller with an attached temperature sensor, and that microcontroller will be connected to an Android device via Micro USB. Is it possible to read that sensor and display results on the Android application, or are there hardware limitations to this?
Having the microcontroller send data to a server is not an option, as one of the main purposes of the project is for the Android device to handle most of the work and the microcontroller will not have network capabilities.
AI: Is it possible? Yes -- thank you for limiting your question to the limit of my knowledge. How do I know? Because I've seen it, and because I just hunted down this web page from Android describing how to do it. Do I know how to do it? Oh god no. Could I? Well yes, with study. You probably can, too.
Hopefully that page will give you some Google-ish keywords that will get you to a project that uses the features you need. |
H: STM32L0/FTDI UART Transmit doesn't work
I have STM32L053 (link to overview) and I have been using STM32CubeL0 as UART examples. Also I connected FT232RL FTDI module.
Everything was fine. SIM800L and FTDI modules were working fine. Next day with same configuration modules didn't respond. I connected STM32 TX (PA9) pin to oscilloscope. So it is sending something.
Ok, I thought maybe FTDI went down so I tested with Arduino. It worked perfectly. Then I tried STM32 TX connect to Arduino RX. There are the results. A few symbols for some reason received wrong. FTDI does not respond to this and also Sim800L because it doesn't recognized as serial communication?
Here are my code: link
AI: It seems to be signal level issue. If the oscope screenshot indicates correctly, then you have 1V difference between low/high (1 division), which is definitely too low (SIM800L has 0.7V max for low and 2.1 min for high. Everything inbetween is noise.
Disconnect FTDI monitoring and measure levels. You might need pull-up on UART lines to some known level (say 3V3).
Even if you have 2V/div setting on oscilloscope, it seems rather close to 2V1 minimum. And the short (not full-level) peaks in the middle of the packet also are in the gray area.
EDIT
There seems to be a typo in the spec sheet of SIM800L. It's 2.4V high and 0.4V low.
Another thing is that arduino uses TTL (5V), while STM has 3V3. Some of the bits might be fine from the STM perspective, while for Arduino they are in the gray area and are discarded as noise, hence the weird characters |
H: Circuit element: Rectangle with diagonal
I am a newbie in electronics, so please bear with me.
I have a Induction proximity sensor which I have to integrate with a data logger. But, I have run into an issue with a circuit element. I am unable to understand the circuit element which is represented as a rectangle with a diagonal. Also, what is the quantification parameter of the same? Please help me out with the same.
Thank you
AI: That is the symbol for a relay coil. The relay should be a DC type with a coil voltage equal to the DC power supply.
24 V DC is common in industrial control systems and, since your switch is rated for 300 mA max., the minimum coil resistance can be calculated from \$ R = \frac {V}{I} = \frac {24}{0.300} = 80 \ \Omega \$.
The switch is NPN type which means that there is an NPN transistor internally that will connect the black and blue wires internally when the switch is 'on'. This may also be called a 'switched negative'. The relay '+' terminal is always connected to the positive supply. |
H: Reducing the amount of controller output required - making k of n binary to unary decoder out of 1-of-n decoders
I am a kind of self-taught electronics dabbler and being a selftaught tinkerer has the unfortunate consequence of reinventing the metaphorical wheel quite often. I'd like to avoid this fate again if it's possible and asking smarter people is one of ways to do it.
My current project requires me to drive, among other things, multiple LEDs (60), in a scheme of 1 diode on - 2 diodes on - 3 diodes on - and so forth up to 60 diodes simultaneously on, as opposed to first diode on - second diode on - and finally 60th diode on - one LED alight at any given time. I obviously can't use one microcontroller digital output per one LED approach due to sheer amount of outputs required. I have my hands on arduino mega2560 with 54 i/o ports and I need most of them for those other things - and obviously one needs 6 bits to encode 60 different signals, not 60 of them.
The solution I thought of, adequate to my knowledge and experience, is combining 8 CD4028 3-to-8 decoders like this
That would provide me with 1 of 64 output and here I run into first snag. I thought of joining the outputs with diodes so I have k outputs in "1" state instead of k-th - but the voltage drop while sending the signal through 60 diodes will be massive. Horrendous. How should I "unsnag" here? Is there some k-of-n integrated circuit decoder I am unaware of and can't google?
Then there's the matter of cost and complexity. I tried to avoid charlieplexing LEDs on 9 bits, because that would be one unholy mess of wires. Too big jumble of semiconductors and ICs would also be more expensive to solder than just buying another mega2560 and using one as 6 bits in - 40something LEDs out "dedicated driver".
Anybody has ideas how should I commence from here? I'll be happy even with just a general direction because another arduino is a plan that will work, I just thought I would like more elegant solution.
OFC, I will not power such an amount of LEDs through microcontroller, the question above is all about driving them, not powering.
AI: One simple way to do this is to use multiple shift registers. Each one will have 8 outputs, and 3 data lines necessary to control it. The best part about them is that they can be easily daisy chained. You can easily control 60 LEDs using just 3 microcontroller pins.
There's a great tutorial on how to use them here:
https://www.arduino.cc/en/Tutorial/ShiftOut |
H: Connect RS422 interface with Arduino Uno
I have a fishfinder,Lowrance Carbon HSD 7, and I want to connect it with the Arduino Uno to let the fishfinder transmit the Sonar data and GPS data via NMEA0183. According to the maker's site, the power/data cable uses RS422 communication having 4 cables which are RX+ RX- TX+ TX-. But the Arduino's serial communication ports are only RX and TX.
I search about the shield that can interface RS422 with Arduino, but there are very few of them. Instead I found RS485 to Arduino.
I've read some articles saying that I can connect the RS422 to RS485, with some conditions(like RS422 is full-duplex but if you connect it to RS485, it will become half-duplex, so the Arduino can only receive data, but cannot send), but I still not understand how should I connect the 4 wires to 2 wires. Should I connect RX+ and RX-(those of RS422) with RX(those of RS485), and TX+ and TX- to TX. If that is valid can I just connect RX+ and RX-(those of RS422) directly to the Arduino Uno's RX and TX+ and TX- to TX?
AI: To answer this I need to explain a few things. (TL;DR? See Consequences below.)
Voltages
There are a number of different serial hardware solutions, to solve different problems.
TTL:
The Arduino's serial connection (TX and RX) are at "TTL levels", which means 0-5V. RX needs to be within this range to be detected, and TX will only be 0 or 5 volts - 0V for "off", and 5V for "on". Each of the alternatives below use dedicated chips to convert TTL to their own voltages - but the same "off" and "on" concepts exist, so the Arduino can fully communicate using TTL with them through these chips.
RS-232:
The problem with TTL is that it won't travel far on a cable - and it is easily affected by noise produced by motors and other electrical appliances in the vicinity. Therefore, the TTL levels are often converted to RS-232 levels, which are as high as 25V(!) But even weirder, the other side isn't 0V, but actually as much as negative 25V (yes, -25V). "Off" is anywhere from +3V to +25V, while "on" is -3V to -25V. That means that if you connect to a true RS-232 appliance, you need to deliver at least ±3V, but need to accept at least ±25V. Needless to say, that's a problem for microcontrollers, without support circuitry. Also, RS-232 is specified to allow only one receiver per TX - although I've put two on a short cable at 9,600 baud with no problem.
RS-423:
RS-423 is a compromise between RS-232 and RS-422. Like RS-232, it only uses one wire each for RX and TX - although maxing out at ±6V. But unlike RS-232, the TX specification is strong enough, and the RX specification is sensitive enough (±0.2V), to allow up to 10 receivers on one TX line. Because RS-423 is so similar to RS-232, I'll refer to RS-232/RS-423 from now on, unless they're different.
RS-422:
The problem with RS-232/RS-423 is that they're not great in (electrically) noisy environments either. To help this, RS-422 has a two-wire pair for each of RX and TX. RS-232/RS-423 reference RX and TX from a third wire, GND. RS-422 references the sense of the signal between the two-wire pair - if one wire has a higher voltage than the other, it's "on", while if it's the other way around it's "off". This is known as a "differential" system, and the two halves of the signal pair are labelled + and -.
Electrically, if an interfering signal alters the voltage on the cable, it will affect both wires in the pair the same way - but not change the relative voltage difference between them. This increases the cable's resistance to external noise. For this reason, the voltages don't need to be as high - in fact, they're only ±6V.
Note that for TX, the two RS-422 signals could be created by powering one wire of the pair with 0V&5V, the other with 5V&0V - and always making sure they were opposite each other. This would create a ±5V differential, which would be detected by the receiver perfectly. But this is not the way it is usually done; it's usually done with a true differential (isolated) transmitter.
RS-485:
This variant came about when two things were realised:
Most serial communications were half-duplex: one side would transmit, then the opposite side would answer - both sides wouldn't be transmitting at the same time.
With one master and multiple slaves, you'd need lots of separate wires between them. Was there a way of "bussing" them all together so that they could all share the same wires? This is called "multi-drop".
Stringing multiple wires between them all was a waste, since the same pair of wires could hold the traffic in either direction (and yes, RS-485 uses the same differential standard as RS-422). Of course, this meant that all sides couldn't be "powering" the wires at the same time - but that's OK, each side would "know" when to power their side:
The master would power its side while it was transmitting the request to a particular slave, then de-power its side to listen for the answer;
The slave wouldn't power its side until it had heard a request for itself and was ready to transmit the answer, so it would power its side, reply, then de-power again.
Compatibility
The different voltages indicate, superficially, that they are not electrically compatible - for example, you can't plug any directly into TTL (unless you want smoke!). However, there are some circumstances where they can work together - but you have to be lucky!
RS-232/RS-423 and RS-422:
Because RS-422 is differential, and RS-232/RS-423 work as low as ±3V, you might be able to fool the two into working together - as long as the RS-232 TX signal is no more than ±6V! RS-423 is already limited to that.
RS-232/RS-423 TX is easy: it is already a differential voltage relative to GND, and so can be directly wired to the RS-422 RX+ and RX- - as long as you realise that due to the different specifications, you wire GND to RX+ and TX to RX- (no, that's not a typo: just the way it is!)
RS-422 TX+ and TX- is usually a differential transmitter, and if you tie one wire of the pair to actual ground, then the other will "swing" above and below that one with the required ±3V differential - perfect for RS-232/RS-423. If you connect TX+ to GND, and TX- to RS-232/RS-423 RX (again, no typo!), and the RS-422 transmitter is truly differential, you can get the two sides to inter-operate.
RS-422 and RS-485:
Because these both use the same voltages and direction, then you could have the two work by wiring the RS-422's TX and RX pairs together, with the RS-485's TX/RX pair. But, this can only work if all of the below is true:
There is only one master and only one slave;
The master controls when it powers its TX side;
The slave can 'handle' hearing its own output without interpreting it as a command;
You can wire the connections between them as follows:
Master TX/RX+ to Slave's TX+ and RX+;
Master TX/RX- to Slave's TX- and RX-.
Frankly, that third requirement is the most difficult since you have no control over the slave's protocol - but I have lucked into this in the past.
RS-232/RS-423 and RS-485:
Sorry, no can do.
RS-232/RS-423 has no mechanism to turn off TX for half of the conversation;
Since RS-485 has both TX and RX on the same pins, it implies that you'd have to tie RS-232/RS-423's RX and TX together - which means that the signals are no longer differential.
Consequences
So, in answer to your situation:
NO you cannot tie TX+ and TX- together and call them TX, since the differential voltage between the two is what carries the signal. Shorting the two together would lose the signal.
If you look at the RS-485 shield specs, you will probably see an extra signal that needs to be set or reset to indicate that the output should be powered or not. You need to program this signal at the appropriate times, or else the shield will be stuck in transmit or receive mode continuously.
If you cannot find an RS-422 shield, your closest bet would be using an RS-232/RS-423 shield and hope that you meet all of the criteria for that scenario above: the voltage isn't too high, and the fishfinder uses a true differential transmitter.
Edit
I just realised: if all you want to do is listen to the fishfinder - never transmit to it - then yes, you absolutely can wire just the fishfinder's TX+ and TX- to either RS-232's GND and RX (respectively) or RS-485's RX+ and RX- (respectively) as described above. You won't be able to command the fishfinder - but it sounds like you don't want to?
Edit #2
I just re-read your question, and the last part got me confused. I hope I explained above why you can’t tie + and - signals together to feed directly into the Arduino’s TTL signals - for two distinct reasons - but you also imply those signals exist on the RS-485 shield too.
No doubt they do - but they correspond directly to the Arduino’s TTL signals of the same name. There should be other, non-Arduino signals (on a screw terminal block perhaps?) that are labelled something with + and -: hopefully TX/RX, but perhaps D or even I/O. Like I said, RS-485 is differential, so they need to distinguish the two wires of the pair. |
H: BJT analysis resistance at the base using voltage divider
im currently confused as to why the resistance at the base is R1 || R2, ive done some research and looked at a couple of responses from people. But i still dont quite understand, could someone help me clear up my confusion please?
Some one has said:
If we assume that and ideal power supply has an impedance of 0 Ohms with respect to ground then both of the ends of the divider are connected to 0 Ohms with respect to ground and as far as impedance (or resistance) is concerned the two are in parallel.
If you take an ideal battery and draw some current from it, ideally the voltage will not change.We say that an ideal battery has an internal resistance of zero ohms, and that is because if you put current into or take current out of an ideal battery the voltage will not change.
If you take 100 microamps into or out of the divider in the circuit below you will see the voltage at the output of the divider change by 100 uA x 16k = 1.6 volts. (perform the experiment and see). An ideal power supply has the same 0 Ohm internal resistance as the battery.
Could some please help me understand what he means?
Please no smart answers like "he means exactly what he's wrote"
AI: I gather you are learning about biasing a single-BJT degenerative amplifier stage and are being told how to analyze it and want to know more about why you are told what you are told. You could just take it as gospel, I suppose. But I think it's a good thing to ask for evidence and reasoning. There is plenty of it available on the web and I assume you've gone to the hyperphysics and wikipedia pages on Thevenin's theorem and followed up already with more reading from the links they provide -- without success in the end.
Here a schematic I'll refer to:
simulate this circuit – Schematic created using CircuitLab
Suppose there are two different voltages, \$V_1\$ and \$V_2\$, on either ends of two resistors in series, as shown above. We also have the ability, let's say, to magically inject a current into the node labeled \$V_x\$. We don't have to inject a current. But we have the ability to inject one, should we want to.
What's the formula that will describe the measured voltage, at a node called \$V_x\$, given any arbitrary injected current called \$I_x\$?
There's a very important rule to remember that helps, now. Currents can't accumulate at a node. The sum of the currents in and out of a node must sum to zero. Otherwise, charges would rapidly accumulate and it turns out that the universe pretty much won't allow that to happen. So we know the following must be true:
$$\frac{V_1-V_x}{R_1}+\frac{V_2-V_x}{R_2}+I_x=0$$
(The above formula obeys the arrow directions I've indicated. And yes, I know it looks like I have three currents all crashing into each other. But this is just for the purposes of setting up the equation, correctly. One or more of them will be negative, one or more will be positive, and the sum of them will be zero, regardless.)
Solved for \$V_x\$, we find:
$$V_x=\frac{V_2\:R_1+V_1\:R_2+I_x\:R_1\:R_2}{R_1+R_2}$$
So far, nothing terribly mysterious has happened. But we need to ask a question, now. What will happen to \$V_x\$ if we were to make a tiny change in \$I_x\$? To answer that, all we have to do is re-arrange the above formula a little bit:
$$V_x=\frac{V_2\:R_1}{R_1+R_2}+\frac{V_1\:R_2}{R_1+R_2}+\frac{I_x\:R_1\:R_2}{R_1+R_2}$$
Now it is pretty easy to see that the first two terms won't change at all when \$I_x\$ changes. Only the last term changes if we change \$I_x\$. So we can rewrite it like this, now:
$$\Delta V_x=\Delta I_x\:\frac{R_1\:R_2}{R_1+R_2}$$
If you change the current in a resistor \$R\$ by \$\Delta I_x\$ then I think you already know that the voltage drop across that resistor will change by \$\Delta I_x\cdot R\$. In short, \$\Delta V_x=R\cdot \Delta I_x\$. But that can be rewritten as: \$R=\frac{\Delta V_x}{\Delta I_x}\$. So the above equation can be slightly adjusted to get:
$$R=\frac{\Delta V_x}{\Delta I_x}=\frac{R_1\:R_2}{R_1+R_2}$$
And there it is. The same result you'd get anyway had you instead simply treated the two resistors as being in parallel.
I'm sure you've read other ways to do this. I thought I'd take a totally different approach that you don't nearly as often see on the web in order to see if it flies for you. It may not. But at least I gave it a shot.
Just take note that one end of those resistors could be grounded, so that \$V_2=0\:\text{V}\$. And then you'd have a simple voltage divider with a single voltage supply. All the equations would still hold, though, because it really doesn't matter what value you give to \$V_2\$. The above logic just keeps on working the same way, regardless. And the voltages themselves fall away and disappear in the final result. So from that you can be sure they don't matter. So far as the injected current sees things, it is as if the two resistors were in parallel.
And this fact now seems to say something else. Since \$V_1\$ and \$V_2\$ can be different voltage values (they certainly do NOT have to be the same), we could simply place a battery or voltage supply's terminals where \$V_1\$ and \$V_2\$ are at. In other words, just replace them with a voltage supply. And when you think about that, you are forced to realize that a voltage supply looks like a "short" from the perspective of the injected current. |
H: PCB enclosure tolerances
I can imagine problems of PCBs not fitting into their enclosures or misaligned screw/hole pairs. Are these type of problems common, especially with the dirt cheap enclosures?
I am planning to use one that has a "0.8 mm tolerance". It does not specify where exactly this tolerance comes in though.
AI: Just leave generous clearances and you should be fine. Even with well designed and made boxes (eg. Hammond) it's not unusual to allow a couple mm overall clearance (1mm all around). Eg. (from above datasheet- maximum recommended PCB size)
Maybe you want to allow 1.5mm rather than 1mm if it looks a bit rough. Shrinkage (typically a couple of percent in linear dimensions, first-order compensated for in the mold design) in injection-molded parts is affected by resin choice and processing parameters so it's more likely to vary if the manufacturer is swapping resin types after the mold is designed or is pushing for high production rates.
Keep in mind that there are always draft angles in molded parts (not always shown on drawings) so the inside will be smaller at the bottom (top of the mold core) than at the top. Otherwise the part would not come out of the mold easily (or at all).
Similarly, allow generous hole sizes for mounting holes- use at least the "loose fit" diameter in mechanical engineering sources\$^1\$. As well as linear shrinkage, bosses can bend a bit (the part is a bit soft coming out of the mold) if it is not handled perfectly.
\$^1\$You can find that information online- look for "tap drill" tables, but the real bible, in North America anyway, is Machinery's Handbook. |
H: H-Bridge Adjustable Slew Rate: Why is a decoupling capacitor needed?
I am designing a simple 3-phase inverter for BLDC Motor control. For that purpose, i plan to use a IFX007T from Infineon. The slew rate is controlled via a resistance connected in series to SR pin.
I do not understand how this resistance is used to adjust the slew rate but i suppose the analog magic behind it far too complex and beyond the scope of this question. What i would like to know is: What is the purpose of the capacitor connected parallel to this resistance in the reference design? As far as I know, its a decoupling capacitor that basically sends any high frequency components to GND.
The reason I am asking is; in older versions of this H-Bridge such as BTN7930 there is only the resistance connected to the SR pin and no caps what so ever. Since I am a little tight on space, I wonder if it would be alright to omit it with IFX007T.
AI: You need to read the application notes.
Starting with page 39, it explains how different values of R11 influence the slew rate.
C2 is mentioned a few times, and seems to be non-critical - but it seems you really do need it.
The most important comment about C2 is that it and R11 need to be as physically close to the chip as possible and that the ground connection needs to be very short as well.
I would assume that C2 is there to keep the voltage on R11 steady. That voltage sets your slew rate, so variations would cause the slew rate to vary - maybe pushing you into territory where you cause too much interference. |
H: STM32F4 USART Receiver Pin Configuring
I am trying to configure STM32F4 USART peripheral. I thought that USART Receiver pin(RX) must be programmed as Alternate function to USART works correctly and then the data is present on the I/O pin can moves into the USART Receiver Shift register.
I mean that according to the following pictures taken from the STM32F4 Reference manual, when we do configure a pin as Alternate function it gives a way for the data to moves into the Alternate function input(here it is Receiver shift register) but when that pin is configured as Floating input (second picture) the data on that pin is just sampled into the input data register.
So logically i think that USART can't do it's job correctly when Receiver pin is configured as Floating input. but incredibly it does work in a correct way and i dont know why?!
The same Problem has been discussed here : Why is the USART receiver pin configured as “input floating”?
But i couldn't find my answer there.
Edited:
Ambiguous point is that however in Floating input mode the data will also be sent to the connected Alternate functions But it's important to specify which peripheral this data will be sent to.
When the microcontroller starts up from Reset mode, Reset values of almost all Registers is 0 so for instance pin 7 by default is connected to AF0 which that isn't for USART periph. So if we select Floating input mode for that pin and don't determine which alternate function we want to send the data, then the data might be sent to the wrong peripheral instead of USART receiver shift register.
But incredibly without determining the peripheral which we want to select as our Alternate function, USART does the work correctly. Actually my question is WHY does USART work correctly in this way (without determining The actual Alternate function)?
AI: Well, I'd say the basic structure picture tells you why this might work:
There is no block which would allow the selection of the digital input only going to the input data register or the alternate function input. So a pin configured as digital input will also send the data to the connected alternate functions.
The only option there is to have the schmitt trigger on or off, but that turns off the whole digital and alternate input then.
I'd still use the alternate function setting, because that is the intended way to use it and as long as no official source tells us otherwise I'd stick to what the manufacturer says (well except it doesn't work and you work out a workaround). |
H: Relationship between I2C drawn energy / power consumption and data rate
Referring to just what the I2C lines draw, am I wrong thinking that the higher the clock frequency the shorter the time there will be (the same amount of) current flowing through the pullups and thus lower power consumed?
side qeustion
I don't think I am going to reach 100 kHz, that's way over the limit of my hardware. I am alternating between about 32 and 4 kHz. Will the same resistor value (3.3k @ 3V) be good for both?
AI: Higher clock frequency usually require lower pull-up value, thus increasing the current.
Increasing the clock frequency from 100kHz to 400kHz usually requires the pull-up to be reduced with a factor of 4-5.
Since the power is inverse proportional to the resistance the power consumed will be almost the same. |
H: Powering 30m of RGB LED strips?
I'm currently interested in following this tutorial which explains how to create a homebridge (ESP8266) controlled 12v RGB strip which is exactly what I've been looking for. However, whilst I do believe this project will work perfectly for an RGB strip up to about 5m, I am aware that lengths larger than 5m require additional consideration when it comes to powering them.
For my project, I wish to make a 30m RGB LED strip to be placed around the perimeter of the ceiling in my living room. My question is; what is the best way of powering a 12v RGB LED strip for 30m whilst keeping just 1 controller as linked above (ESP8266)?
Whilst researching this question online, I was unable to find any definitive answers for exactly what I needed. For example, in this image:
Whilst the idea presented in the second figure down makes sense (injecting 12v periodically) makes sense; it raised a few questions for me.
Do I only need to inject just the voltage at these intervals, or do I also need to include the R, G and B lines in the 'blue' wire pictured in the diagram?
Do the amps matter in this case? Correct me if I am wrong, but a 5m RGB strip will usually run fine off 2A. So, do I only need a 2A supply if I am 'injecting' at 5m intervals? Or would I need a 12A supply (30/5 *2)?
Is this even the correct approach for what I am trying to achieve? I.e. would this process of 'injecting' at 5m intervals work for a full 30m trip? If so, could I stretch the intervals to 10m for example in order to reduce the amount of wiring round my ceiling?
If it's not the right solution, would using an RGB amplifier at 5/10m intervals be a better solution? Or, would something like this work:
Would the diagram shown above help in any way, or is it completely the wrong approach for what I'm trying to achieve? If it is kind of the right approach, could I ignore the method of 'injecting' 12v at intervals by supplying a higher voltage 24v at this first 'junction' so that 12v would be supplied to either side, or is that not how it works?
P.S. These are the RGB LED strips I am looking to use (RGB, no waterproof).
AI: The reason for splitting at each 5m is because the tracks on the strip are not that wide, and if they have to carry the current for any subsequent strip, they would heat up, as well as drop the voltage, and eventually blow up.
Both option 2 and 3 in the first picture will work, but make sure that the power supply and the driver can handle at least the total absorbed current 12A. For safety sake, I would multiply that figure by 1.5 just to have a safety margin, and make the parts have a longer life.
Optionally you can have 3 or 6 separate drivers, with all inputs driven by the same pins of the ESP8266. |
H: What Reference-Potential does an Operational Amplifier use as "Ground"-Potential?
Wikipedia states on operational amplifiers, that, simply speaking, they provide an output voltage at their output which is the difference of the two input voltages, multiplied by some (very very large) number.
Since voltages are just electric potential differences, I'd like to know what point in the circuit is the reference point for the output of the operational amplifier?
For the inputs, it essentially doesn't matter. Since the behaviour of the operational amplifier only depends on the difference of the two inputs, it doesn't matter what ground they correspond to.
My simplest guess would be that the output voltage of the operational amplifier has the same common ground all the other devices in the electric circuit have. In that case: How does the operational amplifier know of this common ground, if it doesn't have a connection to the common ground?
I need to know what the reference point is to even make any sense of the statement "the output voltage is A times the input difference". If I don't know what the reference point is, then the output voltage is just a number without meaning.
AI: It doesn't know nor care. Opamp's internal circuitry works like this:
Uout is near 0V when U1 < U2 and Uout is near the full supply voltage Us when U1 > U2. Just around the case U1=U2 there's a transition zone A. Its width in practical opamps is well below one millivolt. Nobody guarantees that the zone is linear or symmetrically around the zero, but normally opamps are used with a feedback circuitry which forces the opamp to output such Uout that U1-U2 is inside the transition zone.
People often divide Us to two parts in series. The upper part is said to be the positive supply and the lower part is said to be the negative supply. The midpoint is said to be the ground and all voltages in application designs are referenced to it. But internally the opamp references all to one of the poles of the supply voltage Us.
In low cost IC designs the internal circuitry cannot accept U1 and U2 to be whatever, they must be between 0 and +Us and there's some margin needed. The margin is needed at least in one end of the range 0...+Us to leave some operating room for the internal circuitry.
Many buyers want no margin at 0V, they want that U1 and U2 can be 0V. If the internal circuitry is designed properly (=PNP input transistors), the usable range for U1 and U2 is from zero to 1...1,5V less than Us. One old and well known IC design LM124 is like that. Analyzing its internal schematic reveals that it actually uses the plus pole of the Us as its internal reference point, but that makes no difference to my drawings and equations. |
H: Converting 0-5 volts (linear) to +2.5 -- 0 -- +2.5 volts ("vee")
I'm trying to find a simple way to convert a 0-5 V output from a joystick hall effect sensor to +2.5 -- 0 -- +2.5 V. Here's how I want the response to look:
The output voltage will be sent to a frequency converter and on to a stepper motor driver. I want to have the same voltage at both extremes so the frequency (motor speed) is the same regardless of the positive or negative direction of the joystick. I intend to use a comparator at the zero point (with an appropriate deadband) to reverse the direction of the stepper driver.
I've thought of a few ways to accomplish this, but none seem to be particularly straightforward:
Create a second, inverted output from the sensor and switch the input source (via comparator and mux) to the frequency converter at the 2.5 V midpoint. This would provide 2.5-0 V from the inverted output and 0-2.5 V from the original output.
Shift the 0-5 V range to -2.5-2.5 V and then use an absolute value circuit to invert the negative portion of the output.
Generate a bias voltage, based on joystick position, and add/subtract it from the sensor output.
Ideally, I'd like to have a single input to the frequency converter instead of trying to switch it to another source, such as an inverted output. The second idea above would satisfy that preference, but it would require a negative voltage source. Also, I'm trying to use discrete components in this design, so a microprocessor isn't an option for me.
Is there an easier way to accomplish this task? The problem seems fairly straightforward, but I'm having trouble coming up with a simpler solution. I appreciate the help.
AI: I'd use the absolute value circuit and a subtractor to shift the output to the 0-2.5V range. Jasen's answer provides an absolute value circuit I've used before and which should work here. I'd follow that with an op amp difference amplifier with a gain of 1.
You'll need a 2.5V reference for both the absolute value circuit and the difference amplifier. You can either use a simple resistor divider from your positive power supply (which I would buffer with another op amp) or a 2.5V reference IC.
Here's a schematic which you can simulate (I assumed a 5V supply was available for the 2.5V reference):
simulate this circuit – Schematic created using CircuitLab
I didn't pay much attention to the resistor values -- I just made sure they have the right ratios. You'll know better what values work in your application. Similarly, I just used a generic op amp.
A DC sweep of the input from 0V to 5V produces the following outputs for the absolute value circuit (in orange) and the difference amplifier (blue):
Since there are four op amps you might be able to use a single quad op amp IC. Or, if you use a 2.5V reference IC (so you only need 3 op amps), you could use a dual op amp IC for the absolute value circuit and a single for the difference amplifier. |
H: High resolution ADC vs amplifiers
I have started a design for work where I want to interface some sensors, (strain gauge, bridge, thermocouple, low voltage stuff) to a national instruments sbRIO card. This card has analog inputs built in as well as DIO. The sbRIO can measure down to +- 1v and 16 bits, but in my experience thats not quite good enough for thermocouples and strain gauges where you're looking at <100 mV. We were going to already be making a "mezzanine" card with some other interface circuitry so I was going to add on some circuitry that could handle these lower voltages.
A while ago I had found a 32 bit ADC with SPI interface and I've been looking for an excuse to play with one and thought this might be a good fit. (https://www.protocentral.com/analog-adc-boards/1005-protocentral-ads1262-32-bit-precision-adc-breakout-board-0642078949630.html). It has a built in gain amplifier, and a few other bells and whistles.
My question is for any hardware designers out there is this. Would I be better suited to using amplifiers for each individual channel rather than using this unit of an ADC? ie using thermocouple amplifiers and bridge amplifiers where appropriate? I appreciate any insight you might be able to give me. Thanks for your time!
AI: This isn't quite an answer, but rather an anecdote.
High-bit ADC are quite the nifty thing. Great resolution, along with high dynamic range, take away many signal-chain concerns.
I built a system for biopotentials with a 32-bit chip. Signal quality was excellent, as all my calculations told me they would be, with only some minimal amplification and anti-alias filtering. That said, my data was riding on what seemed to be an *enormous" square wave that I didn't notice during my prototyping. It had me quite baffled for a while.
Working backward, though, I figured out that the magnitude of the square wave was truly tiny.
Eventually, I had the box where this thing lived open, and I noticed serendipitously that when the programmer on microcontroller dev board that I was using wasn't USB-enumerated, that an LED flashed perfectly in time to my mystery square wave. That was making something sag, in the microvolt range, that was just huge in my 32-bit signal. It wasn't present during prototyping, because my on-board programmer was enumerated! Those bastards!!!!! The problem was resolved by removing the current-limiting resistor on the LED.
Why was this frustrating? Well, for the first time in my life, I didn't amplify enough for me to actually see the signals I was working with on an oscilloscope!!! I didn't do it, because I didn't have to.
I suppose the point is that selecting a 32-bit ADC created a funny opacity in my signal chain that I had to learn about the hard way. This was much like my early experiences with microcontrollers, where you can't just peek inside and know what's happening.
Long story short, high-bit ADCs are a valuable tool that makes analog design a breeze. That said, they're a tool, like any other, and the learning curve can be a challenge. Fortunately, in my case, I managed to ID my issue. I can tell you, I was under some real time pressure, working under subcontract to a medical device company. I was under pretty substantial stress for a few days, until I found my problem. There's a time and a place to start using new tools, and a time and a place for the tried and true. |
H: RC circuit with sinusoidal voltage - initial behavior?
For a simple RC circuit with a sinusoidal voltage source, the differential equation is: $$\frac{dq}{dt}=\frac{sin(t)}{R}-\frac{q}{RC}$$ When I plot the solution to this differential equation using euler's method, I get this:
I'm confused as to what is happening in the first few cycles.
Does this have something to do with transient response? Or are the initial conditions in combination with the sin(t) source forcing it to do that?
Obviously, as t increases, it settles into an equilibrium, but why does it not start out in equilibrium?
Thanks for the help.
AI: but why does it not start out in equilibrium?
Because in general such systems don't start out in equilibrium. As pointed out, you could find a phase for the sine wave that would start the thing in equilibrium. I.e., let your excitation be \$\sin\left(\phi + t\right)\$, then find a value for \$\phi\$ that makes it work.
Does this have something to do with transient response? Or are the initial conditions in combination with the sin(t) source forcing it to do that?
These are actually the same question, asked two different ways. So -- yes.
Part of your problem is that what you're simulating isn't what you solved for. The \$\sin(t)\$ in your differential equation goes on forever, in both directions. You simulated it with a signal that is zero from \$t=-\infty\$ to \$t=0\$. In the Language of Signal Processing, what you "really" did was excite it with \$x(t) = u(t)\sin(t)\$, where \$u(t)\$ is the unit step function: $$
u(t) = \begin{cases}0 & t < 0 \\ 1 & t >= 0\end{cases}
$$
If your next question is "well, how do I learn how to solve for the transient response?" the answer is to learn how to use Laplace transforms to solve linear differential equations. If you know how to use Laplace, the answer just drops right out. If you don't know how to use Laplace -- learn! |
H: Converting 3.3V signal to 5V with tri-state
I need to buffer and tri-state a 3.3V 8 bit signal, and shift the output to 5V (when the buffer is not in tri-state).
I am using a CD54HC373 buffer and 2 BOB-12009 logic level converters, but I can't find a way to output a 5V signal.
I have tried to route the signal in 2 ways:
[3v output from the board] -> 2 [BOB-12009] - > [CD54HC373].
In this way, I can enable/disable the tri-state of the output using the OE pin of the CD54HC373, but i get a 3.3v output (I need a 5v one).
[3v output from the board]-> [CD54HC373] -> 2 [BOB-12009]. Tri-stating using OE does not work anymore, because of the logic converters.
I am powering the CD54HC373 using a 5v input!
Any advice?
AI: Just use a 74HCT373 (or 54HCT373). The HCT parts are designed to be CMOS levels out and TTL levels in -- and the TTL levels are pretty close to 3.3V CMOS. That's basically the level-conversion technology of choice for the 1990's, when things started moving to 3.3V but there was still a lot of 5V stuff around. |
H: Inexplicable base bias
I have a common emitter amplifier on my breadboard (the same circuit as the image) with the following values: C = .01uF, R1 = R2=15k, RL = 5k, RE = 1k, and Vcc= 10v.
The reason I have R1= R2 is I want VB = 5V. (Base voltage)
The reason I have RL=5k and RE= 1k is i want the gain to be -5.
However, I measured the voltage at the base and got 2.7 ish volts instead. When I removed the tranaistor, the voltage value quickly went to 5v.
Also, the voltage output showed the gain was less than 1.
I am trying to understand how the transistor can affect the base voltage value so much and why the gain isnt consistent with the formula -RL/RE.
AI: Choosing \$ R_C = 5 R_E \$ is a good start. That should give a gain nearly -5.
You want the collector voltage to have room to swing up and down in a linear amplifier. Vc should be able to swing up (to Vcc), and swing down (to Vb). This means that collector current much higher than 0.8 mA is too much when Rc=5k, Re=1k.
With 0.8mA, collector will idle at 6V. Emitter will be at 0.8V, and base will be about 0.7V higher (at 1.5V).
So choose R1 and R2 to bias the base at close to 1.5V. This will require care, because any error will amplify by 5 at the collector. |
H: how do LED controllers work
I’m trying to find out if a device only draws the watts it needs to run or if it takes all available
For example
I have led light that’s says max 0,75 watts and the led controller says output 144 watts will the device received 144 watts or will it only take 0,75
So I’m wanting this https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F113084461265 to work with the rgb one of this https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F121282462726
AI: That LED controller is not a constant current source, just a triple PWM switch. As long as the controller is rated at a higher max current than the sum of all the attached LEDs the pair will work properly.
Those LED modules have series resistors which limit the current to the LED devices as long as they are operated at the rated voltage. Use a 12V power supply and you are all set. |
H: NMOS/PMOS Saturation
If I recall correctly, saturation occurs if \$V_{GS}>V_{TH}\$ and \$V_{DS}>V_{Dsat}\$ for NMOS. But is there an upper limit for the voltage? Like, when does a transistor not saturate after continually increasing \$V_{GS}\$?
AI: For NMOS, the conditions \$V_{GS}>V_{TH}\$ and \$V_{DS}>V_{GS}-V_{TH}\$ ensure saturation.
So an NMOS in saturation can come out of saturation if the applied \$V_{GS}\$ is increased beyond \$V_{GS}=V_{DS}+V_{TH}\$. |
H: What is the purpose of \$C_E\$ in this circuit?
I understand it acts like a filter for \$R_E\$, but what is the point?
AI: In DC analysis, capacitors are taken as open-circuit. In small signal low or medium frequency AC analysis, capacitors are taken as short-circuit.
So, as @nidhin explained, CE shorts RE in AC.
What does this bring? RE provides thermal stability so that the DC operation point (i.e. bias) does not change. Without CE, small signal voltage gain would be \$A_V = -R_C / (r_e + R_E)\$, where \$r_e = 26mV/I_{C-bias}\$. Since RE is shorted by a sufficiently large capacitor, CE, voltage gain will be \$A_V = R_C/r_e\$.
RESULTS:
DC thermal stability remains.
Voltage gain increased.
Gain becomes transistor-dependent which we mostly don't want. |
H: Why doesn't my operational integrator work?
Here is the schematic I'm following, to build an operational integrator.
(Image source - Electronics Tutorials)
I'm using a LM358N IC which has 2 op amps. Below is a crude drawing of my connections.
I don't seem to get what I want, when I feed a square wave signal 0 to 5 V with a 20 ms period. I expect a negative sloped signal, but just get 0 V output.
What am I doing wrong?
AI: simulate this circuit – Schematic created using CircuitLab
Figure 1. The op-amp output cannot go negative unless there is a negative supply to the op-amp. |
H: Is it ok to mix converter and extender cable with different amperes?
I have a charger for my laptop which needs a converter to hook up to local sockets.
On the converter it says 250V and 10A
I have an extension cable that says 250V and 16A
Is it ok to plug my converter into this extension cable?
Thanks
AI: Yes, can do that.
As long as the extension cable has a higher current rating that the load you attach to it, it is okay.
If instead you had a 16A load and a 10A extension cable, then it could be dangerous, as the cable could become hot, melt and catch fire, or set alight nearby objects.
The 16A that you can read on the label of the extension, is how much current it can safely conduct.
The 10A on the label of the power supply, is how much current it might require to work correctly. |
H: EEPROM Interface confusion with Address?
So im researching how to interface with a EEPROM Chip via I2C with an AVR (Still learning a lot of the interfacing).
Anyways, the AT24C16 for instance (or that family of EEPROM) seem pretty popular. I looked at the datasheet and it mostly made sense besides one part:
So I think my confusion lies in tehe "Addresses" of where to write. Or maybe im confusing device address? If I only had 1 eeprom connected....would it just be zero? Im assuming this is just if you had more than one chip on the i2c line?
Anyways lets pretend I have 1, I would need to do these steps from my understanding (correct me if im wrong):
Initialize I2C
Send the Start bit
Send the device address (Which I guess would be 0x00?, this assumed write in R/W is 0 of course since it's the LSB)
Wait for the ACK back from the EEPROM (Would this literally just be a 0 coming back or what?)
Write the word Address (I don't understand how a chip can have 1024 locations for instance if there are 8 bits for a location? the max value for 8 bits is 255?)
Wait for ACK to see if thats a valid address
Send my data until i send stop bit (I assume the EEPROM "knows" to move it to the next address after each data byte? or do you have to update the word address each time?)
Thanks! just a bit confused by the inner workings.
AI: The first byte of an I²C transaction containts the 7-bit slave address. Each slave device on the bus is supposed to have a unique address, and to answer only if its own address matches the address in that byte.
To allow multiple identical chips to be used on the same bus, some address bits are made configurable (with the Ax pins). For example, if you have two 1 Kb chips, with the A0/1/2 pins set to 0/0/0 and 1/1/1, respectively, then these two chips can be addressed with 1010000 and 1010111.
The datasheet counts bits, not bytes, to make the numbers appear larger. These chips actually can store 128/256/…/2048 bytes of data.
When a chip is larger than 256 bytes, the single address word no longer suffices to reach all bytes. So these large chips pretend to be multiple devices, each with its own slave address. For example, the 4 Kb (= 512 bytes) chip accesses the first 256 bytes when using slave address 1010xx0, and the last 256 bytes when using slave address 1010xx1 (where xx are set by the two A pins).
In general, you let the AVR hardware handle the I²C protocol details like start/stop/ACK bits; you need to care about that only when doing a software I²C implementation. |
H: How to connect a CR2012 coin cell battery with a PCB?
Im trying to build a flat, battery powered PCB assembly that fits into a small gap of approx. 2mm. I have found the CR2012 coin cell with a thickness of 1.2mm, which would be a good fit in terms of size and energy.
My problem is that I have no clue how to connect this battery with my electronics PCB. I searched for battery holders all over the web, but all I found was holders for CR2032 (3.2mm thick) batteries that also would work for CR2012 coin cells (e.g. this one).
What I seek for is either a proposal for a battery holder for CR2012 with approx. <1.5mm thickness or some general ideas how to connect such a battery (reliably) with a PCB electronic circuit without exceeding 2mm thickness constraint. (The PCB can be as thin as 0.5mm).
AI: One possible battery holder I was seeking for is this one. It has a thickness of 1.7mm above PCB, which slightly misses my constraint of <1.5mm. (Maybe there are better proposals?) |
H: Remote Start for my Dust Extractor
I have a 1.5kW 220VAC 1 Phase dust extractor. It's controlled by what looks like a DOL switch KJD17B/5T (so I assume the 5th terminal is an overload).
KJD17B Datasheet
Wiring diagram on duct collector:
From what I can see it's DP/ST and has L/N In and L/N Out and then a 5th connection form the motor which I can only assume is some sort of overload.
I'd like to add a remote start/stop, but it looks like the KJD17B is an enclosed device so I can't wire my remote start/stop in parallel/series.
I'd welcome advice on how to achieve my remote start solution? Should I try to re-wire the DC and bypass the KJD in favour of two external DOL start/stop controllers?
AI: The fifth connection is under-voltage lock-out - notice the symbol "U<" in the little box on the switch: -
It also tells you on page 1 of the data sheet that there is a feature that prevents restarts should the AC fail. That connection is associated with that feature and, maybe the connection to the motor is because there is an over-temperature contact in the motor that can also trip the magnetic relay internally.
This makes adding a remote start/stop circuit somewhat problematic but, if you are fit for the task, the new start/stop circuit would need to come down stream of the KJD17B and could be the conventional self-latching relay circuit and wouldn't need to be double pole: - |
H: Machine learning for floorplanning
I have an educational assignment to make an floor-planning tool.
Can I use machine learning in some part of the algorithm? For example, I was reading the book Algorithms for VLSI Physical Design Automation by Naveed Sherwani, and here's a quote from there:
Initial estimate on the set of feasible
alternatives for a block can be made by statistical means, i.e., by estimating
the expected area requirement of the block.
Can I use ML for that? Or there's no sense in doing so?
If no, is there some part where I can use ML?
Thanks in advance.
AI: I don't work on floorplanning. But nowadays, many machine learning algorithm is base on a dataset and labels, now if you show all of these IC and layout to a network, the network can provide some sort of recommendation.
For example:
https://github.com/timzhang642/3D-Machine-Learning#scene_synthesis
section: Scene Synthesis/Reconstruction
for example this one: Make It Home: Automatic Optimization of Furniture Arrangement (2011, SIGGRAPH)
The main problem in machine learning is dataset, you haven't 1000 or 10000 IC layout, you don't have the tags of chips and their's failers or problem rate in the factory. sometimes such data is secret for a factory. If you have a big dataset, with previous best layouts or problematic ones you can show your layout and the network estimate future. |
H: Extension of Audio Amplifier's Bandwidth
I am curious, whether extending audio amplifier's BW (bandwidth) beyond 20 kHz has any benefits compared to 2Hz-20kHz audio BW amplifier?
Some say that high-frequency -3dB point should should be 30kHz, others say 50 kHz, some say that it shouldn't go further than 100kHz.
I have read somewhere that low high-frequency roll-off point attenuates higher audio frequencies that cannot be heard by human and that there is "void" in output signal, due to high audio frequencies attenuation (higher than 20kHz).
Is very high BW in audio amplifier a good thing (the higher the better) or is it only asking for trouble? Could the amplifier start oscillating on some high frequency with very high BW?
AI: In parallel with high frequency attenuation audio amplifiers have another "lack of speed" error. Power amplifier circuits use feedback to make Uout follow Uin, but amplified. When the intermediate or output stage of the power amp attenuate high frequencies, the input stage tries to drive more strongly to force Uout to follow rapid changes of Uin. That easily causes overdrive clipping in intermediate stages. The phenomena was known as Transient Intermodulation Distortion and it was really a problem in the past.
It popped out at first when mass produced transistor audio amplifiers started to appear. The industry used used low cost transistors which caused serious attenuation (compared to DC) even at few kHz. With feedback everything still seemed good when the sound had high power peaks only at low frequencies. But percussive hits sounded dull. Second time the same happened when 741 opamps started to be used in audio applications.
Some propellerheads (for ex. Tapio Köykkä) knew the problem as soon as it appeared and even explained it ok, but big consumer electronics companies stamped them of course paranoidic maniacs. Fortunately also academic works appeared (for ex. Matti Otala) and today amps where every stage can handle 20kHz or more at full power are common.
In theory with good microphones one can catch percussive sounds which have substantial energy beyond 20kHz. That can cause transient intermodulation distortion, if the amp can handle only up to 20kHz. But common digital sound recording and distribution systems have steep lowpass filters which wipe off everything beyond 20kHz, so only direct concert sound amplifiers and and some special high bandwidth recording playing systems can benefit having amps with higher full power bandwidth than 20kHz. |
H: How to derive cutoff frequency equations from the transfer function
I am working on a problem from the textbook Electric Circuits 10th edition
simulate this circuit – Schematic created using CircuitLab
I am trying to figure out first how to go from the transfer function to the magnitude. It's almost as if the denominator gets a \$ w^2 \$ out of nowhere. Then, I can't seem to figure out how to move from the magnitude in order to solve for the cutoff frequencies.
\$ H(s)=\frac{\frac{R}{L}\times s}{s^2+(\frac{R+R_i}{L})s+\frac{1}{LC}} \$ - using voltage divider
\$ |H(jw)|=\frac{\frac{R}{L}w}{\sqrt{(\frac{1}{LC}-w^2)^2+(w\frac{R+R_1}{L})^2}}\$
We can find the cutoff frequencies:
\$\frac{R}{R_1+R}(\frac{1}{\sqrt{(2)}}) = \frac{\frac{R}{L}w}{\sqrt{(\frac{1}{LC}-w^2)^2+(w\frac{R+R_1}{L})^2}}\$
The cutoff frequencies are then defined as:
\$wc_1 = -\frac{R+R_1}{2L}+\sqrt{(\frac{R+R_1}{2L})^2+\frac{1}{LC}}\$
\$wc_2 = \frac{R+R_1}{2L}+\sqrt{(\frac{R+R_1}{2L})^2+\frac{1}{LC}}\$
AI: Well, we have:
$$\mathcal{H}\left(\text{s}\right):=\frac{180}{180+20+40\cdot10^{-3}\cdot\text{s}+\frac{1}{40\cdot10^{-9}\cdot\text{s}}}=$$
$$\frac{4500\cdot\text{s}}{625000000+\text{s}\cdot\left(5000+\text{s}\right)}\tag1$$
Now, for sinuscoidal signals we can write:
$$\text{s}=\omega\text{j}\tag2$$
So, we get:
$$\left|\mathcal{H}\left(\omega\text{j}\right)\right|=\frac{4500\cdot\omega}{\sqrt{\left(625000000-\omega^2\right)^2+\left(5000\cdot\omega\right)^2}}\tag3$$
And the maximum is given at:
$$\frac{\text{d}}{\text{d}\hat{\omega}}\left(\frac{4500\cdot\hat{\omega}}{\sqrt{\left(625000000-\hat{\omega}^2\right)^2+\left(5000\cdot\hat{\omega}\right)^2}}\right)=0\space\Longleftrightarrow\space\hat{\omega}=25000\tag4$$
By the definition of the cutoff frequency we have to find:
$$\frac{4500\cdot\omega}{\sqrt{\left(625000000-\omega^2\right)^2+\left(5000\cdot\omega\right)^2}}=\frac{1}{\sqrt{2}}\cdot\left|\mathcal{H}\left(\hat{\omega}\text{j}\right)\right|=\frac{1}{\sqrt{2}}\cdot\frac{9}{10}\space\Longleftrightarrow\space$$
$$\omega=2500\cdot\left(\sqrt{101}\pm1\right)\tag5$$ |
H: What is the minimum output frequency according to this datasheet?
Can this DDS output down to 0.05Hz sine?
I think the resolution is 0.0291 Hz. Does that mean that is also the miimum freq. it can synthesize?
AI: Yes, at a clock frequency of 125 MHz.
You can always run it at a lower reference clock frequency — the minimum is 1 MHz, and a setting of 215 would give you an output frequency of 0.05006 Hz. |
H: Frequency vs time constant
What happens when I have a low pass filter with R = 1kΩ C = 0.1 µF and I input a square signal with different frequencies? Will the time constant be the same for all frequencies?
τ = 100 µs for 1 kHz but when I increase the frequency τ starts to decrease on my oscilloscope. I thought τ was constant regardless of the frequency.
AI: A 1 kHz square wave has a total period of 1000 us. With a low pass filter having a time constant of 100 us, there is enough time for the output capacitor to charge to the full value of the peak of the square wave. In general 4 time constants (or 400 us in this case) is sufficient. If you increase the frequency of the input square wave, eventually there will not be enough time for the output capacitor to charge to the full value. For example, if you input 5 kHz, which has a total period of only 200 us, the output capacitor will not be fully charged before the square wave changes state. Thus the output level will decrease as the input frequency increases. The filter time constant has not changed but the spectrum of the input signal compared to the cutoff frequency of the filter has changed. A 5 kHz square wave has most of its spectral components (every odd harmonic) above the filter cutoff frequency. Thus the filter is doing what it is supposed to do. The output wave shape will always have the shape of a 100 us time constant exponential rise, but as the frequency increases you will see less and less of the total rise. |
H: Using an opamp with fractionnal gain with supply less than input signal
Let's say we have an AC signal that can swing from -15v to +15v max peak to peak. If I use an opamp with the power rails to -5v and +5v, can I get a non clipped output signal if I use a gain of 0.333? Or will op amp failed to recognize anything above/below +/-5 V at it's input even if the required output is within range?
Do I need to have my opamp's power rails and specs within the input range or the output range provided that the output have less peak-to-peak swing than the input with my gain of 0.333?
The signal I'm talking about is a low, signaling level (about 1mA max) with varying frequencies, like an audio signal.
AI: The op-amp will have a common mode input range specification. This means that there is a range of voltage relative to the supply rails in which you need to keep the inputs for the op-amp to function correctly. For example, with LM324 you can take the input down to the negative rail but not within 1.5V of the positive rail. If you use an inverting amplifier configuration then the inverting input of the op-amp is a virtual earth so you might have 0V on both inputs, even with a 15 V signal. A non-inverting configuration where you apply the signal directly to the non-inverting input would not work. |
H: Finding the specific Turn Ratio of a Transformer
I'm finding the turn ratio for a Hammond 166G28 28VCT transformer. I already had calculated the voltages for the Primary and for the Secondary and I divided them and got 3:1 ratio for the outer loop (Green to Green).
Where can I find this turn ratio from the transformer's specification sheet or from any other source so I can verify my findings?
Thanks
AI: You can easily find that the transformer is rated 115 V, 60 Hz for the primary and 28 V secondary. That gives a nominal turns ratio of 115/28 = 4.1:1. The actual ratio used may be slightly different to make the secondary voltage 28 volts at a particular load current and operating temperature. Transformer specifications usually state only the operating specifications, not the design specifications. You probably will not find more than what is easily available. |
H: STM32F407 USART Interrupt config
Is it possible to Enable multiple USART Interrupts simultaneously by CMSIS USART_ITConfig function? I mean is it correct to utilize USART_ITConfig like this :
USART_ITConfig(USART1,USART_IT_TXE|USART_IT_RXNE,ENABLE)
or i should call USART_ITConfig function for each interrupt to enable?
AI: Read The Fine Manual
USART_IT,: specifies the USART interrupt sources to be enabled or disabled. This parameter can be one of the following values:
USART_IT_CTS: CTS change interrupt
USART_IT_LBD: LIN Break detection interrupt
USART_IT_TXE: Transmit Data Register empty interrupt
USART_IT_TC: Transmission complete interrupt
USART_IT_RXNE: Receive Data register not empty interrupt
USART_IT_IDLE: Idle line detection interrupt
USART_IT_PE: Parity Error interrupt
USART_IT_ERR: Error interrupt(Frame error, noise error, overrun error)
So don't try any combinations. Looking at the library source, it actually checks and rejects any value not in the list, if USE_FULL_ASSERT is enabled.
If you'd like to have short, fast, and easy to understand code, just write
USART1->CR1 |= USART_CR1_RXNEIE | USART_CR1_TXEIE; |
H: Legal obligations when designing electronics
I'm planning on releasing a USB powered device, basically a AVR ATMega2560 µC with a FTDI FT232RL chip powered by USB-C.
Although I'm comfortable with the safety of the device (has fuses, ferrite beads, etc.) I'm not sure what are my legal obligations regarding consumer safety when selling the product (Europe and US at least). I'm guessing that all components need to be RoHS certified, etc.
Is there a place from which I can start reading on the requirements so that I can make sure that the devices are fully compliant?
AI: Concerning the EU market, this is the main site that lists the regulation directives.
Given the product type and the typical usage of your product, you have to dig into all this regulations and check the applicable standards listed on that site.
Hint: Find a CE declaration of conformity for an existing product that is similar to your product. The declaration will contain the applicable standards. (Every product on the EU marked must have a CE DoC publicly available). |
H: Amperage discrepancy on computer PSU
I have a 500W PSU that has both 12v and -12v supply rails with the dual +12v rails rated for 360W (20A each) and a single -12v rail rated for 9.6W (0.8A).
My question is; if I was to power something using a +/-12V rail voltage what would the maximum ratings of the supply equate to? If the -12v rail can only sink 0.8A does the entire +/- rail supply then limit to 0.8A and become a 9.6W dual supply (or exceed this and damage the unit)?
AI: Since you're re-purposing a computer PSU, beware that some of them won't regulate properly, or may misbehave in other ways, without a load on +5V too.
My question is; if I was to power something using a +/-12V rail voltage what would the maximum ratings of the supply equate to?
That depends on whether your load is equal on the +12V rail as well as the -12V rail.
If the -12v rail can only sink 0.8A does the entire +/- rail supply then limit to 0.8A and become a 9.6W dual supply (or exceed this and damage the unit)?
If your load is equal on the +12V rail and the -12V rail, then yes, the -12V rail limits what you can draw in total. |
H: LC filter applicability for power to output cables
I am designing a circuit that has a 240MHz MCU and some cables going to sensors so I am wanting to reduce the clock noise getting onto the supply line and going out the cables by using an LC filter. This seems to be a reasonable approach to me but my searches are not finding much in the way of example circuits that do this.
The only examples that I have found seem to be filtering between a digital Vcc and an analog Vcc which seems analogous. However, I am concerned that cables may present issues due to their impedance and capacitance.
I am wondering if anyone knows of any downsides to such an approach before I go and create more problems by designing a board with an LC filter going to the outputs?
AI: An LC low pass filter can work effectively but, be aware of the new resonance that it brings to the party. That resonance would be at a lower frequency than the 240 MHz you are trying to eradicate but, nonetheless it is still there and if something reacts in a way that stimulates that resonant frequency, then you may solve one problem but create another. You need to damp that new resonance with resistance to prevent it from attaining a high Q factor and causing secondary problems. For instance, you can put resistance in series with the coil: -
Or you can put resistance in parallel with the capacitor: -
You can also put resistance in parallel with the inductance and the whole point here is that you are trying to eradicate 240 MHz, whilst not creating a resonant point that is too sharp.
Ferrite beads are naturally a turn-to choice because they are quite lossy at high frequencies and therefore act as a combined L and R but they still need some capacitance to ground to be fully effective at closing-down the frequencies you are trying to get rid of. You have to pick the right one of course such as this one: -
As you can see it has high losses at around 240 MHz but this is series loss and requires a capacitor down to ground to form an effective RC circuit. However, if C is chosen to be too big, a resonant frequency can be formed in the low MHz that is just as "peaky" as a conventional RLC circuit. For instance, at 2 MHz, the reactance is about 30 ohms implying a series inductance of about 2.4 uH and, if you used 2 nF as the output capacitor, you will create a big (and potentially problematic) resonance at 2 MHz because the resistive losses are ONLY about 5 ohms or lower: -
Pictures from this Interactive RLC page.
It should also be noted that the basic resonant problem doesn't easily solve itself by raising the capacitance to higher values because, at lower resonant frequencies, the ferrite bead is firmly acting as an inductor with very low losses and it isn't until the capacitance rises to values above 1 uF that the resonant peak is starting to be kept under control (circa 100 kHz).
If using a ferrite bead, add a series resistance of a few ohms or look into adding a resistor in parallel with the FB but, be aware that a parallel resistor will let more noise through at 240 MHz! Be also aware that above the peak frequency where the FB is most effective, its impedance turns capacitive so, at frequencies over 1 GHz, it may not be that useful. Choose carefully!
I am wanting to reduce the clock noise getting onto the supply line and going out the cables
Clock noise can have very many higher order harmonics so, if your basic clock is 240 MHz, it could still be producing a lot of noise well-into the GHz range. Given that a particular FB will turn capacitive above a certain frequency, in order to adequately get rid of clock interference on the line, it may be necessary to create a more convoluted solution using two or more different ferrite beads. Simulators are your friend and I would urge you to use them. |
H: Does somebody have a schematic for a stereo electret condenser microphone?
I’m trying to use a Cmoy headphone amp (built around an OPA2227P chip) as a hard-wired in-ear-monitor.
I bought a stereo electret condenser microphone from Jaycar this afternoon, but I can’t get any response from it when plugged into the amp.
The headphone amp works if I plug my iPad into it.
I’m assuming the microphone needs it’s own power source or a preamp. I need advice on my next step in making this work?
AI: Electret microphones normally have an inbuilt FET preamplifier. You need to bias it from a quiet power supply of some volts in series with a resistor of a few kohms. Obviously capacitively couple to the following amplifier. Experiment and see what happens. If you start with 10 V and 10 k, you're inlikely to damage anything. |
H: DC motor H-Bridge - Snubber Cap
I have breadboarded a simple H-bridge shown further down using the mosfets linked below the schematics.
The prototyping motor is a DC 12V 1A (NO LOAD) Motor Pictured below:
Ultimately I ultimately want to use the motor pictured below:
(so if you have tips concerning this motor and how it will behave let me know because I have not gotten past the small motor to test the big one)
simulate this circuit – Schematic created using CircuitLab
P-Mosfet Datasheet
N-Mosfet Datasheet
Ok so I originally had no Cap across the little motor, in that scenario the switching mosfet got really hot at low duty cycles and just motor just turned off at 20% duty cycle.
Adding a capacitor across the Drain of the two mosfets as pictured in the schematic made a world of difference!
Mosfets stayed cool and worked through the entire pwm rang and the voltage spiking because of switching transitions remained low. But the cap got hot as hell. its a tiny ceramic 50V , but i think the current through it is whats making it hot.
Next I moved the cap closer to the motor, in fact right at the connectors as you can see and that helps also, now I can have a smaller cap near the mosfets and all works well.
from some reading I have read about RC snubbers, I tried that but my Resistors quickly burn off.
So my question is how do I fix the issue of my caps getting hot? Because imagine if I am using the bigger motor I am sure they'll get hotter.
Do I just need a higher voltage rated cap?
One way that i found worked was that since I am using a 5uF that is getting hot I used 5 1uF in parallel and that stopped the heating since they share the current.
Any other tips are welcome. I see some off the shelf motor drivers with SMD components and no huge power resistors or caps to snubb spikes etcc..... how do they do it?
AI: Your capacitor is getting hot because it has a 25kHz 12V square wave across it. Every time the switching FET turns on it connects the capacitor directly between ground and +12V, which causes a very large current spike as the capacitor charges up. Then when the FET turns off the capacitor discharges through the motor with a current equal to the motor current. At 25kHz a 5uF capacitor will be discharging continuously at 1A during PWM 'off' time, and could be charging with a peak current of 20A or more (depending on how fast the FET turns on). This may result in a power loss of several watts in the capacitor.
You only need a small capacitor across the motor terminals to suppress the RF noise caused by brush arcing. Typical values used are 47nF from terminal to terminal, or 100nF from each terminal to the case (which 'grounds' the case to RF and provides 50nF across the terminals). A smaller capacitor needs less energy to charge and discharge so the rms current and heating is lower. 50nF is 100 times less than 5uF so it should have insignificant power loss, but an even lower value would be better if it still sufficiently suppresses RF noise.
The motor has relatively large inductance which tries to maintain current flow when the FET is switched off, and it will generate whatever voltage is required to make this happen. In a bridge circuit this 'flyback' current goes through the diode across the upper FET (M4 in your schematic) which limits the inductive voltage kick to ~0.7V above the supply voltage. This is much better than using a snubber capacitor to absorb voltage spikes because it returns most of the inductive energy back into the motor rather than burning it off externally.
MOSFETs have internal body diodes which are usually strong enough to handle the full motor current with reasonably low loss, so external flyback diodes are not normally needed.
However you do need a large low ESR filter capacitor across the power supply to prevent voltage spikes on the power rails. Remember that when PWM is applied current is drawn from the supply only during the PWM 'on' time, and this pulsing current will induce voltage spikes caused by inductance of the power wires. Without filtering these voltage spikes could go high enough to damage the FETs and other parts of the circuit. The capacitor should be connected as close as possible to the FETs to reduce inductance and resistance, and since it may have to pass significant ripple current it is better to use multiple smaller capacitors in parallel rather than a single larger one.
As soon as you have proved basic circuit operation you should move it off the breadboard. These are infamous for having high resistance connections which can cause weird effects, and the strips are only good for about 1A max. |
H: Scenarios where Inductor back EMF would result in damage of circuit or component
Let's say that there is a simple circuit with the following components (ignore values):
LEFT: a simple power supply (assume DC)
TOP: load (resistor) and inductor
RIGHT: switch
BOTTOM: load (resistor)
simulate this circuit – Schematic created using CircuitLab
I have come across numerous sources that indicate that if the SWITCH suddenly moves from a CLOSED position to an OPEN position, the circuit and its components can potentially be compromised if unprotected:
When the switch opens, the current across the entire circuit will drop to zero really quickly (assume instantaneously), resulting in a back EMF
The resulting back EMF voltage according to the inductance formula will be very high as the change in time will be very small
The high voltage produced by this back EMF has the potential to damage the circuit and its components
Below are some assumptions that I hold, please advise if any of them are incorrect or incomplete:
When the switch is closed and has reached steady state, a current will be passing through the circuit in accordance with Ohm's law (V = IR) or somewhere near there.
When the switch is closed and has reached steady state, the current passing through every wire on the main circuit is uniform (i.e. the wire before and after the power supply has the same current passing through it).
Current is the main factor that controls whether the wire in the circuit is damaged or not.
When the switch is opened, the resistance across the open circuit remains the same as it was when the switch was closed, therefore the current generated by the back EMF through the circuit inversely proportional to the voltage generated by the back EMF (Ohm's Law).
Since the current passing through the open circuit is equal to or lower than the current passing through the closed circuit (inductance over short period of time), the wires and its components should be able to withstand the back EMF without any damage (exception are voltage sensitive components such as transistors, diodes, etc).
What scenarios would result in the back EMF potentially damaging the circuit and/or its components and what solutions could be taken to mitigate the problem?
AI: As far as your many questions,
#1&2 are correct.
#3 may or may not be true.
#4 I'm not sure what you are trying to say, but the current after the switch opens will ideally be the same as before it was opened. That's a paradox with an ideal switch and an ideal L-R circuit (voltage would have go to infinity to maintain the current through an open switch), but real circuits are not ideal.
It may help if you visualize a high value resistor, a capacitor or a spark gap across the switch. In a real situation something will limit the voltage, either the switch or wiring will break down, there will be some resistance or capacitance that will limit the voltage. In the case of capacitance it will cause ringing.
#5 This is not necessarily true. The energy (previously stored in the inductance) can cause damage even if the current would not be an issue. For example when a mechanical switch opens, the resulting high voltage at near the previous current causes arcing and erodes the contacts. Of course the energy is \$L\cdot I_0^2/2\$ where \$I_0\$ is the current flowing just prior to the switch being opened.
Since usually the switch is a semiconductor in modern circuits, much of the energy will be absorbed by the semiconductor. Some may be absorbed by external resistances (for example, a relay coil with a flyback diode across it depends mostly on the coil resistance to absorb the energy).
So usually something across the switch is what is called for in order to limit the voltage and mitigate any issues. An R-C snubber, a Metal-Oxide Varistor, a gas discharge tube, a Zener, a reverse-biased diode, a semiconductor designed to avalanche, an active clamp etc. etc. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.