text
stringlengths 83
79.5k
|
---|
H: Why do we still use cable for a lot of forms of data transmission?
Like many people I'm often annoyed by ugly cable clutter, especially when it's long distance. In my opinion it would be ideal if cables could be eliminated altogether, so that you'd just have two corresponding plugs without the cable, which you plugin at either end and transmit their information wirelessly.
Maybe that would be a little futuristic for now, but what about transporting data over a wireless computer network (or two paired bluetooth transmitters)? That's perfectly possible, and all you'd need is a little box that can convert data to a format that can be transmitted over a wireless network, and a box that converts it back to the appropriate format at the other end. Over time this technology would surely be miniaturized until it fits in a plug. (you could use this for HDMI, audio or other information for example)
Why doesn't this technology exist already? Am I overlooking something, or are there some difficulties with it that have to be solved first?
AI: Wireless technology is great and can be used in all sorts of scenarios but it's complex and hard to design for. Wires are in fact superior in many ways.
( Taken from: Essentials of Short Range Wireless Standards )
With wires:
Range is not an issue - just add more cable
Latency is excellent - what goes in one end appears immediately at the other
They're transparent to data protocols and formats
Throughput is excellent
No issue with security - you know what you plug it into
Interoperability is excellent, At most, you only need to change the plug
Power consumption may be higher, but the cable can carry power
They can be specified on a single page
Topology is simple - it's typically one-to-one
Robustness to interference is generally a minor issue
Backwards compatibility is normally no more difficult than changing a plug
There's generally no license agreement, no qualification requirements and export controls
|
H: opto isolated arduino input
I want to protect a pin with an opto isolator to get an external signal from an electrical meter (35VDC max, 50mA max, 240ms pulse width). The purpose is to count the pulses.
Do you have some schematics examples for that ?
Thanks
AI: This shouldn't be too hard:
Vcc is the +5 V Arduino power supply, Vout goes to an I/O pin.
Important parameter for an optocoupler is its CTR (Current Transfer Ratio), comparable to HFE for a transistor. But where HFE is often around 100 for a general purpose transistor, it's often less than 1 for an optocoupler, and therefore often expressed as a percentage, like CTR = 50 %, which means that you get 5 mA out for 10 mA in.
You seem to have enough current available, but we won't need it all. The CNY17-2 has a CTR of 22 % min at 1 mA input, so we can get 0.22 mA out. The Arduino works at 5 V then the pull-up resistor should be minimum 22.7 kΩ to allow the transistor to pull the output low. You can even go higher but then you'll have to keep an eye on the transistor's leakage current. The CNY17-2 has a low 50 nA for that, so that won't cause any trouble. There's also a maximum 1 µA leakage into the AVR controller, but even that will only cause a 100 mV drop with the transistor off, so that's safe.
The 100 kΩ also would mean that you only need 50 µA output current to pull the output low. At 1 mA input we had 220 µA out, so everything is peachy. For 35 V input and a maximum voltage drop across the LED of 1.65 VR1 should be maximum 33 kΩ.
You'll have to check what the current will be at the minimum input voltage with this resistor value. For instance if the input voltage can be as low as 12 V then you need maximum 10 kΩ.
The anti-parallel diode protects against reversed connection, and can be any diode, like a 1N4148.
Note: Darlington output optocouplers like Oli's 4N32 have a much higher CTR, but it looks like we can do without that, and Darlington devices are more expensive: the 4N32 is twice as much as the CNY17.
|
H: how to charge a steel ball
I have a 2 mm radius steel ball and I want to charge it in a 0.025 Coulomb charge. Can I do that domestically or the charge is too high? And how can I do that assuming I don't have another conductive material that I know it's charge?
AI: Not if you value your life!. The capacitance of a sphere is given by :-
\$C=4\pi\epsilon_0R\$
The voltage on a capacitor is given by :-
\$V=\dfrac{Q}{C}\$
Putting your figures into those equations we find that the capacitance of your sphere is about 0.22pF and the voltage required for that much charge would be 110GV!
Edit ...
If you had another conductive object, you could make a two-plate capacitor in which case the required voltage could be much lower, so in theory you could charge a two plate capacitor using a much lower voltage, then move the other plate away and this would leave your original sphere charged, but this charge would soon leak away.
|
H: Low threshold N-channel MOSFET
I have a circuit which does something not important, but it results in an output being normally low, and then on activation climbs to a little below Vcc. At the moment, it appears my Vcc is 1.8 V and the signal gets up to between 1.2 V and 1.4 V. I want to use this signal to control the gate of an n-channel MOSFET which is grounded on the source and has the drain tied to Vcc through a large resistive load.
The problem is the threshold voltage of the standard MOSFETs I have appears to be too high, and I have to raise Vcc to about 2.2 V in order to get the circuit to trigger the MOSFET correctly. Are there better MOSFETs for this situation or some other design idea that would work well and solve my problem?
BTW, the switching speed is not really a consideration... we're talking 1-200 Hz for frequency.
Application Note, see page 3. I was hoping I could just use their circuit exactly and just mess with the tuning component, but it doesn't seem to work at 1.8 V.
AI: Go to eg Digikey
(1) CETSEMI make some superb parts. Available in NZ via agents. May be hard to find in US.
Example CETSEMI CEM8208
20V, 7A dual MOSFET. See graph below. At Vgs = 1V and 25C it will handle about 500 mA at OK Vds. Warmer is better :-).
(2) Search favorite sources for MOSFET N Channel logic
eg Digikeys MOSFET N Channel logic search results.
Select single MOSFETS.
Select Vgth range desired - say up to 400 mV.
The following are all under $1/1 at Digikey (last getting a bit dearer).
The BSH103 may do although a bit unhappy at low low Vgs
NTJS3157 - better
Better - Si4836Dy
http://www.onsemi.com/pub_link/Collateral/NTJS3157N-D.PDF
(3) Bipolar NPN will do this with ease. For super low Vsat drive base at much higher current than collector. eg if you have 10 uA collector current then eg 100 uA or 1 mA base current will give much lower than usual Vce_sat.
|
H: Using a pc power supply, any risk to electronics?
Possible Duplicate:
Choosing power supply, how to get the voltage and current ratings?
I have a pc power supply which I modded to use as one for my projects. It's really cool, and I love it.
I just have a question though. Say I am using the 5V port with a device like a regular old dc motor. Can I connect the motor directly to the power supply without regulating it in some way?
What I am trying to say is that the power supply is capable of delivering high current, so are there devices which will actually try to take as much power as possible just because it is available? If so, do I have to control this in any way?
AI: A common misunderstanding. No, a 10 A supply will only deliver 10 A if the load asks for that. If you connect a 1 kΩ resistor between the 5 V output and ground, then, due to Ohm's Law there will be a current of 5 V/ 1000 Ω = 5 mA. The resistor doesn't care about the 10 A, it only cares about Ohm's Law. Even a 5 kW supply, able to deliver 1000 A at 5 V won't hurt the 1/4 W resistor.
Depending on the motor's power you can connect it directly because the 5 V is regulated. You may want to decouple the motor though, by placing an electrolytic capacitor in parallel with it. The value depends on the motor's current.
|
H: Does the capacitor dielectric experience heating due to rapid charge/discharge cycles?
Does the dielectric in a capacitor when subjected rapid charge/discharge cycles heat up?
AI: Yes, but only to the extent it is not a perfect capacitor. A perfect capacitor is not capable of dissipating energy, which means it can't be heated by the current thru it since that would represent a loss.
Real capacitors have a spec called equivalent series resistance, or ESR. That is various physical factors lumped together. You can for most purposes think of the capcitor as ideal with a series resistor of the ESR value. A resistor dissipates power proportional to the square of the current thru it.
Real capacitors can get hot with sufficient current and can eventually fail as a result. Electrolytics are particularly susceptible to this. Not only is their ESR high relative to other cap technologies, but they are more sensitive to high temperatures. Some electrolytic capacitors are specifically designed for higher currents, such as the Panasonic FK series. Look at the FK series datasheet in comparison to other types and you will see the FK can tolerate higher ripple current. They are also somewhat physically bigger and more expensive than the other types.
Ceramics generally have very low ESR, but it's not zero. I once got a ceramic disk capacitor so hot it hurt to touch it, and that was at only 1 MHz. (Maybe the 10s of volts from a RF transmitter I was putting accross it had something to do with it :-) )
Dielectrics store energy in the D field by sloshing electrons around at least a little bit. Some also flip atoms between different energy states. Any time you move energy around, even at the scale of a few atoms, there is the opportunity to lose some of it as heat. Some ceramics lose less than others, and ceramics as a whole lose very little, but they all lose some.
Air capacitors don't lose any power in the dielectric since there isn't any (basically vacuum), but unless the leads and plates are superconducting there will be loss there as charges slosh back and forth.
|
H: What's the difference between field-effect transistors (FETs) marketed as switches vs. amplifiers?
For instance, the J108 JFET is listed as "N-Channel Switch", and the datasheet mentions the RDS on resistance, while the J201 JFET is listed as "N-Channel General Purpose Amplifier" (and the on-resistance would have to be deduced from the IDS curves?)
Is there a difference in the way these are designed and manufactured? Can one type generally be used in the other application, but not vice versa?
Related, for BJTs: What's the difference between small signal bipolar junction transistors (BJTs) marketed as switches vs. amplifiers?
AI: There are various choices that can be made in the design of transistors, with some tradeoffs being better for switching applications and others for "linear" applications.
Switches are intended to spend most of their time fully on or fully off. The on and off states are therefore important with the response curve of the in-between states being not too relevant.
For most applications, the off state leakage current of most transistors is low enough to not matter. For switching applications, one of the most important parameters is how "on" on is, as quantified by Rdson in FETs and the saturation voltage and current in bipolars. This is why switching FETs will have Rdson specs, not only to show how good they are at being fully on, but because this is also important for designers of the circuit to know how much voltage they will drop and heat they will dissipate.
Transistors used as general purpose amplifiers operate in the "linear" region. They may not be all that much linear in their characteristics, but this is the name used in the industry to denote the in-between range where the transistor is neither fully on nor fully off. In fact, for amplifier use you want to never quite hit either of the limit states. The Rdson is therefore not that relevant since you plan to never be in that state. You do however want to know how the device reacts to various combinations of gate voltage and and drain voltage because you plan to use it accross a wide continuum of those.
There are tradeoffs the transistor designer can make that favor a more proportional response to gate voltage versus the best fully on effective resistance. This is why some transistors are promoted as switches versus for linear operations. The datasheets then also focus on the specs most relevant to the circuit designer for the intended use.
|
H: What should I look for when shopping for an ESD bench mat?
I would like to get an anti-static mat for my bench top and found these two:
DigiKey: Table mat ESD blue 2X4' rubber
Mouser: Antistatic Control Products 2X4' blue table mat
What should I look for when shopping for an ESD bench mat?
AI: ESD precautions:
I would like to get an anti-static mat for my bench top
Buy the cheapest one in the size you need.
Suitable materials for ESD desktop sheets: Any somewhat conductive sheet of material that is grounded via a 1 to 10 megohm resistor will work as an anti electrostatic work surface.
(Sheets with very low resistance per square risk conducting current when PCBs etc with exposed terminals are placed on them. (Ask me how I know :-) ).
Sheets need not be more than a trace conductive, although very conductive sheets will work. eg a thin sheet of galvanised steel would work well but be immensely inconvenient and potentially very dangerous as it allows instant conduction from anywhere on a work bench to anywhere else.
Better cheaper faster ... A potentially much cheaper than "real" solutions product is Butyl Rubber sheet sold for roofing and pool liner purposes. The conductivity in this material is caused by carbon-black which is integrated in the rubber and it is wise to check that at least some conductivity is present. Take an ohm meter set to say 10 megohm range with 2 sharp probes. Press probes into sheet just not touching so that probes penetrate sheet surface. If there is even a trace of resistance measurable then the sheet will work as an anti ESD sheet. Results may vary from megohms to a kilohm or so depending on carbon black loading.
Measured resistances: Notionally the "resistance per square" of a sheet of conductive material is the same at all scales so the resistance across say the diagonal of a square of material should be the same for a square of any length side. So if a 1cm side square measures 100k across the diagonal then so too should squares of 10cm or 100cm or 1m length sides (given the same thickness in each case). In practice results may vary somewhat, but this is a good enough gyide for ESD purposes - if you can see a reading in the megohms of less range at any distance (small or great) the sheet will probably work OK.
Wood: An older worn wooden desk will probably be an adequate ESD protective surface in its own right. A new coat of varnish may destroy this. An older wooden floored building will also probably be ESD safe. A new concrete floored building will not be and linoleum or carpet add their own potential problems.
Carpet: Some carpets generate enough "static electricity" to cause user shocks from sparks generated. Your electronics will die even when you just wave your hand near them if not well protected. Use of an antistatic spray on the carpet may stop users receiving shocks but induced voltages may still destroy ICs.
Especially sensitive devices include: LEDs, Schottky diodes, GaAs devices, MOSFET gates, unprotected CMOS, Gunn diodes (who?). Many modern devices have ESD protection built in - especially those which are especially sensitive if unprotected, but suitable care should stoll be taken. I have seen less sobvious ESD damage over decades than the salessmen would have led me to expect BUT I have seen certain ESD failures and in some cases could virtually guarantee device failure by following ceryain unsafe procedures.
Safety: Mats and wrist straps should have a high value resistor - usually 1 megohm but not critical - to avoid grounding users for power voltages and so creating a shock hazard.
|
H: Two same ADCs produce different result for same signal
I have two ADCs (the model AD9248BST/BCP-65, with the default configurations, not "cross-calibrated"), that are feed the same constant point-to-point voltage. The returned values, however, differ by an order of 7 bits.
The datasheet (see page 3) specifies that the effective number of bits is 11.8, so I should expect noise in the difference to be of the order of 2.2 + 1 = 3.2 bits.
What could explain that the difference between the two ADCs is greater than expected?
AI: I see a very large number of error sources in the data sheet.
Some are mutually inclusive, some are not.
There are 3 IC variants in the data sheet with different error levels and you do not say which you are using.
You do not say what the input voltage is or what voltage reference you are using or if you have cross calibrated these devices in any way.
Assuming 1V in pp and internal reference in own IC in each case then reference error is +/- 5 mV typical and +/- 35 mV worst case. 5 mV in 1V is 1:200 or about 1.2 bits in an 8 bit system or about 7 bits in a 14 bit system, and the worst case 35 mV is log_2(35/5) ~= 3 bits worse again = 10 bits, so "only" 7 bits, before we look at the other error sources seems "good" [tm].
It may be that you are sharing a reference (if not, do try it) or calibrating for reference or other errors or whatever, but if so you need to tell us.
|
H: Arduino/Atmega with TIP120/121/122 transistors: base current question
I am learning about transistors, and can't seem to find the answer to a few questions which are stumping me. I will be referring to the TIP120/121/122 Darlington Transistor.
As I understand transistors so far, I need to apply a current from
my Arduino to the base of the transistor in order to allow current
to flow between the collector and emitter. What I don't understand
is how a microcontroller is used with the transistor in so many
projects and tutorials. The arduino and other atmegas give ~50mA out
of their pins, but according to the data sheet, the TIP needs 120mA
at the base. On top of that, a resistor is used between the pin of
the microcontroller and base of the transistor, which I would assume
reduces the current going into the base even more. So what's going
on here?
I want to experiment with these transistors, but noticed that the
TIP120 and 121 are more expensive than the TIP122. I am curious to
know why this is, because as per the data sheet, it seems the TIP122
can handle higher voltages (which I suppose is a good thing), with
all other things pretty much the same. So is there a scientific
reason for this price discrepancy and is there any reason I should
select the TIP120 over the 122 to use for my microcontroller
projects?
AI: The TIP120 does not need 120mA at the base for normal operation, that's the absolute maximum rating, above which you don't want to go.
The spec you are mostly interested in is the hFE (current gain), which for a darlington is very high, since it's two transistors connected in a way so the current gains multiply.
For the TIP120 it's given as minimum 1,000 (compare with a typical 200 for a single bipolar transistor)
Also important are the max collector current (5A) and the collector emitter voltage (60V)
The main disadvantages are that the base-emitter voltage is doubled compared to a single transistor (~1.4V), and the saturation voltage is higher (typically ~0.8V compared to ~0.2V at low currents)
These points are rarely a problem for a simple switch driven from a micro pin. At higher collector-emitter currents though, the Vsat rises and can interfere with desired operation and cause problems with dissipation.
For example, in the TIP120 datasheet note that at 3A Ice, Vsat is given as 2V, but at 5A it has risen to 4V. That's 20W of dissipation, a lot to heat to try and get rid of to keep the temperature down. So when switching a large current you need to take these factors into account, and maybe decide to look at a more suitable part (e.g. logic level, low Rsdon power MOSFET)
Since we have a gain of 1000, we hardly have to draw anything from the micro pin. Let's say we want to switch 1 Amp:
1A / 1000 = 1mA into the base needed.
If we have a drive voltage of 5V, then we subtract the Vbe from the drive voltage and divide by the current:
(5V - 1.4V) / 1mA = 3.6k resistor. To give it a bit of leeway select something a bit smaller like 2.2k. This still only draws ~1.6mA.
I wouldn't read too much into the different prices - the price of components is often dictated by how popular they are, the more they sell the less they cost. If you see better specs at a cheaper price, go for it ;-)
You can some pretty odd prices when the component is scarce/new/obsolete - I saw a 10uF ceramic capacitor priced at £7.50 (qty 1) on Farnell the other week...
|
H: What's the difference between small signal bipolar junction transistors (BJTs) marketed as switches vs. amplifiers?
For instance, the MMBT3904 and MMBT3906 BJTs are listed as NPN/PNP Switching Transistors, and the datasheets mention the switching times, while the BC846 and BC856 BJTs are listed as NPN/PNP general purpose transistors (and the switching speed would have to be deduced by looking at the transition frequency ft?)
Besides the obvious (higher ft for switching transistors): Is there a difference in the way these are designed and manufactured? Can one type generally be used in the other application, but not vice versa?
What about things like miller capacitance, linearity and noise?
Are there certain tricks in the geometry on the silicon, or concentration of dopants?
Related, for FETs: What's the difference between field-effect transistors (FETs) marketed as switches vs. amplifiers?
AI: From what I remember in reading through the Motorola transistor data book a few months ago, switching transistors, as you stated, have a faster ft and because of this, they have a smaller linear region. Small signal transistors have a slower ft, but a larger linear region. I recently took a VLSI class that unfortunately only focused on MOSFETs. From this, I can only assume that the length of the N region in n PNP or the length of the p region in an NPN in a switching transistor is smaller so it's easier to make the depletion region large enough to make the transistor conduct. I would also assume the opposite is true for small signal transistors.
|
H: What are the differences between a gyroscope, accelerometer and magnetometer?
What is the difference between a 3-axis gyroscope, 3-axis accelerometer and 3-axis magnetometer? How do these sensors work? Why are all 3 used in some devices like smartphones, tablets, quadcopters etc.?
AI: They are three sensors that are useful for determining position and orientation, but they measure different things.
A magnetometer measures magnetic fields. Because the earth has a significant magnetic field, the magnetometer can be used as a compass. As such it is useful to determine absolute orientation in the NESW plane.
An accelerometer measures accelerations. This is useful to measure changes in velocity (directly, as the acceleration is the first time derivative of the velocity) and changes in position (by integrating the signal). They are usually used for measuring small movements. Also note that gravity acts like a continuous acceleration upward (via Einstein's equivalency principle), so a multiple-axis accelerometer can also be used as an absolute orientation sensor in the UP-DOWN plane.
A gyroscope measures either changes in orientation (regular gyro or integrating rate gyro) or changes in rotational velocity (rate gyro).
The reason these sensors are combined is because they excel at different things.
For example, for orientation, a magnetometer has poor accuracy for fast movement, but pretty much zero drift over time. An integrating scheme using gyros on the other hand reacts quickly and accurately to changes, but accumulates vast error over time. It also requires to start from a known orientation, as it only reacts to changes.
Combining the inputs to these sensors allows for quick and accurate position and orientation determination with a low amount of drift over time.
Together, these sensors are also referred to as an Inertial Measurement Unit, or IMU. You can find more information on the wikipedia page for this term. Note that the unit is not strictly speaking purely inertial when you add magnetometers, but this nomenclature is widely used.
|
H: How to make a device that keeps water in sink and bath at desired temperature?
I have tight taps in my sinks and bathroom which are difficult to control — it's either too hot or too cold and never easy to manually set the preferrable temperature. I'd like to solve this old problem electronically.
I figure I'd need (per sink) a temperature sensor, at least two motors (with belts to wrap around each valve, I don't want to interfere with the insides) and a device that polls the sensor several times per second and rotates the motors. I'd like to keep it simple and cheap.
AI: You are most likely looking for a so called "PID controller". You can either build one yourself (with a PIC (AN964 Implementing a PID Controller on PIC16F684) or AVR (AVR221: Discrete PID controller), or get one like osPID.
A PID controller uses a control loop to feed back its output to its input (aka closed loop system). This way it checks constantly for any deviation in the (output) state/variable and tries to correct it. The output characteristic can be Proportional, an Integral, a Derivative of the input, or any (scaled) combination of the three.
|
H: AC-DC converter, transformer modification how-to
I would like to wire an AC-DC converter based on a datasheet schematic. I try to describe my problem. I would like to increase the max current output. The AC->DC converter has a bjt driving a transformer at about 10 khz. I can manage how to change that driver to supports higher current, but how change the transformer ? I've got the information for the transformer wiring at 1 A output. There is also a feedback coil on that transformer, that I suppose it is not necessary to change, am I wrong ?
Here is the schematic I'm talking about.
EDIT
Maybe we can generalize this question, how to design transformer for AC-DC converters ?
AI: Simple:
More power will require a bigger core.
Look at their other reference designs for guidance.
IF you could use a higher frequency you could get more epower from the same core BUT the IC used is fixed at 72 kHz.
iW1677 offline PWM controller data sheet here.
Other datasheets from same manufacturer here
The other ICs with similar functionality also seem to use similar or lower frequencies (sample only checked).
Core volume is about inverse linear with frequency, can change drastically with topology - if energy is stored in the core then core size and power handling are linear (flyback, boost, ...) while if the core is used in the "forward mode (forward converter, push pull, ...) with the core storing magnetisation energy but not storing all the power being transferred per cycle then the energy per core size can be greater.
In flyback designs, which the examples below both are, the energy is stored in the core on the input half cycle and delivered to the output on the next half cycle. (I say half cycle in each case but each part cycle will probably not be of equal duration). The core is driven until the ampere turns of magnetisation (amps x number of primary turns) is such that the core just starts to "saturate". This is the limit beyond which little or no extra energy can be stored in the core.
You can assume with good likelihood of being correct that the designer has used the core to near it's full ampere-turn capacity, so that you will need a larger core to get more power.
The easiest solution is to look at the other reference designs from the same manufacturer.
Their EBC10007 reference design is rated at 2.1A at 5v, or slightly more than double your chosen example .
Your 003 design uses Core: EEM12.4 (ferrite material TDK PC40 or equivalent)
The 007 design uses Core: EPC17 (ferrite material TDK PC40 or equivalent)
The photos in the design documents make the difference in core size clear and you will be able to search for core dimensions. Topologies are essentially the same in both circuits - look at the coil dottings on input and output coils - when Vin has +ve applied to the primary dot the undotted secondary connection is applied to the output diode so it is not conducting SO the energy must be stored in the transformer SO this is a flyback converter in both cases.
Note that the 5W design uses a bipolar transistor and the 10W design uses a MOSFET driver (Q1 in both cases) and there are other differences, but the general guidelines provided by these examples will be about right.
You should do your own research to confirm the TDK core sizes, but the following appears very liable to be useful:
TDK EEM12.x from here.
The number after EEM appears to be the major core dimension - see data sheet.
TDK EPC17 from here
TDK EPC17:
|
H: Sync video with data
When I have a datalogger and I want to sync a video-file to the recording, what would be an easy method? The logger and the camera both have an internal clock, but they may not be set exactly to the same time, so I cannot use those timestamps to sync the start, and during long recordings they may drift apart.
The solution seems to be to let the datalogger record an extra sync-signal, but what should this channel contain (no. of frames?) and how do I get this information from a regular camera?
AI: Often, cameras can pick up infrared, so if a visible-light LED is out of the question (i think it could be quite dim and unintrusive), IR LED might be another option.
|
H: Difficulties of I2C over wire
I want to link a PIC16F1825 and a TCN75 temperature sensor via I2C. The temperature sensor is about 1m from the MCU. Can somebody enlighten me on whether and what kind of difficulties I am going to face by running I2C over wire? I read that I2C can be quite noise sensitive especially at higher rates and longer distances.
How much of an issue is this really going to be in practice in my case? Does anybody have any experience under similar conditions? I am quite happy so stick with slow transfer rates.
Link will operate at 5V.
What can I do to make this link as simple in design as well as operation as possible?
With standard non-TP signal cables I will not know their capacitance. How do I calculate the pull-up resistors?
Will I need any pull-up resistors or is the PIC16 pull-up current sufficient?
Alternatively, can somebody point me towards an AN that will help me with I2C over wire?
AI: You definitely need external pull-up resistors. The internal pull-ups of a microcontroller are too weak. Note that with a high capacitance bus it's usually not a problem to have fast falling edges, because the FETs which pull the line low have low impedance, and then the wire's capacitance can be discharged quickly.
But for the rising edge we only have the relative high resistance of the pull-ups, and the RC time of that combined with the wire's capacitance determines the rise time. A smaller resistance value is better, but there's a limit to this too: an I2C device doesn't have to draw more than 3 mA, so at 5 V bus voltage the resistance shouldn't be lower than 1.7 kΩ.
The graph shows the maximum pull-up resistance for a given wire capacitance. At 1 m that capacitance won't be high, if you use signal wire probably less than 50 pF, and even for 100 pF you could go up to 12 kΩ. I'd stay near the lower limit though, not only will you have faster edges, but a lower impedance also makes the wire less sensitive to noise. 2.2 kΩ resistors will probably do.
Further reading
I2C Specification
I2C termination versus capacitance
|
H: Modelling MEMS accelerometer's measurement noise using datasheet (ADXL330)
I'd like to model an Analog Devices ADXL330 MEMS accelerometer using data provided in its datasheet to estimate measurement noise. I'm using a simple mathematical model defined in the paper "Non-linear complementary filters on the special orthogonal group" by Robert Mahony et al.:
\$ \bar{a} = a + \mu_a + b_a \$,
where \$ \bar{a} \$ is accelerometers output given in [g], \$ a \$ denotes the true value, \$ \mu_a \$ denotes additive measurement noise and \$ b_a \$ denotes a constant (or slowly time-varying) bias.
The question is what sensible values should I take for \$\mu_a\$ and \$b_a\$? How do I derive them?
I'd like those values to be in units of g. There are some noise characteristics given in the aforementioned datasheet (page 3), but I'm not sure I can interpret those correctly. Any help appreciated.
AI: Let's assume your model is sufficient for your application, and we can really describe the behavior of the device simply in additive terms, one for the per-measurement stochastic behavior and one for the overall bias. Three observations before we get started:
I assume you are running the sensor on a 3V supply. If not, you can use the values in the datasheet to adjust the calculations.
These terms are expressed in the same units as \$\bar{a}\$, which in this case is volts, not \$g\$.
You will actually need three such equations, one for each axis. So 6 terms in total.
For the bias \$b_a\$ we can turn to the charts in figures 5,6, and 7 on page 6 of the datasheet, titled "{X,Y,Z}-axis zero g bias". In a perfect world the zero g output would be 1.5V, but as we can see from the charts the actual value varies between parts. To select your \$b_a\$ for a particular simulated device for a particular axis, you can draw a random sample from that distribution, and use the offset from the expected value of 1.5 as your value for \$b_a\$ for that axis.
Let's look for example at the X-axis term for a particular device. Eyeballing the distribution's parameters I would model it as a Gaussian with \$\mu = 1.53V\$ and \$\sigma=0.01V\$. This means that the distribution for your bias \$b_a\$ for that axis (0g output - expected 0g output of 1.5V) is also a Gaussian, but with \$\mu = 0.03V\$ and \$\sigma=0.01V\$.
In order to assess the random noise, we need to stipulate some sort of output filtering. As is mentioned in the data sheet, by reducing the bandwidth you also significantly reduce noise on the output. I am going to assume a bandwidth of 100Hz just to make the math easier, but feel free to substitute your own values. There is a fairly extensive treatment of this topic in the datasheet under the heading "Design trade-offs for selecting filter characteristics".
With a bandwidth of 100HZ we can expect, according to the datasheet, a noise around 280*10 \$\mu g\$= 2.8 \$mg\$ RMS for the x-axis. We need to convert this to volts in order be able to add it to the formula. The expected sensitivity is about 300 mV/g, so we're execpting a noise of about 0.8 mV RMS. Note that RMS is exactly equal to the standard deviation of the distribution, so you can draw your per-measurement noise samples \$\mu_a\$ directly from a gaussian with \$\mu=0\$ and \$\sigma=0.0008 V\$.
So, for an output filtering of 100HZ: \$\mu_a\ \sim \mathcal{N}(0,0.0008)\$ and \$b_a \sim \mathcal{N}(0.03,0.01)\$, with the stipulation that \$\mu_a\$ is sampled at every measurement, and \$b_a\$ is sampled once for every device.
A factor that we neglected to consider is the variation in sensitivity between devices. This can be accounted for in a manner similar to our treatment of \$b_a\$, but since it's a multiplicative factor, it is not easily captured in your additive model.
|
H: UNO board turned hot
Maybe this is a stupid question to ask, but I am still wondering. I have this kit, I mounted the LCD on the UNO and connected their headers. After downloading the sketch, I used a power line to see the display content as I needed to picture it. But after a few photo shot, the UNO became hot. Is it normal? Or the power too high?
AI: This depends on what you mean by hot. If the atmega chip is so hot that you cannot touch it without burning yourself, then you are either supplying incorrect power to the chip or you are drawing too much current from the pins. This should not be the case. If it is, there could be something wrong with your arduino board, something wrong with your LCD board or hopefully it is wired incorrectly. I would check to make sure that the wires that are powering the backlight on the LCD board are connected to one of the power rails and not to an output pin of the arduino.
If the arduino is kind of warm to the touch, I would not worry about this.
If the voltage regulator on the board is really HOT, you need to supply power to the LCD board from another source.
If none of this fixes it, go through with a multimeter and measure current on each line going to the lcd board. I think the Arduino has around maximum of 5mA-10mA per io and 20mA to 100mA total for all pins. If any of the pins or the system as a whole exceed this, you need to use transistors and an external power source to drive the pins on the LCD board.
|
H: Color problems when turning a CRT TV set into an oscilloscope
I found an old CRT TV set in the garbage. It didn't work, always showing the "snow effect", even when I connected it to another device via the SCART port.
So I followed an online tutorial to make it into an oscilloscope. However, I encountered some problems. I'd like to know if they are likely to be resolvable or not, since I'm not an expert in this field.
There are four connections for the CRT that should control horizontal and vertical deflection. I disconnected the wires that control horizontal deflection and connected in their place those that previously controlled vertical deflection, in order to have a horizontal line at a scanning frequency of 60 Hz. Then I connected two wires for controlling the vertical deflection (at the other end of these wires I can put an audio output or just a battery). When these two wires are not connected to anything I should see a horizontal line.
What happens is that the horizontal line that should appear like a solid bright white line appears instead as a weak reddish line, as you can see in this picture:
horizontal line http://img259.imageshack.us/img259/6536/foto1yjz.jpg
The strange thing is that I tried with a friend to connect and disconnect the four wires to the CRT when it was powered on and, apart from the sparks, the process of connecting and disconnecting those wires resulted in a white bright line as it should be.
Even when all the wires for horizontal and vertical deflection are disconnected a weak red point appears and only with active manipulation performed when the device is on I manage to see a bright white dot instead.
I'd like to know if this behavior is due to the TV set being defective and is not easy to repair, or if it is somehow my fault and it is easily solvable.
AI: This kind of surgery on a CRT is not a good idea unless you know what you're doing. There are high voltages involved, and they can really hurt or worse. You also can't count on just disconnecting the deflection coils and using them any way you want. Some monitors, particularly those in older TVs used the horizontal deflection coil as part of the circuit that made the high voltage. Old TVs are amazing feats of electrical engineering in that every part did multiple things to the extent possible. The volumes were high enough to pay for engineers cleverly reducing the circuit by pennies at a time.
Another issue you seem to have ignored is the brightness. The individual red, green, and blue drive signals originally came from somewhere. Without controlling these properly you don't know what beam current, and therefore what color and brightness you end up with. It's also quite possible to burn a hole in the phosphor by leaving the beam current on while the beam is not being deflected. That probably happens even at a small fraction of the normal beam current when the beam is being swept in a raster pattern.
Again, messing with this stuff at your apparent skill level is not a good idea. That isn't meant as a insult, but you have to know what you can do and what you can't without a good chance of getting into trouble.
|
H: How can a capacitor in a disposable camera shock you?
The battery in a disposable camera is usually a single 1.5V AA battery. It charges a large capacitor. When the capacitor is fully charged, it will contain a voltage very close to 1.5V correct?
If one was to touch the charged capacitor, it will shock them. Why is this? Surely 1.5V can't do that kind of damage, right?
AI: Photoflash capacitors are charged to hundreds of volts using various methods (flyback transformer, etc). Don't assume that because the input is a AA battery that there are no greater potentials within the circuit.
The example below was taken from a Texas Instruments application note. This circuit is battery powered yet charges a capacitor to 300V.
|
H: Talking to the Cortex M3 (Stellaris EKS-LM3S1968) under linux
I've searched around quite a lot, but haven't found an easy(ish) way to load programs onto the Cortex M3 using Linux.
I have tried using the summon-arm-toolchain https://github.com/esden/summon-arm-toolchain/ but it was having problems downloading one of its dependencies.
Does anyone know of any other options?
AI: The C compiler I use for my Cortex M3 is Soucery Codebench Lite Edition. There are some alternatives like YAGARTO. You need to write (or find) a linker script that fits your MCU.
You also want the CMSIS package for your MCU. That contains all the register definitions.
For flashing and debugging I use OpenOCD, this allows to use GDB as frontend for both tasks. The EKS-LM3S1968 board is shipped with a JTAG-to-USB chip supported by OpenOCD.
|
H: How can I convert the current from a fan to the microphone headset input on an iphone?
I am working on creating an anemometer (or wind meter) for the iPhone. I am a programmer and know exactly how I could do this on the software side of things, but I am a complete noob when it comes to electronics. I have seen many other posts about putting voltage or an audio line to the microphone, but I'm trying to convert the current generated by a small spinning fan into a microphone input that I can measure on the iPhone. How can I make sure that the volts generated by the fan will appropriately scale to the input of the iPhone microphone?
AI: "Best": The "best" solution is to use a low cost microcontroller to measure the data and to output a signal that is suited to what the iPhone can handle. This could eg be a tone sequence or frequency or about anything else measureable. All up parts cost could be under $1. This takes some microcontroller hardware experience - but may be an acceptable approach.
"Simpler": As long as extra hardware is acceptable, a reasonably level independent way is to convert voltage to frequency and then to measure the frequency in software. If in-device measurement is too hard the sound could eg be saved to a file, sent to a remote point, measured and returned. Or it could be relayed live. But hopefully you have enough access to processing power to do it directly. The frequency can be as low or high as you wish - and if you can measure time periods you could gate the tone on and off for a period related to voltage. Achievable reolution may not be large but it should be able to meet the ned. Averaging over many samples would be possible.
DIY with an LM555 - cheap and may be good enough.
EDN - NE555 timer sparks low-cost voltage-to-frequency converter
Related circuit from here shown below. Opamp can be common and low cost LM358 or LM324 BUT a virtual ground at about half supply would be needed as opamp output must swing negative relative to ground to operate integrator. Supply voltage can be 5V or more with LM358 or LM324.
LM331 dedicated precision voltage to frequency converter
Analog Devices MT028 - V-to-F tutorial - 7 pages. Good and has links.
AD VtoF IC selection guide
Linear technology AN14 Designing high performance V to F converters - overkill for what you want but gives ideas.
Microchip says ...
Many many idea starters and some complete circuits
|
H: Programmable USB RF transceiver
I've been trying, and failing, to find a USB RF tranceiver that I can program or that has an API I can use. Does anyone know if such a thing exists, or suggest how I could about creating one?
AI: Connect a suitable RF transceiver (I'm using the cheap nRF24L01+ modules that are available on Ebay) to a USB MCU, such as a PIC18F14K50.
|
H: Why is a datapath in microcontrollers always a power of 2 wide?
Microcontrollers data paths are always a power of 2 wide: 4 bit, 8, 16, 32 bit, etc. Even PICs which use 12-bit wide instructions are 8-bit controllers. Why? Is there any design advantage to this? What's wrong with a 12-bit databus, or a 7-bit controller?
edit
The 7-bit doesn't make much sense, but it's what made me think of the question. The answers refer to the tradition of 8-bits. But 16-bit isn't 8-bit, and 24-bit can handle 8-bit data as well as 16-bit, right? Why did they skip 24-bit to go to 32-bit?
AI: Tradition has a strong pull. But so does interoperability. Pretty much every existing file format and communications protocol operates on bytes. How do you handle these in your 7-bit microcontroller?
The PIC gets away with it by having the instruction space entirely seperate and programmed in advance from outside. There is some value in bit-shaving the instruction set, as it's the one thing you get to control yourself as a microprocessor designer.
If you want an extreme architecture, you could Huffman code the instruction set, giving you variable length bitness.
|
H: How do I test a bridge rectifier?
I got a mess of components at an auction a couple weeks ago, including an unmarked box of unmarked bridge rectifiers. They're about 1" square & 1/4" high if that makes a difference in terms of an input voltage for testing. I don't know if there are ANY inferences that can be made from size, shape or color. The bottom has the typical one blade that's oriented perpendicular to the other three.
What is the best way to figure out what I've got? I'm not a big fan of the "if it smokes, that's too much voltage...back off a titch and see if the next one smokes" method.
UPDATE: I found a scribbled note in a box of capacitors marked "40/50v Rect", and sure enough, they all test in that range. Now I've just gotta figure out what to do with 'em. Amperage experiments coming up next, but I'm at least confident that I'm starting from a place where nothing will explode. Too much. :)
AI: Apply current from an N amp variable supply across 1 diode.
Plot voltage drop against current.
A reasonable guide should be gained.
A say 5A device should have Vdiode < 1 Volt and maybe < 0.8V.
Once you get a 1st estimate try the same with a diode of known rating and see how it compares.
eg if 1V at 5A try a 5A diode and see what Vf is at 5A.
Run at various currents and note steady state temperature.
Use variable voltage supply in series with largish resistor applied in non conduction direction.
Increase voltage and note rectifier leakage current.
As you approach rated value it should get uncomfortable.
From voltage drop under current, and heating with current and leakage with reverse voltage you should be able to establish a safe operating zone. \
Please provide photo & exact dimensions.
|
H: Can an audio circuit be powered by a switched-mode power supply?
Most audio circuits are powered with large, heavy transformers and a small ripple after smoothing. SMPS are smaller and more efficient. EMI can be shielded by a metal enclosure and the output filtered for noise suppression.
Especially where the power is going to be further regulated. Why aren't switched-mode power supplies used in audio circuits, eg. power amplifiers, and what improvements can be done to make a SMPS suit an audio circuit?
AI: Let me give you a little background on myself... I've been working professionally in the audio industry for more than 14 years. I've designed circuits for most of the major pro-audio companies, one audiophile company, and several consumer audio companies. The point is, I've been around and know a lot about how audio is done!
SMPS can and are used for audio circuits! I've used them from sensitive microphone preamps to huge power amplifiers. In fact, for the larger power amplifiers they are mandatory. Once an amplifier gets over a couple of hundred watts then the power supply needs to be super efficient. Imagine the heat produced by a 1000 watt amp if it's power supply was only 50% efficient!
But even on a smaller scale, the efficiency of a SMPS often makes a lot of sense. If the analog circuitry is properly designed then the noise from the power supply gets rejected by the analog circuitry and doesn't impact the audio noise (very much).
For those super-noise-sensitive applications you can do a hybrid approach. Let's say that you have an ADC that requires +5v. You can use a SMPS to generate +6v, then a super-low-noise linear regulator to bring that down to +5v. You get most of the benefit of the SMPS, but the low-noise of the linear regulator. It is not as efficient as just a SMPS, but those are the trade-offs.
But one thing to keep in mind... A SMPS for audio applications needs to be designed with audio in mind. Of course you'll need better filtering on the output. But you will also need to keep other details in mind. For example, at very low current the SMPS might go into something called "burst mode" or "discontinuous mode". Normally a SMPS will switch at a fixed frequency, but in one of these modes the switching will become somewhat erratic. That erratic behavior might push the output noise into the audio frequency band where it becomes more difficult to filter out. Even if the SMPS is normally switching at 1 MHz, when in one of these modes you could get 10 KHz noise. Controlling how this happens depends on the design of the chip that the power supply uses. In some cases, you can't control it. In that case you have no choice but to use a different chip or use a hybrid approach.
Some people advocate using only linear power supplies for audio. While linear supplies are less noisy, they have lots of other issues. Heat, efficiency, and weight being the biggest ones. In my opinion, most of the people who preach linear supplies only are either misinformed or lazy. Misinformed because they don't know how to handle switching supplies or lazy because they don't care to learn how to design robust circuits. I've designed enough audio gear with SMPS to prove that it can be done without too much pain.
|
H: Routing considerations of analog signals on twisted pairs
I'm designing a part of a system that will receive 4 analog signals carried on 4 twisted pair cables which are input to an ADC. These signals are low speed (probably in KHz) bipolar ranging from -10V to +10V that should be sampled every 30us. The maximum allowed error is 15mV.
What are the routing consideration of these signals on my PCB? Should they be treated as differential pairs?
Any links with detailed technical info are much appreciated.
AI: At this low frequency it doesn't really matter whether they are routed as a transmission line on the PCB or not. The more important issue is capacitive coupling from other traces that could inject noise. You are only looking for a little over 10 bit accuracy, so nothing out of the ordinary needs to be done.
Some low pass filtering would be a good idea. You are sampling at 33 kHz, so clearly you can squash anything past 15 kHz, in fact that is a good idea. Hopefully you are super-sampling in the A/D and will then decimate and low pass filter later in firmware. This allows your anti-aliasing filter to be more easily realizable in analog. Let's say you've done that part right and really only care about maybe 1 or 2 kHz upper frequency. In that case, put two poles of passive low pass filtering at 5 kHz on each signal in differential mode. You need to put a little low pass filtering on each part of the signal individually because high enough common mode noise can fool active front ends and look like differential mode signal. The downside is that any imballance in the two filters on each line will convert some common mode noise into differential signal, so make these filters high enough, like a few 10s of kHz.
|
H: How to measure a short of power amplifier in car?
Recently my old amplifier in car has got a defective contact on one of the switches, so I decided to unsolder the old one and solder a new one. Unfortunately the amplifier caused a short as I connected it to the battery again (I don't know how this could happen, maybe I damaged some component or something, or maybe there was suddendly a wrong connection due to soldering althought I don't think so).
What I've done next is to unsolder the switcher again and bypassed the needed conducting paths by soldering some kind of bridge (I don't need to switch it again, it's ok for me when it just works with a specific adjustment). But before I try to connect it to the battery again, I'd like to test if this is save. So I thought about using an ohmmeter. My idea is when I connect it to the plus pin and minus pin of the amplifier, the resistance must not be 0 Ohm, because this would cause a short since 12V / 0 Ohm means infinite current. Are my thoughts correct? Or do I miss something important?
AI: The Ohmmeter will do fine, you are correct in thinking there should not be 0 Ohms (read very low resistance e.g. <10 Ohms or so) between the amplifier power leads.
A simple continuity tester would do for testing for a short, but the Ohmmeter actually gives more information as you can see the actual resistance value.
You should probably read a few hundred ohms if things are normal, try it out and let us know what you find out.
|
H: Charge a single AA battery in a double charger?
Most cheap AA battery chargers charge two batteries at a time. Many devices use 1 or 3 AA batteries, meaning it's difficult to make sure you've always got two compatible batteries in the charger.
My fairly limited understanding of chargers is that they trickle feed energy into the batteries until the voltage in the circuit increases to a threshold, indicating that the batteries are charged. So it seems to me that I could short one of the two battery holders, and put the battery in the other one, such that the battery charges twice as fast.
Is this possible? If so, how can I figure out if it will change too fast and damage the battery? If not, is there any reasonably reliable way of charging a handful of single AAs, given only a cheap double AA charger? (I would prefer not to damage the charger, but don't mind modifying it, if necessary). Also, most of these batteries are NiMH, but there are a couple of lithium batteries, and there might be a NiCad or two as well.
AI: If the charger is a genuine slow trickle charger then one battery in place of two batteries in series may well be OK.
Otherwise, shorting out one battery position will have variable results.
This may scramble the few neurons available to simple battery charger controllers and mean that the battery never charges or over charges and may not stop charging. Clamping a two battery power supply to a one battery voltage will probably cause more current than intended unless they saw you coming and took due precautions.
Two batteries in series is not a good match to some of the best charge termination methods. Often used is negative delta V where terminal voltage at constant current drops slightly at fully-charged. With two batteries in series this "signal" is more likely to be missed.
One possibility is to use an oldish deadish or low cost battery in the second position. This should not be so dead as to read "high" under charge but need not have the capacity of the good battery.
A diode string that drops about 1.4V when used in place of the second battery may work OK. Use of 2 x 1N400x diodes MAY be OK. Maybe a 1N400x + a Schottky + ...? A zener or clamp regulator that drops 1.4V may work.
Charging a NiCd battery in a NimH charger may work and may not. If you are able to measure battery voltage under charge and stop charging at about >= 1.4V it will work OK (probably).
Lithium primary batteries must not be recharged.
Lithium secondary batteries MUST NOT be charged in any charger not designed for them, that their days (and yours)(and the charger's) may be long on the face of the land.
|
H: Why would an input pin have both a pull-up and pull-down resistor?
In his answer detailing the various types of input pins, Russell McMahon leaves the following note [referring to input pins]:
there are special cases where a resistor to high and low at once is useful
What are the special cases where both a pull-up and pull-down resistor are required? Isn't there a current waste?
AI: I've done it several times when I couldn't figure out in advance which I really need. So I would put both on the PCB and only solder down one. In this way, if I was wrong I can just remove the resistor and solder the other one down.
These days, split termination isn't done so much but it used to be a popular form of signal termination. To the unfamiliar, split termination looks like both a pullup and pulldown where the resistor values are usually less than 400 ohms.
For analog inputs, sometimes an input needs a DC bias. This can be done using a simple resistive voltage divider-- which also looks like a pullup+pulldown. Normally in this case there is also something that blocks the DC, like a cap in series with the signal, before the resistors.
In my opinion, you never actually need a pullup and pulldown at the same time, since it just doesn't make electrical sense. Using both at the same time will create a conflict and the end result is not an up or down, more like a pull-sideways! :) But there are lots of things, like the 3 that I mentioned, that will appear like a pullup and pull down at the same time. These are very common, and I know of new engineers who confuse them for pullups+pulldowns.
|
H: Power supply noise in audio
I have what is surely a classic problem with regard to power supply switching noise and audio but I am unable to sort myth from reality with regard to what I found so far on the topic.
Setup:
I have a notebook with an external power suppy and/or battery
A radio receiver which has its own power supply (i.e. not fed by notebook SMPS)
the radio receiver feeds an audio signal into line-in of the notebook
the radio receiver is controlled by the notebook via RS232 (tuning, etc.)
Problem:
If I unplug the notebook from its power supply and run it from battery everything works perfectly
But if I use the notebook SMPS, I hear a tremendous amount of noise in the audio
Can anybody tell me where the problem is likely to lie? There is a lot of talk about ground loops but I have difficulty believing they really exist in such a small-scale installation.
Am I right to assume that it is likely a problem of a varying ground level in the notebook and the fact that the line-in input of the notebook is non-differential? Or is there a more likely explanation?
What is the best solution? Use an opamp to construct a differential input amplifier and feed its output to the line in? What do I use as ground reference for the opamp?
Proposed solutions in the comments and answers
From the answers it would appear that there are two possible problems: 1. ground loops and 2. RF pickup from the external SMPS in the audio wire.
Suggested solutions are:
Differential amplifier solution. Advantages/Disadvantages?
Kortuk: Combat RF pickup from the SMPS in the audio link with a grounded shield. Advantage: invisible solution; Disadvantage? Question: does not help with any ground loops?
Russell McMahon: Audio transformer in the audio-line. Advantage: Simple; Disadvantage: not easy to source, expensive or poor frequency response. Question: does this help with RF pickup in the audio line?
Russell McMahon: clamp EMC ferrites on the audio line to combat RF pickup. Does not help against ground loops. Question: does this help with noise in the audible range? It was my understanding that ferrites only help to filter very high frequencies.
David Kessner & Mary: Grounding the notebook. This shunts CM noise to ground. Advantage: cheap, simple; Disadvantage: additional wire to handle. Question: combats both RF pickup (if audio-ground is shunted) and avoids ground loops?
Mary: ferrite absorber around the DC line to the notebook and RF CM chokes in the audio line and RS232 lines. Disadvantage: high component count & effort with the RF CM chokes. Does not prevent ground loops.
AI: The problem is common to this type of audio system. I would bet if you looked at the noise spectrum you would see 60 Hz plus many of the harmonic frequencies (120 Hz, 180 Hz, 240 Hz, etc.). The fact that it is more than just 60 Hz, or 50 Hz in some countries, is an indicator that it is not just simple ground loops.
I would also bet that your laptop power supply has only a 2-prong AC plug-- lacking the third ground plug.
In this type of power supply, the output is electrically isolated from the AC input. But it is not perfectly isolated. There is a small amount of current that flows between the isolation barrier. This is called the "leakage current". It is not a lot of current, but it doesn't have to be.
Some laptop users report getting shocked or having a tingling sensation in the legs when using the laptop while wearing shorts! The reason for this is that leakage current is going through the screws in the bottom of the laptop and into their legs. It sounds dangerous, but the amount of current is well below the safety limit. It is more startling than anything else. If you are wearing pants then you're insulated.
Laptop chargers that have the 3rd prong on the AC plug do not have this problem because that third plug is connecting the laptop chassis shield to ground-- forcing that leakage current to go to ground instead of into your leg. Of course, there is no leakage if you are running off of batteries.
In your case, the leakage current is not just going into your leg, but into your radio receiver. The solution to this is to properly ground your laptop.
You will have to experiment with this a little bit to find the best solution. Getting a power supply with a 3-prong AC plug is the best, but not always possible. The next option is to find something on your laptop that you can ground. Make an adapter from that 3rd prong to "something". That something could be the signal-ground on the output cable of your power supply. It could be a screw on the laptop. Or a shield on an unused laptop connector. Or the ground/shield on your audio cable.
Make that 3rd prong adapter, but leave the other end bare for the moment. Then start poking it around to see if or where you can connect it and have the noise go away. Once you have found a place or two, then finish up the adapter so it is easy to use.
Two warnings when doing this: Make sure that whatever you are grounding is actually ground! On the power supply output, make sure you ground the negative or gnd conductor. And when poking around, understand that you might actually have to poke a little hard. Both the bare wire and whatever you are poking will likely have a thin layer of non-conductive stuff on it, and you need to apply enough force to poke through it. Rubbing sometimes helps too. The non-conductive layer is sometimes paint on screws, or an oxide (rust) on the metals.
Oops, here is a 3rd warning: Be super careful when making that 3rd prong adapter. You're messing with potentially lethal voltages and we don't want you to die. Build the adapter in a way that there is no possibility of it failing and shorting out against either one of the other two conductors in the AC plug.
Give it a try and report back what you found!
|
H: What electronic component of a computer produces (sound) noise?
Certain mechanical components of a computer produce noise, such as speakers, fans, harddrives and disk readers.
Can electronic components of a computer (transistors, resistors, capacitors, ICs, screens, power supplies, etc.) also produce noise, or is noise limited to the realm of mechanics?
AI: Aside from the obvious components (speakers, motors, fans, relays, etc.) it is quite common for inductors, transformers, and capacitors to make noise.
Inductors and transformers work by converting electricity into magnetic fields. Sometimes these fields are moving/vibrating/whatever in just the right way to make parts of the inductor or transformer to mechanically vibrate and make audible noise.
Capacitors are just two metal plates separated by a non-conducting material (a.k.a. dielectric) so it seems like there is nothing to vibrate. But, it can! Some materials are piezo-electric. Meaning that when they are exposed to an electric charge they change their physical shape. This is how piezo-buzzers work. Some capacitors use a piezo-electric material as the dielectric. As the caps charge and discharge they change shape. If this happens at the right frequency and power you can hear it.
There are probably other components that can cause audible noise, but these are the most common.
|
H: How does autoranging work in a multimeter? What is the circuit?
I was curious how this is done. It seems you would have to vary the voltage and current to measure resistance from 1ohm to 10Mohm.
AI: The multimeter does exactly the same as what you would do manually with a non-autoranging meter. Suppose you have a 3 1/2 digit meter, so 1999 is your maximum reading.
The multimeter starts at the highest(*) range, and if the reading is less than the 199.9 threshold it switches to 1 decade lower, and repeats this until the reading is between 200 and 1999. That goes very fast because it doesn't have to display anything during this procedure, so it appears that it gets the right range first time.
Or, if it includes enough logic, it can take the first measurement on the highest range, and then directly select the lower range that is most appropriate for that voltage level.
For example:
1st reading, at 1.999 MΩ range: < 199.9
2nd reading, at 199.9 kΩ range: < 199.9
3rd reading, at 19.99 kΩ range: > 199.9
So this is the range we want.
Do actual measurement: 472
That value is between 200 and 1999, so that's the best resolution possible. If it would go another decade lower it would overflow. So the resistance is 4.72 kΩ.
Note that during the first readings it doesn't really measure the actual resistance, it just checks if it's higher or lower than 199.9.
Alternatively the multimeter may have a set of comparators that can all work simultaneously, each checking a next higher range. You get the result faster, but this requires more hardware and will probably only be done in more expensive meters.
(*) Not the lowest, as "Mary" aka TS suggested. Those as old as I am have worked with analog multimeters. If you would start measuring at the most sensitive range the needle would hit the right stop hard. You could hear it say "Ouch". Switch to the next position, again "bang!". If you care for your multimeter as a good housefather ("bonus pater familias") you start at the least sensitive range.
|
H: How can I find out which wires are the primary wires on this transformer?
About the amp:
This is from an old solid state audio amplifier with an AM/FM tuner. No digital parts or ICs were inside. It was all point to point. Unfortunately I threw out the amp and didn't write down the number and now I am trying to use the transformer to build an audio amplifier.
About the transformer:
On 'one side' the wires go as follows: White, Yellow, Brown, Orange, Red, Grey, Black
On the 'other side' the wire go as follows: Red, Red, Yellow, Grey, Yellow, Blue, Blue
My experiments to find out what the primary wires are: After reading about how to find out by measuring resistance, I found that the primary wires should be about 4-8ohms I measured all the combinations of wires on each side and applied mains to the transformer. My first thought was that the 'other side' had pairs of wires so it must be the side with the primary. To test I (very quickly) hooked up 120V to the pairs and measured the other wires with my scope. This stepped the voltage WAY up (200Vp2p was my first measurement) and buzzed a lot. Once again.. it was on for less than a second and never was remotely hot. I tried a few more wires on that side and had the same result. After doing a similar thing to the 'other side' I found that the white and grey produce approx 80Vp2p, 40Vp2p and 10Vp2p. This is the best combination I have found so far. Does this make sense? I'd like to know a little better before designing a circuit around it.
Any advice or thoughts will be very much appreciated!!!
edit: Really important detail I missed. The outside of the transformer says t52-131 on the first line and C-AS-QD7 on the second. It is a big hefty transformer weighing two or three pounds? (I'm bad at estimating weight)
AI: Since transformers by their nature are bi-directional, the selection of the primary side totally depends on your input voltage and desired output voltage.
The transformer you describe likely has multiple taps on the "primary" side, may have multiple windings on the "primary" side and likely has multiple windings on the secondary side. Start with a low range DMM, and check for continuity between different leads on each side of the transformer. Once you have mapped continuity, check resistance between the same leads. You should be prepared for the transformer to be as complex as this:
The "secondary" side may be a single coil with multiple taps, or it may have multiple outputs more like the above example.
Once you've reverse-engineered the coil arrangement, you'll need to determine the turns ratio between each set of coils. I would NOT recommend your 120VAC test for this. Start with a much lower (and safer) voltage. Find a small "wall-wart" type power supply that you can sacrifice. The lower the output voltage the better. You want it just for its transformer, not the rectification and regulation components, so if you can find an AC-output wall-wart, you can use it's output as-is. What you want is a low voltage AC source that you can use to test individual windings. Note that applying a low voltage AC source to the "secondary" may result in lethal voltages on the "primary", so be careful!
Find one set of windings to apply your AC input to, and measure the resulting output on each set of coils and on each tap. Transformers are ratiometric, so the relative voltages will be the same using your low voltage AC test vs. when you identify the intended primary winding and apply 115VAC to it.
Doing this, you should have a good sense as to what windings are present that the relative turns ratio between each. Good luck!
|
H: How does the HD44780 LCD work at the low level?
I'm not asking for a driver specifically, but how exactly it works.
I looked up the 2 chips that were in it. HD44780A00 and HD66100F to be exact. I'm assuming one is a display driver? And the other is a segment driver?
I guess I'm looking to learn how, in this most basic terms, for instance, a pixel or a character is put on the screen.
I know how to use it with libraries and such. That's simple (just follow the instructions). But I want to understand what's going on.
I looked at the instruction set here. But is that just for the HD44780A00 or HD661001F? I guess I'm confused at what this instruction set is or what is it for.
I guess what I'm asking is: what exactly is the process for sending a single pixel and how exactly does that work.
It might be too complicated and if it is, that's cool. I'm just trying to figure out how it works at the low level.
AI: The HD44780 is a character LCD controller, which means you write ASCII codes to the LCD for the text you want to display. If you want to control pixels individually you have to go for a graphic LCD.
The HD44780 does offer the possibility to display some limited text-based graphics, though; you can define 8 custom characters, but at 5 x 7 pixels per graphic that won't allow you to display anything like an picture.
The HD66100F is an 80-segment LCD driver for e.g. a 10 digit 7-segments display.
|
H: BJT, resistor, and diode work but ULN2803 does not
I am trying to control some 5V relays with a mC. At first I went with using a BJT, a 470 ohm resistor, and a 1N4004 diode to control each one of the relays. Each mC output pin is 5V, 40ma. This setup worked well.
I wanted to see if I could do better so I am trying out the ULN2803an driver chip. However, this sort of works. It runs for 5 seconds then the mC freeze or starts controlling the output pins incorrectly.
The yellow wires connect directly to the output pins of the mC. Pin 9 of ULN2803an goes to ground, pin 10 of ULN2803an goes to +5V.
Do I need resistor between the mC and the ULN2803an chip? Is the ULN2803 hooked up correctly? Is there something else I am missing? Everything works with the BJT, resistor, and diode combo. I thought the ULN2803an would be exactly the same. Any help in figuring it out would be appreciated.
AI: From the photo it seems that you connected the 2803 correctly, but the path from the relay coils back through the 2803's flyback diodes is a bit long. To check whether this is your problem you could try either wit a separate 5V supply for the relays, or with flyback diodes directly across the relay coils.
A long line is effectively a (small) resistor in series with a (small) inductor. (Actually, there is also a capacitor, and if you need to be precise there is a large string of resistors, inductors and capacitors). A lot of times you can ignore these, but in this case, there can be large current spikes that result in voltage spikes, which can affect your microcontroller.
If you have the chance, use 12V relays, powered from a 12V wall-wart, and use a 7805 or the like to power your microcontroller.
|
H: Adding decay (fall-off) to comparator circuit
Following this circuit:
I'm trying to create a slow decay of the peak, like so:
Op-amp output is controlling a dimmer pin of a LED driver.
I want the LED to fade out smoothly after a bang.
AI: Add a peak-detector circuit. If the next stage has a high impedance a simple circuit will do: diode, followed by a capacitor in parallel with a resistor. The RC time will determine your decay time.
There are lots of RC time calculators on the web, for instance here.
|
H: Why is there a delay in a common anode 7-segment display?
I have a common anode 4-digit 7-segment display. I have each segment cathode connected to a 330-ohm resistor, and the resistor is connected to a shift register. Each segment cathode is connected to the same shift register. Each common anode is connected to a second shift register. Right now, I am using an Arduino to multiplex the display to show a number.
This works great, but there's a problem. The display isn't bright enough! I assume because this is a common anode configuration, and that the shift register can only provide about 40mA of current for 8 segments (A-G and the decimal point).
I have decided that I need more power. My first thought was to try to use 4 PNP transistors. I hook them up correctly, and the segments get brighter. Great! However, there is a problem. It seems like the transistor is slowing something down! There is a nasty glow of segments that are used by other digits! I have the microprocessor set to show each segment for 4 milliseconds. The datasheet claims that the transistor should switch on and off faster than that. Why is this faint glow happening?
Here's what it looks like when 1111 is displayed:
Here's what it looks like when 1112 is displayed:
AI: Here is a possible mechanism for the fault. You say it works (dimly) without the transistors, but doesn't work with them. So it sounds like the fault is in the transistors. Is there some reason that the transistors might be letting some current through when they shouldn't?
Yes. You're using a PNP transistor. As you know, these transistors are on when the base voltage is lower than the emitter voltage. They are off when the base voltage is higher than or equal to the emitter voltage.
The problem with the shift register chip is that the outputs are always lower than the emitter voltage. I couldn't quite make out the part number of the chip you're using, but according to the datasheet for the 74HC595 (page 6), the outputs don't quite reach Vcc. If there is a tiny voltage difference, then you could find that a small amount of current is leaking out of the base of the PNP transistor. With a gain of about 100, you could find that there's enough CE current to give noticeable light output on the LEDs.
Something to try: Add a schottky diode between Vcc and the emitter. This should drop the collector voltage by a fraction of a volt, just enough to allow the shift register to fully turn off the transistor.
|
H: Proper assignations of current directions
What is the best way to know the proper direction of current? Lets say we have this circuit below:
The correct directions are given below:
What are your techniques to know which is the proper way? I'm afraid that if I choose the wrong direction, then the results will be wrong.
AI: No, the result won't be wrong. If you would have chosen the wrong direction the result will be negative, that's all.
It's not always easy to know in advance what direction the current will flow. Don't worry about it, just choose an arbitrary direction. Just make sure that you document your choice by drawing an arrow next to each branch.
As a matter of fact, when you solve the problem with the assumed current directions you'll find that one of the currents is negative, so its direction was assumed wrong.
|
H: Diode clamper analysis
Why is that when we analyze diode clamper circuit, we always start thinking with the first negative cycle (they say the point where the capacitor charges up)? Whats wrong with starting with the positive half cycle first? Thanks.
AI: Which cycle charges the capacitor depends on the polarity of the clamp, so there is nothing "wrong" with starting with the positive half cycle first. With the diode the other way round, it makes a negative clamp* (as opposed to a positive one):
*R1 is not normally included, it's just there for this example to slow the cap charge time down and make the voltage drop more gradual, so we can see what's happening more easily.
Here is the simulation with a 5V pk-pk sine wave applied:
You can see why one half of the cycle is referred to, this is the part of the cycle that charges the capacitor and biases the signal level. In the simulation above, on the positive half of the cycle, the current flows through D1 and charges the capacitor. We can see as the cap charges the current through D1 lessens, and Vout heads towards ~Vsig - 4.4V (5V - the diode drop = 4.4V)
|
H: applying nodal inspection technique to supernodes with dependent sources
I was about to apply nodal analysis via inspection (to make it faster) to the above circuit, yet as we can see, it has a dependent source. So listing the equations for node(1 and 2) supernode a:
$$v_1(\frac{1}{2} + \frac{1}{6}) + v_2(\frac{1}{4}) -v_3(\frac{1}{6}) = 0$$
$$v_2(\frac{1}{4}) + v_3(\frac{1}{3} + \frac{1}{6}) - v_1(\frac{1}{6}) = 0$$
$$v_1-v_2 = 10V$$
Yet, it yields incorrect results (I tried solving it yet get wrong results). Are there any restrictions to nodal analysis by inspection when it has supernodes with dependent sources?
PS: correct answer are: \$v_1 = 3.043V\$, \$v_2 = -6.956V\$ and \$v_3= 0.6522V\$
Revision 2: instead of doing it the traditional way (like writing KCL equations), we can solve it via inspection. Are u familiar to it: The Inspection Method for Nodal Analysis and Nodal Analysis? I'm trying to apply solution by inspection here but it doesnt work the way it should be (notice my equation above).
AI: Your supernode should enclose both sources. Your KCL equation is then:
\$\dfrac{v_1}{2} + \dfrac{v_2}{4} + \dfrac{v_3}{3} = 0\$
Then, you need three more equations (you have four unknowns):
\$v_1 - v_2 = 10V \$
\$v_3 - v_2 = 5\Omega \cdot i \$
\$i = \dfrac{v_1}{2\Omega} \$
Solve to get:
\$v_1 = 3.043V\$
\$v_2 = -6.956V\$
\$v_3 = 0.6522V\$
\$i = 1.522A\$
|
H: Audio Capacitor Values
I'm looking to stock my capacitor drawers and I was just looking through trying to find standard values or some kind of list for them and I couldn't find a really good list of standard values for audio applications and other analog circuits.
I'm looking for polypropylene capacitors (these seem to be the best bang for my buck when it comes to audio) rated for at least 100 V (I work with 60 V-80 V AC signals sometimes) to be used for bypass and decoupling (and filters).
What values should I get to really cover all the bases?
AI: 10 22 33 47 68 series is pretty much all you will need. For audio/analog applications you will probably need values from 10p–1μ PP and 1μ–470μ electrolytic and some bigger ~10000μF caps.
|
H: Signal integrity at 40 MHz with parallel signals
I have to design a board with an 8 bit parallel port that carries 40 MHz signals. It is not possible to wire them very short and in parallel (I am sure the wires will be about 7 cm long), so I have to wire them separately in pairs of 2 or 3 wires together because my microcontroller doesn't have all the port pins together (TQFP44 package).
Is any signal integrity considerations at this frequency ? I use Altium and can make trace length equal but this wires are not alone and maybe can affect other wires such as UART, TIMER inputs, etc. Moreover signals are not differential so I don't know what problems can it cause.
EDIT:
It is my microcontroller:
I need to use the 8-bit low side or 8-bit high side of PORTB (16 bits) or PORTC (16 bits) to connect it to an 8-bit buffer. As you can see pins are not consecutive so I will have to wire the traces whit more length (I have been say that at 40MHz length is not a problem yet) but I don't know how it can affect to other traces and how can I prevent high frequency problems like EMI.
AI: Let me start by saying that 7 cm is not a long distance to go for 40 MHz signals. I've ran double that frequently and didn't even break a sweat. Below is a list of issues that you need to consider when doing this:
Trace length: As I just said, 7 cm is not far. But look at your timing budget. If your budget is tight you might have to do something called "matched trace lengths", where every signal of your bus has the same length. Odds are that at 40 MHz you don't need this, but it is worth looking into.
Parallel traces: Try to keep some space between signals on this bus. This is super important for clock and control signals, and less important for data. A normal PCB might have 0.008 inches (0.2 mm) between traces, and you might consider doubling or tippling that. It is OK for them to be close for short distances, but the longer the traces the farther apart they should be.
Power/Ground Planes: Yes, have them. This is important. Run your traces on a layer that is adjacent to the power or ground plane. I am skipping over a LOT of details here that pertain to high-speed digital design. This is an area for you to learn more of in the future. If you can't have a power/gnd plane then your problem has gotten 10 times harder. Run a ground trace next to each signal trace and hope for the best!
Termination: Yes, use them! If the signals are going from one chip to another (and not connecting to more chips) then using source termination is the easiest. Normally that would be a 33 to 50 ohm resistor in series and located at the driver of the signal.
Decoupling caps: Make sure that all chips are properly decoupled. Then add decoupling caps near places where signals move through a via (no more than 1 cap every 3 square cm). Again, I am skipping details but at 40 MHz you don't need to worry that much.
|
H: Are those some kind of timed-resetting fuses in DMMs?
Yesterday, I did something dumb, in a hurry. I wanted to check the AC voltage at the terminals of a hair-dryer, to determine the voltage being applied to the terminals of the AC fan behind it. However, in a hurry, I plugged in the positive lead, to the unprotected 10Amp AC socket on the DMM, instead of keeping it in the regular 5Amp protected, 750VAC socket. While I do think the DMM showed me right (or expected) values of AC voltage (between 12-15VAC for fan), and I kept it connected only for about 5-10seconds at max., it apparently drained the 9V battery in DMM, and all other measurements started showing "1" or "Err". There was no smoke or anything, but no correct readings, or even a valid continuity test. I thought that it must be just the exhausted battery, so I replaced it with a brand new one from a pack, and still got same results. Then I tried yet another new battery, and still same. I checked batteries with 2 LEDs, and they were glowing pretty bright, and very feeble on the first battery I'd replaced, indicating that the new batteries were probably fine. I left the DMM there, and went ahead and ordered a new replacement (yet to arrive). Now all this was about 24hours back.
However, just before dumping the DMM, about an hour back, I thought of doing the continuity test one final time. Voila, it worked, as did every other measurement I took. While I am happy to know that my trusted DMM isn't dead after all, I was surprised that this seemed like some safety-fuse which had blown, but auto-reset after some time. Is this really true / possible ? This is a very cheap ($5) small basic DMM, bought from SEA, shipped free kinds.
AI: [...] auto-reset after some time. Is this really true / possible ?
PTC fuses exhibit a behavior where they reset themselves over time. When the current become too high, these fuses heat up and increase their resistance dramatically. They become almost open circuits. The fuses themselves do not get damaged by this, though. When high current is removed, the fuses cool down over some time and return to the original low resistance.
|
H: How can I design a circuit that will turn on when a wire is cut?
I'm trying to build my own cable lock alarm (for science!) and am having trouble figuring out a way to detect that a wire has been cut.
The circuit has to
Use no power at idle (or at least, very very little so that the batteries don't have to be changed every hour)
Sound a speaker when a specific wire is cut
My knowledge of electronics is minimal.. I know what capacitors, diodes, resistors and other basic stuff are and do, but I don't have a good grasp on how electricity flows in anything other than a single loop.
I seem to remember once making a circuit that was something like this.. (and oh geez, I don't even know how to do a proper diagram so forgive me folks)
/----------[battery]-------\
| |
|--------[light bulb]------|
| |
\-----[wire to be cut]-----/
And the bulb would only light up if the wire below was cut, because electricity always takes the path of least resistance.
Anyway, this is going to be a battery operated circuit and I'm pretty sure that diagram up there is a short. I think there was a resistor involved but I don't remember where it went.
If anyone can give me some pointers that'd be great!
AI: A simple circuit to do this would use a single transistor, one resistor and a buzzer. Connect two 1.5 volt batteries in series to get 3 volts. Connect one end of a 10 kilohm resistor to the positive terminal of the batteries and the other end to the base of a general purpose NPN transistor (2N2222, 2N3904, etc.). Connect the negative end of the battery to the emitter of the transistor. Connect one wire of the buzzer to the positive end of the battery and the other wire to the collector of the transistor. If the buzzer has polarity markings, follow them: positive to positive end of battery, negative to transistor collector. Connect your sensing wire from the base to the emitter of the transistor. As long as the wire is connected , it will short the base to the emitter and prevent the transistor from turning on. When it is cut, the batteries will send current to the base of the transistor through the resistor. This will turn on the transistor which means the collector to emitter voltage will be very small and most of the battery voltage will be across the buzzer which will then turn on. With the sense wire connected, the batteries only have to provide current through the resistor which will be about 3 volts divided by 10 kilohms or 0.3 ma. Two AA batteries can provide this much current for hundreds of hours. If necessary you can use C or D batteries for even greater lifetime. This circuit is simply and can be easily modified to handle other sound sources if needed.
|
H: Arduino and Display in different rooms, possible?
I only wondering which four pins I have to connect for the LCD4884 from SainSmart, because I want to have Arduino and the LCD in different rooms. Is it possible?
AI: Well your question doesn't really have anything to do with the arduino and the display being in different rooms. The part you linked to has an SPI interface so you will need to use the SCK, MOSI, MISO and a CS line. See here for an explanation of using the Arduino's SPI hardware.
As for having the two in separate rooms, the naive approach is to just make the wires for the above described connections really long. This may or may not work depending on several things including clock speed, line impedance, environmental interference, etc. I am not an expert in this area but these guys are.
|
H: arduino best serial communication solution
During the last two days I was googling and searching about serial communication tools for Arduino.
I found a lot of tools like :
Node.js through node-serialport
Python through pyserial
Javascript through breakoutkjs using Frimata
So from your experience which is the best one of these and why ?
AI: The only one I've used was the python approach. It worked very well for a standalone application which read data from the arduino's serial port and used a somewhat advanced GUI application to display this data back to the end user.
This is particularly useful if you just want to add flare to an embedded project where you're gathering data from a sensor. See here for a basic example.
Given that I haven't tried the other two I can't really comment on which is best, but I will say that since I already had python installed, it took me about 30 minutes to get a working setup where I printed a value over serial to the PC and then had a 'real-time' graph of it on my monitor. Also, given how many awesome scientific libraries there are for python through numpy I can't imagine there would be any data/signal processing that you wouldn't be able to do in python. So those are both two huge pluses for the python route in my book.
Best of luck.
|
H: Resistors - metal film or carbon film and what values?
I am buying a bunch of resistors as a start to my electronics hobby. These are the values I have chosen:
100, 470, 1k, 4k7, 10k, 33k, 47k, 100k, 470k, 1M
Most of my projects will involve microcontrollers, such as the Arduino and other AVR ones. I have two questions which I would appreciate replies to.
Should I purchase carbon film or metal film resistors, and why? As I understand from my research, metal film tolerate heat better, and are more precise. Price is not something to consider too much as they are essentially the same. Carbon film resistors are $0.01/resistor, and metal film are $0.012/resistor.
Should I add or remove any resistor values from the aforementioned list based on my intended use for them?
Thanks.
AI: (1) Use metal film where possible. Fewer bad surprises. At 1 cents each either way the cost of bad surprises exceeds the component cost, even if the cost is only measured in frustration and wasted effort.
(2) Wouter (correctly (of course)) says "evenly spaced" but doesn't quite explain it. He means that the ratio between adjacent resistors should be about the same. You should aim to always include the powers of 10 values and then have as many as appropriate in between to fill in.
SO
1, 10, 100, 1000, 10000 ...
OK, that one was obvious.
But sqrt(10 ) = 3.16, so
3.16, 10, 31.6, 100, 316 ... :-)
BUT they don't make 3.16 etc in sensible standard ranges, so using the nearest "E12" values:
1, 3.3, 10, 33, 100, 330, 1000, 3k3, 10k, 33k ...
The "obvious" thing to do may be to use
1, 4.7, 10, 47, 100, 470 etc
BUT the ratio of 47/10 = 47 (of course) BUT the ratio of 100/47 = 2.13.
So, if you had a fixed voltage and were connecting successively higher value resistors to ground the change from 100 to 470 would decrease the current by a factor of 4.7, but the next step from 470 to 1000 would reduce the current by a ratio of 2.13. As you went up the currents would change by factors of 4.7, 2.13, 4.7, 2.13, 4.7 ...
You usually get more than 2 steps per decade.
The smallest sensible number has 12 steps per decade.
These are say 1, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2, 10 ...
If looked at by resistance difference the series seems uneven, The differences are.
0.2, 0.3, 0.3, 0.4, 0.5, ... 1.4, 1.8
BUT - when looked geometrically by ratio we see:
1.2/1 = 1.2
1.5/1.2 = 1.25
1.8/1.5 = 1.2
2.2/1.8 = 1.222
2.7/2.2 = 1.227
3.3/2.7 = 1.222
...
10/8.2 = 1.22
SO, within the resolution afforded by 2 significant digit numbers we see that the ratio of adjacent resistances is about 1.21152766 :-) .
I use that "strange" value as it is the twelfth root of 10. If you multiply a number by 1.21152766 twelve times you get a result 10 times larger.
So if you space twelve resistors across a decade range with each a factor of 10^(1/12) larger than the prior one you get resistors which increase in value "smoothly" from a current flow point of view.
E12 - 12 resistors per decade spaced in value by a ratio of the 12th root of 10 .
E24 - 24 resistors per decade spaced in value by a ratio of the 24th root of 10 .
E48 - 48 resistors per decade spaced in value by a ratio of the 48th root of 10 .
E96 ...
More anon maybe .... brake pads to change, darkness fallen ...
|
H: Which LED driver?
My company wants to produce LED lamps. In order to do that I searched a lot for LED drivers. They are lots of LED driver circuits in the world and IEEE papers or patents.
I want to chose between them but I can't find the best commercial LED driver for different uses such as indoor, outdoor etc.
Can you tell me, for example, what circuits are used by companies that produce LED lamps?
Could anyone help me with this?
AI: I'm (arguably) an international expert in this area. (Really, maybe :-)).
One reason there are so many drivers is that applications vary widely and, also, the market is large and potentially lucrative. The answer will vary based on many parameters. I'll list a few, and if you can refine the question I and others can refine the answer.
What country you are in can influence the answer - you may wish to comment to others where you are based.
Mains powered, battery powered, solar powered, other ... - some mix ...?
Maximum power level, minimum power level, ...
How important is efficiency to you? This may vary depending on whether products are mains or battery powered.
How cost sensitive are your products? What market sectors are you selling in?
How important is product quality, longevity of LED, longevity of product.
Patents are important in the LED area and less so in the IC area. LED patents are a major battle-field with lots of money being spent on extensive litigation. BUT, generally patents are irrelevant to you from an application point of view. Buy IC's and LEDs that either do not have patent issues or for which any possible risk is guaranteed by the manufacturer. LEDs that do not have extensive patent cover are almost certainly not worth buying.
Are you building whole lamps or integrating electronics into other people's housings or ?
What volumes do you envisage? Are your markets domestic (own country) or international?
Obviously some of these questions may not be ones you want to answer openly in public. Some may seem irrelevant to the question - but think all are relevant. How much so will vary in some cases depending on other factors.
|
H: Join together two flexible electrical cables
I have 2 electrical cables (audio cables) of same diameter that I want to join, with a connection as discreet as possible. It is common to use some dominos for this kind of task, but these are really to visible. In a perfect world, I'd like the connection to be nearly invisible, as if the cable was not cut.
Do you know how I may do this ?
Precision : I do not want to weld, I don't know how to do it and I don't have the needed material.
AI: The proper way to do this is to strip back the insulation and twist the two ends together, then solder (weld) and cover in electrical tape.
Without equipment to solder, your next best bet is a butt splice. There are many different kinds of butt splices; this is just an example of a very basic and common one:
.
You strip back approximately an inch of insulation on each side, insert them into opposite ends of the splice, then use crimping pliers to crimp the splice on the wire for a tight connection. If you don't have crimping pliers you can use a set of Linesman's pliers, although the crimp won't be as good. I usually use black electrical tape extending about an inch on either side of the splice to help ensure the connection doesn't get snagged on anything in the future.
The best way really is to solder it, and a soldering iron isn't more than $15 with enough solder to last you for a few years if you end up doing this kind of thing only occasionally.
|
H: Why are vias placed this way on a PCB?
I used to check complex commercial PCBs specially those of graphics cards to see how professional PCB designers do their layout and learn from their techniques.
When I checked the card shown below I noticed two things regarding the placement of vias:
(A higher resolution image is shown here).
The PCB is surrounded by stitching vias all around the edges. What's the role of all of these? I think they're connected to ground to act as a shield, if that's true, I can't understand technically how by this placement they achieve this shield?
By looking closer to the mounting holes, I noticed they added vias all around the pad, why?
AI: Ground Ring
Surrounding the PCB, and sometimes areas within the PCB, is surrounded by a ring of traces that is connected to GND. That ring exists on all PCB layers and is connected together with a bunch of vias.
To explain what this does, I need to describe what happens when you don't have the ground ring. Let's say that on Layer 2 you have a ground plane. On layer 1 you have a signal trace that goes all the way to the edge of the ground plane, and runs for several inches along the edge. This signal trace is technically directly over the ground plane, but right at the edge. In this case that trace will radiate more EMI than other traces, also the trace impedance would not be as well controlled. Simply moving the trace in, so it is not at the edge of the ground plane, will fix the problem. The more "in" you move it the better, but most PCB designers will move it in at least 0.050 inches.
There are similar issues when you have a power plane. The power plane should be moved back from the edge of the GND plane.
Enforcing these rules, that traces can't be within 0.050" of the edge of a plane, is difficult in most PCB software packages. It's not impossible, but most PCB designers are lazy and don't want to set up these complicated rules. Plus, this means that there are areas of the PCB that are simply empty of useful traces.
A solution to this is to put in a ground ring and tie it all together with vias. This will automatically prevent other signals from going into that area of the PCB, but also provide better EMI prevention than simply moving the traces back. For the power plane, this also forces the power plane back from the edge (since you just put a GND trace there).
Mounting Holes
In most cases you want to connect your mounting holes to GND. This is for EMI and ESD reasons. However, the screws are really bad for PCB's. Let's say that you have a normal plated through hole that is connected to your ground plane. The screw itself can destroy the plating inside the hole. The screw head can destroy the pad on the surface of the PCB. And the crushing force can destroy the GND plane near the screw. The odds of any of this happening is rare, but many EE's have had enough problems with this to come up with fixes.
(I should note that destroying the plating and/or the pad usually results in metal flecks getting loose and shorting out something important.)
The fix is this: Add vias around the mounting hole to connect the pads to the GND plane. Multiple vias gives you some redundancy and reduces the inductance/impedance of the whole thing. Since the via is not under the screw-head it is less likely to get crushed. The mounting hole can then be unplated, reducing the chance of loose metal flakes shorting something out.
This technique is not foolproof, but does work better than a simple plated mounting hole. It seems like every PCB designer has a different method for doing this, but the basic thinking behind it is mostly the same.
|
H: Battery management circuit for Nokia BL-4C / 5C Li-ION batteries
Nokia BL-4C / BL-5C are 3.7V, 700-1000mAh (variants) Lithium-ion batteries, which are available in abundance and at very low cost ($4 - $7 a piece), since these are used in entry level Nokia phones, sold in most developing countries.
These batteries have 3 terminals, as explained here, for battery positive-terminal, ground, and a terminal (BSI) which I believe presents a fixed resistance value, that needs to be measured, to determine battery-type (chemistry, characteristics including capacity etc.)
So here are my questions:-
Is anyone aware of any existing open-source hardware project, that has built battery-management circuit around such batteries ? (PS> In my searches so far, I've not come across any such project).
How exactly, can one accurately measure the resistance offered by BSI terminal of the battery ? A very accurate and stable reference voltage would be required, I believe - but if the battery itself is the source of such reference voltage, it could vary with charge-status and condition of battery, so how could it serve as a good reference ?
Is it necessary to have a temperature sensor in proximity/touching the battery ?
What would be some low-cost battery-management IC's that are not too difficult to source or work with, for hobbyists, which can be used to charge such Li-ION batteries safely ?
Have found this question here related to 'resistance measurement', but the mechanisms described are far too cumbersome, expensive & require manual intervention, to be useful in automated battery-type identification. OTOH, it is possible that I've completely misunderstood the purpose of the BSI terminal.
As for whether "temp sensor" is needed, I think the answer is YES, based on this. However, the question then becomes, without access to proprietary battery characteristics information of this Nokia battery, what can one do with the temp-sensor ?
AI: 3rd terminal:
The 3rd terminal on your battery is most likely to be an "on board" thermistor temperature sensor. Try this.
Determine -ve and +ve battery terminals.
Connect ohm meter between -ve and terminal that is not +ve.
Blow warm air over battery (NOT TOO HOT) and determine whether resistance varies with temperature.
Sensor could be comnnected to +ve rather than -ve but -ve connection probably most likely.
Charging:
There are many ICs available for charging LiIon cxells.
If you want to build your own Lithium Ion / LiPo charger for up to 500 mA charge rate then using the MCP83831 / MCP83832 charger IC is a very easy and economical way of doing so.
This is eg what Sparkfun use in the LilyPad Simple.
Data sheet here
It can literally be as simple as shown in the circuit diagram below.
.
The resistor from Vss to Prog sets maximum charging current.
Several other options are available by selecting variants of the basic device. Unfortunately 3 different options are selected as a group (see datasheet page 21) providing less flexibility , but the device is still useful and well priced.
Options include cell voltage below which charger goes into "precondition" mode,
end point current termination level
and i_condition / i_charge ratio.
My main "complaint" with this IC is that the lowest voltage output level version is 4.2V and higher voltage (and very dangerous) versions are available.
Digikey sell 3 different versions (AC, AT, DC) with the AT mainly stopping charging sooner (longer life, lower capacity), while the DC variant will try to produce 'magic smoke' and 'vent with flame' if a very low voltage battery is charged.
Available in stock from Digikey for $US0.68/1 and $US0.42/100.
|
H: How to choose correct resistor with proper wattage and ohms for 6 leds connected in a serial circuit?
Let's suppose I've six LED lights with each 3.2 Volt and 20mA and all six of them are connected in one serial circuit. I know there is better setup but for this I'm using this circuit setup.
I'm using a single power source with two 12volt A23 batteries kept inside a 2 battery case and a 240 ohm resistor is also present in between power source and the first LED light.
I calculated the resistance for the resistor like this using Ohm's law:
$$
R = \frac{\Delta V}{I} = \frac{24\,V - (3.2 V\, * 6\, \text{LEDs})}{ \frac{20}{1000}A} = 240\, \Omega
$$
Power dissipated by the resistor:
$$
\text{Power dissipated by resistor} = (24\, V - (3.2\,V * 6\, \text{LEDs})) * \left(\frac{20}{1000}\right) \text{A} = 0.096 \text{ Watt}
$$
So should I buy 1/10 watt and 240 Ohm resistor for this circuit?
If my calculations are totally wrong above, can anyone kindly tell me or better if can be shown the correct calculation and the proper resistor with correct ohm and watt?
AI: Your calculations are correct. I would give the resistor somewhat headroom, power-wise: if the LEDs' voltage is a bit less than 3.2 V, like 3.1 V (the voltage can vary by much more than that!) the current will rise to 22.5 mA, and the voltage drop across the resistor to 5.4 V. Then the power will be 120 mW, so the 100 mW won't do. Overmore, 1/4 W is a more standard value, and probably cheaper.
So go for a 240 Ω/0.25 W resistor.
|
H: How to set up a PLC for hobby home automation project?
I want to use PLC to do security, temperature and light controls. I took case in PLC, but I don't have real world experience to set up a PLC system. Since I do not want to spend too much (less than USD$400 for PLC and HMI), would anyone please suggest me what I have to buy and how much would they cost? I read a site , it says the AB mircologix is around $100 and the software is free. Would it be good for me my usage? Thanks
AI: For a cheaper solution you may use Chinese brand PLC FATEK, which you will get at very low price. You may also use Taiwan brand WINTEK HMI Touch Screen, You total cost will be under you limit. These products comes with Free Softwares, You may downloaded them from their websites for testing before purchasing.
You may use Microcontroller Development kit for this project, but for microcontroller development kit, high skills are required as compared to the PLC Project.
The main difference between Micro and PLC is of Graphical symbol programming and Monitoring, Programming of PLC is much simpler than of Microcontroller. And PLC has better online visual monitoring, however for Microcontroller monitoring you need to use JTAG.
AB Micrologix from plcdev are refurbished, and its Analog input/output card is costly. However FATEK comes with Digital and few Analog Input/outputs, so its depends upon requirements.
Another option is of SIEMENS LOGO PLC and Schneider Electric ZELIO PLC Smart Relay, its similar chinese product is IDEC SmarRelay. All these PLCs comes with a Graphical LCD, where you can see your data or any digital or analog I/O.
Among these PLC IDEC SmartRelays comes with four analog Inputs at lower price.
So, Choice is yours :)
|
H: Input stage for ADC with operational amplifier
I am trying to make a voltmeter with a 10-bit ADC. The ADC can measure only positive voltages so I have made an input stage with Operational Amplifiers.
The idea of the circuit is to transform any negative voltage to positive. V1 is the voltage output and V Detect is 3.3V or 0V if the input signal is negative or positive, respectively.
The input frequency will not be more than 200 KHz. Will this circuit work ok whit the TL084? Is there any special parameter I should take into account?
Also I need V1 not to exceed 3.3V, will a zener diode work or it will cause any problems with regards to capacitance? I know ADC are very sensitive to any external capacitance because of the internal sample-hold capacitor they have.
AI: Some observations:
The two middle opamps don't have power. Opamps need power to function according to spec.
Actually after Steven's comment I see all 4 opamps are in a single package, which apparently is powered. The problem is therefore one of bad schematic drawing. When you have multiple parts in a single package with common power like this, usually you show the power pins as a separate schematic part, like U13E for example. You can show the power and ground pins on one of the four opamps, but that can add clutter and makes that amp look more special than the others. However, never do what you did, which is to show the power and ground pins on each schematic part.
Even worse, you then showed two of the parts with power and ground connected, and two without. What if the two pairs were connected to different power and ground voltages? That would be really misleading since it's not physically possible. This kind of schematic convention makes no sense and invites exactly the kind of confusion shown in point 1 above. I left that there so you can see what the first reaction to this misleading schematic was.
There is no bypass cap anywhere accross the opamp power pins.
You don't say what voltage Vcc is. The TL084 needs a few volts headroom from each power rail, so Vcc should be at least the largest signal voltage plus the headroom.
220 Ω seems very small for R33. Can the TL084 really drive that much current (I haven't checked)? Even if it can, why is that necessary?
With D13 in series with R33, Vdetect will be undriven (high impedance) when the opamp goes low. Is this really what you want?
D17 shouldn't be right on the output of U13C. That will violate the max output current source capability of the opamp when it is trying to drive high.
|
H: Multi high input impedance chemical electrode buffer circuit
In What is the purpose of this op amp? you see my interested circuit.
Added:
The diagram above shows a single pH measurement "channel".
U1 sets a reference voltage of Vout_LM4140A/2, and U2 measures the voltage outut of the pH probe relative to the reference voltage.
I wish to add a second independent pH probe.
I could add two new amplifiers say U1 as reference and U2B for measurement.
However, is there any reason why I should not add a U2B but share the existing reference source from U1 for both probes?
Original question:
I measure output of u2 in single ended mode. There is no problem with one electrode (for example pH).
But i need to measure different electrodes using same common reference in same time (in here reference is taken by u1). If i connect another electrode which have same characteristics with pH electrode and works with same reference to new lmp7721 (as u3) like u2, is it correct?
AI: I understand you to be intending to add a new pH electrode in its own glass tube, to be monitored by "U3", and you wish to share the reference voltage produced by U1.
This is potentially acceptable BUT pH measurements are so very very very very susceptible to outside disturbance that you need to weigh up the cost gains compared with the potential for cross coupling between the op amps and probes in some way.
As long as the actions associated with one electrode do not affect the other in any way at all it will probably be OK. Can you guarantee this?
This LMP7721 application note is liable to be of use It relates to an evaluation board but covers much practical material.
In a pH sensor the output voltage is the voltage developed BY the glass due to hydrogen Ion concentration differences. Sensor impedances are in the order of semi-infinite - say 50 to 500 megohms range, so ie 100's of megohms load impedance is really lower than desirable.
The op amp cost $US10/1 at Digikey. See data sheet for why it costs so much :-).
Wow!!! What a superb op-amp - in some areas at least LMP7721 datasheet
3 FemtoAmp bias current :-) !!!
Related:
pH electrode performance
Wikipedia Glass electrode good
Combination electrode
Single and double junction electrodes
ISFET solid state pH sensors - - The future of pH sensors, once they get them properly sorted.
|
H: Radio interferes with I2C bus communication
I have a PCB with a Microchip PIC18F97J60 on it and every time I key a 5 watt radio transmitting at 144 Mhz next to the board it resets the processor. The processor resets when it’s attempting to communicate over the I2C bus. The watch dog timer times out waiting for the MSSP (Master Synchronous
Serial Port) interrupt flag to be set. This happens most often when waiting for the interrupt flag after the master (PIC18F97J60) sends a restart or a NACK.
I’m using 2 kOhm pull up resistors and running the bus at ~96 kHz. On the oscilloscope it looks as though the interference on the bus is bad enough where it can pull the SCL and SDA lines down from 5V to 2.6 V. What can be done to protect the i2c bus signals from interference so the processor does not reset while waiting for an interrupt from the MSSP module?
AI: Apparently the radio interference is messing up the IIC bus communication such that the slave doesn't think it is being addressed and there is no ACK. As Steven pointed out, it is bad software design to have a missed ACK cause the processor to reset. This needs to be fixed, but your question is mostly about the interference issue. You got lucky that the interference aggrevated another lurking bug in your code. Fix that while it is easily reproduced.
2 kΩ pullups on the IIC lines is about as low as you can go, so nothing more can be done there. You don't say what frequency and power level this radio is that is next to the board. Some level of closeness and power output is going to cause a failure. Put another way, there are only so many volts per meter your board can take before it operates incorrectly. The first thing you need to ask yourself is if the level of radiation hitting the board is reasonable to protect against. One solution could be "well, don't do that". Put the transmitter accross the room, shield it properly, move the antenna, etc.
If you do need to make the board less sensitive to this RF (again, it would be useful to know the frequency and power level you're dealing with), then there are probably various things to fix. Most likely this problem is due to bad layout, particularly the ground, and inattention to high frequency loop currents. All the same things you do to reduce emissions work symmetrically to reduce the susceptibility to received radiation. Put another way, physics tells us that anything that works as a transmitting antenna works as a receiving antenna and the other way around.
So show the layout, particularly the grounding strategy, of your board. Also look carefully at anything going off board because these are antennas. Since you are using a 18F97J60 which has a ethernet MAC/PHY, you probably have a ethernet cable coming from the board. What RF reduction is on the network side of the transformer? Does the transformer have a built in balun on the network side? Does the problem go away when you unplug the ethernet cable?
|
H: Antenna Length for Low Frequency Radio Signals - Why so long?
I know that when you want to pick up low frequency radio signals, the longer the wavelength, the longer the antenna needs to be. Why is that?
mj
AI: Think of the vibratory modes on a string clamped at both ends. When you clamp a length of string at both ends, the allowed vibration patterns all have one thing in common; they go to zero at the ends.
So, the length of the string determines the natural frequencies of vibration; the longer the string, the lower the fundamental frequency.
Very roughly speaking, an antenna acts similarly. For example, the current must be zero at the ends of a center-fed dipole antenna in analogy with the clamped ends of the string.
So, for the antenna to resonate at a lower frequency, it must be longer, just as the string must be.
|
H: Does magnetism affect SD cards?
Would a strong magnet have any effect whatsoever on a thumb drive (I'm assuming not) or on an SD card? It seems unlikely, but I'm hoping someone can give me a definitive answer, since I'd rather not find out the hard way that it actually can. Assume the magnets are powerful industrial magnets, if that makes a significant difference to the answer.
AI: I've tested many card with my 1.5Kg rare earth magnet, so I can bet that magnets have no effects on flash cards or USB pen drives :-)
|
H: Confusion with negative voltages in this opamp circuit
I want to use a circuit like below to amplify a photodiode:
(taken from this page)
But it requires negative voltage.
Can I use the following circuit I modified instead with a positive supply only:
And if correct, how can I couple the output to an ADC input?
AI: But it requires negative voltage.
No it doesn't; it's giving you the option of tying the photodiode anode to ground/0 volts or, if you want fairly high-speed operation, you can apply a negative bias voltage. If you don't need a high-speed (in the MHz) response, then ignore the option of using a negative supply to bias the photodiode and just connect its anode to ground.
Can I use the following circuit I modified instead with a positive
supply only
Stick with the first circuit is my advice and, ensure the following: -
If your op-amp doesn't use a negative rail then, you'll need to ensure that it has the capability of running both inputs at 0 volts AND, that the output can fall to significantly close to 0 volts. Typically an LM324 can do this but, there are better/other choices.
If your op-amp does use a negative rail then, you can also use this for biasing the photodiode anode. It's your choice.
|
H: DOIT esp32 devkit v1 schematic confusion
I'm creating my own small dev board for the esp32 wroom module.
I'm following the schematics for the DOIT devkit v1 module.
Full schematic here: https://embedded-systems-design.github.io/overview-of-the-esp32-devkit-doit-v1/SchematicsforESP32.pdf
I'm unable to workout if I need a polarised capacitor or if I can use ceramic for all.
Given the schematics there is no plus (+) sign on the capacitors.
But on the dev board itself, I can't seem to find what the below highlighted capacitor is for.
Looking on ebay at 3.3v regulator modules, they all seem to come with ceramic only caps, so I can't say for sure if this is part of the power supply.
I'm guessing it is the 100nF C2 cap, but that is a guess and then if it is, do I need to use a Tantalum Capacitor or could go ceramic for all?
AI: It should generally work. In fact, usually for power supply purposes, ceramic capacitors are slightly preferable to tantalum (your polarized cap looks like a tantalum type) capacitors, because they have lower internal series resistance.
Two caveats:
Ceramic capacitors, especially of the larger-capacitance types, have lower capacity at higher bias voltages. So, make sure your 10 µF capacitor is rated significantly higher than 3.3 V; going for anything less than 16 V rating probably is a bad idea
In some circumstances, the higher resistance is a feature (not a problem), because it can dampen control loops and limit oscillations. That's probably not the case here.
|
H: Control buzzer with GPIO
Edit: Realised Silly mistake, I have the emitter and collector swapped on my PCB :( sorry about that.
I'm trying to control a magnetic buzzer indicator using an STM32 MCU. I have the circuit below which although works the buzzer is extremely quiet. I have testes with a voltage meter that the transistor is switching and I a getting 3.3v across the buzzer when switched on.
Through some trial and error I found that if I short R32 the buzzer switches on correctly and is as loud as just connected directly to 3.3v and GND.
Could someone advise what is happening here? Because with R32 present I am seeing 3.3v but why is the buzzer so quiet?
The buzzer is internally driven so it just needs 3.3v across it to sound.
AI: The datasheet of the CMI-1295IC-0385T MAGNETIC BUZZER INDICATOR has the following Performance Curve:
From the above graph the resistance of the buzzer is ~170 Ohms.
simulate this circuit – Schematic created using CircuitLab
So, with the following where R2 simulates the nominal resistance of the buzzer, it shows that when switched by a transistor and having an additional 22 Ohm series resistor there is 2.8 V across the buzzer when switched on.
From looking at the performance curve a reduction of the voltage across the buzzer for 3.3 V to 2.8 V reduces the SPL from ~84 dB to ~82 dB. According to Sound level and auditory perception :
Increasing sound level : 1 to 2 dB
Changing in auditory perception : Not perceptible
Therefore, the above analysis doesn't explain why switching with the transistor causes the buzzer to be extremely quiet.
Is the BUZZ output from the STM32 MCU using PWM?
The CUI DEVICES Buzzer Basics - Technologies, Tones, and Drive Circuits contains the following in the Application Circuit for Magnetic or Piezo Indicator section:
An indicator requires only a dc voltage to operate and sound is produced whenever the voltage is present.
Therefore, with the CMI-1295IC-0385T having a built-in driving circuit, and so the STM32 MCU BUZZ shouldn't be using PWM.
|
H: Low level voltage is changing on I2C bus when starting communication
The setup:
I plugged an STEVAL-MKI224V1 board (basic eval board for baro sensor) on a nucleo F411RE. Communication happens through i2c bus.
I added 4.7k pull-up resistors on SCL and SDA.
The wiring:
SDO to VDD (set i2c address)
CS to VDD to activate i2s communication
VDDIO to VDD to nucleo 3.3V
GND to nucleo GND.
SDA and SCL to nucleo.
No internal pull ups are used.
The issue:
As communication was not successfull on first frames, I plugged a scope on SCL and here's what I get:
On the first bytes, the low level is not +/- 0V as it should be.
Other tests:
I tried a 10k pull-up, the result is the same.
I tried with only pull-ups (without eval board), result is ok.
I tried with another eval board for another sensor (Rohm), the result is far better but there's still a "rounded" 0. On this view, I zoomed a bit, code and i2c configuration is the same:
What did I miss?
Pictures of the setup:
AI: Looks like
either you've got some precharged capacitive load on your SCL,
or your SCL carries the involuntary job of exchanging current until ground potentials between two parts of your system have equalized.
Barring the possibility that you added a literal capacitor from SCL to ground or Vcc, I find the latter more plausible. Make sure you're not just connecting SCL and SDA between parts of your system – but also GND.
|
H: 3 dB Power Divider Used as Power Combiner S Matrix Explanation
I'm trying to understand the operation of an ideal RF power combiner.
Below is the scattering matrix of such device. (i.e. Wilkinson Power Divider)
\$[S] = {\frac {-j}{\sqrt {2}}}{\begin{bmatrix} 0 & 1 & 1 \\1 & 0 & 0 \\ 1 & 0 & 0\end{bmatrix}}\$
I know how the division works but I'm confused as to how power combination works.
If we were to send a wave from port 2 with an amplitude of A, and in same phase a wave with amplitude of B from port 3 we should get A+B in port 1 since the waves can't go anywhere else in the device.
But i fail to explain this with scattering parameters. \$[b] = [S].[a]\$
In our case \$ [a] = {\begin{bmatrix} 0 \\A \\ B \end{bmatrix}}\$
If we do the matrix scalar multiplication we get:
\$ [b] = {\begin{bmatrix} {\frac {-j}{\sqrt {2}} (A+B)} \\0 \\ 0 \end{bmatrix}}\$
So we got \$ \frac {-j}{\sqrt {2}}(A+B) \$ at port 1 instead of \$ (A+B)\$.
Where did the rest go? Same thing goes for magic tee as well.
Thank you for your time.
AI: The sum port of a Wilkinson is a superposition of the S-Matrix. Your answer is correct.
\$ [S] = {\frac {-j}{\sqrt {2}}}\begin{bmatrix}0 & 1 & 1 \\ 1 & 0 & 0 \\ 1 & 0 & 0 \end{bmatrix} \$
The sum port is a super position of signals at port 2 (A) and 3 (B):
\$ s = {\frac {-j}{\sqrt {2}}}A + {\frac {-j}{\sqrt {2}}}B = {\frac {-j}{\sqrt {2}}}(A+B)\$
If A = B this would reduce to
\$ 2{\frac {-j}{\sqrt {2}}}A\$
Which is twice the power of A:
\$ |2{\frac {-j}{\sqrt {2}}}A|^2 = 2A^2\$
Therefore, no power is lost.
Please note: this only true for correlated signals. If random signals are used in A and B it becomes the sum not super-position.
|
H: How do I handle a component with pin spacings smaller than the necessary trace width?
I'm designing a board using a TPS2113 power mux in a TTSOP package to deliver ~1A from plug power or a battery to my board. My calculated trace width for this current is 25-30 mil, however the pins of this component are spaced 25 mil apart, making it difficult to connect wide traces. The IC pins are ~11mil wide. How do I handle this, and how is it possible that such narrow pins are intended to carry such a large current? The TPS2113 is rated for 1.3A maximum.
AI: Trace current handling (ampacity) only matters over long distances, where heat isn't being sunk along the length of the trace.
As long as you make the connection (fanout) short, and attach it to a much thicker trace or pour, it's fine for the fanout to be ~pad sized.
After all, they have microscopic bondwires inside the package; those work just fine too (being short, and surrounded by encapsulant). :)
|
H: What is the best way to turn off power to motor controller's H-bridge?
I am trying to figure out the best way to implement an emergency shutoff for the H-bridge of a motor controller:
My requirement is to turn off the 48V to the drain of the FET based off a signal which is either 28V (when the emergency signal is active and thus the MOSFET needs to be shut off) or 0V (When the emergency signal is not active and thus the MOSFET should be in regular operation.)
There will be two full H-bridges per motor and three motors per PBC. I anticipate current of about 10A per H-bridge. I would be happy to provide any other information to paint a picture of what I'm trying to design.
What is best way to design circuitry that will shut off the 48V to all three motors based off an input signal that is either 24V or 0V?
The emergency shutoff must be independent of the MOSFET controller or H-bridge gate, so we cannot turn off one of the MOSFETS or the H-bridge in general.
AI: What is best way to design circuitry that will shut off the 48V to all
three motors based off an input signal that is either 24V or 0V?
Depends on what you want to avoid, if you think the h-bridge could fail and short out the VCC either a pmos fet on the high side or a nmos fet on the low side would be sufficent.
I would probably select a low side fet with a very low Rds-on.
|
H: How should I interpret this DP3T switch diagram?
Which pins are the poles and how are they connected in the three positions of the following switch?
Datasheet for DP3T Switch (SLW-993515-2A-SMT-TR).
I'm just not sure how to read this schematic:
AI: It's hard to know why they wouldn't make this information very clear. From experience several decades ago I would think it's something like this:
simulate this circuit – Schematic created using CircuitLab
A: 3 to 1.
B: 3 to 2.
C: 3 to 4.
This is very simple to manufacture.
Non-shorting means that the contacts are break-before-make so 1, 2 and 4 should never be connected while the switch is in transition.
|
H: TDA2822D speaker connection issue
This is the circuit from the datasheet TDA2822D.
I have a question regarding the connections near the 32/16 ohm headphone. Why the two terminals of the speakers are connected together to the ground. I tried to draw the circuit, do I connect the pin1 and pin2 to the ground?
AI: The ground connection would be that each speaker element in the headphones are connected to GND. In the picture of your ciruit you have shorted Left and Right to GND so there would be no sound.
Then I don't know whether you want the speaker element there or headphones, but TDA2822D can be wired for either stereo or mono to satisfy both setups.
Here's a page describing the subject in depth:
Headphone Jacks and Plugs: Everything You Need to Know
Especially Different Plug Conductor Configurations
|
H: Is it safe to connect CR2032 cells in parallel?
As mentioned in the title, I would like to connect two CR2032 cells in parallel to increase their capacity. If they are slightly different voltages then won't the better battery "charge" the weaker battery until the voltages equalize? My batteries are non-rechargeable. Is this dangerous? Should I prevent current flow with diodes? They will drop 0.7 volts, which is a nuisance.
AI: It's not a good idea unless you use some sort of device to ensure that current cannot flow back INTO the battery terminal, which in extreme cases can lead to overheating and explosion (admittedly unlikely at these energy levels.) The problem is that if one of the batteries is flat and the other new, their terminal voltages will be very different, or even perhaps if they are of different brands. See here for more on this.
A first order solution to protect against this is a diode, but then you lose some voltage (about 0.2V for Schottky) to the diode forward voltage. There are also MOSFET based circuits which function as an ideal diode (though they might be more for selecting one of N supplies than current sharing, you need to think this through a bit).
|
H: The output of ADC (AD7091R-5) is slowly rising with constant input
I have a circuit board with an AD7091R-5 analog to digital converter. I'm reading the output via I2C using a particle board (much like an Arduino.)
I'm reading the register for channel 0 and 1 as I intend, but there's a constant rise in the output of the ADC on both channels. I've connected to a mA tester that delivers 20mA to one channel and I've tried with different power supplies. The other channel is connected to a temperature sensor.
What can cause a slow rise in the output with constant input?
There are a few other components on the circuit board I'm not entirely sure about but I can figure it out if it's relevant.
Edit*
(a)
The other components is the particleboard, some for digital input and output and for battery control. I haven't included those are they relevant?
(b)
Regarding the setup. I've connected at temperature transmitter to the first analog input and the mA tester to the second (there's only the two). I wanted to scale the the output of the ADC's in the particle board when it kept being too low so i noticed that the value was rising. I used the mA tester to test the values for a 4-20 mA input. At first connected in 'closed loop' and secondly with external 24VCD.
I'm currently trying to only have one active channel on the I2C as Spehro Pefhany suggested.
AI: One possibility is bad timing so that you get some of the temperature reading smeared into the other input. To test for that, change the firmware to measure only one channel.
Another possibility is that the reference is changing (voltage decreasing with time). You can measure the reference voltage directly to check that out.
If you failed to use the recommended 2.2uF capacitor on Refin/Refout that could certainly cause reference instability and changes in the readings. Check Regcap as well.
|
H: Matching network for a radio
I’m trying to understand how the matching network functions on the radio side of a transmission line. As an example, here’s an excerpt from the Nordic nRF52840 DK schematics.
As I understand it, when the radio is receiving, matching network B transforms the antenna impedance to 50Ω to match the 50Ω microstrip transmission line “TL”. Matching network A then transforms the radio to a 50Ω load for maximum power transfer. So far so good.
What happens when the radio is transmitting? The transmitter output impedance would be low to minimize power loss. How does it get matched to the transmission line? How do we avoid having to toggle between two different implementations of matching network “A”, one for receive, one for transmit?
AI: Here is the datasheet for the IC
https://www.nordicsemi.com/-/media/Software-and-other-downloads/Product-Briefs/nRF52840-SoC-PB-23.pdf?la=en&hash=60847B0615FA41626CC73C9E5286C34F2481685E
General PCB Design Guides for nRF52
https://devzone.nordicsemi.com/guides/hardware-design-test-and-measuring/b/nrf5x/posts/general-pcb-design-guidelines-for-nrf52
Here is a white paper for antenna tuning
https://infocenter.nordicsemi.com/pdf/nwp_017.pdf?cp=17_13
https://devzone.nordicsemi.com/f/nordic-q-a/84290/optimum-rf-impedance-to-present-to-transceiver-output
Here are some Smith Charts
https://devzone.nordicsemi.com/f/nordic-q-a/92381/nrf52840-matching-network-for-pin-31-ant-matching-circuit-needed-for-regulatory-requirements-emc
https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5127.nRF52833-QIAA-matching-network.pdf
https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0830.nRf52840-QIAA-matching-network-_2800_1_2900_.pdf
|
H: The complete circuit of this project
This circuit is a solar charge controller module Can you help me get the schematic and PCB of this circuit?
AI: There is a 8 pin IC and a 10 pin IC. You need to know what they do. I guess the 8 pin IC is a linear voltage regulator and the 10 pins IC is a battery charging monitor IC.
If it's exact, search for these two component on the internet (on on-line vendor websites). Download the datasheets. Inside these datasheets you will see explanations on how to replicate this circuit, schematic samples, informations about the other components and maybe hints on how to improve it.
If it's not exact, then search only for a battery charging monitor IC.
|
H: What's the transfer function of this op-amp circuit?
I have to analyse this circuit to find the transfert function between the input e(t) and the output v(t). I already know how to proceed. First the voltage at each pin and then difference between theses pins should be 0. I will end up with what I am looking for.
To do so, we are kind of studying each pin separately even though both pins are connected to the same point which is the input e(t). For me at this point the positive input is therefore connected to all the upper part and then the resistor on the minus pin and the output pin should be takes in count while looking to the voltage of the positive pin.
I tried to do my best to explain my concern. English is not my native language so please be patient with me.
Credit: Ecole polytechnique de l'Université De Nantes
AI: I tried to do my best to explain my concern. English is not my native
language so please be patient with me.
From a comment under the question: -
my question is more about the method
Break the link on the inputs like this: -
Then use superimposition theory to find u(t) with source \$\color{red}{\text{(2)}}\$ being grounded then repeat for source \$\color{red}{\text{(1)}}\$ grounded. Add the two instances of u(t).
Do you understand the superposition theorem?
|
H: Cable shielding (best practices)
I am making a cable to connect two boards as shown in the image below:
The cable will be around 25 cm long and will be in an electrically noisy environment (consider 220 VAC house wiring lines touching it physically). Cable will have a PVC sleeve on top.
Both boards will be in a non-earthed plastic housing. One of the boards will have an ac-DC PSU circuit that generates 5V 1A.
The cable carries the following signals: GND, 5 V (1 A max), UART (3.3 V, 9600 baud) Tx and Rx, three relay signals (signals are 3.3 V logic and meant to drive the transistor that in turn will drive the relay).
I need some help understanding what would be the right cable design for this application. The below image shows my current idea:
My questions are as follows:
Do I need the mylar + aluminium foil shield? Is that going to help me?
If I use the foil shield, should I connect it to GND signal.
If I am using the shield, is the above drawing optimal? Or should I do separate shielding for any signal as well? For ex - [UART tx and rx in a shiled] + [All remaining signals]. And then another shield to cover this combination. Ultimately both shields will touch but there will be a shield foil between UART and other signals.
Is 28 AWG copper wire conductor good enough for 5 V, 1 A power? Or do I need to use a thicker wire?
AI: Ed note: bahaha, I discovered the 30,000 character limit for a single answer. It seems I need to split this off. Well, just as well; it's a more direct answer to the question. Please see my other answer for the detail underlying this answer.
Summary
To sum up the points above, I can -- at last -- answer the questions as written:
Do I need the mylar + aluminium foil shield? Is that going to help me?
If I use the foil shield, should I connect it to GND signal?
Need, no. Assuming you can add adequate filtering on both ends of each connection (typically an ESD clamp diode at each connector, say 100R in series at the transmitter pin, and 1k to the receiver pin with 1nF at the pin to GND), logic level serial at this baud rate will be more than adequate.
You can connect it if you like, which has the effect of raising the K factors in the equivalent circuit. Performance is limited by the quality of the screen/shield itself, and how well terminated it is at both ends: for typical screened cable, you can't get the screen wire any closer than say an inch to the board, and you'd have to use EMI gasket tape and some hackery to do better. This short uncoupled length (cable wires loose in air between shield and PCB) allows voltage drop along the shield wire and therefore CM-DM mode conversion. Given the likely frequencies here, it would still offer some improvement. But clearly -- assuming adequate filtering is possible, it's not at all a necessary improvement, so don't sweat leaving it open, either.
If I am using the shield, is the above drawing optimal? Or should I do separate shielding for any signal as well? For example, [UART TX and RX in a shield] + [all remaining signals]. And then another shield to cover this combination. Ultimately both shields will touch but there will be a shield foil between UART and other signals.
Not necessary; as long as signal output rate is low enough (this is a question of emissions and signal quality, incidentally), compared to length of the cable, it doesn't matter how they are shielded. (Again, shieldless is acceptable given filtering, so it really doesn't matter what happens here, lol.)
If they were high-rate signals, individual shielding -- basically making an array of coax cables -- would be desirable. The second-best and I guess most common substitute for this, is ribbon cable with every other wire grounded: the interleaved grounds prevent signals from "seeing" each other directly, keeping coupling between them low enough to pass digital signals with adequate fidelity (<10% signal bounce, say). Ribbon cable of course is unshielded, so suffers the same concern as above (CM-DM mode conversion), and would still need to be filtered; if you were doing, say, 10Mbps SPI between boards, I think I would want to see RS-422 in use, even over such a short distance. That, or a shielded cable, with the shield braid terminated to the board ground plane via metallic connector, or with the jacket stripped back a ways to fit a ground clip.
A final comment about shielding, by the way; it should be grounded at both ends. Leaving one end open, means any common-mode voltage on one board, is not carried through the shield as shield current, but carried on the signals within, and thus CM-DM mode conversion ensues, and wailing and gnashing of teeth. This is the number one mistake on USB (another fully shielded signaling standard), which is repeated disturbingly often, and yet erroneously; there are almost no applications (read: perhaps some % of all total?) where shield is not hard grounded to the PCB. The most often quoted contraindication for grounding shield at both ends, is ground loop; but clearly that cannot apply here (only one board has another connection at all, let alone grounding), and, obviously, opening the shield allows precisely that ground-loop voltage into the signals within, destroying signal quality. It's a non-solution; the correct solution for ground loop is an isolated interface, not a cut shield.
Also mind that, through all of this, "ground" refers to local circuit ground or reference plane. Safety ground, earth, has absolutely nothing to do with AC/RF grounding, and indeed galvanic and EMC grounding can be done independently of each other, given a clever enough interface (namely, bypass caps and CMCs). There is certainly no reason evident in this question, to make a safety ground connection; or at most one (near the power supply, to sink its ground-leakage current; this would in fact be required if it is of BASIC type insulation, but hopefully it is REINFORCED type and the output can be grounded or floating without any issue).
Is 28 AWG copper wire conductor good enough for 5 V, 1 A power? Or do I need to use a thicker wire?
At this length, that's not too bad. It's thinner than I would specify on a new design, but I would accept it if needed for other reasons (thin cable?).
You may want thicker cable anyway, just because it's handy; multiconductor of 22AWG or so is quite abundant.
Or... well, maybe that's the thing, you're cutting up a USB cable or something, I have no idea. :)
|
H: Accelerometer output mA/g; how to get to mV/g?
Using a Q-Flex QA2000-030 accelerometer that has output of current. It has a scale factor of 1.2 mA/g. If I want to get the output as 0.1 V/g-- how should I go about making the change? Would an op-amp current to voltage work to change the output? How do I introduce the scale factor to get 0.1V/g?
AI: To convert from voltage to current, you simply feed the current through a resistor to some reference voltage (e.g. GND) and measure the voltage across the resistor.
You have an output of \$1.2\space[\mathrm{mA/g}]\$, which you want to map to \$0.1\space[\mathrm{V/g}]\$, so that means you need a ratio of:
$$\frac{0.1\space[\mathrm{V/g}]}{1.2\space[\mathrm{mA/g}]}$$
Nicely, we know from Ohms law, \$V = I\times R\$, so \$R = \frac{V}{I}\$ which doing unit cancellation we see is exactly the same units as the above ratio. So:
$$ R = \frac{V}{I} = \frac{0.1\space[\mathrm{V}]}{1.2\space[\mathrm{mA}]} = 0.0833\space[\mathrm{k\Omega}] = 83.3\space[\mathrm{\Omega}]$$
Thus feeding the output current from your accelerometer into an \$83.3\space[\mathrm{\Omega}]\$ resistor will give you a voltage drop of the desired output. This is not a standard value, but you could use say {\$78.7\space[\mathrm{\Omega}]\$ in series with \$4.64\space[\mathrm{\Omega}]\$}, or go for {\$2.2\space[\mathrm{k\Omega}]\$ in parallel with \$86.6\space[\mathrm{\Omega}]\$}, or one of many other combinations.
Depending on the chip, you may find that it is not exactly \$1.2\space[\mathrm{mA/g}]\$. If you need to be able to adjust the ratio to compensate for the sensor not being exact, you can either do that digitally (scale the measured value), or vary the resistance value.
For example replace the \$2.2\space[\mathrm{k\Omega}]\$ resistor in the parallel example above with a \$4.7\space[\mathrm{k\Omega}]\$ trimmer resistor perhaps with a \$220\space[\mathrm{\Omega}]\$ fixed resistor to get a nice trimming range (\$62.1\space[\mathrm{\Omega}]\$ to \$85.1\space[\mathrm{\Omega}]\$). This would cover the \$1.2\space[\mathrm{mA/g}]\$ to \$1.46\space[\mathrm{mA/g}]\$ range given in the datasheet plus a bit more in each direction.
If you need to measure this with an ADC, you could then, depending on your ADC input impedance, buffer this voltage using a unity-gain op-amp.
|
H: How to filter a noisy PWM signal without affecting rise and fall times
I need to read the frequency and duty cycle of a PWM signal that is expected at 88Hz. It is getting a lot of noise (during radiated immunity).
Before noise:
After noise injected:
What filter would you recommended to clean this signal without affecting the rise and fall times of the PWM (such as a LPF would do)?
AI: You should be able to filter out the high frequency component fairly easily, since it's an order of magnitude higher than your signal of interest.
Your signal is 88Hz, maybe up a couple hundred if you consider the edge sharpness. Your noise signal is >10MHz. That sine wave is likely the modulation of the carrier.
My first priority would be to try to reduce reception of the noise by using a ~1nF shunt cap to "ground" the PWM signal line.
A common mode choke or clip on ferrite will likely help as well.
Follow that with some RC filtering and maybe some chip ferrites and it will likely clean up nicely. Will those technically effect the rise and fall times? Yes, but if your rise times are 100uS-1mS, and you reduce that by 1uS, does that really matter?
https://emcfastpass.com/emc-testing-beginners-guide/emc-immunity-testing/
|
H: Unable to get my astable multi-vibrator working in LTspice
I'm trying to build a basic square wave oscillator using an astable vibrator made with an op-amp for my Intro to Circuits class.
Unfortunately, I cannot get LTspice to simulate the oscillations.
I've tried a good chunk of the op-amps available. I've also tried varying resistor values, VCC and VEE, capacitance, transient settings, and the initial voltage on the capacitor. I can get this to somewhat simulate on Farstad, but how do I get it to simulate on LTspice?
Edit- I am aware that voltages attached to VCC and VEE have incorrect polarity, it still doesn't work if they are correct.
Edit2- The capacitance in 100 nF, voltage is read from the output of op-amp. Zooming in on the photo should help if you have difficulty reading some of the values.
Edit3- This is the latest version of LTspice running on a Windows 11 machine.
AI: Here is one problem: The output of the op-amp is connected to GND.
There may be other problems.
|
H: If the chassis is at high potential and a human touches it, will he get shocked? The proposed circuit is for the cancellation of CM current
This circuit is compensating the potential difference between the chassis and motor so the bearing current or leakage current cannot flow from motor to chassis to ground.
If the chassis is at a high potential and a human touches it, will he get shocked?
AI: It seems to me that this is in an automotive context, where the chassis ground does not necessarily correspond to earth, and a real earth reference might very well not exist if you are not hooked up to a charger.
If the whole car is floating, then there is no risk of electric shock as you are either inside the car, where nothing but chassis potential is exposed, or outside the car, where you cannot complete the circuit to the battery anyway. Since we are dealing with DC voltages here, AC coupling is not even a risk.
The risk of an electrostatic discharge is always present, i.e. the car floats to several kV difference to earth, and when you touch it you get shocked, but this does not pose a health concern.
When the car is hooked up to a charger, I expect the charger to also expose a earth protection conductor, that provides an "absolute" reference to the whole system. This conductor should be hooked to the chassis on the car side, but again, this is more to protect the car itself rather than the humans.
|
H: TPS65251_Formula Error?
According to the formula, R11 will be 20.1kOhm i.e., R11=((1.2-0.8)*40.2k)/0.8 -> 20.1kOhm.
The outcome of 80.4kOhm does seem to be correct but seems issue with the formula. What do you guys think?
Datasheet: https://www.ti.com/lit/ds/symlink/tps65251.pdf?ts=1700049617159&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTPS65251
AI: Equation 25 is wrong; the numerator and denominator are exchanged.
Section 8.3.6 of the same datasheet has the correct equation:
(There is a feedback link at the bottom of each page.)
|
H: Piezo transducer as both microphone and speaker
I'm trying to find the best piezo transducer for my project, which is a Morse code sender and receiver.
Since a piezo transducer can both act as a speaker and a microphone, and I only send/receive at a very specific frequency (700 Hz), and I only send or receive (not both at the same time), I think I can pull this off with just a single transducer connected to both the ADC and DAC of my microcontroller.
When looking through component websites (Digikey, etc.), I can't find any piezo transducers that have data for usage as microphones. Even though they are called transducers, the intention seem to be to only use them as speakers. To find the ideal component, I need to see microphone sensitivity, microphone noise level, etc.
Has anyone done something similar, and can give me some pointers?
AI: Many small piezo transducers come mounted in an enclosure which acoustically resonates at a specific frequency - usually much higher than the pleasing 700 Hz tone desired...a TDK piezo described here...
This one's acoustic resonance is near 4 kHz. But just how seriously resonant is it? Acting as a raw microphone, it was monitored with an oscilloscope. White(ish) noise was blown across it momentarily from a few centimeters away:
The enclosure surrounding the embedded piezo greatly magnify sound intensity - but only at resonance. At 700 Hz, acoustic efficiency is very poor...there is very little amplitude at 700 Hz, but large amplitude at 4000 Hz.
Usually, much larger transducers have lower resonant frequency. You might find one whose resonance is nearer to 700 Hz than ubiquitous tiny ones. A highly-resonant enclosure like this makes it a poor microphone for voice use. For Morse code, a 700 Hz. resonant transducer would be more useful, since bandwidth of Morse code is so narrow.
Based on the amplitude generated by the 4kHz transducer (above), a single-transistor amplifier stage might be useful to drive an ADC with a larger voltage than the ~50mV shown here.
|
H: How are simple functions done in commercial products?
In commercial products, here for example a Google Home or Alexa, how are simple functions implemented? Say I want to make an I/O system which uses Bluetooth but without using an Arduino. An Arduino is too powerful and expensive for turning an LED on and off. In a Google Home, it can use WiFi Bluetoooth, send data to the company etc. but apparently it is not using one on those microcontrollers that are used in our DIY or protoype projects like an Arduino or Raspberry Pi but instead some custom one.
How can I get such simple functions to work in a minimalistic way but it should professional even if the process is complicated.
I am starting out right now and if I have made any illogical statement then please forgive me.
AI: Most of the commercial devices use considerably more powerful MCUs than hobbyist MCU modules such as Arduino.
For example, Google Home has a dual-core Cortex A7 in the form of a Marvell 88DE3006. There's also a 32-bit ARM Cortex-M0+ in there.
As a hobbyist you can use hobbyist modules such as Raspberry Pi to perform similar functions, but the cost will probably be higher. The ESP32 series of modules from Espressif provides a low-cost way for hobbyists to access Wifi and BT without having a mass produced product. You can also use the hobbyist-friendly Arduino IDE. There are also various evaluation modules if you're prototyping a product that will be made in large quantity, such as those from ST, NXP, WCH (Nanjing Qinheng Microelectronics) etc.
Just communicating over a wireless protocol such as Wifi or BT requires many thousands of lines of code for generally useful minimally functionality such as turning an LED on and off. You often don't have to write that code (there are open-source options such as lwIP, for example), but the code has to be in the memory and running on the MCU.
|
H: PIR sensor circuit
I am designing a PIR sensor circuit to detect human movement. I am supposed to display movement using an oscilloscope (the response from this PIR sensor.)
I have used the following circuit but it does not show any response on the oscilloscope.
Is there anything that I need to add?
AI: As in the comments the 741 op-amp is not one of the better choices.
Consider using one of the test circuit configurations in the IRA-S210ST01 datasheet, these also use an op-amp similar to that recommended in the comments.
For additional info you can refer to this application sheet. The document also includes a prototype starter board that should be available, schematic included.
In your original circuit you are using the transistor as a switch rather than a linear amplifier. If you want to view an amplified analog output try using one of the the circuits in the datasheet or application sheet to start.
Since the LM224 op-amp (and similar versions) have multiple parts in one package you can implement an analog stage, a filtering stage, and a comparator stage. Below is one of the test circuits from the datasheet.
(From Murata datasheet Fig. 5)
.
|
H: Why not put a crystal oscillator inside the microcontroller?
Why not put the crystal oscillator inside the MCU itself, rather than using an RC internal oscillator? I could think of the following possibilities but not sure if they are valid:
MCU manufacturer wants to keep a low price of their product. A crystal will be more expensive than RC oscillator.
Designers might want to skip the crystal in a majority of the designs.
Designers need the flexibility to choose the right crystal for the same MCU depending upon their application.
Packing a crystal inside the MCU is not feasible.
I personally am unable to relate with 2 and 3. I typically use crystals in all circuits and just follow what they recommend in the application note. It will be great if they take the headache of layout, correct capacitor calculation, etc. away from me. It would save PCB space, and probably a packaged microcontroller would be cheaper than buying a microcontroller and crystal separately.
Are there other valid reasons for not putting the crystal inside the microcontroller?
I feel that having a precise internal crystal oscillator would be cost-effective and convenient to design, in general. At least for micrcontrollers that most probably need a crystal for functioning. Examples - any RF chip (wifi, BLE, zigbee.)
I recently came across what they call SIP modules for some wireless chips (EFR family from Silicon Labs and CC2652R from TI), where they make a 7 mm X 7 mm chip-like design containing a crystal, RF circuit etc. Designers just need to connect the antenna and other basic components.
I am wondering why not do it with general microcontrollers as well.
AI: A crystal is very different in physical construction from an MCU, and most crystals are annoyingly large to integrate into a chip package. It's possible, however, to integrate other types of (smaller) resonators into a package, e.g. FBAR (Film Bulk Acoustic Resonator) devices that can be made as small as a few hundred microns on a side. Even in this case, it's two separate dies, with separate processes, packaged side-by-side.
Here's what this sort of FBAR co-packaging looks like (in this case for an RF application):
This particular image is from a chip-on-board integration for an academic research project. However, I'd imagine that for mass fabrication, the FBAR would be similarly bound to the die pad of the leadframe, next to the main die.
Compare this with the following crystal-based design:
The crystal is quite large compared to the silicon die, and requires packaging in a metal can with free air or vacuum around it. Getting these two devices co-packaged inside a single IC package would be much harder. You need a larger leadframe and die-pad, and a way of keeping an air/vacuum space around the crystal itself while still encapsulating the chip and wirebonds. On the other hand, we encapsulated our FBARs with epoxy without such considerations.
In addition to the fab/integration considerations in my answer, I highly encourage everyone to read Hearth's answer which discusses the overall system design aspects of the issue.
Both images are sourced from: Koo, J. Reference clock design for low power and low phase noise with temperature compensation, 2016.
|
H: PCB design for Renesas' DA7212 audio codec
I'm designing my very first PCB. I managed to route all my components and I'm stuck at the last footprint - DA7212 from Renesas:
Those balls are both incredibly tiny and packed dense. I'd need a manufacturer with a minim clearance <1 mil to route between the balls, or a via of ~0.4 mm. Which sounds doable, until one considers the minimum annular width of most PCB manufacturers I know of (that doesn't cost an arm and a leg).
Any tips as to how I could route this infernal hardware?
Some clarifications: this is the lowest power codec I know of (and I've tried a couple). I don't have a viable replacement. This family of codecs comes only in WLCSP packages.
I can't use PDM or I2S microphones directly, I absolutely need to go with electret mics.
AI: I have good experience with both jlcpcb and pcbway on such sized BGAs. You will have to use vias in pad (plugged and plated over). Do not route between the pads as that will add extreme manufacturing requirements as you said youself. Make sure that pads with vias and those without have the same size (a via can essentially expand the pad due to minimum annular ring size, which can lead to inconsistent soldering). This kind of process costs you at least about a $100 per run (as of 2023).
|
H: ATtiny85 USB development board
I am working on a project and have a custom PCB for the project. I initially developed the PCB to mount a DIP-8 ATtiny85.
I then found the ATtiny85 is available in an SMD package, so I am thinking of changing the PCB to use the SMD version. But after I searched the local market in my country I did not find the SMD version; however, I found this board which has an ATtiny85 SMD:
Can I just upload the code to this board then desolder the SMD ATtiny85 and mount it on my PCB?
AI: The chip needs a bootloader to flash programs via USB. It might come already flashed with a bootloader, it might not (in which case you will need an AVR programmer or something like an arduino to emulate one). Other than that, yes, you can desolder the chip and use it after it's programmed via USB.
|
H: strange phase behavior RC low pass filter
I have a low pass RC filter (R=12Ohm, C = 22µF) Which is showing some strange behavior in the phase shift. The cutoff frequency is around 600Hz, as calculated.
But the phase shift goes to -45° only at 890Hz and than it starts ascending back to zero? Could this be due to inductance in the large electrlytic capacitor?
Any ideas?
Thanks in advance
Tom
AI: Electrolytic capacitors have fairly large ESR values, and they're fairly constant across frequency. As the reactive impedance drops according to frequency, the total impedance becomes dominated by the ESR and you essentially have a resistor. The following figure from Murata shows this:
As you can see, the top curves show the results from a 10uF electrolytic. At 0.1k, the reactance is dominant, about 10X the ESR. By 1k, there's less difference, and by 10k they're essentially the same. Since the reactive component here is almost negligible, you have a voltage divider at this frequency, which doesn't introduce a phase shift.
Your cap goes through the transition earlier in the frequency range because 22uF is less than half the reactance of 10uf.
|
H: Line-out vs headphone-out impedance
I'm thinking about the example of two output jacks on the back of a computer, one for line out and one for headphones. I understand that the line out in generally an "unamplified" signal and is intended to be fed to an amplifier with a high input impedance, and the headphone output is amplified by the computer sound card and fed to a lower impedance speaker.
But since what we want is the max voltage transfer to the "load" (the amp or the headphone speaker), then wouldn't it make sense for both to be low impedance outputs? Because the lower the impedance on the output jack the larger the relative voltage will be on whatever is on the other end of the signal. But in reality the line-out impedance is usually somewhat higher than a headphone output. Is there some reason for this design?
AI: Both are low impedance outputs, with some differences:
For a line out, output current is negligible so it is not a selection criteria for the opamp driving it. In addition, a low value series resistor (50...100 ohms) may be added to the output as a cheap way to protect the opamp against short circuits.
The output impedance of the source and the input impedance of the receiver form a voltage divider. As long as source impedance is negligible relative to receiver input impedance (for example 100 ohms vs 100k), source impedance pretty much doesn't matter in the context of audio. Maybe you lose 0.1dB of gain, not a problem.
The headphone output needs an output amplifier with a lot more output current capability. For example, with 32 ohms headphones, even a 2 Volts output means 62mA current, which exceeds the capability of most opamps. Loudspeakers and headphones have frequency-dependent impedance, so the voltage divider with the driving source impedance now becomes a problem as it becomes frequency dependent, which will change the frequency response. So a series resistor cannot be added to protect against shorts. This means you need an opamp with beefy output current and full short circuit protection. One of the interesting properties of audio jacks is that the tip and rings of the plug rub against the contact springs of the female jack during insertion and extraction, so it is best to assume anything can short with everything.
When the manufacturer cheaps out on the opamp's current capability, you get an output jack that sounds fine when used as a line out, but sounds terrible as headphone jack.
|
H: Why doesn't the LED shut off?
Why doesn't the LED doesn't shut off when I set the input to 0V? The simulation does, but that's not what happens in the real circuit. I've grounded the second op amp's inputs (on a NE5532), tried using the same 5V supply for the LED, checked, double checked and rechecked the circuit. The LED is a super bright from Cree. Everything seems within specs for AMR.
simulate this circuit – Schematic created using CircuitLab
AI: The opamp may have a large enough offset voltage so it requires the input voltage to be slightly negative to completely shutoff the LED. It will vary between opamps.
It can be avoided by intentionally giving a few millivolts positive bias to ensure that the LED is turned off when the input is zero.
That can be arranged by adding a resistor between R2 and the opamp negative input and a second resistor from the negative input to +5V.
Another problem that can occur with this type of design is that it can oscillate. This is usually due to the gate capacitance of the MOSFET in conjunction with the output resistance of the opamp causing excessive phase around the feedback loop. This can be cured by separating the high-frequency and low frequency feedback paths.
|
H: Why use resistor in series with coincell for RTC backup power?
I've noticed a lot of reference designs use a resistor in series with the coincell supplying power to a backup RTC. For example, see R141 on Varicite's sheet 8 of the schematic for the carrier board for their DART 8M SOM:
Why is this? Is it some sort of ESD protection for when the cell is plugged in?
More importantly, how do I know when I need one and how should I size the resistor?
AI: That is for safety approvals when using lithium coin cells.
Even if it wasn't for the regulations, this design uses a Schottky diode for low forward voltage drop, but Schottky diodes leak current backwards when reverse biased. Not much in itself, but significantly more than regular diodes. And lithium coin cells do not tolerate much charging current at all.
So when main supply is on, the resistor is there to limit any leakage current that can charge the non-chargeable battery to safe level so that it does not degrade or damage.
The regulations require also two levels of safety if one fails short. If the resistor or diode turns into a short circuit, there is still one component left to prevent a total short circuit of the battery to supply voltage that would charge it at high current.
Usually RTC datasheets and application notes tell you how to connect the battery properly. Some are e.g. UL rated for direct battery connection as they have internal protections, some are not rated and then external components are required (there may be internal protection, but e.g. UL approval has not been applied for so there can be no approvals).
|
H: Using capacitor with voltage rating close to input voltage
I am using a buck converter in my design. The input voltage is 12V and output voltage is 5V.
The capacitor C331 and C332 are 10 uF 25 V in 1210 package. The inventory have already 16 V 0805 capacitors. All these are ceramic capacitors (C331, C332 and caps present in the inventory).
Can I use 16 V capacitor for an input voltage of 12 V?
AI: If you take the ISO-16750 standard (electrical standard for road vehicles) as a reference, or if it's a must for your project to meet, then the input voltage capacitors' voltage rating should be greater than or equal to 18 VDC.
That's because the standard requires the equipment to be able to work with input voltage range of 9-18 VDC (or 18-36 VDC for two-battery vehicles such as trucks/lorries and coaches) at room temperature, although the nominal input voltage is 14 VDC (or 28 VDC) where the operational parameters are rated at.
Some further requirements are load dump (the input voltages can be 40V or even higher) and endurance (running with 14V or 16V at 50°C). These would be more stressful for your capacitors. Although some good quality capacitors can withstand the voltages equal to twice their voltage ratings for some limited time, it still doesn't allow us to use them without risk.
It's also worth to mention that Class-II MLCCs (judging from the value you should be using X5R or X7R) have terrible capacitance change behaviour with DC bias compared to Class-I (C0G/NP0) i.e. as the DC voltage across a Class-II MLCC reaches its rating the effective capacitance reduces further. The graph below is nicked from a Kemet application note:
As can be seen from above, we can fairly assume that the effective capacitance of a 100n/16V capacitor when used under 12V or 14V will exhibit less than or equal to half its capacitance. So you may want to consider this as well for EMI/EMC and other purposes, though I can't see any filter network in your schematic. You should have one as the automotive standards also cover and require EMC.
The inventory have already 16 V 0805 capacitors.
If you don't want to buy/get 25V-rated capacitors and if you are not size-limited (i.e. if there's enough space) then use two of those 16V-rated capacitors in series. Two 0805-case capacitors placed side-by-side occupy almost the same space as a 1210-case one does (see the image below), but you'll end up with higher number of capacitors to reach the same capacitance.
|
H: Power bank or fire hazard?
I do have a bunch of 18650 LiPo cells, salvaged from various sources. Now, I happened to come across a variety of power bank cases on Amazon which mostly look like this:
Even a cursory look tells me that these are designed for 20 cells connected in parallel, without any individual cell balancing. As far as I understand it, this is a complete no-go, especially if you're considering salvaged cells with mixed capabilities?
Or is this configuration actually safe to use, because the individual cells can't be charged above 4.2 V (or whatever the cutoff voltage of the charger is)?
Addendum: I just found Can I use multiple 18650 batteries in parallel with a standard MicroUSB 3.7V charger board?, and based on that answer, it would seem my original hunch was correct? If one cell shorts out, then this thing would go up like a napalm charge?
AI: Those are a fire hazard. Even if someone can sell something, it does not mean it should be sold.
I recall seeing a picture of similar device that had melted itself. What likely happened was bad contact to one battery, and it didn't charge but others charged. When the power bank was moved, the uncharged battery made contact and all the other, 19 (or less) fully charged batteries, dumped current to the empty cell that became shorted to the terminals, pushing through a lot of current, which the battery and metal contacts could not handle.
Batteries should not be paralleled with contacts that can get intermittent connections, and that also allows user to put in batteries with unmatched state of charge without balancing the cells.
I think that device would not pass electrical safety and compliance tests if you tried to import and sell it by the book.
If you buy it online, in some cases, you might even be held responsible as the importer if you bought it from an overseas online shop, and it burns down your house. The insurance company can get very interested about these things. So far they have just warned not to buy cheap dangerous products of unknown quality from online shops, as the safety and compliance for standards of those products might be unknown.
|
H: Do Kirlian setups work with DC power?
I have been trying to build a simple Kirlian setup, and I've been trying to make my flyback transformer work, to no avail, so I shifted to use the small black 3.7 V to 400 kV transformers (as they like to advertise. I reckon they only give about a maximum of 50 kV, but they pack a big punch.)
The transformer seems to work (not the flyback, that's still refusing to work) and output around 30-35 kV, except I just figured out it gives DC HV output. Nevertheless, I hooked it up to the Kirlian setup, and it made a good static electricity generator and a levitator of light magnetic things somehow, but none to very little sparks.
Do these Kirlian setups work with DC HV or do they only work with AC?
I tried to do some reading but some of the articles said that is does work with DC and some said that it doesn't. So does it? If it does, is there anyway to get more or any coronal discharges?
AI: According to this paper, Kirlian photography will work with DC.
There's mention of some differences between Kirlian pictures made using AC and Kirlian pictures made using DC.
The polarity of the discharge (whether the object or the film is positive) determines which type of certain features are present. When the object is positively charged and the film is negative, then you get lines radiating from the object (as in the examples in the paper.) When the polarity is inverted, you tend to get dots around the image.
Using DC, you can change the appearance of the image by swapping polarity. Using AC, you will get a mixture of both types of features.
Both the flyback transformer you were trying to use in the other question and the high voltage module you are asking about here produce DC.
The flyback transformer you have is from a television set. It uses a built in diode to produce DC for the acceleration voltage of the picture tube. It has to be DC to accelerate the electron beam. Depending on what kind of TV you took it from, it may have a voltage tripler built in to generate a higher voltage. Color TVs had a tripler while black and white TVs could use a lower acceleration voltage and didn't need the tripler.
|
H: Why does my flyback transformer simply refuse to work?
I've been trying to create a Kirlian setup like the one in a video by 'The Plasma Channel', and the flyback transformer for the power source just refuses to work.
I have a T1010A transformer, and I'm winding its core by hand. I have a IRFZ44N transistor to drive it and for the power source I'm using a battery eliminator at 4 volts. I have tried possibly anything. I've changed the transformer three times, the transistor and resistors (220 ohm) more than ten times and even the power source (which I fried three times.)
Previously I had managed to get 4-6 kV, but now for more than a month I've been trying and nothing.
Is there something I've been doing wrong or something I could change to make it work?
Here is the circuit diagram which I did not make:
Here is an image of it (which is also not mine since I'm not using batteries but a battery eliminator)
Image and Diagram taken from a video by Mr. Dhanoria
AI: You may want to take a look at this circuit. That's a company that makes and sells power supply kits for Kirlian photography.
That circuit uses an LM555 as an oscillator. It then drives the transformer through a rather hefty transistor.
The circuit you are trying to use attempts to use the MOSFET both as the oscillator and the driver. That can be made to work, but it is extremely fiddly, as you have found.
Proper function of the circuit you have depends on getting the primary coil wound correctly (correct inductance value, correct center tap, neatly wound.) It also depends on the characteristics of the wire, the bobbin, and the MOSFET. If anything is a bit out of whack, it may sort of work or not work at all.
As noted in the comments, it is also possible for the gate voltage to get out of hand and destroy your MOSFET. There's nothing to protect the MOSFET at all. The oscillations from the coil can easily generate voltages that will exceed the maximum gate-source voltage of your MOSFET.
You can use your own flyback transformer with that circuit. It ought to work.
The circuit I linked to generates AC because it uses a transformer for the output. Your flyback transformer is actually a flyback module from a television set. It has a diode (and maybe a voltage tripler) built in. It will produce DC.
Use a separate oscillator.
Use a driver that cannot exceed the gate voltage of your MOSFET.
Be very careful with that thing. If it works, it can generate high voltage and enough current to kill you.
The circuit in the video you linked to is attractive for its apparent simplicity. In reality, such circuits are finicky and difficult to get working properly. It looks like something you can bash together in an evening and then get on with the things you wanted to do with it.
You'll end up spending more time twiddling with the apparently simple circuit (and possibly failing) than you would spend building a more complex looking but more reliable circuit.
You may want to look at this project on Hackaday.io
It includes this schematic for a flyback driver:
Leave out the audio jack, and it'll do what you need.
|
H: How can I attenuate noise from synchronous divider and OCXO?
I am experimenting with a square OCXO, dividing its output frequency to 1kHz using a 4017 synchronous counter and feeding the output to a sound card using Spectrum Lab software. I can then record it and pass it to another software to visualize the output.
I don't have a spectrum analyzer but my question is what can cause that noise around the 1kHz output frequency from the IC?
Here is the schematic of the circuit:
Here is the result of my recording of the signal:
Ideally it should be much less noise. I should not neither see the harmonic at 2 kHz, and on the spectrogram scale I would expect to see the 1kHz signal like this (red is the ideal output, blue is the real one.
Any idea on how this overall noise can be attenuated somehow? Can this be related to the noise of the OCXO itself?
edit - the OCXO is a square wave one, all ICs are with 100nF caps, and there is also a larger one for 5v DC. the output measured in Volts from the divider to the soundcard is 0.6 V and yes I am using a 10k trimmer before the sound card to fine tuning it. /edit
AI: You are taking your output from pin 4 of the last 4017. This is a 10% duty cycle waveform, so you would expect a large amount of 2nd harmonic. In fact all harmonics would be present in large amounts until zeroes at the 10th and its multiples, but your spectrum only covers the first two. You need a square wave, so 50% duty cycle, to get zeros at even harmonics.
The floor of your blue trace goes down to about -80 dBFS, and -70 dBc, so I think you're seeing the skirts of your FFT window function. Hanning is a common default window as it has a narrow main lobe for good frequency selectivity, but it doesn't have a good noise floor. If you want to see lower, use a narrower window like Blackman Harris (4-term cosine), or a Gaussian truncated at 4 or 5 sigma.
Unless your setup is truly pathological, you can regard a crystal oscillator followed by a divider as perfect, especially at your frequencies. You are seeing the soundcard, its clock jitter and ADC noise, your FFT window, the decoupling on the divider.
|
H: Split and mix audio signals
I need to feed input to an audio amplifier from an USB DAC. The audio amplifier has separated inputs for headphone and speaker but DAC has only one output (stereo). Moreover the speaker input is mono while the headphone input is stereo.
Since I don't know the input/output impedance levels of both devices I decided to use buffers with this arrangement:
Is it correct?
Is an overkill?
There's a specific op-amp for such kind of job (TL081 seems good for audio management but I'm not an expert)?
---- UPDATED SCHEMATICS ---
The previous schematics was wrote in a hurry, this's almost complete... even if I have not decided whether to use buffers or not.
P.S. Connecting DAC to power amplifier in this way still require a filtering stage with such large capacitors (100uF according to DAC application circuits) I tought to use such amplifier to avoid large caps on headphone output but I just ended up shifting them from side to side :-(.
---- UPDATE SCHEMATIC 17/11/2023 ---
I finally decided to remove buffers since I'm not skilled enough to manage the tuning of the resulting circuit. Hope trimming the last one will be easier.
--- UPDATED SCHEMATIC FOR SIMULATION ---
Trying to verify if the passive network will preserve the signal I tought to use spice on an equivalent circuit and do an AC sweep between (20 Hz and 20kHz).
The simulated circuit is this:
The resulting amplitude graphs are these:
Changing the input resistors on MAX9792 (putting all 4 resitors equals to 20k) will level all input to -3.6dB level I think it's correct since we are splitting signal on two equals parts after all.. correct?
AI: TL081 seems good for audio management but I'm not an expert
TL07x and TL08x are really good and popular for audio applications. But before everything, your VCC is not given, and if it's below 5 VDC then you can't use TL08x as the minimum recommended supply voltage is 4.5V (for H suffix) or 5V (for others).
Is it correct?
Well, doesn't seem to be. Because, if you check the MAX9792's datasheet, you'll see that the HP amplifier section employs two common-offset inverting amplifiers with on-chip feedback resistors that are factory-trimmed to 40k2 ± 2k. So you need to feed the signals through a resistance (RIN2 = 40k2 for unity gain) in order to get proper operation/amplification. Similar thing applies to speaker amplifier section as well. Check the block diagram and, if given, typical application circuit schematic.
Is an overkill?
Buffering is always good but you may not need buffering unless the DAC's outputs are too high for audio amplifier IC (in that case you just divide the outputs, buffer them, and then feed to the amplifier through a resistor). Make sure there are coupling caps so the amplifier and DAC are DC-isolated from each other.
If you do need external buffering, make sure the output peaks stay below the TL08x's maximum swing which should be somewhere around ±0.5V (check the datasheet for correct values) because the DAC's output may have offset (VCOM is not connected in your schematic above so it's hard to guess).
If you check the block diagram above, you'll see that you actually don't need any external summer amplifier as the amplifier IC allows summing at the input. But of course, check the datasheet for further details and make sure the DAC's output levels are within the acceptable ranges of the amplifier.
|
H: Understanding ADC digital isolation to avoid ground loops
I have designed a circuit to measure the voltage of a battery. This battery is being cycled all the time by a potentiostat (charging-discharging) which injects positive current to charge the battery and negative to discharge it (and simultaneously it measures the battery voltage V.) In the past, I had problems with the voltage measurement (low accuracy) and the solution was to add a digital isolator to separate both analog and digital grounds (initial question here).
This is the original design with no isolator:
This is the new design with the digital isolator for I2C communication between the ADC (ADS1115) and the PLC (based on the Arduino Mega):
My questions are:
I have solved the problem in an very practical way, but how can I prove "visually" (using electrical diagrams like these ones and drawing currents/voltages) or in any scientific way that with the new design the ground loops disappeared? I find it very difficult to imagine this as normally the ground loops are not drawn.
I had to use a DC/DC converter to power the ADC, because if I use the 5V coming from the PLC though the isolator, I would get no I2C communication. Why is this?
AI: You have to use a separate power supply for each side of the ADuM1250 because the ADuM1250 does not pass the power connections through. It isolates the two sides entirely - that's its job. If it passed the power and ground connections through, then it wouldn't be isolated.
That's also the reason why it breaks the ground loop. Ground isn't passed through, so nothing that happens to ground on one side can affect the ground on the other side.
The ADuM1250 passes only the data. It isolates the two circuits so that voltage differences between the two circuits don't cause current to flow between the two circuits. That's what breaks your ground loop.
The problem you had was this:
The grounds are different, but are connected together. That causes current to flow between the ground of the potentiostat and the ground of the PLC. That causes the ground wire between the potentiostat, the PLC, and the ADC to be at different voltages at different points along the wire. Every change in current from the potentiostat changes that voltage differential, which makes your ADC readings jump.
Using the ADuM1250 breaks the flow of current between the two different grounds:
The ADC still shares a ground with the potentiostat (red line,) but since the ADC is powered by an isolated power supply there's no current flow through different grounds - the 0 V for the ADC and the potentiostat are the same.
The PLC ground (blue line) only goes as far as the isolated side of the ADuM1250. No current flows through from the PLC ground to the potentiostat ground.
That's the thing that breaks the loop - there is no path through the ADuM1250 for the ground current.
Vdd1 and GND1 belong to a power supply that is separate from the one connected to Vdd2 and GND2.
|
H: Why is the opamp's inverting input not at virtual ground?
I've have been trying to make a current to voltage converter using a transimpedance amplifier circuit. I have been simulating the circuit in LTspice and everything seems fine, but when I built the circuit in real life it has shown a problem I don't understand.
The circuit is as follows:
The problem is that in the simulation and as expected, the node at the inverting input of U4 is around 100 uV. In reality it is measured at around 900 - 1100 mV depending on the current source. First the current was controlled via a voltage source and a resistor, then I tried with a Howland current source and now the inverting input node is at 2.4 V.
Shouldn't the node be at virtual ground since the non-inverting input is grounded?
I would like for the output to be in the interval 0-3.3 V for currents in the range of -300 - 300 uA.
Note: I'm currently using a TL072 opamp instead of the LM324.
AI: Shouldn't the node be at virtual ground since the positive input is
grounded?
This would happen if the op-amp was provided with a negative supply voltage. Currently it is using ground as the negative rail and this won't permit the op-amp's output to go to a negative voltage (and restore the virtual ground condition).
On the other hand, try reversing the current direction from \$I_1\$ and, you will see it now works reasonably well (with an LM324).
I would like for the output to be in the interval 0-3.3 V for currents
in the range of -300 - 300 uA.
That will happen with \$I_1\$ reversed.
Note: I'm currently using a TL072 opamp instead of the LM324
In that case you will need a negative supply rail because the common-mode input range of that op-amp does not include the negative power rail
|
H: Can I use one 12 V 8 A power supply to provide 5 V 10.5 A power via buck converters?
I want to power four 5 V devices via a single 12 VDC 8 A (96 watt) supply using a buck converter for each device.
I know I could try and redo my circuit but this means disconnecting and rewiring just to test, so I wonder if someone with far more knowledge can do the math and say "Yes" or "No."
The devices are connected via buck converters 5 V, 2.5 A maximum.
Raspberry Pi Zero 2W requires 12.5 watts
Raspberry Pi Zero 2W requires 12.5 watts
Raspberry Pi Zero 2W requires 12.5 watts
Raspberry Pi 4B requires 15 watts
Total 52.5 watts.
Is this 12 V supply good enough after conversion to power everything without any power dropouts?
AI: That will work just fine. The buck converters will need to be at least 52.5/96 = 54.7% efficient, which is such a low requirement that practically any buck converter on the planet can do it.
The Pi 4B will of course need a buck converter that can provide 3A, not just 2.5A.
|
H: Can dielectric coated metal wire mesh in electrolyte be a capacitor
Since capacitance is proportional to the area of the plates, why don't we just make a mesh out of metal wire (plate #1) and coat it with a thin layer of dielectric material, then submerge this mesh into an electrolyte (plate #2) which is connected to one not-submerged, not coated end of the wire mesh? All that crazy big surface area would serve as the plates area!
AI: Yes, you can of course use a wire mesh as a capacitor plate to increase the available surface area (compared to a regular metal plate).
The problem is that this is still extremely inefficient - the surface area of a wire mesh is quite low compared to the structures that are already in use in modern capacitors.
If you push things further, you'll eventually arrive at the conclusion that you want a very fine metal sponge. The surface area of such a sponge is immense (it has a huge number of connected pores in it), and if you can coat all of that surface area with a dielectric, you have an absolutely amazing capacitor.
This idea isn't new, and it's in fact how all modern tantalum electrolytic capacitors are made. Tantalum powder gets sintered into a metal sponge pellet with an immense surface area. This is then coated with a thin dielectric layer via an electrochemical process.
Aluminium electrolytic capacitors are similar: The electrode foil gets etched to create a sponge-like (porous) structure on its surface.
|
H: Hum without ground loop
I have an audio measurement system. The system is connected to and powered by a laptop. The system has no other connection to the AC grid. Now, if the laptop is connected to the AC grid and i measure an audio channel, the resulting digital signal contains a lot of humming. However, if I disconnect the laptop from the AC grid, i.e. let the whole system run on the laptop battery, there is usually no humming, at least if the whole setup is not next to a grid component like a multi socket.
This confuses me. Often, 50 Hz hum is said to be caused by ground loop. However, connecting the system at one point to the AC grid, cannot create any loop. A ground loop as I understand it can only occur if two devices are connected to different grounds. Additionally, the laptop has a euro connector, thus, it is not even connected to the earth / ground line, but only the two AC lines. Why seems there by 50 Hz induced into the signal line, but only if the system is connected to the grid? Or is it just remaining ripple in the power supply? That humming also occurs if the system is disconnected from the grid is even more strange, though I suppose both error cases could be unrelated in the sense that in the first case, the ripple of the power supply is the baddie, and in the second case sth is just induced into the audio lines directly.
AI: Many laptop PSUs, especially if they have unearthed power cables (figure of 8 connector), will have capacitive coupling from the mains onto the DC output, via filter and startup capacitors. This coupled voltage is very low current, but if you measure from the dc output to true ground with a multimeter, you will often see the full mains voltage.
This voltage can couple through to audio circuits which have relative high impedance, but are capacitively coupling to earth.
To check if this is the problem, connect the negative pole of the laptop DC supply to earth. This is normally enough to eliminate the AC hum, and sort the audio issue.
I've seen this problem several times with sensitive ADC devices connected to laptops, and grounding the dc negative has solved the problem.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.