text
stringlengths 83
79.5k
|
---|
H: calculate input resistance with known adc value
I am fairly new in the electronics world, but I would really like to learn it. The problem I'm facing right now, is that I miss the insight to be able to tackle this specific problem.
I have to calculate the input resistance of a system on the basis of a given ADC value. There will be an temperature sensor connected to the input, which will give some resistance, depending on the temperature. What I want to know / calculate, is the given resistance, so that I can calculate the right temperature. I know how to convert the ADC value to the correct voltage, but I do not know what the next steps are.
I calculate the voltage as follows: \$\text{Result}_{\text{mV}} = (\text{Reference}_{\text{mV}} / \text{BitSteps}) \times \text{ADC}\$
That gives the correct voltage at the input of the ADC.
Given the following diagram, which follow up steps should I take to calculate the input resistance?
74HC4052 Dual 4-channel analog multiplexer/demultiplexer data sheet
MCP6L04T/E/SL operational amplifier data sheet
AI: The voltage at the output of the mux is \$\frac{5.0R_X}{R_X+12.4K +Rds(on)}\$, and we can ignore Rds(on) since it's typically a couple tenths of an ohm.
The voltage at the input to the ADC is \$\frac{5.0\cdot 0.4\cdot R_X}{R_X+12.4K +Rds(on)}\$ because of the divider resistors R149/R150.
Solve for Rx. Then subtract the resistance of the common mode filter and wires (or ignore it) to get the sensor resistance.
|
H: Are ripples and harmonics the same thing?
I started working on the "Direct Power Control of Grid Connected Voltage Source Converters", everywhere in the literature, authors state that one of the major drawbacks of this control technique is the presence of active and reactive power ripples due to the use of Hysteresis controllers.
In the other hand I've already worked on Power Harmonics, active power filtering and UPQCs, and i know that harmonics must be multiple of the fundamental frequency.
My questions are the following :
Are "power ripples" cause by hysteresis controllers considered "harmonics"?
What are the frequencies of those power ripples?
Do they affect the value of THD?
AI: Are "power ripples" cause by hysteresis controllers considered
"harmonics" ?
No, not all of them, harmonics are specific frequencies that are resonant, all noise ripples such as switching noise or hysteresis add up to the total noise 'ripple' of the circuit. Ripple is less applicable in AC systems because the signal (the AC waveform itself) is much higher than the noise. To see the noise in an AC system you need to look at the frequency content or subtract out the first harmonic (ie 60 or 50Hz)
Source: http://www.compliance-club.com/archive/keitharmstrong/design_techniques6.html
What are the frequencies of those power [harmonics]?
Typically multiples of the carrier, if your on 60Hz, you get one at double and triple so 120Hz and 180Hz and so on.
Do they affect the value of THD ?
THD only takes into consideration the harmonics to the fundamental:
$$ %THD = \frac{\sqrt{v_2^2+v_3^2 \ddots v_n^2}}{v_1^2} $$
|
H: Finding the number of bytes written in a larger array
How can I read the total number of the bytes written into a larger array?
For example if 10 bytes are written in a uint8_t array[100], how can I check if the written bytes are 10 and not 20 or 80 or 100
Since sizeof(array) would give us the total number of the array (100 bytes), we cannot know how many bytes are actually written in the array and how many array cells are empty.
AI: You need to keep track of that yourself.
For example, if you're using the array as a circular buffer, you would have additional variables that hold the index values for the "head" (newest) and "tail" (oldest) valid values. You advance the "head" index whenever you add a byte, and advance the "tail" whenever you remove one.
The difference between the "head" and "tail" indices (modulo the size of the array) tells you how many bytes are valid.
|
H: Thermal parameters for the LM1117
Looking at the datasheet for the LM1117 regulator, on page 18 to 20 there's a table of various layouts for copper cooling planes for the LM1117 in SOT-223 and TO-252 packages. Comparing figures 30 and 31 to table 2, I see a number of discrepancies:
for layout 6, the one with the lowest thermal resistance, the table gives upper copper area \$1\textrm{in}^2\$, and 0 for bottom. However, the figures show no copper on top, only on the bottom.
layout 2 has top copper area \$0.066\textrm{in}^2\$, 0 on bottom, and has thermal resistance of \$87 ^\circ \textrm{C}/\textrm{W}\$ for the TO-252. Layout 12 has the same pattern repeated on top and bottom, giving a thermal resistance \$89 ^\circ \textrm{C}/\textrm{W}\$. How can the thermal resistance increase when adding more copper to cool?
On page 4, section 6.4., the table Thermal Information gives a junction-to-ambient thermal resistance \$45.1 ^\circ \textrm{C}/\textrm{W}\$, which is smaller than that reported for any of the layouts on pages 18 to 20. While this table doesn't specify for what layout/heatsinking this is, the footnote on the immediately preceding table says "All numbers apply for packages soldered directly into a PCB." Isn't this a contradiction?
So, my question is: am I seriously misreading/misinterpreting/confusing something here, or is the section in the end of the datasheet full of errors? If it's the latter, where can I find more reliable data to make sure I have enough cooling for my regulator?
AI: So, my question is: am I seriously
misreading/misinterpreting/confusing something
It is a very confusing datasheet. The following is my interpretation.
for layout 6, the one with the lowest thermal resistance, the table
gives upper copper area 1in2, and 0 for bottom. However, the figures
show no copper on top, only on the bottom.
The patterns are confusing. The bottom view is of the component side, top view is of the opposite side.
How can the thermal resistance increase when adding more copper to
cool?
There is copper on the component side and none on the opposite side. All patterns show copper on the component side even if it is not exposed (zero).
On page 4, section 6.4., the table Thermal Information gives a
junction-to-ambient thermal resistance 45.1°C/W, which is smaller than
that reported for any of the layouts on pages 18 to 20.
45.1°C/W is a different metric. It's the resistance for the package only. In their App Note they say:
The junction-to-ambient thermal resistance, RθJA , is the most
commonly reported thermal metric and is the most often misused. RθJA
is a measure of the thermal performance of an IC package mounted on a
specific test coupon. The intent of RθJA is to give a metric by
which the relative thermal performance of a package can be compared.
Source: Semiconductor and IC Package Thermal Metrics
When the package is soldered to the board the thermal resistance of the thermal pad, FR4, and copper is added the package resistance.
|
H: Difference B/w LTxxx Ics and Lmvxx Ics
I have been strolling towards being a circuit designer, using eagle and ltspice and i am trying to learn about new ic's and stuff. recently the thought about how does an LTXXX module and LVXXX(or LMXX) module differ to each other if they are both based on op-amps.
AI: There might be a few numbers that indicated a similar IC, but otherwise they are completely independent numbers and have no relationship to each other. Early on 30+ years ago there may have been some number sharing, but if that did occur it was usually in the form of everyone having the same number (like the OP27) and sometimes a different suffix. If you want to learn about the numbers the best way to do this is through the manufacturers websites. The numbers also have very little to do with what it is, and LT1763 is an LDO an LT1867 is an OP Amp
|
H: Line splitter for 230VAC in the UK?
In the U.S. where I am from, my company's field techs are required to measure AC wall current of our products frequently. To to this, they either make their own harness with a Hot (Line) wire to clamp on to or they opt to use a commercial line splitter like this:
The problem is that field techs in the UK are adamant that they are not comfortable using a homemade version and I can't find any commercially available. Does anyone know where to buy one of these using 230 VAC UK style plugs? Sorry for such a silly question, but I'm really stumped.
AI: What you are after is:
https://www.cef.co.uk/catalogue/products/4350349-ac-line-splitter
The Google phase was "uk ac line splitter"
|
H: How much protection is an IC socket?
I read that if you try to solder an IC directly to a PCB, the heat from the soldering iron tends to destroy the delicate IC — unless you have elite-level soldering skills. (Hint: I do not have such skills!)
For my current project, my plan was to solder IC sockets to the board, do all of the other soldering work, and then insert the ICs into the sockets once I've put the iron away. Presumably the worst an iron can do to a plastic IC socket is maybe melt it a little bit. It's unlikely to completely (and invisibly) destroy it like an IC.
However... I'm using a matrix board. Almost every single connection requires another hoop of wire, and several of these need to connect pins on opposite sides of the ICs. Having got part way through the project, I'm becomming concerned that once I finish platting the board with its tangle of wire, I might not actually be able to physically insert the ICs for the amount of wire in the way.
The other option is to insert the ICs now, and continue soldering, hoping that the IC sockets will save me. Realistically, how much protection against thermal damage is a socket going to give? I mean, it's designed to make a good electrical connection, so it probably makes a reasonable thermal connection too. On the other hand, maybe it has more thermal mass, or a larger surface to dissapate heat? I don't know.
(The ICs are DIP-14, in case that makes any difference to anything.)
AI: Even for a beginner, damaging ICs from soldering is not something to worry too much about. Especially DIP ICs where you will be applying the soldering iron to pin on the bottom side of the board.
A handful of analog ICs are very succeptible to soldering heat. They don't get destroyed, but their performance can be degraded by even normal heat. Socketing is used when really needed here.
The more common reason to socket is to make ICs field replaceable. If you blow up an IC or it turns out to be defective (which was much more common in the 70s!) you can just pop it out and replace it rather than scrapping the whole board or trying to desolder it. Another reason is for ROM chips that might need to be programmed before inserting, or replaced to do a firmware upgrade. Almost everything now is in-circuit programmable, but that was quite common back in the day.
In any case, if you are set on socketing, there is no problem inserting the ICs as soon as the socket is in place. You aren't going to overheat a part when soldering its neighbor unless you are doing something really crazy.
|
H: Calculating laptop power consumption
I'm trying to decide on a portable AC power station to power four laptops for at least five hours. I have the charger units for the laptops, and I'm confused on how to figure out the power consumption from them. Mainly, I don't know whether to look at the input power from the AC source or the output power going to the laptop.
Here are the specifications I see on the adapter.
INPUT: 100-240V ~ 3.2A
OUPUT: 19.5V - 10.8A
So I know that the input is AC and the output is DC. And I'm looking at a 500Wh portable power station, like this one.
https://www.amazon.com/Portable-Jackery-Generator-Flashlight-Emergency/dp/B06XJ1SVPW/ref=sr_1_4?ie=UTF8&qid=1530142151&sr=8-4&keywords=500wh+portable
How do I know that 500Wh is enough to power four laptop for five hours? I know that the laptop can consume 19.5V * 10.8A = 210.6W. Or should I be using the input power, which is 110V * 3.2A = 352W?
With those numbers, there seems no way that 500Wh can power four of these laptops for five hours. But the power station claims that it can charge a laptop 7+ times, run a mini fridge 7+ hours, and power a TV and game console for hours.
My question is: Can a laptop really consume that much power under light use?
AI: Don't forget the margin on top of the supply for good measure, a lot of products power supplies are sized one size up from the current they normally draw when the max power rating is still lower than that listed to some degree.
The best way tio do this is to get a power monitor like a kill a watt
To help you find the average and max usage of your device. The ballooning of requirements is called margin creep, at each stage of the design you keep on adding margin until the requirements get too unreasonable. Then you message or total then up and size the system appropriately
|
H: Circuit for squaring (raise to power 2) signal
I have a voltage signal and I want to design a circuit that can do squaring of this signal ( raise it to power 2).
For example when I read the output, instead of having 2 V I get 2^2= 4 V.
Is there a way to achieve that?
Thanks
AI: Use an analogue multiplierr (basically a kind of VCA) and apply the signal to both inputs. Take care about headroom though.
|
H: Using mesh analysis to get the transfer function of electrical system
I am studying the book: Control system engineering for Norman S Nise.
I left the college few years ago, and I forgot lots of thing about Kirchhof's laws (Voltage and current).
I tried to solve the following exercise:
PROBLEM: Given the network of Figure 2.6(a), find the transfer function,
h(s)/V(s).
Figure:
The author said in a previous part that:
[Sum of impedances around Mesh 1] I1 - [Sum of impedances common between Meshes] I2 = Sum of applied voltges around mesh 1
But as I remember, the both currents I1 and I2 are in the same directions, so it should + instead of - ?
And at the end he said that the transfer function is G(s) = I2/V(s). And as I remembered the transfer function should be Vc(s)/V(s).
And when we should use the Nodal analysis instead of Mesh analysis ? When there is a lots of calculations ?
Can anyone explain it to me ?
After transforming the components
AI: But as I remember, the both currents I1 and I2 are in the same directions, so it should + instead of - ?
If you look at the total current through the inductor, then you see that \$I_1(s)\$ goes from top to bottom, while \$I_2(s)\$ goes from bottom to top. They go in opposite directions, hence the minus sign.
And at the end he said that the transfer function is G(s) = I2/V(s). And as I remembered the transfer function should be Vc(s)/V(s).
Transfer functions can be from either voltage or current, to a voltage or current. Any combination is possible, and it just depends on what you want to treat as the input and output. In this case, the author is calculating the transconductance, ie. the output current \$I_2(s)\$ for a given input voltage \$V(S)\$.
And when we should use the Nodal analysis instead of Mesh analysis ? When there is a lots of calculations?
Both Nodal analysis and Mesh analysis can be used to solve any circuit. But you usually can save yourself some work if you choose the method appropriately.
Generally:
Mesh analysis uses the KVL equations, ie. it works with voltages. It is easier to use when there are ideal voltage sources in the circuit.
Nodal analysis uses the KCL equations, meaning currents. If you have ideal current sources in your circuit, then this is probably easier.
If you have both ideal voltage and current sources, then you will need to apply Thevenin/Norton equivalents, or you will need to use source-shifting. Or you can also use Modified Nodal analysis which is the method used in simulators.
If you have many components/nodes, but only few loops, mesh analysis will lead to fewer equations, which is easier to solve.
If you have a highly branching circuit (ie. lots of loops and not as many nodes), then Nodal analysis is preferred as it will lead to less equations.
Appendix
The Thevenin and Norton equivalents are shown in this figure:
They are exactly equivalent if the following relationship holds:
$$V_{Th} = R_N\cdot I_{N}$$
$$R_N = R_{Th}$$
Just make sure you can draw a circle around the structure, and that there are only two connections leaving/entering that circle. If that is not the case, then you can't replace them by one another.
So you can use this to turn voltage sources into current sources and vice-versa.
The equivalents can be used more generally, but this is how you'd use it for Nodal analysis or Mesh current analysis.
|
H: Controlling motor speed with PID how to scale PWM to RPM and back
I want to control the speed of a motor using PID controller. My problem is, the valid PWM range I can set in my microcontroller is from 0 to 199 but I measure the speed of the motor (using an encoder) in range of ~50 to 6000 RPM.
How can I meaningfully interchange these values?
Example:
I set the target speed to 6000 when motor is at 0RPM. Then the PID starts and at that moment the error is 6000...so the PID gives maximum output which will be 32767. But I only can set the timer PWM from 0~200.
I am using the code in AVR221 application note and there every variable is signed integer (no floating points). My own micro controller is stm32 that can handle floating points efficiently I beleive.
AI: No need to scale. You need to limit your PID controller output wit 0% and 99%, and find out what factors work best. There is I*R, all kinds of interference, acceleration, so voltage is not strictly related to speed. Actually sometimes it may seem like there is no relation at all. So you do PI or PID, and tune it. Best practice is to also use SI units everywhere, but not mandatory.
By the way, and this is very important. You must build motion profile. Which in case of velocity control means you have to gradually raise the velocity according to acceleration. Otherwise you will get overshoots and very unstable behavior, or poor control if you will lower your gain to calm system down.
|
H: How to calculate closed-loop bandwidth from open-loop parameters using feedback factor
I'm working through a past feedback analysis question for an exam and trying to calculate what the closed-loop bandwidth becomes given the open-loop gain \$|Av|=10^5\$, open-loop bandwidth \$B_{wo} = 20 \text{ Hz}\$ and a calculated feedback factor \$ \beta = 0.151515 \$. The class notes I'm given don't mention anything about how this works and neither does the textbook. From what I understand introducing negative feedback reduces the systems gain and widens its bandwidth? The answer given is that the closed-loop bandwidth becomes approximately \$303 \text{ kHz}\$. I initially thought to multiply the feedback factor with the open-loop bandwidth giving \$3.03 \text{Hz}\$, three orders of magnitude too small.
I have looked at this post Closed loop bandwidth vs open loop bandwidth
but I would like to know specifically how to calculate the closed-loop bandwidth using this feedback fraction.
AI: Here's what you have in terms of open loop gain: -
You have an open-loop gain of 100,000 (100 dB) from DC to 20 Hz then it rolls off at 20 dB per decade until it reaches unity gain at 2 MHz.
With a feedback factor of 0.151515, the gain of the op-amp is the reciprocal i.e. 6.6. A gain of 6.6 is 16.4 dB hence, I've drawn an orange line across the graph at this point and it intersects the open loop gain a bit above 200 kHz.
Hopefully this makes sense now.
To get to 303 kHz you calculate the fraction of a decade above 200 kHz that the orange line intersects the open-loop line. I estimate it to be about 0.18 based on 1 - 16.4/20.
Take the antilog of 0.18 and multiply it by 200 kHz to get the real frequency number where the vertical orange line hits the base line. The answer I get is 302.7 kHz.
|
H: Slightly Translated Parallel Electrical Circuit Analysis
My apologies for the vague title, but I simply do not not how else I could express it. As I was studying for my physics electrical exam, I found nodal analysis quite useful; however, I do not know how to apply nodal analysis to further simplify the following example:
Any help would be greatly appreciated.
AI: If you removed R3 you would get this: -
With 1 volt applied you get 0.5 volts on the points where R3 was removed. This means that whatever value of R3 was present there would be zero current through it. So, it boils down to analysing it without R3 and clearly it becomes a trivial problem.
|
H: Choosing toroid for FM dipole choke
After several failed attempts to buy simple rabbit ears for FM tuner I decided to make my own. Now, I have zero knowledge in RF circuits. While finding the formulas for pole length wasn't hard, I could not find much on toroid chokes. Or rather, I found too much of it.
So, I decided to look at manufacturer's datasheets (e.g. here) and found this: "43 Material is used for EMI/RFI suppression in the 20 MHz to 250 MHz range". Hurray! In another place: "Common ferrite types used for HF baluns are 43, 31 and 61". So I go to digikey and none of those materials there, even though there are thousands of toroids and dozens of core materials.
Question: What common ferrite materials are suitable for a choke with 3-4 turns of micro coax, for 88~108 MHz range?
UPDATE:
From the document reference kindly provided by @jonk it seems ferrite cores #31, #43 and #61 are indeed good fits for this application. Here are some examples from different (not Amidon) manufacturer:
FT82-43 RFI Suppression 5 - 500 MHz, 21.0 x 13.2 x 6.35 mm
FT82-61 RFI Suppression 20 - 500 MHz, 21.0 x 13.2 x 6.35 mm
UPDATE:
I removed images irrelevant to the question.
Also, there seems to be a confusion about my goal. Here is an explanation of what I am trying to do: from many different sources like this one it is recommended to have RF choke (also called feedline choke) added to coax cable to suppress signal pickup by coax braid. Since I am making antenna from scratch anyway, why not make it right, right?
AI: If you want to choose a ferrite material suitable for the application you MUST look at its complex permeability. This is material 43 (from Fair-rite): -
The picture tells you why it is classed as a good suppression material for frequencies of 20 MHz to 250 MHz - of importance is how the \$\mu ''s\$ graph peaks in this area and how the \$\mu 's\$ graph starts to fall. This means it is very lossy in the region above 10 MHz and is precisely what you want for a suppressor. But not what you really want for a balun at 100 MHz. Yeah it will be adequate but looking further afield at Fair-rite's other materials you can find material 68: -
Look at how the \$\mu ''s\$ graph is virtually zero in the FM band - it will make a superb balun.
So, in short, go to Fair-rite's web page and review "Inductive Materials" tab of the table presented: -
As you can see, material 68 is recommended for frequencies less than 400 MHz. If you chose the "suppression materials" tab you won't find material 68 but you will find material 43.
As to whether you can get these components is down to who you are prepared to deal with and whether you can get samples at a reasonable cost. In the past I've obtained freebies from Fair-rite and found them to be very amenable but there are other suppliers like Ferroxcube and Siemens who also make similar materials.
Don't expect sensible help from ebay!
|
H: Battery Tester Circuit with 3 LEDS
I'm designing a small system that uses an ATMEGA328P and a LoRa module that runs on 3.3V using a AAA 1.5V battery. The battery is connected to a Boost Converter which steps up the 1.5V to 3.3V to power the entire system. So obviously the whole system needs to have a low power consumption to save battery power. I want to attach a push button in the circuit that displays the battery level when pressed through LEDs.
The LED indicators are as follows.
Green LED - V_Bat > 1.4V
Yellow LED - 0.9V < V_Bat < 1.4V
Red LED - V_Bat < 0.9V
Here is the design of my circuit using the following components
Voltage Regulator - TPS61221DCKT
SCHOTTKY Diode - STPS1L30A
Analog Comparator - TSX393IYDT
XOR Logic Gates - 74AC86SC
Green LED - KP-2012LSGC
Orange LED - KPT-2012LVSECK-J4-PRV
Red LED - KPT-2012LVSECK-J3-PRV
simulate this circuit – Schematic created using CircuitLab
Here are my questions.
Will the circuit work?
Will the components I picked out worked? (I picked components that are all low power)
Are there any necessary resistors or passive components needed in the circuit to limit current anywhere?
In my voltage divider, how high can I set the resistors to reduce power consumption before it starts giving problem?
Any suggestions to improve the circuit?
Thanks for the help in advance and sorry for the many questions
AI: It looks good but there is a problem as spotted by @Bimpelrekkie above - the comparator inputs always have volts applied, which means they will draw current and may fail as you violate the max ratings at the input.
This modification should correct those problems:
simulate this circuit – Schematic created using CircuitLab
Now the circuit is completely isolated when the (double pole) switch is not pressed. The diode protects the comparator inputs, given that the two poles of the switch will not close at exactly the same time.
|
H: Reuse/distribution of signals
I have a newbie-question.
I have a design for a circuit, but before I design and order PCB and assemble it I'd like to double-check whether or not some assumptions are correct.
The circuit uses 3 signals to control some ICs; since most of them are to receive the same signal I simply wired those signals from the source to all ICs that need it. In this case the same 3-pin control signals are given to 8 ICs. Can this cause problems? Simply distributing the signal like that? If so, does it scale for more than this small example? If not, what would be the best way to distribute such a control signal among ICs?
Another question I have is that ICs designed to be bidirectional, can they be used in both directions on a circuit, if switched between these directions, in a live circuit, or should such ICs stay in one direction once in a circuit? Example; read in the values of a mux and then write to the same mux/demux.
AI: What you call "reuse" of signals is usually called fanout. Fanout refers to the number of circuit inputs that can be connected together and driven by a single circuit output. The maximum number of inputs that can be driven by a given output depends on many factors, including
current provided by output vs. current required by inputs
capacitance of inputs vs. required rise and fall times
length of signal lines vs. acceptable noise level
If necessary, buffers can be added to drive higher numbers of inputs.
Bidirectional signal lines are often switched in direction. The data lines in a USB cable are bidirectional, for example. The usual requirement is to design the entire circuit so that only one device is driving a particular signal line at any given instant in time.
|
H: Programmable Melody chips
Is there a component, (that is not Raspberry Pi or other mini computer it would be too costly for my purpose), comparable to simple melody chips like UM66 or BT66 But programmable in nature, so that I can use to play a MIDI music file on loop? Preferably suggest me a circuit diagram to do this with simple radio supply.
It would be a very simple circuit:
It would work like those music playing postcards, so there will be a switch, but nothing more complicated around it.
I have only base knowledge in electronics so my search for this wasn't successful. I need a component or circuit that does this. I could build it if needed, but I would prefer a ready to use component if exists.
AI: The comments gave me several keywords and resources to find the component I imagined. The Adafruit Audio FX Mini Sound Board does exactly what I want in my project. I can put a sound file (not midi, but its fine) on it. I can trigger it to loop the song. Thank you for the helpful comments.
|
H: So there was an ant that somehow got inside my screen. How do I remove it?
Wondering if it's possible to remove the LCD screen without damaging it.
I noticed there are six black metal thingys at the back of the module that is twisted up holding the LCD in-place, is it safe to untwist and remove it? What do I have to know before doing so? I assume that is how the ant got in there the first place.
AI: The black metal bezel around the LCD glass is what connects to those bent fingers. The bent fingers either capture the LCD circuit board in place from its edges or the fingers extend through slots in the LCD circuit board.
You can carefully bend the finger tabs straight and this will permit removal of the bezel. Once free the LCD glass will be able to be lifted away from the circuit board. You will see that it was sitting on zebra strip connectors that connect pads on the LCD circuit board to conductive surfaces along the edges of the LCD glass. Between the zebra strips and under the LCD glass you will find the back light unit if your display is one with backlight.
Use care to not get the zebra strip dirty and avoid getting finger oils in it as much as possible. When you reassemble note that the bezel piece is designed to provide some downward pressure on the LCD glass to enable good contact of the zebra strip to the glass and underlying circuit board.
Picture sourced from: www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwjGlu2QxPbbAhUOCnwKHRV4BAQQjxx6BAgBEAI&url=http%3A%2F%2Fwww.vatronix.com%2Fservices%2Fnotes-info-61.html&psig=AOvVaw3uOCKs92MiCM3sJZofjsmo&ust=1530281270685787 for attribution purposes. Note that my antivirus software alerted to a malware at that site so use link with caution. Actual picture is copy from Google image view summary.
When you re-assemble the unit if there are any LCD pixels that fail to display it will be an indication that the some debris got stuck on the surfaces of the zebra strip.
|
H: Cheap load cell and ADS1232 strange oscillation
I'm using four of these load cells wired in parallel and connected to an ADS1232. Overall the device (scale) is working well, but I am seeing a strange signal over a period of a few minutes after I turn the scale on. I have the ADS1232 hooked as in this schematic:
I have the ADS1232 wired to output 10 sps which go to a MCU that does a moving average over 32 samples (3.2 s window). When I start the scale and record the output from this filter I see the following signal (purple line):
I have seen the same signal a few times now. It seems to go away after appearing once on startup.
Does anyone have any ideas as to what could be causing this signal?
Edit: Here is the code for the moving average filter (N = 32 in this case). The Input method is passed a new sample every 0.1 s.
**
template<size_t N>
class MovingAverageFilter {
double samples_[N];
size_t write_;
double sum_;
double average_;
public:
/*initialize a filter with the necessary parameters*/
MovingAverageFilter(double init = 0)
: samples_{0}, write_(0), sum_(init * N), average_(init) {
Reset(init);
}
/*clear buffers*/
void Reset(double init = 0) {
for (auto &i : samples_) {
i = init;
}
sum_ = init * N;
average_ = init;
}
/*input a new value*/
double Input(double input) {
auto oldest = samples_[write_];
sum_ -= oldest;
sum_ += input;
samples_[write_] = input;
write_++;
write_ %= N;
average_ = sum_ / N;
return average_;
}
/*get the last output*/
double LastOutput() const {
return average_;
}
/*get the last input*/
double LastInput() const {
auto index = (write_ - 1) % N;
return samples_[index];
}
};
**
AI: This may very well be a thermal stabilization of the strain gauges in the load cells as the excitation gets applied. Since you have four devices in parallel there may even be a difference of stabilization characteristics between them that makes this problem more apparent.
I can suggest an experiment to help isolate if what I suggested above is true or not. Try leaving the excitation on to the load cell strain gauges all the time and then just turn on the electronics subsystem. If the problem does not re-occur then you know it is the load cells stabilization.
On the other hand you could run a second experiment where you leave the electronics powered all the time and then just switch on the load cell excitation. This will give you some additional data.
Lastly I would suggest running an experiment where you just run one load cell and see if you see the problem in this single condition. If a single unit behaves nicely then you know it is the parallel combination effect.
|
H: VHDL to RTL/schematic, not what I expect to see
I'm teaching myself VHDL (using Altera Quartus Prime Web Edition) so we can incoroprate a CPLD into a design. I've only been doing it a few days but so far the VHDL itself seems reasonably straightforward. I've learnt how to design entities and use multiple instances of them within a design as components, knit together different components within the VHDL and am pleased with my progress. In fact the hardest thing so far seems to be the simluaton/test bench stuff!
I thought it would be good to see if you could view your VHDL as a schematic to see whether what I have been writing looks like it should. So I Googled around and found references to an RTL viewer and worked out how to use it with some good Altera documentation. At first I thought it looked perfect. The high level view seemed spot on: the internal buses are connected to each component correctly, clock and clr go into the 4 bit registers, inputs go into a multiplxer and come out of the other side etc, exactly how you'd expect it look.
However, when you click on the plus sign to open up a particular component (I hope that is the right terminology using component as an instance of an entity), it looks nothing like how I'd expect.
The following code, for example:
library ieee;
use ieee.std_logic_1164.all;
-- Four bit eight way multiplexer. The eight four bit latches are fed into this and one of them is
-- selected depedning on the select line. This select line will automatically cycle through
-- and also control the eight column outputs.
entity four_bit_eight_way_multiplex is
port
(
sel : in std_logic_vector(2 downto 0);
IN1: in std_logic_vector(3 downto 0);
IN2: in std_logic_vector(3 downto 0);
IN3: in std_logic_vector(3 downto 0);
IN4: in std_logic_vector(3 downto 0);
IN5: in std_logic_vector(3 downto 0);
IN6: in std_logic_vector(3 downto 0);
IN7: in std_logic_vector(3 downto 0);
IN8: in std_logic_vector(3 downto 0);
O: out std_logic_vector(3 downto 0)
);
end four_bit_eight_way_multiplex;
architecture behaviour of four_bit_eight_way_multiplex is
begin
mult_process : process (sel,IN1,IN2,IN3,IN4,IN5,IN6,IN7,IN8)
begin
case sel is
when "000" => O <= IN1; -- sel = 0, number 1
when "001" => O <= IN2; -- 1
when "010" => O <= IN3;
when "011" => O <= IN4;
when "100" => O <= IN5; -- sel = 0, number 1
when "101" => O <= IN6; -- 1
when "110" => O <= IN7;
when "111" => O <= IN8;
when others => O <= IN1; -- Can never get here of course
end case;
end process mult_process;
end behaviour;
Gives the following RTL diagram:
This does not look like a four bit, eight way multiplexer. Well to me it doesn't. I even took a one bit, eight way multiplexer off a tutorial site and it gave a similar looking RTL schematic.
I would have expected something of this style. Please note, style, I realise this is a one bit, four way device.
So, can I not do what I thought I could? Is it possible, but in a completely different way? Should I be forgetting about doing this and just enusring the device works with good simulation?
I've also tried technology map viewers, but they don't seem right either.
I repeat, I've been doing this for just a few days and fully appreciate I might have some major misunderstandings here. Many thanks.
AI: Quartus is synthesizing a separate mux for each bit of your output vector. The eight inputs to each mux are bit \$N\$ from each of the eight inputs. The output of each mux is bit \$N\$ of the output. The use of buses and ripping individual signals from each bus can be a little confusing and hard to read.
|
H: Why does an SMPS use LCR on INPUT?
I have this 5 V output SMPS I bought a while ago. I was wondering why there are LCRs connected to the input of my SMPS. I don't understand why it's there.
BTW, I'm an electrical engineering student, and I know the basics of LCR, but I am not sure what it's doing here.
AI: The yellow thing is an X-capacitor, C11 in the above schematic. The resistor is to discharge said X-capacitor within legal requirements (usually 34 V within 1 second after unplugging), R14 in the schematic. L is an common mode choke, X3 in the schematic. They all form the EMI supression from the power supply to the mains, again within legal requirements.
Please see this old question for more information: X capacitor selection for SMPS power supply
|
H: Buck Converter Max Current
How do you work out the maximum current a buck converter can handle at different voltage outputs? The one I am looking at specifies :
300W 12A Adjustable CC CV Step Down Buck Converter 7-32V To 0.8-28V Power Supply
Non-isolated step-down module, constant current and constant voltage module (CC CV), charging module
Input voltage: 7-32V
Output voltage: 0.8-28V (continuously adjustable)
Output Current: 12A
For example, if I have a motor connected to the output and have the following configurations, what is the maximum current the converter can supply?
24v in, 12v out
24v in, 9v out
24v in, 6v out
I thought it would be the power over the output voltage, so in the first example, 300/12, but that is 25A, which seems far too high
I'm not sure how the specified 12A relates?
AI: The powers and currents quoted are maximums, the most restrictive applies. It may also be the case that the maximum quoted can only be achieved under certain other conditions, for instance a particular input voltage, or cooling.
They quote 12A output current. That's likely to be the current that the inductor can handle. It doesn't matter whether the output voltage is 0.8v or 28v, the output current will be limited to 12A.
For the three scenarios you ask about, the most restrictive limits are
12v out - 12A current limit
9v out - 12A current limit
6v out - 12A current limit
It's not until you get to above 25v output that the 300W power limit comes into play.
|
H: 20kHz PWM on Arduino
The datasheet of the ST VNH5050A-E H-bridge motor driver says it can take PWM up to 20kHz. Then, on page 10 of the datasheet, it says PWM = 20 kHz in the supply current parameter. Does this mean that the PWM frequency has to be 20kHz or, as it says in the description, it can be up to 20kHz?
Arduino Mega runs default PWM at 490Hz if I am not mistaken. I am trying to find a driver chip that can handle at least 30 amps with a load voltage of up to 12-18V for a motor.
I'm trying to figure out if this chip will work with the PWM on the Arduino Mega.
AI: The specification of 8mA supply current (maximum) is guaranteed at 20kHz and under the other conditions stated.
The PWM can be any frequency from 0 to 20kHz.
|
H: When Pin diode is no longer junction?
For p-i-n junction with intrinsic region d, I need to answer what happens when d is very large.
So from simple logic, I believe that at some point there will be no diffusion of charge carriers from p-type to n-type and reverse and I guess that these relate to diffusion length, but the diffusion length is more than 100 μm so that cannot be the reason.
Any idea?
AI: Consider that there isn't any truly perfect intrinsic material with perfectly balanced donor and acceptor impurities. Any real p-i-n junction is really either a \$p-p^--n\$ or \$p-n^--n\$ junction.
So if you make the i region too long you'll end up with effectively either a \$p-n^-\$ junction or a \$p^--n\$ junction that just happens to have a more heavily doped region away from the junction on the lower doped side.
|
H: Looking for a component that lets me choose where to draw power from
I would like to have a switch or box that allows me to plug a battery and wall power into the box, and then has a switch that chooses which power to use for the output.
The ideal inputs of the box are a 12v battery and 120v AC wall plug, and the ideal output is 12V DC out.
What is the electrical component/design that allows me to do this? Commercially available is an option!
AI: You need a 12V wall wart (AC-to-DC converter) and a SPDT switch.
|
H: Import step model into HFSS
I have a step file and I want to simulate it in HFSS but it seams that the structure it is not made with solids, but with attached sheets because when I import it in HFSS I cannot define materials and everything is under sheet.
Do you know a way to convert it in a 3D model to be able to simulate it? Either in HFSS or AutoCad
AI: I managed to find a way.
Once imported the .step file HFSS will give as model a group, therefore first I ungrupped. Then selecting the entire object, is possible to convert the 2D sheet model in a 3D model with Modeler -> Surface -> Create Object From Face. Then probably (at least this is what I had to do to simulate it) there will be some errors in the structure that need to be solved before launch the simulation. To do it Modeler -> Model Analysis ->then select Analyse Surface Mesh and if it give no error is possible to Validate the project and check if the 3D model has the green check, otherwise Analyse Objects choose the Check Level and try to heal the model (automatically or manual)
Thanks to everyone for the support anyway. Helped me to find the solution
|
H: Strange behaviour of ne555 + pmosfet circuit
I was a silent reader for a long time and could solve all the problems on my own, but this problem is really freaking me out.
I was messing around until 3 AM today with this "feature" and still don't know what is going on...
Initial Situation
There is a LED strip, that is blinking with 1.5 Hz (50% on time) and +12 V.
I have to create a circuit, that can be placed between voltage source and the LED strip that delays the blinking by a few hundred milliseconds. It does not have to stop blinking these hundred milliseconds later, delaying the on time is enough. Interrupting the ground connection is no option, because there are a few more more LED stripts that share the same ground potential.
My current circuit
Due to the fact that my LED strip is connected to ground and I have to delay the incoming +VCC signal, I think (am I right!?) the easiest way is to use a P channel MOSFET as high side switch. I know that I could use a N channel MOSFET with a bootstrap driver, but i read a lot of articles that say using a P channel MOSFET is just fine, if you don't care about the higher Rdson (I am switching ~200 mA, so i don't really care about Rdson). In addition my PCB space is limited and a DIP8 driver would not fit well (Whole pcb should be designed as through hole).
The gate signal for the MOSFET is coming from the output pin of a NE555, which threshold and trigger pin is connected between a resistor and a capacitor.
Problem
I have really strange things going on with my circuit. For test purposes, I connect a single LED with a resistor to VCC, to test the functionality, but I just cant get the expected result. First, my circuit was working a little bit, the led blinking was delayed for the expected time, but went on for a few milliseconds when +VCC was applied to the circuit. I think the reason for this is, that the MOSFET is conductive by default, and my NE555 needs a little time to turning the mosfet off.
The other, much stranger problem is that after a few blinking cycles the LED is on the whole time!? First, it is glowing just a bit but then starts flickering/changing its brightness...
I have attached my current circuit.
I would be so happy if somone could tell me what I messed up with this circuit design.
Or if there are much better solutions (maybe attiny13 as gate control!?) I would appreciate every recomendation.
Thank you in advance!!
And sorry for my bad english :X
AI: You should add a resistor from VCCIN to GNDIN to discharge the capacitor C2 more-or-less fully when power is removed.
It's been a long time since I've seen an NE555 let alone played with one, but check that the output pin is going close enough to the positive rail with your 11K pullup to VCC. If it doesn't get within 1.5 to 2V of the rail the MOSFET can slightly turn on. The CMOS versions do not have that problem, but the NE555 is the original bipolar design by Hans Camenzind (RIP).
|
H: Why is it recommended to not use a device while charging? How does it harm the battery or the device?
I was planning on getting the new VR headset from Oculus, dubbed Oculus GO.
The battery life of that thing is roughly 3 hours max. So, during long VR sessions, powering the headset via a power bank seems to be a great solution, but many people were against this method.
According to them, it is not recommended and it simply degrades the battery's life. So I have some few questions:
Q: Why is charging and using the device at the same time considered to be bad for the device?
Q: How is a battery affected by this method?
Q: Why haven't we developed a battery that can remain unaffected while using it during charging?
Q: What is the factor that gives a battery this demerit?
AI: It's nothing whatsoever to do with the battery.
The product manufacturer chose to design the charger/power supply circuit that way. Most cell phones, for example, can be used perfectly well while they are being charged from a cable or wirelessly.
The power supply is called upon to supply more current if it is called upon to charge the battery and run the device at the same time, so it might cost a bit more, be a bit more complex or be a bit larger. They made their choice, your options are to buy it or not, unless you have the skills to re-engineer it.
|
H: Solar powered water pump - need some advice
I am completely new to elecrical engineering, but I want to give it a shot and am really interested in learning more details about how all of it works. I've had an advanced physics course in high school, but that's about it, so please bear with me while I'm trying to get into it.
Now onto my "test project", which will be my first electrical engineering project after building a electromechanical motor in high school.
I want to create a battery powered water pump, which can be charged by a solar panel (think about it as a portable garden hose). My idea is that the solar panel charges the battery, and the battery powers the pump.
Here are my questions:
What special requirements do pump, battery and solar panel have? I
found a 12V 20000mAh battery, and a 12V solar panel. Also, I found a
water pump that needs 12V of power to work. Are there any more
requirements for the components to work as I want them to?
How do I switch the battery from charging to actually powering the hose? Can it do both?
How do I detect (and/or display) the current charge of the battery?
Thanks for your help! If I am missing anything, please let me know.
AI: There are two fundamental values you need to determine before much of anything else is possible:
How much energy the batteries have to be able to provide between charges.
How much power the pump needs when running.
Either way, you start with the electrical specs to the water pump. You seem to have already decided that you will use a 12 V pump. But, how much current does the pump draw when running?
This tells you two things. The current the battery has to be able to deliver regardless of how much energy it stores, and the rate of energy consumption when the pump is on.
Let's say for example that the pump draws 10 A at 12 V when running. That means your battery system must be able to supply 10 A. A car battery can certainly do that, for example. The power is (10 A)(12 V) = 120 W. Now you multiply that by the time you want the pump to be able to run with no sunlight until the battery is depleted. That yields the energy the battery must be able to store.
Let's say you use a car battery rated for 12 V and 50 A-h. The pump draws 10 A, so in theory, this battery can run the pump for 5 hours from a full charge. However, car batteries are damaged if run too low. I'd plan not to use more than half the capacity. You therefore would get 2.5 hours run time from a fully charged battery.
The solar panel needs to be sized according to how fast you want to be able to fully recharge the battery under whatever you consider your nominal or worst case conditions. This really up to you, but you also have to take local climate conditions into account.
Let's say, for example, that you want 6 hours of full sun to be able to fully charge the battery. We've already said that a drained battery is down by 25 A-h. There is some inefficiency in charging, so let's say the solar panel has to put out 35 A-h during the 6 hours of full sun. That means 5.8 A with full sun. The charging voltage of a typical "12 V" lead-acid battery is 13.6 V. The power into the battery is therefore 80 W. Figuring the power conversion circuitry between the panel and the battery is 80% efficient, so the solar panel output must be 100 W.
|
H: PCB Techniques for RF Circuits
Following this Linear Technology (Analog.com) Application Note AN47FA (1991), I found these kind of RF PCBs, among many others, very similar (fig.32 p.18 and Fig.F10 p.107).
(The images are in B&W because of some aestetics for the document.)
Putting aside that these are actually single copper plates, i.e. not PCBs strictly speaking, some of the criteria inferred from the document explanations are:
Shorten the output lead lengths,
Use a global ground plane,
Use a plate behind a connector as reflection plane.
But are these techniques actually standardized in more modern RF PCBs?
Which should be a more formal guideline for these techniques?
Are them somehow superseed by better components of PCB printing technology?
Or are these circuits build that way because in that time the PCBs were more expensive? I really doubt this last point, lab techniques for making PCBs were well known at that time, and the same document pointed the soldering made carelessly.
Thanks in advance,
AI: I have to disagree with the legendary Jim Williams (and Bob Pease, who also was known for this technique). These are, in my opinion, not RF circuits. This is a set of techniques to (try to) push the lumped-element model that many circuit designers use up to higher and higher frequencies.
Circuit design is generally done with our lumped-element design model - it is the way most of us get taught and most of us "think" - we have lumped components such as resistors, transistors, capacitors, etc... connected with connections that have no loss, delay, or inductance.
Of course, in practice, these connections do have loss (resistance), an inductance, capacitance, etc. The impact of these non-ideal interconnects become more and more of an issue at higher frequency (mainly the inductance part in this case). As a result, for ''high frequencies\$^1\$'' connections, the model breaks down and these non-ideal components have a significant impact on performance. To reduce this impact as much as possible, Williams' proposes to reduce the parasitic inductance as much as possible.
The key is that in ''real'' RF design, we stop thinking about these interconnects as idealized. Instead, we start thinking about impedance matching and modeling interconnects as transmission lines. Once we do, and we use these transmission lines, we no longer need to try and make the interconnects as short as possible to minimize their impact, as we include their impact from the start. This is why all RF design is (or at least should be) done using transmission lines and impedance matching.
The advantage of building a circuit as shown here is that it is fast. Just grab a piece of copper prototype board, solder stuff together and voila we have our prototype board to test with. I think in modern engineering this has changed, as devices have become smaller and smaller and now (at least in my line of work) we design a board to test with during the design phase - testing is a fundamental part of the design process. (if you cannot reliably and repeatedly test a design, you cannot sell it).
Note that even at RF we sometimes do still design without transmission lines but then we do need to very accurately model the interconnects to verify performance.
So to really answer your question, no, there is no standard guideline like this for RF design because this is not something that is done in much modern production RF design.
\$^1\$What is a ''high frequency'' is relative - to a analog designer doing low voltage, high precision measurements a few hundred MHz might be ''high frequency''. For millimeter-wave radar designers, a few GHz is still ''low frequency''.
|
H: VBIC Mextram Transistor Spice Models Parametrization
Under LTSpice, for the VBIC (level=4 or level=9) and MEXTRAM (level=504) Bipolar Transistor Options, as some people pointed me, I dont know how to simulate an e.g. 2N3904 under VBIC or MEXTRAM?
The single reference, suggested by Dietmar Warning (if he is the real) is in sourceforge.net from 2010.
IS the situation still the same?. Or there is a better reference?
AI: I did some BJT modelling previously, from which someone posted a link to the full document on the MEXTRAM model, and also the VBIC model paper may help you.
Here is my condensed advice: don't use the default models from LTspice, write your own .txt file that explicitly defines the parameters that you want.
Writing your own LTspice model
For example when I was trying to model a germanium BJT I defined a text file called bjtmod.txt, which contained only one line
.model IDEAL_GERM_NPN NPN(IS=1E-6, BF=120, BR=5)
You can see here first the statement is to define a .model, called IDEAL_GERM_NPN, which is an NPN BJT with parameters IS=1E-6, BF=120, BR=5.
To use this in LTspice you must place it in the same folder as the schematic you are working on. Including it to the schematic is done by writing a SPICE statement:
.include "bjtmod.txt"
To set your BJT to use this model make sure that the Value field is set to IDEAL_GERM_NPN.
You can then customize each parameter of the model, including avalanche terms. From the reference you provided:
.model 2n3904L4 NPN(level=4, rcx = 2.65711, rci = 0.0, rbx = 0.634251, rbi = 5.203349, re = 0.0001, is = 1.26532e-10, nf = 1.5, nr = 2.89609, fc = 0.512134, cje = 4.64214e-12, pe = 0.4, me = 0.256227, cjc = 3.015688e-12, cjep = 7.53922e-13, pc = 0.4, mc = 0.238109, cjcp = 0, ps = 0.75, ms = 0.5, ibei = 6.13333850374693e-13, nei = 1.5, iben = 2.30771e-09, nen = 3.31052, ibci = 6.13333850374693e-12, nci = 2.89609, ibcn = 2.30771e-09, ncn = 1.9876, vef = 566.483710419377, ver = 8.69028854282359, ikf = 0.0272221, ikr = 0.272221, tf = 4.19578e-10, xtf = 0.906167, vtf = 8.75418, itf = 0.0105823, tr = 6.82023e-08, td = 0, ea = 1.05, eaie = 1.05, eaic = 1.05, eane = 1.05, eanc = 1.05, xis = 1, xii = 0.9, xin = 0.668948, kfn = 0, afn = 1, avc1 = 0.02, avc2 = 110)
Lastly, don't get fixated on whether it resembles a real BJT. It won't. Some of these parameters vary hugely between devices. Extraction procedures are phenomenally complex, take that from someone who wrote one for only around 12 BJT parameters.
|
H: Move 7 segment display off board, how?
I bought a relay that has a 7 segment display on it.
It's placed "incorrectly" according to what I need so I want to move it off the board as simple as possible. (Because I'm not that good at this).
So lifting off the 7 segment I see this two rows of connections that I figure there might be a extension for.
Dream scenario would be a male part for this with a few inches of cable and then a female part again.
I understand that is probably not the case.
What are my options?
Do I have to unsolder the pins off the board and solder cables to each end of this row of pins?
It looks pretty hard to be honest.
AI: You've got machined pin socket on the board, you can buy a matching machined pin header, and piece of plated through matrix prototyping board and make a plug that fits that socket, and a socket that matches the pins on the LED display, then solder a piece of ribbon cable between them and plug it together.
I generally buy this stuff on Aliexpress (because price),
but here's some Sparkfun links,
machined pin header https://www.sparkfun.com/products/117
machined pin socket https://www.sparkfun.com/products/743
matrix proto board https://www.sparkfun.com/products/8808
ribbon cable https://www.sparkfun.com/products/10649
|
H: How much can I draw from the output of a flip flop?
I have a simple question. I'm looking at using http://www.ti.com/lit/ds/symlink/cd4013b.pdf for my project and I need to be able to draw ~500ma from the 'Q' or '!Q' pin on the flipflop. How much current can I draw? I looked at the datasheet and couldn't find that information.
AI: Take a look at page 6 of the datasheet. The values for different V_o are in the range < 3..4 mA. So you have to take a nmost or pmos switch!
simulate this circuit – Schematic created using CircuitLab
|
H: How to connect Multiple JTAG devices?
Currently I am working on FPGA design which uses trace32 to interact with jtag devices. Since there are more than once JTAG device in the design we are using parellel (not daisy chain) approach from JTAG controller to select a spefic device.
Are we doing it right? Or daisy chain is the recommended method for muitiple jtag devices design ?
AI: Unless something has changed in the last 15 or so years, one must connect the JTAG devices in serial (daisy chain). Like so:
AN134 from Silicon Laboratories, Page 1, dated 12/2003!
To program each device you will probably need to specify things like the following in your JTAG blaster software:
The number of devices before and after the target you wish to communicate with.
The number of bits in the IR registers of the devices before and after the target (The devices in the chain need not be the same chips, and may have different register widths).
I suppose it may be possible to connect devices in parallel, however, I think that you would need to add some multiplexing, and the appropriate control mechanism and lines.
|
H: Removing QFN Lead Frame From PCB
We have some PCBs that were designed to drive high-power ultrasound transducers. There was an issue with the boards early on that resulted in several of them blowing diodes.
I have since fixed the issue on the remaining boards and am trying to repair the dead boards to solder on some new diodes.
However I have run into an interesting issue that I have never seen before, which is that the lead frames of the QFN packages seem to have metallurgical bonded themselves to the PCBs. This is presumably because they are copper lead frames.
The board is 4-layer with 1oz copper and a large number of thermal vias - there is normally a large heat sink on the reverse side which I have removed it during the rework attempts.
Below is an example of a diode that I've tried to remove. To heat, I am using a hot plate (Weller WHP200) to bring the board up to ~150C and then a heat gun to bring the diode up to ~350C. However on all five diodes that I have attempted I seem to be only able to remove the package - the lead frame seems to be stuck fast. Even heating to ~400*C doesn't seem to allow it to budge.
I also have a 120W soldering iron to hand (Weller WXP120), and have tried it out as @Spehro suggested. However even leaving it on the copper slug for a good couple of minutes at 380*C (board hot enough that solder on the RS1 pad in the picture was wet), the slug won't budge.
Has anybody come across this issue before? Do you have any suggestions for how to remove the lead frame?
I don't mind experimenting on the boards as if they can't be fixed, they are scrap anyway. So if you have any ideas you'd like me to try, I'm all ears.
AI: The lead frame is basically just a solid chunk of copper, and in the process of trying to desolder it, I ended up just tinning the copper slug.
It dawned upon me that as it is copper an a decent heat conductor, I might as well just try to solder a new diode straight on top of the old lead frame.
A little bit crooked, but seems to have gone on OK. Managed to build up a bump of solder on the smaller pad to match the height of the copper slug. Then used the hot air gun and flux to get the solder to connect up nicely to the diode pads.
Doesn't really answer the question of how to remove the lead frame, but it does get me to the stage of having a diode reattached. Just need to power it up and give it a spin.
|
H: Can someone double check my resistor identification?
I have a resistor I need to replace. It is fairly large measuring 11mm long with 4mm diameter. All of the hobby resistors I have are 1/4 watt and make this thing look gigantic.
Do you think it is a 1 watt, or is there some larger value it could be?
I am also attempting to read the bands, and I see: Red Red Silver Gold. Which is a 0.22 Ohms 5%. Am I reading this correctly?
I was actually able to find the schematic for this power supply, and it is a .22 Ohm.
AI: 0.22 ohm sounds right - it's hard to tell from the pic if the silver band is actually a blue one (glare), but my guess is you have it correct.
Based on your size measurements, it could be either a half-watt or a one-watt. There are 2-watt and larger resistors but I don't think that's what you have.
|
H: LT3083 heat dissipation
I was looking through a datasheet for the LT3083 regulator and in the typical applications sections this caught my eye:
Provided input/output ratings could easily lead to over 20W being dissipated on the second regulator. I'm looking for some ballpark figures on the required heatsinking (i.e. size of the heatsink or perhaps active cooling requirements) to make this example work with the TO-220 package (3C/W junction-case thermal resistance).
AI: If you output 2A @ 5v with a 15v input, there's your 20W approximately. So no argument there.
If you can keep the case exactly at ambient (22c), then you're looking at an junction temperature of 82c. The max specified is 125c, although I will say that I would not want to run it exactly at that point.
Now lets set the max ambient temp where the device will not malfunction as 32c (~90f). So now we're at a minimum junction temp of 92c, leaving 33c of headroom. This means your heatsink will need to dissipate 20W at 33c above ambient, giving a maximum coefficient of 1.65C/W (33C/20W).
Now lets look at some heatsinks and see if we can get that.
A large pcb mount passive heatsink (2.5in x 1in x 1.65in) won't do it (2.6C/W):
https://www.digikey.com/product-detail/en/aavid-thermal-division-of-boyd-corporation/530002B02500G/HS380-ND/1216384
A little bit of airflow dramatically increases the efficiency. So if you look at heatsinks that come with an under-forced-airflow rating. You'll find many reasonable sized ones that can do it, for example this one:
https://www.digikey.com/product-detail/en/ohmite/RA-T2X-25E/RA-T2X-25E-ND/2416487
It's only 1in x 1in x 1.65in, and with forced air it has a temp coeficient of 1.5 degC/W
To do this with natural convection only, you'll need a huge heatsink like this one. In case the link breaks, it 5in x 5in x 1.5in: https://www.digikey.com/product-detail/en/wakefield-vette/394-2AB/345-1176-ND/4864910
And remember, these are only barely enough.
|
H: How to read pinout of this SPDT relay G8N-1F
Introduction:
The direction indicators of the car (Honda FR-V) are not working anymore. I managed to get the ICU (integrated control unit) out of the fuse box beneath the steering wheel. Hell of a job in such confined space. There are 2 relays of which I think 2 are for the direction indicators. Anyway. I suspect the relays are at the end of their life time (already after just 140,000 km on the car!!) and wish to replace them.
Question:
This is the datasheet.
The relays in question is an Omron G8N-1F.
How do I read this schematic? It is a SPDT relay. Which pins get connected when the operating voltage of 12Vdc is applied at what pin? Probably a newbie question. From what I read pin 4 and 1 are connected as normally closed. When current is running from pin 2 to 5, pin 1 gets connected to 3. Am I right? Thanks so much.
AI: Pins 2 and 5 are the coil. Pin 4 (also called Normally Closed, or NO) connects to pin 1 (known as the Wiper, W) when the coil is not energised. When it is, W connects to pin 3 (Normally Open, NO).
|
H: Can this circuit work as an UHF oscillator?
This circuit is intended to produce frequencies between 3Hz and 1.5GHz, given the response frequency of the P2N2222A, which is 350MHz.
Here's how I think this circuit works:
While the capacitor C6 is charging through Q1's base, the transistor is conductive; when the capacitor reach its fill of charge, current can no more flow from the base of the transistor Q1.
After Q1 is turned off, a momentary AC signal, which lasts for a fraction of a second, is induced in both capacitors C1, which is connected to the output, and C4, connected base of Q2. The signal from C1 goes right to the common output not, labeled Output, and that from C4 goes to the base of Q2, thus turning it on accordingly.
Q2 turns off, and the same process is repeated with C2 and C5.
Q3 turns on and off according to the signal from C5, and lastly, C3 dumps its output signal to common output.
This process can be made to repeat itself by means of the variable resistor R2, and hence the frequency can be controlled. the 100K resistor is there for the capacitor to discharge. the 1mF capacitors are intended to pass the AC signal with little, if no, impedance.
But my problem is with the 1µF cap, the 100K resistor, and the variable resistor placed between C6's negative and Q1's base.
Is my arrangement of those three afore mentioned components correct for the whole circuit to oscillate?
AI: No, the circuit will not oscillate at any frequency.
For one thing, Q2 and Q3 do absolutely nothing, because one end of C4 and C5 is connected directly to ground.
Q1 has negative feedback (R2, R3 and C6 connected from collector to base). In order to get oscillation, you need positive feedback at the frequency of interest.
Note also that C1, C2 and C3 are simply connected in parallel.
At UHF frequencies, parasitic effects (wire inductance, junction capacitance) matter A LOT. You would do well to study some existing UHF oscillator circuits before trying to come up with your own.
|
H: Ground Plane Net Tie - Question about current design
I am doing net-tie method to separate two different Ground Planes (for noise mitigation purpose), one ground plane is for RF circuitry and MCU, the other ground plane is for power and motor switching. I wonder if this is a good way of laying out net-tie
Here is the preview of the circuit, the net tie is laid at the top right hand corner, far away from power source. It stay on the top layer and I use via to tie to the ground planes that are mostly at the bottom layer.
Here is the closer look at the net
Please let me know if this method works.
Thanks.
AI: Yes that works if all you are doing is tieing the ground planes together. You are also creating an inductor with about 0.1nH and 7mΩ for the copper trace and roughly 0.3nH and 0.1mΩ for the vias on one side (for only three vias).
What doesn't make sens to me is why the vias are paralleled and then the trace is necked down to what I'd estimate somewhere in the range of 10 to 14mils. The resistance of the trace is much higher than the paralleled vias.
The other thing is your creating a long path for any return currents to get back to the processor by placing the net tie so far away from the other traces. The ground planes are separated with inductance and it doesn't look like you have a lot traces that crossover. If any of these are high speed (more than 20Mhz) the net tie will create problems.
Separating the ground planes with a net tie such as this creates a dipole antenna, which could create problems if you need to pass the limits of an FCC unintentional radiator (or equivalent) test.
If adding additional inductance and resistance between ground planes is what you intended then it looks good.
One recommended strategy (by Henery Ott) is to place zero ohm stitching resistors (maybe about every 2-3cm along the ground plane separation and see if removing them helps or hurts the situation, usually separated ground planes creates more EMI EMC problems then separating them solves. If your seeing your ground plane bounce from a high load, this can usually be solved by directing the return currents than separating ground planes. If you are moving power from one side of the ground plane to another, the net tie will create common mode noise problems, and you need a better way to stitch the grounds together.
|
H: How much current is drawn by an 18,600 BTU A/C compressor during free run?
I recently got an old hermetic A/C compressor. I plan to use this as a vacuum pump mostly for some of my hobby projects. The specs on the label on the A/C said that it power draw is 2450 Watts, 11.5Amps.
Does it mean that the current draw is 11.5 Amps always or is it only while there is some load on the compressor like while it is compressing some refrigerant or gas? Also I noticed that the compressor isn't very loud while its outside compared to when it was inside the A/C it was quite loud.
Also I heard that the compressor oil gets acidic while exposed to air. Is it true?
AI: It does mean that using the nominal load it draws 11.5 Amps.
If it is an air conditioner the load is 18600 BTU / hours, which is 5.6kW -> the thermal energy it can draw out.
However, when you use the motor don't drive it more than 11.5 Amps in long term.
The figure above shows a typical torque - motor speed diagram.
If you have no load, the motor speed will be higher, because only cooper, iron and friction losses determines the motor current. For higher load, the output power increase, resulting in a higher motor current (~ I_motor * V) and the motor speed decrease.
BTW:
So I would estimate, since it seems to be an older motor, that is draw ~2 Amps during free run. (efficency of 80%)
|
H: Problems with a non-inverting op amp configuration when input voltage is too low
I currently have a very simple op amp circuit for a non-inverting amplifier, using a UA741 with the gain set as 2. I have a sensor that outputs 0-2.3V and I'm attempting to amplify it up to 0-4.6V. The set up for the op amp is below.
The problem is that when I test this circuit under about 2.5V the amplified output voltage just sits at a steady 4V. Is this a problem with the chip, or is there something I need to do in the circuitry? I was going to try an LMV324 as well, but I would have to power it with a lower voltage which made testing the circuit more difficult.
Any insight is appreciated.
AI: To make an answer out of my comment:
The Datasheet of the 741 tells you that when operated from +-15 volts, your input must stay within +-12volts. That's 3 volts away from the rails. That holds true regardless of the voltage you are using. Since you are using +12V, and 0V, your input has to be between 3V and 9V. Your input signal is completely outside of the allowed input limits.
There are numerous reasons not to use the 741.
You have made a mistake in implementing a non-inverting amplifier. It should look like this (from here):
Do you see the difference? The feedback resistor goes from output to negative input. The other resistor goes from negative input to ground.
Ian Bland suggests the LM324 in a comment. The LM324 is indeed rated to 32V between rails. So, 0 and +32V or +-16V.
Importantly for your application, it includes 0V in its input range.
Operate it on 12V like you were trying to use the 741, and that should take care of your problem with input limitations.
Do note that the input range only goes to V+ (the positive rail) minus 1.5V. So, for your 12V operation the input is only allowed to be between 0 and 10.5V.
It also cannot get its output closer than about 2V to the positive rail.
The output also can't get closer to the lower rail than maybe 5mV.
The LM324 is a quad opamp - 14 pin package as opposed to the 8 pins of the 741, so it isn't a "drop in" replacement.
That's just about the relatively simple parts of it - about the limits of my knowledge, to be honest.
There are more things to be taken into account when picking an opamp.
Depending on how picky your sensor is, you may get to learn about those other factors the hard way. :)
It is usually better to give the parts designators. It is hard to discuss a circuit when every one has to say "that resistor over there, below that capacitor, to the left of the diode." Designators such as "R2" are much easier to refer to.
|
H: What is this component in the picture (brass and plastic)?
What is the component in the picture?
AI: Sprague trimmer capacitor, rotating-vane type. Max value maybe 65pF, maybe 100pF. Good for about 100V max.
|
H: 18650 cells - Unable to measure capacity
I got many 18650 batteries from notebook batteries and I want to test their capacity by my Turnigy Accucell 8.
My problem is, that when I start discharge program (0.5A what is from battery datasheet) it stops after 20mAh and battery have 2.75V. Battery recovers to 3.8V.
When I discharge slowly (0.1A) I get 1500-2000mAh what is right value.
Why this hapenning? How to discharge batteries faster? 0.1A is 10hours discharge time and I have 100 batteries to test...
AI: It basically means that your cell samples are at the end of life and have developed substantial internal impedance. Apparently your tester is an intelligent one, and cuts off the discharge process at 2.75 V (or it could be the cut-off from internal cell protection, doesn't matter). When you set the current at 500 mA, the cell drops its output below the cut-off threshold, and the tester times off the capacity at very low value.
When you load your cells with 100 mA, the internal voltage drop is smaller, and cells last longer before the threshold is reached.
You need to perform a simple load test. First, measure the no-load voltage first, say V1. Then connect something like R=20-Ohm resistor. And quickly measure the resulting voltage, say V2. Your current is V2/R, and the internal impedance would be R * (V1-V2)/V2. If the result is more than 0.2-0.4 Ohms, your batteries are no good. It looks like in your case the internal cell impedance is about 2 Ohms (~1V drop from 500 mA load).
I am afraid your batch of batteries is bad, and you need to dispose them.
|
H: How many times can an IC be desoldered and resoldered?
For a long time now, I had a fear, that when you solder a SMD IC to a PCB, that you won't be able to desolder and resolder it again without destroying it. Recently, I did just that, but it didnt damage the chip, so I feel a bit better. I used a hot air gun at my college. I did it because not all pins were soldered proper before.
Q:
What is the rule of thumb, how many times can I desolder and again solder the chip, to save the cost on testing?
Can it be infinite or will it start producing magic smoke after a while?
AI: The rule of thumb is 'assume a chip you've desoldered from a board is damaged, until you've proved otherwise'. In other words, don't solder an SMD IC down to test it.
There's a significant difference between automated SMD soldering, in a temperature controlled oven with a calibrated warm-up and cool-down profile, and eye-balling the melting of solder with a hot-air gun. With the latter, it's so easy to get it a few 10s of degrees too hot, or dwell there for a few seconds too long.
The junctions made in an IC, often by thermal diffusion, can also be unmade by over-diffusion. The damage an IC gets from over-temperature is cummulative. The amount of damage an IC gets is also exponentially related to the temperature. It's impossible to give you a figure for how many times you can heat it to above its (often recommended) 150C limit, without being very precise about the temperature.
Whether it 'works' is a poor indicator of how much damage you've done after one solder/desolder cycle. If you instead measure the input leakage current, power supply quiescent current, noise level, gains before and after the thermal abuse, then you'll have an idea of how much shift in parameters that cycle caused, and how many more cycles it can tolerate before the parameter shifts amount to 'not working'.
|
H: Relation between dash pot and spring in forces when extracting a transfer function
If a spring load some energy and use it for opposing other forces, and a dash pot has a friction, physically the both shouldn't have the same force-displacement equation ?
In most of dash pots, we could find an inner spring right ?
AI: A spring stores energy, a dashpot dissipates energy, so without going into any more detail than that, you know they must have different equations.
The spring delivers a force proportional to the displacement.
A dashpot delivers a force proportional to the velocity, or the rate of change of displacement. In most dashpots, you'll find a fluid being forced through a small orifice as the piston moves.
|
H: Wake me at 6 AM, respecting daylight savings and time-zone. Possible?
I'm an electronics noob.
I want to be woken up at 6 AM every morning (irrespective of daylight savings, irrespective of time-zone) by a device which has no visual display, no wires, and works forever.
How close is possible?
AI: Ok, this needs two parts:
A part that knows what "6am" means where you are in terms of counting ticks of some clock
A part that is good at generating ticks
The first part needs to know which time zone you're in. Since you define that your device mustn't have a user interface, that means your device must be able to determine its position to a degree sufficient for time zone determination.
Time zones are really ... effed up. So, either GPS or cellular phone service it is to locate itself.
Now, you sounded like you wanted this device to work for a long time, but mobile carrier company politics and cellular standards change, so GPS is probably the better choice to know your location.
Then, this first device also requires knowledge and understanding of time zones. Time zone data is actually relatively complex, so you'd probably be best of with something that runs a proper operating system, think of a smartphone processor or whatever powers your car's entertainment system. Feed the current time zone data, and pray politics doesn't change that! But you'd be out of luck – I recommend researching TZDATA and how often that changes because someone, somewhere, decided that the region they rule belongs to a different time zone, or changes when the DST switch happens, or whether there's a leap second or…
So, to be realistic, you'd need some kind of internet connection to download new time zone data. Darn! There goes our plan to just rely on GPS.
But now we've got something
with a proper processor running a proper OS
with internet connectivity
with GPS (for reasons given below)
without user interface
I don't know, but that sounds like "smartphone in a box" to me!
Why GPS:
We haven't talked about where the clock ticks come from, about the second device. Now, getting good oscillations is a problem as old as electronics, especially digital ones, and there's different solutions to it. Cheap wristwatches, USB gadgets or your average MP3 player use crystals, typically in accuracy regions of 10 to 25 ppm (parts per million). A year has about 31 million seconds, so a clock based on that might tick some 5 to 13 seconds wrong per year.
You can get that much lower by buying more expensive crystals and putting them in small temperature-controlled ovens – about 100 ppb are possible with that, so a factor of 50 better than your pure crystal, but over a clock lifetime of 50 years, still quite a few seconds.
Then, there's atomic clocks with single- and low two-digit ppb accuracies. Yeah. That's an expensive alarm clock that you're building there!
Well, luckily, you can use someone else's atomic clock (network): GPS is in fact a global clock-coordination system. The fact that you get location info is kind of a welcome side effect (at least to me as communications engineer, who very much relies on good clocks ;) ).
So, buy a GPS-disciplined clock. These are nearly as accurate as the atomic clocks controlling the GPS satellites, and only cost a couple hundred dollars.
About the no-wire part: everything needs power, so you better have some wireless charging coil in there, and an external wireless charger.
|
H: What kind of capacitor blew up in my old IBM monitor?
I pulled this out of an old IBM 5154 EGA monitor from the 80's. Clearly both are bad (though the monitor itself works anyway...). I know they're capacitors, but what kind? What would a replacement for these be?
I'm also curious about why the monitor would work despite two out of two of these things being in such terrible shape.
Edit: here is a picture of the top
AI: What you have there are metallized impregnated paper capacitors made by KEMET.
Here is a datasheet of the parts.
The most important thing you have to look for is the capacity rating which should be on the top of the capacitors, which we can't see in your picture (see page 9 of the datasheet).
With the added information, I'd say this is your replacement part: PME271MD6100MR30
This is a X1 rated capacitor, but X1 > X2 in terms of safety, so it should be fine. Actually - scrap that, Mouser links to the wrong datasheet.
Make sure to measure the distance between the legs, this one has 22.5mm which seemed to be the spacing on the old ones based on the information of the datasheet, but better measure that.
For a spacing of 20.3 mm, the PME271M610MR30 sounds right.
|
H: Some questions about a low frequency reed switch interface circuit
I need to wire this reed-switch rain-meter sensor to a counter input or to an isolated analog input channel of a data acquisition board. The sensor will be around 30 meters far away from the data acquisition board. The counter input has Schmitt trigger and below is the counter's properties:
The interface circuit I used at first yielded the following output to counter:
I basically poured a glass of water into the bucket(since there is no rain) and it seems like from the above plot the maximum frequency is around 3Hz. And the switching time is around 0.03 sec i.e 30ms. I used 4.7k resistor and 4.7u cap for low pass filtering for debouncing. I only used 1 meter of cable. In real it will be 30 meters.
But with this interface I'm not happy with couple of things: The first is the curvy rising edge and the second is I want the output to be voltage ON when the switch is ON. But above it is inverted.
So I decided to use the following circuit instead:
I didn't implement this in real but I have some questions regarding this:
1-) I don't know the contact bounce time of this switch and it is neither given in the data sheet:
Since I don't know this contact bounce period, I cannot decide about the LP filter R and C values. I know from experiment is that this switch when I pour water has around 3Hz frequency and the switch ON time is around min around 30ms from my MATLAB plot above. I also dont want too slow rising edges. What R C values can be optimum or fine for this interface?
2-) I came across some examples using the diode but I don't really know the purpose of that diode. What could be the reason it is used sometimes? Is there any fundamental mistake in the circuit?(If I don't use R4 it causes current spikes in simulation ect.)
edit:
I forgot to mention that the sampling rate for that MATLAB plot was 500Hz. But the counter input has like MHz level freq.
edit 2:
debouncing switch with 20 cycle 1ms debouncing:
this is tested with the suggested circuit:
C1 is increased to 2.2u:
AI: Conceptual Schematic and Timing
The following circuit, and similar, has been posted by me for other purposes. For your case, I didn't need to do much to it.
This is the basic concept, which I'll explain shortly:
simulate this circuit – Schematic created using CircuitLab
(Keep in mind that I intend on following your datasheet's recommendation at the end of my answer and add a series resistor to the reed switch line. But for now, I'd like to avoid discussing it and focus on the basic details.)
I like to use a BAV99 for \$D_1\$ and \$D_2\$. Single part, easy to get, cheap. But you can use any diode pair you want, I think. The most important of the two is \$D_2\$, through which charge on \$C_1\$ must go when the circuit resets itself. There is little harm I can see if you were to leave \$D_1\$ off the circuit, though. Still, I think it's a good idea to keep it, if possible.
\$R_4\$ is a pull-down. I'd keep it a lowish value to really help in resetting the circuit quickly. But its value is non-critical, too. So don't sweat the exact value much.
The critical timing parts are \$R_1\$ and \$C_1\$. I've set these for the ballpark of \$30\:\text{ms}\$. But feel free to adjust them to different values. The threshold voltage for \$M_1\$ needs to be low enough that the circuit will work, so you need to search for something in the area of around VTO of about \$2.0-2.5\:\text{V}\$ and as little gate capacitance as possible. The BSS145 might work okay, here. But again, this is just a matter of selecting an NFET with a low VTO and low overall capacitance. It doesn't need to have a super-low on-resistance, either. (It's only going to pull a drain current of about \$1\:\text{mA}\$.)
What Makes it Work
The basic concept is that when the reed closes, it pulls upward on \$C_1\$ and this pulls \$M_1\$'s gate on. Once \$M_1\$ goes on, it pulls base current out of \$Q_1\$ and \$Q_1\$ turns on sourcing current into \$R_4\$ which goes HIGH. There is a timing cycle that starts then, with \$C_1\$ slowly charging up through \$R_1\$. As that happens, this pushes downward on \$M_1\$'s gate and eventually shuts it off -- shutting off \$Q_1\$. At that moment, \$R_4\$ pulls down hard on \$C_1\$ (if the reed switch is open) forcing \$C_1\$ to dump its charge via \$D_2\$ into ground and mostly discharging itself, and sufficiently enough to reset the cycle. (A very slight additional drain of \$C_1\$ then takes place via \$R_1\$ and \$R_4\$ to squeeze out whatever remains.)
In effect, it debounces the reed switch for you. You can adjust the debounce period by adjusting \$C_1\$ and \$R_1\$.
There are simpler methods, but I think an active drive will be worth having.
Final Schematic
The datasheet recommends a series resistor of \$100\:\Omega\$ placed inside the box. I think that recommendation is a good one and that you should give serious consideration to the idea. If you do decide to include it, then the above circuit will still work fine.
I'll represent it in the schematic here below:
simulate this circuit
It's use shouldn't impair the conceptual schematic offered earlier. In fact, it significantly improves it by dramatically limiting the peak current through the reed switch.
So I'd recommend that you definitely include the new resistor, as indicated both in the datasheet and in the newly added schematic above, so as to help preserve the reed switch lifetime. Since this schematic actually uses a capacitor for timing and exposes the switch to the capacitor, it's more than just a good idea, now. You really should take the time to add it.
LTspice Validation Schematic
Here's the text. You will need to snap a copy of it and then save it as an .ASC file for LTspice to read up. I hope I didn't use some part you don't already have available in your LTspice incarnation.
Version 4
SHEET 1 1224 800
WIRE 400 -112 352 -112
WIRE 496 -112 400 -112
WIRE 304 -80 304 -112
WIRE 400 -80 400 -112
WIRE 496 -80 496 -112
WIRE 352 -64 352 -112
WIRE -288 16 -288 -64
WIRE 352 32 352 -16
WIRE 496 32 496 0
WIRE 496 32 352 32
WIRE 400 96 352 96
WIRE 496 96 400 96
WIRE 304 128 304 0
WIRE 400 128 400 96
WIRE 496 128 496 96
WIRE -288 144 -288 96
WIRE 352 144 352 96
WIRE -144 176 -144 112
WIRE 352 240 352 192
WIRE 496 240 496 208
WIRE 496 240 352 240
WIRE 32 256 32 112
WIRE 304 256 304 208
WIRE -144 304 -144 256
WIRE -32 304 -144 304
WIRE -144 352 -144 304
WIRE -288 368 -288 320
WIRE 32 384 32 352
WIRE 304 384 304 336
WIRE 304 384 32 384
WIRE 32 400 32 384
WIRE 304 416 304 384
WIRE 560 416 304 416
WIRE -288 496 -288 432
WIRE -224 496 -288 496
WIRE 32 496 32 464
WIRE 32 496 -224 496
WIRE -288 528 -288 496
WIRE -144 528 -144 432
WIRE 304 544 304 416
WIRE 32 560 32 496
WIRE -224 608 -224 496
WIRE -192 608 -224 608
WIRE -288 624 -288 592
WIRE -144 688 -144 624
WIRE 32 688 32 640
WIRE 304 688 304 624
FLAG -144 688 0
FLAG 32 688 0
FLAG -144 112 Vcc
FLAG 32 112 Vcc
FLAG 304 -112 Vcc
FLAG 304 688 0
FLAG 400 -80 0
FLAG -288 144 0
FLAG -288 -64 Vcc
FLAG -288 320 Vcc
FLAG -288 624 0
FLAG 400 128 0
FLAG 560 416 DEBOUNCED
SYMBOL pnp2 -32 352 M180
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL res -160 160 R0
SYMATTR InstName R1
SYMATTR Value 33k
SYMBOL res -160 336 R0
SYMATTR InstName R2
SYMATTR Value 2.2k
SYMBOL nmos -192 528 R0
SYMATTR InstName M1
SYMATTR Value BSS145
SYMBOL res 16 544 R0
SYMATTR InstName R3
SYMATTR Value 100k
SYMBOL cap 16 400 R0
SYMATTR InstName C1
SYMATTR Value 470n
SYMBOL res 288 528 R0
SYMATTR InstName R4
SYMATTR Value 220
SYMBOL sw 304 -96 M0
SYMATTR InstName S1
SYMATTR Value MS1
SYMBOL voltage 496 16 R180
WINDOW 0 24 104 Left 2
WINDOW 3 -471 7 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value PULSE(0 5 {t/30} 1u 1u {t/60} {t/30})
SYMBOL voltage -288 0 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V2
SYMATTR Value 5
SYMBOL sw 304 112 M0
SYMATTR InstName S2
SYMATTR Value MS1
SYMBOL voltage 496 224 R180
WINDOW 0 24 104 Left 2
WINDOW 3 -485 5 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V3
SYMATTR Value PULSE(0 5 {t/30} 1u 1u {t*0.7} {t*1.8})
SYMBOL res 288 240 R0
SYMATTR InstName R5
SYMATTR Value 100
SYMBOL diode -272 592 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D1
SYMATTR Value 1N4148
SYMBOL diode -272 432 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D2
SYMATTR Value 1N4148
TEXT -392 784 Left 2 !.model MS1 SW(Ron=.1 Roff=1000Meg Vt=2 Vh=0 Lser=10n Vser=.01)
TEXT -392 744 Left 2 !.tran {t*4}
TEXT -392 704 Left 2 !.param t={30m}
There are two different switches in series in that schematic. One of them is just a fast pulser, which is used to 'simulate' the bouncing effect of the reed. I'm sure it's not even close to the actual circumstance. But it is good enough, I think, to test the circuit. The other one "gates" this fast pulser, so that bursts of about \$20\:\text{ms}\$ of it passes through to the circuit.
See what you think.
Oh, and here's the model for the ZVN3310A you'd mentioned that I got from Diodes Inc.
.SUBCKT ZVN3310A 3 4 5
M1 3 2 5 5 MOD1
RG 4 2 356
RL 3 5 1E8
C1 2 5 21.5P
C2 3 2 2.5P
D1 5 3 DIODE1
.MODEL MOD1 NMOS VTO=1.736 RS=2.147 RD=1.682 IS=1E-15 KP=0.157
+CBD=25.5P PB=1
.MODEL DIODE1 D IS=6.12E-13 RS=.629
.ENDS ZVN3310A
Seems okay. But yes, it does distinctly increase the timing. Easily adjusted back, of course.
|
H: What should be the voltage divider resisor values in units?
I'm trying to build a circuit that lights up a LED when a battery connected to it is full charged. I found LM358 lying around so I plan to use it as a comparator. I want a 3.7v using a voltage divider, I don't mind if it's less or more a little. I already have some 470ohm resistors. so the other resistor I want is around 165ohms and the standard value resistor is 160ohms and I will get around 3.73v across the 470ohm resistor.
What I wanted to know is how do I choose the resistor values in ohms or kohms, or in mohms? since there are 47k and 16k I also can use them right? but what is the drawback? I know that a comparator/op-amp use a little bit current in its inputs, so what should I be care about choosing the resistor values?
Is there something in the LM358 datasheet that it can help to choose me the values between ohms,kohms,mohms ?
LM358 Datasheet
AI: Figure 1. The LM358 input bias current parameter.
The input bias current tells you the current that will be supplied by the input pins. (See Figure 16 to understand that the chip will source current due to the PNP input transistors.) It is 100 nA. (I cropped a couple of columns from the data table so the units are missing.)
As with all designs you have a trade-off to consider for your voltage divider. Lower value resistors will make the bias current less of a problem. Higher value resistors will waste less power and this might be critical for a battery-powered application.
If faced with the problem I would consider the following two options:
Set the voltage divider current to 100 times that of the bias current so that the divider should be within about 1% of calculated value. That would be 10 µA in this case and for a 5 V supply would give a total divider chain resistance of \$ R = \frac {V}{I} = \frac {5}{10µ} = 0.5 \ \text M\Omega \$. Any values less that this would improve the situation.
Assume the typical value of 45 µA and correct the divider to allow for this.
|
H: Running 12V PC Fan with 9V Battery
i got an old PC fan which according to its label runs at 12V drawing 0.14Amps.
I would like to run this with a 9V Battery so that it doesnt go too fast.
Does this make sense?
How long would the fan run approximately with a typical 9V PP3 sized battery?
edit: another question is, how much amp will the fan draw when powered with 9V ?
AI: Yes, you can do it, but the battery won't last very long.
It will probably run at about 3/4 the speed and draw about 3/4 the current (rough estimate) so around 100mA.
Looking at a typical datasheet for an alkaline 9V battery, we can see the capacity will be perhaps 350mAh (down to 4.8V) so it might work for 3-5 hours, as the current will drop as the battery discharges.
If you were to step up the battery voltage so it was 9V continously, the operating time would probably be less than 3 hours.
|
H: Powering 5W generator with A23
Can I use a small 12V A23 battery to power this negative ion generator?
Will it burn or will it last for long?
AI: Will it burn or will it last for long?
Probably neither, look at the Wikipedia page on the 12 V A23 battery.
Note how this battery consists of many small coin cells in series.
Coin cells cannot deliver much current, they're quite small.
5 W at 12 V that's 12 / 5 = 416 mA, that's too much for almost any coin cell.
Scroll down on the Wikipedia page, under the external links there is a link to an Energizer A23 battery. Note how the Capacity is shown for discharge currents of 2 to 15 mA. Hmm, that's around 30 times less current than what you would need for 5 W.
There's also a thing called internal resistance. This internal resistance is related to the size of a battery, small batteries have high internal resistance and that means they cannot deliver a high current.
Conclusion: A23 batteries simply aren't suitable to deliver 5 W. You should use eight AA cells in series instead, they can easily manage 416 mA.
|
H: Node method to resolve a simple circuit, I’m stuck here
So keep in mind that I’m a beginner, this is a secondary exam in my university and i just started with exercises so be kind with me :)
I can’t figure out what happened in that step.
It seems like they used some parallel resistor transformation but really don’t know how.
AI: Make use of the Norton theorem!
BTW: The question seems to have an fault, since J_2 is given, but not shown in the circuit diagram.
simulate this circuit – Schematic created using CircuitLab
It's much easier!
Regarding your step
The matrix is
$$ \mathbf{Y} \cdot \mathbf{V} = \mathbf{J}\, .$$
To get V, you have to invert the Y matrix:
$$ \mathbf{Y}^{-1} \mathbf{Y} \cdot \mathbf{V} = \mathbf{Y}^{-1} \mathbf{J} \\
\mathbf{V} = \mathbf{Y}^{-1} \mathbf{J} \, . $$
|
H: FPGA double buffer strategy
I am working on a FPGA project where a host CPU writes a 10,240 x 16-bit look up table into FPGA logic. To implement this, I've utilized on-chip memory to store the values and read them out when ready.
An external trigger/go pulse kicks off a processing cycle which lasts several hundred thousand clock cycles. Once we get this trigger, the state of the 10,240x16 LUT needs to be frozen or latched, so it can be utilized during the processing cycle. Unfortunately, the data needs to be available fairly soon after this "GO" pulse, so there is not enough time to do a complete buffer copy.
The host also needs to be able to continually update some values of the look up table while the current cycle is being executed, in order to setup for the next processing cycle. To allow for both cases (latching the state of the lookup table, but also letting the host update it whenever), I think that double-buffering ping/pong style is the way to go: The host writes to one buffer until we get to "GO" command, then the host writes to the other. The FPGA logic always reads out of the buffer not being written to.
However, since the host is not rewriting all 10,240x16 values when it does its sporadic updates, the buffer that is not being written to is essentially "dropping" the updates while it's frozen.
Is there a novel way to handle this scenario? I'm thinking there needs to be some kind of buffer resynchronization process once the buffer is unfrozen.
AI: One possible strategy could be to use stale bits. Dunno if that's standard terminology, but it's similar to a dirty bit. Writing a new entry will clear the corresponding stale bit in the unlocked buffer and set the bit in the locked buffer. After switching buffers, have an internal copy routine transfer every entry marked stale in the unlocked buffer from the locked buffer to the unlocked buffer. In this way, new data written while the copy is in progress will not be overwritten, and all the old updates should be retained. The only thing you need to do is ensure that there is enough time for the copy operation to complete between buffer switches, or you need some sort of optimization to keep track of which entries are stale so you don't have to iterate over all of them, making the copy operation faster.
Another possible strategy could be to store the updated entries while a single buffer is locked, then apply only those updates when it is unlocked. If only a handful of entries are updated, then this might be more efficient. The updates could be stored as a linked list or similar data structure so that the list can be traversed efficiently while multiple updates to the same location can be coalesced.
|
H: Detect 230VAC or 12VDC in the same pin
I'm designing an input interface for a microcontroller (uC). Want to detect signals (only want to know if there is voltage or not) of different typology, so you can have in the same input to the board:
0-12 VDC
0-24 VDC
0-230 VAC (Vpp)
Between the uC and the input (as it can be AC), i would like to use an optocoupler. On the other side of the optocoupler there will be the auxiliary circuits to adapt the signal to TTL to the uC.
The following schematic is the design of the interface between the input signal and the optocoupler led. The 230V AC on the Schematic represents the signal (in this case is 230VAC, but it must work with 12VDC too). There will be 12 input interfaces to detect voltage and operate 12 digital inputs on the uC side.
The common of the 12 different signals will be grouped by 4 signals (each 4 signals will share the ground. So, for example, you will be able to connect 230VAC signals in a group of 4 inputs, 4 signals of 48VDC on another group, etc.
The design I have developed needs op-amp, so I need to supply it with another power supply to keep it independent from the power supply on the uC side. That means too much components (op-amp, isolated power supplies for each group...).
The diode on the bottom line avoids the reverse current of the AC source to going into the output drain of the op-amp.
The values and exact parts to use are not defined completely, it's more a conceptual design than a final design.
The uC will be programmed to identify pulsing signal of the AC signals (because in the design below, it will only pass half of the sine waveform), and take it as Voltage AC detected.
simulate this circuit – Schematic created using CircuitLab
(the red point is the led of the optocoupler).
So here my question:
Is there any way to do this interface to the optocoupler, using only passive components? (taking into account the different voltage sources... from 5VDC to 230VAC).
If my design makes no sense, please, forget it, what I really want is to know if there is any possible combination of passive components that will allow to detect voltage on such wide possible values.
UPDATE
After days reading and checking information, taking into account all answers here. I declined to do an universal AC/DC detector due to complexity (and consecuently, cost of the components). What I will do is to implement an standard input to covers DC, and depending on the final user necesities (AC or DC), I will add to the input a capacitor for limiting current.
Thanks to Transistor and everybody for helping me.
AI: There are many problems with your design.
You are using an op-amp for an application that requires a comparator.
You have no reference between your power supply and any ground in the rest of the circuit. This means that ...
There is no return path for the LED current. You are expecting the amplifier to provide current from the positive supply but there is no return path from the LED cathode to the power supply.
"The diode on the bottom line avoids the reverse current of the AC source to going into the output drain of the op-amp." It might provide some protection on one half-wave of the AC but will not on the other. You will have full mains voltage between the non-inverting input and the bottom of R2.
D1 / R1 don't do anything.
One of the most common applications for digital signal isolation is industrial PLCs. None of the major manufacturers offer a universal input type of the type that you are trying to design. The usual offerings are AC 120/240 V or DC 24 V with AC/DC options sometimes. If it was a realistic option then someone would be selling it by now.
I suggest that to do what you want you are going to need two inputs for each channel - one low-voltage DC and one mains AC.
simulate this circuit – Schematic created using CircuitLab
Figure 2. Probably what you were trying to draw.
The circuit of Figure 2 might work for you but doesn't solve your power-supply problem.
A comparator is used rather than an op-amp.
R1 / D1 now clamp the input voltage between -0.7 V and +5.1 V.
The switching threshold is set at 2.5 V by R2 and R3.
Everything is properly ground-referenced and the opto-LED current can make it back to the PSU.
|
H: Is it safe to rebuild my laptop battery pack?
this is my first question on this website, so please excuse me if I did not follow the guidelines correctly.
I have an Alienware 17 R1 (2014) and have been looking into rebuilding its laptop battery that has been dead for a while now. I have read up quite a bit into battery chemistries etc., but I would appreciate advice from the experts here regarding my little project.
I am a computer enthusiast, but rebuilding a battery pack is something I have never done before. My laptop battery uses a 4S 2P configuration of 18650 cells for a total of 14.8V and 5.6A. I want to replace these cells with higher capacity ones, but am unsure of what cells to buy (unprotected or protected), and if directly soldering onto these cells is really a good idea. What I am worried about the most, however, is if this modification will result in a battery that is unsafe and might result in my house burning down.
One last question that I feel is relevant to this topic. I was also thinking about replacing the optical drive bay of my laptop with more 18650 cells for more battery life, I read about another guy doing this in this forum: https://www.overclock.net/forum/158-laptops-netbooks/1528118-guide-tutorial-upgrading-your-laptop-s-battery-life-without-wasting-existing-battery-capacity.html. I was wondering if I can do the same safely. I know for a fact that the batteries will fit (took the measurements).
Please feel free to inform me of any equipment that you feel I should have when building the battery. I already have a list, but I am open to more advice and suggestions.
Thank you so much for your time and advice, I will select the best answer in a week.
AI: As Tom Carpenter commented, "Just buy a new one. It's not worth the effort."
First, you need to get unprotected cells, because the local individual protection circuitry will interfere with balanced charger built into the "smart laptop battery".
Second, you will need a welder to connect new cells, reliable soldering would require either a low-temperature alloy, or careful temperature control, not to overheat cells. Unprotected cells need some care to handle, to avoid accidental shorts. You might need to deeply discharge the cells before handling-assembling them.
Third, and most important, you will need to match the cells that go to paraller (2P) connections to 1-2% in terms of internal impedance and capacity. Without matching the 2P sections will wear itself down rather quickly, in 50-100 cycles, and die. When the smart batteries are assembled by manufacturer, their factory has thousands of cells to select proper matches using special testers. You don't have this luxury.
"Just buy a new one. It's not worth the effort."
|
H: REF02 not working - 4 channel 5v DAC circuit, star gnd connection, stripboard layout
I've connected my circuit as in the diagram, with a 15V PSU powering it (both amps are connected the same way) - but the DAC seems to be drawing too much current for the REF02 to handle, even though p.24 of the DAC datasheet describes using it in this config. What have I done wrong?
Many thanks for your help
DAC8555
REF02
LM358
AI: According to your circuit, you have +15 volts (presumably coming from some type of power supply) connected directly to Vin of the REF02. You say you measure only 0.35 volts at Vin. Obviously, something is wrong here. You need to check that the +15 volts is present at the board and then check the wiring to Vin of the REF02 which means both the Vin wiring and the GND wiring. If the REF02 is working outside the board then it is not loading the +15 volts. Something else is going on.
|
H: Question about AC and DC on a RC circuit
Suppose a simple RC circuit, R and C in series with a voltage source and an open switch. The capacitor is discharged.
The power supply is AC, sinusoid with amplitude 10 V and a frequency of 50Hz.
So, the power supply is
10 Sin(100πt)
The resistor is 100Ω and the capacitor is 1F.
I turn the switch on at t=0.
What is the current at t=0.05 seconds?
As far as I see the current on the circuit is ruled by this formula:
so,
i(t) = (10 Sin(100πt)/100) e^(-0.05/100)
therefore, plugging t
i(t) = 27.05 mA
Now let use Ohm's law:
The circuit's impedance, Z is equal to
Z = R -j/wC
Z = 100 - j(2π)
Z = 100 - 2πj
so i = v/z
i = (10 Sin(100πt))/(100 -2πj)
i = 2.7/(100 -2πj)
How are these two values equal?
I was expecting to get the same values for both methods of calculation.
What am I missing?
AI: I assume the schematic is this one:
simulate this circuit – Schematic created using CircuitLab
The KCL is:
$$\frac{V_{\text{x}\left(t\right)}}{R_1}+C_1\:\frac{\text{d}\,V_{\text{x}\left(t\right)}}{\text{d} t}=\frac{V_{\text{1}\left(t\right)}}{R_1}$$
Both \$V_x\$ and \$V_1\$ are functions of time, with \$V_1\left(t\right)=V_\text{PK}\cdot\operatorname{sin}\left(\omega\: t\right)=10\cdot\operatorname{sin}\left(100\pi\: t\right)\$.
In standard form for first order linear differential equations, as used by first year calculus students to solve such equations, the above becomes:
$$\frac{\text{d}\,V_{\text{x}\left(t\right)}}{\text{d} t}+\frac{1}{R_1\:C_1}\:V_{\text{x}\left(t\right)}=\frac{V_{\text{1}\left(t\right)}}{R_1\:C_1}$$
Setting \$\tau=R_1\:C_1\$, the integrating factor is \$e^{\:t / \tau}\$ and so,
$$\begin{align*}
\frac{\text{d}}{\text{d} t}\:\left(V_{\text{x}\left(t\right)}\:e^{\:t / \tau}\right)&=\frac{V_{\text{1}\left(t\right)}}{\tau}\:e^{\:t / \tau}\\\\
V_{\text{x}\left(t\right)}\:e^{\:t / \tau}&=\int \frac{V_{\text{1}\left(t\right)}}{\tau}\:e^{\:t / \tau}\:\text{d} t\\\\
V_{\text{x}\left(t\right)}&=e^{\:-t / \tau}\int \frac{V_{\text{1}\left(t\right)}}{\tau}\:e^{\:t / \tau}\:\text{d} t
\end{align*}$$
Taking into account the initial condition that \$V_x\left(t=0\right)=0\:\text{V}\$ (in order to solve for the constant of integration, above):
$$\begin{align*}V_{\text{x}\left(t\right)}&=V_\text{PK}\cdot\frac{\omega\:\tau\left[e^{\:-t/\tau}-\operatorname{cos}\left(\omega\: t\right)\right]+\operatorname{sin}\left(\omega\: t\right)}{1+\omega^2\: \tau^2}\\\\&=V_\text{PK}\cdot\left[\frac{\omega\:\tau}{1+\omega^2\:\tau^2}\cdot e^{\:-t/\tau}+\frac{\operatorname{sin}\left(\omega\:t+\operatorname{tan}^{-1}\left(-\omega\:\tau\right)\right)}{\sqrt{1+\omega^2\:\tau^2}}\right]\end{align*}$$
From here, with \$V_\text{PK}=10\:\text{V}\$ and \$\omega=100\:\pi\:\frac{\text{rad}}{\text{s}}\$ and \$\tau=100\:\text{s}\$ and using \$I_{\left(t\right)}=\frac{V_{\text{1}\left(t\right)}-V_{\text{x}\left(t\right)}}{R_1}\$ at \$t=50\:\text{ms}\$. I get a value of \$-6.365\:\mu\text{A}\$.
Running a Spice deck:
v1 n001 0 sine(0 10 50)
r1 n001 vx 100
c1 vx 0 1
.tran 0 50m 0 10n uic
.meas TRAN CURRENT FIND I(R1) WHEN time=50m CROSS=1
.end
Spice reports:
current: i(r1)=-6.36461e-006 at 0.05
I think that means I probably didn't mess up on the equation solution.
|
H: Is there a material that conducts heat well and has a very high melting point, but is also an insulator?
A lot of insulating materials are also non-metallic, which typically don't have a high specific heat. However, I am interested in experimenting with insulators that conduct heat as well as metal, but impede currents just as effectively as typical insulators. Does such a material exist?
Glass for instance can act as an insulating material, but it has a pretty high specific heat. On the other hand, rubber often has a lower specific heat, but it will melt rather easily. Copper has a low specific heat and a high melting point, but, it conducts electricity very well. You can see there is some challenge in figuring this out without explicit experience with such a material.
The temperature range is high, which when you talk about electrical components that can tolerate high heat means it's at least high enough enough to burn your skin. Since I am concerned with melting points in materials like rubber, glass and different metals, the range is least a few hundred degrees (either ºC or ºF) to 2000 degrees, depending on the actual impedance of the material. However, it should be publicly viable for experimentation, the highest possible grade material like diamond is not necessary.
AI: Diamond, BeO and AlN are useful heat transfer materials with
negligible electrical conductivity. There's nothing perfect, however,
and diamond is expensive, BeO is associated with toxic
dusts at manufacturing time, and AlN is a modern material few people
are familiar with.
Aluminum's thermal conductivity is a little over 200 watts per
meter x Kelvin (W/K-m), while diamond is 900-2320 W/K-m.
BeO is 330 W/K-m, and AlN is 285 W/K-m.
|
H: Inside a library of common functions (Instruction Set ----> High Level Program) is there information of how many clock cycles they use?
I am a Mathematical Person. So thinking from that perspective.
To make my question slightly more concrete. I was thinking of controlling a hobby servo through a Uart serial data stream.
I am inventing numbers for the purpose of communicating the idea.
CONTEXT:
Suppose a servo needs to be refreshed at 100 Hz and needs a resolution of 1 degree.
So this implies that the serial communications needs to send DATA (101101000) 9 bits wide. (I realize there is overhead KEEPING IT SIMPLE ATM).
@ 100Hz. Therefore 900 bits per second transfer rate.
Given that a servo is controlled by a PWM signal. And In the case of an arduino with 16Mhz clock.
That serial transfer will consume a percentage of the Time, leaving the remainder to produce the PWM signal for controlling the servo.
MAIN QUESTION:
How do I in general find "given the Library nature of programming languages" the number of low level instructions used for particular function or routine. So I can see If I have enough time to fit in in this case. The PWM signal between data transfer.
AI: In general any library written in C is probably not going to have information on how many clock cycles it takes to execute a function. The reason is that it depends on your compiler optimization settings, and which compiler you use.
Usually you can only tell from source code how long something is going to take if you are looking at assembly language. And only then by looking up the timing for each instruction in the datasheet.
I believe that the Arduino boards use the Atmel AVR processors. In that case you can use Atmel Studio to simulate the code for any library function. The simulator will count the elapsed time of the simulation.
Just put a breakpoint before and after the code you want to time. Run the code to the first breakpoint and record the time. Then run to the second breakpoint and check the time. The difference in those two times is what you want to measure.
The serial reception and the PWM generation actually run in parallel without CPU involvement because your chip probably has dedicated hardware for both of those functions. The CPU is only required to adjust the PWM duty cycle if it needs to change, and to take a character once the receive buffer is full.
Also with respect to the 9 bits, if your UART supports a 9 bit word then your total number of bits is 9 data bits plus a start and stop bit so 11 bits per value. If your UART only supports 8 bits then you are forced to send two bytes, for a total of 20 bit times if you include the start and stop bits.
Note that the time it will take to send a byte can be roughly determined without simulation just based on the baud rate. For example a 9600 bps rate will take (10 bits)/(9600 bits per second) = 1.04ms per byte (when sending with 8-data bits, 1 start bit, 1 stop bit). Since you only need to update once every 10ms, even 9600 bps (which is pretty slow) would be more than sufficient.
|
H: Digital Audio Effects Design
I've recently graduated university with an MEng degree in Electrical and Electronic Engineering. As a third year project, I've used an ST-Microelectronics ARM Cortex-M4 based Nucleo microcontroller board as the basis of a programmable guitar pedal.
I would like to begin designing my own pedals as a hobby, starting with digital effects. To do this, I'm putting together my own 'evaluation' board for prototyping with the following core components:
ADC
Anti-aliasing filter
Microcontroller
Memory
DAC
Re-construction filter
Peripherals (jack connectors, buttons, toggle switches, I2C display etc.)
I would like to keep my designs professional and relatively low cost
(below £100 to prototype).
To produce a device of high quality, I've thought about the following specification:
Sample Rate: 96kHz
This allows maximum frequency of 48kHz to be captured. As the upper limit of human hearing is around 20kHz, this should provide oversampling for greater fidelity.
This also sets the requirements for pre/post filtering, a higher frequency sample rate will also result in simpler filter design.
ADC / DAC Bit depth: 24-bit
Greater bit depth will allow for higher quality (16-bit produces 96dB dynamic range, whereas 24-bit provides 144dB). As there was not much difference in price using an external DAC will increase the dynamic range over the MCU internal DAC / ADC.
Memory requirements 512kB SRAM:
At 96kHz / 24-bit, 1 second of audio requires 96 * 1000 * (24/8) = 288kB therefore 512kB should be suitable, if memory for delay style effects is needed.
As I'm relatively new to this field, I wanted to ask what Microprocessors, ADCs, DACs, Memory would be recommended and does my design approach seem suitable?
So far I've selected the following:
MCU: DSPIC33FJ32GP202-I/SP
ADC: NXP UDA1361TS/N1
DAC: NXP UDA1334ATS/N2
MEMORY: AS6C4008-55PIN
Any advice appreciated.
AI: If you have experience with an ARM Cortex M4 based toolchain, I highly, highly recommend sticking with that. An ST M4F based part with a decent amount of memory, should do everything you need, and is way better than trying to fool around with some new toolchain on a part with less support and libraries.
I'd look at different ADCs and DACs. Those are end of life, so support will probably suck for them. Really, don't worry about 24bit. It's very difficult to get the analog design good enough to get 16bits worth of real information, so 24bit is just going to have you bogged down processing noise.
If you get an M4F with 1MB of on-board memory, you may not need to bother with external memory. I did an audio spectrum analyzer on an M4F with 512k of memory, and it was more than enough to do overlapping 2048bit FFTs at 48KHz.
|
H: Are there any commercially available PLC's that can compile/ download programs through an API?
My team has decided to use a PLC for controlling an industrial process that requires simple, real-time IO to external devices with minimal processing. However, we expect the exact outputs needed to vary between runs (in fact, a given run will very rarely ever be repeated), and the operator will not have any PLC/ software programming experience.
While I can't disclose the actual product, the best analogy would be that we're designing an industrial smoothie maker, with PLC controlling precisely the opening and closing of different valves in real-time. The operator will use our software to design a custom sequence of additions of different reagents and the on/ off of relevant heavy machinery (e.g., an industrial mixer).
Here's the challenge: our current approach is to write our own compiler that translates the instructions that the operator gives (open valve A for 10 ms, open valve B for 20 ms) into ladder logic and PLC machine code. We would then directly download our self-compiled program to the PLC via serial. All of this would need to be automated so that the operator only needs to click a button after coming up with his sequence of steps.
However, despite my research, I have not found a single PLC vendor that both 1) has a compiler with API or publishes enough information about their PLC machine code to allow one to write a compiler, 2) supports direct downloading of programs to the PLC without use of the vendor's programming software (CX-programmer, Atmel studio, etc.).
I'm led to believe we might be taking the wrong approach, or at least don't know what product to look for. The i/o is simple enough to not justify the building of our own board, but the functionality we're looking for, namely PLC interaction with high level PC software, doesn't seem to be available.
Ideally, we'd like to download the entire program to the PLC at once and not be sending instructions one at a time. Execution of all instructions on the PLC (or whatever device we end up using) needs to be real time.
Are there any commercially available PLC's that support compiling and downloading of machine code, such that the entire process could be automated by a larger program? Is there any other way to download a real-time program to a PLC written by PC software written in a high level language?
AI: You can definetely use a PLC for this. Except, you don't want to change the PLC code for each "smoothie recipe".
You should write a PLC application that reads recipes from any source, like sd cards, network storage, internal storage or even QR codes if you're feeling fancy.
Often PLC's already have a feature for this, where a recipe is a set of parameters you can load (and edit with the HMI).
real-time IO to external devices with minimal processing
Whatever you choose to use, do not invent your own PLC. It's probably not worth the time. And don't think the software or additional module is expensive, you are not able write it for that price.
|
H: 12 V car battery short circuit with a wrench that has resistance of 0.5 ohms, how much current?
ANSWER/ERROR FOUND: resistance of the leads of the multi-meter is the culprit. The true resistance of the wrench cannot be measured using a basic multimeter.
The resistance of the wrench is more so roughly around 0.000016 ohms.
I searched quite a number of websites for an answer, but no joy as yet..(for this specific question).
If a car battery is short circuited with a wrench that has 0.5 ohms resistance, then theoretically using Ohm's law the current = V/R = 12.65 volts / 0.5 ohms = 25.3 amperes.
Many people (even on this site here) claim that 100's to 1000's of amperes will flow through the wrench and weld it to the terminals.
How is that possible when only max 25.3 amperes can theoretically flow through that wrench of 0.5 ohms using 12.65 volts?
NB: I measured the resistance of the wrench using a home "basic" use multimeter and it shows that best resistance of the wrench is 0.5 ohms. I hope that I measured this correctly. :)
AI: A wrench does not have a resistance of 0.5 ohms, it's way lower.
Your basic multimeter cannot measure resistances to better than an ohm or so, the resistance of leads, and the unreliability of contact resistance make it impossible.
The way resistances as low as a wrench are measured is to use a 4-terminal Kelvin method. What you do here is to pass a current through the sample using two terminals, then measure the voltage across the sample using a different pair of terminals. With a wrench, if you used perhaps 1A from end to end, you would see a few mV or so voltage drop.
Let's put some numbers on your wrench. I don't like looking up resistivity, the large factors of 10 cause me concern whether I'm going to get them right on the back of an envelope, so I remember just one fact. A 1m length of 1mm\$^2\$ copper wire is about 17mohm, and then work from there.
Let's assume your wrench is 250mm long, and has a 10mm x 5mm shaft. It's 1/4 of 1m long, and 50mm\$^2\$, so is 1/200th of the resistance of my 1m x 1mm\$^2\$ wire. If it was made of copper, it would have a resistance of 17mohm/200, which is roughly 100μohm. But it's not copper, it's steel, and probably an alloy. After a quick rush around Wikipedia, let's assume it's 50x more resistive than copper, so has a resistance of about 5mohm.
12v dropped across 5mohm would give a current of 2400A. The CCA of the battery is way below that, so the wrench is not limiting the current, the battery is.
Contact resistance is a further complication. In the case of a battery shorted by a wrench, there's likely to be a plasma arc between the contacts, which can have a very low resistance indeed. The small contact area is also worth considering, though as that region is very short, it's often insignificant compared to the length of the conductor.
In practical terms the true resistance of the wrench is close to zero.The battery will deliver the maximum instantaneous current that can be extracted from its cells, which will be way lower than any calculations you make. The net effect is that the wrench will become essentially a fuse: it will burn through at its narrowest point. I have seen it happen to a crescent spanner, and it is spectacular, as it blew the head clean off. Fortunately, the person who did it was not hurt, but it was very dangerous and he was very lucky. It may well also explode the battery, particularly if the spanner is big enough to sustain the current for a little longer.
DO NOT RISK DOING THIS, IT MAY WELL KILL YOU OR AT LEAST GIVE YOU SEVERE ACID BURN DAMAGE. In short, don't be an idiot.
|
H: What glue used here?
What glue is it? Is it safe for attaching?
AI: Its probably an RTV Silicone like Silastic. It comes in various forms but RTV Silicone is the generic name.
|
H: Bode magnitude computation
Consider the following transfer function
$$
G(s)=\frac{1\times 10^6\, s}{s+1}
$$
If I evaluate the dB magnitude analytically at frequency 0.1 rad/s, we have
$$
\text{Mag. at 0.1 rad/s} = 20\, \log \frac{1\times 10^5}{1.1} \simeq 99 \, \text{dB}
$$
and dB magnitude analytically at frequency 1 rad/s, we have
$$
\text{Mag. at 1 rad/s} = 20\, \log \frac{1\times 10^6}{2} \simeq 114 \, \text{dB}
$$
If we start at 0.1 rad/s with a 99 dB we can say that at 1 decade later i.e. 1 rad/s we will get about 119 dB due to the zero term. But we are getting 114 dB with the analytical calculation. Why about 6 dB down from 119 or 120 dB and not just 3 dB down to reach about 117 dB?
The actual dB magnitude plot is below:
My question would be why I am getting 114 dB with the analytical calculation. This value seems too low.
AI: The amplitude of the bode-plot is found by traversing the imaginary axis, or
$$s = j\omega$$
So the formula for the amplitude should actually be
$$A_{dB} = 20\cdot \log_{10} \left(\left| \frac{10^6\cdot j\omega}{j\omega + 1} \right| \right)$$
For \$\omega = 0.1\$ and \$\omega=1\$:
$$A_{dB}(0.1) = 20\cdot \log_{10}\left( \frac{10^6\cdot 0.1}{\sqrt{0.1^2 + 1^2}} \right) = 99.96\ dB$$
$$A_{dB}(1) = 20\cdot \log_{10}\left( \frac{10^6\cdot 1}{\sqrt{1^2+1^2}} \right) = 116.99\ dB$$
The 20dB/decade or 6dB/octave "rule" only holds asymptotically. The closer you get to the corner frequency, the worse the approximation is. In your case, that corner frequency is at \$\omega_c = 1\$, so the approximation will be at its worst.
The corner frequency is also the point where these asymptotes intersect. This is the point where the imaginary part of the denominator (\$j\omega + 1\$) starts to dominate over the real part, or \$|j\omega| = |1|\$, which is the case for \$A_{dB}(1)\$. You end up dividing by \$\sqrt{2}\$, which is approximately 3dB.
|
H: Low pass filter with two capacitors?
I'm trying to drive a speaker from an ESP8266 for a project, and found an article suggesting (ab)using I2S as a 1-bit Pulse Density Modulation DAC. Apparently that's pretty noisy, so the article gives the following circuit diagram for the low pass filter:
If I'm reading Wikipedia right, the 1KΩ resistor and 10nF capacitor to ground are a first order RC filter cutting off 16KHz. What does the 10µF polarised capacitor do?
AI: The first RC does indeed act as a low pass filter.
The second capacitor (the one on the right), combined with the load impedance presented by whatever is connected to the audio out, acts as a high pass filter.
Together, these two filters act as a band pass filter.
|
H: Switch a line level audio signal - which chip is best WRT noise, low loss?
I am relatively unexperienced with audio circuits, and need to switch a standard line level signal, AC, about 6Vpp. I have the chips listed below, and would very much appreciate some pointers as to which would be best - I only need to switch stereo between 2-4 paths, and could use relays if they didn’t consume so much power compared to these. It’s important to keep noise away from the audio, so I am considering switching the chips with optocouplers from arduino pins, likely the PC817. Would this be best practice, or just a waste of space on my board?
CD4053BE
CD4012BE
CD4013BE
CD4066BE
MC14015BCP
HCF4072BE
HCF4002BE
TC4015BP
And on the very off chance I can use this, I’ll also list
74HC4051N
If there’s something that’s not clear, let me know. I have all the relevant datasheets, but most of these claim to be low-noise or noise-free. Which is the best for this? Thanks!
AI: HC4051 is ideal if you use +-5V and clip or attenuate line signal to same otherwise latchup fault will occur.
Search for modern HV (supply) variations of this .
CD4053B supports +/-10Vdc. Perhaps like most CD series.
Although higher resistance CD4051 can run off +/-8V or 16Vdc, or similar but Ac coupled from in and output biased to Vdd/2 on in/out.
Line impedance standard is 10k load
But noise EMC is all about wiring , layout, shielding and conducted/radiated PS noise and Common Mode impedance noise reduction, ground paths and has nothing to do with chip.
|
H: geiger tube dc power supply
I have one of these HV dc converters and I was wondering if I can use it to supply a small Russian SMB21 Geiger muller tube. What other parts would I need to add not to fry the GM tube? Keep in mind I would also like to add a nice Arduino nano and display and turn it into a simple Geiger counter.
The step up dc dc converter is a EMCO A series A04P
AI: This site is an excellent reference in everything geiger-countery you might ask. There's a nice schematic which shows the complete circuit, including the power supply and the detection parts:
In general you just need a Mohm-range resistor to limit the current through the tube, and a few transistors/resistors (the "impulse detection" part).
After that it's just simple arduino code (attach interrupt, etc.)
|
H: Most efficient way to drive an LED from 9v source?
I have a circuit that I am powering from a 9v battery. I bought little 3mm flat LEDs and I want to use one for a power indicator, but don't want to use a voltage divider that will consume too much power. The rated voltage is 3.2-3.4v and it came with a current limiting resistor of 430 ohms.
What would be the optimum method of reducing the voltage and limiting current such that I minimize power drain? I'm assuming it will be a voltage divider and/or a voltage divider, but what would be the optimum values?
(Update to question) Is it possible to use a single large resistor in series with the LED to both reduce the 9v down to 3.3v and provide the required current limiting function?
AI: A voltage divider will waste power, as it will have current flowing through the lower resistor, as well as through the LED.
The 430 Ohm resistor will allow about 12 mA through the LED. A higher value series resistor will reduce the LED current, and decrease the brightness. You may find that a 1K or higher resistor will still allow the LED to produce sufficient light.
|
H: What are TX and RX relative to?
I have been working with a device that uses RS232 communication to a PC. There has been some confusion as they have defined their TX and RX pins relative to the device. In their definitions they use to mean TX being the pin that sends data from the device. In my mind this should be labeled RX because it is the pin the computer receives on.
How should the pins be defined? Are they relative to each device or relative to the "controller"?
AI: It might be easier to understand, if we quickly review how the RS-232 standard was originally used.
Note: All pin numbers below refer to the original 25-pin D connector; the numbering changed on the 9-pin connector used on later PCs.
Background
DTE = Data Terminal Equipment - in the old days, this would usually be a terminal or a printer, or equipment emulating those.
DCE = Data Communications Equipment - in the old days, this would usually be a modem or other WAN interface.
Pin 2 on the original 25-pin D connector (described in the standard as "Transmitted Data", "Circuit BA", "V24. number 103") should be data from the DTE to the DCE.
Pin 3 on the original 25-pin D connector (described in the standard as "Received Data", "Circuit BB", "V24. number 104") should be data from the DCE to the DTE.
This meant that the cable linking a terminal and a modem was "straight through" - pin 2 on a terminal (DTE) at one end of the cable where data originated, was connected to pin 2 on a modem (or similar) at the other end of the cable (DCE) where that data was received. The modem then sent that data out using the communications link, to whatever equipment was on the other end of that link.
Pin 3 "Received Data" was the data signal in the opposite direction - transmitted by the modem (DCE) on pin 3, and received by the terminal (DTE) on pin 3.
Therefore you can see that the labelling of what was Transmitted and what was Received, was from the point of view of the DTE (i.e. the terminal). This all made sense when the typical connections were between a DCE and a DTE.
However the pieces of equipment we are using these days (even when they don't use RS-232 and are instead using a TTL or other voltage UART protocol interface) are usually all effectively DTE (with one exception being modems). Connecting pin 2 (which is an output) on one piece of DTE, to pin 2 (another output) on another piece of equipment configured as DTE, makes no sense (and when using logic level signals, could even cause hardware damage). This is where the use of "crossed" or "null modem" (i.e. no modem) cables comes in.
Your question
I have been working with a device that uses RS232 communication to a PC. There has been some confusion as they have defined their TX and RX pins relative to the device. In their definitions they use to mean TX being the pin that sends data from the device. In my mind this should be labeled RX because it is the pin the computer receives on.
How should the pins be defined? Are they relative to each device or relative to the "controller"?
From the above background info, you can see that their labelling is correct if their device is acting as DTE (which most are, unless it's a modem or other WAN interface). On a piece of DTE, the pin labelled "Transmitted Data" (pin 2 on the 25 pin connector) does send data. (And, as explained above, on a piece of DCE (e.g. a modem) the pin known as "Transmitted Data" (pin 2 on its 25 pin connector) is actually an input, which receives the signal from the DTE.)
The PC's serial port will also be configured as DTE (unless it has a very unusual serial port - that won't apply here, as you would know if it did apply).
Therefore you are connecting DTE device (this device you've mentioned) to DTE device (the PC) i.e. there is no DCE in "RS-232 terminology, i.e. no modem, and the "null modem" or "crossed" RS-232 wiring will be needed. Whichever pin is RS-232 "Transmitted Data" (probably the one you mention they have labelled as TX) on this DTE device, which will be an output, will need to be connected to the RS-232 "Received Data" pin on your PC (also a DTE device), which is an input (and obviously vice versa for data transfer in the other direction).
Although this doesn't seem to apply to you, I'll just add: To make life more complicated, some manufacturers try to "help" by effectively labelling their DTE equipment as if it was a piece of DCE. They mark their data input pin as Tx so that user just connects "Tx" from the external device (which, if it's DTE, will be the data output from there) to the pin marked "Tx" on their equipment (which they know is an input). Thereby allowing them to say "just connect Tx on your device to Tx on our equipment". They think they are trying to help, but such labelling often just adds to the confusion.
As Dan Mills mentioned in a comment, many of us who grew up with RS-232, spent happy hours having to connect various equipment with slightly different RS-232 implementations, using the "breakout boxes" which he described. These breakout boxes have LEDs, which show which signals are being actively driven (this quickly allows you to see if the equipment is configured as DTE or DCE: Is pin 2 driven on that equipment? Yes = it's DTE) and have places where short jumper cables can be used to link the various connector pins.
|
H: What type of headphone connector is this?
I got a pair of Onkyo headphones as a gift a while ago, and now one of the connectors on the cable broke (the red one in the picture).
What type of cable connector is this? Searching the Onkyo website and amazon didn't get me anywhere. What do I look for to find a replacement regardless of the manufacturer?
AI: Searching for a format specification starting with the manufacturer of the product:
From the vendor you mentioned
Onkyo is offering the ES-HF300 with a 6N oxygen-free copper cable encased in clear elastomer, providing almost perfect conductivity while keeping touch noise to a minimum. Gold-plated MMCX connectors and mini-stereo plug reflect the highest build standards.
A quick read that might explain more about the format and its history reveals an industry specification:
From wikipedia
They conform to the European CECC 22000 specification.
Using a search engine with the connector format and the device type produces many potential matches for the device in question (MMCX connector and headphones):
From some vendor, this appears to be an example of a viable replacement (by visual inspection).
That should get you going.
|
H: Can somebody explain how this circuit works?
I have the following circuit implemented in the control of a thyristor. I know the basic functionality of the circuit, but i need a complete description of every component.
Thank you!
AI: This circuit is used to provide an isolated power supply, its used for protecting a load from undesired rush current.
PWM is used for switching purposes, fast switching rate result in increase and decrease of electrical current through the primary winding of the transformer making a magnetic field. this magnetic field is transferred back to electrical current through the secondary winding of the transformer.
RB2 A base resistor provides the necessary resistance to bias the base junction of a bipolar junction transistor (BJT)
Q2 a NPN bipolar junction transistor (BJT), is a semiconductor device which can be used for switching or amplification. You can read a book about BJTs and their applications!
D8 is called a Schottky diode and its used due to its fast switching response and low forward voltage drop. A normal diode will have a voltage drop between 0.6 to 1.7 volts, while a Schottky diode voltage drop is usually between 0.15 and 0.45 volts.
Rosc2 current limiting resistor and osc refers to the oscillation of PWM
78253/55 its a type of transformer that transfers electrical power from a power source to some equipment or device, and is used for isolation. This type of isolation is called galvanic isolation.
DR2 Is a diode and used to allow current to pass current in a one way direction.
C is a capacitor and is used to smooth the output voltage and eliminate voltage ripples.
Dz2 is Zener Diode and is used as a voltage regulator.
Rp3 A resistor is connected in parallel to a load in a circuit for both safety and to have maximum power delivered to the load.
|
H: Capacitor not charging?
I am yet another software developer trying to step into the world of electronics... (so sorry for the basic questions...)
I am trying to understand how a capacitor works, but obviously I am missing a crucial part from all the helpful websites like sparkfun and adafruit.
I failed to solve an issue I currently have in a pretty basic project that reads a temperature from a thermocouple and displays the value on an LCD. An electrical engineer at work pointed me in the direction of adding a capacitor to filter the noise I introduce when I touch the thermocouple. Long story short; the capacitor doesn't seem to charge, no matter how I add the capacitor to the circuit, almost no voltage comes out; ever.
So I thought to be smart, and make a new circuit of:
a battery supply (9.6V)
an LED
a capacitor "104"
The circuit is simple, all components are in series, so I expected that my LED would light up, and when I disconnect the battery, the LED would fade out. But again... nothing happens. The LED never lights up, and my multi meter measures 0.8V after the capacitor. But also, when I hold the multimeter probes to the leg of the capacitor, the measured voltage drops from 0.8V to close to zero in no time.
Please forgive me if this drawing is wrong (and please do tell me what is wrong so that I can learn from it):
Why doesn't the capacitor charge up to the voltage of 9V (but seem to stop charging at 0.8V?)?
Why does it discharge when I measure the voltage with a multi meter?
PS: there is no resistor between in the circuit limiting the current, and the batteries are 8x 1.2V rechargeables = 9.6V
AI: Your circuit should look like this:
simulate this circuit – Schematic created using CircuitLab
Also, if the value of your capacitor is small, when you disconnect the power source, the led might go out very quickly. Are you sure your capacitor is 104F?
edit: as G36 points out, you probably meant it was marked 104, which means 100nF (except for with aluminium capacitors). To see any afterglow, you'll probably need at least 1000uF
|
H: Oscilloscope had weird interaction with Laptop
Can someone explain to me why the below situation happened? Thanks.
I tried 'debugging' a circuit. The circuit was a H bridge, and I wa using it to sent current through human body to induce feelings.
I say 'debugging' because the circuit was actually functioning correctly, however the oscilloscope was not getting the correct wave displayed, therefore I tried debugging the circuit. After some period of time, my friend came by and told me you can try unplugging your laptop's power and I did as he said. MAGICALLY! The Oscilloscope started to show the correct wave form.
We both have no idea why. I am guessing it has something to do with the grounding of the circuit.
Here is the block diagram of the circuit.
EDIT. The oscilloscope is connected to the cathode and anode of the H bridge to see output.
AI: On most scopes the "ground" of the input is tied to the scopes chassis and to mains ground.
Laptops are typically floating but only at low frequencies. I just measured my lenovo power brick and got the following readings (rounded to the nearest nf as the measurements didn't seem stable beyond that.
Mains earth <-> output 0.585uF
Mains earth <-> input 2nF
input <-> output 2nF
Assuming your laptops power brick is similar to mine with the latop plugged in every time your H bridge switches it has to charge about 0.5uF of capacitance.
Depending on the voltage, frequency and the current driving capacity of your H bridge this could take non-negligable time. For example if your voltage is 100V and your circuit can deliver 1A then it would take 50uS to charge the capacitance. If your H bridge is switching at 10kHz then it will take pretty much a complete half-cycle to charge/discharge this capacitance.
Unplugging the laptop's power brick substantially reduces the capacitance between the laptop and mains earth.
|
H: getting outputs in simulation as all high impedance. topic: restoring algorithm for binary division
I am getting outputs of my hardware as all high impedance (ZZZZZ). i tried synthesizing the code and got these warnings. I think there might be a problem in the test bench i am trying to run.
source div_restoring.tcl -notrace
Command: synth_design -top div_restoring -part xc7z010clg400-3
Starting synth_design
Attempting to get a license for feature 'Synthesis' and/or device 'xc7z010'
INFO: [Common 17-349] Got license for feature 'Synthesis' and/or device 'xc7z010'
INFO: Launching helper process for spawning children vivado processes
INFO: Helper process launched with PID 8248
---------------------------------------------------------------------------------
Starting Synthesize : Time (s): cpu = 00:00:02 ; elapsed = 00:00:02 . Memory (MB): peak = 357.441 ; gain = 99.344
---------------------------------------------------------------------------------
INFO: [Synth 8-6157] synthesizing module 'div_restoring' [C:/Users/ERis/LAB_THREE/LAB_THREE.srcs/sources_1/new/div_restoring.v:24]
WARNING: [Synth 8-5788] Register reg_q_reg in module div_restoring is has both Set and reset with same priority. This may cause simulation mismatches. Consider rewriting code [C:/Users/ERis/LAB_THREE/LAB_THREE.srcs/sources_1/new/div_restoring.v:38]
WARNING: [Synth 8-5788] Register reg_b_reg in module div_restoring is has both Set and reset with same priority. This may cause simulation mismatches. Consider rewriting code [C:/Users/ERis/LAB_THREE/LAB_THREE.srcs/sources_1/new/div_restoring.v:38]
WARNING: [Synth 8-5788] Register reg_r_reg in module div_restoring is has both Set and reset with same priority. This may cause simulation mismatches. Consider rewriting code [C:/Users/ERis/LAB_THREE/LAB_THREE.srcs/sources_1/new/div_restoring.v:38]
WARNING: [Synth 8-5788] Register count_reg in module div_restoring is has both Set and reset with same priority. This may cause simulation mismatches. Consider rewriting code [C:/Users/ERis/LAB_THREE/LAB_THREE.srcs/sources_1/new/div_restoring.v:60]
INFO: [Synth 8-6155] done synthesizing module 'div_restoring' (1#1) [C:/Users/ERis/LAB_THREE/LAB_THREE.srcs/sources_1/new/div_restoring.v:24]
---------------------------------------------------------------------------------
Finished Synthesize : Time (s): cpu = 00:00:03 ; elapsed = 00:00:03 . Memory (MB): peak = 411.883 ; gain = 153.785
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished Constraint Validation : Time (s): cpu = 00:00:03 ; elapsed = 00:00:04 . Memory (MB): peak = 411.883 ; gain = 153.785
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Start Loading Part and Timing Information
---------------------------------------------------------------------------------
Loading part: xc7z010clg400-3
---------------------------------------------------------------------------------
Finished Loading Part and Timing Information : Time (s): cpu = 00:00:03 ; elapsed = 00:00:04 . Memory (MB): peak = 411.883 ; gain = 153.785
---------------------------------------------------------------------------------
INFO: [Device 21-403] Loading part xc7z010clg400-3
INFO: [Synth 8-5546] ROM "busy" won't be mapped to RAM because it is too sparse
---------------------------------------------------------------------------------
Finished RTL Optimization Phase 2 : Time (s): cpu = 00:00:03 ; elapsed = 00:00:04 . Memory (MB): peak = 411.883 ; gain = 153.785
---------------------------------------------------------------------------------
Report RTL Partitions:
+-+--------------+------------+----------+
| |RTL Partition |Replication |Instances |
+-+--------------+------------+----------+
+-+--------------+------------+----------+
No constraint files found.
---------------------------------------------------------------------------------
Start RTL Component Statistics
---------------------------------------------------------------------------------
Detailed RTL Component Info :
+---Adders :
3 Input 17 Bit Adders := 1
2 Input 5 Bit Adders := 1
+---Registers :
32 Bit Registers := 1
16 Bit Registers := 2
5 Bit Registers := 1
1 Bit Registers := 2
+---Muxes :
2 Input 32 Bit Muxes := 1
2 Input 16 Bit Muxes := 2
2 Input 5 Bit Muxes := 1
2 Input 1 Bit Muxes := 3
---------------------------------------------------------------------------------
Finished RTL Component Statistics
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Start RTL Hierarchical Component Statistics
---------------------------------------------------------------------------------
Hierarchical RTL Component report
Module div_restoring
Detailed RTL Component Info :
+---Adders :
3 Input 17 Bit Adders := 1
2 Input 5 Bit Adders := 1
+---Registers :
32 Bit Registers := 1
16 Bit Registers := 2
5 Bit Registers := 1
1 Bit Registers := 2
+---Muxes :
2 Input 32 Bit Muxes := 1
2 Input 16 Bit Muxes := 2
2 Input 5 Bit Muxes := 1
2 Input 1 Bit Muxes := 3
---------------------------------------------------------------------------------
Finished RTL Hierarchical Component Statistics
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Start Part Resource Summary
---------------------------------------------------------------------------------
Part Resources:
DSPs: 80 (col length:40)
BRAMs: 120 (col length: RAMB18 40 RAMB36 20)
---------------------------------------------------------------------------------
Finished Part Resource Summary
---------------------------------------------------------------------------------
No constraint files found.
---------------------------------------------------------------------------------
Start Cross Boundary and Area Optimization
---------------------------------------------------------------------------------
Warning: Parallel synthesis criteria is not met
---------------------------------------------------------------------------------
Finished Cross Boundary and Area Optimization : Time (s): cpu = 00:00:08 ; elapsed = 00:00:11 . Memory (MB): peak = 551.531 ; gain = 293.434
---------------------------------------------------------------------------------
Report RTL Partitions:
+-+--------------+------------+----------+
| |RTL Partition |Replication |Instances |
+-+--------------+------------+----------+
+-+--------------+------------+----------+
No constraint files found.
---------------------------------------------------------------------------------
Start Timing Optimization
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished Timing Optimization : Time (s): cpu = 00:00:08 ; elapsed = 00:00:11 . Memory (MB): peak = 551.531 ; gain = 293.434
---------------------------------------------------------------------------------
Report RTL Partitions:
+-+--------------+------------+----------+
| |RTL Partition |Replication |Instances |
+-+--------------+------------+----------+
+-+--------------+------------+----------+
---------------------------------------------------------------------------------
Start Technology Mapping
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished Technology Mapping : Time (s): cpu = 00:00:08 ; elapsed = 00:00:11 . Memory (MB): peak = 551.531 ; gain = 293.434
---------------------------------------------------------------------------------
Report RTL Partitions:
+-+--------------+------------+----------+
| |RTL Partition |Replication |Instances |
+-+--------------+------------+----------+
+-+--------------+------------+----------+
---------------------------------------------------------------------------------
Start IO Insertion
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Start Flattening Before IO Insertion
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished Flattening Before IO Insertion
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Start Final Netlist Cleanup
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished Final Netlist Cleanup
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished IO Insertion : Time (s): cpu = 00:00:10 ; elapsed = 00:00:13 . Memory (MB): peak = 551.531 ; gain = 293.434
---------------------------------------------------------------------------------
Report Check Netlist:
+------+------------------+-------+---------+-------+------------------+
| |Item |Errors |Warnings |Status |Description |
+------+------------------+-------+---------+-------+------------------+
|1 |multi_driven_nets | 0| 0|Passed |Multi driven nets |
+------+------------------+-------+---------+-------+------------------+
---------------------------------------------------------------------------------
Start Renaming Generated Instances
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished Renaming Generated Instances : Time (s): cpu = 00:00:10 ; elapsed = 00:00:13 . Memory (MB): peak = 551.531 ; gain = 293.434
---------------------------------------------------------------------------------
Report RTL Partitions:
+-+--------------+------------+----------+
| |RTL Partition |Replication |Instances |
+-+--------------+------------+----------+
+-+--------------+------------+----------+
---------------------------------------------------------------------------------
Start Rebuilding User Hierarchy
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished Rebuilding User Hierarchy : Time (s): cpu = 00:00:10 ; elapsed = 00:00:13 . Memory (MB): peak = 551.531 ; gain = 293.434
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Start Renaming Generated Ports
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished Renaming Generated Ports : Time (s): cpu = 00:00:10 ; elapsed = 00:00:13 . Memory (MB): peak = 551.531 ; gain = 293.434
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Start Handling Custom Attributes
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished Handling Custom Attributes : Time (s): cpu = 00:00:10 ; elapsed = 00:00:13 . Memory (MB): peak = 551.531 ; gain = 293.434
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Start Renaming Generated Nets
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Finished Renaming Generated Nets : Time (s): cpu = 00:00:10 ; elapsed = 00:00:13 . Memory (MB): peak = 551.531 ; gain = 293.434
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Start Writing Synthesis Report
---------------------------------------------------------------------------------
Report BlackBoxes:
+-+--------------+----------+
| |BlackBox name |Instances |
+-+--------------+----------+
+-+--------------+----------+
Report Cell Usage:
+------+-------+------+
| |Cell |Count |
+------+-------+------+
|1 |BUFG | 1|
|2 |CARRY4 | 5|
|3 |LUT1 | 3|
|4 |LUT2 | 20|
|5 |LUT3 | 51|
|6 |LUT4 | 1|
|7 |LUT5 | 2|
|8 |FDCE | 2|
|9 |FDRE | 69|
|10 |IBUF | 51|
|11 |OBUF | 55|
+------+-------+------+
Report Instance Areas:
+------+---------+-------+------+
| |Instance |Module |Cells |
+------+---------+-------+------+
|1 |top | | 260|
+------+---------+-------+------+
---------------------------------------------------------------------------------
Finished Writing Synthesis Report : Time (s): cpu = 00:00:10 ; elapsed = 00:00:13 . Memory (MB): peak = 551.531 ; gain = 293.434
---------------------------------------------------------------------------------
Synthesis finished with 0 errors, 0 critical warnings and 4 warnings.
Synthesis Optimization Runtime : Time (s): cpu = 00:00:10 ; elapsed = 00:00:13 . Memory (MB): peak = 551.531 ; gain = 293.434
Synthesis Optimization Complete : Time (s): cpu = 00:00:10 ; elapsed = 00:00:13 . Memory (MB): peak = 551.531 ; gain = 293.434
INFO: [Project 1-571] Translating synthesized netlist
INFO: [Netlist 29-17] Analyzing 56 Unisim elements for replacement
INFO: [Netlist 29-28] Unisim Transformation completed in 0 CPU seconds
INFO: [Project 1-570] Preparing netlist for logic optimization
INFO: [Opt 31-138] Pushed 0 inverter(s) to 0 load pin(s).
INFO: [Project 1-111] Unisim Transformation Summary:
No Unisim elements were transformed.
INFO: [Common 17-83] Releasing license: Synthesis
12 Infos, 4 Warnings, 0 Critical Warnings and 0 Errors encountered.
synth_design completed successfully
synth_design: Time (s): cpu = 00:00:15 ; elapsed = 00:00:18 . Memory (MB): peak = 655.586 ; gain = 410.492
WARNING: [Constraints 18-5210] No constraint will be written out.
INFO: [Common 17-1381] The checkpoint 'C:/Users/ERis/LAB_THREE/LAB_THREE.runs/synth_3/div_restoring.dcp' has been generated.
INFO: [runtcl-4] Executing : report_utilization -file div_restoring_utilization_synth.rpt -pb div_restoring_utilization_synth.pb
report_utilization: Time (s): cpu = 00:00:00 ; elapsed = 00:00:00.100 . Memory (MB): peak = 655.586 ; gain = 0.000
INFO: [Common 17-206] Exiting Vivado at Mon Jul 2 21:47:59 2018...
source code is
`timescale 1ns / 1ps
module div_restoring (a,b,start,clk,clrn,q,r,busy,ready,count);
input [31:0] a; // dividend
input [15:0] b; // divisor
input start; // start
input clk, clrn; // clk,reset
output [31:0] q; // quotient
output [15:0] r; // remainder
output reg busy; // busy
output reg ready; // ready
output [4:0] count; // counter
reg [31:0] reg_q; // reg_q 32 bit
reg [15:0] reg_r; // reg_r 16 bit
reg [15:0] reg_b; // reg_b 16 bit
reg [4:0] count;
wire [16:0] sub_out = {reg_r,reg_q[31]} - {1'b0,reg_b}; // concatination and substraction
wire [15:0] mux_out = sub_out[16]? // restoring
{reg_r[14:0],reg_q[31]} : sub_out[15:0]; // or not
assign q = reg_q;
assign r = reg_r;
always @ (posedge clk or negedge clrn)
begin
if (!clrn)
begin
busy <= 0;
ready <= 0;
end
else
begin
if (start)
begin
reg_q <= a; // load a
reg_b <= b; // load b
reg_r <= 0;
busy <= 1;
ready <= 0;
count <= 0;
end
else if (busy)
begin
reg_q <= {reg_q[30:0],sub_out[16]}; // << 1
reg_r <= mux_out;
count <= count + 5'b1; // counter++
if (count == 5'h1f)
begin // finished
busy <= 0;
ready <= 1; // q,r ready
end
end
end
end
endmodule
the test bench i am using is
module test_tb;
reg [31:0] a;
reg [15:0] b;
reg start,clk_200,clrn;
wire [31:0] q;
wire [15:0] r;
wire busy,ready;
wire [4:0] count;
// instantiate device under test
div_restoring dut(
.a(a),
.b(b),
.start(start),
.clk(clk_200),
.clrn(clrn)
);
// generate 200 mhz clock
initial
begin
clk_200 = 1;
start = 0;
clrn = 0;
assign a = 32'H0;
assign b = 16'H0;
#5 start = 1;
clrn = 1;
assign a = 32'H4c7f228a;
assign b = 16'H6a0e;
#10 start = 0;
end
always
#5 clk_200 = ~clk_200;
endmodule
AI: Your testbench isn't connecting any signals to the DUT outputs (q, r, busy, ready, count). You declared the signals in the testbench but didn't make the connections.
how would i do that ? everywhere i search for a testbench example i do not see 'the connection' you are talking about.
You do it the exact same way you connected the inputs:
// instantiate device under test
div_restoring dut(
// inputs:
.a(a),
.b(b),
.start(start),
.clk(clk_200),
.clrn(clrn),
// Outputs:
.q(q),
.r(r),
// etc.
);
|
H: How to properly select a transformer in terms of thermal rise
I'm trying to reach a decision selecting a small transformer for a task, from an overseas company (which only significant because of the language barrier). I thought the selection would be easy knowing my voltage and load requirements, but the transformer's temperature rise specifications are causing me confusion, and I want to make a reasonable choice.
The transformer in question will be "brute force" rectified and filtered (full wave bridge and a filter cap), and from there will be used to operate a 12 volt relay, and some less significant loads (a MCU, an LCD display and some LEds). My worst case draw should be no more than 160mA, and so I've been looking at some 300mA transformers. To further minimize transformer load, I'm selecting transformers whose output voltage change, between "full load" and no load spans from about 7V up to about 10V respectively. Converted to DC, that is a range of about 10VDC up to a theoretical (no load) voltage of 14V. The main draw, the relay, requires 100mA at its rated voltage of 12V, and will therefore be a little lower when the transformer voltage drops, and its coil sees closer to 10VDC.
It is hopefully obvious by the 300mA rating that I'm looking for small transformers. But what threw me a curve on all the models, shapes and sizes offered in this voltage / current range was the "Temperature rise". The transformer is specified to rise a maximum of 60K (which they explained to me simply meant 60C) above ambient.
Well now my head is spinning. I'd planned on using the transformer in an outdoor NEMA enclosure specified to be watertight, and so its obviously air tight too. In the climate I intend to use this, it won't be uncommon for the outside temperature to reach 34C (around 90F for reference). So that means at rated load (300mA), this transformer could get to 94C. As water boils at 100C, that seems way too hot to even consider, especially knowing that the only escape the heat will have will be through my chosen enclosure. Though some kind of plastic, I know it can "take" the temperature, but I don't think it will allow the heat to escape very well. (I will ask the manufacturer for it thermal conduction characteristics, but I'm not sure I'll understand how to interpret them).
As I was looking at transformers with a maximum current of nearly 2X what I anticipate using, worst case, I'm sure the heating will not be as bad as their maximum. But I don't think I can simply conclude that 1/2 rated load will automatically mean 1/2 the temperature rise.
So I'm a bit at a loss for what i thought would have been a simple task. I suppose I could choose a larger transformer, but my space will be limited, and and I have to confess I'm out of my league now understanding how to approximate this. The manufacturer is asking me what an "acceptable" rise in temperature might be, and will offer other alternative transformers. I could handle working that way, but the problem is equating temperature rise in ambient "free air" to realistic temperature rise inside a sealed enclosure. There seem to be so many factors here I'm ready to take my best guess, get some samples, and do some actual testing and just measure what actually happens. But I wish I knew how to approach this more scientifically, and at least make a reasonable guess.
AI: You have to understand which bits of this scenario are in whose control, and so which bits you and the manufacturer specify. Some bits are easy to do with calculation, some may require actual measurement.
Why should a transformer be run cool? It's not a silly question, it needs a detailed answer. (a) The windings are insulated, and wound on some sort of former. If they get too hot, the insulation and former degrade, causing eventual failure. The transformer therefore has an absolute maximum winding temperature rating. (b) If mounted in a plastic box, the mountings must stay below the softening point of the plastic. (c) How hot do you feel comfortable with? If any part of the box 'feels hot', it may alarm a user.
The manufacturer knows the limit for (a), you don't know what grade of insulation is on the wire (and there are different grades, depending on cost). If you ask him the precise question, he should be able to answer. It's an absolute temperature, not a temperature rise.
You can determine the limit for (b), you know what you've put it in.
You seem to have preconceptions about (c) which is more open to sentiment. While 60C is too hot to touch for more than 'a few seconds' with a bare hand, consider that domestic radiators are limited to 82C surface temperature to avoid causing harm with a 'momentary touch'. 100C is not necessarily too hot for electronics, it depends on their specification. We worked to an absolute external temperature limit of 75C, with a warning sticker if it was above 50C, but would allow internal and junction temperatures to approach specifications, sometimes 150C.
The manufacturer specifies temperature rise for his transformer at a certain load. Load is easy to quantify and communicate with the user, which is why that's chosen. He doesn't know what your local ambient will be.
The temperature rise consists of two components, iron losses, and copper losses. The iron losses depend (almost entirely) on input voltage, and are independent of load. The copper losses depend on the square of the output current. This means that two measurements are needed to predict how the temperature rise will vary with load, an off-load measurement, and a full-load measurement. Running at half load will result in only 25% of full-load copper heating, with unchanged iron heating. If the transformer is intended to be 'good' when run no-load, it will have often have been designed to have much lower iron losses than copper losses (note this is not optimum for best on-load efficiency).
It's possible to estimate the winding temperature of a transformer quite well. Measure the winding resistance at ambient. Run the transformer until the temperature has stabilised, then measure again. The tempco of copper is about 0.4% per degree C, which means a 10% increase in resistance for each 25C temperature rise.
Consider a SMPS solution, smaller and cooler than an old-fashioned iron transformer solution.
|
H: Voltage*time product of pulse transformer
I am designing a circuit to excite a piezo-electric crystal with 1MHz bipolar square wave at 30V (Vp-p=30V, Vb-p=15V) consisting of 10 pulses, 50% duty cycle.
The idea is to use a pulse transformer whose inputs shall be driven with +15V from either directions to achieve bipolar excitation. First, IN_A will be driven with +15V while IN_B is at ground and vice versa.
1) The voltage * time product in this case should be 15V * (1/1MHz) = 15V-us. Is this correct?
2) Or should it be 30V * (1/1MHz) = 30V-us since the excitation is bipolar?
3) Finally, since the excitation consists of 10 pulses and not just a single pulse, should the calculation of V * t value take that into account as well?
AI: The limitation on transformer volt.seconds is the core flux.
A 1 MHz square wave spends 0.5 us in one state, and 0.5 us in the other.
During the first 0.5 us at 15 V, and assuming it starts from zero flux, the core will go to a flux representing 7.5 Vus. During the second phase, the flux will go back to zero. Subsequent repeats will cycle the core through the same flux swing. If operated like this, you therefore need a 7.5 Vus core specification.
If you can contrive to deliver 'half' a pulse first, so 0.25 us to swing the core to 3.75 Vus, then full pulses of 0.5 us to swing it between +/- 3.75 Vus, finally finishing with half a pulse to get it back to zero, you can use a 3.75 Vus transformer.
|
H: Output Compare Interrupt does not work avr atmega
Hey I'm trying to do blinking led using interrupts on 16 bit timer.
My atmega model is Atmega168A.
Chip clock rate is 12Mhz.
Here is my code:
#include <avr/io.h>
#include <avr/interrupt.h>
ISR(TIMER1_COMPA_vect)
{
PORTC ^= (1 << PC5);
}
int main()
{
DDRC |= (1 << PC5);
PORTC |= (1 << PC5); //led on
sei();
TIMSK1 |= (1 << OCIE1A); // cmp interruupt enable
TCCR1B |= (1 << CS12) | (1 << CS10); //prescalser 64
OCR1A = 11718; // value to compare
TCCR1A |= (1 << WGM12); // set ctc mode
while(1)
{
}
return 0;
}
When the program startup led turn on.
After compare match it should turn off. And it works, but with one strange problem.
If I change OCR1A, only the first peroid of time before led on and off changes.
When I set OCR1A e.g 0x100 the led turns off very quickly.
When I set OCR1A e.g 0xfffa the led turns off slowly.
But only the first state change.
Another led blinks do not take over about changes of OCR1A.
Whats wrong?
Do I need reset some flags or something like this?
AI: You did not set CTC mode, WGM12 is in TCCR1B
|
H: How does a gold leaf electroscope measure voltage?
It’s my understanding this device can be used to measure voltage. How is this accomplished? What electromagnetic equations are applied and how is it calibrated?
AI: The gold-leaf electroscope can't be calibrated very accurately but there are voltmeters based on the the same electrostatic effects that cause the gold leaves to repel more at higher voltage.
They are of historic interest only or for educational purposes. Electronic instruments can now be implemented that are more sensitive and accurate.
In the case of the electrostatic voltmeter the voltage to be measured is applied to the static plates marked 'Q' in the diagram. The moving plate 'N' that can swivel on a jeweled bearing is connected to ground.
When a voltage is applied there is an attractive force between the two plates that causes the moving plate to rotate more as the voltage increases.
They are not useful for voltages less than a few hundred volts as the forces are too small but they have the advantage that they consume essentially zero current.
Electrostatic Voltmeter Wikipedia
Modern instruments that can measure electrostatic potentials, also with essentially zero current, often use the concept of what is referred to as a Field Mill where the electric field from the point being measured is periodically interrupted with a mechanical vane. This can induce an AC signal in a nearby electrode that can be amplified and measured and represents the voltage or electric field.
Image credit Wikipedia
|
H: Signal Modulation with Carrier Wave?
Image B shows the frequency of an FM signal is changing, yet I know a single broadcast station on FM is specific to a single frequency. Is the pictured FM signal again modulated with another fixed frequency carrier representing the station frequency?
In Image A is the spectrum of an AM broadcast. Why are the side bands so large compared to the carrier? Is this somehow to accommodate the audio bandwidth over a frequency range?
A:
B:
AI: yet I know FM is specific to a single frequency
That is incorrect. The frequency of the carrier varies in FM, which stands for FREQUENCY MODULATION. There does not need to be another carrier which the signal shown in B under FM modulates. That signal, labeled FM, is modulated. That's what frequency modulation looks like.
The image B shows correctly how an FM signal works. The frequency of an FM signal varies with the modulating signal. The maximum variation either way is set by regulation if the FM signal is broadcast. When the modulating signal is at zero amplitude, the frequency of the FM signal is at its midpoint or nominal frequency.
In Image A is the spectrum of an AM broadcast. Why are the side bands so large compared to the carrier? Is this somehow to accommodate the audio bandwidth over a frequency range?
The bandwidth of an AM signal is twice the highest frequency of the modulating (usually audio) signal. In the center is the carrier, and above and below that are sidebands.
|
H: Why the LM358 working in this case and what the definition of "ground"
I asked this question previously Why this ZCD not working? and today I saw my friend using this AC voltage sensor module https://mikroelectron.com/Product/ZMPT101B-Single-Phase-AC-Voltage-Sensor-Module/ and the ZCD is working. The LM358 able to from Zero cross detection with the module because the output voltage is in the range of 0-5V, the AC voltage module level shift the input AC voltage to positive value so no phase reversal encounter when using LM358 that power by a 5V(without negative) supply. In this scenario, I'm able to link what I learn in my previous post to the concept of using AC voltage measurement module does not violate common mode input voltage range of LM358 that why it work.
In my previous post, the circuit below not working(getting phase reversal waveform). For this connection my R1 is connected to the 12V output of transformer and R2 connect to 0V display at the transformer
For my other friend, I saw this circuit design working as a zero cross detection without producing any phase reversal using the same transformer as above. However, in this design, the R7 is connected to the 12V output at transformer but R9 and R10 is connected to the ground of a 5V power adapter, R8 is connected to 0V on the transformer.
I have questions below
a)For this connection, is the LM358 input voltage still reading negative voltage?
b)Is the "0V" at the transformer output same as the 0V(ground) at a 5Vdc power adapter?
AI: a)For this connection, is the LM358 input voltage still reading negative voltage?
Yes. The lowest voltage they see considering all 3 GND connections shown is the negative diode voltage drop divided by the 12k/4k7 voltage dividers:
\$\frac{\left(-0.6\times4.7\right)}{\left(12+4.7\right)} = -168mV\$
b)Is the "0V" at the transformer output same as the 0V(ground) at a 5Vdc power adapter?
the 0V at transformer output refer to negative probe of the voltmeter.
No, they are not connected. Depending on the polarity of the AC voltage D1 or D3 (as identified in your circuit) will be conducting. Note how V1 here "floats" (due to the large resistors) regarding the DC voltage reference (the GND points) until the diodes conduct, forcing the relative potential with the diode voltage drops:
From the TI datasheet:
but this note solves the problem:
|
H: Using a straight end FPC connector for a tapered end FPC
I am new to working with FFC/FPC, and had a question about the different types of ends for these cables.
I have a piezomotor that connects via a 1mm pitch tapered end FPC. I need to connect this to a PCB in a very tight area. The recommended connector is this Molex 522710669 connector, but for my purposes this connector is too long (13mm) and I will need contacts on the top instead of the bottom. The other tapered end connectors I have found are all similar lengths and will not fit.
However, I have found a connector that is small enough to fit my use, a TE 84981-6. The only issue is that this is a connector for a straight end FPC, and my cable has a tapered end. Is this an issue? To my mind, using a tapered end FPC in a straight connector shouldn't be a problem, since it shouldn't play a major role in alignment. Is there another reason why this may not work?
AI: Using a tapered FPC tail in an FFC socket that can accept a non-tapered FCC is not a problem.
|
H: How to amplify DC voltage using Op-Amp?
In some real-application, a certain module is used, and the output voltage from this module is from 5 to 10 v. The required voltage should be scaled to 10, i.e. the 10v yields a 12v, 5v yields a 6v, and so on.
All these details are not important, that's why I don't want to mention the application or the module.
The problem in brief is amplifying a DC voltage that has a single value from 5 to 10 volts to another DC voltage that has a maximum of 12 volts.
By measuring the output of the module at the high state, it gives exactly 9.15v, so to convert this 9.15v to 12v, I need to multiply the 9.15v by 12/9.15, which is 1.31; so, I designed the circuit below, which is a non-inverting amplifying circuit using LM741 Op-Amp. The gain is calculated as 1+R10/R9, where R9, and R10 are the resistors shown in the image below. So, R10/R9 = 0.31, please remember this ratio.
Multisim's simulation gives exactly what I am looking for, I chose R10 to be 330 and R9 to be 1k so the ratio is 0.33 (approximately equal to 0.31 as actual resistors have not exact values, there is always a tolerance, which will make the ratio more closer to the required ratio).
Now, I implemented the shown circuit with hardware components, exactly the same as shown in the image, the power supply I used give exactly 12v, I connected the +ve terminal of the power supply to the pin 7 of LM741, and the -ve terminal of the power supply to the pin 4. Measured the voltage between pin 7 and 4 using multimeter, it was 12.07v (almost 12v). Then, connected the resistors in the proper way, and measured the output from pin 6, it was about 10.6v. So, I tried so many resistors that will give the same ratio (0.31 to 0.33), but I couldn't even have an 11v output. The maximum voltage I could get is 10.75, there is 1.25v that are significant for my application, and this about 10% of the whole 12v, so it cannot be neglected.
My question is why this behavior happens, why I cannot get the 12v exactly or even 11.5v using the circuit shown below.
Is the problem with the Op-Amp I am using? and If this is the case, what is the best Op-Amp among the Op-Amps below that I can use instead of LM741? Op-Amps available at the store I am buying from are: LF356, LM1458, LM311P, LM318, LM339N, LM358N, LM380N, NE5532, NE5534, TL071CN, TL074CN, TL082CP, UA741CN.
Final note: all components were working, i.e. resistors, Op-Amp, and power supply are all working nothing was damaged.
Thanks in advance.
AI: In addition to the other answers which explain that your power supply is insufficient to give you 12V output using a non-rail-to-rail op amp like the obsolete 741, it has also been pointed out to you that you cannot leave your power supply floating relative to the op-amp. You need a ground. Some op-amps are configured with split or "bipolar" supplies, like +/- 15V. Others are configured to have low rail grounded. But you have done neither according to your schematic. Go back and read the answers and comments from your previous question.
Here is an example of using a split supply to power an op amp. It is from an answer to your previous question.
|
H: Is pin polarity a requirement in this TVS diode array?
I have a 4-channel TI TPD4EUSB30 TVS/ESD diode array that I've been using successfully on differential ethernet traces. Our design changed and the positive and negative pins have swapped positions which means I would have to flip the traces if I am to observe the indicated polarity on the TVS. However, I am not convinced that polarity needs to be observed because all channels are simply connected between two diodes as shown on the device schematic:
A similar Nexperia PUSB3F96 doesn't label the channels with any sort of polarity indication:
Is there any reason I can't simply ignore the polarity on the TI device and avoid having to swap the positions of my differential traces? Nowhere in the datasheet are specifications given that differ between the D+ and D- pins. Is there any particular reason TI have labeled the channels with + and -?
AI: Probably just to suggest a typical layout. I don't see any differences between channels.
A similar protip: transformers don't care about P/N, RX/TX etc. They're identical and symmetrical, as long as you make the same changes on both sides (i.e. swap primary and secondary polarity). (Although that isn't even much of an issue, with almost all PHYs supporting Auto MDIX.) So layouts can often be simplified this way.
|
H: Slayer exciter transistor troubles
I have built a Slayer exciter using a 2N2222, with a 22 kΩ resistor, as well as the other needed components. (4 turns primary, 475 secondary.)
It works fine with a 2N2222, but I was wondering if it could work with a MJE3055T or a TIP31C.
I’ve tried exchanging the 2N2222 with these two, in the same spot. All that happens is that no power is drawn until a voltage around 9-10 V is given to it. Then it dramatically increases the amount of power going into it, but it is just heating up the transistor.
I’ve tried a variety of different resistances and numbers of primary windings. I’ve also flipped the polarity of the primary windings.
Is there something I’m overlooking?
AI: All you need is over-unity current gain with 0 deg phase margin for the circuit loop to oscillate. (that means positive feedback at some frequency.)
But without details, we cannot speculate except that Power transistors with hFE in the 40 Range cannot compare with the 100 to 300 range @ 100 mA of a 2N2222A. Thus a different turns ratio is needed or a method of coupling enough feedback to use your circuit.
Don't reverse the coil from the design. That will just make it negative feedback instead of positive AC feedback which is needed to make it oscillate.
You could try using the power transistor as an emitter follower or Darlington pair with the 2N2222A, but that will be less efficient.
|
H: Carrier Waves, modulation over RF vs on wire
I’m reading about carrier waves and signal modulation. It appears signaling has differences over RF vs wire. RF requires accelerating charges to induce a voltage change at the receiver. Straight wire only requires moving charges through the conductor.
From this, it seems I could generate a square wave for straight wire, but over RF it would just be seen as voltage spikes at the rise and fall at the receiver. As such the square wave requires modulation of higher frequency carrier wave. Is this true?
I note that FM carrier is a certain frequency. The modulated FM signal changes frequency with time. Is modulated FM signal and the carrier multiplied before transmission?
AI: over RF it would just be seen as voltage spikes at the rise and fall
at the receiver. As such the square wave requires modulation of higher
frequency carrier wave. Is this true?
Yes. Although theoretically you could transmit a square wave directly as radio waves, it is generally impracticable.
A wire can transfer static charge (voltage) and pass continuous current, so it can reproduce any 'square' wave down to DC. A radio wave consists of photons that each have a specific frequency. If you feed a square wave into an antenna it will output photons on all the component frequencies of the square wave. To do this efficiently the transmitting and receiving antennas would need multiple elements, each tuned to one of the harmonics of the square wave.
For example a 50 Hz symmetrical square wave would need antenna elements tuned to 50 Hz, 150 Hz, 250 Hz etc. The optimum length of a 1/4 wave whip antenna at 50 Hz is 1425 km. An antenna of practical length would only transmit some of the higher harmonics, and the received signal would be a series of spikes corresponding to the transitions.
A high frequency square wave could be sent directly with a practical antenna size, but would still need antennas tuned to that waveform, with multiple modes to handle the harmonics. To transmit several signals simultaneously in the same airspace, each one would have to be limited to a unique range of frequencies that didn't interfere with the other signals. This would be awkward and potentially a huge waste of bandwidth.
The solution to this problem is modulation. The frequencies in the baseband signal are moved up to a higher frequency band where they don't take up as much bandwidth proportionally, and a simple antenna with (proportionally) narrower bandwidth and higher efficiency can be used. The baseband signal and transmitting frequency are no longer related, so the antenna doesn't have be 'tuned' to the specific signal being transmitted.
Is modulated FM signal and the carrier multiplied before transmission?
If you mean - is the FM signal generated at a lower frequency and then doubled or tripled etc. for transmission, the answer is it may be - depending on the the deviation required and type of modulator used. For good frequency stability a crystal controlled oscillator is often used, but its frequency can only be 'pulled' by a small amount with modulation. Greater deviation may be achieved by using a low frequency fundamental mode crystal, then multiplying the output to a higher frequency (which also multiplies the deviation by the same proportion). This may also be done if the transmitting frequency is too high for direct modulation.
|
H: Picking components
I'm an electronics student and I'm currently working by myself on a DC-DC booster converter. By now I have already completed the simulation, and I'm currently selecting components in order to go make the circuit in the lab and see how well it works.
My problem is that I have no idea on how to select a component, I know you study the datasheet but honestly, it is my first time doing this and all I see is a bunch of numbers. I wonder if someone here knows any kind on guide I can follow in order to learn how to read a datasheet properly, and that gives information about what each parameter is.
Also, I'm simulating in Microcap and I don't seem to find a wide variety of components there. Am I searching in the wrong branch?
Thank you.
AI: Stealing schematic from there...
The boost converter has few parts. Getting any of those wrong will wreck it though.
Input cap
Inductor
Switch FET
Diode or synchronous rectification FET
Output cap
Layout
Brain (whatever is controlling the MOSFET)
It would be too long to write an answer about all the parts, so I'll just do the inductor.
If the boost is properly designed, the output/input voltage ratio and switch current are not unrealistically high, current in the inductor will be a sawtooth. Refer to your classroom notes or online tutorials for appropriate equations.
Regarding the inductor, its most important property is of course its value, which determines the amplitude of the current ripple according to input voltage, output voltage, and switching frequency. Once a proper inductor value is selected, then a suitable model of inductor must be selected.
So this is an opportunity to talk about saturation. All inductors that don't use an air core, use instead some sort of ferromagnetic material to improve on the inductance. However, above a certain magnetic flux, these materials saturate and lose their permittivity, which causes the inductor to lose some of its inductance. Depending on the material, the effect can be sharp or soft.
In a boost converter, when the switch is on, inductor current increases as \$ \frac{di}{dt} = \frac{V_{in}}{L} \$. From this, it is easy to understand that when it saturates, L decreases, which means \$ \frac{di}{dt} \$ increases, so the current increases faster, which saturates it more, which causes the current to increase even more, etc.
This puts the MOSFET in an uncomfortable position. Normally, the chip should detect the overcurrent in the MOSFET and shut it down, but it is trying to do so while current is increasing in an uncontrolled manner. This will cause extra switching losses in the MOSFET, and heat it way more than what the designer thought if inductor saturation was not accounted for.
Here's an example waveform from an appnote:
It's for a buck, but you get the idea. When the inductor begins to saturate, current through it gets spiky as it increases way faster than expected.
In inductor datasheets, you will either get a curve with actual inductance value versus current, or a spec saying it loses X% of its inductance at a current that is then called "saturation current".
This means that selecting a bigger boost chip, with a bigger MOSFET and a higher current limit threshold, is not always a good idea. You will have to select an inductor that only begins to saturate when the current limit trips. If the chip has a current limit that is too high for your application, you will end up having to use an inductor that is too large. This costs extra and adds some core losses to.
In addition, for the inductor, you must consider copper losses, which are determined by resistance. So make sure to check the maximum DC current determined by the maximum temperature of your inductor in the datasheet, and calculate the actual losses by modeling it with a series resistor, and using avg(Pd(series resistor)) to plot it in the sim.
It is usually much harder to find information about hysteresis core losses in inductor datasheets...
|
H: Effective resistance integrator circuit
I've encountered the following circuit and I'm puzzled about the effective resistance that the opamp will see.
I know that R1 is in parallel with R2+R3, so this would be easily answered by R1*(R2+R3)/R1+(R2+R3). But there's a ground between R2 and R3 and I don't know if that will affect the total resistance the opamp will see.
AI: I know that R1 is in parallel with R2+R3
No it isn't; R2 and R3 both connect to ground.
I'm puzzled about the effective resistance that the opamp will see.
I'm assuming you mean the resistance/impedance present at the inverting input node.
Because it's a virtual ground (due to negative feedback), the op-amp's inverting input (if it had feelings or the ability to understand impedance) would "detect" an impedance of near-zero-ohms.
It's a virtual ground because it's an integrator with negative feedback from output to inverting input and, we can assume that the op-amp has a massive open-loop gain hence, the voltage at the inverting input will, under normal operational conditions, be at the same voltage as the non-inverting input (ground potential).
If in fact you meant "what's the effective input resistor for the integrator" then, the answer is 68 kΩ. R3 is nulled-out by the virtual ground and, for this circuit to work as intended, there will be a voltage source on the left hand node pointing off the page. This voltage source will have a very low output impedance (ideally zero) and therefore, any effect that R2 has is lost hence, R1 is the effective impedance between the unseen voltage source (left of page) and the inverting input.
|
H: Power selection with MOSFET
I have a question about PMOS load driver. When V1 is high then Vout should be 1.5 V and it is okay. But when V2 is high, Vout should be 3 V rather than 2.4 V.
Can anyone explain me why this 2.4 V and how can I fix this?
AI: Can anyone explain me why this 2.4 V
It's because of the body diode inside the M2 MOSFET: -
The 3 volts is fighting to push current through the body diode and can't win.
Can anyone explain me.... how can I fix this?
One option is to use back-to-back MOSFETs as per a solid state relay: -
Picture taken from this question. Back-to-back MOSFETs can handle bidirectional currents: -
Picture from here. Or use a proper power path controller like this chip that also uses bidirectional MOSFETs: -
Image from here.
|
H: How much smaller/bigger is ampere/second than miliampere/hour?
How much smaller/bigger is ampere/second than miliampere/hour?
I want to check with people who know this way better than me at this.
AI: a milliampere/hour is 0.001 amperes/hour. Since an hour contains 3600 seconds, 0.001 amperes/hour is 0.000000278 amperes/second.
|
H: How output is not zero if error is zero in control systems
In a classical negative control scheme where we have a plant and controller in series and no disturbance. The system is designed such a way to make output is equal to input no matter what problems occurs in the system. Let's say output of the system is equal to reference point or set point or input. Steady state error term becomes 0 and it is multiplied by controller making its output 0 which is multiplied by plant making output 0. Then, as I reckon, error term blows up to reference input(as output is zero) and we got non-zero output. The weird thing is I think output oscillates between 0 and reference input at all times. Can you help me understand what is going on? is not the purpose of the control scheme to make output equal to input at all times in the presence of noise and disturbance? What is the problem in my thinking?
AI: A simple P (proportional) controller will, in general, NOT track a set point exactly. As you correctly point out, there must be an error in order for the controller to have a non-zero output.
To track a set point so that the error goes to zero (after some time) it is necessary to add an integral term to the controller, giving a PI controller (proportional and integral). (Or, as Spehro Pefhany points out in his answer, the integral term may be in the plant, rather than the controller).
With a PI controller, if there is a non-zero error, that error will be integrated, and that integrated signal will eventually become large enough to move the plant so that there is zero error. When the error becomes zero, the integral signal stops growing. The input error is zero, but the controller output is non-zero. It is whatever it takes to ensure the plant is at the set-point.
|
H: Why didn't cpu clock frequency plateau at two orders of magnitude higher Hz?
Here is a back of the envelope estimate for an upper bound of clock frequency for modern CPU's:
The speed of light is 3·10⁸ m/s which is 3·10¹¹ mm/s, and I assume the speed of electricity is about 50% to 99% of that (wikipedia), so let's conservatively say 1.5·10¹¹ mm/s.
If we assume that during a single clock cycle, a signal has to travel about 1 millimetre (a conservative, i.e. large estimate I think), to go from a register through an ALU to another register (this is not even taking into account pipelining, so that it has to travel less than that), then that means we should expect that with current transistor sizes, the clock frequency can be set at about 1.5·10¹¹ = 150 GHz.
Yet in practice, clock frequency seems to have plateaud at about 2 GHz. What is wrong with my back of the envelope calculation? Why can't we get two orders of magnitude higher frequency?
AI: Your calculations' shortcomings:
speed of light in vacuum > speed in a medium
speed of light is not the limiting factor, anyways, as there's no need for things to happen at the same time; the clock edges at one end of the chip do not have to occur before the next one happens at the other end!
you're omitting the actually limiting factors, which is speed of charge transfer and semiconductor operations. Can't instantly make a field effect transistor stop conducting current!
Switching faster requires proportionally higher currents (to exchange the same charge in less time), means quadratically increased losses. So, you're very quickly thermally limited. What good is it if you can run twice as fast, but since you can't get the heat away quickly enough, need to shut down 3/4 of the time?
CPUs do exist beyond 5 GHz, but for the thermal reasons quoted above, and the fact that having a fast CPU alone is not the solution to needing fast compute that is affordable, you won't find these in PCs or most servers. You'll find them in highly custom mainframe settings, where hardware cost of cooling system integration is supported by the use case (i.e., the cost per operations per second might not be as important as the possible operations per second; that's a different market than desktop computing or hyperscalers; not saying these are not possibly cost-efficient for some workloads, but you can't sell a z15 CPU without the cooling system, and IBM has nothing to win commerically by selling small systems with large support envelope; AWS, GCP, Alicloud, Azure… on the other hand, has nothing to win commercially by making themselves depend on a single vendor).
|
H: Why doesn't my difference amplifier get saturated in LTSpice?
I'm currently simulating my high- side current sense amplifier for measuring mains current(along with the LP filter) .I also have the voltage sensing in the corner and I have attempted to simulate a realistic mains current magnitude of 15 A with a source and load impedance to avoid reflections.
I'm not sure why signal appears clipped even though the measured signal magnitude is less than the power supply range. How do I fix this? Is this getting saturated due to the high voltage in reference to ground?
Difference Amplifier
Whole schematic
Signal through current sense resistor(green) vs output of difference amplifier
AI: Just put some voltage numbers on your front end and you'll see that things have gone wrong: -
And... the circuit will fry.
You need to rethink how you are going to achieve this and I would recommend low-side monitoring.
|
H: Need help regarding BCD to 7-segment decoder
I am fairly new to digital logic designing and I need some help in regards to finding a BCD to 7 segment decoder on software. I am using proteus for my counter, and for some reason I am unable to make it work. It either gives low and grey outputs only, no high output for my display. Any help would be appreciated.
Edit: i seemed to have missed posting the issue img. I have done so. What i want is like the black one. But in Proteus i am having issues.
AI: That won't be very useful if the LED's cannot be driven from an LCD display and must be the correct polarity to match if low side segments or high (common cathode).
These designs are obsolete anyways and you can choose a better example to learn.
I'll post a link to an old discrete version of Binary to BCD decoder in comment. You can toggle the 1/0 and see the display change.
|
H: Cannot amplify DC voltage using op-amps
I am trying to amplify a DC voltage scaled from 5-10V to another DC voltage with maximum 12V. Why I am not using just a DC voltage with that value? Because the input DC is variable according to some other parameters. All what matters is that we have a DC and we just want to amplify it (without inverting it.)
I have implemented 3 circuits to accomplish this, and the 3 circuits failed to give the required output. The maximum voltage I could get is 10.78V no matter the ratio between resistors is. I tried so many resistors even with different configurations to yield a ratio of 0.25 to 0.4, the required is 0.31.
The three circuits are shown below:
First Circuit:
Second Circuit:
Third Circuit:
AI: The main problem with your first circuit is that you did not connect the negative power supply pin of the op-amp to ground. You have been informed multiple times that the power supply needs to be interconnected with ground, and circuit 1 fails to do so.
The main problem with your second circuit is the same.
The main problem with the third circuit is that, although you have interconnected ground and the power supply, you only have 9V above ground being applied to the op-amp positive power pin. You have split the 12V so that ground is half way between them. +6V and -6V. Then you added another 3V to the positive to get +9V. A secondary problem is that the way you have created a split supply by using 51 k\$\Omega\$ resistors is very far from being ideal.
In your previous questions you asserted that you only had 12V to work with. Now you have more, but you need to apply the other information that has been given to you.
Other answers give examples of power supply configurations that will work.
|
H: Slew rate of two stage OTA
I have learnt two stage opamp designing from books and yourtube videos, but have always failed to understand slew rate formula which is I5/Cc(I5 is bias current of M5 and Cc is compensation capacitor). Always thought that slew rate should depend on load capacitor and not compensation capacitor. After thinking a lot I finally simulated by giving opposite phase square wave to input and looked at all current values. It looks like the load capacitor is getting charged by second stage PMOS and discharged by second stage NMOS. It seems like the contribution of current from first stage is very small. If this is true shouldn't the slew rate be a function of current of second stage transistors and load capacitor?
I have attached one image for your reference, the up arrow means voltage is going from zero to vcc and the down arrow means voltage is going vcc to zero.
AI: If this is true shouldn't the slew rate be a function of current of second stage transistors and load capacitor? Yes.
In a two stage miller compensated op amp,
slew rate is a function of input bias current and compensation capacitance and is often used to design the operational amplifier in texts.
However, you should be able to see that if the load capacitance is dramatically increased beyond the internal compensating capacitance, then the ability to maintain the same slew rate (measured at the output under an external load capacitance) requires either larger current in the input stage or larger current in the output stage. There has to be enough total current to drive a total max load capacitance and maintain a targeted slew rate.
"Normally, slew rate is not limited by the output, but by the current sourcing/sinking capability of the first stage." Allen, Holberg. Analog Ciruit Design 2nd edition.2002
"The overall slew rate is either limited by the first stage or the second stage, whichever is slower. The proper bias current can be determined by SPICE simulation"
Silveria, VLSI systems on a chip, 1999
|
H: Please verify the proof for percentage of error in power factor measurement
I am constructing an ac wattmeter for my school project, one of the objective is to achieve discrepancy of result(power factor) that is within 5% as compare to the actual measurement result obtained from wattmeter in market. This is done by setting a timer to measure current and voltage zero cross detection. As an example, the picture below show the rising edge of voltage(yellow) and current(blue) square wave as output by zero cross detection. The result is then compute by microcontroller.
After some consideration, isn't this is actually quite ambiguous to say "5%" without without specify at what phase angle of the measurement load. So I'm trying to show percentage of error increases for fixed amount of error as the actual phase angle of the load increases. Please verify if this make sense.
discrepancy=(actual result-measure result/actual result)
Assuming the error in phase angle difference is very small
$$Actual result=cos\theta,d\theta=error,measurement result=cos(\theta+d\theta)$$
then discrepancy can be written as
$$\frac{cos\theta-cos(\theta+d\theta)}{cos\theta}=-\frac{cos(\theta+d\theta)-cos\theta}{d\theta.cos\theta}.d\theta=tan\theta.d\theta$$
Consider the angle difference is very small and fixed at different phase angle, this show that the percentage error is proportional to $$tan\theta$$
since tan is an increasing function, the error increase as phase angle increase.
Example of measuring the power factor of a load of impedance 1+10i is more prone to error as compare to a load of 1+0.1i.
AI: Please verify if this make sense.
Voltage can usually be relied upon to be a sinewave but, current can be awful and trying to compute phase angle to deliver power factor is not going to work except on ideal loads such as inductors, capacitors and resistors.
A TV or appliance usually has some form of bridge rectification and, although modern devices have a more reasonable power factor footprint, there can still be several degrees of mismatch between actual zero crossing current and ideal-load zero crossing current.
If you want to compute power factor in the presence of loads which create highly harmonic currents, you should compute true power (using v × i), RMS voltage and RMS current then solve for power factor: -
$$v_{instantaneous}\times i_{instantaneous} \text{ (watts)} = V_{RMS}\times I_{RMS}\times \cos\phi$$
Example of voltage and current taken by a conventional appliance such as a TV: -
Image from here. Basically, the advice is to research what you are hoping to measure and don't assume all loads are at all sinewave shaped. Here are some more images: -
Image from here.
|
H: Diode-connected BJT vs base-emitter BJT diode vs diode
I was having a look at the circuit design of Keithley 236 SMU. You can find this part of the circuit in the Keithley 236 Service Manual.
Q47 is a BJT. Only the base and emitter are connected, which means it is used as a diode.
I also made a simulation to compare these three variations, which seems not a lot of difference. (Pink is voltage, blue is current)
My questions are:
Is it better to use diode-connected BJT to enhance its flowing current without affecting too much the forward voltage in this circuit?
Are there any particular reasons against using a normal diode or a diode-connected BJT in the original design?
What are the differences among those three kinds of diodes (i.e. diode-connected BJT vs base-emitter BJT diode vs diode)? (I know there is an answer about diode-connected BJT and diode here.)
In this design, all these three "diodes" are used. How could I determine which one to use in the design?
My initial guess is the cost and part availability but I would like to know if there is any design consideration about this.
Edit - This is where diode-connected BJTs are used in this design.
AI: I suspect, without knowing the specs, that the criteria is for this design is bandwidth of the ideal rectifier (with Op-Amp negative feedback) for the transistor characteristics selected in the Vbe(f) vs Ibe(f).
The Ideality Factor =1 for which the active diode is best for lowest Rce due to current gain in a common size is commonly used for DC current mirrors.
schottky diodes might be lower junction capacitance but much higher bulk resistance. CMOS input protection must be faster than then FETs so they are made extremely small and thus only rated for 5mA DC current. This might also be suitable.
Silicon diodes might also be a higher RC breakpoint, yet the
But it is the BW of the rectifier for which a transistor is chosen with low Cbe(low pF) in the BE junction , it will perform better in a spectral sweep , carrier rectifier than a small signal diode.
The fact is that diode capacitance increases with size and current ratings at V=0 and bulk resistance Or incremental saturation R also reduces with increased current rating.
Without knowing which diode and transistor characteristics were used, the forward voltage is irrelevant as the Op-Amp loop gain can null the input error.
So my opinion is they selected this for the frequency response of a low cost transistor, rather than a more expensive PIN diode.
This answer might be improved if then application specs were given.
|
H: Can I use a connector at a higher amp if its lower voltage?
I'm making a PCB board where I'd like a barrel connector rated for 10 amps. I have been using part this part which is rated for 10 amps at 50V.
https://www.digikey.com/en/products/detail/globtek-inc/JACK-C-PC-10A-RA-R/8597889?s=N4IgTCBcDaIFIEEDCBpAtEtAFTBGADAmgEoIAUxAlCALoC%2BQA
My PCB board however only runs at 5V. Can I safely use a barrel connector that's rated for, 6 amps rated for 48V, but at 5V and 10 amps? Or are parts rated for 6amps at any voltage?
I'd like to get my cost down and switching to a cheap plastic unshielded barrel connector saves me $2.75 per board.
https://www.digikey.com/en/products/detail/tensility-international-corp/54-00129/9685438
AI: No. Voltage has nothing to do with current rating.
Current ratings in connectors are usually (always?) based on temperature rise. For example, maybe the connector was tested at 5 Amps and it was found that after a long time, the temperature of the connector stabilized at 60 degrees in a 25 degree room, so this was declared to be the maximum allowable current. (I am just kind of making up numbers here to explain the idea.... these are not real numbers from a real connector).
However, if you know that your room will always be 10 degrees, maybe you can get away with running the connector at 6 Amps. Likewise, if you are only going to run 6 Amps for 5 minutes, then rest for 1 hour, maybe that is OK, too.
But doubling the current will probably cause the connector to overheat fairly quickly. So, the best thing to do is use the component within its published limits, or test it yourself to make sure it will work satisfactorily.
Connectors get hot because they have some resistance, R. The power dissipation in the connector is I2R. So doubling the current will quadruple the power dissipation and temperature rise in the connector (even more than quadruple because of the positive temperature coefficient of resistance).
So if a connector runs at 60 C in a 25 C room at 5 Amps (5 Amps -> 35 C temperature rise), then when you double the current to 10 Amps it will probably stabilize at over 165 C (10 Amps -> 140 C temperature rise). Unless the plastic melts first.
|
H: What does \$\beta\$ represent with respect to the length of a transmission line?
The picture below shows the ABCD parameters for a transmission line of length \$l\$ from this video.
Question: What does \$\beta\$ represent?
AI: Beta is the phase constant, the change in phase per unit length.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.