text
stringlengths 83
79.5k
|
---|
H: Unknown Ψ variable in JFET's drain current equation
This question considers unipolar transistor, that is JFET.
I really didn't find any other formula than this one which applies only for linear/ohmic/triode region of JFET U/I characteristic.
What is the variables marked as "Ψ" (psi) in the next equation (underlined with green colour)?
The unknown variable can be also seen here:
AI: I think, if you rearrange the following formula you should get your formula: -
The web page that shows this formula state that: -
Vi is the Schottky diode potential barrier
Vi appears to be the psi constant in your equation.
|
H: Risk of driving solenoid with a higher voltage pwm signal
We have a solenoid which is rated to be controlled by PWM signal "Maximum 325 mA at 7.5 Vdc". The problem we have our controller sends in 12 V output voltage. There is a thought that we could still drive it using the the 12V PWM output. Is there any risk especially with power rating. At 325mA at 7.5 Vdc, the power rating could be 2.4 W. At 12 V if we restrict the max current to be 201 mA (0.201*12 = 2.4 W, can we still work with the same voltage. Is there any risk to the solenoid in doing so?
AI: Driving a solenoid with PWM from a higher voltage to get a lower equivalent voltage is a valid thing to do.
The main thing to watch out for is to use a high enough PWM frequency so that the current ripple in the solenoid is small.
In some cases, there can be audible whine. Avoid that by using around 25 kHz or more. That's usually a good enough frequency so that the current changes little during the on and off phases of each pulse, but the period is still "long" for switching purposes.
ADDITION: As long as you do not exceed the power rating you can theoretically use any voltage up to the level that breaks through the insulation in the relay.. which is a couple of orders of magnitude higher than the rated voltage. However, when going over-voltage, even by a few volts, it is prudent to take extra precautions to ensure that a failure in the PWM can not leave the load at full voltage. This is especially true when driven from a micro that could "bug-out" or be "halted".
|
H: Using MQ-4 Sensor without heating
Is there any way to correctly measure increase of methane in the air using MQ-4 without heating (Not linking heater legs to GND and V). It is needed to save power. MQ-4 is methane sensor, datasheet: https://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-4.pdf
AI: No. A flammable gas sensor can be made by heating a wire and measuring its resistance.
If that resistance increases, you know that its temperature has increased. Want to guess why the temperature increased?
If your guess is correct, you will understand that failure to heat the wire will result in failure to initiate the chemical reaction - combustion - and thus failure to detect inflammable gas. The wire can be a catalytic material, and thus catalyses the combustion of inflammable gas at a lower temperature than otherwise possible, so it shouldn't ignite the whole room
In fact the datasheet shows that the active substance in this sensor is tin dioxide. And a Wikipedia search for "tin dioxide" shows this quote :
SnO2 is used in sensors of combustible gases including carbon monoxide detectors. In these the sensor area is heated to a constant temperature (few hundred °C) and in the presence of a combustible gas the electrical resistivity drops.[21] Doping with various compounds has been investigated (e.g. with CuO[22]). Doping with cobalt and manganese, gives a material that can be used in e.g. high voltage varistors.[23] Tin (IV) oxide can be doped with the oxides of iron or manganese.[24]
So this sensor is more sensitive than my speculation, but shows a fall in resistance with inflammable gas concentration. But the basic operation is the same : heat the sample to several hundred degrees C, or it won't work.
(It's not quite as dangerous as it sounds ... you may recognise the mesh around the sensor as a flame preventer - see Humphrey Davey's "Safety Lamp" for another example. And the datasheet labels it as an "Anti explosion network")
If you need a lower power detector, you need an entirely different type of sensor. I don't know of any offhand, but that's what search engines are for.
|
H: Formatting DDS Sine Wave output to unsigned decimal
Currently, I am working with the DDS core on Vivado, using Verilog, to generate a sign wave using a phase width of 7 and output width of 12. I understand that DDS formats the output in 2's complement / signed decimal. However, I am required to output only unsigned decimal through a DAC module.
The current unsigned decimal sine wave looks like this:
Desired output (currently in signed decimal):
What is the best way for me to offset the 2s complement output data to be just positive values from 0 to AMPLITUDE?
AI: Add an offset of amplitude / 2.
|
H: How can I drive 88 solenoids with an Arduino with PWM?
For a (crazy) upcoming school project I am converting a piano to be a computer-controlled player piano. I am currently planning on using solenoids mounted under the end of the keys (action side obviously, like Yamaha's DiskClavier system as well as the PianoDisc system).
I am planning on using an Arduino to take MIDI signals and drive all of the solenoids. I need PWM on the solenoids so that I can control the velocity at which the solenoids hit the keys, thereby determining the volume. The problem is, its no easy task to control, using PWM, 88 solenoids using an Arduino.
I was think I could use a generic PWM generator to generate the signals, and there are 16-channel servo PWM generator boards out there that are VERY cheap. However, servos require a very specific type of signal that is rather different that generic PWM which I need here. Does anyone know if these will work to generate generic PWM? (link: http://www.ebay.com/itm/PCA9685-16-Channel-12-bit-PWM-Servo-motor-Driver-I2C-Module-For-Arduino-Robot-/272557014281?hash=item3f75a9fd09:g:6SIAAOSwax5Yozsi)
Once I get a PWM signal, can I just use a MOSFET and diode (for kickback-voltage protection) to drive the solenoids directly?
Anything I'm completely missing here?
Any help and guidance is greatly appreciated.
P.S. I know I'm a little bit crazy trying to do this.
AI: Forget craziness - good for you, investigating and experimenting is a great way to learn.
The NXP PCA9685 module you've identified will drive FETs, as you describe. Put a 1 K series resistor between each PCA9685 output and its FET gate. This limits the current to/from the gate capacitance during PWM output switching to 5 mA max, otherwise the PWM output is driving into a short-circuit on its rising edge.
I would also allow for, or put in, a 10 K pull-down to GND on each PWM output. The PCA9685 data sheet states that the outputs will go low during reset of the IC. On power-up, you don't want dozens of solenoids clicking because its not immediate enough or something else unforeseen. This is purely a precaution, allowing you to put a pull-down on the PCA9685 /OE pin and have the Arduino drive it logic high once the supply has stabilised and the circuit settled. Shouldn't be needed but better to plan it in and not fit the parts in your experimental lash-up.
|
H: Can I Run An Appliance From a 24v Battery?
First, a little backstory. My wife is planning to operate a booth at some craft fairs and we require power for a piece of equipment (Silhouette Cameo, a computer controlled vinyl cutting machine). We've done this once before with success at a show that had power provided. However, other shows do not provide power.
The Cameo’s AC to DC pack states that it provides 24v power at 1.25 amps.
My initial thinking is that you could run two 12v batteries in series to provide the power, then at the end of the day, let them recharge overnight and have them ready for the next day. I have a few questions on the practicality and feasibility of doing this.
First off, what kind of battery can I use? I’ve read a few things on the web stating that certain batteries are not good for this application (ie: car batteries). Is this an applicable battery?
https://www.amazon.com/ExpertPower-EXP1270-Rechargeable-Lead-Battery/dp/B003S1RQ2S/ref=pd_lpo_23_bs_tr_t_2?_encoding=UTF8&psc=1&refRID=NV9MYPMB3E5Q6JT65SZS
Secondly, as batteries don’t provide a straight up 12v as they describe, and the voltage differs based on the amount of charge they are holding, can this damage the appliance? If so, is this what a regulator can help with?
Pardon if anything I’m saying comes off as incredibly stupid as I only understand electronics at a very basic level. My hope is that connecting two 12v batteries directly to the Cameo’s DC input will work without damaging it, and if not, a little regulator chip ( like this: http://www.jameco.com/z/7824T-Major-Brands-Standard-Regulator-24-Volt-2-2-Amp-3-Pin-3-Tab-TO-220_51414.html ) would be enough to supply a steady current to the machine with no risk of damage.
Thanks in advance for any help.
AI: Just get two car batteries and put them in series. That should be close enough to 24 V to run the device. It is quite unlikely that ±1 V will cause any trouble, although there is no guarantee of that.
Since the power supply is rated for 1.25 A, you know the device won't draw more than that. Even assuming the full current draw for 8 hours, that comes out to 10 Ah. You don't want to run car batteries down very far, but even small car batteries can do well more than that. 30 Ah is a "small" car battery, and two of those should be just fine with 10 Ah drained from them. Overnight should also be plenty of time to charge them back to full.
|
H: Non invasive Method to measure if there is any current in a line
We have a project where we have to measure if there is any current through the a cable, but having not common ground and knowing that the current could come direct or reverse direction. We thought about the chance of set a differential opamp, but if the current came reverse that would be a problem .
We also thought about optocupler but we cannot limit the current so much.
Any idea is welcome,
Thanks in advance,
Carlos
AI: A hall effect sensor can be used for what you appear to want. It produces a signal in the presense of a magnetic field and any current passing through a conductor produces a magnetic field: -
A saturable reactor is also something that can be used to detect the presense of current in a wire providing the wire carrying the current is wound close to the core of the saturable reactor.
|
H: LDR working differently than usual
I observed something different in LDR (Light Dependent Resistor) today. I made a "magic" LED circuit such that when lights are off, the LED glows, else when the lights are on, LDR creates resistance and the LED stops glowing.
Later when I connected just the LDR and LED (in series) to the battery, LED glowed very dim when there was light in the room, and stops glowing when no light reaches the LDR. Why does this happen?
I know just the basics of electronics. I request you to provide an answer I can understand.
AI: Typical LDRs (light-dependent resistors) increase their resistance when dark. Therefore connecting one in series with a LED should give you exactly what you observed. When dark, there is too much resistance to light the LED noticeably.
It takes a active circuit to use the resistance of a LDR to turn something on when it gets dark.
I go into more detail, include a complete circuit, at https://electronics.stackexchange.com/a/53681/4512.
|
H: Producing K map using two numbers
I have found this problem in my textbook.
The system has 3 inputs. The first two, A and B,
represent a number in the range 0 to 2 (3 is not used).
The third input, C represents a second number in the
range 0 to 1. The output, f, is to be 1 if and only if the
two numbers equal to each other.
(1) Create the truth table of the system.
(2) Create the k-maps of the system
(3) Get the express f(A, B, C) in minimum SOP form.
(4) Get the express f(A, B, C) in minimum POS form.
I have tried this way:
c A B f
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 x
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 x
As f=1 when AB == C .
What does it mean by "The output, f, is to be 1 if and only if the
two numbers equal to each other." ? What will be the truth table?
AI: What does it mean by "The output, f, is to be 1 if and only if the two numbers equal to each other." ?
All that means is that AB == C, then f=1. So if AB=1 & C=1, f=1. Same thing happens if AB=0 & C=0, f=1.
So from the question, I gathered that 0 to 2 means that you have A and B in terms of Binary as 00, 01, 10, and 11 is a don't care. With that being said, the truth table would look as follows:
AB | C | f
00 | 0 | 1
01 | 0 | 0
10 | 0 | 0
11 | 0 | X
00 | 1 | 0
01 | 1 | 1
10 | 1 | 0
11 | 1 | X
You can very easily extract the K-maps parameter from the truth table as it is essentially the same thing.
|
H: Is the OPA860 a diamond transistor?
I was looking at using the OPA860 for a voltage controlled load. Reading in the OPA860 datasheet it says:
The OPA860 combines a high-performance buffer with a transconductance
section. This transconductance section is discussed in the OTA The
buffer section of the OPA860 is an 1600MHz, (Operational
Transconductance Amplifier) section of 4000V/μs closed-loop buffer
that can be used as a this data sheet. Over the years and depending on
the building block for AGC amplifiers, LED driver circuit, writer, the
OTA section of an op amp has been integrator for fast pulse, fast
control loop amplifiers, referred to as a Diamond Transistor, and
control amplifiers for capacitive sensors and Voltage-Controlled
Current source, Transconductor, active filters.
Are they achieving the transconductance with regular boring silicon tech (which is probably the case) or something else?
My main reason for asking the question is because its a cool part (low noise and transconductance), and because even though I suspect there is no secret sauce maybe there is, it also says ±1.2V differential input which I thought was interesting.
AI: It's a particular complementary BJT circuit arrangement as so:
Which behaves similarly to transistor that does not have a Vbe offset and biasing issues, as explained in the link which @user3528438 also provided in a comment.
It's made with Burr-Brown/TI's high performance silicon analog IC process, not carbon-based.
|
H: Transformer with different kinds of loads
How does the variation on the kind of the load of a transformer affects efficiency and regulation? If I use a capacitive load, will the efficiency be greater or lower than if I use a common inductive load?
AI: If you use a capacitive or inductive load, then the overall efficiency of the system will be zero, as either of those loads consume zero power, while the transformer will have losses.
The losses of a transformer are essentially core loss, which is dependent on the applied voltage, and copper loss, which is dependent on the current. At first sight it may seem therefore that for the same load current and load voltage, the transformer losses will be the same, regardless of whether the load is inductive, capacitive or resistive.
There is a subtlety that the magnetising current is in quadrature phase to the applied voltage. This means that for load currents in the order of the magnetising current Imag (that is, an order of magnitude or two less than the full power rating of the transformer), the primary current will be 2 times Imag for an inductive load, 1.4 times for a resistive load, and zero for a capacitive load, with the corresponding effect on transformer copper losses.
However, for load currents much greater than Imag, the load current will dominate the copper loss regardless of its phase with respect to Imag.
|
H: Soft fade out circuit for turning off speakers
I have some loud speakers connected to an amplifier. The problem is when I turn the preamp off, it sends a loud POP noise through the speakers. The turn off of the amp is delayed by 1 or 2 seconds, but that's not enough to kill the amp. So here's what I'm looking to achieve:
I'd like to slowly fade the speakers out as soon as as a remote wire goes LOW (it is 12V when preamp is on, but immediately becomes 0V when preamp turns off). And by slow I mean the whole thing happening is roughly half a second.
The speakers are pretty high powered. They draw 30 - 75 watts. So this circuit should withstand that.
If that's too difficult, I can try to implement this fade out function on the preamp outputs. It would be similar to a relay, except instead of a sudden off, I'd like to bring the voltage down to 0 gradually, so it gives the impression that audio is fading out.
Is this too difficult to achieve? Would a digital potentiometer connected in series to preamp signal, controlled by a Arduino, and then fed to amplifier be enough to achieve this? What are the repercussions? Can this be nicer implemented with capacitors? Is there a good way to switch the audio with a relay or something?
AI: OK something is missing here... If you turn off the pre-amp there should be nothing to fade... at the amp. Further, the pop is caused by the transient of the pre-amp shutting down, and is short, so by the time you fade out the amp it's too late.
Since they are powered separately in different boxes I think you need to make the AMP mute the output when the pre-amp shows it is off. There may be a way in the pre-amp to fade out before it sets the shutdown line though.
I'd be interested to see if that line from the pre-amp really "immediately becomes 0V when preamp turns off" or if it actually fades out with the preamp power supply. It it's the latter you could use that to turn off the input more gracefully than a relay.
Perhaps with an LM13700 Dual Operational Transconductance Amplifier wired as a unity gain voltage controlled stereo volume control between the pre-amp and the amp. RC shown here would need to be adjusted for your output signal from the pre-amp
|
H: What is this structure on PCB
My LED TV is broken, so I disassembled it, and saw this weird thing on the power stage:
Above it, there are two 3 ohm resistors. (owners of the large drill holes in image) What could be the purpose of these? The only thing I came up with is that it is a clever use of solder to help the resistor from overheating. Is that the case here? How much of a difference - approximately - would they make?
AI: It looks like a PCB heat sink. They left holes in the solder mask so solder would adhere to the copper pour to add surface area to improve heat rejection.
|
H: DC motor and smoked arduino
I just burned my arduino and want to understand what happened.
I tried to control 12V 4A DC motor with 5V Arduino Pro Mini, here is a PCB I made for this:
In the bottom part you can see arduino pins, I used Raw input to power my arduino with 12V and PWM pin 11 to control the motor.
I used IRF3205 N-channel Mosfet and 1N5817 Diode in my circuit.
R1 resistor is 220 Ohms, R2 1KOhm
The circuit I tried to build is something like this (picture from google):
When I turned it on my arduino smoked in 3 seconds (I believe somewhere near "Raw" pin, maybe in was built-in regulator).
Are there any obvious mistakes I made?
UPD: some pictures of my assembly: link to imgur.com
AI: The diode on your board is in the correct position, and should deal with the motor inductance, as well as wiring directly to the motor. However, there is nothing to prevent inductance in the supply wires from causing an spike in input voltage to the regulator when the MOSFET switches off abruptly. You have no capacitance and no path for the energy stored in the inductance, and little margin for error (see below).
Looking at a clone that I have kicking around, the regulator is an AMS1117 which has an absolute maximum input voltage of 15V. Yours may use a different chip. The MIC5205, used in some, can withstand 20V (discounting thermal considerations). A 78M05 can withstand a 35V spike.
If the AMS1117 or similar part is used, 12V is too close to absolute maximum to expect a TVS etc. to protect the regulator. You would be better off adding some shunt capacitance at the board (perhaps a 2.2uF 25V ceramic capacitor in parallel with 100uF/16V electrolytic across the 12V supply- right on the board) and add a pre-regulator such as an 78M08 for 'belt and suspenders' security.
Consider the below simulation. L1 and R2 represent the motor inductance and winding resistance at rest (remember there is no back-EMF with the rotor at rest, so R2 is determined by the stall current). L2/L3 represent the wire inductance- it would be less for short wires and if you twist the wires together. I have switched the (random) MOSFET with a 150 ohm gate resistor and a 5V source. So I would expect this simulation to be qualitatively similar to your circuit but not necessarily very accurate in quantitative terms.
simulate this circuit – Schematic created using CircuitLab
Here is what the regulator supply voltage sees as the MOSFET switches:
Yes, +165V spikes despite the relatively slow MOSFET switching.
This is an excellent example of why you have have to be very careful when you have large currents floating around that are being switched relatively quickly. It doesn't take much parasitic inductance to lead to a lot of volts, which can zap things. Even a few mm of straight wire has some (quite measurable) inductance.
TL;DR: Add some caps AT THE BOARD across the supply and hang a 78M08 before the Arduino board.
|
H: What should I use from given options to power a raspberry pi?
I have a system which consists of 2 12V DC motors(0.65 A on max load) and 1 RPi 2 model B. I want this system to be plug free. I have Li-Ion batteries to power up motors. I use a L298N module to drive motors. This module also can give a 5V output. Here is where the problem appears.
If I use this output for my RPi, RPi shows lightning symbol time to time and shuts itself down if I open things like chromium on it.
I have these options.
I can use this cable to increase cable quality, since I am using a random cable atm. But I don't know if it will really help.
Use a step down module to directly feed RPi from Li-Ion batteries.
Using a powerbank to directly feed RPi.
Which options is better?
(Batteries - 5x Li-Ion 3.7-4.2 V - 2100 mAh each. I use 3x atm)
AI: The L298N module doesn't say how much current it can supply at 5V, but based on the components visible on the board, I would guess that it's no more than 1A, probably less. The RPi requires up to 2A at times.
You need to get a beefier regulator (step-down module) that can handle the peak demands of the RPi.
|
H: Output current vs Supply current
Good morning,
I am still learning, and often I see a lot of datasheet value that I dont understand. For this case specifically, what is the difference between output current and supply current?
The data sheet is here http://assets.nexperia.com/documents/data-sheet/74HC_HCT08.pdf
1)The ratings on page 3 list the supply current as 50ma, but the supply voltage is -0.5 to 7 volts. Does this mean I must limit the current to pin 14(in this case) to 7 volts, and the current no greater than 50ma?
2)Regardless of voltage, as long as it is within the allowed range(-0.5v - 7v), the IC will out put Vcc at +- 25ma at any of the output pins?
Thank you
AI: It means you give it no more than 7Volts. You don't limit the current for Vcc. You regulate the voltage.
It can deliver upto 25mA on any output, but the 50mA will be divided among all the outputs. So, sum total of all outputs should not exceed 50mA.
If you try to draw more than total of 50mA through the outputs you will very likely damage the IC. You prevent that from happening by designing the loads on the outputs so that the total cannot ever be over the limit.
|
H: MOSFET finite output resistance in saturation mode
Since MOSFET has finite output resistance in saturation/active mode, the slope of unsignificanlty rising drain current is defined by Ua and slope parameter as lambda:
This parameter (as I know) is not given in any MOSFET datasheet.
Question: Is there any other way to get slope parameter out of the equation? For example with transconductance it can be done but I don't really know how to get it out of it (so this parameter can be defined with other already given variable of parameter).
AI: Although not typically listed on datasheets, the MOSFET parameter \$\lambda\$ can be sometimes be found in the SPICE model provided by the manufacturer. Consider for example the N-channel MOSFET 2N7002. An old SPICE model from Zetex defines \$\lambda\$ of 2N7002 as \$267\cdot 10^{-6} \textrm{ V}^{-1}\$. For more information about how \$\lambda\$ is defined in SPICE models, see pages 128-129 of the HSPICE manual.
However, it is important to keep in mind that the parameter \$\lambda\$ may vary significantly from device to device, so it would be unwise to design a circuit that is sensitive to this parameter. In addition, channel length modulation, which \$\lambda\$ models, is only part of the story for determining MOSFET output resistance (\$r_o\$). Other effects such as drain-induced barrier lowering and substrate current induced body effect (SCBE) may also be important depending on the bias point of the device.
In summary, you may be able to get a very rough idea of the output impedance of a MOSFET by looking at the manufacturer's SPICE model. But the reality is that \$r_o\$ varies from device to device and is a complex function of bias point.
|
H: What are the usual types of loss sources in an Inverter?
What are the usual loss sources in an common Inverter?
Thanks,
Devin.
AI: The largest losses in an inverter are probably the forward drop losses in the switching semiconductors.
With inductive loads there are forward drop losses in the antiparallel diodes.
Switching losses in the semiconductors could be just as much or more depending on PWM switching frequency.
There are also ESR losses in filter capacitors for the DC bus.
The reactive component of inductive loads represents the majority of capacitor ripple current for 3-phase inverters with inductive loads.
If there are DC bus chokes or line reactors, the copper and iron losses in those can be significant.
Losses in snubber circuits is another item.
All of the power for the control and driver circuits would be considered to be a loss.
Any power for forced cooling fans is a loss.
I think those are the
major losses.
|
H: MOSFET switch using an optocoupler
With the parts in the mail, haven't had the time to test, but the simple question: will this work, or what improvements are needed?
What it's supposed to do: a MOSFET switch for 12V, 0.5-3A loads, driven by a 3.3V logic level (which turned out to be too low even for my logic level MOSFETs). The chip starts up with the ports high, MOSFET off. Setting the pin low switches it on.
Then the background.
I'm using a 3.3V logic level NodeMCU board for my project. For this I got myself a handful of IRL540N MOSFETs (after reading forums, and the things are cheap). From the spec sheet I had the idea it would work at 3.3V but no luck there. At 5-6V gate level it opens up fine (I hooked up 21W worth of 12V LEDs to test, worked like a charm, the IRL540N didn't even get warm). But at 3.3V no luck, the LEDs barely lit up.
Using a driver transistor worked, but then it became inverted: port low was the on, so effectively default on, and that's not safe for my project. It has to be default off, so at startup (pins low) it's simply off.
So then I realised I had to use higher voltage, and this is where the optocoupler comes in play. It allows me to pull the gate of the MOSFET to the 12V level using just 3.3V.
The below schematic I devised for the combination with a PCF8574 port expander. Its pins should default to output, high. In high state it can source only 0.3 mA or so, very little, enough to drive a transistor but not an LED. It however can sink at least 20 mA, so that's good enough to drive an LED, or an optocoupler.
The idea behind this schematic: when switched on, the ports are high, no current through the LED, MOSFET gate pulled low, and it's off.
Then when I make the port low, it sinks the current for the LED in the optocoupler, the gate is pulled high, and the MOSFET switches on. The 12V ensures it's saturated.
Load may be lamps or a motor or even a solenoid, D1 is there to prevent the circuit from frying upon turning off.
AI: Everything seems to be OK, Just some comments:
The forward current through the input diode of the opto it's a bit too low (6-7 mA). A value of 150 Ohm for R1 would allow an \$I_F\$ between 10 and 15 mA, still within the 20 mA sink limit of your PCF8574. This will allow you higher collector currents (heavier loads) in the output transistor of the opto, and higher peak currents during charging of the MOSFET, without taking the transistor out of saturation (look at the table below).
The load on the output transistor of the opto has too much impedance for fast switching in case you want to do PWM. At 10 kOhm your rising and falling times will be skyrocketing, thus severely limiting your duty cycle operating range:
There is also another timing issue, which Jack Creasey has correctly pointed out: the collector current may not be high enough to ensure fast charging of the MOSFET gate. To overcome this, you might need an additional transistor stage between the opto and the MOSFET to boost current. But note that this is in addition to the opto needing a lower R2 so not to become the bottleneck itself.
Add a decoupling capacitor at the collector of the output transistor of the opto. If your 12V supply is connected through long wires (= parasitic inductance), switching off the MOSFET may generate an enormous voltage spike in the 12V rail if the current delivered to the load is high. Your flyback diode protects the MOSFET, but not the rail. Take a look at this question.
Source of the figures: PC817 datasheet.
|
H: Replace a stereo amplifier component
I would like to replace the tda2822m stereo amplifier on a music keyboard because it fried. Problem is I'm not sure which one to use. Some kind of reference is written on the component: wx14a08y. I don't know what it means exactly. I keep finding amplifiers with other references, but I'm not sure they will work. How could I find out?
Here a picture of the PCB with the fried amplifier:
AI: Usually all you will need is the part number. TDA2822M is a legit number and should get you want you need. The other number is probably the lot number or something irrelevant for your purposes. BTW, make sure you've fixed whatever let the magic smoke out of your old one before you fire up the new one...
|
H: Why do large PCB traces have solder points/islands/stripes on them?
This is from a power supply for an old PC monitor. I opened it up to see if I could fix it (likely bad caps) and saw this rectangle matrix. What's the purpose?
AI: Probably an attempt to reduce the resistance of the trace (and better dissipate heat) by putting solder in parallel.
The pattern in the solder mask is likely so that a solid section of solder does not warp the board excessively as it cools (the CTE of solder is much higher than that of FR4).
You can see shorter traces to the right that are covered almost entirely by solder.
|
H: Connect one of 16 loads to power (12 V, ~300 mA), decoder IC?
I am wondering if there is an IC that performs the following task.
If I didn't know any better, then I would probably build the following circuit from discrete components.
simulate this circuit – Schematic created using CircuitLab
However, this seems like such a common necessity! I'm sure that there's an IC for that.
I've managed to come across analog switches and multiplexers, but these seem to be used for low power analog signals, not power.
Is there a circuit that can do this?
AI: Yes, there are IC's that provide de-muxing as you require, though as mentioned mostly 8/7 bit wide.
TI has a range:
TPIC6259 provides 8 * 45 V FET outputs with either a demux or addressable latch mode.
TPIC6C595 provides a serial to parallel SR (less wires, but not a demux) that reaches 8 * 35 V @ 250 mA if you only have only output on at a time. You can series connect as many as you like.
And of course the FET replacement for the UL2003 type drivers ...the TPL7407 can provide 30 V @600 mA.
Toshiba also have a nice IC that has the diodes for inductive loads built in ...the unfortunately designated TBD62083
|
H: What to wire ground to?
I have a circuit involving a DC motor and voltage regulator as following:
simulate this circuit – Schematic created using CircuitLab
What would I realistically wire the ground to? Would it be the negative side of the DC motor or some random hunk of metal? (Side note: am I using the voltage regulator correctly here?)
AI: Edit:I misread your question for the 2nd time...I was answering it in a rush. I didn't realize that the motor was being used as a generator, and I thought it was the output of the circuit.
Here is a diagram with the capacitors and the correct connections. The diode should be chosen, so that the max motor output voltage minus the diode's forward voltage drop is less than the maximum input voltage of the regulator's input:
simulate this circuit – Schematic created using CircuitLab
|
H: LED strip power supply requirements
There are a few questions on here that talk about LED power supplies and how to calculate their ratings but none address the issue that my 5meter long 5v addressable LED strip of 18watts power consumption per meter draws a ridicilous amount or current.
Current = (18watts*5m)/5v
Current = 18amps
How do I configure a power supply to supply that sort of current? 5v DC supplies on AliExpress go up to 4A. which supplies only 20watts of power when 90watts are required. The problem with 5v supplies as well is that it would require a current of 18A to deliver 90watts! Sockets are limited to 10A I think, which means getting a 100w 5v power supply drawing 18A makes no sense because it can't draw its required current through the wall socket.
I understand that higher voltage supplies can supply more power at the same current. 12v supplies also come in higher current variants, for example there are 12v 12a supplies capable of delivering 120W without drawing a ridiculous amount of current from the socket.
My question now is whether I can cheat the 10A socket limit by using a 12V power supply (rather than 5v to match the LED strip) at 10A and then use a DC to DC step down converter to change 12V/10A to 5V/24A.
That way I get the 5v voltage required by the LED strip as well as enough current (18A) to power the strip at full brightness without drawing more than 10A from the wall socket.
Same power output but different current supplied. Is that how it works? I have no idea if I'm using the power formula correctly there and if power at different voltage levels can be treated that way.
AI: If some steps aren't taken, then your imagination is right. The input current has to at least equal the output current. However, there are lots of ways to take some extra steps.
For example, you can use a transformer where its primary is designed for the AC mains voltage and where it produces an output voltage much closer to the desired voltage. A transformer will dissipate a small amount of parasitic power (it will leach some power in order to do its job), but it is reasonably efficient and can yield a lower-voltage, higher-current arrangement that changes what you imagined is required. You might use a \$6.3\:\textrm{V}_\textrm{AC}\$ secondary power transformer, for example, in order to get a voltage that is closer to the desired \$5\:\textrm{V}\$ and then add some circuitry to finish the job. If you use this method, then the current load on the AC mains supply will be quite a bit less than the current required by your LED strip.
Or, you might use what's called a "switcher," where it is designed to operate directly from the AC mains supply. These will use inductors and capacitors in a somewhat more complex arrangement than the above-mentioned transformer method and they will usually be smaller and weigh less and probably be cheaper, too (as AC mains transformers tend to be heavy and expensive, by comparison.) These also can be very efficient in terms of transforming power.
A transformer-based method starts out with reasonable efficiency with the transformer itself, but often needs some significant control "overhead" voltage and for \$5\:\textrm{V}\$ systems this might mean you get efficiencies that are perhaps as good as 60%. Switchers can usually achieve better, at the expense of some complexity but lower costs because of avoiding an expensive and heavy transformer. Perhaps 75-80% for an efficiency figure, but just be aware that this value can vary widely depending upon the specific design and how it relates to your specific needs.
You can boil all this down to a simple efficiency figure, such as 75% or 80% (or 60%, let's say, for the transformer method), and a power consideration. In your case, you need \$90\:\textrm{W}\$ of delivered power. Just divide the efficiency figure into your power requirement to figure out the AC mains power. Divide that by the AC mains RMS voltage and you get the required current.
Let's say the efficiency is 70%. Then the power required from the AC mains will be about \$\frac{90\:\textrm{W}}{70\%}\approx 130\:\textrm{W}\$. If the AC mains voltage is \$120\:\textrm{V}_\textrm{RMS}\$ then the current will be \$\approx 1.1\:\textrm{A}_\textrm{RMS}\$. If the AC mains voltage is \$220\:\textrm{V}_\textrm{RMS}\$ then the current will be \$\approx 0.6\:\textrm{A}_\textrm{RMS}\$.
So you can see that this is a lot smaller than you were otherwise expecting.
As others have already mentioned, you probably don't need a high precision \$5\:\textrm{V}\$ supply. But you probably do need a power supply that can hold \$5\pm 0.2\:\textrm{V}\$ at the current rating into the load that you need, which is about \$20\:\textrm{A}\$. So it would be a good idea to make sure that the power supply is rated for at least that much (more is usually better) current and that it is rated to hold the voltage within a reasonable margin around your specified voltage over variations of the AC mains supply voltage and over some range of your load's current requirements, too. This starts to get more technical, now.
A thorough design would take into account various risks, including risks of fire. An LED strip that is dissipating \$90\:\textrm{W}\$ over \$5\:\textrm{m}\$ length isn't likely, by itself, to start a fire. But a power supply that is connected to the mains and which may be, itself, dissipating \$40-50\:\textrm{W}\$ into a small volume buried inside a wall might actually cause a fire. So please also consider other aspects of your work. The power supply itself needs to have some safety measures built into its design and it needs to be arranged in a location where its dissipation can be reasonably accommodated. We often just assume you'd do that. But I've seen cases where people have placed SSRs with \$100\:\textrm{W}\$ of dissipating heat sinks attached and just buried them into their thin walls as though that was a safe thing to do. So be careful.
|
H: How does colpitts and hartley oscillators start oscillation?
I know LC circuit will start oscillation only when the input current is cut off.
As of colpitts and similar oscillators, how do they oscillate when the input current is still passing in the LC?
AI: While it's true that if you have an LC circuit, pass current through the L, and then cut it off, the circuit will oscillate for a while before the oscillations die away. However, that's irrelevant to how Colpitts or Hartley oscillators start up.
An oscillator of this type has greater than unity gain at a specific frequency round the loop that contains the active device, with the LC circuit acting as a filter. As there's more than unity gain, any small disturbance, either the switch-on transient or circuit noise, will be amplified round the loop and will build up oscillations. Eventually when the oscillations are big enough, some mechanism will reduce the loop gain to unity, and the level will stabilise.
In a simulator, the situation is slightly different. Unless it's been modelled (and we rarely do) there will be no circuit noise. In addition, the initial DC bias solve step may complete so accurately that there's no 'switch-on transient'. So although the oscillator has greater than unity loop gain, there's nothing to amplifier, and the oscillator never starts. In this case, it's necessary to inject a disturbance manually, either with a pulse generator, or more economically by setting the initial conditions on one or more reactive components.
|
H: Problem in understanding bridge rectifier
Why does electricity not flow from the other two diodes after it has been through the load in a full wave bridge rectifier?
I'd asked this question on Physics SE but was told to ask it here.
AI: I totally agree with the comments made about lack of basic research before asking the question.This topic is well covered on the net, in books etc.
Consider a voltage across a diode. For a diode to conduct the anode voltage must be more positive than the cathode.
When a diode conducts there is a forward drop in voltage. This voltage will vary with the current through the diode (often more than 1V) but lets assume a minimum value of 0.7V for a silicon diode.
Voltages are always relative so in a transformer /bridge rectifier circuit we can take our '0V' (ground) from the perspective of the transformer or the load. Normally we take the load. Either way it makes absolutely no difference to the voltage across the diodes and the direction of current.
You always get two diodes that can't conduct because they are reverse biased and two diodes that do conduct giving a 2xVd voltage drop from the transformer to the load.
The voltage across and current through the load is always in the same direction.
|
H: Standard package footprints
I'm looking for footprint dimensions for the standard packages like 0402, 0603, 0805, etc.
I did a quick search on Google, but I got many different results and I got confused.
Is there something very common to use both for resistors and MLCC capacitors?
I don't want the pads to turn out too big or too small.
AI: Each manufacturer is going to have their own recommendations for land patterns. However, IPC-7351 is a more generic standard that covers SMD component sizes and footprints. There are usually three versions of every footprint: Low density (level A), medium density (level B), and high density (level C) designed for low, medium, and high density boards ("density" referring to how tightly together the components are placed). When I lay out a board, I determine how many components are needed and how tightly packed they will need to be based on the dimensions of the board, and I will pick one density level. I will then use the footprints for that level.
IPC has a land pattern calculator that can help you determine how large or small to make your pads for surface mount components based on the physical dimensions of the component itself (provided by the manufacturer) and the desired density level. The above link will download a ZIP file containing the installation files. If you a tool such as Altium Designer to design your board, it has this calculator built-in and you can generate footprints by entering the component dimensions.
|
H: Linear voltage regulator outputs 3.6 volt instead of 5.0 volt
A 5 V linear regulator supplies a 5 V constant output irrespective of load. Is that so?
I am asking this question because in a linear regulator circuit in a load condition it is maintaining a constant 5 V, but when a further circuit is connected the output of the regulator is showing 3.6 V.
AI: A 5 V linear regulator supplies a 5 V constant output irrespective of load. Is that so?
No!
A 5 V linear regulator supplies a 5 V constant output if all the necessary condditions listed in its datasheet are met.
There are a number of such conditions, including maximum output current, minimum input voltage, temperature, input voltage variations, input and output capacitances, etc. The datasheet will also define other parameters, like how constant the "constant" output voltage really is over time, temperature, input voltage variations, load variations, and other parameters. As always to know what a part can do, read the datasheet. That really should have been obvious.
Most likely when your "futher circuit is connected", the total output current spec is being violated, or the input voltage to the regulator drops below the minimum requirement.
|
H: Why is there no current sharing between neutral and ground?
In the first system, will lamp1 turn on?
If yes, then why is there no current sharing between neutral and ground as shown in the second system? I always read that neutral is a current carrying conductor but the ground is not. What is the reason behind that? I think current should be shared equally between the two wires of neutral and ground (assuming they have the same resistance).
If no, does that mean earth is not a reference and it does not have "zero" voltage? So there's no need to ground the neutral wire?
Arrows are the direction of currents.
simulate this circuit – Schematic created using CircuitLab
AI: In your first diagram the answer is no. Not because earth is not a reference, but because there is no current return path to the single phase generator.
What happens in the first circuit is the top of the generator is effectively "grounded" through the lamp. The bottom of the generator will show the inverted AC voltage. But since there is no circuit... there is no current. Redrawing it like this helps.
simulate this circuit – Schematic created using CircuitLab
In circuit 2 there is NO current passing to ground. All the current coming from the AC source MUST return to the AC source.
Current sharing would ONLY occur if you grounded both ends on the bottom schematic. Which is what happens with bad wiring, or if there is a short somewhere. Which is why we install GFCIs in circuit breakers these days.
simulate this circuit
Typically though, houses and especially rural farms are wired this way.
simulate this circuit
The service neutral line can be omitted to reduce costs. If it DOES exist, and is rated to carry return current from all phases, the neutral should not be connected to the ground at the client end.
Interestingly your schematic #2 brings up an interesting argument: "Would the electrical system actually be safer WITHOUT all this grounding?" If it were a closed loop isolated system, in order to be shocked, you would need to touch Live AND Neutral.
|
H: WiFi-CPU Direct Talk
I was reading this link. I am wondering to know how the WiFi could talk to CPU directly (and vice versa). I searched everywhere but no sign of such communication. AFAIK it's OS's job to handle this communication via WiFi driver, but is it a complete different way?
When you put both CPU and WiFi circuits on a single SoC, it's hard to understand how do they talk to each other without any OSes. Or there is some OS running on SoC?
One other question: Is it possible to implement TCP/IP stack with hardware? I mean some kind of direct access (or access through a hardware device) between CPU and WiFi.
AI: Or there is some OS running on SoC?
Generally yes -- either some form of Linux, or an RTOS -- either of which will have the necessary driver as well as the the higher levels of the TCP/IP protocol "stack" that make it easy to write applications.
Is it possible to implement TCP/IP stack with hardware?
Sort of. There are chips that implement TCP/IP in "hardware", but they're really just a separate microcontroller that's dedicated to that function, with the necessary firmware stored in its internal memory.
|
H: biasing of an NMOS
Suppose I have applied a constant current source(of value I) at the source of an NMOS ,the gate is grounded and the drain is connected to a voltage source with resistance R between them.
Equation of MOS in saturation region says that the potential of the source will be such that the current I flows through the MOS but what is happening physically that leads the source to that potential?
AI: I think you're asking about this circuit:
simulate this circuit – Schematic created using CircuitLab
In order for this circuit to work, the current source simply needs to pull the MOSFET's source node below ground enough that \$V_d-V_s > V_{th}\$. Since it's an ideal current source, it has no problem doing this.
On the other hand, many real-world circuits that we model as current sources can't really change their output voltages arbitrarily. That's why I connected the other node of the current source to "VSS" instead of ground. If VSS is a negative voltage, then the current source could actually be implemented with another transistor (NMOS or NPN BJT).
What is happening physically that leads the source to that potential?
That depends entirely what real circuit is being used to make your current source. An "ideal current source" like we often draw in circuit theory class can't be realized perfectly, so there's no physical explanation for how it works. There are numerous ways to implement an approximation to a current source, but each one operates on its own principles.
You might want to research the cascode circuit, which is a very common real-world example of this idea.
|
H: How to Change the status voice msg of Bluetooth module
I just buy a Bluetooth module XY-BT-MINI, when I turn it on, it says "The Bluetooth device is ready to pair". But I don´t like the voice. I just want a connected sound,
Can I replace the voice msg with connected sound ?
Can I change the name of the Bluetooth device.
Link: http://www.ebay.com/itm/351804941744?rmvSB=true.
AI: Changing the actual built-in voice is likely not feasible.
However, you could intercept the voice with your own audio. This could be done by switching the audio output with your own, and then switching back to the original signal. You'd need an additional audio driver with stored audio.
If it's just the power on voice you want to change, it would be simple to detect when the device receives power and then switch the audio signals.
Detecting other status changes like device pairing and such may also be possible by monitoring pins on the bluetooth IC, (you'd have to check the datasheet).
A small microprocessor would be well suited for monitoring and switching.
simulate this circuit – Schematic created using CircuitLab
|
H: Am I insane to question that only with a closed path can electrons move?
First of all let me just state that I do not feel confident enough to tell anyone anything about how electric circuits work or anything about the physics behind them because I simply do not know or understand it all.
But I have many times read that there has to be a closed path for current to flow in a circuit, leading to a fact that if there isn't a closed conductive loop nothing can happen.
And I have taken that to be a definitive truth, but I wonder about something(and I might just as well be terribly far of the path of reason here).
If I was to design a circuit board which contains traces through which very high frequency signals(currents) will flow then I have to consider things like signal reflections, I don't know what reflections consists of in purely physical terms(but I have to imagine that a reflected signal is a certain amount of the current(s) that was originally sent through the trace) but apparently if I send a high-frequency signal down a trace(or wire) then under certain conditions the signal can travel down the trace(wire) only to bounce off of something and then travel all the way back to where it first came from. Where it might bounce off of something again and so it can bounce back and forth travelling the length of the trace over and over again getting smaller and smaller until it dies out.
This is just stuff from the top of my head, stuff that I have never acquired a fair understanding of in the first place. But if we restrict the scenario to this very high frequency situation, if a signal or current can be reflected back towards where it came then why would it even have to be relevant whether there are a closed loop or not.
Couldn't a broken loop present paths for such currents to bounce around in?
I know that I am at a relatively very low level of insight into these complex matters but I don't now why that wouldn't be possible.
I would be very happy if anyone could enlighten me.
I have one single hypothesis without anything what so ever to support it, but perhaps the very high frequency scenario alters the way that a traces copper is utilized so that it in some respect is a closed loop in it self?
AI: You are completely right.
The "closed loop" rule comes from a simplification that we often use in circuit analysis called the "lumped component model". This model provides a good approximation to actual circuit behavior at DC and low frequencies, where the effects of parasitic inductance, capacitance and the speed of light can be ignored.
However, these factors become significant at high frequencies and can no longer be ignored. Any circuit of nonzero size has inductance and capacitance, and is capable of radiating (or receiving) an electromagnetic wave. This is why radio works at all.
Once you start considering parasitic capacitances, you'll discover that everything is connected to pretty much everything else (moreso to nearby objects), and there are closed loops where you wouldn't normally expect to find them.
|
H: Why does an analog oscilloscope have a frequency number written on it?
So in our lab, we are working with an oscilloscope, an Analog to be precise. It is the Tektronix 2205. My question is if it is analog, then why would it have "20 MHz" written on its box.
AI: Being an analog scope the signal is limited by the BW of the amplifier of this unit to 20MHz.
This in turn implies it's minimum rise time from 10 % to 90 % defined as approx 0.35/BW or 17.5ns according to manual.
This is often defined by the -3dB bandwidth for a low pass filter. The attenuation slope beyond this is undefined but is expected to be -6dB per octave per "order" of RC filter equivalent circuit so it may drop off as a 1st order then higher orders from cascaded stages.
Since this scope was produced in the 80's to meet the low cost market, the power required and cost of components at that time, dictated these limits. (the most expensive part being the CRT BW)
If you have a higher BW (e.g.200MHz) scope , it will probably have a 20MHz filter button for improving measurements with unwanted RF noise .
The important parameter to remember is that although old CRT displays had pixel BW up to 250MHz this was only from pixel to pixel and not 90% of the vertical rise. The cost of making these high voltage fast slew rate amplifiers and tubes dictated the overall cost. Now with DSO's the BW is increased cheaper with results that can use a low cost LCD.
|
H: LED series and parallel connection 7S3P
using 21nos 3w led diode. I am using 24v dc and 3amp supply. Connected 21x 3w led
Can I add another parallel connection to run 5v dc 0.16 Amp fan ?
Now I am using 3 x 4.7 ohm , 2W resistors, which are too hot from 24V.
AI: May be a solution if thermally matched.
simulate this circuit – Schematic created using CircuitLab
Add 0 in front of dot .16amp and capitalize Amp , and fan implies LEDs are hot but his problem is mismatched fan voltage and hot series R's that even fan cannot cool.
best solution is use a better metal PCB heatsink for LED's and if necessary, a fan to match supply voltage
|
H: RC circuit: C appears to increase in size with frequency
I've come up with an RC circuit, which is using the output pins of a NodeMCU board to create an AC current for measuring conductivity of a liquid.
What I'm actually measuring is the discharge time of the capacitor, and that's what this question is about. At low frequencies (1-2 kHz) the measured time is exactly as expected based on the capacitance of 47 nF, knowing that the input pin flips when the voltage reaches 50%. That's the time I'm measuring: from fully charged to 50%.
Now at higher frequencies (by lowering the value of the load resistor) the capacitor appears to go up in size, at 120R I'm getting discharge times of around 7200 nanoseconds, that gives me a capacitance of about 120 nF.
How could this be possible?
Other possibly relevant information: the capacitor appears to be a film type (it's a rectangular block); the whole setup is operating on a solderless breadboard (I know there may be stray capacitance in there but that doesn't matter here - I don't care as much about the actual value of the cap as I care about it being constant).
J1 is three GPIO pins of the NodeMCU. The EC probe I replaced by resistors of various value just to measure the response, which I expect to be linear. C1 is first fully charged by the pins 1 and 2 (it gets 100 microseconds for that, RC is just over 15 microseconds), then discharged over pin 3 while pin 1 measures the voltage, flipping when the voltage drops below 50%. All in all a very basic RC circuit. I expect that lowering the value of the resistor over J2 decreases the time linearly - but it doesn't.
At 33k discharge time about 800 us, R/t/0.5 = 48 nF.
At 10k discharge time about 235 us, R/t/0.5 = 47 nF.
At 330R discharge time about 12 us, R/t/0.5 = 73 nF.
At 120R discharge time about 7 us, R/t/0.5 = 120 nF.
My timing is in the 12.5 ns resolution (80 MHz clock speed) so that's not the problem. Being a few ticks off doesn't explain this.
AI: It always feels a bit silly if I can answer my own question minutes after I posted it.
The problem is completely within the software. I completely forgot to correct for software overhead. It turns out that by simply deducting 4400 ns from the measured time, everything falls in place!
@Andy aka: the current is not the problem. NodeMCU can source 12 mA (the R1 limits it to 10 mA peak) and sink 20 mA, a limit which is reached when the EC probe drops under 150R. This means I should indeed add an extra resistor to protect my NodeMCU from short circuits or really high ECs.
|
H: Can't understand where backlight pins are in this LCD module
I have this LCD display: RC0802A-BIW-CSX
It is supposed to have a backlight, but I can't understand where the backlight LED is since the connections are just 14 pin, and backlight is not mentioned. Any idea?
AI: connections are just 14 pin, and backlight is not mentioned
The backlight LED connections are not on the same connector. They are on the opposite side of the module.
(drawing from p.7 in the datasheet)
Such an arrangement is not uncommon for character LCDs. Here's another example.
|
H: Standard component size for antenna matching circuit
I am fairly new to the RF world. It was certainly not my strongest subject. I am currently designing a board that uses the SIM868 module (GSM) and I need to design an antenna matching circuit. In the case above what size component should L1 be? 201, 402?
simulate this circuit – Schematic created using CircuitLab
AI: Depends on what "Q" your PI matching circuit needs. And the surrounding components that parasitically-couple to the inductor. Are larger inductors more accurate/stable?
|
H: Can I convert a 2.5W DC to AC with a 120W DC-AC Inverter?
I want to convert the output of USB to AC voltage, and I come across with this 120W 12V power inverter. Is it possible to step up the 5V DC to 12V, later convert it to AC with a 120W DC-AC inverter? If so, what will I get? As I know 120W is the max. output power, do I need to concern about the input?
P.S. I'm a self-learner.
AI: The theoretical maximum you could get out with 2.5W in (5V @ 500mA) would be 2.5W out.
A 120W inverter will likely have very bad efficiency at such low power out, and you are going through two conversions (the inefficiencies multiply), so I would guess you'd be lucky to get 1W out, and it's completely possible, maybe likely, that it would not fire up the 120W inverter at all.
In most cases there should be a better way of accomplishing whatever it is that you are trying to do.
|
H: Which way to hook up boostrap diode for switching regulator?
In the datasheet for the switching regulator I'm using, it says you can supply an optional diode to put on the BST pin of the regulator, and in Figure 2 it says IN if Vin less than 5.5V, or OUT if Vout less than 5.5V. In the picture, I am unsure which way they have it hooked up, I am assuming 'IN' since the diode is pointing towards the BST pin? The regulator is a fixed 5V output model.
So I need help on trying to understand which way to hook it up, as the datasheet doesn't say much about this diode: An external bootstrap diode (D2 in Figure 2) is recommended if the input voltage is less than 5.5V or if there is a 5V system rail available. This diode helps strengthen gate drive at lower input voltages, result- ing in lower on-resistance and higher efficiency.
The regulator's input is on the same power source as a 12V starter motor, which is controlled by a MOSFET, there will be a voltage drop on the circuit when the FET is activated, so would hooking this diode to 'OUT' help the situation since in Figure 2 it specifies 'OUT' if Vout less than 5.5V?
Would hooking up the diode's cathode to GND and anode to the BST pin be what they consider 'OUT'? On second thought maybe I need to hook it up as 'IN' since the voltage drop happens on the input if the starter motor approaches stall current, the battery voltage can dip to 4.4V temporarily.
Sorry for the multitude of questions.
Thank you for your help.
AI: The anode of the diode is not shown connected anywhere. You can connect it to either the IN or OUT (obviously if you connect it nowhere you can omit the diode).
The cathode always goes to BST if the diode is present.
The purpose of this diode is to charge C23 when the output switch line (SW) is near to ground. Since the internal MOSFETs are n-channel the gate voltage must be higher than the source voltage in order to turn the MOSFETs on.
Since your input voltage can be higher than 5.5V you have two options only- leave the diode out or connect it to your 5.0V output.
|
H: 555 Timer: Does the discharge pin show ground when in reset?
It is not clear to me whether the discharge pin could be used to (for example) discharge a capacitor when a 555 timer is in reset.
I didn't see anything in the datasheets that gives hints about what will happen, aside from internal schematics. Block diagram from a CMOS 555 timer variant:
The Wikipedia article describes the discharge pin as "in phase with the output," whatever that means. If you take that to mean that the discharge pin is shorted to ground whenever the output is LOW, then putting the 555 in reset should ground the discharge pin. These two articles say the same thing.
However, I just tried this in a simulator and discharge was not grounded when reset was applied.
AI: Yes, the discharge transistor is 'on' whenever the output is low.
If your simulation appears different then perhaps the model or the connection is faulty.
Below you can see from TI's data sheet for their LMC555-- similar to yours, the connections go nowhere else, so if the internal node /Q is high, the output is low and the discharge MOSFET is 'on'.
|
H: RC time constant changes with introducing LED
I am testing time constants for a capacitor. Practical implementation is almost accurate as theoretical calculation. But the Time const changes(rises) when I introduce an LED in series with R AND C.
cap=1000uF; Res=10K; Vcc=5V;
When only Cap and resistor is present, the Time constant comes out to be 10sec at 63% of vcc which is ~3v1 and practically it comes out to be ~11sec so it's okay.
But when I introduce 2v2 Red-Led in series with it, the time const rises to 30sec. As far as I know, LED has internal resistance in mili-ohms so the R will not be the reason for this much change.Other factor is the LED capacitance, It will probably have some value but that value should reduce the Time constant instead of increasing it because it is in series with the 1000uF so the overall capacitance should be low, hence (RXC) should be low.
Am I missing something?
AI: An LED is not a resistor! Simple as that.
It is a totally non-linear device. Look for I/V curves of diodes to understand what I mean:
(by H1Voltage from Wikimedia Commons)
A resistor would be a perfect straight diagonal line through the origin point with the slope being the resistance.
That means that for low voltages, the "apparent" ohmic resistance is large, and for high voltages very low. For negative voltages (which can be often involved when one is concerned with things like step responses), we typically even model diodes as perfect isolators (R going to infinity).
Especially, that means that you can't just go and say "hey, that's the time constant of my R-C-LED circuit", since unlike RC circuits, you can't just scale the input voltage and get a simply scaled output. A diode is a nonlinear device!
So, most probably that means you're trying to calculate/simulate/measure a number that's practically meaningless.
|
H: Good practice when designing a PCB and stencil?
While I generally use nothing smaller that SOIC chips or 0603 passive components, I have to design a PCB with a WSON-14 IC with tiny 0.5mm pin spacing and with an exposed pad.
While I generally use a syringe to apply solder paste I thought that, for such a small beast, I should better order a stencil with the PCBs.
Since this will be the first time I order and use a stencil, I wonder if there is any good practice to ease the alignment of the stencil and the application of the solder paste.
For what it’s worth, I’m using Kicad to design the PCB. The PCB is tiny (0.4"×0.7"), and I consider ordering to a low-cost Chinese factory (~$10 for 10 PCBs, ~$15 for a stencil).
Any advice is welcome.
AI: well for easing the alignment I usually make some two '+'(plus) signs at two sides of the PCB I draw those plus signs as multi-layer in Altium designer so it will be on the stencil too.
one more thing is using a transparent stencil so that you can see the other side
and If you are making lots of PCBs, it is profitable to buy a stencil than to make one
but remember to ask the operator not to cut the PCBs to pieces so that you can put the components all at one try it is a lot faster
another way is that you can also just export your pins as a CAD file and send if for a laser cut on a 0.5mm It will cost you much less.
|
H: PCB Layout - Best way to hand solder under pads
Currently i'm drawing a pcb board in Eagle. Can't get a viable solution to allow people easy handsolder this component (WS2812B).
I will have 60 of this in the PCB, and i like to use them instead of RAW LED because it already contains the capacitor and resistor, so it will spare 60x4 solder joints. Also i find the price lower than source led + capacitor + resistor.
PCB is to be hand soldered like a KIT. No autoplacement machines.
My main ideia is place them at top layer and do vias to solder from bottom layer. Is it viable or there are better solutions?
Regards
AI: Seems this device is designed to be cable-mounted. I very doubt people will be able to mount it onto the board through vias. There're several risks to it:
insufficient solder: bad connection through vias, which may break in most critical situation. I think you do not want returns and bad reputation for bad kit design;
too much solder: risking to short the pins, potentially frying the device.
If you'd be soldering it yourself, probably you can manage to have acceptable soldering quality (after several broken boards), but as others will be soldering it I very doubt they will gain required skill to solder them properly.
Go for separate components, even if it is more cost and more work on soldering.
|
H: Confusion about the use of AIGND in a differential amplifier
Above is a differential amplifier used to measure differential ended signals.
Here is what I understand:
The amplifier subtracts two input voltages with respect to its measurement ground(AIGND in the figure).
But this AIGND should also be connected to the signal source’s ground right? Otherwise current cannot loop from amplifier’s inputs back to the source and cannot create a potential difference(?)
So I have the following questions:
1-) Must the AIGND be connected to the source’s ground? If so assuming the source is a differential signaling device does that mean AIGND will be connected to the source’s DC power GND?
2-)If AIGND must be connected all the way to the source’s GND, should that be done by using an extra wire or using the building earth as connection?
EDIT:
Here is more on the confusing part. Below is another illustration of differential ended system.
But how will the current loop above from the source back to the source? In this case the AIGND is not wired back to the source's ground.
EDIT2:
I made the above drawing to make my confusion more clear.
Above two 2V battery creates a differential signals which goes to the inputs of the differential amplifier.
Here the batteries' common point is X which is not connected to anywhere else than battery terminals.
So here V_AX = +2V and V_BX = -2V.
Now what is the voltage V_AG and V_BG here? (G is the amplifier's measurement ground which is AIGND). X is not connected to AIGND here. Does this make sense?
AI: Your amplifier will have an "input common mode range" specification. While it measures the voltage difference between its inputs, both inputs must be inside the amp's common mode range (relative to its ground) for it to work.
Linking the grounds ensures this. It also allows use of a shielded cable.
Usually, but not always, this range is inside the amp's power supplies, minus a few volts.
If the grounds are not linked, then very high voltages can exist, due to static charges.
Sometimes you cannot link the grounds because you want isolation. In this case, your instrumentation amp has to be a transformer... or you can use an amplifier on the sensor side and optical isolation, for instance.
Reply to your edit:
The resistors are there to allow the amp's input bias currents to go somewhere, and also to ensure the input common mode range is respected.
Reply to your edit2:
Now what is the voltage V_AG and V_BG here?
There is no way to know. In reality, it would depend on leakage currents, static charges, input bias currents, input impedance of the amp... If the amp is a standard instrumentation amp, it would not work, since the input bias currents would have nowhere to go, and this would set the input common to a random value, probably outside the admissible range.
Responding to your comment:
There are several ways to link the grounds:
Wire and Cable shields make an explicit connection
Earth can make an implicit connection
If all boxes are floating (or only one is earthed) then the usual way is to use cable shields or wires. Simple and effective.
"Earth" is only available if both ends if the connection are earthed, of course. Since the potential of "Earth" may vary, if the cable is long (ie, between buildings) then large currents can flow in its "ground" connection. In this case, it is better to have only one equipment earthed. This is why Ethernet uses transformers, for example.
When both equipments are earthed, you also get a free ground loop. In this case, you want any current flowing into this ground loop to flow into the proper parts of your circuit (for example, the thick aluminium plate at the back which carries all connectors) and not in a track on your PCB. This is the case of "pin 1 problems" for audio gear, for example.
When both equipments are earthed, it is also possible not to connect their grounds together at DC using cable shields. A capacitive connection is still mandatory, of course, or else the shield becomes useless at HF.
EDIT 2
Input bias currents flow from both amp inputs. Their direction depends on the amp. If they aren't allowed to return to amp's ground, this means the inputs are floating. In this case, of course no bias current will flow since it has nowhere to go, but then the amp won't work.
For example, if the input stage is PNP, then (ignoring schemes like bias current compensation) the base current flows out of the inputs. Without a return path, there will be no base current, the input transistors with turn off, and the amp won't work, its output will most likely clip.
So, a more correct way to write "Input bias currents flow from both amp inputs" would be: "If input bias currents are not allowed to flow and return to the amp's ground, then the amp will not work."
Now, if you use a FET input amp, bias current is zero (no base current), but there is still a tiny amount of leakage current coming out (or into) the inputs. If it's a JFET, its gate will also have leakage.
Now, if grounds are not connected, there is still a very high, but not infinite resistance (like air, or a bit of FR-4)... then you will have :
U=RI
Input voltage = (tiny leakage current) * (enormous insulation resistance between unconnected grounds)
Whichever wins, wins, but since this depends on temperature and humidity, your inputs will clip against one rail or the other, and the amp won't work.
|
H: Are there 8 bit ARM processors?
Is there anything below 32-bits for an ARM processor? I was wondering if there is or ever was an 8-bit ARM processor. I've searched but not seen any and so it seems that ARM processors are either 32 or 64 bits. Why is that?
I also noticed while writing this question, that the tag for ARM even says 32-bit microcontroller IP.
AI: Assuming "n bit" refers to the size of the general purpose registers all arm processors are 32 or 64 bit.
Prior to designing the ARM processor Acorn's computers had been designed around the mos technology 6502 and variants. They decided to leapfrog over the 16 bit generation and go straight to a 32-bit design. Instructions were 32 bits wide and so was the data path. Initially some bits were used as flag bits limiting addreses to 26-bit but these flags were later done away with allowing a fully 32-bit address space.
Acorn computers failed to maintain a viable position in the market but before that happened ARM had been spun off into a seperate company. ARM was a low power architecture and started to see a lot of use in mobile/embedded computing. Eventually as transistors got cheaper (in both cost and power terms) it worked it's way down into the microcontroller market.
Arm later introduced a mode called "Thumb" (sometimes reffered to as "Thumb1") where the instructions were only 16 bits wide. The registers however remained 32 bit. Thumb in it's original form was an incomplete instruction set, certain important operations could only be performed by switching back to Arm mode.
Even more recently arm introduced "Thumb2". This extended Thumb to produce a complete instruction set using a mixture of 16-bit and 32-bit instructions. Again the data registeres remained 32-bit. Modern ARM microcontrollers only support Thumb2 mode (sometimes with only a subset of the full "thumb2" instruction set), not traditional arm mode.
|
H: Wirelessly program AVR with Bluetooth device and can be used for data communicationtoo?
I am Embedded Software developer.
Don't have much knowledge of hardware side but am trying some hardware stuff.
Is it possible to program AVR (ATMega328p) wirelessly using Bluetooth device (HC-05) and then use the same device for data communication?
I have tried this circuit to power ON HC-05 and HC-05 RESET(KEY) by MCU's GPIO and PIN32 of HC-05 is used to reset MCU during programming. The problem is that whenever MCU reset HC-05 also get switched OFF.
Is there any solution or any other circuit that can program AVR and also can communicate data from other Bluetooth devices?
AI: If you're an embedded programmer, you'd pretty definitely be aware of the concept of bootloaders.
Typically, you'd have a minimal firmware (the bootloader) that
runs at boot of your ATMega,
sets up the bluetooth device,
uses it (in any way imaginable) to check whether a firmware update exists,· if there's one, receives that and· writes it to the flash of the ATMega
jumps to the position of the firmware in flash memory.
Pretty much, classical bootloader with update function.
|
H: How can I interpret the circuit of the voltage probe with cable between the probe body and the compensation box?
Let's take a look at the voltage probe circuit without the cable between the probe body and the compensation box.
This circuit is a typical RC voltage divider and the following relation holds; $${R_P} = \beta {R_{OSC}},{\rm{ }}{{\rm{C}}_P} = \frac{1}{\beta }C'
% MathType!MTEF!2!1!+-
% feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
% hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
% 4rNCHbWexLMBbXgBd9gzLbvyNv2CaeHb5MDXbpmVaibaieYlf9irVe
% eu0dXdh9vqqj-hEeeu0xXdbba9frFj0-OqFfea0dXdd9vqaq-JfrVk
% FHe9pgea0dXdar-Jb9hs0dXdbPYxe9vr0-vr0-vqpWqaaeaabiGaci
% aacaqabeaadaqaaqaafaGcbaGaamOuamaaBaaaleaacaWGqbaabeaa
% kiabg2da9iabek7aIjaadkfadaWgaaWcbaGaam4taiaadofacaWGdb
% aabeaakiaacYcacaqGGaGaae4qamaaBaaaleaacaWGqbaabeaakiab
% g2da9maalaaabaGaaGymaaqaaiabek7aIbaacaWGdbGaai4jaaaa!5081!
$$ where $$C' = \left( {{C_C} + {C_{OSC}}} \right)
% MathType!MTEF!2!1!+-
% feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
% hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
% 4rNCHbWexLMBbXgBd9gzLbvyNv2CaeHb5MDXbpmVaibaieYlf9irVe
% eu0dXdh9vqqj-hEeeu0xXdbba9frFj0-OqFfea0dXdd9vqaq-JfrVk
% FHe9pgea0dXdar-Jb9hs0dXdbPYxe9vr0-vr0-vqpWqaaeaabiGaci
% aacaqabeaadaqaaqaafaGcbaGaam4qaiaacEcacqGH9aqpdaqadaqa
% aiaadoeadaWgaaWcbaGaam4qaaqabaGccqGHRaWkcaWGdbWaaSbaaS
% qaaiaad+eacaWGtbGaam4qaaqabaaakiaawIcacaGLPaaaaaa!4A8A!
$$ is the equivalent capacitance of the compensation box and the oscilloscope and $$\beta = \frac{{1 - \alpha }}{\alpha },{\rm{ }}\frac{{{V_{out}}}}{{{V_{in}}}} = \alpha
% MathType!MTEF!2!1!+-
% feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
% hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
% 4rNCHbWexLMBbXgBd9gzLbvyNv2CaeHb5MDXbpmVaibaieYlf9irVe
% eu0dXdh9vqqj-hEeeu0xXdbba9frFj0-OqFfea0dXdd9vqaq-JfrVk
% FHe9pgea0dXdar-Jb9hs0dXdbPYxe9vr0-vr0-vqpWqaaeaabiGaci
% aacaqabeaadaqaaqaafaGcbaGaeqOSdiMaeyypa0ZaaSaaaeaacaaI
% XaGaeyOeI0IaeqySdegabaGaeqySdegaaiaacYcacaqGGaWaaSaaae
% aacaWGwbWaaSbaaSqaaiaad+gacaWG1bGaamiDaaqabaaakeaacaWG
% wbWaaSbaaSqaaiaadMgacaWGUbaabeaaaaGccqGH9aqpcqaHXoqyca
% GGUaaaaa!53AF!
$$
So far so good. However, what about the voltage probe with the cable?
In this case, there is the cable between the probe body and the compensation box and the cable should be treated as a transmission line in general case. So, Zin, the equivalent impedance from the cable, through the compensation box, to the oscilloscope is such that $${R_P} = \beta {R_{in}},{\rm{ }}{{\rm{C}}_P} = \frac{1}{\beta }{C_{in}}
% MathType!MTEF!2!1!+-
% feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
% hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
% 4rNCHbWexLMBbXgBd9gzLbvyNv2CaeHb5MDXbpmVaibaieYlf9irVe
% eu0dXdh9vqqj-hEeeu0xXdbba9frFj0-OqFfea0dXdd9vqaq-JfrVk
% FHe9pgea0dXdar-Jb9hs0dXdbPYxe9vr0-vr0-vqpWqaaeaabiGaci
% aacaqabeaadaqaaqaafaGcbaGaamOuamaaBaaaleaacaWGqbaabeaa
% kiabg2da9iabek7aIjaadkfadaWgaaWcbaGaamyAaiaad6gaaeqaaO
% GaaiilaiaabccacaqGdbWaaSbaaSqaaiaadcfaaeqaaOGaeyypa0Za
% aSaaaeaacaaIXaaabaGaeqOSdigaaiaadoeadaWgaaWcbaGaamyAai
% aad6gaaeqaaaaa!5150!
$$ where Rin and Cin in parellel connection which equivalent impedance is Zin?
AI: It is most straightforward to just treat the cable as a parallel capacitance rather than a terminated line. The capacitance of coax will be in the range 20-30pF/ft.
That is a about 90pF for a 3 feet cable. This will appear in parallel with Cc. Cp will need to be correspondingly larger to compensate the network.
In reality the cable is not made as a normal coax, it often uses a very fine gauge resistance wire as the centre conductor to reduce the capacitance and also to minimize resonances.
Also in real scope probes intended to have 100 MHz of bandwidth or more there will be number of other small inductors and capacitors to equalize the response at high frequencies.
This is an old but very good document from Tektronix Circuit Concepts series describing scope probe circuits. Oscilloscope Probe Circuits
EDIT:
At low frequencies where the wavelength is large compared to the length of the cable the cable can be treated as a lumped element model.
With high system impedances and moderate frequencies the inductance component can ignored. Typically real scope probed will use resistance wire as the center conductor to minimize any resonances caused by the cable inductance.
|
H: STM32F4 serial RXNE flag
I am trying to receive serial on a stm32f411.
I decided to monitor the the RXNE flag to check the serial buffer. I can get the flag to work, however, the issue is that I do not think it is working completely.
I set up a test to increment a counter based on how many times I need to read the DR register. The issue is I cannot get it to increment the counter more than once. To verify this, I simply made a loop to turn on an LED based on how many times I accessed the DR register.The max I can make the LED Blink is 2 times. Is my logic in my code wrong?
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "stm32f4xx_hal.h"
/* USER CODE BEGIN Includes */
#include <stdbool.h>
/* USER CODE END Includes */
/* Private variables ---------------------------------------------------------*/
UART_HandleTypeDef huart1;
/* USER CODE BEGIN PV */
/* Private variables ---------------------------------------------------------*/
uint8_t pdiddy_increment = 0;
int pdiddy[15];
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
void Error_Handler(void);
static void MX_GPIO_Init(void);
static void MX_USART1_UART_Init(void);
/* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE END PFP */
/* USER CODE BEGIN 0 */
// detect if anything is in serial buffer
uint8_t Serial_Available(UART_HandleTypeDef *huart)
{
uint32_t RX_State;
RX_State = huart->Instance->SR & UART_FLAG_RXNE;
//something is in the buffer
if (RX_State > 0)
{
return 1;
}
//nothing is there
return 0;
}
/* USER CODE END 0 */
int main(void)
{
/* MCU Configuration----------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_USART1_UART_Init();
while (1)
{
while (Serial_Available(&huart1))
{
/*read DR and put value in array*/
/*Reading DR, increment shift*/
pdiddy[pdiddy_increment] = (uint8_t)(huart->Instance->DR & (uint8_t)0x00FF);
pdiddy_increment++;
}
while (pdiddy_increment > 0)
{
HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_SET);
HAL_Delay(400);
HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET);
HAL_Delay(400);
pdiddy_increment--;
}
}
/* USER CODE END 3 */
}
AI: Your code is written with the implicit assumption of a serial FIFO, but that FIFO is only 1-deep in hardware, and has not been extended to a larger size in software.
The first element of your while() loop checks to see if a character has been received, and if so will increment your counter, but it can only increment it once.
Next your code enters a blocking drain loop that will not exit until the counter has been drained to zero.
During the blocking drain loop, any number of serial characters could be received, but because the hardware only has a single holding register, the hardware can only indicate a few distinct things:
No character has been received
One character has been received
A character has been received and then the register has overflowed because another was received before it was emptied.
A serial formatting error has occurred, with or without some of these other things.
When your code that checks the serial gets to run again, it can only correctly interpret the first two of these states - so the only thing it can possibly do is to increment the counter by one, or not - no other increment is possible.
If you want to count characters that come in during a blocking LED flash sequence, you will need to use a serial receive interrupt. Or you could do the LED flashing in a non-blocking state machine, in a loop that also polled the serial.
|
H: Powering a calculator's liquid crystal display (LCD)
Hello, so I'm trying to use a calculator's LCD for a project of mine and I want to put a current through it. However, the LCD is powered by the "sheet of plastic" shown in the picture, circled in red. Does anyone know what that "sheet of plastic" is and how does it work? In addition, how can I put a current through it with just two wires?
Thanks!
AI: That is a thermally bonded ribbon circuit.
You can remove it from the existing PCB with a hair dryer, though you'll probably destroy the first one you try. Also be careful the hair dryer blast does not hit the plastic housing if you have plans for that - they can warp at surprisingly low temperature.
You can then re-attach the ribbon to a custom PCB or breakout, using something like a solder station with a large tip set to absurdly low temperature (try it against the edge of the ribbon to make sure it doesn't melt it) or possibly a small sealing iron like used for model airplane covering; likely the factory uses some sort of heated bar press.
An LCD display requires an AC voltage between a select and a segment pin. If you look around, you'll probably find some app notes on driving them from an MCU by leveraging the 3-state capability. Essentially you toggle the select and the segments you want, feeding them a square wave in opposite polarity from each other, select in same polarity with the segments you don't want, and assign the other selects as inputs. Then you cycle to the next select and drive the segments that should be on for that, etc. A temporary firmware with serial input can let you probe around the possibilities and find the mapping.
It is possible to do some crude tests with a single flashlight cell and some wires, but with DC excitation the segments will only pulse briefly before fading, and continued application of DC is undesirable as there are electrochemical degradation concerns. Setting up an MCU to pulse two pins in opposition would be a better test source.
|
H: Is there significance to length in a matched transmission line?
I am looking to dabble into some RF PCB design with a microstrip line to a WiFi chip antenna, and I am trying to understand if my intuition is correct.
I have used various calculators to determine the width of the trace I need for a 50\$\Omega\$ \$Z_0\$ on a 4 layer PCB -- all agree with roughly 18 mils on FR4.
Since the transmitter, transmission line, and chip antenna are all 50\$\Omega\$, there should be no standing wave pattern along the line and \$V(x)\$ and \$I(x)\$ (where \$x\$ is the position on the line) should be constant.
Aside from ohmic losses and parasitics (which the latter can be tuned out), does this imply that the length of the line can be arbitrary? i.e., the trace does not need to be a specific electrical length such as \$\lambda/4\$?
I am leaning towards that it isn't, but I've reviewed some reference designs from TI (the CC3100BOOST and the CC3200 Launchpad) that have caused some confusion. The CC3100 uses a trace length of 660mil from chip to antenna, which is almost exactly \$\lambda/4\$ at 2.4GHz, and the CC3200 uses a 1200 mil line, which is very close to \$\lambda/2\$. I'm not sure if this is intentional or a coincidence.
I'm looking for a (perhaps tediously) clear answer before I make any mistakes.
AI: In the ideal case, where source, line and load all have the same impedance, there is no significance to the length of the line, other than loss (shorter is better).
Where tolerances make the impedances depart from ideal, there will be small effects, but unless you know which way the departures are going, it's not possible to say whether you will be better off with any specific length.
If the source and load are well controlled, and the line is poorly controlled, then you will be better off with multiples of \$\frac{\lambda}{2}\$ line length. This length transforms the impedance at one end of the line into the same impedance, regardless of the line impedance.
If the source deviates down, and the load deviates up, or vice versa, then an odd multiple of \$\frac{\lambda}{4}\$ would be better, as that length of line transforms Zload into \$\frac{Z_{line}^2}{Z_{load}}\$ at the source end.
However, for either of these cases, you need to have enough control over the impedances to know how wrong they are, and if you know that, you might as well make them correct, or tune for them properly.
The only other case to note is that if the connection line is very short, say less than \$\frac{\lambda}{10}\$ (and the shorter the better), errors in the line impedance will have little effect.
To check your line width calculations, a 50ohm microstrip on FR4 is roughly 2 substrate thicknesses wide.
It's worth noting that the impedance can be fairly wrong, before significant reductions in power transfer between source and load occur. A quick simulation on SPICE may be worth doing to give you an idea of the permitted tolerances.
|
H: How can you obtain SOP and POS (Boolean Logic) given the truth table?
Recently, it appears to me that few people on here are having issues determining SOP (Sum-of-Products) and POS (Product-of-Sums). So lets go through an example to help those people solve their future homework questions instead of giving them the answer. The initial question concerning SOP and POS is how you can obtain it from a simple K-map or truth table of few inputs Boolean logic?
What are the steps to take to solve for SOP? Or represent the truth table as SOP?
What are the steps to take to solve for POS? Or represent the truth table as POS?
Given the following truth table:
AI: First of all, these are the steps you should follow in order to solve for SOP:
Write AND terms for each input combination which produce HIGH output.
Write the input variable if it is 1, and write the complement if the variable value is 0.
OR the AND terms to obtain the output function. In other words, add the AND terms together to produce your wanted output function.
SOP will have this form from the truth table given in the question: $$F = \overline{A}BC + A\overline{B}C + AB\overline{C} + ABC$$
The first term:
$$\overline{A}BC$$
A is equal to 0 in the truth table when output F is equal to 1.
The second term:
$$A\overline{B}C$$
B is equal to 0 in the truth table when output F is equal to 1.
The third term: $$AB\overline{C}$$
C is equal to 0 in the truth table when output F is equal to 1.
The fourth term: $$ABC$$
A, B, C are all equal to 1 in the truth table when output F is equal to 1.
Secondly, these are the steps you should follow in order to solve for POS:
Write OR terms when the output F is equal to 0.
Write the input variable (A, B, C) if the value is zero, and write the complement if the input is 1.
AND the OR terms to obtain the output function. In other words, multiple the OR terms together to get the final output logic equation.
POS will have this form from the truth table given in the question:
$$F=(A+B+C)(A+B+\overline{C})(A+\overline{B}+C)(\overline{A} + B + C)$$
The first term:
$$(A+B+C)$$
A, B, and C are equal to zero and the output F is equal to zero as well.
The second term:
$$(A+B+\overline{C})$$
Output F is equal to zero but C is equal to 1. Hence why we take complement.
The third term:
$$(A+\overline{B}+C)$$
Output F is equal to zero but B is equal to 1. Hence why we take complement.
The fourth term:
$$(\overline{A}+B+C)$$
Output F is equal to zero but A is equal to 1. Hence why we take complement.
Essentially, you have to follow the three first steps in order to successfully for SOP and POS. You could have a lot more terms depending on your output results or the number of inputs you have.
Note that the results shown above are not in the reduced format. You could potentially reduce those Boolean-logic equations much more.
|
H: Power controller says 0/10vdc command signal what does that mean?
I have a power controller here and I try shorting these two prongs but it doesn't turn on and give me 12 volts. I'm new to electronic engineering so does the 10 vdc on the manual mean that I have to apply 10 volts dc to the prongs in order for the power supply to turn on?
Here's a pic
For reference, the manual is here (PDF). The connectors are shown by the figure at the top of page 5.
AI: According to the manual yes you need to supply a control signal.
See the manual, you need a variable resistor connected to the four pin connector.
(1K pot recommended, 20K permissible)
|
H: How do I integrate multiple IC circuits for audio?
My primary concern here is the correct way to apply power (and grounding) to an assortment of single and dual-supply ICs in a mixed environment for an audio application.
I constructed a portable audio mixer using different ICs to get (most of) the features I wanted. The tell-tale issue is that whenever the audio levels were increased enough to push the "VU meter" higher, all of the mute/active channel indicators would dim. This led me to the conclusion that my power handling was not right.
Due to this, and enclosure congestion, I am now working on redesigning the mixer with SMD components. I did seek out a “best practice” solution, but found nothing obvious (to me) on the subject of these "combined factors."
What I’m Looking to Learn
What is the best practice for powering ICs and managing audio grounding in this type of environment? Should:
all single supply ICs be connected to the +/- rails, instead of +/0v in a mixed single/dual supply IC situation?
I just pick one voltage (5v) appropriate to all ICs involved, and regulate to that right at the power input?
I treat each IC circuit as separate devices within the whole project, and split and/or regulate each one as needed?
I've supplied the final state of the first build for your analysis and input. In can be viewed here. It may be a little messy, but it originally served as my "notebook" as I was breadboarding and updated as I was kludging.
Hopefully, I have provided a thorough enough detail on the current situation (additional details below).
Thanks!
P.S. I know this could be done much simpler - without all of the ICs. The constraints I have placed on myself for size and control options are due to the fact that I am trying to build this mixer to fit the same format as the instruments with which they will be used.
My Own Analysis
What I think I should be doing is bringing in the 9v power to the on/off switching circuit - positive always connected, and negative on a flip-flop controlled MOSFET like this. From there, regulate down to 5v, and split it with a TL072 to +/-2.5v in this manner. Then, build the circuits independently, with their own decoupling caps. Deliver the full 5v to all IC circuits, and connect the 0v/ground to ICs whenever a ground pin is present. Connect the audio jack sleeves and potentiometer grounds to 0v as well.
Design Additions
Since I am picking up so much space in the main compartment, I am adding a some functions with ICs having a max rating of 5.5v.
Current Component Considerations
The ICs I currently have and plan on working with at this point are CD4013 Flip-Flops (power MOSFET and switch IC control), CD74HC4316 Switches (muting), LM358 Amp (output), TL072 (ground reference), PT2399 Echo Processor, DG403 Switch (echo bypass), and AN6884 LED Driver. I am considering the IQS127D Touch Sensors to replace the tactiles for my mute switch and echo bypass controls.
Edit/Update 3/28
Below is my interpretation of how I should implement the suggestions I have received so far. Although power handling is my main concern, I have created a block diagram including a few passive components that might be of note. i.e. coupling capacitors and some resistors (for 0v, circuit interconnects, and those within the audio path). Some are left blank, but those related to power are labeled. I am considering 3 regulators, and blocks are color coded by the board on which they will reside. ICs at the heart of each block are already linked above.
My Original Approach
I (mostly) applied the suggested applications from data sheets where available, making a few small adjustments.
The original build used a voltage divider to create a virtual ground reference with the option of either a 9vdc power supply, or a battery of 6xAAs. 10µF caps were placed at the power input for all decoupling (mistake?). Wires to the powered boards are about 7-8". All audio signals were grounded to the 0v rail.
Where a dual-supply IC was used, I connected the Positive, Ground, and Negative to +4.5, 0, and -4.5v accordingly. With single-supply chips, I connected to +4.5, and 0v. I think this was my biggest mistake. It made total sense at the time, but caused an imbalance yielding (if I recall correctly) an approx. +6/-3v supply. I "corrected" the issue with a potentiometer on the divider so that I could adjust it until the +/- rails were both equal.
When the original dimming issue occurred, I first reduced the resistor values of my divider (figuring current was being limited), then replaced the 10µF decoupling caps with 100s. Neither solution made a visible improvement.
AI: Well.
Let's suppose you split your 9V wall adapter into +4.5V and -4.5V rails using a virtual ground which we shall name VGND. The other option is to use standard split rails: +4.5V, -4.5V, and a real GND.
Now, we connect all the single supply (SS) chips between +4.5 and GND (or VGND).
All the SS chips' supply current is obviously drawn from +4.5V, and loops back into VGND. This includes your echo module. Therefore,
your VGND generator should be able to sink enough current to cover then entire supply current of your SS chips. TL074 can't do that, it's an opamp for very very light loads like a 10k resistor.
VGND is also the voltage reference for the dual supply (DS) chips. Feeding random variable currents into it (from your SS chips' supplies) will inject noise into VGND. It would do the same with a real GND, but the impedance of a ground plane is quite a bit lower than the output impedance of a virtual ground. This might make your layout more complicated if you don't want noise can enter your audio signal chain.
Now, the second point isn't set in stone. If everything is referenced to VGND, and its layout is good, then it will work just as well as a normal GND. However you should be very careful not to have two different references (can happen if a part of the circuit is AC-coupled). For example, if one reference is VGND and the other is a voltage divider between supplies, then as VGND wiggles around due to it being used as supply ground, the other will not follow, and the difference will be injected into your signal.
Note: When one of the chips pumps current into VGND, you can say "VGND has noise". But from the point of view of your circuits, VGND is fixed, since it's the reference. It's always 0V, by definition. The "noise" I'm talking about will appear on both supplies instead. And contrary to a normal design, where you could add filters into the supplies to isolate a noisy bit of circuitry from the rest, here it would be more complicated.
Also, if you use a standard virtual ground chip, the last I checked generated huge class-B distortion on the rails when AC current was drawn from VGND. It is a voltage follower opamp after all, with a class-AB output stage, and usually a very low bias.
Good capacitors are cheap. Virtual grounds are a headache. I would AC-couple everything, and use single-supply everywhere. Much simpler.
|
H: Arduino and SSR to drive 12V solenoid
So I'm using the an Arduino (Mega 2560) to control 9 little 12V solenoid valves (Gem Sensors) and my plan is to connect the Arduino to some small solid state relays (Broadcom Limited ASSR-1511-001E) which will be connected to a 12V power supply which will actually power the valves.
Anyway I am curious if I need to put any resistor or safety mechanisms between the Arduino and the SSR. Judging by the various data sheets it looks like I can directly connect the Arduino digital I/O pin to the SSR and just connect the 12V power supply straight to the SSR and have the solenoid valve connected to that circuit. The Arduino puts out 20 mA on the digital pins and the SSR can take up to 20 mA. Is there anything else I need to consider here?
AI: The input forward voltage of the opto-isolator inside the SSR has a max voltage of 1.65V with a forward current of 5 mA.
This implies you should use a resistor to limit the current through the diode.
R = (Arduino_Output_Voltage - 1.65) / 0.005
Figure 9 of the SSR datasheet should also give you a feel that putting the Arduino's (relatively) large output voltage directly onto the opto-isolator will cause more than 20 mA to flow, violating the max input current.
|
H: Trying to multiplex voltage reference gives incorrect output
I'm trying to make the voltage reference for an INA214 opamp selectable between GND, 4.5V and 10V. I'm using a CD4051B multiplexer.
However, the 10V VREF gets pulled down to 5.84V, and I can't figure out why.
simulate this circuit – Schematic created using CircuitLab
CD4051B has:
INH, Vee, Vss to GND
C to GND
A, B to 5V (thus selecting CH3 as output)
CH3 to GND
CH1 to D1 output
CH2 to D2 output
Output measured by multimeter
Output measures:
4.95V when D2 is connected to any pin on the mux
0V when D2 is not connected
4.54V when B is GND, no matter if A is 5V or GND (D2 is not connected)
which is strange, because CH1 is A=1 B=0.
What is going here? Are the TL431s interfering with the function of the CD4051B, or...?
By the way, am I required to connect the other pins/channels to ground, or can they be floating?
AI: As stated in comments, issue has to do with supply voltage to device and fixing that screws with the logic levels requiring additional components which makes the rationale for using the device itself suspect.
Alternative: Use two low RdsON MOSFETS to change the bias on the TL431 and or short the reference to ground.
simulate this circuit – Schematic created using CircuitLab
|
H: Parallel circuit not working as expected
I have this setup,
simulate this circuit – Schematic created using CircuitLab
There is also a button connected to the Arduino and every time the button is clicked the arduino cycles 3 levels of brightness on the LEDs. The problem is that when the LEDs are at full bright the Arduino no longer has enough voltage to run ~3v down from ~4v when off and so becomes locked at full brightness.
From what I have learned in physics I thought that when a circuit was in parallel the components acted as if they were independent of each other however this is not what I see here.
How do I drive both the arduino and LED strip with the same battery? Is it possible the battery is not supplying enough current?
AI: This idea:
From what I have learnt in physics I thought that when a circuit was in parallel the components acted as if they were independent of each other however this is not what I see here.
is based on the assumption that the power supply you are using is more than capable of driving all the items in parallel. The battery has an internal resistance, and as the current through it increases, the voltage out of the battery drops.
You are likely pulling too much current out of the battery for the LEDs, and as such the voltage from the battery drops to a level that is too low to power the Arduino.
|
H: Problem in understanding bridge rectifier
In a bridge rectifier (full wave) why do the electrons not flow from the other two diodes during a half cycle?
Pls help me in understanding the concept.
AI: Does putting some voltages and voltage-drops across the diodes help?
Note that the diode will only allow current flow when it is forward biased, or else it acts as an opened (unconnected) element.
|
H: Why would a LED datasheet specify a minimum operating current?
I am looking at the datasheet for the OSRAM Golden DRAGON® Plus LUW W5AM, a high power white LED.
It has a forward current of 20-1000 mA, surge current up to 2500 mA, and I think they want you to run it at 350 mA; that is what they use for most of the tests.
Notice that I emphasized the lower range of 20 mA. The forward current can not go below 20 mA. That is curious, but taken in isolation I would never have given it much thought.
Now, page 15 has a curious graph, titled Maximum Permissible Forward Current:
Here they iterate the minimum 20 mA operating current, even going so far as to exclude the area from the graph (it is covered with a grey block), and they use the strong words "Do not use below 20 mA".
Why can I not operate my LED at a current less than 20 mA?
Presumably they feel so strong about this that they have to warn me against it. Are there any electrical reasons, perhaps related to long-term reliability? Or is it just that they want me to use a more suitable LED?
I've tried to contact OSRAM about this, to no avail. Maybe it's not important to reply unless the customer is interested in a 100k purchase.
AI: To be honest, I don't really know.
But they also give this graph:
It may be that under 20mA the chromacity shift is much higher and the colour of the LED changes noticeably. As the other parts of the datasheet stress on CRI (Colour Reproduction Index) qualities, it may be that the LED wouldn't fit into the specs @ <20 mA.
|
H: Designing adjustable current source 30A to 60A
I am looking to design a constant current source that can give between 30A and 60A used for electroplating. Obviously, an LM317 isn't going to cut it for this project. Does anyone have any thoughts for a design that would allow for 10A steps (5A preferably).
My power source is an HP Model PS-3701-1 725w 60A PSU.
Thanks!
AI: There is an old saying from Clausewitz: "Everything in war is simple, but the simplest thing is difficult." So there is a very simple solution to your problem, but you may have some difficulties with it. The basic concept is
simulate this circuit – Schematic created using CircuitLab
but of course God (or the Devil, depending on your source) is in the details.
First and foremost, the circuit is a lie, in that two FETs will not remotely do the job. I'd recommend about 20. This will allow 3 amps per FET, and assuming about 10 volts across the FETs, a power dissipation of 30 watts per FET. Both of these are perfectly reasonable mumbers for TO220 packaged FETs, and almost any n-type power FET will do.
Of course, if you did a quick bit of math in your head, you also realized that the total FET power dissipation will be in the 600 watt ballpark, so you're going to need a really hefty heat sink. This actually isn't all that hard or even all that expensive, particularly if you pay attention to forced air cooling - but you do have to pay attention.
Finally, that innocuous current sense resistor is going to cost you as well. 10 mohms at 60 A will give 0.6 volts, which explains the pot/resistor values, but it also implies 36 watts in the resistor. You'll want a non-inductive resistor for the job, and while they're available they're not cheap. Here's an example of what you might want, available from Digikey for 30 bucks and capable of handling 100 watts. With a proper heat sink, of course. Or you could simply run 10, 0.1 ohm, 10 watt resistors in parallel making sure to use a Kelvin connection. Again, managing heat will be something of a problem. And using a smaller resistor will reduce the heat, but an LM324 has 2-3 mV of offset, so you really don't want to go too much lower or you'll lose accuracy on your current set. Oh yes, and don't forget to take into account the resistance of your wiring. It doesn't take much at 60 amps to make a difference.
But it really does look simple, doesn't it?
|
H: What kind of wire can be used for CAN(Cotroller Area Network) protocol based communication?
Is the wire used for CAN communication protocol any different or normal. Can normal wires(a pair for CAN LOW AND can HIGH)also be used for communication? I am looking to connect CAN controller 1 to CAN controller 2 in same STM32F407 board.
What kind of wire can be used for this purpose, will any wire be enough?
AI: This depends entirely on the distance between the two controllers and the bit rate you have selected.
CAN is intended to work with twisted pair with a nominal impedance of 120 ohms. However, for lengths with a propagation delay of less than about 10% of the selected bit rate, impedance matching doesn't really matter much.
So for short runs (a few feet) almost any twisted pair will do. Regardless of bit rate and impedance considerations, twisted pair should always be used anyways in order to reduce EMI pickup. And depending on the electrical environment, shielded twisted pair is a really good idea, as well.
|
H: What does the diode do in this switch and lamp?
The following illustrations are from a pinball machine repair manual.
What purpose does the diode perform on the lamp and switch?
AI: See the wires labeled "row" and "column"?
What you have there is detail drawings of single cells of matrixed switches and lamps.
The purpose of the diode is to steer the current though the addressed devices only, by disallowing detour paths.
|
H: 18650 battery protection board
I have bought a 18650 2S protection board on eBay (http://www.ebay.it/itm/222383859919) because I need to use and charge 2 18650 batteries in series for a project (a portable audio system) but, searching the protection board model (fdc-2s-2) on google, I have found this site (http://mklec.com/components/battery-protection/lithium-ion-7.4V-3A-protection-pcb) that says that "This module is NOT a charging circuit!". What does this means? Can't I use this for my project? Waiting for an answer. Thank you for your attention.
AI: From a quick read though, it looks like this is meant to be used with a charging circuit to protect your batteries.
You shouldn't be surprised it says the module is not a charging circuit, it is after all called a PROTECTION board, not a CHARGING board.
So yes, you can use it for your circuit, you will just have to make your own charging circuit and use this board as protection to detect over-voltage, over-current and short circuit protection.
|
H: Need to fixate current of motor connected to a battery
I have a gadget which includes a small 80mAh DC vibration motor connected to a CR2032 3V coin battery. The motor needs to keep running as long as the battery has juice, but instead of having it run at full speed and slow down gradually as the battery drains I prefer to have it running at constant speed more or less as long as the battery can provide enough power.
What would be the simplest (cheapest) way to implement such a solution in a small form factor?
Thank you.
AI: An "80mAh motor" sounds rather unusual. Are you sure that's what you meant? A datasheet for the motor would be useful, but I'll assume you want to maintain 3V across it.
For a constant speed you need a constant voltage across the motor. Therefore you want a device that can convert varying lower voltages from the cell to a fixed higher voltage across the motor.
The solution is a boost converter. These are available in tiny packages around which you would design the necessary passives according to the datasheet recommendations. Alternatively if you want a ready-made solution, you can also buy small boost converter modules containing the IC and necessary passive elements.
Note that you shouldn't do this in any situation where it's important to have warning of impending depletion of the cell or battery.
|
H: Getting fast performance from a STM32 MCU
I am working with the STM32F303VC discovery kit and I am slightly puzzled by its performance. To get acquainted with the system, I've written a very simple program simply to test out the bit-banging speed of this MCU. The code can be broken down as follows:
HSI clock (8 MHz) is turned on;
PLL is initiated with the with the prescaler of 16 to achieve HSI / 2 * 16 = 64 MHz;
PLL is designated as the SYSCLK;
SYSCLK is monitored on the MCO pin (PA8), and one of the pins (PE10) is constantly toggled in the infinite loop.
The source code for this program is presented below:
#include "stm32f3xx.h"
int main(void)
{
// Initialize the HSI:
RCC->CR |= RCC_CR_HSION;
while(!(RCC->CR&RCC_CR_HSIRDY));
// Initialize the LSI:
// RCC->CSR |= RCC_CSR_LSION;
// while(!(RCC->CSR & RCC_CSR_LSIRDY));
// PLL configuration:
RCC->CFGR &= ~RCC_CFGR_PLLSRC; // HSI / 2 selected as the PLL input clock.
RCC->CFGR |= RCC_CFGR_PLLMUL16; // HSI / 2 * 16 = 64 MHz
RCC->CR |= RCC_CR_PLLON; // Enable PLL
while(!(RCC->CR&RCC_CR_PLLRDY)); // Wait until PLL is ready
// Flash configuration:
FLASH->ACR |= FLASH_ACR_PRFTBE;
FLASH->ACR |= FLASH_ACR_LATENCY_1;
// Main clock output (MCO):
RCC->AHBENR |= RCC_AHBENR_GPIOAEN;
GPIOA->MODER |= GPIO_MODER_MODER8_1;
GPIOA->OTYPER &= ~GPIO_OTYPER_OT_8;
GPIOA->PUPDR &= ~GPIO_PUPDR_PUPDR8;
GPIOA->OSPEEDR |= GPIO_OSPEEDER_OSPEEDR8;
GPIOA->AFR[0] &= ~GPIO_AFRL_AFRL0;
// Output on the MCO pin:
//RCC->CFGR |= RCC_CFGR_MCO_HSI;
//RCC->CFGR |= RCC_CFGR_MCO_LSI;
//RCC->CFGR |= RCC_CFGR_MCO_PLL;
RCC->CFGR |= RCC_CFGR_MCO_SYSCLK;
// PLL as the system clock
RCC->CFGR &= ~RCC_CFGR_SW; // Clear the SW bits
RCC->CFGR |= RCC_CFGR_SW_PLL; //Select PLL as the system clock
while ((RCC->CFGR & RCC_CFGR_SWS_PLL) != RCC_CFGR_SWS_PLL); //Wait until PLL is used
// Bit-bang monitoring:
RCC->AHBENR |= RCC_AHBENR_GPIOEEN;
GPIOE->MODER |= GPIO_MODER_MODER10_0;
GPIOE->OTYPER &= ~GPIO_OTYPER_OT_10;
GPIOE->PUPDR &= ~GPIO_PUPDR_PUPDR10;
GPIOE->OSPEEDR |= GPIO_OSPEEDER_OSPEEDR10;
while(1)
{
GPIOE->BSRRL |= GPIO_BSRR_BS_10;
GPIOE->BRR |= GPIO_BRR_BR_10;
}
}
The code was compiled with CoIDE V2 with the GNU ARM Embedded Toolchain using -O1 optimization. The signals on pins PA8 (MCO) and PE10, examined with an oscilloscope, look like this:
The SYSCLK appears to be configured correctly, as the MCO (orange curve) exhibits an oscillation of nearly 64 MHz (considering the error margin of the internal clock). The weird part for me is the behavior on PE10 (blue curve). In the infinite while(1) loop it takes 4 + 4 + 5 = 13 clock cycles to perform an elementary 3-step operation (i.e. bit-set/bit-reset/return). It gets even worse on other optimization levels (e.g. -O2, -O3, ar -Os): several additional clock cycles are added to the LOW part of the signal, i.e. between the falling and rising edges of PE10 (enabling the LSI somehow seems to remedy this situation).
Is this behavior expected from this MCU? I would imagine a task as simple as setting and resetting a bit ought to be 2-4 times faster. Is there a way to speed things up?
AI: The question here really is: what is the machine code you're generating from the C program, and how does it differ from what you'd expect.
If you didn't have access to the original code, this would've been an exercise in reverse engineering (basically something starting with: radare2 -A arm image.bin; aaa; VV), but you've got the code so this makes it all easier.
First, compile it with the -g flag added to the CFLAGS (same place where you also specify -O1). Then, look at the generated assembly:
arm-none-eabi-objdump -S yourprog.elf
Notice that of course both the name of the objdump binary as well as your intermediate ELF file might be different.
Usually, you can also just skip the part where GCC invokes the assembler and just look at the assembly file. Just add -S to the GCC command line – but that will normally break your build, so you'd most probably do it outside your IDE.
I did the assembly of a slightly patched version of your code:
arm-none-eabi-gcc
-O1 ## your optimization level
-S ## stop after generating assembly, i.e. don't run `as`
-I/path/to/CMSIS/ST/STM32F3xx/ -I/path/to/CMSIS/include
test.c
and got the following (excerpt, full code under link above):
.L5:
ldr r2, [r3, #24]
orr r2, r2, #1024
str r2, [r3, #24]
ldr r2, [r3, #40]
orr r2, r2, #1024
str r2, [r3, #40]
b .L5
Which is a loop (notice the unconditional jump to .L5 at the end and the .L5 label at the beginning).
What we see here is that we
first ldr (load register) the register r2 with the value at memory location stored in r3+ 24 Bytes. Being too lazy to look that up: very likely the location of BSRR.
Then OR the r2 register with the constant 1024 == (1<<10), which would correspond to setting the 10th bit in that register, and write the result to r2 itself.
Then str (store) the result in the memory location we've read from in the first step
and then repeat the same for a different memory location, out of lazyness: most likely BRR's address.
Finally b (branch) back to the first step.
So we have 7 instructions, not three, to start with. Only the b happens once, and thus is very likely what's taking an odd number of cycles (we have 13 in total, so somewhere an odd cycle count must come from). Since all odd numbers below 13 are 1, 3, 5, 7, 9, 11, and we can rule out any numbers larger than 13-6 (assuming the CPU can't execute an instruction in less than one cycle), we know that the b takes 1, 3, 5, or 7 CPU cycles.
Being who we are, I looked at ARM's documentation of instructions and how much cycles they take for the M3:
ldr takes 2 cycles (in most cases)
orr takes 1 cycle
str takes 2 cycles
b takes 2 to 4 cycles. We know it must be an odd number, so it must take 3, here.
That all lines up with your observation:
$$\begin{align}
13 &= 2\cdot(&c_\mathtt{ldr}&+c_\mathtt{orr}&+c_\mathtt{str})&+c_\mathtt{b}\\
&= 2\cdot(&2&+1&+2)&+3\\
&= 2\cdot &5 &&&+3
\end{align}$$
As the above calculation shows, there will hardly be a way of making your loop any faster – the output pins on ARM processors are usually memory mapped, not CPU core registers, so you have to go through the usual load – modify – store routine if you want to do anything with those.
What you could of course do is not read (|= implicitly has to read) the pin's value every loop iteration, but just write the value of a local variable to it, which you just toggle every loop iteration.
Notice that I feel like you might be familiar with 8bit micros, and would be attempting to read only 8 bit values, store them in local 8 bit variables, and write them in 8 bit chunks. Don't. ARM is a 32bit architecture, and extracting 8 bit of a 32bit word might take additional instructions. If you can, just read the whole 32bit word, modify what you need, and write it back as whole. Whether that is possible of course depends on what you're writing to, i.e. the layout and functionality of your memory-mapped GPIO. Consult the STM32F3 datasheet/user's guide for info on what is stored in the 32bit containing the bit you want to toggle.
Now, I tried to reproduce your issue with the "low" period getting longer, but I simply couldn't – the loop looks exactly the same with -O3 as with -O1 with my compiler version. You'll have to do that yourself! Maybe you're using some ancient version of GCC with suboptimal ARM support.
|
H: How can I establish "frontiers" in the feedback resistor of an inverting opamp config, if I'm varying it with a pot?
simulate this circuit – Schematic created using CircuitLab
I replaced the feedback resistor of an inverting configuration by a pot. I'm meant to vary from edge to edge the pot so I can get a variable gain within -100 < A < -10 (I mean, without getting out from that range not even on the edges). Therefore, I need to fix the gain when the pot is at 0 Ohm and so for its max Ohm to avoid getting it greater than 100 times or minor than 10 times.
My first attempts were to put a resistor in series with the pot (both as feedback), later I tried with placing a resistor in parallel with the pot (again as feedback); at any case, I couldn't get the gain to be limited at 10, it tends to zero invariably.
What can you kindly suggest to me?
EDIT: opamp polarized with +12 and -12 V
AI: That should fix your problem.
simulate this circuit – Schematic created using CircuitLab
|
H: Where can I find the definition of SMI, SCI pins on a CPU?
I am trying to understand the SMI (System Management Interrupt) and SCI (System Control Interrupt) in IA32 architecture.
According to this thread, it seems a CPU should have dedicated pins for SMI and SCI.
I guess some cpu specs should cover this. I tried some cpu datasheets, but no luck. In those specs, I can find pin names like below, but I didn't see SMI or SCI pins.
Anyone knows where I can find the definitions of such pins? If I can see it, I will know it better.
AI: SMI is generated for hardware faults. As most communication between the CPU and other components is packet-based, faults can be signalled using error packets, and the SMI is then generated internally. A dedicated pin exists if there is an interface that is not packet-based that needs to signal hardware faults that may be recoverable -- typically that means a memory interface.
SCI is an implementation detail of ACPI. The ACPI virtual machine has read and write access to hardware, but no dedicated "enter system management mode" instruction, so there is a system controller that provides a register that will trigger an SCI when written to. The BIOS sets up an appropriate handler and provides wrapper code in ACPI AML for those functions that are handled outside the OS context (mostly, suspend/resume/reset/poweroff). From the OS point of view, suspending the computer is writing a value to a "suspend controller". If the controller is implemented inside the CPU, there is no need to have a physical pin here either.
|
H: Common Emitter resistors interactions
Background: I did an "A" level in electronics 25 years ago; now been a professional programmer for nearly 20 years. I want to build some very basic circuits to interact with an Arduino but I've forgotten a lot, apparently :)
Question: I am playing around with the below circuit, and it is confusing me. The values below are taken from a website, and they work fine and as expected. However, they clip the bottom half of the waveform.
Reading that the gain is only set by RL and RE, naively, I though that biasing the transistor to half the supply would move the waveform up so that it would be amplified the same in both directions, so I altered R1 to 11k.
However, this seems to completely stop the circuit amplifying at all; in fact the gain is now ~-0.5. Now, I'm willing to accept that my change didn't do what I wanted, but if the load is only set by RL and RE, why did this have such a dramatic effect?
NOTE: I have read all the many Common Emitter questions on the site and I'm afraid the answers are a bit over my head, so if you could aim your responses at my beginner 17yo self, that'd be good :)
NOTE TWO: RE should be 470R, not 5R. Screenshot is wrong.
(Also I cannot get it to run in Circuit Lab for some reason, so here it is in PartSim - http://www.partsim.com/simulator#76064)
AI: It's not so much that they affect the gain, but the fact that this change to R1 takes the transistor outside its linear operating region.
With a pair of 11K resistors for R1 and R2 you're trying to bias the base at 2.5V.
With a typical VBE of about 0.6V that means you're looking for 1.9V across RE, which in turn means an emitter current of about 4mA.
However, to get that 4mA flowing through RL to get to RE you would need to have a voltage drop of 18V across RL which you can't get anywhere near with a 5V supply.
The result is that the transistor becomes fully saturated trying to achieve that emitter current and in that state an increase in base current has very little effect on the collector current and hence very little effect on the voltage at the collector. The result is that the circuit no longer gives you the gain you want.
|
H: How to flip polarity of battery with DIY device
Say I have a small electric motor I'm spinning with a hand crank to generate electricity and charge a battery. Every ten seconds, I slowly slow down to a stop and start spinning the other way. This will flip the direction of the current, and I will "anti charge" the battery, right?
What is the simplest way to set up a system so the electricity generated from cranking in the wrong direction is still used to charge the battery?
AI: You can do this with 4 diodes in a diode bridge configuration.
Parts with 4 diodes in this configuration are available in a single package rather than having to build it yourself.
You will however lose two voltage drops (about 1.2V) worth of voltage. Depending on the situation you could use schottky diodes to reduce this loss at the cost of higher leakage.
|
H: Can I use this power supply DC output terminals to create a dual power supply?
I have this power supply.
And here is the photo:
I named the DC outputs as A, B, C, D in red color to ask my question.
I saw in some bench power supplies they create dual supply.
Can I make a +24V -24V dual power supply by tying B and C together and making this joint as GND. So lets say I tied B and C and this is called BC. Im expecting A to BC voltage will be +24 and B to BC will be -24V.
1-) Can I do that in this case safely? Or tying B to C short the supply and damage it?
2-) If I can do that, do you recommend this way of powering a dual opamp for a good performance or do you recommend another IC solution to obtain dual power supply for opamps?
AI: Can I make a +24V -24V dual power supply by tying B and C together and
making this joint as GND. So lets say I tied B and C and this is
called BC. Im expecting A to BC voltage will be +24 and B to BC will
be -24V.
No you can't. It is a single voltage power supply with two screw contacts per electrical connection. Read the data sheet - they are available as single outputs from 5 volts to 48 volts.
|
H: LM78xx Reverse Polarity and Reverse Bias
I'm building a circuit that will use a LM7805 and LM7812 to produce 5VDC and 12VDC respectively, with the input power being ~16VDC from an external wall wart.
I already fried one of each regulator because I'm apparently not capable of keeping track of polarity.
I figure I might as well prevent that. I see in the datasheets that I can use an 1N4007 diode across the LM7812 for reverse-bias protection, which I understand is intended for transient states basically during shutdown.
I also read that I can use a Schottkey diode for reverse polarity (e.g., if I connect the p/s incorrectly again) protection.
Can I do both? Is there anything I need to know about selecting either the regular diode or the Schottkey? Overall, I'm sizing the circuit to handle ~1A of 12VDC and <100mA of 5VDC (just enough to power an ATTiny and one DO). I've literally never bought a diode before, so do I just find a Schottkey diode rated >20V and 1A then call it a day? I don't believe I care about forward voltage drop in my application...anything else?
simulate this circuit – Schematic created using CircuitLab
AI: Yes, you can do what you propose.
I would recommend larger output capacitors in parallel with the 100 nF they have now. The regulator cannot react instantaneously to step increases in load current so the capacitors are there to provide the current until it does. Capacitors with a low ESR are accordingly good for this, try ceramic parts. Details of how to calculate the values can be readily found on the internet. From experience (gulp), I would use the following. On the 5 V rail, put a 10 uF and a 100 nF close to the regulator, put a 10 uF and at least one 100 nF very close to the load. On the 12 V rail, put a 10 uF and a 100 nF close to the regulator and a 100 nF close to the load.
Incidentally, the reverse diode across the regulator is used to discharge the regulator's output decoupling capacitor when the supply is removed and the regulator has a light/no load. If the regulator's load will discharge the output capacitor anyway then you don't need that diode.
|
H: adapter between thicker and thinner AWG wires
I'd like to connect two different AWG wires, sizes 18 and 24. Preferably made specifically for outdoors underground usage.
More to the facts, the 24 AWG is part of a 8-wire CAT 5E cable that I need too tuck into some irrigation valve connectors which is not supposed to be taking in the valve's thick wire and the thin 24 AWG wire together. This is what I am currently doing and I am having only trouble.
What sort of adapters should I be looking for ?
AI: I use these quite often; https://www.grainger.com/product/4FE28?gclid=Cj0KEQjwk-jGBRCbxoPLld_bp-IBEiQAgJaftemBgg3D7VVxKqJBI4doBh5jCrie0bHhEhx2V9w9Op8aAm9i8P8HAQ&cm_mmc=PPC:GOOGLEPLAA--Electrical--Wire%20Connectors-_-4FE28&AL!2966!3!166588026391!!!g!81032122797!&s_kwcid=AL!2966!3!166588026391!!!g!81032122797!&ef_id=VxBI9gAABZPDSe7V:20170328142529:s
The wire gauge range is 26 to 19 but I have had success with 18 gauge wire.
Another methode wouls be to solder and cover with shrink tubing.
|
H: Why is the power factor always 0.8?
If reactive power means losses, why don't we correct the power factor and make it 1? For example, on marine vessels that I have been working on, the power factor is always 0.8. We could add capacitors in parallel, or over-excite a generator.
Why this is never the case?
AI: Power factor is not corrected to 1 because power the power factor is likely to change with changing load. With correction to 1, the power factor could become leading and that is often more difficult for the source to accommodate. It could cause the voltage to rise.
In your marine vessel example, the engine generator set may be designed for 0.8 pf. If the engine is sized to produce a certain KW and the generator is designed to produce a KVA that is 20% more than that, there is not much to be gained by adjusting to anything higher than 0.8.
|
H: 4x4 Pressure Sensor Grid Pin Saving
I'd like to make a 4x4 pressure ( force resistance) sensor grid to use with an arduino. But 16 sensors sure need a lot of pins.
During my research on this topic I stumbled upon a couple of suggestions. An example I've seen at least 100 times is the one which generates a 4x4 LED-grid. But in this example, there is no sensordata to be read.
So, backed up by the factories manual on how to hook the sensor up and on how the 4x4 LED-grid tutorial suggested I created my own idea on how to wire the whole thing with one arduino.
My thoughts on that:
Keep D1 to D4 defined as OUTPUT HIGH.
Set D5 to D8 alternatly as ground.
Gather analog information through A2 to A5 of the current selected row.
Save data and look at next row.
My question now, before ordering all the components: Does that sound realistic from an electrical point of view?
! EDIT:
So the first answer got me thinking, and here is my new circuit plan:
Didn't I break the paralellity of the resistive sensors because I'm not measuring the resistance at the pins 5-8, instead I measure values at the analog pins 2 to 5.
So now, if D5 is set to gound, the upper row of the sensors is powered and sensing data, which is gathered by analog pins 2 to 5. And then grounded in digital pin 5.
AI: Your schematic shows resistive sensors in parallel, so it will not work. You won't be able to distinguish the individual resistors when they are in parallel. This means some switching is needed.
http://sensl.com/downloads/ds/TN-Readout_Methods_for_Arrays_of_SiPM.pdf
http://www.sensl.com/downloads/irp/2013_Goertzen_Design_and_Performance_of_a_Resistor_Multiplexing_Readout_Circuit_for_a_SiPM_Detector.pdf
You will need switches... lots of switches...
Personally, I would try to keep things simple, and use two of these 1x16 analog muxes:
http://assets.nexperia.com/documents/data-sheet/74HC_HCT4067.pdf
The first one would take a current source as an input, and send it to one of the 16 resistors. The second one would take the voltage on the resistor which is being read, and forward it to the ADC.
This allows to ignore the switches' internal resistance. And since the same current source is used for all measurements, you can invest a little more into it to make it more accurate.
|
H: Why does shorting/putting heavy load on a motor slow it/stop it?
I am doing a simple circuit which includes using a motor in theory (I am using a stepper-motor) as a break. One of the random fun-facts that I have known for a long time is how shorting a stepper motor (or putting very high load ) will cause high current and slower rotation (or sometimes stopping rotations all together).
However I do not understand how it works from an electrical/electromagnetic point of view. Where does that force come from?
AI: Two concepts: conservation of energy, and reverse EMF (electro-motive force). When you move a magnet past a suitably oriented inductor coil connected to a load, the changing magnetic field induces a current in the inductor. The current in the inductor creates its own magnetic field. That newly generated magnetic field is oriented such that it produces a force that tries to accelerate or eject the magnet in approximately the opposite direction of its present motion. The kinetic energy absorbed from the magnet as it slows down will be proportional to the energy that heats the load on the inductor (and other system losses), thus conserving it.
Conversely, if you open the circuit, there is no place for current to flow, and thus no less reverse or back EMF produced.
|
H: How to Limit Current to a Hot Plate
I have a 1200 Watt hot plate that works great when connected to the grid but I want to be able to run it off of two deep cycle batteries wired in series to an inverter in an off grid situation. The thing is i want to be able to limit the current going to this device to have more fine tuned control on my battery drain. Testing with my killawatt reveals that despite the plate having a rotary knob heat control, this simply cycles the element on and off more slowly, so full 1200 watts on then off for a varying period of time. i want to be able to keep it cooking at say 600 watts continuous. Whats the best device to do this? Something inline on the power cord? Is there something that can handle these watt levels that i could build from parts?
AI: A heater is probably the most "tolerant" device to drop power to, because no matter how you "mangle" the AC waveform coming in, a heater (being a purely resistive load) won't be affected in any detrimental way, and will tend to 'average" whatever is fed to it. This is why most of them just have a thermal contact that opens and closes to control the temperature. Now you can further intervene with electronics, but bear in mind that any electronic device to "drop" the power will also tend to lose some power based on the voltage droped across itself, multiplied by the current through it. It may not amount to significant waste, BUT it does mean whatever "part" does the "dropping" will have to be rated for that load, which will make it both larger and more expensive.
That said, you could drop the power by half with a single diode, which would allow only 1/2 of the AC waveform to get to the heater. As explained above though, that diode will have to be a large one to handle the current, and will have to be mounted in an enclosure that will not burn and will protect against someone burning themselves touching it. Assuming your 1200 watts of resistive load is intended for 120 VAC, you can see that this diode is going to have to be rated for at least 10 amps peak, and of course a PIV (peak inverse voltage) of around 200 volts, to account for the peak voltage levels of a 120VAC supply. (RMS volts/ 0.707).
Now if this heater were being fed by a pure sine wave source like your power company supplies over its "grid", I might also suggest you look for a self contained motor speed control rated for at least 10 amps. These devices usually employ a TRIAC instead of a diode, with a control circuit that allows you to dial in the exact power you want. Unfortunately most of those devices depend heavily on being fed by a predictable sine wave, which many converters don't supply. So getting such fine control might not be so easy. Good luck.
|
H: Why isn't this VHDL falling edge detector reliable?
I'm trying to write an RS232 decoder for my Mojo v3 (Spartan 6 XC6SLX9). I know I can find existing libraries to do this - I'd just like to do it myself. As part of the decoding, I need to detect the high-to-low transition for the start bit.
Many sources, such as fpgacenter's edge detector and Pong Chu's FPGA Prototyping by VHDL Examples book, recommend something like this:
architecture arch of edge_detector is
signal last: std_logic;
begin
process(clk)
begin
if rising_edge(clk) then
last <= signal_in;
end if;
end process;
output <= (not signal_in) and last;
end arch;
I haven't found that to be a reliable detector of falling edges. In particular, it appears to miss falling edges when the FPGA sees the edge near the rising edge of the clock:
SLOW is an edge detector that uses two registers to do the detection. Whereas FAST will fire in the same clock cycle as the falling edge, SLOW fires in the next cycle. BAD goes high when it sees SLOW fire without a corresponding tick from FAST. RAW_RX is direct from the FTDI USB-to-Serial transceiver, bypassing the FPGA; RX is that same signal as seen from inside the FPGA (and routed back out, like FAST, SLOW, etc). CLK is a 50MHz clock.
The same falling edge detector properly fires when it sees a high-to-low transition during the clock cycle:
That successful detection also illustrates why I've called SLOW slow.
What am I doing wrong? Is this detector expected to work when transitions coincide with clock rising edges?
AI: "signal_in" is not timed by the development tools until it is brought into a clocked element (i.e. register). Because of this there is nothing that says "not signal_in" has to be valid before/after "last" is updated.
Therefore, when "last" and "not signal_in" are ANDed together there is essentially a race condition, where the final result can vary (between builds due to routing and between FPGAs due to variations in the specific fabric). This is why signals should always be brought onto a clock before being used in calculations.
|
H: What are the names of these 2 connectors?
These two types of connectors I do not know the name and I would like to.
1.
2.
AI: PCB mount screw connectors (ideally, use crimped ferrules on the wire ends with these).
Bullet connectors.
|
H: Why is the relay switched by a NPN transistor still on while the Arduino out is off (low)?
I have a circuit as shown below:
simulate this circuit – Schematic created using CircuitLab
Note:
In the above schematic some pins of Arduino Nano are not shown for simplicity purposes. Also, SW1 and SW2 are not switches but sensors as shown below:
Here is the arduino code:
//include LCD library
#include <LiquidCrystal.h>
//Initialize an LCD object
/*Pins should be mentioned in this order:
Reset
Enable
Data4
Data5
Data6
Data7
*/
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
int upSensor = 11;
int downSensor = 10;
int continuousSwitch = 8;
int suddenSwitch = 9;
unsigned long counter = 0;
void setup()
{
Serial.begin(9600);
pinMode(upSensor, INPUT);
pinMode(downSensor, INPUT);
pinMode(continuousSwitch, OUTPUT);
pinMode(suddenSwitch, OUTPUT);
//Begin the LCD interface
lcd.begin(16, 2);
lcd.print("MOTOR OFF");
}
void loop()
{
if(counter == 1)
{
digitalWrite(suddenSwitch, HIGH);
delay(1000); //1 Second
digitalWrite(suddenSwitch, LOW);
}
Serial.println("upSensor: " + String(digitalRead(upSensor)));
Serial.println("downSensor: " + String(digitalRead(downSensor)));
if(digitalRead(upSensor) == HIGH && digitalRead(downSensor) == HIGH)
{
digitalWrite(continuousSwitch, HIGH);
lcd.setCursor(6, 0);
lcd.print("ON");
counter++;
}
if((digitalRead(upSensor) == LOW && digitalRead(downSensor) == LOW))
{
digitalWrite(continuousSwitch, LOW);
lcd.setCursor(6, 0);
lcd.print("OFF");
counter = 0;
}
}
Everything is working fine except relay RLY2.
No matter if switch sw1 and sw2 are open or close, RLY2 is always ON. I mean RLY2's COMMON connection is always connected to NORMALLY OPEN Connection. If I measure the output from pin D9 of arduino, then I can see that it is changing according to the state of the switches SW1 and SW2. But the Relay RLY2 is always ON. WHY????
Update:
Before removing transistor:
I have added a diode between emitter and ground. Also changed the resistor R2 from 1K to 470E.
Voltages of Q2:
A. When D9 is HIGH:
Collector - Ground ----> 6.15V
Emitter - Ground ------> 0.70V
Base - Ground ---------> 1.40V
Collector - Base ----> 4.75V
Collector - Emitter -> 5.40V
Base - Emitter ------> 0.70V
B. When D9 is LOW:
Collector - Ground ----> 7.90V
Emitter - Ground ------> 0.70V
Base - Ground ---------> 0.65V
Collector - Base ----> 7.25V
Collector - Emitter -> 7.20V
Base - Emitter ------> 0.50V
I will remove the transistor, after Trevor checks above voltages and makes sure if transistor is sick.
Update2:
After removing transistor:
Voltages of Q2:
A. When D9 is HIGH:
Collector - Ground ----> 15.06V
Emitter - Ground ------> 0.15V
Base - Ground ---------> 4.03V
Collector - Base ----> 12 V
Collector - Emitter -> 15.6V
Base - Emitter ------> 3.70V
B. When D9 is LOW:
Collector - Ground ----> 16.90V
Emitter - Ground ------> 0.12V
Base - Ground ---------> 0 V
Collector - Base ----> 16.8V
Collector - Emitter -> 16.4V
Base - Emitter ------> 0.15V
I have also measured the transistor:
Base - Collector --> 647
Base - Emitter --> 642
Collector - Emitter --> 1
Collector - Base --> 1
Emitter - Base --> 1
Emitter - Collector --> 1
So, from above mentioned readings, I think the transistor is OK. Am I right?
Update3:
I have put new 2N2222 after removing the first one:
Voltages of Q2:
A. When D9 is HIGH:
Collector - Ground ----> 0.76V
Emitter - Ground ------> 0.74V
Base - Ground ---------> 1.52V
Collector - Base ----> 0.74 V
Collector - Emitter -> 0.02V
Base - Emitter ------> 0.77V
B. When D9 is LOW:
Collector - Ground ----> 10.25V
Emitter - Ground ------> 0.70V
Base - Ground ---------> 0.73V
Collector - Base ----> 9.50V
Collector - Emitter -> 9.55V
Base - Emitter ------> 0.04V
Now, my diagram looks like:
simulate this circuit
Update4 (Working Diagram):
simulate this circuit
AI: Unfortunately, there is no guarantee Arduino can pull the base that low...
You either need to add a diode under that transistor and reduce the resistor to closer to 500R so it turns on harder or better, switch to N-Channel MOSFETS.
|
H: Induction machine: Question regarding field weakening region limited by breakdown torque
I have a question regarding the entry point to the field weakening region limited by the breakdown torque of an induction machine marked red in the following picture:
Under nominal conditions, this point may be located at (ws1_N, T1_N) where T1_N is the torque at ws1_N. Let's assume instead of P_N one demands only 0.8 * P_N from the motor. What is the formula to calculate the new entry point to this region ws1_new and T1_new based on the nominal values of ws1_N and T1_N?
AI: It is pretty obvious that the range that is being described is the range at which the transmitted torque is limited to the breakdown torque. The entry point for that operation is the point at which the torque for the constant power operation is equal to the breakdown torque. The torque for constant power operation is given by T = P/w where the power is the power developed at maximum torque and w for the point at which the torque begins to decline. You need the formula for breakdown torque. I believe that it is proportional to the square of w at the point at which it begins to decline divided by w. T is torque in Nm. P is power in watts. w is speed in radians per second.
|
H: Overall and partial MOSFET voltage gain
I am researching studies for common source MOSFET amplifier and I found two different terms for voltage gain - overall and partial.
What is the difference between overall and partial gain when talking about MOSFETs?
What do each one of them mean?
Are both used in practice when applying equations to real circuits?
Where partial voltage gain is defined as
And overall voltage as
Circuit schematic
Equivalent small signal circuit
AI: I remember my MOSFETs class would often have a DC voltage source that was connected to the gate and drain of the MOSFET. The gate resistors would form a divider (R_G1 and R_G2) and bias the circuit, just like the equations you have listed. I believe you are getting information from a few sources that have different circuits (maybe a class and online?). I will answer your questions assuming what you're doing is similar to my college classes...
1) What is the difference between overall and partial gain when talking about MOSFETs?
2) What do each one of them mean?
3) Are both used in practice when applying equations to real circuits?
1 & 2)
Partial gain is Vo/Vi (where Vi is the input at the gate).
Overall gain is Vo/Vsig (where Vsig is your signal BEFORE the blocking capacitor.
3) Depends on the circuit. Most people will not use MOSFETs for amplifiers and will instead buy an op amp or other IC, at least in automotive circuits. If you go to work somewhere that designs analog circuits, it will probably be more common, but I can't say for sure.
|
H: Ultrasonic generator - a couple of questions
Here is the ultrasonic generator circuit I'm trying to understand:
It is powered by USB and it produces 100V at 100kHz on the piezoelectric speaker BQ1.
Two mutually inverted PWM signals go from the micro-controller to the transformer T1.
Questions:
1) Is this the simplest, cheapest circuit of the ultrasonic generator with similar output?
2) Why do we need C1-C2 capacitors?
3) Center tapped transformer T1 is used here, but is it ok to replace T1 with a transformer without center tap and to use single PWM signal as input?
Edit:
4) Why C1?
5) If I'm powering the circuit from a separate power supply which is able to deliver several amps do I need R1, C1, C2?
AI: Yes, this is the simplest way to do it.
C1 and C2 are needed for supplying current to the transformer as it switches, as its supply is decoupled from the main +5V by a 100Ω resistor. This is done to avoid ripple coming from the transducer circuit leak into the main +5V.
The center-tapped transformer is needed to keep it simple, as you cannot deliver a DC component to the transformer core. Which you would if you used only one transistor. If you don't have a center-tapped transformer, you need a H-Bridge of four transistors, and correct triggering.
About the added questions:
C1 ist needed because C2 is a 220µF electrolytic cap and thus, its ability to deliver sharp spikes of inrush current into the transformer is fairly limited. The internal inductance of such caps is rather high. C1 is a low-inductance type cap which does the job until C2 can deliver.
If you use an external power supply for the transducer circuit, you have to leave out R1 (only connect GND), and you may leave out C2, but not C1. That is because the cable to your power supply has an inductance, too.
|
H: Relay: higher voltage allowed at lower current?
Is it safe to use a 30VDC/1A relay for a voltage of 60V but a current of <100uA?
E.g. this one:
http://www.mouser.com/ds/2/315/mech_eng_gq-1075992.pdf
AI: Is it safe to use a 30VDC/1A relay for a voltage of 60V but a current of <100uA?
No, the ratings for voltage and current are separate, not related to the power consumed by the load connected to the relay.
The current rating is to limit the self-heating of the relay due to its own resistance.
The voltage rating is to be sure the relay can disconnect properly, without an excessive arc forming between the contacts and damaging them.
Didn't know that there has to be a min. current flowing through the relay. Why?
The issue is wetting current.
A certain current is needed to ensure that oxides and other surface contaminants are burned off the contacts when they touch each other.
|
H: Which fab for DRAM device? (ASIC design at Europractice)
I would like to ask for advice.
Europractice supports many fabs and technologies for custom asic design (fab list). Lib support list of those technologies are public (for example UMC 130 nm LL). I checked all of public lists, and nowhere found dram support.
I am looking for opportunity to design a dram device (for example on 130 nm if that is possible). Which fab i should sign for?
AI: DRAM processes are usually just mean that you have a trench capacitor with a high density pattern option. I know for a fact that those GF processes in your list have a trench capacitor, and I'm confident that the other 40nm or smaller nodes will as well. I use DRAM instead of SRAM when I need more than about 6MiB because the charge-amps required for SRAM end up using more power than the DRAM refresh.
As an example, this answer has an illustration of my work from a 14nm SOI process where I get about 8-bits DRAM per the area of a single FLASH gate (non-FLASH process), which is about the same area as the cost of 2-bits of SRAM.
Here's the kicker, you will need the NDAs to see what is actually in the design kits. For example, the GF 24nm white paper only lists a fraction of the devices that I see in the kit.
|
H: INA125P Strain gauge amplification problem
I'm using the INA125P to amplify the strain of a 350 ohm strain gauge in a self-built Wheatstone bridge circuit for measurement. I'm testing using a 351 ohm resistor to mimick a strain gauge under maximum strain.
This is the basic circuit I have (modified circuit from http://www.mechtechplace.net/mech-tech-electronics/building-a-low-cost-strain-gage-load-cell-amplifier/):
With my current calculation I would be feeding in a 1.78mV signal, with an amplification factor of 1004, I should be seeing 2.5V+1.87V= 4.29V Output.
I understand that I would be hitting the maximum output, but currently I'm measuring about 50mV at the output.
I've checked the other pin voltages to be correct, and Vin+ and Vin- are both close to 1.3V.
Any ideas on what could be happening?
EDIT: edited calculated estimation numbers.
AI: There are a number of errors in your calculations.
1) Your input voltage should be $$Vin = 2.5\times((351/701) - 0.5) = 1.78\text{ mV}$$
2) Your gain is $$\text{Gain} = 4\text{ } + \text{ }\frac{60k}{Rg} = 4\text{ } + \text{ }\frac{60k}{60} = 1004$$so
3) Your output should be $$Vout = Vin \times Gain = 1.79\text{ volts} $$
However, your bigger problem is your choice of 350 ohms as models for the other three arms. Or rather, you have not taken resistor tolerance into account, since I expect you have used 1% units on all 4 positions. Well, actually, of course, you didn't, since the difference between 350 and 351 is less than 1%. Your 1 ohm difference in a 350 ohm nominal is only 0.3%, much less than the tolerances of the other 3 resistors. Instead, try a network which looks like
simulate this circuit – Schematic created using CircuitLab
EDIT - It has been disclosed in comment that the "350" ohm resistors are actually 5% units, and this explains a great deal.
First, there aren't any 350 ohm, 5% resistors. What you have are 360 ohms. I assume that you have hand-picked a resistor which has a value of 351 ohms, and didn't pay attention to the fact that the rejects were nowhere near 350. In fact, at +/- 5%, the allowable range for these resistors is 342 to 378 ohns. So it is entirely possible that your circuit looks like
simulate this circuit
which gives an input difference of -0.108, which is far, far away from your nominal +.00178. Granted, this is the worst case, but it gives an idea of how badly you've misunderstood your circuit.
So you basically have 2 choices.
First, build the circuit I recommended. With 5% resistors the voltage might be off by 10%, but at least you'll be in the ballpark.
Second, do some stringent selection of your resistors. Pick (3) 350 ohm units and one 351. But notice that you'll want the values to be better than the nearest ohm. I'd suggest picking resistances to within 0.1 ohm or better. Of course, you can play a certain amount of games here. The two left-hand resistors can actually be any value you want as long as they are exactly the same, since their function is to produce a voltage at exactly half of Vref.
END EDIT
|
H: Connect two batteries in parallel with transistors?
I am trying to figure out how I can connect two small 12V lead acid batteries in parallel using transistors, but when testing this circuit on the breadboard, the voltages didn't equalize so that tells me the two batteries weren't connected to each other.
How could I make what I am wanting to accomplish?
The bases in the schematic will be pulled low by another transistor when a certain condition is met in the microcontroller, thus isolating the batteries.
The goal is for the microcontroller and other circuitry to be running off of the BT2 battery when a motor causes a voltage drop from BT1, and when the motor is turned off, the batteries are normally connected together increasing the capacity of the system.
Thank you.
AI: You are probably better off doing this with MOSFETs. There are two back to back because otherwise the body diode would cause flow from one battery to the other.
When you apply some voltage to R1 from your MCU, Q1 will pull the gates of Q2 and Q3 low, turning them on, so current will be allowed to flow in either direction. When Q1 is off, all transistors will turn off and the two batteries will be isolated.
The R2 pull-up assumes that V1 is the primary source.
simulate this circuit – Schematic created using CircuitLab
You could also try this. It uses a singe PNP BJT instead so it's simpler but the transistor may dissipate more power than the MOSFETs. You may also run into issues if the voltage differences are high, but I think it would work for you.
simulate this circuit
|
H: Designing a breakout for crenellated (castellated?) pads
I am brand new to PCB design, so far all i've made a simply 555 timer circuit with an led, a few resistors, a capacitor and a 555 timer and got it printed by OSHpark.
That was my first experience getting a board printed and with pcb design and i used it as warm up.
I am trying to design a PCB breakout board for this, the xs3868 mega-cheap chinese knock off bluetooth module. Here is the footprint, in case its not clear i only want to design footprints for the tiny squares on the upper and lower sides, the center area is just other junk on the board.
I was wondering if there was any advice for creating this. Can i use one of the footprint wizards or would these types of pads not really work for that?
Thanks for the advice!
P.S. I am pretty sure these are called crenellated pads but i have heard others call them castellated pads, so i just put both in the title.
AI: I've only heard the term 'castellated' used for this type of feature. Unless more detail is provided with that footprint (specifically the pad dimensions), you can create pads that resemble that footprint, leaving a reasonable gap between each pad. E.g. the pitch is 1.3mm so the pad width could be ~1.0-1.1mm and pad height or about 1.5mm looks about right. Then just arrange them as shown in the footprint drawing. I don't normally use a footprint wizard unless there are a lot of pads. In this case you could probably create it manually quicker, especially since it's not a typical package.
|
H: Arduino Uno short circuits
When I connect the 5V of my Arduino to the GND why does it get short circuited ? And why does the Arduino Uno doesn't really get short circuited and the Arduino Nano does get short circuited ?
AI: When we by mistakenly connect 5v and Gnd It gets short circuited.
Lesson learned. Gnd is technically the negative side of the battery (or other power source) and 5v is the positive side of the battery. Hook the positive side of the battery to the negative side and the battery will heat up and possibly explode.
Electricity likes to flow through the path of least resistance, and by connecting 5v to ground, thats the path much of the electricity will take.
My doubt is how and why did this happen and how this gets prevented in the Uno but not in Nano. And I heard of a ressetable fuse in the Uno.
It's possible that you have blown a fuse in Uno, and it is possible Nano doesn't have a fuse. When a fuse is blown, an open circuit is created to prevent the rest of the parts from overheating and/or malfunctioning.
|
H: Bypassing 220v - 5v relay
Beginner Warning!
I am trying to automate lights and fan in my house with the help of a raspberry pi. I read couple of guides in the internet. I finished the basic circuit. Now I can control a relay with my pi remotely. If I connect the relay in Line, I will be able to control my light but for some reason i cant power my pi or relay I will not be to turn on my light
simulate this circuit – Schematic created using CircuitLab
Another solution is I will connect the switch directly to light and another line through relay. So if i turn on the switch my light works & if I enable the relay my light works. Will this work? or Will it damage my relay?
simulate this circuit
Here is the relay i am using
AI: If I were doing this, I'd use a latching single pole double throw relay. Your wall switches are single pole double throws switches, as well. Connecting the switch and relay in line like the below image will allow the wall switch or relay to toggle the light, regardless of each other's state. Using a latching relay allows you to turn on the relay with the raspberry pi's digital output, then stop driving it, and it will hold it's state.
I may be overstepping myself here, as this may not be the functionality you're looking for. The circuit I've shown below is similar to how a room with two light switches is wired. Hitting either switch, regardless of the other switch's position, turns the light on or off. This can be extended to any number of switches, as well, so you could, if you really wanted to, have 100 raspberry pi all switching the same light on and off.
simulate this circuit – Schematic created using CircuitLab
Note: Any values you see in the diagram are placeholders. You'll need to choose the correct components yourself.
Edit: Removed the resistor after actually looking at the device linked to. Added a flyback diode to the relay to protect against transient spikes when the relay is de-energized. Add a comment if you don't understand what this is for.
You'll need to check the datasheet to see what's going on with the relay you linked. Chances are, there's an onboard relay driver, in which case the flyback diode is probably already present. Adding it at your pi's output won't make a difference. Also, as noted in the comments, a latching relay usually has separate set and reset coils, which are not present in this schematic. In the end, though, that's not important, as the relay you linked is not a latching relay. Have fun driving that pin all day.
|
H: How would linear voltage regulators behave in series?
How would this behave in real life? When I simulate it, I get stepped voltages across the LVRs and odd output voltages.
simulate this circuit – Schematic created using CircuitLab
AI: If you draw no current then yes, you get stepped voltages as you "expect".
But look at block diagram in datasheet of LM1117:
What will happen when you start to draw some current? You can see some resistors connected to GND pin, right?
So, from your circuit you are not able to draw any current at all.
|
H: Convert VAh to kWh
Sorry, this might be a stupid question as I'm not an electrical person.
I'm analyzing an electricity consumption dataset and the consumption is measured by apparent energy (VAh).
How do I convert this VAh to kWh as normally seen on a power bill? Or are they the same thing, just different ways to call?
Thanks.
AI: You need to know the power factor, which is highly depedant on your application.
Then you simply use this formula:
$$
P = S * PF
$$
where
P = actual energy
S = apparent energy
PF= Power Factor
This answer tells us, that power factor in general public households can be expected to be greater than 0.9.
|
H: LED switch behaviour
I'm going to use one of those LED-buttons to switch a certain (5V) appliance. It's possible to use a couple of connection types:
Le left side scheme is OK, but I don't like it.
I would go with the right side one, but the problem is in that situation the voltage drops... 5V drops to ~3V and 12V to ~10V...
I think should be due to an "embedded" resistor protecting the LED.
In your opinion, is there something I can do to circumvent this problem?
(I need all the 5V).
Thanks.
AI: The right side circuit is not usually a good way to wire an LED for the very reason you mentioned (unless that voltage drop is intended). Also the diagram label is incorrect where it states "light on when open switch". The LED will come on only when the switch is closed.
Based on the voltage drop you saw testing the right side circuit, it doesn't seem there is any series resistor, so you must include one to prevent burning out the LED.
I think this is what you are looking for, where the LED only comes on when the switch is on, but the load still gets full voltage.
simulate this circuit – Schematic created using CircuitLab
|
H: Does clock speed matter when recovering from I2C bus lock up?
When there is I2C lock caused by slave device driving the SDA line low you need to manually generate a few clock signals by doing a simple bit banging on the SCL pin. I thought that this need to be done with the same frequency as the I2C communication was running before the lock up but it also works for me if I do a bit banging with a much lower frequency. Let's say I have I2C clock speed configured to be 100kHz, then I have a lock up and I generate a few clock signals with a frequency of 4kHz and immediately I2C is working fine again. Please explain if the frequency of bit banging does matter when unlocking I2C bus.
AI: Does clock speed matter when recovering from I2C bus lock up?
Simple answer: No.
Detailed answer: As you know, slaves are not programmed to run at a specified frequency because SCLK is generated and "served" by the master. To ensure proper resetting, just refer to the timing diagram shown in the datasheet (i.e. minimum hi- and low-pulse duration).
After 9 or 10 clock pulses, slave should send an ACK and release the SDA line. If not then a hardware reset or power-cycle (God forbid!) may be required.
|
H: does heat kill hard drives? hhd lifespan due to heat
These days it's hard to buy an external 3.5" hard drive with a fan inside or well heat dissipation design. I have 4 of such hard drives, and two have already failed in first few months. Here is the deal; They all run very hot in few minutes of copying some files. Some show 50 max and some 70 max degree Celsius after power up for a period of time, and I am pretty sure that either the hardware or software have prevented them to show numbers higher than that. so it is safe to say most fan-less external hard drive can reach up to 80 degree and more in 30 minutes of continuous operation. I have actually took apart all four of my external hard drives. Their designs are all similar, plastic case, a very thin metal part links the hard drive, the controller pcb and the plastic case together. Very minimalist design, Seems to me, they are using the hard drive aluminum body as the heatsink, and it is very hot to touch after 30 minutes.
So my questions will be how much of this heat really contributed to my two failed hard drives or for hard drives failure in general? Is the bulky aluminum hard drive body a good heatsink? Why all manufacturers suddenly choose to not include a fan? ( This is like a trend. )
AI: I have seen heat kill plenty of hard drives in poorly-built enclosures in my time. Additionally, temperature is one of the SMART failure criteria.
A hard drive's casing is designed to be sufficient heatsinking when used in a well-ventilated environment. A fanless enclosure certainly does not present a well-ventilated environment, and the small amount of air in an enclosure usually acts as an insulator, exacerbating the problem.
If the hard drive is bolted tightly to the outside of the enclosure then the enclosure can act as additional heatsinking, but if the drive is merely slid into grooves in the enclosure, or even worse bolted onto a PCB within the enclosure, then heat can build up and damage can occur.
|
H: What is this Op-Amp Configuration doing?
This Op-Amp Arrangement is part of an analog signal processing for a knock sensor of a combustion engine and I'm very curious about what this part actually does, as my google research didn't help me at all.
AI: I think it is a precision rectifier...
If A goes positive WRT B, then D1 is reverse biased, IC4 drives node 4 to -Vin * R9/R8.
If A goes negative WRT B then D1 is forward biased, D2 is reverse biased and node 4 is pulled to (virtual) ground by R9.
The next stage is a virtual earth summing amp, summing A with 2 * node 4 assuming all resistors are equal (inverting of course), Vout = -I*R13.
Lets see what currents we get into that virtual earth node:
I = Vin/R10 + Vn4/(R11||R12).
When input is negative, I = Vin/R10, because Vn4 = 0.
When input is positive, I = Vin/R10 + Vn4/(R11 || R12), but Vn4 = -Vin * R9/R8.
If we assume all resistors are equal then I(positive) = Vin/R -Vin * 2/R = -Vin/R.
Finally multiply I by R13 to get the output as a full wave rectified signal.
Thing thing is a precision full wave rectifier.
|
H: Cooling buck converter mosfets by placing on bottom layer of PCB - a problem?
I have a design and layout for a buck converter which currently sits on one layer of a 2 layer PCB. I would like to force-cool the heat generating components of the board by placing them directly onto a flat heatsink.
Because there are multiple identical buck converters for different applications, having the entire board bolt to a heatsink would be ideal. I therefore wish to place the FETs on the bottom layer of the PCB. (they are SMD and not the tallest components on the board- the inductor is.
I have heard that placing the FETs on the bottom layer of the PCB (the other side to the inductor) might introduce issues into the board. Can anybody tell me if this is true, and if so, how can I mitigate these issues? Can I simply use enough vias to mitigate?
AI: Unless your FETs are IR DirectFETs (with metal tops) then what you propose amounts to sticking the plastic top of the FET onto the heatsink... and a thick plastic package has quite high thermal resistance.
It's better than nothing, but, well...
The way this is usually done is:
Put your FETs on component side
Put plenty of vias from the FET's back side (which conducts heat well) to transport heat to the back of the PCB
Make sure you have wide copper pours
Squeeze some Silicone Gap Filler material between the back of the PCB and a metal enclosure, heatsink, etc.
However if you got thru-hole parts with pins sticking through the board, and you don't want them to poke into the heatsink, then your gap filler is gonna be thick (unless the heat sink only covers a small part of the board) and these materials, while much better than air or plastic, still have abysmal thermal resistance compared to metal...
Also you'll need to clamp the board with an aluminium profile or something. Trying to squeeze your thermal interface material using just four screws in the corners of the board would bend it and crack your ceramic caps.
If you have airflow on top layer, you can also use some SMD heat sinks.
You won't get thermal characteristics on par with a TO220 onto a heatsink, but depending on your dissipation, it could work.
Optimize heat sink design - connect cooling pad on PCB backside by vias
Heatsinks at the back:
http://www.pcstats.com/articleimages/200702/Gigabyte965PDq6_m9.jpg
http://www.eevblog.com/forum/blog/eevblog-744-smd-thermal-case-design-supply-part-15/25/
|
H: Fixing ground "open circuit" on printed circuit board
I was installing a RV roof vent fan and accidentally shorted it (connected it in reverse polarity).
The short seems pretty clean and I was able to manually confirmed that nothing else was broken by manually bridging the short with a piece of wire held in place.
I was wondering what the easiest way to fix this would be (I'm more of a software than an hardware guy)... I was thinking maybe I could just put a bead of solder where its broken?
AI: Solder won't bridge that gasp by itself - you'll need to solder a short bit of wire over the gap.
You will need to scrape some of the green solder mask off the undamaged portion of the track so you can solder to it.
|
H: any 8 bit fast adder designs
so i'm trying to design a CPU and in all my previous designs i have used a cascade adder but i want to try using a fast adder to speed things up. when i search for "8 bit fast adders" all i get is the 4 bit fast adder designs and i don't want to link all the carry ins and outs together so does anyone have a true 8 bit fast adder design. all i want is the diagram, which means only the logic gates(and gate, or gate, etc) no blocks or anything like that. for an 8 bit adder with fast carry no other operations just adding.
AI: The question what makes an adder "fast" is often a technological one – are you implementing (or simulating it) for ASIC, or some specific FPGA?
In either case, you'll have elementary "building blocks" that you'll "plug together"; it's really not like your usually dealing with "AND" and "OR" components when describing a CPU design.
As an example, take this minimal 8-bit adder Verilog module:
module add (clk, a, b, result);
input clk;
input [7:0]a;
input [7:0]b;
output [15:0]result;
always @(posedge clk)
result = a + b;
endmodule // add
Implemented for an ICE40 FPGA, it would look like this. Notice that the blocks here are the elementary building blocks. There's no AND/OR here – so optimizing an adder for speed with those makes zero sense:
compare that to the more abstract "general" techmap that yosys (which I'm using to generate these trees) generates:
You'll see your AND, XOR, XNOR, NAND "gate" primitives in there, but also things like AOI (and-or-invert) – which the software deems useful, because they might map to something specifically easy and compact to implement on any given architecture, be it an FPGA or ASIC cells.
So, generally, it is important to understand what logic constitutes a complex operation such as "add". However, as soon as your optimizing that for speed, size, power, you'll have to consider the actual thing that will implement that – be it an ASIC, be it something built from 74xx or be it an FPGA – and a general rule like "this is a fast implementation" cease to exist.
|
H: How to charge lithium ion battery?
I have purchased and received this battery from eBay. Upon opening it delivers 3v as oppose to 12v-10v and it has a petty output current. I am going to assume this is because it has not been charged much. I have a dc adapter similar to this and i am wondering if i can plug the adapter into the female plug of the battery to let it charge. Would this work and if so what voltage should i set the adapter to for charging?
AI: If your battery delivers only 3V (while being obviously 3-cell battery), it means it is fully discharged and possibly damaged because of overdischarge. It may or may not recover if properly charged.
Before asking questions, you should familiarize yourself with methods of charging Li-Ion batteries. If you do so, you would discover that Li-ion cells must be pre-charged with small current (100-200mA) first until they get to about 3V level (each, meaning ~9V for your battery). Then the charge should go at constant current (0.5C is considered as safe level if battery specifications are nor known). Then, when the battery voltage reaches certain level as defined by details of the particular battery chemistry (4.2V can be a safe assumption, giving 3x4.2=12.6V for your battery), the charge should proceed at constant voltage (12.6V, or 4.2V per cell) until the current drops below 100-200mA. This would conclude the charge cycle.
Now it is up to you to decide if your "suggested method" fits into above description. Keep in mind also that the cells in the battery pack are connected in series, so the voltage on inner cells might be distributed unevenly, causing imbalance, overvoltage, and undercharge. For optimal performance and longevity, batteries must have a more sophisticated, "balanced" charger, with more than two connected wires.
|
H: Converting S parameters to Z parameters - divergence
I have cause to convert some Z parameters to S parameters and vice versa. Here is the conversion for \$Z_{11}\$;
$$Z_{11} = {((1 + S_{11}) (1 - S_{22}) + S_{12} S_{21}) \over \Delta_S} Z_0$$
where
$$\Delta_S = (1 - S_{11}) (1 - S_{22}) - S_{12} S_{21}.$$
I thought I'd start nice and simple with an ideal short transmission line of impedance \$Z_0\$. Now \$S_{11}=0\$, \$S_{21}=1\$, \$S_{12}=1\$ and \$S_{22}=0\$. Therefore \$\Delta_S=0\$, so \$Z_{11}\$ diverges (as do the other Z parameters) and something has gone wrong somewhere.
Where have I messed up?
AI: You didn't mess up.
\$Z_{11}\$ is the input impedance when the other port is terminated with an open circuit.
Since your device is just a bit of wire, it has infinite input impedance when the other end is not connected to anything, and thus infinite \$Z_{11}\$.
This is an example of why we need different two port representations (S-parameters, Y-parameters, Z-parameters, H-parameters). There's certain devices that can't be represented in any particular representation.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.