text
stringlengths 83
79.5k
|
---|
H: Why did they use ultrafast diodes in a 50 or 60 Hz bridge?
This is again from an HP power supply (PSU). The incoming 230 V is rectified into 340 VDC and is fed to a switched-mode supply. The odd thing here is that the manual for that unit, HP6023A, has different diodes for CR1, CR3, and CR2, CR4.
CR1 and CR3 are labeled "pwr rect 600V 3A 200ns" (MR856) whereas the other two are just "pwr rect 600V 3A" (1N5406). In reality the unit did have four identical MUR 460s which is indeed a 200 ns part. If we look at a more recent schematic for a similar PSU (HP6038) then they are labelled "1901-1199 diode-power rectifier 600V 3A":
Now 1901-1199 is indeed MUR460 in real life. Is there a reason to use fast recovery diodes in a bridge for 50 or 60 Hz? Is it because it drives a switcher?
AI: As well as possibly rationalizing their BOM (though I would expect Schottky diodes to be used on the low voltage side rather than fast recovery conventional diodes), they would possibly have had to put a high voltage capacitor across each of the 1N540x diodes to reduce EMI (from the glacial reverse recovery times- unspecified generally, but in the microseconds- and subsequent fast snap-off), and the ultra-fast diodes don't require that.
Here is a paper from Power Integrations which covers the comparison, from which the below graph was drawn:
Interestingly, the author says that it is sufficient that two of the diodes are fast-recovery.
This is unrelated to the switching regulator- you'll see this topology (bridge with four capacitors) used in transformer linear supplies used in audio equipment to prevent annoying 100/120Hz buzz.
|
H: Problem with state machine that calculates the Greatest Common Divisor in VHDL
I am supposed to implement the greatest common divisor in VHDL. The testbench and the interface were provided. However, every time I run the simulation, this thing gets stuck in state 6 (q6) and I have no idea why.
When I look at the output for the test I can see it is completely different from the specifications of the exercise.
My questions:
Why is it stuck in q6?
Why are the wave forms not in snyc with the specification? How do I set ack=1 only after reading reg_a and reg_b?
gdc
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity gcd is
port (clk : in std_logic; -- The clock signal.
reset : in std_logic; -- Reset the module.
req : in std_logic; -- Input operand / start computation.
AB : in unsigned(15 downto 0); -- The two operands.
ack : out std_logic; -- Computation is complete.
C : out unsigned(15 downto 0)); -- The result.
end gcd;
architecture fsmd of gcd is
type state_type is (q0, q1, q2, q3, q4, q5, q6, q7, q8);
signal reg_a, next_reg_a, next_reg_b, reg_b : unsigned(15 downto 0);
signal state, next_state : state_type;
begin
-- Combinatoriel logic
cl : process (req,AB,state,reg_a,reg_b,reset,next_reg_a,next_reg_b)
begin
case (state) is
when q0 =>
--
ack <= '0';
next_reg_a <= to_unsigned(0, C'length);
next_reg_b <= to_unsigned(0, C'length);
C <= to_unsigned(0, C'length);
--
if req='1' then
next_state <= q1;
end if;
when q1 =>
if req='1' then
reg_a <= AB;
next_state <= q2;
else
next_state <= q0;
end if;
when q2 =>
if req='1' then
ack <= '1';
next_state <= q3;
else
next_state <= q0;
end if;
when q3 =>
ack <= '0' after 5ns;
if req='0' then
next_state <= q4;
end if;
when q4 =>
if req='1' then
reg_b <= AB;
next_state <= q5;
end if;
when q5 => -- BREAK POINT
if req='1' then
if reg_a > reg_b then
next_state <= q6;
elsif reg_b > reg_a then
next_state <= q7;
else -- Equal operands
next_state <= q8;
end if;
else
ack <= '0';
next_state <= q0;
end if;
when q6 =>
if req='1' then -- swap
next_reg_b <= reg_a - reg_b;
reg_a <= reg_b;
reg_b <= next_reg_b;
next_state <= q5;
else
next_state <= q0;
end if;
when q7 =>
if req='1' then --swap
next_reg_a <= reg_b - reg_a;
reg_b <= reg_a;
reg_a <= next_reg_a;
next_state <= q5;
else
next_state <= q0;
end if;
when q8 => -- SHOW RESULT
C <= reg_b;
ack <= '1';
if req='0' then
C <= to_unsigned(0, C'length);
next_state <= q0;
end if;
end case;
end process cl;
-- Registers
seq : process(clk, reset)
begin
if rising_edge(clk) then
if reset='1' then
state <= q0;
else
state <= next_state;
end if;
end if;
end process;
end fsmd;
Test Bench
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity gcd_tb is
end gcd_tb;
architecture behaviour of gcd_tb is
-- Period of the clock
constant CLOCK : time := 20 ns;
component gcd
port (clk : in std_logic; -- The clock signal.
reset : in std_logic; -- Reset the module.
req : in std_logic; -- Start computation.
AB : in unsigned(15 downto 0); -- The two operands.
ack : out std_logic; -- Computation is complete.
C : out unsigned(15 downto 0)); -- The result.
end component;
-- Internal signals
signal clk, reset : std_logic;
signal req, ack : std_logic;
signal AB, C : unsigned(15 downto 0);
begin
-- Instantiate gcd module and wire it up to internal signals used for testing
g : gcd port map(
clk => clk,
reset => reset,
req => req,
AB => AB,
ack => ack,
C => C
);
-- Clock generation (simulation use only)
process
begin
clk <= '1'; wait for CLOCK/2;
clk <= '0'; wait for CLOCK/2;
end process;
-- Process to provide test input to the entity in the testbench
process
constant N_OPS : natural := 5;
type t_ops is array (0 to N_OPS-1) of natural;
-- Change numbers here if you what to run different tests
variable a_ops : t_ops := (91, 32768, 49, 29232, 25);
variable b_ops : t_ops := (63, 272, 98, 488, 5);
variable c_results : t_ops := (7, 16, 49, 8, 5);
begin
-- Reset entity for some clock cycles
reset <= '1';
wait for CLOCK*4;
reset <= '0';
wait for CLOCK;
for i in 0 to N_OPS-1 loop
-- Supply first operand
req <= '1';
AB <= to_unsigned(a_ops(i), AB'length);
-- Wait for ack high
while (ack /= '1') loop
wait for CLOCK;
end loop;
req <= '0';
-- Wait for ack low
while (ack /= '0') loop
wait for CLOCK;
end loop;
-- Supply second operand
req <= '1';
AB <= to_unsigned(b_ops(i), AB'length);
-- Wait for ack high
while (ack /= '1') loop
wait for CLOCK;
end loop;
-- Test the result of the computation
assert C = to_unsigned(c_results(i),C'length) report "Wrong result!" severity failure;
req <= '0';
-- Wait for ack low
while (ack /= '0') loop
wait for CLOCK;
end loop;
end loop;
wait for CLOCK;
report "Tests succeeded!" severity note;
std.env.stop(0);
end process;
end behaviour;
Test output
Exercise
AI: Why do you think the simulation is "stuck" in q6? Clearly, next_state is q5, and that's what will happen on the next clock edge. You just need to let the simulation run longer.
Your waveforms will not match those given in the example exactly — those only represent the general form of the handshake — and the squiggly lines about 2/3 of the way through represent an arbitrary amount of time, possibly many clock cycles.
|
H: RS485 Eye diagram - does it look good?
I got a new diff probe, I am trying it out on RS485. I'm triggering on the rising edge. The RS485 is running at 25Mhz.
Does the eye diagram look good?
Could I double the speed (50MHz) and be ok? (do I need to worry about overshoot?)
What should one look for in an eye diagram?
Probe is TEK TDP1000 (1GHz, 200MHz scope) cable length is 1m with 50MHz transcievers.
AI: No problem going to 2f is = 50 Mbps.
The probability of error depends solely on the Voltage becoming the wrong polarity when the discriminator has computed the polarity for that bit..
What affects the SNR? , that determines the BER.
The slew rate indicates a variable amplitude and thus a variable SNR declining signal level, this also means a declining BER.
The 90% Vpp amplitude of data occurs when the rise time Tr reduces to Tr=0.35/f. ( by definition)
Since the bit interval, Tb= 2/f,
thus Tr=0.7Tb
Assume from the trace , Tr= 7ns
then ideal max bit rate “may be” 0.7/7ns =100Mb/s.
However additional margin loss results from pattern dependent Inter-Symbol-Interference, ISI perhaps from pattern dependency e.g. 011 or 0011 vs 0101 or group delay distortion or random jitter reduces the ideal margin of 100% down to some number like 30% that “may” correlate to some probability of error, or Bit Error Rate, BER = 1e-9. This depends on several other factors beyond the scope of this answer. .
The affect is not visible with a single trace capture, but is visible when displayed with trace memory overwrites. We know the correlation between Standard Deviation of Gaussian Noise vs number of bits so this jitter can be measured on time interval ,TI counters and/or Phase Margin Analyzers or BER Window Margin Analyzers.
Since the visible transition is skewed or asymmetric from ideal 50% to ~ 90% This amounts to 40% of Tr and thus degrades the Phase Margin by 40% of 7 ns or +/- 2.8ns
|
H: Why a source which has high source impedance modeled in general as current source?
Is there a practical example by using a circuit where a source better modelled as a current source if it has a high output impedance? I have been hesitating to ask here but couldnt figure out myself. Im trying to grasp the logic behind it.
AI: Suppose you have an idealized voltage source with a resistance in series with the output (we'll call this the output resistance).
Now if you place a wide variety of load resistances across this source+output resistance, then the output resistance will form a divider with the load resistance. What happens if...
...the output resistance is very high compared to all the load resistances?
The total resistance in the circuit doesn't change very much no matter what load resistance you use since it is negligible compared to the output resistance. That means the current doesn't change very much with varying loads so it is more convenient to model as a current source.
On the other hand, the voltage across the load resistance changes a moderate amount. Double the load resistance and you can double the load voltage since the current stays fairly constant.
...if the output resistance is very low compared to all the load resistances?
The total resistance in the circuit now almost entirely depends on the load resistance since the output resistance is now negligible. Unlike before, now it is the voltage across the load that remains fairly constant. So in this case it is more convenient to model it as a voltage source.
And unlike before, the current now has moderate changes with load. Double the load resistance and you get about half the current.
So you can see here that we even though we were actually using an idealized voltage source, it was sometimes more convenient to model it as a current source. In the same way, it is sometimes more convenient to model a current source as a voltage source. In the current source's case the output resistance is in parallel rather than in series.
So let's start all over again with an ideal current source with a parallel output resistance and parallel load resistance.
Output Resistance >> Load Resistance
The load resistance dominates since the much smaller resistance always dominates for parallel resistors. Very little current bleeds through the output resistance. Most of the current flows through the load resistance. Therefore, the current through the load resistance is kept relatively constant by the source while the voltage across it will vary moderately as the load varies. Therefore, tt is more convenient to model it as a current source.
Output Resistance << Load Resistance
The output resistance dominates. Changes in the load resistance will have little effect on the overall current output of the source. Most of the current flows through the output resistance so the output resistance determines most of the output voltage. In this case, it is more convenient to model it as a voltage source.
So you can see here it didn't really matter if it was actually a voltage source or a current source. What really determined the more convenient model was the relative magnitude of the load resistance and source output resistance.
In discrete transistor amplifiers, that's why they use high value resistors in series with the a voltage source. It's meant to approximate a current source since the load presented by the transistor is supposed to be much less than that presented by the high value resistor (R1).
Taken from: https://www.electronics-notes.com/articles/analogue_circuits/transistor/long-tailed-pair-circuit.php
In integrated circuits they just build an actual current source out of more transistors.
Taken from: https://www.researchgate.net/post/Can_we_present_the_long-tailed_pair_as_a_bridge_circuit
|
H: What is this "drive circuit" for CCD sensor referenced to?
I had a look at the TCD1304DG CCD sensor which I consider using in a project. The datasheet is pretty lucid, but I couldn't figure out what the following diagram is supposed to say:
Is this just a common way of illustrating an analog signal?
AI: It means that Vos is referenced to the ground pin which usually doesn't need to be defined. The Vdmk signal is not referenced to ground, it's referenced to the OS signal (which I think is also Vos). This could also mean that both are a sum of some kind. Either way the Vos/OS signal goes from 1.5 to 3.5V
|
H: How to know how many phases a BLDC has?
I have a quick question, how do I know how many phases a BLDC has? For example, an E-bike motor kit has three motor wires: yellow, green and blue. It also has three wires for the hall effect sensors: yellow, green and blue plus two more wires for powering up the sensors: black and red. By intuition, I believe it is a three phase BLDC because it has three signals for motor control plus three signals for feedback. Is that correct?
Best,
AI: Nearly all BLDC motors have three phases. Like, more than 99%, as far as I know. But if it's oddball and has two, then it needs three wires (phase 1, phase 2, and common) or four. Similarly, an oddball 3-phase BLDC may have six wires (i.e., the manufacturer decided to bring out each phase individually).
The only way to tell for sure is to do some continuity checks, then put it up on an oscilloscope, spin it, and look at what it generates.
|
H: Powering high-power laptop from DC without inverter
Context: We live full-time in an RV (a travel trailer) while traveling around the US. We have 300Ah of 12V Lithium batteries, a 3,000W inverter and 600W of solar. Although we have an inverter, it has a parasitic draw of ~35W (~3A). We camp off-grid ~90% of the time with no hookups - just sunshine and fresh air!
We currently have two laptops which draw power from USB-C - we're using 12V adapters to power these. We need to upgrade to a more powerful laptop (for video editing), and that will obviously have higher power demands. One contender is a Dell laptop that uses a 240W 110VAC power adapter to produce 19.5VDC @ 12.3A. Given our intended usage, I can foresee extended periods of the laptop running at maximum capacity - high CPU/GPU usage, etc.
I'd like to power this directly from DC power if possible. We're already doing this for an Intel NUC using a DC boost converter. However, 240W is a lot more power than the NUC is drawing!
Questions:
Do the Dell power adapters have any fancy electronics (e.g. negotiation like USB-C PD) or do they just output a steady 19.5VDC? Is this something I should be weary of on other brands as well?
Any other reason why I can't just use a DC-DC boost converter and the right sized barrel connector to charge the laptop? The wires could all be short and high gauge - no worries there.
Any recommendations on a high-quality, high-efficiency DC boost converter that could accept a fluctuating input (typically 13.0-14.4VDC) and output a constant 19.5VDC?
The alternative would be a small, dedicated inverter just for the laptop, but I'd rather not do DC-AC-DC conversion at all (given the implicit inefficiency) if not required.
PS - yes, we may need more solar anyway...!
AI: In theory, you should be able to use a simple DC-DC converter to generate the 19.5 Vdc from your 12V battery bank.
Where you may run into problems is that many Dell computers have a 3rd conductor in the DC power cable that allows the computer to determine what size of power supply is connected. It does this so that it can throttle back the current consumption if a too-small power supply is connected.
On all of the Dell laptops and power supplies that I have worked on, the mechanism is a Dallas One-Wire memory chip inside the power supply. This connects to the laptop via a 3rd conductor in the power cable and connector.
You can usually see this by examining the plug that goes into the laptop. The plugs with the 3 conductors are a coaxial plug with a shell on both the outside and inside of the large-diameter barrel and a quite-small center pin in the middle of the plug. That center pin is the data line and the two shells are the DC power connections.
The easiest way to do what you want to do is to obtain another power supply and scavenge the DC power cable that feeds the laptop as well as the One-Wire chip from inside the power supply.
There is a plethora of DC-DC up-converters available with the power requirements that you require. Amazon or Digikey or even eBay will sell you something appropriate.
If you are finding it difficult to obtain a donor power supply to scavenge parts from, you can use your existing power supply. Simply splice directly into the laptop power cable coming out of the power supply. There would be three conductors: two large conductors for DC+ & DC- as well as a much smaller conductor for the data line. Simply splice into the two DC lines and you will be good to go. Be sure not to cut or short the data line.
|
H: What is this radio signal coming from my phone?
I've built myself a crude EMI probe:
I then pointed it at the top part of my phone when the phone was powered on, and I saw the following waveforms on my scope.
First off, there are spikes every 525ms:
These spikes consist of exactly 6ms of some kind of waveform:
Zooming in on the gap shows the following short-long-short-long-long-long ...thing. Also interesting to note is that the gaps are exactly 3us.
And then if I zoom further in on the rectangular part of the wave, I see the following 13.55MHz sine wave:
What's going on here?
AI: Your phone has NFC turned on so it is trying to read any NFC devices that might come into range.
13.56 MHz is a standard RFID frequency.
|
H: Unknown model type bjt - ignored
I am trying to use Transistor model as in the NGSpice manual 8.2 BJT Models (NPN/PNP):
.model QMOD1 BJT level=2
however, I got this error:
q1 n15 n16 n17 qmod1
could not find a valid modelname
Warning: Model issue on line 61 :
.model qmod1 bjt level=2.end ...
Unknown model type bjt - ignored
So, why I got Unknown model type bjt ?
AI: You cannot tell what type it is (NPN or PNP) if it is defined like .model QMOD1 BJT level=2.
You need to substitue BJT by NPN or PNP. So, .model QMOD1 PNP level=2
Check also SPICE BJT Declaration
|
H: Are there Multi-Turn Absolute Encoders that Store the Number of Turns in Non-Volatile Manner?
I have been learning about absolute encoders, and am testing a multi-turn absolute encoder (link to datasheet is here). During testing, I realized that after shutting down the power, although the encoder position is saved, the number of turns is not, which means the encoder position is non-volatile, but the number of turns is volatile.
So, forgive me for a lack of fundamental knowledge, but: does there exist a type of absolute encoder that saves the number of turns, even after power is turned off and on again?
I have tried searching for this on stackexchange and on Google, using the search terms "non-volatile" and "multi turn absolute encoder", but I could not find an answer.
EDIT: while searching more about different types of multi-turn encoders, I found a type of encoder that uses what is called the "Wiegand Effect". Wikipedia states "As the encoder revolves, the Wiegand wire core coil generates a pulse of electricity sufficient to power the encoder and write the turns count to non-volatile memory". I have also found an example of this encoder, and this example's datasheet is here. So, I guess I should modify my question as, "Are there any other types of absolute encoders that saves the number of turns, even after power is turned off and on again (other than Wiegand-based encoders)?" I am interested in learning all the different types, if there are any others.
AI: Manufacturers choose different strategies about absolute encoders. Asian and Japan manufacturers tend to use kind of incremental encoder that needs an additional lithium battery at driver side to power the encoder at power outage.
European manufacturers usually use hall sensors with magnet gears, similarly like a water counter for counting revolutions, while the disc is made of glass or it's a resolver - this is so called multiturn absolute encoder. Disc or resolver gives the position within one revolution, while the gearbox measures numbers of revolutions. Such encoders don't need power for counting position. However an EEPROM inside is a good to have, used to store reference or null position.
Encoder Gears
I had used Sick, Kuebler, Indramat,...I can confirm it does not need power. While Fanuc has an additional battery in motor driver.
|
H: How to add custom ROM chip to Proteus?
I’m new to Proteus and deciding wether to use it for my current project.
There are a few EPROM chips in my design that do not exist in the Proteus library:
M27C1024 (64Kx16)
M27C322 (2Mx16)
Is it possible to add them to the Proteus library with support for simulation?
Or is there maybe a generic ROM component that I can configure to behave like my EPROM (like set no of address lines, data lines and propagation delays)?
AI: Unfortunately no, it is not possible. The only way you will be able to do it, is to ask Proteus to add it to their library via the library and model request forums (only available to view by those signed up to the forums via a valid user license), or to create the part yourself.
This document should be a good starting point. There is a lot to take in to fully create a part you can use in VSM simulation.
There is also a shortcut way. Once you create a new part, you can right click, go to properties and tick the "Attach hierarchy module" box. Once you have done that, you can right click the component again and select "Open child sheet". This will allow you to model the internal circuit of the IC, or you can insert an IC with the same specs and functionality, and use the terminals mode to link the pins to your created model.
The only issue with this though, is you can only use it on that particular design, you will be unable to use it in any new designs.
|
H: 555 Timer - How to quickly discharge RC capacitor
I'm using a 555 timer to turn off an LED with delay.
Here is the circuit.
All I want to implement is, to get the input voltage changes in output with a constant delay.
When I close the switch, the capacitor in RC network being charged and the OUTPUT will be LOW after n fraction of time. But, after opening the switch, it takes time for capacitor to being fully discharged.
A. Is there a way to discharge it quickly? B. And is there a more simple implementation without using 555 timer? C. How can you revert the output from LOW to HIGH instead of HIGH to LOW?
AI: A: To get it to discharge faster add a 330 ohm between the switch output and ground,
to get it even faster also add a diode parallel with the 2.2K resistor. (pointing upwards)
pretty much any diode will do eg: 1n4148 or 1n4001 etc.
B: more simple, the 555 behaves more predictably than most simpler circuits and is pretty simple itself, you could maybe do something with a SCR if the voltage drop is not a problem
C: swap the 2.2K resistor (including the diode from part A) with the 100uF capacitor.
|
H: Doubt on PSRR calculation and result
I designed the following circuit in Cadence Virtuoso:
It is a two stages op-amp with a compensation network (resistor and capacitor). VDD=1.8 V, VCM=900 mV, VB2=1.28 V.
The DC gain is 73 dB.
1st question: I have to calculate the PSRR (power supply rejection ratio). The book on which I study defines the PSRR as the ratio between the differential gain and the gain from one supply (either VDD or GND) to the output. In order to find the gain from VDD to the output I placed a small signal voltage generator in series with VDD, as in the following picture:
With the two inputs set to the analog ground VCM=900 mV (I removed the input differential signal). I then made an AC analysis. Is this procedure correct to find the gain from VDD to the output?
2nd question: The AC analysis gives this result:
It seems to me that the small signal gain from VDD to the output is too much large: 30 dB. This means that if I have 10 mV ripple on the VDD line, then I will have more or less 300 mV at the output! Moreover, the PSRR = (73-30)dB = 43 dB.
How can I decrease the gain from VDD to the output (thus improving the PSRR)?
AI: Question 1:
Yes the method sounds correct. But, you do not need to add a new VDC source in series with the fixed one. Just set AC magnitude of your 1.8V DC source to 1.
Question 2:
The PSRR+ of such opamps will be bad because looking from the supply to the output, it looks like a common base amplifier! Improving PSRR is a very complicated but interesting topic, but most of it boils down to trading off headroom for better PSRR. For a start, look into other opamp topologies. Generally speaking, cascoded outputs offer better PSRR etc. If you have headroom, you can basically precede your opamp with a NMOS regulator. This will essentially cascode your whole opamp from supply noise. Ofcourse, headroom might be an issue now.
Another more sophisticated way to improve it for your opamp, is to some how move the gate of PM67(and/or any other transistor that looks like a common base amplifier from the supply) in sync with the noise at its Source, this way: $$\Delta Vgs = 0$$ To do this you can try a small capacitor between source and gate or even create a secondary gain loop that injects correlated supply noise at the gate of PM67. Yet another way is to drive the body of PM67 or NM28 in a way that cancels supply noise
|
H: Heatsink on top of SMD plastic IC or bottom of PCB?
I often do designing power modules and always wonder if there is some kind of rule how to properly cool SMD devices.
I always look at final products from other companies and some are placing heatsink on bottom of PCB, while others pleace them on top - directly on SMD components with plastic packages.
Many power IC and MOSFETs do have large thermal pads on bottom, and thermal transfer should be really good to the bottom. But adding about eg 2mm FR4 of PCB is also good thermal insulator... Comparing to like 1 mm or less of epoxy resin on IO package, I dont think it could be worse...
To be more confusing, some power IC do not even have proper thermal pad - e.g. TPS63070 that I am working with right now.
What is better? Adding heatsink on bottom or on top? Does it depend on how thick Cu layers are?
AI: Here's a somewhat general rule. When a SMT transistor or IC has got a thermal pad at the bottom, it's designed to heatsink to the PCB. (The components without thermal pads heatsink to the PCB through pins.) The thermal resistance from the die to the thermal pad is much lower than to the top of the IC. In case of ICs, the thermal pad is as the ground potential, and you can connect it to a ground plane which is a good heat sink. In case of transistors, the thermal pad often can't be connected to a ground or power plane.
So we heat sunk the IC to the PCB. Then how do we dissipate the heat from the PCB?
A PCB can dissipate some power by itself. If the PCB is large enough, and the power which it has to dissipate is not too large, and the ambient temperature is not too high, then the PCB itself may be enough. If the design is dense, and the PCB can't dissipate enough power by itself, then additional heat sinking is needed.
You can heat sink the PCB to a metal enclosure. You can add SMT heat sinks. You can bolt-on heat sinks. There are different ways to do this, which depend on different requirements and situations.
This is where it becomes tough to speak about general rules.
additional reading:
How does power dissipation for surface mount components work?
Optimize heat sink design - connect cooling pad on PCB backside by vias
|
H: CDMA basic working principle
I find it hard to find on the internet a simplified explanation of the principle of operation of the CDMA system. Could you give me an example of how it works and how a receiver can correctly identify a user's message?
Precisely, as I understand it, each user sends a certain message, often called spreading code, which is composed of a series of pulses called chips.
For example, the spreading codes of two users may be:
User 1: 1, 1, -1, -1
User 2: -1, -1.1, -1
I read on the internet that each user has a personal code, which is chosen to ensure orthogonality to avoid interference. However it is not specified which sequences must be orthogonal: orthogonality between the spreading codes, orthogonality between the personal code of a user and those of the other users, orthogonality between the personal code of a user and the spreading codes of other users?
AI: Orthogonal (or nearly orthogonal) means essentially that the convolution between two codes does not peak significantly, so someone decoding with a different code will get a low average signal power. From there, you'll probably have to take a math class.
|
H: Characteristic Impedance without transmission lines
let's consider this three port power divider:
I saw somewhere that the reflection coefficient Г11 can be calculated with the formula Г11 = (Zin - Z0)/(Zin + Z0), where Z0 = 50 Ohm.
Now my questions are:
1) What is Z0? There are no transmission lines here. I thought that maybe Z0 is like a reference value, which can be used in any kind of network. But I need a confirmation.
2) If the previous hypothesis is true, how can the entity of wave reflection (represented by the value of Г11), which is something physical, depend on the arbitrary choice of the value of Z0?
AI: 1) What is Z0? There are no transmission lines here.
The figure shows the power divider connected to three transmission lines. The parallel lines drawn extending away from the points marked \$V_1\$, \$V_2\$, and \$V_3\$ are representations of transmission lines. It's unfortunate for introductory material that they put the "Port" labelings at the far ends of the lines rather than next to the \$V_n\$ dots, because that is where the ports actually are — but they probably meant the labels merely to indicate the numbering of the ports on the actual divider.
For purposes of your reflection calculation, \$Z_0\$ is just “the impedance of the port attached to Port 1 of the power divider”. If what's attached is a transmission line, then the impedance is its characteristic impedance. You cannot calculate the reflection coefficient of a port without specifying the impedance attached to the port, because the amount of reflection is determined by the impedance match or mismatch.
I thought that maybe Z0 is like a reference value, which can be used in any kind of network.
Sort of. Remember, an ideal transmission line can be of any length, including zero. Therefore, in any model including a transmission line, we can reduce the length of the line to zero to model directly attached components. Thus, take the depicted situation, of being attached to a line with impedance \$Z_0\$, not as “there must be a transmission line here” but “there is something here that itself has a port with impedance \$Z_0\$, which is often a transmission line”. (The ends of transmission lines are ports — or more rigorously, if a transmission line is attached to a port then the other end of the transmission line is also a port.)
The practical reason to talk somewhat sloppily about \$Z_0\$ in this way is that we want system designs that can be used with transmission lines wherever we need them, so we choose a standard impedance for all of our ports and lines (except for those where we want reflections in some cases, such as filters), and call that \$Z_0\$, generalizing the concept of “characteristic impedance” to “the standard impedance we're using”. Further, we choose that standard impedance to be the characteristic impedance of the design of transmission line we would like to use.
You can end up using \$Z_0\$ as a reference value that no element of the circuit actually exhibits. But in this case, the diagram supposes that the divider is attached to transmission lines or other devices whose ports have impedance \$Z_0\$.
|
H: Unknown "D" variable on datasheet's max pulse current description
I was reading the datasheet for an SFH4545 IR LED. In the "maximum ratings" category, the "surge current" value's conditions are: $$t_p=100\mu\text{s},\,D=0$$
What does the D mean? At first, I thought it could be the duty cycle, but it'd be strange if it was 0...
AI: D is indeed a duty cycle as can be seen from the charts in the datasheet provided:
\$D = 0\$ is a strange value given this definition and accompanying \$t_p = 100\mu S\$ which is making this configuration impossible for periodic pulses as it drives \$T\$ to infinity, so it is probably referring to a single pulse.
|
H: How is the boolean expression for mux2 and mux4 deduced?
I've been looking at the following article: https://www.electronics-tutorials.ws/combination/comb_2.html
I am confused as to how the boolean expression Q = a'b'A + ab'B + a'bC + abD is deduced for mux4, and what it would be for mux2. How is it done with kmaps?
AI: It's pretty intuitive, actually. Based on the states of a and b, one of the 4 terms of a'b'A + ab'B + a'bC + abD will have a chance of being true. If ab=00, only the first term can be true, and only if A is true. If ab=01, then the output is true iff B is true, and so on.
The 2-mux would be a'A + aB.
|
H: How to use MATLAB to observe the effect of multiple damping factors?
I want to use MATLAB to observe the effect of changing zeta (damping factor) on system response?
Here is a m-file code that plots three responses: underdamped, overdamped and critically damped.
clc
clear all
close all
num1=[16]
den1=[1 4 16]
num2=[16]
den2=[1 8 16]
num3=[16]
den3=[1 10 16]
sys1=tf(num1,den1)
I have also attached a snapshot of the response:
I want to do something that allows me to change the value of zeta directly and according to that zeta value the response changes, instead of writing a new transfer function or changing original transfer function.
AI: I hope I'm interpreting what you're asking correctly. My understanding is that you just want to simulate the transfer function, for various zeta values, without having to re-define the transfer function?
You can express the zeta variable directly in your denominator array. Consider that the basic second-order transfer function is as follows:
$$ G(s) = \frac{\omega_n^2}{s^2 + 2\zeta\omega_ns + \omega_n^2}$$
Currently, you're hard-coding the values of each term. You can also define them as variables:
omega = 4;
hold on
for zeta = 0.25:0.25:1.5
num = [omega^2];
den = [1, omega*zeta*2, omega^2];
sys = step(tf(num, den));
plot(sys, 'DisplayName', ["z = ", num2str(zeta)]);
end
hold off
title("Step Response with varied Zeta");
legend show
Code run in Octave 5.1 which doesn't support stepplot so I substituted step. If there are specific and random values for \$\zeta\$ that you want to test, you could also run this over an array.
|
H: Missing contamination delay specification for a component
If IIUC: contamination delay (\$t_{cd}\$) is the time where the signal level on the output of a component starts to change in response to a change on the component's input, while the propagation delay (\$t_{pd}\$) is where this signal level change on the output stabilizes (i.e. becomes valid). Furthermore \$t_{cd,min}\$ of a component must be bigger than the maximum hold time of a subsequent component connected to the first component's output.
While all component specifications I found provide \$t_{pd,max}\$ none of them provided \$t_{cd,min}\$. What is the reason for this? Can I assume in this case that \$t_{cd,min} = t_{pd,max}\$ ?
AI: No, but \$t_{pd(min)}\$ is the same thing as your \$t_{cd(min)}\$.
I never understood why people felt the need to create a new term for it.
|
H: door bell detector using NodeMCU
i modified my door bell with a NodeMCU which is now capable of triggering the door opener using a relay. Now I want to add a door bell detection to this system. I figured out two contacts which supply a DC of ~5V for a second while the bell rings.
How can I connect this to the NodeMCU since it has only 3.3v GPIOs as far as I know. Do I need a resistor and if so - how much ohm? Or a step down converter? And what's about the amperage?
Sorry I'm really new to electrical engineering and might need some noob explanations :)
Thank you!
AI: Since we know nothing about how the two systems are powered and/or grounded, it would be a good idea to keep them isolated. A simple optoisolator should do the trick.
simulate this circuit – Schematic created using CircuitLab
The resistor values are selected based on how much current you want to flow in each side of the circuit.
On the input (LED) side, you generally want somewhere between 3 and 20 mA flowing through the LED. Verify this against the datasheet for the actual coupler you buy. Therefore, I selected 1 kΩ for R1, which allows 3 mA to flow at an input voltage of 5 V, given a forward drop of about 2 V on the LED: \$\frac{5 V - 2 V}{3 mA} = 1000 \Omega\$. This means that the input voltage could go as high as 20 V without damaging the LED. For higher voltages than that, you'll need a different value.
On the output (transistor) side, a relatively low current can drive a GPIO pin on an MCU. I arbitrarily selected ~1 mA. Assuming that the voltage drop across Q1 is no more than 0.6 V, this leads to a resistor value of \$\frac{3.3 V - 0.6 V}{1 mA} = 2700 \Omega\$. Again, this should work over a wide range of supply voltages coming from the MCU; adjust to taste.
|
H: Driving a MOSFET gate with an NPN BJT
simulate this circuit – Schematic created using CircuitLab
Today I saw an LED dimmer product. The driving circuit was like in the schematic. It was a cheap one but the circuit looks inefficient to me. When the BJT is not conducting, R1 pulls the gate high and the MOSFET starts conducting. That's ok. When the BJT is conducting (high signal on the GPIO,) the BJT shorts the gate to gnd. That's actually a commonly used circuit, but a large amount of current (12V/150 = 80mA) flows through the gnd on R1. Is it okay for a commercial product?
The PWM frequency is seen as 500Hz on scope. Obviously, when they increase the R1, rise time of the MOSFET gets very high and switching losses dramaticly increase. They claim that this product can handle up to 20 amperes (of course there is a heatsink on te MOSFET.)
Is there a efficient solution to drive a gate without a gate driver? Is this the right way to drive a MOSFET?
I don't have the product's document but here are the BJT and MOSFET datasheets.
AI: For a penny or two more you can drive the MOSFET with a push-pull circuit.
simulate this circuit – Schematic created using CircuitLab
In this circuit Q1 and R1 level-shift (and invert) the input to drive Q2 and Q3 which are connected as complementary emitter-followers. Peak turn on current is limited by Q3 hFE and R1, so if R1 is (say) 4.7K, the current is in the hundreds of mA.
As far as the circuit you've got, if you have a relatively high load current, however, the 150 ohms may be considered justifiable. If the MOSFET is spending most of its time 'off', however, it's perhaps wasting significant power. Keep in mind the engineer who designed it was probably more interested in keeping their job than making the circuit a little bit better- the cost of those parts might pay for his or her salary.
The transistors are called upon to do two things- to drive the relatively huge gate charge of the MOSFET and perhaps to level-shift the input if it's less than Vdd. If the dimmer output was coming directly from a chip such as LM555 runing at 12V then there would be no need of any drive circuit.
|
H: Output of LM393 won't swing LOW unless it is pulled up with a LED
I built the following circuit using an LM393 as part of a noise gate for audio applications. It's a voltage comparator with hysteresis.
I originally connected a 10 kΩ pull-up resistor and then added a 5 mm UV LED to serve as a visual reference. The circuit worked fine like this, however, if I remove the LED and connect the 10 kΩ pull-up resistor directly to the supply, the output doesn't swing low and gets stuck on its high state.
I've tried adding 1N4148 diodes in anti-parallel to the pull-up resistor, in reverse from the output node to ground, and I also tried substituting the LED with a 1N4148, but neither worked.
Here's a picture of my protoboard with the UV LED:
Here are two oscilloscope captures of the input and output signals:
AI: As hinted originally by Dwayne Reid and further explained by brhans and Spehro Pefhany, the problem was that with out the LED, the voltage fed back to the input was high (11.94V), the diode drop lowered this to 9.64V which was enough to make the comparator trigger properly. One of brhans' solution was to make Rf and Ri smaller, however, before this problem I had another one where the input voltage increased and decreased suddenly whenever the comparator changed states, and not just by the input signal alone, which was solved by using larger Rf and Ri values. Another solution proposed by him was to make the pull-up resistor larger to drop more voltage in the voltage divider formed with Rf and Ri, however, this resistor will dictate the charge and discharge times of parts that will follow after this circuit's output and that have already been calculated, so I would need to adjust all of that too.
My solution was to simply connect a resistor from the output to ground to divide the output voltage to a lower value, after adjusting a pot as a variable resistor I found that a 47k would be perfect, the working circuit below with high and low voltages:
|
H: Boost Converter - Input follows Output
I have a boost converter.
\$V_{in}\$ = 7V
\$V_{out}\$ = 14V
\$I_{load}\$ = 0.35A
While testing, I observe that as long as Vin<14V, I observed switching at the inductor switch node.
But, as I increase my input voltage, Vin>14V, I dont observe the switching at the switch node.
How come this happens with the boost converter, when I want the output to be constant 14V irrespective of the input voltage?
Could someone please provide some suggestions to overcome this and why this happens?
AI: Crudely said, a boost converter tries to get the input voltage up to the target output voltage and a buck converter tries to get the input voltage down to the target output voltage.
A boost converter therefore fails to get a voltage up/higher when the input voltage is already higher than the target output voltage.
The output of a boost converter is given by
$$ V_{out} = V_{in} \frac{ 1 }{ 1-D } $$ where D is the duty cycle for which applies 0 < D < 1. You can see this duty cycle at the mosfet's gate and/or at the switching node.
When the \$V_{in} > V_{out} \$, in order to obtain the target output voltage, according this equation, D < 0. If e.g. Vin = 28V and D could be -1, then Vout=14V. However, D cannot be smaller than 0. So, the mosfet stops switching (which is 0% duty cycle) and the inductor could be crudely approached as were it a wire.
And therefore, the ouput voltage follows the input voltage.
If you want a converter with an output (e.g. 14V) that lies within the range of the input voltage (e.g. 7V to 18V) you need another topology, e.g. a buck-boost converter.
Wiki about the types of SMPS
|
H: How to bypass on/off momentary switch?
I have a Bluetooth receiver and was wondering if there was a way to have it turn on when power is plugged in without having to press the on switch? the middle button is the on/off switch.
AI: If the unit works the way you require by holding the power button as you power up the device then it is just a matter of short-circuiting the power switch.
A normally-open switch requires two terminals. Yours have four but these are just to provide mechanical security. Usually they are connected in pairs on either side of the switch. You can determine which is which using a multimeter on low-range resistance measurement. Then solder a bridge from a terminal of one pair to a terminal of the other.
|
H: If a 4-bit binary digit in 2's Complement form is stored in 8 bits how is it represented?
I am quite new to Digital Logic. I got this doubt while solving a problem.
If a 4 bit binary digit in 2's complement e.g. X3 X2 X1 X0 is stored in an 8 bit space what will be the representation in those 8 bits.
As far as i know, The MSB in 2's complement form is the sign bit.
So if e.g X3 X2 X1 X0 = 0 0 0 0 then X7 X6 X5 X4 X3 X2 X1 X0 = 0 0 0 0 0 0 0 0
if e.g X3 X2 X1 X0 = 1 1 0 1 then X7 X6 X5 X4 X3 X2 X1 X0 = 1 1 1 1 1 1 0 1
Could you generalize the way in which we will represent 4 bits in 2's complement to 8 bits?
AI: In 2's complement form, a positive number stored in 8 bits is represented as 0x00 to 0x7F (0 to 127 in decimal).
Negative numbers range from 0xFF to 0x80 (-1 to -128 in decimal).
For example -1 is the 1's complement of 0x01 = 0xFE (8 bits) , with 0x01 added = 0xFF.
You obviously need 5 bits to represent a signed decimal digit (there are 19 possibilities), and effectively the 5th bit (bit 4 as we usually count it) gets copied into bits 5, 6 and 7. So -9 is the complement of 0x09 = 0xF6, plus 1 = 0xF7.
Similarly, if you were representing the single signed digit in a 32-bit wide variable, 1 would be 0x00000001 and -1 would be 0xFFFFFFFF (and -9 would be 0xFFFFFFF7).
|
H: How to use reed switch to change operating modes?
I have a circuit of LEDs - say L1-L10. My requirements:
No visible switch
Illuminate the LEDs successively (only ever one at a time) every time the user passes a magnetic "wand" over the switch. (Mode 1-10)
Using the same "wand" permit the user to set the circuit to an automatic mode whereby an LED lights for a few seconds then the next, etc. Again only one LED at a time. (Mode 11)
Permit the user to turn on all LEDs simultaneously. (Mode 12)
The circuit should remember which Mode was last enabled when reactivated.
Battery operated 9V.
I've seen kits advertised with this type of feature using a reed switch. Thus far I've been unable to locate any information on how such a switch is used to change modes. Can anyone help me find out how this is done?
AI: Put the reed switch from the input of a microcontroller (like Atmega, PIC, STM32, ...) to Vcc and put a pull-down resistor from the input the GND. You can now read the switching of the input like with any other button (don't forget to debounce if the reed switch contacts aren't covered with mercury).
Now you can change the modes in software and enable whatever LED you want to light up.
|
H: High - Frequency Carrier Necessity
let's consider a basic scheme of a receiver.
Now I have two questions:
I was told that the presence of the mixer is important since it is useful to delete the carrier frequency of the received signal. In fact, it is very difficult to work (i.e. amplify, filter etc) with high frequencies and so deleting it will be very useful. But now I have a previous question: why should we impress our signal to a high - frequency carrier, during transmission (and cannot use directly the frequency of our signal)?
In this picture I see an analog voltage entering the antenna, and a digital voltage exiting the envelope detector. My question is: when we speak of digital transmission, is the voltage entering the antenna digital or analog?
AI: This is an extremely basic question about RF and you should read a book in this subject.
Basically:
High frequency modulation is used to reduce antenna size without increasing the radiated power. This means smaller antennas for the same information transfer.
The voltage entering the antenna is an analog modulated digital signal. This means that to obtain a digital signal from the analog input a DEMOULATOR is required.
I hope this guide in the right way.
|
H: Is there software for converting a picture of a board into an schematic?
I need to reverse-engineer several simple single-sided boards. I have very good quality pictures of them so I was thinking that maybe there is software capable of getting the schematic from the pictures (up & down) or at least an approximation.
How can I reverse engineer PCB's easily?
AI: No s/w that I know of. However, you could overlay a transparency onto a picture of the board and draw the electronic symbol over the picture of the component, then add the wiring links. All you would have to do then is re-arrange the circuit for readability
|
H: Why is the transfer function of this non-inverting low-pass filter wrong?
I came across this block in a larger circuit:
With a transfer function (in pole-zero form) of;
$$
H(s) = \frac{s+30000}{s+5000}
$$
which was found using KCL on the inverting terminal of the op-amp.
As I am not used to finding transfer functions using conventional circuit analysis and I wanted to find the "pure" transfer function (i.e. the general function not the pole-zero representation). However I found that substituting my transfer function in the place of the pole-zero, with a step response is not quite the same. (It also does not match simulation outputs compared to the pole-zero function)
My calculations are as follows:
$$
V^{+}=V_{in}=V^{-}=V_{out}\times\frac{R_{2}}{\frac{1}{sC}||R_{1}+R_{2}}
$$
$$
\frac{V_{out}}{V_{in}}=\frac{\frac{\frac{R_{1}}{sC}}{\frac{1}{sC}+R_{1}}+R_{2}}{R_{2}}=1 + \frac{\frac{R_{1}}{sC}}{R_{2}(\frac{1}{sC}+R_{1})}=1+\frac{R_{1}}{R_{2}}\times\frac{{sC}}{{sC}}\times\frac{1}{1+R_{1}Cs}
$$
From this I found the final transfer function to be:
$$
H(s)=K\frac{1}{1+R_{1}Cs},\:\:\text{where}\:\:K=1+\frac{R_{1}}{R_{2}}\:\:\text{and}\:\:\omega_{p}=\frac{1}{R_{1}C}
$$
The K value was derived from the DC gain of a non-inverting amplifier and the pole frequency equation was derived from the relationship shown here: https://en.wikipedia.org/wiki/Cutoff_frequency
For the transfer function of the larger circuit; this block's transfer function is multiplied with another (an RL filter is connected to the input of the op-amp);
$$
T(s)=\frac{s}{s+\frac{R}{L}},\:\:R=80\Omega,\:\:L=10\text{mH},\:\:T(s)=\frac{s}{s+8000}
$$
$$
H(s)\times T(s)=\frac{s(s+30000)}{(s+5000)(s+8000)} - \text{Using pole-zero function}
$$
$$H(s)\times T(s)=\frac{30000s}{(s+5000)(s+8000)} - \text{Using transfer function}
$$
The transfer function was then given a step function \$ \frac{0.6}{s} \$ and then simplified with partial fractions:
$$
H(s)=\frac{5}{s+5000}-\frac{4.4}{s+8000} - \text{Using pole-zero function}
$$
$$
H(s)=\frac{6}{s+5000}-\frac{6}{s+8000} - \text{Using transfer function}
$$
Here is the graph of the two inverse laplace functions' step response:
My question is this; is the "pure" transfer function I derived wrong or is there some error made afterwards that results in an incorrect final graph compared to the pole-zero one? The pole frequency equation is correct and the general form of the transfer function matches a low-pass so I am most confused.
AI: The transfer function of the non-inverting circuit (which is no lowpass) is not correct. There is a simple math error.
The correct expression is:
Vout/Vin=1+ (R1/R2)*[1/(1+sR1C1)]
Hence, for s approaching infinity, the transfer function is approaching "1" (and not zero).
|
H: HX711 adc read functions gives different accuracy
I'm reading data from HX711 with stm32F1 but accuracy of the data are awful. when i read data with arduino the data ten times good if we compare with stm32 results. these are my read functions.
Arduino function:
long HX711::read() {
// Wait for the chip to become ready.
wait_ready();
// Define structures for reading data into.
unsigned long value = 0;
uint8_t data[3] = { 0 };
uint8_t filler = 0x00;
// Pulse the clock pin 24 times to read the data.
data[2] = shiftIn(DOUT, PD_SCK, MSBFIRST);
data[1] = shiftIn(DOUT, PD_SCK, MSBFIRST);
data[0] = shiftIn(DOUT, PD_SCK, MSBFIRST);
// Set the channel and the gain factor for the next reading using the clock pin.
for (unsigned int i = 0; i < GAIN; i++) {
digitalWrite(PD_SCK, HIGH);
digitalWrite(PD_SCK, LOW);
}
// Replicate the most significant bit to pad out a 32-bit signed integer
if (data[2] & 0x80) {
filler = 0xFF;
} else {
filler = 0x00;
}
// Construct a 32-bit signed integer
value = ( static_cast<unsigned long>(filler) << 24
| static_cast<unsigned long>(data[2]) << 16
| static_cast<unsigned long>(data[1]) << 8
| static_cast<unsigned long>(data[0]) );
return static_cast<long>(value);
}
STM32F1 Function:
long hx711_read(){
unsigned long Count;
unsigned char i;
Count=0;
while( HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_0)==SET){}
for(volatile uint32_t n = 0; n < 3; n++){}
for (i=0;i<24;i++){
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_1,GPIO_PIN_SET);
for(volatile uint32_t n = 0; n < 10; n++){}
Count=Count<<1;
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_1,GPIO_PIN_RESET);
if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_0)==SET){ Count++;}
for(volatile uint32_t n = 0; n < 2; n++){}
}
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_1,GPIO_PIN_SET);
Count=Count^0x800000;
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_1,GPIO_PIN_RESET);
return Count;
}
what could be the reason why these two functions give different accuracy?
AI: Both functions appear to work essentially identically, except for how bits 31:24 are handled - but I do not think this is your issue.
You did not specify which Arduino you were using though, and since shiftIn is a simple bit-banging function it will run att different speeds depending on what processor and speed you are working with, so if you are using an Uno or something even slower this will limit the resulting clock frequency to the HX711. Also, it internally uses digitalWrite/Read, which are notoriously slow, further limiting the frequency.
The same set-up is true for your STM32F1 function - it does bit-banging without timing. However the STM32F1 may be considerably faster than your Arduino and you are using HAL functions which typically get optimized very well, not unlikely to a single instruction. This should result in an SPI frequency considerably higher than the Arduino equivalent.
My guess is that it is so fast that it does not conform to the timing specifications of the HX711, leading to data corruption.
If this is the case, introducing hard delays after each WritePin call would slow things down and let you verify whether or not this is the issue. Something like for(volatile uint32_t n = 0; n < (DELAY); n++); should do the trick (volatile prevents the delay from being optimized out).
You should measure (using a scope or logic analyzer) the resulting signals to verify that they are within specification.
I assume you cannot use the SPI peripheral for some reason, but if you can - that is a much better solution.
|
H: Meaning of HCLK, FCLK, DCLK, PCLK
Can somebody please clarify the meaning of these acronyms in the context of ARM Cortex:
HCLK
FCLK
DCLK
PCLK
I think HCLK means half clock? I know that PCLK is related to APB, so maybe it means peripheral clock? I am clueless about the other two.
AI: There is no universal meaning for these acronyms. You need to look at the specific chip's datasheet in order to understand how they're used.
|
H: Computer Power supply not powering when connecting power pin to the ground
I have an old power supply which hasn't a power button to turn on/off.It is made by Enlight corporation.The model is: ATX-1123B 230W.
I found an image with the ATX power supply pinouts.Here it is:
As you can see, the green pin(PS_ON#) is for turning on the power supply. You connect the green pin to a ground pin (COM pins) and the power supply should turn on. But in my case ,it wont! But it will turn on if i connect the yellow pin(+12VCD) to the purple pin(+5VSB). Why does this happen. Can it damage my power supply??I can't get any power if i turn it on by connecting the purple pin to the yellow pin. The purple pin is "+5 VDC Standby Voltage" and the yellow pin "+12 VDC". I think that this is wrong and can damage the supply
AI: It does not turn on by connecting 5V standby output to 12V output, you are just back-feeding the fan with 5V supply. Don't do this as it may cause damage. Connecting PS_ON to GND should work unless the power supply is broken or it needs a small load to run properly.
|
H: Cleaning with less than pure IPA (isopropyl alcohol)
I want to clean a SO-DIMM memory that was contaminated with bottled drinking water. This was not "mineral water" intended for drinking. It was the high volume bottled drinking water from one of the world's largest "soda" companies. This device stopped working after the contamination. Obviously this water is not very dirty but the malfunction is strongly associated with a single contamination event.
Will it be effective to use 70% isopropyl alcohol available in common drugstores or must I use a 99.9% product which is certainly available in my area but less convenient.
AI: You can use deionized water to clean off PCB's, as long as the IC's themselves are not moisture sensitive, so 70% might work. I would use 90% Isopropyl alcohol if I were at home for cleaning, you don't need 99%. I would then slowly heat the part to remove the water, or use a dessicant pack.
|
H: Protection against a circuit being closed too long or failing closed
I'm prototyping a device that allows me to electronically open my front door, which it accomplishes by using a relay to close an existing circuit in my house. All I know about this circuit is that it measures around 12V AC.
Now, I'm far from keeping this device permanently installed, if I ever will, but thinking ahead, my biggest fear is that it would in any way fail with the relay closed while nobody is home, making noise all day (opening the door makes a loud buzzing sound) and letting all the unwanted people in.
I've thought of all kinds of methods to prevent this, like putting the timing of the relay under control of a really simple 555 or ATTiny circuit. I'll do that regardless of any other measures, since security is best applied in layers.
Ultimately, however, I would only leave the house comfortably if there's a super simple and reliable safety measure I can install in series with the relay in the 12V circuit, that would cut off the connection if it's closed for more than a few seconds. Something like a timed fuse. Something that, once triggered, can not be restored without physical intervention. It may even be sacrificial, since it will only be activated if all earlier measures fail.
What kind of protection would you advise me here?
AI: You might be able to get away with something as simple as a PTC fuse. These increase in resistance as they warm up, and once they reach a certain point the resistance rises significantly, so that the current through them drops, but remains sufficient to keep them warm, so they remain in that state until powered down and cool off.
image from here
You'd select one that would trip after a desired time with the circuit current. If you don't know what the circuit is doing that may be less easy, it sounds like your circuit is operating a door electromagnetic lock, so that'd be easy to protect this way.
|
H: Lattice — Should I prefer IPX/PMI over Verilog arithmetic builtins?
Like any FPGA vendor, Lattice provides a number of IP modules for users to put in their designs. I tend to use them whenever possible, but sometimes I doubt if they have any substantial benefit over plain Verilog.
For example, I can create a simple multiplier using the IPX dialog:
or do the same thing with a PMI intrinsic:
pmi_mult #(
.pmi_dataa_width (9),
.pmi_datab_width (9),
.pmi_sign ("on"),
.pmi_additional_pipeline (0),
.pmi_input_reg ("off"),
.pmi_output_reg ("off"),
.pmi_family ("XO"),
.pmi_implementation ("LUT")) ...
But given that I do not need additional pipeline stages or latching, is it any better than Verilog built-in multiplication operator? Like the following:
wire signed [8:0] a = (...);
wire signed [8:0] b = (...);
wire signed [17:0] result = a * b;
Shouldn't the LSE (or Synplify) be able to automatically match multiplication to pmi_mult, addition to pmi_add, and so on? Can I rely on it and just use plain Verilog arithmetic for simple computations?
AI: There's a fundamental functional difference between your code and what the IPX thing does: yours is not clocked.
Also, you can explitly tell the IPX thing how many pipeline stages you want, something that's impossible in a simple a * b combinatorial statement.
I don't know the features of IPX or PMI primitives, but you can rest assured that unless you really just need a combinatorial multiplication (that is, unclocked!), it makes sense to use a module that lets you explicitly state the way you want things to be implemented.
Generally, don't underestimate the complexity and degrees of freedom that an implementation of a basic arithmetic operation brings (and hides): For example, on a Lattice ICE40, a multiplier of two 8-bit numbers (unsigned!) can look this complex when mapped to the technology available in that FPGA:
(full 100 Megapixels (!) image)
Don't assume that a*b can magically infer whether you'd rather trade speed for space, or vice versa; whether you need the result registered or not; whether maybe high clock rate is more important than requiring a low number of clock cycles... Not even mentioning things like how the desired output width, and if lower than the maximum product, how to deal with that.
|
H: What is the use of two n mosfets with their sources tied together?
The circuit I'm looking at recommends two n-channel mosfets in series with their sources tied together between it's output and the power input.
pin description:
High voltage open-drain gate driver, which may be used to drive an NMOS/PMOS power switch. This pin is connected to the gate of the power switch.
But why two mosfets? Why not only the right mosfet?
AI: See that parasitic body diode in the MOSFET symbol? That means MOSFETs can only block current in one direction. Having them back-to-back lets it block current in both directions (i.e. AC). I'm not entirely sure why bidirectional blocking is required in this case, but is probably because whatever is supplying the DC-DC converter does not like having the DC-DC converter push current back into it when it is powering down.
You could connect it drain-to-drain if you wanted and it would still work block in both directions but it makes your gate drive much more complicated. Since the voltage that controls the MOSFETs is the voltage difference between gate and source. Tying the sources together lets you only require one gate drive circuit for both MOSFETs. If you tied drains together, each MOSFET would require a separate gate driver since the reference voltage that the MOSFET gate voltage cares about (i.e. the voltage at the source pin) is different between teh two MOSFETs.
|
H: How to interpret data sheet for an RF 50 Ohm terminator, is it 2 Watt or is it 0.1 Watt
I am trying to find a suitable RF 50 Ohm terminator for my application. I think the following will work:
http://www.amphenolrf.com/media/downloads/7034/132360.pdf
I am a little uncertain though as it states in the "Electrical" section that the impedance is 50 Ohms, the frequency range is 0-18 Ghz and the power rating is 2 Watt. This all fits with in my parameters.
However it has a "Material and Finishes" section and it lists resistance as 100 Ohms and 0.1 Watt. Should I be concerned with this section of the data sheet, is it telling me that really it can only handle 0.1 Watt and 2 Watt is only peak power as opposed to continuous operation? Which if so would put it outside my applications parameters.
AI: It's rated for 2W, it should do 2W unless they note caveats. I'm not even sure why they felt they had to include information about the resistor -- possibly because they needed it for mil-spec-ness.
If you're worried, get one and put 10V DC on it. You should see a 200mA current flowing, and the thing shouldn't burn up or otherwise change characteristics significantly.
Expect it to get hot, just because it's SMA-sized and needs to dissipate 2W. I would expect to get burnt if I casually grabbed it while it was dissipating 2W.
|
H: Is negative resistance possible?
I was reading Hayt Kemmerly Engineering Circuit Analysis Book,(I tried others, but this is the most comprehensible to me.), And I came across this circuit. I understand the first two, but I don't understand how, in the 3rd circuit (c), there is negative voltage through the resistor \$R_3\$ , while the current through it from \$+\$ to \$-\$ is positive \$7A\$. I don't understand how resistors can supply voltage. My guess is this is only a mathematical model, not real.
Edit: The Answers are shuffled in this book.
Edit 2: It looks like this book is not in the public domain, as I originally thought. However, I am not removing this image because it falls under fair use.
AI: In a passive device, negative absolute resistance cannot exist. However, negative differential resistance, where an increase in voltage leads to a decrease in current or vice versa, is observed in a number of rather common systems, such as neon signage and fluorescent lighting, as well as some more esoteric ones like tunnel diodes. Below is a figure showing an I-V curve for a generic electrical discharge; notice the region between points D and G where the voltage decreases as the current increases. This is the region in which both fluorescent lighting and neon signage normally operate.
(image source)
Negative absolute resistance can exist over limited ranges by using active elements. There's an op amp circuit commonly called a negative impedance converter that simulates a negative resistance, capacitance, or inductance by using an op amp and feedback:
simulate this circuit – Schematic created using CircuitLab
The two circuits above are equivalent, provided the op amp does not saturate.
|
H: Does placing additional capacitors in parallel with CJ7805 affect its performance?
I'm not sure if this is a stupid question, but I'd still prefer to ask than regret it later. I'm designing a PCB with the CJ7805 which, like the LM7805, can supply a steady 5 volts. In this case, it's to power a Teensy 3.6. There's a recommendation to place a 100nF capacitor between the Vin pin of the Teensy and ground. I already have capacitors (100nF and 330nF) situated around the CJ7805 as specified by the datasheet. I was thinking of placing a capacitor for the Teensy, but I was wondering if that would affect the overall performance of the CJ7805 since it would change the net capacitance? Or maybe capacitors work differently when placed far apart on a PCB? Would I even need to place additional capacitors on the PCB when it's already being monitored by one capacitor? I've seen boards use soo many capacitors before, and I'm getting a little confused. I'm new to PCB design so I'm still trying to find and understand the proper ways of keeping noise to a minimum. Any help would be appreciated. Thank you!
AI: The regulator needs a bypass capacitor to be stable. The Teensy needs one too. The farther a capacitor is, the less effective it is. If there is 1cm between regulator and Teensy, you may only need one. If they are 1 meter apart, you definitely need two. Since they are on same PCB just draw both and you can choose later to leave one out.
|
H: MOSFET as a Capacitor in IC
I was reading in a book that it is often possible to realize a certain capacitance in Integrated Circuits by exploiting the Gate Capacitance of a MOSFET. I read that the main disadvantage of this technique is the presence of a resistance between drain and source, which determines some losses. The equivalent model of this structure is shown in the following picture:
Now my questions are:
1) The first plate of the capacitor is the Gate metal contact. Under it, there is the oxide. Under the oxide, the substrate. Which is the second plate?
2) Why are in this model S and D shortcircuited?
3) Why does the resistance between S and D become a series resistance?
AI: Obviously the other plate is S (which generally is connected to the substrate) and D (which is connected in this case also to S) and the channel inbetween.
S and D both together and the channel form the second plate (you could also use only S but that would even increase the unwanted resistance)
In the center picture the second plate is represented by the the line between both resistors. So the two restsors in the center picture are two series resitors connected in parallel. You can replace those two resistors by a single series resistor (right picture). See modified picture below:
Note:
If this derivation seems somewhat sloppy the sloppy part is not between 2nd (center) and 3rd (right) picture but between the 1st (left) and 2nd (center) picture.
Without mentioning there is a transition from an actually distributed element situation (the channel resistance is distributed over the whole plate which is part of a capacitor) to a lumped element representation.
|
H: External Dupont male connector
I would like to program my board without opening the enclosure.
On the PCB I have a standard 2x3 Dupont male connector that I use with the Atmel ICE programmer. I am looking for a similar connector to be mounted externally but I did not find anything useful. Do such connector exist or can you suggest another solution?
Edit: this is the Dupont connector used by my HP 48G calculator. I was thinking of something similar.
AI: No, the "DuPont" style pin headers are not meant for external connections.
Pick any other connector you like — perhaps the ubiquitous DE-9 or RJ-45.
|
H: What is purpose of the "assignments" in the Qsys custom component editor signals and interfaces tab?
Here is the image showing what I am talking about,
For Avalon Memory Mapped Slave port I can see that there are 4 options already there and they are already assigned custom values.
I just want to know, what is the usage of this "assignments" when making custom components and what is the usage of the assignments that are already defined and set for the Avalon Memory Mapped Slave port? i.e what is the master supposed to do if any of these options isFlast, isMemoryDevice isNonVolatileStorage, isPrintableDevice where '1' rather than '0'.
Thanks.
AI: IIRC, that's just a different way of seeing (and setting) all of the options for the IP that are also settable in the tabs and fields of the main window, summarizing them all in one place. It corresponds more closely to what you see if you look at the generated code.
|
H: 1 TTL IC -> inverter + 2-input NAND + 3-input NAND
I came across this question in my homework:
Implement the following gates using only one TTL IC: one inverter, one 2-input NAND and one 3-input NAND.
The type of IC they're talking about has 14 pins, where pins 7 and 14 are GND and Vcc respectively. Also, the rest of the pins are the in/outputs of 4 gates of the same type.
This example is given:
Using only one TTL IC (OR gates) to implement a 4-input OR gate.
So far, I can only figure out the following:
The gates inside the IC should be NAND.
1 NAND gate can be used to make the inverter:
1 NAND gate as the 2-input NAND (obviously).
3 NAND gates can be used as the 3-input NAND:
However, there are not enough NAND gates inside the IC for all of this. How do I fit them all?
AI: Well, obviously, a triple 3-input NAND gate (74LS10), with various unneeded inputs tied high, will meet the stated requirements.
|
H: What kind of connection to use between two circuit boards that move with respect to each other?
I need to connect two circuit boards - one with a microcontroller, power circuitry, display, etc to another with several sensors on. The connection will require somewhere between 4-10 lines - 5V power, ground, I2C data and clock, possibly plus some interrupts. The circuit boards will be mounted at right angles with respect to each other.
The crucial problem is that the board with the sensors on will need to move constantly with respect to the board with the microcontroller on. The degree of movement will be small - only a few centimetres, and it will be mainly in one axis (perpendicular to the sensor board, parallel to the microcontroller board). The movement will be irregular in nature - the movement will respond to the sensor input. The movement will be driven by a powerful servo, so the speed and acceleration of the movement may be quite jerky / fast.
So what kind of connection can I use between the boards that will be reliable for this kind of movement? I've seen various kinds of flat flex connection used in consumer products. Is that kind of connection reliable over years of many millions of movements every day? What kind of connection would be used in more reliable applications like automotive or aerospace?
AI: If you need frequent motion you should specify FPC designed for dynamic applications. The treatment of the copper is different from ordinary FPCs to keep it from cracking and there are constraints on the copper thickness and there are other constraints (single-sided is best, gentle radius that spreads out the flexing, and so on).
Most good FPC makers will have a detailed design guide that can assist in your design. Think of consumer applications such as moving print heads or optical read heads that float in suspensions.
I've done this for a spacecraft instrument that needed frequent motion between a sensor and the electronics package- pretty straightforward once you understand the parameters.
|
H: How to use output PWM in AVR
I have this code to blink an array (8-led) of led one after one:
#include <avr/io.h>
#include <avr/delay.h>
#define dela 500
int main (void)
{
DDRC = 0xFF;
for(int i=0; ; i++,i%=8)
{
PORTC |=(1<<i);
delay_ms(dela);
PORTC &= ~(1 << i);
delay_ms(dela);
}
}
I want to light up those led partially, like dimmed version of this, something like PWM
Now my question is how can I do that, how can I write analog output ?
Micro-controller : ATmega8A - PDIP
AI: Modulate the LED "on" time.
Something like this.
for(int i=0; ; i++,i%=8)
{
for(int k=0; k<26; k++)
{
PORTC |=(1<<i);
delay_ms(10);
PORTC &= ~(1 << i);
delay_ms(10);
}
delay_ms(dela);
}
|
H: SAR ADC DAC Question
Hi,
This is an extract from MT-021 from Analog Devices about SAR ADCs. In particular, it shows a circuit in which the Track(Sample) and Hold block of the SAR architecture AND the DAC of the SAR architecture are implemented as one.
My question is : The description/circuit is explaining about the operation of the DAC but if you read the highlighted sentance, it says "The comparator then makes the MSB bit decision". If this is operating as DAC, why do we need to make an MSB bit decision, shouldn't we already know the bits if it's a digital to analog converter?
https://www.analog.com/media/en/training-seminars/tutorials/MT-021.pdf
AI: If a DAC is used as part of a SAR ADC, then we don't already know the value of the MSB. The logic in the ADC makes an assumption about the value of the MSB, uses the DAC to create an analog voltage corresponding to that assumption, and then the comparator determines whether the actual input voltage is higher or lower than the DAC output. At that point, the SAR logic (of which the comparator is a part) makes the decision about whether the MSB should be high or low. The wording of the sentence you quote could be improved a bit, but in the context of SAR ADCs it is pretty obvious.
|
H: Resistive braking of series wound DC motor
I am looking at braking a series wound DC motor by putting a resistor across the motor feed terminals.
All of the sources that I have looked at state that the polarity of the field winding needs to be switched as you start braking. I understand how this works and how it applies braking.
What I do not understand is what happens if you do not change the field coil polarity. My instinct is that this will apply a reverse current to the field coil reversing the polarity of the output which will reverse the field.... ad infinitum. The result will probably be the field collapsing to 0 as an under-damped second order response totally failing to brake the motor.
If there is anyone out there with any experience of what actually happens I would be happy to hear it.
AI: The torque of an ideal series wound DC machine is \$T = k i^2\$. So the torque is always in the same direction, regardless of the current direction.
Regardless of how you're generating current, if you want to reverse the direction of the torque you need to change the constant \$k\$. You can only do that by changing the polarity of the field coil with respect to the armature.
So, if you want to brake -- by any means -- you need to reverse the direction of the field coil.
** Edit **
Going to the next level of detail, by conservation of energy*, in an ideal motor, \$v_a i = T \omega\$, where \$v_a\$ is the armature voltage and \$\omega\$ is the shaft speed. So \$v_a = k i \omega\$.
Model the motor with some inductance, so the inductive contribution is \$v_L = L \frac{di}{dt}\$.
\$E = I\, R\$, and if you're careful with your sign conventions you'll see that the resistor opposes the coil voltage, so \$i = -\frac{v_a + v_L}{R}\$.
Separating that out, and doing more work in one step than would be acceptable in a homework assignment: $$i = -\frac{k \omega}{R} i - \frac{L}{R} \frac{di}{dt}$$
Rearrange terms and again doing more steps than I ought to, I get $$\frac{di}{dt} = - \frac{R + k \omega}{L} i$$.
So -- if you just put a resistor on the thing, the current will decay exponentially based on the speed of the motor; i.e., the ideal motor running at constant speed "looks" like a resistor. This makes sense for energy conservation, because \$P_{out} = T \omega\$, and \$P_{in} = i^2 R\$, and the energy stored in the inductor is a function of \$i^2\$. Since the power out is a function of the shaft speed, it would make sense that the energy in the inductance would get sucked out faster the faster the motor is turning.
I didn't try modeling the dynamics of the motor itself (\$\dot \omega = T/J\$, with the angular acceleration, \$\dot \omega\$, depending ultimately on current) because I assume that they are slow enough that the motor current decays long before the motor speed has a chance to. So for the purpose of this problem, you can take the speed as constant.
* Thank you Emily Noerther! This makes it so easy!
|
H: Can someone identify this old round connector?
I am trying to develop something to control an old antenna rotator, and it has a connector like this one:
It does not seem to be a simple audio connector, but is more or less of the same size. What it its name? Is it possible to find a male connector for it nowadays?
AI: Figure 1. An 8-pin DIN connector (IEC 60574-18).
Figure 2. Dimensions. Source: Amphenol.
Figure 3. The female version has slots to accomodate the simple flat forked contacts visible in the three left sockets.
|
H: CMOS Flash vs SD: Can I put a Gamecube Memory Card in an SD reader?
Backstory
I've decided to run "Homebrew" on my Gamecube (and writing Homebrew for n00bs to document the process).
Unfortunately, it seems that there's no way to do this without buying special hardware. Specifically it seems that you have to have at least one of
XenoGC (you solder it on to put the DVD drive in debug mode)
Action Replay (a manufactured hacked game disc)
Hacked Memory Card (pre-loaded with exploit game saves)
Another, already-modded/hacked, 'Dolphin' console
Now it turns out there's the SD Gecko (DOL-SDA-01), which allows you to use a standard SD card for extra storage.
Seeing this I thought that surely the Official, Authentic Nintendo Memory Cards were just plain SD cards in a proprietary housing.
I thought perhaps I could use an emulator to write a raw memory card file to the SD and thereby avoid paying (a measly) $25-$35 for the SD Media Launcher or a Swiss Boot Card.
I failed, I ended up buying the Action Replay Launcher, but I'm still trying, just to tackle the challenge - the battle cry of Freedom at and all that...
I used that boot disc to load Swiss and hack a memory card with GCMM and now I'm still wondering if there's a way for me to "rip" the memory card and post it for others to use.
Probably not. But if not, then why?
CMOS Inside?
When I cracked open a Gamecube memory card, I found that it's actually CMOS Flash inside, not SD.
Doing some searching on the numbers I found inside I came across
http://nus001.web.fc2.com/dol_mem_card/dol_mem_card.html,
which has helped me dig up more model numbers and some datasheets.
The official memory cards have these specs:
(it seems that 5 "blocks" are used for a file system table or some such)
| 59 Block | 251 Block | 1019 Block |
| :--------: | :------------: | :-----------: |
| Grey | Black | White |
| 4Mbit | 16Mbit | 64Mbit |
| | | |
| Nintendo | Nintendo | Nintendo |
| DOL-008 | DOL-014 | DOL-020 |
| DOL-4MC-01 | DOL-4MC-10 | DL-64MC-01 |
| | | |
| MX | MX (Macronix) | SEC (Samsung) |
| ? | S030158 | KOREA 937 |
| ? | MX25L1601MC-60 | KM29U64000T |
| ERM4-DOL | ERM16-DOL | ? |
| ? | 1E7548 | RRH004AA |
From the "DOL" you can tell that these are proprietary to Nintendo,
but I found a few references to MX25L160* devices that I think are probably similar (CMOS Serial Flash EEPROM):
https://www.alldatasheet.com/view.jsp?Searchword=MX25L160&sField=2
https://www.cypress.com/file/196496/download
I found an aftermarket card with these specs:
| 251 Block |
| :-------: |
| SST |
| 39VF1601 |
| 70-4C-EK |
| 0449260-D |
I found the SST39VF1601-70-4C-EK datasheet on mouser:
https://www.mouser.com/datasheet/2/268/25028A-709057.pdf
It says it's CMOS I/O and CFI compatible.
Another guide gives this pinout info:
| Pin | GC MC (EXI) | SD Gecko (SPI) | SD Pin |
| :-: | :----------: | :--------------: | :----: |
| 1 | SENSE | Sense | - |
| 2 | GND | VSS1 | P3 |
| 3 | INT | INT (NC) | - |
| 4 | 3.3V | VDD1 3.3v | P4 |
| 5 | SO | DI | P2 |
| 6 | 5V | VDD2 5V (NC) | - |
| 7 | SI | DO | P7 |
| 8 | 3.3V | VDD1 3.3v | - |
| 9 | CS | CS | P1 |
| 10 | GND (Shield) | VSS2 | P6 |
| 11 | SCLK | CLK | P5 |
| 12 | SENSE | Sense | - |
CF vs CFI vs CMOS vs SD?
I suppose I'll have to take a closer look at these to determine if the pinouts are the same between the normal flash and the SD.
What I want some help determining if it's reasonable to think that I could:
Wire this Flash cart to an SD card adapter and read it with an off-the-shelf SD reader?
Or perhaps using a CF adapter card and CF reader instead?
Write the raw contents of this Flash cart to an SD card?
Plug such an SD card into the memory card slot and have it recognized as a normal memory card?
Or is that unreasonable and likely (or certain) than such an effort will yield no gains?
AI: Seeing this I thought that surely the Official, Authentic Nintendo Memory Cards were just plain SD cards in a proprietary housing.
They aren't. The Nintendo memory cards are serial flash devices, which are accessed over SPI.
SD cards support an SPI mode, so with appropriate wiring and software, they can be accessed by a GameCube. However, the converse is not true. Nintendo memory cards are not SD cards, and cannot be made to behave like one.
Or is that unreasonable and likely (or certain) than such an effort will yield no gains?
All of the things you're describing will be futile. The Nintendo memory device does not implement the SD protocol (nor Compact Flash), so it will never be readable as one of those devices.
I found a few references to MX devices that I think are probably similar (CMOS Serial Flash EEPROM)
The "MX" prefix means the part is made by Macronix, a large manufacturer of memory devices. It doesn't imply anything beyond that.
|
H: Conductivity of liquids (3D resistor network)
Hi I'm an electrical engineer but have not seen this problem before. I'mn trying to measure/calculate the resistance of a liquid.
Background:
I'm working on an electronic device that can come in contact with a liquid. Unintentional, can be avoided but is not considered a big deal. It's easy to clean and does not corrode/hurt the print.
What I noticed is that it misbehaves when in contact with the liquid. I've found that the liquid sometimes was conductive enough to cause a small bias current on a transistor, introducing a large bias on the output. Just enough to break the function.
Problem:
I want to calculate the resistance of this liquid. But I've not found a solution for it yet. For instance I can measure the conductivity but to me it's not straight forward going from Siemens/cm to Ohm over a given distance. I assume the measured conductance is a from a 3D resistor network of unknown value.
Example: Glass tapwater 22 deg C, measured at 264uS/cm. I use a cheap Chinese TDS&EC so this measurement might be off. R= 1/S or R = about 3k8 at 1cm.
What would the resistance be at 2mm? Or at 1mm?
How can I find this value?
I'm not looking for a solution to my circuit, there are many easy fixes. I want to understand the conductivity/resistance problem first.
AI: Resistivity is measured in (Ω⋅m). But you should think of the single distance measurement as "area over distance". Area over distance is m^2/m, which reduces to m. So resistivity goes up linearly with distance, and down linearly with cross-sectional area.
So if your tap water is 264µS/cm ~= 3800Ω.cm, then there is 3800Ω of resistance for every cm of distance through a water column with a cross-sectional area of one square cm. Double the length of the water column and the resistance doubles. Double the cross sectional area of the water column and the resistance halves.
If you stick with a water path that has a cross sectional area of one square centimetre, then if the path reduces to 2mm long, the resistance will be 760Ω. At 1mm it will be 380Ω.
Of course, practically speaking it would be very hard to control the cross-sectional area, and even if you could there's likely to be all sorts of edge effects as you start to get down to smaller distances. But at least that should help you understand resistivity.
|
H: STM32 ADC and timer(s): Measuring moving average peak voltage of PWM signal with varying amplitude
I want to measure a moving average of the amplitude of a fix frequency, fixed dutycyle PWM signal with slowly varying amplitude but in a noisy environment (DC motors).
I want to use as little as possible CPU power to do this and have the ADC do this for me. I have an internal signal coming from a timer that is in sync with the signal to measure. I can use this as a trigger.
Below is what I try to do:
use the internal trigger from the timer on the chip that actually generates the PWM signal
wait 1/4th of the onPeriod before taking any samples to filter out rising time or overshoot
then take N samples and filter out noise by taking the arithmetic average
keep a constant moving average of the M past cycles (3 in the drawing, 100 in reality)
Store this result in an ADC register such that the application can always retrieve the last 100ms average
So far, I figured out 1 (interconnect of timer output channel and ADC external trigger) and 3 (oversampling) by reading the reference manual and think I can do 2 by using a basic timer inbetween first timer output and ADC. But I completely struggle with 4 and 5.
Can this be done? I am using STM32L4 and F4/7.
AI: The F4/F7 have plenty of memory to handle this. You'll need just over 200 bytes (100 samples * 2 bytes each), which is a fraction of even the smallest F4 chips. A moving average is a type of FIR filter and has some advantages to an IIR filter (such as an "infinite average"), such as that it responds more quickly to changes and will settle more quickly on a value if your ADC readings settle on a value. Often, this means it'll be more accurate at any given time than an IIR filter.
There are a few ways to do a moving average:
1) Use the DMA to write the block of 100 samples. Setup the DMA to write to the address of some variable like uint16_t adc_readings[100], and set the number of transfers to 100, and the memory increment size the halfword. Also setup the DMA to be in circular mode, so it will automatically wrap around to the beginning of the adc_readings array. Start the ADC and DMA and everything will happen in the background, no CPU needed.
Whenever you need to get the moving average value, you'll need to use the CPU, however. Write a function that takes the sum of all 100 values in the array, and divide by 100.
This method is great if you only need to read the average value every once in a while, since there's no CPU load otherwise.
2) Create an interrupt routine for when the ADC has a value for you. In the interrupt, append the value to your array. Something like this:
uint16_t idx=0;
uint16_t adc_readings[100]={0};
uint16_t moving_average;
void ADC1_IRQHandler(void) {
uint16_t oldest_value = adc_readings[idx]; //grab the value we're about to overwrite
uint16_t new_value = ADC1->DR; //read whatever register you need to get the ADC reading
moving_average = ((100 * moving_average) - oldest_value + new_value) / 100; //this is the shortcut trick!
adc_readings[idx] = new_value;
if (idx++ > 100) idx = 0;
}
The advantage of this method is that the moving average is always kept current and is available any time with no extra CPU load when you need to read it. Also, calculating the average each time requires less operations because of the "trick" where you can just pop off the oldest value and pop on the newest one, and update the average by an amount proportional to their difference. The disadvantage is that the CPU is involved with every ADC reading, each time the ADC IRQ is called. So if you go several hundred readings without needing to know the moving average, you'll have some unnecessary CPU load. But if you need to know the moving average quickly, especially if you need to know it with every new ADC reading, then this method wins.
Tip: If your moving average size is a power of 2, such as 128 or 64, then the moving average will be much faster to compute since the divide can be a simple bit shift.
|
H: Submersible electronics
I'm currently working on a hobby project that uses a MS5540C.
It will basically measure the water depth and temperature.
My general thinking was to encapsulate the whole thing (except the sensor) in wax to make it water proof.
Could I use epoxy instead? What general consensus?
added:
The sensor will be dropped to at least 10m - 20m. I'm still playing with the idea of having the sensor...or the whole device (sensor ESP32 and battery) submerged.
AI: will basically measure the water depth and temperature.
My general thinking was to encapsulate the whole thing (except the sensor) in wax to make it water proof.
Could I use epoxy instead? What general consensus?
Generally you'd use a waterproof housing and then also perhaps encapsulat e the PBA or use a conformal coating. Waterproof housings usually use a O-ring to ensure a proper seal. Conformal coatings must form a void free layer against the surface and have low water solubility. –
Is there a particular conformal coating that seems to be better that others? Acrylic, polyU...
Dow Corning Dowsil CC-2570 is "very good indeed". It costs an arm and 3 legs in small volumes and much less in not much larger volumes. Here about $US100/kg in 3.6 kg pails, and Here $128 for a 453 g bottle.
It can be sprayed, dipped or brushed on and only needs a 0.1mm coat to work well enough. So a little goes a long long way.
(V = A x t. So 1 litre = 10 m^2 x 0.1 mm)
It will "go off" if not stored well BUT if stored in a wll sealed bottle inside multiple sealed plastic bags will still be usable 10 years on (ask me how I know).
|
H: TUHS3F05 without other components
I'm planning to use TUHS3F05 for my ESP32 project. I'm very space limited so I need to optimize place as much as possible.
In datasheet it is recommended that TUHS* it should be used with other components yet in my testing it worked great without them (I was testing for over 10 days without any issues).
My questions are:
can there be any shot or long term problems of using my schematics?
why they need so many external components?
are there any other so small factor AC-DC solutions?
This is recommended TUHS* schematics:
This is my schematics:
AI: I've checked the instruction manuals of the part. The parts that are used in the reference schematics are:
F1 :: Input fuse
To prevent the situation when the power supply starts to draw much current, most probably because of some failures.
Eliminating this may cause damage to your parts and maybe power lines.
C1 :: Input Capacitor
To comply with conducted noise on the input and to reduce high-frequency electronic noise that may cause interference with the part.
Eliminating this may cause lots of problems in noisy lines or EMI prone environments.
Cbc :: Smoothing Capacitor
To smooth the output voltage and counter fluctuations that cause instability.
Eliminating this may cause instability on the output voltage.
R1 :: Inrush current protection resistor
To limit inrush current to avoid gradual damage to the component and avoid blowing fuses or tripping circuit breakers.
Eliminating this, well, has a risk of damage to component or blowing fuses.
SK1 :: Surge Protective Device
To protect against transient surge conditions.
Eliminating this may cause problems for the component.
So to answer your first question: Yes, eliminating those parts can cause lots of short or long term problems and drastically shorten the life of the component.
If you have to go on with your schematics, keep that in mind that, you might saw lots of instability problems, but then again it all depends on the environment.
So as advice that I've learned the hard way, always stick to the datasheet.
And if you want to check other board mount power supplies, you may check the suppliers and like digikey.
|
H: What is meant by taking dual of a boolean expression?
I read online that if we have a set of SOP terms giving a boolean expression, then the POS terms of the complement of the SOP terms will give the same expression.
POS(f)=SOP(f').
This is called taking the dual of the expression. How does this work?
If I have:
f = BD + AC + CE
Its complement:
f' = (B' + D')(A' + C')(C' + E')
What is meant by taking the dual of f, and how do we get f in POS form?
AI: The dual of a boolean expression is an expression that is obtained following these steps:
replace any logical sum (OR) with a logical product (AND)
replace any logical product (AND) with a logical sum (OR)
replace any 0 constant with a 1 constant
replace any 1 constant with a 0 constant
The two basic logical operations AND and OR are called dual of each other, i.e. AND is the dual operation of OR and viceversa. Hence the dual transformation can be explained as:
Replace any operation with its dual and any constant with its complement (negation).
Note that negations must not be changed.
|
H: Can I power a MOSFET from my uC in this way?
The uC is a PIC10F220, which if I read the datasheet correctly can supply 25mA absolute maximum on its pins. The MOSFET that drives the load is actually 4 pcs NCE0140KA in parallell, but drawn as one for simplicity. The combined capacitance of the MOSFET's is 13.6 nF. I have selected the values of R1 and R2 so that the transistor gate will charge and discharge as quickly as possible, in order to minimize the transition time when the the transistors will be half-open. I am doing this because this circuit will be potted, so I'm trying to minimize heat dissipation.
By my calculations the current drawn from the uC output should peak at around 20mA the moment the output is activated and stabilize at 10mA. The peak will be close to the absolute maximum of the pin, but I figure it will be OK since the peak will be very short: Time constant of the R1-M1 RC circuit is 250 * 13.6e-9 = 3.4 us.
The circuit will be used as a pwm control and the switching frequency will be around 2 kHz.
Have I got this right? What would you do differently?
AI: You're (worse than- because of voltage drop in the output) halving the gate voltage, the particular MOSFET you mention is only guaranteed as low as 4.5V Vgs, so you're going to get more (perhaps much more, and relatively unpredictably) Rds(on) and thus I^2R heating during conduction than if you used the full 5V drive.
Secondly, you need to consider the gate charge to determine the switching time with a load, not just input capacitance because of Miller effect- your numbers will be optimistic by a large factor because the gate-drain capacitance couples the drain voltage swing back to the gate at a multiple because the drain voltage changes more than the gate voltage. From the link above:
There are many papers on predicting switching times, or just get a SPICE model and look at "typical" results to get a feel for it (keeping in mind that there will be a spread in parameters in reality- not all devices are "typical").
The MCU naturally drives the output push-pull- you're better off driving it that way with the full 5V (series resistor) and adding a driver circuit if the switching is not fast enough to meet your requirements. A (very) rough simulation for the MCU output with a 5V supply is a voltage source in series with a ~100 ohm resistor (maybe 200 ohms for sourcing current vs. 100 for sinking). If it turns out that guesstimate resistor value is fairly important, your circuit may be too dependent on characteristics that are not guaranteed (in reality the outputs act sort of like a constant current source over a range, and that current is not well controlled).
Here's an old Microchip output curve, the part you are using will likely be different, but the shape will be similar:
Edit: Suggested simple gate driver. You can also buy gate driver chips with much higher gate drive, and several manufacturers have many products (including Microchip), but for 2kHz it should not be necessary. You can optionally put a 1K resistor from MCU output to gate to get the tail of the 0/5V.
simulate this circuit – Schematic created using CircuitLab
|
H: How do I efficiently search for ICs?
I am a computer engineering student with an electronics background (i.e. mandatory circuit design and analog electronic courses) and my degree thesis requires me to design an electronics project.
So now I have this project to get done and of course I have to look for ICs that do this and that. Do I just Google stuff until I find what I need? I feel really lost since my electronics background is just that, a background, so I know how diodes, opamps and transistors work but I have no idea what the various acronyms (like PHY, MIPI, TTL and so on) mean, so what usually happens is I Google "integrated feature 1 feature 2 ", then I click on any results that look related, read datasheets (when I can find them, since many are under NDA), stop to Google any acronym I don't know, which usually gets me to know what it means but not how it works, rinse and repeat.
Some of the time I can actually find what I want, but most of the time I just spend a whole day staring at my screen feeling completely lost and at the end of the day I turn off my computer feeling like I haven't accomplished anything. Most components look like they are not interoperable, have different standards for input and output or actually have the same standards but call them by different names because of copyright!
So my question is: how do I efficiently search for the ICs I need? My project doesn't sound so hard on paper, I have a very good idea of what I have to do but I have a hard time finding the components I need. Am I doing this wrong?
AI: Summary: It's an incremental process, not a "big bang", to go from college theory work to a substantial project. There is no substitute for experience.
After reading the whole question, I don't think your real question is the title of "Where and how do I search for ICs?". Instead I think your real question is more like - how can you choose components for a project, when you don't understand what components you need, and you don't understand enough of the datasheets to be confident that you are choosing suitable components.
I am a computer engineering student and started being interested in electronics for my degree thesis.
You don't say how much electronics is taught in your computer engineering course. However even though you are interested in electronics, if they aren't teaching you enough electronics for what you want to do in your thesis, then don't try to make this an electronics thesis. Instead, keep electronics as a hobby interest for now and focus on what you can do for your thesis.
As already mentioned in comments, you should consider approaches like block diagrams. That is similar to decomposition in computer programming, where you break down a system requirement into functions, data types etc.
But what if you don't know enough about which electronic components are currently available, to know what blocks in your block diagram are sensible?
You said that you...
feel that what I'm missing is a primer on...the real world or something.
Many (most?) of us went from theory to "real world" in steps by doing projects, starting with something small and getting bigger each time. I doubt that anyone went straight from theory to a (successful) big project. That experience, of making increasingly complex projects, does a few things (just like learning any new skill):
You increase your confidence for tackling more complex projects, because of each previous success.
You get to expand your knowledge of current technology with each new project. Each time you can focus on learning only what is new & different in that project, relying on your experience from previous projects for elements that are common between those projects and the new project.
This increasing knowledge helps you to know what sensible "blocks" you can include on your next project block diagram. For example, at the beginning, you might not know how to detect when a voltage is above an upper limit or below a lower limit. For that project, you do some research and find there's a term for that — window comparator — and you can add that to the list of blocks which you can include in future block diagrams.
Another important way to increase your knowledge incrementally is to read project-based books or magazines (Elektor is a current example of such a magazine - there were many others in the past, which have now disappeared) and build at least some of the projects. With each project you will learn new things, including new "blocks" (ICs, interfaces, functionality like window comparators etc.) for your future block diagrams.
A few final points, from my own experience:
Sometimes you need to allow yourself to fail, at least initially, because that is when you are likely to learn the most.
If you always do the same project type (e.g. flashing LEDs) then you will eventually be able to do them in your sleep, but you won't learn anything new. If you try something requiring different knowledge (e.g. designing a switch-mode power supply) it is more likely not to work first time. You'll learn lots from troubleshooting and fixing it, but that will take time - so don't choose a "stretch goal" project requiring new knowledge, with a hard deadline.
One example of a book which is somewhere between the "circuit design" books you already found and real world knowledge, is "Practical Electronics for Inventors" by Paul Scherz and Simon Monk. Early editions had several mistakes, and even the current latest (4th) edition has errata - but at least errata lists are available. Another example is "Practical Electronics Handbook" by Ian Sinclair and John Dutton. These books contain examples of the circuit design "building blocks" which you might find useful. You might prefer the style and contents of one book over another, so these are not specific recommendations, just examples of the type of book you might find useful.
There is always "The Art of Electronics" by Paul Horowitz and Winfield Hill. However that is heavy on theory. So while it does include some practical information, if you haven't already read this book, check to see if it is "practical enough" for you.
However, books on their own aren't enough. You have to try some projects, to find either "that was much easier than expected, so I can try something harder next time", or "oops, that is much harder than expected, I'll pick something simpler to build up my knowledge from a lower starting point".
In short: It's an incremental process, not a "big bang", to go from college theory work to a substantial project.
|
H: What (if anything) are the standards for "generic" part numbers?
If I buy an MMBT4401 from Diodes, Inc., I get a 40V, 0.6A NPN transistor in a SOT-23 package. If I buy an MMBT4401 from ON semiconductor, I get a 40V, 0.6A NPN transistor in a SOT-23 package. If I buy an MMBT4401 from Micro Commercial Co,... you get the idea. And this is hardly the only case of this; countless companies make 1N400x diodes, 2N7000 NFETs, 2N3904/MMBT3904 transistors...
I'm quite certain that these companies don't all share the exact same silicon (though some of them might be packaging and reselling silicon dice bought from the same source), so what exactly is standardized between them? Is there even a de jure standard (and if there is, who sets it), or is this all just a de facto standard?
In either case, which specific figures of merit are considered "part of the standard"? Can I trust that no 1N4001 will have a forward voltage greater than some standard value, for instance? That one I'd be pretty sure is part of the standard, but what about the parasitic series resistance? I know I wouldn't want a 1N4001 if it had a parasitic resistance of 10 ohms, but could such a diode be made and still bear the mark 1N4001?
AI: A very few components are actually standardized by JEDEC (think of the 7400 logic series, for example).
Most of the components you mention are simply results of historic multi-sourcing agreements: Large customers (esp. of the military kind) wouldn't buy an obscure part that they could only get from one party.
Also, don't underestimate the history of these companies: for example, TI having all the parts that are still available in stock under the brand name of National Semi happens because the former bought the latter, and some stocks simply have a half-life of roughly eternity. Mergers and spin-offs sometimes leave multiple parties with access to the same IP.
To answer about guarantees: Um, these usually don't exist. Good luck out there and read your datasheets!
|
H: What does this diamond, arrow and tail symbol means in schematic diagram
What does these symbols in the electric schematic means? I believe the arrow head indicates the direction of flow of current from left device to right device. What is the tail of that arrow symbol is? Is that source of current? What does the diamond symbol indicates here?
AI: This likely indicates signal direction.
Outward arrow (CLK, DO) - the pins are output-only
Inward arrow (DI, SCK) - the pins are input-only
Both ("diamond") (SDA) - the pin is both input and output
|
H: LTspice table function
How does the table function work in LTspice?
In the LTspice library, it says,
table(x,a,b,c,d,...):
Interpolate a value for x based on a look-up table given as a set of pairs of points.
I don't really understand what it means. Could somebody help me understand what it does?
Example:
.step param n 0 5 1
.param cc=0.01 ; delta
.param a1=table(n,0,0,1,1,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0)
.param R1=2k*(1+cc*a1)
.meas Vout0 FIND V(out) when n=0
How do the above statements work?
AI: .step param n 0 5 1
Simulates the circuit for different values of n, starting at 0, stopping at 5, with steps 1. So, n is one of [0,1,2,3,4,5]
.param cc=0.01 ; delta
assign a value cc = 0.01, not sure what the delta is, probably just a comment, not a LTspice command.
.param a1=table(n,0,0,1,1,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0)
a1 gets a value based on the value of n, the table has the following structure,
table(index, pairs of key,value ). in your case n is the index, and the bold ones are the keys, followed by non bold values.
table(n,0,0,1,1,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0)
Notice that, n is in [0,1,2,3,4,5], so many of those keys will never be reached/used
.param R1=2k*(1+cc*a1)
Assign the value of R1 = 2k*(1+cc*a1), equal to, R1 = 2k*(1+0.01*a1), that for n=0 will be, R1 = 2k*(1+0.01*0). For n=2, R1 = 2k*(1+0.01*0), and so on.
.meas Vout0 FIND V(out) when n=0 ; this will not work, see below
As pointed by pfabri in the comments, this measure operation will not work. It is unclear to me why that happens, but it seems that the expression used as a condition for when can only be in terms of literals, currents and voltages, e.g., V(n001)=4+I(n002). Also, if the condition is never met you will also get that the measurement failed.
|
H: Transfer function for Sallen-Key Low-pass Filter
How can I find the transfer function H(s) of the following circuit by using the nodal analysis?
My thoughts woulb be:
the equation for the node
\$ i_1 = i_1 + i_3 \$
\$ i_1 = \frac{U_e - U_1}{R_1} \$
\$ i_2 = \frac{U_1-U_2}{X_{c1}}\$
\$ i_3 = \frac{U_1 - U_a}{X_{c2}} \$
I expressed \$ U_2 \$ using the voltage divider
\$ U_2 = U_1\cdot\frac{X_{c1}}{X_{c1}R_2} \$
My idea was to express \$U_1\$ and \$U_1\$ set it all in the initial node equation \$ i_1 = i_1 + i_3 \$ and from that i might be able to derive the transfer function \$ \frac{U_a}{U_e} \$. But I don't know how to express \$ U_1 \$.
Accroding to some websites this is what the transfer function looks like for that typs of filters:
\$ \frac{U_{out}}{U_{in}} = \frac{\frac{1}{R_1C_1R_2C_2}}{s^2 + s(\frac{1}{R_2C_2} + \frac{1}{R_1C_2}) + \frac{1}{R_1C_1R_2C_2} } \$
AI: Well, we have the following circuit:
simulate this circuit – Schematic created using CircuitLab
Using KCL, we can write:
$$
\begin{cases}
\text{I}_{\text{R}_1}+\text{I}_{\text{C}_2}=\text{I}_{\text{R}_2}\\
\\
\text{I}_{\text{R}_2}=\text{I}_{\text{C}_1}
\end{cases}\tag1
$$
Using KVL, we can write:
$$
\begin{cases}
\text{I}_{\text{R}_1}=\frac{\text{V}_\text{in}-\text{V}_1}{\text{R}_1}\\
\\
\text{I}_{\text{R}_2}=\frac{\text{V}_1-\text{V}_+}{\text{R}_2}\\
\\
\text{I}_{\text{C}_1}=\frac{\text{V}_+}{\left(\frac{1}{\text{sC}_1}\right)}=\text{V}_+\cdot\text{sC}_1\\
\\
\text{I}_{\text{C}_2}=\frac{\text{V}_--\text{V}_1}{\left(\frac{1}{\text{sC}_2}\right)}=\left(\text{V}_--\text{V}_1\right)\cdot\text{sC}_2=\left(\text{V}_\text{out}-\text{V}_1\right)\cdot\text{sC}_2
\end{cases}\tag2
$$
Substituting \$(2)\$ into \$(1)\$, we get:
$$
\begin{cases}
\frac{\text{V}_\text{in}-\text{V}_1}{\text{R}_1}+\left(\text{V}_\text{out}-\text{V}_1\right)\cdot\text{sC}_2=\frac{\text{V}_1-\text{V}_+}{\text{R}_2}\\
\\
\frac{\text{V}_1-\text{V}_+}{\text{R}_2}=\text{V}_+\cdot\text{sC}_1
\end{cases}\tag3
$$
Now, in the ideal opamp circuit, we know that \$\text{V}_+=\text{V}_-=\text{V}_\text{out}\$. So we get:
$$
\begin{cases}
\frac{\text{V}_\text{in}-\text{V}_1}{\text{R}_1}+\left(\text{V}_\text{out}-\text{V}_1\right)\cdot\text{sC}_2=\frac{\text{V}_1-\text{V}_\text{out}}{\text{R}_2}\\
\\
\frac{\text{V}_1-\text{V}_\text{out}}{\text{R}_2}=\text{V}_\text{out}\cdot\text{sC}_1
\end{cases}\tag4
$$
So, we get:
$$\mathcal{H}\left(\text{s}\right):=\frac{\text{V}_\text{out}\left(\text{s}\right)}{\text{V}_\text{in}\left(\text{s}\right)}=\frac{1}{\text{R}_1\text{R}_2\text{C}_1\text{C}_2\text{s}^2+\text{C}_1\left(\text{R}_1+\text{R}_2\right)\text{s}+1}\tag5$$
|
H: Converting single-phase to three-phase for City & Guilds 2391 practical
For my City and Guilds 2391 course, I will be testing a three-phase distribution board with a motor and single-phase sub-main.
I am finding it hard to memorize the test procedures. So for me it's about repetition, but naturally I don't have a three-phase supply at home.
I want to buy a Clarke PC 60 three-phase converter (instruction manual). Now AFAIK for the single-phase sub-main to work, I would require a neutral because single-phase loads aren't balanced or something like that. It's been a while since I studied three-phase theory.
The converter only has a 4 pin TP and earth plug, so no neutral. I just wanted to check with people more knowledgeable, can I just run a neutral separately from the wall socket feeding the converter? I don't see why not, because it's the same supply.
I might even be able to do it internally for a cleaner install, but I have to return the converter afterwards so I can't be taking it apart.
AI: L1 of the 230V source is connected to L1 of the 400V output. Therefore you will get 230V between L1 of the 400V output and the source neutral. Loads connected between L2 and L3 of the output and neutral will be supplied with 400V. I suspect that will prevent a proper test of the distribution board, but I know nothing of the board or the test.
|
H: How does ohm's law for capacitors affect this scenario?
Ohm's law for capacitors is i = C dv/dt
simulate this circuit – Schematic created using CircuitLab
Clearly there's a zero change in voltage across C1 always, but since C1 is a capacitor, it can hold charge and the current is not zero.
AI: The fact of the matter is that both ends of C1 are connected to the same equivalent node (shorted). At steady-state, there is certainly no current flow, because there is no difference in potential on either side of C1.
To make this more clear: You cited i = C dv/dt. "dv" means difference/change in voltage. But there cannot be a difference in voltage if both ends of C1 are the same equivalent node with 0Ω between.
If there were a charge on C1 before both ends were shorted, then upon shorting, the current would flow (but with theoretical 0 Ω wire, the drain would would be instantaneous / infinite current).
|
H: How is powering an LED with a 9 volt battery possible without burning the LED?
I used a 220 ohm resistor with a 9V battery and the LED works fine. However, most sources say the forward voltage in a red LED is typically only ~2 volts. Going by this logic, the LED should have burned out, as resistors only limit current not voltage. If this is a stupid question, I’m sorry. I’m relatively new at electronics.
AI: Using a battery that is not brand new so its loaded voltage is 8.0V and using a 3.2V blue LED, then the current is (8V - 3.2V)/220 ohms= 21.8mA. No problem when most 5mm blue LEDs have a maximum continuous current of 30mA.
|
H: Identify component in 1970s vintage video game from photo
Can anyone identify these two components, marked "SKY 4433" and "2.000000 K.D.S", respecitvely? Are they capacitors, crystals, or something else?
They are from a vintage 1970s ball-and-paddle-style video game (Parat Game by Technigraph) based around the AY-3-8500 chip.
AI: Both are crystals. 4.433 MHz is for PAL subcarrier and 2.0 MHz for something else like CPU.
|
H: Pitch of FPC connector
I need to interface a display which has an FPC connector. I'm a bit confused as to what is the pin pitch. The datasheet's drawing is a bit confusing because the dimension lines are a bit off-centered with regards to the pin's midpoint. If someone could help me out, that'd be great.
Datasheet of display
AI: I coloured the pins the make the picture a bit more clear.
0.5p*(33-1)=16 is indeed referring to the pitch.
The measure is taken from the middle of the 1st pin to the the middle of the 33rd pin (first hint).
The centre line is nicely(1) draw in the middle of the middle pin, pin 17 (second hint).
The drawing is written in mm, so:
0.5p * (33 pin positions - 1) = 16 mm
Since the pin positions are dimensionless, 0.5p must have the dimension mm (third hint).
So, based on the centre lines and units, I am quite positive they mean:
0.5 mm_pitch * (33 pin positions - 1) = 16 mm
The pin's width is 0.30 mm (I think that's where the 'w' stands for, (fourth hint) and the pin's height is 3.00 mm (plus shown tolerances).
This pin's width of 0.30 mm with the pin's pitch of 0.50 mm also makes sense (fifth hint): it leaves a 0.20 mm clearance between the pins.
The left measure "0.50 mm ± 0.10 mm" is the distance of the centre of pin 1 with respect to the left edge of the PCB, so, it is not referring to the pitch size (sixth hint).
Based on these 6 hints, I am quite positive the pitch is 0.5 mm
(1) I agree: not perfectly, but I think clear enough.
|
H: GND arriving to the wrong pin of this chip on my PCB
I had originally done a PCB for another chip. All pins I'm using (1, 2, 3, 17, 18, 19, 20) are fortunately correct for the ATtiny4313 I'm now using, except GND that arrives on pin #4 of my PCB ... instead of pin #10!
An option for my prototype PCB (I don't want to throw them away) would be to use a small wire between GND and pin #10.
Question: just for learning purposes, would you see another clever option that wouldn't require a wire?
Would something like doing digitalWrite(4, LOW); or analogWrite(4, 0); work and internally wire pin #4 to GND i.e. pin #10? Or wouldn't it work because the ATtiny won't boot first if no GND is connected?
AI: Given you likely aren't running at high speed (100+MHz), a simple "bodge wire" to connect pins 4 and 10 would work reasonably well.
Just make sure that in your code you always leave pin 4 as an input (preferably with pull-up disabled to save power).
I wouldn't do this on a production board, but for a prototype it will be fine.
Regarding your last point, no, you can't just set the pin to be output low to make the connection, because all pins are high-z by default, so the chip likely won't turn on.
|
H: Purpose of an Electronic Speed Controller(ESC)
I need to implement a brushless dc motor and I know the motor needs to need constant control to ensure that consistent torque is applied to the rotor.
What control does the ESC provide and what control is up to the engineer?
(I will be using scalar control) My understanding is that the engineer determines at what time power needs to be applied to ensure maximum torque while the ESC manages the flow of current to its respective coils. I know that a sensored motor uses the Hall effect to provide info on the rotors position, so I assume I can provide microcontroller to read the hall sensor input and then determine the angular speed of the rotor, but I feel this isn’t very robust.
Is there an easier way to approach this problem?
AI: An ESC (Electronic Speed Control) is a device that accepts "user" inputs and controls the operation of a BLDCM (Brushless DC Motor). What that amounts to depends on the ESC concerned. It might be as simple as an on off fixed speed controller, a somewhat more complex unit with variable speed control, and/or constant power and/or torque, dynamic braking with energy recovery, require Hall sensors, or allow sensorless operation, .... . There are a vast number of off-the-shelf ESCs available, and a number of open source ESCs that allow you to decide where the boundaries lie between the ESC and the system driving it.
You can probably learn all you wish to know (and more) about where an ESC fits into the overall control scheme from the widely used Open Source ESC project "VESC" by Benjamin Vedder. It has grown / forked / become a team effort over time and you may be able to find what you want in the earlier versions.
January 2016 update VESC page by Benjamin here
E-Motion VESC project - with many many bells and whistles here
Worth a look despite being some years since update.
Blue Robotics Blue-ESC and many other interesting projects here
Has the good and bad feature of using discrete FETs as motor drivers.
A SimonK firmware based ESC
firmware
Betaflight-ESC
Circuit maker page for
Github Beta-flight ESC - current
$10 DIY ESC intro video here
RC Groups related page here
'Simple Projects' sensorless ESC Sensorless BLDC motor controller using PIC18F4550 microcontroller and here
Other:
Paparazzi open source auto pilo ESC page here
Brief but useful 2019 discussion here
Legion
|
H: Memory Boundaries in SRAM
I am trying to use the GPDMA which is present in LPC43XX parts.
The UM10503 data sheet constantly warns about memory boundaries (datasheet section 21): basically it says that you don't want to try a burst across a memory boundary otherwise "the transfer will be split into two AHB transactions".
The problem is that I don't understand what these memory boundaries are.
Here's some information (datasheet section 3):
RAM sections:
Memory Map
Are the memory boundaries those solid lines? If so, they seem to be too wide for me.
Any hint?
AI: You can find this in the ARM AMBA 5 AHB Protocol Specification, section 3.5:
Masters must not attempt to start an incrementing burst that crosses a 1KB address boundary.
Note that in the AXI specification they changed this to a 4K boundary
|
H: How to calculate a lithium-ion battery's discharge time at a specific load?
How do i calculate the discharge time for an lithium-ion battery at a specific load?
Let's say i have a lithium-ion battery with a nominal voltage of 3.7 V, a cut off voltage of 3.0 V and a nominal capacity of 450 mAH. The battery is discharged with a load of let's say 20µA.
Now i want to know how long it theoretically takes until the battery is discharged. Can I use the formula discharge time = capacity(mAh)/load(mA) as for (NiMH-) batteries?
Thanks in advance.
AI: The formula you quoted is a good approximation. It ignores a lot of things that will reduce the effective capacity, but it will give you an upper limit on the run time.
Given a steady discharge rate of 20uA, you are getting into an area where you need to consider the self discharge of the battery.
Over the theoretical 90 days your example battery would run with a load of 20uA, it would lose maybe 10% of its charge due to self discharge. That reduces your run time by maybe 9 or 10 days.
|
H: Accurate signal reconstruction
While reading through this page I came across following info:
"For accurate reconstruction using sin (x)/x interpolation, your oscilloscope should have a sample rate at least 2.5 times the highest frequency component of your signal. Using linear interpolation, the sample rate should be at least 10 times the highest frequency signal component."
I could not understand why is there so big difference in sampling rate if the interpolation type is changed from one to the other?
AI: sin(x)/x or sinc is the function of the ideal low pass filter.
Your scope has a sharp cutoff at f/2 (at least you are prentending that), and using the ideal low pass filter for interpolation then gives you a result better matching the characteristics of that ideal scope than linear interpolation.
Or in short: with sinc, you at least don't see such artifacts as straight lines where there should be distortion.
|
H: Excitation of a resonant cavity
let's consider this picture in which a cylindrical resonant cavity is excited through a waveguide.
I have some questions:
1) Why is it called "Magnetic Coupling"? I thought this excitation simply was the propagation (through the slot) of the wave already present in the waveguide towards the resonant cavity
2) Why is there a magnetic loop in the last two pictures? what are its terminals connected to? Should be present also in the first two pictures?
Reference: here.
AI: It is called magnetic coupling because the field that is present at the slot into the waveguide is primarily via the magnetic field. There may be some energy coupled into the resonator by the E-field, but it will be significantly less than energy coupled by the magnetic field.
Look at the heading for the bottom two pictures. There are loops in the bottom two pictures because that's about how you magnetically couple a coaxial cable to a resonator, it's no longer about coupling a resonator to a waveguide.
Look at the two pictures on the bottom, that show that the loop is connected to the center conductor and shield of the coax.
|
H: Mismatch on string of resistors for DC bus voltage sensing
In the picture below, you can see a string of 10 resistors used for DC bus voltage sensing. I think that the blue resistors (the original ones) are 400k/1W. The colors are: yellow, black, black, orange. One of the resistors got open, and I replaced it with the one you see different in the string, the one in the red circle. It's a 390k/1W resistor. The equipment worked well for a couple of hours, then the resistor in the white circle got open.
Do you think the new resistor could have affected the string so that a new resistor got damaged?
I think we have a variation of 10k in the string with the addition of a 390k, which leads to increase the current.
AI: Do you think the new resistor could have affected the string so that a
new resistor got damaged?
I doubt it, the resistor strings look like they're part of different circuits. If the resistor did open, then it was most likely from heat. Each string appears to share the same trace (it looks like in each string the resistors are in series and each string is independent). This means each string has 5 resistors in series. If the resistors are in series and the same value, they should have mostly the same voltage across them and dissipate the same power.
If they died a heat death, then it could have been almost any resistor in the string, if the strings are independent then there is no relation between the death of the resistor circled in white or red.
|
H: How to interpret the FFT of the mains voltage in this case?
I coupled the 230Vrms AC mains voltage to a scope channel through a 10Vpk-pk step-down transformer. I can imagine the transformer will already filter high freq. noise but I thought I can still see some spectrum for at least narrower bandwidth. So then I saved the time series data using the scope's SAVE function. The scope apparently sampled the input with 250kHz sampling rate.
Here is the time series data plotted in Python:
Here is the FFT:
And below is the zoomed view of the FFT where the horizontal axis is set to linear:
(left-click to zoom the view)
Regarding the last spectrum I have the following questions:
I marked the harmonics of the fundamental 50Hz in red color. As you
see the highest harmonics are at 150Hz, 350Hz, 550Hz, 750Hz. These
are the 3rd, 7th, 11th and 15th harmonics. Is that order of
significant harmonics something common in the world or
completely random?
I marked the highest non-harmonic FFT components after 50Hz in
green. They are 60Hz, 70Hz, 80Hz so on. I'm confused here because I
thought the real distortion in mains would come from the harmonics.
But here there are 60Hz, 70Hz, 80Hz ect. whose amplitudes' are
greater than the harmonics. What could these be? Am I interpreting
something wrong here?
AI: I marked the harmonics of the fundamental 50Hz in red color. As you
see the highest harmonics are at 150Hz, 350Hz, 550Hz, 750Hz. These are
the 3rd, 7th, 11th and 15th harmonics. Is that order of significant
harmonics something common in the world or completely random?
They are common and are generated from transformers and other components
Complex waveforms are generated by common electrical devices such as
iron-cored inductors, switching transformers, electronic ballasts in
fluorescent lights and other such heavily inductive loads as well as
the output voltage and current waveforms of AC alternators, generators
and other such electrical machines. The result is that the current
waveform may not be sinusoidal even though the voltage waveform is
Source: https://www.electronics-tutorials.ws/accircuits/harmonics.html
.
I marked the highest non-harmonic FFT components after 50Hz in green.
They are 60Hz, 70Hz, 80Hz so on. I'm confused here because I thought
the real distortion in mains would come from the harmonics. But here
there are 60Hz, 70Hz, 80Hz ect. whose amplitudes' are greater than the
harmonics. What could these be? Am I interpreting something wrong
here?
No, they are not really peaks, just part of the 50Hz signal with noise. In an ideal world, with perfect sine waves if we took the FFT it would look like a spike (or dirac delta function if you want to get technical). Because the real world is noisy, with phase and amplitude noise, when we observe noisy sine waves. The difference looks like this and is also common:
Source: http://www.dilettantesdictionary.org/index.php?search=1&searchtxt=modulation
|
H: How to calculate the voltage across Va and Vb?
Attached is the circuit I have been analyzing.
Here the intention is to calculate the voltage across V_A and V_B - (See the red colored letters in the circuit diagram.)
I have calculated V_R1 using Kirchhoff's voltage law as follows,
Edit
I have taken voltage across V_A and V_B as follows,
Can anyone verify the calculation.
AI: The situation is very simple:
Because we know that the voltage at point A is 7 volts higher than the voltage at point C. And also That the voltage at point B is 1.8V higher than the voltage at point C.
Therefore we can easily find the V_AB voltage.
Can you do it?
|
H: Is there a more efficient alternative to pull down resistors?
I am building a LED spinner circuit and I am at the point of optimizing it. The whole circuit itself only draws about 10-20mA max. I was today looking at this part of the circuit:
Now as you can see, when my switch is at position 5, it turns the circuit off. But, now when my circuit is off, there is still current flowing through the pull down resistor, draining the battery. I know this is a very small current, but I was wondering if there was a way to make this switch so that it does not draw any current when switched off.
Edit:
I should have maybe put the whole circuit in.
AI: Note that the current is wasted regardless of whether the circuit is "on" or "off" — when it is "on" the voltage drop across R11 is only slightly less than when it is "off".
Using a PMOS transistor instead of the PNP would mean that the pulldown resistor could be on the order of megohms, reducing the "leakage" current to microamps.
Or you could use a different strategy altogether, eliminating the off-state current entirely:
simulate this circuit – Schematic created using CircuitLab
Better still, combine both ideas and get minimal wasted current in the on-state, too:
simulate this circuit
|
H: How to connect CPU with RGMII pins to an LTE module that takes only SGMII signals?
The Hi3519 Hisilicon CPU has RGMII pins. We are trying to connect it to the EC21 LTE Module from Quectel which contains SGMII pins. Would using two Realtek RTL8201F-VB-GG PHY chips with magnetics between them work as shown below?
EC21 (SGMII pins) <--> RTL8211DN PHY <--> MAGNETIC <--> RTL8211DN PHY <--> MAC Hi3559A (RGMII pins)
Can the PMD pins be connected directly without the magnetics? We are very limited in space so we not sure if a transformer can fit with in the design. Are there any other ways to convert between SGMII and RGMII? Thank you in advance for the help.
Edit: I just read up on the Reaktek app note and it suggest ideas on capacitive coupling to go magnetic-less: Youtronics App Note
RTL8208B supports SMII, can I use two of those PHY and connect them as shown below with capacitive coupling instead of using a transformer to save space? The new connections would be:
EC21 (SGMII pins) <--> RTL8208B PHY <--> capacitive coupling <--> RTL8208B PHY <--> MAC Hi3559A (RGMII pins)
AI: Serial requires transceivers and restructuring of the serial data to slower parallel data streams, which means you need logic.
An Marvell Alaska 88E1512 might work, it claims you can go from SGMII to RGMII.
EC21 (SGMII pins)<--> 88E1512 <--> Hi3559A (RGMII pins)
Which is a lot simpler than using two phys to translate.
Source: https://www.marvell.com/transceivers/assets/Alaska_88E1512-001_product_brief.pdf
|
H: Determining when a serial connection is opened
I have a PIC24FJ MCU with an FT232RL USB to UART controller. My design has end users opening a serial connection to my MCU to set parameters and get debug information.
My question is: How can I tell when the end user has opened screen/PuTTY/etc to my device's COM port?
From what I have read, the DTR signal is not a good way to go about this as the OS decides when to raise DTR.
My use case is that I would like to display a banner with help commands as soon as the COM port is opened.
AI: You are correct that DTR can be overridden by OS, but in practice, it is actually a pretty good indicator. And in Linux, it is pretty hard to disable [0].
If you have USB support in your chip, you can implement CDC class serial device natively. This usually does not require any drivers, and gives you full information, including when the port is open. Once very nice property in using on-chip CDC implementation (as opposed to external FTDI chip), is that you can ignore baudrate completely -- so user will be able to talk to your device no matter which speed they choose in putty settings.
[0] https://unix.stackexchange.com/questions/446088/how-to-prevent-dtr-on-open-for-cdc-acm
|
H: Why is the initial current in this capacitor not continuous?
I am working on this circuit:
Basically, \$V_1\$ is on all the time, and \$V_2\$ turns on at \$t=0\$. For the conditions at \$t=0^-\$ (the time just before zero), I can see why the voltage across the capacitor is equal to \$V_1\$. The current through the resistor at \$t=0^-\$ is zero, as no current would flow.
After the second voltage source turns on, my sources tell me that the current flowing through \$C\$ is equal to \$V_2 / R_2 \$. That is, the current instantaneously goes from 0 to \$V_2 / R_2 \$ at \$t=0\$.
What is going on here?
AI: At \$t=0^{-}\$ the current in the capacitor is zero, since it's an open circuit when only DC voltages are applied in the circuit.
At \$t=0\$, \$V_2\$ comes in, and so does the current through the capacitor, which is now \$\frac{V_2 - V_1}{R_2}\$ since at \$t=0\$ no current flows through the inductor branch.
Finally, remember that the capacitor current can change instantaneously, it's its voltage that cannot.
|
H: How to control contactors with sequenced time delays
Updated schematic to correctly reflect what I wrote below...
I’ve had to add more functionality:
Top left: The linear regulator has been replaced by a LM2575-5. This will be the HV variant with a Vmax of 60v. The Diode is a Shottky, not a Zener as shown.
Bottom left: Simplified the XOR transition detector to only one Schmitt inverter per leg, by using inverted output of bi-stable to drive one side of XORs.
Bottom right: Added a relay to soft-switch the pump off (Pump OFF), so it isn’t running during supply changes.
Middle right: The two RC/Inverter pairs after each bi-stable are to add an initial delay before any switching takes place. I want to have a further delay between switching off one supply (Solar) and switching on another (Battery), using two separate contactors. The 3 NOR gates act as an AND. The last inverter is there so that the default supply (Solar) is from the NC relay contacts, so current is minimized – no relays energized in normal operations.
Bottom right: This new relay controls a soft-switch (Enable Batt Ops/Using Batts) on the pump telling it whether it is running from Solar (MPPT enabled) or Batteries (separate under-voltage functionality enabled).
I’ve included a timing/state diagram (SX rotated it and I couldn't figure out how to correct) to show how it should work.
Does this all look OK? I don’t care about the unlabeled switch functionality.
I have a further question:
As shown, the “Enable Batt Ops/Using Batts” relay switches on Delta #1 after the switch selects Batts and off Delta #1 after the switch selects Solar as the power source for the pump.
The pump senses the state of this relay on a POR. So I’d like it to go high when the “Supply from Batts” relay closes, and to go low when the “Supply from PV (Solar)” relay opens, as shown in Red in the timing diagram, i.e. each time a new supply source is connected.
I could add another RC stage for this relay to extend the delay to be slightly less than Delta #2. Is there a simple way to switch it based on the supply transitions?
====
I’m looking for some help reviewing and simplifying the circuit shown.
It’s to control a pump that can be powered from 3 different sources (Solar PV, Genny, Batteries - but not that relevant to the design, correct voltages taken care off). The pump has a remote on/off switch activated by shorting between two terminals. The purpose of this circuit is to always power the pump down before switching supply, so that the load is minimal. This reduces DC arcing in the contactors, and keeps the pump happy. I have 24V DC (coil) contactors that will be controlled by the relays shown.
The component values shown are simply what the schematic package defaulted to, ignore them.
At the top left is a separate battery under-voltage disconnect circuit, using an NE555. Battery voltage (44-48V) is on the left. The outputs on the right go to a contactor that switches the battery off if the input voltage drops too low. The two resistor voltage dividers are set to provide hysteresis.
The two switches on the left select either Solar, else Genny or Batteries. I’ve used an S-R latch to eliminate any switch bounce. They each have an RC delay stage (say 2 secs) driving a relay (that then drives a contactor, not shown). I’ve seen people use two Schmitt inverters – for hysteresis – to ensure a positive switching action at the relay. But given the S-R latch, do I need these?
It’s been a very long time since I looked at a transistor, and the world has moved on. Can anyone suggest a general purpose NPN device to drive a 5V relay coil? Or would a MOSFET be better?
The two XOR gates at the bottom act as a transition/edge detector. Any time either of the two switches changes states, this circuit energises a relay whose contacts are connected to the remote switch on the pump. The RC delay will be around 4 secs, to give a 4 sec positive pulse output on any edge change.
So, if a switch is pressed, the pump will immediately be commanded to switch off. 2 seconds later the selected contactor will switch output, and a new power source connected. 2 seconds later the pump will be released and start again.
As noted I don’t think I need the Schmitt inverters, but would like to know if there is any reason why not.
What’s the best way to create a single OR gate (there are two spare XOR gates available) instead of using a 7432? Perhaps just a couple of diodes?
I’d welcome any thoughts on the circuit - can it be improved and/or simplified?
AI: 44V is kind of high for a 7805, the voltage divider for the 555 input only needs 3 resistors not 4
I don’t think I need the Schmitt inverters,
the whole thing is a mix of analogue and digital, schmitt inverters behave well with analogue inputs, if you were to connect directly to the transistors there would be a period where the transistor was not not saturated and it would get quite hot, and possibly fail closed.
You don't need that many schmitt inverters, use the inverted signal from bistable to feed the the R-C delay then you only need one instead of two.
at the bottom put the schmitt inverters after the R-Cs not after the OR.
or re-design to use 74HC7014 (schmitt buffer).
the whole thing is critically reliant on the capacitors for timing, so use quality parts and all from the same batch.
a diode or will work fine, or even a resistor or: just use two base resistors one for each input, the base when high is only about 0.7V so a low XOR output won't steal much of the current that a high one will supply.
XOR is a bit of a funny beast the only other gates it can be used to build are wider XORs , buffers and inverters, it can't make an AND or an OR.
With TTL you can short outputs together to get an AND, but that will not work with CMOS
|
H: Transmission Line Mismatch Simulation
I found an interesting simulator for transmission Lines. I can set a precise value for the load and then see what happens. For instance, let's suppose Z0 = 50 Ohm and let's consider these cases:
1) (almost) Open Line (the simulator allows at max 10000 Ohm for a load)
In this case there is total reflection, and the total voltage wave is a standing wave and, if I understood correctly, it is that in red.
2) (almost) Shorted Line (the simulator allows a minimum value of 0.1 Ohm)
Also in this case there is total reflection.
3) Line "slightly" mismatched (with a load of 100 Ohm)
In this case there is a partial reflection.
4) Line matched
In this case there is not reflection.
My questions are:
What do the red and green arrows represent? Why do they have those orientations?
In 3), where there is little reflection, is the total voltage wave a standing wave?
In 4), why is the red line completely flat? I think that in this case the total voltage wave is purely progressive (V+(z)), so it should be a sinusoidal wave, in my opinion.
In 4), why only green arrows?
What are the impedance's values Z1,...,Z7 in each picture?
The simulator has been taken from here, the direct link is here.
AI: What do the red and green arrows represent?
Green is the forward travelling wave. Red is the reverse travelling wave.
The length of the arrow indicates the amplitude, and its angle of rotation around the axis represents its phase at each point along the line.
From the way they relate to each other at the terminations, we can tell the arrows must represent the voltage wave rather than the current wave.
Why do they have those orientations?
I suspect the orientation of the arrows relative to the direction of propagation is meant to represent the phase of each wave (forward and reverse travelling) at each point.
In 3), where there is little reflection, is the total voltage wave a standing wave?
The standing wave is the superposition of the forward and reverse travelling waves.
In 4), why is the red line completely flat?
Because there is only the forward travelling wave, its amplitude is the same at all points along the line.
In 4), why only green arrows?
Because red arrows represent the reverse travelling wave, and since the termination is a perfect match there's no reverse travelling wave.
What are the impedance's values Z1,...,Z7 in each picture?
I suspect they are the impedance looking into the line at each of the points labelled Z1, Z2, etc., in the diagrams.
Okay, I want to go back to one of your assumptions before you enumerated your specific questions,
In this case there is total reflection, and the total voltage wave is a standing wave and, if I understood correctly, it is that in red.
If I have interpreted it correctly, red represents the reverse travelling wave (which I deduce because there are no red arrows when the termination is well matched).
The standing wave is the superposition of the forward and reverse travelling waves, not the reverse travelling wave on its own.
|
H: PCB strip from manufacturer
When we manufacture certain PCBs, where 50ohms impedance matching is required the manufacturer provides a small PCB strip along with the actual PCB. What is the actual purpose of this?
AI: To verify that the matched impedance is in fact 50 ohms.
You can use a network analyzer or Time domain reflectometer (TDR) to measure the impedance.
I'm not quite sure about this, but it might be possible to use a spectrum analyzer with build-in tracking generator to get an idea about the impedance. The phase information will be missing thou.
|
H: How is the Collector-Base region reverse biased in Common Collector configuration of BJT?
This is the circuit diagram of an n-p-n BJT in Common Collector configuration, taken from the book :-
I know that for the transistor to operate in active mode :-
the Emitter-Base junction should be forward biased.
the Collector-Base junction should be reverse biased.
By looking at the diagram, I can see that the Emitter-Base junction is forward biased. But I am unable to understand how the Collector-Base junction is reverse biased, since the Base is connected to the +ve terminal of VBB and the collector is at zero potential ( looks like forward biased to me ) .
AI: You are right; the diagram is wrong. With the polarity of VBB as shown, both junctions are forward biased — the BC junction by VBB alone, and the BE junction by the sum of VBB and VEE. There is no "transistor action"; they're just wasting power as heat. Redrawing the schematic to show the relative voltages makes this a little clearer:
simulate this circuit – Schematic created using CircuitLab
For the transistor to be in active mode, the sign of VBB would have to be reversed. Note that this means that current would be flowing "backward" through the VBB supply. If it really is a battery, it would be getting charged by the VEE supply.
Normally, you would draw the common-collector circuit with the collector as being the most positive point in the circuit:
simulate this circuit
|
H: Does a robotic lawn mower sense that it is outside the perimeter wire? If so, how?
I have a robotic lawn mower. Sometimes if the grass is really slippery, the lawn mower can slide outside of the perimeter wire. When that happens, the lawn mower shuts down and I get a notification on my phone. The notification says that the mower is outside of its wire.
Does the lawn mower really have sensors that can distinguish whether the movwer is inside or outside the perimeter? Or does it only assume that it is outside, since it has crossed the perimeter wire once (and only once)?
How does the lawn mower know that it is outside of the perimeter wire?
AI: Expanding my comment into a tentative answer.
There is a low power radio transmission system called the "inductive loop" which uses a large loop of wire as an antenna. It provides good signal strength within the loop, and virtually none outside.
This allows induction loops to provide radio coverage e.g. within a building such as a concert hall or theatre or hospital with virtually no interference to other spectrum users outside the building. One common use is to help hearing aid users at the theatre.
But its characteristics are just about ideal for confining a robot within a space defined by a perimeter wire. Transmit a simple code at low power. If the robot loses the signal, it must stop. Simple as that.
Now I don't know if any specific lawnmower uses this system, but it's the most obvious candidate.
|
H: What does Ch-Ch isolation stand for regarding this context?
This scope specs mention the following inputs:
I don't understand what meant by channel to channel isolation here. I made a continuity test and the input grounds of two channels are connected. I thought Ch-Ch isolation meant the input channels' grounds are isolated but obviously that's not the case. But then what could be meant by Ch-Ch isolation here?
AI: I don't understand what meant by channel to channel isolation here
"Isolation" means that a signal on channel 1 won't appear on the trace for channel 2 or vice versa. It doesn't mean that the signal input connections for channel 1 and channel 2 are isolated (although on some equipment this may be so).
An isolation of 100:1 likely means that a 1 volt signal on channel 1 might produce a 10 mV signal on the trace of channel 2.
|
H: Beginner - Why do voltage/current behave this way
I was checking falstad and came around this resistor circuit which lost me completely :
Knowing that input voltage is 5v and current is 17mA :
1- Why is the voltage 0 after the 200Ohm resistor knowing that It's 3.4V before It ?
2- Why is the current flowing without voltage ? (here is the animation for those interested
3- When the current arrives at the first junction, 15mA take the first route, and 2mA take the 2nd route, why is that ?
4- Check this 2nd circuit :
Why closing the right bottom switch drops the voltage to 0 after the 100/400/800 resistors ?
AI: The voltage is zero after the resistor because you have defined it to be zero -- it is the circuit common (or ground).
If you are talking about the RLC circuit on the front page, it is because the L and C are energy storage elements that are charged by the voltage source before the start of the simulation. The simulation begins at the opening of the switch.
It is a parallel circuit. The current is inversely proportional to the resistance/impedance of each branch.
The lower right switch is shorting out the 200 ohm resistor, making the voltage difference across it zero.
|
H: Can two Radar motion sensor, running next to each other, result a false detection?
I have two CDM324 Radar motion sensors.
I want to run the two sensors close to each other.
The transmitted frequency is roughly 24 GHz and I am afraid that a small shift in one sensor transmitted frequency could enter the received path of the other sensor and it can be interpreted as a reflected signal (motion) even if there is no motion at all.
For example: the first and second sensor transmit at 24,000,100 Hz, 24,000.000 Hz, respectively. The second sensor can detect a doppler frequency of 100 Hz even if there is no motion.
I run the two sensors next to each other and I have no interference at all. Is it a chance? Could an interference happen? A false detection would be a problem for me?
AI: A CDM324 module is a very simple device.
There isn't even a crystal or any other component on the board (see here) which takes care that the 24 GHz frequency is accurate. So the frequency will not be accurate. That means that the module will need to work over a wide frequency range. That also means that any other device within range operating at 24 GHz or a frequency close to 24 GHz can disturb this device.
Your only chance is that two modules are using such a significantly different frequency (like 23.5 GHz and 24.5 GHz) that the frequency difference is so large that this cannot be picked up by the boards.
But there is no guarantee that two (randomly selected) modules will have such significantly different frequencies that this will work.
The safest option is to only use one board at any moment (time-share).
|
H: How to decipher capacitor markings
yet another noob here. answer is probably obvious for most but not for me really. Just wondering how to interpret markings on these capacitors (red circles)
ps. first lesson learnt :)
AI: Take a clue from the black silkscreen painted on the printed circuit board surface:
C as in C20 is some kind of capacitor. Most of those you've circled are not polarized and could be mounted either way.
R denotes a resistor - can be mounted either way.
T denotes a transistor, additional silkscreen show "E"(emitter), "B"(base), "C"(collector)
D denotes a diode. A silkscreen diode symbol shows which direction the cathode points.
The numbers following each letter allow multiple resistors to be uniquely identified...a schematic diagram would also show this letter followed by a number, and most often its value.
An example might be C4 220n...This is a capacitor, value 220 nanofarads. The silkscreen doesn't show the value, whereas the schematic diagram should.
|
H: Flash in MCCB when switched off
Recently I switched off several molded case circuit breaker (MCCB) and saw a flash at the back of the breaker for an instant. This happened to all the MCCB on-site (around 14). The MCCB are all rated correctly - 200A capacity with a feed in peak load of 145A.
Is this perfectly normal? My knowledge tells me that the flash is a normal occurrence because I am breaking the circuit at a high current (probably around 100A), hence, the breaker had a flash as it is breaking the circuit contact (which is intended I suppose).
Thank you.
AI: Yes, it's normal.
But keep in mind that circuit breakers are not intended to be used as power switches. They should only be operated when the load current has been stopped by other means. They are designed to reliably interrupt on an overload, but every time they do so, the arc causes erosion of the contact surfaces that increases their resistance.
|
H: Fourier Coefficients
I have no idea how to solve the following exercise, can you help me, please?
Find the periodic function whose Fourier coefficients are
$$C_{k} = \frac{sin^{2}(\pi k T)}{(\pi k T)^{2}}$$
I think that this function is a definition of sinc ...
AI: Note that \$\text{sinc}\,{\pi k T} = \frac{\sin{\pi kT}}{\pi k T} \$. The inverse fourier transform of this is a box.
Note further that your frequency-domain expression is precisely \$\text{sinc}\,{\pi k T} \cdot \text{sinc}\,{\pi k T} \$. Furthermore, note that multiplication in the frequency domain is the same as convolution in the time domain; the convolution of a box with itself is a triangular pulse. This should suffice as a starting point toward solving the problem; computing the box/triangle support and normalization is left to the reader so as to avoid doing your exercise in its entirety for you.
|
H: Transformer and Rectification confusing
I've been taught that a transformer only works with AC, however I see that in power converters, it is rectified to a DC voltage before going to the transformer. How does that work?
If the rectified AC waveform is now DC, how does it pass through the transformer? Is the rectified signal still good enough for the transformer, because it still has a fluctuating component in it, just not negative anymore?
So for example, if I have a 230V mains (with 10% fluctuation) going into my rectifier, the output DC level will range from 293V to 358V. Is this fluctuation/AC component good enough to pass through the transformer?
AI: The rectified mains frequency isn't fed directly into the transformer, but the transformer rather forms the core of a switching power supply.
The size of a transformer is largely dictated by two things: How much power it handles, and how high the frequency of the AC is. Higher power and lower frequency transformers are physically larger and thus more expensive.
Assuming you have some fixed load, you can't do much to reduce the amount of power it has to handle, but of course you want to make your device as cheap as possible—so you increase the frequency. The way this is done is by first rectifying the AC to DC, then using some control circuitry and at least one power transistor to alternatingly apply Vdc and 0V to the transformer at a high frequency; a few dozen kHz or even a few MHz. Since your transformer is now dealing with high-frequency AC instead of low-frequency 50/60 Hz mains, it can be much, much smaller for the same amount of power.
It's the high frequency switching that is important here, not the mains frequency ripple. As far as the transformer is concerned, that ripple is "basically DC" since the transformer is designed to operate at much higher frequencies.
|
H: Stable state and don't care
I have a latch but I can't understand what are the meaning of Un/Stable state and "don't care".
I found a reference about the definition of the state, but I didn't understand that fluently.
I try to understand these questions:
Statemanet A: while Q2=1, Q1=0 we get stable state.
but why?
Statemanet B: while A=1, B=0 we get "don't care" situation.
but why?
And then I understand that i don't really understand what exactly the meaning.
I made a truth table:
But still, im not sure I understand the conclusion
AI: You can't say that you have a stable state just because Q2=1 and Q1=0...you must also specify that values of the inputs. You need to assume that Q2 and Q1 have a particular value and then consider specific values of the inputs. If you propagate the assumed Q2 and Q1 as well as the specified input values and determine that the actual value of Q2 and Q1 is the same as your assumed value, then you have identified a stable state.
A=1 and B=0 is not a "don't care" input condition. You can say that you have a "don't care" input condition only if the final values of Q2 and Q1 do not depend on the previous values of Q2 and Q1. In other words, the output state is determined entirely by the inputs and you don't care about the previous output state. For the circuit you provided, all of the input conditions except A=1 and B=0 are don't care conditions.
For the A=1 and B=0 input case you have to make an assumption about the states of Q1 and Q2, then determine if that is a stable state. Do this for the situations where the latch is storing a logical 1 and for when it is storing a logical 0 (it's not clear how Q1 and Q2 relate to the stored state of your circuit). If you find that the stored state is always stable for a particular set of input values then you have found the HOLD input condition...the input condition that holds the previously stored value in the latch.
|
H: Would 5.5 x 2.1 mm male plug work inside a 5.5 x 2.5 mm female jack for DC power?
General Question
I am wondering, is it possible to use a 5.5 x 2.1 mm male plug inside a 5.5 x 2.5 mm jack for transferring 12 Vdc?
My thoughts are just that it may just be a tight fit on the inner conductor. It may also just not fit. I figured before spending money and waiting a few days to try it out, it was worth asking here.
My Use Case
I have an Intel NUC, which can be powered off 12 Vdc via a 5.5 mm x 2.5 mm jack:
The back panel DC connector is compatible with a 5.5 mm/OD (outer diameter)
and 2.5 mm/ID (inner diameter) plug, where the inner contact is +12-19 (±10%) V DC and the
shell is GND.
Source
And it seems the 5.5 x 2.1 mm plugs are much more common, so I would like to use that.
AI: This must be evaluated on a case by case basis, as sometimes the spring loaded tabs will allow for a few 0.1mm's of play. However, 0.4mm is most likely too far and a the right jack\plug combination with less than 0.4mm between the barrel and outer diameter of the plug needs to be found.
Whenever I do product testing with jacks\plugs, I usually buy several options and make sure that customers (boss, product development team) are happy with the plug\jack combination before I build a prototype.
|
H: Correct way to add LED in front of SSR?
Looking at at adding a simple LED indicator in front of an solid state relay. Not sure if its more correct to put it in series or use two different resistors as shown in the example. The indicator LED while close in voltage is different. The SSR is 1.25v while the indicator LED is 2v. I think under driving the indicator LED low enough not to damage the SSR should still light it. I have also seen it implemented in a similar fashion. However is it really the most correct way?
AI: The operating current range is between 3 and 50 mA, so a typical small LED current of 10-20 mA will drive both components. Either schematic will work. I would go with the upper one; if either diode fails, the external indicator will indicate it.
|
H: Power a guitar pedal (usually takes 9V power) with a single AA battery
This is not necessarily for real life application, but more for the challenge: would it be possible to power an existing guitar pedal (let's say a Roland / Boss saturation, fuzz, reverb, delay, etc.) with just a single AA battery?
I've recently tried different cheap step up converters from ebay, and they work with as little as 2V input to 9V-12V-or even 27V output.
But I haven't found any which works with 1.3 V as input.
Question: are there some chips able to do this, in a micro-size like these step up converters?
Or is there an electronic reason for which there is a threshold near 1.5V / 2V (below: doesn't work, above: working)?
PS: such pedals usually work with a 500mAh 9V battery (4.5 Wh), so I think it would also work with a 2500mAh 1.5V AA battery (3.75 Wh).
AI: Such converters exist.
That link goes to the datasheet of the Texas Instruments LM2621. It takes in from 1.2 V to 14V, and puts out a regulated voltage at up to 14V. It can deliver up to 1A.
This is the datasheet of the LT1073. The datasheet includes an example of boosting 1.5V to 9V. It is only intended for low current, though. Like 16mA when boosting 1.5V to 9V. Might be enough if your guitar pedal doesn't need much current.
The things you are looking for exist. They aren't as common as boost converters that start with higher voltage, but they are out there.
Making it work together with an amplifier might be tricky, though. Switching regulators are notorious for "noisy" output. They operate by switching current through an inductor rapidly. The on/off cycles cause "bumps" in the output voltage. These "bumps" can cause audible intereference in audio circuits. The switching frequency of the examples I linked to should be high enough that you can't hear it, but it can still interact with other parts of your gadgets and cause noise.
You can try filtering the output, or you can boost a little higher and use a linear regulator to lower it a bit - that will remove some of the switching noise.
This site gives the power consumption of some common pedals. Some would work with the low current booster, many would not.
Something to keep in mind:
When you boost the voltage, you also multiply the current.
If you need 9V at 100mA and you use a boost converter starting at 1V, then the converter will have to draw 900mA at low voltage. The current goes up by the same factor as the voltage.
|
H: Why opamp output doesn't match with the calculation?
The actual current passing the load is 44mA, in below schematic the voltage across Rsense is 454mV and the opamp output is 4.52V. which is correct.
But when I replace the Rsense with a 0.1 ohm resistor the voltage across Rsense changes to 1.9mV and opamp output to 8.5mV!
Why current reading become way off when I change the resistor to a lower value? Is it because of the 5% resistors?
simulate this circuit – Schematic created using CircuitLab
AI: While the input range of an LM358 goes all the way to the negative supply voltage (ground in this case), the output range does not. According to the TI datasheet, you are not guaranteed to get closer than 20mV to the negative supply rail.
Remember also that this amplifier has an input offset voltage of several millivolts.
|
H: Should I ground the unused pins of an oscillator crystal?
I have seen in this example circuit of an RTC where the unused legs of an oscillator crystal are grounded. I will be using an ECS EXC SMD crystal and from what I thought the unused pins are better left disconnected to the circuit and are just there for structural connection to the board.
Am I wrong or is this example circuit I am using doing it incorrectly?
AI: The schematic from the datasheet shows those two pins simply connected together. And this is a plastic housing. So it doesn't much matter.
Usually when the part has a metal case, one or more of the unused pins is connected to the enclosure of the part, so in that case connecting them to ground will provide some shielding and prevent some radiation as @Voltage Spike mentions.
|
H: Will my step-up converter module break if I connect a power hungry device to it?
I recently bought a step-up converter module. It is rated to work at 24 volts and output MAX 28 volts and 2 amps. I will connect it to a source that outputs 5 volts and 20 amps. If I connect a power hungry device to the module which draws more than 2 amps, the module will limit it or it will exceed the limit and burn?
Here is the module:
https://grobotronics.com/dc-dc-converter-step-up-5-24v-2a.html
It says that the output current does not exceed 2 amps but the input current can exceed it.
AI: No-one can know what will happen to your module in that case.
That's because from "Update 2" in my answer on a previous question about the same "XY-016" module, there is evidence of multiple different MT3608 clone ICs being used on those modules. The behaviour could be different depending on the specific clone that you have.
Either don't risk it (which is my recommendation), or try it yourself in controlled conditions (carefully, with fire extinguisher etc. and help nearby) and find out - but your next module might behave differently, if it has a different clone IC.
After more research, I don't think you can draw 2A in your case anyway. That claim in various adverts, is the very best case! That would apply only when there is a small difference between the input and output voltages, even with a real MT3608 IC. The supplier that you linked says:
Maximum output current: 2A (recommended for use within 1A)
(my emphasis above)
I don't know whether you want a 24V or 28V output from your 5V input, but that is a very large difference between the input and output voltages. Looking at the MT3608 datasheet, the closest I can see is a graph on page 5, showing 5V input, 12V output, and the max current shown in the graph is only 0.8A.
This is likely due to reaching the current limit of the internal MOSFET switch.
With 5V input and 24V (or 28V) output, I would expect a much lower maximum current than 0.8A before bad things could happen e.g. possible fire from the module, as shown in the video linked in my answer above.
|
H: Can i use 1 fuse for all the outputs to protect my power source from overcurrent?
Can i use 1 fuse for all the outputs to protect my power source from overcurrent by connecting the fuse to the ground wire? I have 3 outputs: 3.3V, 5V, 12V and i want to protect my power source when it reaches more than 10Amps. I don't want to put a fuse for each output. Can i put 1 fuse to the ground connection, where all the ground cables from the outputs go, to protect my circuit?
Here is a simple schematic of what i say:
AI: You could, but think about what happens when the fuse blows — you now have some parts of your circuit connected between +3.3V and +5.0V, some connected between +5.0V and 12.0V, and still others connected between +3.3V and +12.0V.
Doesn't sound like anything is "protected", does it?
|
H: 5 V home network
I'm planning on adding multiple IoT devices in my house, and I'm looking for an elegant solution to power them all. They'll all need 5 V, a small number of them (cameras) would draw up to 2 amperes, while most of them would draw less than 500 mA.
I'm thinking of running a separate 5 V line, through the house, with 10 AWG cable (to reduce the voltage drop) and a 120 V - 5 V, 20 ampere transformer on each floor. I would add some kind of connectors, each a couple of feet, in order to be able to connect to the line easily in the future.
The main purpose of all that is to keep my electrical outlets free, save all the single transformers I'll need, and allow me to extend my IoT network in the future, without using any extra outlets / unnecessary hanging cables. Is that a viable solution, or is there a more efficient way of accomplishing my goal?
I'm contemplating whether it would be better to use a 120 V - 12 V transformer, in order to compensate any voltage drop and add buck converters / linear regulators on each device, but I would like to save the extra hardware if it's viable.
AI: A 5VDC network is liable to be "a bad idea".
A somewhat higher voltage network with local regulators should be slightly better but adds electronic complexity.
Local 5V psu's with a shortrange distribution system is liable to be better overall.
12 gauge cable has a resistance of ~= 1.6 Ohms per 1000 feet or per 500 "loop feet".
So you get 1.6V drop per amp for 500 loop-feet or about 3 mV per loop-foot per amp.
Option 1:
A 5V run of say 100 feet at 10 A will drop 3 mV x 100 x 10 = 3V.
That's obviously too much at 5V.
You MAY deciede that 5A max is OK - or that the mean current is half the max if ecenly distributed, and a max length of 50 feet may be acceptable.
But , making compromises will still give you drops in the 0.5 - 1.5 V range.
A few cameras at the far end are liable to 'spoil your day'.
Your network needs to either be "dumb" and able to supply max power at 5 VDC or intelligent and only supply power by negotiation.
At 10A that's 5V x 10A = 50 W and probably double that to allow for drop and fusing and ... . 50 - 100W is enough to start a fire with a little ingenuity. Murphy has lots of ingenuity. It's not fatally flawed but care is needed. This is lower current and lower voltage than mains AC circuits provide - so if you take as much care with your DC network as your AC mains one it may be OK - noting the need for switches able to handle DC well at rated current (DC being substantially more difficult than AC).
Option 2:
Distribution at say 8VDC or higher (10-12VDC better) (or you can use AC) will allow freedom from voltage dropout issues. If you use linear local regulators then you lose efficincy with increasing feed voltage. If 8VDC is "just enough" you are losing (8-5)/8 ~= 40% of you power. And more again with more voltage. And you have added complexity and cost and a nonstandard system.
If you use switchmode local converters efficiency is relatively constant with feed voltage, and wiring losses drop as voltage increases due to resistive losses being proportional to current squared. But the converters add complexity and cost. POE (power over ethernet) is one version of this - and the cost per converter is liable to be substantial for off the shelf equipment, and compared to using mains powered commercial supplies.
Option 3:
A single power socket per location allows you to operate either a local 5v PSU OR a mains AC plugboard with a collection of plugpacks.
At the desk where I am typing this I have 18 x 12V powered USB hard drives on a shelf. I've considered the use of a 20A plus 12V supply, custom leads (std socket and cable from HDD to a connection system) but, so far, the 18 x 12V 1A powerpacks plus requisite mains plugboards has won through. Voltage drop is not an issue, I have excellent power supply redundancy either by providing say 2 spare 12V psus or by borrowing a supply from a less critical supply if needed.
My 5V "USB" supply needs are met by the several PCs with USB sockets, plus some of the HDDs have powered 5V outputs. And 5V "USB" psus are very very available, well priced (especially as used ones are usually reliable) and the connector is universal.
And mains AC (230 V 50 Hz in my case) is available throughout the house, or in any home or business I visit.
For me, and probably for you, option 3 makes most sense.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.