text stringlengths 83 79.5k |
|---|
H: What is Power Supply Rejection Ratio and how does a high PSRR help me?
A lot of regulator datasheets give a figure of Power Supply Rejection Ration in decibals. I understand that a high PSRR is good, but how and where does it help me?
For instance, suppose I have a regulated wall-wart power supply that outputs 5V but with about 20 mV noise imposed upon it - let's further assume that the noise is most significant at around 50 kHz.
Would a regulator with 90 db PSRR from 20kHz to 1MHz help me reject that noise?
Let's further assume that I'm measuring voltage with an Instrumenation Amp + ADC (i.e. the In. Amp is driving the ADC). Would a high PSRR generally help me? (I know it probably depends upon a lot of factors but I'm talking about the general situation).
AI: The ideal regulator keeps the output voltage constant as long as:
The input voltage is within the valid range specified for the device,
and the output current draw is within the allowable range.
Of course no regulator is perfect. For voltage regulators, there are two main specs that tell you how much the output voltage varies as a result of operating conditions. Power supply rejection is actually a unusual term applied to voltage regulators. This term makes more sense for a part with some analog output, like a opamp. However, a voltage regulator can be viewed that way so it's not wrong. More commonly though you'd see the term input rejection ratio for voltage regulators.
In any case, this is telling you how much variations on the input of the regulator get onto the output. Ideally none of them would, but in the real world some fraction of input voltage variation is going to appear on the output voltage. Let's say that the input voltage has 1 Vpp ripple on it. If the resulting output voltage has 1 mVpp ripple on it, then the gain from input to output is 1/1000, and the rejection ratio is 1000.
This rejection ratio is often expessed in dB. Keep in mind that dB expresses a ratio of powers, and that power is proportional to the square of the voltage. A dB is 10Log10(power ratio), which is 10Log10((voltage ratio)²), which is more easily expressed as 20Log10(voltage ratio). Therefore, the 1000:1 rejection ratio from the example above could be expressed as 60 dB.
I mentioned there are two main specs used to describe the dynamic performance of a voltage regulator. So far we have talked about the input rejection ratio, which is what you asked about. Sooner or later you'll bump in to some kind of output rejection spec, although that can have different names. This is a measure of how much the output voltage changes for changes in the output current. If you work out the units, you will see this is in Ohms, although it is often not expressed as such explicitly. You can think of this as the resistance in series with the output of a regulator that does not vary its output at all as a function of current. |
H: Safe to connect SDR to home Cable?
I have an SDR (RTL2832u) that connects to an antenna and can receive over the air just fine. I'm wondering if the signal of a home cable connection would be too strong to connect to the SDR input or is it safe?
Say for example my home cable modem transmit power is 35dBmv. Downstream power is showing around 10dbmv. Is this too much RF energy to feed into the SDR's antenna input?
EDIT:
My capture card uses the e4000 Elonics tuner. datasheet.
Thanks!
AI: 35 dBmV means "35 decibels stronger than 1 mV", or about 10^(35/20) = 56 mV RMS. 56 mV is a pretty small signal, so it's unlikely to damage any input that wouldn't be completely destroyed by the ESD of casual handling.
There is still the possibility (though unlikely) that the input signal may be too strong for the receiver and would cause clipping. This may make it hard to separate a weak signal of interest from harmonics of a stronger signal. If that happens, you could try placing an attenuator between the RTL2832u's input and the cable. |
H: boosting 3.7V to 12V
What would be the best way for me to boost 3.7V to 12V with 300ma max draw?
I've been looking at this: LT1303 and this MC34063A.
I actually bought an lt1303 last week but I couldn't get anymore than 20mA from it, if I try to draw more, the avg voltage goes down, ~10v at 70mA (hadn't got the chance to hook it up to a scope yet). It looks like the lt1303 limits current draw from my battery to about 200mA.
Now, after digging around digikey a bit, I found the other part, MC34063A and it looks like it can do better. I say that only because it is has this "Current Output Rating" of 1.5A, and I don't completely understand what it means. Do you think I can at least get 100mA 12V from a 3.7V source if I use this and then just wire 3 in parallel so I can do 300mA. Thoughts?
Update: Here's a schematic that's close to what I have. just ignore the extra parts and replace L1 with a 15uH (also tried 30/45uH) and R4 with a 100K. It outputs ~13.6V with no load.
AI: The thing you need to consider before going further is the current draw from the source. At 12V and 300mA, assuming 90% efficiency, which is probably generous, you're looking at 1.08A draw. Depending on your battery, that may not work for you. That is probably why the LT1303 didn't do what you wanted. We need to know more about the battery to say for sure, and for good measure, please post your schematic.
And if you choose to go with the MCP34063A anyway, the 1.5A "Current Output Rating" is exactly what it says it is. The datasheet says output switch current up to 1.5A, your 300mA will be fine. You don't need to put these in parallel, you need a source that can source enough power. That IC looks pretty straight forward. Just make sure you go through the datasheet and do the math on the reactive components and make sure they are appropriately sized. |
H: What effect does switching frequency have on a switching booster circuit?
In what cases/application is a high switching frequency desired and vice-versa? I'm trying to choose a DC-DC booster IC and I don't quite know how the switching frequency will affect the circuit. Only thing I can think of now is the speed of the Schottky diode that goes after the inductor, but other than that, I don't know. Google isn't very helpful on this one (or maybe I 'm not use the right keywords) so any help is greatly appreciated.
AI: In general, in both boost and buck switching regulators, a higher switching frequency allows the use of physically smaller inductors and capacitors. However, a high switching frequency can also eat into the overall efficiency of the regulator, through switching losses both in the switch itself and in the gate-drive circuit.
Yes, the diode contributes something to switching losses, too, but that can be mitigated by using synchronous rectification; i.e., replacing the diode with another MOSFET. (But then, that MOSFET has gate-drive losses, too ... as you can see, optimizing one of these designs can involve a surprising number of tradeoffs.) |
H: Measuring Arduino internal voltage reference with respect to Vcc
How do I read the internal reference voltages of the Arduino (Ardino Mega, ATmega2560, specifically the 2.56v reference) with respect to the input voltage?
I'm trying to measure the remaining battery capacity of a device through a voltage divider. The Vcc going into the Arduino is also hooked up to the battery and thus varies as well. I've measured the internal 2.56v reference so I know approximately what it should be regardless of the varying Vcc voltage but I can't find any simple documentation on exactly how to measure that particular internal reference voltage with respect to the Vcc.
AI: You're trying to measure the battery voltage, but you need a stable reference point. This is precisely what you use the internal reference for.
Let's assume that your battery pack is a LiPo pack and has a nominal voltage of 3.7V and you want to shut things down when you get to 3.1V.
Now, the internal reference you have is 2.56V, so even at the cutoff point, 3.1V is too high. Let's chop this in half with the voltage divider you already have.
Now, the nominal voltage you'll see through the divider is 1.85V. Perfect! You can now use your internal reference for your ADC readings. In this case, 1.85V is what you'll see at the ADC for a battery voltage of 3.7V and 1.55V at the ADC is your cut off of 3.1V. |
H: Why is this MOSFET's "pullup" resistor necessary?
I'm reading an basic electronics textbook, the chapter on MOSFETs, and it has started with a simple model of the MOSFET as a switch (the "S model"). It shows a circuit like this:
And says: Here we see the purpose of the load resistor R -- it provides a logical 1 output when the MOSFET is off. Huh? Without that resistor (ie, replacing it with wire) the value at Vout would still be 1/high when the switch was off, because there is an open circuit between drain and source. So why does it need the resistor?
(This is on p.292 of Foundations of Analog and Digital Electronic Circuits, by Agarwal and Lang. I'm trying to follow the MIT open courseware, first course.)
AI: First with the FET switched on. The on-resistance of a FET can be very low, even as low as a few mΩs for high current ones, but let's take an average FET with a 1 Ω on-resistance, and a 10 kΩ pull-up resistor. Let's say \$V_S\$ = 5 V. The FET pulls the output level almost to ground; it forms a resistor divider with R, so that
\$ V_{OUT} = \dfrac{R_{DS(ON)}}{R + R_{DS(ON)}} V_S = \dfrac{1 \Omega}{10000 \Omega + 1 \Omega} 5 V = 0.5 mV \$
So with the FET on we have as good as zero.
Next with the FET off. Then there's no current through R, and since the voltage across R = R \$\times\$ current (Ohm's Law) the voltage is also zero. If \$V_S\$ is 5 V, and there's no voltage difference across R, then \$V_{OUT}\$ also must be 5 V.
Just like the FET isn't a perfect switch when closed it isn't a perfect switch when open either. There's a small leakage current, say up to 1 µA. That will cause (again due to Ohm) a voltage drop of 1 µA \$\times\$ 10 kΩ = 10 mV across the resistor, and the output will be 4.99 V instead of 5 V. The leakage current is the reason why you shouldn't choose R too high. If R would be 1 MΩ then the voltage drop would be 1 V and that may be too much.
So it works with the resistor. What if we omit it? With the FET on the output woill be drawn to ground, but with the FET off the output would be floating if our FET was a perfect switch, so it would be undefined. With the leakage current it might still pull the output low, if the input impedance of the load was very high. So the resistor is needed to define the level when the FET is off. |
H: Replacing MOSFET with tube
I am working on making a flyback driver with a 555 timer. The only part I need is a MOSFET power transistor. I am wondering is it possible to substitute a triode vaccum tube (14GT8) for the MOSFET?
AI: Please clarify whether you wish to use a MOSFET or a vacuum tube in the final design.
If you are looking at an older tube or an old circuit then the abbreviation 14GTB may have been used for a range of vacuum tubes.
G T B = Glass, tubular, version B (as opposed to GTA = version A)
so GTB on the end does not tell you a lot about the tube's functionality.
Do you have a circuit diagram?
Please provide more details.
MOSFET in place of a vacuum tube:
BUT, yes, if you want to use a MOSFET in place of a vacuum tube (in old equipment or using a very old circuit) and you want to drive it with a 555 to make a flyback driver you can do so, subject to getting a MOSFET that meets the circuit needs. The MOSFET would need a high enough voltage rating to survive the inductive peak on its drain during flyback, and it needs a high enough current rating to meet the circuit's design. You will need to use an N Channel MOSFET to get the polarity correct.
Vacuum tube in place of a MOSFET:
If you want to use a vacuum tube in place of a MOSFET it MAY be possible but will need good design knowledge as VT's are somewhat harder devices to drive. (Correct grid biases, limited current, higher voltages, heaters, ...).
Related:
Many vacuum tubes for sale here
Some GTB suffix tubes |
H: Possible to output sinusoidal signal with an Arduino?
Is there a way to output a sinusoidal wave with an arduino? Perhaps using PWM? It would be nice to be able to simulate something around 10kHz. Is this even possible with the hardware on the Uno?
AI: Look for DDS (Digital Direct Synthesis) which uses a low pass filter as mentioned in the other answers:
It then uses a varying PWM signal to create a sine wave:
All you need in order to implement it with an Arduino, including the source code for the PAM generator, can be found in this article. |
H: Keep SPI/TWI master active?
I'm designing a data recorder application which uses an 8-bit AVR microcontroller. It uses the TWI and SPI interfaces with the microcontroller being the master. There is one SPI device, a microSD card, and one TWI device, the MMA8452 accelerometer. The accelerometer is going to be sampled at 400~800 Hz, and I plan on storing relatively large amounts of data so there will be semi-frequent writes to the microSD card as the uC's memory gets filled.
My question is what is the recommended workflow for enabling/disabling the interfaces. Can I keep the SS for the SPI interface asserted low throughout my application, or should I only keep it active when I'm interfacing with the microSD card?
Also, can I keep the TWI/SPI master interfaces enabled, or should I enable them only when the interface is required?
ex. code (for TWI, similar for SPI):
// enable/disable during each operation
twi_master_enable(&TWIC);
// ... TWI-related operations
twi_master_disable(&TWIC);
Or, is this better:
// initialization/wake-up code
twi_master_enable(&TWIC);
// .. somewhere else in the code, perform TWI operations
// power-down/sleep code
twi_master_disable(&TWIC);
AI: You should keep them enabled.
SD cards require the /SS line to be toggled at certain times, to e.g. reset the SPI transfer to a known state, cut an otherwise longer transaction shorter, etc. So you cannot leave it always asserted, it needs to be controlled correctly.
You will run into problems with SD performance. It is hard to find exact specifications for all manufacterers, but most SD cards can go "out to lunch" for up to 250 ms while doing internal write cycles (which may include large erases, or sector remapping to balance load). You'll find that while writes to the card will initially return in a few tens or hundreds of microseconds, once in a while (maybe every 30 seconds or so, depends highly on the card) the card will take a few tens to hundreds of milliseconds to complete the write. This means you'll need the capability to buffer hundreds of accelerometer samples, so you'll have to be careful to ensure you have enough free SRAM in your AVR for that. Or, add external buffer storage. I've had great success with FRAM chips, due to the speed at which it can read and write single bytes. |
H: How long a lead may be used to connect a component to a circuit?
When out of town I'm thinking of using an LDR with a 555-relay driver to periodically toggle the lights in a few rooms at night, and a thermistor near an incandescent bulb to kill the circuit when the bulb is sufficiently warm/hot.
This will involve placing the LDR, and the thermistor at some distance from the board which will be near the switchboard; a length of 8-12 feet.
In the case of HF/VHF circuits a pair of leads this long are not advised. Are there similar restrictions applicable to a simple driver circuit too?
How long a lead may be used to connect a component to a circuit?
AI: As I understand it you want to use this as a presence simulator to keep burglars out, right?
The thermistor is not a good idea: the bulb will reach its steady temperature within a second or so, then it will only light very briefly. Better use a timer to switch the lights on for a certain (variable) time. You can use 555 timers to create switching events and on-times, but I would use a microcontroller for that; that will allow you to create any switching pattern, even replicate actual switching it recorded previously from real use (though you'll need extra hardware to detect switching events).
A wire length of 12 feet/3.5 m is not problematic. It may pick up some noise, but I don't think high accuracy is a requirement. The noise will be less if the impedance is lower. For instance you can use a 10 kΩ thermistor in series with a 10 kΩ resistor, or a 1 kΩ NTC in series with 1 kΩ, both will give you the same output. But the latter has an impedance of only 500 Ω and the former 5 kΩ. |
H: How to interface with ultra-low voltage microcontrollers?
Cypress has PSoCs which can operate at 0.5V power supply. I was wondering how you interface these. 0.5V is too low for FETs and bipolar transistors, LEDs and even common diodes. So what ways are here to connect the PSoC to its peripherals? Low-power is also an issue here: it doesn't help that the PSoC is low-power at 0.5V if the interfacing needs 10 times more power.
AI: The PSoC CPU does not actually run from 0.5v. Its minimum running voltage is 1.8v. However, the chip also contains a high efficiency boost regulator which works down to 0.5v and can boost that voltage up to the 1.8v that the PSoC requires. The boost converter can supply upto 50mA current, which can be used by the rest of the circuit. |
H: how to purchase simple custom devices with low quantities?
We have need for a few simple devices, mostly as adapters and connectors between other devices.
One example is:
6-pin Molex connector with 20-30V between two pins
24V to 12V DC-DC voltage converter
24V to 5V DC-DC voltage converter
2 x USB port (5V voltage output)
1 x simple DC power plug (12V voltage output)
I found suitable voltage converters as components: 24V to 5V, 24V to 12V
Now, my question is: how can I purchase this as an assembled device with a case? Is this prohibitively expensive for low volumes? I would need around 10 of these for testing, perhaps hunders or a couple thousand later, but nothing certain can be said about that. Should I attempt to find a simple sweat shop locally for the first 10, or can I buy them from China through some service? What are my options in general?
AI: I think the other answers are missing the mark. If I understand the question correctly, you're not interested in doing the engineering and prototyping/manufacturing yourself; you're looking for someone to do the design and prototyping for you and then help you transfer the design to a contract manufacturer if/when it goes into production.
That's what an engineering consultant is for (and that's what I do for a living). This person (or firm) will take your functional specification, which you've outlined very nicely, help you refine it, then find the right electrical and mechanical components to implement it, build and test the prototypes, and in the end, provide you with all of the documentation (schematics, bills of materials, assembly instructions, user manual, etc.) required to produce it in quantity.
There are some contract manufacturers who provide this sort of design-build service in-house, which means that they'll do both the engineering and the volume production for you, and you don't need to deal with two separate entities. The types of assemblies you're talking about would actually be a good fit for this model, since it doesn't sound like you need a lot of very specialized engineering knowledge for your adapters.
So, look for "contract manufacturers" in your area, and see which ones have in-house design services. There are frequent trade shows for these services all across the country, too, and this is a good way to see what's out there. "Design-2-Part" is one series of them I'm familiar with. |
H: detecting if an object is present using a sensor of some sort
Yesterday I when I came home I found my soldering iron was still switched on from few hours before. I have one of those big aluminium holders you get with expensive soldering stations. I was wondering if it's possible to mount a sensor where the red blob is in the picture.
Pseudo code
if object is there then
//start timer
else
//stop and reset timer
end if
if 1 minute has pass
//switch off
endif
Is that easy to do? I would need help selecting a solid state relay too and never wired one up. Preferably isolates line and neutral conductors like a British socket does.
AI: I would mount a microswitch like this one
under the iron, so that it rests on the long lever. There are microswitches in all kinds of flavors, but the long lever has the advantage that it doesn't need much force (read: weight) to activate. |
H: keep bathroom fan running for a few minutes after power off
What is the best way to keep the bathroom fan running after cutting the power to it? I assume a capacitor can be used, but which one should I use and how do I connect it?
AI: This module
uses the switch as input and replaces it in the circuit with a relay. After the switch is switched off the relay remains on for a programmable time between 0 and 10 minutes. |
H: Making a HDMI switch basic question
I am doing a hobby project and I found a place to get PCB HDMI jacks and I wanted to incorporate an HDMI switch into the board. My question, is there an IC that I can use as the "switch". It will be like a standard 5-1 switch. at the very least if someone could point me in the right direction.
AI: Use this Analog Devices part. It is "AD8191: 4:1 DVI/HDMI SWITCH WITH EQUALIZATION". Unfortunately they don't make more than a 4:1, so you will have to cascade them. More choices here.
However, I fear if you couldn't find these parts, you might be in over your head. As kenny pointed out, this isn't easy due to the data rates and edge speeds. Signal integrity and controlled-impedance PCB issues aren't something I would wish to deal with on a hobby project. |
H: What is a good way for the mcu to determine which hardware version it is running on?
I'm working on a new product design and there will probably be small or large hardware changes/fixes over the life of the product. For future firmware updates in the field I need a way to determine the hardware revision. What is a good strategy?
I'm currently pulling two spare pins up/down with external resistors and checking the pattern. This only allows for 4 hardware revisions, but that might be enough for practical purposes. It might become a problem if I need one or both of those pins in a future hardware revision.
I guess a more economical way might be to have a resistor divider connected to an ADC pin. Each hardware revision could have different value resistors. Unfortunately I don't have any spare ADCs in my current design.
I guess another way could be to encode the hardware version number in an EEPROM or the mcu flash during production? (We don't have that facility at the moment.)
I guess I'm looking for suggestions for a flexible and robust method.
[EDIT]
Re. suggestion from @trav1s: I don't have an address bus per se but I have an 24LCxx EEPROM on the I2C bus. The low 3 bits of the Slave Address is hardwired. I guess I could change the address bits and search for the EEPROM during startup.
AI: This is something I deal with on an ongoing basis. We have very complex hardware that's been in the field for almost 10 years, with different versions of various subsystems. Some of the subsystems have a 2-bit code, but as you mentioned, that's not always enough.
The EEPROM suggestion is a good one, but it requires programming the EEPROM and populating the board with the right version.
What I would suggest is an 8-bit parallel in-serial out shift register like a 74HC166. The version number can be set on the input by the PC board itself tying inputs HIGH or LOW and then you only need 3 pins to load and read the shift register from an MCU. |
H: How do you remove the buzzer from this PCB whose solder side is inaccessible?
(Click on an image to see in original size.)
There is this buzzer in this UPS (uninterruptible power source) circuit. I want to remove it from this circuit because it make a lot of unnecessary noisy. Black-outs happen too much in my area. Sometimes they happen in the deep night, when I am sleeping, and this little buzzer wakes me up by freaking me up. I always immediately realize it when there is a black-out, so this buzzer is really not needed.
I am not able to de-solder it. Because the PCB is strongly embedded into the case by some very hard clippers. It just won't move.
How do I remove this buzzer from the circuit, or shut it up without removing? I don't plan to re-use it, so it is OK if it is destroyed in the process. I just don't want to get into risk of damaging any other part of the PCB.
AI: You could quieten the buzzer by filling the hole in the top of the plastic.
If you pour in something rubbery (hot glue could be good) then it would almost certainly muffle the sound.
To remove it, I'd crack the plastic with some pliers removing enough to heat the legs with a soldering iron. |
H: PICAXE 8 Pin Proto Kit
I just soldered together the PICAXE 8 Pin Proto Kit, and I have a feeling there is one part missing.
Here are the images for the kit:
The part that I think is missing is the white component in the first picture and the blue component in the second image.
However, the list of components in the document that came with the kit says:
Contents:
PCB Protoboard PCB
R1 10k resistor
R2 22k resistor
C1 100nf polyester capacitor
H1 3pin header and jumper link
CT1 stereo download socket
BC Battery Clip
IC1 8 pin IC socket
The spot on the PCB corresponding to the missing component on the images is labeled "C1" to make things even more confusing.
(there is another place for "optional capacitor holes" where I soldered in the yellow 100nf capacitor, so I don't think the area labeled "C1" is for the capacitor)
Questions:
I would love to know what that part does (the white component in
the first image and blue in the second).
Is it necessary or not?
Is it supposed to be there as per the list of components?
AI: They are both plastic film capacitors - the 100nF which should be placed on C1.
If by "extra capacitor holes" you are referring to the + and - holes at the bottom right, they are likely to be for an optional electroltyic to provide some bulk capacitance for the power input.
It's quite common for parts to be substituted in these kits, so you maybe have a ceramic 100nF instead of the mentioned plastic film capacitor (they will both work fine)
If yours looks a bit like one of these it's a ceramic: |
H: Measuring Power from Altera Dev. Kit (CycloneIII)
The Altera CycloneIII starter kit that I have provides a jumper (J6) that is connected to VCCINT of the CycloneIII FPGA core for what seems to be the purpose of measuring the core's power consumption.
Here is the reference page for the kit: http://www.altera.com/products/devkits/altera/kit-cyc3-starter.html
What I had intended to do was to take measurements from this jumper with a scope (voltage across the jumper should be proportional to power) - but I'm afraid that the readings from this jumper may not be as straight-forward as I had originally anticipated.
More specifically - after looking at the pin-out for the CycloneIII FPGA, each "bank" in the FPGA has its own VCCINT. I'm curious as to how these relate to the VCCINT that is said to be tied to J6.
How representative will this reading be?
Any insights?
AI: VCCINT is indeed the power to the logic core of the chip. The "banks" refer to the I/O pads, which are divided into groups; each I/O bank can have a different supply voltage for compatibility with different kinds of external interfaces. Those bank VCC connections supply power only to the I/O pads, and have nothing to do with the core logic supply.
To measure the core supply current, you're going to want to remove the jumper and wire the two pins to a low-value shunt resistor. Use your scope in differential (A - B) mode to measure the voltage drop across this resistor, from which you can infer the current. You might be able to solder an SMT resistor directly to the pins of the jumper (on the solder side of the board); then, reinstalling the jumper will simply short it out when not needed for measurements. |
H: Proper use of a voltage regulator
I want to power a prototyping kit for an 8 pin picaxe micro-controller with a 9v battery (the board itself requires a 5v input).
I have the following regulator:
https://www.sparkfun.com/products/107
On the 3rd page of the data sheet says that for that 5v regulator, the min voltage is 7 and the max voltage is 25 (input).
data-sheet:
https://www.sparkfun.com/datasheets/Components/LM7805.pdf
However, in the comments section of the first link,a few people said that it is not a good idea to use this regulator to reliably drop voltage from 9v to 5v.
Questions:
What do you think? Does that voltage regulator fit my expectations?
What would happen if I find that 5v battery and connect the 5v battery to the voltage regulator? What voltage would it output?
Thanks so much!
AI: The regulator will work perfectly if you keep within the datasheet specs. If you supply it with less than 7V it will lose regulation.
Things to be aware of are that if you supply power with a 9V battery and try and draw too much current, the battery voltage will eventually sag below the 7V required (this is likely what was happening to the first commentor)
Also, the higher your input voltage, the more power is dissipated in the regulator so you may need a heatsink. There are many answers on here that go through all this. To tell you whether you would need one we would need to know how much current you are planning on drawing from it at what input voltage.
If it's 9V, then assuming a maximum ambient temperature of 50°C, a maximum operating temp of 125°C:
(125 - 50) / 19 = 3.95W maximum.
at 9V:
3.95W / (9V - 5V) = ~1A maximum
If it's just the microcontroller you are powering though, then it's almost certainly no problem. As we can see over an amp would be needed to needed to reach maximum operating temperature (even if reached, it's unlikely to break - it will just shut down) Your kit will probably only draw a few milliamps, maybe up to 100mA with all pins driving heavyish loads. |
H: Chip antenna on breadboard
Is it possible to experiment with chip antennas on a breadboard? Any circuits available to let me do that?
I am looking at this chip antenna, but any other is ok.
AI: There are a lot of problems with RF on breadboards. The main one is impedance matching. For maximum power to be radiated by the antenna (that's what you want) you need good impedance matching. Due to non-negligible capacitance on breadboard this would be very, very difficult to achieve. You can read more about impedance matching here
If you do want to try it on a breadboard, you should add a pi-filter (that's what they call a matching circuit in the datasheet) which can help you with the impedance matching I talked about above. You will probably want to use tunable components in said filter. However, without a spectrum analyzer or some other fancy RF equipment it will be difficult to tell when all of your power is being radiated rather than reflected.
My recommended solution is to not use a breadboard. It's surprisingly cheap and simple to make your own PCBs. For just experimenting with a chip antenna you would not need a complicated PCB so you could definitely do it on a 1-layer board. Read more about making a pcb yourself here |
H: Protoboard components being used for applications with high current
If I have a few pins of a relay (which is rated for the correct current) that will carry 5A when the relay is triggered, what's the best way to wire this up?
Details: I have a breadboard with a circuit on it, but a small loop in the circuit will carry 5A when the relay closes. I want the pins that trigger the relay to stay on the protoboard, but obviously the breadboard can't handle that kind of current. I'm wondering what's normally done in situations like this, and what the different options are.
Thanks!
AI: If you are using one of those white plastic protoboards that has various series of holes that are bussed together 6 or 10 at a time then I would accomodate the relay as follows.
Place the relay with pins facing up and solder on short wires to the low current pins that want to go into the protoboard. For the high current contact pins wire with heavier wire as appropriate (for 5A you may consider 16 to 20 AWG wire) that connect off to your load. I've tried to depict this in the picture below. |
H: How to implement and tune a LC band-stop filter?
I have designed a simple LC band stop filter with a center frequency of 433MHz. The schematic looks like:
The caps are NP0 0603 and the inductors are from the Coilcraft 0603HP series. The values shown don't give me a center frequency of exactly 433MHz but that's the best I could do with the values available. I figure that I'll need to tune the filter with a spectrum analyzer by substituting different values of capacitors to compensate for the parasitics.
Simulating the exact values yields something like this which isn't quite ideal:
My PCB layout looks like:
My assumption that I could simply tune this by substituting caps while looking at the response on the spectrum analyzer doesn't seem practical now. I was going to purchase several caps a tenth of a pF apart (ex: 4.5pF, 4.6pF, 4.7pF, 4.8pF, etc) from one another and simply substitute them in. However, I find that I have to buy a reel (and wait 14 weeks) to get the caps I want (0603). For instance, I can only get a 4pF, 4.7pF and a 5pF cap for the series element. Is this the way to tune the filter? If not, how else could it be done? What kind of response should I reasonably expect? Do you see anything wrong with my approach?
AI: One way to fine-tune a capacitor value is to remember that two capacitors in parallel has an equivalent capacitance equal to the sum of the two capacitors. Two capacitors in series has an effect like two resistors in parallel.
Since you're working with single-digit pF capacitors, the second rule is more likely to help you. For example, 4.7 pF in series with 220 pF gives 4.6 pF. 4.7 pF in series with 100 pF gives 4.49 pF, etc.
So if you can afford the space of an extra part in series with each of your capacitors, you can trim up the values by choosing the added series cap.
You can also do this in conjunction with Michael's suggestion of using an adjustable trimmer cap to use a trimmer that varies over a large range to produce just a fine tuning effect in your circuit.
Edit
A couple of pieces of advice that you didn't ask about:
Before finalizing this design, be sure to simulated it with part parasitics included. On the capacitor side, Kemet and Murata, for example, are very good about providing parasitic models of their parts. Coilcraft also provides good models for the part family you mentioned.
A little bit of parasitic resistance might actually help your design by broadening out the deepest notches, so making the performance at the target frequency less sensitive to part variation.
If parasitic resistance doesn't broaden out your notch enough to save you sensitivity hassles, consider deliberately adding some small series resistors for this purpose.
Before you finalize the design, be sure to do at least some tolerance analysis. For each capacitor and inductor, do another simulation run with its value adjusted to the maximum or minimum of its tolerance range, depending which you think will mess up the circuit more. If you don't know which is worse, try both.
If you have access to a tool that provides it, you can tell it the tolerances of each part and it will do a Monte Carlo analysis, meaning hundreds of runs with the values varied randomly each time to let you see the statistical variation of the notch depth, Q-factor, etc.
I was going to mention that for a simulation like you did to give accurate results, you need to simulate it with the actual source and load equivalent resistances it will see in the real circuit, but I see you already did that. For future readers: Don't simulate a filter in a 50 Ohm circuit and expect it to have the same response in a power-supply application with a 1-Ohm load.
In this line I will mention that power supplies are tricky. The 1-Ohm source and 10-Ohm load you simulated are probably W.A.G.'s at best, especially for the 430 MHz you care most about. If the signal you want to block is actually a conducted emission you want to keep from getting off your board, and it comes from digital switching noise, it might be more accurate to model it as a high-impedance current source, rather than the low-impedance voltage source you used.
Uncertainty about the source and load impedance is likely to be a more important source of inaccuracy in your simulation than the layout parasitics.
Testing this circuit will require some thought. For the same reason you can't simulate the filter in a 50-Ohm system and expect it to perform the same in 10-Ohm system, you can't test it with a 50-Ohm source and load and expect the measurement to reflect the real performance.
Of course you can do some reflection measurements to improve your guesses about the source and load impedances (on a board with the filter components un-stuffed). And it might be possible to do some careful math and transform the results of a 50-Ohm test to give the performance in the real system.
Alternately, on the load side, probing with a low-capacitance 'scope probe (if it has enough bandwidth) will probably give you a more accurate view than connecting through the 50-Ohm coax connections implied by your schematic. Not that the coax connector footprint you drew wouldn't make a reasonable probe test points if you just leave the connectors unstuffed.
I'm assuming this circuit is for a production run of more than 5 units (and it could be 100's, 1000's, or more), because for a one-off you could probably get away with just solder-tacking it out on/over a blank clad board and tweaking it until it works, and save the time and expense of fabbing a PWB. |
H: Is it possible to have a device with metal case and wireless charging?
Recently I encountered the following idea: that a mobile device manufacturer is not interested in including wireless charging in his devices because that prohibits him from using metal cases in the future (without excluding wireless charging from future devices of course). Sounds reasonable but...
Wireless charging uses the same technique as the transformer and the transformer includes a core. Perhaps the metal case could act as such core.
Is wireless charging indeed impossible for a device in a metal case like for example a mobile phone? Would it be possible to perhaps leave a small window permanently covered with plastic and use it for wireless charging?
AI: Wireless charging is currently most often done using a magnetic field (aka "near field" or inductive power transfer) and I'll assume that is what you mean.
If you can provide a metal free window then you can charge via it. Metal which intersects the field will have flux induced in it and there will be eddy current losses. With a window and suitable care you could minimise the field strength at the metal edges and keep losses low.
You can transfer power inductively through metal - you will incur eddy current losses whose magnitude will relate to the resistivity of the metal and it's thickness. Very thin metals and those of lower conductivity / higher resistivity will incur lower losses.
The transmit and receive coils are almost invariably resonated and voltage levels are far higher in the intended circuits than in the spurious ones.
Despite various claims and patents, this system is far from new. If we ignore Tesla and a century + of transformers - I saw IPT demonstrated at a power level of hundreds of Watts in 1972 or 1973 - just under 40 years ago. Professor Don Otto of auckland University had a number of related patents 'way back then' and many modern claims to originality seem to be hopeful of spurious. |
H: Is analog SPDT IC switch same as mechanical relay?
I am working on a project which require to trigger a SPDT switch using a button to pass a small signal voltage across (~3.3V).
reference circuit image below
The requirement is:
signal must still pass through (pass through NC) even when relay/switch power is
off (like what a normal mechanical relay would react)
Due to the small voltage, try to make it small & saving cost, I wish to avoid using mechanical relay. I found a SPDT analog switch TS5A3157 by Texas Instruments
My question is, will this IC work & pass signal to NC node when VDD is 0V (battery died). Or is there any alternative solution to do this?
AI: No, it won't work when Vdd is 0V, the MOSFETs need a bias voltage to keep them open.
As Olin says it would help to know exactly what you are trying to do to determine the best solution, but for an electronic normally closed switch, here is a simple idea:
Most MOSFETs are enhancement mode, which means the MOSFET is off with 0V gate-source bias (Vgs) and turns on with a positive Vgs bias (for a N-ch, opposite for a P-ch)
What you need in this situation is a depletion mode device, which means with 0Vgs, the FET is on, and turns off with a negative Vgs (assuming N-ch again)
A typical JFET is a depletion mode device, and you can also get hold of depletion mode MOSFETs such as the BSS139.
So using something like the above, here is a simple circuit (that could be elaborated on if necessary):
Ignore the resistor R3, this is just to simulate a switch by setting it from low to very high impedance - the SWITCH node would be connected to your bias voltage needed to turn the FET off (so it's connected to -10V in this example)
Simulation:
Above we can see the SIG_OUT when the JFET gate is left floating (Red trace) and then when biased with -10V (Blue trace)
The signal in is 200mV pk-pk with a DC offset of 0V, so this can be used for dual polarity signals. Depending on the JFET used, the gate does not have to be biased so low, the smaller the Vgs required to turn it fully off the better.
Note that the ON resistance of this switch will be quite high, so you cannot load it too much - if you need to drive something then you will need a buffer in between.
If you don't want to use a negative rail, the same concept can be applied to a P-ch JFET:
I haven't included the simulation as it's exactly the same as above. The bias voltage used was floating (e.g. if using a switch on the gate it's open) and +10V to turn off (so switch would be wired to +10V)
The FET part numbers shown can obviously be changed if desired, I'm sure there are better parts out there - they were just picked from the small selection LTSpice has. |
H: How critical is the layout of USB data lines / how does my layout look?
I'm laying out the USB data lines on my board at the moment, and I'm just trying to get an idea of how well off my design is gonna fare. Here are the particulars:
4 layer board (from the top: signal, ground, split power planes, signal)
internal copper is 0.5oz, external copper is 1oz
prepreg between external foil and core is 7.8 mils thick
traces are 10 mil with differential pair spacing at 9.7 mils
MCU pin to parallel caps trace length is about 0.23 inches
I plan on having a sealed USB connector in my device's enclosure. The connector I chose has a vertical header arrangement, so I'll have a board that I solder the connector to, and then between that and the main board, there will be a jumper cable.
As far as the differential impedance, based on the above specs, I figure I should be landing somewhere in the 91 - 92 ohms area. Granted, the traces don't stay evenly spaced the whole time since they run through the parallel caps and series resistors before hitting the connector... but I tried the best I could.
Here's a shot of the board layout thus far:
How does this look? The different in length between the pair of traces is below 5 mils. What I'm concerned about is potentially messing up this whole differential impedance thing... and having the jumper cable between the board and the connector mess things up.
AI: Assuming you're only using USB-low-speed or full-speed, you should be fine.
Generally, layout considerations only really have to be taken if you're going long distances (many inches), or using USB-2.0. Even then, USB is surprisingly tolerant.
USB 1.1 or USB2.0 low/full speed
You really don't need to worry. There are (possibly apocraphyal) stories of people running USB2.0 low-speed of 50' of CAT-5 wire. As long as you keep your wire-runs a few inches or less, I wouldn't worry.
The fastest edge you will need to worry about in low/full speed applications is 12 Mhz. As such, you're not really approaching the point where making sure your traces/wiring is properly transmission-lined/impedance-controlled is that important, at least as long as your overall uncontrolled-impedance sections are less then, say ~6".
As I said, most USB controllers are impressively tolerant of USB devices that are widely out-of-spec. If this is something for production, I would spend the effort to do it properly (there is one guy out there who has a motherboard that throws a hissy-fit if anything connected to it deviates from the spec by a tiny amount), but if it's just a test-board, I'd say just lay it out neatly, and don't worry about it.
USB2.0 High-speed.
Here layout becomes more important. USB2.0 High-Speed has a maximum edge rate of 480 Mhz. As such, even short traces start to approach the wavelength of the data, and as such proper impedance-control becomes important.
Assuming you EDA package has proper impedance-controlled routing options, just set your differential-pair impedance to be ~90Ω, and you should be fine. Be careful to make sure you have a contiguous ground-plane, though
USB3.0
So you hate yourself? |
H: Arduino USB host get raw events
For a project I'm planning, I'd like to be able to plug a USB device into an Arduino and capture the raw usb events (handshake, interrupts, etc) and reply to the device on an equally low level. I've been eyeing the Arduino USB Host Shield (Docs) for this project, but I had some questions / concerns that I hoped to clarify before getting it.
The library is, at least from what I see, designed to make high level interfacing with common types of USB devices very easy. So I'm wondering, what would I have to do if I wanted to deal entirely with raw USB speak? Is it possible with the Arduino and this shield?
Thanks in advance for any help.
AI: No, I'm afraid not. All those low-level details you're interested in are hidden inside the MAX3421E chip that's on the shield board, and there's no way to get software access to them from the Arduino CPU.
If you really want to get into that level of development with USB, you need to work with a microcontroller that has a USB OTG controller built in, and start digging into the software library that supports it. |
H: Help me interpret this part of the USB + Power Standard
It's the last two sentences of this section:
What does the last sentence mean exactly? And how do I apply it?
Basically I am building a USB + Power peripheral that will convert USB to RS-232 and drive a display that needs more than the 500mA you get from regular USB, hence we are using USB + Power. You can find the full standard here:
http://www.poweredusb.org/pdf/PoweredUSB_v08g.pdf
AI: The statement means:
Max continuous DC current drain not to exceed 1.5A.
If the current pulses briefly to more than 1.5A it should do so for no more than 10 mS
If it pulses to more than 1.5A repetitively, even if the pulses are <= 10 mS long, the RMS (~= mean or average here) current drain should not exceed 1.5A overall. eg if it pulses to 3A for 10 mS a number of times in a row the off time average should be >= 10 mS in order to keep average drain under 1.5A.
The rise time limit of 10 mA/uS = 10,000 A / second is the MAXIMUM rate at which current draw should change. (Language suggests it may be a minimum :-). ) Ideally this will be arranged in a formally controlled manner.
IF rise time is not formally controlled then the result should be no worse than suddenly connecting a 2200 uF capacitor with ESR = 80 milliOhms across the USB 5V rails.
And how do I apply it?
Engineering. |
H: Choosing my first oscilloscope
I'd like to repair older computers, such as C64's, Atari's, Apple IIe's etc and their power supplies. I have a multimeter already but I'd like to get an oscilloscope. I've been offered an Owon PDS5022S really cheap, would this be suitable to start with?
AI: Yes, the Owon should do okay for all the mentioned computers. 20MHz bandwidth is a perfectly good choice for your first scope, and will cover most of the "less complex" and older digital electronic components, for example small microcontrollers (e.g. PIC10, 12, 16, and 18F and similar Atmel, TI, etc offerings)
The highest clock speed out of the computers mentioned would be probably the Ataris - you don't specify which one but for example the Atari ST used a motorola running at 8MHz, and a later model used a 16MHz processor.
The C64 and Apple IIe used ~1MHz clock speed, so obviously they are no problem.
Note that most of the signals you will be looking at will be much slower than the clock speed, so even if the clock speed is above your scope bandwidth it doesn't necessarily mean you cannot use it. It just gives a very rough guide, as you know (almost) for sure all the signals will be slower than the main clock speed (barring things like wireless peripherals or video ICs that may generate their own high speed clocks)
Another thing thing to note is although the bandwidth is given as 20MHz, the sample rate is only 100Msps (mega samples per second), so a 20MHz square wave will not look very square at all (as you will only get 5 samples to recreate one cycle of the waveform).
Usually decent scopes are specified with a bandwidth of around a 10th of the sample rate, so over 10MHz this Owon will not be ideal. Looks like they were pushing the specs a bit to make it sound a better.
However, they are pretty good scopes for the price - I have a 200MHz later SDS model which samples at 2GHz, so it looks like they may have reconsidered about the sample rate vs bandwidth specs.
Out of interest, how much will you be paying (just to make sure it's a reasonable price)
EDIT - $150 (I assume USD) sounds pretty reasonable for a new DSO of this spec. Here are a few interesting alternatives:
TEKTRONIX 2235A 100MHZ OSCILLOSCOPE - $175 (analogue scope) USED - you can get plenty of higher bandwidth analogue scopes for the same price. The downside with an analogue scope is you cannot save the waveform, or see before the trigger (pre-trigger) or do FFTs/waveform arithmetic. Still very usable though - even though I have a good DSO I still use my analogue scopes regularly.
Tektronix TDS 1002 Two Channel Digital Storage Oscilloscope 60 MHz 1 GS/s LCD Bid currently at $172 (USED) - probably go for double this but definitely worth watching, a nice scope.
HP 54542A Oscilloscope 500MHz / 2GS/s , 4-Channel - Just for interest, be nice if it went cheap...
Siglent SDS1062C Digital Oscilloscope 1Gsps/60MHZ DS1052E - £189 (GBP) NEW - There are quite a few scopes around this price up to 1Gsps/100MHz or so, which is four times the bandwidth of the Owon PDS5022S. In case you want to spend a bit more. |
H: SPI: effective payload throughput per clock tick?
Let's say I'm clocking a SPI bus at 30 MHz.
What payload throughput can I actually expect? 30 Mbps, or less?
(E.g. are high overheads imposed by pauses, control packets, packet headers, packet checksums, etc? SPI noob here.)
AI: SPI only defines a very small part of your protocol: just how a basic data word is transmitted and received. A data word will often be a byte, but that's not a requirement; if you want to define your SPI words as 19-bit you can freely do so.
How those 19 bits are defined is not part of the SPI specification, SPI just transmits 1 bit per clock tick, and doesn't care if that bit is part of your payload, preamble, CRC checksum, address, or whatever. So without further information on your word encoding it's impossible to say how high your payload throughput is.
If you use SPI to interface to a simple shift register your payload throughput will be 30 Mbps. If you want to interface with an EEPROM it will be less, since apart from your actual data you'll also have to provide the EEPROM address, and for byte mode writes payload throughput may be as low as 10 Mbps. |
H: Thinest insulator between metal case and PCB?
For a miniature product, I want the smallest possible product enclosure around the PCB. I figure I can get away with a 1mm thick metal sheet enclosure.
But I (probably) also need an insulator between the circuit board and the case, so nothing shorts out. What's the thinnest way I can make the inside of the metal case insulative? Paint? Powder coat? Paper?
AI: (1 mm steel is thick!)
The isolation may not be required, since you're probably (S)ELV. Anyway, it's not going to cost you much space-wise. I wouldn't mess with paint sprays and such. Agreed, it's the thinnest, but I assume you can afford the thickness of a 0.1 mm PP (PolyPropylene, PP has very low water absorption) sheet?
Try to use only SMT parts, and mount them single-sided. PTH components will add at least 2 mm because of the pins sticking out at the other side. A single-sided PCB may be glued directly onto the PP sheet, which in turn you glue to the bottom of the enclosure. If you manage to do the wiring of the PCB single-sided as well you don't even need the PP insulation. It may be worth using a couple of 0 Ω jumpers to ease the layout.
You can save an extra couple tenths of mm by using a 0.8 mm PCB instead of the standard 1.6 mm. The thinner PCB is less stiff, but at the small size it's not a problem, and when glued against the enclosure it won't get any mechanical strain anyway. |
H: In the logarithmic compressor in PCM, which law is used in countries other than the US, Canada and European countries?
US and Canada use A-law and Europe use µ-law. I can't seem to find what India and other countries use?
AI: A few seconds on Google led to this: http://en.wikipedia.org/wiki/G.711
Short story: use A-law unless you're in North America or Japan, in which case use µ-law. |
H: Is this 'pmod' connector standard?
Here's an image of my Digilent Coolrunner II development kit:
Those connectors on the backside are 6x2, female, and seem to be on .1" pitch. Are these standard, and where could I buy the male counterparts? Much obliged. Just a few words to search on is all I need. '6x2 electronic connector' didn't cut it.
AI: That looks like the standard of standard connectors the 100 mil header, they may be older than engineering itself ;) Most connector manufacturers make them in various, lengths, platings, and angle positions. You could order a 6x2 Samtec version from digikey for $1.63 http://www.digikey.com/product-detail/en/TD-103-T-A/SAM1114-03-ND/1105555
It says no stock, value add, but that just means they cut them to your length to order. Pick USPS shipping if you want the best shipping deal.
Samtec is also great about sending out samples for free so if you only need a few you can request samples from their website. Here's a link to their page for 100 mil connectors.
http://www.samtec.com/standardboardtoboard/100_pitch_square.aspx
Molex also makes them under the CGrid or CGrid III name: http://www.molex.com/molex/products/family?key=cgrid_iii&channel=products&chanName=family&pageTitle=Introduction
Those are what I usually use, although I do really like Samtec as well. Keep in mind when ordering they come in different types of platting (and different plating thicknesses). So if this is proto or a hobby project you'll want to get either the thinest gold or no gold to keep the price down. This is an extremely common part so they should be easy to find.
One last tip is they're easy to cut to the size you want so I usually just buy a bag of really long ones, say 32 x 2 and then cut them to size as needed. They're pretty useful in the lab for making test points or connectors on the fly.
Good Luck! |
H: CPLD best practice for resetting a counter
My application has a bog-standard count-until-a-certain-number-then-reset-the-counter section. My experienced friend tells me that when using actual chips, it's common to increment the counter on the rising edge of the clock and reset the counter on the falling edge. That way the designer has a lot of time to do what needs to be done before the next clock arrives.
But he's never used a CPLD and I wonder if this changes the rules. Or if his information is technically sensible but not practically needed.
My design has something like
always @(posedge clock) begin (increment the clock) end
always @(negedge clock) begin (reset the counter conditionally) end
I'm not trained at all in electrical engineering, I just read and dabble. But I can't let it rest when I don't feel I have a certain (n00b-level) understanding of what's going on.
I just read an example from a university course where the instructor didn't care about when the counter was reset. His design was something like:
always @(posedge clock) begin
counter = counter + 1;
if (counter == some_number) counter = 0;
end
This leads me to believe I'm over-engineering, the instructor is instructing not building an industrial app, or the synthesis process handles such things.
Of course I could try it in the simulator or actually plop it into the CPLD. Eventually this is going to be driving a powerful machine and it's got to work every time. I can't have an edge case where the machine misbehaves.
EDIT - more context. While it may not matter with respect to the answer, I am counting pulses generated by an encoder attached to a rotating spindle. I have to count every one of them, and I can't lose any.
EDIT 2 - example of a loop that increments a counter, then on some condition, changes it.
module slow_count(
input clk,
output reg [3:0] count
);
reg[19:0] snooze = 0;
always @(posedge clk) begin
snooze = snooze + 1; // Set the counter
if (snooze == 1000000) begin
snooze = 0; // And change it here
count = count + 1;
if (count == 10) count = 0;
end
end
endmodule
AI: It sounds like you don't have an external reset signal to respond to, you just want to count to some number then go to zero as the next step. You could consider this a mod n counter, where n is one more than the maximum count in your counter.
So I'm not sure what you mean about "losing a signal" while doing the reset. If you had a 3-digit decimal counter and it rolled over from 999 to 000, you wouldn't consider it as "losing a signal", it would just be counting to the next value in mod-1000 arithmetic.
So if you do
always @(posedge clock) begin
if (counter == some_number) begin
counter <= 0;
end
else begin
counter <= counter + 1;
end
end
You'll have a counter that counts continuously in mod-some_number+1 arithmetic. Alternately you could say it counts to some_number, then resets to zero without ever "losing" a clock pulse.
If some_number+1 happens to be a power of 2, you don't even need the reset condition in your code. For example, for a mod-16 counter, you can just use a 4-bit counter, and the synthesized logic will count continuously and repeatedly from 0 to 15. |
H: PSU with unspecified max safe amperage
Possible Duplicate:
Choosing power supply, how to get the voltage and current ratings?
I'd like to power my new LG M2450D monitor with a basicXL BXL-NBT-U02 universal AC-DC power adapter.
This PSU is rated 90W max and supports 15-24V output voltage.
The original monitor PSU (PA-1650-68) was fixed at 19V and 3.32A.
Now, doing the math:
90W / 19V = 4.74A
Of course this is an ideal value, what is "safety margin" i should assume for the real max amperage?
AI: To be conservative, you should assume that the maximum power rating of the universal adapter occurs at the maximum output voltage, and that all lower output voltages are limited to the same current.
In this case, 90W/24V = 3.75A, so you should be good to go with the output set at 19V with this amount of current. |
H: Is frequency for dc zero Hz?
We know the frequency of a direct current is zero. The reason is that there is no repetitive pattern.
But I was stumbled when I noticed, why can't that straight line be cut into smaller pieces, and can we treat it as infinite frequency? I have included a picture below as an example
As you can see, with dc, that straight line can be divided into infinitesimal patterns/cycles, since the cycle can be seen as lines repeating over and over again.
AI: Very clever, but that's not how it works.
By your reasoning you should not only be able to make the frequency infinite, but also 4 Hz, or 100 Hz, or \$\sqrt{2}\$ Hz, all at the same time, with the same signal. And that's why you can't do that: a repeating signal can have only 1 fundamental frequency, which is 1/period.
It would be the same as taking 2 periods of the 4 Hz sine and saying that that's the period, because it also repeats, and then the signal would be 2 Hz. It can't be 2 Hz and 4 Hz at the same time. |
H: What are the advantages of having two ground pours?
I've seen many 2-layer PCBs that have a ground pour on both the top and bottom layers, I was wondering why do that ? and wouldn't it be better to use the top layer for power and signals and the bottom layer for ground to simplify the routing and also taking advantage of the capacitance between the planes ?
AI: Good layout and grounding seems to be poorly understood out there so religion finds a foothold. You are right, there is really very little reason to use both the top and bottom of a two layer board for ground.
What I usually do for two layer boards is to put as much of the interconnects as possible on the top layer. This is where the pins of the parts are already anyway, so is the logical layer to use to connect them. Unfortunately you usually can't route everything on a single layer. Paying attention and thinking carefully about part placement will help with this, but in the general case it is not possible to route everything in one plane. I then use the bottom plane for short "jumpers" only when needed to make the routing work. The bottom plane is otherwise ground.
The trick is to keep these jumpers on the bottom layer short and not abutting each other. The metric of how good a ground plane is left over is the maximum linear dimension of a hole, not the number of holes. A bunch of short 200 mil traces scattered about won't keep the ground plane from doing its job. However, the same number of 200 mil traces clumped together to make one island a inch accross is a much bigger disruption. Basically, you want the ground to flow around all the little disruptions.
Set the auto router cost for the bottom layer high and don't penalize it much for vias. This will automatically put most of the interconnects on the top layer. Unfortunately, the auto-router algorithms I have seen can't seem to be tweaked for not clumping the jumpers. In Eagle, for example, there is the hugging parameter. Even if you turn this off, you still get clumped jumpers. Let the auto router do the grunt work, then you clean things up afterwards. Sometimes you can spot a case where a little re-arrangement can eliminate a jumper altogether. Most of your time, however, will be spent moving the jumpers apart to not make large islands.
As for power planes, that's mostly silly religion. Route the power just like any other signal, although in this case you have to consider the voltage drop due to the trace resistance, since power traces presumably handle significant current. Fortunately even 1 oz copper traces on a PCB are quite low resistance. You can make the power traces 20 mil or whatever instead of 8 mils for signal traces. In any case, the point is that the DC resistance matters but it is usually not much of a issue unless you have a high current design.
The AC impedance isn't all that relevant, which the religious folks don't seem to get. This is because the power feed is locally bypassed to the ground plane at each point of use. If you have a good ground plane, you don't need separate power planes for most ordinary designs, just good bypassing at each power lead of each part. The bypass cap connects directly between the power and ground pins, then there is a via right at the ground pin to connect to the ground plane on the bottom layer.
The high frequency power loop current of a part should go out the power pin, thru the bypass cap, and back in to the ground pin without ever running accross the ground plane. This means you don't use a separate via for the ground side of the bypass cap. Connect it directly to the ground pin on the top side, then connect that net to the ground plane with a via at a single point. This technique will help a lot with RF emissions and cleanliness in general. |
H: Alternative to inductor on IC
I was running through the datasheet of CC2500 (Low-Cost Low-Power 2.4 GHz RF Transceiver) which has a dimension of 2.40mm X 2.40mm approx. It was really amazing to find such transceivers to be fabricated in such a small area.Infact a transceiver requires a lot of R,C and even L.Resistors, Capacitors and semiconductors are easy to be imagined on an IC but an Inductor!!!
I haven't work in any VLSI industry so it would be great if someone can tell how these inductor logic is implemented on IC. Although it is said that gyrators are alternative solution, but thanks for pointing if my knowledge is correct.
AI: Inductors have been fabricated on ICs for a long time now. The inductance can obviously not be that high, but there are various methods to compensate for this.
(source: dow.com) |
H: 230V AC to 5V DC converter, lossless
Is there any IC which converts 230V AC to 5V DC? As lossless as possible. I want to connect my microcontroller to an ordinary electrical socket and I don't have enough space available. Thanks.
AI: There's no such thing as "lossless" anything in electronics, and there's not a single IC that's designed to do what you want. But here are some different supply ideas. Since you didn't specify current consumption or efficiency, let's look at three different approaches:
Non-isolating Zener supply
5% efficiency or less
Plug-in timers that are microcontroller-based usually use non-isolating power supplies, like this:
R1 essentially drops the difference between the Zener diode and the AC mains potential, so it's not going to be efficient for anything except light loads. Also, your load can't change dramatically, as the resistor has to be sized to provide enough current to the zener to cause it to reverse avalanche, without providing too much current. If your load starts pulling too much current, its voltage will drop. If your load doesn't pull enough current, the zener diode can be damaged.
Pros
Very small
Very cheap
Excellent for extremely light loads (MCU + switch device)
Cons
No isolation
Load current isn't flexible; must be fixed within small window
Mains-frequency regulated transformer supply
20-75% efficiency
You can always use a transformer (60:1 or so), a bridge rectifier, and a linear regulator, like this:
This introduces a bulky, costly transformer into the design, but it's more efficient than the previous design, and your load can vary quite a bit.
Pros
Easiest to implement
Designed for medium current loads -- a clock radio, for example.
Full isolation
Relatively inexpensive
Cons
Bulky
Fairly inefficient
Fully-isolated Switch-mode AC/DC Converter
75-95% efficiency
Most efficient (and most complex) is a AC/DC switching converter. These work on the principle of first converting AC to DC, then switching the DC at very high frequencies to make optimal use of the transformer's characteristics, as well as minimize the size (and loss) of the filter network on the secondary. Power Integrations makes an IC that does all the control/feedback/driving -- all you need is to add a transformer and optoisolators. Here's an example design:
As you can see, AC mains voltage is immediately rectified and filtered to produce high voltage DC. The Power Integrations device switches this voltage rapidly across the transformer's primary side. High-frequency AC is seen on the secondary, and rectified and filtered. You'll notice that the component values are quite small, even considering the current use. This is because high-frequency AC requires much smaller components to filter than line-frequency AC. Most of these devices have special ultra-low-power modes that work quite well.
These converters, in general, provide a great amount of efficiency and can also source high-power loads. These are the sorts of supplies you see in everything from tiny cell phone chargers to laptop and desktop computer power supplies.
Pros
Extremely Efficient
Full isolation
High output current: can source 50+ amps of low voltage DC fairly easily.
Small size
Cons
Large BOM (Bill of Materials)
Difficult to design
Requires thoughtful PCB layout
Usually requires custom transformer design
Expensive |
H: Faraday Cage - Detecting one
I am looking for a cheap and easy way of creating a small electronic device that is capable of detecting whether or not it is inside a Farraday Cage.
Hopefully, without an external sensor/emittor.
AI: A simple radar should give you some idea.
If it's inside a small enough cage, possibly a near-field effect-on-a-tuned-circuit type of system would work, instead of needing a pulse-type radar.
This may not be a perfect indicator - it could be hard to tell the difference between being in the midst of a number of conductive planes, and being inside a complete faraday cage. And a cage with a perfectly absorbing inner liner would presumably look like free space.
Assuming you are somewhere in an intact industrial society, detecting existing external sources (broadcast radio, mobile phone networks, etc) is probably more practical. Even absent that, there are cosmic radio sources you should be able to see if something isn't in the way (absurdly ionized atmosphere?)
Bear in mind that what qualifies as a Farday cage is a function of frequency; you would need to use test frequencies comparable to the bands for which you need to know the answer. |
H: Can someone help me understand this H-Bridge?
I have an old RC car but without the transmitter so I built my own Rx/Tx using MCU and 2.4Ghz transceiver, however, I want to use the car's original H-Bridge but not sure if I understood how that circuit works.
Here is the schematic for the bridge:
My understanding is that P1 and P2 are for forward direction and provide different speeds!?, while P3 is the reverse direction. Correct me if I am wrong.
My questions are:
1- Can I use logic level to drive P1-3 (directly from MCU pin) ?
2- When setting one of them high should the other two be low? Can P1 and P2 be high at the same time?
3- What is the purpose of R1?, Why only 1Ω?, Why 10W? and Why it is only connected to Q1 and Q2 and not T9 (since all three are PNP high side transistors)
4- Why does it have a diode D4 for only one of the inputs (P1)?
5- What is the purpose of D1, D2 and D3?
6- How does T1 drive T5 and Q2? Since its collector and emitter are connected to the base of the other transistors! no ground or vcc!? I am confused.
7- Can I use PWM to control the speed of this bridge? (default frequency for Atmel Atmega328 is 32K)
(Note: C1, C2 and C3 are actually polarized electrolytic capacitors)
----- Updates ------
Here is the modified design after fixing the swapped transistors pins, removing the slow forward circuit and adding flyback diodes:
So how does it look? anything that need to be changed? removed? added?
AI: Yes.
a) Yes. b) Possibly; see answer #4.
R1 limits the current for low-speed forward and reverse operation. T9 provides high-speed forward operation.
It raises the switching threshold for P1 by one diode drop. My guess would be that if you drive P1 and P2 high simultaneously (from a dead stop), this allows the low-speed circuit to get the motor started before the high-speed circuit kicks in, providing smoother acceleration.
The resistor-capacitor-diode combination provides a soft-start, fast-stop characteristic for the motor. When starting, the resistor and capacitor have a time constant of about 0.224 seconds, which helps prevent the motor from abruptly spinning the wheels. When stopping, the diode dischages the capacitor immediately for faster response.
See my comment on your question. When hooked up correctly, T1 feeds base current from the high-side PNP (Q2) directly to the corresponding low-side NPN (T5).
Only if you remove the three capacitors. You'll also need to add freewheeling diodes across each of the five power transistors. |
H: How to feed an SPI TFT display a signal from a composite video source
Here is the module I am looking at: 1.8" Serial 128X160 SPI TFT LCD Module Display + PCB Adapter with SD Socket
So my question is, is there any way I could convert a video signal from a composite source (i.e. DVD player, game console, etc.) to something which this module could process and display correctly?
Or if you have any other suggestions for a similar sized display which can easily interface (or be made to interface) with a composite video source, please let me know.
Thank you.
AI: This is going to be an extremely tedious project to get working.
Here's how to do it, though:
Sample the composite video signal at 5.5 MHz (the bandwidth of composite video) using a high-bandwidth ADC.
Look for the line sync pulse. Once you've got that, you have a line of video in your buffer.
Looking in your buffer, find the colorburst section of the data. This will let you split up the data into the two parts (luminance and chrominance)
Since your LCD is a 160 pixels long, bin the luminance signal into 160 bins.
Average each bin's value. This is the value of the luminance at that pixel.
The color burst is going to be tricky. You're going to need to demodulate the quadrature encoded signal into the two color signals by looking at the phase differences of the signals. That's going to be some hardcore DSP. Once you're done with that, you have your two extracted color signals.
Repeat the binning process for the first extracted color signal. This is your Cb signal.
Repeat the binning process for the second extracted color signal (the one that's quadrature-encoded). This is your Cr signal.
Repeat this process for each line of video until you get to the end of the field.
Now, you need to repeat this for the next field. Remember that NTSC composite sends video interlaced, and not progressive.
After this is done, you should have an array of CIE YCbCr values that is 160 pixels wide by about 525 lines tall.
You need to compress the lines of video down to 128 (the height of the display). Average over the vertical column in your pixel array to find the separate Y, Cb, and Cr values for each pixel.
Since your display uses RGB instead of CIE YPbPr, you'll need to convert each pixel to RGB. There's fixed-point formulas available that are optimal for doing it on a computer.
As soon as you've got the RGB array, you'll need to write the data out to the display using the SPI interface. The display will have a protocol that explains how to write data to it.
Pitfalls
By averaging and binning the pixels without doing bicubic or any other sort of smart sampling, you're going to get terrible aliasing that makes the video look jaggedy and weird.
Since it's doubtful that your SPI clock is fast enough to write data to the display fast enough, you'll experience dropped frames. You'll need to ensure your controller can deal with that.
Other ideas
Don't reinvent the wheel. eBay sells a ton of wearable displays (with small screens) with composite inputs. I'd start with something like that and hack it to fit your application. Just remember to remove the optic in front of the piece that throws the image further away to make it easier for your eye to focus on (unless you want that, that is...) |
H: SD card sector address vs. physical location
I'm curious as to how SD cards map the supplied sectors for read/write to physical locations in the flash memory. Is this the real physical address, or is it just a virtual address that the SD controller then maps to the physical location?
I've read that SD cards have a controller which will manipulate writes in such a way that the wear of flash sectors is spread out as much as possible.
The main concern I have is if I have a micro-controller dealing with low-level IO where I read/write to a SD card using the SPI interface (mainly writes). I'm planning on using a PC program to pre-allocate sectors/clusters in a FAT16 formatted SD card at pre-known locations that my micro-controller can use. However, I don't want these sectors/clusters to magically be moved by the SD controller in such a way I have to re-parse the FAT16 file system in order to find where they are. I also don't want to accidentally repeatedly write to the same physical flash sector causing a failure in that one portion of the SD card.
AI: Any moving of sectors that the device performs is translated automatically by the device itself; the data at any given address will read the same even if the device moves it every single time the device is accessed.
(Note that this is not true with MTD devices, which require you to handle... pretty much everything) |
H: Why is the voltage across a reverse biased diode equal to source voltage?
Why is it not equal to zero since a reverse biases diode is essentially an open circuit?
AI: You may be confusing open and short circuits. An open component is like a component which is not there. The voltage across a non-conducting diode between the points in the circuits where it is connected is the same as what the voltage would be if we removed the diode.
A voltage is a potential difference between two points that are at different places in an electric field. If we move a charge through this field from one point to the other, we have put in work (or obtain work, if we go the other way).
A potential difference does not require a conducting path, since electric fields can exist even in a vacuum. An electron and a proton in a vacuum have a potential difference (i.e.) voltage between them. Current does not have to flow for voltage to be present. That's why it is a "potential": it represents stored energy that can potentially be used to do work, if it is released.
When a conducting path is provided between points at a different potential, that is what in fact erodes potential differences. A conductor, such as a piece of copper wire, can have a voltage between its two ends, but that means that current is present. (If no current is present, it means there must not be any voltage). If the source of voltage has a limited capacity (such as a battery or capacitor), then the conductor will eventually drain the potential difference down to zero. Charges will flow from the region of higher potential to the region of lower potential, until the two are at the same potential.
If multiple components are connected in series, and a voltage is applied this series arrangement, they each have a share of the voltage, such that their individual shares add up to the applied voltage.
Suppose that the components all have some nonzero resistance, but one of them is open. In that case, the open one will have the full voltage across it, and the others have zero. Since the circuit is broken, no current flows. According to Ohm's law (V = IR), since I is zero, V must be zero for each one of the R's. However, this formula doesn't apply to the open component because its R is infinite. We just know that the voltage is the same as the total voltage, since all the other components have zero voltage.
Now suppose we have nearly the same arrangement, but the open component is replaced by a short. In that case, the short has nearly zero voltage across it. This is again from V = IR. Resistance is nearly zero, and I is some reasonable value limited by the other R's, so V is nearly zero. The other components which have a nonzero resistance now pick up the entire voltage and divide it among themselves in proportion to their resistances.
So, as a rule of thumb, an open or nonconducting component has full voltage across it, and a short has nearly zero voltage (if that short is in series with some resistances which limit current). |
H: What electric part is on this manhole cover?
Here's a photo of a manhole cover
The letters form the word "ТЕЛЕФОН" ("telephone" in Russian in ALL CAPS).
What is on the picture in the center? Perhaps it is some part that should be associated with communications but I have no slightest idea what it might be.
I've Googled a lot and found that this image is a logo of a USSR state organization responsible for communications which acquired all the assets (logo included) of Svensk-Dansk-Ryska Telefon AB (rus Шведско-Датско-Русское телефонное акционерное общество) telecommunications company that used the same logo.
More Googling finds this one century old logo of a Stockholm telecommunications company that has the same image yet much simpler and with carefully depicted main details.
So far I've seen various explanations of the image, including a receptacle and a candlestick telephone earphone (the earliest telephone design had a fixed microphone and the earphone had to be held next to ear). However none of the claims are backed with reputable sources.
What is the electric part on the image in the center of the cover?
AI: It's a badly rendered communications tower or, just possibly, the end of a cable. BUT a tower looks far the more likely.
Olga can assist (that's her feet) -
From here
Which is from her Olga's feetography album
Failing that ...... :-) |
H: Does anyone have a manual or spec regarding an NEC JAPAN D78P0308GF
As the headline states.
It seems to be hard to get! The uC is in a Siemens Landsi & Gyr Dialog.
Power measurment equipment 3-phase ZMD120AMer53
AI: Here are a direct link to the microcontroller: http://documentation.renesas.com/doc/DocumentServer/U11377EJ3V0UD00.pdf |
H: Writing a VHDL Module
I am trying to get through this section of a course: http://hamsterworks.co.nz/mediawiki/index.php/Module_9
I am trying to write the 30 bit counter module (Project 9.1 on the page). I have the counter wrote in a normal .vhd file from the previous sections in that course. Here is the code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Clock_Signals is
Port ( switches : in STD_LOGIC_VECTOR(7 downto 0);
buttons : in STD_LOGIC_VECTOR(3 downto 0);
LEDs : out STD_LOGIC_VECTOR(7 downto 0);
clk : in STD_LOGIC
);
end Clock_Signals;
architecture Behavioral of Clock_Signals is
signal counter : STD_LOGIC_VECTOR(29 downto 0) := (others => '0');
signal incHighNext : STD_LOGIC := '0';
signal buttonsPrev : STD_LOGIC_VECTOR(3 downto 0) := (others => '0');
begin
LEDs <= counter(29 downto 22);
count: process(clk)
begin
if rising_edge(clk) then
-- Allows for a step through
--if (buttons(0) = '1') and (buttonsPrev(0) = '0') then
--counter <= counter+1;
--end if;
counter(29 downto 15) <= counter(29 downto 15)+incHighNext;
if counter(14 downto 0) = "111111111111110" then
incHighNext <= '1';
else
incHighNext <= '0';
end if;
counter(14 downto 0) <= counter(14 downto 0)+1;
-- Update state
buttonsPrev <= buttons;
end if;
end process;
end Behavioral;
But when I make a module, I can't figure out how to translate it over. Here is my current module:
module mymodule(
input [3:0] clk,
input [3:0] enable,
output [3:0] count
);
endmodule
AI: I'm pretty sure you accidentally clicked "Verilog Module" instead of "VHDL Module":
The code generated should look something like this:
COMPONENT mymodule
PORT(
clk : IN std_logic_vector(3 downto 0);
enable : IN std_logic_vector(3 downto 0);
output : OUT std_logic_vector(3 downto 0)
);
END COMPONENT;
Delete the accidental Verilog Module and try again paying close attention to which Source Type you choose. |
H: using led stripes with external battery: any side effects?
i have to power some led stripe from ikea with a drill battery:
On led stripe power is written: 12V 0,25A. and on drill power: 12V 2A.
Now i want to power n led strip (for example: n=4) and i want to understand if there are some side effects or some safety way to do it: do i have to add some resistor? and how to have the best result (=more light) for example mayebe if i use more then 10 stripes the light is reduced or whatever..
and if i want to add more kind of light? (ex: 4V lamp like this black one below)
i had some trials and it seems that there are no problem with 4 stripes in parallel, and i think that there is no need for resistors because both the parts works with 12 volts, but my theory knowledge is very poor (i have only some trial and error experience) and i have no idea with 4V lamps (i think that here i need some resistor) or if i change the power and if i use a different power supply (or even some normal battery like 2 or 3 9V battery in series)
mayebe here there are someone that can explain me how things works and how to design the circuit when i have decided how many light i want.
AI: Yes, you can use you 12V battery to power your led stripes.
The Ikea stripes are internally connected that way :
12v
--------------------------------------------------------- - -
| | |
--- --- ---
| | | | | |
|R| |R| |R|
| | | | | |
--- --- ---
| | |
| | |
| | |
--- --- ---
\ / \ / \ /
--- --- ---
GND | | |
-------------------------------------------------------- - -
This means that the same voltage ( 12V ) is applied to every resistor/led branches.
If you connect other led stripes the way Ikea recommends to. It's ok. You will still have 12V applied to every resistor/led branches.
The problem will be the current drawn by the system. If I assume that Ikea power adapter (0.25A) is design to power up to 4 stripes. Then, every stripe consumes :
$$ I_{stripe} = 0.25A/4 = 0.0625A = 62.5mA $$
Thus your battery, which is able to deliver 2A can power :
$$ N_{stripe} = 2A/62.5mA = 32 units_{max} $$
32 units max.
But what you really cares is for how long the battery will last. You have a 2000mAh battery. Thus, roughly, the time required to deplete the battery will be:
$$ t_{battery} = 2000mAh / (Nb_{stripe} \centerdot 62.5mA) $$
This is a rough approximation, because as the battery voltage drops, the drawn current drops also and the battery will last longer. But this is balanced a little bit by the fact that I have not taken into account that, after some time, the voltage will not be sufficient to light up the lights.
Another thing to notice : Here you don't have any voltage regulator if you use a battery alone. This means that the 12V at the battery output will decrease as the battery get depleted. And the emitted light will reduce over time.
Concerning the 4V lamps, you can connect 3 of them in series. If I combine this with the stripes:
12v
--------------------------------------------------------- - -
| | | |
--- --- --- ---
| | | | | | |X| )4V
|R| |R| |R| ---
| | | | | | |
--- --- --- ---
| | | |X| )4V
| | | ---
| | | |
--- --- --- ---
\ / \ / \ / |X| )4V
--- --- --- ---
GND | | | |
-------------------------------------------------------- - -
You will have 4 V at each lamp. |
H: Voltage regulator for linear constant-current (1.5A) LED driver?
I am considering building my own driver for a ~1.5A LED to power a microscope for my research.
For this application, efficiency isn't critical, but because exposure times to the camera can be short (~1ms), stability/lack of ripple is important. Thus buck/boost or other switching regulators, and PWM, are usually avoided here. (Perhaps suitable output filtering would sort this out, but <500ns [edit: <500 microsec] turn-on/off time is also highly desirable.)
What's the best current regulator for this set-up? (I'll be using a decent switching DC voltage source wall-wart to provide input power to whichever constant-current source I choose.)
One option would be to use an adjustable voltage regulator like a LM317 (but capable of handling more current, so maybe the LT1764 which also has a useful shutdown pin), set up in the standard constant-current mode where current is determined by a resistor between the Vout and Vadj pins. (The voltage between these pins is maintained at ~1.21V for the LT1764, so for 1A you'd want a 1.2-ohm resistor, and for 1.5A a 0.8-ohm resistor.)
(source: diyaudioprojects.com)
The other option might be using a new "one-resistor" voltage regulator like the LT3083, where the voltage is controlled by the resistance-to-ground from a single pin (through which 50 microamps is pushed by varying the voltage: so e.g. a 20kohm resistor induces a 1V output, and a 1-ohm resistor on that output will therefore cause 1 amp to flow).
Here there are two "suggested" constant-current circuits from the datasheet:
A constant-current source:
Or a lower-dropout LED driver
The nice thing about the LT3083 is that a 20-kohm potentiometer can be used to adjust current, unlike the LT1674, where you'd need a 20-ohm pot (rather harder to source) to adjust between ~.1A and 1.5A. But I'm not sure which of the two suggested driver circuits for the LT3083 would be more resistant to ripple from the input voltage source, if either. And I don't know if this is a bad idea for other reasons compared to the more standard regulators. (e.g. if the adj pin is left floating, it looks like the LT3083 will probably drive the voltage way up and fry the LED. So if the pot fails or a connection breaks, this could be bad news.)
So, anyone have suggestions for the best option?
AI: You mention that you want fast switching. None of the devices will be able to do that. Any the feedback circuits internally are designed to be slow so that they don't to much incorporate noise. And in fact some of the feedback is thermal feedback. Put another way, the dominant pole is low, 100's of KHz is typically the the fastest response time. This is true whether you are using a disable pin or connecting/opening the load to the source.
The best way to fix this is that you build an external circuit that current steers between two limbs. On one limb will be your LED chain and on the other a dummy load that draws the same amount of current (and hopefully also has similar load characteristics). An example of such a circuit is a differential pair. You should be able to get 10's of ns switching time then.
The challenge with the two limbs will be that the load characteristic differences may disturb the feedback of the LM317 etc. which then reacts slowly. If you can't match the two limbs then I'd suggest building a current mirror that decouples the current output the LM317 etc. so that it only sees a constant load the mirror transistor sees the variability.
You should be able to simulate all of this in LTSPice or similar before building.
The other factors you mention above not show stoppers, so pick what you want. |
H: Why is air pump making high pitch when it is overloaded?
Coming back from a nice camping trip, I noticed all air pumps made higher and higher pitch when the air bed were about to be fully inflated. It is heard like the the motor is speeding up when it is overloaded. I opened the pump but it seems very simple - electricity from the batteries are directly feed into a motor through a switch. However, my understanding about a electronic motor is that the speed should decrease when load increases. Is there anything I missed?
10/4/2012 Update
Finally, I made my poor man's power supply by a computer PSU and went through a test. Driven by 3.3V, the air pump draws 4.5A when it runs with a free airway; when the output nozzle is blocked, the current drops to 3.3A. The test supports Dave's answer and I agree that this question is more related to physics.
The picture is the test setup.
AI: This question really belongs in physics, but I'll take a stab at it.
Increasing back pressure on a positive-displacement air pump does not increase the load on the motor; it actually decreases it. On each stroke of the pump, less air escapes through the exhaust valve, and more of it remains in the chamber to help push the piston (or diaphram) back down, returning energy to the motor.
In other words, the output airflow drops off faster than the inverse of the back pressure, and the total work (airflow × pressure) drops. |
H: connect headphone to bluetooth module
I want to connect an old phone to a Bluetooth module. I first thought to use the original speaker and microphone, but the quality is quite bad, so I decided to rip apart an old PC-microphone and cheap headphones.
The microphone is a simple electret condenser, the headphone speaker (don't know exact model) is two-wire and measures 31 ohm, and I use the BTM510 Bluetooth module. The Bluetooth datasheet states that it can drive speakers with a minimum impedance of 16 ohm directly.
The problem is that the old phone horn uses a common ground for the (original) speaker and microphone, so there are only three wires running up the cord. From what I found on the internet, not all amplifiers can have their audio- connected to ground, but I would really like to keep the original three-wire cord.
Is it possible to connect the speaker and microphone to the module with the speaker negative side connected to ground, like in the following manner (with Vcc being about 3.8V). Would this work properly? Would I loose half the power of the speaker?
AI: Do NOT tie any of the speaker pins of the BT module to ground! This will likely damage the module.
You can wire the speaker and microphone as shown, but as you say, you'll lose half the drive voltage.
As an alternative approach, you could use a 1:1 audio transformer; connect one side to the two speaker terminals of the BT module, and connect the other side between ground and your speaker. |
H: Impedance of 4 conductor system spaced horizontally apart
I have 4 cylindrical conductors spaced equally and horizontally apart. How can I calculate the magnitude of Impedance (Z) using the Skin effect and Proximity effect?
I'm looking for an equation that will output Z given things such as the cross sectional area, length, frequency, and physical constants.
AI: There is no one answer; you need to consider each possible pairing of wires individually. With symmetry, there are four unique cases. The formula can be found here. |
H: P-Channel MOSFET high side switch
I am trying to reduce the power dissipation of a P-Channel MOSFET high side switch. So my question is:
is there any way in which this circuit can be modified so that the P-Channel
MOSFET will always be "fully-on" (triode / ohmic mode) no matter what the load is?
Edit 1: Please ignore the on/off mechanism. The question remains somehow the same: how can I always keep V(sd) the smallest possible (P-MOSFET fully on / ohmic mode), independent of the load so that the power dissipation of the MOSFET is minimal.
Edit 2: The switched signal is a DC signal. Basiclly the circuit replaces a switch button.
Edit 3: Voltage switched 30V, max current switched 5A.
AI: Knowing the voltage being switched and max current would greatly improve available answer quality.
The MOSFETS below give examples of devices which would meet your need at low voltage (say 10-20V) at currents higher than you'd be switching in most cases.
The basic circuit does not need to be modified - use it as is with a suitable FET - as below.
In the steady state on mode the "problem" is easily addressed.
A given MOSFET will have a well defined on resistance at a given gate drive voltage. This resistance will change with temperature, but usually by less than 2:1.
For a given MOSFET you can usually decrease on resistance by increasing gate drive voltage, up to the maximum allowed for the MOSFET.
For a given load current and gate drive voltage you can choose the MOSFET with the lowest on state resistance that you can afford.
You can get MOSFETS with Rdson in the 5 to 50 milliohm range at currents of up to say 10A at reasonable cost. You can get similar at up to say 50A at increasing cost.
Examples:
In the absence of good information I'll make some assumptions. These can be improved by providing actual data.
Assume 12V to be switched at 10A. Power = V x I = 120 Watts.
With an Rdson hot of 50 milliohms the power dissipation in the MOSFET will be I^2 x R = 10^2 x 0.05 = 5 Watts = 5/120 or about 4% of the load power.
You would need a heatsink on almost any package.
At 5 milliohms Rdson hot dissipation would be 0.5 Watts. and 0.4% of load power.
A TO220 in still air would handle that OK.
A DPak / TO252 SMD with minimal PCB copper would handle that OK.
As an example of an SMD MOSFET that would work well.
2.6 milliohms Rdson best case. Say about 5 milliohms in practice.
30V, 60A rated. $1 in volume. Probably a few $ in 1's.
You would not ever use the 60A - that's a package limit.
At 10A that's 500 mW dissipation, as above.
Thermal data is a little uncertain but it sounds like 54 C/Watt junction to ambient on a 1" x 1" FR4 PCB steady state.
So about 0.5W x 54 C/W = 27C rise. Say 30C.
In an enclosure you'll get a junction temperature of maybe 70-80 degrees. Even in Death Valley in midsummer it should be OK. [Warning: DO NOT shut the door on the toilet at Zabriski Point in mid summer !!!!][Even if you are a woman and the Hell's Angels or similar have just arrived][My wife will tell you about it][But your MOSFET would be OK.]
Datasheet AN821 appended to datasheet - Excellent paper on SO8 thermal issues
For $1.77/1 you get a rather nice TO263 / DPak device.
Datasheet via here includes a mini NDA!
Limited by NDA - read it yourself.
30v, 90A, 62 K/W with minimal copper and 40 k/W with a whisper.
This is an awesome MOSFET in this type of application.
Under 5 milliohms achievable at many 10's of amps.
If you could access the actual die you could possibly start a small car with this as the starter motor switch (spec'd to 360A on graphs) BUT the bondwires are rated at 90A. ie the MOSFET inside greatly exceeds the package capability.
At say 30A power = I^2 x R = 30^2 x 0.003 = 2.7W.
0.003 ohms seems fair after looking at the data sheet. |
H: Carry Look ahead adder Propagate & Generate Outputs
I am taking comp architecture course, and we are given a task to write 32 bit look-ahead adder in VHDL. Instructor provided the instruction and diagram.
While reading, Wikipedia article, I stumbled on the following diagram.
Since C4 is already available, what is the purpose of PG & GG outputs, ??? I am trying to find, if the instructors diagram is complete.
Thanks !
AI: The block diagram of a 16-bit CLA is divided into four 4-bit groups and comprises a combinatorial circuit, namely the look-ahead carry generator. The term Gk denotes the group- generated carry, whereas Pk denotes the group-propagated carry. All four groups generate their individual internal carries and then the sum bits. The section-carry generate, GG, and the section-carry propagate, PP, are also computed. |
H: What material and current do I need for a diy plant heater?
I want to heat my indoor plants with a DIY heater. I thought about using iron to heat up the soil, but I am not sure what material is the best for a heater. Also, what current would it need?
Thank you
EDIT: Could you at least explain why is my question bad before downvoting?
AI: The heating element should be electrically isolated from the soil.
You can buy resistive heating cable designed for in-ground use.
You can buy cable intended for heating floor slabs.
For small one-off playings a water-bed heater may be useful (if you can still find one. LOW VOLTAGE versions are essential if you wish to live long and prosper.
You could make your own resistive cables using eg Nichrome wire in a piece of hose. You would need to be sure that maximum temperature rise did not damage the hose.
Many cables mentioned on web. eg
TYCO - very reputable. Available in MANY countries.
Nexans "a global group"
Eltherm - a range of related products
https://www.google.co.nz/search?num=10&hl=en&safe=off&site=imghp&tbm=isch&source=hp&biw=1920&bih=1081&q=resistive+heating+cable&oq=resistive+heating+cable&gs_l=img.3...3254.12352.0.12551.27.21.1.5.5.0.316.4139.3j2j15j1.21.0...0.0...1ac.1.SKEm1j6SwY0 |
H: Transistor setup for large motor circuit
I am building a relatively simple circuit which essentially consists of two lead acid batteries rated at 12V and two motors rated at 12V. My original plan is to wire them all in series, and control them with a motor driver of some sort using a pwm signal. However, all of the motor drivers I can find that can handle this are rather expensive, and it seems as though it would be just as acceptable to do it with one or two mosfets. I am not sure of what quality/type of mosfet to get, and where to place them within the circuit. I am thinking it would be easiest to do just one high quality one before both motors, but would I be able to control the speed of the motors using a pwm signal that way though? Any advice is appreciated.
EDIT: The mosfets will be controlled by a simple microcontroller such as a pic or avr.
Here are three N-FETs I have found that may work. 87A 100A 104A
Added [RM]:
Copied from a comment - extra data should be in question for easy reference.
The motors rated power is 337 Watts (at 2655 rpm, 172 oz-in, and 68 amps). The load is present at all times, and should stall minimally, but I have a current sensing ic in place to monitor the current and reduce the voltage if it starts getting too high. I don't care too much about bidirectional control, and the current measuring circuit is a 180 A rated attopilot chip.
AI: Do not put the whole shebang in series. Instead deploy your circuit with each battery individually connected to a motor and then through a N-FET to GND. PWM Drive on the N-FET gates will allow you to control the speed of the motors. Use two PWM signals to permit individual control of each motor's speed.
Selection of an N-FET type will take some careful work. Since your motor can draw 27A at normal load (133A at stall) you will need some beefy parts. If you design the circuit around nominal conditions plus a guard band you may choose a 70 or 80A N-FET. If so then you will have to design the circuit with some intrinsic current limiting or add some current overload sensing that couples back into the FET gates to shut them down when the current starts to get to high. Further details regarding FET selection are stymied by lack data regarding what you want to control the gates of the FET with.
Keep in mind that this configuration causes you to only be able to control the motor in one direction of rotation. If you require bi-directional control then you will need an H-Bridge for each motor that consists of four power FETs per bridge. |
H: Why do standard cells typically have slower timing with high temperature, and faster timing with low temperature?
Threshhold voltage typically falls with increasing temperature, which would seem to indicate that high temperature operating conditions should result in faster gates than low temperature OCs. However, standard cells typically have slower timing with high temperature, and faster timing with low temperature. What is the physical explanation as to why this is the case? I would guess that it has to do with the carrier mobility.
AI: High temperature implies more thermal noise and random collisions of electrons, thus device resistance goes up and electron mobility goes down.
If resistance goes up then the RC constant(s) across the device nodes will be higher and speed will be lower, as speed is inversely related to RC.
edit: to address 2nd comment
From 'CMOS, Cirucit Design, Layout, and Simulation' R. Baker p 176:
(w/ respect to temperature effects)--
For digital applications, the change in threshold voltage is usually
negligible compared to the mobility changes; that is, the mobility
changing generally has a much greater impact on the propagation delay
than does the threshold voltage. |
H: Trying to build gps tracking device
I am an engineering undergrad trying to build one gps tracking device with features like live streaming, current position, average speed, etc. (and if possible then sound etc.) from some computer located somewhere else.
I know coding very well and i am good in mechanical part, but i guess it will require more of electrical part.
Can any expert in this field just help me get started? I read few tutorials which suggested approaches like rfid, etc. But i am not sure how to "actually" do it, like configure internet to device and what all parts do i need to buy/make, I am just looking to make this device, in the best possible way i can.
Any help to get me started?
AI: It's actually not that hard to do. All you need is a microcontroller, a gps receiver for low power electronics, and a cellular modem (to transmit the signal every X minutes.)
For an example of the hardware you need,
A Raspberry Pi because it's basicaly a cheap computer that you can run Linux on, not that linux is needed, there are 8-bit processors that can do this, take a look at Sending SMS via and Arduino, but the Raspberry also has USB ports and some driver support so you can get it built faster.
For the GPS receiver, there are a ton of options, I like somthing like this GPS to USB because you can mount the antenna away from your equipment (this makes a BIG difference.) Once again, if you want this to be more of an embedded solution you could use a GPS to Serial Receiver with an 8 bit processor controller.
To transmit the coordinates via the web or sms, etc. you would want a USB cell modem. There are serial ones out there, but they are getting harder and more expensive to find.
A battery power supply or a regulator to provided power from a vehicle etc.
That's about it. You would have the controller get the GPS coordinates every X minutes (you probably don't want to get more than 1 a minute as this will use more power and won't really help much with the detail.) Once it has the GPS coordinates all it has to do is send them via the cellular modem (messaging rates may apply,) to your web server. Then your server could map the current location and do the math to calculate speed, heading, etc. There is a lot of available information online about how to do all this.
The main thing you probably need to think about is the power requirements needed, and is this a hidden unit or just a personal/company tracking system. If it is hidden, it will probably need a battery, and you would be better off going with an 8 bit processor since that will reduce the power requirements/battery life and size. Also you may want to log coordinates if for whatever reason the unit was unable to connect to the server via the modem (out of cell range, etc.) so some form of memory may be needed. You could do this in eeprom but I wouldn't because of the limited rewrite lifetime.
Hope that helps get you started. I made a similar project about 6 years ago, and the biggest problem I had was I used a GPS receiver that was built into my unit, so the entire thing had to be mounted somewhere it could get signal, instead of just the antenna, and this made it hard to position anywhere convenient. |
H: Find total resistance
The book (Principles of Electric Circuits by Thomas Floyd 9th edition, International edition) says it's 1.955k Ω.
When I calculate I get (R1 || R2) + (R3 || R4) + R5 = 3.38k Ω.
AI: I assume the total resistance is requested from the + output of the 2V supply to GND. That gives:
(((R4 || R5) + R3) || R2) + R1 = 1.95498k |
H: Reasons for Popularity of PowerPC for Embedded Designs
The question was asked before and is not active anymore, but I am not at all satisfied with the answer:
What's so great about PPC? There's gotta be something
According to David Kessner's answer, there were once reasons for PowerPC, but there are not any today.
While this may be true for desktop computers, it cannot be true for embedded systems. All three major gaming consoles use a PowerPC (Wii, Xbox 360, PS3). Microsoft, focusing completely on Intel at that time, even switched for their new Xbox from Intel to PowerPC in 2005.
Network devices feature in many cases PPC, many automotive microcontrollers do as well and there are still new PPC product developments (e.g. by Freescale). PowerPC's can in addition be found in the storage system, the medical, or industrial automation domains.
Backward compatibility (support of legacy software) is one driver, of course. But there have to be more.
Is it the high scalability and application programming interface compatibility within the PowerPC family, from small microcontrollers to processors for high performance computing?
The robustness of the design and experience with certification of functional safety?
Support of high temperature ranges, especially fan-less designs for high temperatures?
AI: To get the price down to where the gaming consoles require, they all needed custom chips that included a CPU (or three). Of course Microsoft switched from an Intel CPU to a PowerPC, because there was/is no way that Intel will allow their CPU in a custom chip-- especially if it wasn't Intel that was fabbing the chip.
At the time the XBox 360 was created, the PowerPC was the fastest and most reasonable CPU to use. This is no longer the case, where ARM has beat it out. I predict that ARM will be the CPU of choice for the new round of gaming consoles that should be out in the next year or two.
While there are new PPC devices, there are also new 8051 and Coldfire devices. So this, by itself, is not a good indication of how "current" the PPC is. New ARM devices outnumber new PPC devices by maybe 50 to 1.
Now to directly address your questions:
Is it the high scalability and application programming interface
compatibility within the PowerPC family, from small microcontrollers
to processors for high performance computing?
The PPC does not currently offer any scalability advantages. The ARM is actually easier in this department since that CPU was designed with multi-core processing in mind.
The PPC does not offer any API compatibility that ARM or other CPU's do not also offer. Modern software is written completely in a high level language, and so the CPU architecture does not play into API compatibility. Almost nothing is written in assembly language these days, especially on high performance 32/64 bit CPU's.
The robustness of the design and experience with certification of
functional safety?
It is unclear on what you mean by this. For most embedded applications that do not require life-safety, military, or aerospace levels of reliability, the PPC offers no advantage today. ARM's have been proven out just as much, or even more, than PPC. For life-safety, military, or aerospace then there might be an advantage but those markets tend to lag the rest of the world by several generations anyway.
Support of high temperature ranges, especially fan-less designs for
high temperatures?
The ARM is a much lower power architecture, which is why ARM is used in mobile devices while PPC is not. Lower power = lower heat = much easier to handle high temperature ranges. Advantage ARM.
Backward compatibility (support of legacy software) is one driver, of
course. But there have to be more.
Why does there have to be more? I'm positive that this is why 90% of current PPC designs are still using PPC. The other 10% is because some people are just stuck in their ways. There are many examples of old architectures that continue to be used for no good reason. You can still fine Z80 and 6502's being put into new designs, and nobody is calling those good or currently popular.
The reason for the PPC popularity is that it was the right CPU at the right time in the market. Before that it was the MIPS CPU's. Now it's ARM. You still see PPC used because some things just take a long time to die out. There are still MIPS designs out there too.
@NichHalden was also completely correct on this subject. |
H: Can you store energy in an inductor and use it later?
My company uses supercaps to power the device if power is cut. I was wondering if you could do the same thing with an inductor. If you can't, why not?
AI: The magnetic field which stores the energy is a function of the current through the inductor: no current, no field, no energy. You'll need an active circuit to keep that current flowing, once you cut the current the inductor will release the magnetic field's energy also as a current, and the inductor becomes a current source (whereas its dual, the capacitor is a voltage source).
Aspects of the capacitor-inductor duality in energy storage terms:
\begin{array}{ll}
\mbox{Capacitor} & \mbox{Inductor} \\
\mbox{* stores energy in electric field} & \mbox{* stores energy in magnetic field} \\
\mbox{* must be open loop (infinite resistance) } & \mbox{* must be closed loop (zero resistance)} \\
\mbox{* loses energy through parallel resistance} & \mbox{* loses energy through series resistance} \end{array}
A superconductor can sustain a magnetic field in a zero resistance current loop, however.
Unfortunately you'll always see the fumes of water vapor caused by the liquid nitrogen in pictures like this, which means temperatures below -183 °C. |
H: How to power an arduino controlled string of RGB LED's from separate power source
I'm new to electronics and working on a hobby project that will have an arduino board running 5 separate strings of RGB LED's. I'll be using a PWM chip (TLC 5940) so I can independently control tho color's of each of the 5 strings of lights. My question is how do I power the LED's. I know they can't be powered from the arduino pins and I highly suspect that they can't be powered from the PWM chip.
I think what I'll have to do is run the PWM output to the base of a transistor and have the string of LED's powered through the transistor with an appropriate power source. Can someone please confirm that and if it is incorrect correct my mistake in layman's terms?
A couple other questions related to this:
1) Is there any "lag" with transistors? i.e. if I run PWM to the base of a transistor will the emitter of the transistor produce an identical source (but amplified)?
2) I saw in an answer to a previous question than I need to look into constant current for the LED's. I still need to do that research but what does a constant current device look like? Is it just an IC you can buy? Can someone provide a part number or link to a page that has one so I can more effectively research how to use them.
AI: Simply power the LED driver (i.e., its VCC pin) with a battery (or other higher-current-capable source), since the Arduino pins are only capable of sourcing 50 mA.
First of all, you won't even need a transistor, if you use a battery as I mentioned above. But to answer your question, if you were using a transistor: while there is lag, lag won't be significant enough to affect your application here.
And secondly, the TLC5940 is a constant-current driver, so you're fine. A constant current source/sink is exactly that -- it ensures a constant current flows independent of power supply fluctuations/other conditions. Thus your LEDs will light up with constant brightness.
Finally, a clarification regarding PWM with the TLC5940: You don't use PWM of the Arduino pin to directly create PWM on the TLC5940 I/O pins; that's NOT how it works. Instead, the TLC5940 uses serial communication with Arduino -- so you would send it instructions from the Arduino (via SPI or bit-banging, for example; see this TLC5940 Arduino library), and the TLC5940 reads those instructions and performs PWM on the desired I/O pins as instructed. |
H: Processor Running C Natively
A friend of mine came up with an idea for something dealing with a micro-processor running C natively. Problem is, we need to be able to know if there is a processor out there already before we spend our time and money on something. Does anybody have any clue about such a processor?
AI: Of course to properly look at this we must know what it means to "Natively" execute anything. On the surface this seems like an easy question, but it isn't. Let me elaborate.
But first, let me say that I am massively simplifying this description! There is no way I can explain this in a reasonable number of words without some over-arching generalizations and simplifications. Deal with it.
Let's start with a bit-slice processor (BSP) design. These are the easiest of processors to design, the hardest to program for, the smallest in terms of logic size, and the worst in terms of code-density. Essentially, an instruction word in a bit-slice processor never goes through an instruction decode step. The instruction word is somewhat pre-decoded. The individual bits of the instruction goes directly to latches, muxes, ALUs, etc inside the processor. Consequently the instruction word can be very large. Instructions larger than 256 bits is not uncommon! Normal BSP's are purpose built for a single task and are not general purpose CPU's. While BSP's sound somewhat exotic, they are used all over the place but are so deeply embedded that you probably don't notice.
One step up from a BSP is a RISC CPU. The overall data flow is changed to be more general purpose, and an instruction decode stage is added to the pipeline. Inside the RISC CPU there is still a giant instuction word, like the BSP, except that the instruction decode is used to convert the 32-bit instruction into that giant instruction word. Fundamentally this instruction decode is like a giant look up table that converts the 32-bit instruction to the giant instruction word used in the BSP. It is not literally a giant look up table, but that is what it effectively is. This instruction decode limits what the instructions can do, but greatly simplifies programming and is what turns this thing into a general purpose CPU.
Next step up we get to a CISC CPU. The main difference is that the instruction decode becomes more complex. Instead of the ID being just a huge lookup table, the ID converts the 32-bit instruction into a series of BSP-like instructions. You can really think of each 32-bit instruction and being a small subroutine call inside a BSP.
Next, you have assembly language. This is the ASCII text that you write that gets converted into those 32-bit instructions by the assembler and linker. While this is the lowest level of programming that a human might do, there is not always a one to one relationship between what the human writes and what the CPU executes. Even here the assembler is doing some level of interpreting and manipulating of the final instructions. For example, MIPS assemblers will rearrange or add instructions to deal with pipeline hazards. I'm sure other assemblers will do something similar.
Then you have a fully interpreted language. In this language, the interpreter has to parse the ASCII of each line or command every time that line is executed. This is what most scripting languages do.
There are also fully compiled languages, like C/C++, in which a compiler takes the ASCII source code and converts it into assembly language (or sometimes directly into the normal 32-bit opcodes).
Between interpreted and compiled languages there is "tokenized languages". These are most like interpreted languages, but the ASCII source code is parsed only once. The net effect is that the execution speed is much quicker and a fully interpreted language, but you still have the flexibility of an interpreted language and don't have the compile time of a compiled language. The term "tokenized" is used because the code is pre-parsed, or tokenized, into something that is easier to deal with than straight ASCII. Java is a good example of a tokenized language.
There have also been "BASIC CPUs", essentially these are CPU's that have a BASIC interpreter built into them. They are a normal MCU where the Flash EPROM contains a BASIC interpreter as well as the pre-tokenized BASIC program.
So, back to the question: What does it mean to natively execute a program? Does the program have to be down to the BSP level to be native? If so then almost nothing is native. What about the 32-bit instruction level? Ok, that's what most would call native since that is what the "CPU block" is given to execute. Normally anything ASCII is not "native" since some level of interpretation needs to be done before it can be executed. How about those BASIC MCU's? Do they natively execute BASIC? Probably not.
But let's look more at those BASIC MCU's. The BASIC interpreter is stored in the Flash EPROM and is made up of those MCU's standard opcodes. But what if the interpreter was actually part of a CISC CPU's instruction decode? Instead of the instruction decode running some subroutine for an "Multiple and ADD with Saturation" instruction, it ran a subroutine for "let X=5 + y". Would that CPU then be said to execute BASIC natively? I would!
But let's look at the C language specifically. And let's assume some crazy CISC processor that would interpret ASCII C source code directly. As you look at the tasks of managing files, parsing ASCII, and managing variables you notice two things: Either the BSP at the core of our C-CPU becomes absolutely huge and unmanageable or the BSP starts to look like what any other modern CPU has. But if the BSP looks similar to other CPU's then the instruction decode must do all the hard work, which it is not well suited for either.
What you end up with if you follow this to it's natural conclusion is something that looks like a normal RISC or CISC CPU that has a C Interpreter already programmed into it's Flash EPROM. Exactly like those Basic MCU's I mentioned before!
The net result is that a CPU that runs C "natively" is not useful-- even as an educational project. I could go on and on, but I'm almost late for a meeting now. Enjoy! |
H: Arduino Serial print changes behavior of program undesireably
I'm using a loop counter, declared in a header:
int loop_counter = 0;
I use this counter to trigger an event every so often. I used to use a modulo for this same type of behavior, but I simplified it so it's easier to work with (it still results in the same behavior)
void loop() {
if(loop_counter > 100) loop_counter = 0;
else loop_counter++;
//Serial.println("hey");
if(loop_counter == 0) {
//do_something_important();
}
}
All is well and good, until I try communicating with Serial by uncommenting the //Serial.println("hey"); ("hey" in this example because, to me, this behavior is absurd).
This results in loop_counter never triggering the do_something_important(); section of code. I tried declaring loop_counter as volatile, that didn't change anything. I tried Serial.print ing loop_counter, and I was also getting odd behavior (it would freeze the loop). Serial.println("hey"); works in the sense that in the Serial monitor I get plenty of "hey", (i.e. quickly a lot more than 100 "heys", the number of iterations at which the other section of code should trigger)
What could possibly be causing the usage of Serial, with data that is not (as far as I can tell) tied to loop_counter completely prevent it from working properly?
EDIT: Here is the part of the main file that ended up posing the problem (well, contributing the most to it (using too much memory)):
void display_state() {
int i,j,index=0;
short alive[256][2];
for(i=0;i<num_rows;i++) {
for(j=0;j<num_cols;j++) {
if(led_matrix[i][j]==1) {
alive[index][0]=i;
alive[index][1]=j;
index++;
}
}
}
alive[index][0]=NULL; //Null-terminate.
alive[index][1]=NULL;
//383 is a great number
for(int idx=0;idx < index; idx++) {
display(alive[idx][0],alive[idx][1]);
delayMicroseconds(283);
}
}
Here is "letters.h":
#ifndef _MY_LETTERS_H
#define _MY_LETTERS_H
#define nrows 4
#define ncols 4
#define num_rows 16
#define num_cols 16
#define MAX_WORD_LENGTH 16
#define NUMBER_OF_CHARACTERS 26
#include <stdlib.h>
int loop_counter = 0;
short led_matrix[num_rows][num_cols];
const short letter_a[nrows][ncols] = {{0,1,1,0},
{1,0,0,1},
{1,1,1,1},
{1,0,0,1}};
const short letter_b[nrows][ncols] = {{1,0,0,0},{1,1,1,0},{1,0,1,0},{1,1,1,0}};
const short letter_c[nrows][ncols] = {{0,1,1,1},{1,0,0,0},{1,0,0,0},{0,1,1,1}};
const short letter_t[nrows][ncols] = {{1,1,1,1},{0,1,0,0},{0,1,0,0},{0,1,0,0}};
typedef struct letter_node{
const short *data;
letter_node *next;
int x;
int y;
} letter_node;
letter_node aa = {&letter_a[0][0],NULL,1,1};
letter_node bb = {&letter_b[0][0],NULL,1,1};
letter_node cc = {&letter_c[0][0],NULL,1,1};
letter_node tt = {&letter_t[0][0],NULL,1,1};
letter_node letter_map[NUMBER_OF_CHARACTERS];
#endif
Some more information:
- I'm using an Uno (ATMega328)
AI: I also had a similar problem to this, and am very sure that yours is also out of stack space related. Try shrinking the code as much as possible.
In my case code would sometimes run when I had a serial message in it, but then it would seem to not run when I did not. I also had a case where sending serial messages would cause the arduino to reset endlessly.
I was also using an arduino328. Likely you should reduce the size of your array if you have any to the smallest size that is acceptable. |
H: What are pump probe measurements?
I was in class today, and we had a presentation by a student on how tunable lasers are used in fiber optics and change the wavelength. He also explained that by "pump probe measurements" a "sample gets excited and can be measured over time".
Can anyone explain what this means? What is a "sample"? How are "pump probe measurements" useful when dealing with tunable lasers?
AI: From the Encyclopedia of Laser Physics and Technology:
Pump–probe measurements can be used to obtain information on ultrafast
phenomena. The general principle is the following. A sample (e.g. a
SESAM) is hit by some pump pulse, which generates some kind of
excitation (or other modification) in the sample. After an adjustable
time delay (controlled with an optical delay line), a probe pulse hits
the sample, and its transmission or reflection is measured. By
monitoring the probe signal as a function of the time delay, it is
possible to obtain information on the decay of the generated
excitation, or on other processes initiated by the pump pulses.
From the Wikipedia article on Time-resolved spectroscopy:
Transient-absorption spectroscopy is an extension of absorption
spectroscopy. Here, the absorbance at a particular wavelength or range
of wavelengths of a sample is measured as a function of time after
excitation by a flash of light. In a typical experiment, both the
light for excitation ('pump') and the light for measuring the
absorbance ('probe') are generated by a pulsed laser.
The "sample" is anything that you want to get the spectrogram of.
This article mentions photochemistry as one possible application. It also notes that:
in some applications such as spectroscopy and pump-probe experiments,
the laser wavelength must be tuned continuously during the experiment
or test.
So, it's not that pump-probe measurements are useful when dealing with tunable lasers, its that tunable lasers are useful when dealing with pump-probe measurements. |
H: Replacing a battery in a UPS
I recently replaced the battery in my APC Back-UPS CS 650 and of course I didn't opt for an original APC battery, but just bought a similar one from the corner electronics shop.
Apart from the label both batteries looked exactly the same, but still the old one used to provide 20 minutes of backup time and the new one only 10 minutes. The label on the original battery only states 'original APC replacement' and things like 'wash your hands when spoiling the acid contained in it'. Nothing indicated exact specs, so I just bought one that looks exactly the same and has similar voltage (12V).
So what is different, does APC really manage to put 14Ah in their original battery and still only have a 12V/7Ah form factor? Did I buy a bad battery? Is it a difference between deep cycle vs. non-deep cycle battery? Are there different types of batteries that I should have been aware of before buying one?
AI: According to APC, the original RBC17 battery has "108 Volt-Amp-Hour" (i.e., 9 AH) capacity.
It may also have better deep-discharge characteristics than a generic 7AH battery. |
H: Ground/short circuit confusion
I am reading the book Electronic Principles by Malvino and I found the circuit shown below.
It asks to find the A(gain) when the switch is in position 1 and in position 2.
I am not sure about this but in position 1 I found that A = 10k/10k + 1 = 2.
What about position 2?
AI: Adding on to Dave's answer,
An ideal op-amp follows two basic rules when operating under closed-loop feedback conditions:
The voltage at the two inputs are equal
There is no current flowing into or out of the op-amp inputs
Position 1:
In position 1, the voltage at the bottom input is Vin. Using rule 1, the voltage at node A is also Vin.
Since there's no voltage difference across the left resistor, there's no current flowing in. Using Kirchoff's current law,
\begin{equation}
\sum{I_A} = 0
\end{equation}
Since there is no current from Vin to node A and since the op-amp input can't source/sink any current, that must mean there is also no current flowing from node A to Vout, thus Vout = VA = Vin. This means the gain is 1.
Position 2:
Here, the two op-amp inputs are set to 0V (due to rule 1). The current flowing from Vin to node A is thus:
\begin{equation}
I = \frac{Vin}{R}
\end{equation}
Again, the op-amp input sources/sinks no current so that means the current flowing from node A to Vout is:
\begin{equation}
I = \frac{0 - Vout}{R} = \frac{Vin}{R}
\end{equation}
Solving for Vout, we get
\begin{equation}
Vout = -Vin
\end{equation}
Thus getting the output gain of -1. |
H: RFI/AC Filter Rejection for Instrumenation Amplifiers
I'm attempting to measure the voltage developed across a very long piece of cable (upto 500m bundle). The issue is that the cable picks up a lot of noise from nearby radio stations and also has a 50 Hz component which I assume comes from the mains.
I would like to have a filter before my instrumentation amplifier, which I use to amplify the developed voltage about 500x. What sort of low pass filter should I have before the inputs of the in.amp? Do I gain anything by using a active filter or would a simple RC filter do the job?
Note: I would like to reject all AC signals so they don't interfere with my measurement. I have tried a RC low pass filter with R = 10K and C = 22u. This gives a cut off frequency of 0.72 Hz. Is there any disadvantage of using such a aggressive filter (other than the fact that the capacitor will charge very slowly?)
AI: First, you don't want to get rid of all AC. If you did, the reading would never change. You need frequencies below some level to get thru, so you have to decide what that level is. You also should look at this in the time domain after deciding how long you are willing to wait for a reading and how accurate it must be. That will implicitly define some frequency response, but I think settling time is a more relevant way to think about it in this case.
Your problem is more complicated due to diode D1 in the circuit. I don't see why it is there and what it is doing for you. If you can simply replace the diode with a connection, then you have a single ended measurement instead of a differential one. As it is now, you have to worry about common mode and differential mode issues separately.
You want to do most of the filtering passively because that will work to much higher frequencies than what active electronics such as in the inamp can handle. This includes the common mode part of the signal. In the ideal case, that doesn't matter, but the inamp isn't ideal. Above some frequency, common mode signal will change faster than the active electronics in the inamp can compensate for it, and some will appear as differential mode signal on the output. Radio frequencies are likely well above what the inamp can deal with correctly.
Unfortunately, filtering the common mode part of the signal is tricky. Any assymetry in the filters results in a differential mode signal. If you absolutely must have D1 there for some reason, then I would filter each line separately with a single R-C filter at a few kHz. That's still well above any real signal, but low enough that the inamp should be able to take it from there. 1 kΩ followed by a 100 nF ceramic cap to ground should do fine. That is a low pass rolloff of 1.6 kHz, which is well above any signal you care about, but low enough to filter out the nasty stuff that will confuse the inamp. For example, 1 MHz would be down by over 50 dB.
Now that the two signals contain only frequencies the inamp can deal with, you can run these straight into the inamp. You can put another cap directly accross the inamp inputs as Steven suggested. This will work with both resistors on each of the lines as if they were in series. If you put another 100 nF cap there, then the low pass rolloff frequency would be 800 Hz.
You now have a nice single ended output with about 800 Hz rolloff and radio pickup eliminated. Here is where I would put a lower dominant filter that is adjusted as low as possible given your settling time constraint. Let's say you need the signal to settle to 1 part in 1000 and are willing to wait 2 seconds for that. For a single pole filter, the 1:1000 specifies 7 time constants. The time constant of the filter is therefore 2s/7 = 290 ms = R*C. If we pick 1 µF for C, then R would need to be 290ms / 1µF = 290 kΩ. Those are tractable values, although you will probably need another buffer amp after the filter. Just to see what this came out to in frequency space, 1 µF and 290 kΩ have a low pass rolloff of 550 mHz. That is way below the other low pass filters we put before the inamp, so we can ignore them for the purpose of settling time and ultimate bandwidth. Their purpose was only to limit the frequencies going into the inamp so that it works as intended. |
H: TDA7386 mounting
I'm working on a little project to build an audio amplifier and I have everything ready except that I cannot figure out how to connect TDA7386 to the circuit. Is wire wrapping the only choice here? Or is there a simpler way to mount the chip? I would want to avoid soldering as much as possible since it's still within its prototyping stage.
It's this little guy here:
AI: This is clearly meant to be soldered. You said you want to avoid soldering, but your reason that you're still in the prototype stage doesn't make sense. You don't say what this TDA7386 thing does nor did you provide a link, but if it's a audio power amp then it will need good solid power connectections at the very least.
I would solder it on the board along with everything else. That way you can eliminate bad connections as one issue when you're testing the circuit. It also lets you put bypass caps locally right where they are needed, have better all around signal integrety, etc. Signal to noise ratio is a big issue with audio circuits, so for meaningful testing you should be using a layout and interconnect as close as possible to the final product.
Think about the cost too. The time to wire warp this, connect all those little wires to the board, check it, deal with the resulting screwups anyway, deal with the questionable supply and ground and signals, all add up to more than adding the footprint to the boad and soldering this part. Sooner or later you'll have to make the footprint and include it in your circuit, so doing it now doesn't cost any time in the long run. In other words, putting everything on a board is cheaper than some flaky rigged up test circuit with flying leads all over the place.
Added:
Now that the datasheet is available, I advise you even more strongly not to try wire wrapping this. This is a power amp with significant currents. Merely hooking up the amp is easy, but good layout is important. You therefore want to test that in your very first prototype. There will be enough current flowing around that ground offsets, crosstalk, and possibly even unstable operation due to unexpected feedback are all possibilities and things that need to be addressed by careful layout.
A sortof working circuit with wires all over the place won't tell much other than you hooked it up right, and that's the 1% problem. At worst, the wire wrap version will have all sorts of problems, which will be quite different when you put this thing on a board. Note the suggested layout section in the datasheet. You don't usually see that for parts unless the layout is a important part of the design. |
H: What would happen if the output leads of a multi-phase transformer were shorted together?
Just what the question states, and there isn't any design rationale behind the question.
I just opened up a dead CFL (6 tubes; 3-pairs), and it looks to have an itsy little transformer within. This transformer has super-fine wires in the winding with, what looks like, a large number of coils. The output appears to come in 3-pairs of wires - probably 3-phase HV - one for each pair of tubes.
Anyway, I'm curious what would happen if the hot-lead of each phase were shorted together; the same with the cold-leads.
Thus I would be binding the output wires as ABC, and A'B'C' to form a common output.
My guess is the transformer (if that's what it is) would heat up, and have a reduced life-span.
AI: Since no one else has stated it explicitly, I will: The power supply inside a CFL is a non-isolated supply, and the tiny transformer you see is not connected directly to the mains.
Also, any transformer in which all of the windings share the same magnetic path is "single phase", not three-phase. There are 3-phase transformers, but they have three distinct magnetic paths inside.
The transformer is actually part of a high-frequency (typically 10s of kHz) oscillator that produces the various voltages needed to drive the lamp tube. One or more of the windings is driven by a transistor or two, one or more is used for feeback to make the transistor oscillate, and one or more is used to drive the tube itself.
There are two ways you can connect multiple windings on the same transformer together:
You can connect them in series, which adds their voltages. The current is limited to the rating of the lowest-rated individual winding.
You can connect them in parallel, as long as two criteria are met. First, they need to have the same number of turns, and second, they need to be connected in phase. If either of these is violated, then excessive current will flow and the transformer (and/or its drive circuit) will likely be damaged. |
H: home brew isolated oscilloscope lead
The ground clip for an oscilloscope lead is normally connected within the instrument to the power supply earth, and there are surprising circumstances where this could matter. The situation is very well explained in "EEVblog #279 – How NOT To Blow Up Your Oscilloscope!"
Leads with galvanic isolation are very expensive, so, is there a good home-brew design or kit available? I realise that protection against high voltages might put this outside the home-brew area, but one for lower voltages would protect against dangers, such as that, described by Dave Jones in the EEVblog, of destroying the on board regulation of an Arduino via the ground connection of a USB lead.
AI: Another choice is if your have a multi input 'scope, take two leads, connect their grounds leads together (and tape if needed to prevent shorting) and then use one as "signal" and the other as "ground" and use the A + (inv. B) functions of your scope to measure the signal and to remove the ground signal. It means you use more leads and can interfere with some scope functions. BUt it's another choice for you ... |
H: How do I choose the right replacement fuse for my multimeter?
I have a BK Precision 2709B Multimeter. I managed to blow the uA fuse (500mA/500V fast blow ceramic) on it. Is it an ok to replace this fuse with a 500mA/1kV fast blow ceramic fuse? What impact would this have?
AI: The impact would be that the fuse should be able to break the circuit if you connect the multimeter to a 1 kV voltage source.
Basically for fuses, the voltage rating tells you which is the highest voltage the fuse will break. The higher the rating is, the safer you are. If, for example, you connect the fuse to a voltage higher than its rating, and the fuse opens, it could fail to break the connection in the rated time period.
For example, a plasma arc may appear at the location the wire inside the fuse breaks that will remain conductive for some time. For that reason, high voltage fuses often have the wire going through some sort of a labyrinth, in order to provide the long distance in hope that the plasma arc will extinguish inside of the fuse.
The current rating tells you how much current can go through the fuse without it breaking. In general, you should substitute old fuse with a fuse that has same rating. If that is not possible, go for one with a lower rating. This way, you'll prevent the instrument from using its full current range, but you'll avoid having some part of the instrument other than a fuse from acting as a fuse.
As for the speed rating, it's always best to go with the same rating as on the old fuse. Fast fuses will react to overcurrent very quickly, while the slow fuses will allow overcurrent for some time. Some devices that have large in-rush currents may use slow fuses, so the fuse doesn't trip when the device is turned on. On the other hand, using a slow fuse on a device that expects a fast fuse will bring the danger of having some other part of the device act as a fuse. |
H: What do you call the drawing which contains tracks, pads and drilling points of a PCB layer/side?
Example:
Does this drawing has a technical name?
I see that people usually call these drawings "PCB". But, PCB is physical object, physical implementation of circuit, isn't it? Is these kind of drawings really called "PCB", or do they have a special name?
AI: I would also call the drawing you show a "PCB layout", as it obviously isn't the PCB object. But like Wouter already indicated the definition of a PCB contains a lot more information that the copper pattern shown. First, this is just one layer, there could be a second copper pattern on the top/bottom side (for PTH the default copper layer is bottom, for SMT it's top), and inner layers, up to about 20 in the extreme.
In general you won't find a drawing that includes tracks/pads and drillings, because that's already too much information for one drawing. The drillings drawing will show a series of different markers, like +, x, T, etc, for different hole diameters. Usually you'll have 1 drill drawing, since the hole will go through all layers in most cases. If you have the wallet for it you can have blind or buried vias, and the the drilling will be different for each layer.
My drawings start with the board outline, and that's often a pretty boring drawing, as it can be just a rectangle, but also a more complex outline like this one
is possible. Each of the component layers will have
a copper layer (no distinction is made between tracks and pads)
a solder mask layer (which leaves the pads clear)
a "silk" layer, containing texts to be printed, like refdes's, logo's and identification
a mechanical/keep-out layer, which shows the designer where he shouldn't place components, or indicating how much height he has available in certain areas. (This layer is of no use for the PCB manufacturer.)
So "PCB layout" is only part of the drawings, and in many cases should be called "PCB layout top" or "PCB layout bottom". |
H: Can you use an opto-coupler to isolate the incoming supply from the output
I would like to breakout the 5v and 12v outputs from my PC's psu. This is because of convience and accessibility. Would it be possible to use an optocoupler to isolate the supply coming from the psu? so that in the event of a dead short, it won't cause my pc to reset itself. Am only asking for a minimum 1A output for both rails. Ideally
AI: No. Opto-couplers transmit signal, not power.
If you are worried about shorting the output of the same power supply the PC is using, then it's probably best if you don't use it for that. You could put a regular fuse in series, but that will take a little time to react and won't protect against the immediate glitch. A "polyfuse" has enough resistance that even a short on the outside probably won't glitch the supply inside the PC enough to matter, but you have to be aware of the series resistance.
The PC power supply is unlikely to let a short damage it, but if you might be doing bad things like shorting it, you really should get a separate bench supply for powering your questionable stuff. |
H: Logistical issue with power transistor and arduino
I have a transistor which will be triggered by an arduino digital pin. When the transistor switch is closed, ~5 A is going to flow from the collector to the emitter. However, I was under the impression that both the base and the emitter need to be grounded at the same place. I'm worried about that kind of current going into the Arduino's ground, because I've heard it can't handle that much current. Is there a better way of doing this? Any advice is much appreciated.
Edit: I'm using a TIP3055 transistor and switching 12 VDC.
AI: You have stumbled upon a very, very important issue.
Take a look at two circuits with slightly different topologies:
The first circuit, as you can see, has the return lines branching out from a node that is close to a stable ground. In the second circuit, the currents returning from power circuits flow through the microcontroller's return line. The trace inductance and resistance will have a potentially significant voltage drop. A voltage across a "gnd" trace will cause your Arduino's power supply to be corrupted with unncecessary noise. Furthermore, the connectors that your arduino uses are rated up to 1A. The pcb traces pcb are even more prone to damage.
Connect your circuitry according to the upper image and your high current signals won't fry any traces on your Arduino. |
H: Transferring from Serial to RF communication
I am running an application that takes information and sends it over the serial port, with some processing etc done on my proprietary board (using an ATMEL simple Micro-controller). I am testing to check on how much stress I am putting on the micro-controller to verify what I will use later on with my application depending on the stress levels I see.
Now serial is one thing, but I would like to communicate wirelessly to transfer my information (can be from a few kb to a couple mb of information). Should I see any major differences in the stress on the processor if I'm communicating through serial as opposed to RF?
I have never really done anything with RF before (I'm a student), so I'd like to have some sort of idea on the different amounts of stress on this could induce compared to serial comm before I actually buy some more parts.
Thanks!
AI: "Serial communication" and "RF" are very broad terms - there are many different protocols and speeds that are used.
RF just means something happens wirelessly using radio transmission - this should be completely transparent to the microcontroller, so it still depends on the protocol and speeds involved. So the "stress" (I assume you mean processor utilisation) will be the same either way.
For instance, you can buy a serial to bluetooth module that "looks like" a UART to a microcontroller, even though the data is actually sent using the BT protocol internally. At the "other side" (the receiving module) the data is output in UART fashion, so all the internal stuff is hidden, and you just have to worry about normal UART issues.
Even with a simple transparent link (no protocol, just transmission of levels), the Rx module just outputs exactly what the Tx input logic level is at, so it's effectively as if there was a wire connecting the two pins.
Depepnding on exactly what type of RF module you use, there may be some setting up and monitoring required, but that's not exclusive to RF.
EDIT - here are a couple of examples of the BT-UART modules:
Version with header
SMD Version - this is one I purchased (picture below), and am currently using in a prototype (running at 115200) with no problems. It is an HC-05 (useful to know when looking for datasheets)
As you can see, these modules have an onboard antenna, so all that is needed is power and signal connections. |
H: Why do some laptop charges have ferrite cores on them?
I know why usb cables and other data cables have ferrite cores on them. My new laptop's charger also has a ferrite core on the side that connects to my laptop. Why is this?
I have a hunch that it might be to prevent the power cable from interfering with data cables and such, but DC power shouldn't really effect other sort of data, right?
AI: The DC power in your power cable is both produced by a switching power supply and consumed by a switching power supply, so while there is LC filtering at both ends, there is still more than just straight DC on the wire.
The ferrite core close to the laptop end of the cord is there to prevent electrical noise within the laptop from being radiated by the cord (which works as an excellent antenna). This noise is generated by both the switching battery charge regulator/internal power supply and all of the other high frequency digital components in the laptop. While such radiation might not interfere with nearby data cables (though it might), it does tend to get regulatory bodies concerned (FCC, etc.) From my experience, ferrite cores are generally used more to meet regulatory requirements than to maintain actual device functionality. |
H: How do I construct a SPICE model from a data-sheet?
This may not be the ideal forum for the question; please migrate if a forum is better suited for the question.
I'm looking at a component for which my attempts at locating a SPICE model online were fruitless. There are, however, datasheets of the component available for online reference. The SPICE model for a component probably draws upon the content of the datasheet for it...
So, how does one construct a SPICE model when the data-sheet is available for reference?
I'm looking at LTSpice
AI: Depending on the component the common method is to use a .MODEL card for basic elements (transistors, diodes) or for more complex components (ICs like Opamps, Regulators, etc) you can use either a sub-circuit model (made up of basic elements) or a behavioral model (using formulas to approximate behaviour)
This can get very complicated very quickly, how complex depends on how accurate you need the component to simulate, and requires pretty detailed knowledge of the component type so you know which datasheet parameters are important, how they translate to SPICE parameters, etc.
For an example of the type of parameters you need to know about (at least some of them), in LTSpice help look under LTSpice->Circuit Elements->Bipolar Transistor and look at the Gummel-Poon parameters.
As complex as this looks, you can use the defaults for most and just alter the basics like the Bf (Beta), Vje(b-e voltage), Cje (base emitter capacitance), Cjc, etc. It's helpful to look at the various models that come with LTSpice to get an idea of things.
The help provides a lot of useful information, so read it thoroughly. Also "A guide to Circuit Simulation using PSPICE" is a half decent book with some discussion of the model parameters. Also, google for info on the models, you should find plenty - for instance, here is an excellent document on the Gummel-Poon model and how to use it. |
H: Increase Microcontroller frequency and Speed
I am in process of upgrading the micro-controller of our project from Renesas M16C to RX63N. In our current M16C project we use 16HMz crystal. If in the new micro-controller Rx63N if I use the frequency to 196MHz using PLL, what are the points I need to consider specially in the code.
One thing I understand is the delay function used in the code may need to change according to our new instruction execution time.
Do I required to change or need focus on any other thing i.e. do I need to change anything in the serial communication between my new micro-controller and the external IC.
Do I need to change in my ADC logic? DO I need to change in my logic where I communicate to PC through RS232 chip?
Please guide me which area in my code, I need to give attention when I increase frequency and speed of the micro-controller.
AI: A microcontroller isn't aware of a thing like time; it only knows clock ticks. So the controller's logic can't tell the difference between running at 16 MHz and 192 MHz: a clock tick is a clock tick, and it will do exactly the same in 10 clock ticks for both frequencies.
That means that when actual time is relevant it's up to you to make sure the number of clock ticks gets properly translated to time. Suppose you have a 1 ms timer for the 16 MHz controller. It will give you an interrupt every 16 000 clock ticks, that's once every ms. Run that same code on a 192 MHz controller and you'll still get the interrupt every 16 000 clock ticks, but now that will be 83 µs. So change the timer's value to 192 000. Do this for everything to which real time is relevant. If you don't the 9600 bps UART will run 12 times too fast, so set the prescaler to a 12 times higher value.
The ADC is a bit different. That one does know about time: the measurement capacitor will droop at the same rate whether you run at 16 MHz or at 192 MHz. Or at 1 Hz. While the controller will run (or rather: "stroll") happily at 1 Hz, for the ADC that's too slow. The datasheet will tell you the minimum frequency it needs. |
H: Are CMOS outputs high-Z when unpowered?
If a microcontroller I/O pin drives an external MOSFET, and the microcontroller's power is turned off, will that MOSFET's gate be floating? I know sometimes a resistor is added to ground, but are there risks if I don't place the resistor?
AI: When turned off, the output state is undefined (almost certainly pretty high impedance, but there may be protection diodes and other features that will cause variations between parts), so it's best not to assume anything about it unless the datasheet specifies something definite. Of course you can test the output impedance yourself with a multimeter if you want to get an actual figure to go from.
If your design requires an output line to not be left floating when the micro is off, then definitely use the resistor. This is good practice anyway for cases where the microcontroller may malfunction (or the pin becomes physically disconnected), so the pin has a "default" state. |
H: UART receiver clock speed
I was trying to understand UART fundamentals.It is understood that
It is an asynchronous communication protocol and hence the TX and RX clocks are independent of each other
The data reception is guaranteed by the usage of start bit and one or more stop bits.Additionally the receiver must be aware of the data rate so as to generate suitable clock to drive the SIPO register used for reception.
The questions here are
It is mentioned that normally a clock of 16X the bit rate is used to recover the data. So how is the conversion of bps to clock frequency possible? Please provide me some references to study the clocking mechanism employed in UART receiver.
AI: Transmitter and receiver clocks are independent of each other, in the way that they're generated independently, but they should be matched well to ensure proper transmission.
The start bit, which is low, and the stop bit, which is high, guarantee that between two bytes there's always a high-to-low transition the receiver can synchronize on, but after that it's on its own: there are no further time cues it can use to tell successive bits apart. All it has is its own clock. So the most simple thing to do is starting from the start bit sample each bit at the middle of its time. For example, at 9600 bps a bit time is 104 µs, then it would sample the start bit at \$T_0\$ + 52 µs, the first data bit at \$T_0\$ + 52 µs + 104 µs, the second data bit at \$T_0\$ + 52 µs + 2 \$\times\$ 104 µs, and so on. \$T_0\$ is the falling edge of the start bit. While sampling the start bit isn't really necessary (you know it's low) it's useful to ascertain that the start edge wasn't a spike.
For a 52 µs timing you need twice the 9600 bps clock frequency, or 19200 Hz. But this is only a basic detecting method. More advanced (read: more accurate) methods will take several samples in a row, to avoid hitting just that one spike. Then you may indeed need a 16 \$\times\$ 9600 Hz clock to get 16 ticks per bit, of which you may use, say, 5 or so in what should be the middle of a bit. And the use a voting system to see whether it should be read as high or low.
If I recall correctly the 68HC11 took a few samples at the beginning, in the middle and at the end of a bit, the first and last presumably to resync if there would be a level change (which isn't guaranteed).
The sampling clock is not derived from the bit rate, it's the other way around. For 9600 bps you'll have to set the sampling clock to 153 600 Hz, which you'll derive through a prescaler from the microcontroller's clock frequency. Then the bit clock is derived from that by another division by 16.
unmatched clocks
This is what will happen if the receiver's clock isn't synchronous with the transmitter's:
The receiver's clock is 6.25 % slow, and you can see that sampling for every next bit will be later and later. A typical UART transmission consists of 10 bits: 1 start bit, a payload of 8 data bits, and 1 stop bit. Then if you sample in the middle of a bit you can afford to be half a bit off at the last bit, the stop bit. Half a bit on ten bits is 5 %, so with our 6.25 % deviation we'll run into problems. That shows clearly in the picture: already at the third data bit we're sampling near the edge. |
H: Hall-effect switch or photointerrupter
I'm dealing with a small automation project, a rack and pinion system controlled by an Arduino card with two limit switches to ensure that the rack moves within the boundaries.
I have been trying both photointerrupters and hall-effect switches and both of them seems working without problems.
Which sensor should I use if I need to prioritize reliability and correct functioning in time?
I heard that optical sensors are sensible to environmental light, dust and aging. Which are the minus points of an hall-effect switch?
In this case I mean a unipolar hall-effect switch, will all the logic already build in, and that it can be connected to a microcontroller with a simple pull-up resistor.
AI: I'm not hall sensor export but I can tell you I worked on a lot of consumer printers and scanners, and every time we did some kind of limit switch it was a hall effect. So that's got to tell you something ;)
With a little online research I found this paper that talks about the hall effect and it's disadvantages. They don't seem like they would negatively affect your project as you described it though.
Basically the limitations they mentioned are distance that the sensor works at (not really a problem for your limit switch), sensitivity change over temperature, and the presence of an offset voltage. Again if you're just detecting when something hits an edge I'd guess it wouldn't be a problem.
Here's the article:
http://tec.upc.es/ie/transp_2010-11/HallEffect.pdf |
H: How to distinguish between voltage resolution and bit resolution
One might way that an ADC has a resolution of 12-bits. One could also say that it has a resolution of 1.22mV (5v/4096).
Is one of these uses of the word 'resolution' incorrect?
Is there a word to replace one of these uses of the word 'resolution'?
Context: I am trying to write a datasheet. In the electrical properties table, I wish to describe the properties of the DAC outputs.
However, I seem to have used the word 'resolution' twice. This seems wrong to me. Is there a better word I could use for one of these?
AI: The 1.22mV is the step size, sometimes also called LSB. Take a look at this google search.
Step size:
Step size is the minimum change in input voltage which can be resolved
by the ADC. The concept of step size is closely associated with the
resolution of ADC.
Resolution:
The resolution of an ADC refers to the number of bits in the digital
output code of the ADC.
The relation between step size, resolution, and input range can be given by: |
H: Does an external interrupt interrupt ADC or does ADC stall interrupt?
I'm working on an RTC application with a 1Hz clock attached to the external interrupt pin on a PIC16f887. I also have continuous ADC operations happening along with the 1Hz clock.
My question is whether the ADC or the interrupt would get priority if both occur at the same time? What if the interrupt occurs during an ADC operation? Is the operation halted to allow the interrupt to be executed? This would obviously invalidate the reading.
Or does the interrupt wait for the ADC to finish?
AI: No, the interrupt occurring has no effect on the A/D. The A/D runs from the instruction clock or its own clock, depending on how you set it up. Both these keep going during a interrupt unless you deliberatly execute a SLEEP instruction to stop the processor clock.
At most, the 1 Hz interrupt could delay the interrupt routine processing the A/D conversion done, if you are doing this by using interrupts at all. There is no requirement that A/D results be handled by using interrupts. Even if so, the A/D will perform its conversion and write the result into ADRESH:ADRESL regardless of whether the processor is taking a interrupt or not. In fact, the processor itself is not really "in" a interrupt. That's only a software abstration. When the right conditions are met for a interrupt, the processor executes a call to location 4 and turns off the GIE bit in INTCON. That's all. The rest is up to firmware.
Once the A/D has finished a conversion, the result will be available in ADRESH:ADRESL. It is up to the firmware what to do with that. The value will stay there until a new conversion is completed. If the firmware doesn't start a new conversion until reading the result of the previous, then nothing can be lost. If a new conversion is started automatically, then it is possible for the previous data to be lost if the firmware didn't get around to reading ADRESH:ADRESL in time. Look at the acquisition and conversion time of the A/D and the instruction rate, and you will see there are generally plenty of instruction cycles to grab a conversion result, even if a new conversion is started automatically by the special event trigger of a CCP module. Just make sure the clock tick interrupt code is not so long that it takes longer than it takes the A/D to make a new result. This should be easy. Any lengthy processing is best handled by setting a flag and letting the foreground code get around to it when it gets around to it. The interrupt code should handle only the immediate servicing of the device. |
H: Are optical fibers full duplex?
Can optical fibers transmit in both directions simultaneously? Both single mode fibers and multi mode? What about if they we choose non-interfering wavelengths?
AI: Theoretically, such concepts are good to be imagined and, in fact, it is possible to make one that can communicate bidirectionally, but for reliability it is preferable to have a duplex with two fibers.
Know More in Single-Strand Fiber Technology— How it Works |
H: From a power consumption point of view, which should I use: SSR or Relay?
I'd like to find out which to use: a SSR (Solid State Relay) using TRIAC and optocoupler or a relay.
My consideration are from the point of power consumed, my challenge here is to choose the less power consumer one.
The biggest problem I found with a relay is through holding its state; the power is consumed first to activate the relay, then to hold the relay activated. If that lasts for long time, it will consume so much power.
My application is using a microcontroller that controls the flow of AC electricity that requires latching the state, what ever it is, for a long time.
So, from the point of power consumption, is the SSR (using a TRIAC and a MOC) or the relay more power hungry?
AI: A common relay may need 350 to 400 mW, and the current will depend on the nominal voltage. You'll be able to decrease the voltage after the relay is activated, however, and often go below 100 mW. But not all relay datasheets mention the minimum hold voltage.
An SSR has an IR LED which drops less than 1.5 V, often as low as 1.1 V, and may have enough at 10 mA, then that's less than 15 mW, far less than the electromechanical relay.
But while the SSR is more economic at the driving side, it will lose much more energy on the load side: a voltage drop of 1 V (optimistic) at 1 A is 1 W, while the relay with a resistance of200 mΩ will dissipate only 200 mW at 1 A. |
H: Volatile capacitance values at low frequencies
When I measure the capacitance of two cables I get very volatile values if I go to lower frequencies like 500 Hz. The capacitance is about 50 nF. Why does this happen?
AI: If this device measures capacitance by measuring the current at a given frequency, the current drops as the frequency goes down. This is due to capacitive reactance being proportional to frequency. (X = 2*pi*f*C) At low frequency, the current is very small and hard to measure reliably. |
H: Arduino as simple VT100 Terminal
In order to use my GLCD + Arduino as a display for LCD4Linux, using the LCD4Linux SimpleLCD Driver which sends out a subset of VT100 codes (CR and LF).
I have managed to isolate the VT100 codes from regular text using the following code:
// include the library code:
#include <glcd.h>
// include the Fonts
#include <fonts/allFonts.h>
void setup() {
// Initialize the GLCD
GLCD.Init();
// Select the font for the default text area
GLCD.SelectFont(System5x7);
GLCD.ClearScreen();
GLCD.println("Please wait: "); // output using Print class
GLCD.println(" System initializing"); // output using Print class
// could also use gText string output routine
// GLCD.Puts("Listening...\n");
Serial.begin(9600);
}
void loop()
{
char c;
// when characters arrive over the serial port...
if (Serial.available())
{
// read character from serial library buffer
c = Serial.read();
switch(c)
{
case 27:
if(handleVT100Code())
{
GLCD.ClearScreen();
}
break;
default:
// display character on glcd
GLCD.write(c); // use Print class for output
break;
}
}
}
boolean handleVT100Code()
{
char c;
String vt100Code;
while(Serial.available())
{
c = Serial.read();
vt100Code.concat(c);
if(c == 'H')
{
break;
}
}
if(vt100Code != "")
{
return(true);
}
}
So for now it should only clear the screen when a VT100 code is detected (nasty, but to test things out). What happens, however, is that the VT100 codes get printed out anyway, probably because GLCD.ClearScreen() takes up too much cpu time (?). When I don't use ClearScreen, but simple println the vt100Code variable (which I return from handleVT100Code()) the code gets printed (albeit with some false positives).
What would I have to do to make my program understand these two VT100 Codes (Carriage return and Line feed). I have done quite some searches for an out of the box implementation of a simple VT100 terminal, but there seem to be none. If there is some easier way of using the GLCD with LCD4Linux, you are more than welcome to tell me.
AI: You seem to have some confusion on a couple of different levels here.
First of all, CR and LF are not "VT100 codes" as such, they're just ordinary ASCII control characters (hex 0D/decimal 13 and hex 0A/decimal 10, respectively). Actual VT100 codes are multi-byte sequences beginning with an escape (ESC) character (hex 1B/decimal 27), which is what your code is actually detecting. So, at that level, you should be handling CR and LF in the same switch() where you're detecting the ESC.
Now, as far as dealing with actual VT100 code sequences (to position the cursor, change colors, etc.) you need to know how long each sequence is, based on the characters you've received so far. A full implementation can be quite involved.
But the problem with your code is that once you recognize the ESC character, you call handleVT100Code(). This function has a while() loop, but the condition will only be true if the next character of the sequence has already been received. Given the relative speeds of the CPU and the serial line, it won't be. If not, the loop and the function exit immediately, and you end up processing those bytes in your main loop. You'll actually have to wait in handleVT100Code() for the bytes that follow the ESC. |
H: Referencing flattened busses in module instantiation
I have a Verilog gate-level netlist generated by the Synopsys Design Compiler.
DC was directed to flatten all busses and ports when creating the netlist, and the module declaration is given below:
module DES_SBOX1 ( CLK, \ptext[5] , \ptext[4] , \ptext[3] , \ptext[2] ,
\ptext[1] , \ptext[0] , \key[5] , \key[4] , \key[3] , \key[2] ,
\key[1] , \key[0] , \ctext[3] , \ctext[2] , \ctext[1] ,
\ctext[0] );
My problem is that when I try to use this module in a testbench, I receive syntax errors because I am not sure how to reference the port names (because of the backslash).
Here is an attempt at instantiating one of these modules:
DES_SBOX1 feistel( .CLK(CLK_tb),
.ptext[5](ptext_tb[5]),
.ptext[4](ptext_tb[4]),
.ptext[3](ptext_tb[3]),
.ptext[2](ptext_tb[2]),
.ptext[1](ptext_tb[1]),
.ptext[0](ptext_tb[0]),
.key[5](1'b0),
.key[4](1'b0),
.key[3](1'b0),
.key[2](1'b0),
.key[1](1'b0),
.key[0](1'b0),
.ctext[5](ctext_tb[5]),
.ctext[4](ctext_tb[4]),
.ctext[3](ctext_tb[3]),
.ctext[2](ctext_tb[2]),
.ctext[1](ctext_tb[1]),
.ctext[0](ctext_tb[0]),
);
And here is the error message from Modelsim PE:
** Error: C:\Users\Kristin\Desktop\des_feistel_90nm\testbench.v(14): (vlog-2730) Undefined variable: 'ptext'.
** Error: C:\Users\Kristin\Desktop\des_feistel_90nm\testbench.v(14): near "[": syntax error, unexpected '[', expecting ')'
I've also tried using the backslash in the instantiation itself, like so:
.\ptext[5](ptext_tb[5])
This also gives a syntax error.
I'm wondering what the significance of the backslash is in the first place?
Any ideas on how to correctly instantiate this module are greatly appreciated.
AI: You are running into Verilog's escaped identifiers gotcha. From the IEEE standard reference:
§2.7.1 Escaped identifiers
Escaped identifiers shall start with the backslash character () and
end with white space (space, tab, newline). They provide a means of
including any of the printable ASCII characters in an identifier (the
decimal values 33 through 126, or 21 through 7E in hexadecimal).
Neither the leading backslash character nor the terminating white
space is considered to be part of the identifier. Therefore, an
escaped identifier \cpu3 is treated the same as a nonescaped
identifier cpu3.
Not only do you need to properly write down escaped port name, but you also need to make sure you don't forget to put a whitespace at the end. For example:
DES_SBOX1 feistel( .CLK(CLK_tb),
.\ptext[5] (ptext_tb[5]),
.\ptext[4] (ptext_tb[4]),
... |
H: Safely testing a DC supply with an unknown output configuration
This picture shows the connector for the DC end of a power supply I extracted from a dead HP MFD (Multi Function Device):
As you can see it consists of 4 pins in a 2x2 configuration. The sockets across the ascending diagonal are hexagonal, whereas the ones on the descending diagonal are square. What is the best way to test the pins without killing the supply and/or my meter?
AI: You can safely test it when switched off/unplugged with a multimeter set to ohms/continuity range - probe between all unique combinations of pins and note down which (if any) are connected to each other (reading around 0Ω if set to Ohms or it beeps if set to continuity)
After this test on DC volts range - start at the highest setting and work down (or set it to autorange if it has one)
Test all unique combinations of pins, you should be able to deduce which pin(s) is(are) ground and what voltages are present.
Be sure to note the polarity of voltages when testing.
For example, if you find (only) pins 2 and 4 are connected together, and testing from either of these to pin 1 produces +5V, and testing from either of them to pin 3 produces +12V, then you have a dual output (+5V and +12V) supply with a common ground.
If you need help deciphering the results, update your question with findings from above tests. |
H: Using a transistor instead of a relay to control a DC motor
I've made a simple relay circuit to switch power to a small DC motor
Here is a diagram of what I got right now:
Is it possible to replicate that with a transistor. Which one would be a good choice?
AI: You can use a logic gate MOSFET, like the FDC855, and then your circuit will look like this:
A FET will give you a high current if needed (probably not necessary, since you're powering the motor from AA cells).
Or a BJT like the BC547, and then you would make it like this:
With the 1 kΩ base resistor you'll have minimum 100 mA current for the motor. If you need more I'd recommend the FET solution.
The diode can be a 1N4148. |
H: Servo vs. stepper for camera mount
I would like to make a camera mount where it can rotate automatically around the Z axis, and also make a variable angle against the ground plane.
The camera weighs about 500grams.
Is a servo motor adequate to make the camera make a variable angle against the ground, or is it a better idea to use a stepper motor and a worm drive?
For the vertical axis I believe that either stepper motor or servo will work adequately.
Also, could you suggest a good way to measure the actual rotation that takes place when using a stepper motor? For a servo I believe measurement is not necessary as it already has feedback from a potentiometer.
AI: I would recommend a stepper motor plus worm drive. You will be able to keep this perfectly still, which is what you want for a camera.
A servo motor contains a circuit which actively tries to maintain the position of the motor. This system can be affected by external forces, electrical noise from the angle sensor, and poor tuning of the control algorithm. All of these things can lead to instability of the motor position, unless you spend good money on the motor.
On the other hand, if you want a stepper motor to stay perfectly still, you just stop stepping it. It will hold its position very accurately, and the worm drive will prevent you being able to back-drive it.
The other benefit of stepper motors is that you generally don't need to measure the rotation. If you're using it within spec, then you can be fairly confident that it has moved the number of steps you asked it to. So confident that many CNC milling machines use stepper motors without any kind of position sensors, and can machine parts for hours without loosing steps. |
H: High input resistance - FET
What does high input resistance in fet mean? I always see this term when dealing with fet transistors like jfet and mosfets.
AI: For a MOSFET the high input resistance is caused by the isolation layer between gate and channel (blue in the picture):
The layer is made of SiO\$_2\$, which has an extremely high resistance of 10\$^{16}\$ Ω\$\cdot\$m, and is one of the best insulators existing.
That means that the voltage applied to the gate has no way to go, so there won't be any current, apart from a small leakage current (not through the SiO\$_2\$). MOSFET input opamps may have input resistances as high as 10\$^{13}\$ Ω. |
H: Capacitor in amplifier transistor
Why are capacitors use in transistor cicuits? What does it do with biasing operations? I always see capacitors on transistors being used as amplifiers.
AI: A capacitor blocks DC, so it can be used to pass a signal (e.g. audio, etc) without it's DC level interfering with the DC bias of a transistor. This way the DC offset of the input signal can be at any level and the transistor amplifier will treat it the same way.
For example, if you have one transistor with it's collector output at a DC level of 5V, and the next transistor stage has it's base biased around 1V, directly connecting them would turn the second stage full on all the time as the input voltage will always be too high.
If we add a capacitor in between the stages, one side can be at the 5V DC level, and the other side can be at the 1V level, and only the AC variations pass through. This way the second stage operates correctly.
Take this simple circuit as an example:
Here are the waveforms at the various points:
Notice how the input voltage is a 1kHz 10mV signal with a 10VDC offset. After the input capacitor the DC level is now ~870mV. The same can be seen at the output cap. The gain is around 20 (200mV / 10mV = 20)
Now if we remove the caps:
And look at the input/output waveforms:
Things have changed drastically - the transistor base is now at 10VDC, which means the emitter will be at around 8-9V (the usual 0.7V drop will be higher due to excessive current) and the emitter resistor current will be ~8.5V / 100 = ~90mA. The output is stuck at around 20mV higher than the emitter. The circuit has no gain.
This is an extreme example, but even a few tens of millivolts either side of ideal bias point will have quite an effect on this circuit.
Apart from coupling, capacitors are also used for things like emitter bypass (as Vlad mentions) Here is the first circuit again with an emitter bypass capacitor added:
And the simulation:
Notice the gain has increase to around 100 from the first circuit (1V / 10mV = 100) This is because the emitter resistor provides negative feedback and controls the gain in the first circuit. With the capacitor added, the DC is unaffected but the AC now sees a lower impedance path to ground (the capacitor) so the AC gain is increased. So the AC is "bypassed" to ground.
There are many other uses for a capacitor, but these are the main uses in a typical audio amplifier circuit (apart from power rail filtering of course) |
H: Common mode operational amplifier
I have the circuit shown in the image. According to the the book I am reading when the opamp is in common mode Vout is always 0.
That means that also the gain is 0 because G=Vout/Vin.
Is this happening cause the circuit is completely symmetric?
AI: If that circuit is the one the book is talking about, then it's simply wrong.
The collector voltage of that differential pair will definitely change with a common-mode signal. The point is, because of the symmetry of the circuit, both collectors will change the same amount, so the differential output voltage (measured between the two collectors) will be zero. But either collector by itself, measured relative to ground, will show the common-mode signal.
The gain of the circuit for common-mode signals is much reduced relative to the gain for differential signals. If the shared emitter resistor were to be replaced with an ideal current source (effectively infinite resistance), this gain would in fact be reduced to zero, and then the common-mode signal at the output would disappear. |
H: Fast approaches for Soldering / PCB assembly
Our team (three hobbyists now developing our first serious device) is interested in soldering/assembling approximately 200 PCBs. We've already found a low-cost manufacturer for the raw boards, so just the assembly remains.
We'd like to keep the total assembly time and cost reasonably low of course, and therefore are considering various approaches.
The numbers are as follows:
200 single-sided PCBs
5 cm X 5 cm board size
30 capacitors and resistors (0603 size)
5 components QFN / QFP
4 components SOIC / SSOP
1 USB connector
1 SD-card-socket
The raw boards may come bunched/panelized as manufactured but essentially, we want to get, on average, each individual board done in less than 20 minutes ideally.
Which one of the following options would you suggest as best? (given the cost constraint and the desired time per board I stated above):
Option A: Hand-place components with tweezers, solder resistors and caps with iron, and solder QFN's with hot-air gun ?
Option B: Apply solder paste (possibly using a stencil), hand-place components with tweezers, then use a toaster/reflow oven ?
Option C: Get it done entirely by an assembly shop ?
Note: All three of us in the team have roughly around 6 months of consistent experience with the traditional soldering method (tweezer, soldering iron, and hot-air-gun). We don't mind any necessary hand-work at all because we're definitely excited about our board, but it would be good to know we're choosing an efficient approach.
AI: C: definitely the assembly shop, if you have the wallet for it. That's for you to decide. Ask some quotes, and decide if doing it yourself is worth the effort. Since this is a hobby project you may think your time is free, but then it has to stay fun as well, hasn't it?
edit
Just got this in a mailing from DesignSpark: fundraising may get you started to have it done by a shop. Erik raised 313 218 dollar for a 5 000 dollar target.
(end of edit)
Alternatively, B: Again, get a quote for a stencil. Yet, even applying the solder paste manually will take less time than hand soldering, which I would not recommend: the resistors and capacitors are not much of a problem, but the ICs may take quite some time if you want to do it proper, i.e. all pins soldered and no short-circuits.
Not A: it takes too long and it's messy. I would only do it myself if I could use the oven.
Remember that Jobs and the Woz also hand-assembled their first batch of Apple computers :-) |
H: Hot Air Gun for Reflowing a Board?
I'm curious how well a hot air gun would work for reflowing an entire board. My circuit board has about 250 components (including 0402 passives, and a couple of 0.5mm pitch TQFPs) and it's a bit of a pain to assemble it using a soldering iron.
Here's what I was thinking might work:
Apply leaded solder paste via a stencil onto the PCB.
Place components using a vacuum pick-up tool. Use a stereo microscope to place the more fine pitched parts.
Once all the components have been placed, place the PCB onto a pre-heater and raise the temperature to, say, 100˚C.
Start the hot air gun and slowly sweep it over the board as the paste reflow. I could utilize a fixture like this to keep the gun perpendicular to the board and just move the gun in the x-y plane.
It would take some time to sweep the gun over the board and ensure all of the paste has reflowed and during this time the pre-heater would still be on. Could this possibly damage the board? What about all the parts? Are there any other pitfalls that I might encounter or would this method work well?
I know there are better methods to reflow a board, like a reflow oven, but I'm specifically interested in how this method would work.
AI: Could this possibly damage the board?
Of course.
What about all the parts?
Yes. It could certainly damage them too, and most probably would.
Are there any other pitfalls that I might encounter or would this method work well?
The problem with this method is that it is inherently poorly controlled. It is potentially able to work and an exceptionally skilled and experienced and well trained operator may be able to achieve somewhat acceptable results some of the time. But most of us would just end up with a work of art or a pile of smoldering slag.
Probablility ~= 1.: Reflow soldering is an exercise in controlled death. Components and board are heated up hot enough and long enough that they are well on the way to destruction. Manufacturers design parts to meet the stresses of this process with an acceptable margin of safety. If you read up on the reflow process in detail, as you MUST have already done to make this question more than idle time wasting, you will have found that temperature profiles - rates of temperature change, holding times and cooling times and temperatures are all tightly specified. If you can manage the sort of control that this implies over the surface of a PCB containing 250 or so components including fine pitch TQFPs then you are wasting your time in your present role and probably want to enroll as a micro-surgeon or Formula One driver or similar :-). ie it's far too demanding a task for this to have any certainty of working.
Probability ~= 0: Not everyone is Wouter - he is an extremely experienced and capable engineer. All that said, it is "just possible" [tm] that a consistent approach, well aligned jig, temperature controlled air source etc may be able to do the job quite well. Finding out could be expensive. Or not. Given the very great success achieved by the toaster-oven-PCB-assembly community and the large amount of on-web information available on this method and the relatively low cost of doing it, I'd expect your TQFP's to thank you profusely for taking that route.
Related:
Spark Fun show you how to do Toaster Oven PCBing - lots of details - MANY photos
Some amateur results
Lots and lots and lots of PCB-toaster-oven ideas
Open Hardware PCB toaster over project
And more ...
Even a small BGA - an instructable |
H: Transfer power effectively from one coil to another through air
I want to build my own wooden alarm clock.
I want the surface to be smooth without any connectors anywhere. My idea is to place one coil beneath the alarm clock, and another pickup coil inside. I suppose that I need to maximize the area.
What kind of power can I hope to get through?
What is the optimal frequency? (is 50 Hz ok)
Do I need to worry about radio polution?
Will an unconnected iron core help?
What is best - many or few windings?
Please also tell me, if you know of other reasons why this would not work.
AI: This is readily achievable and there is much practical material on=web. Search for inductive power transfer.
Some good examples here but an annoying format. You can probably find the originals outside this system once you see something of interest here
An extremely worthwhile instructable. While he reports problems with operation he has images of inside equipment and circuit diagrams. An excellent resource
Many examples here
An instructable - rough but workable
Possibly same as above - somewhat different material
A hack-a-day example
What kind of power can I hope to get through?
Watts is easy.
10's of watts is not very hard.
Kilowatts is doable
What is the optimal frequency? (is 50 Hz ok)
50 Hz is terrible.
Higher frequency = smaller coils. 50 Hz ineeds vast coils or large cores.
Best to use an assigned ISM (Industrial Scientific Medical) frequency and/or one used by one of the many systems that do this. 'Off the cuff' 125 kHz and 13.5? MHz are two such./ Searching on IPT as above will tell you more.
Do I need to worry about radio polution?
Not if done well. The transfer is near-field magnetic - not RF.
Will an unconnected iron core help?
Read the many articles. Coils need to be resonant. Use of an iron core is not usual.
What is best - many or few windings?
Read the many articles - follow some examples cited above to start.
Please also tell me, if you know of other reasons why this would not work.
Entirely doable. Start by copying others' examples.
ADDED:
Very good demo video.
Related website here
100% Duty Cycle: When Steven said "100% duty cycle" he meant "always-on AC waveform" |
H: DIY Electrical Safety
I'm quite into DIY projects and I am looking at making an electrical unit out of a Raspberry PI and a computer monitor.
I was wondering if someone could provide me any information on what I should do to comply with the safety standards, for example when I integrate the Raspberry PI to use the monitors supply of 240v.
How should I correctly insulate the live feed with this unit, and would by modifying the standard configuration (how the monitor came) make it unable to be PAT tested again?
This may seem a little vague, but like I said it's just a hobby.
AI: For a safe DIY project, you should keep the monitor and the Raspberry PI separate and in enclosed cases. Each with its own power supply. Ac for the Monitor, Dc for the Raspberry PI.
would by modifying the standard configuration (how the monitor came)
make it unable to be PAT tested again?
If you take it apart and modify it then the answer is yes. Or at least unable to pass testing.
You should really stay away from using the 240vAc supply. Are you sure the monitor takes 240v, there isn't an external ac to dc adapter? If there is you may be able to take the dc voltage and drop it to 5v for the Raspberry PI. You will want to keep an eye on the ac to dc converter to make sure you aren't trying to pull too much amperage and it's not overheating. If there is no external or obvious ac to dc adapter, I'm guessing it's a CRT monitor then, and you will need a separate power supply to convert that 240vAc to 5vDc with at least .8amps available, for the Raspberry PI, you have a couple methods of doing this.
Use an external wall wart and then you will have the 5vDc and 240vAc lines running to your project.
Dismantle a power supply that you use for the Raspberry PI (or build your own) and connect that to the monitors incoming AC, and mount it inside the monitors housing or outside if there is no room. This way you would only have 1 power plug for you project. And if you are able to mount everything inside the monitor, it would look like it is just a monitor. Note that I only recommend mounting stuff inside a monitor as a DIY project. Be Careful!
Another thing you want to be careful of is the electrical noise that the electronics of the monitor may produce. This could cause the Raspberry PI to not work as desired.
Be very careful messing with AC and mains power! And inside the monitor (if you are opening it up) you need to be extremely careful on what you touch. There could be enough power stored in a capacitor to hurt and possibly kill you. |
H: Are processors designed using different technologies?
Can/Are processors be designed using different technologies ?
What I mean here is: in, for example, Intel's 28nm processors, are all the gates in that processor built in 28nm technology or are only the most critical parts of that processor built in 28nm, the other, much much less critical parts being designed in other much less expensive technologies such as 65nm or more for example ?
If yes [processors are a mixture of technologies] how can this be done in practice (i.e different technologies on a same die) ? And why is this done ?
I'm curious about all this so any extra info related to these questions is also more than welcome
AI: "Technology" isn't really the right term for what you're asking. The technology of the chip is determined by the specific processing steps required to make it, and among other things, this determines the minimum feature sizes for various items on the chip. The number commonly associated with a particular technology (e.g., 28 nm) refers specifically to the minimum gate length, which is determined by the width of the lines that can be drawn on the mask that forms the transistor gates.
To be sure, not all transistors on any given chip require the minimum gate length, and many require more than the minimum gate width (for greater current-handling capabiilty), so yes, you will indeed see transistors of many different sizes on a chip. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.