text
stringlengths 83
79.5k
|
|---|
H: How does a "coilgun" work?
I was wondering how that so-called "coilgun" works, I know what it does but I was wondering how it works under-the-hood and eventually how to make a basic one ? Also, how much energy would be required ?
AI: A coilgun is a series of coils that are successively energized as a conductive projectile made from magnetic material passes by them.
Each stage acts on similar principles to those of a solenoid. Current loops induce magnetic flux through their center:
As the conductive projectile approaches the air-core current loops, two things happen: the loop inductance increases and the projectile becomes magnetized. The magnetized projectile is then attracted to the loop magnetic field, accelerating towards it. As it approaches, inductance increases, completing a positive feedback loop such that the pull on the projectile and magnetic field created by the loops increase.
This process reaches a peak when the projectile is completely enclosed by the coil, where further travel decreases the loop's inductance. At this point, current through the loop is abruptly turned off so the projectile won't be slowed down by its continued attraction to the coil's magnetic field.
These are the basic physics principles by which a coil gun operates, which appears to be what you are interested in. There are many practical implementations.
|
H: How to measure temperature using a NTC thermistor?
I have a TTC103 NTC thermistor. It has zero-power resistance of 10 kΩ at 25°C and B25/50 value of 4050. How do I use it to measure temperature?
AI: NTC (negative temperature coefficient) thermistors change their effective resistance over temperature. The most common equation used to model this change is the Steinhart-Hart equation. It uses three coefficients to characterize the NTC material with great accuracy.
The Steinhart–Hart equation is a model of the resistance of a semiconductor at different temperatures. The equation is:
$${1 \over T} = A + B \ln(R) + C (\ln(R))^3$$
where:
\$T\$ is the temperature (in kelvins)
\$R\$ is the resistance at \$T\$ (in ohms)
\$A\$, \$B\$, and \$C\$ are the Steinhart–Hart coefficients which vary depending on the type and model of thermistor and the temperature range of interest. (The most general form of the applied equation contains a \$(\ln(R))^2\$ term, but this is frequently neglected because it is typically much smaller than the other coefficients, and is therefore not shown above.)
— Steinhart-Hart equation - Wikipedia, The Free Encyclopedia
Many manufacturers provide application notes (e.g. here) detailing on how to calibrate a given NTC if you desire accuracy better than the quoted manufacturing tolerance.
The provided B-coefficient can be used in a simplified Steinhart-Hart equation as described on the Wikipedia Thermistor article under "B parameter equation".
|
H: Shift 0-5V logic to ±2.5V logic
What's the simplest way at low speeds (sub 100 Hz) to shift 0-5V to ±2.5V? I was thinking of using a comparator or op-amp, but there must be a simpler / cheaper way. I wanted to avoid a dedicated chip, unless it is cheaper than a discrete solution. Any ideas?
AI: If you have -2.5V available, replace the two resistors with a single resistor to -2.5V.
|
H: Oscilloscope input circuit
I am trying to design an oscilloscope/BNC input circuit for a side project and to learn more about filters.
The requirements are:
150-200 MHz -3dB bandwidth
1 megohm impedance
50 ohm termination option (I can omit this if it causes problems.)
Can be switched between 2x and 20x attenuation
Measures up to 80Vpk (160Vp-p), tolerates up to 400Vpk (800Vp-p) (5Vpk on 50 ohm mode.)
I designed a neat circuit that allowed switching between 2x and 20x attenuation while keeping 1 Mohm (or thereabouts) attenuation, as below:
499k 442k
( Input ) -----/\/\/---+---/\/\/---+----- To JFET input buffer
| |
/ /
499k \ \ 49.9k
/ /
| |
+---+ +---+
| |
\ relay to switch
| attenuation 2x/20x
---
-
(All resistors 1%.)
However, then I learned oscilloscopes have input capacitance, and I'm not sure how to add it. Also, if I want the input to tolerate 400Vp-p swing but on the wrong input range (2x attenuation leaving 200Vp-p to damage the inputs of the JFETs), I couldn't use diodes as the lowest capacitance I found was 0.13pF for an RF diode, which would limit me to about 612kHz for two diodes (one to each rail, reverse biased.)
AI: Input capacitance is significant for capturing high frequency content signals. Given that you are using discrete parts and not considering RF parasitics, this system will be restricted to the 100's of kHz for 1% accuracy.
The goal is to maintain constant attenuation and input impedance over the entire frequency range. Assume Cp is 100pF, Rp is 941kΩ, Cs is 1000pF and Rs is 49kΩ (ignore adjustment cap for now) The capacitors' impedance will vary as follows:
ZCp : 1.6GΩ @ 1Hz; 1.6MΩ @ 1kHz; 16kΩ @ 100kHz
ZCadj. : 16GΩ @ 1Hz; 16MΩ @ 1kHz; 159kΩ @ 100kHz
ZCs : 159GΩ @ 1Hz; 159kΩ @ 1kHz; 1.6kΩ @ 100kHz
This results in the following range of impedances:
Zprobe : 940kΩ @ 1Hz; 591kΩ @ 1kHz; 15kΩ @ 100kHz
Z'scope : 49kΩ @ 1Hz; 37kΩ @ 1kHz; 1.5kΩ @ 100kHz
Zinput : 989kΩ @ 1Hz; 628kΩ @ 1kHz; 16.5kΩ @ 100kHz
approximate attenuation: 20X @ 1Hz; 17X @ 1kHz; 11X @ 100kHz
As you can see, adjustment capacitors are required to tune the input. The grander issue is that this calls for wideband matching networks. Another option, and what is done in addition to matching networks in professional equipment, is characterizing the input impedance and compensating for irregularities in software. Standardizing at 50Ω impedances allows the construction of modular probing hardware while maintaining wideband matching and constant attenuation.
Your requirements for switching impedances and an optional 50Ω input will need some more complication. A fantastic project, and I wish I could partake!
|
H: Version control systems for hardware projects?
What are some of the good versioning systems for hardware projects? Is there equivalents of Google Code, CVS and SVN? Are such version control systems suitable for hardware projects involving PCB files, schematics..(even firmware code)?
AI: Basically, all VCS systems can handle text & binary files gracefully.
Of course you cannot merge binary ones.
So as long as you are not using obsolete things like CVS you will be good with ANY system.
|
H: PICs for beginners using MPLAB Compatible Mini USB PIC Programmer
I wrote a program to turn on LEDs on PORTB. The programmer erased, programmed, verified, so far so good. But then nothing happened. No lights. My programmer is a MPLAB Compatible Mini USB PIC Programmer.
What are some things that novices miss?
Below is my code:
#include <p18f4550.h>
#pragma config WDT = OFF
void delay (void)
{
unsigned int i;
for (i = 0; i < 65535 ; i++) ;
}
void main (void)
{
TRISB = 0;
while (1)
{
PORTB = 0;
delay ();
PORTB = 0xFF;
delay ();
}
}
AI: Did you forget to set the LED pins to output?
Each pin you want to drive a LED must be set as an output in your code. This involves setting the TRIS bits for that pin to '0'.
Did you connect the LED backwards?
LEDs will turn on only when the anode-cathode voltage is positive.
Do you have a clock source?
Make sure you're using a clock source that's hooked up, or the internal RC oscillator. Without a clock, your program won't run.
Do you have the LED connected to the correct pin?
Is power applied to the circuit?
Do you have bypass capacitors for the PIC?
Is there a resistor pull-up for MCLR?
Without this pull-up, your chip will stay in reset and never execute your program.
Check your wiring again. Wiring and connection errors are very common in beginner's circuits.
|
H: Need help deciphering markings on an electrolytic capacitor
I have a capacitor which is marked with "1200uF200wv". What does the "w" mean?
AI: The W is for Working; WV = Working Voltage
|
H: Do electrolytic capacitors have a limited shelf life?
Do electrolytic capacitors have a limited shelf life? I would like to know for both aluminium and tantalum.
AI: Aluminium Electrolytic Capacitors:
Epcos:
2 years, cf. this applications information
Cornell Dubilier:
3 years as per this document
Nichicon:
2 years; section 2-6 in this document
Several documents say that longer storage is well possible, but will require reforming before use. Panasonic, amongst others, has a number: Apply the rated voltage via a series resistor of 1 kOhm for 30 minutes (for example https://eu.industrial.panasonic.com/sites/default/pidseu/files/downloads/files/id_almiec_e.pdf#page=186). There is also a military handbook about reforming stored electrolytic capacitors (formerly known as MIL-STD-1131).
Without reforming and by applying the rated voltage after a long storage duration, the reforming current might be so high that capacitors may get (too) warm and even blow up, which we do not like because we are not Beavis or Butt-Head (he he).
Tantalum Capacitors:
I couldn't find similar data after my initial search, but it seems like the usual MSL (moisture sensitivity levels) ratings for surface-mount parts are given and applicable.
|
H: How do I protect against an automotive load dump?
A load dump occurs when the load to which a generator is delivering current is abruptly disconnected. In automotive electronics, this applies to disconnecting a battery while it is being charged by the alternator. It is apparently well-described in this $65 SAE document; Wikipedia claims it can be "as high as 120 V and may take up to 400 ms to decay". This document claims a 12V system dump can be as high as 87V and 400ms long:
12V system 24V system
Us 65V to 87V 123V to 174V // maximum voltage
Ri 0.5Ω to 4Ω 1Ω to 8Ω // source resistance
td 40ms to 400ms 100ms to 350ms // pulse length
tr 10ms?? 5ms?? // rise time
The last linked document also has a table listing TVS (Transient Voltage Suppressor) energy absorption, as follows:
Table 2 - Energy [J] absorbed (Vclamp=45V)
td [ms] source resistance [Ω]
0.5 1 1.5 2 2.5 3 3.5 4
50 18.57 9.62 6.26 4.50 3.41 2.68 2.17 1.80
100 37.15 19.23 12.51 8.99 6.83 5.36 4.34 3.59
150 55.72 28.85 18.77 13.49 10.24 8.04 6.51 5.39
200 74.30 38.46 25.02 17.98 13.65 10.72 8.68 7.18
250 92.87 48.08 31.28 22.48 17.07 13.40 10.85 8.98
300 111.44 57.69 37.53 26.98 20.48 16.08 13.02 10.77
350 130.02 67.31 43.79 31.47 23.89 18.76 15.19 12.57
400 148.59 76.92 50.05 35.97 27.31 21.44 17.37 14.3
Now, I want to clamp much lower than 45V (say 20V), and would like to recalculate these values. The author writes:
Calculated using the method given in Annex E.1.1.(e)
where Ri=RL (for maximum power transfer).
This reveals the formula:
We = (Us)2 x td / Ri / 4.6
... And updates the table as follows:
Energy [J] absorbed (Vclamp=20V)
td [ms] source resistance [Ω]
0.5 1 1.5 2 2.5 3 3.5 4
50 97.59 48.79 32.53 24.40 19.52 16.26 13.94 12.20
100 195.17 97.59 65.06 48.79 39.03 32.53 27.88 24.40
150 292.76 146.38 97.59 73.19 58.55 48.79 41.82 36.60
200 390.35 195.17 130.12 97.59 78.07 65.06 55.76 48.79
250 487.93 243.97 162.64 121.98 97.59 81.32 69.70 60.99
300 585.52 292.76 195.17 146.38 117.10 97.59 83.65 73.19
350 683.11 341.55 227.70 170.78 136.62 113.85 97.59 85.39
400 780.70 390.35 260.23 195.17 156.14 130.12 111.53 97.59
This gives a maximum value of 781J. Did I do this correctly? My TVS system must absorb up to ~800J, passing nearly 30A? It seems like a heck of a lot, though it will be for up to 6 parallel semi truck batteries (~100AH each) in addition to its 130A+ alternator. (Could the source resistance be even lower than 0.5Ω?) What combination of TVS elements can effectively pass 800J without violating its clamping voltage by much, and what makes it more effective than other solutions?
I am protecting low-voltage digital and analog circuitry, which also have their own power filtering.
AI: I can't speak to SAE J1113, but for SAE J1455 (12-V heavy truck, where the loads should be larger) the load dump is defined as a 100 V peak with about ~0.6 s fall time and ~0.6 Ω impedance, which is a pain to live through.
The two broad methods to survive are either
Disconnect yourself and let it pass:
Which is usually preferable and cheaper. Load dumps are in a class of faults that many devices are not expected to operate during (unlike coupled inductive transients), so unless you're some critical device (ABS, ECU), you're allowed to shut down and reset when you see a load dump.
Very broadly speaking, to do this you could have a Zener diode on your input, where once it breaks down and starts conducting, switches some pass transistor to disconnect yourself entirely. Obviously your pass transistor will have some voltage rating, so selecting a TVS is still needed (see following), but it won't have to clamp anywhere near as much voltage, energy, and power.
clamp the whole thing.
This is also quite possible with TVS as you mention, and then it really depends on how hard you want to clamp it. If you're fine with 75 V coming through, I think I've seen 500 W SMC's used. If you want it like almost nothing ever happened, you can do as I've seen and use (2) 5 kW 5KP22CA TVS in parallel. They alone can clamp the entire load dump themselves; I've tested a pair that survived (5) 100 V dumps in a row, about 10 seconds apart between each.
The math behind it is somewhat hazy to me, as the figures provided on the datasheets don't seem as though they were meant for transients any slower than 60 Hz. The 5 KW rating is for a 1 ms pulse, which is obviously just 5 J.
The peak energy it dissipates will be (100 V - 24 V)/0.4 ohms * 24 V = 4560 W, but this will decay roughly exponentially to nothing with a tc of about 300 msec. If we just call that a triangle (very conservative), it's 0.5 * 4560 W * 0.3 s = 684 J. If we extrapolate the Figure 1 rating curve on the 5KP datasheet, it suggests that a 100 ms pulse can have a maximum power rating 1000 W, or total energy of 100 J, and even more energy if we smear it out further, so we're in the ball park with 2 of them in parallel and tests seem to bore it out.
Littelfuse 5KP-series TVS datasheet, Figure 1
If you wanted something better, I'd come up with an equation for the curve and give it an asymptote at the maximum steady-state dissipation (8 W...though that might not make a difference), then do some integration with that over your pulse to see how much of the rating you use up :P
|
H: Looking for an inexpensive Smoke Detection Sensor
As the title says, I am looking for a smoke detection sensor. Took a look from SparkFun to Mouser and did not find anything. Is there a part you would recommend? I would prefer something that interfaces with the ATMEGA168/ATMEGA328 via a single wire or two wire interface. Would prefer to avoid a SPI or Serial interface as my circuit already utilizes those pins.
Bumped into a few sensors on Ebay but they were $15+. Is this normal? Is there a cheaper alternative that works great? Should I just buy a cheap smoke alarm and extract the sensor that way?
Thanks in advance for your help.
AI: The MQ-2 Flammable Gas/Smoke sensor might be what you are looking for.
Datasheet: http://www.pololu.com/file/download/MQ2.pdf?file_id=0J309
Here is one source: http://www.pololu.com/catalog/product/1480
They also have a carrier board to make it easy to interface.
It does not provide a digital interface, but provides an analog voltage that could easily be read by the ATMEGA168/ATMEGA328
|
H: Will PWM on 50% duty cycle cut the current in a DC motor in half
I have a DC motor that is controlled by a PWM output on an Ardiono and I want to know if I can safely assume that by setting the output to 50% duty cycle, the current in the motor will be 50 % as well
The output is connected to the base on an BC338 transistor through a 1K resistor that I use as a driver.
AI: No. It can be anywhere from 0% to 100% depending on load & motor specifics.
If you need 50%, you need some feedback, like shunt with opamp.
//RPM counting using optical-interrupter
|
H: How to recharge a battery with a manual battery charger
What are the best practices for recharging a 12V lead acid battery with a manual recharger.
I have a 12V lead acid battery (7.2AH/20HR MK ES7-12 (PDF)). I've read the advice here on how to check the battery level (I have ~12.2 V under no stress, and when powering the system it still currently reads ~12.2 V on the DMM).
When it starts to run low, I'd like to know how best to recharge the battery. I have a manual battery charger (Schumacher MC-1). I realize the manual part means that I cannot just plug the battery in and walk away. How best to monitor the charge? With what frequency? What likely problems should I be aware of?
AI: Not many issues charging big lead acids. Just hook the sucker up, turn it on, wait a while, test the battery for either loaded voltage or charge current (<0.3A), then disconnect or continue. Some issues I've had with standard sealed lead acids:
Killing the battery separates the water from solute, which can then freeze. This happens if it dies in the cold. It's basically pooched at this point, but there's nothing stopping you from trying to thaw it out and charge it back up. Sometimes they still work!
Don't use the boost function, if there is one, to attempt to charge the battery more quickly than usual. This is strictly for boosting, and will reduce a battery's MTTF. Note that maximum charge current is 2.16A.
Charge it in a ventilated area. I know it's sealed, but I do this anyway, just in case!
Don't put it on a concrete floor -- stick a piece of cardboard or wood under it. This has been proven a myth a dozen times over, but I still do it to keep Murphy at bay.
Don't use too large a maintenance charge. The battery datasheet states 13.5V-13.8V float voltage.
Why did you get a manual charger, anyway? I'd definitely screw that up within a season.
|
H: Moving PIR sensor (or IR camera), aka Predator like alien scanner
To avoid public transport and the car, I decided to go to work on foot everyday but I have to pass a small, but dark (in the evening) and scaring wood.
Even if I use flashlights, I'd like to have a kind a "life scanner", like the one used by Predator vs Alien to detect alive (hot/moving) creatures.
Beside the sci fiction side of the question, I was wondering if PIR can be used while moving, so that I can mount on my backpack and control it with an arduino while I'm walking.
If it's not possible, do you have any other ideas?
What I need it's just a way to know if there are alive, enough big to be scaring, creatures in the wilderness around me (for not alive creatures we will discuss later).
Edit
Has pointed out, a good alternative can be an Infrared camera, there are some good tutorial and Howtos in the Net.
I don't need a detailed image, but just to know if and (more or less) where there are alive creatures (hot blood animals?), as an image sometime is better then 1000 words:
Edit 2
As it has been pointed out, is this feasible or it's just sci-fiction?
Thermographic cameras exists and are widely used: http://en.wikipedia.org/wiki/Thermographic_camera
I found a solution here http://www.embedds.com/interactive-diy-infrared-and-ultrasonic-scanner/ , but the range is really small (21 inches = 0.5 meters)
Edit 3
This is another way to create a "radar" starting from a home made thermographic camera.
http://hackaday.com/2009/07/01/poor-mans-thermographic-camera/
AI: PIR sensors usually have 2-4 pixels. That, coupled with the intended optics that appear to be designed with "blind spots" (so something moving in/out of them will cause a change) wouldn't really be that helpful.
As tyblu suggests, an IR camera—the cheap ones are NIR, not LWIR (thermal)—may be more helpful, and may even be able to couple it with some FPV (first-person view) goggles for R/C aircraft to make your own hack NVGs.
That said, some FPV goggles and IR cameras can be kinda spendy, so paying just a little more for the convenience (batteries, mechanical package, etc) of some commercial NVGs (or just a scope) might be worth it.
|
H: I want to learn enough image and video processing to execute a project idea, pointers?
First of all, I am a total newbie to image processing. I have a project idea, part of which will involve doing the following:
I have a white board and a camera (a normal webcam by z-star). I will draw a shape on the white board. The camera will capture the video and process it to identify the shape I have drawn. To keep it simple, the shapes that can be identified using by the program will be limited.
I want to execute this idea and will learn anything that is required to make it happen. I want to get started in image processing, but just enough so I can execute this for now. Will incrementally study more. Can you give me any pointers on where to get started?
AI: A good place to start would be to use OpenCV for video processing: http://opencv.willowgarage.com/wiki/
There is a book published by O'Reilly Learning OpenCV: Computer Vision with the OpenCV Library that would probably be a big help.
|
H: Why do chips not always "meet the grade"?
During manufacture, integrated circuits are tested at varying frequencies and temperatures to categorise them into speed grades. However, why don't all ICs come out the same and work the same? They all come from the same photolithographic mask, right? Am I missing something?
AI: Modern ICs are REALLY small. Tolerances are huge during processes such as ion implantation and oxide growth. At such small sizes, these things can't be treated as anything but a probabilistic process. Lines also tend to be smeared due to the feature size being the minimum possible given the wavelength of light. When you get worst-case performance in a bunch of these different steps, then you get a non-functioning IC.
Companies don't design the IC so that it functions at the worst-case - it would be too costly. So instead they do Monte Carlo simulation of the manufacturing parameters, estimate a yield, and do testing after the fact.
Typical "design corners":
Source: What I remember from my IC manufacturing class.
|
H: High voltage, high common mode current measurement. Any suggestions?
I asked this question a few days ago, but I don't think I was clear enough, so I'm going to try again.
Here is a rough diagram of my sputtering system:
Basically, a DC voltage supply holds the substrate at a large negative voltage (~-1000V) relative to the chamber chassis (Vs) and a DC current supply pushes a large current (~120A) through a plasma into the chassis and substrate (It). Only a small fraction of the total plasma current actually goes through the substrate (~2A out of the total 120A). Most of the current passes directly into the chassis. So, to clarify, there are two power supplies. The voltage supply is providing -1000V to the substrate through which ~2A are passing. The current supply is providing 120A through the target/plasma (at about 20V).
The resistor between the chassis and ground indicates that the chassis is poorly grounded. Furthermore, the resistor should be taken to be variable as the current flow through the stainless steel chassis fluctuates, meaning that the voltage of the chassis relative to earth ground fluctuate significantly over time.
Here is the problem: I want to measure the voltage between the substrate and a particular spot on the chassis without measuring any of the voltage due to the large current flowing through the chassis. The measurement doesn't have to be very precise, it's only used as a check (i.e., +/- 5V is fine).
Right now, this is accomplished using a Fluke battery powered DMM. Since it's battery powered, it makes a real floating differential measurement. What I'd like to do is replace this handheld meter with a non-battery powered solution that could also be hooked to a computer for data-logging purposes. I thought maybe using a 110V AC to 9V DC wall adapter that could hook into the Fluke's battery terminals might be an idea, but I guess there is no electrical isolation and all the current in the chassis would get dumped through the Fluke to the mains ground.
Can anyone suggest an approach? I'm pretty ignorant about this stuff. I've tried reading up on it but can't figure out anything that might work. If I can clarify in any way, I'd be happy to. Any suggestions (including "you're stupid. this can never work") would be appreciated!
Thanks a lot in advance,
Brian
AI: While a wall adapter is usually isolated, it likely isn't rated to 1kV. A simple solution would be to find a DMM with logging capability and CAT III/IV 1kV isolated external power source or long battery life. Here are some candidates:
Agilent U1271A: IR USB connectivity; 300 hour battery life
Gossen Metrawatt Metrahit X-Tra: "bidirectional IR interface"; 200 hour battery life
Fluke 289/287: "Isolated Optical Interface"; 200 hours battery life
Another option is to use a simple micro with an ADC, float the whole circuit at chassis voltage, then use proper isolation techniques (more than just optoisolation -- if you're not sure I suggest another question) to communicate with a PC over your preferred serial connection (UART -> opto -> RS232 -> USB -> opto -> PC, with cable shield voltage measurement and warning, would be my choice). Note that this means you can't touch anything on the floating (hot chassis) side of the widget. This way you can eliminate the power supply isolation worries by just using a battery, and still run it easily for 6 months to a year without replacing it, following thought on power consumption and sleep modes (ie: MSP430). Also note that a sputtering machine generates electrical noise, so you may need to use RS485 with error detection/correction algorithms.
|
H: What's the cheapest way to do basic EMI testing?
I need to test that my project will not interfere with radios in the 27 - 72 MHz band.
I can't afford a spectrum analyser. Nor can I afford to buy all tx/rx pairs in between 27 and 72 MHz (27, 35, 47, 72...) My budget is a maximum of £100.
I was thinking of modifying a radio to have a much larger tuning range, but it would need to be sensitive to very low EMI emissions. I've found AM radios are slightly sensitive to noise but probably not enough.
Does anyone have any suggestions?
AI: If my time was worth nothing, or I was doing this as my own fun project, I would design and build my own rf power meter. There are schematics available for this in AARL back-issues.
If this is for work, I would go and rent the tools.
If this isn't for work, and you don't know very much about RF, and you don't have a lot of money - go make friends with amateur ham radio people in your area and butter them up.
|
H: Transmission line simulation (physical)
I need to be able to simulate communications with a sensor device over a large length of wire (0-10km). This is for quite low-speed comms (10khz max, usually 1-2khz though). This would be FSK... but at some point I may have to handle a low baud RS232-like signal as well.
Mostly, I'm looking for voltage drop and signal distortions. Delay doesn't matter much.
How would you go about it?
EDIT:
I've been able to determine the cable is indeed a (fairly nonstandard) type of coax. I now know resistance and capacitance per unit length, cross section geometry, and that the insulation resistance is high enough not to matter. It wasn't initially clear if the return line was a separate run or not.
This would be a test setup for multiple target devices. Most are FSK of various frequency choices under 10khz, some are ASK (you could almost use a standard UART after bandpass/filtering). All are riding on a high DC offset (comms over power).
In the past, I've seen people build a simple rotary switch that swaps in resistors, capacitors, and maybe inductors to simulate a given line length. Could that be good enough?
I'm currently trying to build a few simulations in LTspice.
EDIT 2:
Okay, if I go with just adding resistors, caps, and inductors... what does the model look like? The RLGC network below is assuming the grounds are at the same potential I believe (a safe assumption on PCBs w/ground planes). The return in this case is through the outer shell, and it's resistance is probably 3 times higher than the inner conductor. Does that change things significantly? Do I just add another resistor on the bottom rail, and split the capacitance on both sides of it?
AI: Transmission lines have a complex characteristic impedence. The characteristic impedence is typically specified "per unit length" for a given tranmission line. For practical purposes, you might have four values "per unit length" for a transmission line: resistance, capacitance, inductance, and conductance. There's a pretty extensive article on this on Wikipedia, and "for high frequencies and small losses" the approximate equation is:
where:
x is the distance along the tranmission line
t is elapsed time
L is the inductance per unit length
C is the capacitance per unit length
R is the resistance per unit length
G is the conductance per unit length
Now this is probably going to be of limited use to you because, if I read between the lines here, it sounds like you're planning to transmit a digital signal (i.e. a square wave). The edges in the square wave are really "broad spectrum." That's why most communication systems go through a modulation and demodulation step so as to limit the spectrum of the signal "on the line." But I think the above equation does apply because a the "signal" in a square wave is analytically "high frequency" content.
At any rate, in the "steady state" high level of your input signal, assuming your receiver is a high impedence, what your signal sees is a voltage divider based on the characteristic resistance and conductance. So you should see (approximately) Vout/Vin = G/(R+G), based on the model:
Edit 1
I missed the FSK (Frequency Shift Keying) comment in the question earlier. I also had another thought. You can use something like Matlab Simulink to model the transfer characteristic of the circuit, and feed the model with a representative input waveform to see what comes out the other side...
Also, if you want to know how much of a voltage drop you'll see, for a sinusoidal signal, you've still got an effective voltage divider with a top leg having effective impedence of length*(R + jwL) and a bottom leg impedence of (Glength || 1/(jwClength)). You can do the complex math to find the real part of that transfer function at a given frequency ( w = 2 * pi * f).
Edit 2
In response to the clarification of what you meant by physical simulation, if you are trying to physically introduce the effect of a transmission line, just set up the circuit in the figure with appropriate values of capacitors, inductors, and resistors - sized in accordance with the properties and length of the transmission line you are trying to emulate.
|
H: Recommendations for an active, directional RFID sensor
I have been using two Loc8tor devices (an active, highly directional RFID consumer device) on a personal robot to try to locate an RFID tag.
While the Loc8tor has served its purpose of showing an active, directional RFID sensor with high resolution can be used for locating an RFID tag, the Loc8tor itself is not very hacker friendly. I am looking for an alternative reader and tag that can be integrated into my robot.
Ideally, it would meet the following specifications:
Each reader would be less than $100, cheaper is definitely better
The reader should be around the size of a credit card to a dollar bill
The tag will be placed in ranges of 0.5 to 3 meters from the reader
The reader should run on some voltage less than 5v, ideally 3.3v or less
The higher the resolution of the reader, the better. Say 3 cm resolution at a 1 meter distance.
The (RSSI?) value from the sensor is easily accessible. Meaning I could wire that into an Arduino input pin and use the value.
Could buy in small (1 to 2) or large quantities (100+)
These specifications are ideal, but not all are required (though the price is the most important). I should hopefully be able to list better specifications after I see what alternatives are out there.
AI: What about using the difference between the signals from two antennas?
In theory, if two antennas are exactly the same distance from the target, then the two signals should cancel each other out if subtracted. If they are slightly off, then they would be slightly out of phase, and they wouldn't cancel.
You could only use this technique to find the angle to the target. You would have to rotate the antennas to actually read the RFID (because their would be no signal when you were pointing directly at it.
(This technique is used in Ham Radio circles as a poor man's way to find people who interfere with radio repeaters so they can be reported to the FCC.)
|
H: Is it possible to send characters through serial to go up a line on the console window?
I think it is possible due to how I can run vi straight from my serial port looking via TeraTerm. There, I can edit some text, go to the next line, then come back and edit the first line! How do they do this?
What character over UART could I send through to go "up a line"?
EDIT: Apparently line feed works. "\f" to clear the screen. However, this only works for Hyperterminal on my machine and not Teraterm. Anyone know why?
AI: Use VT100 escape codes to control the cursor.
Eg.
puts("\033[2J"); // clear screen
puts("\033[0;0H"); // set cursor to 0,0
puts("\033[10B"); // move cursor down 10 lines
puts("\033[5A"); // move cursor up 5 lines
|
H: Is my butane soldering iron's tip dead? (pic)
I've read the other posts on iron cleaning technique and I'm pretty sure I left it dirty often enough that it's toast, it seems the iron coating on the tip has flaked off completely; since I've got nothing to lose I'll attack it with a file in a second and see if I can get another small job out of it. $15 lesson learned.
The real question is why the plating up near the catalyst is flaking off and the whole tip is bending. Does this indicate I'm using too much heat?
AI: NEVER USE A FILE!!!
If you use a file on a (long life) soldering iron tip you will ruin it!
You are running the iron much too hot, turn it all the way down so the catalyst is only just glowing, if that's too cold turn it up slowly!!!
To get your tip back use tip tinner or a soft wire brush, such as brass to avoid damaging the tip.
Again, NEVER, EVER get a file anywhere near a non-shitty soldering iron.
|
H: Can't get consistent readings from Sharp IR range detector
I'm in the very early stages of trying to build a robot that wanders around and builds up a map of its environment. I'm using an Arduino and I currently have a Sharp 2Y0A21 IR range detector sat on top of a servo so it can take a 180 degree sweep in 10 degree increments.
The trouble is that the voltage readings back from the Sharp IR sensor aren't consistent. If I write an app that simple sends the value it reads from the sensor through the serial port and display it on my laptop, sitting the sensor pointing at an object, the values bounce around.
Watching the values, I can see that it tends to report one value more than the rest, so I wrote a SharpReader class that takes 20 samples and then returns the Mode of these values. This now means I get more consistent values, but not as good as I would like.
I have some code that performs the 180 degree scan and sends the angle and distance down the serial. I then have a python script that receives these values and draws what it sees on screen, ignoring any values at either end of the sensors range. So putting it in front of a box, it should draw a straight line on screen, but it doesn't - the line is crooked and not consistently crooked, which confirms to me that it's the readings that are off, not my code.
I have read in the datasheet that it is advisable to put a capacitor (can't remember the value offhand) in between the GND and PWR lines on the Sharp IR - I tried forcing the legs of the capacitor into the JST connector of the Sharp IR, but it made no difference. I'll try soldering it to the sensor and see if that makes any difference.
Can anyone recommend anything else to try, or am I just expecting too much from the Sharp IR?
I'm also considering buying a second servo and Sharp IR and running two at the same time like a pair of eyes, then trying to take an average of the two values to see if that increases the accuracy.
BTW, I'm a newbie to electronics, my background is in programming.
AI: The sensor isn't perfect, if you aim even a really, really good sensor (Better than the, um, 'classic' Sharp IR sensors) at the same spot on the wall and take a few readings, there will be some variation. If you discard some number of least significant bits, it's possible to get the same reading every time, but your readings will be more granular. You should probably keep the maximum precision, and then try to fix errors in software (i.e., change your data so that an almost straight line really is straight).
What sensor are you using, and what range of measurement do you expect? The output of the sensor is very much nonlinear. This graph (from the datasheet) compares the output voltage on a linear scale with the distance:
You'll notice that it looks a lot like the graph of y=1/x, i.e volts=k(1/distance). This can be used to get a decent first approximation, but division on an Arduino is expensive. You'll have better luck calibrating the sensor and storing the voltage/distance pairs in a look-up table (in program memory, of course). This one comes calibrated from the factory such that a measurement at precisely 24cm measures to 24cm +/- 3cm. Unfortunately, they don't give you a way of knowing what the voltage at 24cm should be except by squinting at this graph.
The sensor will have higher precision at certain ranges. Imagine that there is a random variation of, say, +/- 250mV in your readings (Gaussian if you like, but random is easier). It's hopefully a lot smaller than that, but it makes it easy to visualize. The variation means that your readings with this sensor at, say, 50cm or 70cm will vary over 20 or 30cm, but measurements at 15cm should be within a few cm. This sensor is rated for 10-80cm, but you'll get more accurate readings if you only trust it for 10-25cm or so. If you're controlling the robot, you should be able to move to these distances and get the best readings.
The sensor draws current in large bursts and is probably mounted on a fairly long cable. A capacitor will help stabilize the readings. Don't jam it into the JST; solder it to the PCB on the back. It's drawing a lot of current and it's pretty slow, so small capacitances traditionally used for decoupling (0.1uF) probably won't work. I'd use a 10uF 1206 or 1210 ceramic SMD cap in parallel with a 100uF electrolytic. If you find that high frequency noise is still present, add a 0.1uF 1206 on top of the 10uF. Here's a picture of the locations for soldering (original image from Sparkfun):
You could also try adding a small capacitance on the Vo line to smooth the output. You should experiment to see whether or not that helps. I'd keep it below 100pF, starting at around 10pF. This will create a moving average of the readings in hardware. More circuitry (a series resistor) would enhance the effect, post a comment or another question if you want to build a more complex low-pass filter system for this purpose. Note: The Sharp sensor may not handle driving into a large capacitance well, and might balk or break if asked to change the voltage quickly. It's also possible that it's a single-sided output, and might require a resistor to ground to discharge the capacitor if you add more capacitance than is currently present in the parasitics.
Twisting the cables together will help reduce noise coupled on from external sources like 60Hz mains. Keeping them short will also help mitigate noise.
|
H: What is 2-FSK modulation?
In the documentation for a radio chip, I keep seeing the term 2-FSK, which seems to be a modulation scheme.
My understanding is that in FSK, data is encoded by emitting a carrier wave on a number of different frequencies. Is this right? How does this differ to 2-FSK?
AI: The number '2' refers to the number of tones used to encode the signal. For example, 2-FSK is essentially sending binary data using two frequencies. One symbol (time slice) has the potential for two values only. 2-FSK is usually what is meant by an unqualified mention of FSK.
It's possible to use more than two tones. These modulation schemes usually are called MFSK for Multiple Frequency Shift Keying. A common MFSK scheme in amateur radio is MFSK16, which uses 16 different frequencies to represent 4 binary bits in each symbol. By your notation, this would be 16-FSK.
The more frequencies that you use in a symbol, the more complicated your modulation/demodulation circuit. Typical MFSK applications in amateur radio require a computer sound card and CPU for signal processing. Analog circuitry can be developed somewhat easily for FSK using two band-pass filters.
|
H: Good resources for learning about my STK500
I have a Atmel STK500. And I can't get my head around what half of the board does. Does any one know of any good resources for learning about it. I have the following books:
The primer book is good with the STK500 but only talks about the mega16(I think I maybe wrong on that don't have it to hand). But then stops after the first couple of pages and tells you how to only program the one microcontroller with it. Is there anything else I can look at to use my STK500 to its full potential? And configuring the jumpers as they confuse me being a novice. I would like to program other microcontrollers from atmel with it.
AI: Go into the AVR Studio help files at Help > AVR Tools User Guide and click on the STK-500. It's the same files that come with the kit, but those are likely stuck on a CD-ROM somewhere in the sock drawer (mine certainly are). Pretty good info therein, anyway. If you're using Eclipse or something else, I can upload them or Google can reveal them.
|
H: Use a current monitor IC or roll my own?
I'm looking to measure current consumption of my microcontroller as an in-built feature of the final design. Should I buy and use high-side current monitors that are available on the market (e.g. Zetex ZXCT1009)? Or is it possible to build one out of discrete parts that's cheaper and better?
Device operating out of a lithium polymer battery, so 3.7V typical only. Drawing around 0 to 30mA.
AI: You can build one with a simple op amp circuit, but it will take more design work, more external components and likely more board space. There really isn't a reason to do so unless you have specialty application which requires something out of the norm.
Current monitoring for battery powered devices is a very normal application.
There are current monitors out there that output a PWM signal that you can monitor instead of a voltage that to be read with an ADC. This type of monitor may be easier to interface with and require less power to monitor depending on the type of microcontroller your using and available peripherals. You can also get regulators with built in current monitoring circuitry which can reduce part count, cost, board size, power usage and increase accuracy in some applications.
|
H: Where to put stabilising capacitor?
Following on from this question. Can I place the capacitor anywhere in the circuit before the IR Distance Sensor? In my project I have 2 PCBs: A power circuit and a Processing Circuit. In the Diagram below you see the two PCBs Power Board and Processing as well as the Sharp distance sensor. Following the diagram, can I place the capacitor on the power board or will it be ineffective by the time it reaches the sensor? I don't want to damage my expensive sensors.
--------------- 12V ------------------
| |-------------------------| |
| Power board | 5V | Processing |
| |-------------------------| Board |
| | GND | |
|_____________|-------------------------|________________|
| | |
| | |
GND | Out | 5V |
| | |
------------------
| Sensor |
------------------
AI: See my answer to your previous question here, specifically this image:
.
You want the caps to be as close as possible to the components which are drawing current. The voltage varies due to to trace/wire inductance, so it doesn't help to locate the cap before this inductance. The caps absolutely must be on the sensor. You should already have output caps on your power board and decoupling caps near every IC on your 'processing board'.
|
H: Does anyone have code to emulate a 16-bit input shift register with an ATtiny2313?
I would like to use an ATtiny2313 to emulate a Super Nintendo controller because I have an ATtiny2313 but I do not have an input shift register and I don't feel like soldering wires onto an existing SNES controller board.
This application requires 12 inputs (bits 13-16 are always 1) and a latch, clock, and data out pin.
Do you have this code lying around? It can't be more than 20 instructions.
AI: There's already an 8-bit shift register built into the Universal Serial Interface (USI). All you have to do is use it twice in a row.
|
H: Switching a Kettle On/Off using a arduino
First of I have no experience with electronics so I am not sure what I should be searching for to get this done.
All I have with me at the moment is a arduino and a few connectors and LED's. Is it possible to switch the kettle on/off using just these basics (i.e. I dont want to buy more stuff for now).
The kettle is the most basic kind , i.e. the ones that plug into a wall outlet and have a single switch to turn it on or off. Let me know if you need more info.
AI: There's a particular problem here with the kettle that a relay will not solve. Kettles always have their own switch which trips off when they boil. So even if your relay is on, the kettle will not heat up unless this switch is also on. If you took the kettle apart and shorted out the switch, it would not trip off when the boiling point was reached, so this is very dangerous. If you think you can also replace the boiling point sensor and run the logic through your processor, you should think about the fail safe implications of this and consider your house insurance situation.
Depending on the type of switch used in kettle, it might be possible to fill it and switch it on mechanically, waiting for mains to be switched on by the micro. But you could only boil it once before having to mechanically reset the switch. If that works for you, fine, but bear in mind that kettle are not like lamps that you could just switch on and off whenever you like, and interfering with the switch is hazardous.
Most kettles that I have come across do allow the switch to be on even when there is no mains, but most toasters don't allow the basket to be latched in the down position without incoming mains, so you can see this could be a problem.
|
H: Plans / tutorial for sound effect generator using only analog components?
I've been wanting to make a laser gun sound effect attachment for my son's bike. Currently, I'm using the electronics salvaged from his old laser gun toys. All of them seem to use electronics hidden under a black blob of resin or epoxy, which I assume is an ASIC?
I'd love to be able to make this more cheaply, and was wondering if there's any resource out there to show how to make something like this with analog components. I have an old fart machine that seems to use a combination of resistors, capacitors, and inductors to generate multiple sounds (i.e. no microcontroller), so I figure that it must be possible.
I only need one sound, but it would be great to be able to select from multiple, or somehow use a microcontroller + DAC to do it, although the latter would increase the price.
EDIT -- something like this, but cheaper than $10 would be nice
EDIT -- also found this schematic but it needs an IC called the HT2884
AI: Back when I were a lad, the SN76477 sound effects generator ruled supreme. If you fancy a bit of nostalgia they can be had for just over $9. Admittedly, you need a few other components but they can make a ton and a half of sounds.
http://www.bgmicro.com/ICS76477.aspx
Edit: Just as an afterthought, one of the more irritating circuits that the lads in the electronics club at school used to make up was a 555 oscillator where the timing resistor from Pin 7 to Vcc was replaced by 10 variable resistors with diodes (or LEDs) in series, hooked to the outputs of a 4017 decade counter, which was clocked by another 555 timer. By adjusting the variable resistors and the frequency of the 555 clocking the 4017 you could generate a string of 10 notes in a loop. When this ran at a fast clock speed you got some weird noises.
|
H: Compare negative with positive, ignoring sign
I need to compare a negative voltage with a positive one, each on the order of a few hundred millivolts each; I want to compare the magnitudes, ignoring the signs, although only for this particular quadrant (I don't need all other signs.) How can I do it? I thought of using resistors to pull the negative voltage positive, but it only gives me a small signal on top of a DC offset, and that is difficult to compare with.
AI: Couldn't you just place two equal resistors in series between the two signals? The junction of those resistors would be their average, and has a sign matching the greater side. It could then be compared to zero for amplification.
|
H: Multi-channel bar graph LED drivers
I want to build a circuit that shows the real-time frequency components of an audio signal on a number of bar graphs of some sort. Currently, my plan is to build 12 band-pass op-amp filters, and then use a rectifier and RC circuit to create a DC envelope for each output, and then use that signal to drive a LED bargraph or something similar.
The circuit will use a single +3.3V supply, and using 12 band-pass filters is not really negotiable. If I want a 12-channel bar graph, am I stuck using 12 bar-graph LEDs and bar-graph LED Driver pairs? That comes out to $45! Is there a better/less expensive/simpler method of getting a similar result? Ideally, I would not need a microcontroller.
AI: I did a seven-channel version of this project a few months ago. I designed 7 separate opamp bandpass filters (using the Bessel filter topology to minimize distortion). I went with the LM3914 and a prepackaged LED bar graph because cost wasn't the issue; development time was, but you can take the opposite route.
I passed the filtered signals through the following peak detector:
This is a lot cheaper than the opamp circuits you'll find elsewhere. The Vce of the transistor and Vf of the diode should cancel out. The 1uF capacitor and 470k resistor gave a good decay rate for watching the audio signals that I was tracking.
With respect to the cost, the LM3914 that you were looking at is just a cascade of comparators with one input connected through a resistor network to a fixed voltage, and the other to the peak detector input. If you don't need the LED current control that this chip provides, you can probably do it cheaper with a classic quad comparator like the LM339 or LM2901 (you don't need anything fancy), which will run you about $0.30 in quantities of 25 (you need 24 for twelve 8-channel graphs). Assuming that resistors are basically free, you need a diode, a transistor, decoupling caps (also essentially free), a 1uF peak storage capacitor, and an LED graph. Just use some bulk 1206 LEDs for the graph and arrange them on your PCB instead of paying for the prepackaged bar graph. If you go with 8 elements in your graph, and you need 12*8 ~= 100 LEDs, you can do that for $0.042 cents apiece with these green indicator LEDs, or about $0.34 per channel. I'd say you can get away with the bar graph part for under $1 per channel if you shop around.
|
H: ATtiny V-USB with 115200bps? DIP only
I know there are several solutions for V-USB using only DIP Parts (especially the ATtiny) like
IgorPlug
http://obdev.at/products/vusb/easylogger.html
http://cesko.host.sk/IgorPlugUSB/IgorPlug-USB%20%28AVR%29_eng.htm
http://www.recursion.jp/avrcdc/cdc-232.html
But they are limited to 38400bps!
Why?
Are there other solutions only using DIP packaged parts for easy soldering?
AI: Because software USB on AVR can only be 1.0 which is 1mbit max. If we subtract overheads on USB protocol and processing, even 384kbit looks awesome. If you need more - take specialized chip from FTDI for example.
SOIC soldering is not hard, and possible without fancy equipment.
If you want to prototype with SOIC you can solder tiny wires to leads.
|
H: touch film replacing keyboard
I am evaluating whether it can use "resistive touch film" in project-based cards using USBizi Chipset-100 in place of a conventional keyboard.
I would like to see some similar design to see howto make interface.
Any suggestions?
AI: I'm assuming you want help with connections to the touchscreen, not with making your FEZ look like a keyboard to the computer (or with configuring a keyboard as input for the FEZ, depending on your project).
There are essentially two options: Use ADC (analog-to-digital converter) lines on your FEZ to directly connect to the touchscreen, or use a touchscreen controller IC to do the low-level stuff and then connect with SPI or I2C to the controller to get the digital data.
The first option is cheaper (you don't have to buy anything special), but will take more processing time on your FEZ, and will require you to do a little bit of analog design work. Atmel's appnote AVR341 is a good reference, and easily translates to other microcontrollers. Page 7 gives some good requirements: You need a fairly accurate A/D source, 15-25mA source/sink currents, and a processor capable of taking new measurements 70-200 times per second. I'm not sure how well the FEZ works with frequent interrupts like that, so the second option might be more attractive.
The second option eases the processing you'll have to do. Chips like TI's TSC2200 even go as far as to give you a keypad interface so that you can simply wait for the chip to tell you that someone's pressed a key (it's 4x4 keys, not a keyboard!). However, the more features you ask of it, the more complexity will be present in the interface. For a .NET application, you probably want to see an interface rather than connecting right to the hardware,
Regarding the suitability of a touchscreen interface, consider that it can be uncomfortable to type on a rigid surface for a long time, and resistive touchscreens are even worse because you need to apply significant pressure. Don't expect to sustain high typing speeds for very long without causing pain in your fingertips. Also, you'll want some kind of feedback mechanism. The Apple iPod/iPhone/iPad screens are as nice as they are because they (1) indicate the letter you're touching and (2) increase the sensing radius of letters that are likely to come up with predictive algorithms and dictionaries. It's very hard to get a touchscreen keyboard to feel natural.
|
H: What is the name of this common metal tubing?
I see tubing used all over the place in machines, but I do not know what it is called. The cross section looks somewhat like this drawn picture. Can someone clue me in on it?
AI: Structural aluminum extrusion:
http://www.8020.net/
http://www.minitecframing.com/ (my favorite)
http://www13.boschrexroth-us.com/framing_shop/
|
H: Tips for identifying an unknown chip?
What tools and techniques can I use to identify an unknown IC with no markings?
Today I encountered a microcontroller under an epoxy blob. The blob had 11 pads on each of four sides, perhaps 44tqfp. From the board, I know which pin is the reset line and I probably know which pins make up an SPI interface.
Is there such a thing as an expert system for answering these puzzles with the information I have?
Are there any searchable databases of pinouts online?
Would X-raying/Decapping the package be worthwhile?
AI: X-ray won't tell you much. Dimensions of the chip and where the bonds are attached. Decap is probably necessary. You should be able to get the manufacturer from text on the die, which will be a big clue. If you are really lucky, the manufacturer will put something on the die to help you ID the part number.
If you have a subscription to a tear-down company, you could scan their die photos and if you are luck find a match.
For a fee, a tear-down company will do this work for you and send you a full report on the part. Here's a list of a few such companies:
TechInsights
iSuppli Market Intelligence
Chipworks
Anloy Chip Extraction
|
H: Need circuit to close switch on detecting current (12V)
I have a project where I need to detect whether a 12V circuit is live or not. If it is I want to close a switch (actually close a digital IO input on an Adicon SECU16 Digital IO controller).
I am not an EE and would prefer to find a component off the shelf that I can tie into the 12V circuit and provide the relay.
I could choose to not use digital (Supervised) input and instead do analog, but I really don't care how much voltage I'm seeing just whether it's on or off.
I'm capable of soldering a few components on a prototype board, but my lack of EE knowledge means I need some serious help selcting the right components. The simpler the better.
Thanks in advance.
AI: You actually can do this with two resistors. Connect a 7kohm resistor from the signal line to your pin. Then connect a 5k resistor from your pin to your ground.(This is for 5V input, if you have 3.3 us a ~4k and a ~8k)
When 12V is input, it will show up as the logic level the chip knows, when 0V is there you will get 0V on the pin.
|
H: How to implement a soft power switch controllable by microcontroller?
I want to design a circuit such that the microcontroller can toggle a GPIO pin and shut the whole system (including microcontroller itself) down. And when the user presses a momentary button, the power is brought back up again.
Is this possible?
AI: This example uses a Maxim MAX1835 step-up regulator, but could be applied to others as well that have a shutdown pin.
The circuit is normally powered down. When the user presses the pushbutton, the battery is fed into the -SHDN pin, enabling the regulator and turning on the 3.3V to the microcontroller. The microcontroller then puts a logic 1 on the POWER ON lead, holding the power on after the user releases the pushbutton. When the microcontroller wants to shut itself off, it sets the POWER ON lead to 0.
|
H: PC Power supply for a PC/104. Current output
I have to do some work on a PC/104 CPU board. Until now I have been powering this from a separate power module (acs-5151 at the same link) that took in 8-40V and gave +12, +5, and +3.3 out. Until now, I was able to power the CPU module with the 5V line but don't have access to that anymore. The CPU module is an 8W system and in the past we were able to see that it was only drawing about 0.5A. I tried using a small lab power supply but it didn't boot up the CPU (although some of the LEDs did light up). As this supply says it is only capable of 0.75A continuous I thought that perhaps this wasn't enough to boot the it up. Then I was thinking that I could use the 5V line from a normal PC power supply. When I check the supply though it says 5V /22A. A friend suggested that the CPU might only draw what it needs but wasn't sure. I'm afriad to try it as it's a very expensive piece of hardware and can't afford to damage it.
I was wondering if anyone could tell me whether a PC power supply will only give the current needed or if there a danger of it damaging the PC/104 module?
AI: It will only draw what it needs. The .75A supply probably didn't work because the board will draw more at startup and the supply couldn't source it.
|
H: Getting started with a microprocessor
I'm reading about a microprocessors at the moment and wondering if I could get started with an 8-bit microprocessor. What would I need to get started. I understand that they need external RAM and ROM. I don't know whether it is still possible to get an Intel 8-bit one as my book is from 1980. So are there any other recommendations?. I am looking for the circuit diagrams for creating my own PCBs, is this advisable? Something like a single board computer is what I'm looking for.
AI: What are your design requirements or goals? Any areas you expect to need to learn more about, or any areas you wish to focus on?
Because most of the Intel 8-bit microprocessors were so popular they are fairly easy to find as New Old Stock (NOS) or Pulled/Refurbished (reclaimed/recycled, usually tested). At least the 8080, 8088, 8086, and 8085 are available from distributors or obsolete / old-stock supplies.
Two others that are worth considering would be the Zilog - Z80 (technical description), and MOS Technology 6502 (technical description). The Z80 was created by Federico Faggin, who designed Intel's 8080, and made the Z80 a binary compatible (but enhanced) processor.
The Z80 requires fewer support chips than the i8080 with built-in DRAM refresher, a single (5V) voltage supply requirement (i8080 required +/-5V and +12V), and can be run at any clock speed up to its specified speed (e.g. 2.5 MHz for the first NMOS models).
Combined with 5V power supply, oscillator clock (e.g. TTL/CMOS oscillator "can"), Static RAM (rather than Dynamic RAM, DRAM) you only need a ROM/EPROM/EEPROM and interface (e.g. interface chips for parallel or serial interfaces) to built a minimal microcomputer.
One fairly popular book on building your own microcomputer using the Z80 was Build Your Own Z80 Computer (available with copyright permission of author/publisher) by Steve Ciarcia. Also check out the (dated) alt.comp.hardware.homebuilt FAQ, and the N8VEM community for additional resources and references.
The MOS 6502 was the another popular microprocessor, in part because it was so much cheaper ($25 USD) than the Motorola 6800 which was originally $300 USD circa 1975. It was used in popular systems such as the Apple I from Apple Computers, Commodore KIM-1, PET, and Vic-20, BBC Micro, and the Commodore 64 and Atari 2600 game system used 6502 derivatives (6510 and 6507). So there is a lot of material available from retro-computing and retro-gaming people online, and parts. The 6502, like the Z80 was produced by several sources (i.e. second sourcing) including Rockwell in additional to the primary designer / manufacturer, MOS Technology.
If you have a particular (strong) interest in the x86 or IBM PC / XT history then a 8088 or 8086 might be a educational target to consider. Otherwise I would lean towards the Z80 as my first pick, and the 6502 as my second choice due to parts availability and resource material availability.
The range of options is unlimited from a microcomputer built from almost exclusively discrete transistors, to a 25MHz 32-bit MC68030 workstation.
|
H: Could induction thaw ice?
Last week we had very cold weather; and as a result there were lots of frosted pipes (iron and plastic). I spent a lot of time defrosting metal pipes with a torch, but could not do the same with plastic ones.
Could a practical gadget be made to thaw the ice trapped inside metal/plastic pipes based on induction? What would a blueprint of such look like?
AI: Induction uses magnetic fields to move free electrons in a regular lattice (ie: a conductor). Ice doesn't have very many free electrons or a regular lattice, so no. It does have a few large ions and protons, but they are at least 1600X more massive, so they don't move much. In this YouTube video, iron filings are dispersed in ice in order to provide a conductive heat sink -- otherwise it would not heat.
An inductive heating device could be used to heat the pipe directly, though.
Something that could heat the ice directly is microwaves. I don't recommend it, however, as there wouldn't be much stopping the energy from bouncing around and heating you!
|
H: Buying RF metal shields
Where can I find those metal shield cans that you can solder directly on a pcb for EMI shielding? Just like the ones on the back of XBee modules? I'm not having any luck searching on farnell, perhaps with the wrong keywords, or maybe it's not a commonly bought item?
AI: RS stocks these that may be found by searching for "PCB screening".
|
H: Fixing a broken Metcal handpiece
I bought a Metcal STSS-PS2V-02 soldering iron from eBay, it was cheap and in need of repair. The previous owner had some problems with the handpiece and tried to fix it himself.
I can't get it to heat up at all.
If I turn the base station on without the handpiece connected, it draws virtually no power. With it connected, about 10W.
It appears that he has sawn the handpiece in two, then attempted to resolder the cable. With no soldering tip attached, I am seeing 0Ω between the inner and wire and sheath of the cable, does this mean that his resoldering has shorted it, or should I expect this?
Next week, I'll be able to test the base station against a known working handpiece and determine if the base is working properly, but is there any other way I can tell?
AI: I've got a similar Metcal system. If the handpiece and cartridge are working properly just the green LED on the STSS power unit should be on, otherwise the amber one will be lit as well.
They use RF heating at about 14 MHz, via a coaxial cable. It's very unlikely that you will get that handpiece working properly, I'd just buy a new one. You could try testing the power unit with a suitable 100W 50R resistor, it'll need to be non-inductive. Just the green LED should come on. I can't be sure that test will work as I don't think the impedance has been published, but it won't do any damage.
I got mine second-hand from a supplier here in the UK, with a new MX-500 handpiece and selection of cartridges. I subsequently picked up a second STSS unit on Ebay, as a spare. The power units are very reliable, so yours is probably OK.
|
H: How to apply process corners in HSPICE?
How can I apply process corners (TT, SS, FF) to my simulation in HSPICE?
AI: Use the .ALTER command, found in the HSPICE Command Reference.
|
H: Problem with PIC24F UART
The problem I am having is with my PIC24FJ64GA002 and the UART module(s). The 24F I have is in a SPDIP28 package and it is a new B5 chip (just one under the latest B8 revision) from Microchip Direct. I have checked for errata issues which afflicted me last time with the I2C module.
Anyway, I am setting the UART1 module up as a simple transmitter. I am using PPS pin RP8 as the RX, RP9 as the TX and RP11 as the CTS pin. For now I have grounded RX and CTS as I do not need them. I have set the BRG at 115,200 (actual rate ~114,285.7, but it's close enough.) I am using the code below. I expect to see a series of bytes streaming out on RP9, but I do not. RB15 is a debug output: it pulses on each byte being sent. On RB15 I get a really slow clock, about 700 Hz, which is very low for a 115,200 baud link; I'd expect about 14 kHz.
#include <p24fj64ga002.h>
#include <uart.h>
#include <pps.h>
void init_osc()
{
// Must be programmed for FRCPLL mode.
//UNLOCK_OSC();
CLKDIVbits.RCDIV = 0;
//LOCK_OSC();
}
void main()
{
int i = 0x55;
PPSUnLock;
// Initialize oscillator (set FRC to 8 MHz.)
init_osc();
// Initialize UART1 PPS.
iPPSInput(IN_FN_PPS_U1RX, IN_PIN_PPS_RP8);
iPPSInput(IN_FN_PPS_U1CTS, IN_PIN_PPS_RP11);
iPPSOutput(OUT_PIN_PPS_RP9, OUT_FN_PPS_U1TX);
PPSLock;
// Interrupts disabled for now.
//ConfigIntUART1(UART_RX_INT_EN | UART_RX_INT_PR6 | UART_TX_INT_EN | UART_TX_INT_PR6);
OpenUART1(UART_EN & UART_BRGH_SIXTEEN & UART_NO_PAR_8BIT & UART_1STOPBIT, UART_TX_ENABLE, 34);
TRISBbits.TRISB15 = 0;
while(1)
{
LATBbits.RB15 = 1;
LATBbits.RB15 = 0;
while(BusyUART1());
WriteUART1(i);
i++;
}
CloseUART1();
}
I feel like I have missed something obvious, but cannot figure out what it is. If anyone has had previous experience with the UART module on 24F series devices, please let me know! I've had little luck with the Microchip forums.
AI: See page 110 of the data sheet.
Also, you need to disable the analogue inputs on the pins you are using.
|
H: Beyond board power, understanding multiple power supplies and loads in a circuit
I have a project I am looking to power where the secondary load is more than my Arduino can provide amp-wise. I need to know the simplest way to power the whole system. I will be powering the Arduino and a 5v 1.2amp load. Diagrams I have seen show a common ground with two power supplies but I don't know the math for anything beyond a simple circuit. Links to other resources are welcome with all answers. I am looking to learn more about power and circuits in general so more info is better.
EDIT
If I use one supply, how should I design the circuit? e.g. Series or Paralell. Also, how would I go about determining the requirements for that power supply?
AI: Without knowing more specifics about your particular set-up, here are some ideas:
The best and safest option would be to use one strong (1.5A or 2A) regulated power supply that powers both the microcontroller (arduino) and the heavier load.
It would also be possible to use two separate supplies, but then, you would have to make sure that the stuff connected to the microcontroller will not back-supply the I/O pins, possibly causing damage to the microcontroller (see: clamp diodes), i.e. you would have to make sure that both supplies provide almost exactly the same voltage (within +/- 0.3 V).
|
H: Can Resistance of wires be ignored?
I'm trying to calculate the internal resistance of my rechargeable batteries and haven't got a single battery holder so using I am having to using Banana plugs and Crocodile clips for holding my resistor. Then holding the banana clip on the negative end of my battery and reading the current. But could this be affecting my readings as I've tried different resistors and I'm still out in my calculation first time i got ~1000(with a 10k load) ohm now down to 10 ohm(with 68 ohm load). I have even smaller loads to test with now 1 ohm and 0.1 ohm. But this just popped in to my head as it might be problem. The leads I'm using are what we normally use for connecting our PCBs to the PSU, this is why I thought it could be ignored but maybe not when trying to calculate some thing very accurately.
AI: No, it cannot be ignored.
The internal resistance of Lithium ion/NiMh batteries is comparable to one of the wires. Also you should keep in mind that a significant part of the resistance is in the connections to the battery.
So, for precise measurement, you can go for 4-wire measurement, or accurately measure the resistance of the wires and connections, and subtract it.
|
H: Identifying Capacitors
I bought a mixed bag of ceramic capacitors from Maplin and I'm struggling to identify most of them. I'm a bit of an electronics newb, but I understood that a capacitor usually has 3 numbers on and sometimes a letter at the end of the numbers. The third number indicates the amount of zeros you add to the first two to get the value in pF. Am I correct?
Well with that in mind, I introduce you to:
The first one is a bit blurry, but it seems to have 8P2 printed on it. Next has n51 with Sy below it. The 3rd and 5th ones have a horizontal line under the number, and what might be a number one, or a corresponding vertical line, can't decide which it is. The 4th one seems a bit more clear now that I can see the writing more clearly in the picture - I assume this is 180pF? Finally the last one has 82 on it, is this simply 82pF?
Is there a way to test the capacitance at all? I have countless smaller ones with either blurry text, or nothing written on.
AI: 8p2 = 8.2 pF
n51 = 0.51 nF
220 pF
180 pF
560 pF
82 pF
|
H: What kind of components are black blobs on a PCB?
In low-cost mass-produced items I often run into black blobs of what looks like resin applied directly on top of something on the PCB. What are these things exactly? I suspect this is some kind of custom IC that is layed out directly on the PCB to save on the plastic housing/connector pins. Is this correct? If so, what is this technique called?
This is a photograph of the inside of a cheap digital multimeter. The black blob is the only non-basic piece of circuitry present, along with an op-amp (top) and a single bipolar junction transistor.
AI: It's called chip-on-board. The die is glued to the PCB and wires are bonded from it to pads. The Pulsonix PCB software I use has it as an optional extra.
The main benefit is reduced cost, since you don't have to pay for a package.
|
H: Tips for wire-to-pad and wire-to-wire soldering?
After a simple flashy-LED kit's worth of practice, through-hole soldering is fairly straightforward. What I'm still having trouble with is wire-to-pad and wire-to-wire soldering.
The first problem is keeing stuff still. Blu-tac helps but gets melty, and I've never used a "third hand" that was worth a damn. Is it worth paying more for a better one? Any other tips?
My particular application is soldering 0.1" SIL sockets to flat flex cable (me again!). Would solder paste and the heat gun attachment on my butane iron work well?
AI: Wire to SIL socket:
Put the socket on a bench vice to hold it still.
Heat up the pin with your soldering iron, then apply a bit of solder. Don't heat too much or you'll melt the plastic spacer between the sockets. Repeat for all pins.
Strip wire ends. If using multithreaded wire, it might be a good idea to pre-solder the wire ends too.
Now, holding the iron in one hand and the wire in the other, heat up the pin and touch the wire end on the iron. Once the solder melts, move the wire end into the molten solder, then move the soldering iron away. Hold the wire still until the solder solidifies. A stable posture will help.
Inspect. If it looks like a cold joint (matte grey, brittle), add a bit of fresh solder and redo the joint applying afterheat a bit longer.
Put a 2-3 cm. piece of <3mm heat shrink tube over the joint, pin and wire. Shrink it tight to make it more durable.
Wire to pad:
Basically the same thing - apply enough pre-solder on the pad to immerse the wire end.
General advice:
The thicker the wire / the larger the foil you're soldering, the longer pre-heating is required on that surface.
If the metal you're trying to solder is in contact with eg. metal pliers or bench vice, the tool will conduct lots of heat away making your work difficult.
|
H: Simple Biasing Circuit
I'd like to formally understand this simple biasing circuit:
Let V+ be the supply voltage, Vi be the input voltage at the seemingly unconnected terminal of the capacitor, and let Vo be the output voltage at the junction between the resistors and capacitor. Let S be the impedance unit (i*omega)
using VI relations and Kirchoffs laws:
(V+ - Vo) / R1 - Vo/R2 + (Vi-Vo) * C*S = 0
which after rearranging gives:
Vo = (V+/R1 + ViCS) / (1/R1 + 1/R2 + C*S)
decomposing the numerator it becomes clear that the biasing term is:
= (V+/R1) / (1/R1 + 1/R2 + C*S) = V+ / (1+R1/R2 + R1CS)
Does the amount of bias really depend on the driving frequency? At DC, S=0 and everything reduces to a voltage divider regardless of the voltage at Vi.
(Sorry for the eye-sore math. Is it possible to do math input on this website like it is on math.stackexchange ?)
AI: quick explanation: The biased voltage can be regarded as a superposition of the contribution from V+ (calculated above, called biasing term) and the contribution from Vi (the other term, with VisC in the numerator): Vo = Vo,V+ + Vo,Vi = V+/[R1(1/R1 + 1/R2 + sC)] + (VisC)/(1/R1 + 1/R2 + sC), where
Vo,V+ = V+/[R1(1/R1 + 1/R2 + sC)] and
Vo,Vi = (VisC)/(1/R1 + 1/R2 + sC)
When one uses superposition, they redraw the circuit with all other voltage sources shorted and other current sources opened (other than the one being considered). This means that when considering the contribution from V+, Vi is grounded, so the frequency[-ies] in the Vo,V+ term is that present in V+, which should be near zero for a DC source. Using the same arguments, the frequency in the Vo,Vi term is that present in Vi.
Superposition makes sense for many reasons; one of the arguments I've made to justify it to myself is to look at Fourier analysis, which shows that any signal can be decomposed into the superposition of sinusoids, and those sinusoids can be extracted by filtering out the others; the Gibbs phenomenon is often seen in practice as ringing.
To be more precise though, we should take into account the load resistance that would be connected between Vo and ground.
simplified analysis: The capacitor in this circuit is called a DC blocking capacitor, because it doesn't pass any DC signals. A common and useful technique to analyzing circuits that separate high frequency AC and DC signals like this is to approximate the blocking capacitor as an open circuit to DC signals and short circuit to AC signals. This greatly simplifies analysis of more complicated systems. For mid-band frequencies -- those for which the capacitor presents an impedance comparable, over 5%-10%, to that of R1||R2 -- the complicated impedance formula needs to be used. For low frequency signals, where the capacitor impedance is more than ~100·R1||R2, the cap can be regarded as an open circuit. Of course, this depends on the sensitivities of your circuitry, but that will be apparent if these considerations are of value.
|
H: How do I implement accurate distance measuring (to ground) on a plane-like UAV for heights over 10m?
How do I implement drone-to-ground distance-measuring for autopilot landings for heights over 10m? I found ultrasonic to be too inacurate, let alone GPS. Maximum height is 1000m, Vmax is 100 km/h, Vaverage is 72 km/h. The drone is plane-like, no *copter or so.
Thank you for any input!
AI: You are probably looking for a radar altimeter, but I think that 1000m height will be a challenge if you want to build it yourself, because of power required to get detectable reflection at such distance. Couple hundred meters may be more realistic target for home made low power radar.
Here is schematics of radar landing altimeter that is usefull to about 1000 feet.
|
H: Resources to learn about the AVR/RISC architecture
I think I have used enough of the AVR series by atmel to say that I understand how to use it. I know somethings about how it actually works, but I would like to know more. Are there any good resources which describe the architecture of Atmega or RISC architecture in general? I know the datasheet has all this (and I really looooovvee the datasheet, its kinda my bible) but I need something little more simple than that. Any help?
AI: Learn AVR assembly, it's the best practical way to learn about the architecture.
http://www.avr-asm-tutorial.net/avr_en/
|
H: Why do battery/power supply supply voltages drop under a load?
Why is it when you connect a battery to a heavy load does the voltage coming out of the supply drop?
AI: Batteries have an internal resistance, this is generally measured in milli-ohms. As more current is drawn from the battery there will be a progressively larger voltage drop due to this internal resistance. V = I*R. This is obviously a high level answer, the details can vary based on battery chemistry.
A battery's voltage will also generally drop as the battery ages (runs out of juice). The exact chemical process varies based on battery chemistry but simply put the battery is running out of charge.
|
H: Voltage regulation and current limiting with a microcontroller
I'd like to build a power supply for my desk. I've found a few projects based on the L200 adjustable voltage regulator.
In the example below, how could I replace R3 with a microcontroller, so that varying the current limit can be automated?
Likewise, how can R2/R1 be controlled?
Is there a better device for a task like this?
AI: Use an MCU as a switching regulator, with a suitable MOSFET and inductor. Microchip has several application notes on such techniques.
|
H: Why would a power supply mess with my scope?
I recently bought a 0-35V 0-3A (105W) CC/CV linear power supply, made by Takasago in Japan, second hand. It's a nice unit, and inside of it is a massive power transformer along with three pass transistors on a very large heatsink (it is interesting why there are three transistors but I can only suspect that they are to reduce the load on an individual transistor), and it weighs a ton. I've fully tested it to 105W, although only for about 5 seconds as even my 2x25W resistors were getting too hot.
I originally had plans to put it on top of my HP 54501A, a digitising oscilloscope with a CRT raster monitor (unlike a normal CRT scope which draws a trace by moving the electron beam - this sets pixels on and off representing the trace.) However, I found that when turned on, whether above the scope or on the bench below, the CRT would have a weird ripple effect or would shift position randomly. It didn't matter if the supply was loaded down or not. The trace was not affected, just the display (even text and graphics). Why would the supply cause this? I suspect it has something to do with the transformer because that makes a humming sound in operation if you listen carefully.
AI: The power transformer in the power supply is producing stray flux lines, which are causing the scope electron beam to deflect.
The magnetic flux in a transformer is never entirely constrained to the transformer core, and as transformers get bigger, it becomes progressively more involved to minimize the stray flux as much as possible. Also, the standard EI core used in power transformers is not the best type when it comes to low stray flux (that would probably be a pot-core).
Basically, the transformer is acting like an electromagnet, modulated at the frequency of the mains.
The effect is akin to waving a magnet around your TV, since the monitor in your DSO is effectively a little TV.
Even scopes which use electrostatic deflection to steer the electron beam are magnetic fields. since it's a beam of electrons in either case, and electrons are charged particles, rendering them influenced by magnetic fields.
I have the same problem with a bit 100 V 10A power supply I have a work. Whenever I turn it on, it drives my (analog) scope nuts.
|
H: How do I solder a Sparkfun breakout board to a shield?
I need to solder some breakout boards onto an Arduino shield. What's the general procedure to do this? Do I solder it onto a header? Do I need any other mechanical connection or hold-down?
For example, I would like solder this gyro sensor onto this aeroquad shield:
gyro sensor: http://www.aeroquadstore.com/ProductDetails.asp?ProductCode=SEN-09801
aeroquad shield: http://www.aeroquadstore.com/ProductDetails.asp?ProductCode=AQ2-000
AI: As far as your question about soldering the gyro sensor to the aeroquad shield goes, if you look a the tiny picture on their website, in the center of the board there is a region marked "gyro". You'll take the single inline pin strips (also pictured) and break off 7 pins as a group. Then you'll solder the short end into the gyro board. Then (unfortunately) it looks like you'll have to solder the gyro board into aeroquad.
As far as shields go, in my experience (Arduino Duemilanove) the spirit behind the shield concept is to allow them to stack up. The aeroquad "shield" doesn't appear to allow this, so I imagine you'll want to get single inline headers and solder them into the aeroquad so you can plug in the Arduino.
So if you want to add more breakout boards, the general procedure would be to get the headers with the extra long pins, and put those through your protoboards so that other shields can stack on top of them. This allows everyone access to the pins in the Arduino that they need.
|
H: magnetometers: do they work all over the globe?
Are there any places on the globe where magnetometers won't work?
For example, if you took a Honeywell HMC5843 to the North or South magnetic pole, would they fail to function properly?
AI: You wouldn't be able to use it as a compass exactly at the magnetic pole, as the magnetic field would be vertical.
You probably already know about the need to correct for magnetic declination, which is the angle between magnetic north and true north. It varies irregularly over the earth and over time. Take a look at a declination map (such as this one), and notice that there is no unique value for declination at the magnetic poles.
So the magnetometer works everywhere since it gives you the correct magnetic field X/Y/Z components; you just can't always use it as compass.
|
H: How do I calculate the current in parallel branches?
I've been playing around with an Arduino for a while now, and while I know just enough about simple circuits to get little projects up and running, I still don't know enough to figure out what's going on in all but the simplest of circuits.
I've read a few books on electronics and a handful of online articles, and while I think I understand how voltage, current, resistors, capacitors and other components work; when I see a schematic with lots of them in, I don't know what's going on where.
In a bit to finally get to grips with it, I bought a 300-in-1 Electronics Project Set, however it seems to jump from "Here is a circuit with two resistors in parallel" to things more complex, without explaining how it works.
For example, it shows a simple battery->resistor->LED circuit, but shows that if you wire a button up in parallel with the LED, pressing the button turns the LED off.
I get that the current must be travelling through the path of least resistance, but I don't understand why it doesn't travel through both.
I'm taught that wiring two resistors up in parallel causes the current to flow through both, and so more current flows in the circuit. I've also tried replacing the button in the circuit above with resistors of varying values, and as I suspected, a high value resistor doesn't affect the bulb at all, but lower values start to dim the bulb.
I'm not sure how to apply the E = IR equation to all of this.
Also, how much resistance does an LED have? I tried measuring it with my multimeter, but it wouldn't give a reading.
Sorry if I've waffled on loads here, but I'm trying to paint a picture of what I think I understand and what I want to understand. Not sure I've achieved that!
Oh yeah, and expect lots more of this as I delve deeper into my 300-in-1 project kit!
AI: Well, I'm studying electrical engineering right now and I can tell you that such jumps as you described take around two years of lectures at my university.
First thing which is important is to know which elements are passive and which are active. Then you need to know which elements are linear and which aren't.
Next step is to get equivalent schematics for elements which you have and to see how they behave.
For example, let's take the switch. In off state, it functions as an open circuit, while in on state it functions as short circuit. Next, if you have sensitive equipment, you'll be able to notice that the switch isn't actually short circuit because it has some resistance, but that it's very low. Now let's take a look at the diode. Diode isn't linear component, so it doesn't have resistance in the classical sense in which for example resistors have. Instead there's the V-I curve of the diode. On a resistor, it's a linear function and we can use resistance as its characteristic, but on diode, it looks exponential.
As you can see from the image, certain voltage is needed for diode to start working properly and when you trigger the switch, that voltage disappears. That means, that the "resistance" of the diode just became huge. To get a feeling for this, use the parallel resistor calculation for say 1 mΩ resistor and 1MΩ resistor and take a look how much current goes through each of them. This is the way the circuit you mentioned behaves.
|
H: Simple Electric Shock Device
Can anyone tell me how to make a simple electric shocking device (like a electric pen or hand buzzer style). I've seen people use piezoelectric elements from lighters (is that correct?) but I would like to know how to create one from scratch, and also what current and voltage is needed to give a small shock. Thanks, ell.
AI: This is actually quite a simple circuit which works by stepping up the collapse of a magnetic field in a small audio transformer.
The schematic looks like this:
I think something like this part should work for the transformer.
If you touch the two output wires, you'll get a very small electric shock as you release the push button.
|
H: Pad dimensions and land patterns for QFPs
I'm putting together a footprint for a 100-pin, 14x14mm TQFP, and I'm finding conflicting designs. The pitch and width of the pads are all basically the same, but the length and centering of the pads horizontally varies a good deal.
The following images are from the Microchip packaging specifications document (see page 282-283), so that we can have names to use for the dimensions.
Physical Package:
Recommended Footprint:
There's a table with numbers for each dimension, but the exact details aren't really important here.
Where should the pin go on the pad lengthwise?
Should the pin be centered on the pad?
(C1 = D - L) If so, what should Y1 be? L, L+tolerance, 2L?
Should the inner edge of the pad line up with the inner edge of the pin?
(C1 - Y1 = D - 2L) If so, how far should the pad stick out in front of the pin?
Should the pad and pin have some other dimension?
Note that the question is basically moot if Y1=L. I'm assuming that I'll want a little extra pad to hit with the soldering iron.
It might be relevant that L1 is allowed to vary by ±25%, which feels like a bigger variation if you read 'between 0.45 and 0.75mm'. It might not be relevant.
I'm interested in solderability, avoiding invisible solder bridges under the chip, routing traces underneath (and outside of) the chip. Of course, I don't want to use absurdly long pads for heat dissipation and board space reasons.
AI: If you're interested in solderability and manufacturability, then you should follow the recommended pad layout. I've never had a manufacturer's recommended pad layout give me grief, although I have run across a few vendors whose dimensioning requires a fair bit of headscratching and pencil-and-paper chicken-scratching in order to figure out offsets and spacing.
You are making some bad assumptions in your calculations though. No, pins are not often centered on the pads "lengthwise" but they are often centered widthwise. Y1 and C1 would most certainly be given by the manufacturer. The recommended land pattern will (in my experience) give more space for the pin on the "outside" of the pad and less underneath it. My guess is that that gives a good shape to the solder connection. You won't have anything in terms of heat dissipation unless there are a lot of grounds or you have a ground pad underneath. In the case of a lot of ground pins, you'll want to give them a lot of copper fairly quickly, but you'll want to connect the pad to the copper with thermals or you'll have soldering problems.
I wouldn't worry about minimizing board space, especially if you're not building a million of these. The half a millimeter you might save by shaving Y1 a little isn't worth it.
|
H: Short circuit protection for a boost converter
Is it possible to add short circuit protection to a boost converter?
My initial instinct was no, as the switch does not directly control the input to the inductor and this means the minimum output is Vin or so.
But are there ways to protect such a converter?
AI: Here's a linear tech app note
http://cds.linear.com/docs/Design%20Note/dn154f.pdf
If you're not using much current, sometimes a simple solution is to just use a thermal fuse in front of the converter, or even a simple lm317 type current limiter. The second will give you a voltage drop, which may or may not be a problem. Another easy solution is a good current limited voltage regulator in front of the boost converter and dedicated only to the boost converter, so if there is a short it doesn't bring the rest of your rail down.
|
H: How many resistors do I need for an 8 switch DIP switch block?
I was thinking of giving each switch it's own pull-up resistor, but this seems like it would be expensive and a little bit of overkill. But using just one pull-up for the entire block seems like it might overload the resistor (unless I just use a big one).
Are there any guidelines in this situation?
AI: SMD resistors are as cheap as dirt. Especially if you would buy full roll of let's say 10k ones (i.e. something widely-used, so that you could use in multiple projects). It's hard to overload pull-up resistors, as they can dissipate 0.125W usually.
There are also 4 and 8 resistors in 1 package, this will be even cheaper if you are on large scale.
You cannot use single resistor for multiple wires - as they will be shorted (or you will need diodes :-D )
|
H: USB descriptor (LUFA)
I'm trying to jump in the USB world with LUFA on a Teensy dev board, but I'm stuck in the understanding of the descriptors.
Currently I'm trying to add one button to the joystick demo without sucess. Does anyone know some resource that explains step by step how to set up a USB descriptor?
edti :
After reading USB in a nutshel, I think I may not modified the Descriptor at all but the HIDReport instead...
AI: You need to edit the HID report descriptor, but also the main code. Change this portion of the HID descriptor:
0x05, 0x09, /* Usage Page (Button) */
0x09, 0x02, /* Usage (Button 2) */
0x09, 0x01, /* Usage (Button 1) */
0x15, 0x00, /* Logical Minimum (0) */
0x25, 0x01, /* Logical Maximum (1) */
0x75, 0x01, /* Report Size (1) */
0x95, 0x02, /* Report Count (2) */
0x81, 0x02, /* Input (Data, Variable, Absolute) */
0x75, 0x06, /* Report Size (6) */
0x95, 0x01, /* Report Count (1) */
0x81, 0x01, /* Input (Constant) */
0xc0 /* End Collection */
To this:
0x05, 0x09, /* Usage Page (Button) */
0x09, 0x03, /* Usage (Button 3) */
0x09, 0x02, /* Usage (Button 2) */
0x09, 0x01, /* Usage (Button 1) */
0x15, 0x00, /* Logical Minimum (0) */
0x25, 0x01, /* Logical Maximum (1) */
0x75, 0x01, /* Report Size (1) */
0x95, 0x03, /* Report Count (3) */
0x81, 0x02, /* Input (Data, Variable, Absolute) */
0x75, 0x06, /* Report Size (5) */
0x95, 0x01, /* Report Count (1) */
0x81, 0x01, /* Input (Constant) */
0xc0 /* End Collection */
And set the third bit of the Buttons element in the element in the CALLBACK_HID_Device_CreateHIDReport() function of the main source file, i.e. to "push" the new third button, use:
if (ButtonStatus_LCL & BUTTONS_BUTTON1)
JoystickReport->Button |= (1 << 2);
|
H: How do Force-Sensitive Resistors work?
How does a Force-Sensitive Resistor work?
Does it work by sensing the number of tracks the user covers meaning that the more force the user pushes on the sensor the less resistance it causes?
Here is a picture of one:
AI: A piece of flexible conductive material with a high resistance is under the tracks, and the resistance between the tracks reduces when the sensor is pressed.
I once made a crude one from a piece of conductive foam, which worked in a similar fashion.
Piezo film is another technique that is sometimes used. I've also experimented with that, and it works very well.
|
H: How to tell size of Eagle library component?
I am working on my very first PCB design using Eagle. In my design, I will be using a 10W 10 Ohm power resistor. Since it isn't a "standard" size, I'm having trouble finding the component in Eagle. In particular, it has a width of 47mm.
No component in rcl.lbr is long enough. resistor-power.lbr seems pretty promising, but many of the components don't have measurements. And I'm not sure what the closest equivalent is. For example, KH216-8 seems like it is roughly the right size. And it happens to have a measurement. So is it, uh, "safe" to go with that?
How could I view the dimensions of a component if it's not in the description?
Are there any other techniques I can use when trying to find a library part that approximates the component I've chosen?
AI: I don't think there's an easy way around this. I would open up the resistor-power.lbr library on its own, in the library editor, open up the first footprint (ACO1), change the major grid to 10mm, then go through each one and note those that are close. There's usually some kind of logic to the footprint names and numbers -- for this library, it appears the letter prefix denote a width class and the number denotes length. EDIT1: I went and did this, and none are 47mm wide.
EDIT2: After looking at the datasheet, it appears it is 47mm long and only 9mm wide, which fits HPS947. (KH216-8, RS10-38-39, and RWM8X45 also seem to fit... sorta.)
In almost every PCB design you will be making your own parts. I find it useful to make a new EAGLE library for every project, and copy all used part into it. The easiest way to make a new part, if it's just a variation of another, is to copy symbols and possibly even footprints into a new layout, then edit them. For this part, you can copy the power-resistor.lbr > R symbol by opening it up as if you were going to edit it, selecting the whole thing with the Group function, then copying the group with the Copy function (click Copy button, right-click previously grouped symbol, select "Copy: Group". This puts the whole thing into your Paste Buffer:
<-- (that button)
Open up a new library, example.lbr, then create a new symbol (Library > Symbol). Click the Insert Paste Buffer button ( ^-- that button). The copied symbol should come up, labels and all -- click on the crosshairs to line it up with the symbol anchor. I usually make my own footprints simply to remove all doubt in the library specs, but they can be copied using the same method. Another way to copy a part is to copy the entire library and rename it, then edit the entire thing. Sparkfun also has a pretty good tutorial on making parts.
Also, when I make my own parts, I fill out the caption so I won't have to browse the footprints directly in the future!
|
H: Code Running from Debugger but Not Without it
I am using WindRiver JTAG Debugger to debug my code.
Whenever I run the code with Debugger connected, Code works correctly but If I disconnect it, It fails to even Start!
Has anyone faced such kind of Problems?
AI: My debugger for a Coldfire does some initialization of the SDRAM controller and other low-level registers that is normally done by the bootloader. Check to see how your debugger initializes the chip.
|
H: What is the advantage of a Z transform derived PID implemenation?
I've seen many PID articles, such as this, use a Z transform of the generic PID equation to derive some crazy difference equation which can then be implemented in software (or in this case an FPGA). My question is, what is the advantage to such an implementation versus the traditional and much more intuitive, PID without a PhD type implementation? The second seems easier to understand and implement. The P term is straight multiplication, the integral uses a running sum and the derivative is estimated by subtracting the previous sample from the current sample. If you need to add a feature such as Integral Windup protection, it is straight forward algebra. Trying to add Integral Windup protection or other features to a difference type algorithm, such as linked above, seems like it would be much more complicated. Is there any reason to use such an implementation, other than the "I'm a bad ass who likes to do Z transforms for fun" type bragging rights that go along with it?
EDIT: The PID without a PHD article I linked is an example of the simpler implementation that uses a running sum for the integral term and the difference between consecutive samples for the derivative term. It can be implemented with fixed point math in a deterministic manner and can include real time time constant information in the calculation, if desired. I'm basically looking for a practical advantage to the Z transform method. I can't see how it could be faster, or use less resources. Instead of keeping a running sum of the integral, the Z method appears to use the previous output and subtract the previous P and D components (to arrive at the integral sum by calculation). So, unless someone can point to something I'm missing, I will accept AngryEE's comment that they are essentially the same.
FINAL EDIT:
Thanks for the responses. I think I've learned a bit about each but in the end, think Angry is correct in that it is just a matter of preference. The two forms:
$$ u(k) = u(k-1) + K_p(e(k) - e(k-1) + K_i T_i e(k) + \frac{K_d}{T_i}(e(k)-2e(k-1)+e(k-2)) $$
$$ e(k-2) = e(k-1), \quad e(k-1) = e(k) $$
$$ u(k-1) = u(k) $$
or
$$ \mbox{sum} = \mbox{sum} + e(k) $$
$$ u(k) = K_p e(k) + K_i T_i\cdot \mbox{sum} + \frac{K_d}{T_i}(e(k)-e(k-1)) $$
$$ e(k-1) = e(k) $$
will evaluate to essentially the same thing. Some mention the first can be implemented in a DSP or FPGA faster, but I don't buy that. Either could be vectorized. The first requires two post operations, the second requires one pre and one post operation, so it appears to even out. The first also requires 1 more multiplication in the actual calculation.
AI: You're getting befuddled by all of the fanciness of the Z-transform. The two approaches are fundamentally the same - the PID without PHD approach just has fewer subscripts. They perform the same basic function and use the same basic math.
The only major difference between the two that I can see is that the PID without PHD doesn't take sampling time into account. For doing anything that might be unstable, sampling time is a very important consideration. The benefit of the Z-transform approach in this case is that you can't use it without taking sampling time into account - it forces you to show your work and helps you design a more stable system.
It also looks like the case study you found implementing the Z-transform approach was designed to be highly deterministic. This explains their use of FPGAs - the calculations will always take the same amount of time. The PID without PHD implementation is decidedly not deterministic. The use of doubles as variables instead of a fixed-point implementation is sure to cause non-deterministic behavior on any microcontroller without a floating-point unit (and probably on uCs with an FPU as well). The case study is working on a whole different level of complexity compared to the PID w/o PHD approach.
So fundamentally the math and control approach is the same, but the case study/Z-transform approach is more rigorous and theoretically grounded. The PID w/o PHD approach will only work for very simple, non time-critical system that are relatively stable.
|
H: Is FCC certification required for something that is not sold?
Is FCC certification required for something you put together for personal use or only for something you actually sell to someone else?
AI: I believe that you aren't required to certify hobby electronics, but you still may get a knock at the door if your product is interfering with someone's commercial gear next door.
Certification is required for commercial products.
Certification is also required for anything that plugs into the telephone network.
IANAL (I am not a lawyer), by the way.
There are some other caveats to keep in mind; if you build something powerful that ends up burning down your house or maiming someone, and your insurance provider finds out that it's not 'approved', your chances of getting coverage are likely slim.
If you're tinkering with 5V / 12V stuff at low power, not emitting tons of RF and not polluting the mains, you're probably OK.
|
H: What standard UART rates are there?
I know 9600, 19200, 38400, 57600, 115200 and 1.8432 Mbaud, but no others. Why are these values used, and is it simply doubling each time or is there something more complex going on (for example, 38400 quadrupled is not 115200 baud?)
The reason I ask this question is I'm designing something which may have to interact with a variety of different baud rates. It will initialise in 9600, and then switch to a specific baud rate. But I can't support arbitrary rates because the dsPIC33F I am using does not support arbitrary rates as it is limited to a 16-bit BRG down counter. It's similar in this regard to many other processors.
AI: It started a long long time ago with teletypes — I think 75 baud. Then it's been mostly doubling ever since, with a few fractional (x1.5) multiples, for example 28,800, where there were constraints on phone-line modem tech that didn't quite allow it to double.
Standard crystal values came from these early baudrates, and their availability dictates future rates. E.g.,
\$\begin{align}{7.3728 \,\mathrm{MHz} \over 16} &= 460,800 \;\text{baud}\\\\{7.3728 \,\mathrm{MHz} \over 64} &= 115,200 \,\text{baud}.\end{align}\$
Most UARTS use a clock of \$2^n \times 16\$ of the baudrate, more modern parts (e.g. NXP LPC) have fractional dividers to get a wider range by using non-binary multiples.
Other common standards are 31,250 (MIDI) and 250K (DMX), both likely chosen as nice multiples of 'round' clocks like 1MHz etc.
|
H: How does a zener diode and a resistor regulate voltage?
I'm having trouble understanding the simple voltage regulator that can be built using a zener diode (from section 2.04 in the Art of Electronics). I know that it would be better to use amplifiers, et cetera, but I'm just trying to understand how this circuit works.
I don't really understand how the circuit works, but I am guessing that when a load is applied to the output, it drains current from the source (Vin) and thus causes the voltage to drop? How does the zener diode help to maintain the voltage and thus make this circuit act as a regulator?
AI: Look at the Zener diode curve. You will see that the device breaks down at the Zener voltage when reverse-biased, and conducts. That property will fix the output voltage at the breakdown voltage, over a range of output currents, when used with a resistor, with relatively small voltage changes. It will also stabilise the output against changes in the input voltage.
Strictly speaking, Zener diodes are low-voltage devices (up to about 5V6). Higher-voltage ones have a different mode of operation and are called avalanche diodes. Both types are commonly referred to as Zeners, though.
|
H: What is equivalent to a daily build (and smoke test) for schematic designs?
Daily build in software is taking the source code, compiling it and generating the executables, then running that nightly. This is considered a best practice since it catches errors that prevent the build sooner rather than later, which makes it easier to fix. And if the build works, then others can make sure they aren't introducing errors.
What would be the equivalent for a schematic design? Clearly I can't build the PCB, but there might be something more than generating the netlist.
Edit 1/21/11: Also a smoke test is running some tests against the build. Again, not possible. I like the DRC (design rule check) idea, I'm thinking of checks such as that.
Edit 1/24/11: I was think of the schematic since that's what I do, rather than the PCB.
AI: One little nit: Only really sloppy developers use daily builds because one build a day means having to wait up to a day to find out if you broke the build.
The best solution is to build and test every single change individually before letting it hit the public branch and revert the change if it breaks the build in any way.
Doing any sort of automatic testing on a schematic or a board layout might be very hard or impossible, but everything you can automate should be automated via something like Hudson, things that come to mind are:
ERC
DRC
BOM updating (check that the parts exist, are available and calculate total cost)
Generate Gerbers and other manufacuring files.
Generate PDFs of the schematic and PCB layers as well as 3d renderings of the PDB, BOM diff and other documentation.
Drop a mail to the developer mailing list with the commit message and links to the output files, so developers can review the change easily.
The number of errors that can be caught automatically might not be terribly high, but having the CI system generate the output files means that it will happen correctly every time and that you don't forget some silly setting when doing it manually.
|
H: BJT transistor junctions: base-collector
I've been playing with voltage swings in a basic emitter-follower circuit. If I swing the input too large in the negative cycle, the base-emitter junction is reverse-biased and the transister goes into cutoff mode. I can see the clipping in the output and this makes sense to me. With the collector, however, I've noticed that I can swing higher and not see symmetrcial clipping. Eventually I do see the clipping.
Is there a rule of thumb, like with the base-emitter junction, for managing base-collector junction? May I use VC-VB=0.6/0.7 V for this relationship too?
AI: If you drive the base positive enough (assuming an NPN) what happens is the transistor 'saturates', and the collector voltage will dip to just a couple tenths above the emitter. In this mode, the base-collector junction is actually forward biased, instead of reverse biased as is usually the case.
|
H: Is there a standard or "safe" distance between PCB components?
I am (still) designing my first PCB and, according to prices listed on websites, the smaller the board the cheaper it is. That is, batchpcb charges per square inch. goldphoenix will print "as many as they can" on an 100 square inch board. Smaller is cheaper. Got it.
So should I try to cram as much as I can in a small space? Obviously one can go overboard doing this, but in all reasonableness, the point stands. Is there a standard guide for minimum distances between components? And are the standards based "this makes it easy to solder" or more technical problems (capacitances, inductances, sparks across components) that are too close together?
For example, one comment on this board from sparkfun says:
"These don't look like they're spaced
at standard banana jack spacing. Isn't
that important anymore?"
"its low current (5 amps) which
shouldn't be enough to spark across
the terminals at those voltages"
"I think the point is that most double
banana plugs have a spacing of 0.75".
The banana jack spacing on this board
appears to be about 0.5"."
All implying that there the board has a poor design. But poor based on what?
AI: Beyond constraints due to voltages or minimum trace/space widths (all important), on a larger scale the mechanical size should be convenient and conform to standards or convention if applicable.
For instance, regarding banana plugs, 0.75" is fairly standard for some adapters, so while 0.5" isn't inherently bad, it's possibly annoying to deal with.
Mounting holes should be easily accessible and fit common screw sizes (#4, #6, etc.).
Likewise, I strongly feel that a fairly popular prototype board is poorly designed because it has a non-integer multiple of 0.100" spacing between two of its headers.
|
H: If I buy a spectrum analyser, how do I do an EMI test?
Maybe when I have the cash to buy one, I will. But my question is more related to how to use one once I've got it. I assume I'll need some kind of antenna to receive the EMI. Are there general rules for self-testing? (Before sending it off for proper FCC/CE/etc. validation.)
AI: Hopefully someone can provide a better answer as I only do a quick test before going to a proper EMI testing facility for a first pass.
What i do is use a scope / spectrum analyzer capable of accuracy up to the frequencies i'm concerned about, make a small coil of low gauge wire, and attach it to the end of a probe. I hover this probe over various sections of the circuit that I had preemptive concerns about (and the rest of it) to look for "hot spots" and use some judgement regarding how hot they are vs past situation with similar circuits.
To ultimately "do it right" you need a spectrum analyzer, an antenna, and a "dead room" or testing box.
Depending on your continuing use of the equipment, the best answer may be to not buy the SA (unless you need it for something else too) and rather rent some time in a EMI testing facility, an hour or two with a EMC engineer will give you a very close to definitive answer as to whether or not you'll pass. Unlimited hours without the proper facility will at best give you a "decent idea" of your chances.
|
H: Can I use an Arduino as a USB to serial interface?
I have a BluRay player that can be programmed by accessing to a serial console, as described here.
I have an Arduino (a Seeduino, actually), that has a USB interface. According to Arduino's documentation, pins 0 and 1 are RX and TX. Do these pins bypass from what the computer sends? Can I use the Arduino as a USB to serial interface for what I need?
AI: Take a look at this post by Ihsan Kehribar: Using Arduino as serial to usb converter
In this post it is shown that you can use the FTDI chip on the Seeeduino as a serial to usb converter, you just need to run a simple sketch to make sure the AVR does not interfere with the RX and TX lines.
|
H: How to limit inrush current?
I'm designing a device powered from USB. The device uses FTDI FT2232 chip for USB connection. Upon a command from a computer FT2232 chip should enable power via a MOSFET switch to rest of the circuit. This additional circuit has a capacitance of 50uF (FPGA + aux stuff) and is powered from the same USB port. After the switch is turned on, this additional 50uF capacitance will sink a huge current until it's charged.
How to limit this inrush current 1) to avoid voltage drop on power rails and 2) to avoid USB PTC from disconnecting power to the device?
Is it enough to put a ferrite bead in series with MOSFET switch to limit the inrush current? Or should I use a special chips, like chips for limiting current or chips for slew rate control?
Note: all devices are powered from 3.3V. So a small drop on 5V rail should not be a problem if it does not prevent an LDO to output stable 3.3V.
AI: Use an RC circuit in the MOSFET gate to slow down the turn-on.
One of the FTDI app notes has this example of a soft-start circuit on USB Vbus:
|
H: Is a loginway PIC-01 development board enough to program a PIC?
I have a loginway PIC-01 Development board (it was sat in a cupboard for years).
Does this board require additional adaptor hardware to blow a PIC (ICSP stuff etc), or can the on board serial port be used to do that?
AI: Yes, it requires additional hardware to program a new PIC (as indicated in the manual). PICkit is one such with good features for the price, including debugging, serial communication and logging. Once you have a way to program your PIC, it can communicate through the serial port; this could be used to implement a bootloader in self programming capable chips, the way boards like Arduino work. Your Loginway PIC-01 is a pretty good host board to build on, and certainly more featureful than the host board in the PICkit bundle.
|
H: Microcontrollers: Can I perform floating point operations in a Microblaze controller?
I wonder if I could perform floating point operations in a Microblaze controller?
Thank you to all posible answers with direct references to documentation or articles.
AI: Floating-point operations are available, see this document. Try the Xilinx forums for support.
That document, in the FPU section on page 78, says that the processor supports:
The FPU implements the following floating point operations:
• addition, fadd
• subtraction, fsub
• multiplication, fmul
• division, fdiv
• square root, fsqrt (available if C_USE_FPU = 2)
Comparison
• compare less-than, fcmp.lt
• compare equal, fcmp.eq
• compare less-or-equal, fcmp.le
• compare greater-than, fcmp.gt
• compare not-equal, fcmp.ne
• compare greater-or-equal, fcmp.ge
• compare unordered, fcmp.un (used for NaN)
Conversion
The FPU implements the following conversions (available if C_USE_FPU = 2):
• convert from signed integer to floating point, flt
• convert from floating point to signed integer, fint
|
H: Combining and Charging multiple Lithium Ion Battery Cells (3.6 V or 3.7 Volts)
1] Voltage: 3.6V or 3.7V
Are all 18650 lithium ion battery cells 3.6 or 3.7 voltsor or are there different voltage Lithium Ion cells in the market as well?
2] Possible Voltage Shortage?
Do all 3.6/3.7V li ions work the same standard way with a + a - and a T or do they really differ? What does the T stand for? Temperature sensor?
3] Physics Voltage Reason
Whats the reason for the 3.6/3.7 Volts per Li Ion Cell? I never saw a 3.0V or 5 Volts... Curious...
4] Parallel Charging of many Li Ion Cells
I was thinking of putting two or four of those Panasonic/Sanyo 18650 Li Ion cells in parallel, soldering together from the instant the are new, that way giving me lots of mAhs. Can I use the same Li Ion charger that was made for charging just 1 cell, and let it be in the charger for longer time?
5] Charging Wiring... How?
I found a nice small cheap charger about 30~40$ called Turnigy Accucel-6 (there is also an Accucel-8 for double price and double weight). Could I attach the + to + of all the cells and the - to all the - poles of the cells without needing any extra in-between-wiring?
AI: 1] VOLTAGE: 3.6V or 3.7V - 18650 Li Ion Batteries
All single cell lithium ion batteries are going to be 3.6-3.7v. There are applications where multiple cells will be tied together in series. This will result in voltages that are multiples of 3.6-3.7v. So as long as you match the number of cells and approximate mAH you should be fine.
2] Possible Voltage Shortage?
The voltages and battery life responses for all batteries are going to have slight difference. For the most part this won't matter. Most projects that use batteries are not terribly voltage dependent. They will either boost or regulate their voltage to get the voltage they want out, or they will be able to run at a wide range.
As a note, "Shortage" in this context usually means you are creating a short across your battery. Might want to be careful with that terminology.
3] Fundamental Reason for this Voltage Range
I am not an expert on this, but I know it deals with the chemistry of the battery itself.
4] Parallel Cell Charging - One BIG Li-Ion Battery Pack
This can be done. There are some issues that can come up when doing it. This might be worthy of a question by itself. If you do ask, might want to ask if the same can be done for packs in series.
5] Charging... How?
Same as previous answer.
|
H: Using a 4-pin computer fan controller without the load
Is it OK if I use the controller from a CPU fan without connecting the motor's coils?
All I want is to use the Hall effect sensor.
The datasheet is posted here, the driving output circuit uses a darlington pair.
AI: I don't see from datasheet how to use hall sensor separately, but noone should die or explode if you would not connect the load (in the worst case you may connect some resistor as a tiny load).
|
H: Logic Level Converter, Arduino and Cellphone
I am trying to interface a 6150 Nokia cellphone with an Arduino Duemilanove board, as some have already done through the FBUS protocol (see here for example).
The FBUS protocol uses 2.8V logic, so I bought Sparkfun's logic level converter to interface with the 5V from the Arduino, right ?
They say:
The level converter is very easy to
use. The board needs to be powered
from the two voltages sources (high
voltage and low voltage) that your
system is using. High voltage (5V for
example) to the 'HV' pin, low voltage
(2.8V for example) to 'LV', and ground
from the system to the 'GND' pin.
Thus
HV <-> Arduino 5V
GND <-> Arduino GND
LV <-> ??
GND <-> ??
TXI <-> Phone TX (Low Voltage)
RXO <-> Phone RX (Low Voltage)
TXO <-> Arduino RX (High Voltage)
RXI <-> Arduino TX (High Voltage)
The problem I have is with the low voltage source: there is no power output on the phone.
Can I power the converter LV/GND from another 2.8V source ? Would it be ok with the Arduino 3.3V source ?
AI: That website has a photo which shows "2-GND". This is the ground that you want to connect to the ground that you have for everything else.
As far as the 2.8v source, you can use any source you want. The voltage is just used to reference the serial signal against. If you tie it to the 3.3V it will probably work. I am not sure of the specifics of that voltage shifter, but I assume it will treat 2.8v on the signal line as being a logic high when comparing to 3.3v.
|
H: How to remove "glue block" from PCB?
I have a mysterious component covered with yellow "glue" or something. It has very hard surface, but it seems its been poured into the plastic "cage". The shiny cover on the top is some kind of paper, I can rip it off.
Any idea how to remove this goo from the PCB? (Without damaging the components underneath)
AI: That's a potted circuit. The shiny paper on top likely forms some sort of EMI shield to reduce interference it may cause or receive.
Potting is usually an epoxy, which usually cannot be removed either chemically (dissolution) or thermally (melting it), so you are left with mechanical (chip away at it). Some are soft, and while they stick fairly well, with a bit of time can be removed. If it's a hard variant, it may well be impossible, and if you really want to figure out what's under there, using an X-ray inspection machine would be a good idea.
Some rare epoxies are susceptible to attack by extremely aggressive organic solvents (dichloromethane, xylene, etc.), but you may well destroy the board in attempt to remove it. If you have access to some chemicals and can chip off small samples of the epoxy, you could give it a whirl.
|
H: Impedance across AC circuit
Problem:
An impedance 1000(1 + i) Ohms (and note it contains an imaginary
part) is connected across an AC voltage source of amplitude 10 V
and frequency 60 Hz. What's the power dissipated during one cycle
within the impedance?
Relevant equations:
P = Re(V*I), where V* is complex conjugate of voltage
I=V/Z
Solution Attempt:
So it's alternating current, so I first take the RMS V: 10/\sqrt{2}. Then I = V/Z, so I get
V*I = V*V/Z = 100/2 1/(1000(1+i)) = (1-i)/(20*2). Then I take the real part of this, which is 1/40. Am I doing this right?
Thanks!
AI: I assume:
"source amplitude" means "peak" (as apposed to peak to peak)
The load impedance is actually calculated at 60Hz
Ztotal = 1000 + 1000j (really should be using j as sqrt(-1) not i in electronics)
Ztotal = 1414.21 @ 45deg (just rewritten in a magnitude / phase representation)
|Ztotal| = 1414.21 Ohms
Vrms = 10/sqrt(2) ~= 7.07 Vrms
|I| = |Vrms| / |Ztotal| = 7.07 / 1414.21
|I| ~= 5mA
P(true power) = I^2 * R = (5mA)^2 * 1000 = 25 mW (this is what is dissipated in the load, your answer)
Q(reactive power) = I^2 * X = (5mA)^2 * 1000 = 25 mVAR (this is power bouncing back and forth, not dissipated)
S(apparent power) = I^2 * Z = (5mA)^2 * 1414.21 = 35.35 mVA (this is the vector sum of the true and reactive power)
Power Factor = P/S = True Power / Apparent Power = 25mW / 35mVA = 0.714
Hopefully I didn't flub up the math there, my calculators batteries just died so i did it all in google.
|
H: What to consider when choosing batteries for a project?
How do you choose what batteries to use for your projects? Are there a set of criteria that they need to be able to do in order for you to consider them? If so what are they?. The only 2 that come to mind are size and capacity. So do I need a PP3 or could I use 6 AAs? Then capacity AAs are better as they have better capacity.
AI: Generally, this is how I pick batteries:
Create a Power Budget
This should be the voltage, (average) current, and duty cycle required for each component of your system. For example, if you have a mobile robot that will be driving and processing, you could say 12 Volts, 1 Amp, 80% use for the motors and 5 Volts, 200 milliamp, 100% for the processor. These numbers don't have to be exact, just in the ballpark of what you think that you will need.
Once you have a list of your power draws, figure out what the total energy each component will use. Find this by multiplying Voltage * Current * Duty, then units will be Watt-Hours.
For the components not at battery voltage (behind a regulator), factor in the energy lost from converting voltages. Depending on your DC-DC converter, this can be anywhere from 5% - 80% loss (moral of the story, use switching regulators, not linear).
At this point, I usually fudge a bit and add a 20% margin of error to my average power use. I then figure out how long I want the system to run on average. Multiply your average current at battery voltage by the amount of time that you want the system to run. You can then compare this number to the Amp-Hours available on the batteries that you are looking at
Remember to oversize your batteries a bit, as the Amp-Hour rating is determined by C/20 in most cases. C being the rated current (a 3.3Ah pack has a C of 3.3 Amps, but tested at 165 milliamp). Picking batteries is not an exact science in most cases, and it may take a few tries to get right.
Choosing Battery Chemistry
As far as picking chemistry, it depends on the project. Weight, size, and cost factor in heavily along with the run time for your system load.
A few questions to ask about your need:
Budget
Size and Weight Constraints
Project Lifespan (Charge cycles)
Charger cost, maintenance
A few choices:
Lead Acid, high cycle count, very reliable, easy to charge, yet they are large and heavy for the capacity.
NiMH and NiCd, go-to hobby batteries, average size and energy density
LiIon and LiPo, super-light, more expensive, high energy density, can be unstable if treated improperly. Good for high-current discharge (20*C and higher).
LiFePo, high cycle count, about the same energy density as LiPo.
Brief Example
The attached example is for an autonomous lawnmower project that I worked on. We began by listing all of the components required at each voltage. In the end, we choose to run two different battery stacks to help eliminate some of the noise from the high-current devices.
The 12V battery stack also provided power for the 5V electronics, which we ran through a 80% efficient DC-DC converter. You can see the additional 20% factor in the spreadsheet.
In the end, budget was the main constraint, with size and weight not constraints for the project (300 pound lawnmower, what's a couple batteries?). We ended up using a 64Ah 24V lead-acid stack and a 17Ah 12V stack. Our run times reflected what is in the sheet.
In practice, the 24 Volt battery stack lasted much longer, as we used current figures that were close to worst case (100% full speed forward and cutters in thick grass). As a result, on the next iteration, we combined the 24V and 12V stacks together.
|
H: What Ways to Calibrate a Multimeter?
How can one calibrate a multimeter, like a UT61E or any other multimeter in the 50 ~200 $ pricemark, when one does NOT have an expensive FLUKE nor a friend who has a FLUKE)
AI: Very generally and at the most basic, you need a precision voltage reference and resistors. Obtaining 0.1% is fairly easy, for resistors it's straightforward, and for voltage references look up "precision voltage reference" (something like this), and bias it with 0.1 to 1 mA.
The actual calibration procedure will vary from meter to meter, so you will need to dig up the appropriate documents.
|
H: Transmitting NTSC over digital link
I'm interested in capturing analog video in NTSC and transmitting it as efficiently as possible over a digital link, preferably while maintaining as much fidelity to the original signal as possible. My thought was that the video signal might be able to be sampled with a high-speed ADC, the samples transmitted, and the signal reconstructed at the other end with a DAC. Is this possible? If there's a better way of doing this, by all means share!
AI: Yes it is possible 100%. A little inefficient due to blanking intervals but 100% possible.
You should get some 50-100Mhz+ 8-12bit ADC + DAC on other side.
But transmitting 8x100Mhz signal might be a problem for long distance.
If you are really cool you may encapsulate it into 1G Ethernet :-D
|
H: Can i use ATmega8L instead of ATmega8?
I am recently doing a project on robotics.And am following (societyofrobots) 50$ robot tutorial for that purpose.But i can't find ATmega8 chip anywhere as they told but i did found atmega8L instead.Now,is it possible to replace atmega8 by atmega8L though it has low capacity than atmega8?
AI: Atmeega8L guaranteed to work at 8Mhz at 2.7V, 16Mhz operation at 4.5V is not guaranteed (but in practice it works).
Atmega8 guaranteed to work at 16Mhz at 4.5V.
|
H: High torque servo/stepper setup
This is a bit of a general question. I have a project I want to put together similar to the 'sentry gun' projects seen on youtube. I've gathered an SSC-32 servo controller and couple of small servos - i think they're around 76oz-in - and I made a little brace so they are attached at right angles. This basically works as a pan-n-tilt mechanism, and I've plugged the controller board into my serial port, and it all works nicely. The problem is that it's a bit too dainty.
I need way more muscle, and so my question is in several parts.
Where is a good place to get hefty servos for a good price? I need something that can easily swing a 2x4 around (around 2')
Can someone point me at a tutorial for hooking this up? I assume the SSC-32 board and it's 4 AAs won't cut it as I'll need more power for those bigger servos. So How do I control the servos with the board but power them separately?
Would there be an advantage to using stepper motors instead? Like, more torque/$? I've never dealt with steppers, but I heard they were similar.
Thanks for any advice!
AI: The Dynamixel servos are quite popular for their precision, high torque, and nice controls. Unfortunately, you'll be paying for all those features. I recommend Trossen Robotics: Dynamixel servos
Trossen also sells a full pan/tilt setup for the Dynamixel servos: Trossen Robotics pan/tilt
They have a whole range of sizes and torques. ServoCity.com also sells some pan/tilt setups: ServoCity pan/tilt
Trossen provides a nice controller and software. I believe Pololu.com also sells servo controllers with information.
Servos will be much easier to interface with, while a stepper motor will provide greater angular resolution. How precise does your pointing need to be? The nicer Dynamixel servos will do steps of 0.3 degrees, while a stepper motor will get you much smaller incremets if you do the "micro stepping" method. Try looking at Sparkfun for a stepper/stepper driver: Sparkfun.com
PS. When you're done with your project, how about adding it to RobotBox :)
|
H: MCU choice, 3 Mbps UART
I am about to develop a portable device to be interfaced with a computer (so, consumer electronics). I only have experiences with Microchip and Texas Instruments and I would like to have some hint to choose the right MCU.
Key requirements should be:
low power (it's a portable device);
16 bit;
RAM>10 kB;
Hardware multiplier;
large program memory (128 kB), and;
available in development kit form or something.
Is there any with the possibility of interfacing a on-chip Flash memory (such as the ones in USB keys)? Otherwise, I'll just use an SD card.
Very important, is there any chance I could find one with 3 Mbps (3250000 bps) UART? I need to interface with a Bluetooth module for high speed communication.
What kind of MCU do you think would be a nice compromise?
AI: Take a look at the Atmel SAM3S. It is not a 16 bit device but I'm not sure why that is a key requirement. I'm also not sure what "low" power means to you. This will be in direct conflict with the requirement for the fast baud rate. To hit the 3.25 MBps you have to run this part at 52 MHz (It runs at 64 MHz max). Another nice feature it has is DMA to help move the high speed serial data. It also meets your memory requirements.
|
H: How to calculate necessary resistance to dim some LEDs?
Here's some nice LED's packaged in strips which can be cut apart and used for projects. Voltage is up to 12 volts, and many people are using 3S 11.1 lipo cells to power them.
Some people comment that they are too bright, or that different colors (e.g. red and green) do not match in intensity.
Can I solder a resistor in series to reduce the current flow to match the brighness? Will that improve the battery life? If I get a dial resistor, can I dial in the desired brightness and then measure the amperage flowing through the circuit to determine the needed resistance?
http://hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=8941
(source: hobbyking.com)
AI: LED brightness varies linearly with the (average) current. If you double the resistor, that will roughly halve the brightness assuming the supply voltage is much greater than the LED voltage, if they are closer, the effect will be more significant.
A more efficient method (but complex, and likely impossible to do in an existing circuit) would be to switch the LEDs on and off, adjusting the duty cycle to adjust the average current.
Matching different LEDs in brightness will require good knowledge of the specifications and a good source that will provide the type and grade specified, not just "a bright green LED". The candela rating is weighted by the eye sensitivity, so making them match should make them appear equal at 0 degrees. Slightly different viewing angles can make the LEDs look very different as your viewer goes off-axis.
Example:
Matching a green 30 mA, 500 mcd, 3.5 Vf LED and a red, 15 mA, 3000 mcd, 1.8 Vf LED running on a 9 V source with a straight resistor ballast.
The desired current through the red LED needs to be reduced to match the green, so it should be by a factor of 500 mcd/3000 mcd = 1/6, 15 mA * 1/6 = 2.5 mA. The red ballast resistor should be (9 V (supply) - 1.8 V (red LED Vf))/2.5 mA = 2880 Ω, and the green resistor should be (9 V (supply) - 3.5 V (green LED Vf))/30 mA = 183 Ω
This assumes Vf will not change drastically with If (should be reasonably constant in a 3-30 mA range, but consult graphs in datasheet), the viewing angles are identical, and as mentioned before, that the current is proportional to the intensity (almost always is down to sub-milliamp values, but check datasheet)
|
H: Detect PWM Duty Cycle in Hardware
How would I go about detecting at motor controller level, that my PWM signal coming from my microcontroller is at 50% duty cycle. I would like to design a dead band into my motor controller so that I only have a single PWM signal coming from my uC instead of PWM, CCW, CW signals to free up ports.
AI: I'm assuming you only want to use the PWM to determine CW/CCW direction. If you also want to control motor speed then there's no simple solution.
You could filter a DC voltage from the PWM signal using a low-pass filter. Use a comparator to compare with 45% of \$V_{PWM}\$ (indicates 45% duty cycle). If it's lower run CW. Use a second comparator to compare with 55% of \$V_{PWM}\$. If it's higher run CCW. The dead zone between 45% and 55% ensures that it doesn't switch continuously between CW and CCW around 50% duty cycle. The dead zone means you don't need the Schmitt-trigger, which is normally used for this protection.
|
H: How to ground a floating ADC input
I have an ADC input that may be connected to an external sensor (based on how the user configures it). If I leave the input floating, I get a wide range of ADC values.
Is there a way to weakly ground this input to get a stable reading if nothing is connected?
AI: Try using a pull down resistor. 1M might be suitable, try out different values. Higher values may tend to not completely ground your ADC input. Lower values may cause a too heavy load on your sensor.
|
H: Where would one find thermal heat sink cases?
I am looking for a case that would work well as a heat sink. Thinking that something like a car amplifier case? Anyone know where one could find cases like this? Would be using it to house H-Bridges and fill it with thermal conductive epoxy to water proof it....
AI: One of these extruded aluminium ones?
|
H: Bluetooth newbie
I am building some amauter schemes with Atmel uC. And this time I want to implement bluetooth functionality in my device: I want to be able to connect to device from computer and set parameter/get some readings.
1) While writing communication software on PC side is trivial, I am puzzled on uC side.
What is the easiest way of doing so? Which BT chip is the most simple/wide-spread/easy to use/not deadly expensive in 1-10 quantity (<10$)?
I don't need high speed, even 4800 baud would do at this stage :-)
2) How complex to go further and implement keyboard/mouse/other BT protocols?
AI: your quickest way to communicating would be to use a BT module such as those from bluegiga or a7eng or a host of others. They typically show up (expose "profiles" in BT speak) as bluetooth serial ports to the BT world and give you a standard UART interface. These modules use the RFCOMM BT profile.
You may be able to find some with HID (mouse, kb), HSP, HFP (headset, handsfree) or other profiles, but they will be much rarer.
If you want to do more than RFCOMM you may end up having to buy/write a full HCI stack. I am not aware of any that will fit in the small Atmel uCs. btstack is a free (for non-commercial) stack that was designed for embedded systems. I have personally used it in ARM7TDMI based microcontrollers.
My advice is that unless you're willing to spend a LOT of time with it, stick with the simple RFCOMM-based BT modules. You'll save yourself a LOT of time and anguish. BT is not a simple thing to jump in to.
|
H: What is the file extension of the file that is loaded in a Xilinx FPGA?
I wonder what is the file extension that described the functionality of my design and is the file that is loaded in a Virtex 4 FPGA to get the behavior of my VHDL design.
Thank you.
AI: This file is commonly called a "bitstream". Xilinx devices' bitstreams have the extension '.bit' and are generated by a program called 'bitgen'. '.bit' files are binaries and those are generated by default; if you want the ASCII representation of the bitstream, run
bitgen -b <your design>.ncd
and then a '.rbt' file will be generated in addition to the '.bit' file.
For further information about generating Xilinx bistreams, see Chapter 15 in this user guide for ISE version 12.4:
http://www.xilinx.com/support/documentation/sw_manuals/xilinx12_4/devref.pdf
For more information about Virtex 4 bistreams specifically, see the configuration guide for that device:
http://www.xilinx.com/support/documentation/user_guides/ug071.pdf
|
H: Microcontrollers: Can I perform floating point operations in a Picoblaze controller?
I wonder if I could perform floating point operations in a Picoblaze controller? Thank you to all posible answers with direct references to documentation or articles.
AI: Unfortunately, I do not think that the Picoblaze has hardware support for floating-point. If it does, you can do it in hardware. Otherwise, you will need to do it in software emulation mode.
Since I noticed that you asked the same question for both the Picoblaze and the Microblaze, maybe you need to ask yourself why you need to do floating-point operations.
In many cases, there are alternatives to floating-point operations. Fixed-point operations are a common alternative to floating point. You will need to study your algorithms to determine if it is possible to represent the values in a fixed-point math alternative to floating-point math.
For example, if you use an 4-bit fixed-point width, you can represent values in quantums of 0.125 between -1.0 to 0.875 with fixed-point representation. Larger values can be scalar multiples of these values.
Edit: Article explaining float-to-fixed-point conversion.
|
H: Inexpensive switching regulator with internal inductor & diode
I'm trying to minimize part count and cost of my project. It needs to have a 6V power rail with about 1.5A peak current from a 12V input. I'm shying away from a linear regulator because of the power dissipation but I would like to keep cost and part count down.
Do switching regulators exist with internal diode and inductor to match these parameters or would it be less expensive to have a linear regulator with a big heatsink?
AI: lowest cost, lowest part count. Pick one.
There are many ready-made SMPS modules - some even have the same footprint as 78xx regulators. A seach for Integrated switching regulators will find some of them.
|
H: Selecting a platform for DSP
I have experience with selecting low end PICs, but haven't had to select a controller for DSP before. Initially I thought about the dsPIC line, but the only reason for this because I am comfortable with the microchip line.
So, what options do I have to select from? How can I decide what is best for me? Are there in general differences between lines? Example, the MSP430 line is good for very low power, are there any similar type of things for the DSP lines?
For my specific project I am going to have 3 sets of SPI from ADCs that are 24bit at about 400KHz, but I am find with broad description on how to find the proper platform.
AI: If I was asked to look at DSP products, I would look at the architecture. The hardware architectures for DSP processors are more varied than for general purpose processors.
Word Length. As you mentioned, your source data is 24-bits. So, unless you are able to lose some fidelity, you will need a DSP that can handle 24-bits data at least.
Fixed/Floating Point. You will need to look at your algorithms to see if floating-point hardware is needed or if it can be entirely implemented in fixed-point. Not all DSPs can do floating-point in hardware.
Addressing Modes. You are dealing with buffers all the time. While DSPs have circular addressing modes, some have more advanced modes that are able to chain memory blocks together or flip memory blocks in hardware and more. I would say that this is the most critical architecture aspect for a DSP.
Special Instructions. Every DSP has specialised instructions. At the minimum, they will have a MAC instruction. However, some have far more esoteric ones which may benefit your application.
Data Paths. Some DSPs have unique data paths, or even multiple datapaths, which allow different data streams to be manipulated separately or combined together, in hardware.
Execution Units. Most DSPs have many parallel execution units that can perform different things at the same time - e.g. multiply, add and shift different registers at the same time.
Then, looking at the algorithms that need to be coded, I would select a DSP architecture that is easier to use to implement the algorithms.
|
H: How do I model an LED with SPICE?
What diode modifiers are used in practice to model LEDs with SPICE (Berkeley v.3f5)? These are available to me:
# Name Parameter Units Default Example Area
1 IS Saturation current A 1e-14 1e-14 *
2 RS Ohmic resistance Ω 0 10 *
3 N Emission coefficient - 1 1.0
4 TT Transit-time s 0 0.1ns
5 CJO Zero-bias junction capacitance F 0 2pF *
6 VJ Junction potential V 1 0.6
7 M Grading coefficient - 0.5 0.5
8 EG Activation energy eV 1.11 1.11 Si
0.69 Sbd
0.67 Ge
9 XTI Saturation-current temperature exponent 3.0 3.0 jn
2.0 Sbd
10 KF Flicker noise coefficient - 0
11 AF Flicker noise exponent - 1
12 FC Coeff. for for.-bias dep. cap. formula 0.5
13 BV Reverse breakdown voltage V ∞ 40.0
14 IBV Current at breakdown voltage A 1.0e-3
15 TNOM Parameter measurement temp. °C 27 50
3.4.2 Diode Model (D)
The dc characteristics of the diode are determined by the parameters IS and N. An ohmic resistance, RS, is included. Charge storage effects are modeled by a transit time, TT, and a nonlinear depletion layer capacitance which is determined by the parameters CJO, VJ, and M. The temperature dependence of the saturation current is defined by the parameters EG, the energy and XTI, the saturation current temperature exponent. The nominal temperature at which these parameters were measured is TNOM, which defaults to the circuit-wide value specified on the .OPTIONS control line. Reverse breakdown is modeled by an exponential increase in the reverse diode current and is determined by the parameters BV and IBV (both of which are positive numbers).
For example, using this basic, cheap red:
I don't care much about high-frequency characteristics -- just would like to be able to match it's IV-curve within its operating specs (-10uA/-5V leakage to +100mA/+2.2'ishV forward):
AI: As you stated, there are 3 parameters that dictate the DC response of a diode. Those are the saturation current (IS), the emission coefficient (N), and the ohmic resistance (RS). I was able to fit the curve with a fairly high accuracy, so I'll document my model procedure.
The SPICE model for the diode closely matches the Schokley diode equation:
If = IS(e^(Vf/(N*Vt)) - 1)
where Vt = kT/q = 26mV at room temperature.
Get actual values from the graphs provided in the datasheet to use for comparison. The more points the better, and the more accurate the better. Below is a table that I estimated from the figure you provided:
Vf If (mA)
1.3 0.001
1.4 0.010
1.5 0.080
1.6 0.700
1.7 5.000
1.8 20.000
1.9 40.000
2.0 65.000
2.1 80.000
Plug the values into Excel, and change the y-axis to a log scale. You should get a graph that looks identical to the original graph from the datasheet. Add another column for your graph, with If calculated from the forward voltage and the constants IS and N. We can use this configuration to iteratively find IS and N.
Solve for IS and N. We are trying to match the linear part of the graph (1.3 <= Vf <= 1.7). Adjusting IS will move the curve in the y-axis. Get the calculated graph to the same order of magnitude. The next step is to find the emission coefficient (N). N affects both the amplitude and the slope, so some adjustment of IS may be necessary to keep the curve in the same ballpark. Once the slopes match (the lines are parallel), trim IS so that the calculated data matches the datasheet values. I got IS = 1e-18, and N=1.8 for the diode you listed.
Identify RS. This is a bit tricky. RS is responsible for the curving of the current from 1.7V and above. Consider modeling the ohmic resistance as a resistor in series with the diode. As the current through the diode increases, the voltage drop across the ohmic resistance causes the forward diode voltage Vf to increase slower. At small currents, this effect is negligible.
The first thing to do is to get a ballpark estimate of RS to use in the more accurate solutions. You can calculate the effective value of RS from the datasheet values by back-calculating for Vf using the measured If. The voltage difference between the input value and the calculated Vf can be used with the forward current to generate a resistance. At the higher currents, this will be a good starting value.
To plot the diode current using RS, you need to first calculate the diode Vf given a voltage for the resistor-diode series combination. Wikipedia lists an iterative function - it converges easily if the resistor voltage drop is significant. This function was easy enough to set up in Excel. For Vf values below 1.8, I hard-coded the input value because the iterative function did not converge. Then take this Vf value to calculate the If of the ideal diode. I plotted this with the original datasheet graph.
Using trial and error, you should be able to get a RS value that gets pretty good overlap with the datasheet values. All that's left is to throw the model together in SPICE to verify your work.
Below is my diode model that I verified using HSPICE. The simulation data is almost a perfect overlay for the datasheet graph.
.model Dled_test D (IS=1a RS=3.3 N=1.8)
I used this article, which helped a lot with the diode spice parameters.
I cleaned up my spreadsheet, and tyblu has made it available for download here. Use at your own risk, results not guaranteed, etc... etc...
|
H: Inductor vs a capacitor
I'm a Trainee electrician and pc hardware enthusiast. I was just wondering why a mixture of inductors and capacitors are used on motherboards? Why not just use capacitor? I thought the inductor stores electrical charge but it uses magnetism. What's so special about storing it as magnetism?
AI: To answer this properly, you should know the properties of a capacitor and an inductor.
Inductors are one of the primary components required by a switching regulator. A capacitor and an inductor are similar in the way that a capacitor resists a change of a voltage and an inductor resists a change in current. The "strength" of their resistance depends on their value
Capacitors are widely used to clean up a power supply line, i.e. remove noise or ripple at (higher) frequencies. Inductors are used in switching power supplies where a relatively constant current is passed through an inductor.
A switching power supply works in that a switch is opened and closed very quickly. When the switch is closed, the inductor is 'charged'. When the switch is open, the energy is drawn from the inductor into the load. Usually such a power supply is being decoupled with a capacitor to create a stable power supply line.
An inductor is required to make this principle work. If you know a resistor that has an equal resistance for all frequencies of signal, you should view a capacitor as a resistor that will be infinite for DC (0Hz) and 0 for high frequencies. An inductor will be the opposite: it's resistance will be 0 at 0Hz, and infinite at high frequencies. However we don't call this resistance (that's only used for a pure resistor!) but impedance.
A PC motherboard or graphics card is basically not much else than this. They have their main chips and the routing between them, and most other components are power supply or a little bit of interfacing between chips or connectors.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.