text
stringlengths 83
79.5k
|
---|
H: Choose MCU with long life cycle
Given specific requirements one usually has a very wide choice of matching microcontrollers. Other than avoiding tags like "not for new designs" and such, is there anything one can do to ensure that the product one chooses is still available several years from now? Are there some manufacturers that are known to have longer lifecycles than others, or is that completely unpredictable in advance? Or is it just that I would have to order huge amounts of the part I plan to use for a long time?
AI: look at the spread of family of products. STM32 has about 800 or more MCU options to choose for 32 bit ARM platform. It helps you to have multiple MCUs with same footprint options as well as easy upgrading of ROM and RAM memory options within the same family of MCUs.
How old are previous MCUs from the same vendor? how many other products are there which have guaranteed long term availability or available form very long time?
How do they manage LTB (last time Buy notices, how many years or months they will give the guarantee of supply, in case it happens)
From declaration of EOL (End of Life) and LTB, one will be also able to find alternate MCUs with same foot print (in order to keep zero change in hardware) and ideally almost same eco system for maintaining and compiling code. If one is capable of storing the products in recommended storage conditions, one has to act now.
Look for obvious declarations.. a few examples below from ST, Renesas etc.
Choosing the MCUs with flexibility in RAM and ROM (same package can offer from 256 KB to 1 MBytes of internal memory). When in case the product runs out of stock, there will be chances of getting MCUs with may be higher memory options from other second sources
Depending on the business we have with MCU vendors, there will be early flags which can be learnt from the vendors. It is not like a quarterly report of companies which has to be kept very secret until declaration.
Stating requirement directly to the vendors also helps in filtering out most obvious fault choices
Keep the programs still modular and not specific to one MCUs. Migrating MCUs is still a pain unless drivers, applications, middle wares are well coded structurally.
Ask Ask Ask. vendors, suppliers, second level suppliers, Field application Engineers and also team from plants directly
prefer the vendors who have atleast two or three fabrication plants in different locations (think about war, earthquake or even just building collapse for some reason)
History of sourcing ability, debug support, support for internal release and qualification of products, help and support channels should also be considered.
Voluntarily subscribe to notification on product status change (business units will automatically get information from vendors, really in formal ways, but why not keep a voluntary check too? also about being in touch with FAEs (Field Application Engineer, or also sales representatives) once in a year to discuss about the products life term).
Think in advance about your product line up for coming years down the line. Which feature may be needed ( Ex.: Security, hardware encryption etc) which may help in not dropping the chosen MCU because of product requirement reason and not because MCU is now obsolete.
Below are just examples where i could easily find about longevity promises (ofcourse with *) i also see this as an hint on vendors i would prefer. Why would one choose from the vendor who has no such programs unless there is a huge record of not making parts obsolete? isn't it?
NXP
Link here
Renesas
Link here
Si Labs
Link here
STM32 Microcontrollers
Link here
Microchip (covers ATMEL also now)
My answer will be incomplete without mentioning Microchip.
|
H: Multi-source in Unit <> on signal <>; this signal is connected to multiple drivers
I'm trying to design a multiprocessor in Verilog.
`timescale 1ns / 1ps
module Microprocessor(
input [7:0] instruction,
input clock,
input reset,
output [7:0] nextAddr,
output [6:0] seg1,
output [6:0] seg2
);
//wire [1:0] instructionTemp;
wire [7:0] nextAddrTemp;
reg [1:0] writeReg;
wire regDst;
//wire regData;
wire aluSrc;
//wire aluResult1;
wire memR;
wire memW;
wire [7:0] readData1;
wire [7:0] readData2;
reg [7:0] readData3;
wire [7:0] aluResult;
wire [7:0] readData;
reg [7:0] writeData;
wire regW;
wire [7:0] regData;
wire aluOp;
wire branch;
wire [1:0] instruction76;
wire [1:0] instruction54;
wire [1:0] instruction32;
wire [1:0] instruction10;
reg [1:0] dest;
wire m2r;
wire [7:0] instruction70;
assign instruction76 = instruction[7:6];
assign instruction54 = instruction[5:4];
assign instruction32 = instruction[3:2];
assign instruction70 = instruction[7:0];
assign instruction10 = instruction[1:0];
pc uut1(.clock(clock),.reset(reset),.isBranch(branch),.dest(dest),.count(nextAddr));
controlUnit uut2(.clock(clock),.inst(instruction76),.branch(branch),.m2r(m2r),.memR(memR),.memW(memW),.aluOp(aluOp),.regW(regW),.aluSrc(aluSrc),.regDst(regDst));
dataMemory uut3(.clock(clock),.reset(reset),.memR(memR),.memW(memW),.writeData(readData2),.address(aluResult),.readData(readData));
bcdDisplay uut4(.bcd(regData[7:4]),.seg(seg1));
bcdDisplay uut5(.bcd(regData[3:0]),.seg(seg2));
register uut6(.readReg1(instruction54),.readReg2(instruction32), .writeReg(writeReg), .writeData(writeData), .regWrite(regW),.clock(clock), .readData1(instruction54),.readData2(instruction32),.regData(regData));
ALU uut7(.ALUOp(aluOp),.clock(clock),.readData1(readData1),.readData2(readData3),.result(aluResult));
IMEM uut8(.Instruction(instruction70),.Read_Address(nextAddr));
always@(posedge clock)begin
case(instruction10)
2'b10:
dest <= -2;
2'b11:
dest <= -1;
default:
dest <= instruction10;
endcase
end
always@(posedge clock)begin
case(regDst)
1'b1:
writeReg <= instruction10;
1'b0:
writeReg <= instruction32;
endcase
end
always@(posedge clock)begin
case(aluSrc)
1'b1:
readData3 <= dest;
1'b0:
readData3 <= readData2;
endcase
end
always@(posedge clock)begin
case(m2r)
1'b1:
writeData <= readData;
1'b0:
writeData <= aluResult;
endcase
end
endmodule
When I run this code with the sub-module codes included, I get the following errors:
ERROR:Xst:528 - Multi-source in Unit <Microprocessor> on signal <instruction<5>>; this signal is connected to multiple drivers.
Drivers are:
Primary input port <instruction<5>>
Signal <uut6/readData1<1>> in Unit <register> is assigned to GND
ERROR:Xst:528 - Multi-source in Unit <Microprocessor> on signal <instruction<4>>; this signal is connected to multiple drivers.
Drivers are:
Primary input port <instruction<4>>
Output port doB<0> of instance <uut6/Mram_register> of inferred macro RAM
ERROR:Xst:528 - Multi-source in Unit <Microprocessor> on signal <instruction<3>>; this signal is connected to multiple drivers.
Drivers are:
Primary input port <instruction<3>>
Signal <uut6/readData1<1>> in Unit <register> is assigned to GND
ERROR:Xst:528 - Multi-source in Unit <Microprocessor> on signal <instruction<2>>; this signal is connected to multiple drivers.
Drivers are:
Primary input port <instruction<2>>
Output port doB<0> of instance <uut6/Mram_register_ren> of inferred macro RAM
I noticed most of my errors occur in the register module, so I will also upload the register module:
`timescale 1ns / 1ps
module register(
input [1:0] readReg1,
input [1:0] readReg2,
input [1:0] writeReg,
input [7:0] writeData,
input regWrite,
input clock,
output [7:0] readData1,
output [7:0] readData2,
output reg[7:0] regData //goes to BCD!
);
reg [3:0] register[7:0];
wire readData1wire;
wire readData2wire;
assign readData1wire = register[readReg1];
assign readData2wire = register[readReg2];
always@(posedge clock)begin
if(regWrite==1)begin
register[writeReg] <= writeData;
end
regData <= writeData;
end
assign readData1 = readData1wire;
assign readData2 = readData2wire;
endmodule
I noticed that that kind of error occurs when you're trying to assign values to the same variable multiple times in several always loops. However, I don't think I didn't do that in my code. Any kind of help would be appreciated.
AI: Your problem is that you have multiple drivers of a signal. Specifically caused by this line (I've taken the liberty of formatting it in a sensible way):
register uut6(
.readReg1(instruction54),
.readReg2(instruction32),
.writeReg(writeReg),
.writeData(writeData),
.regWrite(regW),
.clock(clock),
.readData1(instruction54),
.readData2(instruction32),
.regData(regData)
);
Your readData1 and readData2 signals are outputs from the register module. You connect these to instruction54 and instruction32 respectively. However these two signals are already driven by assign statements:
assign instruction54 = instruction[5:4];
assign instruction32 = instruction[3:2];
As such you have two sources driving the same signal.
Additionally, while not your specific issue, there is a mistake in the register module. Your signals readData1wire and readData2wire are declared as 1-bit wide, but you use them to connect two 8-bit signals. To be honest, I'm not sure why those signals are used at all, just assign to readData1 and readData2 directly.
|
H: gain of inverting op amp with resistor on input
I´m trying to figure out the transfer function of the attached op amp circuit. I came to the conclusion that v_out = - v_in as as the two resistors in the upper path are equally sized, and the non inverting input is on ground potential.
However this is a task from one of our exams which I try to solve and it seems that my solution isn`t right according to the following tasks, however I got no solutions to this exam.
Do I miss something?
Kind Regards
Marc
AI: Your conclusion that Vout = - Vin is correct.
Capacitor C and resistor R2 are just there to confuse you. As there is no current flowing into (or out of) the + input of the opamp, Vin+ = 0
The opamp will try to make Vin- = 0 as well if possible. Let's assume the opamp can manage that so we assume Vin- = 0
That means the current Iin = Vin / Rin with In flowing in the direction as shown. This Iin cannot flow into the opamp's - input, all of it has to go through the other resistor R1. The left side of R1 will be at 0 V, the current will flow from left to right and that means that Vout has to be negative with a value of Vout = Iin * R1.
So Vout = - Vin.
|
H: Voltage between phases of 220V 3-Phase Generator with no neutral
I'm looking at a 220V-50Hz 3phase generator which has no neutral wire and 3 live wires.
Am I correct in assuming that the voltage between phases will be 220V for this generator?
AI: Am I correct in assuming that the voltage between phases will be 220 V for this generator?
Yes. If there is no neutral then there is nowhere to reference a phase voltage from except one of the other phases.
Note 'V' for volt. 'Hz' for hertz. Units named after a person have their symbols capitalised but are lowercase when spelled out.
|
H: How do multimeters measure capacitance of polarized capacitors?
On my multimeter it doesnt matter in which polarity I put polarized capacitor.
How is it made?
If it is just simple rc circuit that measures charging time, how does it not damage capacitor in reverse voltage?
AI: Below a certain voltage (typically half a volt or more, depending) there is no problem in applying a negative voltage to polarized capacitors.
They can withstand negative voltage with similar mechanisms (oxide strength) as positive voltage, just the capability to withstand voltage is less because the relevant oxide layer is thinner.
|
H: How does this TLC556 work?
I'm having trouble understanding what the upper part of an electronic metronome depicted in the below schematic does.
I already asked about the lower op-amp part in another topic, but I also can't figure out how the upper part works.
This is my understanding of what the upper part does:
The TLC556 component is basically 2 TLC555s in 1 package. The first 555, marked as IC1a, is wired as an astable and generates a square wave at its output. The frequency and duty cycle of the square wave can be set by changing the value of the variable resistor marked as P1 on the schematic. Using the formulas from the datasheet, the duration of the high logic level can be calculated as C1*(R1+P1+R2)*ln(2) and the duration of low logic as C1*(P1+R2)*ln(2).
By setting the resistance of the variable resistor P1 to 0 Ohm, the output square wave frequency is 6.673 Hz with a duty cycle 60.9:39.1, and setting the resistance of P1 to 10 kOhm output frequency is 1.2478 Hz with 52:48 duty cycle.
What I can't seem to figure out is what does the other 555, marked as IC1b, do?
I believe it's wired as a monostable, which means that, when the output of the first 555 goes low, the second 555 gets triggered and its output goes logic high. The duration of logic high is set by R4 and C3 and can be calculated by 1.1*R4*C3, according to the datasheet. That would mean that the logic high pulse duration on the output of the second 555 is 1.1 ms, which is far less than the duration of low logic level on the first 555's output.
While the first 555's output is low, the second 555 always gets triggered (?), which means that it either gives constant high logic level at its output, or it is a square wave with a very high duty cycle. So I'm wondering what exactly is the point of the second 555?
The output of the second 555 is connected to the clock input (pin 14) of a 4017 decade counter, and by selecting the desired output on the switch S1, we can basically set the frequency divider of the square wave on the 4017's clock input.
AI: The capacitor C2 (with R3) AC-couples the trigger signal so that it generates a ~1ms pulse on every negative edge of the first timer. The time constant of R3 C2 is more like 100usec so it does not hold the 1ms pulse low, and recovers in plenty of time for the next edge.
You might think that a similar effect could be created by shunting R2+P1 with a diode and series resistor (and doubling C1) but the resistor would have to be unpleasantly low (in the 10 ohm range) so the currents would be limited mostly by the IC output.
The pulses measured at the trigger input will also be affected by the ESD protection network on pin 8. A prudent designer might add a resistor in series with C2 to limit the protection diode input current on the rising edge of pin 5 to a mA or so. Fortunately the source capability of the TLC chip is rather limited so it doesn't destroy itself, but it's operating outside of abs-max specs (which are difficult to meet - maximum input voltage is stated to be Vcc and that gets exceeded every time pin 5 goes high after being low).
|
H: Why are DIMMs not equipped with a heat sink like a CPU?
I know that a DIMM is composed of a set of chips that contain control logic managing the decode and prefetching memory operations. According to a product specification, I found that newer RAM works at a high clock rate (> 1Ghz) that is comparable to some CPUs. And that's what made me wonder why only the CPU is equipped with a heat sink, and not also the DIMM, besides a certain high clock rate (and thus the amount of heat needing to be cooled).
AI: You're assuming that the power dissipation is directly related to the clock rate. That's true but there's more.
Suppose I have this chip A where only 10% of the chip area (die size) runs at the highest clock rate. Compared to a chip B of equal size where 100% of the circuits are running at the high clock rate, chip A would dissipate only about 1/10th of the power that chip B dissipates.
My point: not only the clock rate matters, also how much of the chip is actually running at that clock rate.
For a DRAM chips (PC DIMMs use DRAM) most of the area on the chip is DRAM cells (obviously) and these are run at a significantly lower speed than the external clock rate. The DRAM controller access the chips in parallel and in a sequence so that this lower speed is somewhat compensated for by parallelism.
On a CPU a much larger part of the circuits actually run on the maximum clock rate (depending on how busy the CPU is of course) so it is bound to dissipate a lot more power than a DRAM chip where only a small part of the chip is running very fast.
|
H: Charging a single 12V battery from 2 solar panels
I'm building a solar powered robot that uses a 12V lithium battery. It will have two (17.6V max) solar panels - one on the top and one on the bottom (so it will still work if it flips), meaning I won't be able to wire the two panels directly together (as the one on the bottom would limit the one on the top), and I read that wiring controllers together isn't a good idea either. How would I best supply 1A at 12V to my robot?
AI: I assume you are mentioning something like a box with solar panel on either sides.
Consider below image.
The wall adapter and the 9V battery can be your two solar panels. We call them Panel A and Panel B.
When Panel A has more sunlight incident on it, Panel A voltage will be higher and hence Panel A will conduct and it will supply the load.. The diode in front of Panel B blocks the current entering it and hence, practically you can treat Panel B as like not connected only.
Same thing happens when Panel B has got more light energy.
The diodes should ideally be very low leakage ones(BAV720, for example) which helps in blocking leakage and battery discharge through the panels when there is no light.
Low leakage diodes normally come with little higher forward voltage drop and hence you have to decide based on applications and voltage margin you have.
Edit 1:
If battery power is not to be truly saved for long, I would suggest then to go for Schottky diodes or even PMOSFET based polarity protection. Here, almost all the voltage is available for the battery and loss during charging the batteries due to voltage drop of the diode.
One point here: you are completely losing the energy harvested (no matter how small it is) from the panel which is upside down.
Edit 2
The load in the picture shall be treated a charge controller module for batteries
|
H: Resistor for solid state relay (CPC1008N)
I have solid state relay (CPC1008N) Dataheet here. What is the resistor I need to use to connect it to a power supply with an output voltage of 4.5 volts?
AI: Assuming your control voltage is also 4.5V:
You need at least 2mA to guarantee activation of the relay.
The diode forward voltage is specified as 1.5V max at If = 5mA. So targeting 5mA to be conservative would mean you have 4.5V - 1.5V = 3V across your resistor.
Using Ohm's law V/I = R gives a resistor value of 600 ohms. Choose the next lower standard value, 590 ohms. There's plenty of margin to the 2mA minimum so you could go higher if you want to save power.
Since the abs max continuous forward current is 50mA there's no concern with exceeding that with the 590 ohm value.
|
H: How does electrical power relate to Ohm's law?
I have some difficulty grasping these concepts. Let's say, for example, a power source of 10W operating at 5V is connected to a load of 0.5 ohms. According to Ohm's law, it is expected that a current of 10A should flow through the circuit. However as given above, the power is 10W so a current of 2A is expected, using the voltage-power relationship.
My question is: What is the expected current in this particular case and why?
AI: 10W is the maximum power that the supply can provide. The actual power (and current) will depend on the load connected to the supply.
In your example, the smallest resistor that can be safely connected to the supply is 2.5 ohms, which will result in a current of 2A and power of 10W. If a resistor smaller than that is used, it will attempt to draw more than 2A, with a power greater than 10W. What happens next will depend on the power supply, but the supply's output voltage will fall below the rated 5V, and the supply may overheat or the protection fuse may trip.
|
H: Formulas for Carry out in a Full Adder
Given a full adder with inputs $$A, B \text{ and } C_{in}$$
The formulas for the outputs are $$S = A \oplus B \oplus C_{in} \text{ , Where } \oplus \text{means XOR}$$ and $$C_{out} = AB + AC_{in} + BC_{in}$$
But when a Full Adder is created by combining two half-adders, the obtained equation for carry out is $$C_{out} = AB + (A \oplus B)C_{in}$$
The two expressions have equivalent Truth Tables, but the reason for their equality is not obvious.
Can someone please help me understand how it can easily be seen they're equal?
AI: Boolean Algebra Approach
The equivalence of the two forms may be proven using boolean identities
Start off with the second expression
$$C_{out} = A B + (A \oplus B)C_{in}$$
Using the expansion,
$$A \oplus B = \bar AB + A \bar B \quad \text{ for XOR}$$
The right hand side becomes
$$AB + \bar A B C_{in} + A \bar B C_{in} \tag{1}$$
Taking B common between the forst two terms, we get (Property of Boolean Algebra)
$$B(A + \bar AC_{in})$$
Using the fact that addition distributes over multiplication (In boolean Algebra)
$$A + BC = (A + B)(A + C) \tag{2}$$
Hence the term becomes
$$B((A + \bar A)(A + C_{in})) = AB + BC_{in}$$
Plugging this back into (1) and reusing property (2) with
$$B+ \bar B C_{in}$$
We get the alternate form
$$AB + BC_{in} + C_{in} \tag {3}A$$
Intuitive Approach
The form (3) is true or 1, if any two among the 3 inputs are 1. This is the case since there will be a carry if and only if (iff) we add at least 2 1's.
The XOR form, on the other hand, suggests a different viewpoint. It treats the input carry differently than the other 2 inputs A and B. Effectively it is saying that the carry will be 1 iff both A and B are 1 (The AB term) or Exactly one among A and B is 1 and Cin is 1. Note that this is being unnecessarily specific and instead we could say part 2 of the condition is that Either A or B (or both) are 1 and Cin is also 1.
In boolean form this would be,
$$AB + (A+B)C_{in}$$
Which is the same as (3)
The OP is advised to refer to the properties and Axioms of Boolean Algebra to prove similar equivalences.
|
H: What is the "minimum" transmit power for uplink cellular transmission
Can anyone help me in finding a good reference for minimum transmits power for uplink cellular transmission?
is 0 dBm a good enough power for very low-power transmission in an indoor environment? Will it achieve high enough RSRP values at the receiver (note that in indoor the receiver is very close to the transmitter)
AI: Some GSM systems have tiny on-the-wall cell-sites, thus the "distance" might be just a meter (about 10 wavelengths).
The pathloss will be 22dB + 10db*log10( [distance/wavelength]^2 )
or 22 + 20 = 42dB pathloss. This comes from the geometry of energy spreading out, with spherical behavior around the antenna, and 1/range^2 dropoff in energy density.
Now what receiver signal energy needed? Lets work through a link-budget:
-174dBm/rootHertz thermal noise floor
+60 dB for 1MHz bandwidth (about right for GSM)
+20 dB for SignalNoiseRatio, matching from Antenna-LowNoiseAmplifier, and any upfront diplexor losses
-174 + 60 + 20 = -174 + 80 = -94 dBm (about 5 microVolts RMS, across 50 ohms)
What energy from TX? Simply add the receiver minimum energy (-94) to the PathLoss (42), -94 + 42 = -52dBm.
------ -52 dBm This is the answer you wanted: much less than 0dBm ------
Given 0dBm is 0.223 volts RMS across 50 ohms, the level of -52 dBm is 12 db below 40 dB below 0 dBm, thus
[0.223 / (100, from -40dB)] / (4, from -12dB)
or 0.223 / 400 = 0.5 milliVolts RMS
|
H: MCU 3.3v to 5v Relay Driver, MOSFET or BJT
I couldn't find a definitive answer.
What's more suitable to drive a 5v relay from a 3.3v MCU, a MOSFET or a BJT Transistor? NPN or PNP?
I will be using a Schottky SS34 as flyback diode. Relay consumes 75mA.
I can use NPN transistor MMBT3904LT1G or N-Channel MOSFET BSS138 for turning on the relay, emmiter/source to ground, would that be ok?
AI: The BSS138 is not characterized for Rds(on) with 3.3V drive, and the MMBT3904 is not characterized for Vce(sat) at 75mA so neither one is great.
There are plenty of better parts such as MMBT4401 or AO3414 that are properly specified to work reliably. Either one will work fine, with the proper choice of base resistor etc.
|
H: How to get 8MHz square signal out a pic18f45
I am using a Pic18F45K40 to control an ST7590 power line networking
chip which requires an 8MHz clock signal to function. I read the datasheet and it looks like a 16MHz signal can be generated from the 64MHz microchip.
I set up the Reference Clock Output Module as follows:
#pragma config CLKOUTEN = ON
and
#define oCLK_INIT() CLKRCLKbits.CLK=1; \
CLKRCONbits.EN=0; \
CLKRCONbits.DC=2; \
CLKRCONbits.DIV=3; \
SCANTRIGbits.TSEL=1;
//OSCCON1bits.NOSC=6;
#define oCLK_EN_ON() CLKRCONbits.EN=1;
and used PPS to pin RB4 by setting
RB4PPS=0b10100; /* B4=CLKR 8MHz */ \
I do get an 8MHz signal out but it looks like this:
This is more sinusoidal than square and might be the reason why I am not able to talk to the ST7590 chip via UART.
Can anyone explain what is happening?
EDIT: Result of changing slew rate.
AI: Two possibilities - Stray capacitance or slew rate control.
If you were working on breadboards, I would think it to be unwanted capacitance between the pin strips but due to the package of the STmicro device, I believe you are working with proper PCBs.
That leads to the other possibility - the PIC is limiting slew rates on the port. This is done to reduce EMC from fast switching "bouncing", so the slew rates of the transistors are slowed to create a nice gradient. Works great under 1MHz but you need to be wary of it at 8MHz.
See page 244 for directions to wiping the SLRCONx registers to prevent or reduce slew rate limiting.
15.2.5 Slew Rate Control
The SLRCONx register controls the slew rate option for each port pin. Slew rate for each port pin can be
controlled independently. When an SLRCONx bit is set, the corresponding port pin drive is slew rate
limited. When an SLRCONx bit is cleared, The corresponding port pin drive slews at the maximum rate
possible.
|
H: PSoC-59 pins span
I'm wondering what is the dimension between rows of pins of CYPRESS CY8CKIT-059 (marked at the picture in red).
I searched through many manuals and specifications, but I havent found this information. Do You know where I can check this dimension?
AI: You can load your image into a program such as IrfanView and drag a select a region to measure the pixel ratio between the edge of the board and the on-center spacing of the pins. Doing this you get 190 pixels and 160 pixels. This is a ratio of 1.1875.
The scaled spacing using the board vertical dimension is: 0.95 / 1.1875 = 0.8"
As a check, if you perform the same procedure on the image of the board shown below, you get 237 / 203 = 1.1675, which gives 0.813. You would not expect the result to be as close with a photo, but this also shows that the dimension is likely 0.8".
You would expect this dimension to be a multiple of 0.1" so that the module can plug into a breadboard.
|
H: Reasons behind placing power supply parallel capacitors in the correct order
I don't know if this was asked but I couldn't find a satisfactory answer in some related questions.
Imagine an IC or a sensor will be powered and some caps are needed to be installed in the vicinity. I know that the caps must be as close as possible to the chip/sensor.
But which way below is more proper for supply capacitor places? Dashed box is the sensor/IC.
Should the smaller or bigger capacitor be closer to the device supply pins?
I don't think the equivalent ESR will change by swapping them.
And most importantly how can the logic behind explained in an easy way?
AI: The smaller one is placed closer because it will almost certainly have the better high frequency performance and, given that track inductive reactance rises with frequency you would want to make the smaller capacitor as close as you can even at the expence of the larger capacitor; the larger capacitor will generally be much poorer above 10 MHz (generalism alert!) so it's only really useful below these frequencies so track reactance is less of a problem and it can sit slightly more distant.
As to why the smaller one is better at higher frequencies, this picture should help - it's all about "hitting" the natural resonant frequecy: -
|
H: Understanding Working of High-Pass RC Filter
I was trying to visualize what happens when frequency is swept from 1Hz to 1GHz. In case of capacitor, voltage lags behind current by 90 degree and capacitor reactance depends upon it's frequency.
I have tried simulating the RC filter using LTSpice. The picture is given below but my question is very general and for theoretical understanding.
I want to understand the phase response of the filter. Since, voltage lags behind the current in capacitor (which is connected in series with voltage source). Therefore, they will be some voltage across capacitor and it's intensity will depend upon the frequency (decreases with increase in frequency). I have tried to understand the RC filter working. I have tried to explain what happens in RC filter when frequency is swept from 1Hz to 1GHz.
Stop-Band:
The frequency will be low and reactance of the capacitor will be very high. All of the voltage will be across capacitor and will be delayed by 90 degrees. The output (voltage across resistance will be nearly zero).
Transition-Band:
The reactance of the capacitor will start to decrease relative to the resistance. The voltage at output (across resistance) will be subtraction of Voltage source's voltage and delayed version of voltage source (90 degree). Therefore, overall phase of the system will be less than 90 degrees.
Pass-Band:
In this band, reactance of capacitor will be nearly zero and hence, there will be 0 phase delay. Although there will be some voltage across capacitor which will appear as ripples in the pass-band.
Is my understanding correct?
AI: In the transition band we can say this is typified when Xc = R but, it isn't a simple numerical addition of Vc + Vr = Vinput. We have to use Pythagorus: -
$$V_{input} = \sqrt{V_C^2+V_R^2}$$
This is because the voltage of the capacitor and voltage of the resistor are always 90 degrees relative to each other when they share a common current.
Another point to note is that when Xc = R in value, Vc and Vr will be equal in value (not phase of course) and, using the formula above and re-arranging, you can prove that the output voltage (Vr) is \$\sqrt2\$ lower than the input voltage. This of course is known as the 3 dB point of the filter because \$\dfrac{1}{\sqrt2}\$ is -3.01 dB.
|
H: Block diagrams can be different and still works for the same system?
I am an telecommunications engineer who is working now as a programmer. At university we took a class on digital filters, Laplace transformation and working in the frequency and time domain. At the time, no one told us what is the practicals that we can do and benefit from the course as we've been working with Math all time.
After 2 years I read an artical that this course is an integral part of control system engineering and remembered that I loved the course and pass it with A+ grade. So I decided to start learning deep with it and make a project at the end and apply for jobs in this domain.
I bought Norman S. Nise book: Control System engineering 6th edition. I was afraid to not study it after seeing the 800 pages of the book.
Luckily I got the courage to start with the first chapter and fully understand it. It was about the design and analysis process. And the exercises was about building a block diagrams.
An exercise was about the following:
A temperature control system operates by sensing the difference between the thermostat setting and the actual temperature and then opening a valve of fuel with an amount proportional to the error (or difference).
The following image represent the author solution, compared to mine. Does mine correct ? And in block diagram, there is only one solution for a control system design ?
The solutions:
https://i.stack.imgur.com/kA0rG.jpg
AI: Your answer is incorrect in the sense that you produce an error signal from signals that have different physical dimensions. In your system, you subtract temperature units from volts, which is not a valid operation ("you can only subtract apples from apples"). The unit conversion in the feedback loop is missing.
The answer in the book is actually pretty close to what you intended, but it assumes you understand the following equivalence. These two closed-loop systems have the same reference to measured output transfer function:
Proof: name the following
Unit Conversion := \$F(s)\$
Controller := \$C(s)\$
Plant := \$G(s)\$
For the first system:
$$\begin{cases}
y(s) = C(s)G(s)e(s)\\
e(s) = F(s)r(s)-F(s)y(s)
\end{cases}$$
$$y(s) = C(s)G(s)[F(s)r(s)-F(s)y(s)]$$
$$y(s) = \frac{C(s)G(s)F(s)}{C(s)G(s)F(s)+1}r(s)$$
For the second system:
$$\begin{cases}
y(s) = C(s)G(s)F(s)e(s)\\
e(s) = r(s)-y(s)
\end{cases}$$
$$y(s) = C(s)G(s)F(s)[r(s)-y(s)]\\$$
$$y(s) = \frac{C(s)G(s)F(s)}{C(s)G(s)F(s)+1}r(s)\\$$
End of proof: both systems have the same \$r(s)\$ to \$y(s)\$ transfer function.
|
H: Transfer Function: Trying to understand the Laplace analysis of this circuit
I am trying to do the transfer function of this circuit and also trying to understand the frequency domain thing of the Laplace transform.
I want to do a transfer function of VA/V1, considering B to be ground.
After doing the node analysis and if my equations are correct, I have ended with this transfer function on the s domain.
A calculator online gave these answers for the cubic equation on the denominator
x1 = -915.52763
x2 = -42.23618 + i * 3304.67537
x3 = -42.23618 - i * 3304.67537
These are my problems:
what do these numbers represent?
the equation is on the denominator, what about the s100 on the nominator?
how do I find the frequency performance of this circuit as the frequency changes?
what does this function say about the circuit?
AI: May I suggest that you start by simplifying the 2 resistors into one resistor. I'm suggesting this because it makes the math a lot easier and I think you have a mistake in your final formula. So, the voltage source reduces from 10 volts to 9.09 volts in series with a resistance of 90.90 ohms due to standard circuit theorums.
This then has a standard formula: -
$$H(s) = \dfrac{\omega_n^2}{s^2 +2\zeta\omega_n s+ \omega_n^2}$$
Where \$\omega_n = \dfrac{1}{\sqrt{LC}}\$
And \$\zeta= \dfrac{R}{2}\sqrt{\dfrac{C}{L}}\$
The value for R is the newly recalculated value of 90.9 ohms. To offer a little more help, \$\omega_n\$ is the natural resonant frequency of the filter and \$\zeta\$ is called the damping ratio (also equal to the reciprocal of 2Q).
Now if you want to see what this looks like you can use this on-line calculator and plug-in the values: -
Resonance occurs at about 503 Hz and there is a peak in the response of about 11 dB. Circuit Q is about 3.5.
But don't forget that there is an overall attenuation (due to me simplying the two resistors into one resistor) so the formulas are multiplied by 0.909.
I haven't used your equations because I can see that there is an error in the final formula you derived.
|
H: Lithium-Ion - leave at full or charge and discharge
I am getting a laptop soon, and am wondering if I should leave the Li-ion battery at full during use, or have it charge and discharge within a range of, say, 40-80%. The goal here is maximum battery in-service life.
AI: Depends on the current draw of the laptop. See the graph below with varying SoC (State of Charge) values. If you draw lots of current, then lifetime is reduced. However, total energy units may actually be higher.
Case 1: 75–65% SoC offers longest cycle life but delivers only 90,000 energy units (EU). Utilizes 10% of battery.
Case 2: 75–25% SoC has 3,000 cycles (to 90% capacity) and delivers 150,000 EU. Utilizes 50% of battery. (EV battery, new.)
Case 3: 85–25% SoC has 2,000 cycles. Delivers 120,000 EU. Uses 60% of battery.
Case 4: 100–25% SoC; long runtime with 75% use of battery. Has short life. (Mobile phone, drone, etc.)
Source: http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries
|
H: TL072 supply voltage +-4.5 V vs. +-9 V
I have preamp circuit from an earlier project that is based on TL072 opamps. I have been using it with a 9 V (+-4.5 V) power supply, but now I have the chance to give it a +-9 V supply. The signal that goes through it is a small audio signal, probably never larger than 1 V. Does it make any sense to bother giving it a larger supply voltage? (I know that the minimum supply voltage for this IC is 7 V (+-3.5 V) by the datasheet.)
AI: The datasheet I have for TI's TL07x series tells me that the minimum supply voltage is 10V(+-5V).
That, combined with the common-mode input range and max output swing, means that you're lucky your existing circuit works at all (and might not work if you drop in a different TL072 from a different production batch).
If you have 18V(+-9V) available I would definitely make use of it.
|
H: minimum readable rise/fall times in an oscilloscope
How can I calculate minimum readable rise/fall times of a signal in an oscilloscope (from practical point of view)? Does it depend just to bandwidth and sampling rate of oscilloscope? regards
AI: Did you Google at all before asking? A simple search for "scope bandwidth vs rise time" brings up this document, which explains that the "rule of thumb" is that
$$\text{Rise Time} = \frac{0.35}{\text{Bandwidth}}$$
For example, a 350 MHz scope will have a rise time of about 1 ns.
For reasonably accurate readings, the scope rise time should be no more than about 20% of the signal rise time. Another way of putting it is that the scope bandwidth should be 5× the highest frequency of interest.
Note that we're talking about the analog bandwidth here. The sample rate really has nothing to do with it, as long as it meets the Nyquist criterion for the bandwidth.
|
H: How to supply enough power for a DC motor
I'm fairly new to electronics and have been reading extensively into it, but I'm unable to map all the concepts together.
My project is a tiny drone involving (four) 4 N40 DC motors, rated 26k RPM at 3V 0.3A, and 42k RPM at 6v 1.68A.
From my understanding, to power the motors at full capacity, I need to provide ~10 Wh, that is (1680)mAh * (6)V = 10.08 Wh each.
I have a set of 3.7V 1,000mAh batteries (3.7Wh), thus I would need four batteries where each two are connected in parallel and then the the circuit is eventually connected in series providing a total of 7.4V and 2Ah or 14.8Wh.
Theoretically, to provide 40Wh to all four engines, I would need to provide total of 7 pairs (14 in total) of batteries connected in parallel to provide 7.4V at 7A leaving me with a bit excess of power. Is my understanding correct as that seems to be a bit excessive?
AI: Total continuous power due to motors running at full speed is say 10 W.
Let's choose a battery of say 7 volts
If motor has to run for 2 hours max, then the battery rating has to be 2 * 10 W hours.
It is 20Whours.. Or 2857 mAh.
20/7 is 2.857
So, a battery rated about 2.8 Ah at 7 V will provide you 2 hours of run time for the motor.
Considering conversion losses due to regulator and drooping battery voltage levels when the charge is declining I will ration 30% more.. As my thumb rule.
Unless you run all the motors at peak speed which is doubtful, you will be getting more than 2hours.. What does your device/drone demand finally is the question, just the motor rating alone cannot be considered, I feel.
|
H: High current melting a spanner - what's happening?
Just a couple of guys doing fun things with a DIY low voltage very high current transformer. One of the things is putting a spanner on a brick and touching the two ends with an extremely thick copper cable carrying several thousand amps.
The spanner then becomes red hot and melts. And here we come to the question:
Why does the spanner turn red hot at the ends first and then later towards the center? I would have thought uniform current would have heated it evenly
AI: There is heating from the contact points, but not enough to make them turn red. More heat comes from the thin section. Where both sources heat the metal it gets hotter than the rest of the thin section, causing the resistance to rise as it heats, yielding more localized heating (positive feedback), and so on, so the ends of the thin section get hot first and the hot area propagates toward the center of the thin section.
It may only take a relatively small temperature difference to start the positive feedback in a given section. See, for example, this curve.
|
H: Why does inverter synchronization with the grid take 5 minutes?
We had some solar panels & an inverter installed recently. Every time the inverter is turned on (after maintenance or with the first light of the day) it has to synchronize its generation phase with the grid, and it is easy to understand.
But why does it take around 5 minutes? When I asked the guy installing it, he said "it is some sort of standard, every inverter takes around 5 minutes to sync" and had no idea about the reason.
The inverter has 60 changes per second to sync with the grid. Sometimes it might be needed to observe the grid but still, 5 minutes is too much time and missed opportunities to synchronize:
60 Hz x 60 seconds x 5 minutes = 18,000 cycles
Am I missing something?
My inverter is Delta SOLIVIA Solar Inverter 3.8 TL.
AI: It's nothing to do with synchronization. It has to do with ensuring safety of utility workers. The inverter should be quick to disconnect in the case of a grid failure (seconds) wait a period of time (in this case 5 minutes) after the grid is restored before beginning to supply power out to the grid.
See, for example this exchange (the "standard" in question is UL 1741/IEEE 1547).
Question:
I understand the requirement to cease energizing within 2 seconds. How
long does the inverter have to be de-energized before coming up to
provide power to a local load w/ the utility breaker open?
Answer:
The standard does not directly address it, but from a lab perspective,
common practice is to have the inverter wait a minimum of 5 minutes
after the Area EPS steady-state voltage and frequency have been
restored.
Further comments indicate that some European countries require 3 minutes and Australia requires 1 minute.
|
H: USB Bus Powered with LDO device example
I'm planning to use the FT232R in my USB device. The device consists of the FT232R and a dsPIC33EP64MC202 (Basically speaking, the FT232 and a microcontroller only).
On the FT232R's datasheet, at the end of page 26, section 6.4, it talks about another possible configuration, using an LDO voltage regulator, which would be supplied by the 5V of the USB bus. This LDO can be used to supply between +1.8V and +2.8V to the VCCIO pin and to the external logic.
So, I have some doubts:
Why does the LDO regulator voltage need to supply 1.8V to 2.8V? I made this question because we can connect the 3.3V pin to VCCIO either, and the 3.3V pin has 3.3V, no?
I'm planning to make PWREN# and SLEEP# available to be used by my microcontroller to verify and decide when and how to enter in low power mode. Is there a problem in doing this?
The voltage source that drives the TX_LED and the RX_LED is the 5V from USB bus, and not the 3.3V from LDO, correct?
Here is another version. In the next picture, the VCCIO pin and the external voltage supply are supplied by the 3.3V pin from the FT232.
I'm not planning to make my microcontroller follow the Low Power mode protocol, at least not for now. But, configured this way showed in the second image, the FT232 can interrupt the current to my microcontroller. Am I right?
What do you think about these schematics, I'm afraid to have some electrical mistake, because the device will need to be available on a server to be accessed by other people.
Any help would be very appreciated.
From tips and alerts made by Maple, I made some corrections, I came to this solution:
The LEDs RX_LED and TX_LED are not necessary, so I took them out
AI: Why the LDO regulator voltage needs to supply 1.8V to 2.8V
It doesn't need to, it can if that is your design requirement. The documentation basically says that if you use low (2.7~3.6V) or ultra low (0.8~2.7V) voltage components then FT232 will be able to communicate with them.
There is a problem in doing this?
No problem whatsoever, that's what PWREN# and SLEEP# are there for. You only need only one of them, though. It is the same signal, inverted.
The voltage source ... not the 3.3V from LDO, correct?
Since you connect LED to CBUS pins it has to be powered from VccIO, so unfortunately you will be adding this load to LDO. You can use a single LED though, configured for both Tx and Rx (see section 7.5)
FT232 can interrupt the current to my microcontroller, am I right?
You second image shows "external power supply", which is opposite of "supply to external logic" that you are trying to do (I think).
Since FT232 uses same 3.3V for its own needs the power should be available to you as well, as long as it is plugged into USB host. Note that you can only draw up to 50 mA from it.
What do you think about these schematics
In both pictures LEDs should be connected to VccIO.
In the second case if you indeed want to power your device from 3V3OUT these two LEDs will eat huge part of available power. Consider getting rid of them altogether.
On both pictures you connect resistor network to RESET#. This is only done for self-powered configuration, which would make sense for "external power supply" wording, but then the connection from it to 3V3OUT should be removed.
In general, both schematics look like you started designing self-powered device and finished as bus-powered. You need to decide on this first, because it defines the rest.
UPDATE
Your updated schematics is much better. No identity crisis anymore. It is typical bus powered application circuit that should work without problems. I would suggest three tiny changes (to improve robustness you were asking about).
Since you are not driving LED by CBUS pin you can connect it before LDO. This will reduce LDO current a little bit and slightly reduce dissipated heat.
The required 10uF input capacitor on LDO makes suggested 4.7uF capacitor redundant, especially if all components placed close on the PCB as they should be. So, i'd remove 4.7uF.
If it is all the same to you, I'd use 22uF output capacitor instead of 10uF. It'll improve the stability.
|
H: Negative input, negative output switching regulator?
I've got a component within a larger device that requires both +15 and -15V, drawing about 100mA per rail.
In addition, the main power supply of the larger device is providing +/- 28V, with a common ground.
My initial thought was to use good old linear regulators - 7815 for +15 and 7915 for -15. However I want something a little more efficient...
...and it just so happens I have a bunch of these fancy R-7815-0.5 switching regulators (PDF) by Recom. They accept 18-35V on the input, and produce +15V on the output (500mA). In addition, they can be used to convert positive to negative, albeit at a lower output current (200mA).
I want the +28V from my supply to step down to +15... no problem there, one of the Recom devices will work perfectly. In addition, it makes sense to me that the -28V be stepped down to -15V.
However, I can't determine whether a switching regulator like this can be wired up to accept a negative voltage input, and thus produce my desired negative output voltage. To be clear, I don't want to do any voltage conversion - I want to my input +28V to produce my +15V, and my -28V to produce my -15V, to ensure that approximately the same load is being placed on both my + and - supply evenly.
In the world of compact, all-in-one switching regulators, there don't seem to be "79xx" equivalents which would make this easy!
Is it possible to do this with the devices I have - i.e. wire the
R-7815-0.5 to accept a negative input?
If not, what would be the best way to efficiently produce +/-15V from my supply, placing an even burden on each +/-28V rail?
AI: I've been using Recom converters before, really good devices. I don't think you can wire this one to draw power from negative rail, though.
So, if you want to use this particular device you'd have to draw from positive line only.
However if you open to try other Recom products, you can get any isolated dual 15V output part that accepts 56V, like RS3-4815DZ-H3, and connect input between the rails. So, you'd only need one converter and no other parts.
|
H: Can a sealed lead acid battery charger work properly with a flooded / wet cell deep cycle battery
I know that charging sealed / AGM / gel cell lead acid batteries requires a special charger so they don’t get overcharged, overheated, boiled out, and destroyed.
Is it safe to use this special type of charger with a standard deep cycle flooded / wet cell marine or automotive battery?
AI: No issues!
I designed SMPS battery chargers for a living and the only exceptions are some gel and AGM batteries which may need 100-200 mV more to get to 100 % SOC. Using a standard one which charges to 14.4 will undercharge said gel or AGM.
As for the opposite, using a 14.6 V charger for a normal battery, you are ever so slightly overcharging it. If it’s not sealed, I would just refill any lost water with destilled water. If however sealed, you will loose water over time if you charge it repeatedly.
Measure the termination voltage with a multimeter to be sure if in doubt.
|
H: how long should an I2C slave wait for a STOP bit (if at all)?
I2C frames each group of message bytes in START and STOP conditions, defined as SDA changing state 1>0 or 0>1 (respectively) while SCL is high, as described here.
I am writing interrupt driven handlers for PIC32MX170, and I got quite far using the STOP bit as the signal to the software that the message is done. This then allows for things like checking the rx/tx byte count and so on. I found testing the STOP flag in software to be quite reliable, with the combination of hardware and clock that I used.
However, I now discover that it is not reliable at all : either using a faster clock or slower driver means that the ISR can exit and miss the STOP bit completely. Worse, as the next byte will be START of a new message, there is no way to know if it ever arrived (unless you sit there polling the bus, which is not really the kind of thing I want in an ISR, even with timeout).
However, code that depends on flaky combinations of hardware and clocks is also pretty bad, so I am facing a redesign that assumes STOP bits to be unreliable (luckily I don't try to do variable byte counts).
(Some uC's always raise an interrupt on STOP, but unfortunately not this one, as far as I can tell.)
But this raises the question : should an ISR wait on the STOP bit? If so, for how long? Is there anything in the spec about this?
EDIT:
I am adding some information, as perhaps I did not express myself completely clearly in my original. My question was really about the means of detecting the message start and stop, which of course is essential. (We have some discussion below about related matters such as where in the code the decoding is done - also very valuable but not what I was asking.)
The issue is basically that, although START and STOP (S and P) conditions (actually the status bits that signal them on the device) are not always set when the ISR runs, even though this might be the last time for the message. (There is also the question of whether the ISR needs to look at those bits, which I think is more about system design, but also interesting and relevant.)
As well as S/P flags, there are also flags which tell you what kind of byte you just received: Address R/W and Data R/W. Address Write always signals the start of a message. After this point a certain structure must be observed, which may involve repeated S conditions and so on. Depending on how you design your message protocol (especially whether you support variable length or not) these can also be used to understand the structure of the message. This is what the question is about.
AI: You really need proper firmware architecture for something like this where you react to external asynchronous events not under your control.
Interrupt routines should service the immediate hardware event, then get out of the way. This is NOT where dealing with arbitrary timing between events should take place. I is also NOT where you should be trying to understand the individual events at a higher level, like a whole IIC message.
Last time I had to implement a IIC slave on a dsPIC, I used the hardware to receive events in a interrupt routine. However, that interrupt routine mostly pushed events onto a FIFO. That FIFO was then drained in a separate dedicated tasks to interpret the events as IIC sequences and act upon them. This worked quite well.
REsponse to comments
"Foreground" means running a task from your main loop, right?
It means running from not-interrupt code. Whether that is from the main event loop or a different task is up to your firmware design.
the I2c ISR is at a higher or lower priority?
Higher, obviously. That's part of the point of interrupts. If they weren't at a higher priority, they wouldn't be able to interrupt anything.
if it is clock stretching while it waits for the message - doesn't that actually make it longer running, not shorter?
No. The interrupt routine isn't running at all during the clock stretch time. The interrupt routine gets the address byte. It pushes that on a FIFO and exits. The foreground code interprets the start of the IIC message, realizes that it must respond, fills in a buffer of response bytes, and enables the IIC byte-sending interrupt. That interrupt happens immediately. The interrupt routine fetches the first byte from the buffer and writes it to the IIC hardware. That ends the clock stretch and starts the first data byte getting sent. The interrupt routine exits and is run again when the IIC hardware is ready to accept the next data byte.
|
H: How to read flag register in datasheet?
I'm having troubles deciphering the datasheet for the DS3231 RTC. The below table shows that 0x02 bit 6 is the flag to operate in 12- or 24-hour mode. But which one correspond to the bit being low or high? I assume the line above the 24 must tell it, but I guess I lack knowledge of the usual conventions.
AI: A bit (or a digital signal) is described as \$X/\overline Y\$. The part without the bar is true when the bit is set. The part with a bar is true when the bit is cleared.
examples:
\$12/\overline {24}\$ means 12-hour time when this bit is 1, and 24 hour time when this bit is 0.
\$\overline {AM} / PM\$ means AM when the bit is 0, and PM when this bit is 1.
\$R/\overline W\$ in figs. 2,3,4 in the DS3231 datasheet means Read when the is 1 and Write when the bit is 0.
|
H: Right way to connect leds to light up when pressing buttons
I want to connect leds to Cherry MX switches (push switches) so they light up when I press them.
I have 6 switches each connected to a different pin of a teensy 2, basically like this:
The diodes are 1N4148.
What is the correct way to connect the leds and resistors?
Like this?
or like this?
With this one, if more then one key will be pressed, will the leds shine brighter and potentially burn?
The leds are 3mm cheap ones, I measured with a multimeter with single led with 5V and a 200Ohm resistor I get about 23mA.
AI: LEDs are non-linear devices when it comes to their forward voltage. They have a narrow range (by voltage) where they work optimally. Too little voltage and they don't conduct, too much and they fail.
Credit: B. Gashiii
There are other questions which address the proper ways to connect and power LEDs; but simply put, you need constant current. The most straightforward way to connect LEDs is to use a current-limiting resistor with fixed voltage sources. You're on the right track with the inclusion of current-limiting resistors, but you have two different methods in your examples.
Let's simplify these by eliminating the switches for the moment and just examining the differences between having LEDs share a resistor versus having dedicated ones.
simulate this circuit – Schematic created using CircuitLab
In the top example, each LED has a resistor to limit current through it. In the lower example, the LEDs share a resistor to limit current through the two in parallel. (I've selected resistor values for LEDs having a Vf of 2V and a nominal current of 20 mA.)
I've eliminated switches, so these examples are for "all LEDs lit" situations, which you would achieve by pressing all switches simultaneously.
If you examine this question about LEDs in parallel, you'll discover that while it works in theory, it doesn't usually work well in practice. What happens is one LED has slightly different physical characteristics than others, and current is not shared equally. Over time this leads to various problems.
The other problem occurs at the introduction of switches. When you have a single resistor, how can its value be appropriate for a variable number of lit LEDs? The answer is that it can't, so you should have a resistor for each LED.
Up to this point, I've ignored two other aspects of your question: The microcontroller and the switching diodes. From the way you worded your question, I am assuming you want to read switch state with the microcontroller, but light the LEDs with the press of a switch.
An LED is also a diode (Light Emitting Diode). So you shouldn't need the additional diodes at all. They will introduce an additional small voltage drop (about 0.8 - 0.9V depending on temperature and current).
The pins on your microcontroller should either be configured as input pins, to read the switch state, or output pins to drive LEDs. These are conflicting situations, better discussed in this question. Depending on which Teensy you have, you may need to dedicate some pins as output to drive the LEDs and some pins as input to read the switch states. You might not have enough pins, so that leaves you having to either multiplex switches and/or LEDs or use a microcontroller with more I/O pins. There might be other options as well, but you should ask a new/separate question once you've narrowed it down a bit. Hope this helps.
|
H: Simple Stepper motor for my experiment?
To graduate (Grade 12 or Year 12), I need to do an self-thought experiment in Physics. I decided to do something about stepper motor because I learned that they use this type of motor for robot arms.
Of course, I know that I cannot build a real entire stepper motor. However, I was wondering if i can build a much simpler one with less stator and rotor teeth.
I asked this to my physics teacher, but he isn't convinced about this idea.
My first question would be, Is it possible to make a simpler stepper motor? like this one.
If yes, I am also a bit unsure about what will be my independent and dependent variables. I planned to make the current my independent variable and measure the angle of the magnet, since by energizing multiple coil at the same time, the angle will change.
Are these variables ok for my experiment or should i choose a different one ?
Any help would be appreciated.
Thank you.
Pingu
AI: I would recommend tweaking your choice of independent variable slightly. I would consider each coil to be either ON, OFF, or ON(Reversed). I would then consider which coils are energized to be the independent variable.
I think this is a great experiment. You should be able to build a working model similar to the diagram you posted. You can use toggle switches to control the coils and "step" the motor.
A DPDT toggle switch can be hooked up so that middle is off, up is current in one direction, and down is current in the opposite direction.
See here.
|
H: Calculating life of portable power supply for icybreeze cooler
I recently purchased an IcyBreeze Portable Air Conditioner and Cooler for an upcoming camping trip. I want to run it on low for two nights, or about 16 hours. With this in mind, I purchased the following portable power source
The capacity is advertised as 42000 mAh.
The IcyBreeze page indicates the amp draw is 1.0 A on low.
This battery life calculator suggests I should get about 29.4 hours of battery life (using 42000 mAh capacity, 1000 mA draw, and the consumption rate of 0.7).
With a fully charged power source, I plugged the cooler in using the wall adapter, set it to low, and ran it until it stopped. I only got about 5 hours of battery life - far less than what I was expecting.
Clearly I am misunderstanding something about the battery life calculation. So I guess I have two questions:
How can I more accurately estimate battery life for this setup?
A little off topic, but the portable power source is still well within the return window, and I an open to alternative suggestions for how I might get 16 hours of battery life with a portable power source (non-generator).
AI: You have fallen prey to confusing specmanship.
Start with the cooler. The data sheet says that its battery is 12 volts 10 Ahr. This is 120 Whr. At high power, this will last 2.5 hours.
Now, about your power source. Yes, its battery is rated for 42 Ahr. However, that is produced by a 3.7 volt (nominal) Li-ion battery. Note that the data sheet says the total energy is 146 Whr. This is about 20% higher than the cooler's battery, so figure on an endurance (from the power source only) of 1.2 x 2.5, or 3 hours.
So, the cooler will run about 2.5 hours on its own battery, and the power source will run an extra 3 hours, for a total of about 5.5 hours. Does that sound familiar?
Please note that your power source has a 120 volt, 1 amp AC output. Since this draws 120 watts, at that level the power source will last for 146/120, or about 1.2 hours.
The key is that 120 volts (the output) is about 32 times greater than 3.7 volts (the battery voltage). So, in order to keep the power equal, a 1 amp output at 120 volts will require about 32 amps from the battery, and your 42 Ahr battery is not going to last very long.
|
H: Is a PCB a requirement for an RFM95 family for HopeRF LoRa modules?
I watched a few videos and read a couple of blogs regarding the HopeRF RFM95W family of transceivers.
All of the videos recommend using a breakout PCB similar to this one or this other one, or this one
One of the videos states that the distance between the center of two IO holes on the RFM module is 2mm, and the distance of the top edge to the center of the first hole is 1mm, and thus standoffs are not an option.
I am curios what other options there might be? Couldn't one just solder wires directly onto the module? If that is a bad idea, why? If not a bad idea, what size wire would be best to use?
Please understand I have no real training in electronics and only self taught on YouTube. My soldering skills are improving, and even with the PCB, soldering is required. Just seems that the PCB is unnecessary in this case. It is not a flat connect MCU.
AI: The pitch is indeed 2mm (p120 in the datasheet you linked to).
Since RFM95W is not used alone you'd need to put other parts somewhere, so for permanent or repeatable solution it is better to make you own PCB and solder the module to it.
For experiments or one-off designs perfboard is cheap and convenient alternative to custom PCB, and breakouts like those basically work as pitch adapters.
And you are correct, PCB is not necessary. You can put everything in a box, or glue to the wall, or arrange in ikebana on a desk and connect with just about any wire that you can manage to solder. But in any case some soldering is required. Breakout boards like those make soldering easier, not harder.
|
H: Is D flip flop equivalent to frequency mixer (difference frequency) for square waves?
I was trying to make a frequency mixer (only difference frequency) for two square waves (PWM1, PWM2, both 0.5-4KHz range) using ONLY Arduino due.
I'm new to signal processing, and the only way I can think of making a differential frequency is purely mathematical,and only for sin waves:
$$sin(A-B)=sinAcosB-cosAsinB$$
The cos term is a problem because it involves 90 degree phase shift, so I cannot just use logical operators to express the function.
However during Googling I saw a statement that D flip flop can be used to produce only the difference term in frequency mixing.
That is, if I understand it correctly, attaching an interrupt to the rising edge of PWM1, in the ISP read the PWM2 value and write it to the output pin.
It make sense as the closer the frequencies of PWM1 and PWM2 is, the smaller the frequency of the output wave. However it seems too good to be true and I cannot figure out how this is mathematically equivalent to the difference part of the product of the two signals.
Will I get better accuracy if I use a real D flip flop ?
Clarification:
For 'frequency mixer' I mean the product of two signals.
$$2cosAcosB=cos(A+B)+cos(A-B)$$
For 'the difference part of frequency mixer' I mean only the term with differential frequency (A-B).
AI: An XOR gate makes a good mixer, producing the sum and difference of two input squarewaves. If you only want the difference term, then the output must be low pass filtered, so is then in the analogue domain. This method is capable of producing a good difference signal even when the high frequency signals have jitter on them, due to the output low pass filter. If you want a digital output, you must follow the low pass filter with a Schmitt input buffer.
A D-latch taking one signal as D and the other as clock can produce a frequency difference of sorts, but it would be very susceptible to phase jitter on the inputs, when the two input signals are in approximately the same phase, and its setup and hold times are being violated. With clean signals, you may get reasonable transitions. With jittery signals, you would get many random up/down output transitions instead of one clean one at each change of output state.
What I've just written about a D-latch is true if the two input signals are asynchronous. In the specific case of them both being PWM signals generated from the same microcontroller by internal PWM counters, this method of generation could mean that the signals will always meet setup and hold times at the D-latch, which would make it work perfectly.
|
H: EMC test for PCB board without housing
Our company is exporting our product to European market. To sell it to Europe we need CE mark. so we let the test lab test only EMC(EMI+EMS) because our products usually don't equip any RF nor AC power.
Now, we are developing a board type product without housing. The board type product's purpose is very same to the Arduino. So the board can be used in lab. But it can be an IoT Gateway product when the end user implement a product by using our board. And the board doesn't include any RF part and it is powered by DC an adapter.
I think that we need to the EMC test as same to the products which have enclosures.
I have some questions at this point.
When we do the electrostatic contact discharge, contact point should be all point where our fingers could be contacted. If we do the contact discharge test to the very important point, for example: MCU lead, it might be failed.
Our partner test lab says we need an enclosure for the test of the non-housing board.
Is it correct?
How do you test for the board type products?
cf. I have tried to find Arduino test report for reference but I have failed.
Thank you very much.
AI: This is where you have to read the rules creatively.
Since your product is part of a full product, or a demo kit, you could only be testing for emissions.
You can test ESD on the terminals, for your own peace of mind. You don't have to test ESD on the bare board since handling precautions should be in place.
Unless, for example, you expect your grandma to handle it in normal circumstances.
You can also test immunity, to check if there are major design flaws, but since you rely on the system integrator for an enclosure, you could skip this.
We sell bare (potted) boards for integration in machines, and we do test emission, immunity, esd, eft and surge. Because we know you can't rely on most system integrators to do their job well. And then your product doesn't work or misbehaves.
Even though you could, on paper, state it's not your fault.
|
H: Are anti-static bags needed for storing electronic components?
Should I keep the sensors in the anti-static bags or are the bags only needed when shipping?
As the anti-static bags are inconvenient and often too big to put the sensor into a compartment in my electronics box.
AI: The answer is "depends". Devices that have protection diodes on their inputs are probably OK to drop into normal plastic storage draws. Things that are super static sensitive like MOSFETs are probably best kept in their original antistatic packaging.
|
H: How does capacitive coupling work for measurements
The context is the measurement of engine speed on a vintage car that uses a classic Kettering ignition system. Essentially, a voltage pulse of tenths of kV is generated on a high tension (HT) lead. The frequency of the pulses can be used to calculate engine speed.
I have seen two methods of measuring these pulses with instruments:
An oscilloscope with a 1000:1 attenuation probe. The probe tip is a clamp that encloses a segment of the HT lead for measurement
A RPM gauge with a wire wrapped ca. 10 turns around a segment of the HT lead for measurement.
The second type of measurement, in particular, would appear to be inductive, as we're measuring through a coil, but I'm told nevertheless that it's capacitive coupling.
Could someone elaborate on how capacitive coupling works in these two measurement setups?
AI: Just because a wire is coiled around another wire, it doesn't mean it uses magnetic coupling as the principle for extracting a signal. To effectively utilize magnetic coupling you have to: -
Access both ends of the coiled wire electrically. I don't see any evidence of that in your lower diagram
A coil that wraps around a conductor's circumference will not receive an induced emf due to magnetic coupling because it is in the wrong orientation.
Almost certainly the wire is coiled around the conductor just to increase surface area "contact" through the insulator.
As to elaborating: -
how capacitive coupling works in these two measurement setups?
You should explain your skill level and understanding of how capacitors work before I bore you with stuff you already know and waste my time and yours. If you are an absolute beginner then this means you should do some reasearch because this site isn't geared up for training like that.
|
H: Build a simple coil generator
I know that if I want to create a powerful electromagnet, then I'd better put a ferromagnetic material inside the coil I build. So I was wondering if the same applies in the inverse scenario, that is for a generator (I simply mean a coil where I induce electric current by moving a magnet around). Does the insertion of a ferromagnetic material inside the coil increase the output current of the generator?
AI: Firstly, current in not induced; voltage is induced. You get current because of the induced voltage in the receive coil is connected to a load (or a short circuit in some examples).
Does the insertion of a ferromagnetic material inside the coil
increase the output current of the generator?
The ferromagnetic core attracts lines of flux from the magnet and concentrates that flux through the receive coil (more so than if the coil were air-cored). That means you get a bigger induced voltage when the magnetic flux is changing.
This usually means more current produced when you load the coil.
However, because the inductance of the receive coil has increased (due to the presense of a ferromagnetic core) and that component of inductance is in series with the induced voltage, the current produced into a load may not be any bigger when the magnetic field changes are very fast.
|
H: sizing voltage regulator
I am to size a 3v3 voltage regulator,
It gets at its input 12VDC maximum. And the load can consume up to 150 mA (few leds, 20 NMOS control, ADC control, microntroler supply...) and ambient temperature can reach 70°C.
I have to be surface and cost efficient in my choice.
I'm struggling with chosing the regulator because I don't know weither the regulators I found are underdimensioned or overdimensioned.
I found those regulators:
MC33375 /
ldk320 /
MCP1702
What do you think of them ? On some of the datasheet there are formulas but I didn't understand how to use them, as the RthA can vary depending temperature and manufacturers usually indicate its value for TA = 25°C (and not 70°C)
Thank you for your help
AI: This should not be an answer, but there was no other way to add a photo.
You may not ask for product recommendations in EE SE, but since you're a new user I will help you with the right search terms, but I'll not indicate any product.
I agree with @Bimpelrekkie, this is not a job for a linear regulator, since the thermal dissipation would be critical. Try a switching regulator, which is a more modern solution.
Search for "3.3V Step-Down Voltage Regulator module", or "3.3V buck voltage converter module" and you will find ready to use modules like this:
If you need to build the converter yourself, do the same search without the word "module" and you'll find indications of IC's that could be used to build circuits like this.
|
H: Why did my micro-controller short out even though the alligator clip of the oscilloscope was connected to a ground pin?
I have a STM32F407G-Discovery board, and I bought a DS1054Z oscilloscope for the purposes of debugging.
Before I did anything, I went through videos and articles about how to use it. From my very basic understanding of them, I gathered that since my MCU was connected to my computer through a USB, it was a mains earth reference, and so I need to be careful about where I plug the alligator clip of the oscilloscope.
As such, I made sure to connect the alligator clip to a pin titled GND. However, as soon as I did, the LEDs on the MCU faded away and they just stopped working. I can no longer flash any code onto my MCU.
Here's a picture of the board:
This is where I connected the alligator clip: the far right side of the board. The GND pin above the 5V pin which is above the 3V pin which is above the PH1 pin.
My plan was to connect the alligator clip to this GND pin, and then use the longer probe (not sure what's it called) to hook onto the PE3 pin (since I'm trying to debug a SPI issue). Was my logic incorrect?
What did I do wrong?
AI: This is a dangerous-looking setup. Connecting the ground clip of the scope probe to one of the GND pins was correct electrically, but a bad idea because stuff happens.
I think it's 80% likely that the ground clip swiveled around and touched the 5 V pin when you didn't notice. This can happen very easily. I wouldn't use a alligator clip on a pin like that for exactly this reason. It is OK to use a "hook" clip, but be careful about them coming loose and popping off the pin and then hitting something else.
A possible option for your case is to clip to both GND pins together. The alligator clip would come from the top of the picture, and only reach far enough to touch the two GND pins. I still don't like that since it will pop off eventually, and then you've got a ground connection flailing around randomly shorting things.
What I use for these cases is a short wire that has a female pin meant for a RS-232 connector on one end and about ¼ inch of bare wire on the other. The whole thing is about 1½ inches long. The female connector has heat shrink tubing around it so that it is insulated on the outside. Slide the female connector over the pin, then clip the scope probe ground to the short end of bare wire.
|
H: What part of a mobile phone charger makes it safe to be charged with opposites polarity?
A mobile phone charger works regardless of whether the charger is the right side up or upside down. As I know, batteries should not be charged with wrong polarity. How do those chargers accomplish that?
AI: The input power supply is AC therefore, on a two-prong charger, the polarity is immaterial because it's always changing/alternating at 50 or 60 times per second: -
Internally the charger uses a bridge rectifier to convert AC to DC and it is the DC that does the charging. The polarity of that DC does not change when you rotate the charger.
|
H: Input resistance of small signal equivalent
I'm trying to calculate the input resistance of the depicted small signal equivalent circuit.
I was just wondering why I can't see the current source as an interrupt and then the input resistance will be: r_pi+R.
I recall that replacing current sources with interrupts and voltage sources with short circuits is done when calculating the resistance between two nodes in a circuit. Why isn't that allowed in the small signal equivalent?
simulate this circuit – Schematic created using CircuitLab
AI: Your final equation looks good, but you can simplify it further:
$$R_{IN} = R \left( 1 + r_\pi\left(gm + \frac{1}{R}\right)\right)$$
$$R_{IN} = R \left( 1 + r_\pi g_m + \frac{r_\pi}{R}\right)$$
$$R_{IN} = R+ r_\pi g_m R + \frac{r_\pi}{R}R $$
$$R_{IN} = R+ r_\pi g_m R + r_\pi $$
And now knowing that \$r_\pi \cdot g_m = \beta\$ because
\$ \beta= \frac{d(Ic)}{d(Ib)} \$ and \$ \textrm{d(Ib)} = \frac{d(v_{be})}{r_\pi} \$
Therefore:
\$ \frac{\beta}{r_\pi} = \frac{d(Ic)}{d(Vbe)}=g_m\$
So, we can write it like this:
$$R_{IN} = R+\beta R + r_\pi $$
$$R_{IN} = (\beta + 1) R + r_\pi $$
$$R_{IN} = r_\pi + (\beta + 1) R $$
|
H: What would be a good replacement for a set of HR6 batteries?
I need to change this OEM set of batteries1 because they are not holding a charge any longer. I am not familiar with rechargeable batteries.
My understanding is that I should be able to swap the OEM batteries with two 1.2V 1300mAh AA batteries2.
Would it be correct?
AI: You are correct.
When swapping batteries between two equipment provider, these are the factor that you want to take a look at:
The voltage
The capacity
The form factor
The battery chemistry
Voltage is important for your system. It expect a certain range of voltage. Capacity is flexible, but if it is smaller, it will reduce your cycle time in between charges. The form factor will allow the battery to fit correctly on your device. Last but not least, the battery chemistry is important for safety and charging purpose.
In your case, you have two AA battery in series : 2.4v and 2.4 for your proposed replacement. You have also a capacity of 1300 mAh for both products. The chemistry is the same (Ni-MH) and the form factor is the same.
It should therefore work without any problems.
|
H: In a 3 phase rectifier, why is the output always the highest voltage?
Consider following circuit
At t=0 I can wrap my mind around the fact that Vout equals whatever value the highest phase has since the others are negative or zero. But after that only one of the three phases has a zero voltage value. Blue is rising while red is falling. Why isnt the output here blue + red? Since purple is negative, the diode should block any current from flowing but the others are positive.
How can I mathematically prove that Vout is always equal to whatever the highest value of the voltage is? Whenever I watch a video about it, they always say "highest voltage wins" with no explanation.
Maybe its too trivial but could someone help me anyways?
AI: The diodes perform a MAX function, not a sum of positive values.
|
H: If I have two 18650 Li-ion batteries with different capacities, can I charge them using the same circuit?
I have several 18650 Li-Ion batteries, many with different capacities. Can I charge them with the same charging circuit (5 to 3.7 V 1 A buck converter)? Can I put them in parallel and use the same step up circuit to make a 5 V USB bank?
AI: If you mean to charge each cell individually, then it should be fine, provided that the charger doesn't exceed max charging current for the smaller cell. But if you mean to make a battery out of two different cell in parallel, and charge-discharge them as a battery, then the following apply:
One should never charge different Li-Ion batteries in parallel. It is true even if the cells are of the same rating, but their charge-discharge characterics do not match to high (1-2%) degree. Charging cells in parallel is unacceptable for three reasons:
Li-Ion cells with different capacity will take different time because a smaller-capacity cell will/might be charged first, and then will be overexposed to charging voltage (while the bigger cell still gets the charge). This will result in "overcharging" of the weaker cell, it will grow some bad chemistry inside, its capacity will fall more, and it will die being bloated or worse.
On discharge cycle the process is also bad - weaker (less capacity) cell might be depleted first, and fall into "overdischarged" state, with similar bad implication for internal chemistry.
On charge, a stronger cell with less internal impedance might take more current than the cell design can afford, which can lead to "fast venting including fire".
In short, it is a very bad idea to make a battery from different Li-Ion cells in parallel without either perfect matching, or using some electronics to manage each cell individually.
|
H: Can we use nodal analysis without any information about the current
I learned today Mesh Analysis and Nodal Analysis principe (with KVL and KCL) for a computer project and I am not certain about one thing.
Can we use nodal analysis with only the voltage of the source and resistances of components in the circuit to know all current information at any point of the circuit? And if it's impossible like I think currently, it's correct that I need to use the Loop current Analysis (who is a general Mesh Analysis if I understand correctly) to solve all circuits, planar and non-planar?
AI: Can we use nodal analysis with only the voltage of the source and resistances of components in the circuit?
Yes. In fact, you may also use it for Mesh Current Analysis as well, the choice is yours. However, one analysis might be easier than another analysis. As long as there is a source of any type at anywhere, you can solve for what you're looking for.
The way I described how to find the current at a node is:
\$i_{x}= (V_{1}-V_{2})/R_{between} \$
Where \$i_x\$ is an arbitrary variable for current at the node, \$V_{1}\$ is the voltage at the branch directly onto the node, \$V_2\$ is the voltage at the branch next to the resistor next to \$V_1\$ and \$R_{between}\$ is a resistor value between the nodes. If there is a voltage source at \$V_1\$ or \$V_2\$, then it will become a numerical value rather than a variable.
Consider the following example.
simulate this circuit – Schematic created using CircuitLab
Easy right? We'll just solve for one node as you can repeat the process.
\$ \displaystyle i_1=\frac{V_1-V_2}{R_1}=\frac{5-V_2}{100}\$
You can do the same with \$V_2\$ and \$V_3\$.
\$ \displaystyle i_2=\frac{V_2-V_3}{R_2}=\frac{V_2-V_3}{100}\$
You now have a system of equations to solve for \$V_2\$ and \$V_3\$. If you have a resistor between your node and ground, then treat your ground as a separate node with the voltage being zero instead.
|
H: register enable line usage in `case` block (verilog synthesis for altera cpld)
I have the following in a verilog design aimed at an altera CPLD (currently targeting EPM240, although the target device isn't set in stone):
always @(posedge clk)
if (we)
begin
case (rw_sel)
3'd0: reg0 <= data_in;
3'd1: reg1 <= data_in;
...
endcase
end
I assumed that this would synthesize a design where rw_sel was decoded into a number of different select lines, which would be 'and'ed with we, and then connected to the enable input of the register.
However, this isn't what has been done: examining the results in the RTL viewer, the we line has been connected directly to the enable inputs of every register, then the data input of each register is connected to a mux2 that selects from either the incoming data or the current value of the register.
Isn't this much less space-efficient than the design I was expecting? And if so, how can I persuade Quartus to generate the more efficient version?
AI: Isn't this much less space-efficient than the design I was expecting?
No; it's actually better.
Consider the structure of the LE in the MAX II CPLD (from MAX II Architecture). I've highlighted an important detail:
The input to the register's clock enable does not pass through the LUT. It must be driven by one of the two clock enable signals which are shared across the LAB.
Your design would require each register to be implemented in a separate LAB, which will run you out of space very rapidly. The synthesizer's design allows each of the registers to be implemented within a single LE, probably all within a single LAB.
|
H: Classic transistor differential amplifier - problem with a single-ended output
I have a differential amplifier like at the pic below:
And I am not sure if I am doing everything right.
We know that the input signal is a triangle wave with \$ V_{pp}>100\text{mV}\$, no offset and \$f=1\text{kHz}\$ and our output signal is a square wave that changes from \$0\$ to \$5\text{V}\$. And my task is to calculate:
-\$ V_{CC} \$
-\$ R_C \$
-\$ G_{diff} \$
The first thing is to calculate \$I_0\$ - on both \$10k\Omega\$ resistors there is \$7.5V\$ voltage, thus \$7.5V-0.7V-I_0\cdot 3.4k\Omega = 0\rightarrow \ I_0=2\text{mA}\$
Next step: we know that the maximum output voltage is equal to 5V, so \$ V_{CC}=5\text{V}\$
Now let's say, that we have such input voltage, that T1 is in cutoff mode, then
\$I_{C}=I_0=2\text{mA}\$
This means, that \$V_{CC}-I_CR_C\$ is equal to the minimum output voltage, i.e. 0V. Thus: \$R_C=\frac{V_{CC}}{I_0}=2.5k\Omega\$
As for the gain: I think it is \$ G_{diff}=\frac{R_C\cdot I_0}{2\varphi_T}\$
Is my solution correct? Thank you in advance.
AI: OK for Vcc and Ic
As for the gain, each transistor behaves like it has an internal emitter resistor of value:
\$ r_e = \frac{1}{g_m} = \frac{V_T}{I_C} \$ with Vt about 25mV.
So, with zero input voltage, Ic=1mA per transistor (2mA total), and their re are both 25 ohms.
To calculate the gain we need \$ \frac{dIc}{dVin} \$ so we approximate both transistors as perfect transistors with emitter resistor re added. Since each transistor has its own re, they appear in series, so
\$ \frac{dIc}{dVin} = \frac{1}{2 r_e} = \frac{I_C}{2V_T} \$
Multiply by Rc to get the gain...
\$ \frac{I_C Rc}{2V_T} \$
I think you lost a "2" somewhere along the way, as Ic=Io/2 my result doesn't match yours...
Note that the gain depends on transistor gm which depends on collector current for each transistor. If the collector currents are not balanced then the transconductance \$ g_m \$ of one transistor will increase, and the other will decrease. Same for their \$ r_e \$ since \$ r_e = 1/g_m\$
At low input voltages these variations compensate each other, and linearity is good. However when input voltage is high enough to produce a noticeable variation of current in the transistors, or even further, when one transistor gets close to turning off, then the gain will be lower. With one transistor off, the gain is zero. So keep in mind this circuit is only linear when input voltage is quite small. If you want to use it as a comparator, this is not an issue.
|
H: Step motor movement
I have found code for running a step motor ( https://os.mbed.com/users/XtaticO/code/sMotor/file/4b3b9e047ce3/sMotor.cpp/ ), however I am not sure if it is correct:
void sMotor:anticlockwise() { //rotate the motor 1 step anticlockwise
for(int i = 0; i < 8; i++) {
switch (i) { // activate the ports A0, A2, A3, A3 in a binary sequence for steps
case 0: {
_A0=0;
_A1=0;
_A2=0;
_A3=1;
}
break;
case 1: {
_A0=0;
_A1=0;
_A2=1;
_A3=1;
}
break;
case 2: {
_A0=0;
_A1=0;
_A2=1;
_A3=0;
}
break;
case 3: {
_A0=0;
_A1=1;
_A2=1;
_A3=0;
}
break;
case 4: {
_A0=0;
_A1=1;
_A2=0;
_A3=0;
}
break;
case 5: {
_A0=1;
_A1=1;
_A2=0;
_A3=0;
}
break;
case 6: {
_A0=1;
_A1=0;
_A2=0;
_A3=0;
}
break;
case 7: {
_A0=1;
_A1=0;
_A2=0;
_A3=1;
}
break;
}
wait_us(motorSpeed); // wait time defines the speed
}
}
The rest of the class works with this implementation, am I right in assuming that calling this function will move the motor 8 steps, and not one, or is there something I do not understand.
AI: There are many explanations on the web for this problem with full details .
This dual coil 4 wire configuration uses bipolar current in 4 phases for 4 steps or 8 half steps or 16 quarter steps and more . Speed and torque are tradeoffs for higher resolution with fractional current steps.
Here you can convert the state changes in current to binary logic to mean bipolar current shown here with 8 half-steps that can repeat repeated for the number of rotor+stator poles per rev. x4.
Full steps have the greatest torque.
|
H: SDHC write partial block
Is possible with SDHC microSD card write 32 bytes of data without loading full block o the RAM? SDHC has for some operations fixed block size to 512 so I dont know if it is possible. If possible what commands I have to use? If it is not possible is another way to write data to SD card from MCU with <= 512B RAM?
AI: Is possible with SDHC microSD card write 32 bytes of data without loading full block o the RAM?
No. Partial block support was removed from the spec for SDHC.
Note that it was optional for SD, and many cards did not implement that feature at all.
Also note that RAM sizes for current generation MCUs are no longer that small.
|
H: Best microphone picking up sound within a small room?
I've tried several Electret Condenser Microphones as input to a generic USB audio sound card:
MO064202-4
MO064402-4
MO064402-5
All mics work great at close range (about 1 or 2 inches). However, none of them would pick up any sound at ranges further than that.
I tried two different pre-amp circuits, they actually made the problem worse.
I suspect, I'm using the wrong type of microphone to pick up sound from across the room. What should I search for at DigiKey/Mouser/Arrow?
Thank you!
Additional info:
This is for a custom wall mounted all-in-one computer. So a separate boundary microphone is not ideal. The microphone is only used for short spoken communication, whispers would be nice, but normal conversational level is sufficient. Not for music, not for voice recognition.
The pre-amp I tried uses LM358 op-amp chip. Powered with 9V PSU.
AI: You need to pay attention to the following items:
High sensitivity - measured in dB, and always negative. You want a value closer to 0. That is to say that -38 is better than -44. Sensitivity is measured relative to a given pressure and voltage. 0dB would mean your microphone is as sensitive as the standard in the definition. See this article from the Arrow site (actually linked on the microphone pages you posted.)
High signal to noise ratio - the microphone (and its internal amplifier) produce noise. You want as little noise as possible, else it will drown the quieter signals from across the room. This is also measured in dB, but positive numbers. You want the highest you can find. 60dB is better than 55dB.
Directionality - if your device is on one side of the room and you want to pick up sounds from the other side of the room, then you will want a cardioid microphone rather than an omnidirectional (make sure it faces the correct direction.) If you need to pick up sounds from all around, then stick with omnidirectional microphones.
Amplification - even the best microphone will have a low level output. You will want a good, low noise amplifier between the microphone and the sound card. You could use gain (multiplication) on the digital data from the sound card, but the sound cards are usually noisy so you would be amplifying the noise as well as the signal - your signal to noise ratio will stay the same (or get worse.) I'd find a pre-amplifier that can take microphone signals to line level and use the line in on the sound card. You said you tried an amplifier and it made it worse - well, too much amplification is bad, and a bad amplifier (poor signal to noise ratio) would hurt things, too.
Automatic gain control - if you are trying to make recordings of sounds from all over the room, then the volume will vary greatly. The further the source is from the microphone, the lower the level. AGC attempts to keep the recorded sound level approximately the same. You can do this in software or as part of the pre-amplifier.
Points 4 and 5 are obviously not part of the microphone, but are parts of the system you are building.
If you use the microphone input of the sound card, then it expects a low level signal. An amplifier intended for line level would produce a signal far above what is expected. You would then hear a lot of noise, and extremely distorted speech.
You can usually change the gain of an amplifier. If the circuit you use provides too much amplification, then you could post the circuit here (new question) and ask how to change its gain.
Or, use the same amplifier on the line in input of the sound card. Some (many?) cheap USB sound cards only have a microphone in, though.
Your microphone is most likely picking up sounds from all around the room - you just can't hear it. Record using Audacity, then use Audacity to increase the volume (try the normalize effect.) I think you will find that your signal is there even without a pre-amplifier, though it may be too close to the noise floor of the sound card to be useful.
|
H: Calculation of 3-phase power in Electric Vehicle Charging
I have a doubt regarding calculation of 3-phase power in EV charging. On the last page of the pdf in the link given below, the power calculation is done as 3 x 230V x 16A = 22kW.
http://www3.fronius.com/cps/rde/xbcr/SID-673FE905-375C8296/fronius_australia/Why_three_phase____An_overview_of_the_benefits_of_a_three_phase_network_1195856_snapshot.pdf
However, I don't understand why is it not √3 x 230V x 16A or 400V x 16A instead. Can somebody explain the calculations with the reason for the same?
AI: The phase to phase voltage is 400V, which gives 230V phase to neutral voltage. \$\dfrac{400}{\sqrt3} = 230\$.
So the formula is \$\dfrac{400}{\sqrt3}\cdot 3\cdot16 = \dfrac{\sqrt3}{\sqrt3\sqrt3}400 \cdot3\cdot16 =400 \sqrt3\cdot16\$. Or \$230 \cdot3\cdot16\$
|
H: Solving the differential equation in control system engineering
While I am continuing my studies of the Norman S. Nise book about Control System Engineering, and while trying to solve exercises of chapter 1, I noticed that I am out of the scope of solving differential equation. I forgot how to solve a differential equation and what the characteristic equation and how to obtain the variables values from initial conditions.
In one of the exercises, the author asked to solve the following equation:
(dx/dt) + 7x = 5cos2t
The solution started with:
(7C + 2D)cos(2t) + (-2C + 7D)sin(2t) = 5cos(2t)
Then:
7C + 2D = 5
-2C + 7D = 0
Which give: C=35/33 ; D=10/53
He gives the following characteristic equation: M + 7 = 0
And the final solution was:
My questions are:
How the author solve the differential equation ? I didn't get his technique nor his method of solving.
IS the following link is good enough to refresh my mind on how to solve differential equation ?
Does control system engineers still solve differential equation by hand like this, or Matlab is always used to win some time ?
AI: How the author solve the differential equation ? I didn't get his technique nor his method of solving.
Typically, you construct a solution from a homogeneous solution and a particular solution.
Homogeneous solution
This is the solution to the problem without excitation, in other words:
$$\frac{dx}{dt} + 7x = 0$$
One way of solving this is by solving the characteristic equation by replacing a derivative with \$\lambda\$, second derivative by \$\lambda^2\$, etc. In this case:
$$\lambda + 7 = 0 \Rightarrow \lambda = -7$$
The homogeneous solution is then:
$$\begin{align}
x_h(t) &= \sum_{\lambda_i} A_i e^{\lambda_it} \\
&= A e^{-7t}
\end{align}$$
Particular solution
This is the solution to the problem with the excitation, ie.
$$\frac{dx}{dt} + 7x = 5\cos(2t)$$
For particular solutions, we just choose a similar expression to the excitation in a smart way. In this case, the excitation is a cosine, so any derivative will be either a sine or a cosine as well with the same frequency. In other words, the particular solution will look as follows:
$$x_p(t) = B + C\cos(2t) + D\sin(2t)$$
Plugging this test in the equation yields
$$\begin{align}
\frac{d(x_p(t))}{dt} + 7x_p(t) &= 5\cos(2t) \\
&\Downarrow \\
\left(-2C\sin(2t) + 2D\cos(2t)\right) + 7\left(B + C\cos(2t) + D\sin(2t)\right) &= 5\cos(2t) \\
&\Downarrow \\
(7C + 2D)\cos(2t) + (-2C + 7D)\sin(2t) + 7B &= 5\cos(2t)
\end{align}$$
In order for this equation to match for all \$t\$, we need that
$$\begin{align}
7C + 2D &= 5 \\
-2C + 7D &= 0 \\
B &= 0
\end{align}$$
Final solution
The final solution is the sum of the homogeneous and particular solutions, and so
$$x(t) = Ae^{-7t} + C\cos(2t) + D\sin(2t)$$
You can think of it as the sum of all solutions that result in \$0\$ and one particular solution that will result in the excitation signal. It's like saying \$1 = 0 + 1\$ with the right hand side the homogeneous and particular solution.
At this point in time, we still don't have a value for \$A\$. This is found by enforcing a certain initial condition. For example, forcing \$x(0) = 0\$ will yield that
$$x(0) = A + C = 0 \Rightarrow A = -C$$
As is the case in your example.
Is the following link is good enough to refresh my mind on how to solve differential equation ?
I am not planning on watching this series of video's so I will reserve my answer for this.
Does control system engineers still solve differential equation by hand like this, or Matlab is always used to win some time ?
While this method does work, I don't think many engineers will still solve differential equations. In control theory, you usually reason with poles and zero's, and how the system behaves if they are moving, are added or removed. A simulator such as Matlab's Simulink can then be used to verify your reasoning and tune the positions of these poles and zero's.
Actually solving differential equations by hand only works for relatively simple (they often aren't) and linear (they often aren't) systems. I believe you will find these types of problems more often in an educational context rather than in practice.
Nevertheless, it is in my personal opinion a good idea to keep these things in the back of your head. There may always be cases where a simple and linear approximation of the problem at hand would be enough.
On a side note, my preferred way of solving this type of problems is by using the Laplace transform. As such:
$$\begin{align}
\mathcal{L}\left\{\frac{dx}{dt} + 7x\right\} &= \mathcal{L}\left\{5\cos(2t)\right\} \\
&\Downarrow \\
sX(s) - x(0) + 7X(s) &= \frac{5s}{s^2 + 4} \\
&\Downarrow \\
X(s) &= \frac{1}{s + 7}\frac{5s}{s^2 + 4}
\end{align}$$
Then you split in partial fractions (I won't calculate the coefficients for keeping this answer shorter)
$$\begin{align}
X(s) &= \frac{A}{s + 7} + \frac{Bs}{s^2 + 4} + \frac{2C}{s^2 + 4} \\
&\Downarrow \\
x(t) &= \mathcal{L}^{-1}\left\{X(s)\right\} \\
&= Ae^{-7t} + B\cos(2t) + C\sin(2t)
\end{align}$$
They should both give the same result. I prefer this method because it doesn't require me to split the solution into a homogeneous and particular one. The downside is that you need to remember your Laplace transforms. It also helps greatly if you know some tricks for splitting in partial fractions.
|
H: Can I guess the Rds(on) at 3.3 V from this MOSFET datasheet?
I ordered some MOSFET switch modules. Because they were advertised as "for Arduino" and "Voltage: 3.3V, 5V", I assumed they had chosen a decent MOSFET for the job (like the IRLU7843 or at least the IRLZ34N). There is no additional circuitry on the modules.
Now I see that they use the IRF520, which struck me as odd, as I remember them to be a bad fit for a microcontroller project.
Here's a datasheet. Is there a way to guess the RDS(on) at VGS = 3.3 V or 4.5 V from it?
AI: Figure 3 show that ID starts at 0 at VGS of 4Volts. The specifications lists the threshold VGS(th) as 2.0...4.0V so I assume the graph is for the 4V worst case. No operation at 3V3!
Assuming you want to use it as a switch, figure 1 shows ID is 1 Amp at VGS and VDS around 4.5V so that would mean a RD(on) of about 4.5 Ohms.
|
H: Which kind of logic latch for an over-current H-Bridge disable?
I have a simple logic circuit requirement, but can't seem to match any standard flip-flop or latch to my needs (SR, JK, D, MS, level-sensitive or clocked, etc).
The circuit is to disable a H-bridge driver IC if an over-current situation is detected (via a Allegro ACS770 analog-output hall-effect current sensor input to a window comparator, creating the OverCurrent logic-level).
The DISable signal must stay active even if OverCurrent falls back to inactive, until the BridgeEnable is at least deactivated, or optionally deactivated and then reactivated.
Inputs:
BE (BridgeEnable), active-high.
OC (OverCurrent), active-high or active-low, I can flip the comparators either way.
Output:
DIS (Disable), ideally active-low.
This timing-diagram shows the functionality I'm looking for:
Suggestions?
AI: You can use a standard SR latch. When you make them out of 2 NOR gates, the 1,1 input state, often thought of as pathological to people just wanting a latch, actually performs the logic operation you are looking for.
simulate this circuit – Schematic created using CircuitLab
I'll let you draw out the truth table properly and confirm that it does what you want.
Note that NOR1 always outputs 0 if overcurrent is true, regardless of what BE is doing. And DIS is active low!
|
H: Is it OK to put traces under castellated PCB
If we would speak in general: what is the strength of the solder mask in terms of breaking voltage?
So if we put one PCB with castellated pads on another board like this:
What will heppen if both PCBs would have traces one on another (meaning bottom layer of the top PCB and top layer of base PCB)?
I'd say that it should be OK for low voltage schematics. But what if the voltage is 230 VAC?
AI: I would advise to prevent traces underneath submodules.
Soldermask is not an excellent insulator, and the thickness may vary.
Aside from insulation, you might encounter interference as well. Especially when these modules provide wireless functionality or power.
When you have to, check the module if there are any exposed pads or via's. And read the datasheet, so you can route around critical area's.
230 VAC, assuming from mains, isn't clean 230V. It already has a higher DC peak, and it will have transients. That would definitely be a no.
But when the module has nothing on the bottom, I have no arguments against it.
|
H: How can I assign a 256-bit std_logic_vector input
I realized an AES-256 algorithm which encrypts a 128-bit std_logic_vector (plain_text) with a 256-bit std_logic_vector (master_key). I made a test-bench in order to verify the behavior of the encryption process, and now I would like to implement this algorithm on my Basys3 board (I use Vivado as IDE). My questions are:
How can I map the input vectors? Should I declare signals in my architecture, knowing that I do not have enough I/O ports?
AI: A serial interface uses the least amount of pins. From all the serial interfaces SPI is the easiest to implement. (I think it is about five lines of code). As an SPI interface streams data in and out at the same time you can also use it to read the result.
Ok, I just tried and it was a bit more then five lines mostly dealing with the synchronisation of the SPI signals to an (internal higher frequency) system clock.
The following code was quickly hacked together and seems to work:
//
// Simple dumb SPI interface:
// one big long shift register
// Relies on a system clock which is
// much faster then the SPI clock
//
// User MUST send the right amount of bits in one go.
//
module spi_dumb
#(parameter DW = 128) // Number of internal data bits
(
// Usual system signals
input clk, // system clock
input reset_n, // system reset
// SPI interface
input sclk,
input sel_n,
input mosi,
output miso,
// Internal data interface
input [DW-1:0] par_tx, // Data to transmit
output reg [DW-1:0] par_rx, // Data received
output reg valid // Data has arrived
);
reg sclk_meta,sclk_sync,sclk_prev;
reg seln_meta,seln_sync,seln_prev;
wire clock_edge;
// assign clock_edge = ~sclk_prev & sclk_sync; // Rising edge
assign clock_edge = sclk_prev & ~sclk_sync; // Falling edge
always @(posedge clk or negedge reset_n)
begin
if (!reset_n)
begin
valid <= 1'b0;
sclk_meta <= 1'b0;
sclk_sync <= 1'b0;
sclk_prev <= 1'b0;
seln_meta <= 1'b0;
seln_sync <= 1'b0;
seln_prev <= 1'b0;
end
else
begin
// Sychronise the clkc and select
sclk_meta <= sclk;
sclk_sync <= sclk_meta;
sclk_prev <= sclk_sync;
seln_meta <= sel_n;
seln_sync <= seln_meta;
seln_prev <= seln_sync;
// On falling edge SPI-Select load the shift register
if (seln_prev & ~seln_sync)
begin
par_rx <= par_tx;
valid <= 1'b0;
end
// On rising edge SPI-Select mark the data as valid
if (~seln_prev & seln_sync)
valid <= 1'b1;
// If SPI select is low and we have a clock edge pick up the data
// We assume the mosi data is stable by then
// (~Two system clocks after SPI clock edge)
if (!seln_prev && clock_edge)
par_rx <= {par_rx[DW-2:0],mosi};
end
end
assign miso = par_rx[DW-1];
endmodule
/*
*
* Auto generated testbench, generated Wed Jun 20 11:04:23 2018
* post edited
*
*/
module spi_dumb_test;
localparam CLK_PERIOD=100;
localparam DW= 128;
// Usual system signals
reg clk; // system clock
reg reset_n; // system reset
// SPI interface
reg sclk;
reg sel_n;
reg mosi;
wire miso;
// Internal data interface
reg [DW-1:0] par_tx; // Data to transmit
wire [DW-1:0] par_rx; // Data received
wire valid;
integer bit_count;
reg [DW-1:0] master_tx; // Data to transmit
reg [DW-1:0] master_rx; // Data received
initial
begin
// Usual system signals
reset_n = 1'b0;
// SPI interface
sclk = 1'b0;
sel_n = 1'b1;
mosi = 1'b0;
// Internal data interface
par_tx = 'b0;
#(5*CLK_PERIOD) reset_n=1'b1;
#(5*CLK_PERIOD) sel_n = 1'b0;
par_tx = 128'h12345678_11111111_87654321_A5C33C5A;
master_tx = 128'h23242526_34353637_45464748_56575859;
for (bit_count=0; bit_count<128; bit_count=bit_count+1)
begin
#(5*CLK_PERIOD) ;
// Tx & RX master emulation, MS bits first
mosi = master_tx[DW-bit_count-1];
master_rx[DW-bit_count-1] = miso;
sclk = 1'b1;
#(5*CLK_PERIOD) ;
sclk = 1'b0;
end
#(5*CLK_PERIOD) ;
sel_n = 1'b1;
#(50*CLK_PERIOD) $stop;
end
spi_dumb
#( .DW (DW) ) // parameters
spi_dumb_0 (
// Usual system signals
.clk (clk), // system clock
.reset_n(reset_n), // system reset
// SPI interface
.sclk (sclk),
.sel_n (sel_n),
.mosi (mosi),
.miso (miso),
// Internal data interface
.par_tx (par_tx), // Data to transmit
.par_rx (par_rx), // Data received
.valid (valid)
);
// Generate clock.
initial
begin
clk = 1'b0;
forever
#(CLK_PERIOD/2) clk = ~clk;
end
endmodule
Post edit 2-7-18: found that begin end pair was missing.
|
H: Is there any other similar file format like BLIF?
I bump into Cingulata project which uses Berkeley Logic Interchange Format (BLIF) to represent circuit. I find BLIF file format is a very human-friendly text file format and easy to understand, and am curious to know whether there are other similar text file formats. But after some googling, I can't find a counterpart like BLIF file. Besides BLIF file, is there any other similar file format? Very sorry for this layman question.
AI: yes, there are. You can have all kinds of RTLs:
basic SPICE-style NET files, you can have
gate networks "backconverted" to a HDL (Verilog, VHDL),
AIGER
BTOR
EDIF
InterSynth…
And of course, all the proprietary RTLs of the FPGA vendors.
|
H: The materials used in an electrical grid going from power station to house
In getting an overview about how Electrical Grids work, I was hoping to connect the dots from voltage up to the materials (used in modern electrical grids).
I am wondering if one could outline briefly the high-level materials / components used in building one. This could just be as simple as a stereotypical design, or a more modern idealistic one.
I am basically hoping to get introduced to the structure of some of the main pieces so I can look further. The wiki page only talks about voltage and distributing electricity. The Power station page has more of what I am looking for but doesn't describe materials/construction. As an example, my attempt at describing an electrical grid system is this: "An electrical grid is composed of a set of power stations (which generate the energy) and a set of wires? (which transmits the energy) to a green box in your neighborhood. The wires to the green box are wrapped in x rubber and made out of 70% copper and 30% x generally. They are on average 1-inch thick, so they can carry x voltage. The power station stores the electricity in big batteries made out of x, surrounded by concrete to prevent electricity leakage. They have motors made out of x, y, and z typically too.." As you can see, I don't know what I am talking about lol, this was just a demo. Essentially, just a high-level intro to the materials and components when going from power station through the grid to the house. Thank you so much for your help. I know it sounds broad but I am really just hoping for a few sentences to get introduced and get started with learning more, given the terminology.
I have seen basic documentaries describing aspects of wind/solar/energy production, so I understand the gist of that. But hoping to put names to the materials of things so I can learn more about the physics of it.
AI: The first thing I'll tell everyone who asks about electrons is to ignore them; the energy is in the electrical and magnetic fields.
Generally power is transmitted using aluminum for high-voltage overhead lines (because it weighs much less than copper) and copper for the lower-voltage "last mile" transmission, although the details of this may vary by country. Some Americans still have aluminum wiring in their houses, from before it was determined to be a fire hazard. The characteristic electricity pylons are usually structural steel.
Power station and wind turbine etc generator windings are nearly always copper. The copper is nearly pure: http://copperalliance.org.uk/copper-and-its-alloys/alloys/copper-conductivity-materials-database/electrolytic-tough-pitch-copper
Wire diameter is determined by required current capacity. There are standard tables for determining this based on assumptions about heating etc.
Wire voltage determines how much insulation is required; the high-voltage overhead wires aren't actually covered in insulation, but they are held away from the towers by ceramic insulating standoffs.
There are very, very few grid batteries and they are all somewhat experimental - electricity must be generated as it is used. There's a bunch of other questions on this site about how that's achieved.
A bit of googling has found this PDF listing some common cable types, their voltages and construction materials.
|
H: A question about circuit design with a multivibrator
I want to implement a pulse extender with a retriggerable multivibrator IC called CD74HC123EE4. Here is the datasheet.
The input will be a 32Hz pulse train with a 5 µsec duty cycle; and at the output the duty cycle will be stretched up to 1.5ms. It is okay to keep the duty cycle between %30 to %60.
Based on some examples I came up with the following circuit:
Even though it is extremely slow to simulate this, it seems fine in simulation.
There is also this document and it has a section called "Operating Rules". And somewhere else I read that the input better not exceed 4V(Thats why I use R4 and R2 at the input to lower 5V to around 4V input). I tried to follow "Operating Rules", but before I implement this I wanted to be whether there is some fundamental error or mistake. Is this circuit fine enough for the purpose?
AI: The circuit looks fine to me.
You should mention where the I read that the input better not exceed 4V comes from. Indeed it is not advised to make any input voltage higher than the supply voltage. So if you supply the IC from 5 V you are allowed to take the inputs (all inputs!) up to 5 V. I do not understand why 4 V should be the limit for that.
The reason you don't want to exceed the supply voltage at the inputs is due to the ESD protection diodes as these start conducting when Vin > Vcc + 0.5 V.
By itself that is not an issue (it will not damage anything) as long as the current (into an input and through the ESD diode) is limited. You took plenty care of that with R4. So as far as I am concerned you can remove R2 and D1 as R4 by itself protects the input more than enough already. But R2 and D1 also do no harm so it is your choice to remove them or not.
|
H: RF design stitching vias
Having no past experience on RF design I have recently been taught that placing stitching vias is a good practice. Reading the "definition" of stitching vias I am not sure that I can distinguish stitching vias from common vias. The definition I have read is from Altium:
Via stitching is a technique used to tie together larger copper areas on different layers, in effect creating a strong vertical connection through the board structure, helping maintain a low impedance and short return loops. Via stitching can also be used to tie areas of copper that might otherwise be isolated from their net, to that net.
Is there a difference in functionality between the two types of vias?
--------EDIT---------
Thank you both for the replies. You are very helpful. My design is based on RN2483 package which includes a MCU and a RF IC. If you check RN's bottom layer it is obvious (or I make a guess) where the RF IC is located because there are stitching vias.
On my PCB should I place similar vias?
Here is my current layout:
Now all the vias are connected to GND on top layer. Ignore the one that is overlapping the RFH trace. Now I will add a ground plane to bottom layer as well.
I am open to suggestions/corrections because as I stated it is my first RF design and I lack knowledge.
AI: Perhaps pictures might help. The images below are from a design I recently completed.
The schematic:
This is a RF module designed to operate at around 870MHz, and the schematic shows functional connections, but as this is RF, the layout needs a bit more care:
Although the actual vias are the same size as the rest of them in this area, the ones highlighted by black lines are stitching vias and are not listed as functional connections in the schematic, but are really necessary here.
My rule of thumb for spacing is 1/10 of a rise / fall time for high speed digital and 1/10 of the fastest rate for a sinusoidal signal.
The track to the SMA at the bottom is a co-planar waveguide, where the spacing to the surface plane needs to be maintained, which is why stitching is really a necessity here.
|
H: Two phase latch max delay constraint
In this timing diagram, why am I not including tcpq, i.e. the latch clock to Q propagation delay?
AI: This example uses transparent latches instead of edge-triggered flip-flops, and notice that the data inputs (D1, D2, D3) are changing while the latch enable signals (\$\phi1\$ and \$\phi2\$) are high (asserted). Therefore, the important delay parameter is from when the input changes until the output is valid, \$t_{pdq}\$.
If the circuit used edge-triggered flip-flops then \$t_{cpq}\$ would be relevant. If the data inputs to the latches changed only while the latch enable was deasserted then the delay from the enable to Q would be relevant.
|
H: Voltage regulator frequency range
I'm designing a new encoder pulses counter for my project, my encoder HE50B uses a 12-24 VDC Input, and it has 1,000 pulses per each revolution. also the maximum permissible speed is 5,000 RPM.
Now I want to count the output pulses of this encoder by my micro-controller ATMEGA-32 which has 5 VDC input ports, so I have to buck the output voltage of the encoder to reach this value.
My question is: which is better to do that (taking in consideration the output frequency of the encoder)?
using a 2-stage inverting op-amp to buck the voltage from 12VDC to 5VDC or
use a regular voltage regulator such as 7805 and it will work fine with that high frequency switching.
AI: Neither. You should use a potential divider:
simulate this circuit – Schematic created using CircuitLab
edit: Just to add, this will give a 0-4V wave at 24Vin, and a 0-2V wave at 12Vin. This is still fine, because the Atmega32 (supplied at 5V) will see anything above 2V as a "1".
|
H: What is the difference between the circuits?
I found the trigger (latch) circuit:
When no button is pressed, the LED does not light, if you press SW1, the LED will light up, and will light until you press SW2.
This can work for different values of the resistors (R2, R3, R7, R8).
What will be the difference, if we put for R2 and R7, instead of 300 Ω, 5.1 kΩ, and R3 and R8 instead of 5.1 kΩ, 1 kΩ?
I added both circuits. The LED (D1) is used as an example of a load.
simulate this circuit – Schematic created using CircuitLab
simulate this circuit
P. S. Q1, Q3 is KTC945P (2SC945P):
https://alltransistors.com/pdfdatasheet_nec/2sc945.pdf
Q2, Q4 is 2SA1273:
http://rtellason.com/transdata/2sa1273.pdf
AI: Instead of just poking at random values and asking what difference they make, stop and actually think about the circuit. Once you understand what each part does, you'll be able to find acceptable values for them yourself.
Q1 and Q2 are arranged with positive feedback so that they have two stable operating points. When Q1 is off, Q2 is off, which then does not try to turn on Q1.
When SW1 is pressed for a little while, Q1 is turned on. This pulls the bottom end of R2 low, which turns on Q2. That pulls the top end of R4 which, which turns on Q1. Each transistor being on keeps the other on.
When SW2 is pressed, it turns on Q3. That shorts the base of Q1 to ground, turning it off. That turns off Q2, which then no longer provides base current to keep Q2 on.
So now you should be able to see for yourself what a good range of values for the resistors are.
First, let's see how much current Q1 needs to sink when on. You haven't provided a datasheet for the 2SA1273, so we'll arbitrarily assume they can be counted on to have a gain of at least 30.
The main job of Q1 is to turn on Q4, so it can power the load. The load is a unspecified LED emitting visible light. The lowest voltage drop for such a LED would be 1.8 V for a red one. Figure another 200 mV for Q4 when saturated, leaving 2.5 V across R9. That results in 11.4 mA, so we'll round that up to say the load won't exceed 12 mA.
With a gain of 30, that means the base current of Q4 must be at least 400 µA. The purpose of R8 is to make sure Q4 is off when not being explicitly driven. Lower values turn it off faster. Since you haven't specified speed, there is no way to say whether 5.1 kΩ or 1 kΩ is more appropriate. If speed was no issue, I'd probably use 10 kΩ. Let's use the worst case for the rest of the circuit, which is 1 kΩ. Figure the B-E drop of Q4 is 700 mV when on, so R8 draws another 700 µA. That means a total of at least 1.1 mA must flow thru R7 to turn on the load.
Again figure 200 mV for a saturated Q1, and we've already said the B-E drop of Q4 is 700 mV. That leave 3.6 V across R7. (3.6 V)/(1.1 mA) = 3.3 kΩ, which is the largest that R7 can be. I would therefore use 3.0 kΩ or less. 5.1 kΩ is too high. 300 Ω is excessively low and just causes wasted current. Something in the 2.0 to 2.7 kΩ range would be a good tradeoff.
Let's say we used 2.0 kΩ for R7, so the current thru it would be 1.8 mA. That's the main current that Q1 needs to be able to sink when on. From inspection, we can see that the current to drive Q2 can be much smaller than that. Let's therefore work backwards requiring Q1 to sink 2.0 mA.
With Q1 on, there will be 140 µA thru R5. The base of Q1 needs (2.0 mA)/30 = 70 µA. R4 must therefore supply a total of 210 µA to keep Q1 on. Using our usual C-E and B-E voltage assumptions, that means R4 must be 17.1 kΩ maximum. The 5.1 kΩ value shown will therefore work fine.
With R4 of 5.1 kΩ, Q2 must source 710 µA. That means its base current only needs to be 24 µA to keep it solidly on. The gain is probably lower at such a low current, so let's say we want to give Q2 at least 100 µA of base current to keep it on.
Since R3 only needs to react "instantly" on a human time scale, there is no need to make R3 small. I would use 10 kΩ. With R3 of 10 kΩ, it requires 70 µA to keep Q2 on. That plus the 100 µA we already decided for the Q2 base current means the current thru R2 has be to at least 170 µA. That means it must be no more than 21 kΩ. I'd probably just use another 10 kΩ resistor. 300 Ω is excessively low, and violates the current requirements we assumed for Q1. Even 5.1 kΩ is unnecessarily low.
Added
You now say that you want to support a final load current of 220 mA, and that the gain of Q4 is 185. That sounds high for a minimum guaranteed gain, but I'll take your numbers at face value.
The base current needs to be at least (220 mA)/185 = 1.2 mA. R8 is only to turn off Q4 when it is not being actively driven on. You haven't said anything about speed, so let's make that 10 kΩ. Let's say now B-E is 750 mV. That means R8 would take 75 µA. The minimum R7 current is now 1.3 mA. Figure Q1 saturates at 200 mV, and we already said the B-E drop of Q4 is 750 mV. That leaves 3.55 V across R7. By Ohm's law, the maximum R7 value is therefore (3.55 V)/(1.3 mA) = 2.7 kΩ. I'd round down to the next common value of 2.4 kΩ at least.
Now you have to go back and update the min required current sink value for Q1, and ripple thru all the downstream calculations from that as shown above.
|
H: Index of frequency larger than power spectrum length
I am new in this community. So excuse me if it seems easy.
I want to calculate the amplitude of a specific frequency in a signal.
The frequency precision is (relevant question)
$$
df = \frac{fs}{NP}
$$
$$ fs=1/dt$$
NP is the number of points in the signal time seri.
The index of the frequency in the signal is
$$
ind = \frac{f}{df}
$$
the length of power spectrum array of signal is length(pxx) = NP/2-1
Example 1: for small frequencies
frequency = 1.0/128.0
dt=0.4
df = 0.001
NP = fs/df=2500
index of the signal = 8
lenght of pxx is 1249 so no problem.
Example 2: for large frequencies
freq = 2.0
dt=0.4
NP = fs/df=2500
index of the signal = 2000
The index of the frequency is larger than the number of points in pxx.
If I double the number of points in the signal, the frequency precision halves and the index of frequency also doubles.
Is there a frequency limit or I am doing something wrong?
Thanks for any guide.
AI: Any Discrete-Time Fourier Transform (with constant sampling frequency) will only give information about the signal up to a frequency of
$$f = \frac{f_s}{2} = f_N$$
\$f_N\$ is called the Nyquist frequency. Frequencies in the signal higher than \$f_N\$ are subject to aliasing (related to the Nyquist-Shannon sampling theorem).
So if you want to find information about a certain frequency \$f_x\$, you will need at least a sampling frequency of \$f_s > 2\cdot f_x\$ and extra to accommodate for an anti-alias filter.
Increasing the number of points will only increase the resolution, without changing the Nyquist frequency.
|
H: reason for etching the green mask
I found the following board in random research. Can anyone explain the reason for etching the green mask in red color circled area and that too patterned?
The other side of etch is the processor IC.
AI: As comments have already pointed out, it's being used as a heat sink. The vias in that area connect to the thermal pad on the bottom of the IC, which is in turn connected to the substrate to conduct heat from the chip itself. Since the processor is likely surrounded by its own pins, the most effective way to spread out the heat is on the ground plane on the bottom side of the board.
You can see that a large section of the side in the photograph is contiguous ground plane, and that traces have been routed around it to keep it large. It still has to go somewhere, though, and the most convenient process for that is convection or conduction. Not having the assembly, I can only guess that it's convection, but the large center hole makes me wonder if it was contacting something solid.
In either case, the solder mask serves as an insulator preventing the heat from leaving the ground plane. It's removed to allow better heat transfer.
As far as the distinctive shape of the cutout, I can only assume that the designer of that board knew more than I do, either about convection in general or about the specific requirements of that product.
|
H: How to understand a battery specification
I read a data sheet of a li-ion battery to use it in my project. In the data sheet, it is mentioned that c5mah= 2200mah. I couldn't understand what that means. Please help me with understanding that.
AI: In the data sheet, it is mentioned that c5mah= 2200mah. I couldn't understand what that means. Please help me with understanding that.
"c5mah" (sometimes written as C5mAh or C5mAh) means the capacity (in mAh) which a battery has, when discharged at the 5h rate i.e. the rate which fully discharges the battery in 5 hours, from a specified fully charged state, down to a specified fully discharged state (e.g. perhaps down to 2.75V for a Li-Ion cell, but check your specific datasheet).
In your specific case, the discharge current for the C5 rate is calculated as:
$$\textrm{2200mAh / 5h = 440mA}$$
So discharging a fully charged 2200mAh battery of that type, using a constant current of 440mA, would discharge the battery (down to their specified end condition - see the datasheet for details) in 5 hours. That's it.
You can think of C5 as being a tighter definition (more constrained specification) of "C", the battery capacity, as it gives a specific test condition i.e. the discharge current. Note that a battery's C2 (or C1) capacity value will be less than its C5 capacity value. Whereas its C10 or C20 capacity value will be more than its C5 capacity value.
Other test conditions will also be specified, as they affect battery capacity too e.g. temperature, end voltage (i.e. fully discharged voltage) etc. That is why there isn't a fixed value for "C" which applies under all test conditions.
(As others have said, in future, please supply a link to, or relevant screen captures from, any datasheet that you ask questions about.)
|
H: PCB layer stack up practices
Sorry in advance for the newbie question, but I can't seem to find a good answer. Recently, I've gotten into printed circuit boards and it is all still fairly new. I'm working towards creating a 4 layer pcb and I'm curious common practice for layer stack up. I've seen some places that use the outer layers as signal layers and internal two layers as GND and VCC and vice versa other places.
Is there any stack up for a four layer board (or any amount of layers for that matter) that is particularity advantageous?
Also from previous research it seems that having both a GND and VCC plane creates a small amount of capacitance, why is this useful?
AI: I generally try to keep my signals on the outside layers and planes on the internal layers, though this is highly dependent on the design. Having capacitance between two planes is advantageous because it provides a little bit of immunity to noise on the supply line that could otherwise couple into the circuit. Sometimes you may want to shield traces carrying sensitive signals, in which case you might put those on an internal layer and put grounds on the external layers. There really isn't a one-size-fits-all answer - it is highly dependent on your particular design and what signals and components you have.
This is why it is very helpful to have a firm understanding of electronic systems and how environmental factors and parasitics affect signal quality when designing PCBs. Without this knowledge and understanding you're effectively taking a shot in the dark at whether or not it will work as expected.
I can't seem to find a good answer
This is because the "good answer" will be different for every design for different reasons.
|
H: Need equivalent for diode
I could not find the datasheet of this diode. I need an equivalent, could you help me?
AI: The two triangle symbols strongly suggest that this device contains two diodes with their cathodes connected together. Each outer pin is the anode of one of the diodes, and the center pin is the common cathodes connection.
Otherwise, the "17" and "9D" are short product codes, not full part numbers. Even if you knew the manufacturer, you'd have to dig thru datasheets of likely parts to see which one matches this product code.
If you know something about the application and circuit these diodes are in, then you can spec a replacement. The first parameter to know is the maximum reverse voltage the diodes would ever experience. The current rating can't be very high just from looking at the package. If the diodes are used as line frequency rectifiers, then any two diodes that can withstand the reverse voltage and can handle 1 A forward current should do fine.
If this is in a switching application, then reverse recovery time probably matters, and things get more complicated.
|
H: Inside of 2.4 GHz Dipole Antenna
I bought the following dipole antenna:
Now I want to add some extra simple reflector and directors next to this dipole to construct a Yagi-Uda antenna. For this aim, I need to know where is its feeding point (its center for a dipole antenna ). Eventualy I removed the cover of the antenna as follows:
My question is that where is the feeding point of this antenna In this last figure? Is it as in the following figure? If it's not, could you show it?
By the way, the antenna link is here : with an NRF24L01 Module
AI: That is a quarter wave monopole antenna and it is end fed by an unbalanced coax feed from an unbalanced (ground referenced) source. It's not a half wave dipole (balanced centre-fed) so it won't make a good choice for a Yagi antenna.
|
H: What are good resistance values for stepper motors?
I've got some NEMA standard stepper motors, and I've been measuring the resistances of the coils to check if the motors are bad. All 3 yielded the same result, but that doesn't mean they're right.
The results that I got for the 4 connections (ABCD) I got the following:
AB: 1.9 Ohms
AC: Inf.
AD: Inf.
BC: Inf.
BD: Inf.
CD: 1.9 Ohms
Are these resistance measurements correct for a working stepper motor? If not, what would need to change?
AI: These are correct DCR values for a 2phase standard bipolar driven stepper. The two orthogonal coils are isolated.
The surge current starting and stopped is resistive V+/R .
As in Chokes the DC resistance is called DCR. When moving quickly to the next pole , some back EMF will reduce the current slightly.
You can accelerate more with higher voltage and thus more current but while stopped, you may not need the same holding torque , so idle voltage is often reduced to required heat rise vs holding torque tradeoff.
Steppers are not as stiff as Servo feedback motors but much simpler for open loop servo control.
|
H: 3.7V battery charger analyse
I have extract this schematic from youtube (only charger parts) and create this on falstad because I want to create 3.7V battery charger. The original charger use 1N4007 diode with BC547 transistor. I have only 1N4001 diode and 2N3904 transistor, can I use this in place? Is this circuit good or bad? I read my specs for my battery and I read 4.2 V for charge and 2.75 V for discharge, 3.7 V 70 mAh, but, my first TP point is 5 V. But probably, the battery act as resistor and then voltage down. I learn about to simulate lipo for confirm that. For any advice, thank you, sorry for my english.
AI: Is this circuit good or bad?
Very bad.
1) For a "fully discharged" battery (2.75 V), it will only produce 22 mA of charge current. 5V -2.75 = 2.25 volts across 100 ohms.
2) At "fully charged" (4.2 V) it will continue to supply 8 mA of current into the battery.
So it will provide a VERY slow recharge, and will then do a sort of "trickle charge" after a very long time, which is not how you should charge Li batteries.
3) At no time will the "Full" and "Charging" LEDs change their brightness, since they are driven by the 5 volt supply, and that will not change with the current levels mentioned above.
4) The "Full" LED will never be on very brightly. Assuming that the "Full" LED is blue, it will have a turn-on voltage of about 3.5 volts. Then the 10k resistor ensures that the LED current will never get to more than about 0.08 mA ((5 - 3,5 - 0.7)/10000). This is hardly bright.
5) At the same time, this will produce 0.08 volts across the 1k resistor and the NPN base, which will not turn on the transistor. So the "Charging" LED will always be full on. Assuming a red LED with a 2 volt Vf, this will produce about 15 mA in the LED.
6) If you were to connect the 10k to the battery itself, that would at least make some sort of conceptual sense, but it still wouldn't work. The combination of 10k and diode drops would ensure that the LEDs would never change.
EDIT - Having watched part of the Youtube (I don't speak the language used - Hindi?) It's clear that the 5 volt supply must be current limited to the desired charge current. Also, the 10k shown in the OP is incorrect - it's a 10k variable resistor which is set for some lower resistance than 10k. Presumably the procedure for setting the pot is discussed in the video, but I am unable to evaluate it. Under these circumstances, the circuit might work, sort of.
An important point to consider is that the circuit has no automatic shutoff. The user must monitor the circuit, and when the "Full" LED turns off the user must disconnect the battery. The claims in the Youtube that the circuit is safe are only true if this occurs. Otherwise, the guy who made the video is simply displaying his incompetence.
END EDIT
2ND EDIT
I forgot to mention that the Youtube circuit has no resistors in series with the battery. I have no idea where those 50 ohm resistors came from, and I have no idea why anyone would want to put them there. At the very least, they will prevent drawing more than a few mA from the battery to the load. If the "Blink LED" is the only load, it will work well enough, but at the same time is unnecessary given the 1k limiting resistor.
So, yeah, this is a bad circuit.
END 2ND EDIT
|
H: Protecting microcontroller output
I'm designing a very simple microcontroller breakout board. I wonder how can I protect microcontroller output pins against accidentally connecting another signal to one of them and burning the pin's output driver (because it's an output not input) ? Would a small (say 10 ohm) resistor in series to the pin be enough to protect it ?
EDIT: For example mistakenly switching UART RX and TX line.
AI: Typical microprocessor GPIOs look like this:
Source: http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/raspberry-pi/gpio-pin-electrical-specifications
the first thing to go in an over voltage situation is usually the protection diodes, which have a power and\or current rating (or a general GPIO current rating) that you can find in the datasheet. If the protection diodes go out then its a guess to figure out what goes next as this is dependent on the IC. But a good design should prevent the diodes shouldn't be burned up.
10V to 3.3V through a 10 ohm resistor is still 670 mA which is enough to burn out any microprocessor.
You'll need a little more than 10Ω, try 10kΩ then you would get 6.7mA which would probably be acceptable in most applications.
Another thing would be to put another pair external diodes to protect the inputs in conjunction with the resistor to make sure they don't get overloaded.
If a higher resistance value won't cut it because of speed issues, then you may want to go with an buffer that can tolerate a wider input range.
|
H: PIR sensor outputs HIGH for too many seconds
I've a pretty simple set up which consists of a PIR sensor and ESP8266.
This PIR sensor outputs a HIGH value when presence is detected. This HIGH value lasts for 8 seconds.
I want this trigger to wake up a ESP8266 chip from a deep sleep. To do so, I must send a LOW to the RST Pin.
So with a NPN transistor, I switch it LOW once PIR outputs HIGH.
This works. However, as the HIGH lasts for 8 seconds, the RST remains in LOW and the ESP does not boot until it's back to HIGH.
So question is: Is there any way to convert this long output to become a fast "trigger"?
I attach an screenshot of the schematics in case it helps.
(credit of the picture: https://github.com/rgrokett/ESP8266_PIRv2/blob/master/ESP8266_PIRv2.pdf)
AI: I think will create enough of a blip to reset the ESP:
simulate this circuit – Schematic created using CircuitLab
|
H: How to switch composite video signal inputs to one output
what I want to do
To switch composite video signal inputs to one output.
conditions
4 inputs to 1 output
all inputs and output are composite video signals with RCA connectors
12VDC used for power supply
Arduino used for switching
I've been wondering which stackexhange site to post this question, https://electronics.stackexchange.com/ or https://arduino.stackexchange.com/. But this one seemed rather "electrical" to me so I chose this community.
details
I'm trying to install video cameras and a LCD monitor to my car. Something like checking rear view image when I'm going backward would be helpful. But Commercial video switchers are not cheap and touching a mechanical switch while driving is not very safe. So I'm trying to find a solution for this.
After hours of searching, my crude solution was below.
simulate this circuit – Schematic created using CircuitLab
transistors used for switching
Arduino analog port used for switch signals
a momentary switch is connected to Arduino. You push the switch to cycle through video input signals (e.g. input1 -> input2 -> input3 -> input4 -> input1 -> ... for each push)
only one transistor is "turned on" at a time. When you want to switch to other inputs, all the switch signals are turned off then the target switch is turned on.
The grounds of the inputs, switch signals and output are the same.
However, this is too primitive. So I started searching again. Here is a list of articles I checked.
How to switch composite video signal inputs to one output - Electrical Engineering Stack Exchange
audio - Switching RCA composite video, under uC control - circuit ideas & suggestions - Electrical Engineering Stack Exchange
Arduino controlled video switch - Electrical Engineering Stack Exchange
In the third one, I found out there's a such thing as video switching IC. After further searching, NJM2595 (data sheet) seemed good to me.
5-input 3-output
Operating Voltage ±4.0 to ±6.5V (I'm going to use 12V-5V DC-DC converter)
not so expensive (around $1)
Here is a circuit I'm going to implement.
simulate this circuit
EDIT : checked @mguima's answer and revised circuit diagram
(Sorry about the messy diagram. I just tried to put inputs to the left, outputs to the right, power supply to the top and ground to the bottom.)
Note
digital output pins of Arduino used
Vin+, - at the left top are external video signal inputs.
NJM2595D (pin shape : DIP16) used instead of NJM2595M (pin shape : DMP16) due to easy mounting on PCB.
a custom built PCB used with a flat and big ground pattern to reduce noise.
resistors and capacitors around the input and output pins. I got this idea from the Application Circuit section of the IC datasheet.
decoupling capacitors after video inputs and 5V supply placed less than 0.1 inches away from the IC pins to AC couple the signal and reduce noise.
75 Ohm series termination resistor placed less than 0.1 inches away from the IC output pin to reduce the parasitic capacitance and inductance effect
Is it feasible? If not, what would be an solution for this?
AI: Yes, it seems feasible.
The bipolar transistors will not be a good solution. There are other ICs that could do this job, but this chip NJM2595 seems to be a very good and proper solution. About 10 years ago I tought about doing a project like this, but at that time I didnt find a IC like this (I tried a chip DG411 that didnt worked well with video, so I "closed" this project).
I would suggest that you download and read all the datasheets of other chips of the same function, even if you already decided for NJM2595, because those datasheets can be instructive and give good design ideas.
Of course, you'll need a custom built PCB (don't use perboards; video signal is critical), but as this chip needs just a few extra components, this will not be a very complicated PCB - but this is about your level of experience.
EDIT: Since this is a SMD IC, consider about using an adapter PCB (search for "breakout board") like this, for an easier soldering of the final PCB:
Google about the PCB layout requirements, e.g. take a read of this whitepaper (AN-6041 PCB Layout Considerations for Video Filter / Drivers
|
H: How should I protect from overvoltage ADC?
I have a microcontroller with a built in ADC that I am using to read from an input pin (ATMEGA328P to be specific). I want to allow switching of resolutions on the input for our users (0-5V range, and 0-10V range) which i was planning on doing via a voltage divider. The thing I'm worried about is if the user has our unit in 0-5V mode and plugs in a higher voltage by mistake. I want some sort of overvoltage protection on the output of the voltage divider to protect my ADC. I don't care if this is a crowbar circuit that doesn't reset without removing power, anything that protects the unit will do. I'm open to all suggestions. Thanks!
AI: You can use a non-inverting comparator op-amp such that the basic configuration for the circuit detects when the input signal, VIN is ABOVE or more positive than the reference voltage, VREF producing an output at VOUT which is HIGH as shown.
credits go to : electronics-tutorials.com
With the help of a NPN you can pull the voltage applied to the ADC Pin down to zero by using this circuit " one of my designs "
|
H: Driving a Common Anode RGB LED Using a uC
I have an RGB LED, APHF1608LSEEQBDZGKC, (Datasheet) which is common anode. The blue and green diodes both have a forward voltage of 2.65V while the red has a forward voltage of 1.8V. I want to minimize component count while driving this LED with the TI CC2640R2F embedded MCU (Datasheet). My circuit is running off of a 3V regulator and my plan is to use the analog GPIO pins on the MCU to control the LED.
The first problem is that the current would be flowing into the GPIO pins.
The second problem is that 3V is higher than the forward voltages of the LEDs.
Therefore, my question, would it be possible to, for the green diode, feed 3V into the common anode, and then connect the cathode to an analog GPIO pin set to .35V thereby creating a 2.65V drop over the LED? I am trying to minimize component count and current draw, any suggestions are welcome.
AI: My circuit is running off of a 3v regulator and my plan is to use the analog GPIO pins on the MCU to control the LED.
So far, so good.
The first problem is that the current would be flowing into the GPIO pins.
That's not a problem. Current sinking is very common.
The second problem is that 3 V is higher than the forward voltages of the LEDs.
Good catch.
Therefore, my question, would it be possible to, for the green diode, feed 3 V into the common anode, and then connect the cathode to an analog GPIO pin set to 0.35 V thereby creating a 2.65 V drop over the LED?
No. GPIO pins have three possible states:
High: The output is connected to the MCU's positive supply.
Low: The output is connected to the MCU's ground.
Input: The output is neither pulled high or low unless a pull-up resistor is enabled.
You can not use a GPIO as an analog output.
A current limiting resistor is required for R, G and B.
|
H: What does this resistor do in this RTD wheatstone bridge?
The question is in bold at the bottom, the following is background.
I am going to measure air flow with a hot wire anemometer using the FS7 sensor from Innovative Sensor Technology (IST). They provide an application note for the sensor linked below.
https://www.ist-ag.com/sites/default/files/AFFS7_E.pdf
The application note includes a wheatstone bridge circuit to use with the sensor on page 11. The schematic is recreated below.
simulate this circuit – Schematic created using CircuitLab
I believe I understand the operation of the circuit, excluding R5 and R6.
One idea is that R5 is there for startup. If the circuit turns on and both amplifier inputs are at 0 volts, the bridge is balanced, Q1 stays off, and nothing happens. R5 ensures that current flows through the bridge so that the amplifier inputs move away from 0V and then the op amp can balance the bridge.
A guess is that R6 is for startup too, ensuring that the non-inverting input has some positive voltage to turn on the transistor and start current through the bridge. I don't see why it is necessary if R5 does the same thing.
What is the purpose of R5 and R6? If they are for startup, are they both necessary?
AI: This is a MAF (mass air flow) measuring circuit. It works by maintaining a constant temperature difference between the two RTD elements, using one of them as a heater.
The thermal path between the two elements is cooled by the air flowing across it, and the power required to maintain the ΔT is a nonlinear function of the mass flow rate.
The values of R1 and R2 are selected to unbalance the bridge by just enough to establish the desired ΔT. R5 provides the initial startup current, and any additional current through Q1 is used to compensate for cooling by air flow.
R6 is simply there to reduce the loop gain for better stability (as the application note you linked to explains). Its value depends on the exact opamp used.
|
H: Is this resistor necessary for protection?
I would like to incorporate this circuit in my design so that I could use a low current capacity slide switch to control the 2A current of a Li-poly.
Now, I understand the purpose of having two PMOS for bidirectional current control as discussed here and the purpose of the zener diode D2 for clamping the gate voltage to a voltage below the maximum allowable voltage of the gate as discussed here.
Finally, the BJT Q3 allows for controlling the gates of the two PMOS through a GPIO pin.
But what is the purpose of R3 in this circuit? (Can it be ommited?)
EDIT: Of course, how did I not see that from the start?
To be honest it seemed strange to me that R3 was pulled up to the path between Q1 and Q2 rather that to Vin , but now I understand that it is only between Q1,Q2 that one can be sure there is a path to the supply, since the circuit works biderectionally (i.e if voltage was applied from Vout and R3 was pulled up to Vin, the top end of R3 would be floating).
Thanks for the replies
AI: R3 is the essential pullup to Q3 to turn off the MOSFET pair with R2 in series .
The purpose of this circuit is to replace a diode voltage drop for Reverse Battery Protection with 2 series high current low RdsOn switches to minimize drop voltage during battery charging.
In the fine print it offers two different Zener voltages ; LV and SV because standard threshold FETs (2~4V) have an absolute max of |Vgs|=20 so the higher Vz is needed, and sub-threshold FETs Vr<2V need Vgs=2.5Vt and lower Vgs Abs Max.
Not all FETs have the same threshold to switch on. For a low voltage pack, a low Vgs(th) or logic level type FETs would be used and for high series cell packs a std threshold FET may be used. But they need 2.5 times their threshold to conduct near rated RdsOn and 3x threshold for std FETs (2~4V threshold)
|
H: Why don't any countries use 360-volt or higher mains power?
The vast majority of countries use ~240-volt mains electricity, although a few early adopters (such as the United States and Japan) still use ~120-volt mains electricity. 240-volt power has the advantage of having lower resistive losses than 120-volt power, and, thus, not requiring conductors as large as those found in 120-volt countries; however, countries that electrified early, when 120 volts was still the only game in town, are stuck with their lower mains voltage because switching to 240 volts would be too much trouble.
Since using even-higher-voltage mains power would decrease losses still further, why don't any countries use 360-volt, 480-volt, 600-volt, or greater household mains power?*
*Partial exception: 240/400-volt three-phase mains power is apparently somewhat common in northern Europe, but my question isn't about three-phase power.
AI: Japan is a bit of an exception- they adopted 100/200VAC for residential power rather than 120/240VAC. As with North America, the higher voltage is not typically present on sockets all over the place, but is wired specifically for high power consumption appliances such as central air conditioners. If you buy a house with a gas range, there will probably be a 240VAC circuit roughed in, just in case you want to go electric.
As far as I can tell (via Wikipedia and their references), the 120V nucleated from the US in the 1880s. The present 3-wire system (120/240, previously a bit less) was introduced in the 1880s as well.
Starting with one utility in Germany, the mains voltage was doubled to 220V, and the European standard spread from there. As to why not 300 or 480V, safety would be the answer. Early systems were at the same voltage as earlier DC systems, which would have been more dangerous than AC for the same voltage.
So now we have North American homes wired with 120VAC to most wall outlets and major appliances typically get 240VAC (or 208 in apartment buildings because of 3-phase distribution). European homes get 230VAC for everything unless they are lucky enough to have 380VAC.
The only major disadvantage of the split system from the consumer point of view is that portable high power consumption devices such as powerful kettles are not available due to the limitations of the wiring and receptacles. I can buy a 1500W kettle, but my European friends can get a 3kW kettle and have their Earl Grey tea ready much faster. The same gauge wire as in Europe can be run to major appliances such as stoves, range tops, electric dryers and central air conditioners, optionally with a neutral to run things like controls and small lamps.
There may be slightly more capital cost in the wiring, however the lower voltage is safer so the receptacles and cords and so on can be made a bit cheaper.
But basically there's no reason to change the voltage in either case.
The big improvement would come from going to distribution of 3-phase which would allow longer life devices and more efficient motors.
(of course industrial and commercial applications can and do often use different voltages from residences, for example in Canada 600VAC is used industrially, which explains the 346VAC ballasts used for lighting in an office I frequent- the wall switches are similar to 120VAC ones but made better).
|
H: Designing High Rate ADC Using Lowers
Is there a way for converting 1 Gbps analog signal to digital, using 250 Mbps sample rated chips?
If you share your ideas, i will be happy.
AI: Since your question is a bit unclear on the specifics (what do you mean by 1 Gbps signal? What do you mean by 250 Mbps ADCs?), I am going to make a few clarifying assumptions: DC - 1 GHz signal, and 250 Msa/sec ADC.
If you want to sample a 1 GHz bandwidth signal (DC to 1 GHz) with 250 Msps ADCs, then there are cerainly ways to do that. To satisfy Nyquist, you need at least 2 Gsps, or eight 250 Msps ADCs.
If your ADCs have an analog bandwidth of at least 1 GHz, then all you need to do is split up the input signal into 8 copies, feed each ADC with its own copy, and drive the ADC clocks from the same PLL with 45 degree offsets. This is called time interleaving, and it is used all the time to sample high bandwidth signals.
If your ADCs don't have a 1 GHz input bandwidth, then you can put samplers in front of the ADCs that have at least 1 GHz bandwidth and drive the samplers with 45 degree offset clocks. This ends up accomplishing exactly the same thing, but allows the use of ADCs with lower bandwidth.
If you can't find (or make) samplers with 1 GHz bandwidth, then there are other tricks that you can play. One of them is bandwidth interleaving. This requires slicing and dicing the input signal in frequency using bandpass filters or diplexers, then downconverting each band with mixers and converting them with ADCs. This technique requires a significant amount of post-processing in order to undo the frequency conversion and diplexing to get back the original, full-bandwidth signal. This technique is used in applications that require sampling extremely wide bandwidths, such as LeCroy's 100 GHz bandwidth oscillscope. That scope uses a triplexer to split the input signal into 3 bands, which are then sampled by the scope's normal 36 GHz bandwidth / 80 Gsps converters. Internally, each of these 36 GHz bandwidth channels use time-interleaving of multiple ADCs to achieve the 80 Gsps sample rate. Then software is used to reconstruct the original input signal, at an equivalent of 240 Gsps.
Now, if by 1 Gbps signal, you mean some 1 Gbps NRZ serial data, then you probably only need around 1 GHz of bandwidth and the rest of my answer still applies, scaling numbers accordingly. If you mean some sort of higher-order modulation (PAM, PSK, QAM, etc.), then you'll probably need less bandwidth, but you would need to provide some more details in order to get a relevant answer. If you mean some sort of RF channel that contains 1 Gbps of data, then this will probably require downconversion first, and then sampling based on the bandwidth of the signal, which is dependent on the modulation format, channel spacing, etc.
|
H: Several basic questions about alternating voltage / current
I have a few straightforward questions about AC but surprisingly can't find any of explicit confirmations.
I understand that in reality all this is much more complicated but assume example below is greatly simplified case, only steady state with no any transient phenomena, TV acts like perfectly matched load without any reflections etc. For now I'm interested if my basic understanding is correct or not.
Here is static illustration of alternating voltage / current. And this is image from Wikipedia article about transmission line, which looks pretty similar.
Is it animated version of AC which demonstrate propagation of alternating voltage (and current) waves from AC generator (assume it connected on left side) toward load?
Now, I plug, say, TV set power cord into electrical wall outlet. There would be exactly same picture: constantly changing electric field due charges, magnetic field (due currents) and the waves would appear between/around "live" and "neutral" conductors in the outlet as well as wires inside the cord. Is this correct?
Since electric field constantly changing as I noted above, potential difference associated with the field constantly changing as well. Hence, actually, "live" and "neutral" wires (and wires inside power cord) keep permanently recharging to corresponding PD as waves propagates between them, with peaks +311V and -311V but for convenience there is famous ~220-240V RMS.
Am I right?
At same time "neutral" wire can be grounded for safety reason, so PD between "neutral" and the Earth is ~0V?
At last I'm wonder what if we don't plug anything into outlet, will it act as open-ended transmission line?
Sorry for my english and thanks for the help.
AI: When we are analysing circuits, it's usually best to either think in the simple 'quasi-static' circuit theory approach, or use transmission lines and take that treatment to its logical conclusion. If you start thinking transmission lines, but then assume the load has to be matched, you've both complicated the situation and restricted your thought to a very marrow case.
Quasi-static
AC is such low frequency that all points on all wires are at the same voltage. It is a 'node', as far as circuit theory is concerned. There are no waves. Loads draw as much current as they need to from the voltage applied and their reactance.
Transmission lines
The voltage and the current in a wave on the transmission line are always in the ratio of the line's impedance. However, there are two independent waves on the line, one in each direction. The voltages and currents we read on a meter are the sums and differences of those waves.
For instance, if we short circuit the end of the line, the waves are equal in amplitude, and phased so they add up to zero voltage and a finite current. If we open circuit the end of the line, then equal amplitude waves are phased so they add up to finite voltage with zero current. Only in the case of a load matched to line is there a forward wave with no reverse reflected wave. An arbitrary load will tend to reflect a smaller amplitude of reflected wave than the incident wave. This is the 'reflection coefficient' or 'return loss' wave.
When power is first connected to the line, there is a transient state that lasts several propagation delays of the line. A forward wave from the power source travels to the end, and finds the load. If the load accepts the ratio of voltage and current that's in the wave, that is if the load is matched, that's the end of the transient stage. If however, the load is not matched, a reverse wave is reflected so that the sums of the waves create a load voltage and current that is correct for the load. This reverse wave may again be reflected by the source. Each reflection will be smaller than the last, and after enough round trips, we can say the situation has settled down into the steady state.
This is complicated, which is why we approximate to the 'short line' circuit theory case, whenever we can.
It's this transient behaviour that can cause problems in digital systems with long line. Unless the lines are well matched, the reflected waves can cause multiple edges to be seen by receivers on the line.
Going back to your TV lead. We would treat this lead as short for the mains supply, and just use circuit theory. However, for sources of EMI within the set, leakage from oscillators and edges from logic and power supplies, we would treat the lead as a transmission line. We would also treat the pair of wires in the lead, taken together, with respect to ground, as a transmission line, when assessing the ways that RF leakage was getting out of the set.
|
H: Need help to determine whether PWM frequency is suitable
I am using a solar panel as the power source for making a simple DC motor based fan
Parameters of panel:
Voltage at max power point:8.2V
Nominal output voltage:6V
Max output current :0.62A
Max power=5W
My DC motor is rated at 3V. So i am planning to use a DC-DC Buck regulator with switching frequency of 200KHz for stepping down to 3V.The motor is of permanent magnet brushed type. It looks like this:
DC motor parameters at 3V:
1A consumption at max efficiency
Stall current :~2A
I am planning to use MIC2177 buck regulator(of Microchip) at 3V output with conversion efficiency of >85% at 3V output.
My questions are:
1) Is the switching frequency too high or low for this application?
Are there any problems which i might encounter during operation?
(Or , am i misunderstanding things here?)
2) Which flyback diode should i connect in parallel to the motor?
AI: To adapt your PWM to output your required 3V for the motor, you have to calculate it as follows:
Duty Cycle = Vr / Vp where Vr: is the voltage required, Vp: peak voltage, and Duty Cycle: is the time of the wave to be switched on / the time to be off. So 3V / 8.2V = 0.36 and this will not make an issue while working since its just a DC fan motor.
About the required flyback diode, simply any diode will do the work required as long it can withstand the current passing through it. 1N4007 is good and safe, and also cost effective.
|
H: What causes loss of power over lifetime of a magnetron?
The power of a magnetron declines over time\$^1\$. While not noticable for most consumer applications (A 2000-hour lifetime would last over 20 years if the device is used only 15 minutes a day), this is a problem in industrial situations.
What causes this loss of power? The best I have been able to find is "cathode degradation" but I still do not understand what this is supposed to mean (what mechanisms are actually going on to ''degrade'' the cathode?) and if this really is the only cause of loss.
I am familiar with semiconductor devices, and in those cases decline in performance can be attributed to factors such as electron-migration, hot-carrier injection, diffusion of dopants over time, etc... But a magnetron just seems to be a very ''simple'' mechanical construction, and large with respect to semiconductors, hence I can't imagine those effects causing issues here...
\$^1\$Leaders in Microwaves magazine, Microwaves & RF, 2018, page 13-14
AI: A Magnetron is a "vacuum tube".
One limit on vacuum tube lifetime is cathode emissivity - the ability to provide electrons for the 'tube' to 'modulate'. Decay mechanisms can be complex but a first approximation relates to the availability of materials which liberate electrons and the action of trace gases on the cathode surface. [The material is usually not "used up" over the tube's lifetime but its efficacy may decline].
Wikipedia - Hot Cathode
Includes:
To improve electron emission, cathodes are usually treated with chemicals, compounds of metals with a low work function. These form a metal layer on the surface which emits more electrons. Treated cathodes require less surface area, lower temperatures and less power to supply the same cathode current. The untreated thoriated tungsten filaments used in early vacuum tubes (called "bright emitters") had to be heated to 2500 °F (1400 °C), white-hot, to produce sufficient thermionic emission for use, while modern coated cathodes produce far more electrons at a given temperature, so they only have to be heated to 800–1100 °F (425–600 °C).
Related:
Two related SE EE answers
here and
here
ADDED:
Related:
This somewhat reminds me of what happens in Cesium and Rubidium clocks, where the source metal will slowly be used up as it is ablated during use (Though some people have documented methods to "rejuvenate" Rb based atomic references). – Joren Vaes Jun 21 '18
There are equivalent ways to "rejuvenate" or "reactivate" vacuum tubes; operate the filament a bit closer to melting (with no anode supply) , so that some of the thorium diffuses/migrates to the surface. How effective it is, I can't say – Brian Drummond Jun 21 '18 at 10:53
Long ago you could buy "boosters" for TV tubes which contained an autotransformer to slightly raise the filament voltage and get a bit more 'oomph' out of fading tubes.
A similar "trick" may even work on a Magnetron, for a while. 2
A number here
And an example:
Vintage Television Picture Tube Brightener w/Isolation Antronic IB-680. NOS. This is for 70 degree Round Color CRTs. I believe that includes 21FJP22, 21FBP22, 21FKP22, etc Round Color CRT from the 1960s & 1970s. 14 pins. According to the box: Restores Color Picture Quality Corrects for Cathode to Filament Shorts Brightens Color Picture
Image from here
-
|
H: Flip a Schmitt-Trigger when current flows through a Zener diode
I am trying to design a circuit using an intermitent power source (a bicycle hub generator), which is rectified and filtered, and regulated at 6,8V.
Now I want to "detect" when the power source is ON or OFF. I made an experimental circuit (below) to validate the idea that if I put a pull-down at NODE1, when VCC rises above 6.8V, current flows through the zener, the mosfet is activated, and the LED shines.
simulate this circuit – Schematic created using CircuitLab
This seemed to work as expected, but there was some ripple, and the on/off transition was not as sharp as I need. So I thought about using a Schmitt trigger, since I have some ICs around (namely a CD4093BCN). I tried replacing the MOSFET with a double-inverter configuration using two of the IC gates, and the triggering works when I probe the trigger input with a direct wire from Vcc or Ground, but not when I connect the input to NODE1.
simulate this circuit
While measuring V at NODE1, I found out it does not rise enough to trigger (does not go above 2/3 of VCC).
My questions are:
What am I doing wrong?
How could I properly activate the Schmitt trigger when the Zener is "on"?
Would I be better served with an OpAmp Schmitt trigger instead of a Logic-Gate one?
AI: The Schmitt trigger ICs have rather poorly defined thresholds that are percentages of the supply voltage, not absolute voltages. This is clearly spelled out in the datasheet. If you derive the supply from the input voltage you have to take that into account. If the input voltage is Vcc - 6.8V then for that to be 2/3 Vcc then the input voltage should be 3*6.8 = 20.4V, which will destroy the chip.
You can try something like this, which uses half of an inexpensive dual op-amp as a comparator. The thresholds are around 6.8V for 'on' and 6.3V for 'off' with the values shown. Change R4 to alter the hysteresis.
simulate this circuit – Schematic created using CircuitLab
|
H: General classifications of amplifiers
Some general classifications of amplifiers are wrote down below.
Voltage Amplifier -> Voltage-Controlled-Voltage Source -> Device: OP AMP
Current Amplifier -> Current-Controlled-Current-Source -> Device: FET
Trans-conductance Amplifier -> Voltage-Controlled-Current-Source -> Device: BJT
On no. 2, It states that a device used as a current amplifier is an "ICIS" device, and an example of it is FET whereas on no. 3, a trans-conductance device is a "VCIS" and an example device of it is BJT.
From what I know, FET is a voltage controlled device. So instead, it shouldn't it be swapped with BJT? FET is a VCIS and BJT is a ICIS device.
AI: You missed the 4th type:
Trans-impedance amplifier -> Current-controlled Voltage-source
Maybe it is not in your list since devices behaving like that are not so common.
Anyway, these are all 2-port devices.
An ideal 2-port device which is voltage controlled should have an infinite input impedance so that it will just "sense" the voltage applied across it.
An ideal 2-port device which is current controlled should have an zero input impedance so that it will just "sense" the current flowing through it.
Similar (but impedances reversed) for the outputs:
An ideal 2-port device which has a voltage output should have a zero output impedance, any load current will not influence the output voltage.
An ideal 2-port device which has a current output should have an infinite output impedance, any voltage applied at the output does not affect the output current.
Now relate that to the physical devices you mention like BJT or FET. Since these are real devices (and not ideal) their input and output behavior does not exactly fit any of the 4 2-ports.
It is more or less a matter of how you want to use the device (in which circuit configuration) that determines which 2-port model fits best.
Since a FET has a high input impedance I would not classify it as having a current input. A BJT's input impedance can be quite high (Common collector circuit) or very low (Common Base) or something in between (Common Emitter). So I would say that for a BJT it depends how you use it.
The well known Hybrid-Pi small signal model of a BJT is based on a transconductance (voltage to current) but that model can be used to make and evaluate all three BJT configurations. I'm sure that if you made a current to current based small signal model for a BJT the same could be done and the results would be the same.
|
H: Limit MPPT solar charger output voltage
I have a problem with my mppt solar voltage regulator. I have a campervan with three 320 W solar panels (Voc 40.8 V, Vmpp 33.3 V) connected in series on the roof, and two 260 Ah, 12 V AGM batteries connected in series to get a 24 V system. I've set the correct absorption (28.5 V) and float (27.4 V) charge voltages (as per battery specs), and the MPPT regulator can handle up to 145 V Voc and has an MPPT range of 30-115 V, with up to 60 A charging current, so it should be able to handle the solar panels perfectly.
The problem is, when I move the van from a shadowed area to a well lit one, I get a two second voltage surge from the MPPT charger that goes over 30-31 V. This makes my inverter overvoltage protection trigger, cutting AC power during those two seconds. It's very annoying because when power comes back some appliances automatically turn on.
Is there anything I can do to force an upper limit on the regulator output voltage, without compromising efficiency?
AI: Speculation
This may suggest a fault in either the MPPT circuit design or the batteries have weak cells from sulphation causing the O.V. condition with high ESR raising 2.23V cells in absorption to rise 2.5V collectively with 900W/30V=30A meaning the bat. pack has an ESR > 2.5V/31A=81 mOhm. If you have a CCA type battery tester or makeshift pulse charge or load test, you may be able to see which battery is at fault. If new, then the batteries may be poor quality or high ESR on wire connections which should not occur on 240Ah batteries.
Got battery specs?
I would expect new 240Ah AGM batteries to be <5 mOhm each and cables+connections to be same or less when fully charged and new. This rises with age and low SoC.
Got test results of battery connector ESR?
If 29V is OK for inverter then max battery + cable + contacts ESR must be < 17 mOhm approx. = 0.5V/ 30A rise.
Otherwise we need to examine the inverter protection features and drop the input voltage 2V at the expense of 60W max wasted power from limited voltage range of inverter.
|
H: Capacitor dielectric: Is X7R a direct upgrade over 2C1?
I'm trying to replace a capacitor with an IECQ-CECC 2C1 Dielectric. The supplier has offered a comparable EIA X7R Dielectric. Viewing this comparison document, they are largely identical. However, the X7R is not given a "Rated DC voltage applied" value.
Is this due to differing test procedures, or is it related to performance (or both?)
AI: You are correct to be suspicious. The voltage coefficient of 2R1/X7R is not guaranteed. It could lose 80% (or more) of its nominal value at rated voltage. You would have to check the detailed data from the manufacturer for typical values.
The worst-case voltage coefficient of 2C1 is guaranteed, so 2C1 is better (but probably larger/more expensive for the same voltage rating).
See this reference. In this context, VCC stands for Voltage Coefficient of Capacitance.
Greater than 90% loss of capacitance at rated
voltage is not uncommon in the general market place. But this
can be avoided for some parts by specifying 2C1 (BZ) or 2X1
(BX) dielectrics rather than standard commercial X7R (2R1).
These options have a more tightly controlled VCC at the
expense of absolute capacitance value in a given package (see
Figure 1 again) – although, observe that a worst-case
capacitance drop of 25-30% is still to be expected
|
H: Why is the input voltage of transistors in the CMOS circuit set to Vdd when calculating the equivalent resistance?
When deriving the equivalent resistance formula of NMOS inverter the graph which is used in derivation is as shown:
$$R_{eq} = \frac{1}{-V_{dd}/2} \int_{V_{dd}}^{V_{dd}/2} \frac{V}{I_{Dsat}(1+\lambda V_{dd})} dx \approx \frac{3}{4}{V_{dd}}{I_{dsat}}(1-\frac{7}{9}\lambda V_{dd})$$
When calculating the equivalent resistances of NMOS and PMOS transistors in a CMOS inverter i was instructed to use this formula and for the saturated current which plays a part to take $$I_{Dsat}=\frac{B}{2}(V_{gs}-V_t)^2 = \frac{B}{2}(V_{dd}-V_t)^2$$ where B is a property of the transistor.
Why is Vdd taken as the gate-source voltage of both transistors for the saturated current if neither is in saturation at that point on the V(output)=V(V(input)) graph of CMOS inverter and why is it used in the derivation in the first place? How is it connected to the resistance which we want?
Edit: The resistance i'm asking for is the dynamic resistance of the transistor used when calculating the time-delay of the rising and falling edge of the graph. The equations of time-delay are given as:
$$tp_{HL}=0.69R_{eqn}C_l$$ where Cl is the capacitance of the inverter and tpHL is the time for output voltage to go from logical 1 to logical 0 (highest and lowest voltage). This "discharging" of the transistor is done by the NMOS transistor so Reqn is it's dynamic resistance. Similar is with Reqp (tpLH). The formulas above are connected to this Reqn and Reqp but i don't understand the way it's calculated and why it uses Vdd for both transistors when calculating the saturated current when they are not in a state of saturation at that voltage, rather NMOS is linear and PMOS is turned off.
AI: We assume that the input to a CMOS gate is driven by another CMOS gate, and that the output of a CMOS gate is either at \$V_{DD}\$ for a logic 1 or at ground for a logic 0. We also (usually) assume that the sources of all NMOS transistors are tied to ground and that the sources of all PMOS transistors are tied to \$V_{DD}\$.
Another simplifying assumption is that the inputs of the logic gate that you wish to analyze are stable and at either \$V_{DD}\$ or ground. If the input is at \$V_{DD}\$ then the PMOS transistors are cut off and we are only interested in what the NMOS transistors are doing. Since the NMOS source is at ground we use
$$V_{GSN} = V_G - V_S = V_{DD} - 0 = V_{DD}$$
If you assume that the logic gate input is at ground then the NMOS is cut off and \$V_{GSP} = -V_{DD}\$.
Of course, that's a lot of simplifying assumptions. The dynamic behaviour is much more complex, and the effective \$R_{DS}\$ changes as the logic gate's output voltage (and hence the transistor's \$V_{DS}\$) changes. If you really want good answers, simulate in SPICE with accurate input rise/fall times and parasitic capacitances. For back-of-the envelope calculations you could approximate \$R_{DS}\$ with something like twice the effective \$R_{DS}\$ when \$V_{DS} = V_{DD}\$ but this would be really crude. The \$R_{MID}\$ in your first graph is another approximation using \$I_{DS}\$ when \$V_{DS} = V_{DD}/2\$.
The bottom graph that you provide illustrates dc behavior and isn't very relevant for transient switching behavior.
|
H: How to minimize DC brushed motor arcing noise propagation from MOSFET drain to gate?
I designed a basic on/off control circuit using 555 timer for a 3v hobby dc motor as shown in below.
Without the motor connected, the output off the 555 timer is as shown below. (the mosfet drain is similar just inverted)
But when I connect a dc brushed motor, I suppose the noise seen when connected to dc motor is because of arcing at the brushes. (Please clarify if I am wrong)
In the above image, channel 1 is connected to 555 output pin and channel 2 is connected to the MOSFET's drain pin.
As seen in the oscilloscope, I see that this noise has propagated from the MOSFET (STP16NF06) drain to gate. Due to with 555 timer switches off & triggers erroneously and so the PWM waveform switching is in microseconds rather than seconds.
I further investigated by testing the following circuit:
When I switch on the gate, the motor runs. But the oscilloscope showed the following noisy waveforms with Channel 1 as Gate voltage and Channel 2 as Drain voltage
Please help me remove this noise. I tried adding adding ceramic 1uf capacitors one at each motor terminal, but didn't help.
AI: Update
Upon reviewing datasheets, the FET has adequate internal diode and looking at the scope spikes, I suggest examining if the ground signal has similar spikes , it is measurement error from excessive long inductive ground clip path.(> 1cm)
If ground is made clean with clipless probing to ground with 2 pins <1cm apart, then repeat the same type measurement across 5 to 0V . If noisy then add a low ESR bulk tantalum cap and if not quiet <5% ripple and more, lower ESR caps until low noise and then repeat the same test method (clipless tip&ring) on above results and if not resolved, show all captures of gnd, Vcc, Vgs and Vds.
=== 1st cut
The 555 timer has a push pull output which is much lower impedance then the gate. Although there is a Miller capacitance between drain and gate there can be some transient Vgs.
But the pulse with suggests that the reverse recovery time and ESR of the clamp diode is too high causing twice the supply voltage to appear on the motor during turn-off as we expect with a low side switch.
The diode is supposed to act as a similar ESR high speed current rectifier to BEMF or high side switch to V+.
Thus re-examine the choice of diode for similar current ratings with FET and thus greater body capacitance to FET yet short Trr recovery time. This is normal to absorb the motor stored energy as it gets switched off.
Also , include links to datasheets of all parts in question, to find motor DCR , diode ESR, FET RdsOn and supply ESR of bulk capacitor.
|
H: H Bridge motor control clarification
I am trying to drive a 12V motor that has max amps of 15amps. I am using MOSFET RFP30N06LE. Can someone explain to me why these are used for motor control when they control the current? When I use my circuit below, turning the gates on using TTL 5v from an Arduino my voltage on the 12v circuit drops dramatically and the motor barely turns. What am I doing wrong? These are TTL MOSFETS from my understanding.
simulate this circuit – Schematic created using CircuitLab
AI: M1 and M3 are wired as source followers. This means that the source voltage will be at best 1 to 3 volts below the gate voltage. Given that the gate voltage is 5 volts, the source voltage from M1 and M3 will be at best 4 volts and, under heavy load probably only 1 or 2 volts.
Quite often P channel MOSFETs are used in positions M1 and M3 and you would pull the gate to 0 volts to activate them: -
If you are using N channels MOSFETs in M1 and M3 positions, a bootstrap circuit is normally used that raises significantly the gate driving voltage. Here's a half bridge that uses a bootstrap driver IC: -
Or sometimes, isolated techniques are used like this with 4x N channel devices: -
|
H: Pulling voltage on a "pull-up" input down to match voltage of voltage output from another device
I have a large lithium (LiFePO4) battery pack composed of 16 cells in series. It is monitored by a BMS (Battery Management System) which is interfaced to a battery charger (Victron Quattro).
The BMS and Battery Charger are from different manufacturers but both include "industry standard" ways of interfacing with each other via analog inputs/outputs.
As the BMS monitors the battery it offers an output pin where the BMS sets the voltage on this pin between 0 volts and 5 volts to indicate the maximum acceptable rate of charge current (amps) into the battery:
0.0 volts = Max charge of 0 amps
1.0 volts = Max charge of 14 amps
2.5 volts = Max charge of 35 amps
...etc... up to:
5.0 volts = Max charge of 70 amps
(Actual amperages adjustable, this is what I have it configured for)
The battery charger conveniently (or so I thought) also has an "input" that, according to their marketing material, can read a voltage and adjust the chargers output current based on the voltage read on the input pin. It does this in a linear fashion and I have it configured to match the BMS:
0 volts = 0 amps, 5 volts = 70 amps, linear relationship in between.
Here's where it gets tricky: Once I actually got my hands on the charger I discovered that the "input" pin is held high with an internal 10 Kohm pull-up to 5v. The expectation is that a user would connect a potentiometer between the input pin and ground and use that to adjust the resistance and "pull down" the voltage on the input pin to control the voltage and thus the rate of charge current from the charger.
So I'm left with trying to figure out how I can build a (Hopefully simple) circuit that will pull the input pin on the charger "down" to match the voltage of the output pin on the BMS unit.
The challenge I've faced trying to research this is that every thing I find referring to anything related to pull-up resistors is for digital logic (IE: On or off). However this particular piece of equipment is using it for an analog input. The few analog resources I found were for reading the amperages of input signals rather than the voltages.
The other area I tried to research was voltage regulation. But everything related to voltage regulation focuses on the wrong side of the equation: Regulating the output from the regulator rather than regulating the current to pull down the input to a specific voltage.
I've also tried to research using a simple transistor for this. However I haven't been able to find anything that shows a transistor being used in this way though logically it seems to me it might work.
I've already reached out to the battery charger manufacturer (Victron Energy) and asked if it's possible to disable the internal pull-up to 5v on this pin. They say it's not possible.
In Summary: Is there a relatively easy way to pull the voltage on a 5v pulled-high input pin down to match the voltage of another source?
AI: A pull-up works exactly this way: when there is not another voltage source on the section, the pull-up puts this pin at 5v. If the charger is connected to a "dumb" battery (a BMS or battery unable to "talk" to the charger), the pull up will actuate and will set the charger at its peak voltage.
But if you connect your "smart" BMS unit to the charger, the BMS signal will override the pull-up (a "weak" pull-up resistor of only 10K is feeding the pull up pin) and so the BMS will change the input of the charger, in order to request from it as much current as the BMS want/need.
I didn't understand why you can't just connect the BMS directly to the charger (and everyone would be happy). I'm sorry to answer your question with another question.
If you really have a good reason to drive the charger with an independent control, or you can't connect them directly, IMHO the best solution would be an Op-Amp circuit with zero gain, so, you feed the BMS output pin to the input of the op-amp circuit, and connect the output of the op-amp to the charger input; the op-amp has low impedance output, so, it would be easy to override the pull-up.
This would be a simpler, analog and more elegant solution; but I'm not sure if it would fit, because I don't know the reason why you don't just connect the BMS output to the charger input.
If for some reason the analog solution doesn't work, other option would be microcontrollers; a uC with a DAC (the DAC output should be feed to, guess who, an Op-amp with zero gain), or a uC with a PWM output, which would be feed to a rectifier and after that, to an Op-amp.
|
H: Can I estimate what CPLD I need?
I'm planning to design a driver for VGA connectors, and for testing purposes I have an evaluation board of one CPLD. Concretely, the board is the Digilent's CoolRunner-II with the Xilinx's XC2C256 CPLD. But my intention is to implement the driver on a custom PCB with a smaller chip, let's say fo example the XC2C64A (random CPLD I've already found), to make the PCB cheaper due to the cost of manufacturing bigger surfaces.
Can I use the CPLD I have and then, once I have tested that the design works properly, tell ISE to synthesize it for smaller CPLD models to know which one could support the design? For example, to know if it has enough capability for the size of the logic or the design overflows it, so I could estimate which CPLD I should buy later.
Probably it's not the best solution, but it would be perfect for saving money if I don't have to buy evaluation boards for the other CPLDs. What do you think?
AI: Can I use the CPLD I have and then, once I have tested that the design works properly, tell ISE to synthesize it for smaller CPLD models to know which one could support the design?
Yes. This is a standard design practice.
One caveat to be aware of is that a more tightly "packed" design may have different timing characteristics. If your design is operating close to timing limits on a larger CPLD, it may fail timing on a smaller part, even if it fits.
|
H: How to draw microstrip line in EAGLE?
I am trying to connect W3113 antenna to my RFID UHF reader. The datasheet of the reader requires me to use 50 ohm microstrip line. However, I do not find where I can draw microstrip. Is it still the regular routing? If not, how do I draw the microstrip line in EAGLE? Thanks!
AI: Microstrip simply means a controlled-impedance trace on one of the surface layers. A stripline is the same, except on an internal layer.
A Microstrip is just a regular track but you determine its required width in order to have a specific characteristic impedance (50 ohms in your case) based on the copper weight and distance between it and the ground plane beneath it on an internal layer (or bottom layer, if you only have a two-layer board). This is one of the most accurate online calculators I know of that will help you determine the correct width of your trace: https://www.eeweb.com/tools/microstrip-impedance
|
H: Driving a boot selection pin with a GPIO pin
I am trying to make a very small change to a circuit to allow for boot mode selection using two boot pins. The component I am trying to control is the STM32F411. One of the pins can be floating in regular boot mode, and driven to ground in the other, therefore I am planning to just simply have it be connected to ground permanently since this will allow for both boot modes to be entered. The other pin varies between high and low for the two boot modes, and is currently being driven low with a pull down resistor (I'm trying to change this). Now here is my question: my limited knowledge of electronics would suggest that it is possible to drive this second pin using a GPIO output from another device, say for example a Raspberry PI. The low level voltage needed is <= 0.43V and the high level voltage is >= 1.261V, therefore if you have a GPIO with a high level voltage of 3.3V, and a low level voltage of 0, it should be able to control the boot pin. Is my thinking correct? Do I need any other components to make this work? I would like the pin to be driven low by default at boot, suggesting it's not as simple as connecting the two pins together and using software to control the output of the pin. Thank you
AI: Your thinking is correct. If you want the pin to be driven low by default then add a pulldown resistor from the pin to ground, something from 5k\$\Omega\$ and 10k\$\Omega\$. It's often the case that a processor's I/O pins wake up in input mode. I don't know if that's true for the Raspberry Pi, but if it is then the pulldown resistor will give you the default low value you want. The value of the resistor needs to be high enough that the Pi's I/O pin can easily overdrive it.
|
H: Why the rotor core losses are very tiny compared to the stator core losses in an induction motor?
Book says rotor mostly runs at speed near to synchronous due to which the relative velocity between rotor and stator magnetic field is very less. Correspondingly making rotor core losses tiny and stator big. I also know that voltage induced in rotor depends on the relative velocity. I dont get it what does relative velocity have to do with core losses and how does it make stator core loss big and rotor tiny?
AI: The rotor is rotating at near the frequency of the rotating field produced by the stator, so it only actually sees an alternating field at a frequency proportional to the slip (In the absence of harmonic distortion), maybe a few percent of line frequency.
The stator has a field at the line frequency and that is very much higher then the slip angular frequency, since the losses are proportional to frequency (to a first order) you would expect the rotor losses to be much smaller then the stator losses all else being equal.
|
H: Pre-Amplifier Question
back at it again with a problem that I am stuck on and need some clear explanation of.
1/2: I was wondering How those Bass controls work, for example the ones in the car you allow to change the bass from -10 to 0 to 10 and the bass would increase to barely hearing the drums. Is this due to a gain change or a Fc(Cut off frequency) change?
2/2 I been having a problem on a filter, and I am sure I am over thinking it, however in the picture below using an Input source of 1.92Vpk @ 1kHz. The Fc of the High pass filter is ~250Hz however the 1kHz is not at 0dB which means I am losing some sound on this common frequency in audio which isn't good. I was wondering to over come this problem would a higher order filter would work? Essentially making the roll off more sharper ?
AI: You are not being very clear here. Do you want a preamp circuit or a equalizer circuit? What is your load?
C1 generally appears in these circuits as a bypass capacitor, not some sort of bass control capacitor. You generally don't want it to attenuate frequencies you want to reproduce.
First pick which frequencies you want and which ones you want to attenuate, and by how much. Then figure out the order of the filter you need. Assuming you just want some half-assed bass attenuation... you can change your filter's cutoff frequency down by increasing R1. My first instinct would be to try a 30k pot in series with that 620R resistor and see what the bode plot yields you. Be aware that you can't make the attenuation steeper with that circuit - for that you need a higher order filter.
Yes. It should be trivial to reduce the gain in circuits involving op-amps. The easiest way is to use a voltage divider at the input.
|
H: 12 Volt vs a 24 Volt Motor
I have read that using a higher voltage motor would need less current to get the same power. I understand that P = IV and how that works. My question is if the 24 V motor would get half of the current, wouldn't it have half of the torque as well since they are directly proportional? In that case I don't understand how the 24 V would be advantageous at all.
Typically when people talk about motors a higher wattage motor is "better". I don't understand physically how more watts makes the motor "better". It just means it uses more energy per second which I guess would mean it is all converted into mechanical energy but not torque? I don't understand the relationship there.
AI: The simplest answer is that the 24V motor would have twice as many turns of wire than the 12V motor (with thinner wire to fit the same armature). So even though the current is halved, the magnetic field is the same.
Below is from http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/solenoid.html
24V would have 1/2 of current I, but number of turns, n, is doubled, so B stays the same.
|
H: Prevent excess current through Zener regulator when system load is switched off
I use a hub-generator powered LED lighting system in my bicycle, made by myself using rectifier, capacitor, and Zener. It's working very well for many years, the Zener does not get hot, and the high-speed voltage is very stable:
simulate this circuit – Schematic created using CircuitLab
Now I want to modify the system, by introducing the possibility to turn the system load off.
My first idea was to add a switch before system load, but preliminary tests show that if I disconnect the load and spin the generator, an excess current flows through the zener, as expected, and it gets very hot very fast.
I suppose that, with an always-on system load, there is no excess current through the zener, since the power from the generator (not much more than 3W / 0.5A) is well balanced with the load), and I can use the Zener as a current sink (that's why I chose a 5W zener in the first place).
But with a load that can be switched off, I think I should redesign the circuit in a way that the zener acts as a reference, and another type of "turn off switching" occurs.
I imagine there could be some configuration using perhaps a mosfet, but my knowledge is not enough to devise a safe, energy-efficient and effective configuration.
My goal is to have a simple-but-effective circuit that powers the system load, when present, with a clamped voltage, while preventing excessive, shunted current flow if the system load is switched off.
Some important considerations:
It is not enough to move the switch to the hub output, since my goal is, quite soon, to add a battery and a micro-controller to the system, in a way that no actual, physical switch will be present - I want the system to be "smart", in an "always on" sense, and this would be an initial step towards a DIY, poor-man's power-path management;
I'm not sure about this, but I think a 7806 regulator is not a good fit, since I don't have enough voltage drop (RMS voltage under load is quite close do 6V). Correct me if I'm wrong;
The hub generates relatively large voltage spikes when running without load (more than 5V), and the capacitor I am using (6800 uF) is rated at 16V. So of course any solution should prevent the large voltage spikes to raise the capacitor voltage above its limit.
UPDATE (in response to Peufeu's answer):
Your hub is a current source;
Your description fits perfectly with the manufacturer's, a lot of tests I have already seen online made by other technically-oriented bicyclists, and with my own experience as a bike and DIY electronics enthusiast. The voltages and waveforms vary a lot as a function of speed and load, but the current has a characteristic plateau around 500mA.
You want to use the dynamo to charge a battery or power a load, but when the battery is fully charged (or the load is off) then what to do?
Then I would like the rest of the circuit to behave as it was open, or with a high resistance/impedance, so that no significant current is drawn from the hub.
(...) you can safely short it. (...) it won't waste your muscle power.
Now this contradicts my practical experience. I happen to have wheel in a test stand beside my desk right now. If I spin it connected to some circuit, I can see the wheel decelerating. If I spin it without load, it runs much longer, almost as if it wasn't a generator hub at all. But if I spin it short-circuited, the deceleration is very pronounced, so I prefer not to consider this option.
it can actually output scary voltages open circuit (...) which will destroy any (...) kind of series regulator, LDO, switching regulator, etc.
I agree, and irrespective of any other solution I eventually adopt, I will always put some 5W zener in the circuit to shunt these voltage spikes. I suppose, though, that by then I could choose a larger value (16V or 25V, depending on the capacitor rating, seems to be fine) just "for the emergency".
The idea is to add a comparator (...) Make sure you add lots of hysteresis in the comparator.
That's what I want to do: use a voltage comparator to somehow detect "states" in my system, and switch the proper power paths on and off. I only would prefer to leave the hub circuit open when no load is present, instead of short-circuit.
AI: The simplest fix for an off switch is between the bridge and the capacitor.
Now depending upon your load at 6 V ? The LDO will be very inefficient.
Better is an efficient converter (buck SMPS) that sees a rising voltage input with speed, which can be converted to constant power output to minimize drag on peddle power. These cards are cheap on the web.
Search for “OKI 3 terminal regulators”
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.