text
stringlengths 83
79.5k
|
|---|
H: High resistance voltage divider
I am trying to create simple variable voltage divider circuit, with several constraints that are causing me to look for alternative solution.
Constraints:
The input voltage is 1.5 V
Maximum R1 is 5 M\$\Omega\$
Minimum R1 above 5 k\$\Omega\$
\$V_{out}(V_{R1})\$ is 0.1 mV upto 500 mV
The R1 max and min window is too small to allow for a 0.1 mV to 500 mV output.
My attempt and why I think this will not work:
To satisfy 5 k\$\Omega\$ or above resistance at output of 0.1 mV I used the equation
as below:
$$0.1mV = \frac{1.5 \times 5k}{5k + R2}$$
$$R2 = 75 M\Omega$$
$$\text{This value gives me the value of R2 and hence }R_{total}$$
To find if 75 M\$\Omega\$ total will satisfy the 5 M\$\Omega\$ max at 0.5 V I
continue from above:
$$0.5V = \frac{1.5 \times R1}{75M}$$
$$R1 = 25 M\Omega$$
$$\text{This value is way above the 5 }M\Omega \text{ limit}$$
It is clear that I can not satisfy the constraints with a voltage divider. My question is are there other solutions that may help me solve this issue?
Some background on why the constraints are there:
These constraints are due to available material and circuit requirements, i.e 5 M\$\Omega\$ limit on R1 is simply because I can't find a trim pot at any larger values. And the minimum R1 is because this circuit is simulating a electrochemical sensor that has an impedance above that value. If the voltage source has less of an impedance, the analyzer circuit will reject the source. Also the reason for using 1.5 V is because the analyzer uses 1.2 V detection signals.
AI: A rather convoluted question, but I think what you need is an adjustable voltage source with a minimum output impedance of 5k.
In that case, why don't you design your voltage divider to give you the correct output voltage and then buffer it like so:
|
H: NXP PCA82C250 CAN controller interface
What is the function of the \$V_{ref}\$ pin for the PCA82C250 CAN controller?
A complete datasheet is available.
AI: According to Fig 9 of that datasheet, it is for connecting to CAN controllers like P8xC592/P8xCE598 which have a CRX1 pin, which is for a differential receiver in the CAN controller, to compare against the RXD pin which connects to CRX0. So it is provided for convenience so that you don't have to implement a buffered half rail level to this sort of CAN controller. If your CAN controller sees RXD as a logic level using a single pin input, you don't need to connect Vref to anything.
|
H: Differences in full wave rectifiers
I have looked up a few things regarding rectifiers but there is still something that bothers me:
If we put aside half-wave rectifiers or things like tripler and stuff, there is apparently two kinds of full wave rectifiers: the Full Wave Center Tapped Rectifier and the Full Wave Bridge Rectifier.
Full wave center tapped rectifier:
Full wave bridge rectifier:
Main thing between these two is that the second one uses more diodes (hence twice the voltage drop) but the other needs a center tapped transformer. This kinds of sums up (very roughly I agree) what I have read for the pros and cons of these two.
However my question is about something different, this kind of rectifier:
AC output on the left and DC output over the R1 load. (Please don't mind the different values given here).
So where I need help understanding is why I can't find anything about this "sort" of rectifier. Am I looking wrong or is there some king of problem with it that I have not cornered? Because if I am correct (and am surely not I think), this would combine the advantages of the two previously quoted rectifiers i.e. no center tap and a single diode voltage drop.
This should also act as a voltage doubler which maybe puts it in a different category...
Anyway there are things that I can't really explain to myself about that so I'm really looking for some clarifications from anybody.
AI: Personally I wouldn't consider your final circuit to be a full wave rectifier at all. It's two half wave rectifiers the first charges C1 during the positive half cycle and the second charges C2 during the negative half cycle.
This circuit does indeed double the voltage and a slight variant of it used to be common in consumer electronics. As shown below.
simulate this circuit – Schematic created using CircuitLab
With SW1 open the output is close to the peak of the AC input voltage and all 4 diodes provide full-wave rectification. R1 and R2 are needed to ensure that C1 and C2 share the voltage equally.
If Sw1 is closed then D3 and D4 do not conduct and R1 and R2 are not doing necessary but the output voltage roughly twice the input AC.
Bearing in mind that European mains voltages are typically 220V or 230Vrms while in the US its 120Vrms. This circuit provided an easy way to make devices work anywhere in the world just by configuring SW1 to be open or closed as appropriate for the country it was going to be used in.
It's less common now as for low power devices it's relatively easy to design a wide range input fly-back converter and for higher power units devices typically need some form of power factor circuitry. I'm sure it still does get used occasionally though.
|
H: FIR filter output result Interpretation While input is taken from ADC161S626: 16 bit
I have implemented a 20 order FIR Low pass filter, 1000 HZ cutoff frequency on Sparten - 6 FPGA. First I calculate the coefficients in Matlab, Then I directly put them in vhdl code. Here are my coefficients.
H(0) <= to_signed(26,16); --10000HZ cutoff
H(1) <= to_signed(67,16);
H(2) <= to_signed(169,16);
H(3) <= to_signed(369,16);
H(4) <= to_signed(686,16);
H(5) <= to_signed(1111,16);
H(6) <= to_signed(1606,16);
H(7) <= to_signed(2108,16);
H(8) <= to_signed(2542,16);
H(9) <= to_signed(2836,16);
H(10) <= to_signed(2940,16);
H(11) <= to_signed(2836,16);
H(12) <= to_signed(2542,16);
H(13) <= to_signed(2108,16);
H(14) <= to_signed(1606,16);
H(15) <= to_signed(1111,16);
H(16) <= to_signed(686,16);
H(17) <= to_signed(369,16);
H(18) <= to_signed(169,16);
H(19) <= to_signed(67,16);
H(20) <= to_signed(26,16);
Now Actually I am taking an torque feedback Input from some sensor, The torque is converted in voltage. The voltage is digitize into 16 bit format.The filtered value, output of the filter is in 32 bit format.
Here is the snapshot of Teraterm. How do I convert the these values to voltages ? enter image description here
Thanks.
Edited:
On Page number 16 of this document they have given the conversions:
Now They have discussed about +IN, -IN, Vref. I would like to give my voltages here which I can measure on the adc pins using a multimeter:
Now ADC datasheet part:
Now the Digitized displayed values:
All of the above three image are recent. so How to relate the voltages at pins and the digitized value of voltage on the MISO pin, which I displayed on real term.
finally how to understand that what value of filter output represent what voltage ?
What is the effect of applying FIR filter here ?
Did it do something good or not ?..
In matlab simulations It definitely does some good & removes the peaks, but I am not able to understand in the implementation.
Thanks
please someone.
AI: Defining Vin as (+IN) - (-IN).
This is a Bi-Polar ADC with the output in 2's Complement Format. In 2's complement the MSB is considered to be negative, specifically a value of -32768 for a 16bit number. This gives a range of 0 to 32767d for positive inputs and 65535d to 32768d for negative inputs. Or in binary 0 to 0111111111111111 for 0 to positive fullscale and 1111111111111111 to 1000000000000000 for -1LSB to negative fullscale.
The gain from your ADC voltage (Vin) to data output is:
D = Vin/Vref * 2^(n-1) for positive Vin
D = (Vref+Vin)/Vref * 2^(n-1) + 2^(n-1) for negative Vin
So in your case (assuming a positive Vin) D = Vin/2.96 * 2^(15) so for Vin=1V D = 1/2.96 * 2^15 = 11070d and any ADC value >= 32768 is negative (i.e. -IN > +IN)
When you apply this to the FIR filter there is a gain factor associated with the filter taps. Remember the transfer function is: sum(x*h) where x is the input data sequence and h is the coefficient sequence so the DC gain is sum(h). For your example that's 25980d (by my calculation).
So applying 1V to the ADC (differentially) gives 11070d at ADC output and 11070 * 25980 = 287598600 at the output of the FIR.
Or working backwards:
Vin = FIR_output/25980 * 2^(-15) * 2.96
e.g. for FIR_output = 413365728
Vin = 413365728/25980 * 2^(-15) * 2.96 = 1.437V
|
H: How are multi LED flashlights wired to control current w/o resistors or regulator?
I have several cylindrical LED flashlights that have a large number of LEDs in them (the one I'm looking at has 9, which I think is typical.)
They take 3 AAA batteries, wired in series, to give around 4.5 volts (More, on fresh alkaline batteries, but voltage probably drops to 4.5 or less under load)
I've had a couple fail and taken them apart. I don't see any current limiting resistors or any components. The little PC board the LEDs are wired into is crowded so it's hard to tell what's going on, but I think they are wired in series.
I gather that if you wire your LEDs in series and can get the total voltage drop across your LEDs to equal the supply voltage you can omit a current limiting resistor? But I don't see how you get a drop of exactly 4.5 volts out of 9 LEDs. With LEDs with a 1.2 volt drop, 5 LEDS would equal 6 volts, so that would work.
Actually, I just looked at the PC board and the LEDs appear to be wired in parallel. Are there ultra-bright LEDs that you can drive directly off of 4.5 volts without a current limiting resistor? Or are there special purpose ultra bright white LEDs made for 4.5 volt supply that have internal current limiting resistors?
Follow-up question: Does anybody know if the 12 volt LED bulbs that are in landscape lights have a voltage regulator in them? I'm interested in using them as room lights for a photography setup, where I can quench the lights as the camera shutter opens. If they are simply LEDs and resistors, the'll quench well within the approx. 50 MS before the camera shutter opens. If there's a regulator in the system, they probably won't.
EDIT: I looked more closely at the PCB, and it's wired with all the LEDs in parallel. The flashlights that have failed have had a failure in the switch/wiring, not in the PCB assembly. The one I photographed got messed up by leaking alkaline batteries. I was able to clean it off and repurpose it as a subject light for my photography. It's "grotty" appearance is the residue of the battery electrolyte paste, and the wires are wires I soldered on in order to power it directly from a trio of AA batteries. (The original flashlight uses 3 AAA cells wired in series.
Here is the back of the PCB, showing the traces:
And here is the front, showing the LED lenses:
There is nothing else to the flashlight aside from the metal barrel, the battery holder, and a switch. I guess it's possible there is a current limiting resistor in the battery holder that I missed, but I doubt it. Plus I've driven the LED assembly for 15 minutes or more from 3 AA batteries, so if it was going to heat up and fry, I would think it it would have happened already. My guess is that these are ultra bright white LEDs that have a 4.5 forward voltage drop. Is there such a thing as LED packages with built-in current limiters?
AI: Background:
I have designed a number of LED lighting products which are manufactured in China.
I have several cylindrical LED flashlights that have a large number of LEDs in them
... Are there ultra-bright LEDs that you can drive directly off of 4.5 volts without a current limiting resistor? Or are there special purpose ultra bright white LEDs made for 4.5 volt supply that have internal current limiting resistors?
No and no, unfortunately.
Many LED lights are constructed as you describe, with multiple white LEDs wired in parallel and connected essentially directly across the battery.
They are junk.
They are not "designed".
They build them this way "because they can" and they work well enough to be able to sell them.
When supplied with 4.5V + the LEDs are driven well above their maximum design rating and their lifetimes are greatly shortened. The LEDs used are typically low lifetime low cost devices.
Follow-up question: Does anybody know if the 12 volt LED bulbs that are in landscape lights have a voltage regulator in them?
The 12 volt LED strips usually use 3 LED die in series plus a series resistor.
Turn on / turn off time is liable to be sub `1 microsecond if capacitors are not used downstream of the switch.
Current is set to be "about right" at 12 Volts so will vary substantially if used in an automotive context where several volts of variation occurs. Many strips use individual LEDs but some use 3 die per package LEDs with all 3 independent die wired in series. It is possible but not certain that strips with individual LEDs will run somewhat cooler due to a lower concentration of Energy per package.
Lifetime of these LEDs may be better as the series resistor means that they are somewhat more properly driven. I have seen very substantial variations in output of similarly appearing strips. The brightness bears no obvious relationship to LED specifications and a brighter strip may simply reflect a manufacturers 'marketing decision'. You can get a range of LEDs per metre but current drain and number of LEDs are not directly related.
White LEDs are typically have a voltage drop in the 3.0 - 3.5V range at rated current.
Current increase tends to be exponential with voltage and at 4.5V almost any LED would self destruct almost instantly. The "saving grace" (if it can be called that) is that the combination of small batteries and many LEDs means that the batteries are unable to produce more than 'vastly too much' current when the batteries are new. Any light constructed in this manner demonstrates a total lack of concern and/or knowledge by the manufacturer.
Adding even a single common series resistor makes a substantial improvement in voltage/current profile and a resistor per LED would greatly assist current balancing between LEDs.
Added May 2016
Harper commented:
OP is asking about LED bulbs, not strips. Those are commonly made as screw-in replacements for incandescents. Some have a resistor, but many have a switching buck converter which will accept a range of voltages from 12-30V or higher. The LED series voltage is quite close to 12V actual, so if voltage drops much below 12V the buck converter will go to 100% duty cycle and simply pass the voltage through, causing the LEDs to dim rapidly.
My answer addressed LED strips as I noted, which the OP did not ask about, as Harper noted :-).
Harper's comments above are correct where applicable. I have not seen a bulb with a buck converter internally, but no doubt they exist. White LEDs have Vf typically in the range 2.8V - 3.5V. 2.8V is unusual and usually only seen in reasonably modern LEDs or ones operated well under full power. At 12V nominal, 4 LEDs have 12/4 = 3V each available. Allowing a small voltage drop in connectors and wiring 4 LEDs with Vf of 2.8V to 2.9V would be able to be operated at full power. In real world situations with Vin able to be somewhat below to substantially above 12V, 4 LEDs in series will often work but 3 x LEDs in series plus a series resistor is 'safer'. Bulbs may not match strips in configuration, but all 12V LED strips that I have seen use 3 LEDs in series plus a resistor.
|
H: Headphone output: DC Bias?
I have 4 PMR446 radios ("walkie-talkies"). They work great, but when using an earpiece, every-time the internal audio amplifier fires up/down, you hear a huge THUMP noise. Connecting to a computer speaker, I see the speaker move out when firing up, and in when firing down. I can only assume that there is a DC bias in the audio signal that the people at Binatone (make of radios) haven't filtered out.
Is it possible to just filter out the DC component using a capacitor in series? If so, what one do I use? Since it's a radio, I'm not fussed on low frequencies.
AI: simulate this circuit – Schematic created using CircuitLab
I don't think horta's answer will help. From the description, this happens every time the radio starts receiving rather than just when the radio is turned on.
DC IS what you want to get rid of. A capacitor has a high resistance to low frequencies, and a coil (the speaker) has a low resistance to low frequencies.
When the amp kicks in, you get a "step" in DC voltage from zero to something less than the battery voltage of the radio. You need to block the DC. The coil itself has a high resistance to the higher frequency components of the step - that's why it is a "thump" instead of a sharper "click."
A capacitor in series with your speaker should minimize the "thump."
I would try at least 20uF. You'll need an electrolytic capacitor, so check which way the speaker output is polarized and measure how high the DC Voltage is. You'll need to observe the polarity when connecting the capacitor, and you'll need to get a capacitor rated for more DC voltage than you measure.
If you simulate the diagram, you will find that it reduces the "thump" to just a few millivolts.
I've added a simulation of an audio signal feeding the LC circuit in the diagramm. The audio is 3 dB down at 300Hz, which is where I was shooting for. There's a 40dB hump at 500Hz which I didn't expect. Less than 20uF would push the hump up higher as well as the cutoff. You'll probably want to go higher than 20uF.
|
H: Displaying a custom character on 2x16 LCD
I have written a working LCD driver for a NHD‐0212WH‐ATGH‐JT and I would like to add the possibility to create your own custom characters.
Through some research I understood that I need to write a byte for each row in the CGRAM in specific positions and then point to that position when trying to write a character.
I did the following but it doesn't seem to be working:
The array of char for the bytes to write to CGRAM were obtained with online tools such as HD44780 LCD User-Defined Graphics. The functions and commands don't seem to be the problem as I write every other ASCII characters just fine.
char myCustomCharacter[8] = {0x0,0x1,0x3,0x16,0x1c,0x8,0x0};
void createCharacter(unsigned char location, unsigned char[] bytes){
writeCommand(0x40+(location*8));
writeData(bytes[0]);
writeData(bytes[1]);
writeData(bytes[2]);
writeData(bytes[3]);
writeData(bytes[4]);
writeData(bytes[5]);
writeData(bytes[6]);
writeData(bytes[7]);
}
Then in some test main:
int main(void){
initLCD();
createCharacter(1, myCustomCharacter);
setCursor(0, 0);
writeCharacter('A'); //This work just fine, the A is displayed as expected
writeCharacter(0x08); //Doesn't work, I don't see the character I stored in the CGRAM at the 1st position. Any standard ASCII character still works just fine.
}
How do I access the custom character as if it was just another ASCII character and how do I know I have correctly written the byte into the CGRAM?
AI: The following line adds a custom character to a CGRAM location 1.
createCharacter(1, myCustomCharacter);
The problem with your code was that you told the controller to write a custom character stored at location 8. The writing code should instead look like this.
writeCharacter(0x01)
|
H: Is a DVD sensor a photodiode or an array of them?
Is a DVD sensor just a photodiode or an array of them?
I need to know if it is a CMOS with an array of them or just a single sensor.
AI: The signal is picked up with a high-speed photodiode array of several sensors to allow the tracking circuitry and focusing to work. Using closed-loop control allows the mechanical parts to have relatively loose tolerances compared to even an LP record turntable. As one Japanese Engineer said you could make the player chassis out of chopsticks and it would still work.
Here's the sensor array used in a Sony pickup:
|
H: Electric motor will only start turning at lower voltages
I have a tiny DC motor directly connected to this power supply. The motor starts just fine when the supply is set to 4.5V. I can then change the voltage to 6V and it continues to run just fine. However, if I try to start the motor at 6V it only runs in pulses (for about 100 milliseconds once every second). Also, if the motor is running at 6V and I apply significant load, it begins pulsing until I lower the voltage. I'm guessing both cases are explained by the larger current required to start the motor at a higher voltage, and to keep it running under load.
I have a few questions:
What is actually happening to cause the pulses? Is my power supply overloading then "resetting" once every second?
Is there something very simple I can add into the circuit to allow it to start at higher voltages (a momentary current spike)?
Is there something very simple I can add into the circuit, perhaps a better power supply, to allow it to run under sustained load (a constant current increase)?
AI: I'll turn our comments into an answer.
What is actually happening to cause the pulses? Is my power supply overloading then "resetting" once every second?
It's likely that the motor is tripping the current protection circuitry on the power supply when it's starting up. Then the power supply resets and all starts again generating the pulsing effect.
2.Is there something very simple I can add into the circuit to allow it to start at higher voltages (a momentary current spike)?
3.Is there something very simple I can add into the circuit, perhaps a better power supply, to allow it to run under sustained load (a constant current increase)?
In his comments, WhatRoughBeast suggests you get a bigger power supply.
I've expecienced that once and what I did to work around it was to replace the wall-wart by an equivalent set of AA bateries. They usually let you draw a few amps at start up without any limiting circuitry to get in the way. In your case, 4 AAs in an appropriate battery holder will do the trick.
|
H: How can I increase the range of an infrared emitter?
I'm currently using this set of infrared emitters and detectors. It appears that I only get about 10 cm of signal before the detector doesn't pick it up. It's on +5v power with a 10k pull-down resistor connected to ground. Without the resistor, the emitter burns up. With a 150 ohm resistor (I calculated this to be around the minimum resistor), there does not appear to be a change in distance. Is there any way to increase the range without damaging the emitter?
AI: Micromice use reflected light to measure distance. Is that your application?
The same technique works for object detection, after all robot mice must not bump into things :-)
According to the spec of the devices you reference, the emitter spec is:
Continous forward current: 50mA
Power Dissipation 75mW
Peak Forward Current (300pps, 10us pulse): 1A
So, pulse the emitter at near 1A to enable sensing from further away. If you have a microcontroller, that is easy to arrange. Others are better qualified to offer the pure electronic solution.
One microcontroller approach uses a capacitor, sized to deliver 1A for a couple of times more than 10us, and a bipolar or FET transistor to switch power through the emitter.
Searching for "micromouse pulsed emitters" will turn up several places with all the details you might need.
Light intensity is proportional to 1/Distance^2
So the intensity will need to be 4x bigger to double the distance.
Assuming the device is linear, the difference between 50mA and 1A is a factor of 20. Sqrt(20) is about 4.5x, which is quite a big improvement, well into your hoped-for distance.
Edit:
The emitter signal is modulated so that stray light can be detected and ignored. The Sun, is a very large source of IR, and can easily confuse or 'blind' the detector.
A simple technique to use the modulation is: measure the detector value with the emitter off, measure the detector value with the emitter on, then subtract the first from the second. If the answer is close to zero, then either the light beam is blocked or it is being blinded and can't detect a crossing object. For a "burglar alarm", that might be enough to trigger it.
A much better approach:
Having said all of that, IMHO a much better approach, which could be implemented without an MCU but it might be complex, and which would give more than 12 feet (4 metres) is to use an IR remote control sensor as the receiver.
They are mass produced by companies, for about $1-$2 e.g. Farnell's IR Receivers, Digikey's IR Receivers RS IR Receivers Sparkfun IR receivers
I have controlled TVs from more than 30 feet away with a single emitter, using a TV-be-gone. So the receiver works extremely well.
However, this is off-topic.
|
H: Simple circuit for fading an LED out (no MCU)
What is the simplest circuit you can create which fades an LED in from off to bright, without using any sort of processor or MCU? Would an inductor be of any use here?
AI: Would an inductor be of any use here?
Yes! Just as a capacitor resists changes in voltage, an inductor resists changes in current. Since brightness is a function of current, if you change current slowly, you change brightness slowly. You could do this:
simulate this circuit – Schematic created using CircuitLab
Here R1 is just the usual current-limiting resistor, calculated just as usual. D2 is necessary so that when SW1 is opened, there is still a path for current to flow, so the LED can fade out.
Now, the defining function of an ideal inductor is:
$$ v(t) = L \frac{\mathrm di}{\mathrm dt} $$
In English, the voltage across the inductor is equal to the rate of change of current (in amperes per second) times the inductance (in henrys).
Now, say we wanted the LED to transition from on to off (or off to on) over the span of something like 1 second. We could solve that differential equation, but it's a bit of a pain because as the current through L1 increases, so does the current through R1. By Ohm's law, this means the voltage across R1 also increases, and since the voltage across D1, R1, and L1 in total must be 9V, more voltage across R1 means less voltage across L1.
Fortunately, just as with resistor-capacitor circuits, resistor-inductor circuits have a time constant. This is the time it takes the current to reach 63% of its final value (which is set by R1, which you probably picked to make the final current under 20 mA, according to your LED's specifications).
The time constant is simply the inductance times the resistance. At the expense of some accuracy, we are going to ignore the diode to simplify things. So let's say we want the LED to take something around 1s to transition. That means we need something on the order of:
$$ L_1 \cdot R_1 = 1\:\mathrm s $$
So if we want 15mA in our LED, R1 must be (again, approximations ignoring D1) on the order of \$ 9\:\mathrm V / 0.015\:\mathrm A = 600\:\Omega \$. Round up to the next standard value: 680Ω. So:
$$ L_1 \cdot 680\:\Omega = 1\:\mathrm s \\
L_1 = 1.47\:\mathrm{mH} $$
This is entirely feasible, but a good engineer knows that an inductor with that inductance, that won't saturate at 15mA of current, is big and expensive. Inductors are just generally a pain in the ass. It's neat that this circuit is simple entirely passive components, but even if we incorporate some active components, the end result will probably be cheaper if it means we can use capacitors instead.
Introducing: the gyrator. This is a neat concept that can do a lot of things, but a very common application and implementation is the simulated inductor. It takes a capacitor and makes it look like an inductor, like so:
We already calculated that we want \$R_L = 680\:\Omega\$ and \$L=1.47\:\mathrm{mH}\$, so we can solve for \$RC\$:
$$ 1.47\:\mathrm{mH} = (680\:\Omega) RC \\
RC = 2.16 \cdot 10^{-6} $$
We can pick any resistor and any capacitor such that their time constant is \$ 2.16 \cdot 10^{-6} \$. That gives us a lot of flexibility. It also means we don't even need a big electrolytic capacitor. We can use a cheap ceramic capacitor.
Let's just say, because we have a lot of them in our parts drawer, that we want \$ R = 10\:\Omega \$. Then:
$$ (10\:\Omega)C = 2.16 \cdot 10^{-6} \\
C = 216\:\mathrm{nF} $$
Let's round that to the nearest standard value of 220nF. So, the final circuit looks like this:
simulate this circuit
If you have an ideal op-amp, this circuit will function just the same as the inductor version above. The biggest problem you will have with a real op-amp is that their outputs can't go all the way to the supply rails. So, pick a rail-to-rail variety that can get at least close enough to the positive rail to turn the LED off. If it makes your op-amp selection easier, you can also move the LED to be on the output of the op-amp, then the op-amp has to get close to the negative rail to turn off the LED.
Really, this isn't an ideal solution, but hopefully it is at least educational. You can of course accomplish something like this simulated inductor with just about anything with gain, like a single BJT. In fact doing so may have some advantages: it may be simpler, and you may not run into the rail-to-rail issue. This circuit does give some insight into how an active device can make a capacitor look like an inductor through feedback. In fact, if you examine some of the other BJT solutions in other answers, they may have feedback configurations that are similar.
|
H: What are these metal plates covering parts of PCBs called?
I am trying to fix my wireless router, but one of the parts is under a metal plate.
What are these metal plates called?
This is what it looks like when it is removed: (The gold coloured plating on the bottom left, next to the grey antenna wire is where it is attached.)
How would I go about removing them?
AI: That is a shield and is used for many purposes. It can be to protect a sensitive area from EMI/RFI, or it can be to protect the rest of the board from EMI/RFI generated in that area or to help pass emissions testing.
If it is soldered down it can be problematic to remove as the large area acts as a heat sink preventing the solder form reflowing. Using a low temp heat removal system (using bismuth based solder) would work.
NOTE: this is not a "shield" as per Arduino usage - which is why the Arduino usage is a poor selection of terminology.
|
H: Soldering CPUs/GPUs/FPGAs - temperature issue
I am thinking about making my own FPGA board and soldering using reflow. The tutorials I've read all say the process requires temperatures in excess of 220 °F. However, at least according to this datasheet, FPGAs have "max operating temperatures" below 200 °F. How does one then solder an FPGA?
EDIT: I have a new question in response to the answer given. Why would the max operating temperature differ from the max soldering temperature?
AI: Soldering temperatures are normally in excess of 200°C (400°F).
The soldering guidelines for Xilinx Pb-free packages are here. Usually lead-free soldering requires somewhat higher temperatures than eutectic Sn63-Pb37 solder.
It's not a problem to have brief exposure to soldering temperature of 220°C or even higher.
Edit:
The max operating junction temperature is the maximum temperature of the IC die with voltage applied (typically 125°C for an FPGA). High current densities on a chip combined with high temperatures eventually can cause failure due to metal migration.
The outside would have to be much cooler than that. The maximum storage temperature is the long-term maximum temperature with no voltage applied (typically 150°C for an FPGA). High continuous temperatures can degrade the package or cause impurities to diffuse in the chip.
Soldering is a short-term one-time (or occasional, at most) exposure (measured in seconds), so the damage caused, for example, by diffusion of impurities, is limited.
|
H: reason for degradation of photovoltaics
Photovoltaic panels can have 20 or 25 year underwritten warranties with a guaranteed remaining efficiency of 80 % of the new panel. That means, that photovoltaic panels seem to degrade somehow.
Why do they degrade? What exactly is reducing their efficiency?
How can this process of degrading be slowed down? E.g. if you don’t need your PV panels, is it possible to conserve them by covering them with a black, opaque coverage like tarp? If not, what else?
AI: Degradation of PV cells has been studied for some time. The dominant factor in such degradation seems to be UV exposure. This seems to occur on two fronts.
1) Encapsulant. The PV cells themselves are contained in a layer of encapsulant, usually EVA (ethyl vinyl acetate), which undergoes slow changes when exposed to UV. First, it can change from transparent to brown, cutting down on light reaching the cells. Second, it can release acetic acid, which corrodes connections. Third, it becomes less elastic and lets water vapor into the cells, which also causes corrosion.
2) Cell structure - PV cells are actually great big diodes, and depend on a fairly precise profile of dopants in the silicon. UV seems to have enough energy to cause slow, small diffusion of the dopants away from their desired concentration profiles, reducing the efficiency of the cells.
To a lesser extent, thermal cycling also causes fatigue in electrical joints, which behaves much like overt corrosion, and also works in tandem with the encapsulant changes listed above.
As to prolonging PV lifetime, protecting them from UV and temperature cycles seem the best measures. Since this means keeping them out of the sunlight, it's clear that this has limited usefulness for working systems.
The encapsulant problem can be reduced by using panels which employ silicone rather than EVA. Unfortunately, silicone is more expensive than EVA.
|
H: 3 LEDs / 1 POT - fade each LED in turn as POT is changed in value ?
I'm looking for a simple (hopefully !) circuit which would allow a variable resistor to control the brightness of three different coloured LED's. As the variable resesistance is changed in value first one, then the second, then third LED would fade out in brightness.
It doesn't matter if there's a bit of crossover so that LED2 starts fading before LED1 is completely out.
I thought at first this was simply a case of wiring the LEDs in parallel at a point after the power had been through the variable resistor but I read that wiring up LED's in parallel had difficulties so I thought I would ask.
AI: A differential pair something like the following could cross-fade two LEDs:
simulate this circuit – Schematic created using CircuitLab
This is because the emitters are connected so if you turn Q1 on, Q2 will turn off (because the Q2 Vbe will drop because the voltage at the emitter of Q2 will go up).
So you position the pot at ground and then adjust the R3 R4 bias until the D1 LED gives the desired brightness. Then as you turn up the pot they should cross fade I think. But this circuit is just a back of a napkin scribble. I would simulate it first. Then you might take what you learn to figure out how to control 3 LEDs somehow. Then build.
|
H: Custom device with multiple gates tied together in Eagle
I'm trying to create a transistor array device in a small library I'm working on in Eagle. The device has five P-Channel MOSFETs. The source of each MOSFET is internally tied together and connected to pins 1 and 12 of the SIP package.
For clarification, the datasheet is here: http://www.sanken-ele.co.jp/en/prod/semicon/pdf/sla5086e.pdf
I have created a standard P-Channel MOSFET symbol in my library, and I've created an appropriate package (SIP-12 with pads and drill holes, etc). However, I can't connect these to create a "device".
I'm sure I could change my symbol to be a boring rectangle with 12 pins, but I'd like to be able to place the MOSFETs individually on my schematic like logic gates from a gate array package. The problem is that there doesn't appear to be any way to connect all of the source pins together in the "device" editor after I've placed all 5 parts in the symbol area (so it won't let me use my package because there "aren't enough pads"), and, even if I could, there doesn't seem to be a way to connect a pin from the symbol to multiple pads on the package (ie, a source pin to both pads 1 and 12).
Am I missing something, or am I going to have to create a boring rectangle symbol with 12 pins for my FET array?
AI: Am I missing something, or am I going to have to create a boring rectangle symbol with 12 pins for my FET array?
No, as far as I can tell, you are not missing anything. I asked myself the same question a while ago and went through the Eagle manual, which states:
It is not possible to connect several pins with a common pad!
A Device may contain more pads than pins, but not the other way
around!
(Manual Version 6 - 1st Edition - Page 243)
From eagles perspective it does not make a difference if there are several symbols involved or not, since the "Connect" dialog just lists all pins and pads anyway. I don't know if this was improved in Eagle 7.
|
H: fourier transform for non-stationary signal
I have read that for non-stationary signal we break the signal into smaller segments by applying a window function . My question is how this can help to make the signal has a fixed features or to became stationary signal even it's not?
AI: The discrete Fourier transform works on the assumption that your signal is periodic.
So, say we start with this arbitrary time-domain signal:
If it's periodic, we should be able to repeat it:
Well I guess that works, but we've introduced a discontinuity. This is like adding a square wave to your signal: you are going to see a new frequency component emerge equal to the DFT period, plus all of its odd harmonics.
In other words, the DFT sees any discontinuities even if they are at the ends of the signal. In fact, since the signal is periodic, it doesn't matter if we rotate all the inputs. If we do that with our original, we end up with:
This is exactly the same input as the first, as far as the DFT is concerned.
A window function works by tapering the ends to some similar value (usually 0) gradually, thereby making them equal. But it does so gradually, so that a minimum of extra frequency components are introduced. If we apply a window function to our original signal, you get something like this:
Which when duplicated, gives you:
or rotated:
No discontinuities! Now our non-periodic signal looks like a periodic signal, and we made it so while introducing a minimum of frequency-domain distortion. Of course, different window functions define "minimum distortion" in different ways, according to what you are trying to accomplish with the transform.
|
H: How to connect IR sensor ( Infrared detector/receiver )?
Would you give me a hand ?
I have an IR sensor with 3 pins. It looks like the one in the picture, and I did not find any datasheet for it on the internet. actually, I have 3 questions :
1- I want to identify its pins ? (Where can I put the positive, ground ...etc. ?)
2- How to connect it with a visible LED so that when the IR sensor receive IR Rays, the LED lights up ?
3- Should I transmit IR Rays with a specific frequency ? or just connect IR LED to the power only ?
AI: I have an IR receiver that looks like yours. The one I have is equivalent to this TSOP38238 from Adafruit::
This IR detector demodulates a modulated IR at 38kHz and provides a digital decoded signal at the output.
Assuming it's the same one; here's the pinout:
The DATASHEET is available here (TSOP38238).
Head over to Adafruit for all the details including how to connect to a visible LED:
|
H: How do I hook up an LED across the tx pin on my Atmega328?
I've built a standalone Arduino and upload sketches via this method From Arduino to a Microcontroller on a Breadboard. I would like to hook up an LED across TX like on the Arduino board, so I simply wired it to the TX pin with a resistor going to ground. And it works on a sketch where I am simply sending serial data at a 9200 baudrate. Both the Arduino TX and my ATmega TX LEDs blink correctly.
However, my application involves a baudrate of 19200, but when I upload this sketch, the TX pin on my ATmega stays on constantly, even if no serial data is being sent. What's even more interesting is that the Arduino TX led does blink correctly for the same sketch. Can anyone help?
AI: Caveat: Even though the OP accepted my answer as the best one, another, better answer was posted after that, that you may want to read before reading mine. As noted by Chetan Bhargava, my solution may draw too much current to drive the LEDs from the serial lines.
Below is part of the schematic of a RS232-to-UART converter that I've made. In it, I connected LEDs (and their respective series limiting resistors) from the RX and TX lines to the Vcc line, just the way you could connect yours. Wire the anodes to Vcc and the cathodes to the TX/RX lines, with the current limiting resistor in series (either before or after the LED).
The LEDs must be connected to Vcc and not to ground because UART lines (i.e, the ATmega serial interface) are idle HIGH, i.e., they stay at Vcc levels when nothing is transmitted.
Note what gbulmer said in his comments, though:
... you might find at high baudrates, or long cables (or other things with reduced drive signals) that the communications start to become unreliable because the LEDs put an extra load on the connection. You might want to consider driving the LEDs indirectly with a MOSFET or darlington transistor.
I have had no problems with those LEDs attached to the serial lines up to 78600 bauds, but you might if you go faster.
If you were interested in connecting indicator LEDs as feedback in your ISP programmer, you could do the following. The ArduinoISP sketch (firmware) already drives three indicator LEDs:
Heartbeat on D9: it blinks (fadding) to show that the sketch is working properly;
Programming on D7: it's on when the actual programming is taking place;
Error on D8: on when something goes wrong.
These indicators work perfectly with the ArduinoISP sketch.
To wire these LEDs, use the schematic below:
The schematic is for an Arduino Shield that I've made for programming ATmegas and ATtinies, for use with the ArduinoISP sketch.
I hope this helps.
If you really want to attach LEDs to the transmitting lines, please answer the questions I posted as comments, then I'll update my answer.
|
H: USB interface with STM32
I'm experimenting with native USB in STM32. I've not found any "step by step", or a little more well structured tutorial, how to implement CDC or mass storage for example. I've found some examples, but would be better some explanation too.
Could you recommend me some nice descriptions about these stuffs?
AI: Alright, at first, you have to know that we cannot to explain to you that how the USB works or how you can use it (because that's too broad) but we can give you some clue until yourself understand it.
This serial bus is organized in a star topology with host and device roles, host organizing the traffic.
Several device classes are specified, in order to ease communication in different application cases. you can see them here. they are:
OTG : On-The-Go: An OTG peripheral can switch host and device role on the fly
HUB : Defines what protocols to implement to build a hub application
MS : Mass storage: Protocols to interact with storage block devices (for files)
HID : Human interface device: Protocols for peripherals interacting with human body (mouse, keyboard, etc.)
CDC : Communication device class: Protocols for serial communications, different sub-classes define details, for instance ACM for a standard COM port, or ECM for modems
Printer : Defines what protocols to implement to build a printer application
Audio : Defines what protocols to implement to build an audio application (microphone, headset, etc.)
DFU : Device firmware upgrade: Protocols to implement firmware upgrade ability
For using the USB you can use some middleware stack. for example: CMX, EUROS, Express Logic, HCC, Keil/ARM, Micrium and etc
I just can see one of them that is free. take a look in this link and downlaod the ST USB stack (USB FS device library, USB FS&HS Host&Device lib, Continua USB certified stack). by this Stack and it's documentations, you can use it easily and if you want to know what's going on when you use it, you can see to the source and header files.
I hope this quick consultation will help you.
|
H: Maximum resistance that can be put in series with an input to a (PIC) microcontroller
EDIT: What is the maximum resistance that can be put in series with an input to the PIC.
Original Question:
I am designing a clamping circuit to protect my microcontroller's pins, I need to know the minimum current required by my microcontroller to register input so that I can bias my external clamping diodes properly, without risking normal operation of my microcontroller.
Edit: Microcontroller is to read digital inputs in an EMI and ESD prone environment and I want to clamp both negative and positive voltages in the range of about -0.3V to (VDD + 0.3V), this range is provided in the datasheet under Electrical Characteristics.
I am using this PIC24, I think this has something to do with leakage current but I am not sure.
AI: I think what you want to know is the maximum resistance that can be put in series with an input to the PIC.
Let's suppose that you're happy with TTL levels of noise immunity (400mV).
The minimum voltages for an input to be accepted as a logical 1 or 0 are defined here:
Excepting the PMP, the lowest difference from the supply rails is Vil which can be as low as 0.2 * 3V = 0.6V. Subtract 400mV from that and we get 200mV. That's the maximum voltage that can appear across a series resistor to the input. If you want to use the PMP pins, it's 0.15 *3V = 450mV.
Now refer to the leakage table on the next page of your datasheet:
Without worrying about all the distinctions here, if the temperature does not exceed 85°C (should be junction temperature not Ta, I think), then the current will not exceed 1uA.
So the maximum resistor you should put in series can be found from GS Ohm's law- 200K. With such a large resistor you'd probably also want a small cap like 1nF to ground on the input or an RC of 1K series with the input and any size of capacitor you like between the 200K/1K junction and ground. With the PMP pins, the value goes down to 50K.
|
H: How can I remove a heatsink that is stuck to a component soldered onto the PCB?
I am modding a wireless router, and one of the problems I have is that it overheats, so it restarts every hour or so I am trying to replace the heatsink.
However, I simply cannot get it off. It seems to be glued on to the board or something, or they have used awful thermal paste! I have tried using a flathead to lever it off and scrape the paste away, but it is solid, and is impossible to remove.
Here are some images (sorry about my terrible photography!):
So, how can I remove a stuck heatsink? I don't really feel comfortable using heat guns or trying to melt it off, as I am worried that I will cause damage to the PCB.
The processor is soldered to the board as well, so I can't remove it and work it loose by pulling it apart by hand either.
AI: I managed to get it off.
NOTE: I used MINIMAL force when doing this. Using an excessive amount of force could do all sorts of damage as @passerby has mentioned!
What I did is used a 1.0mm Watchmakers' Screwdriver, and forced it in the small gap between the heatsink and the CPU. Then I got a small allan key multi tool and started tapping on the end of the screwdriver. Then it just popped away!
|
H: Understanding the input specifications for a laptop adapter
The sticker on my laptop adapter claims the input should be
INPUT: 100-240V~ 2.5A(2,5A) 50-60Hz
What does all this mean? Here are a couple specific questions:
Can the adapter accept anywhere between 100V to 240V?!
Is there a problem with plugging this adapter into an outlet labeled
"2A max"?
AI: That means that the laptop requires an input alternating voltage ranging from 100V to 240V, with frequency ranging from 50Hz to 60Hz.
Maximum required current is 2.5A at both the ends of the voltage input range so yes, a 2A outlet is not enough. A breaker might trip or the wires can catch fire, you better use another outlet.
|
H: EMF due to inductance?
In a DC circuit, current starts to flow, and some time is needed for current to stabilize based on the time constant, there is EMF induced due to current changing over time.
As soon as the current stabilizes there is no longer EMF due to self inductance?
AI: Yes; as soon as the current stabilizes there is no voltage across the inductor.
The \$EMF (voltage) = l \dfrac{di}{dt}\$; when the current is not changing, \$\dfrac{di}{dt} = 0\$; then the voltage is 0.
|
H: How do you perform circuit calculations for the darlington pair
I need to know what formulas or set of calculations would be used to figure out the base resistor and load resistors when hooking up a darlington pair as my datasheet for the ds2003 does not provide a hfe. The chip is 7 darlington pairs, and I am hooking it up to be controlled by my micro controller, to drive leds. If I know the current I need for my led to be saturated, how would I know what base resistor value I would need to put on the inputs to keep the base current under 25mA
Essentially I want to know what formulas are used or what is the common practice for designing such a circuit (led driver)
Single transistor calculations seem to be well published and I always have a hfe to work with but this is missing from the datasheet for these darlington drivers.
AI: The DS2003 already has series and shunt base resistors that are okay up to 5V input, and should be fine down to much lower inputs.
|
H: UART, USB... on cellular cards
Sierra Wireless and other manufacturer carry cellular cards in a variety of physical interfaces.
There are different digital interfaces to hardware like USB, UART, USB OTG, HSIC...
Additionally MiniPcie cards interface digitally with USB 2.0
Which do you think it's the best digital connection to the hardware? I doubt it's USB.
If you were designing a 3G router aiming for best performance. Which of these digital interfaces would you choose?
AI: The "traditional way" to interface with a cellular modem (or Bluetooth modems, etc.) is via AT commands (modeled after the original Hayes AT command set developed for telephone modems back when) sent over a UART running at 115200 baud.
Since it sounds like you want to send data faster then that, you will have to either bump up the baud rate on the UART, or choose a different interface. I have used one of the SL series Sierra modems in the past. Looking at the datasheets for a couple of the Sierra modules, it appears you can only bump them up to either 230 Kbaud or 921 Kbaud.
Another option is to switch interfaces. I know there is an AT command sequence to switch from the UART interface to the USB interface (and back). With USB you would have a much higher data rate available (either USB 2.0 Full Speed or High Speed). I am unaware of any AT commands that allow you to switch the control interface over to either the I2C or SPI interfaces. I believe they are reserved for use by the on-chip processor (some of the chipsets allow you to run your own code on them).
|
H: What exactly is (Horn) Antenna Gain
I was doing an experiment for finding the radiation pattern of Pyramidal Horn Antennas at RF frequencies(as part of my course curriculum). There I came across the Friis Transmission Equation
What I don't understand here is the two terms Gt and Gr. What does these gain terms refer to? Gain is something associated with active devices like amplifiers. But how come antennas have gain? They don't have any source of energy so that they can amplify the power, they are transmitting or receiving.
AI: The gain is an indication of directionality. IF you have an isotropic emitter that sends , say 1 W, into complete sphere you are emitting radiation over \$4\pi\$ steradians solid angle. If you make the antennae more directional and emit over a smaller area then the energy is concentrated (per steradian) in a smaller solid angle. This increase is a gain, gain in an active amplifier is a dimensionless number, and so is this.
|
H: Signal-driven 3 output logic gate decoder or switch?
I need to build a simple logic gate circuit such that when a single input signal or switch goes low it alternately activates one of three outputs as high. That is, every time it goes low the currently high output goes low and the next in the series goes high - cycling which output goes high between the three.
Years ago when I took an electronics class we used a program similar to CircuitLab. And I designed a very similar circuit. But I've lost that design and it was so long ago that I've gotten very rusty.
However, I can think of one way to build a circuit that would -almost- do what I want:
I could use a binary counter in combination with a 2-to-4 line single-bit decoder. (See the illustration on Wikipedia's decoder page.) The problem with that solution is it cycles between FOUR outputs. And my design requires that it cycles between only three.
As I said, I designed a circuit almost exactly like this years ago. And while the details are very foggy, I seem to recall that it was so simple that it only required one or more flip-flops (or latches) and a few other gates besides.
AI: A simple circuit can be built using a 4017 counter.
The circuit normally counts 10 input pulses but by connecting the next output to the reset input via a small signal diode (eg. 1N4148) the 4th count resets the circuit to 0. It also allows you to expand the circuit very easily.to more outputs if required.
Edit (additional)
As OQ requires change when switch or signal input goes low then the clock input needs to be inverted. This can be easily accomplished with a single PNP transistor. A 100R resistor has been added in series with the switch to prevent it getting 'sticky' when discharging the capacitor (see Spehro's comment).
Also added the 10k between D1 and C2/R3 to the original circuit.
|
H: How is this circuit for interfacing 20V signal with 3v3 microcontroller
I have designed the following circuit to interface a 12-20V signal to a microcontroller running on 3.3 volts.
The signal is either 20V or open circuit.
I want the circuit to be as resilient as possible. It should be able to handle EMI and ESD.
R1 is to limit the current and bias the transistor.
C1 is to implement a low pass filter.
R2 is used to pull down the transistor base and discharge the
capacitor C1, the 20V input is either 20V or open circuit.
D1 is used to protect the transistor from negative voltage at the
base.
R3 is to pull up microcontroller pin.
Any comments and improvements upon this circuit are welcomed.
Side question: Whats the maximum positive voltage this transistor can tolerate. The datasheet states peak base current to be 100mA. If base is maintained at 0.7 volts, then input can be as much as 1000 volts (10k ohm * 100mA). But if input is 1000 Volts the potential divider makes voltage the base at 500 volts. And the maximum Vcb according to datasheet is 60volts.
AI: Looks good to me. The inverse diode D1 is a good idea. If you have a minimum of 12V available you may wish to reduce R2 somewhat. This circuit has a threshold of maybe 2V, you could easily halve R2 or double R1.
In the case of momentary extreme over-voltage, the base-emitter voltage (forward biased) will not rise above a volt or so, even with 100mA. It looks like another diode in inverse parallel to D1. One of the advantages of a BJT in this application. The limitation is more likely to be the voltage rating of R1.
If you want to consider sustained overvoltage, you may have to consider the power rating of R1. If some idiot connects it to the mains (we can usually assume that about 240VAC is the most voltage idiots will have access too- idiots with access to higher voltages are sort of a self-eliminating problem) then R1 would dissipate almost 6W, so it would have to be a physically large part. You could solve that issue by increasing the value of R1 so that a smaller part could be used.
|
H: Is it possible to emulate Mifare Ultralight?
Is it possible to emulate mifare ultralight disregarding the specification, so that electronic tickets can be infinitely used? Mifare Ultralight has 16 pages with 4 bytes each. There are control bytes for the OTP page. The terminal can check those bytes and refuse the ticket, but if it's a hardware implementation then the standard can be disregarded and the terminal fooled. Also this could open a door to understanding the other data pages that are probably used for timestamps. So, is it possible to emulate that?
AI: Of course it can be emulated. There is no fundamental reason that this "slow" protocol cannot run on a SDR system such as USRP.
But, you may have to design the RF front-end to reproduce the way a passive RFID tag works. Definitely not rocket science. The issue is the have the full specs of MIFARE Ultralight in order to know how to emulate.
|
H: Ok, EAGLE eyes... what am I missing here?
Ok, so most of my schematic is completed, and I've cleared all the ERC checks but this one. I don't seem to see what the problem is.
all the positive powers are connected using the same (copy paste) v+ symbol, but the ones attached to the IC seem to be warning me. something to worry about, or just ignore?
AI: Almost all the circuit diagram editors I've used will point out discrepancies on pins designated as power pins on an IC. Usually (I can't say this is absolutely correct for Eagle) when a pin is designated as a power pin, the pin name expects to be connected to a net with the same label. You've wired a power pin called Vdd to a net called V+ and there's nothing wrong at all with this but you could: -
Rename the net
Rename the pin
Don't connect it but connect a power symbol (named Vdd) to V+ and you should find that all power pins called Vdd get connected to V+ (This works with OrCAD btw)
It's only a warning so nothing to get worried about but, like Spehro, I hate warnings and do everything to get rid of them because, like he says, it's easy to miss a "real" warning amongst the advisory ones.
If you do go for #3 make sure the power pins do net up when converting to a layout file.
|
H: Accurate sensor for a rotating object
I have a square-shaped plastic plate (3 cm length X 3 cm width X 1.5 cm height) attached to a motor that rotates it at 500 Hz:
I would like to have an interrupt fired on my microcontroller every time Point X (on rotating plate) reaches Position Y (fixed).
What would be an accurate way of accomplishing this such that the interrupt fires as exactly at that location as possible?
__
My notes: I would prefer not to modify the square plate with any additional material (so I'm guessing magnetic encoding is out). Therefore, I'm thinking some sort of optical interruption/reflectance sensor would do the job, but for greater accuracy perhaps the system might benefit from using an infrared laser diode placed above the plate, and a photodiode with matching wavelength range under the plate?
__
EDIT 1: I should mention that the square-plate is permanently fixed to the motor shaft, and cannot be removed to, e.g., insert an optical encoder disk in between.
EDIT 2: Detecting any/all of the four X corners of the square is OK; it doesn't have to be one particular X.
EDIT 3: Accuracy desired: +/- 0.1 mm radial travel.
AI: Do you need to detect only that corner distinct from the others or will any corner work? If any one will work you can use a reflective type photodetector or possibly a Hall effect sensor. With proper positioning you can get it to detect the corner of the plate but you will not be able to distinguish one particular corner from the others.
Check out Optek reflective photosensors.
|
H: ADC Reading is much lower than expected
I am using a EFM32GG990 microprocessor and I am trying to get it to read a voltage using it's on-board ADC. I have made a circuit that I wish it to measure, both the loaded and open circuit voltage for the battery and the readings I should be getting are around 2.5-3V or somewhere around there, but when I actually set the chip up with the circuit it reads the voltage to be around 1.6V open-circuit and 0.9V loaded which is well of the mark.
I am not entirely sure whether it is a software problem or a hardware problem but I have assumed hardware for now as when measured with a volt meter aswell while it is set up, it also reads a much lower voltage than expected.
simulate this circuit – Schematic created using CircuitLab
This is the circuit diagram of what I am doing and as you can see there a three different loads, one is always on and the other two are triggered intermittently depending on whatever I choose it to be. I personally can't see any issues with this but if anyone does and could help me out, that would be great!
EDIT:
Something interesting is that it all works with use of a power supply instead of a CR123A battery...
AI: According to your circuit, the 3v supply is connected directly to your ADC - forget about all the transistors and loads - 3V and 0V goes to the ADC.
Then, according to your measurements, the 3v supply is "much lower voltage than expected". So, you have the ADC telling you the reading is low and the meter telling you the same - what on earth makes you think the voltage is 3v?
I reckon the CR123A battery is "drooping" under load conditions.
|
H: Beam sensor or other switch needed for electric blind project
I am designing a motorised blind (powered by a Raspberry Pi) and need a reliable way of detecting when the blind is fully "up" or "down".
I don't want to use a stepper motor, and rely on counts, as I want it to handle situations where the Pi crashes / power cycles.
The simplest way seems to be a switch or sensor to detect when the blind is up or down, and I think a beam sensor would be neatest. The sensor needs to work in the dark, as the blind should be able to function at night. (I plan to automate it so the blind closes when there is no-one in the room at night.)
Have looked on Adafruit, but can't see anything suitable. Does such a thing exist?
AI: I would use a Proximity sensor of the type.
A reflective IR sensor that detects if there is a object in front of it. It contains a infrared LED and a infrared light detector and the detector detects the reflections from the LED.
At DigiKey you can find several hundreds of different versions DigiKey
A Hall transistor (Detects magnetic fields) and attach a magnet to the blind.
Reference to proximity sensors Wikipedia
|
H: Double Li-ion charging circuit logic
I'm currently trying to adapt a single li-ion battery charger based on the TP4056 to work with charging more than one battery. The idea is to use a logic circuit that is controlled by the IC's "FULL" output signal. Whenever the first battery is charged, the signal goes high and an LED switches on; the logic should then switch such that the charger is then connected to the second battery. Whenever that is charged, the charger should switch off (rather than switching back to the first, to avoid rapid switching). This has proved more difficult than I expected to design.
RM TP4056 datasheet here - presumably what you had in mind?
A friend of mine designed a circuit that should apparently do the trick, although it doesn't factor in propagation times and has one or two wrong connections which he later pointed out.
(source: pomf.se)
This is what he said about it:
ah I think I wired the outputs wrong.
Like I said, I was being lazy.
X3 stays off while something needs charged
X4, which isn't connected switches between a and b.
so those two wires and the inverter connected to the leds should go to x4 not x3
With these in mind, is this circuit likely to work (once appropriate delay is used in case propagation times compromise switching)? It seems to me that the 3-input OR is a overkill, and that the same thing would be achieved by removing the left-most rail (indicated by X1), replacing the 3-input OR with a 2-input, changing the NAND at the top to a NOT, and removing the connection between the X1 rail and the U1 OR gate. Please advise.
AI: This (untested*) circuit should do exactly what you specify.
Adding the optional inverter and diode should cause it to toggle to and fro between batteries once the current one is charged.
Operation:
Push button starts charging at battery 1.
IC1 + IC2 + Rl form a latch.
Pushbutton High sets latch output to high.
Chg1 low sets latch output to low.
Rl provides feedback to IC1 + IC2 which form a non-inverting buffer.
Latch high sets IC5 in high after time delay due to Rt1, Ct1.
So IC5 out goes low after time delay and FET1 is turned on by low gate signal.
Gate 2 is high (trace it through).
When battery 1 is charged signal CHG1 goes low.
IC1 in low so IC2 out low so latch out low.
Even when CHG1 goes high again latch will stay in low state.
IC5 in is taken low by CT1 discharging via diode so minimal delay.
IC3 in low sets IC4 in high after delay due to Rt2, Ct2.
So IC4 out low after delay and FET 2 on and battery 2 charges.
When Battery 2 is charged either just let TP4056 stop charging (as it does) and signal end of charge with LED,
OR use optional circuit at lower left with IC6, D2 to set latch input high and swap back to first battery.
Depending on TP4056 behaviour this may or may not be a good idea. There may be a small charge period while the TP4056 determines that the battery is charged. The circuit should toggle to and from between the two batteries. How much charging occurs depends on several factors but it is undesirable to add substantial extra charge at this state.
Switch: A MOSFET switch is shown. Note that the charger voltage needs to be greater than battery voltage to present back feeding via the body diode. This is not a fault of the logic but a limitation of MOSFETs as switches. This 'feature' may be overcome by using either a relay or back to back MOSFETS. [Two P Channel FETS. Connect gate to gate and source to source. Two drains are input and output (either polarity). Drive connected gates with gate drive. (Despite what may be intuitive this arrangement DOES start when driven. The nervous may add a say 1 megohm resistor from the connected sources to V+. MOSFET Vgs_max must be less than supply voltage. FET Vth needs to be suitable for drive voltage used - say 2V or less in this application.
Untested: This circuit has neither been built nor simulated. However, I have built about 5 zillion** circuits over too many decades using a 74C14 or similar in analog mode as used here. It's entirely possible that I've missed something or done something stupid but odds are it will work OK. If not, remove the purposeful error (cough) placed there as part of the student's training (cough) and proceed.
** On average 1 zillion per decade.
|
H: Stiff Voltage Divider Bias for an Emitter Follower
Below is an ac-coupled emitter follower with base bias provided by a voltage divider. I'm having a slight issue with how the resistor values are chosen for the biasing in the design example provided in the Art of Electronics (pg 70). I've included the design steps given in the book up to that point.
Step 1. Choose VE. For the largest possible symmetrical swing without
clipping, VE =
0.5Vcc, or +7.5 volts.
Step 2. Choose RE. For a quiescent current of 1mA, R E = 7.5k.
Step 3. Choose Rl and R 2 . VB is VE+
0.6, or 8.1 volts. This determines the ratio of Rl to R 2 as 1: 1.17. The preceding loading criterion requires that the parallel
resistance of Rl and R 2 be about 75k or less (one-tenth of 7.5k
times h FE ). Suitable standard values are R 1 = 130k, R2 = 150k.
In step three, it says the Thevenin equivalent of the voltage divider used (R1//R2) should be at least ten times less than the apparent resistance of the load resistor RE (RE * hFE). However, I think that instead of the Thevenin equivalent, we should only consider R2, since R2 is effectively in parallel with the load resistance * hFE. If we don't, then won't the loading effect on the voltage divider be too great?
AI: Looking into the base terminal we see the equivalent of a resistor of value Re *hfe, so if hfe is 200, it looks like a 1.5M resistor to ground.
They are saying we can ignore that if R1 || R2 << (Re * hfe), where they consider an order of magnitude to be close enough- so a reduction in swing of Vcc/20 is considered insignificant. There's nothing stopping you from correcting the ratio a bit to account for typical hfe, but when AoE was written 5% resistors were much cheaper than 1% and it didn't matter that much.
|
H: Tapping energy from high voltage AC transmission lines
The details are hazy as I recollect this from my nipper days.Many, many years ago.
“Persons were charged with stealing electricity by placing a large coil, somehow, near high voltage AC transmission lines.”
Is this feasible or was it perhaps an April fool’s article that I swallowed hook line and sinker in my youthful naivety.
There is a modern reason for this question.
Due to country wide cable and transmission tower spar actual theft. We are looking at placing modules with a gyroscope and Wifi module to form a mesh that will report if a tower is being “attacked”. Of course I will still have to test if the electronic gyroscope is sensitive enough for this. But one of the problems is going to be, how to power the unit? Solar will require an extra solar panel and battery. If I could tap into the radiated energy from the actual transmission line, great. Many modern SOCs don’t require much power and can sleep most of the time.
To clarify our needs. We are looking at building a device to sense if parts of the metal tower are being removed by scrap metal thieves. If too many parts are removed from the tower. It will buckle and earth the line. This is still at the feasibility stage.
AI: “Persons were charged with stealing electricity by placing a large coil, somehow, near high voltage AC transmission lines.”
Is this feasible or was it perhaps an April fool’s article that I swallowed hook line and sinker in my youthful naivety.
Entirely feasible.
Farmers were occasionally charged with power theft in this country (New Zealand) in the past. I haven't heard of a case in a decade or few - maybe they are getting cleverer at it :-).
This is the same principle as used for "IPT" / "Inductive Power Transfer as seen in phone chargers, industrial monorail powering, electric vehicle charging and much more.
I started to say that if the pickup coil was symmetrical with respect to two phases that were perfectly balanced that you'd get zero pickup, and then suddenly realised that I've always done IPT with essentially a single phase, and that with a 3 phase system with 120 degrees phase separation you should get the advantage of the full load current even if the two phases were fully balanced.
You are essentially getting fields produced by the current, not the voltage, and the voltage is essentially irrelevant as long as you observe the normal conventions that apply to any other dealing with xxx kV.
Energy Harvesting from Electromagnetic Energy Radiating from
AC Power Lines - FAR more energy can be obtained than they achieve.
Worked example - I suspect some of the conclusions are suspect A Solution to the RWP for Exam 1 - Stealing Power
Low technical content - high relevance
Directly relevant but low technical value Electromagnetic Harvesters: Free Lunch or Theft!
Several related stack exchange questions with variably useful content.
How would an electric company detect wireless theft of electricity?
https://skeptics.stackexchange.com/questions/3520/is-it-possible-to-obtain-current-indirectly-from-power-lines
Stealing energy from radio towers or power lines
Online vehicle transfer - I do not have access to this paper but it is probably at least relevant as it will have examples of dual linear conductors and a pickup coil.
Mythbusters getting it wrong
Related:
Industrial monorail
Maximising transfer
Capacitive - but impressive:
|
H: Statistical noise measurement
Is there an accepted measure of noise in a data set? I am taking a series of reading from an ADC, which follow a trend (they are not random data points). However, they generally lie above and below the averaged value (running average, FIR low pass effectively). How do I get a measure of how much noise there is over a given interval?
AI: If you have the average value of the data set you are interested in and all you want to compute is standard deviation (or RMS because it is the same) then: -
Subtract a sample value from the average
Square that new value
Sum all the squared values
Divide the total by the number of samples
Take the square root
If the noise is small and might contain quantization noise then you are going to be less accurate with the noise value computed.
If the mean/average is expected to drift in time then you may choose to use a rolling average calculation so that a significant emerging offset does not make the noise value bigger than it actually is.
|
H: MCU Output Driver Verification
I am creating a circuit in which a MCU (STM32) must drive 12VDC outputs, and wanted to make sure there wasn't anything missing in my driver circuit for the outputs.
-R1 is the inrush current limiting resistor
-R2 is the pull-down resister to keep the mosfet gate low if the MCU pin floats,
-D1 is the flyback diode, for protection against inductive loads, which will be a use case.
PS: I forgot to change the diode in the circuit, the actual part number is GSD2004W
simulate this circuit – Schematic created using CircuitLab
The load will be connected to the 12V power line and the ground will be switched via the out pin.
The expected load will be practically anything as long as it is 12V and less than 250mA. But there will definitely be relay coils, indicator lights, and solid state relays attached to the output.
If there is anything I am missing that would be necessary or even a good idea or small improvement to include? I just don't want to spin a board with this and find out something wasn't working as intended, so some assurance would be nice.
AI: A 2N7002 is a poor choice for an STM32 MCU, since you'll be limited to ~3V output voltage.
I suggest using something like an AO3418, which is inexpensive and guaranteed to have less than 85m\$\Omega\$ Rds(on) with 2.5V drive (at Tj=25°C). That would allow you to safely drive at least 1A with 3.3V drive over a reasonable temperature range, and it will have very low 'on' drop- typically something like 10mV when driving 200mA.
It might be nice to put a series resistor and LED across the load terminals for visual indication of the output state- it will also pull up the output so someone troubleshooting will be able to use a multimeter on voltage range to check the output.
The output as shown has no short-circuit protection, so if a screwdriver or probe slips, the output could be damaged if the 12V supply can supply more than a few amperes. If your 12V line can be limited in current, then that is another reason to make the output a bit beefier, so it can survive a momentary short-circuit.
|
H: What is "M" in Hartley's law?
If Hartley's law is:
$$ C = 2 B \log_2 M $$
I know this equation is part of calculating the capacity of a channel. I also understand that:
\$C\$ is the digital bandwidth, in bits/second
\$B\$ is the analog bandwidth, in hertz
But I do not understand the meaning of \$M\$. Could someone please explain it?
AI: M is the number of distinguishable signaling states that the channel can pass, usually modeled as voltage levels.
For example, if you can transmit one of four different voltage levels over a pair of wires, you can send two bits at a time. Eight levels gives your 3 bits, and so on. This is why there's a log2 relationship between levels and bits.
Distingiushable means that the receiver can reliably determine which of the levels the transmitter is sending. This means that the voltage offsets introduced by noise, intersymbol interference, etc. are less than the actual separation between the signaling levels at the receiver. As the noise level goes up, either you need to increase the overall signal level a corresponding amount, or you need to reduce the number of signaling levels you're using — either way, you increase the separation between the signaling levels.
|
H: Diagram symbol I've never seen
So my buddy brought me his Kawasaki Ninja service manual and asked me what this symbol is - sort of looks like part of a diode with a box instead of a line and is half shaded. I've tried looking it up but haven't had any luck and in the context of the diagram not a ton of things make sense. My best guess is they're connectors?
Also in the legend BK is black, Y is yellow and G is green.
Anybody know what these are?
AI: Searching the web for information on motorcycle electrical schematic symbols shows that the symbol in question is a connector. The left side (the box) indicates the female side while the right side (the arrow shape) is the male side.
|
H: What is the purpose of star pcb?
I'm fairly new to electronics, and I was recently looking at some LEDs listed for sale online. Some LEDs were mounted on "star pcb":
From the picture, it looks like there are 6 connections. I'm pretty sure the LEDs just have 2 (an anode and a cathode).
Can someone explain the purpose of the other connections, or what the star shape pcb is used for? I tried googling, but all I could seem to find were more star pcb items for sale.
AI: I assume you are looking at a unit such as this: Digikey link. The "circuit board" is actually a heat-sink heat-spreader to draw away the heat from the LED module in the middle. As you can see in the photograph, half of the pads are labeled + (anode) and the other half are labeled - (cathode). So yes, there are actually only two terminals.
[Edit: changed "heat-sink" to "heat-spreader", acknowledging Conner Wolf's correction.]
|
H: Amplitude modulation of unit step signal
What will be the amplitude modulated signal, if the input is an unit step signal? You can take any carrier signal (though I would recommend sine wave) and take any carrier frequency because that is not of interest here as I want to know the shape of the net modulated signal.
AI: Before the start of the unit step, the waveform will be a constant amplitude sine wave at the carrier frequency. After the unit step, if we assume the amplitude of the step is sufficient for 100% modulation, the waveform will be a constant amplitude sine wave at twice the amplitude that existed before the start of the unit step. A unit step amounts to a DC level so that it affects the amplitude of the carrier but not its shape.
Wolfram alpha visual depiction of what was described.
|
H: Disconnect circuit after primary circuit detects high volume
I would like to build a circuit that detects high volume (through a microphone or something) and when it does, it would disconnect another circuit from its power source.
I don't know exactly how high the volume threshold should be yet.
It's a small project I'm working on and I don't have much experience using electronics.
How might I go about doing this?
EDIT: I want the sound that my circuit to detect an instantaneously high volume of a song that is emitted from a stereo. The circuit it shuts down is an electrical device that uses 220 volts, it will be connected to its power cord.
AI: Volume, or in this case, audio amplitude or sound pressure, is a dynamic/variable thing. In other words, it will vary based on location and position of microphone, frequency and duration of the source audio, etc.
A little something to think about: When you watch a documentary video with a narrator and background music, there is often an audio effect called ducking going on. The narrator speaks, and the amplitude of the music goes down. When the narrator stops, the music becomes gradually louder again. In the small quiet gaps between words, however, the music doesn't become loud, so how does it know when the narrator is done?
When you apply a ducking effect, you set a few parameters to avoid having the background music try to be loud during every possible quiet gap. One of these is a delay: "Wait 1500 ms after detecting x amplitude to return to normal music volume."
When you think about having a circuit detect sound pressure, you have to ask whether you are interested in an average or an instantaneous measurement. A sound pressure meter, like this one you can get from Radio Shack, has both of these modes. You might want to experiment to see what you need for your application. If you use an instantaneous measurement, or a max threshold, you might set off your detection circuit by clapping your hands, when in fact you'd prefer it only be triggered by more continuous loud noise.
Your circuit would need to take multiple readings from the microphone input (analog to digital conversion (ADC)) and determine whether they constitute a trigger event or not. For example, you might read the value ten times per second, and average them. You might take readings for a few seconds instead; it depends on how long you require the sound pressure to be present to trigger the circuit.
Once you have that part worked out, you can incorporate a transistor and/or relay to switch on/off something else. A common, simple circuit is the "clap switch" of which there is an example at Circuiteasy.com.
Once you've switched the relay on or off, you then might need to reverse it, so you'd need to continue monitoring the input from the microphone. Remember the ducking example earlier, and be mindful of a delay. Otherwise, you might wind up turning on/off the secondary circuit much faster than you intended.
It all depends on what audio source you are trying to measure, what device you are switching on/off, and other details you omitted from your question. But hopefully this helps get you on the right track.
Addendum:
Per your edit, you will definitely want to use a relay to control a mains voltage device. However, if this is your first circuit, I strongly advise against that as a first project.
The first step will be to construct your sound detection circuit. You can probably find a schematic online for something that turns on LEDs (VU meter, for example) or look for sound-activated switch circuit (such as this example). They typically use a small electret microphone. Build your circuit on a breadboard and experiment with position of the microphone in relation to the sound. That may give you an idea of how sensitive it is (or not) and help get you started.
A microcontroller-based circuit will give you more flexibility, such as doing as I described above, taking multiple samples and evaluating them. If you're just starting with electronics, I don't recommend a microcontroller-based project as your first one. (But the Arduino platform is a great starting point for doing so.)
The circuit example I linked in the previous paragraph will be more basic, turning on the relay for a short time period set by C2.
For now, I would just use the relay to operate some other battery-powered device, so you can figure out how it works. When satisfied, check with someone more experienced to help you select and configure a relay to operate a mains-powered device or appliance.
See Also:
Here are some related questions on this site that you may find helpful:
What does 3V3 or 1V8 mean?
Newbie: resistor and capacitor symbols meaning
How to hook up a mains voltage relay?
|
H: Difference between DMM and oscilloscope measurements
I have a 220 - 14 V transformer, but when I hook it up to oscilloscope or DMM they show different values. DMM shows 11.8V and oscilloscope shows 17.2.
Ok, this is cheap Chinese transformer, so it can possibly be not accurate, but what the hell with readings? I know my equipment kinda low-class and low-accuracy, but how can it have such a big difference? What is the reason and what reading is more accurate?
AI: The oscilloscope shows peak values and the DMM shows RMS or average values.
$$\frac{17.2V}{\sqrt{2}} = 12.162237 V$$
|
H: Vehicle-to-grid technology
As I understand, vehicle-to-grid technology is about using the battery of your electric car to give electricity for the microgrid. How would this be useful as we are just moving electricity from place to another, and the battery of the car will need to be recharged?
AI: Moving electricity from one place to another sounds pointless if you omit the purpose, which is to provide power where it is needed from a location where it is not.
Consider for example these points on the Wikipedia page about vehicle-to-grid:
A hybrid or Fuel cell vehicle, which generates power from storable fuel, uses its generator to produce power for a utility at peak electricity usage times. Here the vehicles serve as a distributed generation system, producing power from conventional fossil fuels, biofuels or hydrogen.
A battery-powered or plug-in hybrid vehicle which uses its excess rechargeable battery capacity to provide power to the electric grid in response to peak load demands. These vehicles can then be recharged during off-peak hours at cheaper rates while helping to absorb excess night time generation. Here the vehicles serve as a distributed battery storage system to buffer power.
A solar vehicle which uses its excess charging capacity to provide power to the electric grid when the battery is fully charged. Here the vehicle effectively becomes a small renewable energy power station. Such systems have been in use since the 1990s and are routinely used in the case of large vehicles, especially solar-powered boats.
The whole purpose is to put power back into the grid where it can be used, instead of just wasted (or not realized).
Consider a simple example: A solar panel on a vehicle that is not in use and fully charged, is being underutilized. If your neighbor has just returned from a drive, power that your panel produces can be sold back to the utility and delivered to the neighbor.
|
H: Audio bluetooth board. RX and TX?
Looking at a usb bluetooth audio aux device board I saw RX and TX. What are these points for?
AI: A serial connection, most likely TTL/UART, possibly used to test and/or reprogram the chip. There should be no need to access them after leaving the factory, but it is less costly to leave them in than to remove them before placing the device in the case.
|
H: Stripline reference plane discontinuity in reference design
According i.MX6 SMART DEVICE SYSTEM of freescale layout board, it uses 8 layers, my question is about the inner layers, they are striplines with a continuos GND plane in one side but in the other side they have a power layer that is broken A LOT of times (they make a lot of power islands), and some important signals cross those broken planes and that would mean a difference in Zo of the line, which mean reflections, so te integrity of the signal won't be optimal and when we are talking about RAM data lines and other kind of sensitive lines that's a big problem, so that thats my question, i mean that's the reference design, but in my opinion is against all theory, can some one tell me if i'm wrong or gimme an awnser to orientate me in this matter please.
This is a screenshot of the internal layer 2 and the power plane that makes the stripline, there you can see the SoC and the RAM lines.
This is the stackup:
AI: You can route across a cut up plane with no issues as long as each cut up plane is paired with a tightly coupled solid (gnd) plane -and- you engineer the PDN (bypass network) to have sufficiently low impedance between all power plane islands and ground (use something like my PDNtool.com for this).
If you make the cuts wider than about 1/3 the electrical length of the rise/fall time of your signals, you will start to see some reflections due to the lower capacitance. This can easily be simulated if you have access to an IBIS simulator.
Also the plane nearest to your stripline traces will "dominate", so if that is solid you have no issues either.
PS: Reference boards are not holy. There are MANY reference boards out there with lots of serious design errors. So watch out!
Does that answer your question?
|
H: How to connect 3 toggle switches to 1 battery supply, using 1 wire
I currently have a battery supply, 3 toggle switches, and a Protoboard. The protoboard has various components connected to it, incluing two motors. I need to connect two switches to the motor pins, and one to the board's power input. Those connections have already been made.
However, I also need to connect the red wire (voltage out, 22 gauge) of the battery supply to one terminal on all 3 toggle switches. This is where I am confused - how to connect one wire to 3 different switch terminals.
One thought was to strip the red battery wire, and then connect 3 new wires to the main red wire. Another thought was to connect the red wire to one switch terminal, and then solder two wires to that terminal - and connect the other ends to the other switches.
Any ideas on what's appropriate here? I don't want to 'fry' anything, so I'm hesitant to start testing things on my own. Below is a brief visual of what needs to be done. Thanks in advance!
Edit:
Thanks for the responses so far - I realize this is quite vague / confusing, mainly because I am very lost when it comes to hardwares/circuitry.
The overall goal is to allow the switches to toggle on/off the motors, and also toggle on/off the power supply to the CPU connected to the protoboard. The purpose of this is to that I can test other functions of the protoboard/CPU, without running the motors - aka switching the motors 'on/off'.
The instructions I received go over this very briefly, and simply state "Connect the battery voltage (red wire) to one terminal of all 3 toggle switches. Connect the other terminal of each switch to each motor, and to the main power supply." The second part I have down - it's connecting the 1 battery wire to 3 separate switches that has me confused.
AI: I don't see the point in having the power toggle switch if you're just going to connect the battery +ve to the other toggle switches anyway...
It would make sense to me to have the red wire from the batteries going to the first 'power input' switch and then have another two wires coming out of the output from that switch to go to the other two switches, this way the power switch will actually turn everything off when you flick it and the motors will not run independently of this switch, which is, I am assuming, what you would want.
Here I have drawn a quick schematic of what I think you are looking for, if it's completely wrong, feel free to ignore me but this would make sense to me.
So as you can see, the red wire from your batteries will go to the power switch which then in turn would go to the other two switches.
I personally would solder wires to SW2 and SW3 and then use the proto board to connect the three together, have the output of SW1 going to some hole in the board and then connect the other two to this point however you see fit! The less wiring the better.
Hope this helps.
|
H: What is SPI Interrupt (SPIE) in SPI control register?
I have been trying to understand SPI Interrupt i.e. what does it do and why is it used ? Reading about it on the web has not helped me. Can some one please explain it in a simple terms ?
AI: SPIE or "SPI Interrupt Enable" is used to enable the interrupt.
(Assuming you are in Master mode) There are two ways of transferring data using SPI:
1.Polling: Here you write data in SPI's data register (SPDR) and then poll on the flag for SPI Transmission complete (SPIF).
2.Interrupt based: In this case, when you enable Interrupt for SPI, you write data in SPDR. Controller will transmit the data and will raise an interrupt when transmission is completed.
A question may arise that why there is interrupt for transmission but not for the reception, I am tempted to answer but It would be better if you figure that out! :-)
|
H: Why are there only 3 wires on this power line?
When I was in Alaska, I saw a high voltage line, but I didn't see the Neutral.
Is this because the water is conductive enough next to it to use as neutral? Or is it just two Phases.
Where I live, Colorado, all of the power lines have the two neutral wires on top.
AI: Most long distance high voltage transmission is done in 3-phase Delta configuration, requiring only three cables.
This saves the cost of the fourth cable, used for the neutral line. It also avoids problems of imbalanced currents flowing through the fourth cable or the earth, since in Delta configuration any current imbalance on a phase is automatically shared on the other two phases, making for lower losses.
If 3-phase Wye configuration with four cables is used, it is generally only over short distances at the generating station and at the end-user's facility. Conversion at each end is generally achieved by Wye-Delta transformers.
In the bottom photo in this set the wires at the tops of the towers don't show up well, except one of them has a marker ball affixed to it to alert aviators. These top wires are connected to the tops of the towers without insulators and act to divert lighting strikes into the structure of the nearest towers, and then into the earth via ground rods, rather than striking the power cables and causing current and voltage surges in the grid.
Also, in the the bottom photo, the six cables comprise two independent 3-phase Delta transmission lines of three cables each.
|
H: Books on PCB design
Anybody knows a good book on pcb design? I need to learn some theoretical concepts for designing pcb for usb/ethernet application.
AI: PCB design is a wide field. Wider than you may thing at first.
I don't know if a "basic book" about PCB design exists. But books dedicated to specialized PCB design do exist.
Your example of a USB and Ethernet board is not really a generic PCB. It include "high speed digital" part. And this is not the best PCB design to start with. The risk is that it is likely to fail because of signal integrity issues. And this is not an easy thing to diagnose afterward. You may need expensive equipment, etc.
But if you design the PCB carefully, it might be OK.
I have two books to recommend about that subject:
Electromagnetic compatibility Engineering by Henry Ott.
High-Speed Circuit Board Signal Integrity by Stephen C. Thierauf
These books are not introductory book but are more focused on issues related to high speed digital such as USB and Ethernet designs.
|
H: 868 MHz frequency standard
I am wondering whether I am free to use any transmit/receive methods on this particular frequency or do I need to stick to some standards.
I am willing to buy a chip with PHY layer of 868 MHz and we do have the software MAC provided with it ( it is a ZigBee standard access layer) I am wondering whether I need to use it and if not what can I do to make sure I wont disturb existing application of devices nearby using the ZigBee, and in fact I don't even know whether it should my mine concern or will the PHY make sure that the other devices in the area which are using the ZigBee will be fine.
AI: In Europe, you would have to comply with EN300220 which is an ETSI standard. If you use a library for the MAC layer of Zigbee, this will have been done for you, but if you write your own MAC layer, you have to take care of all the restrictions in this document yourself, and then get a test house to validate your product according to the telecomms regulations.
|
H: Homework: Noise in a circuit
I had this problem in a homework assignment:
If the noise in a 5 V voltage line and ground for a five volt circuit is of the order of 10 mV, for a first order system, how many time constants will you wait to be sure you reached the practically achievable final steady state values?
Does this mean that the noise in any circuit eventually dies out and that every circuit reaches a steady state ?
This would have been easy if the circuit can be modeled using capacitors and inductors but I have not been able to think of such an arrangement.
Can anyone give me a hint on how to proceed?
AI: I guess that what the teacher meant was:
Suppose there is a first order filter (i.e. RC filter) and that you're working on a real environment (noisy, white noise). Now, in the absence of signal at the input, the output will be just a noisy, filtered signal. So, the proper question should be "how much do I have to wait until I can say that the output arrived to a steady state?"
You have to think of noise as the "input" for your filter.
So far, it doesn't depend on the power supply, but on the filter (i.e. the time constant = RC).
As a rule of thumb, you should wait for 4 or 5 constant times (RC) until the output reaches steady state.
Hope this helps!
|
H: What type of oscillator is this? (Theremin Project. Variable Pitch / LC Oscillator)
I found this oscillator at a Theremin project pdf. I simulated the circuit, and found that the output (left wire) oscillates at 236.5 kHz.
This circuit is referred to as "Variable Pitch Oscillator", but that doesn't seem to be the best reference for it.
So I'm wondering: what circuit is this, and how do I calculate the oscillation frequency??
AI: The oscillation frequency is determined by C1 and L5: -
\$f_O = \dfrac{1}{2\pi\sqrt{LC}}\$
And, for values of 3900pF and 100uH, it should oscillate at 254.8 kHz theoretically but there will be parasitic capacitance in the inductor and miller capacitance in the transistors that make the actual capacitance bigger hence lowering the resonance to 236kHz.
I'd call it an LC oscillator.
|
H: Synchronous rectification in IGBT
simulate this circuit – Schematic created using CircuitLab
In above standard 3-ph IGBT based inverter circuit suppose Diode D4 is carrying current because of inductive nature of load. If corresponding igbt Q4 gets gate pulses in this freewheeling interval then whether current will be transferred to igbt from diode as it happens in MOSFET called as "synchronous rectification" (which is used to minimize conduction loss because of diode)?
In short if PWM signal is applied to an igbt whose freewheeling diode is conducting will that igbt get destroyed/overheated?
second doubt is if collector of a high side igbt is not connected to voltage source while bootstrap capacitor is fully charged then upon applying gate pulse to high side igbt it will get turned ON?
third doubt is if an igbt is rated for 600V 10A then can i operate that igbt at down to 1A or even below 500mA? also can i turn on it for collector to emitter voltage of 25V?
AI: Addressing your questions in order:
The IGBT will not be impacted in any way. IGBTs do not conduct current in reverse; this is why they must be coupled with a separate diode [1]. Even with the IGBT on, its free-wheeling (also called 'anti-parallel') diode will conduct the current. MOSFETs, on the other hand, can conduct in both directions. In the MOSFET, the current can reverse-conduct through either its channel or its body diode, depending on the current, channel resistance and body diode drop. The body diode is inherently built into the MOSFET.
It will indeed be turned on, but no current would flow since the collector would be floating. An IGBT, like a MOSFET, turns on gradually. It begins to turn on when the gate voltage exceeds a threshold, relative to the emitter.
Yes to both. The ratings you mention (10A, 600V) are the maximum ratings. You can use the IGBT with 25V bus and 500mA, no problem.
[1] See an example of a TO-247 device which is effectively an IGBT and diode co-packaged: http://www.power-eetimes.com/imf/c/eyJtYXNrIjoiNDMyeDI4OCJ9/images/01-edit-photo-uploads/2014/2014-06-june/onsar2662_fig-1.jpg.
|
H: SMD diodes with mark YR103, WX104, and RZ102
I'm trying to identify the SMD components on a contactor control circuit. They are from General Semiconductors and have the labels: YR103, WX104, and RZ102. I think they are diodes, but I'm not sure what kind. Can I get some help with identifying them?
AI: Here's the marking guide for Vishay's power diode division, formerly General Semiconductor:
Vishay PDD marking guide
If your parts are General Semi diodes you should be able to figure out what they are from there, based on what kind of package they are in. (SMA, D-Pak, etc.)
|
H: TimeQuest Timing Analyzer: What is the difference between post fit and post map timing netlists?
When we wish to add timing constraints to our design in TimeQuest Timing Analyzer, we have two options. We can use either a post fit netlist or post map netlist. Post map netlist is available after mere design synthesis, however the post fit netlist is only available after fitting.
Now my question is which is used when?
Is it true that post fit netlist has timing information but post map does not? Besides that, when comiling an FPGA design, is post map netlist defined using the "atoms" of the FPGA?
AI: The process of mapping implements the specified behavior in the selected technology, but does not assign specific physical resources to the individual elements (e.g., LUTs and FFs). Simulation at this level models the gate delays fairly accurately, but uses statistical averages for the wiring delays.
The process of fitting allocates the specific physical resources for each design element identified during the mapping stage, and also allocates the routing resources required to make the connections. Simulation at this level gets both accurate gate delays as well as wiring delays.
Since fitting is a fairly compute-intensive process, and since post-map simulation is about 90% of the way there in terms of overall timing accuracy, many designers do the bulk of their timing verification using post-map timing.
|
H: Transistor Level Shifting in Buck-Boost Converter
Ive been reading some of the LT application notes on Jim William's Analog Circuit Design book, and there's something I don't quite understand. I'm attaching a scan of the circuit in question.
The LT1070 has its ground pin at -12V, and Q1 is forcing a current of around 1mA through the 1.24k resistor, this produces a 1.24V drop through that resistor, which corresponds to the 1.24V reference inside the FB pin (the error amplifier).
Ok I understand that, what I don't understand is why use the transistor in the first place? Why not just use a simple resistive voltage divider? whats the advantage of using Q1 rather than a simple resistive voltage divider?
AI: The transistor's base is tied to ground, which means that the current through R1 depends only on the output voltage (along with the base-emitter drop of the transistor). The transistor sets the current through the 1.24K resistor (R2?), but keep in mind that there's also a significant voltage drop (roughly Vin - 1.24V) across the transistor itself, which varies with Vin.
If you just set up a resistive divider without the transistor, then the current through it would depend on both Vin and Vout, which would eliminate the ability of the circuit to ignore changes on Vin (line regulation). Sometimes you do this on purpose, if your intent is to create a "tracking" supply, but that isn't the intent of this circuit.
|
H: How to connect 7447 decoder to 7-segment display?
I've connected a 7447 decoder to 7-segment display as shown in figure. When I connect an input, the LEDs doesn't form numbers but they light up randomly.
I just want to know the right way to connect the output pins of 7447 to the pins of 7-segment display?
AI: Each segment on a 7-segment display is designated a letter (A-G). This is standard and is shown in the SN7447 datasheet:
You can use a diode tester or a simple voltage source and a resistor to determine the pinout of your particular display. Then just map the pins correctly (again, from datasheet):
|
H: Please help me identify two pin locking connector
This is a two pin, locking style connector with "AMP" molded into the front edge; there is also a "P".
Material is nylon or similar and the pins are pushed in from the rear like Molex connectors.
What is "unusual" is the D shaped profile of the "nose" - close but not compatible with other two pin connectors I can easily obtain :(
AMP/Tyco never got back to me and our usual distributors are clueless.
We have a few thousand machines in service with 24 volt power supplies that use this connector (manufacturer of the power supplies is HIPRO - now under new ownership - also not communicating)
Have spent a week trawling through connector catalogs, waited a couple of weeks for Tyco and the power supply folks to get back to me... a bit frustrating.
AI: That connector family is called the Mate-n-Lok series. They are great power connectors and have been around for years. They come in two general sizes, the Mini type and the standard or Universal series.
Here is a link to the Mouser catalogue page for the Mini.
Your two pin is hard to tell from the picture if it is the universal or the mini.
This is the one you are probably after:
|
H: Circuit to switch about 5W of 12V using CMOS logic inputs using N-channel MOSFET?
I want to switch some 12V landscape light LEDs, totaling about 5 watts, using MOSFETs, with the control signal provided by a digital output line from an Arduino microcontroller running at 5V.
I thought I had some logic level N-Channel MOSFETs lying around, but apparently not.
What I have is several 400N80Z and IRLB8721PBF power MOSFETS. I tried using the 400N80Z in m circuit, but the LEDs don't light fully.
I have a variety of low to medium power NPN and PNP switching transistors on hand (BC33716, PN2222A, and 2N4401 NPNs, various others, plus a few TIP120 NPN power darlingtons.
Clearly logic MOSFETs are the right tool for the job and I need to order some. In the meantime, though, can I rig up a circuit that will fully saturate one of my power MOSFETs with a 5V CMOS logic signal from an Arduino?
I'm a software guy, and only passingly familiar with analog circuits.
AI: The FCPF400N80Z has a maximum gate threshold voltage (VGS(th)) of 4.5V, which is marginal for logic operation, but the IRLB8721PbF has a maximum threshold voltage of 2.35V. This should work decently well for even 3.3V logic provided you don't need to pass more than about 3A of current.
|
H: Lower Voltage LED organ
I am interested in adapting this Jameco kit schematic to my own needs. I have run into an issue though. I am not sure how to lower the voltage requirements. This circuit is built for 12V, I would like to power it with between 3.3 and 5 volts, specifically from a lithium-ion battery.
My question is specifically about the various op-amps used in the circuit.
The MC33204P Datasheet says that the minimum supply voltage is 1.8V (+/- 0.9V) and the maximum is 12V(+/- 6V). I realize that this means that I can use a 3.3V supply, but how much do I have to change in terms of the resistors and capacitors, if anything at all?
The MC34072P Datasheet does not mention a minimum supply voltage as far as I can see, although I may be mistaken. One of the graphs showing supply current vs supply voltage, starts at 1V. Will this op-amp work as intended with the resistors of the original schematic? Will is work at all? Should it be replaced?
I do not plan on following the schematic past the transistors.
AI: The "5th" opamp is a virtual ground so that you other amps have a DC offset. This is done because you're using a single supply (just 'positive' volts). No matter what input voltage you pick, this circuit will take half and use it as the negative rail for the op-amps.
In that sense, this circuit is robust enough to handle the voltage change well. However, the LED's in series will probably need to have their current limiting resistors changed so that they get enough juice from your lower supply. I think that's all you'd really need to change. This circuit just lights up according to the frequency of the input right? I'm just looking at this at a glance.
|
H: Which is better after rewriting the ROM on a PIC16F? A software reset instruction or a watchdog reset
I am working on a project where the uP can be calibrate at any time. The new calibrated values are stored in the uPs ROM. After the calibration is complete, I have to reset the uP such that the initialization function can read the new calibrated values.
However, I am not sure what might be a better implementation... resetting the uP with the a software reset (included in the library) or using a watchdog timer to get the job done. While both can provide the same function; I am unsure on what will be a better implementation.
I also thought that it would be a good discussion to find out peoples views :)
Thanks!
PS - I'm using a PIC16f1936 and developing my code in C using MPLAB X IDE v2.15.
AI: I would say your program is sub-optimal if you only read the calibration values once (at start-up). If you re-read them continuously you can avoid the need for a reset entirely and avoid the possibility of a glitch screwing up the values stored in RAM.
As far as the actual reset goes- there is a RESET instruction and executing that would probably be the best way (check the sources or disassemble the emitted code to see what this library function actually does). This should set all the registers to their power-on defaults and leave the ones that are 'u' the same.
Inhibiting your periodic resets of the WDT has some appeal since it would actually test that the WDT is functional. However, if you are testing the source of the reset in your start-up it would be indistinguishable from a WDT reset unless you do something like flagging it in a pre-determined EEPROM location, then rewriting it on power-up.
Depending on what you are designing you may wish to log or otherwise deal with WDT resets. WDT resets can be an indication of a serious problem that needs to be attended to as soon as possible.
|
H: MOSFET controlled DC motor too slow
I want to control a DC motor using a P-channel MOSFET.
I tried the motor with a 5VDC power supply. It works perfectly and speeds up in no time. I measured the current flowing through, it's around 0.15 A.
Now, I wanted to include a MOSFET. I used FQP12P20. I connected the source to +5V, the gate to GND, and the drain to the same motor. The motor still works, but it takes seconds to speed up. The current flowing through and the voltage on the motor is the same.
What could be the problem?
Thanks,
lszabi
AI: You need to use a MOSFET with a logic level gate. The MOSFET you are using is only slightly 'on' with 5V on the gate. It's not guaranteed to conduct more than 0.25mA at 5V Vgs.
Get one that has a guaranteed Rds(on) at 4.5V gate-to-source voltage. For a motor with a run current of 150mA, maybe a few amperes at start-up, so < 100m\$\Omega\$ should be okay.
For example, a NDP6020P which is guaranteed to have less than 80m\$\Omega\$ with 4.5V drive even when very hot (125°C) and is more likely to be ~40m\$\Omega\$ at room temperature.
Alternately you could re-design your circuit to provide a -5V gate drive wrt ground (-10V relative to the source) but even so that (high voltage) MOSFET you have isn't all that suitable with an Rds(on) that is about 10x higher. What it's good for is high voltage (-200V rating).
|
H: What is the need of Neutral and Phase Metering?
I'm working on a project where I have to implement a metering IC to measure Voltage,
Current and Power on 230v power lines.
I have to use Atmel's 90E24 single phase metering IC. This IC has two channels one for
Phase and another for Neutral current metering.
Since, all the current drawn by the load will flow on both phase and neutral (return path)
then what is the significance of using two line metering?
AI: You would typically monitor the neutral as part of an anti-tampering technique. People might bypass only the line , in which case the return current through the neutral would be different (higher) than what is on the Line. If both the L and N were by-passed then the neutral voltage might change (depending upon when the ground connection is made).
On Edit: looking at the datasheet it says " In anti-tampering mode, the power difference threshold between L line and N line can be: 1%, 2%,... 12%, 12.5%, 6.25%, 3.125% ..." on page 13.
|
H: How to the calculate the value of capacitor placed in series with transformer to avoid flux walking in a buck converter?
The dc value of current in primary increases(in -ve direction) as time passes, so I need a capacitor in series with transformer, but don't know what value capacitor should I use.
filter capacitor = 1 mF
filter inductor = 50 uH
switching frequency = square wave inverter's frequency = 50kHz
AI: First of all, you need to read up on what constitutes a good schematic. At a minimum every component should have a reference designator and a value, so we can talk about them meaningfully.
Just as a rough cut, I see that you have a 30A load and a 7:1 transformer, which suggests that the primary current is going to be a little over 4A. Assuming you want to pass that current with minimum loss, let's assume an AC impedance of about 1 Ω, which, at 50 kHz, implies a capacitance on the order of 3 µF. That's a lot of current (and voltage) for one capacitor, but as long as this is a theoretical/simulation exercise, it shouldn't matter.
There are some caveats, however. If the capacitor should happen to resonate with the primary of the transformer at the switching frequency, the current and voltage will rise dramatically, so check for this.
As a side note, I would point out that your drive circuit for the H-bridge isn't going to work in the real world. The high-side N-channel MOSFETs can't be driven with the same signals that are used for the low-side devices. Remember, the gate-to-source voltage on any MOSFET can't ever exceed a certain value, usually around ±20V.
|
H: Maximum op-amp output current
Im looking to drive an LED, but am not sure if i should use an op-amp or bjt configured as a switch. Is it possible for an op-amp to source roughly 10mA; the current needed to drive an LED in series with a resistor?
If this depends on the type of op-amp, then how would I go about figuring out the maximum current an op-amp could source?
AI: Usually we're concerned with how much loading can be put on the output and still have it function properly. The output swing specification will be at a specific load resistance, usually load is between the output and ground on both dual and single-supply op-amps. For example, the dual-supply OP-07:
You can see that over the whole temperature range with +/-15 supplies it is guaranteed to have a swing of +/-11V with a 2K load, meaning that it can supply +/-5.5mA. If the supplies are different then the current may be different.
If you're primarily interested in short-circuit maximum current, that is not always specified, though some op-amps do have numbers. For example, the ubiquitous LM324:
As you can see, it guarantees (at 25°C) the output short circuit current won't exceed 60mA, but it's only guaranteed to source or sink 5 or 10mA. Also note that the LM324 has a (nominal) 50uA current sink on the output so if you ask it to sink more than some tens of uA the output will no longer get that close to the negative rail. If the load is a resistor to the negative rail, the issue does not arise.
In general the minimum guaranteed current (for it to work properly) is going to be much smaller than the maximum guaranteed short-circuit current (if they even give a number for the latter).
|
H: Breadboard minimum lead length
What's the minimum lead length for a component in order to reliably connect with solderless breadboard contacts?
Reading specs on cables, relays LEDs, and other components, what should I take as the minimum distance from the bottom of the device to the tip of the lead? Or put another way, from the top of the breadboard to the pinch-point of its contacts?
I want to plug into a generic solderless breadboard and not worry about loose connections. I have assumed through-hole PC board leads would be sufficient but occasionally they are not. Case in point, a flex cable from Digi-Key has leads that are about 3.2mm or 0.125in long that keep falling out. So the answer may be just a little longer than that.
This spec from 3M says nothing about this dimension, except that the standard interconnect wires go about 0.250in deep.
AI: A standard DIP has a lead length of about 0.125" (3.1mm) but the actual penetration below the surface is probably more like 4.2mm because the holes and leads are both beveled.
|
H: How does USB Type C handle reverse polarity / signal duplication
The new USB Type C connector doesn't have a physical reverse polarity protection any more. You can plug it in any way you want on both ends, there is also no A and B end any more, it's all the same.
So how does this new USB type handle that the polarity doesn't end up being reversed or signals being routed to the wrong point?
Is there some sort of routing going on in the connector and the devices don't have to handle anything and can be sure the polarity is always correct?
This is assuming that not half the signals in the cable are redundant.
AI: Below is the pinout for the receptacle:
GND TX1+ TX1- Vbus CC1 D+ D- SBU1 Vbus RX2- RX2+ GND
| | | | | | | | | | | |
=+====+====+====+====+====+====+====+====+====+====+====+=
| | | | | | | | | | | |
GND RX1+ RX1- Vbus SBU2 D- D+ CC2 Vbus TX2- TX2+ GND
You will note that all the pins are rotationally symmetric, so if you flip the connector, TX1+ connects to TX2+, TX1- connects to TX2-, etc. and most importantly, Vbus and GND always match up.
The trick lies in the controller and cable -- the CC pins are used to detect orientation, at which point the controller routes appropriately:
2.3.2 Plug Orientation/Cable Twist Detection
The USB Type-C plug can be inserted into a receptacle in either one of two orientations, therefore the CC pins enable a method for detecting plug orientation in order to determine which SuperSpeed USB data signal pairs are functionally connected through the cable. This allows for signal routing, if needed, within a DFP or UFP to be established for a successful connection.
As you might imagine, the cables are going to be a fair bit heftier due to the extra wires.
A minimum of 15 wires plus braid required for full-featured Type-C (i.e. USB 3.1 -- recommended 4-6mm outer diameter)
10 wires plus braid for legacy Type-C USB 3.0/3.1 cables (intended to connect to Type-A or Type-B on the other end -- recommended 3-5mm outer diameter)
For USB 2.0 or earlier, whether connecting to Type-C or a legacy type on the other end, the usual four wire configuration is permitted (recommended 2-4mm outer diameter)
Source: USB 3.1 Specification @ usb.org -- specifically, the Universal Serial Bus Revision 3.1 Specification PDF available for download at the top of the page)
Also a great blog post explaining all the details about the Configuration Channel pin:
http://kevinzhengwork.blogspot.de/2014/09/usb-type-c-configuration-channel-cc-pin.html
Archive.org (in case it goes offline)
|
H: RJ11 socket in Eagle libraries?
I am trying to add RJ11 (telephone wire) sockets to my PCB on Eagle but am having trouble finding it in the libraries. Is this a standard socket that is included or do I need to install some external library? If the latter, where can I find such a library?
AI: Sparkfun releases many of the parts used in their products in the form of the footprint and schematic symbol. It seems like they have an RJ11 connector in their connections library. You can download them from the linked github page.
As for more Eagle library resources:
Adafruit also releases their eagle parts as well, although I'm not sure if they have an RJ11 connector.
I have published and maintain my own as well, although I take great care to make sure they are correct, they are still unverified so take them w/ a grain of salt.
Generally if you can't find the part, you'd have to make it yourself. There are many tutorials explaining how to make a part in Eagle.
|
H: voltage regulators destroyed -- protection diode needed?
I have the following basic circuit:
As I was flipping the button to turn the relay on and off, I noticed sparking from the voltage meter, and it eventually caught fire, releasing the magic smoke which makes it work. On testing, it appeared that the 7805 was also destroyed.
I'm thinking that the relay was to blame here. Would adding a diode from ground to input help the situation? What else could I do to protect this circuit? (this is a controller driving an electric vehicle).
AI: I'm guessing your switch was actually in position A rather than B in the diagram below (so it switched off the meter and Arduino too). If not, it's unlikely you could get 35V+ spike to kill the DVM and 7805 since the 24V battery would absorb it. If you have a bench supply or similar rather than a huge battery, then it could cause problems.
In any case, a diode as shown will kill the inductive spike. Rating depends on the relay rating but a 1N5404 will work for just about any relay.
|
H: DC Voltage Source - circuit problem
I'm currently trying to build a DC voltage source from an AC source to a school project. The circuit worked fine when it had no voltage regulator, as it was just a transformer + full-wave rectifier + capacitor filter; the output was a DC voltage varying from 23V to 21V.
The desired output is 15V. So, the goal is to use a regulator (which is actually a 10V-Zener in this case) and a controller built using a comparator amplifier to keep the output voltage as closest to 15V as possible; there's also a NPN BJT in amplifier's output that's there to supply the needed current to the load - it's written 'Carga' on the load, which means Load in portuguese.
So, the final circuit is the following:
simulate this circuit – Schematic created using CircuitLab
The problem is that when I run the simulation and check the load's voltage, it's 15V for an interval of time and then it suddenly goes to 23V, which is the not-regulated-circuit output voltage; then it goes back and do it all over again. I guess the transistor is actually going into the saturation region of operation, and I really don't know why. The result of the simulation is in the image below; the red lines are the output voltage and the blue lines are the amplifier output voltage.
If anyone needs I can upload the .asc file (LTSpice schematic), but I guess it's just a stupid mistake I'm doing.. anyone got any idea?
I really appreciate any help. Thank You.
edit: for anyone who needs a better schema of the regulator, which is my problem: https://i.stack.imgur.com/iDpwf.png. sorry for the bad drawing.
AI: jippie's right. D2 is your problem. On the reverse cycle, you've got no regulation on the voltage/current from D2.L3's top is at "virtual ground". L3's bottom is at positive 23 volts or so. This forward biases D2. The output is the cathode side of D2 I assume. That means you've only got regulation on 1/2 of your cycle (through D1). Your regulator sees the high voltage and tries to shut it down, but the power isn't coming from the regulator side. It's coming from D2 so all it's effort to shut the voltage down is in vain.
In short, you want the cathode of D2 connected to the cathode of D1. This will force both sides of your transformer to go through the voltage regulator circuit you've created.
|
H: Simple NOR gate (transistor-level) diagram
My question here is simple:
I cannot understand how the input flows throughout the circuit. I understand the P and N type transistors; I could see why if A and B are both 0, and pass through the P-transistors, their value will be 1, and C will be 1. But I don't believe that's the right interpretation.
So what I don't get is -- what of the N transistors? I drew a red and blue path for input A, to clarify. How do I know where A goes? What should I take into account for determining the output of C?
AI: If a 0 is applied to a P gate then think of it as a short-circuit. If a 1 is applied to a P gate then think of it as an open-circuit.
Each input, A and B are both going into 1 P gate and 1 N gate each. Now let's walk through the truth table.
A=0, B=0. Both P gates are short circuits and both N gates are open circuits. Therefore C is tied directly to the upper "1" voltage and is completely separated by an open circuit from the bottom "0" voltage, C=1.
A=0, B=1. The P gate B touches is an open-circuit and the other P gate is a short-circuit. C does not have a direct path to the upper "1" anymore. Moreover, the N gate that B is tied to is now a short-circuit which will tie C directly to the lower "0" voltage, C=0.
A=1, B=0. Basically the same as the previous state. You should be able to work it out yourself.
A=1, B=1. See if you can work it out yourself to see why C will equal 0.
|
H: Identify iButton location
A friend asked me for advice regarding a lock system based on iButtons as keys.
There are some doors, and a 1-wire bus along the way, connected to iButton readers and door locks. (let's skip the complexities of turning 1-wire command into physically opening a lock, that's for a different question...)
Users are issued iButtons - one per person - and the system authorizes given iButton to open a given set of doors. Except there's a caveat: if I insert the iButton into a reader, the system will know iButton[id] has been plugged in. No info which of the multiple readers. No info which of the authorized doors to open.
So - given a single 1-wire bus, what would be a practical way to determine, where (into which reader along the bus) the button has been plugged in?
AI: You'll need to install a 1-wire GPIO chip at each reader, hooked up so that you get a contact closure when an iButton is physically inserted. Then, in addition to reading the iButton itself, you query the GPIO chips to determine which reader actually has an iButton present.
There may still be some confusion if two or more people insert their iButtons into different readers simultaneously — you won't know which one is which. But the window of opportunity for this kind of problem is small, and if it does occur, you can probably simply not unlock any doors, and let the users retry their buttons. It's unlikely that they would have the same timing two or three times in a row.
|
H: Input interrupt pin associated with TIMER1 on ATmega168
A few days ago I came across the source-code for this ATmega168 based Inductance Meter from Dan's Workshop Blog. Below is the code that I believe sets up an ATmega168 interrupt to measure an external frequency:
// set up the 16 bit timer as an external frequency counter:
TCCR1B |= (1 << CS10)|(1 << CS11)|(1 << CS12); // External clock, rising edge
TIMSK1 |= (1 << TOIE1); // Enable overflow interrupt,
// it will overflow a few times in counting frequency
I'm still studying how to set ATmegas interrupts, so I don't quite understand what that code does.
My questions are:
Does the code above determine which pin will provide the frequency to be measured? How?
Would that same code define the same input interrupt pin on an ATmega328?
From the schematic posted on the site (copied below) I can see that the pin whose frequency is counted/measured is PD5 (pin 11 on the IC). Is that correct?
(source: dansworkshop.com)
AI: Does the code above determine which pin will provide the frequency to be measured? How?
No. Timer 1 is always clocked externally on T1, which is on PD5 on the 'XX8. If timer 0 was used instead then the external pin would be T0 (PD4), and so on. Setting CSn[2:1] to 0b11 merely selects the external input, and CSn0 selects the edge.
Would that same code define the same input interrupt pin on an ATmega328?
The '168 and '328 have the same peripherals and pinout, only the memory differs (hence the "8" at the end, with the varying powers of 2). But no pin directly triggers the interrupt; it is triggered from the timer, which is clocked via PD5.
|
H: Can a Nordic Semiconductor nRF24L01+ be powered by 5V?
When I look at the nRF24L01+ datasheet, I'm confused by two apparently conflicting details.
"1.9 to 3.6V supply range" (page 1, Key Features)
5.25V maximum input voltage Vi (page 12, "absolute maximum ratings")
So, two parts of my question:
practically, can I power this chip from a regulated Vcc of 5V?
what is the difference of "supply range" and "maximum input voltage" ?
AI: practically, can I power this chip from a regulated Vcc of 5V?
No. The chip can take a maximum of 3.6V as its supply. And since its supply current is so low (<15mA) you can use one of those SOT-23 voltage regulators, so no reason not to.
what is the difference of "supply range" and "maximum input voltage" ?
You must keep its supply voltage within its supply voltage range. You can apply a higher voltage at its digital inputs, i.e. connect a 5V CMOS output to one of the chip's inputs directly.
|
H: What is 'valid signal' that router receives to indicate physical status is 'up'?
If the Ethernet interface has a cable connected and is receiving a valid signal, the physical link shows an “up” status and there are no active alarms or defects. If the interface is not connected or is not receiving a valid signal, the output shows a physical link down status and an active LINK alarm and defect.
Source: http://kb.juniper.net/InfoCenter/index?page=content&id=KB26486
What is that 'valid signal'?
AI: Link Integrity Test pulses.
They are unipolar positive-only electrical pulses of a nominal duration of 100 ns, with a maximum pulse width of 200 ns, generated at a 16 ms time interval (with a timing variation tolerance of 8 ms).
[...]
A device detects the failure of a link if neither a frame nor two of the LIT pulses is received for 50-150 ms.
|
H: Colpitts VCO by varying base voltage
I've noticed that if I build a Colpitts oscillator (audio range) using a transistor in the common base configuration (similar to the circuit here) I can vary the voltage on the base and get a wide range of frequencies. This is a very simple circuit, so what's wrong with it? All of the VCO schematics I see are substantially more complicated. I can think of several potential reasons for this. Can you identify which are the case and elaborate on why VCO designs are often so complex?
In an RF design, this might suffer from a small bandwidth - perhaps the frequency can't be modulated enough to be useful
Perhaps the frequency stability is poor, or the phase noise is bad
The frequency vs voltage could be highly nonlinear (although it seemed fairly linear to my ear - I do not have fancy instruments to measure these things)
It could be temperature dependent
The amplitude could change too much with changing base voltage
Some other reason?
AI: "Can you identify which are the case and elaborate on why VCO designs are often so complex?"
Each oscillator has to fulfill Barkhausen´s oscillation condition (Loop gain slightly larger than unity for start-up and equal to unity for continuous oscillation). This condition must be met for one single frequency only!. For most of the oscillator topologies a change of frequency (tuning of the frequency dependent part) is connected with a change in amplitude - and, thus, alters the oscillation condition.
There are only a few simple oscillator circuits that allow frequency tuning (over a relatively broad frequency band) without disturbing the oscillation condition.
Normally, as much as at least two active elements are required in those cases. However, fine tuning often is possible with basic oscillator structures because corresponding (small) gain changes can be compensated by the non-linear amplitude stabilization (if existing!).
EDIT: Some authors are using the term "orthogonal" to indicate that the described oscillator features independent control of the frequency and the oscillation condition.
|
H: Current flow through a battery
So this might be a stupid question and I really should know the answer to it but I am having difficulties with a circuit I have made to drain a battery.
The basic idea of this circuit is that I have a battery and some current sink as a load to drain this battery, this load will be triggered by a pulsing signal every 25ms and be on for 25ms, and the current being drawn is ~100mA, just in case you were interested that is.
So I left this circuit running overnight, so for about 16 hours and when I returned, the battery readings hadn't decreased at all throughout the test. Not only this but on previous occasions when I have tried to do the same thing, the battery has appeared to have gained power as the voltage readings increased over the test period. The voltage is being measured fairly often by an ADC which stores the results onto a computer so I can easily look at what's happened throughout the test.
So that's the issue I am having leading me to ask this very silly question.
How does the current flow through a battery?
So this is my very basic diagram of what I am doing.
I measured the current coming out of the battery and that was fine, but then I measured the current going 'from' ground to the negative terminal of the battery and got the same as what was coming out. I thought to myself, can current be coming from this ground pin? And I really couldn't think of the answer, probably because it's early on in the day and my mind isn't working properly yet but still it is concerning me that I do not know the answer.
In all honesty the multimeter I am using to measure this current would appear to imply that it is flowing the other way to what I have drawn in my little diagram but I think that's because it's not very good or wants to measure things in terms of the flow of electrons rather than conventional current. But I digress, that's another battle for another day, again probably me doing something wrong.
Anyway any help with any of the issues I have mentioned would be great but mainly the battery current flow would be nice, a diagram would really help me grasp what you are talking about a little bit better as well!
Thanks!
AI: 100mA pulsed at 50% duty cycle for 16 hours equates to 800mAh. If your battery had much larger than 800mAh capacity then its voltage might not drop much, and might even increase if its temperature rose or it had previously been under heavy discharge. However if you keep the circuit running for long enough the battery voltage should start dropping.
The 'ground' in your circuit is just a reference point. The only path the current can take is from battery +ve to battery -ve. Current in the wire between the load and 'ground' is flowing towards 'ground', and current in the wire from 'ground' to battery -ve is flowing away from 'ground', but no current can flow into or out of the 'ground pin' itself because there is nowhere for it to go. At all points in the circuit you should measure the same current flowing and always from battery +ve to -ve (eg. when measuring current in the wire between 'ground' and battery -ve, the meter's positive lead would be connected to 'ground').
Your diagram perfectly illustrates what the current should be doing. However it does not show the complete circuit with all components (load switcher, ADC etc.). Are you sure that this extra circuitry is not somehow feeding current into the battery? If you find that battery voltage continues to rise rather than drop then you will have to analyze the entire circuit to find out why.
|
H: Which kinds of FET have a body diode
I need to detect small high and low peaks in the battery voltage while in use. The goal is to help estimating the end of the battery charge by its change in impedance, since my circuit uses the battery in predictable cycles of high/low consumption. It's a long term li-ion battery charge (weeks usage) so other methods are unavailable or very very expensive.
So, my idea is to use a variation of the sample & hold peak detector circuit but my reset would use a FET to short the hold capacitor to vbat instead of discharging the capacitor to ground. That would help reducing battery consumption at sample resets since the capacitor only needs a small voltage jump to reset. The largest good capacitor I could find at a reasonable price is 4.7µF.
I will be taking measurements every ten seconds, so my sample and hold circuit must be very low leakage (<3mV/10s would be ideal). The thing is, if I use a MOSFET to reset the capacitor, I'm affraid its body diode's leakage could be of concern, slowly discharging the capacitor in the "sample" phase, thus altering the measurement. Unfortunately, none of the MOSFET datasheets I've read characterize the body diode's leakage, much less over the temperature range (I need 50~60°C).
So, what kind of FET is there that I could drive with 3.3V logic have no body diode, or has a documented reverse leakage below 1µA@60°C when in off state (any direction). Vbat would be in the 5~9V range.
AI: Even though the body diode in MOSFETs is often drawn as a physical diode next to the MOSFET, it's not actually a discrete building block of a MOSFET. It is a 'parasitic' element that exists inherently because of the silicon build-up of a MOSFET. There are no MOSFETs without body diodes, it's a fact of life.
That also means that this body diode isn't actually a purpose-made diode. It doesn't quite behave like either a signal or power diode and it has fairly poorly defined characteristics. However, it also means that it doesn't have reverse leakage like a traditional power diode. It's part of the entire package, so the datasheet usually defines an overall reverse leakage figure. For instance, completely random power MOSFET datasheet:
http://www.st.com/web/en/resource/technical/document/datasheet/CD00002217.pdf
Here, on page 4/13, it states a 'zero gate voltage drain current', i.e. leakage current. It has a typical and maximum value of 1 and 10µA respectively at Vds=max. That is what you have to design for.
|
H: What is the transfer function for a first order active high-pass filter
What is the transfer function for the below circuit?
simulate this circuit – Schematic created using CircuitLab
Since the op-amp has unity gain, the transfer function should be the same as a passive high pass RC filter.
This can be found by calculating the voltage across \$R\$ using the potential divider rule, in the \$s\$ domain:
The impedance of a capacitor in the S domain is \$\frac{1}{sC}\$, so the transfer function is:
$$H(s) = \frac{R}{R+\frac{1}{sC}}$$
In standard form this is:
$$H(s) = \frac{RCs}{RCs+1}$$
$$H(s) = RC * s * \frac{1}{RCs+1}$$
DC Gain: \$20log(RC)\$ dB
Gain due to single zero at origin: \$20log(\omega)\$ dB ; Argument: \$90^o\$
Gain due to pole:
at high frequencies: \$-20log(RC\omega) = -20log(RC)-20log(\omega)\$ dB
at low frequencies: \$20log(1) = 0\$ dB
with corner frequency: \$\frac{1}{RC}\$
Argument (phase) due to pole: \$-tan^{-1}(RC\omega)\$
So the complete gain is:
\$for \:\omega >> \frac{1}{RC}\$
\$|H(j\omega)| = 0\$ dB
\$for \:\omega << \frac{1}{RC}\$
\$|H(j\omega)| = 20log(\omega) + 20log(RC)\$ dB
Complete phase response:
\$\angle H(j\omega) = 90-tan^{-1}(RC\omega)\$
However, in my lecture notes it says that the transfer function for the above circuit is:
$$H(s) = \frac{s}{1+sCR}$$
Without any derivation.
Which is correct?
AI: Your expression for \$H(s)\$ is correct:
$$H(s)=\frac{RCs}{1+RCs}$$
where \$\tau=RC\$ is the time constant of the high pass filter. The most important features of this transfer function are the location of the pole (\$s_{\infty}=-1/RC\$) and the location of the zero (\$s_0=0\$). Note that the location of the pole and the zero is of course the same for the transfer function in your lecture notes. However, the gain factor in your notes is wrong. The consequence of this is that for \$s\rightarrow\infty\$ (i.e. for very high frequencies) your transfer function converges to unity gain, whereas the one in your notes converges to \$1/RC\$.
|
H: Motorised blind controller schematic - do I need to protect ICs with resistors?
I am making a simple motorised blind controller, which I want to have a "safety cut out" when it gets to its fully closed/fully open state. (So the user doesn't strain the motor keeping their finger on the button when it is open/closed.)
I'm a bit of a noob, but it seemed fairly straightforward in terms of logic.
Basically there will be a reflective IR sensor at the top, and at the bottom (level with the fully closed position of the blind). The logic is that when the user presses the up button, if the top sensor is high (i.e. the blind is in front of it) the motor will run until either they let go of the button or the sensor goes low (because the blind has passed it).
Similarly, if they press the down button, the motor will run in the opposite direction (controlled by an L293D chip) if the bottom sensor is low (i.e. not covered by the blind). Again this continues until the sensor goes low (blind has reached the bottom) or they let go of the button.
I've drawn up a schematic, and I think the logic is right, but I wanted to check if I need to protect the chips with resistors. I'll power it with a 5V 700mA mobile phone charger for the 5V supply, and I'll also need a separate 12V supply for the motor. (Will join the grounds from both).
Is there anything else I am missing, or any noob gotchas I need to be aware of?
Also - if I have made any howlers on the schematic layout / broken any major conventions, please feel free to put me straight! (Can't figure out how to attach a clearer version as it looks like it has been scaled down to fit.)
AI: Are the reflective sensors the only components missing from this schematic?
What are the reflective sensors?
Do they provide a digital output, or are they ordinary analogue parts? If they are analogue, and there are no other parts, then there are some issues.
I assume this is for window blinds, in which case, it needs to deal with the possibility of the sensors being blinded or confused by sun-light.
I'd expect to see something controlling the emitter current, to modulate the reflective sensors light source to avoid 'sun' problems. Some sensors might do that internally, but it would help us t see the part number for that sensor.
How is the reflective sensor signal derived? For an analogue sensor, I'd expect to see a resistor, or something so that the sensor can provide a voltage dependent on the intensity of light.
I'd concerned about switching logic gates with an analogue signal. I'd have expected Schmitt triggers to convert the analogue voltage to a logic level.
Edit:
I would expect to see pull-up or pull-down resistors connected to the switches.
When switches are open-circuit, they have no defined voltage on one of the pins. That voltage could be set by static, or radio reception. The inputs for many modern CMOS chips requires a very, very small current. So they could be switched by that 'stray' current.
Normally, the connection to the switch which is going to change (when the switch is pressed) has a pull-up resistor connecting it to V+, or pull-down resistor connecting it to ground. That resistor pulls the state of that connection to a known 'default' value, and hence prevents 'stray' electricity accidentally triggering the circuit. When the switch is pressed, the short circuit 'beats' the resistor and defines the voltage on that connection.
Edit: This issue is not about debouncing. The circuit might work okay even if the switches did 'bounce'. The issue is having connections from open switches with no defined voltage value. Every single throw switch must have a pull-up or pull-down resistor, to reliably define the voltage on the open-circuit wire. I might debounce the switch too.
I'd expect to see some decoupling capacitors across all of the ICs. When an IC switches, it will require a 'pulse' of current. That pulse could cause a glitch in other chips using the same power supply. To ensure stability across the whole circuit, that pulse is supplied by a small capacitor connected very close to each chip.
Edit: What is a decoupling capacitor and how do I know if I need one? looks like it covers all the bases.
I'd like to see some capacitance across the power supply input.
I'd be tempted to use one power source (e.g. 12V) for the entire circuit, and use a voltage regulator to step down to 5V. The chips only under a few 10's of mA on the logic 5V supply, so using an appropriate linear regulator should be okay.
|
H: What's the concept of these three options for configuring the memory of STM32?
I have read the STM32F10x Reference manual but a section about "Reading the Flash memory" is not clear to me, yet. I mean this part(page 59):
I have several question:
What's the Latency? in fact I cannot underestand this part "read operation programmed on-the-fly". especially "on-the-fly"!? is it a concept? Why should I configure the Latency? What will happen if I don't configure it?
Is it a type of cache? What's the usage it?
Half cycle! ok, that's clear but I want to know how it can save the power when we disable of enable it?
AI: Latency: Flash memory is slower than the CPU.
So, if you need to run the CPU at full speed (which is optional, because lower speed saves power), then the number of wait states need to be programmed. IIRC, the CPU can run without any wait states at 24MHz or below. Running at those lower speeds will save significant power in a low power application, which still running with good performance.
"on-the-fly": the CPU can adjust the clock speed while it is running.
Hence, to get the best throughput vs power, it might run at a low-clock speed to save power, while still doing work, then when needed, crank up the clock, when flash will need more wait cycles to work reliably.
Cache: the prefetch buffer is a simple type of cache.
The internal flash memory is 64 bits wide. The pre-fetch buffer is the same width, so it can hold upto 4 instructions in each of its two blocks. AFAIK it is least recently used, and hence just cycles. I imagine having two blocks simplifies the circuitry, and avoids contention between program load and instruction decode.
Half cycle: This only applies when the CPU is running at less than 8MHz
The programmers manual says:
Half cycle configuration is not available in combination with a
prescaler on the AHB. The system clock (SYSCLK) should be equal to the
HCLK clock. This feature can therefore be used only with a
low-frequency clock of 8 MHz or less.
The flash memory subsystem is fast enough to be read in half a clock cycle. That might allow the chip to optimise power use, or avoid contention between DMA or the CPU, read two instruction blocks, or maybe something else. I don't know what it actually does, and I can't remember reading about it in the manuals. I apologise for speculating; maybe a web search or query on ST's forum might find a better answer.
|
H: sinusoidal frequency doubling
In a project I'm working on, there is a need to supply satellite navigation receiver with signal from very precise external oscillator. Device, part of which receiver is, should be able to convert oscillator's 5 MHz sine wave to 10 MHz sine wave required by receiver.
What are the ways to do this conversion, without significantly reducing signal quality?
Looking for any guidance, as I know nothing about this kind of analog electronics.
Oscillator example: link.
AI: A phase-locked loop built around a crystal TCVXO or ovenized oscillator with very narrow lock range might work for you. Here's one with good specs and a few hundred ppb tuning range.
I think that to not compromise the hydrogen maser oscillator phase noise is not going to be trivial, if that's what you need.
|
H: using ICL8038 waveform generator IC with arduino uno
How do I use the ICL8038 waveform generator IC with arduino uno ? I have been trying to find apt resources but I find either the IC being used without the arduino uno or resources explaining how to use ad9850 IC ( a DDS module) with arduino. Now since I am not actually aware of how to interface the various IC's with arduino ( only used L293d motor driver before), it would be great if someone can explain me how to go about it.
Or is the interfacing with ICL8038 exactly same to that with ad9850 so I can just substitute my IC in place of it without making any changes ? (I would highly prefer using libraries, if any for the same).
Thank you.
AI: The AD9850 is very different from the ICL8038
The AD9850 datasheet describes it as:
The AD9850 is a highly integrated device that uses advanced DDS
technology coupled with an internal high speed, high performance D/A
converter and comparator to form a complete, digitally programmable
frequency synthesizer and clock generator function.
It is designed to be digitally programmable, for example by a microcontroller (the type of device in an Arduino)
The ICL8038 datasheet describes it as:
The ICL8038 waveform generator is a monolithic integrated circuit
capable of producing high accuracy sine, square, triangular, sawtooth
and pulse waveforms with a minimum of external components.
It is a free-standing device which only requires some resistors and capacitors to make a usable waveform generator. It is not designed to be digitally programmable.
There are many chips which are not designed to integrate with a microcontroller. The ICL8038 is one of them.
Given enough time and money, it is, of course, theoretically possible to interface an Arduino and ICL8038. However it uses both resistors and capacitors to define its behaviour, and capacitors are quite awkward to do. It might cost more money, and a lot more time to enable the Arduino to talk to ICL8038 than just buying a AD9850.
I'd recommend either use a AD9850, or something very similar which is designed to be digitally programmed.
|
H: Identifying this resistor/capacitor
I'm having trouble to identify this (presumably broken) part for replacement:
It was used in a broken LED power supply, with 220-240 V AC on the input and 120-200V DC on the output. I suspect this part is broken, because there is always 230 V across it. One side of it is attached directly to the mains input. Its resistance appears to be infinitely high (measured resistance up to 20M, max. range of my Ohmmeter).
It looks like a resistor, but wikipedia tells me it could be a capacitor as well (source: http://en.wikipedia.org/wiki/Electronic_color_code#Capacitor_color-coding)
I have tried to figure out the value and I came out at a 1000V - 0.05 Farads capacitor, but I find this hard to believe. Can anyone confirm?
Thanks!
AI: I'll be an outlier here and guess that it's a (blown) 0.5A "pico fuse" style fuse, and I'd be pretty sure if it's the first thing connected to the mains wire.
Break it apart you'll quickly see what its made of (and can easily rule out inductor, if there's no copper wire inside). A fuse and a resistor may not be easy to distinguish.
If it is a fuse, and if it's blown, there's a significant chance other stuff is blowed up good. Poke around and check the power semiconductors and diodes.
Edit: For those who have little experience with Asian manufacturing, here's an example of the type of fuse, mostly supplied by Chinese manufacturers:
The 'cement' finish in the OP's photo (rather than the smooth lacquer you'd expect on an inductor or resistor) is another not-so-subtle clue as to the functionality.
|
H: Analyzing/designing positive feedback amplifier
I've been searching all around to find a tutorial on analyzing/designing a positive feedback amplifier, especially a single transistor in common collector mode, but with no luck...
So, lets say I have this circuit:
simulate this circuit – Schematic created using CircuitLab
I was able to design the DC part of the oscillator, the operating point. But I just cant get my head around, how to design the AC part.
How would I calculate the values for the positive feedback capacitive divider network? Also, is there any universal way of analyzing transistor feedback circuits? I would really appreciate a step by step guide.
Thanks in advance!
AI: "How would I calculate the values for the positive feedback capacitive divider network? Also, is there any universal way of analyzing transistor feedback circuits? I would really appreciate a step by step guide."
What is your intention for positive feedback? For normal amplification purposes we use negative feedback (dc and ac). There is one application only which uses positive signal feedback: Harmonic oscillators.
Regarding an "universal way" for analyzing feedback loops: At first, you must identify the feedback loop. There are some special methods to calculate/simulate the gain within this loop. This "loop gain LG" is used to prove/justify stability properties of the circuit. By the way, this "loop gain" LG also appears in the denominator D of the closed-loop gain function (D=1-LG).
|
H: Inductor selection for a switching regulator
This is somewhat related to this question, but hopefully a bit broader.
I'm selecting components to fill out an lm2734. This regulator will take a 9-12V (11.1V nominal) input down to 5v @ 1A max. They provide guidance for selection on page 12 of the datasheet, and using the formulae there, I arrive at an inductance value of 4.9uH.
My question: what do I want directionally here (size and cost notwithstanding, and assuming the output current and DCR are correct), an inductance value that's within some percentage of the one calculated above, or just a value that's higher? Should I just be using the largest inductor I can fit to minimize ripple current?
To recheck my work, I looked at the sample circuits they provide in the DS, and calculated the inductance for them to compare to the inductor value they recommend. They seem to be taking inductor values as much as 2x greater than the formula suggests (which may also mean that I'm just doing it wrong). E.g.
for a 12V in / 3.3V out @ 1A configuration, I get 4.3uH, and they recommend a 4.7uH inductor
however, for an 18V in / 1.5V out @ 1A configuration, I get 3.1uH, and they recommend a 6.8uH part.
AI: These sorts of parts (i.e. parts with unspecified internal compensation) can be tricky because the size of the output inductor will determine the mode of operation (CCM or DCM) and the type of feedback compensation required, along with all of the other variables that have been touched on (core loss, saturation, etc.) Because of the vagueness, there are no hard-and-fast rules here; you need to do some empirical designing.
I offer some rules-of-thumb:
Choose an inductance value that will make the ripple current somewhere around 20% of the maximum load current, and the maximum switch current (DC + ripple) at least 20% below the internal current limit of the part. Many (most?) of the "off-the-shelf" DC/DC converter inductors on the market are designed with this sort of operation in mind (mostly CCM, low ripple, low ESR)
Choose (or design) a part that provides the inductance and current rating in an acceptable package size
Build the circuit and test under many corners (zero load, max load, overload, short circuit, input brownout, load transients, etc.) to ensure that the converter doesn't go unstable
|
H: LM339: why is the output +5V
The circuit diagram below is given in my book (written by Coughlin and Driscoll).
simulate this circuit – Schematic created using CircuitLab
Here it is said that, at the condition when \$ E_d=+2V\$, the output voltage will be \$V_o=+5V\$. But for an op amp, when the non-inverting voltage is higher than then inverting voltage, the output voltage will be \$+V_{sat}\$, which is approximately +15V.
Why is the output for this Op Amp IC (LM339) +5 Volts?
AI: Well, the LM339 is a comparator, not an op-amp. It is intended to compare the two input voltages and put out one of two levels depending on the result of the comparison. It is not intended to be used with feedback, except possibly positive feedback for hysteresis. The output is an open collector, and there is a pull-up to 5V, meaning that when the non-inverting input is higher than the inverting input the output transistor is OFF, and the output will go to whatever voltage the pull-up (Rp) is connected to.
|
H: Need some help learning to make my own parts in Eagle
I am extremely new to using Eagle (or creating circuits in general). I've been searching around online for tutorials on making your own parts in eagle. However, I still have a few questions and I was hoping to get some clarification.
For reference, I've been trying to build this 28-pin IC socket:
I was unable to find one of these in the default eagle libraries, so I am trying to make my own.
As far as I can tell, making a part consists of three parts: making the symbol, making the device, and making the package. I know that the symbol is simply what appears in the schematic and doesn't really have to exactly match the size or shape of the real part. I don't, however, really understand what the package and device are. I know they relate to the real part id and the size and shape of the part on the board. Can I please get some clarification on what the package and device correspond to and why I need to make them?
Also, when looking for parts using the design link, I often struggle to find the part I'm looking for. Is there a way to view the database eagle's design link is using in a browser rather than in that dialog box? It would make things much easier for me when looking for a specific part.
AI: Generally if you can't find the part, you'd have to make it yourself. There are many tutorials explaining how to make a part in Eagle.
You are correct in discerning between the three categories for an Eagle part.
Schematic symbol:
This is the representation of your part as it will appear in the schematic. It doesn't have to have all the pins represented exclusively, like say if there are multiple GND pins.
Footprint/package:
This is what the devices physically looks like and how it will appear on your circuit board. Each solderable pin must be represented here. You need this so you can actually place the part on your PCB.
Device:
This is the middle ground between the two, while you never place a device, it is how the schematic symbol will connect to the foot print in the software. You need this because a connection made in a schematic represents a physical connection on the circuit board. If you connect a signal to a pin of a symbol in the schematic editor, the software needs to know to make the same connection on the circuit board.
You'll notice, after you've made a schematic that has connections, that when you start to design your circuit board, you'll see many yellow lines, these are called "air wires" and are un-routed representations of the signals created in the schematic. In the PCB editor, you are just making the connections you made in the schematic editor a physical track that will be on your circuit board when you have it fabricated.
For this part specifically, I know this has been made and released since I use it all the time and I didn't make my own. Sparkfun releases many of the parts used in their products in the form of the footprint and schematic symbol. It seems like they have a DIL28 connector in their connections library. You can download them from the linked github page.
As for more Eagle library resources:
Adafruit also releases their eagle parts as well, although I'm not sure if they have an RJ11 connector.
I have published and maintain my own as well, although I take great care to make sure they are correct, they are still unverified so take them w/ a grain of salt.
|
H: TIVA C series launchpads for arduino programmers
I have bought a Tiva C series Launchpad TM4C1294NCPDT by TI and wish to do a project on face recognition. I will soon get a DSP EVM by TI, but still confused which one to choose (MAY be the one with 32 bit arch.)
Actually, i have quite good experience using arduino boards (and programming them in C and assembly languages).
but shifting from arduino to TIVA C and DSP's is really difficult, please help me, AND GUIDE ME.
Zeek clarified:
Ok, Being Specific these are my problems..
I am not getting the layout of the LaunchPad.
I want to do the face recognition, will the processor and DSP give me enough computational power?
I need to connect a camera (a 5MP camera to DSP) and want to control it using the MCU (TIVA-C series) how should I do it.
AI: There seems to be several different dimensions to the obstacles.
Q2: You are concerned about having enough computer power. This is a 'killer' problem to have. It may be genuinely infeasible to solve it on the equipment you have identified.
Some digital cameras use processors which are comparable to the TIVA's, and they do some still-image processing okay. However, I believe they must have plenty of memory (RAM). Any form of complex image processing will become either unacceptably slow, or practically impossible without enough memory.
The TIVA-C Launchpad wikipedia page says "32 Kbyte RAM". That is approximately 0.2% of a 5Mpixel image. Unless you have a very, very clever algorithm, I would assume it is practically impossible.
The TMS320C5515 DSP Evaluation Module uses the TMS320C5515 DSP. It has 320K, 10x more RAM than the TIVA C. That is still only 2% of an image from a 5Mpixel camera.
I would expect to have at least 2x more memory than a single image requires, plus a bit more space for the program to do work. Any less would very likely be too hard.
Have you prototyped your face recognition project on a computer system with plenty of computer power, and got it to work? Or have you very strong evidence that it is feasible?
For example is the project on a multi-core Intel, AMD, or high-end ARM, running an OS that you are familiar with. Once you have a working system, you should be able to get a reasonable measure of how much computer power is required.
I suggest this because their is a lot of evidence that trying to develop an application for a computer with barely enough computer power takes almost exponentially more time and effort than starting with a computer with 'embarrassingly too much power'. Do not be tempted to over complicate your hardware approach. Stick to single chip MCU or SoC solutions.
Once you know the project is feasible, then tackle the next part. Please update your question with more information about your experience. My current view is Funkyguy was offering good advice on how to transition to a more complex system like TIVA from Arduino. Essentially the advice was: make the transition in more than one step. Move closer to the hardware. Become confident with new tools. Travel a path which has good forum support.
Edit:
How would I choose between TIVA and the DSP?
Initially, I would not bother. Instead I'd try to get the project working on a system with 'embarrassingly too much power'. That could potentially teach me more about the project, and how to do it than anything else I could do.
I don't think there is a lot to choose between TIVA-C and DSP EVM. The DSP appears to be more computer power than the TIVA, and much more memory. Memory is likely "killer" and I don't think either has enough to make face recognition easy.
I might use a Raspberry-Pi (R-Pi) or BeagleBone Black (BB). Both have 0.5GB RAM. You could use 200MB in your app., and hold many images in memory while running your algorithm. I think both have camera daughterboards, though I think the R-Pi camera is better. Both have SD memory cards, so you could have GB's of storage holding images. In which case, you might not need a camera initially, and having lots of stored images would make testing easier.
|
H: What is the danger of using interrupt pre-emption in ARM
I am working on a system which uses about 4 interrupts. I can clearly define a priority from one to the other. For example, I feed SPI transfers with DMA requests and operate a USB interface which drives the SPI data. To this end I have prioritized my interrupts as follows (ordered from highest to lowest priority)
Systick
EXTI for handshaking signals
DMA streams
USB
Everything works great for a while and then I start seeing some odd behavior that I have not been able to determine the cause of yet, but I am wondering/suspecting if its because I am allowing interrupts to pre-empt other ones at inopportune times.
So my question is, what sorts of issues should be considered when deciding if an interrupt should preempt another, or if it should just be given a high enough priority to tail-chain.
AI: In general, interrupt preemption may cause deadlocking problems: if an interruption waits on a resource that is locked/in use by another lower priority interruption, you program may stall.
Also, a higher priority interruption may well interrupt a task which should not be interrupted if not properly protected (critical sections). When not using interrupt preemption, disabling interrupts on a given level disables all interruptions. When nesting, you may have higher priority interruptions breaking code from lower priority interruptions/code in unexpected ways.
Frankly, unless you really need to prioritize a process over another, it is useless to mess with that. Since you look like your are only chaining interdependent processes, i would only call this asking for trouble.
|
H: Check my math: Calculating the size of extension cord needed
I think I've done this right, but I don't trust myself. Will you check my math and see if I'm right about this, or correct my error if I'm wrong?
The facts
I have a device (A Yamaha Stagepas 400i sound system) that consumes 70w at 1/8 power (100v-240v 50hz/60hz)
The device needs to be used 200 feet from the nearest outlet, an outdoor GFCI 120v outlet.
Assumptions
At full power the device consumes ~800w
The outlet is delivering at least 10a
Math
800w at 120v = 6.67 amps
A 16ga copper extension cord carrying 3.4a for 200 feet will lose 10.5 volts (from http://yeroc.us/calculators/wire-resistance)
120-10.5 = 109.5v
To get 800w at 109.5v, we need 7.4a
Conclusion
Since the device will run at a minimum of 100v, and the outlet will deliver up to 10a, using 200ft of 16ga copper extension cord should be acceptable in this scenario (and a higher gauge will also work well).
AI: If you work it backwards, then the amplifier can be dissipating 800 watts with only 100 volts available at its end of the long cable.
That's 8 amperes the amplifier will need, and if there's 120 volts at the socket and 100 volts at the amplifier's end of the cable, the maximum allowable cable resistance will be
R = (120V - 100V)/8 ohms = 2.5 ohms.
Since the cable will be 200 feet long, that'll be 2-1/2 ohms for the 400 foot round trip, which is 6.25 ohms per 1000 feet.
16 AWG has a resistance of 4.016 ohms per 1000 feet, so it would work.
But, since the cable itself will be dissipating about 20V * 8A = 160 watts, it'll heat up a little, increasing its resistance, and if it's lying in the sun it'll get even hotter, increasing its resistance even more.
So, just for insurance I'd bump the cable up to 14 AWG or even monster 12 AWG if there was a chance I'd need it later, and I'd do the math just for fun. Just not now... ;)
|
H: ARM cancel execution of pre-empted interrupts
I can't seem to find an answer to this in google or the Definitive guide...
Is it possible to from one interrupt, cancel the return to any pre-empted interrupts? For example, I have an ISR which is called when an interrupt driven process needs to be aborted. Presumably, I will have been in an ISR when this interrupt is triggered, so I would like to reset the state of my state machine and cancel the completion of the previous state processing since there was an error. I know I could set a volatile flag but then I would need to check it constantly in the normal process code. I would prefer a much more direct, deterministic way to cancel the pre-empted interrupt.
Additional Information from the comments
I have a 2 processor system with an SPI command/control bus. The slave waits for a command from the master, then executes it and sends a response back. This is driven with some handshaking signals since the STM32F4 series has a useless hardware CS design. The problem I am experiencing from my other question is that after some time, the data returned to the master from a command is complete nonsense (specifically the last value received by the slave x transfer length). The master is able to detect this error and sends an abort signal. When received, I want the slave to cancel its DMA/SPI transfer, and return its state machine to waiting for a command. I can accomplish resetting the state machine no problem, I just want to make sure that when the abort ISR exits, it does not return to continue a DMA or USB ISR which is no longer valid.
AI: I am concerned that the question implies that the there is something complicated inside the system. That complication might make this even more difficult than it sounds!
I recommend trying Mishyoshi's answer first. It focuses on a cleaner, less intricate, easier to build and test solution.
However, I'll try to give an overview of the way 'aborting' and interrupt service routine might be done, so that folks can judge for themselves.
From a purely technical perspective, it is possible to 'abort' an 'outer' interrupt service routine (ISR) which itself was interrupted to reach 'this' 'inner' interrupt service routine in specific cases, for embedded (Cortex-M processors). However it is a bit tricky, maybe very hard to debug and make robust, and will need some good assembler and hardware debug skills.
A 'simple' technique relies on the 'outer' ISR never ever, under any circumstances calling any functions. If that is not a feasible guarantee then it gets much harder. Put another way, this will work if and only if the 'inner' ISR is always and only called while executing code within the body of the 'outer' ISR, and never in a function called by the 'outer; ISR
It will also get more complex if there are two processor stacks. It is still feasible, but more tricky.
Background:
An ARM does not store the return address of the current running function or ISR on the stack.
That return address is stored in the link register called 'lr' or R14. The only way to update the LR register is with assembler. IIRC might not be as easy as it sounds as some compilers will reload LR after your inline assembler has done its business, or maybe whine.
The return address for the outer function or ISR is on the stack somewhere. Finding that and loading it into the LR will do some of the work to abort the 'outer' ISR when the inner ISR returns.
The other problem is tidying up the stack, and resetting the stack pointer. If that isn't done correctly, the return from the 'outer' ISR can not be simulated. The effect might be subtle with calculations going wrong, pointers damaged, loops wrong, etc. This will need assembler skills and good 'hardware debugging' skills to ensure it is tested and working.
If this isn't exactly correct stack memory might 'leak'.
Do you want me to proceed, i.e. does this sound feasible for you folks to write and debug? It is still quite involved, and I have limited bandwidth.
I would recommend getting a copy of The Definitive Guide to ARM Cortex-M3 and Cortex-M4 Processors by Joseph Yiu ASAP if you don't already have it. It explains some of this stuff.
|
H: Could my Cell Phone Battery be degrading?
I've noticed that if I recharge my cell phone battery to 100%, then take it out, and put it back in and put the phone back on charging, it resumes charging the battery and continues to do this for upto 30 mins, despite having just received a 'battery full' message about 30 minutes ago.
Why does this happen? Is this normal or does this indicate that the battery is degrading?
It is a Li-Ion battery.
AI: Your battery is degrading from the charging station. The person whom makes your charging station probably expects you will use it before placing it in. They are then pumping a top-off charge into for 30 minutes when, although it did self discharge a little in those couple seconds, it should not get one.
It is possible the charging station is pumping way too much charge, but I am hoping the system can recognize it is almost done charging and go to slow-charge. From battery university about lithiums:
No trickle charge is applied because
lithium-ion is unable to absorb
overcharge. A continuous trickle
charge above 4.05V/cell would causes
plating of metallic lithium that could
lead to instabilities and compromise
safety. Instead, a brief topping
charge is provided to compensate for
the small self-discharge the battery
and its protective circuit consume.
Depending on the battery, a topping
charge may be repeated once every 20
days. Typically, the charge kicks in
when the open terminal voltage drops
to 4.05V/cell and turns off at a high
4.20V/cell.
There are phases to charging a lithium battery, as show in this picture:
http://www.batteryuniversity.com/images/partone-12.gif">
I have seen charging circuity before, when I have helped students build these, that will start with the heavy current phase and test the voltage, this means that if you unplug and plug in you can degrade the battery significantly.
|
H: Recommendation for a USB digital simulator
It's becoming quite frequent to me having a new digital subsystem which I want to test in isolation before trying to make a prototype circuit. I've been using the digital analyzer by Saleae for inputs, which is quite handy, but I'm wondering if I could find or build its counterpart. Ideally it would be a device to plug in an USB port, would have many digital outputs (let's say 20 or more) and would come with software that would enable me to do a playback from a prerecorded file, or generate the output with a program or script.
Does anyone know about such a product, or have guidelines to build on my own?
AI: The product you're looking for is a digital pattern generator. While this one is overkill for your specification, it's the one that I'm most familiar with. It'll probably set you back about $12-20k for a full setup.
Basically their setup is a FPGA hooked up to a bunch of RAM driving 16 logic outputs. It's really fancy because you can set the frequency and output voltage of the module. Cheaper, slower, and less-flexible modules should be available from someone else.
|
H: How to use multiple terminal surface mount chips in amateur project?
As you can probably tell from the question I am a beginner in the embedded world. The extent of my experience is some playing around with C and assembly using the Arduino. I'd like to make the jump to the more complex embedded chips that use surface mount device package types rather than through hole device package types. How does one integrate them into an amateur project?
Are there breakout boards or CPU sockets for them? I was particularly thinking about Motorola ColdFire devices or ARM Cortex M3 devices. Apologies for the question but I'm somewhat lost by the vast array of devices on offer and just need a starting point really.
AI: For SMD there are adapter boards SMD-to-PTH, like
Soldering the parts takes some exercise. You may want parts with a 0.8mm pitch instead of the higher density 0.5mm pitch. The latter you'll find mostly on devices with 48 pins or more.
The other option is that you design your own boards for which you need an EDA (Elecronic Design Automation) package like Eagle. This has a free version with limitations, or a full version which has to be payed for. This design has a long learning curve. When you designed stuff this way you have to option of etching your own board or have it produced by a PCB production shop. The latter is the best choice for quality, the DIY is cheaper and faster.
For starters I recommend the adapter boards I mentioned at the beginning of this answer.
|
H: Pic-PC (Crossplatform) USB interfacing without writing custom drivers
I'm planning to use a PIC for a MIDI pedal that can be configured from a PC (through USB). Is there a way to do crossplatform (at least mac/windows, better if also linux) USB in userland (or another way to avoid the hassle of writing a device driver)? I know there's libUSB but I want to know if there's a better solution.
Microchip own drivers are windows-only, if I'm not wrong.
Thank you.
AI: The major thing you want to do is get your device to use drivers that are already there.
The USB HID specification allows you to tunnel through drivers that are of a standard type and already available on the system.
To my knowledge Windows/Mac/Linux all have this.
|
H: Getting higher power output by using more resistors
Is there anyway I can connect resistors to allow them to take more power such as using 4 1/4 watt resistors to get a 1 watt resistors. Or do i just have to use 1 1 Watt resistor.
AI: Yes, you can use (4) 0.25 W resistors to dissipate 1 W and still remain within each individual resistor's power rating. This can be accomplished a few different ways:
Place them all in series:
In which case you will need to use resistors with 1/4 the resistance that you want overall.
e.g. If you want 1 kΩ total, put (4) 250 Ω (240 Ω nearest 5% standard) resistors in series.
Place them all in parallel:
In which case you will need to use ones with 4 times the overall desired resistance
e.g. If you want 1 kΩ total, put (4) 4 kΩ (3.9 kΩ nearest std.) resistors in parallel.
Placing them in a 2x2 array:
Where you can use resistors of the same resistance you want overall (2 in parallel gives half, but you place 2 sets of parallel in series, doubling the effective resistance)
In all the mentioned cases, in order to have each resistor dissipate an equal share of power, they all must be equal in value (ohms). This isn't the only way to do it, there are several other combinations you could use with differing values, etc.
Pragmatically, if you're only operating this circuit very intermittently (few seconds at a time), you might be able to get away with a single 1/4 W resistor, especially if this is on a breadboard (be careful not to melt stuff). Higher power resistors often are specified to survive surges of 8-10x their normal power dissipation for several seconds, though the typical 1/4 W thru-hole resistors are carbon film, which is a little less tolerant of this.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.