text stringlengths 83 79.5k |
|---|
H: Coffee warmer capsule
I want to make a small capsule that you can throw in your coffee and keep it warm (not hot, lets say about 40-50C).
In the first place, I don't care about power supply - I will have 2 wire going into my coffee.
However I do care about it being water-resistant
I found wire-wound resistor, will it do the job?
Next, is there any chance to pack the "thing" (resistor) and a battery in cr2032-sized package? I need 1-2 hour lasting battery.
NOTE: I do not want to "heat up" my coffee (from 20C up to 50) but to slow down the heat loss. So lets say my coffee is ~60C and I need to be @~50C 1 hour later.
Final test: I actually ordered 5W 8.2Ohm resistors and in about 30-45' it was able to WARM UP a ceramic cup of water which was about 15C to a warm-like temperature 25-30C which is way more than I expected (I just wanted to slow down the "getting cold" time of my coffee) @5V drawing min 480mA and max 540mA. Temperature measurements done with my finger but that's actually the kind of precision I need (the amp draw was done with an actual precise amp meter and the power supply was a 300W PC PSU so the voltage was very steady 5-5.1 Volts). KUDOS TO THE ANSWER!!! :D
THOUGH: In my test I had the resistor inside the water and it started "dissolving" so there is NO way you can put that in your drink.
I got fed up and just put 5 8.2Ohm resistors under my mug and got done with. It actually works...
AI: Newtons Law of Cooling - Scala graduum caloris
the heat which hot iron, in a determinate time, communicates to cold
bodies near it, that is, the heat which the iron loses in a certain
time is as the whole heat of the iron; and therefore, if equal time of cooling be taken, the degrees of heat will be
in geometrical proportion
\$ \frac{dQ}{dt} = h\cdot A \cdot \Delta T(t)\$
Q = Thermal Energy (cooling rate)
h = Heat transfer coef - Taking a minimum of 3Wm-2K-1 [1]
A = Heat transfer area - \$\pi r^2\$, take a 8cm diameter mug = 0.02m2
\$\Delta T\$ = Temperature of the object - Ambient temperature = 50 - 22 = 28
Thus the cooling rate is: 3 * 0.02 * 28 = 1.68W
This is what you need to counter. So you need a resistor to transfer 1.68Watts.
Take a typical AA battery: 1.5V @ 3.9Wh (typical Alkaline). This potentially could source the needed energy for your required 1-2h (2.32h).
From \$P = \frac{V^2}{R}\$ R would therefore need to be: \$1.339\Omega\$, but this equates to 1.12A CONTINUOUSLY from a AA, which it will not do (50mA is a typical drain)
This should show you the methodology needed & its a simple case of finding a suitable battery, suitable resistor, for the given environment.
[1] http://www.engineeringtoolbox.com/convective-heat-transfer-d_430.html |
H: A robust way to supply power to a solenoid
Solenoids typically heat up very quickly and it seems a few seconds of power supply is already adequate. Does anyone know of a robust/established way for supplying just a few seconds of power to a 12V/1A solenoid? How about cap discharge?
Thanks
EDIT 1 The solenoid pushes and pulls a lock for my rabbit house, so continuous operation isn't needed. In fact, my solenoid needs a fair bit of cooling time.
EDIT 2 My current plan is to drive it with 8051 and a transistor, but I'm open to alternatives. I could get the 8051 to give the pulses, but I fear that my code is buggy and frying my rabbits as a result. So I was hoping to come up with a relatively fail-safe method.
The solenoid is spring loaded, so that the pin retracts when the solenoid is engaged (spring is compressed) and releases when it's not (spring is released). With this motion, I'm planning to get it to unblock and block the gate (thus, a lock).
The rabbits will be locked up at night.
AI: Yes. This is easily achieved with a switch and a battery. No need for a capacitor.
simulate this circuit – Schematic created using CircuitLab
Operation
Press the button.
Hold for required number of seconds.
Release the button.
This satisfies your requirements as stated in your original question.
As you suspected, a capacitor could be used to provide a pulse to operate the solenoid.
simulate this circuit
Here we'll charge up the capacitor through a resistor. If the switches are left on the resistor will limit the current to a safe value that won't overheat the solenoid. Let's figure out some values. First the solenoid.
$$R = \frac{V}{I} = \frac{12}{1} = 12 Ω$$
The power (heat) in the solenoid is given by
$$P = V·I = 12·1 = 12 W$$
Let's limit the current to 0.25 A. This will require a total resistance of 48 Ω (12 V / 0.25 A) so we'll need a 36 Ω resistor. We'll use a 39 Ω as this is a standard value.
Let's say we need a 0.5 s pulse to move the solenoid. We don't have a figure for the inductance of the solenoid so we'll just treat it as a resistor for now.
The time constant for an R-C circuit is simply R·C. Therefor
$$C = \frac{t}{R} = \frac{0.5}{12} = 0.041 F = 41,000 uF$$
This is a lot but not impossible. 4,700 uF capacitors are readily available. Assuming your rabbit is on a tight budget you might find capacitors in old power-supplies, etc. You need to make sure that they are rated for 12V or higher. Simply parallel all the capacitors making sure to keep the polarity correct.
I'm suggesting a 3-way, centre-off switch. This way the solenoid can be reversed for open and closed.
If finding the capacitors proves to be a problem we'll have to add some electronics to do the timing.
Edit after Update 2.
The requirements are simpler now because the solenoid is known to be spring return.
simulate this circuit
I tried to come up with an alternative but it's hard to beat the old 555 timer. This configuration is a monostable. When Q1 turns on it triggers the 555 which turns on Q2 and the relay. Time delay is set by \$R4 \cdot C2\$. |
H: Why did my fuse blow after 3+ years of no problems?
For several years, I've had a solenoid wired to the 24VDC output of a PLC (Rockewell Automation 1769-OB16).
To protect the PLC output card, a fast-acting 500mA fuse was installed between the PLC and the solenoid. The fuse has been working without any trouble for a long time.
Recently, this fuse blew. There was no change on the line, no abnormal or excessive usage of the solenoid, and nothing out of the ordinary. It just blew. I replaced the fuse with an identical one, and the solenoid works just as well as it did before the fuse blew.
I measured the current to try and find out why it blew, and found that the solenoid is actually pulling 530mA. I let the solenoid continue to pull that much for over 20 minutes, and the fuse held.
Why does the fuse not blow even though the load is pulling more than the fuse is rated for? And why would it blow only now, after more than 3 years, and not sooner?
AI: The rating of a fuse is the amount of current that it will carry indefinitely without blowing. In order to guarantee this, most fuses will not blow until the current rises to 2× or more of their rating. In fact, if you look at the datasheet for a fuse, there will usually be a chart that relates time-to-blow to the percent (over)load. Most such charts rise to infinite time to blow somewhere near 200% load.
If you're putting somewhere between 1× and 2× the current rating of the fuse through it, you're in a gray area in which it may or may not blow, or it may just get weaker over time, eventually leading to a lower threshold for blowing.
There are other things specific to solenoids that could cause such a failure, too. At a simplistic level, you can think of a solenoid as an inductor, and its DC resistance limits its steady-state current. However, when the plunger is actually moving, the inductance is changing, and this creates an extra surge of current each time you operate it. If something in the mechanical load causes the operation to be somewhat slower than normal, this surge will last longer, and could potentially blow your fuse.
This is why slow-blow fuses are normally used with loads that have startup surges. It is also why you should use a PLC output that is rated to handle the surge. |
H: Do I need coupling capacitors with this balun?
I'm connecting an antenna to Atmel's SAMR21 microcontroller and the datasheet provides this guidance:
I've found 2450BL15B100E, an SMD balun, but I'm not sure if it actually contains a transformer, or if it's in fact a lumped LC balun (in which case I'm guessing I wouldn't need the coupling capacitors?).
So, should I put the coupling capacitors between the processor and the aforementioned part?
AI: The answer will largely depend on the internal makeup of the input port of the microcontroller. A DC path to ground from the balanced RF input port is likely to be undesirable, especially if the manufacturer has suggested capacitive coupling. These lines could go directly to transistor stages and the DC grounding (through the balun winding centre-tap) would alter the biasing.
Is there a good reason not to include the coupling capacitors? |
H: Embedded processors gate length
New Intel and AMD processor feature processors with 14-22nm gate lengths, and this information is widely available. However, when it comes to microprocessors (PIC, ATMEGA) I have not been able to find this information. Is it "classified" ?
As to ARM processors, since ARM is an architecture, who defines the technology to be used when manufacturing say an Cortex-A8? I used this example because the Beaglebone Black uses a ARM Cortex-M8 manufactured by Texas Instruments, so which of these entities sets the technology? Again, unable to find information related to this.
AI: New Intel and AMD processor feature processors with 14-22nm gate
lengths, and this information is widely available.
The reason this is so highly publicized is probably historic more than anything, relating to Moore's law. There probably isn't a company more ingrained in the computer market than Intel (Gordon Moore's company). They have been pushing the process envelope for years. Regardless of how we got here, it's become a race to the bottom between the foundries to see who can get to the smallest process node first. Whoever that is, is going to have a big payday, making the bleeding edge SOCs of that time.
However, when it comes to microprocessors (PIC, ATMEGA) I have not
been able to find this information. Is it "classified" ?
It's not that it's classified, it's more than no one cares. Wind the block back a few years and the choice between AMD and Intel for your computer when you bought it was a big deal. No one cares whether there is a PIC or ATmega in their toaster oven, let alone what process node it was made in. The designers don't care either. My company uses PIC almost exclusively. Process node was not a variable when that decision was made. It was all based on cost, tools, availability, and support. For that reason, Atmel and Microchip are probably still making those lines of products in a micron scale fab because it's paid for.
As to ARM processors, since ARM is an architecture, who defines the
technology to be used when manufacturing say an Cortex-A8?
ARM only licenses their core, they have no say in what process node is used.
I used this example because the Beaglebone Black uses a ARM Cortex-M8
manufactured by Texas Instruments, so which of these entities sets the
technology? Again, unable to find information related to this.
Again, you're not going to find that information because the people buying those chips don't care. TI may tell you if you ask them directly (maybe only after you buy a few thousand chips), but they have nothing to gain from publishing it. |
H: Please review my board design
This is a follow up to my question from yesterday about my schematic Please review my RGB Controller
I've fixed the incorrect DC jack component that was present in my previous question, along with adding the ESP caps across the regulator and the ATTiny's VCC and GND.
Now I've made my board design, and as this is my first board design I want to make sure that I've done it correctly. I followed Jeremy Blum's tutorial to learn how to lay everything out and route the traces, and I've also ran the DRC for the board house I'm going to use (OSHPark) and everything is OK.
Before I get it printed I wanted to run it past you guys to make sure that there's not something I'm missing, or something that the DRC missed.
Here is the schematic, board, and the BOM (the BOM is incomplete due to Design Link being down right now): https://www.dropbox.com/s/t01ht6c0a93fs54/RGB%20Controller.zip?dl=0
Comments, suggestions, and critique is welcome!
AI: Add reference designators to silkscreen (and several resistors in the schematic are missing refdes as well).
Decoupling caps should be close to whatever they are decoupling, not packed into a corner. Also, 20uF is a weird value, I'd switch both 20uF to 1uF low-ESR (ceramic).
If you're doing SMT for the USB connector and regulator, why not use SMT resistors and caps? Maybe even most of the diodes? You will have a much easier time putting the decoupling caps close to the things that need decoupling.
It'd be nice to clean up the right angle traces. Use 45º angles wherever possible.
Also, read the LM2596 datasheet, particularly the parts concerning layout. There are certain traces that should be shorter and thicker, especially your input cap and diode connections. |
H: Voltage Mode Control of a DC-DC Buck converter
My previous question was about a hysteretic-style buck converter:
Buck Converter Control Scheme- Why isn't just a comparator not enough?
By what I gather from previous answers, a hysteretic-style buck converter would not work efficiently as the switching frequency is not constant, resulting in output ripple.
Here is the schematic of standard Voltage Control Mode scheme:
The control loop has two main parts: error amplifier and voltage comparator. An error amplifier is a differential amplifier with a high gain.
I understand that to maintain switching frequency constant, the error voltage is compared with a sawtooth(of fixed frequency) and the output of comparator (VR) controls the duty cycle.
What is the function of an error amplifier here?
Even if the output was directly compared with a sawtooth wave, the switching frequency would have remained constant.
What I've read is that an error amplifier is essentially an integrator in this case.
How does an integrator help here? Is the function of capacitor is just frequency compensation?
Help me out! This is a difficult topic for me and there aren't many resources available :(
** Update **
The output of integrator would be a ramp with negative slope at very low frequencies. How does that help? Why only an integrator?
AI: Your schematic is showing current-mode control.
In voltage-mode control the error amplifier compares the output voltage to a reference, then provides an output that is compensated and compared to a sawtooth wave that will vary the PWM duty cycle to drive the error lower.
At low frequencies (esp DC) we want the error to be as small as possible, so we want the error amp/compensation to look like an integrator. Any error will then build up and drive the PWM to force the error to zero. Only zero error will allow the output of the compensation to reach steady state at DC.
If we just used an integrator for the compensation we would have to close the loop at a very low frequency which would mean poor transient response (poor rejection to disturbances). That's because an integrator provides 90 degrees of phase shift and we would have to close the loop well below the L-C output filter resonance which provides another 180 degrees of phase shift. We also wouldn't be able to control transients causing the output filter to ring because our control bandwidth would be lower than the LC resonant frequency. Still, we want to put a pole at DC for good DC regulation.
The output filter L-C has 2 poles. So in order to cancel those two poles we can put 2 zeroes in the compensation. Now we still have that 90 degree phase shift until the switching frequency effects and error amp bandwidth start to come in.
With the two zeroes we form in the compensator we get a couple of poles as well (if we want them or not).
So we put one additional pole in the compensation somewhere around half the switching frequency to filter out noise and ripple, and a pole at the capacitor ESR zero frequency to cancel that. Now we can close the loop at a reasonable frequency with a reasonable phase margin and still get good DC accuracy. |
H: Powering LED strip and Raspberry Pi from a single 10A 5.5V power supply
I plan on making an ambilight project for my TV, using a ~4m 5V APA102 60leds/m LED strip, controlled by a Raspberry Pi. In order to power the LED strip, I bought a PSU rated 10A 5V, which in reality actually measures to ~5.54V. I know this shouldn't be a problem for the LED strip, which is supposed to endure a max of 6V.
The problem:
I want to power the Raspberry Pi in parallel with the same PSU that will power the LEDs. However (although I couldn't find any official documentation) 5.5V may be too much for the RPi to handle and I'm afraid not to burn it.
I was thinking of putting a diode just before the RPi, which would drop the voltage to ~4.8V, but then this could be too little.
I actually tried putting an SR1100 diode after the power supply to measure the resulting voltage, but it still is 5.5V. Could it be because there is no load?
Would it really be a problem if I directly supply 5.54V to the Rpi?
Would a diode solve problem and why I can't see a voltage drop when I measure it without a load?
Is there a better solution to reliably power the RPi from the same PSU?
AI: raspberry pi is designed to run off USB power which is 4.75 volts to 5.25V
a Schottky diode (eg:1N5817) will give a 0.3 to 0.4 volt drop which should do what you ask.
However I'd be concerned about the compliance of the power supply, how stable is that power supply voltage under load, and under supply fluctuations. it might make more sense to employ a cheap buck-boost (SEPIC) DC-DC converter to supply the raspberry pi. |
H: Diode circuit fed with voltage follower doesnt work
I have a ldr circuit. In order to drive other circuits i connected a LDR circuit to voltage follower. I want to see at the output either nearly 0V or 9-12V. At Ltspice it works, but at the blackboard output remain same 9V. Yet, at the + pin of the voltage follower i see 9V or 0V. What do I need to connect in order voltage follower to work correctly?
AI: I believe you could accomplish your goal by making R5 large (> 4.7k for the LM385 Op Amp to not be loaded to heavily.) and placing a diode from ground to the junction of R5 and the + terminal on U2. This would pull the -12 to ~0V and leave the +12 alone. The only issue is if this is working at high frequency > 1MHz, the parasitic capacitance of the diode could start to affect it.
simulate this circuit – Schematic created using CircuitLab |
H: diodes blow with no load on full wave bridge rectifier
I have built what I thought is a simple first stage for a power supply consisting of only the full wave bridge rectifier (made up of individual 3A SMD diodes) and bulk capacitance.
The moment I apply power through the transformer my diodes blow. I've checked that I haven't installed any diodes back to front. The transformer can output a maximum of 4.81A but I apply power to the circuit with no load. I'm not planning to exceed the 3A limit in my final solution.
The basic schematic for the circuit is as follows.
What on earth could be the problem? Is this caused by the initial charging of the capacitors? I've checked that the board also has no short circuits between the positive and the ground rails.
Update
two circuits with same results:
Circuit 1 - total capacitance: 6580µF (made up of 14 470µF electrolytic through hole capacitors in parallel)
Circuit 2 - total capacitance: 2820µF (made up of 6 470µF electrolytic through hole capacitors in parallel)
8 diodes making up two full wave bridge rectifiers are B340LA SMD 3A diodes each (http://www.farnell.com/datasheets/639175.pdf)
All of the above fed with a single toroidal transformer with two secondary windings of 18V/80VA each. Single secondary winding tested in each case with both having the same result (fire coming out of the diodes which are then failed short circuit).
AI: Yep, Inrush is killing you, that is a lot of bulk capacitance to have without any inrush limiting. Assuming a trace resistance of 100mOhm, and that your 6 or 14 electrolytic capacitors in parallel will have ~ 0 ohm impedance, your instant current is 160A on startup. Here is a nice site for looking at this.
MustCalculate
Most large capacitance banks have huge diodes and Capacitors designed to stand the inrush, or some form of inrush limiting, passive or active. A cheep passive solution is a NTC resistor, they are sold for this exact purpose, here are some on digikey: Here. You place them in series with the bank and the input voltage, as they heat up the resistance goes down.
Update:
I'll also add if you choose to go this route, notice the NTC's are rated for maximum capacitive load and approximate steady state current. The loading is usually for 120 and 240V but this can be adjusted to your ~16VAC easily. Since the important property is power dissipation, the difference is squared. for example: a device rated for 500uF@240VAC will handle 2000uF@120VAC or 8000uF@60VAC. Notice the voltage difference is squared.
Also Note:
This method is only effective if the device is not powered on and off quickly in succession. The NTC must have time to cool back down to room temperature otherwise when you flip the power back on, the resistance will still be low and your diodes could go poof again. Typically they take less then a minute to cool off. That being said, they will still provide some protection even when hot, as they still have a lot more resistance then a PCB trace. |
H: Unexpected resistance on breadboard
My first question on EE, please be kind. :-)
I am trying to learn how the ADC works on this Cypress PSoC 4100 board.
The circuit in the picture does nothing but power the board, connect it to the LCD display, and show the readings from the ADC. The ADC is set up to use the internal 1.024V reference with the bypass cap, which is built onto the 4100 board itself. The input to the ADC is on pin 2.0, which is in the upper-right corner of the photo.
I noticed that the ADC never output the minimum value (which is -2048, since it's a 12-bit ADC and outputs signed values), even when I connected the ADC input to one of the ground rails. The only way I was able to get a minimum value is to connect the ADC input directly to the ground pin on the 4100 board.
Using my multimeter I discovered that there was 500-600 ohms of resistance between the breadboard ground rail and the ground pin of the 4100 board! In the photo, the multimeter black wire (entering at the bottom) is connected not exactly to the 4100 board's ground but to the breadboard socket right next to it, while the red wire (also entering at the bottom) is connected to the ground rail on the lower breadboard. That is connected via a black wire on the right to the ground rail on the top breadboard, which his connected to the ground pin.
The multimeter shows 580 ohms of resistance even though it's nothing but metal between these two points. That's causing the ADC (fed via the second red wire right next to the multimeter red wire) to read 100 or so mV instead of the expected zero.
If I wiggle the black wire that connects the ground rails of the top and bottom breadboards, the resistance jumps around a lot, anywhere from 200 ohms to over 1K.
Moving the wires that connect the two breadboards to the left side and away from the LCD signal lines didn't change anything.
If I connect the multimeter red wire to the top breadboard's ground rail, right next to the black wire that connects it to the ground on the 4100 board, I still see about 230 ohms. This is over a distance of about 1cm!
Unplugging the LCD display reduces the the resistance to about 38 ohms.
Removing power by unplugging the USB cable (it's USB-powered so it's all 5 volts) reduces the resistance down to about 6 ohms.
When I tried measuring the resistance between two (connected) ground rails on another otherwise empty breadboard, I saw 3 ohms max.
My question is, what's causing this resistance and how do I get rid of it? Is it some kind of inductance issue? Having 100 mV or so of voltage on the ground rail isn't fatal to the project by itself, but whatever's affecting the ground rail might also affect the input to the ADC, which would throw off the readings.
Thanks!
AI: Power down before measuring resistance!
As explained here, multimeters cannot measure resistance - they apply a small current and measure the resulting voltage.
So if you attempt to measure resistance on a circuit that's powered up, and there is already current flowing in that circuit, you are measuring the voltage due to the circuit's own current, and that gives a completely misleading result. |
H: What rating should a spade electrical connector have to power an eTopxizu 12v Dc 30a 360w Regulated Switching Power Supply from a US wall outlet?
I'm looking to power a Prusia i3 3D printer with RAMPS 1.4 from an eTopxizu Dc 30A 360 W Regulated Switching Power Supply, at the moment I'm looking at how to connect it (safely) to a United States wall outlet.
I've seen that you can cut off the female end of a standard power cable for a PC and strip the insulation to reveal three insulated: wires, ground, positive and minus respectively.
And then those would be connected to a spade electrical connector which has a rating for a particular kind of wire.
(And yes, I know this would likely be the last step in the process after wiring everything up before plugging it in, and safety dictates that I NEVER NEVER touch the leads when it is plugged in; I plan to cover the back end of the device with a 3D printed cover and a switch so nobody touches the leads.)
But my question is, that given the type of wire I intend to use to connect it to the US outlet, what sort of rating should the spade connectors have?
AI: 360 W at 120 V will draw 3 A on full load. (From P = V * I)
Connect with an inline fuse in the L wire and make sure you connect the earth / ground lead.
Any forked or ring terminals that fit that size screw are likely rated for 3 A or more. If all the strands of your mains lead wires fit inside the crimp barrel it's a good sign that all is well. |
H: transition speed causing issue with jk flip flop
i'm using jk flip flop to latch on a state given by 2 switches to either stay ON or stay OFF, knowing that one of them could stuck on ON which is why i use one of them as the clock input for the 4027B which works fine on simulation but not in the real pcb
i've read that the transition time on this flipflop could cause a problem but i'm new to this so i was asking for help to why this won't work (all the circuit is revised and voltage is correct on all terminals of the 4027 but the output which sometimes output around 2 volts and other time doesn't)
link to a similar problem caused by the transition time Slow clock edge causing issues with D flip flop behavior
also i've achieved the same design using the 4013B which is a D flipflop, would the new one work? is there an easier alternative other than using a microcontroller ?
AI: I don't understand what you're trying to accomplish (try using shorter sentences), but one glaring problem in your design is the fact that you have the J and clock inputs of your FF tied together. This means that the J input will be changing at the same time as the clock edge, which almost certainly violates the setup and/or hold time requirements of the FF. Why don't you just tie the J input high? |
H: Explanation of the current-voltage relationship of a capacitor
I came across the following statement in a textbook:
The voltage on a capacitor cannot change abruptly. According to
$$i(t)=C\frac{dV}{dt}$$
a discontinuous change in voltage requires an infinite current, which is physically impossible.
How does this relationship prove that a discontinuous change in voltage requires an infinite current?
AI: How does this relationship proves that a discontinuous change in
voltage requires an infinite current?
First, note that the equation given in your question defines an ideal (non-physical) capacitor and so this is the context of my answer.
Second, note that if the capacitor voltage is discontinuous at some instant(s) of time, the time derivative of the voltage does not exist there.
However, one can approximate a discontinuity by, e.g., letting the voltage change linearly with time over some short interval. For example, let the capacitor voltage change linearly from \$0\mathrm V\$ to \$1\mathrm V\$ in \$\Delta t\$ seconds.
Then, according to the ideal capacitor equation, the capacitor current during the transition is
$$i(t) = C\frac{1 \mathrm V}{\Delta t}$$
In the limit as \$\Delta t \rightarrow 0\$, the capacitor voltage becomes discontinuous (finite change in zero time) and the capacitor current goes to an infinity large, infinitesimally short pulse; a current impulse.
But this is academic since physical capacitors obey the ideal capacitor equation only approximately and over a relatively narrow region of operation. |
H: DMOS construction
I am learning for my exam , and i am not sure if this DMOS construction si correct. Did i make any mistake or is it as it should be?
AI: your circuit is a correct translation of the expression. here is an different circuit that gives the same result but uses only one type of gate.
Sometimes it is desirable to use several of the same type of gate for example if using 4000 series CMOS parts which typically have 4 gates of the same type
simulate this circuit – Schematic created using CircuitLab |
H: Measuring uA current with DMM?
I'm wondering if anyone knows the accuracy of measuring uA current with a cheep (~25$) DMM? I need to measure some low power circuits (10-500uA) and I'm deciding whether I should get an analog uA meter or use my DMM.
My guess is that the DMM will not be very reliable? I can test it with a dummy resistor load and attempt to verify with a scope I suppose.
Update:
Accuracy I'm looking for: good question, I would ask the same. within 2.5% is good enough, what I want to try to avoid is disturbing the circuit...
Also The op-amp + shunt idea is one I had, I wanted to get peoples opinions first before I invested the time into that.
AI: It all depends. What accuracy are you looking for? Some DMM have uA range, but the burden voltage is high. You can solve this easily using an external circuit. All you need is a resistor and an precision OpAmp.
Dave Jones from the EEVBlog designed this circuit that lets you use your DMM in DC Volts mode to measure precisely nA, uA and mA with good resolution.
You can find the schematic and pcbs designs files in: http://www.eevblog.com/projects/ucurrent/
If you don't want to build the whole circuit it's fine, you can just use the uA part to get a good reading. Just find a suitable resistor and an OpAmp with similar specs. It depends on the bandwidth (how fast the current will be changing).
I have built several of these myself and they work great.
Another solution is to buy some of the Silabs gecko starter kits that include a current measuring circuit (they cost $29USD). It's easy to connect your circuit to those stater kits and via their software you can do several power calculations. You can even see a real time graph. |
H: Controling 3 LEDs using only 2 IOs
I once saw somewhere that it is possible to control 3 LEDs with 2 IOs and only using LEDs and resistors. The high state is 5v and low state is 0v.
With 2 digital IOs, we can have 4 different possible situations for LEDs.
00 -> all off
01 -> LED1 on, others off
10 -> LED2 on, others off
11 -> LED3 on, others off
So it is logically possible using logical gates and mixing them. but How could it be done only with resistors and LEDs? and I am sure this method exists.
If they were 2 It was so easy. we connected them the in opposite to each other in parallel with a series resistor and 01 would light the first one and 10 would light the other one. like this :
AI: If both IO lines have the same logic level then neither of the two LEDs would light so you use this to control a 3rd LED but I think you need two diodes acting as a sort of AND gate: -
simulate this circuit – Schematic created using CircuitLab
If either GPIO line is low then the LED won't light. If both GPIO line is high then the LED lights. |
H: convert 3phase 220v into 3phase 165volt
I use a frequency converter which has an input of ONE phase 240 volt, 50hz.
This device gives me output from 200-240volt, 0-500hz and THREE phase.
The spindle motor I have needs input of 165 volt, up to 300hz.
This motor is connected in Y-format.
I did make three tranformers and connected them in Y-format. It worked but not good enough and it is very very heavy]2
Can you help me to solv this challange in an easier way? (Maybe without using tranformers)
This will be use in Norway (240v/50hz is standard).
AI: Those transformers are oversized, 330VA transformers for 300Hz use should be much smaller than that, and you don't need 300 VA transformers if you use autotransformers:
simulate this circuit – Schematic created using CircuitLab
the autotransformers only need to handle about 100VA and at 300 Hz
at 300hz the transformer core can be 1/6th the mass of a 50Hz transformer
and if you don't need isolation use autotransformers which will in this case give another reduction by a factor of 3
If you can biuld the three transformers on a three phase core that will save some iron too |
H: Why using A PCB is better than used a bread board or a vero board?
Why using A PCB is better than used a bread board or a vero board? i want some advantage of this
AI: First of all they are used in different situations.
Often a PCB is a pretty definitive design, breadboard and vero board is mostly used for experimenting with certain (simple) circuits or testing certain principles.
With breadboards and vero boards you can have a lot of unwanted parasitic capacitance. Depending on your application this can have a lot of unwanted consequences for example erratic behavior in high speed applications. In most applications breadboard and vero board work fine.
Another disadvantage is that a breadboard or veroboard allows you less flexibility in routing a component or group of components in the recommended way. It can sometimes be a pain to make a circuit in the recommended way(analog and digital separated, high speed/low speed etc, all the normal design rules) on a breadboard or vero board. Last but not least, most components are fine pitch SMD components these days, the only way to use these on breadboard or vero board is to use an adapter board. |
H: How can I monitor AC current in multiple wires with a single ammeter?
I'm looking for a cheap way to monitor my electricity consumption across multiple power plugs, on a per-wire basis (ie. I'm not looking for total power consumption across all wires)
There are many commercial products I can use either at the power plug level or directly in the electrical cabinet, but they are designed to monitor a single wire, and cost usually around $15, so monitoring multiple wires skyrockets the global price quite fast, not to mention the space issue for fitting all those ammeters.
Also, I would have to use multiple clamps in a small space, and I'm not sure this wouldn't cause unwanted artifacts in the measurements.
Is there an easy way to achieve this? I was thinking it should be possible to monitor a single wire and build a circuit to switch a different power cord on that wire every second or so. Is this a stupid idea, or does it make sense?
Or are there ammeters so small and cheap that it makes sense to connect one in series with every single fuse in my electrical cabinet?
I was considering building a prototype over a 12vac supply. Am I going to run into scaling issues when upgrading to 110 or 220vac?
AI: Multiplexing the actual AC current is not a good idea. If you're going to multiplex anything, it should be the small current signals.
That means you are going to have a sensor per AC line. The simplest is probably to use dedicated current transformers. The clip on transformers are for convenience, but more expensive and larger than dedicated fixed-mounted current transformers. You'll have to do a little re-wiring, but only once. I would include the burden resistors with each transformer.
Once you have the two current transformer output wires for each AC line you want to measure, you have more options. One possibility is to have these all come to one board that does the absolute value and low pass filter functions on each signal, and has a microcontroller scan the results. You adjust the low pass filters so that the micro can scan each signal without aliasing. The micro then reports all the aggregated measurements to wherever you want them, or displays them, or whatever. You didn't say what you wanted to do with the results.
However, if the purpose is to measure power, then you really need to take the waveforms into account. Lots of devices don't look resistive and can have significant power factors. Put another way:
Watts = ave(volts x amps)
The product of average volts and average amps is NOT power, and has little meaning. There is something called the "VA" (Volts x Amps) measurement:
VA = rms(volts) x rms(amps)
but that's not real power either, and even this requires RMS volts and amps, not just average. The ratio of Watts to VA is the power factor. Only a pure resistive load has a power factor of 1 such that you can get away with computing VA and using it as real power.
If you are trying to measure power consumption, like what the power company bills you for, you want real power, not VA. This is not so simple to measure because you have to sample the voltage and current many times per power line cycle, take the product of each of the sample pairs, and low pass filter the result. Multiplexing all that would be difficult, so it effectively means a microcontroller per AC line. These can then all dump out their data over a CAN bus or something, which allows collecting it all in one place. |
H: Why a high voltage AC always present in SMPS AC to DC power adapters
I'hv seen every 2 pin SMPS AC to DC adapters shows a little high voltage respective to the ground on the out put, on both + and GND wires(or more if more wires present).
This voltage is high enough to light small neon bulbs or a line tester, but very low current, barely could be felt. This voltage vanishes if I connect the output to ground somehow, e.g. touch it while standing on floor bare foot.
As the size of the adapter increases, the AC voltage and current increases. When laptop adapters are powered from a ungrounded AC outlet, they gives reasonable shock from the 19V DC(or whatever else) output.
Perhaps this is the reason why many 3 pronged laptop adapter carries a warning CONNECT ONLY TO GROUNDED OUTLET Connecting to a grounded outlet magically vanishes the high voltage.
I am aware about the EMI filtering capacitor connected between high voltage and low voltage ground, I tried to solve this by removing them, but this trick is not working.
Why and how this mysterious AC voltage is created ?
Is it harmful to sensitive electronics components ?
Is there any way to solve this without grounding the DC output side ?
AI: The internal transformer used to step down (and isolate) the power voltage has capacitance between primary and secondary - this can be around 10pF to 1nF depending on construction and size and is enough to produce several to several hundred micro-amps of current.
It can be harmful to sensitive electronics - the open circuit AC voltage normally produced on an un-grounded wall-wart might be AC voltage divided by two so this means 60V AC for an 120V AC power supply.
Grounding is the only method I can think of but, remember that the amount of current that can be supplied is not harmful enough to cause you any damage providing you are sensible and don't push the wires into your eyeballs or connect through your body to ground via your torso. |
H: Voltage sensing using Arduino with and without common reference
I wish to make a voltage sensing circuit (range -15V to +15V) using an Arduino's ADC. The problem is that since this circuit will be part of a much larger circuit in which the Arduino is performing many other functions as well, the circuit needs to work both when the Ground of the Arduino and the Ground of the circuit whose voltage is to be sensed are shorted, and when they are not. I do have a waveshaping circuit which works when the grounds are shorted together. Please suggest some circuit or any other way I could approach this problem. The two circuits I have designed can be found at:
!(https://i.stack.imgur.com/DBMI3.jpg)
!(https://i.stack.imgur.com/n59IH.jpg)
AI: the circuit needs to work both when the Ground of the Arduino and the
Ground of the circuit whose voltage is to be sensed are shorted, and
when they are not.
I read the above and the only sensible way to achieve this is to design an isolating circuit maybe like this: -
However, given you want a digital number representing your analogue value inside the Arduino I would go for your Arduino controlling an ADC that is isolated via an isolating SPI interface such as: -
The ADuM5401 is key because it also supplies power to the ADC chip. The ADC chip above is typically an AD77xx type device that comes in several flavours from ADI. |
H: GSM/GPRS reach for Class 4 2W 900MHz/ Class 1 1W 1800Mhz
I'm studying differents GSM/GPRS modules and all of them have two operation modes depending the frecuency (900MHz and 1800Mhz). If I'm not wrong, for the same power higher frecuencies have a lower reach and higher trassmision rate than lower frecuencies.
My question is, how can I know the reach in meters of each range for a power of 2W or 33dBm in 900MHz and 1W or 30dBm in 1800MHz.
Thanks for your time!
AI: If I'm not wrong, for the same power higher frecuencies have a lower
reach
Irrespective of frequency, the power radiated from an antenna is the same (if the power input to that antenna is constant). This means that at some arbitrary distance from a transmitting antenna, the same power density is present (watts per square metre) irrespective of frequency.
However, because a receiving antenna has a size that is dependent on wavelength, the effective area is becomes smaller with an increase in frequency. The bottom line is that the antenna receives less power and produces a smaller signal as frequency rises.
Sorry, I forgot write it... The question is for ideal conditions.
The formula that I use for the free-field assessment of link loss (power loss between transmit and receive antennas) is based on the Friis formula: -
Link Loss (dB) = 32.4 + 20\$log_{10}\$(F) + 20\$log_{10}\$(d)
where F is MHz and d is distance between the two antennas (kilometres).
If "F" were 2 (implying a doubling of operating frequency) the loss part of the equation would increase by 6.02 dB.
My question is, how can I know the reach in meters of each range for a
power of 2W or 33dBm in 900MHz and 1W or 30dBm in 1800MHz.
To know how far you can get ideally in free-space you need to have a figure for the data rate you transmit at. If the data rate is really low you can design a receiver that has a very tight band-pass filter that excludes a lot of noise - this allows you to receive a signal that is much smaller and therefore distance can increase. Anyway the rule of thumb equation is this: -
Power required by receive antenna in dBm is -154dBm + 10\$log_{10}\$(data rate) dBm
So now you have an estimate of the power you need at the receiver based on data rate, a formula that describes how power is attenuated in free-space (link-loss) and you have your output power (1 or 2 watts). All you need to do is combine this lot together to get an estimate. On the good side, the gain (dBi) of the sending and receiving antennas makes the link-loss smaller. On the down side, operating conditions can vastly increase the link-loss both statically and dynamically. In fact this is a big subject and has spawned several different mathematical models by cellular handset companies and other interested parties.
The most basic form this takes is to say that link-loss will be at least 20 dB worse than the free-space model - the 20 dB factor is called Fade margin. There is also another commonly used models for link loss here. This is the Hata model for open areas: -
where
LO = Path loss in open area. Unit: decibel (dB)
LU = Path loss in urban areas for small sized city. Unit: decibel (dB)
f = Frequency of transmission. Unit: Megahertz (MHz).
There is also the Okumura model for urban areas: -
where,
L = The median path loss. Unit: Decibel (dB)
LFSL = The free space loss. Unit: decibel (dB)
AMU = Median attenuation. Unit: decibel (dB)
HMG = Mobile station antenna height gain factor.
HBG = Base station antenna height gain factor.
Kcorrection = Correction factor gain (such as type of environment, water surfaces, isolated obstacle etc.)
You also might be interested in this website for estimating range. There is also this calculator. |
H: VGA levels, why are they wrong?
I read everywhere on the Internet that voltage levels in the color components of a VGA cable should go from 0 V (dark channel) to 0.7 V (maximum brightness for that channel). However I tried to measure the voltage coming out of two video cards that I own and I obtained levels between 1.4 and 1.6 V. At the same time I measure the expected output impedance (75 Ohm), because the voltage drops of the right factor when putting a resistor in parallel.
What might be the cause of this discrepancy? Is there any easy error that I might be doing or should I expect that a VGA card may emit higher voltages than the standard 0.7 V?
I am rather sure that the oscilloscope is correctly calibrated because it agrees with at least two testers I have.
AI: @Andyaka Oh yes, you're right, I did not consider that I have to
terminate the line with a 75 Ohm resistance to measure the actual
voltage.
Try terminating the line! |
H: Optocoupler Question
I'm currently trying to create a system to open my apartment's door (using the buzzer) using my raspberry pi, and thought that using an optocoupler would be the best solution - although I'm a complete novice.
The only optocoupler that I've been able to find locally is this one, however I'm pretty lost on whether or not this would be suitable for my project, and if so I'm not sure what kind of resistor I would need to buy to be able to use it.
The Raspberry Pi has a 3.3V source voltage, and I was using this site to try to calculate what ohm resistor I'd need, but I sadly don't see the forward voltage on the specifications of this product.
tl;dr: Is this optocoupler suitable? If so, how many ohms would the resistor I buy need to be?
Thanks for your help, and sorry for the probably trivial question.
AI: If you download the datasheet from the site you linked to (Downloads tab, fifth one over), you'll see that in the Input section of the Electrical Characteristics table on page 2, the forward voltage V\$_{F}\$ of 1.5V is specified at a current of 5 mA I\$_{F}\$. 50 mA is from the Absolute Maximum Rating, you don't want to use that. So the resistor value you want is:
$$\frac{(3.3V - 1.5V)}{5mA} = 360Ω$$
not 39Ω as you assumed in a comment to another answer.
The Raspberry Pi GPIO pins can sink or source up to 16 mA (the output is configurable from 2 to 16 mA). I covered that in an answer to another question. |
H: Calculating current in a dc circuit
How can we get the current \$I\$ if all resistances and current \$I_g\$ are known?
Is there a special name for circuits like this one? Is this some kind of a bridge?
Edit:
Edit2:
AI: Well, apparently it is a bridge configuration, but one of the diagonals is shorted, therefore \$R_3\$ ends up in parallel with \$R_1\$ and \$R_4\$ ends up in parallel with \$R_2\$.
If you redraw the schematic you'll see that \$R_3 \parallel R_1\$ and \$ R_1 \parallel R_4\$ are in series with the current generator, therefore if the resistances and \$I_g\$ are known, it is easy to compute the voltage across each resistor and therefore the current in each.
Knowing the current in each resistor then lets you calculate \$I\$ applying KCL. |
H: Why is the modulating shape appear in both sides of the carrier signal in AM?
It's about Amplitude Modulation. Can anyone tell me why is this signal wave or modulating waveform shape appears in both sides of the carrier sine wave? Why not in one side only?
$$x_c(t) = A_c[1 + \mu x_m(t)]\cos(\omega_ct)$$
I copied this image from Wikipedia
AI: First let's clarify what you are asking about. I take your question to mean that you are looking at the carrier on a scope and notice that both the bottom and top of the amplitude envelope get modulated. You are asking why that is done, and why not just one "side", meaning either the top or the bottom. This has nothing to do with single-sideband modulation.
Think about what it would mean for only "one side" to be modulated. That's just the right amount of the modulating signal added to the modulated signal. The frequency of the modulating signal is much lower than the carrier, so is removed by anything that is narrow-band filtering around the carrier. Now consider that is exactly what radio receivers do.
Even if a transmitter did add the modulating signal to the carrier, it wouldn't propagate out since its frequency is way too low for the antenna, and receivers would ignore it anyway.
To use typical commercial broadcast AM as example, let's say the modulating signal is 3 kHz and the carrier 1 MHz. The antenna can't meaningfully radiate 3 kHz, and the circuit in AM radios tuned to this station go to great lengths to reject anything more than about ±10 kHz from the carrier (990 kHz to 1.01 MHz). Even if 3 kHz got radiated, it would be completely irrelevant to the AM radios picking up the 1 MHz station.
So to answer your question more directly, modulating "both sides" of the carrier is what pure AM modulation is. Possibly some transmitters do modulate the top of the envelope with the bottom fixed. However, the added modulation signal on the carrier this represents is quickly eliminated by various inherent filters between the internal signal generator and the receivers. |
H: A-Level Physics: What is the current needed to maintain the wire at a steady temperature of 387∘C?
I am stuck on answering an A Level physics question:
When a current of 5.00A flows through a tungsten wire in a stream of air at 27.0∘C, the wire attains a steady temperature of 57.0∘C. It may be assumed that the wire's resistance is proportional to absolute temperature (i.e. temperature measured from absolute zero at −273∘C) and that the rate the wire loses heat energy is proportional to the temperature difference between the wire and the air stream.
What is the current needed to maintain the wire at a steady temperature of 387∘C?
The question gives two equations:
V = I R and P = V I
And in the text tells us:
Resistance of Wire = k * -273
Rate of wire loosing heat energy = k * temperature difference between the wire and the air stream.
So the higher the temperature, the more current that is needed to maintain the temperature.
But I cannot see how these equations can be used with the information given.
Thank you for any help as I am extremely stuck.
AI: Hint 1:
You have two scenarios; one at 57 degC and one at 387 degC. You need to find an expression (of something) that has the same meaning at both temperatures then you can equate those two expressions.
I've got the right answer BTW so what can you say about the power lost as heat at 57 degC and the power lost as heat at 387 degC?
Hint 2 (some time later):
You should equate watts per degree centigrade at both temperatures - derive a (fairly) simple formula that gives you watts per degree C - this is constant for both scenarios. |
H: What happens if I parallel two somewhat different size transformer primaries?
I have a small toroidal power transformer, perhaps 20VA, about 7cm outside diameter; core cross-sectional area is about \$16 \times 22 mm = 350 mm^2\$. I expect it's a wound silicon steel core.
I got a handful of these for $3 USD each at the local electronics surplus store (Halted in Santa Clara, CA) and am using them to experiment with winding my own transformers. I want to reuse the primary if possible since at about 13 turns/volt it's liable to be 1500 turns or so and so far I'm winding toroids by hand.
It has two primary windings and three leads, labeled 0-115-220.
I'm not clear whether the design intent is to use the BK-OR winding by itself for US 120 VAC or the BK-OR and OR-BR windings are intended to be wired in parallel for that voltage.
Doing the arithmetic on the label specs, the OR-BR winding is for 105 VAC. The two windings do indeed have different resistance and different inductances, \$28.7\Omega\$ vs \$52.1\Omega\$ and \$13.0H\$ vs. \$11.2H\$ (@100 Hz) respectively.
I conclude from the difference in inductance that the turns of the two primary windings are roughly proportional to the voltage drop each is designed for (115 and 105 V respectively, considering \$L\$ proportional to \$N^2\$). I conclude from the resistance measurements that the OR-BR winding uses thinner wire; it must have fewer turns but has higher resistance.
So I guess I'm answering my own question in that the thinner wire seems to clearly indicate the OR-BR winding is intended to be used by itself and only when needed, and the 115V winding is just over-designed when used as part of the 220 V winding.
But just out of curiosity, what would happen if the two primary windings were wired in parallel across 120 VAC? I'm thinking it's not a particularly good idea but not quite sure what behavior one could predict.
Also I'm curious if this is a common transformer design practice. It seems like it would be more economical to wind a bifilar winding of the same number of turns, say for 120/240 VAC and then just use them in parallel or series depending. Why would a designer prefer this configuration instead?
AI: The Japanese (back when 50/60Hz mains transformers were still viable) would often use a lighter gauge of wire for the 'upper' half of the 230V (or whatever) winding. North American makers, in my experience, not so much.
I don't think bifilar winding would be good because of insulation considerations when they are in series. It's fine when they're in parallel (and sometimes used because of skin effect or just to get a heavier gauge), but I think bad practice to depend on the wire insulation for much breakdown voltage. If you break the input to the transformer with a switch, a lot of voltage will appear across the primary winding, and half of that would be wire-to-wire with a bifilar winding.
You can't connect them in parallel because of the CT, but it wouldn't be a very good idea anyhow- the different number of turns means the transformer would quickly overheat. |
H: What could be the source of this sine wave distortion, visible as equally spaced lines in FFT?
I have an MCU controlling a 16bit DAC via SPI (and an additional LDAC output, which triggers the update of the DAC output). The MCU has a precalculated 1120Hz sine wave in a 364-byte long buffer (all calculations in float32, rounded to uint16 for DAC output), sampled at 29120Hz. In a timer interrupt, the update of the DAC is triggered via LDAC and then a new value is loaded from the buffer and sent via SPI. The update to last value is triggered in the beginning to reduce jitter due to memory access races against DMA. Interrupt has a sufficiently high priority to not be delayed.
Althrough visually the sine looks good, FFT of my Rigol DS1054Z behind the DAC (before the reconstruction filter) shows a significant distortion:
The highest peak is the required 1120Hz, others are equally spaced by 260Hz. The right peak seems to be only 5dB below the main!!
The jitter on the LDAC pin is on the order of +/- 0.25us, which I'd consider acceptable against 34.3us sample time. The timer itself runs from the MCUs crystal and should be stable enough.
What kind of a problem would lead to such a distortion pattern? What could be the ways to diagnose and reduce it?
Just in case relevant: the DAC is an AD5686, full-scale reference is 5V, sine amplitude is 25mV which results in roughly the lower 10 bits being "switched".
AI: I've hooked up a lab signal generator to the input of the scope to compare it to the measured signal and surprisingly saw the exactly same spectrum in it's FFT. Turning up the frequency the subharmonics went away at 1250 Hz. Changing memory depth in the "Aquire" settings from Auto to 6K removed the effect. It seems like some kind of an aliasing problem is going on in the FFT of the DS1054Z.
===
EDIT:
Looking carefully at the image you will see a sampling rate of 5kHz shown over the FFT window. It would have been too less to sample the DAC output before the filter. It's surprising that it still looks the same if provided with a clean 1120Hz signal, as it's still below the niquist frequency. |
H: LED Driver LM3410X not functioning
I am testing below LED Driver Circuitry on breadboard using LM3410X.
Input Specs:
Vin & DMM = 5V,
L = 20 uH
R=2 Ohm
Only thing is I have'nt connected LED ( I am testing with 10k resistor as dummy load)
But somehow I am getting 4.86 V at o/p ( across 10K load resistor )
Can anybody help me to figure out. Do I need to connect LED string?
Thanks in advance. :)
AI: So you have set a current of 95mA using R1 = 2\$\Omega\$ (190mV typical reference) and are thusexpecting a voltage of 950V (95mA * 10K) at the output.. this will can damage the chip.
Put some LEDs on there (more than 5V drop!- three or more white/blue LEDs) and see if it still works. You may have fried the chip. See the zener OVP circuit suggestion from the datasheet:
1MHz+ (this one is 1.6MHz) switching supplies require good breadboarding techniques so you may have other problems even if the chip is functioning properly. In particular the critical loop areas must be kept small. See the typical layout in the datasheet for guidance. |
H: Using BLE, how fast can I get ~50 bytes of data from the master to a slave? How does that change when increasing the number of slaves present?
In personal project of mine I'm looking to have a system where a number peripherals need to have provided to them, in as real-time as possible, small (~50 bytes max) amounts of information from a central controller. I was considering using low power Bluetooth for this and I'm wondering what kind of performance I could expect. How many times per second could I send this 'packet' of data if there was only one peripheral? What about if the number increases to, say, ten?
AI: You are going to be limited by what is known as the Connection Interval. This defines how often the Central (host) communicates with the Peripheral.
BLE uses a frequency-hopping scheme; two devices each send and receive data from one another on a specific channel, and then meet on a new channel sometime later. The time between the each hop is defined as the Connection Interval.
There can be a maximum of six packets (four for iOS) sent per connection interval, and each packet can have up to 20 bytes of payload. So in your case you would use up three packets, which would fit in one connection interval. You would waste the remaining packets.
According to the BLE specification, the allowable range for the Connection Interval parameter is from 7.5 ms to four seconds. With a minimum Connection Interval of 7.5 ms, you could send theoretically 133 connections per second. So your throughput would be 133*50*8 = 53.2 kb/s. This doesn't count the initial time to establish an initial connection while scanning for Peripheral BLE devices (which will be sending out Advertising packets on a periodic basis). Also, if an ACK has to be sent back to acknowledge receipt of the packets of data, this will require another Connection Interval, and thus halve the data rate.
Note: the Apple iOS guidelines limit the minimum connection interval to 20 ms, not 7.5. So you would only have a maximum of 50 connections per second. In that case the throughput would be 33*50*8 = 20.0 kb/s.
Here's some more information about BLE data rates. |
H: PIC32 acting as USB CDC HOST to FTDI
I'm hacking a design who is already made with a PIC32MX in order to attach a FTDI CHIP to the actual design. This FTDI it should serve a purpose to make a "bridge" between USB and UART in the way to put this Fingerprint Reader working properly.
I am not using any UART communication because I don't have any more UART Ports available. That's the only reason why I am trying to put the USB module working.
The VUSB pin is connected to the VCC_3V3 but in the datasheet it's mentioned two opposite information. In the page 41 they say "USB internal transceiver supply. If the USB module is not used, this pin must be connected to VDD." and in the page 45 it's mentioned "Note 1: If the USB module is used, this pin must be connected to VDD." What should I do?
The power to the FTDI is given by the 5V regulator and I am not using (ignoring) the VBUSON pin 11 neither the VBUS pin 34 and I have the FTDI connected to the USB pins 36 and 37 for D+ and D-.
Regarding that I am using the pin 11 to reset the Bluetooth module which I have in the design, do you feel that I really need that pin to put the USB working properly?
What should I do with the pin 34 (VBUS)?
To put the whole system working correctly I must configure the USB as CDC Host, right?
AI: You don't need to use USB at all. The interface to scanner is actually UART TTL levels. SparkFun's demo is using an FTDI cable because they needed to hook up to a PC. You can just cross connect the TX/RX pins of one of the UARTs on your PIC32 with the TX/RX leads of the scanner.
Since you don't have any UARTs available, you can replace any of the existing hardware UARTs with a software bit-banged solution using two spare pins. That would seem to be easier than dealing with all the USB stuff.
Edit to reflect comments:
Here is code for a software UART in C. It is for the PIC16, but you should be able to modify it for the PIC32. The code is interrupt driven, so assuming you don't have any interrupt pins (INTx) left, you can use any pin that is marked as an Input Change Notification (CNxx) which will generate a interrupt when the pin changes state. |
H: What are the terminals in this 6 pin potentiometer?
I want to use my 6 pin potentiometer in circuits so I want to know what all the terminals are for. I know the basic principle in the 3 pin pot. I'm completely new so please answer it in simple terms. I have attached a circuit which I want to make which pins do I use for it.
I have also checked readings with a multimeter here they are, I have numbered the pins from 1 to 6 starting from left here are the readings:
Pins 1-6 shows a range of 0 ohms to 53k ohms when I turn the knob.
Pins 1-2 show 0 ohms to 53k ohms.
Pins 2-6 shows only 53k ohms no matter what position the knob is in.
Pins 3-4 show 0 ohms to 53k ohms.
Pins 3-5 show 0 ohms to 53k ohms.
Pins 4-5 show 0 ohms to 53k ohms.
I was thinking that 4-5 should only be at 53k ohms and not vary but it varies.
Here's what my pot looks like:
And here is the circuit I want to use it in:
AI: Edit: Check the datasheet for the TT Electronics P120KGE, it appears to be your exact potentiometer:
This appears to be a standard dual potentiometer, commonly used as a volume control in stereo audio applications. It contains 2 individual potentiometers, connected to a common shaft, so it has 2 wipers and 4 outer terminals.
In order to determine the pinout, first you will need to find the resistance of the potentiometer, which is usually marked on the back. There should be 2 sets of 2 pins that show that resistance between them no matter what position the knob is in, and those are the outer terminals. The remaining 2 pins are the wipers. The resistance between them and the connected outer terminals will vary when the knob is turned. |
H: FPGA Simulation - does it need FPGA hardware?
Reading through Altera documentation on FPGA programming, I can see that the design flow is made of
Design -> Compilation -> Simulation -> Programmation -> HW Verification
The design consists of writing Acceleration function units and using IP to build a circuit in schematics, e.g. using Quartus. The design is then compiled. Simulation is made of functional and timing simulation. Functional simulation verifies that the design corresponds to the functionality we want, while timing simulation is to verify the impact of the propagation delay. Only on the programming phase, the file generated at compilation is loaded onto the FPGA and run on hardware for HW verification.
I infer from this that the simulation phase does not need Hardware. Is it correct? Also, the doc mentions the waveform simulation platform for timing simulation. Are there other tools for timing simulation and what are tools for functional simulation?
AI: Simulation tools in this software are a pure digital simulation of the code you have written. No you do not need hardware, and generally it is abstracted completely from the chosen hardware. There are a few intricacies in this such as needing to set defaults on simulated signals and to simulate a clock, This is generally done in something like modelsim, which you could open your code in. |
H: Reverse voltage protection and high-side current switch
Initially I chose a Infinion PROFET smart high side switch (ITS428L2). In the datasheet it is stated that this device can provide reverse battery protection with external resistor. Frankly, I am not able to figure out how this protection should work: The body diode of the internal MOSFET is placed in a way, that current can flow in case of reverse voltage. So where is the protection?
Therefore i tried to figure out a circuit that provide real reverse voltage protection and on/off-switching capabilities for currents in the ~10A region and as well for high currents (~100A). Is this a suitable approach?
simulate this circuit – Schematic created using CircuitLab
Edit: Changed Source and Drain of PMOS2
Looking at the datasheets of serveral p-channel MOSFETs i wondered about the max. Drain-Current value. Sometimes this current is specified negative, sometimes positive - sometimes there are both values given but of different value. I thought if the MOSFET is conducting there is no direction for the current flow?
Example of SUM110P04-05:
AI: It seems to me that in the datasheet of the ITS428L2, reverse battery protection only means that the switch will not be destroyed in case of wrong polarity (see on page 8).
Concerning your circuit: even if it protects against reverse battery, you can never switch off the load because regardless of the MOSFET's gate potential the body diodes will always conduct (given that the battery is connected in correct polarity).
When it comes to the direction ID in a MOSFET datasheet you have to pay attention to the mode of operation. If the gate is driven, the channel is defined by the RDSon. Here the direction of the current doesn't matter, as you correctly said. But suppose an inductive load is driving a current through the body diode into the battery when the MOSFET is off. The body diode is a much lossier conductor that a fully turned on channel and therefore the permissive current is significantly less. |
H: FPGA VGA driver not working
I am not really sure what is wrong with my code bellow for a vga. All I want the program to do is display a solid color on the monitor. I want to use the switches on my card to change the color displayed. I ran the simulation and all the hsync and vsync signals seem to be as expected. When I flick the switches I get a short pulse of color on the display and then it goes black. Anyone know what is wrong with this code?
module vga(output reg [3:0] red, green, blue,
input [15:0] sw,
output hsync, vsync,
input clk);
wire vga_clk; //25.203 Mhz
vga_clk_gen gen(.clk_in1(clk), .clk_out1(vga_clk));
reg [9:0] hpx = 0, vpx = 0;
reg [9:0] next_hpx, next_vpx;
reg [3:0] next_red, next_green, next_blue;
assign hsync = !(hpx >= 660 && hpx <= 756);
assign vsync = !(vpx >= 494 && vpx <= 495);
always @(posedge vga_clk) begin
hpx <= next_hpx;
vpx <= next_vpx;
red <= next_red;
green <= next_green;
blue <= next_blue;
end
always @* begin
next_red = sw[3:0];
next_blue = sw[7:4];
next_green = sw[11:8];
next_vpx = vpx;
if(hpx == 800) begin
next_hpx = 0;
if(vpx == 525)
next_vpx = 0;
else
next_vpx = vpx + 1;
end else begin
next_hpx = hpx + 1;
end
end
endmodule
AI: The VGA signal must be blanked (outputting black) while hsync or vsync are active. Many monitors will use the signal levels during sync periods to calibrate a "black level", which would lead to the behavior you're describing. |
H: FPGA: Bitstream vs. SRAM Object File
What is the difference between bitstream and SRAM Object File?
I understand that both are outputs of the FPGA design compilation. It seems to me that the SRAM Object File is what is loaded onto the FPGA for programming.
Then, what is the bitstream for? Or are those different names for the very same thing?
AI: They are different names for what is essentially the same content.
There are three major "types" of FPGA, when dividing up how they implement their logic -- SRAM-based, Flash-based and anti-fuse, with the first being the most common (Altera and Xilinx primarily). SRAM-based FPGAs are 'blank' / un-configured every single time you power them up, and must load their configuration data from somewhere, usually an external memory IC, or an external processor. Colloquially, most engineers refer to the content to be loaded on there as the bitstream -- a binary blob of digital data that represents the connectivity and routing of the logic resources on the FPGA (and in more advanced models, it'll carry along the initial RAM contents, etc.). During development, engineers may use the JIC format (as an Altera example) more often, as they will dynamically load it over JTAG during development via a USB tool like a ByteBlaster. In production, we may use the binary formats to flash onto the SPI configuration device on the PCB.
This bitstream has many, many formats ranging from vendor-specific formats to somewhat standardized formats. If you check out your programming tool's options (Quartus II programmer or IMPACT for example), you'll see such options as JAM, SVF, STAPL, TTF, JIC, BIN, BIT, etc. Some of these are vendor-specific, others are standards (like SVF and STAPL). Formats like SVF are plain-text readable -- the configuration data is recorded as a sequence of macros, and are intended to be delivered over JTAG. Others, like a raw BIN or BIT file, is a binary blob that is intended to be flashed 1:1 onto a flash memory device.
Flash-based FPGAs are similar (ex: Actel IGLOO), but they store their configuration data on the FPGA itself -- the act of programming the array sets the design non-volatiley in the device. This data is also referred to as a bitstream, and for Actel devices at least, show up in SVF, STAPL and (proprietary) PDB forms. These FPGAs are considered 'live at power-up' as there's no need to load a configuration from an external source. Many CPLDs are flash-based as well, to reduce part-count on the BOM and to support their usage as low-power, brainstem like power-sequencing control for a more complex system.
Finally, just to complete the mention of it, anti-fuse devices can only be programmed once by a specialized programming devices actually fusing together links inside the device with high-voltage. They are always live at power-up and have generally high design-security since there's no configuration to be read or snooped -- the device is physically blown into the state it needs to be. I still refer to what I put on these devices as a bitstream, for what it's worth, but they are not re-programmable.
So basically, yes -- they are different names for generally the same content. Some are plain-text, some are binary. Some are intended for a flash storage device, others are intended for JTAG configuration at runtime (like JIC, JTAG Indirect Configuration). All of them can represent the design and state of internal logic elements or memory elements in the device.
Some common types in a non-exhaustive form:
SVF -- Serial Vector Format. Plain-text format that is very verbose and contains JTAG macros that walk a dumb programmer through the process.
XSVF -- improved version of SVF that allows for control-structures and other enhancments
STAPL -- initially Altera, now JESD-71. Allows looping, macros and control structures, reducing file size. Plain-text.
JAM -- Evolved / adopted as STAPL, plain-text.
JIC -- JTAG Indirect Configuration
SOF -- SRAM Object File, a binary file generally from Altera tools for SRAM devices
POF -- Program Object File, a binary file generally from Altera tools for flash devices (like their CPLDs)
RBF -- Raw Binary File, generally from Altera. analagous to the raw binary outputs from Xilinx or other vendors.
TTF -- Tabular Text File, a decimal/plain-text encoded version of the RBF.
BIN -- over-used extension that could be from any of a thousand tools, but is used by Xilinx design tools for a raw bitstream with no header
BIT -- (Generally) Xilinx design tool output in binary form, with a pre-amble / header
PDB -- Actel binary format
For configuring an actual memory device, many of the common formats may be used -- MCS, HEX, SREC (S19), etc. These do not target the FPGA directly. |
H: Why is it harder to turn the shaft of an unpowered stepper motor when connecting the terminals of a phase?
I experimented this phenomenon, but I don't know why. My guess is it has to do with back EMF, but I am not sure how.
I found it's also documented on wikipedia:
(For the experimenter, the windings can be identified by touching the terminal wires together in PM motors. If the terminals of a coil are connected, the shaft becomes harder to turn. one way to distinguish the center tap (common wire) from a coil-end wire is by measuring the resistance. Resistance between common wire and coil-end wire is always half of what it is between coil-end and coil-end wires. This is because there is twice the length of coil between the ends and only half from center (common wire) to the end.) A quick way to determine if the stepper motor is working is to short circuit every two pairs and try turning the shaft, whenever a higher than normal resistance is felt, it indicates that the circuit to the particular winding is closed and that the phase is working.
https://en.wikipedia.org/wiki/Stepper_motor
AI: You're nearly right. Back EMF is generated when a motor is running and increases the faster the motor turns. The effect is to reduce the amount of current into the motor. (That's why the starting current is so high.) In this case the motor is only acting as a generator so we are generating EMF but not 'back' against anything. It's only a matter of terminology so your basic understanding is correct.
Many people don't realise that if power is drawn from a generator that the resistance to rotation increases. When you short circuit the winding a high current flows in the windings and it opposes the turning motion, hence the high resistance to rotation that you are experiencing.
This problem is the bane of folks trying to make electric perpetual motion machines. |
H: Jumper wire for thin connector pin / holes
I have a board with a Samtec SFM-115-L2-S-D-LC connector. This connector has 30 (15*2) pin holes, with a 0.050" / 1.27mm pitch, and accepts pins that are smaller than those used in breadboard / prototyping jumper wires. Therefore, I can't directly connect my prototyping jumper wires to the connector holes.
In the datasheet for the male version of my connector (TFM-something) I can see that the pins have a width of 0.018" / 0.46mm, while my jumper wires have the standard thickness (0.0254" / 0.65mm).
How can I connect individual pins/holes of my Samtec connector to, say, a breadboard? Are there jumper wires or headers with the appropriate thickness?
AI: Yes there are headers you can use... like the Samtec TFM. A better option for hand soldering a breakout wire would be the Samtec FTS or FTSH (low profile vs standard profile), a plain 0.05" male header, in smd or through hole. It has some standard options and can be found through the typical distributors, Digikey, Mouser, etc.
If you want a standard or easily found part, your out of luck. Either use a header, or grab some appropriately sized wire an make your own cables by splicing the thin wire to some thicker wire, each side going to the corresponding board.
Another option would be to file the pin on your jumper wire down some with a piece of sand paper or a file. Even a nail file would work. Just rub it on it until the pin is thin enough to fit properly. Shouldn't take more than a minute per pin at worst. Alternatively slice some of the copper off with an exacto knife. |
H: spi flash (N25Q) blocks read command
I'm using CC2640, and N25Q128A (Micron Serial NOR Flash Memory).
SPI is working well, erase and write commands are changing the status register so busy flag rises and i'm waiting until it's clear.
The only problem i'm facing is read command, when i'm sending the read command with 3 byte of address the memory is rising miso pin and does not release until c# pin is rise again.
I cleared the ReadLock register and set the WriteEnable register, and now here i am... asking why it's happen and how to fix the issue?
AI: The flash chip is an SPI slave, which means that it depends on you, the master, to provide ALL clock pulses, even when reading from the chip. You seem to have stopped your SPI clock after sending the read command and address. That big delay before the 10 bytes of clocking (I'm assuming you wanted to read 10 bytes) shouldn't really matter though because you didn't release the enable line, but you don't really want to have that big gap there.
The other thing is that freshly-erased flash contains all 0xFF (high bits). If you erase some of the chip then attempt to read it, the MISO pin will remain high because it's sending you lots of 0xFF bytes.
Try erasing a sector, writing a test-string to it and then attempting to read it back. |
H: Will connecting a 78L05 or 79L05 voltage regulator backwards fry it?
I got a SainSmart digital oscilloscope kit for christmas, and put it together according to documentation I found on the Amazon.com listing for the item.
The markings on the board directed me to connect the input pin and output pin opposite of how they should have actually been connected. That is, it was receiving 9v to the output pin instead of the input pin, and the input pin was connected to where the regulated 5v output was supposed to go. I discovered this by nearly burning my fingertip on the overheating voltage regulator after plugging in the 9v power supply, and then looking up the voltage regulator's datasheet and comparing it to the board diagram.
I removed the voltage regulator, turned it around, and soldered it back in place. When I plugged in the power supply again, the regulator got hot again, and I still didn't get the expected 5v at the output. Is my voltage regulator fried?
(Note: it's either a 78L05 or a 79L05 - the board has one of each and I don't recall offhand which one was the one I was dealing with.)
AI: If it was hot enough to burn you, there's a very good chance it's dead. Especially if it gets hot when correctly connected. |
H: controller circuit for charging 12V 7AH Lead Acid battery from main source and Solar source
I need to have a controller for charging a 12V 7AH battery and provide uninterrupted supply.
The source for charging would be 12VDC from a PSU or if there is a failure in that from a solar panel. I am confused , I found a few such solutions for lipo batteries but cannot find for lead acid batteries. I want to have auto charging and cutoff on full charge.
There are some ICs that provide solution for solar but they have no support for the other source.
AI: A integrated solution for this task is found at Linear Technologies. They have a good white paper to introduce the concept of maximum power point tracking: Techniques to Maximize Solar Panel Power Output. A suitable solution for your application could be the LT3652 - Power Tracking 2A Battery Charger for Solar Power.
The second source you just put in parallel to the solar panel and in each circuit (dc source as well as solar panel) you put a diode. Make sure to use low forward voltage drop diodes (such as a Schottky diode) that are suitable to carry the current in your application. |
H: Where to put the Fuse in a circuit
I have circuit where the input can be 12-48V AC or DC. This is fed to a bridge rectifier.
I plan to put a fuse and got a bit confused, what is the best place to put a fuse?
before the bridge
after the bridge on +ive line?
AI: The usual approach is on the AC line (inserted into your N$93 net) before the bridge, which will protect the power supply if the bridge rectifier fails short.
Assuming there is bulk capacitance after this bridge rectifier, you will need to use a slow-blow fuse so that the inrush current doesn't destroy it. If the capacitance is very large, you will want to consider an inrush-limiting circuit that initially charges the big C through a high-power R for a few cycles and then closes a relay across the R for normal operation.
PS your bridge rectifier is probably wired backwards, the +12V_PWR net will be negative with respect to the DF0-something net on the lower-right. |
H: Finding an ESC for a LiFePo4 Battery
I have a project that uses 12S LiFePo4 batteries, and I need an electronic speed controller. The main problem I have is that pretty much all the existing ones I've found are designed to work with Li-poly batteries.
I've seen this post: Will LiFePo4 work with ESC for LiPo?
But the concern I have is that will Li-poly ESC's actually work for LiFePo4's when you consider that they have different cutoff voltage's.
Li-poly has shouldn't be discharged at anything less than 3.0V, where as LiFe's should go to 2.8V and that's a major bottleneck considering that they have a nominal voltage of 3.3-3.2V.
If someone could point out to me how I can make this work, or if I'm wrong / recommend an ESC, etc. It would be greatly appreciated.
Any answer helps!
AI: It is generally a bad idea to let a motor/speed control decide when your batteries need protecting, even if you use a LiPo ESC on LiPo batteries, the monitoring should be separate and inside the battery pack.
For a couple of simple reasons:
On a collision you want any shorts to be protected from the battery outward, even if LiFePO4 is much safer vis-a-vis explosions.
A "remote drain" deciding to throttle or shut off can cause oscillations through wire resistance and inductance that end up being more harmful.
A power drain deciding to shut off creates the invalid "feeling" everything is protected, when other devices can drain enough to finally kill the battery.
When a battery is replaced by another chemistry you don't have to change every other component (the only non-safety-related point).
No project, ever, anywhere using a rechargeable battery somewhat smartly or professionally should off-load the UVLO (under-voltage lock-out) detection to individual devices, but have it at the battery. The one exception is a single bespoke PCB in a fully qualified housing with a rechargeable battery, such as tiny Bluetooth headsets, where the constitution of the innards will not change outside of a complete design path with meetings and verifications.
So, do as aDub says: Get battery protection and turn off the UVLO in the controller. |
H: Confusion: Lock range of PLL
Suppose we have a type-I PLL whose block diagram is shown below:
Here \$k_{pd}\$ is the average gain of the phase detector producing the control voltage \$V_c\$ which is input to the Voltage Controlled oscillator (VCO). In the feedback path we have a frequency divider which divides its input frequency by N.
Suppose input frequency is given by \$\omega_{ref} (=2\pi*f_{ref})\$ and output frequency is \$\omega_{out}\$, then in general the phase difference between the input and the fed-back frequency is given by: \$(\omega_{ref} - \omega_{out}/N)t + \Phi_{ref} - \Phi_{out}/N\$.This error signal is input to the phase detector. The steady state phase difference should be given by: \$\Phi_{ref} - \Phi_{out}\$ with \$\omega_{ref} = \omega_{out}/N\$. Does, this frequency relationship hold true even if \$ |\Phi_{ref} - \Phi_{out}| \ge 2\pi\$, which is beyond the range where the PLL will get locked?
In other words, does the frequency relationship between input and output (\$\omega_{ref} = \omega_{out}/N\$) maintained even if the PLL doesn't get locked? If not, what happens to the output signal (in steady state) if PLL is beyond the lock range (given by \$ |\Phi_{ref} - \Phi_{out}| \ge 2\pi\$)?
AI: If input frequency and feedback frequency (after dividing) are the same then the PLL is potentially going to fall into a state of in-lock because the phase detector doesn't care about phase differences that are multiples of 2\$\pi\$: -
As the "wandering" clock leaves perfect phase alignment with the static clock (left side), the EXOR output starts to produce thin pulses that become wider as the the wandering clock leads the static clock by greater amounts. At perfect anti-phase between the two clocks the EXOR output is a constant "1" and as the leading extends even more, the EXOR output repeats itself as the phase difference between wandering clock and static clock is 2\$\pi\$ (right side). |
H: What is the advantage of analog subtractor/summer?
Why we use opamps like in figure 2 instead of just add or subtract signals from each other as shown in the first figure? Is this choice differ if I apply DC signal instead of AC one? Sorry if this is a trivial question.
simulate this circuit – Schematic created using CircuitLab
simulate this circuit
AI: The difference is that in the full diff amp circuit as shown in your second schematic, each input voltage is separately referenced to ground. In your top schematic, V5 has to be able to float arbitrarily. Often you don't get a fully floating voltage source, just a ground-referenced voltage. In those cases, the top circuit won't work. |
H: use of neutral line in power distribution?
Neutral Line - what is the propose of this line ?.
In-case Neutral line failure power will be lose ?
In power Distribution We are using Line (phase) for input ~240V, In after usage or cycle, What happens the energy ?. its will complete cycle ?
==> Line P ---------->240V --- >
==> Neutral N -- 0 -->
Or energy will be ?
AI: Every power distribution scheme requires a complete circuit. That includes at least two wires.
There is no reason to name the actual wires except to standardize on things such as safety. In most AC distribution systems, the neutral is bonded to a local earth ground.
So, the neutral, in a distribution system is the return path for the phase current, and is typically bonded to ground.
If the neutral is lost, no current can flow, so yes, you effectively lose power.
What happens to what energy? If you feed power to a light bulb, energy is converted to heat and light. If you feed power to a motor, energy is converted to motion. |
H: Is NXP's PCA9548A compatible with TI's TCA9548A?
I am using TI's TCA9548A in my Projects, but I would like to know if I can substitute it with PCA9548A from NXP.
By comparing the datasheets this seems to be indeed the case, but I am wondering why they have different names.
By the way, is it really like this regarding these logic chips, that same numbers under different manufacturers mean same functionality? Like the in the case of 74HC595 for example?
AI: Texas Instruments say: -
Recommended alternative parts
TCA9548A - The device has the SAME FUNCTIONALITY and PINOUT as the compared device but is NOT an exact equivalent. TCA9548A is an
enhanced version of the PCA9548A with an extended supply voltage range
and performance enhancements related to Power-On Reset.
Now in this statement they are comparing their TCA9548A with their PCA9548A so there could be some doubt about this applying the NXP part. |
H: Voltage regulator Current regulation
I want to understand the concept of current regulation in the circuit, In my research I came across the following link Boosting Regulator Current for IC 78xx by MJ2955
where in the circuit schematic in link above, the author claims he has obtained 12V,5A as output with 20V input voltage.
I tried to simulate the same circuit but with input of 12V, 0.1A and 7805 regulator as shown in this schematic:
I see that when input current is 0.1A the output is 94mA approx. which agrees with ohms law V = I*R = 94.086mA * 53.33 ohm = 5.01V
But when I have my input current as 0.06A the output voltage is 3V (why not 5V? )and current is 57mA, as shown in this schematic
This also agrees with ohms law V = I*R = 57.267 mA*53.33 ohm = 3.05V
The results are same as the circuit without the PNP transistor.
schematic:
So what is the impact of the PNP transistor in the circuit?
How can I boost the current in my circuit?
If I want to see 5W output across my load(53.33ohm in the schematic) what are the changes I should make in the circuit?
Note: I assume capacitors are only for smoothing the input and output and does not have much effect in simulation (correct me if wrong). I tried with 470uF in all three cases the results were same. (sorry was bit lazy to copy new screenshots and I didnt have enough reputation to embed schematics in my question)
AI: With any linear voltage regulator (current boosted or not current boosted) you are going to get this: -
Output current = Input current - a few mA to power the regulator
You are never (ever) going to see an output current greater than the input current. If you want that then you must consider a buck voltage regulator.
So what is the impact of the PNP transistor in the circuit? How can I
boost the current in my circuit? If I want to see 5W output across my
load(53.33ohm in the schematic) what are the changes I should make in
the circuit?
If you want 53.33 ohms to dissipate 5 watts then the voltage needed is governed by the formula: -
Power = \$V^2\div R\$ or
Voltage = \$\sqrt{P\cdot R}\$ = 16.329 volts
I tried to simulate the same circuit but with input of 12V, 0.1A and
7805 regulator
The 7805 produces 5V on its output and not 16.329 volts. |
H: Problem in DC offset with a summer op-amp
I've used this circuit as an input stage for a digital oscilloscope. From left to right, the first op-amp provides high input impedance, the second op-amp is used to add DC offset to the signal (which should have no offset), the third op-amp is used to amplify/attenuate the signal.
The problem is when I put a voltage source of 1V on the bottom input of the summer op-amp (the second one) to add a DC offset of 1V to the signal, a DC offset of 2V is added instead. Why does this happen and how can I fix it?
You can view and edit the circuit simulated here.
AI: Your offset is added before the gain is applied- you can think of it as 1.0V referred to the input (input offset).
If you want to provide output offset (for example, to center the signal in the range of a unipolar ADC) then you should add the offset after the gain is added.
One way to do that is to leave the output amplifier gain constant, adjust the offset to compensate (halve it in your case, or use a 2K resistor in series with the offset rather than 1K and stay with 1V), and change the gain by adjusting the resistor shown below:
Note that if you actually build this circuit you'll need a bipolar supply for at least the first op-amp since it otherwise won't be able to follow the input below ground, and it will typically have to be a bit larger (as much as a few volts or as little as some tens of mV depending on the op-amp) than the largest signal expected at the input. So if you want to handle a +/-10V signal with some op-amps, you might choose +/-15 supplies. |
H: PNP to NPN Transistor switch
I'm working on project that requires I switch a 12v power supply on the high side of a circuit, using a 3.3v micro controller. To make this work, I'm thinking a can connect a PNP transistor on the 12v high side, and connect the base to the collector of an NPN. Then connecting the base of the NPN to the 3.3v pin on the microcontroller and the emitter to ground. I found this example online:
This leads to my question...I need to create 8 separate switches on this one circuit...Does this PNP to NPN high-side switch still work if I connect multiple in series?? Here is my current schematic...
The LED represent the load for the 12v supply.
In this configuration, does the transistor still work like if there were only one NPN and one PNP...Or does the current get amplified with each NPN/PNP in the series?
AI: You should put a resistor in series with each LED and eliminate R18. If you are just switching LEDs it's perhaps wasteful to construct a high-side switch- if you can switch the low side it only requires one NPN transistor per LED.
The high-side switch you show (top diagram) will work, however you can only switch a fairly small current due to the 10K base resistor. At 12V you'll get about 1mA base current so most transistor will be well saturated for up to ~20mA load current, but if you want to switch 100mA reliably you should reduce that resistor in most cases.
Also, it's good practice to add a resistor from base to emitter on the PNP. The reason is that the leakage in the NPN can be amplified by the PNP and result in excessive current at the output (particularly at high temperatures). Something like 20K to 100K will work fine (it's not critical). That said, you can guess that the gain of the PNP will be low at low base current and the circuit will typically work fine at moderate temperatures. |
H: Calculating base current
The task is to find the operating point of this transistor: Given information:
\$E_{C}=12V\$, \$V_{BE}=0.6V\$, \$V_{IN}=5V\$, \$\beta=200\$, \$R_{B}=440k\Omega\$, \$R_{C}=5k\Omega\$, \$R_{E}=3.3k\Omega\$
The answer to this excercise is \$I_{C}=0.8mA\$ and \$V_{CE}=5.36V\$.
My problem is that I cannot get the right \$I_{C}\$. I start with calculating \$I_{B}\$ which is: $$ I_{B}=\frac{V_{R_{B}}}{R_{B}}=\frac{V_{IN}-V_{BE}}{R_{B}}=\frac{5-0.6}{440000}[A]=0.01mA $$
Then, using the formula \$I_{C}=\beta\times I_{B}\$ I get \$2mA\$ which is clearly wrong.
If I use the \$I_{C}\$ straight from the answer, I can finish this exercise, using this equation: $$V_{CE}=E_{C}-I_{C}R_{C}-I_{C}R_{E}=$$$$=12-0.8\times10^{-3}\times5\times10^{3}-0.8\times10^{-3}\times3.3\times10^{3}=$$$$=5.36[V]$$
So the question is: "How to calculate the base- and the collector current?".
AI: Applying Kirchoof's voltage law in the base to emitter loop we get
\$V_{in} = (I_b \cdot R_b) + V_{be} + (I_e \cdot R_e)\$
Now you can write the emitter current \$I_e\$ as \$I_e=(1+b) \cdot I_b\$
Proof:
\$b = \dfrac{I_c}{I_b}\$
\$1 + b = \dfrac{I_c + I_b}{I_b} = \dfrac{I_e}{I_b}\$
Since we know that \$I_c+I_b=I_e\$, we can write this as \$\dfrac{I_e}{I_b}\$.
Therefore \$\dfrac{I_e}{I_b} = (1+b)\$, when transistor in forward active mode.
Then your answer for \$I_b = \dfrac{V_{in}-V_{be}}{R_b + (1+b) \cdot R_c}\$
\$I_b=\dfrac{5-0.6}{440k+(201 \cdot 3.3k)}=3.9uA\$
We know that \$\dfrac{I_c}{I_b}=b\$, then \$I_c = b \cdot I_b \$
\$ = 3.9 \times 10^{-6} \cdot 200 \approx 0.8mA \$ |
H: If two resistors were connected in parallel and one was heated, would current flow due to johnson noise?
Increasing the heat of one of the two resistors will increase the Johnson noise in that resistor. This will generate a noise voltage across the resistor, will this essentially convert the heat energy into electrical energy? If the heat and resistance was high enough, could the second resistor be replaced by a diode and capacitor so the noise could be rectified?
AI: Johnson noise is just the statistical variation of the voltage across a resistor that is due to the random motion of the charges within it.
If you work out the numbers, the amount of power that this represents is very very tiny — even when measured over a 1 GHz bandwidth, we're just talking about 4 picowatts (-84 dBm). If you wanted to produce 3.3V from this, you'd only get about 1 picoamp, assuming you could find a diode whose leakage is significantly less than that.
Note that in the case of two resistors with the same value, the Johnson noise power will divide equally between them, with half dissipated in the source (hot) resistor and half dissipated in the load (cold) resistor. But also note that any real circuit will have nonzero values of parasitic inductance and capacitance, and these will serve to limit the bandwidth of the noise transfer, causing more of the power to stay in the source and less to be transferred to the load. |
H: Working of miniature Tesla coil?
Can anyone explain the given circuit.
I seem to have done it and its perfectly working. But can someone explain the principle/theory and working behind this circuit from when the switch is turned on..
And I also didn't connect the LED
If I bring a fluroscent light near it.. It glows
Pls explain that phenomena also..
AI: That is not a Tesla Coil. It is a high frequency oscillator. A Tesla Coil depends on resonance, which means a tuned circuit with a capacitor and an inductor. In the case of a Tesla Coil, it is two matched LC circuits (one with the primary capacitor and primary coil, and one with the topload and secondary coil). The above circuit just oscillates at a very high frequency based on feedback from the secondary coil (the one with 275 turns). When the switch is thrown the transistor turns on due to the current flowing into the base through the 22K resistor. Current also flows through the primary coil (the one with 3 turns), through the transistor, and back to ground. When you get a "burst" of current in the primary coil, it induces current in the secondary coil. The lower end of the secondary coil (assuming both coils have the same priority) provides a signal that turns the transistor off. When the coils discharge the cycle repeats (the transistor is turned back on again and another "pulse" is sent through the primary, inducing current, etc). This oscillates at a very high frequency which creates an alternating current output on the secondary coil. With a turns ratio of 3:275, a 9v input would give you about 825v (roughly speaking) on the output, based on normal transformer operation.;thank you |
H: How does a transistor work when collector is disconnected?
My transistor works when its collector is disconnected. That is: The LED in the following circuit glows, albeit somewhat dimmer than when I connect the collector. (but it still glows considerably good)
simulate this circuit – Schematic created using CircuitLab
Is this normal? If yes, could you explain why is this happening?
AI: Yep, it works.
The base to emitter connection with collector floating is in fact just a diode. You're downgrading a NPN transistor to a PN junction in your case. You won't get the current amplification feature of the transistor because you've not connected the collector.
In this configuration you have a silicon PN junction and it does all what a PN junction does: rectification, about 0.7v voltage drop and so on. It's not much different to what a vanilla diode like the common 1N4184 diode would do. On the other hand diodes are optimized to do the diode job while a base-emitter junction is not, so you'll likely get better performance from a dedicated diode. |
H: Transformer works on PWM at 50Hz?
I have an ardunio setup which is giving me output of 5V and 1A at 50Hz with pulse width modulation. I want to use this as input to the step up transformer and generate output of 60V. considering transformer formula Vp/Vs=Np/Ns I will need to have Ns=12*Np.
My questions:
1.Will the transformer will work on PWM at 50Hz?(if yes,will there be power loss?)
2.Can I use 60V as input to other step up transformer and generate output of 120V?Or would it be better to add just one another transformer?
AI: I looked at the code reference and, as the comments say, it's going to generate a kind of sawtooth - not a sinewave.
void loop() {
for(up=-1; up <= 255;up++) {
analogWrite(out,up);
if(up==255) {
up=-1;
}
}
delay(20);
}
What you are expecting is the blue sine-wave. What that Arduino code will give is a short sawtooth (ramping up to 255 and back to -1) followed by 20ms of nothing. It won't even give 50 Hz correctly.
If you did get a sine wave out it would give you a 2.5 V DC output with a 5 V peak-to-peak sinewave on top of it. The DC will bias the transformer which expects the input voltage to be symetrical about 0 V (and not 2.5 V).
5 V p-p = 1.7 V RMS so even if you got rid of your DC you still have a very low voltage to work with.
(You think) you have \$5V \times 1A = 5 W\$ to work with but \$5 V_{p-p} = \frac {5}{2 \cdot \sqrt 2} = 1.7 V_{rms}\$ and \$1 A \cdot 1.7 V_{rms} \to 1.7 W\$. Be aware that even if you got this to work efficiently and stepped up the voltage to 120 V the absolute maximum output would still be 1.7 W which is about 14 mA at 120 V.
I suspect that you hope to use your Arduino to power something that would normally run at 50 Hz. I think the answer is "no".
What you are trying to make is an inverter. Have a look on the web for inverter designs. You will find some very cheap designs but they will have terrible non-sine waveforms and poor voltage regulation. Anything better will require specialist and more expensive components.
Edit after Arduino code update.
void loop() {
for(up=0; up <= 255;up++) {
analogWrite(out,up);
delay(20);
}
for(down=255; down>=0;down--) {
analogWrite(out,down);
delay(20);
}
}
Your updated code will give an output like this.
The updated code result.
Now your code now steps up by 1 step and waits 20 ms before doing the next step. It will take \$255 \times 20ms = 5.1s\$ to get to 255 and another 5.1 s to come back down to zero. That's one full cycle in 10.2 s or < 0.1 Hz.
No it won't work in a transformer.
As stated, even if it worked and was 100% efficient it could only give 14 mA. You're looking for 44 mA so there is no chance of it working.
It's still not AC. It's a rising and falling DC. The current never changes direction.
It still has a DC offset in it. |
H: How are system configuration flash or eeprom chips programmed?
I've seen, quite often actually, a circuit that will have an eeprom or flash chip soldered next to the application chip. Take a look at the ESP8266, it has some kind of programmable memory that sets up the SoC.
My question is how was that eeprom/flash chip programmed if there aren't any programming ports on the application board? Is there like some pogo-pin programmer used during assembly or a socket that they drop each and every one in before soldering? Those options seem incredibly time consuming.
AI: I can't speak for the ESP8266, but in most cases, the blank chips are sent to a programming house that has equipment to mass-program them, either in a row of sockets or, in the case of large production runs, with an automated system that automatically runs each chip through the programmer.
In many cases, the board assembly house contracts with the programming house to provide the programmed chips. |
H: Why would an electronic timer have a minimum load?
I need to replace an electronic timer lightswitch, and both the old one, and this example of a replacement, state that they have a minimum load of 40w.
Why would the switch have a minimum load, and what would happen if I used it with a lower wattage bulb?
This is a for a lantern style outdoor light (although the switch is indoor) and I'd ideally like to put a small energy saving led bulb (5-10 watts) in it.
AI: The timer is designed to replace a regular switch as shown on the left of the schematic.
simulate this circuit – Schematic created using CircuitLab
Since there is often no neutral connection in the switch wall box it presents a problem for the timer designer. It won't work with a live feed only.
The trick is to replace the switch with a triac which behaves as a fast acting electronic switch and can switch on the current to the lamp at any point in the half-cycle.
Triac modified sinewave. Delaying the turn-on point results in reduced voltage on the lamp.
If the timer circuit delays the turn-on point of the triac the voltage to the lamp is reduced. That leaves the remainder available to power the switch. The minimum 40 W lamp ensures that there is enough of a load to pass enough current to keep the timer running. The designers hope you won't notice that the lamp is ever so slightly dimmer.
When the lamp is off there is almost full voltage across the triac so the timer again has power.
These circuits are a little tricky to design as they have to work with full voltage and a fraction of supply voltage.
Note that if the bulb is removed that there is no return path for the timer so it will power down - although there may be a delay if it has some energy stored in a capacitor.
Battery
The battery is probably to keep the clock running during power cuts. As explained in the answer it can always steal enough power when the supply is there. The trigger delay is exaggerated in my sketch and probably 10 V or so would be enough to charge up a capacitor in the switch. The low voltage portions of the sine wave contribute very little to the power of the lamp. On a 240 V supply \$V_peak_ = \sqrt 2 \times 240 = 340 V\$. Since power is proportional to the square of the voltage, the power to the lamp is \$\frac{340^2}{10^2} = 1150 \$ times stronger at peak than at 10 V. |
H: How is reverse saturation current of a BJT measured empirically?
I'm not asking the definition, but wondering how do the manufacturers measure this parameter's quantity in a lab for instance? For example for Ic Vce characteristics they keep Ib constant and they obtain plots. What is the procedure for obtaining reverse saturation current of a BJT?
AI: Ies in this case is Is: Reverse Saturation Current. When they measure it, they just take several different current readings for several different Base Emitter voltages. They also do this at a "constant" temperature, or they use a cold junction reference to actively measure the temperature. Solve for the unknown. (Note: "Ies" = emitter saturation current, and this is a first order approximation) You could put the base-emitter into reverse bias, but you'd need to be very careful to not destroy the device as Vebo is generally around 5V or less! Where as the first technique has much more tolerance for not destroying your BJT that you might want to use.
Edit: A more precise answer due to some ambiguity of the question.
Where
ic = collector current
ib = base current
ie = emitter current
βF = forward common-emitter current gain
βR = reverse common-emitter current gain
Is = reverse saturation current
Vbe = base-emitter voltage
Vbc = base-collector voltage
Vt = thermal voltage
Solve for as many of these as you feel like to find Is. |
H: Can a current source have a voltage across it?
I'm reviewing material from a lower div circuits class in preparation for the upper div class by redoing problems, and this is one of them.
Does it make sense for the branch with the dependent current source to have a voltage Va(t) across it? Wouldn't the voltage measured across it be zero assuming the current source is ideal and the wire has no resistance (since it's not modeled in the problem.)
Can someone explain why these dependent sources make sense, please?
AI: A current source can certainly have a voltage across it. If the voltage across a current source is zero, then it is not delivering or absorbing any power. However, if the voltage across the source is not zero, then it is either sourcing or sinking power into the rest of the circuit. |
H: If a USB Cable is being used between two devices, are the power wires needed?
I am trying to figure out a way to give power to an android tablet and a DSLR camera at the same time (for a photo booth).
I was able to purchase an AC adaptor "battery" plugin for the camera, but the DSLR needs to be plugged in to the tablet via an OTG data cable (USB).
My question is; Can I open the USB cable and cut the two power cables (red and black), then wire them to a mobile device wall wart charger?
Basically, I want to open the USB cord and not cut the data cables so that the camera and tablet are still connected via data, but I want to remove the red and black wires going to the camera (so the camera does not get power). Instead, I want the power wires going from the tablet to go to AC power via a mobile device wall wart charger.
will this ruin any data transfer? Does the data need to be transferred with the power for information to be sent?
I think I've over-explained enough, but please ask if I haven't made sense.
AI: Yes the power and ground lines are needed. The ground line is needed because the OTG feature works by grounding the ID pin the the USB plug. If the ID pin is left floating then the object configures as a device. If the pin is grounded then the object configures as a host. The power line is needed because most if not all devices use the presence of power as a trigger to initiate USB enumeration. If no power is present then the object will not check the data lines to see if something is present. |
H: Information regarding old AB (Allen bradley) potentiometer JAIN056S102MA
i was looking for information (datasheet) regarding this old potentiometer from 1962 on the internet, JAIN056S102MA type J, 1k-ohm from Allen Bradley and i was not able to find any information about it, i want to replace it because it is not working anymore and it is in a working machine, according from a user of this forum this potentiometer is Type J, 1k-ohm pot that is rated at 2 watts end-to-end and has an an audio taper, what does it mean audio taper?, anyone can help me where to get the datasheet of this pot?, anyhelp is really aprecciated, thank you very much
Omar Torres
AI: Here is a LINK to a PDF data sheet. It decodes the entire part number and indicates that the "M" taper is linear.
Here is a picture of the same part number potentiometer except that it has the U (+/-10%) linear taper instead of the M (+/-20%) linear taper. |
H: Electron Flow Confusion
Using conventional notation in the diagram below, I understand that the circuit is not complete because the diode is in reverse bias. But knowing that the electrons actually flow from the negative to the positive terminal(direction of the arrows), wouldn't the electrons take a path from the negative terminal of the battery, go through the lamp and stop at the diode(the red path in the picture). If they would, then why doesn't the lamp light up with the first electrons that are able to flow through it before the voltage in the wire is built up and the current stops.
AI: Electrons can't flow in that direction (right to left) though a diode.
Yes, a small transient current flows while the voltage builds up across the diode (it acts like a small capacitor). In practice this charge is very small (pico coulombs), and would not actually illuminate a lamp, neither could you see the extremely brief pulse even if it could. |
H: ESC motor and battery matching
How can you tell if an ESC, brushless motor and Li-Po battery will work together. Specifically, I have a A2212 Outrunner Brushless Motor KV2200, 30A Brushless Speed Controller ESC and I am looking for a battery to run this system.
Motor
ESC
AI: Most brushless ESCs will run pretty much any 3 phase brushless motor so long as it doesn't draw too much current or spin too fast.
Your ESC is rated for operation at 6-12V, which suggests that you could use a 7.4V or 11.1V Lipo battery. Battery capacity and 'C' rate should match the expected current draw and run time. For example if the average current draw is 15A and you want to get 10 minutes then you need at least 15*(10/60) = 2.5Ah or 2500mAh.
To avoid draining the battery completely you should add 20% to the calculated capacity (making 3000mAh in this example). If peak current draw is 30A then the 'C' rate needs to be at least 30A/3Ah = 10C.
All brushless ESCs have a maximum commutation speed, beyond which the motor may stutter or lose sync. With a Kv of 2200rpm/V your motor will spin at ~11.1*2200 = 24400prm on 11.1V when running free. It has 14 poles, so it is electrically equivalent to a 2 pole motor spinning 7 times faster, ie. ~170000rpm. Some ESCs can handle this high rpm, but others can't (see here for examples). Your ESC's rpm limit is not specified, so you will just have to try it.
Motor current is determined by voltage and loading. With good cooling Your motor should be able to handle ~15A continuous or 30A peak, which on 11.1V is achieved with a 5-6 inch propeller (test data here). Since your ESC is rated at 30A it should be safe so long as you don't overload the motor. |
H: What is the difference between Ground and Low?
What is the basic difference between sending a LOW signal vs GND to a circuit? What If I ground instead of sending LOW? Or similarly what is the difference between Vcc and HIGH?
AI: Take a look at this: -
It's for a 5V logic system and it tells you what the voltage ranges that are acceptable for standard CMOS inputs.
So an input signal that is below 0.8 volts will be regarded as a low and that is a definite. However, if the signal received is (say) 1V it might still be regarded as a low but there is no guarantee that it won't be regarded as a high.
Then you could take this further and look at what the specifications of a driver and receiver are: -
You should be able to see that a logic driver output has a tighter spec than a logic input and this should make sense.
What If I ground instead of sending LOW?
You should be able to see that ground (aka 0V) is in the range of an acceptable "low".
Or similarly what is the difference between Vcc and HIGH?
You should be able to see that Vcc is in the range of an acceptable "high". |
H: How can I make an LED glow by touching it with my finger?
I can make an LED glow very dimly in all 4 following circuits. The voltage source in the circuits is the output of an AC to DC converter fed into a breadboard. Also, one end of the voltage source is always floating, as shown on the schematics.
simulate this circuit – Schematic created using CircuitLab
What is the physics behind this? I understand that there occurs a potential difference between me and positive AND me and negative terminals of my power supply but I don't know how and why this happens. Also I understand that depending of the circuit, my electrical potential becomes:
Higher than the negative terminal
Lower than the negative terminal
Higher than the positive terminal
Lower than the positive terminal
Since the LED glows in all 4 configurations. How is this happening?
AI: If the situation was exactly like you sketched, then it cannot be explained that the LED lights up !
So something else is going on
Your power supply of 5 V is also capacitively coupled to the mains voltage and this causes a voltage between you and the 5 V supply.
All power supplies have this capacitive coupling caused by the transformer inside it and a small value capacitor between mains and output to prevent emissions of high frequency signals. The total capacitance will usually be less than 1 nF but that is enough to light up a sensitive LED.
Try this again with a battery and you'll see the LED does not light up. |
H: Understanding critical paths
So I'm having trouble understanding critical paths.
I have the following example question:
Draw the critical path that shows how fast the counter can count:
Delays are specified as follows: Delay for OR gate is 4ns, Delay for AND gate is 5ns, Setup time for latch is 3 ns, hold time is 1 ns, propagation delay 2 ns.
The solution manual marks the following critical path(the image is the full design with added red lines for critical path):
But I don't understand this answer, isn't the critical path supposed to be the slowest path for the input to affect output?
Wouldn't it be a lot slower to then go through the latches like this:
So why isn't image 2 the critical path?
Path in image 1 has 19 ns delay. To my calculations path in image 2 has 29 ns delay.
AI: "Path" is defined as being from the settling of data at the output of one clocked component to the input of the next clock component.
In your example, the output of the second latch isn't affected by the change in input from the first latch via the AND gate, until the clock arrives. Which is assumed to arrive at all latches simultaneously. |
H: Can a presure sensor work under resin?
I want to make a lamp without a switch, just a pressure sensor under resin and an Arduino.
Can the pressure sensor work under the resin?
AI: Depends entirely on the resin and the sensor.
Some resins are hard, rigid materials when cured and nothing inside
them would respond to outside pressure. Some are quite flexible or
"rubbery" and would transmit pressure, though the response of the
sensor might well be quite different than a "bare" pressure sensor.
Some sensors have the sensing element physically shielded in various
ways that might not be very compatible with working when
encapsulated. |
H: what is the base temperature when using ppm/c
I am not sure If I have phrased the question right but if not please correct me
I want to know when Accuracy Parts per Million mentioned in the datasheet of voltage reference they say for example 5 ppm/c, which from my understanding, for every degree increased a 5 parts per million of the output voltage will increase
OK, but what is the base temperature that I should consider to calculate the drift ? is it the initial temp. when the Vref began its work, or the ambient temp which would be 25 degrees or the temp. which the manufacturer toke his original measurement in his laboratories ??
I want to calculate the voltage ref. drift that happens because of the temp. changes and after that try to make compensation in the software, it is still an idea I don't know if it is good or not but it worth trying it
AI: Typically the manufacturer will use a 'box' method and draw a rectangular box around the curve of output voltage vs. temperature. The quoted ppm/°C is the height of the box divided by the width of the box. The maximum and minimum temperatures used for this test should be (but are not always) specified. They may be the maximum/minimum operating temperatures or something inside those. Note that the maximum absolute value of the slope of the output voltage vs. temperature is typically not guaranteed, despite the units. It might actually be several times higher than the average if the curve looks like an 'S' or a more like a parabola.
Yes, you can characterize and compensate for some reference variations due to temperature. This is best used as a last resort after you've make everything else as good as it can be. Thermal testing is expensive and slow, and compensation can have ugly dynamic effects where slewing the temperature results in relatively large transient errors. I've done a two-dimensional curve (well, I guess surface) fitting to calibrate a very precise instrument (microKelvin-level) using an automated process in an environmental chamber but it's not for the faint of heart (or short of time). |
H: How can I implement a schmitt trigger into a differentiating op-amp in order to reduce the signal noise of the output?
The circuit is driven by an LDR, but the output signal is too noisy. Is there a way hysteresis can clean up the noise in such circuit?
AI: It is possible to give a differential amplifier hysteresis by adding positive feed-back, and this will create a Schmitt trigger. However: A Schmitt trigger produces a digital on/off signal as its output from an input analogue input - the trigger has hysteresis - that is the output turns on when the input level is at a higher than the trigger level for it to turn off again. As such it is not suitable for your application.
What you are looking for is a low-pass filter. Probably a simple first order filter consisting of a single resistor and capacitor on the output of the amplifier will suffice. |
H: SX1272 - LoRa - What is the minimal schematic (needed capacitors/resistors) to use that device?
I'm interested in SX1272 by Semtech. It's a LoRa modem.
I'm not the best at reading datasheets. Maybe it's because of my poor English. I wonder what is the minimum schematic of such a chip? What capacitors, resistors, inductors do I need and where?
On the Semtech's website I found something like this:
868 MHz - Combined RFI and RFO (high efficiency PA) design, switchless
This PDF contains a scheme, but a lot of values of capacitors are not specified. Do I need to somehow calculate them by myself? How to do it?
Is it minimal connection needed?
I just want to connect SX1272 to ATmega88.
BTW. As I understand, the SX1272 can not be programmed? - Ie. Upload your own program? But on the other hand, what would be the use of GPIO pins?
AI: I would call that the schematic from the mBed shield minimal for the most part.
For reference:
You won't want to leave the decoupling capacitors out on the voltage rails. As for the various inductors and capacitors on the RF antenna line, I would leave those. Don't mess with that stuff unless you know exactly what you're doing. I don't do RF design so I can't advise on this.
Do I need to somehow calculate them by myself? How to do it?
The values of the components in the RF antenna path, those are very tailored to the PCB design and antenna design, it is very specialized work. If you want to make a watered down version of the mbed shield, you can just use what the values are in the bill of materials, which is in that same zip file that contains the design files for the mbed shield, so long as you also use the same PCB design for the antenna.
As I understand, the SX1272 can not be programmed? - Ie. Upload your
own program?
Right. The SX1272 is merely a modem/tranciever IC. There is limited configuration of the GPIO pins which can be tied to do certain actions but you won't be programming it in any manner similar to an atmega. |
H: Op-amp and ideal diode problem: determine Vout as a function of Vin
"Determine and graph v OUT as a function of v IN for the circuit
shown in Figure 16.31. In doing so, model the diode as shown in Figure 16.29, and
assume that the Op Amp is ideal. Also, contrast the input-output behavior of the circuit
shown in Figure 16.31 with that of the half-wave rectifier studied in the chapter on
nonlinear analysis."
I'm confused what happens when the diode is off. Can someone explain?
here's the circuit:
thanks in advance.
AI: When you have a problem analyzing a circuit like this in a particular state, start by noting the voltages and currents you do know on the schematic, then see if you can figure out what others are from that. As you figure out more, it should be possible to figure out even more. Eventually you figure out the whole circuit.
In this example, you want to examine what happens with negative input. Set the voltage source to -1 V. That obviously makes the opamp + input also -1 V. You don't know yet what the opamp output and the diode are doing. Start by assuming the diode is a open circuit, and see where that goes. You should be able to see the voltage on the opamp - input from inspection then. Now you have both opamp inputs, so you should be able to see what the output is doing. Now you know both ends of the diode. Is it really reverse biased as we assumed, or is it forward biased and we therefore need to revise our assumption of the opamp - input voltage? Either way, you get to a stable condition where you know all the voltages and you should be able to see what is going on. |
H: Why does compact fluorescent lamp (CFL) save more energy?
I read information about fluorescent lamp and compact fluorescent lamp (CFL) but I still don't understand why CFL saves energy and produce the same amount of light?
Maybe the electronic ballast consume less reactive power than the traditional ballast?
AI: You question is not so clear but is seems that you're asking why is a modern compact CFL lamp more efficient that the old fashioned CFL tubes ?
This is easy to answer if you just sit down and think about it for a moment.
What happens when something is inefficient ? Energy is lost, well not lost but it is converted into heat, not light. So something less efficient (tube CFL) will produce more heat than something more efficient (compact CFL).
Now what get's hot in the tube CFL ? The lamp itself, yes but this also happens for a compact CFL. What can get really hot is the magnetic ballast ! Also notice the size of such a ballast, it would not fit in a compact CFL !
So compact CFLs use an electronic load, which also does not get so hot so obviously it is more efficient.
In your tube CFL you could replace the magnetic ballast with an electronic one and so improve the efficiency. |
H: Analysing a circuit to determine what is in series or in parallel
This is probably a very basic question but I have the following circuit, I am not sure what is in series and what is in parallel or if they are all in parallel, initially I thought R2 and R3 were in series and then used the sum of their resistances with R1 to calculate the equivalent resistance, that seems to be off based on some circuit simulation software I am using so I would appreciate if somebody could explain how to calculate the Rt and the logic behind it.
Thanks.
simulate this circuit – Schematic created using CircuitLab
AI: An easy thing for the beginner to do, is color the nodes.
Now, any components that have the same color (node) on each end are in parallel. So, R2 and R3 have green and purple on each end (respectively) so they are in parallel. |
H: RL and RC circuits with ideal diodes
Can you help me with this problem?
what is V(t) before t=0 ?
And also, any hints on how to solve the problem.
This is not homework. I'm studying for a final exam and I'm really stuck. So if anyone could give me the whole solution for one of the circuits, I would be very thankful.
AI: The method is just like any problem with an ideal diode.
Guess whether the diode is in forward or reverse bias.
Solve the circuit under that assumption.
Check whether the solution actually biases the diode the way you thought.
If it does not, assume the diode is biased the other way, solve again, and check your answer again.
For your circuits you'll have to essentially do this procedure for each switching event in the forcing function (for the \$t<0\$ initial state, for \$0<t<T\$, and for \$t>T\$). For the second circuit, you also have to consider the possibility that the diode changes state during the transient.
As you gain more experience you'll find it gets easier to guess correctly in the first step. |
H: Core loss appearing in buck converter ripple current
I have been told (and have also seen experimentally) that an inductor with a high core loss will introduce "glitches" to the ripple current in a switch mode power supply. I have tried researching this, but can't seem to find any information. Below is an example of what I mean by "glitch". An explanation of why this is occurring would be great, and I would also love to be directed to any literature on this topic that I could research further.
Edit:
Below are two waveforms I just took. The circuit is a synchronous buck converter, and the parts are the exact same. Out of 30 inductors, 15 were purposely damaged and the other 15 were left undamaged. All 15 damaged parts exhibit the "glitch", while all 15 undamaged parts do not. The original waveform was actually from user 'gsills' while answering an unrelated question of mine "Ripple current in synchronous buck converter". I have also heard this elsewhere, not only from gsills.
The below waveforms are from the exact same circuit, only the inductors were swapped out.
One of the undamaged parts:
One of the damaged parts:
For some reason there is a little added slewing on the switch node voltage waveform. I've used this same circuit many times and that generally doesn't occur.
AI: Core loss is caused by current induced into the magnetic core, which is effectively a secondary winding with a resistance across it.
Since the voltage going into this 'transformer' is a square wave, the current and voltage across the core resistance is also a square wave. If you remove the slope caused by current flowing into the buck converter's load then this low amplitude square wave is what's left.
Here is an LTspice simulation showing the effect. L2 and R2 represent the core 'secondary winding' and its resistance (shown as the equivalent 1:1 transformer - in reality it is a single turn with extremely low resistance):-
I(L1) is current going through the inductor. V(n002) is voltage across the core resistance. |
H: Feeding back into a rail of a power source
I have a power supply with +12v, +5v, and GND rails.
Is it good practice to put a 7v motor across the 5 and 12v rails?
AI: That is a good way to destroy everything connected between +5 and GND.
The motor will draw a lot of current (especially on start-up) and that will typically cause the +5V rail to rise up towards +12.
Most (positive) switching supplies and linear regulators are not designed to sink current from the output, only to source it, so as soon as the motor current exceeds the draw of everything else on the +5V line you'll have disaster.
Below is part of a schematic of a 200W PC power supply from here:
As you can see if you connect a resistor between +12 and +5 SBD1/D83-004 will become reverse biased and there is nothing keeping the +5V rail from rising other than capacitor leakage (the feedback might switch the supply down in time, if you are lucky). |
H: Do lithium-ion batteries just lose capacity over time or do they also become more wasteful?
My question is if lithium-ion batteries just lose capacity over time or if they also become more wasteful. From a practical perspective, can you easily get around loss of capacity in older batteries/devices by just carrying a powerpack or would an older battery also use up more power in a certain amount of time, thus draining the powerpack faster?
This is coming from a consumer perspective but I hope it's still interesting enough to be answered here.
AI: The primary aging effect in a Lithium-ion battery is increased internal resistance (caused by oxidation of the plates). This doesn't affect the Ah capacity, but it does reduce voltage and waste power at high current. Since voltage also drops as the battery discharges, the increased resistance causes it to reach cutoff voltage earlier and so reduces its effective capacity.
An old lithium-ion battery which is not powerful enough to run the device it was designed for may still be useful in a lower current application. General Motors and Nissan are reusing old electric car batteries as stationary storage for homes and businesses. At the lower current drain required these 'worn out' batteries can still deliver more than 80% capacity.
Using a power pack on an appliance with an old Li-ion battery will not use any more power than normal. The power pack will simply take over from the internal battery to supply the power the device needs. This is not the case with with old Nicad and NimH batteries, which tend to become leaky as they age and require constant topping up, which does waste power. |
H: Can I ground the negative DC bus of a variable frequency drive?
Suppose I have a typical VFD: rectifier, DC bus caps, inverter, feeding a motor.
In general it would not be advisable to tie the DC bus to earth ground, because the AC line may also be referenced to earth. Having two competing ground references in the same circuit can cause substantial issues. I suspect the rectifier diodes would fail rapidly, if a fuse didn't save them first.
But suppose I wanted to power the drive through the DC bus terminals. In this configuration, the AC terminals are left open, meaning there is no competing ground reference. The VFD and motor chassis are tied to earth, which can lead to common mode issues, but I don't see that they'd be any worse than running from an earth-referenced AC line.
In that configuration, would there be any problem with tying the negative DC bus to earth? Is it possible to make a general statement, or would it be installation- and equipment-dependent.
AI: It should be fine but be very careful where you make your earth bond.
simulate this circuit – Schematic created using CircuitLab
You need to run the DC- all the way back to the DC supply ground point. Don't take a shortcut and connect DC BUS - to the chassis and run that back. If the DC- got disconnected the VSD chassis would go live.
Update
I forgot to explain that R1 provides inrush current limiting on power-up and RLY1 switches in when the voltage reaches half or two-thirds of normal DC bus voltage. (Thanks, Charles.) |
H: Modbus raw data COM capture file example?
I'm attempting to use a RS232 tap to sniff a serial connection between two devices that are communicating using Modbus RTU.
I'm looking for any capture files taken from sniffing a COM connection or port that contain Modbus RTU (or Modbus ASCII). I would like to compare the data files that I am capturing to other similar data files. Does anyone have any example Modbus capture files, or could point me to a website that hosts these?
Note that I am not interested in Modbus/TCP.
AI: There is no need to compare to someone else's data capture. The Modbus spec is pretty clear about what makes a valid Modbus packet.
Actually there are two specs that apply in your case. The first is the Modbus application protocol spec. That tells you what needs to be in a Modbus packet as seen by the applications on the master and the slave. They refer to this packet as the PDU. Then you also need to read the Modbus over serial spec. That explains how PDUs are wrapped for transmission over a serial line. This adds a address byte at the start and two checksum bytes after the end of the application-level Modbus PDU.
You may want to get software that can generate packets for your device to resepond to, but looking at someone else's data capture isn't going to tell you anything the spec doesn't. |
H: Question about flow with relay and capacitor (Make Electronics-Charles Platt, Exp. 8)
I'm a newbie working my way through Charles Platt's Make: Electronics (2nd Ed). I'm on Experiment 8 and I'm confused about something. The circuit looks like this:
What is supposed to happen is that when the button is pushed the capacitor charges before the power is cut to the button, it keeps the relay switched until the capacitor discharges. So the right-hand LED stays on for a few seconds before the relay switched back and the left-hand LED comes back on.
Platt notes that if the right-hand LED is removed, when holding down the button the left-hand LED will fade out over about a second before popping back on and cycling again, since some of the power from the capacitor flows through it.
What I don't understand is why the same thing doesn't happen when the right-hand LED is present. In other words, in the original circuit why does the left-hand LED wink out immediately instead of fading when the push button is held down.
As an experiment, I modified the circuit so that each LED had its own 470-ohm resistor. Once I did this, the left-hand LED would indeed fade instead of winking out. Can anyone explain this behavior to me? Thanks!
If it helps, here's the modified circuit on my breadboard, sorry for the crummy image quality:
AI: simulate this circuit – Schematic created using CircuitLab
Circuit 1. Full circuit.
Initially D1 is on. V1 = 9V.
Press SW1 the capacitor charges and the relay turns on, disconnecting the supply. V2 = 9 V. V1 = capacitor voltage which is falling. D1 turns off - probably by the time V1 reaches 8.5 V because it's anode is held at about 7 V by the current flowing through D2 and R1.
The capacitor holds the relay on for a few seconds and the relay drops out.
If SW1 is still pressed the cycle repeats.
Clarification: For current to flow in D1 the anode (top) will need to be about 1.5 - 2.0 V higher than the cathode (bottom). When the relay initially picks up V1 = V2 = 9 V so both LEDs light. Then C1 starts to discharge and V1 falls to 8.9, 8.8, 8.7 V. Meanwhile D2 is being powered directly from the 9 V battery. If, say, 15 mA flows through D2 and R1 the voltage at the top of R1 will be \$I \cdot R = 0.015 \cdot 470 = 7 V\$. But V1 is falling and at 8.5 V there will be (8.5 - 7) = 1.5 V across D1 and it will be very dim and shortly after go out completely.
simulate this circuit
Circuit 2. Left LED only.
Initially D1 is on.
Press SW1 the capacitor charges and the relay turns on, disconnecting the supply.
If SW1 is held the V1 = capacitor voltage. D1 gradually decays with C1 voltage until the relay drops out.
If SW1 is still pressed the cycle repeats.
simulate this circuit
Circuit 3. Right LED only.
This time D2 turns on and gets full 9V.
Relay hold-up lasts longer because C1 is only discharging through the relay coil. (D1 is missing.)
simulate this circuit
Circuit 4. Independent LED resistors.
This time V2 goes to 9 V as before and lights fully.
V1 starts at 9 V and follows C1's voltage. In Circuit 1 D1 turned off quickly because it's anode was held at about 7 V by D2. This time it isn't so it remains forward biased with current flowing and light emitting!
Good first question. Some tips for future: There's a schematic button on the editor toolbar. It's quite easy to use. Draw your circuits with + at the top and - at the bottom. It's easier to see what's happening then. |
H: Heatsink temperature probe
I read around that with an anonymous heatsink, you can measure its temperature when at regimen dissipating P watts. Then, (T-Tamb)/P gives its thermal resistance.
Is that meaningful? Can I do this measurement roughly to stay on the safe side?
I'd like to put the probe in these heatsinks while dissipating a certain amount of watts and see if are close to 5°C/W:
AI: Not sure what an "anonymous heatsink" is, so some general (if obvious) chat follows.
Usually you will know the safe working temperature of the device being cooled and armed with it's data sheet, you ought to be able to select a suitable HS - you give no idea of the application though.
You might want to look at the information given by heat-sink manufacturers to get you started. e.g.
https://www.aavid.com/sites/default/files/technical/papers/how-to-select-heatsink.pdf and look at their sites where they may have design guide software or the offer of expert advice e.g. http://www.aavid.com/thermal-design-help
Google is your friend.
When using heat-sink paste, usually less is more! You are not making a cream-filled cake, but filling holes in the surface to increase contact area, and so thermal conductivity. Again, read the product data provided by manufacturers.
You need good contact if adding a probe (thermocouple etc) for it to be effective. You also need to consider at what point you measure temperature. Will it be the heatsink/source interface, the internal structure of the SH, or the outer surface? Centre or edge? Of course whenever we measure anything we effect the outcome! The point being that it will be more difficult to measure the effect of a small HS.
Having said that, it's useful to measure the effectiveness of a HS/temperature of the source during operation, so that the protected part can have it's parameters altered to modulate the amount of heat produced. Heat can drastically effect the lifespan of a device. |
H: Non-resonant RLC band-pass filter
To create a band-pass filter using an RLC-circuit, i drew the following circuit (assuming R is given as 120):
The corresponding transfer function is
$$
H(\mathrm{j}\,\omega)=\frac{120\, C\, \mathrm{j}\, \omega}{1 + 120\, C\,\mathrm{j}\,\omega + C\, L\, (\mathrm{j}\,\omega)^2}
$$
I know it is possible to find the corresponding L and C values to create a band-pass filter at resonance, giving a peak at the resonance frequency and -40dB/dec decrease at higher and lower frequencies in the bode plot. In that case the denominator of the transfer function has 2 complex roots.
My question is: is it possible to find L and C values to create a band-pass filter without resonance. Thus with 2 real roots for the denominator. Since \$\omega=0\$ is a zero of the transfer function, I would assume there is an increase of 20dB/dec until reaching the first pole. Then a steady part and afterwards a decrease of -20dB/dec starting from the second pole.
I did some quick calculations and found example values for C and L (see the circuit picture). I drew the circuit in LTSpice, did an AC-analysis and got this bode plot:
This is exactly what I was expecting. However, since I can't find any resources about this configuration of RLC-circuits (on the internet and in my textbooks), I'm not sure this is actually correct. Is this circuit a real band-pass filter, or just some look-a-like? And is my statement that this circuit is not in resonance correct?
AI: My question is: is it possible to find L and C values to create a
band-pass filter without resonance.
There is no such thing - even if the circuit is so over damped to be daft, there is still the natural resonant frequency of the circuit which is \$\dfrac{1}{2\pi\sqrt{LC}}\$.
Is this circuit a real band-pass filter, or just some look-a-like?
Yes it absolutely is.
And is my statement that this circuit is not in resonance correct?
No it isn't. |
H: Can you identify this fuse?
Sorry, dumb one really. I just had the heating out for a couple of days and eventually found a fuse blown in a controller for the (LK) underfloor heating.
I can't tell what rating it has (amps). It has T200H250V embossed around the end, and is made by ESKA with an S on the bottom/top. But that doesn't Google well.
I can see that the transformer it was (presumably) protecting has an output of 2 x 20VA @ 12V, I've found a 3.15A 20mm clear-glass fuse for sale, but maybe someone on here can better guess than me?
End of question.
AI: Literal answer to your title: Yes!
Literal answer to your actual question: No. I don't (have to) guess.
Answer to your inferred question: 250V 200mA Slow Blow, Ceramic Passivated. |
H: Torque, distance traveled and power consumed
I'm not good in math or physics in general. It's hard to me.
In a DC motor which from start to end take 1 unit of time with 1 unit of weight loaded is the same thing than 2 units of time with half-weight.
The reason I ask this is because I have an old car-window motor weak, I want to increase it's torque by halving a bit the gear.
It will have more torque, it will take more time to finish. But, does it consume the same power in the end changing one for another? If yes, I take a better approach.
I'm assuming normal condition with naturals losses everything has.
AI: Force x distance equals energy consumed in the exertion of that force to move something that distance.
If the thing is moved in half the time, the energy consumed is the same but, given that power is rate of energy consumed, the power will be double.
For a motor, power is proportional to both torque and speed of rotation so, if a gearbox is used, torque doubles but speed halves therefore power is the same.
Losses in the gearbox and drives alter this a bit but the general principle remains. |
H: Power MOSFET or Relay
I want to operate a 12V automotive fan with a 3.3V uC signal. The (37-year-old) centrifugal fan draws 3.2A for about 100ms at startup and then a steady 1.2A while running for a maximum of 30 minutes. Originally, I used a Panasonic 12V, 25A automotive relay (www.farnell.com/datasheets/1809465.pdf) and 2N2222 NPN BJT. I also added a 100Ω resistor and 100nF cap across the contacts. The circuit works fine on the PCB I prototyped.
I assembled a second circuit and replaced the relay with a 27A P-channel power MOSFET (www.farnell.com/datasheets/1712479.pdf). Assuming I understand the data sheet correctly, there is already a diode present so that component was deleted as was the RC snubber. I can also operate the fan now at various speeds using PWM. This circuit also works fine on the breadboard.
There are similar threads but I haven’t noticed a consensus on whether a power MOSFET is considered a suitable replacement for a relay. I don’t need the PWM option and am unsure if it is even advisable to operate the fan at anything other than its designed parameters. The MOSFET is $1.50 but the relay is only $3.50, not a consideration for a one-off. Should I prefer one design over the other? Should I use a FET rather than the 2222 BJT if I want to use PWM? Is the RC snubber necessary for the relay? Is there anything else I haven’t considered like excessive heat when using the MOSFET?
AI: If you have access to the ground (more accurately, negative) side of the load, you could probably use a smaller N-channel FET than the P-channel that you have because of the way that FETs work. Something like this:
simulate this circuit – Schematic created using CircuitLab
Don't forget D1, regardless of how you control it. It limits the voltage spike when turning off to a diode drop above the supply by providing a path for current to continue flowing through the inductive load for a (short) while.
If you must control the positive side, then your PFET circuit looks good, except that your R18 is 220 ohms with 12V across it when the motor is on, which comes out to 0.65 watts. With that value, I would not go any less than 1 watt, but you should probably look at a higher value instead. |
H: What type of environment is this?
Do you know what type of environment is this? I didn't find any information on Google.
AI: ALi used to be a chipset (and minor BIOS, IIRC) vendor. That looks like a Visual Studio 6 knock-off development environment (down to the icons -- compile, make, build, etc.), similar to AMI VeB (Visual eBIOS) -- I used that as a BIOS developer until very recently.
Probably used for low-level firmware / x86 software development would be my best guess. I know they built some embedded stuff back in the day that was 8051-based as well, could be supporting that. |
H: Will cutting the data lines of USB still let the power to go through?
I am trying to Charge a USB connected device through a computer without transferring data.
An USB 2.0 cable should have 4 wires: Vcc, Data+, Data- and Ground. If I only cut the Data wires and let the Vcc and Ground wires connected, will it still be able to transfer power or will the power cables be shut off because of the disconnected Data wires?
AI: It depends on the device. And on the source.
Usb spec states that a device should only use 1 block of power until it enumerates with the host. Then it can request up to 5 blocks. Each block is 100 mA. It should not pull more than 5 blocks.
In practice, very few, if any hosts limit a usb port to 100 mA at all. Some do limit ports to 500 mA (Apple computers for one, though they do allow iDevices to request more in a Apple only standard, so they are physically capable just not normally allowed). Some USB ports have very little power protection and may be hooked up straight to the 5V power source.
Now usb peripherals also have requirements for power. Dumb devices may power directly from any power source, 5V or different. These dumb devices don't even have the data lines connected. Older cell phones also allowed dumb charging. As time passed, more and more restrictions come into play. Some devices monitor the power pins for regulation, and won't work on anything outside of usb spec power (4.75 to 5.25 volts).
Some devices won't work unless a resistor pairing setup is on the data pins. Apple started this, and others followed, and there are competing standards. You can't plug a dumb 5V power supply into an iPhone and get it to charge. It will state unauthorized charger. Some devices require enumeration before charging, but this is rare. The PS4 Six axis controller does this.
And some devices will treat a dumb charger as unsafe, and limit charging to 500 mA or less. Most modern cell phones do this. If the data lines do not have a resistor indicating it is a high power charger.
In short, a usb cable plugged into a computer without the data lines will either not work, work slowly, or work fine, depending on your computer and your device.
As a side note, there are commercial usb cables that have a data or charging switch, allowing you to disconnect the data lines to prevent data communication. They typically switch in the resistor setup, but it varies. |
H: Strange parameters in datasheet of 74HC4046
In datahseet of 74HC4046, page. 10.
Why the typical value may bigger than the max. value, or lower than the min. value? I don't think it's a typo, because there are others like this, such as p. 16
Any reason? What "typical" mean?
AI: Those are not typos. You are not interpreting the specifications correctly. For the HIGH levels, the specification is giving the minimum value that is guaranteed to be recognized as a HIGH, e.g. 2.1 volts when Vcc = 3.0 volts. Any voltage higher than 2.1 will be recognized as a HIGH. The typical voltage, 1.7 volts, is the value that a typical device will recognize as a HIGH but it is not guaranteed. Similarly, the maximum voltage that is guaranteed to be recognized as a LOW is 0.9 volts when Vcc = 3.0 volts. Any voltage lower than 0.9 volts will be recognized as a LOW. Typically, however, a value as high as 1.2 volts will be recognized as a LOW, but again this is not guaranteed. All of the other values in the specification should be interpreted in the same way. In general, maximum and minimum values are guaranteed, typical values are not. |
H: Specifications for a charger needed to charge LiFePo4
I have a project with three 4-Cell LiFePo4 batteries.
The battery specs:
4S at 3.3V
4200mah
30C
I want to charge all 3 batteries in a range of 45 - 75 min (Preferably one hour)
What are the specs of the charge I would require to accomplish this?
AI: 4200mAh is 4.2Ah, or 4.2A for 1 hour. Therefore to charge the pack in 1 hour requires a charging current of 4.2A. To charge 3 packs in the same time you either need 3 chargers that each do 4.2A, or a single charger that does 12.6A (only if all 3 packs will be permanently wired in parallel).
4S means 4 cells in series, which at 3.3V/cell gives a pack voltage of 13.2V. However at full charge the voltage may go up to 3.6V/cell, so the charger should put out a maximum of 14.4V.
When a LiFePo4 cell reaches full charge the voltage rises rapidly. If all cells in the pack don't reach full charge at the same time and the charger only looks at the total pack voltage then some cells may not get a full charge. Therefore the charger should monitor the voltage on each cell and equalize or 'balance' them until they all get to 3.6V.
If you are looking at purchasing a ready-made charger then choose a model which does 4S LiFePo4 and has a balancer. If you want to make your own then at minimum you need a power supply that puts out 14.4V with adjustable current limiting, and a balancer board for each cell.
The balancer board is basically just an amplified Zener diode that limits the voltage to 3.6V. Many have an LED to show when the cell has reached full voltage, so when all 4 LEDs are lit you know the battery is fully charged. |
H: How fast can a transistor switch?
An NPN transistor can be made a switch by applying some power to the base.
Is there a limit to how fast I can switch the transistor on and off, or I can switch it on and off as fast as I can turn the signal to the base on and off?
As switching, I mean completely off and completely on. Not in between (if there is even any.)
AI: The major limit to BJT switching time is related to the charge carriers and specifically how long it takes to move carriers into the base, and how long it takes to get them out.
The datasheet will include a few parameters that will give you the theoretical maximum switching frequency*. They are
Delay time (td) - how long it takes to get out of cutoff
Rise time (tr) - how long is the transition from cutoff to saturation
Fall time (tf) - how long is the transition from saturation to cutoff
Storage time (ts) - how long to get out of saturation
Using the datasheet (these parameters are usually listed), you can figure out how fast a transistor can switch between the two states.
$$ f_{max} = \frac{1}{t_d + t_r + t_f + t_s} $$
* This is what transistor can theoretically do, but there are tricks that can be done to improve the switching speed. Also, if you are switching a square wave, then in order to maintain a nice square waveform, the actual switching frequency will be much less. |
H: Is it possible to split USB 2.0 control requests?
I'm developing an application for microcontroller with onboard USB. The application is supposed to be as portable as possible, so I can't just point to one family in particular.
I'm in the process of reading a device's configuration descriptor, however, it is too long to fit in my internal buffer.
I can't use dynamic memory for this, so a buffer for control transfers needs to be statically allocated and I really want to minimize its size given that it won't be used much. So assigning it a couple Kb just for this cfg descriptor is not an option.
I haven't found it in the standard, but maybe I just haven't looked good enough... is it possible to split control requests into multiple ones? For instance, request 128 (or whatever) bytes of the cfg desc, then request another 128 bytes of the same descriptor, of course, these would have to be returned with a 128 offset to account for the ones already read, and so on.
Is this possible?
Thank you all for you time.
AI: Instead of requesting the configuration descriptor and getting all of the interface and endpoint descriptors together, you could request the descriptors one at a time. A device descriptor is 18 bytes, and the other standard descriptors are even smaller. (Class descriptors might be larger, so pick the largest one you need as the buffer size.) You'll need to parse the descriptors to figure out what else to request, but that's not much extra work. The device descriptor gives the number of configurations, config gives the number of interfaces, and interface gives the number of endpoints and the class. |
H: Two-sided connectorless USB on a PCB
This question is inspired by Connectorless USB on a PCB. I saw a cool USB LED on AliExpress that can be inserted in either direction:
I'd like to build a board with a similar symmetric connectorless USB plug, but I am pretty sure the unused side of the connector will short out against the two tabs that I see on the inside of the metal sleeve of most USB Type-A sockets:
Since the AliExpress board works, I assume that a portion of its circuit handles the case where the +5V lead on the connector touches the sleeve. I bet that responsibility lies with the two diodes I see on the board near the connector.
If these assumptions are correct, would you please draw a partial schematic that shows the relationship between the diodes and the two sides of the connector? If nobody answers, I'll use a continuity tester on one of these USB LED boards to deduce the circuit myself, and then I'll post an answer. But I am a novice with electronics design, and I'd appreciate the expertise of someone who really gets what's happening in this circuit, rather than my own blundering observations with a multimeter.
And an extra bonus question: what is the function of the two tiny angled sections on the AliExpress board's connector that are absent on almost all other male USB plugs?
Do they do anything? Are they racing stripes?
AI: A better picture, black diodes on white board.
Big Clive on youtube did a video on these very same boards about 2 years ago, including a schematic starting at 1m50s.
It is a simple diode OR circuit. The diode simply prevents the grounded VUSB pin from shorting out, via reverse protection. General idea:
Important Design Consideration: The Diodes will induce a Voltage Drop equal to their Forward Voltage. Typical Silicon Diodes have a 0.7V Vf, while a Schottky Diode or Germanium Diode will have a lower Vf of 0.2V~0.4V. Plan according to your needs.
As for the extra copper on the data lines, that looks it's just for style. Like flames on a hot rod. It makes it go faster. The same style is used on most of the black boards. |
H: LTSpice Instrumentation amplifier simulation output
I am using an LTSpice model for an instrumentation amplifier (AD8222) to learn how to simulate things in LTSpice.
My output is not what I expected. My model is based on this description: http://www.allaboutcircuits.com/textbook/semiconductors/chpt-8/the-instrumentation-amplifier/
I connected Rg (gain resistor) and set the value at 500 (varied during testing). I set V+ to 4V and V- to -4V. I set the reference voltage to GND.
For the signal input, I connected a voltage source between In- and In+ and set it as both a sine wave (1V 100Hz, or 1V DC). I set it so In- was connected to ground, and In+ was connected to the output of the voltage source.
I simulated the model and checked the input voltage (In+) and the output signal and they do not match. The output signal either outputs a square wave, OR the output is simply constant and does not change with the R_Gain.
What am I doing incorrect? I have done this with the actual physical chip on a PCB I made and it worked. I was able to input a small sine wave, and get a larger amplified signal out. I am curious about what I am doing wrong with the LTSpice model, and how I can fix it.
I tried using the LT1920 and it outputs a DC value for a similar setup as well so I don't think it's an issue with the LTSpice models. I have attached a screenshot of the circuits and simulation results.
AI: The output of the AD8222 simulation makes sense. 250Ω for R1 gives you a gain of about 200. Input signal is 1V. The output would have to be 200V, and it gets clipped near the supply rails.
Lower the input amplitude, and/or the gain, and you should see a sine wave at the output.
The output of the LT1920 simulation doesn't readily make sense to me. The gain and the input are roughly the same, so I would expect it to swing and clip like the AD8222 simulation. Hopefully someone can spot the error there.
edit: The negative input pin (In-) in the LT1920 schematic looks odd. Maybe it not connected to ground. |
H: Interfacing atxmega128a with SD Card
So I was trying to write a code to connect an SD card to my atxmega128 . Code is nearly ready but when I want to compile it in Atmel Studio, I get errors about not declaring some codes. Some of the undeclared codes are "PORTD , PORTD_DIR, ... " .
Question : Aren't these port codes part of the atmel studio software? Do I need to define some source codes for them ? What should I do to make it work ?
AI: These sort of things should be included in avr/io.h, which you should be including at some point. Check to make sure you have
#include <avr/io.h>
in the appropriate locations (top of C files and/or included header files). |
H: Limitations of MOSFET-pair Current Mirrors
simulate this circuit – Schematic created using CircuitLab
For simple MOSFET-pair current mirrors, such as the NMOS version above, are there any known disadvantages that one has to consider? The above example, for instance, does not perfectly mirror the current (I really don't know about this, as the LTSpice sim works perfectly).
I'm excluding the discussion about parameter mismatch between the MOSFET pairs (V_TO, λ, K, etc)and the condition I_REF ≤ V1/R_LOAD, but more of noise or bias or anything like that.
What I mean is does this just sorta average out as current mirroring? The same way that a Common Drain sorta averages out as having voltage gain of a little less than unity?
EDIT:
What about frequency response? Can MOSFET-pair Current Mirrors reach GHz range?
Or, Is it useless to ask? This being the simplest MOSFET-based Current Mirror?
AI: One of the reasons could be that since you have an extra load the resistance of the right side is different compared to the left side mirror. So this would cause slight deviation in the mirrored current. Or the mosfet to the right is not in saturation ! Because 100ma is a lot of current and the voltage that it would create at the gate of the left side Mosfet would be high such that Vds of rights side mosfet is small compared to Vgs (Since the same Vgs is given to the right mosfet) therby putting the right mosfet in the triode region. Checck if the mosfets are in saturation first , if they are then the deviation would be purely because of differnces in Vds from the 2 transistors. |
H: Which Switches Faster? Transistor, Solid-State Relay or Relay
Which Switching Device can Switch from Off to On and Off the fastest?
Transistor
Solid State Relay
or Mechanical Relay
AI: Transistors are used in extremely high frequency radio amplifiers and transmitters (we're talking frequencies that are many GHz). They are also used in very high speed devices such as CPUs, FPGAs, logic devices and the list of high speed devices goes on and on.
Solid state relays are quite often used to turn on and off an appliance connected to a 50 or 60 Hz power AC supply as are mechanical relays. However mechanical relays need to physically move an armature to perform a switching action.
Based on what I've said, what do you think is the fastest device. |
H: I have a circuit which draws a current of 500mA, and works at 5V. I require it to draw max of 200uA from the supply
I have a smoke detector circuit which draws a current of 500mA, and works at 5V. I require it to draw not more than 200uA from the supply. Will a simple current limiter circuit solve this problem?
also the input supply to the detector will be 18-30 V, but at these values, the LED's used will burn. So if i use a voltage regulator, will it suffice? kindly suggest what can be used/done. Im not sure if the answer is as simple as i think it could be, or if there are more complications to it!
The basic circuit is from here
but I'm using dual LED's, one blue and one IR in parallel. I'm using a microcontroller to pulse between red and blue alternatively, and simulataneously record the readings. The photodiode resistance is 10k ohm. I hope the information is sufficient. Basically the power required is to drive the led's, so I'm assuming a lesser value should be sufficient.
This is a similar concept but with a photo transistor sensor rather than a photodiode sensor.
The LED resistors are 100 ohm.
I also wanted to know, if we limit the current to this circuit to 200uA, does the remaining current get diverted/dissipated elsewhere, or does only 200uA get drawn from the supply? because I would prefer the latter.
AI: A problem here is that you are giving us part of the problem and solutions that you think or hope may work. MUCH better is to tell us what you want (completely) and we'll give you what you need. (Guitar sounds off ...).
That said:
The LED will draw decreasing current with increasing resistance.
Photodetector output will fall with decreasing LED current and will at some stage reach a level of response that is liable to be inadequate.
A better solution than using very low continuous current is to find the minim7um LED current that works acceptably and then pulse the LED occasionally and sample the resultant detector output. There will be issues with response times but an arrangement should be possible which allows the desired current reduction.
It is not obvious where you get the 500 mA current figure from, or why. If you use 100 Ohm resistors and 30V supply, as you suggest. then current will be about i = V/R ~= 30/100 = 300 mA BUT there is absolutely no need to run the LED at that current. By limiting LED current to say 10 mA, at 18V you will need R = V/I = (18-V_LED)/I ~= 1600 Ohms. This will draw about 28 mA at 30V. Actual LED current can be adjusted to suit.
If LED current was say 10 mA when on the running it at a 1:50 on:off cycle would yield 200 uA mean.
The photodiode current will be low as it is reverse biased but you will have to ensure that diode V_max_applied does not exceed its specifications. |
H: How to compensate for weather changes in barometric pressure sensor (BMP180)?
I am using BMP180 barometric pressure sensor on an elevator for extended periods (months together), below is the guidance from Sparkfun.
Sparkfun guidance: “You should also remember that pressure changes due to weather will affect your altitude readings. The best accuracy will be obtained if you take a “fresh” p0 (baseline/reference pressure) when you need it and don’t rely on it to be accurate for extended periods due to changes in the weather”
How can I obtain a fresh p0 (baseline/reference pressure) when the elevator is continuously moving ?
AI: Two options:
Detect ground-floor and perform a reset on each arrival.
Install a second unit on a specific floor and update the reference pressure in the elevator micro - perhaps by wireless connection.
And ...
Try to compensate in software. If you can detect the difference between the rapid changes of pressure due to elevator motion and those due to atmospheric variation, you could adjust accordingly when the elevator stops (but see caution notes).
If there is reasonably frequent travel to upper and lower limits, you could recalibrate then. i.e.,
if (p > pmax) { // p is pressure reading.
pmax = p; // Must be at top floor.
pmin = p - bottom_to_top; // bottom_to_top is the pressure span
}
if (p < pmin) {
pmin = p; // Must be at bottom floor.
pmax = p + bottom_to_top;
}
You would have to manage power-up if the micro doesn't have non-volatile memory.
Caution
If this is an office building with air conditioning, you may have trouble with varying pressures on different floors. This may be high enough to 'swamp' the readings between floors. One way of avoiding this may be to read only when the elevator doors are closed and monitor lift-shaft pressure but this may vary also due to compression of the air during descent and vice versa. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.