text stringlengths 83 79.5k |
|---|
H: Buck converter with no datasheet questions
This is a charging ic/circuit from an iPhone and there aren’t any datasheets available for it.
I have a few questions:
What would the purpose of the series capacitor c2300 on the switching side be for?
What are PMID capacitors for?
Why would q2301 be used if it looks to always be on when 1.8v is at the gate which is basically all the time when there’s power to the phone
Sorry if the picture isn’t clear it’s a screenshot from my phone
AI: This is a charging ic/circuit from an iPhone and there aren’t any datasheets available for it.
Of course not, Apple likes to keep everything secret as if we could not figure things out by reverse engineering if we wanted to.
c2300:
Looks like a boot-strap capacitor since it says something_BOOT on the left connection. Also the right is connected to the inductor and on-chip switch (note the 4 pins in parallel to carry a large current).
This is used to generate a voltage higher than the input voltage so that the gates of an NMOS can be pulled above the input voltage so that the NMOS can be fully on. One or more of such NMOS might be used as switches in side IC U2300.
PMID capacitors:
These might be supply decoupling capacitors for the bootstrap voltage made by c2300.
Or (less likely) decoupling of some other internal supply of IC U2300.
q2301:
I disagree that the gate of q2301 is always 1.8 V. Note that there is a net PP1V8_ALWAYS (which would always be 1.8 V) on the left but that gate is connected to PP1V8 suggesting that PP1V8 can some times be off. |
H: how to calculate resistors' value?
I'm new to electronic circuit, I'm solving some problems in the book and come across this one, but I cannot calculate the value of Rs and Rp according to the info provided. Can someone help me with this, I solved equations using Thevenin but there is no solution for the value of those two resistors
(sorry for my bad English, I'm Vietnamese )
AI: There are two unknowns: \$R_s\$ and \$R_p\$. I.e. you need two equations.
1st equation:
\$V_g\$ with \$R_g\$ and \$R_s\$ form a Thevenin source with \$V_{Th1} = V_g\$ and \$R_{Th1} = R_g + R_s\$
Transform this Thevenin source into a Norton source: \$R_{N1} = R_{Th1} = R_g + R_s\$.
Include \$R_p\$ to form a new Norton source whose \$R_{N2} = R_{N1} || R_p\$.
Transform it back to a Thevenin source \$R_{Th2} = R_{N2} = R_{N1} || R_p\$.
The resistance of the final Thevenins source is supposed to equal that of the starting Thevenin source, i.e.
\$R_{Th1} = R_{Th2}\$ i.e.
\$R_g = R_{N1} || R_p = (R_g + R_s) || R_p\$
2nd equation:
You get from \$V_g / V_o = 0.125\$
It depends how \$V_o\$ is defined (I think the problem is not clear about this): either with \$R_L\$ attached or without \$R_L\$ connected. I'm not sure which one is the case (the diagramm actually says with \$R_L\$; but \$R_L\$'s value is not given).
In either case use the voltage divider formula. |
H: How do I monitor voltage on a circuit even when switched off?
Here's the situation: I have a baby. Soon, I'll have two. So I don't really like spending half an hour trying to get him to sleep and then somebody rings the doorbell, waking him up.
I've already installed a switch on the doorbell circuit which disables it. I'd still like to know if somebody is trying to ring it though. For simplicity sake, lets say it's a simple light bulb that I'm always looking at, so it doesn't need to stay on. (Just a momentary flash will do).
The diagram on the right is the simple doorbell circuit. On the left, I have my indicator circuit with the 12v relay I assume I'm going to be needing. I believe the relay coil needs to go in parallel with my switch, but I'm not sure if this will work. Do I need a resister between the two?
What am I missing to complete this solution?
****EDIT:** Maybe I did myself a disservice by oversimplifying. The indicator isn't a lamp, it's actually my alarm panel which can monitor for either an open or closed circuit (but not a good idea to put the actual bell on that same circuit). This will allow me to be notified of a doorbell signal by email/text message, or whatever method I choose, even if I'm away from home.
Additionally, I have a dog that barks regardless of whether the doorbell is disabled or not. This is probably outside the scope of the question, however.
AI: The simplest solution is to teach babies to just sleep in a noisy environment. That might be easier said than done though.
As an alternative you could make this which saves some components.
simulate this circuit – Schematic created using CircuitLab
Note that the indicator lamp should not use too much power as it adds to the power needed by the bell. I would suggest using one or more 12 V LED lights, the ones that replace 12 V halogen lamps for example. These are low power and very bright. |
H: Constant Current Source using Fixed Voltage Regulator
I was in the process of building a 2W laser diode driver and I realized after some debugging that I had a 3.3V constant voltage LM1086 chip instead of an adjustable voltage regulator. I intended to build a constant current source that is adjustable up to 1000mA. The following circuit replicates what I put together on the bench using an LM1086 for regulation. Ignore the LM317, I didn't have an TI LM1086 chip to insert into the simulation.
My wrong chip selection made me wonder, can you use a fixed regulator to create a constant current source or do you need an adjustable one?
As an aside question is this approach in general a good method of driving a 2W laser diode or are there better circuit architectures?
AI: Depending on the regulator you can indeed also use a fixed regulator as a current source. The only disadvantage is that the voltage drop across the shunt resistor (R2 in your schematic) will be higher.
That LM1086 looks suitable to me but it will drop 3.3 V (the regulator's set voltage) across R2. Variable regulators typically will output a smaller voltage when the ADJ pin is grounded (like 1.25 V for the LM317) and will therefore also drop less voltage across R2.
So depending on how much voltage the laser needs, you might have to increase the 10 V supply voltage. For a 10 V supply I guess if the laser's voltage is less than 10 V - 1.3 (dropout voltage) - 3.3 V = 5.4 V this should work. R2 would need to be 3.3V/1A = 3.3 Ohms, not that it will dissipate 3.3 W so use a 5 W resistor!!!. Also the LM1086 will need a proper heatsink. |
H: High speed IR connection
Are there any IR receivers/transmitters with speed higher then 4Mbps?
As I found most parts are limited to 4Mbps, like LT1328 (photodiode receiver) and TFBS6711 (infrared transceiver)
AI: There are. The IrDA (particularly, the IrPHY specification) has several levels of IR speeds, which use different modulation schemes. You just have to google a transceiver that supports the modulation speed that you want:
SIR: 9.6–115.2 kbit/s
MIR: 0.576–1.152 Mbit/s
FIR: 4 Mbit/s, 4PPM
VFIR: 16 Mbit/s
UFIR: 96 Mbit/s
GigaIR: 512 Mbit/s – 1 Gbit/s
The first link google shows on "IrDA VFIR transceiver" is Vishay TFDU8108:
http://www.vishay.com/docs/82558/tfdu8108.pdf
Since this is a VFIR transceiver, it must support the 16Mbps connection. The transceivers that you've found are FIR transceivers, which means 4Mbps speed.
UFIR and GigaIR transceivers are way more exotic and rare. |
H: How to increase the output current of LM7805
I wanted to make a solar powered charger for my phone but the current is too low and will cause charging to be slow. So i wanted to ask is there any ways to increase the output current to 2A?
AI: The Photon has already answered your question directly. While that answer is correct, it is not what I recommend.
As The Photon points out, the minimum input voltage of a 7805 with additional pass transistor is probably around 8 V. That means with 2 A output, the whole setup will dissipate a minimum of 6 W. That's a lot of heat to get rid of. Most likely you'll end up running the regulator with more than 8 V in. That results in even more heat to get rid of.
The solution is to use a buck switcher. That will be more efficient, work with lower input voltage, and not dissipate significantly more with higher input voltage. You want 2 A at 5 V out, so 10 W. A buck switcher that is 85% efficient would only dissipate 1.8 W. That will be distributed between several parts, so you probably don't need a heat sink. Due to no heat sink, the result will be smaller and cheaper. |
H: Understanding how Schematic works
i'm starting get into designing some IOT devices for around the house and looking other peoples design on Hackster.io. I've come across several designs that i'm having a hard time understanding. The below picture to me doesn't make sense. My understanding is the the electric flow starts with positive and flows to the negative. On the below picture for example we see GPIO pin 5 (blue wire) connects to resister then flows to the transistor then to the blue wire though the negative side of the led.
I don't know understand how this works since we would need current to flow through the resister then LED. When the developers code execute whatever on GPIO5, isn't this flowing the wrong way? I will go out and say i'm starting at the bottom with basic understand if that.
AI: Here is one channel of your circuit in schematic form.
simulate this circuit – Schematic created using CircuitLab
When the control signal from the micro is high, current flows into the base of Q1 and is limited by R1. This causes current to flow into the top, the collector, of Q1 effectively turning it on. As such current will flow from the power supply through the current limiting resistor R2 and the LED which will light.
When the control signal is pulled to ground, no current will flow through R1 into the base of Q1 so the transistor turns off as does the LED. |
H: compiling vhdl code
I have a source code written in VHDL wich is intended to make an FPGA communicate witch PC via UART and a 8051 microcontroller at the same time the FPGA will be connected to 8051 via data,adresse lines, P3 (for output) the author of source code says
"The code is a simple state machine"
but there is no description of wich FPGA I/O will be connected to wich PC/8051 pin (UART, data lines...)
I have actel proasic3 fpga ,
do i only need to create constraint file for I/O and clock frequency in order to compile the code ?
also i have a 1mb flash memory to be connected to FPGA for code storing ,does it also need a constraint file or its connection are specific ?
source code is here http://txt.do/d4xr1
AI: Yes. You need to provide the IO constraints for the FPGA pads if your board has to work as expected. You will have to extract these IO pad details from the schematics of the board you are using. Also provide a period constraint for the clock as the fundamental timing constraint.
Refer http://coredocs.s3.amazonaws.com/Libero/11_8_0/Tool/des_constraints_ug.pdf
for providing constraints in Libero SoC tool. |
H: Common emitter bjt amp Q point with and without current mirror
What is the real benefit of voltage divider CE BJT amplifier schematic like that? If I use different BJT's in real life with various betta I'll give different voltage drops XMM1. Different betta of real BJT's willn't allow to center the Q-point voltage XMM1 on output curve. Or it's not critical to allow Q-point some drift on output curve?
I'm also tryring to use current source instead R3 to fix Q1 collector current but I can't understand is that schematic usable in real life? And I can't understand how to select R3, R4 values if I know Q1 collector current (that equal to I_ref tuned by R1)?
AI: This EESE site is a huge resource for you. I can't speak much about the contributions of others, as I've not read everything here myself. But here's a short list of my own contributions that might relate either directly or within a reasonable ballpark of your question:
Directly addressing variation of BJT parameters on CE amplifier Q-point
Full-up design steps for CE amplifier, including bootstrapping
Walkthrough of design steps for similar CE amplifier
Another walkthrough of design for similar CE amplifier, including bootstrapping
Discussion of fully bypassed CE amplifier
Different amplifier topology, but worth a look
Discussion of LM380 amplifier approach (not dissimilar to #6)
Starting an amplifier design with different bridging, to an example of a 50 watt amplifier that was professionally designed
Now to your questions.
In the simple CE configuration you provide as the first diagram, the quiescent point will never be exactly at the same precise point with discrete BJT parts. It might be more important if these were DC-coupled (and there are ways to achieve a DC-coupled design using discrete parts.) But these are often shown as AC-coupled, and the shift in the quiescent point is almost always acceptable, so the exact quiescent point isn't at all critical. The resulting DC-bias on the coupling capacitor makes up for any BJT-variation differences.
In the simple CE configuration you provide as the first diagram, it is common to design it without over-dependence on the \$\beta\$ of the BJT. As a result of that approach, it usually turns out that variations of \$\beta\$ between parts in the same family (at worst, on the order of \$\le 50\%\$) has only a relatively small impact on the quiescent point, so long as you've made your voltage divider "stiff" enough. What impact there is, is due to the variations of base current as a loading on the voltage divider's Thevenin resistance. So this is quite predictable, too.
In the simple CE configuration you provide as the first diagram, it is also common to design it without over-dependence on the \$V_{BE}\$ of the BJT. (\$V_{BE}\$ variations are due to saturation current variations, which themselves can vary by a factor of as much as 3 between parts. But since this is part of a logarithm function, the impact is less than you may imagine at first.) This is achieved usually for a different reason -- temperature stability. But it also has another impact, which is to reduce dependence of the quiescent point on \$V_{BE}\$ variations. This is often the larger impact on the quiescent point, though, than variations of \$\beta\$ -- though of course it all depends upon the design goals and the actual design choices that are made.
I'm not sure where your head is at, when replacing the collector resistor with a constant current source. So I'd rather hold short on that until I understand your thoughts here better (perhaps a reference?) (There are reasons one might do this, but probably not using the configuration you show here, and in any case those reasons are outside the scope of what you show in your question.) |
H: Is there such a thing as an ultra low power solenoid?
I am looking for a tiny push-type solenoid that can be driven with milliwatts. The plunger need only move 2-3 mm. Does such a thing exist?
AI: It depends how much force you need. In general, you need quite a bit of current to run even a really tiny solenoid (hundreds of milliamps), and you need to hold that current to keep the solenoid pulled in or pushed out (depending on configuration). The force is proportional to the magnetic field, which is a product of the number of turns and current through the coil - so, you are usually looking at a fair bit of power to operate a solenoid. You could quite easily simulate this in FEMM if you're familiar with using that software.
There are other options for really small linear actuators than solenoids though. Many cameras use really really tiny stepper motors for adjusting lens focus. See this post for more details. I have seen these types of steppers available with leadscrews on AliExpress before. They will need high amounts of current to step, however, you only need to supply that in short bursts when actually stepping - so, you could charge up a big tantalum cap and dump it into the stepper windings at each step, and your average power consumption could still be down in the milliwatts. It wouldn't be fast, but if you're power-limited (such as from running off a coin cell battery or something) it should work.
Finally, there are electropermanent magnet actuators, which can be used as very low-power, very small bistable solenoids and stepper motors. An electropermanent magnet exploits the fact that AlNiCo permanent magnets are pretty easy to demagnetize, and NdFeB permanent magnets are very hard to demagnetize. The AlNiCo magnet is put into a magnetic circuit in series with the NdFeB magnet and ferrous keepers. Flipping the field direction of the AlNiCo magnet with a coil causes the field from the NdFeB magnet to be either confined to the circuit or forced to travel in the air, creating a "switchable" permanent magnet.
These are very cool when used as tiny actuators, but they aren't commonly available commercially, so you would have to build your own. Ara Knanian's PhD thesis is the best resource I've found for the theory and construction of these devices. |
H: pnp differential input stage features
In one book I found that snippet. Can anyone explain me why the input may go below 0?
There is a text with that pic: "The limit here is one diode drop below
ground, at which point the base of Q3 will forward-bias against the substrate." Why one-diode drop is a limit? Why not two diode drops?
AI: Remember bipolar transistors can be thought of as two diodes, point to point in the case of a PNP.
So there is effectively a diode from ground up to each input. That will hold the input at one diode drop below ground if it is pulled negative...
Well.. till the diode burns out it will. |
H: Picking a transistor for a circuit I'm building- Raspberry Pi
I am building a circuit that will connect a raspberry pi to a solenoid. I'm following roughly this schematic: http://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf and modifying it so that it connects to pi GPIO pins instead of an arduino.
I need to pick a transistor, as shown in the schematic. I believe it needs to have at least 2.58 A to match my solenoid, and 5V to match the voltage from the Pi. However, when trying to pick a transistor it gets more complicated because I'm not sure what I need for V-EBO and V-CBO.
Can anyone help me figure out what specifications I should be looking for, or suggest a transistor? This one I found has a VCBO of 80V, but I believe that is too high because my Pi will have a power supply of 5-6V.
AI: V-EBO is the maximum reverse voltage applied between base and emitter. It doesn't really matter for your application because your circuit won't apply a reverse bias voltage to the transistor's base.
V-CEO and V-CBO do matter since they determine the maximum collector voltage of the transistor, and therefore limit the maximum solenoid drive voltage you can use. These voltages are maximum ratings, however - so if you use a 100 Volt transistor to switch 5 Volts, that's perfectly fine.
The BD679 is a bad choice for another reason, though. Its high collector-emitter saturation voltage, V-CE-SAT, means that the transistor will dissipate a large amount of power internally (solenoid current times V-CE-SAT). Your transistor has such a large saturation voltage because it's a so-called "darlington transistor": There's actually two transistors in there to get increased current gain. (Current amplification)
If you used the BD679, it would probably overheat and die.
You might be better off using a MOSFET for your application, since MOSFETs don't have a saturation voltage, only an on-resistance. You'd need a so-called "logic-level MOSFET", which is a special type of MOSFET that has a low turn-on gate voltage, because your Raspberry Pi only outputs 3.3 Volts and regular MOSFETs need about 10 Volts to turn on. The IRLZ34 is such a logic-level MOSFET and it is available on Mouser as well.
http://www.mouser.de/ProductDetail/Infineon-IR/IRLZ34NPBF/?qs=sGAEpiMZZMshyDBzk1%2fWi5%252bqVgN3%252bWS8nD5Xs%252bP1ym4%3d
Connect the MOSFET's source to ground, gate to the Pi's GPIO pin through a small resistor (~100 ohms), and drain to the solenoid. It shouldn't need cooling for this application.
You may also need to add a "pulldown" resistor (~10 kOhms) from the MOSFET's gate to ground to make sure it stays OFF until the GPIO pin goes high. |
H: Why are all log amp examples with common base logging transistors?
I am not experienced with log amps, and am trying to learn about them.
Every log amp article has the base of the logging transistor grounded.
simulate this circuit – Schematic created using CircuitLab
Why not have the transistor as set up as common collector or common emitter?
simulate this circuit
or
simulate this circuit
AI: The common collector approach has the issue that the base current flows into the input of the opamp through the transistor and causes an error that depends upon the hfe of the transistor. Also as shown it will not function - you need to put the collector to a negative voltage.
The common emitter design can be used as in the AD8304 (Datasheet).
The reference voltage to the positive input of the opamp cannot be at zero volts though. In the AD8304 it is raised to about 0.5V to allow operation of the logging transistor. If the input current is from a photodetector this is usually not an issue.
As George points out in his answer a diode connected transistor can also be used fairly successfully. They work much better than ordinary diodes and avoid the excessive gain within the feedback loop of the normal common base approach.
This large gain in the loop creates difficulties in maintaining stability that in turn causes the settling time to be extremely slow at low light levels (I had one design that would work down to -90dBm but take more than a minute to settle). |
H: ADC Amplifier Exhibiting Incorrect Behavior
I am designing a system that incorporates the ADC12DL040 ADC. Page 27 of the datasheet gives the following example schematic for converting a single-ended signal into a 1V +/- 0.5V differential signal as required by the inputs to the ADC:
With the following table for the values of the unspecified resistors:
My signal input ranges from 0-0.5V, so I used the resistor values in the second row. I am trying to simulate the amp in LTspice with the following schematic:
However, the simulation produces the following output, rather than two 1V +/- 0.5V signals:
Any idea where the circuit is going wrong? Thanks!
AI: Something seems really out of whack with that table/ spec sheet... or else I am not getting how that thing interprets differential.
Note it says
VCM, should be in the range of 0.5V to 2.0V and be a value such that the peak
excursions of the analog signal does not go more negative than ground or more positive than 2.6V.
And the signal difference should not exceed Vref = 1V
That makes the table plain wrong....
Try these...
R1 1500
R2 1500
R3 1500
R4 1500
R5 2500
R6 2500
simulate this circuit – Schematic created using CircuitLab |
H: *how* are things triggered on clock rise, fall, high or low,
I know the purpose and function of triggering logic , such as a d flip flop, on certain clock conditions. However, what I have not been able to understand is actually how these "triggers" work. i was thinking maybe to do this you just AND the input with the clock, but I don't feel like this is the right way.
AI: Take a look at a diagram of the simplest type of edge-triggered flip-flop, the D Flip-Flop. It's basically an SR Latch with an extra inverter so that S and R are always complementary states, as well as a clock signal input.
What makes it edge-triggered is that when the clock signal is low, the state of the output will not change. It is only when the clock signal is high that the change in state propagates to the output. You can consider the clock input to be an "enable" input, since it functions like an SR-latch (albeit a kind with only one input) when the clock is high.
If there is data waiting on the input while the clock signal is low, the state will only change once clock is brought high, and so we say that the change occurs at the transition from low to high, or the rising edge. |
H: Arduino Nano + L239DNE + external power supply
I want to build something with arduino and DC motor, so i'm using L239DNE to control speed and direction of the DC motor. Using some tutorial I hooked up everything together, but motor is just not giving out full power, connecting it directly to battery without IC makes it few times stronger.
So thinking that something is wrong with Arduino code or my layout I connected motor to IC using only battery, connected IN1 and ENABLE1 to VCC and IN2 to GND - still with same results, motor spinning much slower than it should.
This is my scheme now:
simulate this circuit – Schematic created using CircuitLab
AI: I doubt you mean L239 ....but actually mean L293
Here's the datasheet
Since you are only using a 6 V DC supply for the motor, you most likely have too low a voltage across the motor for it to work properly.
The output stages drop voltage and you can see from the datasheet you lose about 1.8 + 1.2 = 3 V for the upper and lower driver portion.
If you are using a 6 V motor I'd suggest you need at least a 9 V DC supply.
You could measure the voltage across your motor with a multimeter to verify this is the problem. |
H: Why high current MOSFET is driven with another transistor
As the power rating of the MOSFET is increasing in the case of continuous current and the Max voltage rating, i see people drive the gate of MOSFET with a transistor. Could you explain the reason for.
1)Is it because as the current drawn increases the gate to source voltage increases so a 3.3v logic cannot handle.
2) If so why there is no second transistor at STEVER_A- input.
VCC is LIPO voltage around 10-15Volts**
AI: In this case, its because FDD6637 is a P-FET, which means that to fully turn it off, you want its gate to be as close to VCC as possible, which means probably exceeding the limits of the MCU's pins, so BC817 is kind of serving as a voltage "converter".
It pulls the gate down when on, and when off, R2 pulls the gate up. |
H: Voltage source and two resistors in series, voltage vetween Vs and R1
So, two resistors are in series. So \$ i = \frac{10V}{3k} = 3.33mA \$
So Voltage across R1 should be: \$ V = i \cdot R_1 \$
So it should be 3.33V, no?
Why is it 10V?
AI: The voltage across R1 is the difference between the voltage at the top of the resistor and the voltage at the bottom or the resistor. The voltage at the top is fixed to 10V because it is directly connected to the power supply (there is nothing in between for a voltage drop to develop over).
The voltage between R1 and R2 is 10V - 3.3V or 6.7V. If you calculate the voltage drop across R2 you will get a result of 6.7V confirming this result (the bottom is at 0V because it is the same node as the ground node of the power supply).
When you measure single node voltages in a simulation like this, they are always relative to ground. |
H: Truth Table for 3-into-8 decoder with N.A. inputs, P.A outputs and enable
I'm working on an assignment where I need to draw a block diagram and the gate-level circuit of a 3-into-8 decoder with negative active inputs, a positive active
enable and positive active outputs.
I've drawn the block diagram, but before I draw the circuit, I wanted to do a truth table so that I made sure my logic was correct. And this is where I'm having some trouble. Normally, I think my table would look something like this. But with the inputs having negative active logic, I'm not sure how that will affect my inputs and change the overall truth table. I've always had a lot of trouble figuring out how N.A.L affects the overall circuit; could someone please help me out?
AI: 3-into-8 decoder with negative active inputs, a positive active enable and positive active outputs.
What I like to do for assignments is make a sanity check for at least 3 random cases and see if that checks out, do what I think is correct, then once I'm done, check again, with my first sanity check.
According to what you said, then these 3 expressions should be true:
\$\scriptsize EN = 0, A = B = C = 0 => D_7 = D_6 = D_5 = D_4 = D_3 = D_2 = D_1 = D_0 = 0\$
\$\scriptsize EN = 1, A = B = C = 0 => D_7=1,D_6 = D_5 = D_4 = D_3 = D_2 = D_1 = D_0 = 0\$
\$\scriptsize EN = 1, A = B = C = 1 => D_7 = D_6 = D_5 = D_4 = D_3 = D_2 = D_1 = 0, D_0 = 1\$
Let's continue with the rest.
$$\begin{array}{|c|c|}
\hline E & C & B & A && D_7 & D_6 & D_5 & D_4 & D_3 & D_2 & D_1 & D_0 \\\hline
\textbf{0} & \textbf{X} & \textbf{X} & \textbf{X} && \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} \\\hline
\textbf{1} & \textbf{0} & \textbf{0} & \textbf{0} && \textbf{1} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} \\\hline
1 & 0 & 0 & 1 && 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\\hline
1 & 0 & 1 & 0 && 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\\hline
1 & 0 & 1 & 1 && 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\\hline
1 & 1 & 0 & 0 && 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\\hline
1 & 1 & 0 & 1 && 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\\hline
1 & 1 & 1 & 0 && 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\\hline
\textbf{1} & \textbf{1} & \textbf{1} & \textbf{1} && \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{0} & \textbf{1} \\\hline
\end{array}$$
I've bolded my sanity checks, which checks out. Inverting inputs is evil.
And you got your diagonal wrong in your image.
Here's a sanity check for you that probably got you overthinking things.
\$B = C = A = 0 => inverted => 111_2 = 7\$ |
H: Do PCB fabrication houses bootload/upload firmware?
Lets say for example, if I were to produce 500 Arduino based circuit boards and were going to have them fabricated and assembled by a fab house, do they usually offer a service to bootload the boards or upload code to them before sending them to me?
If so, what is the process called?
AI: Yes, this service is available.
It wouldn't be done by the PCB fabricator. They just etch pretty patterns in the copper and laminate up the fiberglass sheets (and drill holes, coat with solder mask, and apply surface finish).
Your assembly shop might have the ability to do it.
If not, there are other companies who specialize in this work. Normally they'll program the chips (EEPROMS or microcontrollers or CPLDs or whatever) before they're assembled onto the boards.
Depending on the part being programmed, and the volume required, the chip vendor (or a distributor) might also be able to provide the chips pre-programmed.
If your assembly shop doesn't do the process in-house they may be able to sub-contract it to a specialist shop.
In my experience, the process is called "firmware loading" or "EEPROM programming". |
H: Using the same switch for two devices of different signal voltage levels
When I press an ON-OFF type switch (SPST), I would like to have a corresponding HIGH or LOW registered on the inputs of both a 5V-level microcontroller as well as a 10V-level device, without damaging either one obviously.
How would I go about achieving this -- should I use a resistive divider?
AI: Assuming you have common grounds you can use diodes like this.
simulate this circuit – Schematic created using CircuitLab |
H: Can I overlap magnet wire when wrapping a toroid or must it progress linearly around the circumference?
I've been playing with inducing magnetic fields in a ferrite toroid with turns of magnet wire. Can you overlap, e.g. double back over the previous turns so I don't need a larger toroid?
AI: When current flows in a coil there's a magnetic field being generated, this magnetic field has more or less a shape of a donut. It doesn't matter where it starts or ends, as long as the current generating the magnetic field is always strengthening the "donut". |
H: What is a Direct Radiating Collector Amplifier?
Reading the Space Systems/Loral press release SSL Achieves Milestone, 100 Satellites Delivered based on the 1300, a Platform for evolution, innovation I ran across the sentence(s):
It was the first satellite to use a 100-volt bus and Direct Radiating Collector (DRC) amplifiers, providing the higher power needed for direct-to-home television.
It was the first true high-throughput satellite, an advance which now enables millions of people around the world to have access to high speed broadband.
It was the first to reach 20-kW of power, which enables satellite broadcast of today’s HD and UltraHD television.
It was the first satellite to provide two-way ground-based beam forming, which increases a satellite’s flexibility to meet changing business requirements.
(emphasis added)
I'm trying to imagine an amplifier with the collector attached directly to a feed horn for radiation, but I think at these frequencies traveling wave tubes (TWTs) are used.
Question: What is a Direct Radiating Collector Amplifier?
AI: It is a TWT (Traveling Wave Tube). It is a kind of the vacuum tube technology. It has a cathode and an anode (forming an electron gun), a helical amplification structure, and a collector. [It's not a collector of a transistor]. However, instead of standard way to dissipate the collector's heat into spacecraft body by conduction, the collector is designed to cool additionally by direct radiation into outer space. This technique allows to unload the heat transfer into spacecraft body by 50%, see this L-3 publication. Some mentioning of "DRC" advantage can be found in this US patent application, paragraph [0044]. |
H: Ce marking design rules
Does anyone here know anything about ce marking? If I want to design a new electronic product and sell to europe I have to include the ce marking in the pcb. I have found many informations about the design rules for the EMC derictive, but i didn't find much about the Low Voltage Derictive and the Machinery Derictive. I'd like to find some guidelines for the design for these two Derictives.
AI: You have to provide a Declaration of Conformity when importing, and the product must have the CE logo.
With it you declare your design is safe an follows the required regulations.
Eg: does not contain banned materials, is not a fire hazard, safe for humans or has warning signs, does not disturb the operation of other devices with unwanted emitted or conducted interference, does not become unsafe when disturbed by interference.
So many guidelines and regulations that only the very large companies can afford to check and test them all. But you can ask experts for an opinion, or ask a test site to perform EMI emission and immunity tests. Which are the most important.
After all, you don't want to disturb cellular, gps or walkie-talkies.
There is no governing body apart from customs who should prevent importing of non-CE goods. However, if your product caused problems or harm you might be investigated, and possibly taken to court by a public prosecutor. |
H: Single Mosfet driver to drive two N channel mosfet
I am new to the concept of electronic design and require help with my project.
I want to use two N-channel Mosfets to control two 12V DC motors with Arduino's PWM. The PWM frequency will be atleast 10KHz and motors will be running in single direction.
I did some research on how to use a single mosfet driver to run two motors and this is best I have come up with and please tell me if the following circuit is correct,
As my circuit is low side driver, I decided to use Microchip's TC4427A to drive the mosfets IPP45N06S4L-08. TC4427A is a dual non-inverting driver with peak output current of 1.5A and input supply voltage operating range 4.5V to 18V. The non inverting characteristic of the driver will switch on the mosfet when Arduino's PWM signal is high. Am I thinking correctly? (P.S. Since I could not add more than two links, I gave brief description of the driver)
With this arrangement can I control the motors simultaneously? Can this driver provide the same voltage and current required to switch on both the mosfets?
What is gate voltage provided by the driver? Is it same as VDD (in this case 12V)? If yes, what are the changes I have to make to restrict the supply to the gate to 10V?
I have provided 10Ω resistors between gate and driver output? Is this necessary as I read that it reduces the EMI or Oscillations (I am not sure as I do not understand this concept clearly) and improves PWM?
I have provided capacitors between GND and VDD of the driver? Is the arrangement correct? What is the method to calculate its capacitance?
Are there any drawbacks with this circuit? Do i need to be aware of any underlying issues that may blow up the mosfet or driver?
AI: Yes, you can control the two motors individually. Your schematic is missing a dot- generally you should avoid lines crossing as shown- offset one of the wires.
You could add a 10V regulator to reduce the gate drive to 10V but there is absolutely no reason to do so- the gates can handle 16V and 12V is better than 10V for reducing conduction losses.
The series resistors on the gates are a good idea- they can help reduce ringing and overshoot/undershoot that could damage the gate driver and limit the current if it does occur.
The bypass capacitor on the gate driver can be made large enough that the gate charge on the MOSFETs would not change the voltage much. A ceramic X7R cap in the 1uF range is usually good. |
H: Weird follower op amp behaviour
Given the following schema (I'm using isis proteus)
Vin's amplitude is higher than the max and min supply voltages (+/-10V), which gives this graph:
(Blue: Vin, Yellow: Vout)
When Vin is greater than +Vcc, Vout goes to +Vsat, which is expected;
When Vin is lower than -Vcc, Vout goes to +Vsat: Shouldn't it stay in -Vsat??
I tried it in real life and it gives the same result. Why?
AI: It's a behavior called phase reversal. It exist on many but not all opamps.
Basically it works like this: If your input signal exceeds the allowed input voltage range some of the internal transistors in the opamp break down. They shouldn't pass current but you're driving them so hard that they turn on.
The output then flips to the other polarity. Depending on the circuit around the opamp this could even lead to a so called latch-up condition where the output stays at the wrong polarity forever.
In general you should never exceed the allowed input range of opamps. If the phase reversal occurs due to an internal transistor breakdown the transistor may take damage and changes it's characteristics. The OpAmp may seem fine afterwards but it is not guaranteed to work within it's specification anymore.
About OpAmps that may latch-up: Never use them for critical control systems. Think about a heater with temperature control. It senses the temperature and controls a heating element. If your OpAmp is one of those latch-up types it is very possible that at extreme temperatures it runs into latch-up, turns on the heater at full power, stays there forever and burns you house down.
The data-sheet of the OpAmp usually states if it has phase-reversal or if it can latch-up. If this is not mentioned in the data-sheet assume that it does. |
H: Voltage Division when we have a capacitor and resistor in series
I don't understand a particular feature of voltage division. Consider the circuit below (we are trying to find Vo):
simulate this circuit – Schematic created using CircuitLab
Now, if the 10-KOhm resistor was not there, it would be obvious that the voltage across the capacitor would simply be the Source Voltage multiplied by the voltage divisor
Vo = 30 x (40/(40+20))
However, we have a 10-KOhm resistor here in the same branch where the capcitor is. I always understood voltage as "pressure", and whenever voltage meets a resistor, some of that pressure is lost forever (i.e. until the current flows back into the voltage source).
Thus, in this case I would be inclined to think that the 10-Ohm resistor "eats up" some of that voltage and thus the Voltage across the capacitor would not be found using the classic voltage divider.
Well, I am wrong apparently, since the solution to this circuit is indeed given by the voltage divider.
So how come the 10-KOhm resistor does not affect the voltage across the capacitor?
AI: In the steady state analysis you treat the capacitor as an open circuit.
As you now realize, this means there is no current flowing through the 10K resistor, and as a result Ohm's law indicates that there is no voltage difference across the resistor. |
H: 12V LED, Buzzer, and 4 Switched grounds enter a Bar
First posting so I will try not to step all over the rules. Notice: I am a novice.
My project is 12 volts DC and to have a buzzer activate when any of 4 LEDs are illuminated.
I have a few restrictions:
I do not have access to the buzzer ground
My signal is a switched ground coming out of a Transmission Control Unit
I can not have all LEDs illuminate when one signal has continuity to ground.
I have access to 280 SPDT Micro relays (like this) and an assortment of diodes, resistors, and capacitors.
The LEDs have a 1/4 watt 6.2K OHM resister +- 1%
The buzzer in question.
My research seems to point me to a combination of diodes (like the LEDs), maybe a bridge rectifier, and a 10 contact NAND gate?
I think what I want to do is have a diode tapped off each LED ground that all attach to one side of the bridge rectifier. The other side of the rectifier kicks over (POSN. 86) of a 1.2 watt relay that can supply more power to the buzzer.
Here is a schematic.
simulate this circuit – Schematic created using CircuitLab
AI: My project is 12 volts DC and to have a buzzer activate when any of 4 LEDs are illuminated.
We'll assume that we have full access to this part of the circuit.
I do not have access to the buzzer ground.
We'll assume that you mean that it's grounded by its mounting or buried in the dashboard and you can only switch the positive.
My signal is a switched ground coming out of a Transmission Control Unit
I'll assume that this is a vehicle transmission.
I can not have all LEDs illuminate when one signal has continuity to ground.
It seems that you are saying that the controller switches the LED negative.
I have access to 280 SPDT Micro relays (like this) and an assortment of diodes, resistors, and capacitors.
280 relays should be plenty.
The LEDs have a 1/4 watt 6.2K OHM resister +- 1%.
The tolerance is irrelevant.
My research seems to point me to a combination of diodes (like the LEDs), maybe a bridge rectifier, and a 10 contact NAND gate?
A bridge rectifier is used to convert AC to DC. Further research required. Diodes are useful to prevent back-feed from one circuit to another.
I think what I want to do is have a diode tapped off each LED ground that all attach to one side of the bridge rectifier. The other side of the rectifier kicks over (POSN. 86) of a 1.2 watt relay that can supply more power to the buzzer.
simulate this circuit – Schematic created using CircuitLab
Figure 1. Diode-relay logic solution.
How it works:
With all TCU switches open there is no negative for the relay so it switches off and the buzzer stops.
If any of the TCU switches close then one of the diodes D5 to D8 will provide a ground path for the relay. The other three diodes will be "reverse biased" and prevent the other three LEDs from turning on.
D9 is called a "free-wheeling" or snubber diode and provides a safe path for the relay induced current to flow at the instant of switch off. It eliminates any risk of damage to the other diodes and LEDs.
Any small rectifier diodes will suit. e.g., 1N4001 diodes are rated at 50 V, 1 A which is well above anything they will see in this application. |
H: What is the significance of this symbol?
What the significance of this symbol?
It's part of 17IPS61-3 26" to 40" LED Slim Integrated Power Supply, and the whole datasheet can be found here.
AI: Further to Billy and Trevor's test-point suggestion, the test points may be designed for a pogo-pin test fixture and some special PCB "pad" assigned for the function.
Figure 1. A PCB test fixture with pogo-pins allows simultaneous and rapid connection to multiple points on the circuit. Source: Spehro Pefhany's answer to Is there such a thing as a pin (or pogo pin) clamp for testing?.
Such a system might, for example, allow automated testing of your power-supply board under various conditions such as lower and upper limits of the supply voltage, no-load, half-load and full load on the output and testing control inputs and monitoring outputs. When I first saw National Instruments equipment thirty years ago this seemed to be a large part of their business.
Figure 2. Pogo-pin test pads on a PCB. The quantity of test pads in this case suggests that the designer is not all that confident!
See What parts would one typically use for automated PCB testing? for more details and photos of pogo-pin types. |
H: ASM Chart for synchronous system
I have an ASM chart design problem that I've been stuck on for ages:
A lift in a building only has a maximum capacity of 2 people. Two sensors detect people entering (input ENTER) and exiting (input EXIT) the lift. A system is required to implement the following conditions:
a)If more than 2 people enter the lift, an alarm should sound. Otherwise, alarm should not sound.
b)If there are no people in the lift, the lights should be turned off. Otherwise, the lights should be switched on.
Assume a maximum of 1 person can enter or exit the lift during any 1 clock cycle. Assume that nobody will try to enter the lift when the alarm is sounding.
How would i go about producing an ASM chart to describe the conditions above?
I know this is quite a trivial problem but any help would be much appreciated.
AI: You'd need four states: "Lift empty", "1 person in lift", "2 persons in lift", "3 persons in lift".
Every time the ENTER signal becomes activated, the state machine has to switch to the next higher state, since one more person is in the lift. (Except when it is in the "3 persons" state because there's no higher state, but nobody will enter the lift when the alarm is sounding anyway)
Every time the EXIT signal is activated, the state machine has to switch to the next lower state, except when it already is in the "empty" state of course.
If none (or both) of the signals are activated, the state machine has to stay in the same state.
If the state machine is in any state except for the "empty" state, it should activate a "LIGHT" output. If it is in the "3 persons" state, it should activate an "ALARM" output as well. |
H: Colliding fasteners in electronics retrofit project
I have a mechanical problem with securing a Mini PCIe card into an adapter which then goes into a legacy product's connector.
Look carefully at the orange PCB in the picture below and you'll notice that the screw passes through a cranked out "wing" that sticks out of the side of the adapter and fouls the pillar in the legacy product...
If I tilt the adaptor by 1.85 degrees or so then I can clear the pillar but I'd rather have the Mini PCIe laying parallel to the carrier board if possible.
Our normal method is to use M2.5 machine screws, nuts and washers, but in this situation an existing M3 pillar is colliding with the new M2.5 screw, so I need an alternative.
Is there a fastener type that can fit a pair of concentric M2.5 mounting holes but leave minimal material sticking out of the holes?
Notes:
There is almost no wiggle-room to move things around, the legacy device was never anticipated to have to support this new device and so I'm basically painted into a corner. I have no more than 0.5mm freedom in any axis on any feature!
Doing it this way means I don't have to take the legacy device's threaded pillar out. Removing that pillar would be a major hassle during the upgrade of hundreds of units. With this hack I can reduce a 15 minute installation to less than 3 minutes! But it is still a hack and that's nagging away at me.
Edit: @Transistor's suggestion looks like it'll do the job...
Might put a dab of silastic in the gap to stop it rattling :)
Final outcome: success! Nice one @Transistor :)
AI: From the comments:
The countersunk screw from beneath is a no-go, unfortunately. There's an assembly paradox here as well, the adaptor has to be installed before the new PCIe device can be attached to it. If the screw head is underneath then you can't get a screwdriver in there.
We're not beaten yet!
Figure 1. Insert countersink screw from below and add a locknut to leave a male "stud" sticking up from the orange board. A dab of super-glue might help.
The orange board can now be installed first.
The blue module positioned and a nut and optional washer added to the top. If there is a risk of over-flexing the top unit then add a space between the lock-nut and the blue board. |
H: What's causing my microcontroller LED program to stop working?
So, I am a COMPLETE and utter novice at programming. I have done some basic stuff on Arduinos (literally toggling LEDs and displaying something on an LCD) and I am trying to self teach myself how to program in C. I am a hardware engineer by trade, but it bothers me that I can't do any of the firmware/software side and there are no evening courses to teach it, and I'd like to further my career options. I am struggling to understand how some of these commands go together and have run into an issue that I just can't get my head around why it isn't working.
So, I have an input and an output. My output is toggling the gate of a FET which turns an LED on. The input is coming from an AND gate. So, my LED is always on, and when I get an input signal from the AND gate (2 conditions have been met) I want the output (LED toggle) to go LOW (turn off the LED. As the output is also connected to one of the AND inputs, this will also turn the input signal LOW.
What I want to do: I just want to read the input as 'conditions met' and turn the LED off. It should then be off for 1 second, and turn back on. If the input goes HIGH again, the process repeats. I am using a simple push to make switch as the other AND gate input and have measured that the output (MCU input) goes high when the button is pressed, yet the LED toggle (output) will not turn off. My code is (I think) pretty damn simple, but clearly I don't understand something correctly as it just isn't working.
So this is the code I am using:
#include "mbed.h"
DigitalIn ip(D7);
DigitalOut op(D8);
int main() {
if (ip == 1){
op = 0;
wait (1.0);
op = 1;
}else{
op = 1;
}
}
And to me, that seems logical. In the usual state, the output is HIGH. If the input gets the signal from the AND gate, the LED will turn off for 1 second, then turn on again.
What is it I've done wrong as that looks like the logical way to do it and I just can't understand why that doesn't work?
If it helps, I am using the Nucleo F103RB. When I use the 'blink' code and just toggle the LED on and off like that, it works fine, it's just when I add the 'if' statement that it goes wrong.
This is the simplified circuit:
simulate this circuit – Schematic created using CircuitLab
PS I know I didn't add them in the schematic, but the AND gates do have pulldown resistors on the inputs and output.
AI: I would have thought that you would need a loop around your code -
while(1)
{
if (ip == 1){
op = 0;
wait (1.0);
op = 1;}
else {
op = 1;}
}
Before you have chance to press the button you code will have finished and exited. You need the while to keep the if statement repeatedly running. |
H: Current limiting resistors for preventing shorts at power supply turn-on
In a text it mentions about a power supply that the filter cap will act as a short at initial turn-on. Below I showed these points as A and B:
In this case, the diode will have a surge current Is. And the text says this Is current should be limited by a resistor between the transformer and each diode.
But in practice isn't transform's winding enough to limit this current? What is the typical value for this resistor lets say for a 24V power supply? Im asking because I dont see any such series resistors in examples. Im wondering is it fine to neglect it.
AI: Stating that this current should be limited by resistors indeed ignores the fact that the current is already limited by the transformer winding's series resistance, the diode's series resistance and the capacitor's ESR. Often there is a fuse present as well and don't forget the resistance of the wires.
Also, the current might not need to be limited if it is within limits already.
Also, what would break first if the current is too high? My guess is that the diodes would break first. Most rectifier diodes can handle very large currents for a short time. Like the 1 Ampere 1N400x series diodes can handle peak currents of 30 Amps.
A resistor value for a 24 V supply cannot be given as it depends a lot on the maximum current which that supply is designed for and what other components are used. |
H: Use a single GPIO for Multiple Uses (TMS320F2803x MCU)
My question is regarding a pin(s) on an MCU, specifically a TMS320F28035, that has multiple functions. Pins 57-60 of the 80-pin QFP version of this MCU are GPIOs but also douple as JTAG pins TCK, TDO, TDI, and TMS, respectively. In fact even the TCK pin could also be an XCLKIN, but that isn't where I am going to take this discussion. Here is the actual question:
If JTAG is only used when I initially program the MCU, or diagnose issues in units that were deployed in the field, could I use the pins as GPIOs when not being used for the JTAG function? Is this a bad practice? If I can do this, is there a good way to do it through firmware?
A quick thought on the firmware approach, I was thinking of using a flag on the TRST input, which is a dedicated pin, that way if 1 (connected to JTAG) use the above GPIOs as JTAG pins, else if 0 use GPIOs for other functions.
Thanks in advance for any help!
AI: This is typically fine, and also done in practice.
As you have already figured out, and the fine documentation tells you, you need a way to make sure that any peripheral circuits you connect to the affected pins are not causing mayhem when they see their inputs toggling at random, and make sure that they don't drive the pins unless specifically told so.
You must also look at the drive strength. For example, you may have an MCU that can drive an LED at 10 mA directly from a GPIO. While the LED would not care about a test signal driving it, the JTAG adapter will likely not be able to drive the extra load that the LED demands.
Another issue is when you're standing in the field to debug something, and realize that you have connected an essential functionality to one of the debug pins, so they can't operate simultaneously. Try to have less important functions here.
In summary: It's ok, but don't use them for critical functionality or load them down. |
H: Delay current flow
I'm trying to achieve something seemingly simple. I have a contact (button) that I upon pressing should wait a few seconds before actually allowing current to flow through. For this purpose I'd need some expensive button that I'm not really sure I will find, or I need to just put another component after the button that does the delay part. I searched for such components but without luck.
Is there any component that will allow me to delay current flow by couple seconds and then conduct as if it were just an ordinary conductor?
AI: One way to handle this is have the button be a input to a tiny microcontroller, then have that micro control a relay. The micro does the timing and possible de-glitching of the button.
The cheap and tiny PIC 10F200 can do this easily. It comes in a SOT-23 package, which is the same package individual transistors come in. The button can be wired to a input pin directly, since some pins can be configured with internal weak pullups. The output could drive something like a logic-level N channel FET, which would enable the relay.
All together, the total parts would be:
Pushbutton.
Microcontroller.
Bypass cap for the micro, like 1 µF 10 V ceramic.
N channel logic-level MOSFET, like IRLML2502.
Relay.
Reverse diode across the relay coil, like 1N4148. |
H: ATtiny13A's timer appears to be very inaccurate, is it normal?
I wrote this blink program for my ATtiny13A and tried to measure the accuracy with an Arduino Uno but the timer seems to be quite inaccurate.
On the ATtiny I am running on the internal 128KHz clock and using timers to make pin0 high and low at a frequency of 1Hz.
Here is the ATtiny code:
int main(void){
DDRB = 0;
TCCR0A = 0;
PORTB = 0;
DDRB |= (1 << DDB0); // pin0 output
TCCR0A |= (1 << WGM01); //CTC mode
TCCR0A |= (1 << COM0A0); //toggle OC0A on compare match
TCCR0B |= (1 << CS02) | (1 << CS00); //1024 prescalar
OCR0A = 124; //1Hz @ 128KHz internal clock
while(1){
}
return 0;
}
On the Arduino, I am using interrupts to measure the time between each high/low signal. It's a standard Uno with an external 16Mhz crystal. Here is the Arduino code:
unsigned long lastHigh = 0;
void setup() {
Serial.begin(9600);
const byte interruptPin = 2;
attachInterrupt(digitalPinToInterrupt(interruptPin), myISR, CHANGE);
}
void loop() {
}
void myISR(){
unsigned long temp = micros(); //store it ASAP to minimize delay
Serial.println(temp - lastHigh);
lastHigh = temp;
}
I have pulled the pin 2 on the Arduino to ground with a 1K resistor, and connected it to pin 0 of the ATtiny13A.
I was expecting to read a perfect 1s between each blink but here are my readings (in microseconds):
1063616 1062696 1063608 1062696 1063636 1062692 1063608 1062680
1063576 1062580 1063512 1062676 1063576 1062660 1063584 1062680
1063580 1062672 1063596 1062700 1063596 1062688 1063604 1062680
1063596 1062612 1063528 1062668 1063580 1062680 1063588 1062684
As you can see, the timer is not only ~60 milliseconds off, but it also jitters a lot.
I read on the internet that the internal clock is inaccurate but I'm not sure if ~60ms is too inaccurate or not.
Other than being off, the timings are also very jittery. They go from as low as 1062580 to as high as 1063680 microseconds.
I'm quite inexperienced and am really curious if this level of inaccuracy is considered normal or not. I found it odd because 1000us jitters make the micros() or _delay_us() functions quite useless.
AI: So, you're seeing about +6% deviation, and ±0.05% jitter.
The devation.
I couldn't find anything on the internal 128kHz oscillator, but the 4.8/9.6 MHz internal oscillator has a default accuracy of ±10% at a specified voltage and temperature. See section 18.4.1 (page 119) of the datasheet:
I suspect the 128kHz oscillator to be similar, so I suspect +6% is in-spec to me. You can calibrate the internal oscillator to get better accuracy, see Atmel appnote AVR053: Internal RC Oscillator Calibration for tinyAVR and megaAVR Devices.
You should also look at the way you're using the timer; You have no interrupt handler defined, so I believe you're causing a soft-reset of the tiny when the timer expires. This means any avr-glibc initialization code is re-run, as is your timer setup code. This will take some cycles and increase your cycle time, causing a positive deviation.
Try setting up an ISR which does the blinking, and see if that makes a difference. Or even try a calibrated delay loop instead of the timer.
The jitter.
As for the jitter, ±0.05% sounds like quite a lot to me. But to be honest, I'm not sure exactly how stable those RC oscillators are.
A significant suspect is your println() and serial transmit. println() has to do a fair bit of work converting your number to base-10, and the exact amount of work depends on the number being printed. Also, the serial transmit has to sync up with your computer and this may cause delays that are semi-random to your Arduino.
Try storing 20 or so measurements in memory and only using Serial.println() on them after all measurements are finished.
Also, I'm not entirely sure how accurate Arduino's micros() is. Maybe there's an accuracy problem there. If you have access to an oscilloscope, you could use that to measure the tiny's output frequency instead, cutting out the Arduino as a possible source of errors.
Update! LED power draw influences RC oscillator?
Aha, I noticed a pattern in your jitter! You are measuring 10636xx and 10626xx in an alternating fashion. So most of your jitter is a 1ms variation between even and odd cycles.
I suspect this may be because you're turning on an LED, which draws current, which affects the resonance in the RC tank used for the internal oscillator. That would be interesting.
Can you try repeating your original measurement run two more times, once without the LED, and once with?
If removing the LED makes the problem go away, you might want to use lots of decoupling on the tiny, and avoid having the tiny drive loads directly but always buffer outputs with transistors. If the clock accuracy is important enough for the situation, anyway. |
H: Is there a low-cost alternative to RJ45 cables for large number of signals?
We are designing two interface (printed) boards and need to connect them by cables (0.5-1.5m). So we're thinking about which connectors to use. We'd like to use twisted-pairs like in a RJ45 cable.
The problem is, we are talking about 200 signals (-10V to +10V), which would require 50x RJ45 cables.
Alternatives I know of are RJ21 or DSUB-50 cables, with 50 pins, 2x25 wires each. Buying them is way too expensive (at least in Germany, it would be around 450€ or more for 8 cables) and soldering 800 contacts is considered too much work for now (+120€ material). For comparison, we could get 50x RJ45-cables out of the box for 70€.
So I wonder if there is an alternative? Are there any cable standards which are as reliable and cheap as RJ45, but suitable for a larger number of signals? (If there wouldn't be the twisted pair condition, flat ribbon cables would be a good choice).
For the maximum frequency of the signals one could assume something around 200-500 kHz, the impedance of the cable should not matter too much, as the entry impedance of the end device is 1 MOhm (but I'm far from an expert in this matter).
Further clarification:
We have about 60 analog signals and about 100 digital ones, just some of them have a high frequency and stiff edges, a lot others are just rarely changing signals for controlling a state space machine. About 40 of the 200 "signals" are actually ground.
I'm not searching for an improvement of the basic setup as it cannot be changed. Behind the interface boards directly follow the end devices. Apart from some little amplification and filtering of the analog signals, the purpose of the interface boards is to collect the signals of all sensors and actuators and redistribute them, to enable better cabling.
The system basically looks like is:
As the DSUB-50 connectors of the right system do not provide the possibility of twisted pair wiring in most cases, the idea was to directly connect the DSUB-50 with an interface board (without cables) to offer better suited connectors.
AI: There are ribbon cables with twisted wires:
Every few cm, there is a flat section to allow attaching an IDC connector.
Looking at two product drawings it appears to be pretty typical to have 50 mm of flat cable out of every 500 mm. |
H: Retrieving data from Agilent 34401A Digital Multimeter over the RS232 interface
I want to interface Agilent 34401A Digital Multimeter over the RS232 interface. The settings (baud rate, parity, number of start and stop bits) are set to be same on multimeter, pc (device manager) and on the application that I use for terminal. Programming language is SCPI.
I successfully control the multimeter, that is I execute the commands such as: syst:rem; :meas:volt:dc? 10, 0.003; :conf:volt:dc 10, 0.003; :sens:volt:dc:rang 100; but I get no response over RS232 interface from my multimeter.
For example when I execute the command :meas:volt:dc? 10, 0.003; the measurement is performed and the voltage is displayed on multimeter’s display, but the value is not sent over RS232 to my terminal. No response what so ever.
In the manual for the multimeter there is a statement after each command -- “bus enter statement". Relevant extract provided below.
I could not find any reference or explanation what is meant by this.
Does a special command exist for retrieving data from the multimeter?
:read? makes no effect on the multimeter.
Useful hint for someone who is also trying to set up RS232 communication with this device: Even if in the manual the colon preceding the SCIP command is not given, the multimeter returns “unknows header” error if it is not present.
AI: The problem was in the way I send a command over terminal. After a command the multimeter expects line feed character, in PuTTY this is <ctrl-j>.
The code below successfully gets response with a value of a voltage.
syst:rem;
:meas:volt:dc? 10, 0.003;
<ctrl-j>
I found solution reading through this forum question:
https://www.eevblog.com/forum/testgear/34401a-serial-interface-problems/ |
H: Determining current draw and Ah requirements from a multi-component system
If component one draws 300ma in a steady state, and component two draws 150ma in a steady state, and component three draws 25ma in a steady state, that is a total nominal draw of 475ma while the system is in a steady state (user defined of course).
The question is, if you ignore transient changes in current, off/sleep state, temperature, or any myriad of nuanced considerations that must be made,
1) is this a rough, first pass way to determine total current draw from multiple sources being run by a single power source, and
2) determine battery capacity for a desired run time? aka, 4.75Ah capacity for 10 hours in this scenario.
AI: If component one draws 300ma in a steady state, and component two draws 150ma in a steady state, and component three draws 25ma in a steady state, that is a total nominal draw of 475ma while the system is in a steady state (user defined of course).
Correct. The current the power supply delivers is the sum of the load currents.
300 mA + 150 mA + 25 mA = 475 mA.
The question is, is this a rough, first pass way to determine total current draw from multiple sources being run by a single power source,
Even better: it's as good as the current measurements are. That's the way the professionals do it.
2) determine battery capacity for a desired run time? aka, 4.75Ah capacity for 10 hours in this scenario.
Correct. Current x time (in hours) = Ah.
Just remember that for most battery applications you should allow for more than it says on the tin. Batteries degrade over time and generally last longer if you don't discharge them completely - particularly in multi-battery packs as the first to get depleted then has reverse current driven through it by the others. As a result you might go for 1.5 x Ah estimated. |
H: Noise in current mirror
In most CMOS applications, the use of resistive source degeneration to
reduce noise and improve matching is restricted due to headroom
constraints.
A) Could anyone elaborate on this statement extracted from "Ultra High-Compliance CMOS Current Mirrors for Low Voltage Charge Pumps and References" ? Besides, how do we obtain the equation of output noise current = (16/3)KT*gm in the same document ?
B) For http://www.ele.uri.edu/courses/ele447/Slides/CurMir/Chapter_07.pdf#page=78 , the Thevenin resistance would be 1/gmREF in series wth Rb, right ? If so, why there is a factor of (1+gmREF*Rb)2 in the denominator ?
AI: how do we obtain the equation of output noise current = (16/3)KT*gm in the same document
The thermal noise in the drain current in a MOSFET is given by:
$$\overline{\frac{i_{nd}^2}{\Delta f}} = 4kT\gamma g_{d0}$$
For transistor in saturation region \$\gamma = \frac{2}{3}\$ and \$g_{d0} \approx g_m\$, thus noise current (PSD) in each of the transistor of the current mirror is given by \$\frac{8}{3}kTg_{m}\$. Since the current in M1 (in the document you are referring) is mirrored at the output, noise current will similarly get mirrored. Since the two noise sources are uncorrelated their PSD (variances) will add giving a total noise current of \$\frac{16}{3}kTg_{m}\$ at the output.
why there is a factor of (1+gmREF*Rb)2 in the denominator
The input impedance of the \$M_{REF}\$ seen from its drain/gate is \$\frac{1}{g_{mREF}}\$. The voltage at the capacitor will be given by a simple voltage divider equation:
$$V_{C} = \frac{\frac{1}{sC}}{R_B + \frac{1}{g_mREF} + \frac{1}{sC}} = \frac{g_{mREF}}{s(1+g_{mREF}R_B)C_B + g_{mREF}}$$
Thus noise sources from reference current and \$R_B\$ will be filtered by the above transfer function and then will be amplified by \$g_{m1}\$ before getting to the output. The noise from the transistor \$M1\$, though, appears directly at the capacitor output and will not be filtered by this transfer function. Again all the noise sources are uncorrelated so we add the PSD's. |
H: Looking for a fully internal one-time switch
Edit/tl;dr: What are some alternatives to reed switches?
I'm looking for a switch that can be closed one-time that doesn't require any case penetration. The design is inside a water-proof enclosure. The switch goes between an 18V, 25Ah battery and some electronics. I'm obviously aware of reed switches, which seem like the perfect solution, but I'm concerned about reliability.
The application is a scientific instrument which is deployed in the ocean and is not serviceable. The switch is necessary because the device is in-transit/storage for sometimes more than 1 year. The device operates for approx. 2 years on this battery.
I've done a lot of searching on this topic. I'm convinced I just do not know the right terminology to get me to my goal. This post most widely breaches this subject with lots of great suggestions but no great solution.
What I really want is something like a fuse, only instead of opening when it 'blows' it would close. This can be a complex circuit or a simple device, the only requirements are low power consumption(10's of uA or less) and no case penetration.
AI: You could use a P-MOSFET and a fuse as shown in the circuit below.
simulate this circuit – Schematic created using CircuitLab
However, that is a one shot deal and open to accidental enable and you would not be able to power it up to test it and shut it down again. The circuit also has a small trickle current when the power is off.
Instead you could use a P-MOSFET in a latching circuit as shown below.
simulate this circuit
When the on switch is pressed it will pull the output up to the battery voltage which starts charging C1. When this charges up to the minimum Vgs of M2 the latter will turn on pulling the gate of M1 low latching the circuit on. I have shown values that require pressing the button for 5s to latch it on.
Pressing the off switch immediately turns off M2 and M1, then C1 begins to discharge through the load. Once it discharges enough, again around 5s with a 10K load, you can release the off button and the power will stay off indefinitely.
You should play with the charge and discharge paths to get it the way it needs to be for your load.
OR.. you could just bring the power to two insulated bolts that go through some bulkhead and slap a jumper across them when you want to power it up and then slap silicone over it... |
H: "Measure" voltage directly between two circuit nodes in a simulation
How could you measure the voltage difference between two nodes in a circuit simulation? For example, for the following differential pair I wanted to check if the differential-mode gain is -120. I used a big resistor, R_sense, and put it across the individual outputs like below.
Then I measured the current through it and the rest you know. It worked very well and let me find the differential gain. But I would like to know if there exists a built-in solution for that? For example, I want to be able to click on two arbitrary nodes and immediately see the voltage difference on the plot window. I searched but didn't find anything.
AI: Click on voltage point 1 - hold down your left mouse button - drag to voltage point 2 - release. You can also manually type in your expression for the waveform V(node1)-V(node2). |
H: 4.4V vs 3.7V LiPo -- Is there such a thing?
I was looking through a very legitimate well known product, noticed the battery pack is stamped with 4.4V. I think this is actually the nominal voltage it provides.
The reason I think that is that this is a $100MM+ company, and I know from professional experience, LiPo battery markings and regulatory compliance has gotten extremely tight in the last few years when you ship batteries in products. These guys ostensibly are dotting all the i's and crossing all the t's.
The 4.4V stamped battery, has a much higher mAh stated amount than any corresponding 3.7V LiPo, on a volume basis, then we've ever been quoted.
Is there such a thing as a 4.4V LiPo?
PICTURE AS REQUESTED:
AI: 4.4 V and 3.7 V here refer to different characteristics.
3.7 V is the nominal voltage (average voltage during a complete discharge) of a "traditional" LiCoO 2 -based lithium ion cell. Such a cell typically has a minimum voltage around 3.0 V, a maximum voltage around 4.2 V and a nominal voltage between 3.6 and 3.7 V.
4.4 V refers to the maximum voltage of cells with an improved anode that can endure higher voltages. These cells tend to have a similar minimum voltage, but the maximum voltage is between 4.35 V and 4.4 V. Since they can be charged further, the nominal voltage is also increased to around 3.8 V. This improvement is achieved with silicon and graphene -containing additives
In the radio control world these are explicitly marketed as "LiHV" etc, but they are increasingly common in all sorts of products like mobile phones.
There are several research papers on the subject, e.g. http://m.jes.ecsdl.org/content/164/1/A6075.abstract |
H: Unknown "GG6M" smd integrated circuit
I bought 6 month ago a controller for a screen (T.VST59.031) https://fr.aliexpress.com/store/product/Free-Shipping-T-VST59-031-V59-universal-definition-LCD-TV-panels-HDMI-LCD-driver-board/1270386_32510541373.html
Everything worked fine until now, one 5-pin integrated circuit broke.
I managed to get it out of the board and it was written on it "GG6M". But I can't manage to find anything about it on the internet.
I know it has something to do with the transmission of the power signal because the red led indicating that the screen is powered but off is working, but if I try to turn on the screen using the IR controller or the power key, the led stays red and the screen doesn't start.
Here are some screens : https://i.stack.imgur.com/Zf6bc.jpg
The whole board
A close view of where the integrated circuit was after I took it off
A close view of the integrated circuit before I took it off
Another view of the area where the circuit was
Do you have any idea of what it could be or how I could find it out ?
AI: It could be a LC3406 Synchronous buck converter: datasheet here.
According to the datasheet, this chip is in a SOT-23-5 package, which really looks like what you have, and has a "GG" marking followed by two characters indicating year and week, which is consistent with what you have.
We see a big inductor next to the chip, two resistors that look like a feedback network, and what certainly is an input capacitor, and if we check the tracks layout on your photos, it is all consistent with the pinout described in the datasheet.
For info: I went on this site to find this information. But there are plenty of other sites/databooks referencing component markings. |
H: Question Regarding Series and Parallel Circuit
Stack Exchange members, I am new to this stack, so please allow any formatting errors. My question is that what is a 'bank' in the following statements:
'3 out of 12 resistors in one parallel bank'
'2 resistors in a bank that is series with 1 resistance'
I personally think that it is a synonym for a branch in a parallel circuit, but what are your thoughts?
AI: Bank seems to be equivalent to "parallel" eg 2 resistors in parallel that is in series with another resistor. |
H: VHDL Flip Flop Syntax Error
I'm trying to figure out how to VHDL, and am having some difficulties writing a simple flip flop. I want a T flip flop that runs strictly off of the clock, changing state every time it receives a rising edge.
The syntax errors are somewhat cryptic and I'm having difficulty figuring out what is wrong.
library lattice;
use lattice.components.all;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity blinker is
port(
clk : IN STD_LOGIC;
ledout : OUT STD_LOGIC
);
end blinker;
architecture Behavioral of blinker is
signal ledState: STD_LOGIC;
begin
process(clk)
begin
if(rising_edge(clk)) then
--if clk'event and clk='1' then
if ledState = '1' then
ledout <= '0';
elsif ledState = '0' then
ledout <= '1';
endif;
endif;
end process;
ledout <= led_state;
end Behavioral;
I attempted two methods of running on a rising edge, neither seemed to make a difference. This is what the output looks like:
I'm completely lost at this point. What am I doing wrong here?
Thanks!
AI: You have a few issues:
1. endif; should be end if;
2. You already have assignments to ledout within your process, but then you attempt to assign a value to it again in the last line ledout <= led_state;. You can't have multiple drivers for a given signal.
3. Your code is a little over-complicated. You can simplify the toggle of signal ledState like so: ledState <= not ledState; without the embedded if/elsif clause.
4. One of the error messages is pointing out a typo you made in the last line ledout <= led_state;, where I think you meant ledout <= ledState;
Try this instead:
library ieee;
use ieee.std_logic_1164.all;
entity blinker is
port(
clk : IN std_logic;
ledout : OUT std_logic
);
end blinker;
architecture Behavioral of blinker is
signal ledState: std_logic := '0';
begin
process(clk)
begin
if(rising_edge(clk)) then
ledState <= not ledState;
end if;
end process;
ledout <= ledState;
end Behavioral;
RTL |
H: Multiple Transistors (FinFET) sharing a gate?
Transistors are among the most fundamental components of electronic devices, and that to produce transistors with better performance, FinFET transistors have been developed:
This allows for better control over the channel between the source and drain of the transistor. What is preventing us from using multiple transistors that share the same gate?
I believe that this could allow for some more complex/efficient analog design in circuits. Does it affect the electrical performance of the transistors?
My questions:
Is this design actually in practice?
If not, would it be beneficial for this design to be used when applicable?
How would this affect electrical performance, if the effect is not negligible?
AI: Since the channel width is determined by the height (and also by the thickness, which you want to keep small) of the fin, if you want a large W/L ratio (to achieve, for instance, a larger drain current), then you need to create multiple-fins finFETs, resulting in many finFETs in parallel.
In the picture above, the distance between drain and source (i.e. the width of the blue gate, along the fin axis) is channel length. The quantity \$2\cdot H_{fin}+T_{fin}\$ defines the channel width.
You might also want to share the gate (without connecting both the sources and drains in parallel) in other applications, such as memories or logic functions.
Here is a electron microscopy of many finFETs sharing the same gate.
As a last remark: I know that this would be quite difficult to render graphically, but in your picture, the thin dielectric layer, which separates the substrate from the gate, is missing! |
H: Why is the gain of this LC two-port network infinite?
Consider the following two port network, where a voltage is measured across the output terminals (no current), and the input is connected to an AC power source:
Calculating the voltage gain of this circuit using the impedance divider rule for series components gives:
\begin{align}
\frac{V_{out}}{V_{in}}&=\frac{Z_C}{Z_C+Z_L}\\
&=\frac{j\omega L}{j\omega L + \frac1{j\omega C}}\\
&=\frac{j\omega L}{j\omega L - \frac{j}{\omega C}}\\
&=\frac{\omega L}{\omega L - \frac1{\omega C}}\\
&=\frac1{1 - \frac1{\omega^2 LC}}
\end{align}
Clearly when
$$\omega=\frac1{\sqrt{LC}}$$
then division by zero will occur and the gain will be undefined. Assuming I haven't made any mistakes in calculating the voltage gain, could you please explain to me how this can make physical sense. What would happen in real life if I chose all of the values so that division by zero occurred?
Apparently the value for the angular frequency shown above is the resonance frequency for series LC circuits. Is the following answer (my guess) correct: "The gain is 'infinite' because the circuit shown above has no resistance, so more and more energy is inserted into the circuit, as it resonates, building up energy, forever. In a real circuit, the gain would not be infinite, due to losses in the circuit."
EDIT: I recalculated, incorporating a resistor in series, and the gain function changed as shown below (no resistance in red and with resistance in purple). The graph shown is with R = C = L = 1, it just gives you an idea of the shape.
AI: The gain is theoretically infinite, but even in theory it would take an infinite time to see the output reach an infinite amplitude.
In physical practice, there will be always be losses, which will limit the gain, even with a super-conducting L and a high quality vacuum capacitor.
Even in the absence of losses, each of the components will have a maximum limit.
As the energy in the circuit builds up, the current increases in the circuit. The power supply will need to support that current, no power supply can deliver an infinite load current. The wires connecting the components will melt at some finite current.
If the inductor is made on a core of iron or ferrite, then as the current builds, it will saturate, changing the L and detuning the resonance.
If you flip the L and C around, you have the business end of a 'magnifier' Tesla coil. When the energy in the capacitor, that is the voltage on it, gets high enough, pretty sparks break out from it. Any capacitor will have a maximum withstand voltage. No capacitor, unless it is has an infinite distance between its plates (that is, no real capacitor), can stand an infinite voltage. |
H: How should I modify this back to back MOSFET AC mains circuit?
I have a WiFi enabled AC mains light dimmer/switch that uses a back to back MOSFET design. The device sits in series with the load (lightbulb) and therefore does not have its own return/neutral connection.
I'd like some help to understand how its MOSFET / transistor arrangement works as I'm not fully confident I do understand how the control circuitry might be managing the MOSFETs and transistors so that:
it always has power for itself (a tiny amount of current flows
through the lightbulb at all times, but not enough to light it); and
so that a controlled amount of current is allowed to flow through
it when any level of light brightness is requested.
Ultimately, what I'd like to do is convert the device to be a user input device only (with minimal modifications to the circuit), connecting directly to the supply and neutral - by somehow disconnecting the path between the two side to prevent dead shorts when any level of light brightness is requested.
For example, could I do this simply by disconnecting the base of each transistor so that they're never open and therefore there is never a direct path between the two sides (i.e. pin 3).
This may seem like a pointless exercise/idea, but actually it would then give me a dimmer that I can use in software (over WiFi) as a user input to control other "smart" things such as mood scene selection.
AI: Disconnecting pin 3 from the control circuitry does the job, this prevents the transistors from opening up and therefore permanently prevents a low resistance path between the two AC sides.
Unless anybody can see any issues with that? |
H: Increase Peltier module voltage
I have a peltier dehumidifier that works with 9V 3000mA power.With this electrical power input the cold side keeps a 10-12 °C temp difference from the outside temp.ie external temp=22 °C the cold side peltier module has approximately 10-11 °C.
If I set an another dc input ie 12V 3000mA does the cold side reduce the temperature a little more?ie reaching at 8-9 °C?
Thanks a lot for your time
AI: You have a misconception what a peltier module does. It doesn't "create coldness" or sets a certain temperature but rather transports heat from one side to the other.
The amount of heat transported in one second is given in the datasheet of the module in J/s and it is a function of the electrical current running through it. The temperatures are a result of that heat transport. This current depends on the voltage, but it cannot be increased above the spec current because the module would overheat then. (This current itself creates about 10 times more heat than the heat transported from the cold side.)
If you want the cold side to be colder, the easiest way is removing heat from the hot side more efficiently, for example by using a bigger fan. |
H: Current limiting from a USB supply
I am designing a device which must power a number of RGB LEDs. I am currently looking at WS2812 "NeoPixel" style LEDs, which have a max current draw of 60mA each. I would like to have a large number of these, but running at lower brightnesses.
The problem is that I want to supply this from a standard USB port, and I have more critical functions that run off of the same USB power, so I want some sort of current limiter/protection to ensure that the LEDs don't consume so much current that the USB controller shuts off the device.
Would a simple PTC/Re-settable fuse work?
Or something like this current limiter from Wikipedia.
Or should the supply be cut completely?
I don't need very high accuracy,but I would like to keep current under ~250mA±30mA.
Also since I need >100mA from the USB VBUS should I include a MOSFET or other way to disable the supply while the microcontroller is starting/restarting.
Finally I have seen some people recommend large(100-1000uF) smoothing capacitors to the LED's VCC. Which side of the protection should this be on?
AI: Would a simple PTC/Re-settable fuse work?
PTC's are very slow. This is often used in the host to prevent board damage because they are cheap. If you want any selectivity (eg: your protection tripping first) you'd want something faster.
Or something like this current limiter from Wikipedia.
A current limiter will prevent you from tripping the host protection, but will also cause brownout on the microcontroller or ws2812.
Or should the supply be cut completely?
Yes, you want the power to trip immediately without your microcontroller browning out or the host protection to trip. Prevent the USB connection to be lost.
Luckily you can get current limited power switches. Take a look at mic20xx for example. |
H: How can I safely power both an Arduino as well as an electromagnetic lock with the same power supply?
I work for an escape room business, I create tricks and props using arduinos. Most of the time the Arduino has to take input from a player using buttons, sensors, etc. and locks/unlocks and electromagnetic lock for either a door or drawer or something. The locks are always controlled via relays and their respective arduino.
The problem is that installation can get quite messy and unruly since we have so many locks and arduinos that need power supplies. So for now I've been using a 12V power supply that powers the arduino through a 7805 voltage regulator as well as the lock. .
Note: I am using a relay module board that has all the necessary components for reliability such as the transistor before the coil and an optocoupler.
However, I've been having problems with this circuit.
The voltage regulator gets very very hot, even with a heatsink on it.
When the relay disengages the lock, the arduino becomes unresponsive and requires a reboot to work properly again.
The power supplies I am using are 12v 1000mA. And the electromagnetic locks I am using use up to 500mA when engaged.
My question is: is there a more reliable or easier way to power both the arduino and electromagnetic lock using the same power supply.
AI: As mentioned in other answers, swapping the 7805 linear regulator for a buck regulator would help with heat.
That said, I would believe there is no need for that: your use case should not consume so much power that even a linear regulator would get hot. The components you're powering off the regulator in the diagram would use less than 100mA in total, giving (12V - 5V) * 0.1 A = 0.7 W as maximum amount of heat the regulator would need to dissipate. Likely, when the relay is not energized, you would be using tenth of that at most.
So: check current usage of the different components with a multimeter to see where all that current is going.
The Arduino should consume in order of 15 mA, and there are many ways to reduce that even further: https://learn.sparkfun.com/tutorials/reducing-arduino-power-consumption
The relay board lists 65 mA as working current, and this should be much lower when the relay is not energized
Whatever you're using as the inputs to decide when to trigger the relay... Well, only you know what these are
There are many reasons why the Arduino might become unresponsive after triggering the relay, and it's not possible to tell certainly based on info you've given. Some possibilities:
The code you're running on it has no way of going from triggered state back to untriggered state. You need have a code path that turns off the relay and goes back to waiting for someone press the right buttons or whatever.
The electromagnetic lock consumes too much current when triggered (briefly or constantly), leading to Arduino input voltage dropping. If brief, this can be fixed with capacitor on regulator output (there should be one in any case)
Inductive voltage spike from the lock when it's turned off. A freewheeling diode helps here, i.e. a diode placed in parallel with the lock, the "wrong way" around, such that it should not conduct current. A voltage spike would be reverse to the normal working voltage, and would pass harmlessly through the diode. |
H: How do I construct a 4x1 MUX using only 2 input NAND Gates?
I’m trying to create a 4x1 mux using only 2 input one output NAND gates
AI: Let me suggest an obvious start:
simulate this circuit – Schematic created using CircuitLab
The above has four inputs, \$A\$, \$B\$, \$C\$, and \$D\$, plus two inputs representing a binary value used to select among them (\$S_0\$ and \$S_1\$.) Now, you somehow need to apply \$S_0\$ and \$S_1\$ to these (and additional) NAND gates in order to reach \$F_0\$. Does the above suggest any thoughts about how to proceed from here?
Here's one possible next step:
simulate this circuit
I've used \$S_1\$ (the higher order binary selection value bit) to select (or activate) the appropriate pairs of NAND gates. Note that if \$S_1=0\$ then \$A\$ and \$B\$ are enabled and that if \$S_1=1\$ then \$C\$ and \$D\$ are enabled.
How might you then select between what remains?
Here's another possible next step:
simulate this circuit
I've used \$S_0\$ (the lower order binary selection value bit) to select (or activate) the appropriate pairs of NAND gates. Note that if \$S_0=0\$ then \$A\$ and \$C\$ are enabled and that if \$S_0=1\$ then \$B\$ and \$D\$ are enabled.
How might you then select between what remains?
Enough time has gone by (a few days since asked.) I'll complete this for others who may come upon it and want to see the results.
Continuing from the first starting point I'd mentioned earlier, the result is:
simulate this circuit
And continuing from the second starting point I'd mentioned earlier, the result is:
simulate this circuit
That's it. |
H: Can I learn VHDL on a CPLD device?
I need to learn and practice VHDL, so I wouldlike to buy a small FPGA dev board. I've found a board based on a MAX10 circuit with the exact form factor I need, but I've read this chip is a CPLD, not a FPGA.
I'm not sure to properly understand what CPLD are. Can I practice VHDL with efficiency on this kind of board, or should I invest more in a Cyclone chip, whose are "real" FPGAs ?
AI: To directly answer the question, there is nothing in what a CPLD is to prevent you using VHDL to build circuits for one.
CPLDs in essence are basically the same as an FPGA with the exception that they are non-volatile. That is their logic configuration will remain even after powering it off. By contrast FPGAs are volatile (typically SRAM based) and so forget their configuration when turned off leading to the need for extra hardware to configure them at power on.
CPLDs are great then for applications which require instant-on - no configuration time at all. However the down side to being non-volatile is they are generally smaller in terms of gates and so have less functionality. This is because non-volatile memories are typically larger space wise than SRAM.
Another down side to CPLDs is, as with all non-volatile memories, the number of erase/program cycles is limited. Many CPLDs can be reconfigured only a few thousand times at most (and many have lower endurance). FPGAs on the other hand being SRAM based can be reprogrammed pretty much indefinitely.
That brings me on to answering the question as to whether CPLDs are good for learning and development. Yes they can be quite cheap, which is good, however the endurance can also cause you problems. As a general development kit you may find yourself easily passing the endurance life of the CPLD from frequent reprogramming.
However as a final point, the comparison is somewhat a moot point. MAX 10 series of devices are actually SRAM based FPGAs. The MAX family (e.g. II and V) were indeed CPLD type devices, however the 10 series deviates from this trend.
To keep the ability for near instant on, the MAX 10 devices do have internal flash memory to store configuration bit streams allowing for rapid reconfiguration without an external configuration device. This flash will have an endurance lifespan, but you don't need to use it. Like its bigger cousins, being FPGA based you can simply program the SRAM of the MAX 10 directly via JTAG without the need for using the Flash. |
H: Are these BLDC waveforms making any sense?
I'm trying to drive a BLDC with a microcontroller, a discrete inverter and a sensorless network for feedback. Here's the model I'm using and what ultimatly is my PCBA:
I'm driving this thing open loop right now, just to sanity check the waveforms, etc. Here' what I get when I drive the motor with an 18kHz, 30% duty cycle:
Since I expect the commutation sequence to happen like this:
, this looks correct...So I think I've got that working right.
My question is, why does the floating phase look like it's carrying alot of extra baggage with it? And if that's how it's supposed to be, then at what point would you say the zero crossings are occurring? I was hoping it would look a little cleaner, like from this application note from Microchip http://ww1.microchip.com/downloads/en/AppNotes/01160b.pdf
See how there's a clear, linear ramp? I'm not seeing that on mine..
Also, I should point out that I'm only PWMing one leg, while the other is tied to a DC voltage (GND in these pictures, althought I have played with leaving VDC connected and PWMing the GND leg, but it didn't make anything into a nice ramp..It just changed the polarity of what I showed in my first pictures).
Also, just for completeness, I've added some closer views of the waveforms...Again, remember, they're running open loop, so there's no feedback...I just switch commutation state on a timer rollover that I was happy with for debug.
Here's a closer look at commutation sequence:
And here's a rising floating phase:
And here's a falling floating phase...I think it's falling...the bottom is rising, though, so maybe I'm wrong...:
Is this right, or am I doing something wrong?
Edit
Thanks to the answer below, I am now getting the motor up to speed for 100ms to get the BEMF cooking, and then I'm keeping an eye on the moment my low side of the PWM goes above zero. I then wait a certain amount of dead time and then pull the trigger on commutation advance. This is much better... Before, the motor would run slowly at around 112mA@12V, but now it can easily run up to 7200rpm at 40ma@12V. Loading the motor (by pinching the shaft on the rotor with my fingers) doesn't slow it down at all, it simply increases the current draw as expected.
Pics or it didn't happen :
AI: Yes, the plots are making sense, but your imposed PWM is not 'in phase' with the BEMF voltage.
As you stated, you are driving this open loop, which is much more like a stepper motor, so your 'positive' will not line up with the BEMF positive. When you start using your sensor feedback, then your BEMF will look much more like the example.
Keep in mind that the linearity of the BEMF is strongly dependent on the motor. Don't be alarmed to see some curvature:
Notice that this waveform is 'in phase', meaning that the drive is applying a high to this phase as the phase is peaking. That is what you want. Right now, you are applying it at a different time, so you are out of phase. |
H: Why do two reverse diodes represent the logic gate AND?
Consider:
I can make no sense in my head how this can work. How is it possible to have a current flow through normal diodes from cathode to anode and represent an AND if both are 1?
AI: Imagine A and B are both high. Then there is no current that flows out of A nor is there current that flows out of B, so S is high.
simulate this circuit – Schematic created using CircuitLab
Now if A is low, the diode allows A to draw current, which pulls down the node voltage of S, so the voltage of S corresponds to the voltage drop of the diode when current is flowing through the resistor and the diode... which is approximately 0.7V, or 'low'.
simulate this circuit
Same if B is low.
Same if A or B are low.
Therefore, both A and B must be high in order for S to be high... AND gate!
As stated by fukanchik in the comments, the role of the diodes is to prevent the inputs from interfering with one other when they are in different states, but the diode is only necessary with inputs that can sink and source current. If the inputs can only sink current, such as in an open-collector configuration, then the diode is not necessary
simulate this circuit |
H: Diode connection in reverse bias
Please help. In reverse bias we say the negative terminal of the battery attracts holes of the p-type hence depletion zone becomes bigger. Why don't electrons from the negative side of the battery actually move to go and fill the holes then repel electrons in the n-type through the wire and to the battery creating a current in reverse bias?!
Depletion zone is made by electrons from n-type going to p-type then surely electrons from the battery could travel to the holes in the p-type as well instead of just ATTRACTING the holes. Please can someone explain this it is really confusing me.
AI: It is the presence of holes and extra electrons in the semiconductor material that make it conductive. At the join between the layers in a PN junction the holes and electrons join together and cancel each other out creating that depletion layer which is an insulator.
When you attach a reverse voltage you force the holes and electrons to go towards each other which fills in more holes in the depletion layer making it wider and a better insulator.
Attaching a forward voltage pulls the electrons out of the holes in the depletion layer till it is no longer an insulator.
There are a good description here with some illustrations. |
H: I need a circuit that allows current to flow in both directions through a load, and I came up with this. Is it good or is there a better way?
this is one of my first circuit "designs" (quotes on since it's simply switches). I need current to be able to flow in both directions through a certain load, and the direction of travel should be electronicaly commanded. This is what I thought of:
simulate this circuit – Schematic created using CircuitLab
Sorry if it's too messy. This way, making pins 1/2 high (but never both at the same time) makes current flow in each direction. Is this a good way or is there a simpler one?
AI: That looks pretty close to a classic H-Bridge style design though individual component selections may be problematic. You also need a small resistor on the gate line to the bottom MOSFETs, switching current to charge/discharge the gate will be excessive for the ARDUINO.
The circuit you show uses the rather problematic single control method which can allow shoot through currents to occur. A fuse is warrented.
Obviously turning on both sides is a big no-no, so get the software right. However, even then, the 10K pull-up on the top gates means they will be quite slow to turn off. You need to take that into account in your controlware.
If that is an inductive load, flyback will be handled by the diodes in the MOSFETS however, you may have issues sending that current back at the power supply. Especially if the Arduino is hooked up to the same supply. See this question for more info. That link also shows you why it is better to drive with four lines instead of two, see recirculation fly-back.
Ultimately though, you would be better off choosing one of the many one piece full bridge drivers out there. But then again, that's not nearly so satisfying and you miss out on a great learning experience. |
H: Calculate junction temperature of MOSFET during pulse
I want to find out how hot the junction gets during a 300 us pulse of 400 A peak current.
Datasheet of MOSFET,
Datasheet
From the datasheet I came across this graph,
For a pulse of 300 us or 3*10^-4 seconds, I found Zth = 0.04 K/W
So, if I = 400 A and Rdson = 0.07 ohms (From datasheet), then
P = I^2*R = 400^2 * 0.07 = 11200 W
Then, Zth = 0.04*11200 = 448 K = 175 degrees Celsius
Therefore Junction Temperature = 175 + Ambient(Assuming 30) = 175+30 = 205 C
Is that correct ?
AI: Your math looks reasonable.. however that device will not withstand anywhere near 400A. Especially not for 300uS.
Looking at the safe operating curve... The maximum you can do for 300uS is about 100A if your Vds is less than 20V.
So basically the temperature thing is mute. You will let out the smoke. |
H: How to synthesis, fit, and generate assembly bistream without re-launch all proccess in Quartus?
In Quartus Prime (17.0) it take a looong time to generate bitstream on my computer.
To generate the rbf for cycloneV, with DDR3 controller and serializer/deserializer in design it take about 12 minutes each time I modify a single parameter in design.
Is there a method to speed the process if design has been already generated in the past ?
AI: In general, no. Some software packages may support partial synthesis, but this usually requires separate licenses and may require a lot of additional work for partitioning the design. Note that for some parameters (I.e. hard core configuration settings, IOB configuration settings) it may be possible to update the design at a much later point, but this would require manual scripting. I did this with Vivado to change IOB delay values in the bit file without regenerating the entire design, but this a very limited change. |
H: Voltage controlled resistor
I want to built a varying resistive load in LTspice. I tried using a resistor with Value defined as V=V(Vresistance) where Vresistance was the netname of the voltage source (pulsed). But this had some error shown below.
I want the value of resistor to follow the voltage waveform. Is there anyway to achieve this in LTspice.
AI: You need to change the resistance value of your resistor to one with curly braces.
The component's value is usually something like this
R=20k
You put:
V=V(Vresistance)
You need to use this for the components value:
R={V(Vresistance)}
Here are other ways to make a variable component:
R={V(Vresistance)}
R={I(Vresistance)}
C={V(Vresistance)}
C={I(Vresistance)}
R={V(Vresistance)*I(Vresistance)}} |
H: How can this MOSFET become overheated? How big should the heatsink be?
I've got a very simple circuit. A MOSFET (TK15D60U) is powering a 3 to 4 Ohm heat bed by 19.6 volts. From my calculations this results in 6.5Amps. The power adapter seams to have its specs at max 6.32A but seems to function fine. The MOSFET should be able to handle 15Amps continous drain. The drain should be able to handle 600v, so that 19.6Vdc should be fine.
The gate is driven by a 25Vdc via a 10k resistor to the gate and 100k resistor from the gate to ground (to allow to leak away to discharge the gate, I thought it was a good thing). So effectively there is (25vdc/110k)*100k=22.7Vdc voltage at the gate. The Gate-source voltage is 30v so that is below max.
What I can read from the datasheet is that the Drain-source ON resistance @Vgs 10Vdc @ 10Amps is about 0.15Ohm. Lets take 0.2. I never really thought about the ON resistance. I thought, the gate would be fully open, so resistance should be minimum and will handle it without a problem. But when the MOSFET is active, it becomes too hot to touch within 10 seconds or so.
Now this part is something I am not so familiar with. Hence the question. Is it true that the formula P=(I2)*R (Watt=Ampere squared * resistance) yields (6.5A*6.5A)*0.2Ohm=6.5Watt that is dissipated via the MOSFET?
6.5Watt is a lot if you ask me on a TO-220. Is it not? How large should the heatsink be to handle that? Should I actively cool it using a fan? All I have now is this very tiny heatsink. This topic is probably a laugh for the experts around here.
AI: I calculate 7.5W worst case with Rload =3 and Ron = .2
I = 6.125A.
That squared *.2R = 7.5W.
Yes that is way too high for a bare To220. At 83.3C/W channel to ambient of the device that's a whopping 625C temperature rise.. So it is going to melt.
You could add a whopping heat sink, but really, you need to find a different MOSFET that has an on resistance in the milliohm range. |
H: Why requiring input resistors in series before digital-to-analog convertor (DAC)?
Im using AD9742 (Analog Device) for building a high speed digital-to-analog convertor (DAC). I will use FPGA digital I/O ports as inputs to the DAC. As I can found in the data sheet, the example layout could be found and shown in the figure below.
I can understand the R1-R9 are the pull-down resistors to make the inputs at GND level in case there are no inputs (floating).
I can't figure out what are the purposes for using RP3 and RP4 (22-ohm) in series between DB0X-DB13X to DB0-DB13 before DAC inputs.
I have searched other kinds of DAC data sheet (ex. TI DAC902, DEM-DAC90xU/E) and they all have similar design. Does anyone know why we need the RP3 and RP4?
Thanks in advance.
Best.
AI: More than likely there to reduce EMI.
I had to do that extensively on video cards I designed to slow signal rise and fall times to limit the harmonics and reduce the EMI that would couple into, and be very visible on, the video image.
Generally speaking, whatever is driving a digital line has a much faster edge than the thing receiving it needs. This is because the driver is designed to be capable of driving many gates. As such, you can have quite a bit of room to slow down the edges. This is especially true of synchronous bus transactions that have well defined setup and hold delays.
The resistor, along with the capacitance of the trace beyond it, act as a low pass filter.
It makes quite the difference. |
H: PCB Current Draw vs Temperature Rise Interpretation and Question
I am using this tool for current calculation
While changing the input parameters i realized Temperature Rise °C is affecting the current draw.(you might say OF COURSE!)
At Ambient Temperature = 25°C
Temperature Rise = 10°C :
50A current at 2oz copper at outer layer the required trace width is 33mm
Temperature Rise = 30°C :
80A current at 2oz copper at outer layer the required trace width is 33mm
Does this mean that the same amount of cooper in pcb (same trace width) actually can handle and conduct higher 80A current but the pcb temperature will increase 30°C more as a cost. Is this correct.
If so do we need continuous amount of current draw to reach that temp rise. (If we draw 80A for short period of time like a peak does it still increase 30°C)
AI: Does this mean that the same amount of cooper in pcb (same trace width) actually can handle and conduct higher 80A current but the pcb temperature will increase 30°C more as a cost. Is this correct.
Yes.
A trace will have a certain resistance and power dissipated will be given \$ P = I^2 R \$.
Increasing the current by \$ \frac {80}{50} \$ will result in a heating power increase of \$ \frac {80^2}{50^2} = 2.56 \$ or 256%.
It seems reasonable to assume that the final temperature rise would be 256% higher than that at 50 A but the vendor claims 300%.
Equilibrium temperature will occur at the point where heat lost to the surroundings = electrical power into the resistance. Generally the higher the temperature difference the faster the outflow of heat. This again suggests that the 300% figure is higher than we would expect.
The copper resistance has a positive temperature coefficient of +0.393%/°C. You can work out how much extra heat this will generate.
Don't forget that with the resistance of the track comes a voltage drop proportional to the current.
If so do we need continuous amount of current draw to reach that temp rise. (If we draw 80A for short period of time like a peak does it still increase 30°C.)
No. You could make an approximation based on the duty cycle for a < 1 s pulse (for example) but as the on-time gets long enough to be thermally significant you would want to assume the higher figure - a 10 s pulse for example.
See also: Standard PCB trace widths?. |
H: Detecting if specific signal is applied to circuit
I am doing a project and need to detect if a specific signal in the form of 2 + Asin(2πft) where A is between 1 and 4 and f is 20Hz - 20kHz. Once this id detected I will light an LED.
I was thinking of using op-amp comparators but they can only detect a range of voltages right?
AI: So, in the case that this is a Circuits 101 assignment, and accuracy isn't that important, and you have to use basic components: maybe do this in three stages, inaccurately, but enough for your assignment. This is kind of a draft, I'm not going to sit down and do the math, sorry:
First:
A bandpass filter to filter out all possible frequencies outside of 20Hz-20KHz. Depending on the assignment, I'm not sure what quality of filtering you need. If you need absolute quality, see the other posts.
Second:
A simple diode rectifier feeding comparators to detect that it's amplitude is within the proper ranges.
Third:
A fat capacitor/inductor LC circuit to extract the DC signal, and a comparator to make sure that it equals two.
Tie it together:
The first stage feeds the second, and the second and third stage would be ANDed together to indicate that you're getting all proper results from the stages. |
H: Battery and dc input
I’m currently designing a circuit. It is required to be powered by a 12v dc input (when connected) else a 3.7v battery (the battery should be charged when 12v is active).
The circuit requires 5v which should be achieved using a dc to dc converter in either buck or boost mode.
What would you recommend as the best and most efficient way of automatically switching the power source and charging the battery without interrupting the supply to the device for any more than a few ms?
AI: The best way is to use a battery charger IC with "power path management". Without more information on your battery chemistry, desired charge rate, system current requirement, etc. it's impossible to recommend a specific device, but here's an example: TI Charger with power path
You will need a boost converter to boost the battery or system voltage output up to 5V. |
H: Would momentarily shorting the supply across single phase AC motor lower its power output long-term?
Background (optional):
I found a bandsaw at the side of the road with a broken switch. I jumpered the switch to see if the saw still worked and it worked very well. I took it apart, cleaned it, and replaced the switch. The first time I turned it on, I accidentally miswired the switch and caused a short and the circuit breaker went. I fixed the switch and it works again. However, it has diminished power, not being able to cut the same thickness of wood without stalling.
I thought the new switch might be current-limiting it, but when I jumpered the switch I had similar performance. I thought it might be a mechanical issue to do with overtightening the blade or the wheel, but it doesn't seem like it. Now I suspect shorting the supply may have damaged the motor.
Question:
I accidentally shorted the voltage supply with both S1 and S2 closed. The circuit breaker immediately went, but is it possible I damaged the motor, resulting in a lower power output?
simulate this circuit – Schematic created using CircuitLab
Side-question:
The original switch flipped both S1 and S2 at the same time. I'm assuming this is just for redundancy. My new switch just toggles S1, and S2 is shorted. Could this be a problem?
Thank you in advance.
Edit:
Capacitor looks pretty rough...
AI: The capacitor needs replacing. See if you can find some markings to find out which one you need.
If you disconnect the cap entirely you should be able to run the motor by giving it a manual kickstart.
If it is a start capacitor (that uses a centrifugal switch to disconnect the cap and starter coil) then it will have full power. If it is a run capacitor that remains connected then it will still have reduced power but likely more than you have now. |
H: AC Current Sensing Switch Using Current Transformer
I'm struggling to design a circuit that will interpret signals from a SCT013 current transformer and trigger a constant 5v signal (which will go to a microcontroller) when a certain current threshold is met.
I thought I may be able to achieve this by taking the burdened AC signal from the CT and rectifying it with a bridge rectifier and smoothing capacitor. Then hook this up to the base of a transistor that will emit a 5v low current signal.
simulate this circuit – Schematic created using CircuitLab
I thought that by adjusting the value of R2 I would be able to have the transistor 'trigger' at different current levels. The choice of transistor was arbitrary, I just wanted to see if I could get the rectified signal to 'trigger' the transistor. The CT produces a current between 0 and 50ma, its ratio is 1:2000. I would like the circuit to send a signal if the AC current is above 1 or 2 amps.
When I test this circuit there seems to be some problem with tying the bridge rectifier to ground.
I'm very new to circuit design and especially to using transistors, so I apologize in advance if this design is totally ridiculous. If it is, what would a more direct way be to achieve the same thing? I realize that I could hook the CT output up to a ADC on the microcontroller and just see if current is flowing that way. But I was interested in the challenge and I'd like to learn more about circuits and transistors.
Thank you!
AI: Not ridiculous, but a bit of a mess around the output transistor, and you've missed a trick with how to burden a current transformer. Together with the (good) isolation of the current transformer, there should not be any problem due to the way you've grounded the diode bridge, that bit is fine.
Normally, when we use a transistor in this sort of trigger circuit, we use it in common emitter. R2 is optional, it allows another degree of freedom when selecting the trigger level, rather than adjusting R1. This circuit has a fairly well defined trigger level when the base voltage is at around 0.7v.
An unloaded current transformer is a current output, so in this sort of circuit, we get far 'better' rectification by putting the burden after the rectifier, this removes almost all the diode forward drop from the output.
For a cheap'n'cheerful circuit, with a rather more ragged threshold, I would tend to use the second circuit. The zener clamps the output voltage to be safe for the microcontroller's digital input, and the threshhold voltage is whatever poorly-defined level the microcontroller input uses.
Of course if the zener of the second circuit fails open, you could fry the microcontroller, the first circuit requires multiple failures to do that, so you may find the first preferrable.
Your capacitor value of 1uF is a bit puzzling, as together with the 650 ohm load, the time constant is way below one mains cycle, which will result in the circuit turning on and off 100 times per second. Perhaps this is what you want, in which case you could omit C1. If you want to stabilise the output, then C1 should be much larger as shown (or yet larger), though there will still be intermediate currents for which the output will chatter on and off at mains frequency.
simulate this circuit – Schematic created using CircuitLab |
H: AC coupling caps on USB interface
Does anyone know why AC coupling caps should be implemented in USB3 interface while it's not required in USB1/2?
Anything to do with transmition speed, encode method?
AI: The question has to be why these caps aren't there in the D+/D- lines.
The D+ and D- lines of USB (any, also USB3) cannot be capacitively coupled, because an USB1 host detects the low/full speed of the connected device by checking whether D+ or D- is connected to 5V through a 1.5kΩ resistor. The caps (if any) are inside the device, behind that 1.5kΩ resistor.
Keyboards, mice and game controllers often are low-speed devices to allow cheaper cables and controllers, so these are still common.
USB2.0 uses the same D+/D- pair for communication, so it keeps the DC coupling into the device.
This requirement isn't there for the additional RX and TX pairs of USB3.0. |
H: Need some help with identifying the primary on a power transformer
So a friend of mine had an old amplifier which he didn't want anymore so i told him to give me the transformer before throwing it away since i might need/can use it in a future project. But since it is a surface mount/PCB type transformer i have a hard time identifying the primary since i get continuity on most the pins. And i know that the transformer is fine since the amplifier worked perfectly before taking out the transformer.
I managed to find the schematic of the amplifier:
https://docuri.com/download/hcd-rg330_59c1dc7cf581710b2868a7b5_pdf
Here is a picture from that schematic which shows the transformer and then some pictures i took myself of the one i have:
Any help is appriciated and if you need another picture of something specific please do tell.
Thank you!
New picture of the pins:
AI: Figure 1. Close-up of the transformer connections.
Following the traces on the left out to the edge of the board we find the 120 - 240 switch legend so the left side is definitely the mains input or primary.
If the internal non-replaceable fuse is intact you should get a zero ohm reading between 5 and 6.
Read the resistance between 3 to 6 (120 V winding) and 2 to 6 (240 V winding) and you should find that the first reading is half that of the second.
Finally check that 1, 4 and 7 have no connections to other terminals.
It may be that the internal fuse has failed on thermal protection. You could power the transformer on 8 but that would not be recommended.
If there's a chance that the transformer has an internal short you can safely power it up with a mains light bulb in series with the primary. The bulb should not light - or very dimly at best / worst - if the transformer is OK.
Finally, note that the board uses very many standard length wire jumpers as bridges over the traces. In many cases several jumpers could have been replaced with one long one or better layout. It appears that the board was designed for pick and place population with standard "zero ohm resistors" (pre-formed wire links). |
H: Led lights in parallel to 220v
I want to start a project with led lights, but I am completely new to working with electricity (i have used electricity but have never created something myself).
I want to create a led wire with different leds connected to 220v. I know that the different colors of leds use a different voltage, so my plan was to wire each color in parallel, and for example, all reds will be in series.
Is this the right way to do it? Or does someone has a better recommendation? What will I need to convert the 220v to the right voltage? and what other materials do i need?
AI: This is not a good idea.
220 V is lethal. To do this project would require you to perform voltage and current measurements on live wiring and given your lack of experience this would be strongly discouraged. You should try this on low voltage circuits.
A simple transformer to step the voltage from mains to, say, 24 V AC would provide you with a safe working voltage adequate to try out your ideas.
I want to create an LED wire with different LEDs connected to 220 V. I know that the different colors of LEDs use a different voltage, so my plan was to wire each color in parallel, and for example, all reds will be in series.
LEDs are current sensitive so if you don't need colour switching the standard practice is to wire all LEDs requiring the same current in series. The supply then requires some sort of current limiting circuit.
Your other concern is that LEDs are DC devices and you are proposing to run on AC. You need to figure out how to prevent destruction of the LEDs on the negative half-cycle.
There are millions of articles on LEDs. Read, read, read and stay away from mains. |
H: Invalid nets in Eagle PCB board project
I'm designing a small home weather station. I've got a bunch of popular sensors like BMP180, DHT22, DS3231 clock and so on. Luckily most of them are I2C, so I won't have to use too much wires, but I decided to create a PDB and ask some company to create it.
I'm having hard time to learn Eagle, but I managed to create appropriate packages, symbols and devices. I also netted everything. Don't mind the mess, this is my desperate attempt to force Eagle to make valid connections.
However, when I create board from the schematic, Eagle seem to transfer connections in some weird manner.
Notice the capacitor, despite its connection to NRF module, on board it's connected with other components.
Also, when I run the auto router, it seem to ignore connections to Arduino Micro completely:
What am I doing wrong?
Edit - changes
I did as suggested and named all nets. I'm quite certain I did it correctly, because each time I named the net the same as one coming of other pin, Eagle asked me, whether I want to connect them.
This is how the schematic look now:
However, autorouter still ignores connections to Arduino despite - as it seems from the screen - being aware of their existance:
The question stays the same - what am I (still) doing wrong? :)
AI: Eagle does not care what you have connected visually in the schematic. All what is of interest to Eagle is how the nets are named.
And that's what power pins as Vcc and GND are special in: They automatically name the network they are connected to as Vcc etc. So all other power pins of the same name are connected automatically. That's what you have here.
But that behaviour isn't limited to power pins. You can rename any network and segments not visually connected are still taken as connected. This is a pretty easy way to avoid the wiring mess you see in your schematic. You can use the "bus" tool to draw a single thick blue line between different parts of the schematic. Or simple place a label ("label" tool) at the net segments to show people these wires have the same net name and thus, should be considered connected. Or use the "connectors" from the dports library. The latter is useful for spreading a schematic over several pages.
I recommend you to redo your schematic. Remove all the wiring, then draw short net stubs from your I²C modules. Use the symbols from the supply library to connect your Vcc power pins to each other, same for GND. Then rename the individual SDA and SCL networks into a literal SDA and a literal SCL. They are connected automagically internally (not visually). Use the bus tool to draw a visual connection. Eagle simply ignores it, but people will understand. |
H: Debouncing circuit
I have a system where I want to place to simple push button switches at the end of a 12inch cable. Is it better to place the debouncing circuit with the buttons or with the microprocessor, 12" from the buttons?
If it matters the debouncing circuit is based on a Maxim 812R (https://www.maximintegrated.com/en/app-notes/index.mvp/id/1858) and the microprocessor is a Wemos D1, the buttons are generic NC push button switches.
AI: I would recommend placing debouncing circuit on main PCB close to the microcontroller, for two reasons:
Cable itself have some capacitance which can improve debouncing.
Placing debouncing circuit close to the micro can perhaps filter some potential electromagnetic interference inducted in the cable.
Also the pull-up resistor should be placed on the main board close to the point where cable is connected. |
H: EEPROM dublicate pages
I'm facing a strange issue. Whenever I write to my EEPROM (24LC04B), it gets written to every other page as well and I can't understand why.
i2cdetect -y 1 returns 8 pages:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
first line of the first address: i2cdump -y 1 0x50:
15 15 20 10 10 00 00 00 00 18 18 18 18 18 18 00 ?? ??....??????.
first line of the third address (same data): i2cdump -y 1 0x52:
15 15 20 10 10 00 00 00 00 18 18 18 18 18 18 00 ?? ??....??????.
I update the 0x52 first block to 0x03: i2cset -y 1 0x52 0x00 0x03, the output of i2cdump -y 1 0x52 is as expected and first block got updated to 0x03:
03 15 20 10 10 00 00 00 00 18 18 18 18 18 18 00 ?? ??....??????.
BUT the first block of 0x50 address got updated as well: i2cdump -y 1 0x50:
03 15 20 10 10 00 00 00 00 18 18 18 18 18 18 00 ?? ??....??????.
I can't understand why. It seems like every other address is a clone of each other:
0x50 = 0x52 = 0x54 = 0x56 (same data, if one gets updated, all get)
0x51 = 0x53 = 0x55 = 0x57 (same data, if one gets updated, all get)
Any hints please? Thanks!
AI: I think you misunderstood the 24LC04 is a 4096 BIT EEPROM, not 4096 byte. So you only have two pages of 256 byte.
If you read section 3.6 of the Datasheet, you see it doesn't care about bit 1 and bit 2 of the I²C device address either. The A0, A1, A2 inputs are not used at all in this chip.
So, that's why your chip is "mirrored" to 0x52, 0x54 and 0x56. And of course, the second page to 0x53, 0x55 and 0x57. |
H: Using a vintage button bulb saver be used for CFL or halogen lamps?
Recently got a big box full of vintage tools and electrical stuffs. I came across this strange looking (seems vintage by its looks) button device. Its the first time I came across it.I googled and read that it can be of two types thermistor and diode type. The later actually uses one half of cycle to increase filament life.
So, will it do any good with other forms of lamps like halogen, CFL etc? I'm just curious, thats all:) Also does the button need to be installed in a particular direction?
AI: Your diode type bulb saver is just a halfwave rectifier .It will not be good on a CFL .Half wave rectifiers like this draw DC current of the AC mains and lots of harmonics of even and odd order .The power Authoraties in most countries will not permit this these days .Do keep your antiques because they represent a bygone era and the NTC thermistor ones could be useful because they do reduce inrush current . |
H: Design considerations for unattended product in public place
When designing a product that is to be installed and left unattended in a potentially publicly accessible place, what considerations are taken in order to minimise the risk of vandalism and theft? Some example problems:
The risk of the device being opened and peripherals (such as SIM cards, SD cards etc) being stolen.
General vandalism to the enclosure and any external connections (e.g. antennas, service ports etc).
It would be great to hear others challenges and experiences in this part of the electronic product design process.
AI: As others have said.. there is no such thing as a people proof box.
Obviously the "harder" you make the enclosure the more you will slow them down, but you will just p-off somebody enough to get a bigger hammer.
Keeping it unobtrusive and high off the ground so folks walk by without ever seeing it helps, and a big sticker on the front that says "DANGER! LETHAL VOLTAGES INSIDE!" can also act as a deterrent.
If you don't want it back after, and plan to replace rather than service, you can always pot the thing up in thermally conductive electrically insulated epoxy, so it's just a big brick.
You can of course also add a siren that goes off if the thing is opened. But you will need someone local to shut it off.
Connectors can be in their own space inside the box only exiting as cables through clamps in U-Shaped cut-outs in the bottom of the box.
Ultimately though there is a cost balance. How much is what is in the box worth versus how much can you afford to pay to stop someone from stealing/destroying it. |
H: Choosing SRAM for PIC project
I'm trying to design a guitar pedal effect, a looper to be precise. My idea is to use the PIC24FJ128GC010 which has a 16 bit ADC, in order to have a good audio quality. Since my idea is to convert, register and then save the sound in an external SRAM module, I'm trying to find a SRAM module which can fit my project. I've made some calculus but I'm not sure that they are correct:
Since the bandwidth of the guitar frequencies goes approximately from 80Hz to 15KHz, the sampling frequency should be around 30KHz (Nyquist-Shannon theorem),
so if I have a 16 bit ADC for example for a minute of sampling I will have:
30'000 Hz *60 s = 1'800'000 samples/min * 16 bit = 28'800'000 bit/min = 3.6MB/min
Am I right? Am I missing something? I accept every suggestion, also about the choice of the SRAM. Thank you.
AI: Why use PIC24+sram when the newish PIC32MZ DA series have 32MB of internal/stacked DDR? TI has some nice adc codecs that mesh well with i2s. While I understand trying to keep it under one roof, I think it is better to add an audio adc rather than sram. Typical micro adc's aren't really geared toward audio anyway.
I'd guess that by the time you find 4mb of sram you'll about be at the cost of the DA series, especially if you figure the extra pcb layout time and layer count.
The current errata does limit ddr to 0-70C, but 32MB is real nice, it opens up lots of possibilities. |
H: How is ASIC design different from FPGA design? Do you write HDL (Verilog, VHDL) to design and ASIC the same way you would for an FPGA?
From my limited understanding i feel as though one could just take the synthesis output from Verilog/VHDL code and then use that design to fabricate on silicon the sea of gates.
AI: 1) not all ASICs are digital-only. Some have analog circuits as well or are even analog-only.
So your question only applies to digital-only ASICs or only the digital part of an mixed-signal ASIC.
Yes in theory you would think that you could:
1) Write your VHDL
2) Generate the netlist (this describes the actual circuit)
3) Implement that netlist on either FPGA or an ASIC.
But in the real world it is not that simple.
Step 1 is indeed the same but the netlist for an FPGA will be different.
On an FPGA you will only have the gates available which are implemented on that FPGA.
On an ASIC you can choose any gate and as many as you like from the library describing the ASIC's manufacturing process.
This difference means different optimizations might need to be made to either design. For high-speed design it is essential to simulate the netlist so that actual delays are included. This will reveal timing issues that have to be fixed.
So yes, the starting piont (VHDL, Verilog) could be the same but that does not mean you can "blindly" put it on an ASIC or FPGA and expect good results.
What is done in the real world is that first the VHDL or Verilog is evaluated on an FPGA for proper functionality. Then that debugged code is used to make an ASIC. Even then many simulations have to be done to ensure proper functionality. |
H: How to limit the maximum output of ADC Signal Conditioning Circuit
So I have been designing an Op-Amp ADC signal conditioning circuit. I ended up with the following:
So, for nearly all parts this is a completely working circuit including:
1) The Gain
2) Bandwidth (w/ 2nd order filter)
3) Specific Input Impedence
However the one point - and issue - I am facing is trying to limit the voltage from 0 to 3 volts. So If my input is too big for the gain it is very possible for the Signal Conditioning output to be outside that range, What is the best way to deal with the issue? I looked over a few ways but many of them (including using Zeners) are just too unusable as the voltage I am using is small (especially since I am using a differential output)
AI: A few comments:
LM741 op-amps won't work (properly) at ±3.8 V supply.
Stages 1, 2 and 3 can be replaced with a single inverting gain stage.
It's not clear why you are using a differential output for an ADC feed but it looks OK.
A Google image search for voltage+limiting+analog+signal threw up the following interesting technique.
Figure 1. This clipping circuit uses a complementary pair of op amps to prevent excessive positive (U1) and negative signal excursions (U2) of the input signal, to maximum available signal dynamic range without damaging overload. Source: Electronic Design.
A simple op-amp clipper (Fig. 1) prevents these problems. The maximum allowable input voltage is applied to the non-inverting input of U1, and the output is fed back to the inverting input via small-signal diode D1. The ADC’s reference voltage can be used for the clipping reference if available. When the input voltage is below the reference, U1’s output is driven to the positive rail and D1 is reverse-biased, so the input signal passes through without being altered.
When the input goes above the clamp voltage, the op-amp output reverses and closes the loop through D1. As a result, it effectively becomes a unity-gain follower to the clamp voltage. Input resistor R1 limits the amount of current the op-amp output has to sink. A second op amp (U2) performs the complementary negative clipping function, preventing the signal from going below ground. Thus, in this example, the output signal is restricted to 4.096 V to 0 V out.
The article goes on to explain some of the unique challenges this circuit presents to the op-amp regarding the back-to-back diodes across their inputs. There are also considerations for slew-rate which affects the maximum frequency of operation and rail-to-rail operation. The article is worth a read.
Figure 2. With the LT6015 and bipolar 10-V supplies, the circuit clamps a 7 V p-p sine wave at 0 and +4 V. (Same source as Figure 1.)
Can this be used in the earlier sections?
Probably a bad idea.
Figure 3. Various 2nd-order filter responses. Source: Electronics Tutorials.
Depending on your low-pass filter frequency response you may have a peak at the pole and this would result in a higher output voltage than your clipper. See the linked article for more. |
H: kirchhoff laws with current source connected in series to resistor
I'm struggling with the following circuit trying, using kirchhoff laws, to write equations system that solve all variables.
simulate this circuit – Schematic created using CircuitLab
(Ground symbols are used as arrows to show current direction)
I'm using source convention for sources and the other one for passive.
What I did so far is to define kirchhoff laws for each net clockwise
Voltages
$$Net1(ABD) \Rightarrow V_{ab}-V_4=5$$
$$Net2(ACD) \Rightarrow -V_3+V_5=-5$$
$$Net3(BC) \Rightarrow V_4-V_5-V_6=0$$
Currents
$$Net1(ABD) \Rightarrow I_2-I_3=-10$$
$$Net2(ACD) \Rightarrow I_4-I_6=10$$
$$Net3(BC) \Rightarrow I_3+I_5+I_6=0$$
So now problems come, writing single characteristics:
$$V_{CA}=R_3\cdot I_3$$
$$V_{BD}=R_4\cdot I_4$$
$$V_{CB}=E6-(R_6\cdot I_6) \Rightarrow V_{CB}+(R_6\cdot I_6)=10$$
My problem is: how can I write the characteristic for \$V_{AB}\$??
AI: So here is your schematic without all the weird arrows that you added:
simulate this circuit – Schematic created using CircuitLab
First step is to pick a node and call it zero (ground.) You get to do this with exactly one node of any schematic. If I see a node with LOTS of branches ending in it, I often will pick that one as ground as it reduces the number of terms in some of the expressions. But it really doesn't matter in the end.
Given how you assigned node names, I've selected this ground:
simulate this circuit
Second step is to dump \$R_1\$. It serves no purpose. A current source has infinite impedance and any finite resistance in series with it is entirely irrelevant. The only purpose it serves is to change the current source's compliance voltage (the change of which of course is immediately dropped by the change in the resistance.)
So just dump it.
simulate this circuit
Third step is to label the remaining nodes.
I followed your guidance there:
simulate this circuit
Given that we've both arrived at the same number of nodes, I suspect you already have the skills to apply what I did above. So that's good.
Now, as the fourth step, just write out equations for each of the labeled nodes:
$$\begin{align*}
\frac{V_A}{R_3} &= \frac{V_C}{R_3} + I_{E_2} + I_{A_1}\tag{$V_A$}\\\\
\frac{V_B}{R_4} + \frac{V_B}{R_6} + I_{A_1} &= \frac{V_D}{R_4} + \frac{0\:\textrm{V}}{R_6}\tag{$V_B$}\\\\
\frac{V_C}{R_3} + \frac{V_C}{R_5} &= \frac{V_A}{R_3} + \frac{V_D}{R_5} + I_{E_6}\tag{$V_C$}\\\\
\frac{V_D}{R_4} + \frac{V_D}{R_5} + I_{E_2} &= \frac{V_B}{R_4} + \frac{V_C}{R_5}\tag{$V_D$}
\end{align*}$$
This is done by keeping all the outgoing currents on the left side and all of the incoming currents on the right side. Let's discuss this jonk's modified nodal method that you will not often see, but is really a whole lot easier to keep track of.
For each node, "imagine" that you are sitting in the middle of the
node (which is like a flat, small, square floor sitting at some
elevation you don't yet know on a long pole from "down there
somewhere.") Water is spilling from above onto your floor. You don't
know from how high, but you can tell it's spilling down onto your
floor. Also, the water that hits your small floor now flows off the
edges and spills down onto other floors below yours. You don't know
where those are at, either. But you know they must be there. (The
"water" is current, the heights of these small floors/nodes is the
voltage of the floor/node.)
So the left side represents the currents spilling away and off the
edges of your floor and onto other nearby floors. And the right side
represents the currents spilling inward and onto your floor from other
nearby floors.
(In keeping with this mental model, you can imagine that current and
voltage sources may be like conveyors that may move water back upward to
higher floors, so to speak. Also, no water is ever lost and all of it
remains in play and the water cannot accumulate on the floors -- the net
flow onto a floor must equal the net flow off of it -- KCL! -- and hence
the justification for setting the left side equal to the right side.)
I've chosen a "direction" for \$I_{E_2}\$ and \$I_{E_6}\$, made evident by whether I placed that current on the left or right side of an equation. The only rule is that I am consistent about it. Here, I've decided that the current flows out of the (+) terminal of a voltage source.
Now, it's at this point that it would appear that there are six unknowns, \$V_A\$, \$V_B\$, \$V_C\$, \$V_D\$, \$I_{E_2}\$, and \$I_{E_6}\$, and only four equations. One way to resolve this is to have used so-called "supernodes" in the above equation development. But that just introduces another bit of terminology I'd like to avoid here. So let's stick with the above equations.
What else do we know? How about the fact that \$V_A=V_D+V_{E_2}\$ and that \$V_C=V_{E_6}\$? Nice. Now we have six unknowns and six equations. So this works out. We can either substitute in these two equations into the other four, reducing the number of variables to four, or we can keep six unknowns and pile on these two added equations. How you approach this is up to you. But let's perform the substitutions since it yields fewer equations and it's easy to do without much chance for misunderstanding:
$$\begin{align*}
\frac{V_D+V_{E_2}}{R_3} &= \frac{V_{E_6}}{R_3} + I_{E_2} + I_{A_1}\tag{$V_A$}\\\\
\frac{V_B}{R_4} + \frac{V_B}{R_6} + I_{A_1} &= \frac{V_D}{R_4}\tag{$V_B$}\\\\
\frac{V_{E_6}}{R_3} + \frac{V_{E_6}}{R_5} &= \frac{V_D+V_{E_2}}{R_3} + \frac{V_D}{R_5} + I_{E_6}\tag{$V_C$}\\\\
\frac{V_D}{R_4} + \frac{V_D}{R_5} + I_{E_2} &= \frac{V_B}{R_4} + \frac{V_{E_6}}{R_5}\tag{$V_D$}
\end{align*}$$
Now the unknowns are just \$V_B\$, \$V_D\$, \$I_{E_2}\$, and \$I_{E_6}\$.
The matrix solution is then:
$$\begin{align*}
\begin{bmatrix}V_B \\ V_D \\ I_{E_2}\\I_{E_6}\end{bmatrix} &=\begin{bmatrix}0 & \frac{1}{R_3} & -1 & 0 \\ \frac{1}{R_4}+\frac{1}{R_6} & \frac{-1}{R_4} & 0 & 0 \\ 0 & \frac{-1}{R_3}+\frac{-1}{R_5} & 0 & -1 \\ \frac{-1}{R_4} & \frac{1}{R_4}+\frac{1}{R_5} & 1 & 0\end{bmatrix}^{-1}
\begin{bmatrix}\frac{V_{E_6}-V_{E_2}}{R_3} + I_{A_1} \\ - I_{A_1} \\ \frac{V_{E_2}-V_{E_6}}{R_3} - \frac{V_{E_6}}{R_5}\\\frac{V_{E_6}}{R_5}\end{bmatrix}
\end{align*}$$
If you stick those equations into some solver, or do it manually, you should get:
$$\begin{align*}
V_B &=-\frac{5}{8}\:\textrm{V}\\
V_D &=8\frac{3}{4}\:\textrm{V}\\
I_{E_2} &=-8\frac{1}{8}\:\textrm{A}\\
I_{E_6} &=-\frac{5}{8}\:\textrm{A}
\end{align*}$$
And from there you should be able to answer any quantitative questions about the rest of the circuit, such as the value for \$V_A-V_B\$. |
H: Why is there no current flowing through the relay coil in this Qucs 0.0.19 simple dc circuit?
I just started looking at Qucs and am going through the components. I am puzzled by the results shown by the ammeters in the relay circuit below:
As you can see from the table, the circuit on the right is behaving as it would if the relay coil were energised, and showing 0.75 amps; but the circuit on the left is showing 0 for current, when it should obviously have a positive value there. I've tried swapping the coil terminals on the relay but the result is the same.
AI: In QUCS the relay (or relais as it is called internally) is a voltage controlled switch.
The primary side has infinite resistance when it is engaged or not engaged. When there is enough voltage across the primary it will close the secondary
https://github.com/Qucs/qucs/blob/develop/qucs/qucs/components/relais.cpp |
H: Controlling servo
I just got a I2C PWM hardware module.
I would like to use it to control some servos.
I found here and there that servos uses a 50Hz PWM, if the pulse is 1ms it will go to 0° and 2ms will make it go to 180°.
Is it the same for all servos? I also read that if you go below 1ms or above 2ms you will break the servo gears.
Mine are 'T & R SG90 servo 9 g micro servo'
Thanks.
AI: The SG90 is a very common sub-micro analog servo size, it is made by multiple manufacturers and is one of the cheapest (though cheap implies not that reliable).
Analog servos all typically state 1.5 mS/50Hz as the home (center position)
1mS is extreme left, and 2 ms is extreme right travel.
The 50 Hz frame rate is not absolute, many will work just fine between 50 - 75 Hz. If you stop sending frames, the servo goes into free mode (no drive to servo motor) and as soon as you send frames it locks at its position sense.
If the analog servo is modified for continuous motion they are 1.5 ms stationary/stopped
1 ms fast reverse/ant-clockwise and 2 ms fast forward/clockwise
The typical analog servo has 180 degree span for 1 - 2 ms, but most will go somewhat further ...ie <1 ms and >2 ms.
The SG90 has a very small and delicate plastic gearbox, it's easy to strip the gears (I have destroyed a bunch over the years).
There are also many servos that can span more than 180 degrees using the 1 - 2 ms signal. This is a good place (ServoCity) to see all the features available over a range of servos. |
H: Repairing failed board trace
I am replacing some igbt transistors on a circuit board from my Samsung TV. While de-soldering one of the 4 components one of the traces from the gate lead fell off.
I am looking for the best practice to solder the gate of the transistor into the broken trace.
Option 1 would be to sand or use a solvent to remove the remaining insulation from the trace. This would expose enough area for me to solder the transistor gate.
Option 2 would be to use a small wire and solder onto one side of the surface mount resistor to connect the gate.
The black areas around the board are from some insulation that was glued to the board (not heat and burn marks).
I am open to suggestions.
Update:
Update: It took 2 weeks to have the IGBT transistors shipped from China. I used a piece of 26 AWG wire to replace the lost trace.
AI: Rework wire to the nearest component on the same signal line is always your best bet, soldering onto traces can be problematic and is not mechanically sound. |
H: Exposed bulb/wiring project
Apologies if this is the wrong exchange.
I would like to start a home project, in which screw-in bulbs are left mostly exposed, and connected to semi-flexible wire. Something similar to this:
A closer shot, from a different peice shows the concept a little more clearly:
I'm very new to electronics, and intend to invest plenty of time into learning before I begin the project properly, but I'd like to know whether making the bulb-wire connection safe (as I assume/hope it is in the links provided) for others to be around/touch (interested kids, pets, etc) is beyond the reach of an amateur like me. Surely this is beyond simple grounding? If so, and if anyone knows what direction I should be going, I'd be very appreciative for any input.
Cheers!
AI: Interesting project. The good news is that the answer you want is no:
making the bulb-wire connection safe (...) for others to be around/touch (interested kids, pets, etc) is NOT beyond the reach of an amateur.
I said "an amateur". If you'll be the amateur who can do this is another thing. :-)
Let's see.
Their site says that they use an exclusive lamp: "With special halogen bulb 35 W, produced exclusively for IngoMaurer GmbH, only for use in the Lucellino product family. Luminous flux: 600 lm, light efficiency: 17 lm/W, output: 35 kW/1000 Std. 2000 h, CRI 100, EEC C. Socket E27. The bulbs are mentioned as exception in the EU regulation 244/2009."
I would try another kind of approach, and would not use AC. Obviously it wouldn't be just like the professional item, but would be more feasible. And more safe, although the risk of broken glass is the same as the original thing.
Now, the part of the answer that IS NOT about electrical engineering.
Use old glass lamps; hollow the bulb as shown here
Apply mate varnish to the bulb. There is craftmanship varnishes that can be applied to glass.
Use bare 18 AWG copper wire; normal wire stripped of the cap; apply a coloured varnish to the wire.
Inside the lamp, use a cluster of warm-light leds, rolled with tissue paper. The led circuit can be lighted with single cells. The leds could be these.
The AWG 18 wire would hold the lamp; at the bottom of the lamp, the leds' wire would be connected to the external wire. After the connection, you would use epoxi glues to hold everything.
you still need to provide the wings. |
H: How can you make a light source brighter?
I am about to begin to work on an electronics project that involves the output of red light.
After playing around with a bunch of LED’s, I realize that red and yellow are the weakest as far as “luminous” goes, no matter how much current you drive through the LED.
How could I make red and yellow more radiant? Like, amplifying the output? I searched “light amplification” and articles about lasers came up, but I’m not sure if that’s what I’m really going for.
AI: You have a few choices. Buy better LEDs and run them at the same current, run more current (assuming that's possible while remaining within ratings) through the same LEDs, or some combination of that and adding more LEDs.
More directional lenses or reflectors may concentrate the light there is into a smaller angle or area, but there is no practical way of getting more total light power from an LED than I mentioned in the above paragraph. Diffused LED packages emit light in all directions so they will have the lowest luminous intensity, all other things being equal. The same die, at the same current and other conditions, in a package that emits with a narrow angle will appear much brighter. |
H: Battery setup to power UVC bulb with 12 V DC at 1 A
So, I'm looking to power this UVC bulb kit:
The device size overall needs to be pretty small. (I'm trying to mount the bulb in the top of a cup-shaped housing. Ideally, the battery supply would be small enough to fit on/in a device about the size of a large solo type cup. (Actually, it would be acceptable to mount the battery pack externally, but this would have to be on the wall where the device is going to be mounted, with about a 3 foot distance.)
Cost is an issue as well, so nothing crazy.
I saw the option of using a 8-pack holder for AA batteries in series to get 12V. Will these support 1A? What kind of lifespan could I expect from such a configuration on this bulb?
Are there any other, better options?
EDIT: Manufacturer's website link, so you can view the specs and more info if needed:
Manufacturer's website
AI: Here's a schematic that is not re-triggerable but can be used as a 2 second timed lamp circuit. I've included a D45H11 because they are in TO-220 packages, are cheap, available everywhere, and can deliver a lot of current while maintaining a decent \$\beta\$.
simulate this circuit – Schematic created using CircuitLab
Feel free to lower the value of \$R_2\$ a little, if you want to supply more base current into \$Q_1\$ (if the lamp needs a lot of current then the base needs more drive current.)
Adding re-triggerability requires the addition of two diodes. But I didn't add them since you'd prefer it without that feature.
Also note that although the schematic shows a bulb/lamp, I really mean your entire lamp + circuit to go there. I don't know how long your HV circuit itself takes to stabilize and fire the lamp. But you can adjust the timing as needed.
The timing is determined by the two parts in the dashed box; \$C_1\$ and \$R_3\$. Adjust these a little to adjust the timing.
You can also use a BAV99 instead of \$D_1\$ and \$D_2\$. |
H: When driving a Nixie tube with the HV5622 shift register, how hot will the chip get?
I am a beginner in electronics. I am trying to drive the IN-12A Nixie Tube using the HV5622 Shift register. I am trying to calculate the temperature of the HV5622 during normal operation. For each Nixie tube, one cathode is always on. My approximate circuit schematic is shown below. How hot will the HV5622 get?
AI: Most of the power dissipation will be from the Vdd current in your application. If you run it at 12V Vdd, say, note that it can draw as much as 15mA, which is 180mW while clocking it at 8MHz, according to the datasheet. It's not clear (to me anyway) what the Vdd current draw is otherwise or whether there is a preferable state for the input lines. The datasheet is not very helpful, I'm afraid. For example it refers to Vin = 0, but there is no pin called Vin. It's possible the dissipation under static conditions is worse than 180mW but I would guess not (and verify!).
Edit: I looked at a similar datasheet from the original manufacturer (Supertex, who was acquired by Microchip) and Vin seems to refer to the output voltage, which is .. weird.
The output voltage is guaranteed to be less than 15V @ 100mA out and your output current will be perhaps 3mA per output. Probably the output voltage will be well under 1V, so allow less than 10mW for all 3 outputs.
There is also a bit of dissipation from leakage currents but that won't normally be significant. |
H: What is the reason/benefit of using vector potential of magnetic fields?
Especially in antenna theory books, they employ magnetic vector potential.
Why is the vector potential concept used?
For example the magnetic vector potential is written as:
And the magnetic field in terms of this potential:
But what is the motivation or need to introduce the vector potential concept here? And is the magnetic vector potential derived from Maxwell equations?
AI: The magnetic vector potential is defined to be analogous to the electric scalar potential for a point charge at distance R which is written,
\begin{equation}
V = \frac{1}{4\pi\epsilon } \frac{Q}{R}
\end{equation}
This simplifies many problems that would otherwise require using the electric field which is a vector. Similarly, the magnetic vector potential is defined
\begin{equation}
\mathbf{A} = \frac{\mu}{4\pi} \frac{Q\mathbf{v}}{R}
\end{equation}
This has to be a vector as magnetic fields are produced by moving charge, but this is still simpler than dealing with the magnetic field as that involves taking the cross product of the velocity vector with a position vector.
Once these potentials have been found for a given situation, the electric and magnetic fields can be found by a differential operator, curl in the case of the magnetic field. This ends up being much easier than directly solving for the fields. |
H: How to transmit many digital signals between two systems powered by different power supplies
I’ve run into problems with my project.I have two different power supplies and I’m trying to pass logic signals through the system as you can see in the picture.
I’m looking for an IC that could handle this job but So far I was unsuccessful finding it
I’ve run into parts such as SN74AVC1T45, but such a device connects both grounds together which would cost short circuit in my project.
I could also use digital isolators, But those are terribly expensive especially when I’m trying to make 20 of these bridges.
AI: Since there is an up-to 30 V voltage difference between the two grounds, it's better to use some sort of galvanic isolation between the two systems.
Low to medium speeds (up to 10Mbps with some optoisolators)
For instance you can use an optoisolator:
simulate this circuit – Schematic created using CircuitLab
Values are shown just as an example, and assume that you are using an optocoupler with a current transfer ratio (CTR) not much smaller than 100%.
Higher speed (up to 150Mbps)
If you need to go at very high speed (e.g. 100Mbps), you can also use an SiO2-isolation barrier based digital isolator, such as ISO7710.
Unlike conventional optoisolators, they do not use an LED and a photodetector, but they transmit a signal through a capacitor, by OOK modulation.
However, they are more expensive with respect optoisolators, and you need also decoupling capacitors on both sides.
How to reduce cost
Instead of using 20 isolated channels, you can try to implement some parallel-to-serial conversion in the first system, and a serial-to-parallel conversion in the second system. In this way, you'll have to send just 3 signals: data, clock, and a frame/load/chip select signal.
simulate this circuit
The Parallel-in serial-out (PISO) register converts your 20 parallel inputs to a single serial stream. The serial-input parallel-output performs the opposite operation.
When you pulse (low pulse in case of a 74xx165) the PARALLEL_LOAD signal, then you load the parallel datas into the PISO shift register. On each clock pulse, DOUT will reflect the value of the next parallel input. The clock and such DOUT is transmitted across the isolation system of your choice.
The SIPO register will receive the clock and the data value (note! you might need to invert the received clock signal according to your PISO/SIPO clock edge sensitivity!). After you have sent all the data bits, pulse the OUTPUT_LOAD signal, to update the outputs of your SIPO register.
If you have a microcontroller, then you can avoid the PISO register and connect the SPI outputs (clock, MOSI, and two GPIOs for PARALLEL_LOAD and OUTPUT_LOAD) lines to the isolator. You can also use a port expander instead of the SIPO register, but that would be an overkill, since you would use it just a mere SIPO register (typically cheaper and available from a number of manufacturers, so you are not stuck with just one).
NOTE: in the circuit diagram above GNDs and VDDs are not shown. |
H: Lock-in amplifier: Why multiplication with Cos and Sin?
I have two questions:
Why does a lock-in amplifier multiply the incoming signal s(t) with both a cosine and a sine reference and not just a single one?
What problem may eventually arise, if you multiply the signal only with either cosine or sine?
AI: Trig theory to extract the phase & magnitude.
If you only care about phase...
Say you have a signal \$Acos(\omega t + \phi)\$ and you want to extract \$\phi\$. You can use an oscillator of the same frequency to extract this info BUT the issue is the phase.
\$V_{sig} = Acos(\omega t + \phi)\$
\$V_{osc} = cos(\omega t)\$
\$V_{sig}V_{osc} = Acos(\omega t + \phi) Cos(\omega t)\$
By the double angle identity:
\$ = \frac{1}{2}Acos(\phi) + \frac{1}{2}ACos(2 \omega t + \phi)\$
a DC term relating to the phase can be realised as well as a component at twice teh freqency of the carrier. The phase can then be extracted by a moving average filter at the carrier frequency of a simple low pass filter.
\$V_{sig}V_{osc}Filt = \frac{1}{2}Acos(\phi)\$
If you care about phase and magnitude
To clearly extract the phase and magnitude then two oscillators, in quadrature, are required.
\$V_{sig} = Asin(\omega t +\phi)\$
\$V_{osc0} = Xsin(\omega t)\$
\$V_{osc90} = Xcos(\omega t)\$
\$V_0 = Xsin(\omega t)Asin(\omega t +\phi) = \frac{XA}{2}(cos(\phi) - cos(2\omega t + \phi))\$
\$V_{90} = Xcos(\omega t)Asin(\omega t +\phi) = \frac{XA}{2}(sin(\phi) + sin(2\omega t + \phi))\$
Filter these signals to remove the twice carrier component
\$V_{0f} = \frac{XA}{2}(cos(\phi) ) \$
\$V_{90f} = \frac{XA}{2}(sin(\phi) ) \$
via trig:
\$\phi = atan( \frac{V_{90f}}{V_{0f}} )\$
\$A = \frac{2}{X}\sqrt{V_{0f}^2 + V_{90f}^2 } \$ |
H: Mosquito Trap high Voltage
Here is the circuit, A and B are connected to the 2 plates.
Here is how it is supposed to work.
Q1, how safe is this trap to a human?
Q2, Basically how does it work?
Q3, Is there a current limiting circuit or is this a dead trap for human too?
AI: The plates could be deadly or cause injury if you touch them, depending on what else you are touching (such as a ground) and whether you touch one or both plates.
Usually safety agencies require that a proxy for a human (child human) finger should not be able to touch anything harmful. Here is an articulated test "finger" for IEC testing from this website. Rather expensive and specialized device, but you get the idea.
It looks from the photo like the gaps in the housing may be too large and the electrically "hot" parts too close to the face to be safe. There should also be a fuse -- maybe you didn't show it since you didn't show the switch.
There's not necessarily much inherently unsafe about this circuit but it would have to be protected, and the housing needs to be made from appropriately fire retardant plastic. All of which should be doubted without evidence to the contrary.
Aside from safety, I have my doubts that the relatively low 600V voltage will actually kill bugs- effective bug killers usually have a step-up into the kV. Not all bugs are that 'juicy'. It might just tickle them a bit. The visible LED should either be inverse parallel LEDs or have a parallel shunt diode.
As to how it works (to the extent it actually does work), the two diodes and 220nF capacitors form a voltage doubler, which will produce around 660V peak across the plates with no load. It is effectively short-circuit proof (barring failures of the capacitors or diodes) because a direct short between the plates will only conduct current through the two 220nF capacitors in parallel (440nF), which is about about 33mA assuming 240V/50Hz. However if one of the parts fails there should be a fuse to limit the current and prevent a fire. The LED (see my note above) appears to use a capacitive dropping circuit but the values you have found may not be correct. There is a bleeder resistor across the cap to prevent the pins from giving the user a tingle when they are pulled out from the wall. |
H: Does the current supplied to the load doubles when the voltage is doubled
Let's say that the load is connected to a 12V battery consumes 3A current. When the 12V battery is replaced with 24V battery causes 6A current flow for the same load.
I'm just trying to understand if the load consumes only the required amps from the source battery regardless of the voltage of the battery or does the change in voltage has direct impact on current flowing through the load
AI: It depends what the load is.
If the load is a resistor with good stability, and adequate power handling for the higher supply, then yes, at twice the voltage it will draw twice the current.
For other loads, the situation is more complicated.
If a resistor has a positive temperature coefficient, like a filament lamp, then it will take less than twice the current at twice the voltage, as it heats up and increases resistance.
If its power handling is only good for the lower supply, it may take twice the current briefly, then burn out and drop to zero.
More complicated loads, like a universal input voltage power brick, may take constant power when charging the laptop battery, so take twice the current at 120v that it takes at 240v. |
H: Form differential equation pair from discrete time system block diagram
I have a discrete time system block diagram.
And my question is what is the output y(k)
I managed to get what is V(k)
$$V(k)=\frac{1}{2}*V(k-1) +U(k) $$
But now i can't form y(k) because these adders mess me up.
I tried to do it and i got $$y(k)=-\frac{1}{2}*V(k) +V(k-1) $$
AI: Solving this via the z-transform is possibly the easiest route, however, proceeding with the difference equations:
$$\small v(k)=\frac{1}{2}v(k-1)+u(k)$$
$$\small y(k)=-\frac{1}{2}v(k)+v(k-1)$$
Form two simultaneous equations:
$$\small v(k)-\frac{1}{2}v(k-1)=u(k) $$
$$\small -\frac{1}{2}v(k)+v(k-1)=y(k) $$
Solving these for \$\small v(k-1)\$ gives:
$$\small v(k-1)=\frac{4}{3}y(k)+\frac{2}{3}u(k)\:\:\:...\:(1)$$
and solving these for \$\small v(k)\$ gives:
$$\small v(k)=\frac{2}{3}y(k)+\frac{4}{3}u(k)$$
Delaying the last equation by one time increment:
$$\small v(k-1)=\frac{2}{3}y(k-1)+\frac{4}{3}u(k-1)\:\:\:...\:(2)$$
Equating \$\small (1)\$ and \$\small (2)\$ results in:
$$y(k)=\frac{1}{2}y(k-1)+u(k-1)-\frac{1}{2}u(k) $$ |
H: Behavior of Boost and Buck Converters
I have a couple questions about boost and buck converters.
First, do they try to hold the output voltage constant, or do they alter the input voltage by a constant factor? For example, if I change the input voltage, will the output voltage change?
Secondly, what happens when you give a higher voltage than you're trying to achieve to the input of a boost converter (or a lower voltage to a buck converter)? For instance, let's say I was trying to use a buck converter to convert some voltage to five volts. What would happen if I gave it 3.3 volts on the input?
AI: do they try to hold the output voltage constant
Yes they do, these converters are mostly used for supplying a circuit with a constant supply voltage. Although it would be possible to make a converter where \$V_{out} = n *Vin\$ there is not much use for such a circuit. Most circuits rely on/need a constant supply voltage.
Ideally you want the output voltage to be independent of changes in the input voltage.
Higher input voltage:
No problem for a buck/down converter as long as it is within the limits it can handle
For most boost converters, depending on how they're made, the output voltage would rise with the input voltage. So for a boost converter, increasing the input voltage too much is not desirable.
Too low input voltage:
A buck/down converter will output a voltage as high as it can, this will then often be the input voltage or a bit lower.
For a boost converter it will maintain the proper output voltage as long as it is capable. |
H: Transconductance of a MOSFET
I am trying to understand this formula to find the transconductance of a MOSFET transistor, but I am not getting the passage from the second to the third line. What happened there?
Thank you
AI: The basis is the following approximate equation for the drain current (Wikipedia):
Taking the partial derivative gave gm as a function of (Vgs-Vth). One can express (Vgs-Vth) as a function of Id reversing the base equation. By inserting that one gets your problematic third line. |
H: Will this inverted switching circuit to drive 4 Ohm heater work?
I want to switch a heater, and learn to build some electronics while doing so). The heater is a heated print bed, from the Ultimaker original heated print bed kit (no longer sold I think). The problem is that the PSU that comes with the printer is underrated to provide the current. I've got a spare PSU that I wish to add to power the bed.
The original signal to drive the heater is 24vdc high when the heater is off, and 0Vdc when the heater is on. I hope to be able to drive it using the circuit below. The heaters resistance is 4 ohm, displayed as R5. Q1 (datasheet) is ment to invert the signal, so Q2 (datasheet) should be on when the original signal is low (coming from the 24Vdc + pin in the circuit). Q1 and Q2 are both N-channel MOSFETs.
I'm far from experienced with electronics. I hope that someone will shed some light on whether this will work, and if not, what I should correct. And of course, why it should be corrected, because the learning is an important aspect of doing this for me.
And of course, if there is something wrong with the drawing. Like unusual choice of components or symbols, I like to hear that to.
Will this circuit work to drive the heater?
EDIT
As Chris Stratton pointed out, there are test points on the circuit that is driving the heater, as shown here (or in the image below).
TP15 shows 8.2volts, steady line (measured with oscilloscope), when the heater is powered, and 0 when it is not. The 075N15N MOSFET shows the following figure, which seems an acceptable RdsOn with 8.2v on the gate. I do not understand why it is 8.2v and not the seemingly more optimal 10v as it is seems to me to be simply a matter of picking different resistors for the voltage divider R29/R30. I did not dare to put the probe on pin 4 of Q2. But I assume the voltage is probably the same there. Anyway, I can use the signal coming from TP15 to switch a low side N-channel MOSFET to drive the heater using an external PSU that shares GND.
AI: See the diode build in Q1. It is forward polarized, so max voltage on Q2 will be too low to switch on Q2, and doesn't matter what would you do on G of Q1.
EDIT:
User Andrew Morton pointed that BS270N is a N-ch FET, so it's just a matter of schematic symbol used by OP. If this is corrected, then yes, the circuit will do its work. (Sorry for nasty schematic edit...) |
H: Can my damaged Braun electric toothbrush with Duracell batteries explode?
I have a Braun toothbrush with 2 Duracell AA LR6/MX15000 (brand name Turbo Max), and today, the battery lid on the toothbrush broke, so I'm fearing that water might get in, and cause an explosion? I've just started using the batteries, so they're fully charged.
Sorry if this is a stupid question, I have no background in electrical engineering whatsoever, and I'm worried about the safety.
I don't really care if the toothbrush or batteries die for good, I'll get a new one next time I see it in the store.
AI: No. Don't worry. The worst thing that can happen is your appliance stops working.
Maybe you'll find someone that will say that there's a little chance of it explode, etc. But the chance of explosion is the same chance of one asteroid falling over your house, and if it happens the toothbrush is the lesser thing that you could worry. ;-)
With only two cells and with the kind of chemicals those cells use, there's no risk of explosion, neither of electric shock.
Don't be afraid: just put some glue or tape to close this gap and keep the water to get inside (it will be very ugly) and keep using it, if you want. It will not harm you, period. |
H: 6n137 does not work
Hi,
I've tried every configuration on keys (except shortcutting of course). No matter what I do there is:
V1 = 3,08 V (unless k1 is open)
V2 = 0,1÷0,2 V (no matter what I do)
Did I kill it? Or I did sth wrong?
AI: You're almost there.
What's missing is an output pull-up. If you look carefully at all the test-setups in the 6N137 datasheet you will see that they all have a pull-up named RL connected from the output to VCC.
There is a table called Recommended Operating Conditions which recommends that RL should be between 330 and 4000 Ohm for a supply voltage of 4.5 to 5.5 volts. I imagine that you can make this value even higher, but then they can not guarantee the fastest switching speed. It is a trade-off between power and speed.
There is sadly not a simple "example usage" connection in the datasheet, but the closest is probably Fig. 4 - Single Channel Test Circuit for Common Mode Transient Immunity:
If you just delete the pulse generator, it shows a reasonable example circuit. |
H: How to double the amplitude of an AC Signal
If I have an input signal, \$v_{in} = A\sin(2 \pi ft)\$, and I am wanting to double the signal's amplitude so that my output then becomes \$v_{out} = 2A\sin(2 \pi ft + \theta)\$, how might one achieve this using eletrical circuit components?
Any help would be greatly appreciated!
AI: Figure 1. An op-amp non-inverting amplifier. Source: ECE Tutorials.
If your signal is withing +/- 5 V you can use a standard op-amp non-inverting amplifier powered from +/- 15 V supply.
Unfortunately you haven't supplied any details on voltage or frequency range. |
H: Measuring resistance of a capacitor - unexpected results
I'm trying to measure the impedance (\$R_x\$) of C1 in the RC circuit shown below, but I'm getting some results I can't explain.
simulate this circuit – Schematic created using CircuitLab
Measurement:
On VM1 and VM2 I measure the voltage by consecutively taking a sample of \$10^4\$ points over 4 ms on each channel then I calculate the RMS.
(I'm using a multichannel DAQ card for output and input. I can't find the symbol, hence the analog VMs).
Using Ohm's law I calculate \$R_x\$:
\$R_x = R1 \frac{VM_2-VM_1}{VM_1}\$
The applied current is a sine curve of 0.5V where I varied the frequency between 1, 5, 10, 50 and 100 kHz. It is turned on for about 2-3 seconds during the consecutive reading of the two channels.
For each frequency I make 10 measurements and take the mean of those.
Expected:
I would expect the values to go like:
$$R_x=\frac{1}{2\pi f C}$$
where f is the frequency and C the capacity.
Fx at 1 kHz for a \$0.1 \mu F\$ capacitor I would get \$ 1591.59 \Omega \$.
But my measurement at that frequency is about \$ 500 \Omega \$
Measurements:
These are my measurements for different capacitors:
Why are my numbers this far of?
If I let something out please let me know and I will add it to the post.
Any tips, remarks or comments are appreciated.
Update
I've done the calculations again thanks for the helpful answers. It fits a lot better now:
There seems to be some increasing deviation though, is there an apparent reason for this?
AI: Let's take your case of the \$X_C=1591.\overline{591}\:\Omega\$ computation that assumed \$f=1\:\textrm{kHz}\$ and \$C=100\:\textrm{nF}\$. (I'm assuming you didn't actually measure the \$C\$ value but just assumed it... so we'll assume it here, too.) Your resistor, I take it, is actually measured with some meter. Again, I'll assume that your meter is perfectly accurate (it isn't, but who cares?) I'm also going to assume your "DAQ" board was used properly and that you interpreted the results correctly. No reason not to.
Let's see if we can work out what should be done and work out what you did.
If you know a fixed frequency, then you can consider resistance (\$R\$) to be the x-axis (positive-only because I don't want to drag this out into never never land) and inductance and capacitance will be on the y-axis. By convention, capacitance (\$X_C\$) is on the negative y-axis and inductance (\$X_L\$) is on the positive y-axis. If you want to know what the total series impedance will look like (and you are using a voltage divider, so it's 'series' here) to the power supply, then you mark out \$R\$ on the x-axis, mark out \$X_C\$ on the negative-going side of the y-axis, and this forms the two sides of a right triangle. The length of the hypotenuse is the magnitude of the "complex impedance."
I'm stealing the following image from here:
The above image gives you a picture of what I'm suggesting.
So, with this in mind you should expect to see a magnitude value of \$\sqrt{\left(1797\:\Omega\right)^2+\left(1591.59\:\Omega\right)^2}\approx 2400\:\Omega\$. That's the magnitude.
Now. Let's see. You probably worked out your equation so that it subtracts your nearly \$1800\:\Omega\$ resistor from this, directly. (Not as a vector.) So that would yield about \$600\:\Omega\$. Not far from what you wrote as the value you figured for \$X_C\$.
But the problem is that you did a direct subtraction.
You don't say what you measured in this case, but let me haul out a couple of numbers. You write that your source voltage is set to \$500\:\textrm{mV}\$ peak. Let's say you measured (using your DAQ board) a voltage peak of \$380\:\textrm{mV}\$ across \$R_1\$. Then you would have computed \$1797\:\Omega\cdot\frac{500\:\textrm{mV}-380\:\textrm{mV}}{400\:\textrm{mV}}\approx 567\:\Omega\$ for \$X_C\$ (using your equation.)
So let's do this differently.
You should have realized that the equation is derived this way:
$$\begin{align*}
Z &= \sqrt{R_1^2+X_C^2}\tag{1}\\\\
I&=\frac{V}{Z}\tag{2}\\\\
V_{R_1}&= I\cdot R_1= \frac{V}{\sqrt{R_1^2+X_C^2}}\cdot R_1\tag{3}
\end{align*}$$
From the above, you can solve (3) to get:
$$ X_C = R_1\cdot\sqrt{\left(\frac{V}{V_{R_1}}-1\right)\left(\frac{V}{V_{R_1}}+1\right)}$$
Plugging in my figures of \$V=500\:\textrm{mV}\$ and \$V_{R_1}=380\:\textrm{mV}\$ I find \$X_C\approx 1537\:\Omega\$.
Which is more like it. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.