source
stringlengths 620
29.3k
| target
stringlengths 12
1.24k
|
|---|---|
Ceramic capacitors: how to read 2-digit markings? Related question: Ceramic capacitors: how to read 3-digit markings? I have some ceramic capacitors with a 2-digit marking. How to read them? Do the colored markings at the top mean anything? Image description: Brown ceramic capacitors with 10 written and a black mark at the top Brown ceramic capacitors with 47 written Yellow ceramic capactiors with 1n0 written and a green mark at the top <Q> The brown capacitors have values in picoFarads eg <S> 47 = 47 picoFarad = <S> 47 pF = <S> 0.000 000 <S> 000 <S> 047 <S> Farad ! <S> 10 = 10 pF <S> For the yellow and green capacitors with markings of the form <S> anb <S> Here n = nanoFarad = <S> nF. <S> 1n0 <S> = 1.0 <S> nF <S> 2n2 <S> = 2.2 nF <S> 6n8 <S> = 6.8 <S> nF <S> Note that the use of xNx here is (probably) unqiue to capacitors in the nF range <S> - I do not recall seeing eg xPx or xUx markings ever. <S> However page 70 of this superb Vishay ceramic single layer capacitors document suggests you might expect to meet any of eg p68 = 0.68 <S> pF <S> n15 = <S> 0.15nF = <S> 150 pF <S> 5p0 <S> = 5 pF <S> etc <S> The green dot is quite likely to be a voltage rating, but <S> alas <S> I don't know what system it uses. <S> There are several different colour/voltage systems. <S> Typically this sort of capacitor is 50 Volt rated but this is not certain. <S> More usual nnX 3 digit markings <S> Most capacitor numerical markings are 3 digit and express the value in pF <S> (pico Farad = <S> 10 <S> ^-12 Farad) with the last digit being a power of 10 multiplier. <S> So 223 <S> = 22,000 pF <S> = <S> 22 <S> nF = 0.022 uF = 0.000 000 022 F <S> 106 = 10 000 000 <S> pF = 10 uF <S> 100 <S> = 10 <S> pF <S> and NOT 100 pF <S> etc <S> Part of a larger tutorial series on capacitors. <S> Deals in colour codes. <S> Does not answer exact question but is useful <S> This does NOT answer the original question but is useful <A> The yellow green capacitors are Philips brand capacitors introduced in the 1960's. <S> The top markings are:Green: <S> Temperature coefficient -330 ppm/°C. <S> Tolerance -20/+50%. <S> Capacitance value range 1nF to 27nF in E3 value series. <S> Further information can be obtained in Philips Pocketbooks popular in the 1960's thru 1980's and available on Ebay for $10 to $20. <S> Also the black top marking on the brown ceramic indicates it is an NPO (Negative Positive Zero) <S> Meaning <S> its Temp Co is 0 ppm/°C at room temperature. <S> Thus it is suitable for use in circuits where frequency or timing accuracy versus temperature change is critical, such as RF filters, Audio and RF Oscillators and Digital CMOS Crystal oscillators. <A> If they are physically small and have only two digits, I believe this is just the value in picofarads. <A> The small ceramic capacitors with 2 digits markings can be identified with their color and the type of markings: <S> The capacitor with value written as 1n0, 2n2, 47n means : 1n0 = <S> 1.0nF <S> 2n2 = <S> 2.2 <S> nF 47n = <S> 47 <S> nF and so on.
|
Generalizing, The small brown capacitors have written with the value of the capacitance with a multiplier 10^(-12) i.e. picofarad
|
Desoldering from a graphics card I have a graphics card with a dead cooler. I have a replacement cooler for it, but the graphics card is a bit non-standard and the cooler won't fit --- the heat pipes hit some components on the board. As said components are a big, chunky capacitor and a two-pin inductor, all connected via wires through the board, it should be easy enough to move them to the other side of the board to make room for the cooler. Unfortunately I seem to be totally unable to make the solder on the board melt. I have a 70W gas soldering iron. It melts my solder fine. I've heated the joints up as much as I dare and they don't even show signs of softening. If I add some of my own solder to the joint, I can then melt that , but the original joint stays solid. Is there such a thing as high-temperature solder? Would they have been likely to have used it on a graphics card? I'm aware that this kind of PCB is likely to have a thick copper ground plane, which will suck away heat from the joint, but that doesn't explain how I can melt my solder but not their solder in the same joint. The soldering iron does have a hot-air-gun mode, but I have no experience of that and would rather not set fire to my graphics card... (I want to get the components off intact because I need to attach them again. The capacitor is easily replaceable, but the inductor is just a black cube with 1R0 written on it, and I'm not confident of my ability to find an exact duplicate. If I cut the pins it will then be too short to reattach.) <Q> As part of your problem (along with ground and power planes sucking heat away from the joint), your solder may well be lead based, and the solder on the graphics card is almost certainly lead-free (everything in the last few years has moved to lead-free solders). <S> The lead-free solders require significantly higher temps to melt than older lead-based solders. <S> Unfortunately, I think the basic problem is that your iron is just not up to the task. <A> I'm suspicious that the ground and power planes that your capacitor is connected to simply have a lot of thermal conductivity to ground. <S> I've desoldered caps from graphics cards before, and my 95-W temperature-controlled iron, set on 400 <S> °C/750 <S> °F takes quite a long time to heat it up. <S> I'm not sure that a gas-powered iron is up to the job of graphics card rework. <S> One thing you should probably do is to preheat your graphics card before attempting rework. <S> Warm the whole thing up to about 300 <S> °F with a hot-air gun or oven, <S> and then it should be much easier to get the point that you're trying to melt hotter than that. <S> When the rest of the card is at room temp, you're likely to put a lot of thermal stress on the board. <S> If your solder is melting, and actually mixing with the solder in the component, then the melting point of the mixture will be approximately the average of the relative volumes in the mixture. <S> This article explains how preheating can be used with a low-temperature solder to do rework. <S> I would guess that you simply had a ball of your solder on the solder joint, and didn't actually bring the joint to the point where your solder would melt if the two were mixed together. <S> As a sidenote, you should probably replace the capacitor when you remove it. <S> Electrolytic capacitors can be damaged by heat, and are the components most likely to go bad on your card. <S> Inductors are likely to be among the most robust. <S> This brings me to another point: The cap is built with two pins stuck into a roll of paper-like substance, and stuffed into the can. <S> This does have the advantage of allowing you to work from both sides and on one pin at a time, which is likely to be much easier. <S> When resoldering, remember that you'll have to get the solder joints just as hot as when you removed the components, or your solder will not form a good joint. <S> Don't settle for balls of solder on the component leads; you need a nice conical joint. <A> Three suggestions I have for you: <S> Get a bigger tip (if you iron supports interchangeable tips). <S> Sometimes it takes a little melted solder to get it all flowing Solder wick <S> - Pick some up some and use that to wick up whatever you melt that way you don't have to regain all the ground you spent reheating this thing each time your hand gets tired and have to remove the iron. <S> Get a smaller wick so that you're not fighting heating up that too along with the pads. <S> Sometimes you can wick off enough solder that a small xacto blade can be used to score through the remaining solder. <S> It sounds like it's just thermally connected to GND which is more than likely a huge heat-sink EDIT <S> If you can't get a bigger tip, make sure you're turning the tip you have sideways to maximize the surface area that comes in contact with the solder-joint. <S> I see too many people think that by just putting a needle point tip onto the solder joint it should melt without actually taking into account what is going on thermally.
|
The pre-heat trick might help, but I'd recommend just getting an iron that's got more punch. Take some solder and melt it on the tip of your iron before you touch the part's pin. You can pull the can and paper off of the pins without too much effort, but this will destroy the cap.
|
Cheapest way to translate 5V SPI signal to 3V SPI? I have a MCU that operates at 5V, and a display that recommends a 3V logic level. They are connected via SPI that can operate up to 1.5Mhz. What is the best way and the cheapest way (not necessarily the same), to convert the 5V to 3V? The SPI connection is one way (SCK, MOSI, CS only; no need for the LCD to communicate to the MCU, so the translation is from 5V to 3V only). Thanks,Mike <Q> The simplest way <S> (I don't know if it's the best) is with a simple voltage divider. <S> 3.3V is 2/3 of 5V, so a 1:2 divider should work: <A> Placing a small capacitor across the top resistor will help square up edges caused by capacitive load. <S> As long as the RC time constant of the two resistors in parallel combined with the output load capacitance is much faster than the rise and fall time of the signals this capacitor should not be needed. <S> There are many bidirectional and active solutions available. <S> As an example only of a compact solution <S> Maxim's MAX3023 provides 4 bidirectional drivers in a TSSOP package. <A> As Matt said, the simplest is a resistor divider. <S> The drawback is that it will slow edges a little. <S> You'll probably be OK with the 1 kΩ and <S> 2 kΩ <S> he shows but it would be a good idea to check the waveform with a scope. <S> When speed is a issue, like it most likely would be if you were running the SPI bus at 10 MHz, then a explicit level converter would probably be better. <S> These chips have two power supplies and usually a direction input, which you could permanently tie in one direction in your case. <A> You may need to set the pins to open drain mode using an MCU register. <S> Note: <S> I wrote the following before re-reading the question and noting that the SPI interface in question is output only and there is no MISO line. <S> I left it in for reference. <S> If you processor has 5V tolerant inputs (check the datasheet) you can connect the MISO line from the display directly to the MCU, provided the display Voh is higher than the MCO Vih level. <A> I would recommend a 74LVC buffer. <S> 5V tolerant inputs, 3.3V outputs, cheap, fast, small, readily available, and only one part to solder instead of lots of resistors. <S> The LVC126 also has tri-state, which can come in handy. <A> No, actually the simplest way to interface is that used by the Adafruit Huzzah ; a diode with cathode to the 5 V signal and anode to the ESP8266 input. <S> This produces no delay in pull-down <S> and there is an internal default pull-up in the ESP8266, though you could provide a pull-up to 3.3 V if it is felt necessary. <S> There is no reason to provide level conversion from an ESP8266 output as 3.3 V is a valid logic HIGH for CMOS at 5 V.
|
A simple resistive divider is the cheapest method and may serve your purposes well enough. If your processor has open drain output pins, you can connect them directly to the display, adding a pull-up resistor to the 3.3V supply to each line.
|
Why everyone are building tesla coils instead of multipliers? When I see someone want to get high voltage - we see tesla coil. Why everyone do that instead of building Cockcroft–Walton generator ? Are there any issues with Cockcroft–Walton generator, making it less fun than tesla coil? <Q> It's more fun. <S> Nothing says "mad scientist" like big coils, a few jacob's ladders around the place, sparks flying off towards the sky, and a visible corona. <S> Some of these things don't work with DC, and a few diodes and capacitors aren't nearly as awe inspiring. <A> Mostly, the tesla coil is simpler than the multiplier. <S> If you want to increase the output voltage of the CW generator, you need to inncrease the number of stages and/or voltage tolerance of the diodes. <S> If you want to do the same for the tesla coil, simply use a bigger coil. <A> The way I understand it, a CW Generator creates high voltage DC, whereas a tesla coil create high voltage AC. <S> For the fun sparky effects it is easier to use AC that DC as it should spark at a lower voltage. <S> Also, to get a CW generator up to the kind of voltages that a tesla coil typically gets to (say half a million volts) would take a lot of stages and be quite hard to make. <A> The old school spark-gap ones buzz rather loudly, and it's even possible with solid state drive to make a TC emit audio signals from the discharge. <A> A tesla coil uses resonance ,and the q of the secondary multiplies the reactive watts. <S> The reactive output of a tesla coil at 500kv at 8 amps is 4 Mega Watts. <S> Though its not true power ,what your seeing is the reactive power entering the capacitance of air. <S> A voltage multiplier is just true power being stored and discharged. <A> Tesla Coils are marginally less dangerous due to the "Skin Effect" whereas a C.W. Multiplier can become deadly pretty quickly. <S> Also, having a constant stream of arcs, that loud buzz, and the smell of ozone is an experience that a Tesla Coil is quite adept at providing! <S> Besides, a Tesla Coil looks a lot like the universally recognized "Ray Gun"!
|
Maybe it's the added bonus that the Tesla coil makes lots of noise.
|
Sending signals to USB port using C I want to send a simple 5V signal to the usb port. The USB cabel's insulation will be removed and connected to a relay which is connected to an electric door system. I think I should write this code in C. Can somebody give me a hint? <Q> You cannot do what you want with just connecting a relay to the USB port. <S> The USB is a bus, with a serial protocol running on it. <S> It is necessary for you to interface with that bus using the proper protocols. <S> You will require a use "device" which is capable of being programmed to respond to a computer-based stimulus, and activate an external signal. <S> There are many ways of achieving this, from ready-made products, through DIY kits, and al the way to discrete ICs that you can use to build your own system. <S> Personally I would recommend one of the many DIY kits available, such as the Velleman K8055 USB Experiment Interface Board . <S> There are many others like it. <S> If you want to get in to the nitty gritty, then you need to be looking at such things as Microcontrollers (which the Velleman is based on), which can be programmed to do many different things. <S> Some of these have built-in USB support, but it takes quite a lot of in-depth knowledge of the USB protocol to get to grips with these. <S> Most people use an "FTDI" chip to convert the USB into RS-232 first. <S> If you are wanting an off-the-shelf product then you may want to look at the possibility of a USB Parallel Printer Port product, that you can program and access as if it were a parallel (Centronics) port directly attached to your computer. <S> This would give you 8 outputs you can turn on and off. <S> One more thing to watch out for though - most computer / microcontroller outputs won't be powerful enough to directly drive a relay. <S> You will need to feed the signal through some "driver" circuit to achieve enough power. <S> This may be as simple as a single transistor, or you may be looking at something more complex such as a MOSFET, etc. <S> Oh, and beware of "Back EMF" - a relay is an "Inductive Load". <A> USB is not as simple as you seem to think it is. <S> USB has a communication protocol that doesn't allow you to simply output high or low. <S> You can use an FTDI chip to do this. <S> After connecting to the FTDI chip the computer will install a virtual serial port. <S> You can then send data to this serial port and the microcontroller will receive it over UART. <S> The microcontroller can then read in the packets you send and you can have 1 packet for 'on' and another for 'off'. <S> The microcontroller would just turn a pin high or low based off of the last packet it received. <S> Another option to consider would be to use the serial port directly. <S> Many computers give you control over the clear to send type pins. <S> If you can get this ability then it would just be a matter of having a program that toggled the clear to send state. <A> USB is a sophisticated serial bus which allows communication between a host (your PC) and up to 127 devices (all kinds of products you connect to your PC). <S> So it appears that you don't have direct access to the bus, anyway that you can't simply switch on and off things with it. <S> But there is a number of solutions to this. <S> PCs come with ever less EIA232 (often referred to with its old name RS232) ports, but sometimes you need one. <S> A few companies specialized in interfaces, so-called bridges , which convert the USB bus to EIA232. <S> FTDI is a well-known manufacturer of those bridges, and in other answers it's been suggested to use EIA232 control signals to control a relay. <S> This may work, but in fact it's improper use of EIA232. <S> A less known product of FTDI is the FT245R USB to FIFO converter, which allows you to control general-purpose <S> I/Os via USB. <S> This product from DLP Design is a ready-for-use module based on the FT245R. Use one of the <S> I/Os to switch a relay via a transistor. <S> (The I/Os can't deliver the required current to drive the relay directly.) <S> See also this answer to a related question. <A> As others have pointed out, USB is a bus, so you need to use a device on the other end to translate bus commands into physical actions. <S> The easiest way to do that is to use a number of existing products designed for this without needing to write code for the embedded end - for example, Phidgets have a whole range of devices - this relay board is probably what you want. <S> If you're prepared to learn a little embedded programming, an Arduino or a teensy could provide more affordable and hackable options. <A> Directly switching 5v would only be possible if you had low-level programming information and access rights for the USB PHY or hub chip, ie, the ability to enable/disable the 5v VBUS (and to do so specifically for a particular port, if you need to keep other devices such as a usb keyboard working). <S> There are definitely systems on which this would be possible (the lone USB port of a tablet I was playing with recently, for example), but it's a very implementation-specific and non-portable hack. <S> Most of the time, the suggestions everyone else is giving you to use a USB-I/O chip such as an FT245 or USB-enabled micro-controller or even ready-to-go USB-relay board are preferable, since they work via drivers that rely on the standard USB protocol and do not depend on intimate knowledge of particular chips used to implement the host interface or hub. <S> EDIT: I'm trying to recall, there may actually be standard commands for enabling/disabling VBUS of specific downstream ports on a hub, but in practice few hubs actually have the necessary power switching device to implement that. <S> Finding one that does may be no easier/cheaper than buying the USB-relay board.
|
Probably the simplest way to do this is to use a microcontroller connected over usb using a serial to USB method.
|
Interview Question, what's limiting the output frequency for the FPGA circuit? I recently received a question in an interview that partially stumped me. It went something like this: You have an FPGA circuit that is supposed to be generating a signal with a frequency of 500MHz, but is only outputting at 300MHz. How would you go about troubleshooting this and finding out the cause of delay? My first reaction was to check the impedance and capacitance across the circuit to see if it was somehow acting as a lowpass filter, but aside from that I couldn't think of any ideas. Can someone help me out, is there an obvious answer that I'm missing? <Q> They are most likely referring to the design failing the timing constraints (I.E., the FPGA compiler reports that things are going slower). <S> So, the solution would be to look at the timing report file and try to narrow things down from there. <S> It's hard to say anything beyond this first step because it is very design dependant-- and that info wasn't given in the interview question. <A> The question they asked you is pretty badly phrased (unless you omitted some details, or they wanted to check that you're listening). <S> If the FPGA is clocked at 500 MHz, but the design can only handle 300 MHz, then the "signal" doesn't matter, as the entire design won't work correctly. <S> Those paths are the "slowest" ones between two elements, and determine the maximum clock frequency the circuit in the clock domain can achieve in a synchronous design. <S> Then you go to the HDL to look at the offending blocks and see how you can make those paths shorter by introducing pipelining, for example. <S> A more advanced option is to look at the placed-and-routed design in a GUI editor and see if the placer did something silly which led to the long paths. <S> You can then hand-place the blocks or try different placement seeds. <S> If the FPGA design can handle 500 MHz, but only one signal is outputting 300 MHz instead of 500 MHz, then you were on the right track. <S> You'd need to make sure that the I/O standard you're using is rated for 500 MHz; check if the I <S> /O's drive strength is set correctly; check the impedance of the traces and for mismatches; debug the traces with a scope and spectrum analyzer; and simulate the circuit with HyperLynx, for example. <S> Finally, it could be that your measuring equipment isn't appropriate and you're affecting the signal you're attempting to look at. <S> So you could have asked them what the measurement setup was. <A> A low pass filter wouldn't change the frequency of the signal, only slow the transition edges down.
|
To fix that, check the timing report to see where the critical paths are.
|
Cheapest way to measure .1uL volume of liquid being dispensed from pipette tip So I think this is going to be some kind of sensor... :P I'm looking for ideas on the best way to measure a dispensed volume of .1uL from the tip of a pipette This is for a open source medical liquid handler =] ... - Fluid will be mostly transparent - Pipette tips can be clear or black - Will be measuring the displaced volume of 8 lines exiting a peristaltic pump thoughts? <Q> I suspect that the best solution is likely in the physical design of the pipette mechanism rather than in active electronic control based on feedback from the fluid itself. <S> Another possibility would be to use a stepper motor on your peristaltic pump. <S> In general though, precise metering of fluids is something that the biotech and medical equipment people have lots of solutions for, and they are usually either based on passive fluid properties (metering pipettes), or closed loop electromechanical drivers (peri pumps, syringe pumps*), but AFAIK not on feedback monitoring of the fluid itself. <S> For tiny volumes you can do some interesting things with piezo elements as pumps. <S> Browsing cole-palmer etc catalogs should give some ideas. <S> Probably you want an entirely separate cross-check scheme for calibration purposes. <S> If you don't suspect drop-to-drop variation to be an issue, you could just dispense a lot until it should match some easily measured quantity. <S> *or a similar arrangement of a stepper or servo & screw driving lower volume metering device, such as a micro-pipette <S> If you really, really want to directly measure tiny quantities of fluid, I've seen video microscopy of inkjet nozzles done quite well. <S> For some fluids you want to backlight, for others you want reflected light at some angle (also consider IR vs visible, a camera is probably fine with either). <S> Having a known diameter of some feature on your nozzle makes it easy to calibrate the dimensions of your picture. <S> Once you've achieve a high contrast image, even quite primitive analysis can determine the diameter of a more-or-less circular droplet and from that the volume. <A> I think a digital caliper's sensor may be the right tool to measure the micropipette's piston displacement . <S> Resolution is in the order of 1/100th mm, so that should agree with 10\$^{-1}\mu\$l. <A> I believe it is too difficult to dispense 0.1uL from a standard pump or even a specialized one. <S> Check the literature. <S> The method to do this is to either use microfluidics with fine channels or piezoelectrics (such as inkjet nozzles; professional heads exist for liquid dispensing at nanoliter volumes) or other exotic methods like acoustics (done in research labs experimentally). <S> Read the journal <S> "Lab on Chip" to see what is being done in this area. <S> Now if this were to use 1uL volumes, that might be doable reliably using very fine pipette tips or tubing. <S> There are commercial outfits who specialize in calibrating and validating pipettors. <S> They may have guidance on this and be able to offer a service quote ($$).
|
Once it is dispensed your best bet may be to measure the diameter of the droplet on a hydrophobic surface (via microscope) where the droplet can be assumed to be spherical. If you are concerned about variation, a bit more creative thinking may be required.
|
Guide in choosing good overall PIC dev board Our department getting grant to buy development board and I do not want them to buy same old FPGA board which we have 100 of and only 10 uses so far. Need your enormous experiences in helping make good choice of development boards. Friends with me interested in learning following PIC parts: PIC18F4550 PIC18F46J50 PIC18F46J53 PIC18F47J53 PIC24FJ256DA206 PIC24FJ256GB106 PIC24FJ256GB210 In time we will also be interesting in dsPIC and PIC32 but all these right now together too much load, so beginnning only above. I see Development Tools Home Of all this the Explorer 16 100-pin board is interesting. At $130 Explorer 16 Development Board has the nice option of interchangeable Plug-In Modules. I assuming this means we can make our own PCB with the above PICs also and just pluggin them as Plug-In Modules? Also finding the following boards, but confused if it possible to replace the PIC already present on the board? $65 PIC24E USB Starter Kit $60 MPLAB Starter Kit for PIC24H $60 MPLAB Starter Kit for PIC24F Development board from Microchip is recommended as easy to make dean agree, budget of around $200 or less per board <Q> The Explorer 16 Development board is very good because you can buy PIMs to evaluate different microcontrollers (PIC24 and PIC32) and expansion boards called PICTail boards to evaluate different technologies like Ethernet, wireless, and graphical LCDs. <S> All without having to create your own boards or mess with a soldering iron. <S> The PIC18 Explorer board is the same as the Explorer 16 board, but for evaluating PIC16 and PIC18 parts. <S> It too has PICTail cards that can be plugged into it to evaluate additional hardware. <A> I would consider other non-Microchip boards as well. <S> http://modtronix.com/ <S> (I've used there CAN and RS485 boards) http://ccsinfo.com/ <S> (I've used several of these and their compiler) http://www.piccircuit.com/shop/8-pic-io-board (haven't used, but very low-cost) <A> Can I also try out USB communications using this board? <S> The Explorer 16 Page does mention USB, and I can see what looks like a USB connector in the picture <S> so I'd say yes to the above. <S> There is also the PIC18 Explorer Board to consider, which is pretty much the same for the 8-bit PIC18 series. <S> No doubt you will find many such boards cheaper elsewhere, but it's probably safe to assume Microchip know their own products well enough to produce pretty good dev boards/example code/documentation, with plenty of options, so life will probably be easier that way <S> (if a little more expensive perhaps)You should be able to adapt and produce your own plug in boards quite easily too, using the schematics and documentation as reference. <S> Maybe it would be a good idea to have a look at these before you decide to ascertain whether you can do what you want with them.
|
If you want a versatile development tool for education etc, I think the Microchip boards are probably a good way to go.
|
Can two ATX SMPS be connected in series to get +10 and +24V DC Can two ATX SMPS be connected in series to get +10 and +24V DC (from 5V and 12DC output of each SMPS) Needing lots of current at 24V with atleast 5A so cannot use -5V or -12V inside SMPS as negative voltage have less than 1A rating I know transformer based PSU can be uses this way, but professor telling that SMPS cannot be connected in series the same way. He not tell me reason as he says I will understand better next year when SMPS in course offering. If he correct, then why not SMPS work like transformer based PSU? <Q> No, you can't connect two ATX supplies in series and get double the voltage. <S> There are many issues to consider, and most of them require detailed knowledge about the insides of each power supply. <S> One issue to consider is what happens when one supply is turned on, while the other is off? <S> This can happen for many reasons, but <S> #1 reason is that both power supplies will never come up at exactly the same time even if you use the same power switch for both. <S> When one is on, and the other is off, the off supply will be subjected to -5 & -12v on it's outputs. <S> This is a case that the supply was never designed to handle. <S> Odds are that you'll blow up the caps on the output, and maybe a diode or MOSFET as well. <S> There are ways to protect against this sort of fault, but why bother? <S> You will be much better off getting a supply that does what you <S> want-- and the risk of burning down your house is much less. <A> Under certain conditions you can stack power supply outputs to get higher voltage, but there are caveats. <S> The ATX spec v2.2 says: 3.4.6. <S> Output BypassThe output return may be connected to the power supply chassis. <S> The return will beconnected to the system chassis by the system components. <S> This is ambiguous - the power supply return may or may not be earthed inside the power supply depending on the whim of the manufacturer. <S> David's earlier point is valid. <S> Since you cannot guarantee that the output of each power supply stage was intended for paralleling, you most likely would have to add ORing diodes to provide some measure of protection and deal with the power dissipation. <S> The other issues that were touched on in earlier posts are valid. <S> The outputs will not come up together, so your rail will go from 0-12V, then 12-24V in discrete steps. <S> Also, overcurrent protection will not happen at the same threshold for both supplies. <S> You are definitely better off just purchasing (or designing) a 24V supply. <A> You CAN connect 2 SMPS in series, better if they are the same brand & model... because they are designed to behave as theoric batteries. <S> This way of connection has some problems anyways, a price to pay for : Poor load regulation, partial or total lost of overcurrent protection and similar stuff. <S> Starting-conditions get worse but they are not bad at all because the baddest starting situation behaves as only-one supply starting by itself (the cheapest one). <S> Paralel operation is not suggested as current sharing is 100% unpredictable. <A> Needing a very specialized supply that wasn't available in the voltage or wattage I wanted, I was considering to setup 2 of those PSU in series but found it very complex to manage. <S> You have all the points that were already made with regards to grounding and timing of power-ons <S> but there's also the issue that one of the PSUs will have double the voltage that it's <S> 12v rail was designed for running through it. <S> To make sure that it's not going to blow up, you'll have to go through every component of the rail, lookup it's model number on google and check what's the maximum voltage <S> it's been designed to operate on.
|
If the power supply rails have their output return tied to earth, you obviously cannot connect the return of one supply to the positive of the other supply without creating a short-circuit.
|
What is a short circuit at the electron level? I'm trying to understand when you can say a circuit is being "shorted". Obviously you are creating a short circuit when you hook up the two ends of a battery with a wire. But the wire does offer some resistance, even though its extremely little.What if you hook up the two ends of the battery with a 1 ohm resistor? Is it still being shorted? So where is the line drawn between shorting and well, not shorting?What is actually happening to the electrons in both cases? Thanks! <Q> Crudely speaking, the electrons will follow the path of least resistance. <S> Normally we control that flow through our circuit using the components, such as resistors, capacitors, transistors, etc. <S> When an unintentional route between two points is created that is of a lower resistance (thus "shorter") than we want, that is where the electrons will prefer to go. <S> This is what we term a "short circuit". <S> On an electron level it is no different to any other part of the circuit, but from our point of view it is a bad thing that causes things to happen that we didn't want. <A> The definition of a short-circuit is not clearly defined, but it has to do with a lot less electrical resistance and hence more current than we expect in a given situation. <S> Much of the electrical current occurs through free electrons in a metal lattice, like in copper wires, where they can move with little resistance. <S> Applying an electric field will move zillions of these electrons, and resistive material is needed to limit this current. <S> If there's too little resistance to limit the current so that it exceeds what the system can take we talk about a short-circuit. <S> This excessive current may damage certain components unintentionally, or intentionally like in case of a fuse . <S> The fuse is a weak spot in a system that we sacrifice to take the blow, so that the circuit becomes interrupted before other components get damaged. <S> Sometimes we talk about a short-circuit even when there's no damage at all, like when we bridge (part of) a circuit so that the current flows past it, but that it's limited in another part of the circuit, like the power supply. <S> At the level of an individual electron a short-circuit doesn't look much different than a normal current path, it will move because of the electric field. <S> It's just the number of them which can flow which makes all the difference. <A> You are correct that anything we use to carry current does have some resistance due to the physical nature of materials. <S> But in general, the way I understand it, a short circuit means direct connection . <S> But let's consider a couple cases where we either: have an unintentional spike in current due to an accidental direct connection that is considered unsafe to the rest of the system. <S> The current is flowing in a path that we did not intend (hence "short" like short cut) <S> Or, would like to connect two nodes in our circuit for a functional reason (a switch) <S> In the first case, we're interested in the health of our system and a short circuit here means that too much current will be drawn or sunk in a place that we find particularly sensitive - so this can simply mean not enough resistance where "enough" is defined by what our system can safely tolerate. <S> In the second case, we are interested in connecting two different areas of our circuit together with as minimal distortion/signal/information loss as possible. <S> In this case it is in our interest to have as little resistance as possible. <S> So I believe to answer your question <S> , it is a matter of context and what you are trying to protect or accomplish. <S> At the electron level, it's just current. <A> A "short" is a generic term that, at the electron level, doesn't make much sense. <S> But our culture interprets it as "something electrical is messed up". <S> The common use for "short" is when there is electrical conductivity (low resistance) between two parts of a circuit that shouldn't have conductivity. <S> Normally this is from two wires or pieces of metal that are touching that shouldn't touch. <S> There is no more detailed definition for "short" than that. <S> It's a lot like the term "cancer" in that regard. <S> There are over 200 types of cancer, and just saying "he has cancer" without specifying what kind of cancer is not much more useful than saying "he's sick". <A> Short-circuit usually means that the resistance is so much lower than expected that it doesn't matter <S> it is nonzero - current in the short circuit path <S> is much higher that in other paths. <S> For example, you short the contacts of the wall outlet with a screwdriver. <S> A screwdriver is not a superconductor but its resistance is so low that current is extremely high and you get a spark, points of contact burn and overcurrent protection hopefully trips. <S> In terms of electrons short circuit would mean that the dominating flow of electrons will follow the short circuit path and that flow will far exceed the one for which the circuit was intended for.
|
The name "Short Circuit" comes from an unintentional path for the electrons which is "shorter" than that we intend.
|
Charging marine battery while powering equipment I've got a quite delicate setup with a PC and some other minor equipment such as a microcontroller connected to a large 100Ah sealed (AGM) 12v lead acid battery. I need to be able to run my equipment non-stop for months and only charge the battery at night time. I would love to get some advice on how to run this setup as smoothly and safe as possible. Is the best way to just leave my stuff plugged into the battery and just hook up a charger to the battery as well? Should I use two batteries and just swap them, plugging in a fresh one in parallell before disconnecting the old one? And that way I can just charge them one at the time. The first solution feels easier but I'm not sure how my sensitive equipment handles the plugging in and out of a charger. Or the swapping of batteries for that matter. Are there some good practices for creating a setup like this? What precautions should I take, do I need a diod to prevent surges while connecting a charger? Do I need any voltage regulators to prevent bad things happening? Grateful for all advice on this. Thanks. <Q> There are many power supplies available for this purpose. <S> As 0x6d64 says, these have a constant voltage output of around 2.3V per cell, ie 13.6V or 13.8V for a 12V battery. <S> This would typically be about 0.1 of the capacity - so no more than 10A for a 100AH battery - probably 5A to be safe. <S> This would cut the power output if the battery voltage drops below about 10V to prevent battery damage. <S> Of course your connected equipment needs to be capable of operating at 13.8V for this to work. <S> If 14V is the absolute maximum then this solution is borderline. <A> A good precaution would definitely be using fuses and place them close to the power source (e.g. battery or charger). <S> If you need some voltage regulation depends on the kind of equipment you'd like to supply: If they have an absolute maximum input voltage of 12.0V you will need to regulate that voltage (low dropout regulator? <S> depends on the current, I think). <S> For charging: I personally charge with a constant Voltage, because it is simple. <S> This might not work for you, as it is quite slow. <S> What state of charge do you expect every evening? <A> As AGMs are not sensitive to deep discharges they do not need special precautions. <S> I do not know what you mean by sensitive. <S> Assuming you mean ripple-sensitive. <S> I would use a charger that is especially made for that purpose, eg. <S> a charger that would charge the battery slow and not at the higher voltage used for "normal" charging. <S> Connecting another battery at 13 V to a battery at say 12.3 V could definitely introduce some electromagnetic disturbances.
|
The power supply will need a current limit so that the battery will not be damaged if it is charged when flat. You can safely leave everything connected 24/7 with this arrangement and switch the mains on and off as necessary but some deep-discharge protection is advisable.
|
Oscilloscope using laptop microphone input...is that possible? Its possible to have an oscilloscope from the input of the sound card? I'm trying to log the states of a PIC32 pin (min: 0V, máx: 3.6). Is it possible to put that value on a 3.5" jack and, on the pc, have access to the sound card input values? <Q> Be careful, your computer isn't made for this. <S> Another software (with the schematics to go with it): <S> http://xoscope.sourceforge.net/ <S> The hardware to go with it: http://xoscope.sourceforge.net/hardware/hardware.html <A> I agree with Oli that finding a cheap analogue 20 MHz scope is a way to go. <S> You can comfortably analyze 40 MHz if you read between the divisions. <S> However, I often use a sound card scope for it's trigger function, the memory storage, and as a third channel to control the start/stop of your signal. <S> 12V is acceptable input for an old 16 bit sound card in an old 386DX PC. <S> It's also good for checking proper working of an UART or RX/TX switching in a simple serial communication protocol. <S> I would suggest to use a desktop PC card driven and not motherboard integrated as any potential over-voltage damage would be limited to the card. <S> I use an 16 bit card and it works fine for me. <S> Many 32 bit cards double the sampling rate as opposed to increasing bandwidth. <A> Yes. <S> There are many applications to do this. <S> The first one I found on Google: <S> http://www.zeitnitz.de/Christian/scope_en <S> I'm sure if you ask Google you will find many more. <A> This is a subjective question, but the most powerful I've found is http://www.sillanumsoft.org/prod01.htm <A> Visual Analyser (already mentioned above) is good. <S> Use line in if possible, and keep voltage below ~2V depending on make of soundcard, where it clips will vary - to find out apply a known signal, preferably through a 10K pot or similar while running the software and turn up until it clips on the scope. <S> Setting up a simple input divider and buffer opamp is a good idea if you are planning on measuring voltages over 5V or so (should be a few circuits around for this) <S> If you are planning on doing this regularly I would seriously consider grabbing a cheap analogue scope from eBay, people are practically giving away scopes with far better performance than you will ever get from the best sound card. <S> With a soundcard the highest frequency you can measure will be around 48KHz (maybe 96kHz with 192KHz, or as low as 22kHz with older models) as opposed to around 20MHz with a cheap scope - bear in mind <S> a PIC32 runs at 80MHz and can toggle pins at up to 40MHz.
|
Yes, but be very careful with the voltage.
|
What is back-emf: counter-electromotive force? Could someone knowledgeable on the subject explain what exactly is this back emf? How is it caused in a motor/generator, which components and which effects determines it? <Q> Inductive components like motor winding resist sudden changes in current. <S> That's because the magnetic field caused by the current needs time to build up or decrease. <S> That means that when current is flowing and this is suddenly cut off, the winding will try to maintain that current, and becomes a power source generating a voltage to be able to do so. <S> It gets its power from the built up magnetic field. <S> Since the winding is now a power source instead of a consumer the voltage is reversed for the same current flow direction. <S> That also explains how the voltage on a coil can become higher than the power supply: instead of subtracting the voltage over it you add it to the power supply. <S> That's why you need a flyback diode on for instance a relay coil: the diode will allow the back emf to flow back to the power supply without damaging the switching transistor. <A> Motors and generators are somewhat interchangeable things. <S> If you spin a motor, it can generate voltage - even if you spin it by electrical means. <S> At a dead stop, a motor produces no voltage. <S> If you apply a voltage, and the motor begins to spin, it will act as a generator that will produce a voltage that opposes the external voltage you apply to it. <S> The 'back' part of 'back emf' reflects this opposition. <A> It is the reverse voltage generated when you power a motor. <S> Motors & generators are almost the same in principle. <S> The difference between applied voltage & back emf is what supplies power to the motor. <S> If you stop feeding power to a motor, it'll keep spinning and generate a reverse voltage. <S> That is back emf, and directly proportional to motor speed. <S> Hence this is often used for motor speed control. <A> When a current flows through a conductor it generates a magnetic field around the conductor. <S> with that being said in a solenoid the exact process take place, The magnetic fields around each turn on the coil link with the rest of the other fields on other turns to form complete loops around on the out side and the inner core of the coil. <S> These line of flux will determine the polarity and strength of the solenoid. <S> No matter how tight are the turns there will be flux lines that will always remain around each turn, these smaller flux lines will induce a current in the coil when there is an applied voltage(these currents that are induced are known as Eddy currents). <S> But when these currents are induced they will be in a opposite direction with the applied current and since it is in a counter direction therefore it is known as the back EMF. <A> When a armature is moving in a permanent magnetic field than induced current in the coil and this current also produced magnetic field. <S> Permanent and newly produced magnetic field make interaction between them. <S> Due to this coil move and torque produced in the coil and anti.torque wants to stop the motion of coil <S> this is the back emf in the dc generator. <A> A typical electromagnetic (EM) circuit, like most systems occupying our environment tend to resist change. <S> For mechanical systems we have Newton's laws of motion describing their nature, and his First Law basically states that a system at rest or moving at constant velocity and not acted on by an outside force will remain at rest or at its constant velocity. <S> I.e. it will resist change. <S> Well an EM circuit is similar to this, somewhat, in that if you change the current in the EM circuit, this will cause a change in the magnetism the current generates. <S> Back emf is the force generated that will oppose this change in current that you make, as you make it. <A> AC voltages change polarity every half cycle. <S> In an inductor each half cycle generates a magnetic field According to the polarity of that cycle. <S> At the moment that the voltage changes polarity the first half cycles magnetic field starts to collapse and the new half cycle starts to build the collapsing half cycle resists the building of the building half cycle and this is what I was taught is CEMF or some call it back emf
|
Back emf is the voltage produced (generated) in a motor as it spins.
|
Design of Wiring Harness Tester for Automobiles I've been given a task to design a wiring harness tester for automobiles. The tester's job is to test wiring harnesses which can contain upto 300 wires. My initial design was quite simple. Feed the wires 5V and connect them to multiplexers. The AVR can address the mux and test each line to see if its high. If its high, the wire is good to go. In my "back of the envelope" design I chose to use 10 32-channel mux. Of course, addressing each would also take 50 pins in itself - not practical. But I could address each using the same pins - that is, I could wire them in parallel. So if I set mux 1 to select line 12, the rest of the 9 mux also do that. The uC can then check to see if all these 10 lines are high - if so, they are all good to go. However, I also need to check to see if two lines (or more) are short circuited. Obviously, this means that I'll need to make sure that the only the line being addressed is high. How can I ensure this? To my understanding, I'm going to need some sort of device which can switch voltages for lines. I thought of using a demultiplexer to switch the 5V onto the wire being tested. So suppose wire 'B' is being tested - the uC would switch 5V onto wire 'B' and then run through all wires to see if they are high. If only the other end of wire 'B' (i.e. B`) are high, then the wire is good. What would be the best way to approach this problem? My ultimate goal is to test the entire wiring harness and then display the errors (or lack of) on a 20 x 4 LCD. <Q> A few other things to consider. <S> Is this a 12 vdc system (the most common voltage on autos) or 24 or even 48 (commercial and military)? <S> As a general rule of thumb you want to test at two to three times your rated voltage. <S> So 24 to 36 VDC. <S> for a standard 12 volt system. <S> This helps find weak spots in the insulation. <S> Next, is this strictly power and signal wiring? <S> Most autos today use data buses like CAN. <S> In this case you need to send signals, not just voltage. <S> You also need to look for cross talk. <S> Ignition wiring must be adequately shielded to prevent EMI. <S> There needs to be a load on the system and not just testing for voltage. <S> A high resistance connection will show a good voltage as long as current is low. <S> Finally you should subject the harness to flexing and even thermal effects to simulate what it will experience in use. <S> I realize this an extensive list for testing. <S> Some will argue it is not needed, but a bad wire harness on a car or truck will lead to expensive down time and repairs. <S> I know I had the misfortune of having such a car a couple of decades ago. <S> I still will not buy that brand of vehicle. <A> The obvious solution would be to string together a bunch of IO expanders such as the MCP23S17 which gives you 16 IOs. <S> For bilateral testing of 300 lines you'd need about 40 of them which at about a dollar each shouldn't be a problem. <A> Jim gives good info about what to test, but I think you're still stuck on how to drive 300 wires. <S> With 300 wires you're really looking at 600 connections: 300 input at one end and 300 readers at the other. <S> Doing it like this will take a bit longer to set up a test, but not that much longer <S> : 60ms to shift the data out and then shift the inputs in at 10kHz. <S> Ignoring settle and processing time, that's around 20 secs to run through every wire.
|
You could test for resistance instead of voltage, but I have seen a few cases where even a circuit that shows very low resistance cannot conduct enough amperage. I did something similar a long time ago, albeit with around half the connections, and programmed a fistful of FPGAs as serial shift registers, daisy chaining them to get the required connection count. The whole thing was driven by a small AVR and used only 4 signals: clock to drive the shift register, data out, data in and latch inputs. You need to pay special attention to any shields.
|
Is the flatness of DC output of a typical ATX power supply unit worse than a power adapter? I converted an ATX power supply unit (Seasonic, 330W) into a standalone power adopter (by adding load, etc.), to which I connect multiple things. When I plugin a computer and a monitor each to a 12VDC line, they work fine, but when I also plugin an audio speaker to another 12VDC line, it gives a noise that is at an unusually bad level. If I, instead, just plugin the speaker to an ordinary AC-DC switching power adopter, then, the noise dissapears. I was wondering if the flat level of the DC output of an ATX PSU is that bad. I had though that switching adaptors should be worse than a power transformer (which is used in ATX PSU) with respect to flatness, but the reality seems to be the opposite. Am I wrong? <Q> The ATX power supply is a switching power supply. <S> It's important to be sure of the difference - a switching power supply switches the voltage at a much higher frequency (e.g. 65kHz) <S> so smaller transformers can be used (transformers work more easily at higher frequencies) <S> The downside is high current switching can easily cause EMI problems if not dealt with properly, and often in cheap power supplies (e.g. ATX) <S> the filtering is very basic and may not always meet regulations. <S> A "standard" supply uses the 50Hz or 60Hz mains frequency to change the voltage, so the transformer for the same amount of power would be much larger. <S> The supply size will likely be over twice as big for the same rated output. <S> However with low frequency and (usually) linear regulation, these supplies are usually quieter. <S> Are you absolutely sure your "AC/DC" supply is a switching supply? <S> It is relatively easy to make a quiet supply using either design though, so you may find a well made SMPS (can include linear regulation after initial switch regulation) <S> is quieter than a cheap (possibly unregulated) standard supply. <S> I think your noise may well be present all the time, and causing issues with the sensitive (active I assume :-) ) <S> analogue speaker circuitry. <S> It may be (as mentioned previously by Madmanguruman) from the PC/monitor plugged causing problems with regulation, or could be a grounding problem of some sort. <S> Depending on the frequency (be good to know roughly how high/low it is) <S> it would be easier to guess at what is causing it. <S> An scope on the lines would tell the full story. <A> We have a few ATX units converted in the office, we didn't try with an big external load but loads we use are around 3W. <S> When we build the things we looked at the output with a scope in AC coupled there was noise (more than bench supply) <S> however it was at an acceptable level. <S> Perhaps only 30-40% more then bench supply for a given voltage output. <S> Sounds like speaker is not well designed as some high frequency noise creeping back into the output. <S> In this case, I guess supply noise may be the issue, but the speaker should be able to cope with it, it sounds like it is not well designed. <A> ATX supplies specify their ripple to be 1% of the rail voltage. <S> What I suspect is happening is that the other loads are disturbing the rail and the speaker is picking up the disturbances. <S> Even though there may be multiple connections to 12V, I suspect that there's only one feedback loop for all the feeds, so the noise coming from the other loads is enough for the speaker to transduce. <S> Try the speaker on the ATX supply without the monitor and/or computer and see if there's an effect. <A> I assume you are refering to noise on the audio output of active speakers. <S> The power supply itself could also directly produce audible noise, which is a different problem. <S> In this case, the difference of the two power supplies could be that the output is connected (or not connected) to ground in a different way.
|
The noise could be caused by a ground loop .
|
Why use a three opamp instrumentation amplifier? This TI application note shows this typical instrumentation amplifier (InAmp) with three opamps (p.4): Further down the page the following two opamp InAmp is shown: The former is more common (I think) and easier to understand, but is there a good reason to prefer this one over the other? After all it's more expensive since a third opamp is needed. Also, the two opamp version doesn't have R3 or R4 in its \$V_{OUT}\$ equation. Is the amplification really independent of their value? <Q> However, these drawbacks become less important at high values of overall gain <S> http://www.biosemi.com/publications/artikel7.htm <S> On the other hand, this claims the CMR is better for the two-op-amp version: <S> The two-op-amp configuration can provide higher CMR, especially in low-voltage, single-supply applications. <S> I'm not sure which is correct. <S> Also: The V1 signal must propagate through two op amps, but the V2 signal propagates through one op amp. <S> When input signals contain frequencies greater than the flat portion of the op-amp gain curve (Reference 2), the V1 signal attenuates more than the V2 signal. <S> The unequal attenuation causes the signal to unbalance, and CMR reduces at high frequencies. <S> http://www.edn.com/article/492092-Don_t_fall_in_love_with_one_type_of_instrumentation_amp.php#ref <A> Since R1 = R2, for the 2-opamp version the equation for \$V_{OUT}\$ simplifies to \$V_{OUT <S> } = \left( Sig_+ - Sig_- \right) <S> \times <S> \left( 2 + \dfrac{2 R2}{RG} \right) <S> \$ <S> and indeed there's no sign of R3 or R4. <S> So I made the calculation again, and I found the following, different equation (I don't include the derivation because too much TeX involved): \$V_{OUT <S> } = \left( Sig_+ - Sig_- \right) <S> \times <S> \left( 2 + \dfrac{R1 + <S> R3}{RG} \right) <S> \$ <S> which I like better because at least we have a term R3 here. <S> Of course <S> if \$R1 = R2 = R3 = R4\$ <S> both equations are equivalent, but this condition isn't mentioned with the schematic. <S> (I'd appreciate it if somebody can confirm that my equation is indeed correct.) <S> Madmanguruman noted that the gain is minimum 2 for this configuration, which also shows in the above equations. <S> I'm not sure this is a serious restriction, since instrumentation amplifiers are usually used for much higher gains than 2, especially for strain gauge and other Wheatstone bridge measurements. <S> Gains of 100 to 500 are common. <S> IMO Madmanguruman's other observation that \$Sig_-\$ passes through two opamps is not correct: the inverting input of the top opamp is kept at \$Sig_+\$, and \$Sig_-\$ only influences the currents through the resistors. <S> It looks like the 2-opamp version is a good alternative for the classic version in most applications, since, like you said, you save an opamp. <S> edit In integrated form <S> you don't gain (no pun intended) much from choosing a two-opamp version. <S> The INA122 costs USD 6.86 while the three-opamp INA129 costs USD 7.35, both Digikey prices. <A> According to Wikipedia , the two op-amp circuit can only provide a gain greater than 2. <S> Also, you can see that for the two op-amp circuit, SIG- generates an 'intermediate' signal which is compared with SIG+ at another opamp, creating a small imbalance from a signal propagation perspective. <S> The three op-amp circuit doen't have this issue, since each input has comparable propagation delays - each input generates an intermediate signal (with independent opamps) which get compared at a discrete differential amplifier stage. <S> R3 and R4 aren't in the equation because of \$R1 = R2\$ and \$R3 = R4\$, much like the first circuit where R1 and R3 aren't in the equation (again, because \$R1 = R2\$ and \$R3 = R4\$). <S> The missing terms simplify out because of the equalities.
|
The two op-amp design has in principle some drawbacks in comparison with the three op-amp design: the common mode input range is lower and the matching of the resistors is more critical if a high CMRR is to be achieved (Graeme, 1973).
|
Capacitors, fluid models, and pumps In the circuit below what additions are needed so that charge will move from Ch to Ca, given that the charge on Ca can be higher that Ch? In this system (see image below, it's a thought experiment for me at this stage), it is possible for the capacitance of the capacitor to dynamically change. ps. this question is a simplification of an argument that occurred between two electrically inexperienced people, me being one of them. Thanks <Q> Charge will move from a higher potential (voltage) to a lower potential. <S> In the fluid analogy, fluid current moves from a high pressure to a lower pressure. <S> In the same fluid analogy, charge is equivalent to a volume of fluid and a small volume of fluid can be at a higher pressure than a larger volume. <S> In electrical terms <S> , Q = CV, where Q is charge, C is capacitance and V is voltage. <S> So a small capacitor charged to a high voltage could hold less charge than a high value capacitor charged to a lower voltage. <S> Connecting the two together would result in a current flowing from the small capacitor (with less charge) to the large capacitor (with more charge). <S> As to whether the capacitance can change dynamically, well yes if the area of the capacitor's plates or the distance between the plates changes or potentially, (no pun intended) if the dielectric constant of the material between the plates changes. <A> This is a passive circuit and the voltage will only tend towards equilibrium. <S> If the capacitance of the caps can change, then you can do it without an actual voltage or current source. <S> You'd need to change the capacitance of the source in the direction that will cause its voltage to increase, or vice versa for the other cap. <S> q = <S> C⋅V, so to increase voltage, you need to decrease capacitance. <S> So if you separate the plates of Ch enough, it should increase the voltage of Ch enough to drive charge into Ca. <S> Note that you're still using an energy source, but it's mechanical now instead of electrical. <S> (This is actually the reason why people thought capacitors stored charge on the surface of the dielectric instead of on the plates . <S> When they charge it and disassemble the plates, the voltage rises enough that the air breaks down and the charge gets deposited onto the dielectric.) <A> If by "charge" you mean the voltage over the capacitor it's impossible for current to flow from \$C_H\$ to \$C_A\$ if the voltage over the latter is higher. <S> If by "charge" you mean energy <S> it's different. <S> The energy in a capacitor is \$\dfrac{V^2 C}{2}\$. <S> If energy flows from the capacitor at the highest voltage to the other one energy is lost in the resistor. <S> Suppose both capacitors are equal capacitance, \$C_A\$ being at \$V\$ volt, the other one at zero volt. <S> Then the total energy of the system is \$E = <S> \dfrac{V^2 C}{2} + 0\$ <S> before current starts to flow. <S> After both capacitors are connected through the resistor current starts to flow until there's an equilibrium, where the voltage on both capacitors is \$\dfrac{V}{2}\$ volt. <S> The energy is then \$E = \dfrac{\left(\dfrac{V}{2}\right)^2 C}{2} + \dfrac{\left(\dfrac{V}{2}\right)^2 C}{2} = <S> \dfrac{V^2 C}{8} + \dfrac{V^2 C}{8} = <S> \dfrac{V^2 C}{4}\$. <S> That's half of the energy we started with! <S> Where has the other half gone? <S> That's dissipated in the resistor as heat. <S> If you would eliminate the resistor and connect the capacitors directly, you would still lose half of the energy you started with, but then most of that energy will be radiated as RF energy in the spark you would get during shorting. <S> Translating to the hydraulic model <S> you can see the voltage over the capacitor as a water level (water pressure is also used, but a higher water column gives a higher pressure, so that's OK). <S> The capacitance is then the water capacity of the tank. <S> If you would connect a full tank to an empty tank of the same capacity, both tanks will end half full, i.e. their water levels halved. <S> Which agrees to half the voltage from the calculation.
|
In order to move charge from a capacitor with lower voltage to another capacitor with higher voltage, you will need to add an energy source to the circuit.
|
draw 30W @ 5v to run LED light string and Arduino from a car battery? I've got a set of LPD6803 LED lights controlled by an Arduino that I'd like to connect to a 12v system powered off an auto battery. The lights can run off 5-12V but this particular Arduino board is spec'd for only 4-8V Vin. The total draw of the lights will be something under 30W. My guess is significantly lower, but I'm basing this on the spec sheet. (In testing I can run them off a 5V/2A AC adapter and it works fine) Any ideas for the simplest way to power both from the single 12v source? It seems like the lights can run off a 12V circuit while the Arduino runs off a 5V circuit. Or I can run them both off 5V, if the 5V source can provide this power. I'm pretty sure a 12v->USB plug probably wouldn't. Does a 7805 apply here? (I also have an inverter + AC adapter solution I could use but it's quite a hack!) Thanks! <Q> You can use a 7805, but only to power the Arduino; the LEDs should then be powered directly from the 12V supply, since the 7805 can only supply 1A. A higher current, if possible, would also require a considerable heat sink. <S> And that's where a switcher comes in. <S> 30W at 5V is 6A, and 6A over (12V - 5V) is 42W wasted. <S> The best solution would be to have a switcher that gets you the 5V for both Arduino and LEDs, and you won't get this kind of power loss. <S> Switchers for these voltages can reach efficiencies of more than 85%, so consuming 30W will result in a loss of 5W, down from 42W. <S> National's Webench designer suggests a design around an LM2743 which is even 94% efficient (only 2W loss in regulator). <S> Linear Technology also lists several devices that can handle the job. <A> In general the LEDs should be stacked 'higher' to take advantage of the higher voltage. <S> So for example, say you can run 4 leds in series with 5V power you can probably run 9 LEDs in series with 12V at the same current. <S> The extra LEDs in series will have added voltage drop to compensate for the higher rail voltage. <A> You don't need to build your own power supply. <S> 5V @ <S> 2A is readily available as a "cigarette lighter" adapter, an aftermarket solution for charging an iPad etc. <S> in a vehicle. <S> They're cheap enough that you can cut the plug off the wire or take the circuit board out of the case if you don't care about using it in a car. <S> Here are a few examples: http://www.amazon.com/Micca-2000mA-Power-Adapter-Slim-HD/dp/B003G8OVNA http://www.amazon.com/Kensington-K33497US-PowerBolt-Charger-Compatible/dp/B003PU01M4
|
Since the lights can run on 12V, but also 5V, there will be huge power losses when running off a 12V supply.
|
How can I avoid voltage spikes when connecting/disconnecting a 12v battery? I have a computer that runs on 12v from two parallel lead acid batteries. I need to be able to swap the battery banks for fresh ones every now and then without ever losing power to my equipment. I can do this by replacing one battery at a time, that's no problem, however I'm curious about best practices when swapping large batteries that's powering sensitive equipment. Should I be worried about spikes when connecting the wires? Should I be using something like ferrite beads or diodes to protect my stuff? Thanks <Q> What is the equipment apart from a computer? <S> You should have spike protection already present sufficient to meet anything liable to arise. <S> Substantial capacitance on battery lead. <S> Small caps at regulator inputs. <S> Maybe an inductive filter in battery lead. <S> MOVs or similar on power lines do no harm. <S> This should be overkill if all is designed well. <S> Connect 2nd battery via a resistor that would drop about say 3V at full load current. <S> Reduce resistor to zero. <S> Hard connect 2nd battery. <S> Add resistor set at 0 ohms from V+ to 1st battery <S> + Break 1st battery direct connection. <S> Remove resistor <A> Use wire-or diodes. <S> That is simple and safe. <S> As @Russell McMahon suggested, caps after there. <S> 0-ohm resistor isn't a great idea since the batteries will be at different (open-circuit) voltage. <A> I can do this by replacing one battery at a time <S> , that's no problem <S> Yes, that's a good idea. <S> Another alternative is to connect both of the new batteries, and then disconnect the old ones. <S> Since the batteries are in parallel, it doesn't matter if you add a new battery (assuming they are in good health), since the supply voltage will be roughly equal. <S> Should I be worried about spikes when connecting the wires? <S> Since you are connecting it in parallel, most likely not. <S> Since there's a load on the from the computer, it is possible that the supply voltage raises slightly (due to the new battery being able to supply more current with less voltage sag), but it should never exceed the rated voltage of the battery. <S> With these 12V batteries, I would not worry. <S> Should I be using something like ferrite beads or diods to protect my stuff? <S> If some of the equipment causes lots of switching noise (causing voltage spikes or dips), you might want to include a diode to ensure the voltage drop across the supply is always 12V. <S> However, in most cases a battery can act as a diode itself, so you are already technically protecting yourself via the battery.
|
The exceedingly cautious may consider using a variable resistor or electronic equivalent to change batteries. It should not be a vast issue if the load is not disconnected at any time. Increase resistor to max. MOVs are not a bad idea.
|
Detecting proximity (< 15cm) to a linear device Problem: my dogs constantly counter-surf (stand on their back legs to get stuff off of the counter), but they're smart and only do it when nobody is around; it's very difficult to catch them in the act. Before I try to implement some way of deterring them (but I don't want to shock them), I need to be able to accurately detect when they're doing this. Given their height, I think the best way would be to somehow detect when their collar is within 10 or 15cm of the edge of the counter. I'd considered RFID but that would require readers every 20cm or so with their range/power turned way down. Is there a way to detect when something is within a certain range of a linear device? I'd like to mount something under the edge of the counter top and when it detects a collar that's in its range, do something (in the short term, that 'do something' will probably be take a picture with a webcam.) <Q> In my opinion, the solution you are looking for is the wrong solution. <S> Doing this sort of thing will be expensive and/or not work well due to the amount of "tweaking" required. <S> Either way, you won't be super happy with the results. <S> I suggest a completely different approach (or two). <S> Instead of triggering when the dog gets on the counter, trigger when the dog goes in the kitchen. <S> This is going to be very kitchen-dependent, and won't work for all situations. <S> But in my house, for example, the kitchen has a tile floor and there is carpet near by. <S> On that boundary, there is a "natural" place to put an RFID or other sensor that would trigger when the dog goes by. <S> This would be a LOT easier than putting a sensor on the entire counter edge. <S> Go super low tech. <S> Put a simple bar across the front edge of the counter (1/2 round moulding or half a pipe). <S> Connected to the bar are some micro-switches. <S> When the bar is pressed, the switches close, and whatever you want is activated. <S> Super easy, super cheap, and super reliable. <S> If you must put a sensor across the entire edge of the counter I suggest using an IR beam. <S> If something blocks the IR beam then the alarm goes off. <S> The most reliable way to do this would be to use an IR LED that is pulsed at 38-40 KHz for the emitter. <S> Using a remote control sensor greatly reduces the effects of ambient light and other nasties. <S> Of course, this won't discriminate between the dog and you, but those are the breaks. <A> Why not use a PIR sensor . <S> You could use this and the following circuit: Where instead of using a relay you could use a Buzzer to warn the dogs off. <A> On linux there's motion and windows has yawcam . <S> Motion lets you mask out areas like your counter and runs scripts on detection.
|
The sensor would be a simple IR remote control that outputs a digital signal when 38-40 KHz is received. We've trained our dogs that they can be on the carpet but not the tile. If you plan to capture webcam anyway, just use some motion detection software.
|
Information content of amplitude modulation versus single-sideband transmission An amplitude-modulated radio signal with carrier frequency C, which includes frequencies from 0 to F, will use output frequencies in the range C-F to C+F, or a total bandwidth of 2F. A modulation approach called single-sideband modulation omits either the frequencies below C or those above C, and simply transmits the others, on the basis that the frequencies on the other side of C are "redundant". It would seem, though, that there is information content in the seemingly "redundant" frequencies. For example, if the signal to be modulated on a 1MHz carrier was a sine waves at 100Hz, an AM signal would contain two frequencies: 999,900Hz and 1,000,100Hz. Receiving both frequencies and demodulating them would a 100Hz signal whose phase matched that of the original. If the signal were single-sideband modulated (let's assume upper), then the modulated signal would simply be a continuous 1,000,100Hz signal. Although a receiver which was tuned to precisely 1,000,000Hz would be able to detect that the signal was a 100Hz signal, I see no means by which it could determine anything about the phase of it. On the other hand, it would seem like it would be possible to have two signals amplitude-modulated in the same bandwidth if the carrier waves were 90 degrees out of phase, provided that the receiver could discern which carrier wave was which. If the signals to be modulated were devoid of DC content, one could obtain such a result by having the base level of one carrier substantially exceed that of the other. The receiver would be phase-locked onto the first signal when the primary (0 degrees) carrier strength was at maximum. If one can make use of two simultaneous analog communications channels, would amplitude modulation of two signals with carrier frequencies 90 degrees out of phase provide the same level of bandwidth efficiency as single-sideband modulation? What other tricks exist? (BTW, I'm pondering the notion of performing spread-spectrum transmission by amplitude-modulating a medium-frequency signal (e.g. 100,000-250,000Hz) on a ~900Mhz carrier. Most "spread-spectrum" receivers I've seen are limited to receiving a single channel at once, but I would think that using analog modulation and demodulation would allow for a DSP to process many channels simultaneously). To get optimal results, however, one would probably have to be able to accurately determine the relative phases of the signals one was receiving. <Q> Your perfectly single-sideband suppressed-carrier modulated sinusoid certainly has a phase which can be measured. <S> However, what you cannot tell is what the contributions of that measured phase from the audio input and the RF oscillator were. <S> There is another form of single-sideband modulation, in which not only one sideband but also the carrier component is transmitted. <S> This provides a reference which can be used to synchronize the receive LO to the transmit one - normally done to insure exact tuning, but it would also give you the ability to recover the original audio phase. <S> It is also quite possible, especially with modern DSP gear, to transmit two separate audio channels, one on each side band. <S> This is commonly called independent sideband modulation (ISB). <S> Many spread spectrum implementations <S> are DSP based and capable of receiving multiple channels at once - GPS being a good example. <A> Are you not "just" describing quadrature (I/Q) modulation? <S> OTOH <S> I admire that you came to the conclusion by yourself, without (consciously) thinking about I/Q. From the Wikipedia article <S> Like all modulation schemes, QAM conveys data by changing some aspect of a carrier signal, or the carrier wave, (usually a sinusoid) in response to a data signal. <S> In the case of QAM, the amplitude of two waves, 90 degrees out-of-phase with each other (in quadrature) are changed (modulated or keyed) to represent the data signal. <S> Amplitude modulating two carriers in quadrature <S> can be equivalently viewed as both amplitude modulating and phase modulating a single carrier. <A> In standard amplitude modulation, there is no additional information present in the second sideband; you can suppress either one of them with no theoretical loss. <S> This is because the signal that is used to modulate the carrier is real-valued. <S> Real-valued signals have a Fourier transform that is Hermitian symmetric about zero frequency; therefore, given only a one-sided spectrum, you can readily calculate what the other sideband would contain. <S> In your question, you seem to be concerned about determining the phase of the modulating signal by observing the phase of the upconverted component at 1 MHz + 100 Hz. <S> There is no relationship between the baseband audio signal's phase and the transmitted carrier's phase at any given time instant. <S> You have also correctly deduced that quadrature modulation works; two orthogonal carriers (i.e. separated in phase by 90 degrees) can carry modulated signals that can be detected independently from one another. <S> This is used frequently in phase-shift-keyed techniques such as QPSK, as well as amplitude-and-phase-shift-keyed approaches like the various flavors of QAM. <S> With regard to your proposed project <S> (I assume you're suggesting a direct-sequence spread spectrum system), spread <S> spectrum systems are typically implemented using phase-shift keying, not amplitude-shift. <S> Synchronization is easier for constant-envelope signals, and power amplification is typically more efficient for that case. <S> It is also common to find spread-spectrum receivers that can simultaneously receive data from more than one co-channel transmitter, such as in CDMA .
|
There is no relationship in this case; as the name suggests, amplitude modulation results in a carrier whose amplitude varies according to the modulating signal.
|
Is it possible to code an animation into hardware? First off, I am a total illiterate in electronics. (Well, I did my Electronics for my Computer Engineering degree but that seems ages ago) I am considering creating a set of video displays playing a small loop of video in HD, as in a photo exhibition that instead of photos has HD video loops that look like photos but move ever so slightly, so you can only notice if you stare for a while. In order to make this installation less power-comsuming and less bulky, I'd like to know if the animation can be "coded" to a chip or whatever that could fit in the same flat screen, so it would be just a screen with a power cord. Thank you. <Q> Getting things to run fast enough for HD video is apt to be difficult, but if somewhat-cartoonish or lo-res video would be okay ( <S> e.g. 320x200 <S> at 30 or 60fps) <S> the hardware would probably not be overly difficult. <S> Standard video requires about 16,000 lines/second; if each line is 320 pixels and each pixel is one byte, that's 5,120,000 bytes/ <S> second to read out the data as it's being displayed. <S> I think an SD memory chip could do that. <S> If each frame were read twice, every second would require a little under 4 megabytes of data. <S> A 16GB chip could hold over an hour of uncompressed video in such a format. <S> If you want higher resolution video, you're probably going to either need much more complicated hardware, or a means of streaming data much faster. <S> One conceptually-simple way of doing that would be to build three circuits, one for each of the three signals in component video, and have each circuit read off its own SD card. <S> If one used 4-bit data for each of the components, one could then display 4,096 colors at twice the pixel rate as one would otherwise have displayed 256 colors. <A> Low-definition (but normal speed) video can be decoded by the chip in a hand-held mp3 player. <S> (Without those devices my kids would barely survive a long ride in the car.) <S> I am not exactly sure what you want (resolution, color depth, frame rate) but is sounds compareable. <S> But such chips are generally special-purpose combinations of a CPU and some MP3-accelaration hardware, sold exclusively to manufacturers of cell phones, picture displayers, mp3 players, etc. <S> But these days you can get remarkable computing power in a small PCB, with for example a 200 MHz snapdragon, or maybe you should consider a PC-on-a-PCB (so you can develop on a PC and then transfer to the small PCB). <S> So: yes, this is probably possbile, depending on your exact requirements, and available size and power. <S> But it might be less easy to make a small number, unless you can use an existing PCB-level product. <A> Building something to do this from scratch would be difficult to do with little knowledge of EE, so a (at least partially) ready rolled system would seem to be the way to go. <S> To get started a microcontroller dev board e.g <S> PIC32 or something more sophisticated like the BeagleBoard may be worth looking at. <S> There are digital photo screens out there with this already built in too. <S> Here is one (see user comments for mention of short video capabilty)
|
One possible approach might be to use a bank of SD cards, wired in such a way that data can be read in parallel from all of them.
|
Is a class I infra red laser range finder with range 30-40 metres possible? For our warehouse, we need to build a range finder for monitoring purposes. We have the following constraints: Use infra red lasers only Range should be at least 30 metres Only class 1 lasers permitted We would be glad if you could tell us about the theoretical feasibility of such a range finder. If it is not possible than is there a work around ? Also could you tell us how much is it going to cost ? Thank you so much ! <Q> You can buy one from any sporting goods store that will work up to 500 yards. <S> So in theory and practice they are very feasable. <S> One issue that the commercial models have is that they do have a MINIMUM distance. <S> The one I have gas a min of 17 yards. <A> Once you want a direct data interface the cost goes up quickly. <S> At short ranges under 10m clutter and spurious reflections matter. <A> The range has more to do with the quality of the optics involved and the sensitivity and selectivity of the receiver. <S> The quality of the algorithms in the ranger's microcontrollers could also be important (doesn't matter how good everything else is if the firmware can't interpret what it's sensors provide) <S> The power class only comes into play if the local atmospherics cause the beam to disperse or the beam is not focused properly, or if the ambient temperature (or the temperature of the target) is too high such that the receiver can't "pick out" the laser return reliably. <S> In such case, a higher class laser would be 'brighter.' <S> Imagine the temperature being ambient light or glowing surfaces, the laser being a finely-focused flashlight, and the receiver being a contrast-detecting camera. <S> You should be able to picture how these relate then?
|
Readily available sporting binoculars have range finders that work to 3000m Cheap ones capable of 200m can be had for less than $300
|
How useful is Horsehair brush for cleaning populated PCB Professor angry as I clean old PIC devboard with nylon brush, and warned me to use horsehair brush next time. I have been using nylon brush for long time, even to clean my PC and audio amp and they still not damaged. Is horsehair brush one of the ESD myth or really very much better than nylon in reality? Did anyone really kill PCB using nylon brush, or people use horsehair brush only out of scare? Asking because horsehair brush very thin and expensive but nylon brush in three different sizes and very cheap and easy to cleaning using only water. <Q> Natural Bristol brushes such as horse hair generate less static electricity. <S> There are some Nylon brushes designed to reduce ESD, but a general purpose nylon brush can cause ESD damage. <S> ESD damage is a cumulative effect. <A> There are two properties of a material that matter related to ESD (ElectroStatic Discharge): <S> How much they generate static electricity when they rub against something, and how well they bleed off any charge that might accumulate. <S> Being even a little bit conductive helps a lot in reducing ESD problems. <S> It's hard to generate lots of static charge, so a little bleeding off of the charge usually keeps it below the level where it can cause damage. <S> Unfortunately, nylon is a very good insulator so won't help much in bleeding off any charge. <S> Perhaps horse hair produces less charge when rubbed. <S> Materials vary in that regard, and I don't know about horse hair. <S> Cat hair is notorious for generating charge, especially against rubber. <S> Human hair is fairly good when clean. <S> Think of rubbing a balloon against your hair. <S> You can usually make it stick to something after that due to its static charge. <S> Dirty hair or hair with various conditioners in it (really a form of deliberate dirt) works less well because the dirt provides a bleed path for the static charge. <S> Some conditioners do this deliberately. <S> Perhaps horse hair has this sort of thing built in. <S> You'd have to ask a horse for details, or failing that perhaps your professor. <S> In any case, he's probably right about nylon being a bad idea. <A> Horsehair, tin-handle acid brushes are under $20 a gross (144 pieces) or $0.14 each. <S> A quick search shows that nylon brushes of the same size are (perhaps surprisingly) twice the cost for the same size brush. <S> Maybe your professor wouldn't mind buying a box and handing them out. <S> Also, nylon can be static-dissipative or not, so whether there's a concern depends on what you're using. <S> For example: https://www.gordonbrush.com/brushes/acid-sash-parts-cleaning-brushes/acid-brush <A> If you are using insulative fibers it MUST be kept wet which helps alleviate the charge build up. <S> Even horse hair is subject to this (rub your hair against a balloon and watch the static build) <S> but natural hair builds up less charge than regular nylon bristles (i.e. nylon not treated to be dissipative) and it also absorbs liquid more than nylon which helps it stay wet.
|
I don't know the properties of horse hair in this regard, but it's quite possible that it has lower bulk resistivity, especially when there is some humidity in the air. While there are occasional catastrophic effect that destroy device immediately, most ESD damage shortens the live of the device rather then causing it to fail immediately.
|
Is it normal for my dsPIC to run warm? My dsPIC33FJ128GP706A is being powered by a PICkit 3 at 3.19V. I can program the chip perfectly - it is recognised by my programmer. I felt it and it is quite warm. Not hot, just warm. I measured using my infra-red thermometer and it is at 37°C in a room which is around 23°C at the moment. Not anywhere near the limit, but I'm curious as to why it is getting warm. Is it normal? Or is there a problem on my board? (which is rather poorly soldered.) The Vcore voltage measures at 2.58V, which is within the allowed tolerances. It's being powered from the dsPIC's on-board LDO. <Q> You have all the information, so do the math and you can answer the question yourself. <S> The PIC is at 37C and ambient is at 23C, for a rise of 14C. <S> The first knee jerk reaction is that this is quite reasonable. <S> Next you look in the datasheet and see what the thermal resistance to ambient is. <S> This is shown quite clearly in table 25-3 on page 272, right where you'd expect to find it. <S> It says the typical thermal resistance of the 64 pin TQFP package is 40 degC/Watt. <S> Since you see a 14C rise, that implies the chip is dissipating 350 mW. <S> Next you look again in the datasheet (do you see the recurring theme here?) and see how much power you should expect the part to dissipate. <S> Table 25.5 on page 274 show the power current at 3.3V and several operating frequencies. <S> The maximum is 90 mA at 40 MIPS, which is 297 mW. <S> That's a bit less than it is apparently dissipating, but the 297 mW value doesn't include any of the peripherals or extra dissipation due to I/O pin current. <S> Overall, the numbers look close enough and there is enough slop so that your observed temperature rise doesn't sound out of line. <A> By repeatedly reprogramming my dsPIC33FJ128GP802 SOIC I have managed to push it up to 15 Celcius. <S> Ambient temperature: 19 Celcius. <S> Running temperature (performing some hefty signal generation): 10 Celcius. <S> Power supply: 3.3V <S> So yes, I would think there is possibly something up with your circuit. <S> You're not overclocking it are you? <A> Sounds reasonably normal, but it would help to know what it's doing. <S> For example is it sleeping or running at 40MIPS and toggling <S> all it's pins? <S> The power difference between these two scenarios would be huge. <S> Just checked the datasheet and it says that it can pull ~20mA when idle at 40 MIPS. <S> This is with clock on, core off and all modules turned off. <S> If you have some loading on pins and the core is on then <S> it seems like it could easily draw a lot more. <S> If not idle, it says around 84mA, with all pins at Vss and peripherals off but clocked, driven from external clock. <S> Thermal rating range from 40C/W for all but the QFN package at 28C/W. <S> You would be looking at drawing ~100mA @3.3V <S> to raise the temperature this much. <A> 37 <S> ° seems high, but still within normal range. <S> Are you powering external devices that require a lot of current directly from the PIC? <S> If so, I would suggest getting some MOSFETS or H-Bridges to control power to those devices. <S> Current draw on output is one of the biggest factors in pushing up the operating temperature. <S> LEDs are typically fine, but any kind of motor will cause problems.
|
Easiest way to figure out if things are normal would be to program to a known state, check the current and compare with specs in datasheet.
|
Logic problem with alarm system? In short, I have a bag that I'm making, the top of the bag is lined with LDR's (3-6), and there's a hidden switch to toggle the alarm on/off. I'm horrible at circuits, but I program, so it looks like this with code :D IF(ALARM_SWITCH_ON && LDR_LIGHT_SENSED) { SOUND ALARM } IF(ALARM_SWITCH_OFF && LDR_LIGHT_SENSED) { DO NOTHING }ELSE { DO NOTHING } A few questions: Would it be simple to do this? Would this require programming/PIC chips? Is there anywhere I could get help drawing a circuit diagram? Cheers,Karan <Q> As Oli noted, this does not require a microcontroller. <S> Your requirement is simple enough to do in dedicated hardware. <S> However, using a micro has some advantages: <S> The light/dark thresholds can be easily adjusted if the LDRs are driven into A/D inputs and the decision done in firmware. <S> This also leaves more flexibility for changes as you get experience with the unit. <S> For example, you might want to detect sudden light changes, not just absolute level. <S> Lower power. <S> The dedicated circuit would be on all the time unless you make it complicated. <S> The micro can easily power down all the sensors and sleep most of the time. <S> Sampling the light levels <S> every 500 ms is most likely plenty fast enough. <S> Even if it takes 100 µs to turn on the LDRs, wait for things to settle, take the A/D readings, make the decision, and go back to sleep <S> , that's still only 1/5000 of the time. <S> The rest of the time the total current draw should be 1 µA or less. <S> If the current draw is 20 mA when on (that's high), the average would still be under 5 µA. Note that all these estimates have been quite pessimistic. <S> Less parts. <S> All you need is the micro, the on/off switch, the LDRs, a resistor per LDR, and a transistor to switch on the LDR circuit. <A> You would set up the comparator to detect the change across the LDR(s), and wire the result into an 2 input AND gate (other input being the switch) and then output of this to alarm trigger. <S> If you give some details about the alarm (buzzer? <S> light?), and the power supply (9V battery?, AAs?) <S> then I'm pretty sure someone will help you draw up a circuit and recommend components. <S> Simple is always a relative term, but yes, I think this would be regarded as quite an easy project for someone not so experienced with electronics. <A> Voilà. <S> Done! <S> Seriously, you need very little hardware to this, especially since your program consists for the most part of "don't do anything" statements. <S> These are superfluous, so we keep Sound alarm IFF <S> both the Alarm Switch is on AND the LDR sees light. <S> That's what the AND gate above does; it makes the output active if both input A and input B are active. <S> The switch can be simply connected to the A input. <S> For the light sensor you have to compare the incoming light level with a predefined threshold. <S> This is done by a (surprise!) <S> comparator . <S> So, comparator and AND gate and you're set. <S> The disadvantage of this solution is that it's anything but flexible . <S> The least change you want to make will force you to start over again. <S> That's where the microcontroller comes in. <S> We can have a black-box approach to it, and attach a number of sensors to its inputs, like the LDR and the alarm switch, and drive a number of activators with from its outputs, like a siren. <S> The internals of the black box can be (re)defined at any time by downloading a new program to it. <S> While your current application will fit in the smallest existing microcontroller I wouldn't pick that one. <S> I'd choose a microcontroller with enough inputs and outputs, a few dozen would be nice, and also enough Flash to fit a bit more complex code. <S> Experience learns that you need a new feature from the moment <S> the current system is up and running. <S> Inputs for a typical alarm system are often just logical, 1 or 0 , like the switch (alarm systems often have all kinds of switches), but also a number of analog inputs, like the light level you're starting with. <S> Outputs will often drive relays, which in turn may switch about anything, from the siren I mentioned to a door opener. <S> So IMO the microcontroller is the way to go. <S> Arduino is immensely popular and offers good systems to start with, which can always be extended with extra function boards known as shields . <S> The Arduino site should get you started in no time, especially since you already have programming experience.
|
This would be possible with an opamp/comparator, and a few transistors or logic gates, so no microcontroller programming necessary.
|
How to carry high current on PCB I need to pass high current on some part of my circuit. I used an online PCB track width calculator to see that required track width is about 5mm and minimum clearance is 1mm, which makes it about 7mm width at total just for one track. I need several of these high current carrying tracks on my PCB which will consume too much space to afford. I am thinking of soldering copper wires on the top side of the PCB which will be parallel to the thin and symbolical tracks on the bottom side. But I would like to know if there is a more professional way of overcoming this problem. <Q> I haven't seen anybody else mention temperature. <S> Perhaps you left the default 10 degree rise in the online calculator? <S> That's pretty conservative. <S> A 20 degree rise isn't that bad in a lot of situations. <S> And if you aren't running the highest current continuously , it's quite possible <S> even a higher temp rise would be acceptable, since it will have time to cool down between cycles. <A> The first answer would be to specify thicker copper than the default, which is usually "1 ounce". <S> 2 ounce copper isn't usually that much more money. <S> After that it gets expensive. <S> There is also a limit on how far board houses can go with this. <S> The thickest I've ever heard of is 5 ounce copper. <S> If this is a one off or low quantity, then leaving the solder mask off the trace and soldering a wire over it is a legitimate thing to do. <S> A #10 copper wire can carry way more current than even a thick PCB trace of reasonable width. <S> Consider how the current has to get onto and off the extra copper wire though. <S> It's easy to solve the bulk conduction problem and forget about the feed points. <A> A quick search for "PCB bus bars" will yield a number of suppliers. <A> Another solution for boards is to make the trace as wide as you can afford (even if it's narrower than calculations, as long as it's not too much so). <S> Make sure the entire trace is NOT masked, then solder-coat the trace, so you have a nice convex bead of solder running the length of the trace. <S> It's probably not the best solution, but I've seen it used in a variety of production electronics, <S> so it can't be that bad (heh). <A> By allowing it I mean that this will of course have its consequences for the bottom layer too. <S> Make the vias as large in diameter as possible, for instance 1mm on a 1.5mm wide trace. <S> Copper filled vias will reduce the trace's resistance best, but they're much more expensive than solder filled vias. <S> You can also use thicker copper than the standard 35\$\mu\$, like 70\$\mu\$ or even 105\$\mu\$. <A> E-Fab Carries a line of PCB Bus Bars and Stiffeners, our standard products will carry from 16 amps to 128 amps http://e-fab.com/products/pcb-stiffeners/ <A> If you need just a tad more it seems reasonable. <S> In comparison with a 1mm and a 2mm copper wire: A <S> = h <S> * w = 35µm <S> * 1mm = <S> 35 000 µm² A = <S> h <S> * w = 35µm <S> * 7 <S> mm = <S> 245 000 µm² ~1/7 resistance per length A = r² <S> * pi = <S> (1mm/2)² <S> * pi = <S> 785 <S> 398 µm² ~1/23 resistance per length A = r² <S> * pi = (2mm/2)² * pi = 3 142 000 µm² ~1/90 resistance per length [1] <S> EEVBLOG Tinning PCB
|
Soldering a copper wire will bring big gains as a standard PCB is 35µm. High-current PCB bus bars are available from several suppliers, such as: http://www.espbus.com and are an ideal solution. If your layout allows it you could place a series of closely spaced filled vias over the length (and width) of the trace. With tinning you can decrease the resistance of the the path by 20% to 70% 1 depending on how thick it's soldered on.
|
Can I get the chip or electronic kit of a USB keyboard alone whithout the plastic case? first of all, understand that I have a very basic knowledge of electronics. I have a Commodore 64 case and I want to turn it into a USB keyboard. My approach would be taking a keyboard appart and getting its internal electronics and soldering its pins to a custom made PCB. But the problem is that all the keyboards I remember taking appart have chips which are connected to the membrane directly and there's no pins available to solder at least not by the hand soldering tool I have. Is there any electronic kit to make this, or a keyboard chip alone? <Q> All USB keyboards work by means of a matrix of keys. <S> There is no 1:1 relationship between a pin and a keyboard function. <S> If you examine the membrane you can see how the matrix is made up of columns and rows. <S> Rows and columns are scanned in sequence to find where they intersect at a pressed key. <S> These can be pretty hard to work with, especially if they are soldered directly on to a flexible PCB. <S> Ideally you would be looking for an old USB keyboard. <S> One that has buttons that no longer work - ideally it would have been a high quality one in its day. <S> Something quite a few years old - one of the first USB keyboards to be on sale. <S> They are less likely to be using SMD and more likely to have a real PCB inside <S> you can work with. <S> Even if they are SMD they will still have a better chance of having a real PCB. <S> If you're looking for a chip to completely roll your own, <S> the Alcor Micro <S> AU9410 is a good choice, but alas is (like most similar products) only available as a surface mount device. <S> A third option is to create your own from scratch. <S> You would need a microcontroller with USB capability (say a PIC18F4455), and some firmware to emulate a "Human Interface Device" (or HID). <S> Microchip have examples in their application library. <S> You can then get that to do absolutely anything you want with the keyboard. <A> DIY project of how to convert C64 keyboard to PC USB keyboard with just an ATMEL AVR chip can be found here . <S> USB HID protocol is emulated in software, and you don't need any driver since OS automatically recognizes the keyboard and you can use it immediately. <S> The advantage of such an approach is also that if you know a little C (GCC for AVR), then you can customize the keyboard layout to your taste. <S> Basic programmer for AVR chips can be made with just few resistors. <A> The teensyduino is an example of a chip which has pins that you can solder connectors for the keys used. <S> Furthermore it has reference software to allow you to use it to build a keyboard. <S> Example: https://github.com/technomancy/atreus .
|
You will find that (pretty much) all modern USB keyboards use surface mount components and ICs.
|
Attaching electronics to a spinning surface without a battery I am working with a friend to develop a spinning disk with LED lights on it. The issue we are having is wrapping our minds around the idea of electronics on a surface that is spinning. How do we interface with the LED lights without cords getting tangled around the spinning rod? Is there a way to provide power to electronics on a spinning disk without having the battery directly on the disk? Does this make sense? Thanks. <Q> You can use contacts (e.g. carbon brushes, or copper) to press lightly against traces on the spinning disk and transfer power. <S> Probably the simplest way. <S> A good source of ideas would be the numerous POV displays everyone seems to be building (one row of spinning LEDs make a picture) <S> I'm sure I have seen some inventive ways of supplying power (aside from battery) in a few of those. <S> Google and You Tube will know more. <A> The lowest tech, probably easiest method - Use brushes, just like for a motor. <S> On the rotating part, you'd have the equivalent of slip rings, although the orientation would be flat rather than axial. <S> The power thus obtained on the rotating part might have a bit of high frequency noise in it from the sliding contacts, so you'd want to be sure to get some filter caps on involved, probably near to where the power comes onto the board. <A> The more expensive, and reliable (over the longer term) way to do this is with spinning mercury conductors. <S> These are devices, usually with multiple contact channels in which there is a little circular channel of liquid mercury around the spinning shaft that conducts electricity across the moving gap. <S> I'm not sure what these are called however, and they are a more expensive solution than brushes, or inductive solutions. <S> I did a search on these a while back, and seem to recall them being up in the $120 range, though I forget the specs I was looking for at the time. <S> YMMV.
|
Or you could possibly use inductive coupling, e.g. something like a toroidal power coil on the base transfers power to a toroidal coil on the disk, although this would require more thought.
|
Protecting low power cables from heat I need to install a cable which will come in contact with a central heating pipe. It is 2 core carrying 5V, 500mA DC power to a simple circuit that can't run on batteries. The pipe could get to 82 degC if the central heating is really cranked up. Now, I can find heat resistant 2 core that will run to 100 degC but it is designed to handle 5 A so it a bit overkill in this situation, it's also twice as thick than I would like. What are the alternatives for this problem? Could I use normal cable and cover it in something? I've used material sleeves for 300 degC work in the past but I am wondering if simple heat shrink will do the job seeing as it is much much cheaper? Does anyone have any suggestions or experience that could solve this problem from the wire point of view and not simple adding a spacer between the pipes and the cable (which could get dislodged) <Q> First check the cable you have. <S> 82C isn't really all that hot, being well under the boiling point of water. <S> Is there really a problem with that cable? <S> If you've got insulation not rated for 82C, then you do need something else. <S> You don't need anything exotic, like teflon, at that temperature. <S> You also don't need a fancy "cable". <S> Since it's only carrying power, a simple twisted pair with the right insulation will be sufficient. <S> There should be lots of choices out there. <A> Heat shrink is probably the way to go. <S> One example: http://www.rapidonline.com/Cables-Connectors/Deray-6-1-Heavy-wall-heatshrink-123497/?sid=f60511cd-1683-44ab-bc70-9dcd34fded23 <S> As you can see that has "Continuous operating temperature: -55 to 110 degrees C" and shrinks at 120 degrees C. <A> It provides structural support as well as thermal insulation. <S> If you're going to go with heatshrink, I agree with @Matt and would recommend heavy-wall. <S> Can you use long cable-ties and 'hang' the wire a few centimeters under the pipe? <S> Air makes a pretty good thermal insulator... <A> Thanks for the suggestions, in the end I spoke to a few companies and got directed to glass braid sleeving, and example of which is on the link below: Braided sleeving as it will keep cable flexibility, where heatshrink would loose it. <S> Apparently this stuff is used in lighting systems among other things.
|
I'd recommend a "Heavy Wall" heatshrink as it has higher thermal insulation characteristics. One down side of the heatshrink though is it makes the cable far less flexible, so you should only use a short length of it where you really need it. I would consider sleeving your wires in PTFE tubing .
|
How to unsolder a flow soldered board with a large ground plane Hi I have a flow soldered board with some very big capacitors on it. I was hoping to get them off but when I looked it has a very large ground plane. I was unable to get these capacitors off because it heated up the surrounding board. When I attempted to pull them off even after the solder looked like it was melted and I sucked it off. Once i did this and pulled on the cap it pulled the leads out of the cap. Do you guys have any ideas thanks <Q> Large ground planes, or any large mass of copper make soldering/desoldering more difficult. <S> You may want to look at getting a better soldering iron that can automatically sense load and adjust power to keep the tip at set temperature (e.g. Metcal, Weller, etc) <S> Good solder wick and some liquid flux is invaluable, get some of both if you have none already. <S> Flux generously, use the solder wick to remove as much solder as you can (often with care enough can be removed to free the lead with no further heating, but almost always a little remains however you remove it) from both pads, then if any remains, heat the pad until solder is melted, then wiggle component gently and lift that side slightly , do the same with the other side to bring level, and repeat till you gradually work the component out. <S> One "trick" if solder will not melt due to too much copper is if you have another iron, you can try using two irons on the same joint (may need someone else to hold the other iron) but this is rarely necessary, and certainly not an alternative to getting a decent iron. <S> As SubZero says, if the leads come out you are certainly pulling too hard - with some components this happens more easily when they are hot, so a heatsink clamp on leads (e.g. pliers, which can be used to pull lead gently and avoid stress on body, or a dedicated clamp can be bought) is sometimes a good idea if possible. <S> With patience pretty much anything can be removed. <S> If you are planning on doing this a lot follow his advice about the hotplate and heat gun (soldering type, not paint removal type) <A> If your breaking anything your probably doing it wrong. <S> What I would suggest is getting a pre-heater, you can even build one yourself. <S> You didn't provide enough information as to why/what you need to remove or if you need the PCB Intact or are just getting used parts for other projects. <S> If your just gutting components get a hot air gun and be quick, or cut the board into multiple pieces thus allowing the heat to heat up a smaller area. <S> It really depends on how much work your willing to put into it. <S> Such as when I have a gigantic monitor PCB I sometimes cut the PCB up into smaller pieces so it will fit in my holder to desolder. <S> As for the pre-heater you want something like this: <S> http://mightyohm.com/blog/2009/01/diy-pid-controlled-soldering-hotplate/ <A> You need an iron that can dump a lot of heat into the joint quickly without overshooting - Metcal MX irons, with a large tip like SMTC-117 are perfect for this and can easily handle large groundplanes in a couple of seconds. <S> If it was originally soldered with leadfree, flooding with leaded solder will also help. <A> http://www.msed.nist.gov/solder/NIST_LeadfreeSolder_v4.pdf <S> This has some great info if you can understand it. <S> So you have huge ground planes, you want to add a solder that is lower in thermal conductivity to the top of your joints, just makes sure it is melted <S> and the joint has been wel <S> Liquidus <S> -temperature <S> -Contactangle- Wetting rate <S> -Surface Solder tension <S> Alloy -(ºC) <S> -(deg <S> ) -(dyne/ sec)-(dyne/ cm) <S> 1Sn-58Bi <S> 138 43 350 3001 <S> Sn-2.8Ag-20In 114 (low-temp. <S> peak);178 (primary peak) <S> 44 650 390 <S> theres also this one to try with similar to lead based Low melt P but also <S> high density slver <A> If the bottom of the PCB doesn't have a lot of components, you can try using a hot plate to heat up the large copper area. <S> If you don't have a hot plate, use a baking pan and some sand. <S> Yeah, that's right, sand. <S> It's commonly available and conducts heat extremely well. <A> For a long time now, I have successfully used a big cheap 100W hardware store soldering iron, to desolder large components. <S> I have not yet meet a component or a ground plane so large this iron can not handle. <S> Also with a big iron the heating time is much shorter and the component suffers less damage (for example connectors with temperature sensitive plastic on it). <A> You can also try an 858D hot-air rework tool. <S> Ebay for lots of links. <S> Put the large nozzle on it, crank up the air, and go in circles around the whole area to be desoldered, working the heat towards the cap in question. <S> Once hot enough and with lead-based low-temp solder in the joints to "contaminate" them, the cap should just pull right out <S> (gloves might be an idea, it'll be hot!) <S> The 858D is about 700W - far more heat power than even a large iron can provide. <S> I've done this with very stubborn terminal strips in multi-layer PCB's. <S> Invaluable tool for today's repairs.
|
It's a PID (Proportional Integral Derivative) hotplate, You can use it to heat up the entire board to a temperature below solder melting and then use a heat gun/desoldering tool to remove the components. And as I said if your pulling the leads out your either pulling too hard (Most likely), your iron isn't high power enough, or possible internal damage which you would not want to use in future projects anyway. However desoldering with "standard" irons is usually possible, you just need more time/care taken.
|
Cheap effective proximity sensors for detecting people? I'm building a small device that will be mounted on the ceiling (along with many other identical ones), facing downwards. I'd like to detect when someone walks underneath it. Due to the constraints of my system, the sensor needs to be: Cheap - the whole device needs to cost about $5, so I'd rather not spend more than about $1 on the sensor. Compact - the whole device is about 3cm diameter, so the sensor needs to be significantly smaller than that. Reasonable range - when someone is standing under the device, their head may be 50cm - 1 meter away. The sensor doesn't need to be fast - a few checks a second ought to be sufficient. Cheap pretty much rules out 'passive IR' pyrometers, and compact and cheap rule out ultrasonic transponders. I tried an eletrostatic detector, but while it does a great job of detecting charged plastic objects, it doesn't respond to a person standing on a wooden floor at all. Thus far, the best option seems to be an IR LED as a photodiode (I tried an actual phototransistor, but weirdly got a poorer signal than the LED). Using a setup with one LED emitting IR, and another reverse biased LED connected to an Arduino's analog in, I'm able to discern a useful return reflecting off my hand at anything up to half a meter. While this is usable, it's right at the edge of the range, and I'm concerned it may not work in the finished system. It does have the major advantage that I can put just one LED on each board, and use one board in sensing mode while another provides the illumination. Can anyone suggest a better option for proximity detection, or a refinement to the active IR option to extend its range? <Q> IR <S> (1) LEDs used to wash area from above with modulated IR with cheapest IR detectors that work for you. <S> (LED,photodiode,...) <S> Emitters should be able to be made "walk on" damage resistant. <S> (3) Emitters above with floor level reflectors - need not be visibly reflective. <S> More liable to be subject to damage than low level emitters. <S> (4) <S> Alibaba India has active IR sensor boards at Rs157 = <S> ~~~ <S> $US3. <S> This is whole PCB and volume unknown. <S> Gives an idea of bottom order of cost for completed units. <S> (5) <S> Capacitive may be able to be made to work at your range. <S> Philips PCF8883 sounds promising , priced at Digikey at $1.08/2500 or $2.80/1 . <S> If you can install the sensor plates at floor level rather than above the targets then capacitive sensing should be very suitable. <S> Many capacitive sensor circuits of variable merit here via Google images <S> Some well priced PIR sensor components <S> Ultrasonic sensor pairs From $US2.90/pair 1's, $US2.30/100's. <A> From your explanation and other question, it seems you are connecting your IR LED directly to the ADC input. <S> I don't think this will work too well at a distance, the ADC input will probably have quite a low impedance that will attenuate your signal. <S> Photodiodes have a very large impedance so you need a transimpedance amplifier to convert the current to voltage. <S> In the app note you link to, there are plenty of example circuits, all of which involve a transistor or opamp to amplify/buffer the signal. <S> Try one of these and see how it performs. <A> you can use light and photoresistor.which will be cheapest. <S> But photoresistors are sensitive to all lights. <S> The idea is that the light will be reflected by the ground and measured by the ldr. <S> If the is obstacle the value read will not be the same:so detection. <S> But ldr as I said is sensitive so where it is beeing used is important
|
I would use something that is designed for sensing rather than emitting, like a photodiode or your IR phototransistor (if it didin't work then you are probably not using it correctly), and feed this into an opamp, then into the ADC. (2) IF you are able to provide emitters at floor level facing up you can use beam interruption with sensors above. IR emitters can easily be very inobvious (IR filter can be black and opaque to visible light.)
|
Getting Started with Altera CPLDs I'm looking for recommendations regarding development kits for Altera CPLD prototyping but I'm afraid I'm not sure what to look for. The budget isn't too much - around $200. While I'm leaning towards Altera, suggestions regarding Xilinx are also appreciated. Though it does seem that Altera has better software than Xilinx. I'm thinking of programming the device in VHDL - would this be a good choice? Or is Verilog considered better? I think having an LCD on the kit is a must but 7-segment displays would be very fun to play around with as well. Though I'm not sure how easy would it be to get a "stand-alone" CPLD working. Summary: What should I look for when buying a development board? Should I stick with Altera's offerings or look beyond? Is there a specific board that's considered the best in its class? Assuming I get comfortable with CPLDs how difficult would it be to get a basic CPLD working on one's own PCB? What would I need to ensure that the device can be programmed while still in the system (In system programming?) <Q> Here is the schematic and layout for one of mine that I designed a few years ago: http://www.leonheller.com/CPLD/Proto(Page1).pdf http://www.leonheller.com/CPLD/CPLD.png <S> These days I'd use a MAX V device, such as the 5M80Z, as they are much cheaper and easier to obtain than the older chips. <S> Low-cost USB Blaster clones are available on eBay, you need one of those for programming your CPLD. <S> Whether VHDL or Verilog is used is up to you, choose whichever you get on with best. <S> Schematic entry is also supported by the Altera Quartus II software. <A> I wouldn't worry too much about what you choose, as there will be plenty to learn with even the simplest board. <S> I would definitely consider the other options apart from Altera/Xilinx, there is not really any "best" option as they all have different strengths. <S> Same with the VHDL/Verilog <S> - I picked Verilog based on a bit of research ( here is one, no doubt controversial link I based my decision on) <S> but mostly it was just the need to pick one of them, you can waste so much time (well I can) worrying about these things. <S> Saying that try and find one with good clear documentation, examples to follow and maybe a related forum or even a book based around it <S> (e.g. Pong Chu's "Prototyping by Verilog Examples" based on the Digilent S3 board) Digilent seem to be one of the best for producing good quality dev boards that are well supported. <S> An excellent way to learn is make your own dev board as Leon describes - I did a similar thing with an Actel (now Microsemi) <S> ProASIC3 FPGA, and <S> although it was certainly difficult with no prior knowledge I found it very rewarding and instructive, and the (simple) board worked fine in the end. <S> Estimated cost was probably about $15 or so ($8 chip, $2 self-etched board, $5 other stuff like oscillator made with hex inverter/crystal, LEDs etc) <S> It's probably just me <S> but I usually try to avoid dev boards for learning purposes, rather as tools to use after you know the ins/out of the chips. <S> Whatever works best for you is the key though, there are many ways to get to the same point. <S> Programming is commonly done via JTAG, and all the PLD vendors have their own programmers (you can try open source solutions but expect a rocky path) which attach to a header you place on the board. <A> CPLDs are great for a project, much more simple than FPGAs and cheaper. <S> You can design your own Dev board easily by taking a look at some reference designs. <S> I've made an open source CPLD dev board based on an Altera MaxV CPLD <S> , it's great and cheap, you can build it yourself easily or use it as a reference for your own design. <S> http://www.area0x33.com/blog/?page_id=218 Schematic entry is fine for simple modules, but when it comes to bigger more complex modules <S> it's much more productive to use VHDL or Verilog. <S> The good thing is that you can mix them all into the same project, for example start making simple modules by schematic entry and then start making other ones in VHDL, and some others in Verilog for example without problem. <S> Another great tool included with Quartus II from Altera (sure others will have something similar) is the simulation tools, so you can make and simulate completely your project and check how it performs without having to use the actual CPLD to check it.
|
It's quite easy to design your own PCB for a CPLD.
|
Do batteries lose voltage as they're used up? V = IR Resistance stays same, and I know as a fact that I (or current) decreases (my stuff runs slower on old batteries). So could a 9 Volt battery turn into a 1.5 volt one? <Q> Both effects occur as a battery is drained. <S> The open circuit voltage goes down and the internal resistance goes up. <S> Note that open circuit voltage is specifically measuring just the voltage the battery puts out with the internal resistance taken out of the equation. <S> That is <S> because there is no current thru that resistance, hence no voltage drop across it. <S> Any decent voltmeter will have at least 10 MΩ input resistance, which is so way more than even a dead battery as to not matter. <S> All that said, different battery chemistries have different characteristics regarding both these parameters as they are drained. <S> NiCd and NiMH have rather flat discharge curves after a short initial period. <S> That means the open circuit voltage doesn't drop much for most of the discharge cycle even as the stored energy is getting steadily lower. <S> These batteries then show a rather steep falloff in voltage as the last 10% or so of energy is drained. <S> For a NiMH or NiCd therefore, it's tricky to determine a state of charge just from the voltage. <S> Other chemistries have a more linear discharge curve (voltage as a function of accumulated Coulombs drained at a fixed current). <S> Old fashioned carbon-zinc cells are more like this. <S> Usually, there is a significant temperature dependence too, both in terms of voltage and capacity. <S> Yes, batteries can get complicated. <A> Your 9V battery will indeed give a lower voltage reading when it's exhausted and that's not just because of higher internal resistance; you may read 6 or 7V even with a very high impedance DMM. <S> I'm not sure you can go as low as 1.5V; the increased internal resistance makes that in the end you can hardly draw any energy from it anymore, so I expect that the voltage will go asymptotically to a somewhat higher voltage. <S> Even so, a 9V depleted till 1.5V will never be able to supply the current a 1.5V battery <S> can supply. <A> Actually, resistance dramatically changes as the battery is used up. <A> As a battery runs down it's open circuit voltage will drop <S> and it's internal resistance will go up. <S> Unless the battery is nearly totally dead though the open circuit voltage will remain reasonably flat compared to the internal resistance which seems to drop quite linearly (I imagine different chemistries will vary though). <S> A 9V battery might start off with, say 5 ohms of internal resistance, reaching over 100 ohms when discharged (figures are rough guide, not researched exactly). <S> If we took a moderately discharged 9V battery (internal resistance risen to 50 ohms) and read with a multimeter (a load of say 1 megaohm) we might read around 9V still, as the multimeter has almost no load on the circuit (e.g. 9 <S> * 1000000/1000050 <S> = 8.99V). <S> Under a 500 ohm load though it would drop to 9 <S> * 500/(500 + 50) <S> = <S> 8.18V. Maybe the open circuit voltage will end up at say 7.5V and the resistance 200 ohms (again these figures are just a rough example, google will no doubt know better) <S> So yes the voltage drops as the batteries get used up, and also the internal resistance rises. <S> It's usually better to check a battery under a load to get a good idea of how flat it is. <A> The Voc or open circuit steady state voltage is very linear in decline with SOC as the battery is a fairly constant capacitance with a charge voltage. <S> However the ESR rises sharply past 90% SOC and rises slowly below 50% SOC then rapidly below 10% somewhat like a bathtub curve . <S> So the ESR and recent current with memory secondary charge capacitance with higher ESR greatly affects loaded battery voltage with SOC. <S> The ESR increases the slope with a load current of V vs SOC at each end.
|
The voltage will go down with use, but in many applications the increased internal resistance will render the battery unusable long before the reduced voltage does.
|
Switch 5V with back voltage protection I'm trying to develop a design which involves switching a 5V rail. The design goals are: As low cost as possible (i.e. Can't use a fancy integrated solution) Relatively low current handling ( typically only a few hundred mA) Trying to keep the overall solution in the 10's of cent Low drop off on the the 5V when enabled ( > 4.8V ) Protection from reverse voltage when powered off The problem I'm having is with the last point. I've used a p-channel MOSFET as the switch, the gate of which is controlled from an op-amp. Everything is fine except for the "reverse voltage" part.The problem is that the body diode of the FET is going to conduct if an external power source is present. I'm looking for a low cost solution to this problem, but I'm having a mental block trying to solve it without using some expensive IC. Ideally I could just use a diode in series but the the drop-off would kill me there.I've seen lots of references to using back to back FETs to solve this type of problem but I haven't been able to figure out a configuration which works. The following is an overview of what I'm describing as it may be easier to visualise. Update: Based on the feedback from @endolith I now see how the back to back system is configured which I believe is as follows: Operation as follows: When gate low First FET GS voltage causes FET to be on This places voltage on second FET Drain Second FET has no GS voltage but the body diode conducts pulling Source high and causing GS voltage, which switches on the second FET This begs the follow-on question, how much current can the body diode take? Is it safe to use FETs in this manner? (assuming I have understood @endolith correctly) <Q> Basic P-MOS switching circuit: <S> The problem is that the body diode of the FET is going to conduct if an external power source is present. <S> You can connect two FETs in series with their body diodes opposite each other so they don't conduct when off, and get low drop-out when both are on. <S> Here's a crappy illustration of the concept from a product: <A> Or a reed relay could be another option if the current you are switching is low. <S> The back to back MOSFET could be accomplished by using an optocoupler to drive the gates, but there are plenty of cheap/simple ICs that will do the job easily, I wouldn't rule these out completely. <S> Here is <S> a useful app note from Zetex that mentions the reverse blocking capability of a bipolar transistor when base is high impedance (page 5, point 7) <A> Maybe a NCP380 would work for your circuit? <S> NCP382 may be a better choice if you have more then 1 channel <S> and you do not need adjustable current limits. <S> The wholesale (100 pcs.) <S> price is below $0.5. <A> Dude, Why do you have to make so complex !. <S> Here is the easy way to do it. <S> Connect the drain of your PMOS to power supply end and source to circuit end. <S> Connect the gate to ground. <S> The PMOS acts as a diode as long as your supply voltage is greater than the threshold voltage of the PMOS. <S> For more info visit.. <S> http://www.wa0itp.com/revpro.html
|
If you can handle a very small drop then maybe you could use a PNP instead, as they can block both ways.
|
KCL vs KVL in circuit analysis I'm making a simplified version of SPICE to teach basic electronics to high school students (This is for a high school independent study). Why does SPICE analyze circuits using Kirchhoff's current law instead of Kirchhoff's voltage law? Usually you have a voltage source to start with instead of a current source, and it is easier and more efficient to analyze a circuit using voltage instead of current. Using voltage to analyze circuit: (See best answer) Circuit Simulation Using current to analyze circuit: http://en.wikipedia.org/wiki/Nodal_analysis Thanks! <Q> The nodal analysis (KCL) and mesh analysis (KVL) will give equivalent results when analyzing any given circuit... <S> Though of course there are different special cases for each one (a voltage source doesn't map neatly into KCL, while a current source doesn't map neatly into KVL, for example). <S> Each node (except GND) has one associated equation. <S> So as the simulator is scanning the netlist, whenever a node is mentioned as connected to a device, either a term is added to the equation for that node, or a new equation is set up if the node was never mentioned before. <S> To set up the equations for KVL, you have to do some additional analysis to find all of the loops in the circuit so as to build an equation for each loop. <S> Nowadays there are probably well-established graph analysis algorithms to identify those loops. <S> But when the first SPICE simulators were written, in the early 1970's, even if those algorithms did exist (probably many of them actually did), implementing them would have meant substantial extra work for the grad students who were developing SPICE. <A> I think SPICE uses KCL because it is easier to solve matrix equations this way. <S> Using KVL leaves unknowns and makes it more difficult to perform Gaussian elimination. <S> The link <S> I posted in my reply to your previous question <S> mentions this and gives an example <S> (pages 9-10) Edit - about the diode voltage/current derivative, I noticed at the bottom of the first document it says "next time we will look at the diode model". <S> I tried going back to the /docs part of the address <S> but no luck. <S> So I tried adding 1 to the document number and by good fortune <S> this appeared, which I think is the diode document. <S> Hopefully it may be of some help. <A> I'll add some additional detail on the mechanics of how the equations are obtained. <S> Many SPICE algorithms use what are called "element stamps" to create the equation for a node. <S> The relevant stamp is selected based on the type of component and then the appropriate terms are added to the appropriate locations in the Nodal Matrix. <S> For a nice explanation of a couple of formulation methods for SPICE, see these lecture slides . <S> Slides starting at #21 illustrate the stamp method for a Resistor, a voltage controlled current source and an independent current source. <S> Finally, when voltage sources are present, the nodal method needs to be expanded by adding an additional equation to the matrix (slides 26-27). <S> While the final example uses hand equations, the same resulting matrix can be obtained by through the addition of the applicable element stamps.
|
One difference is that it's relatively easy to automatically set up your equations for KCL.
|
Probes with protection against slipping? There have been a number of times when troubleshooting something where I have caused more damage than was originally there when my probe would slip off a test point and short some things together. So my little brain started churning. What about test leads with a clear sheath that is spring loaded that covers the whole probe tip. This is always extended over the point. You press down on a test point and the plastic sheath pushes back until the metal probe tip comes in contact with the node. If you slip the plastic shoots back out to cover the tip and hopefully avoid a short. I am not sure how effective this would be but it might help. I did a search because I am sure someone thought of this and they have to out there somewhere but I haven't found anything just yet. I was going to try and make this but I don't really have the tooling. Has anyone seen something like this? If so can you point me to them, or am I missing the obvious design flaw?Thanks for the help,Russ <Q> These may have covers which are spring loaded and move away or the shroud may stay in position and need the tested point to intrude into the shroud end. <S> Just what the doctor ordered: Fused probe bodies with 4mm contact tips. <S> The tip are covered with a spring loaded sheath for added protection. <S> Unscrew the tip to access and replace the fuse. <S> Probe bodies are marked with the rating of the internal fuse. <S> From Cal Test electronics $14.93. <S> Materials: <S> Body: Polyamide (Nylon); Contact tip: Brass, Nickel Plt. <S> Banana Contact: BeCu, Nickel Plt. <S> Set available in red and black pair <S> RS <S> India grip probe. <S> Made to grip a standard test point Extech TL810 Electrical Test Lead Kit, Double insulated with CAT III-1000V safety rating, <S> Two 40" <S> (1m) PVC lead extensions (1000V rating) with shrouded banana plugs on both ends, Two very sharp, extra long 0.3" (7mm) stainless steel tipped plug-on test probes, Two stainless steel flat tip test probes (0.6"/15 <S> mm long), Two plunger activated retractable jaw clips with a wide 0.75" (19mm) <S> jaw opening <S> (TL-810 TL 810) <S> $45/set From <S> Double Insulated <S> 4mm jack Conforms to BSEN61010 Fully Shrouded and insulated to HSE GS38 Suitable for all BS7671 BSEN61557 Alphatek - Metrel testers Other colours available . <S> From Same people <S> Double Insulated 4mm jack Conforms to BSEN61010 Fully Shrouded and insulated to HSE GS38 <A> I would recommend the following type of test clips: <S> Some of these have really fine tips, which, when closed are almost completely retracted in the sheath. <S> This is a lot better than the hook of a standard scope probe, which is too long and protrudes so that it can easily cause shorts. <S> I find that these smaller ones don't get loose easily, and can be easily used for SMD pins. <S> You may have to power off your devices before connecting the pins, as they may short to the neighboring pins when connecting. <S> Once they're in place you can power up again. <S> This kind of clips is often used with logic analyzers where many clips have to be placed on several IC pins, often next to each other. <A> I have some nice small Hirschmann probes: <S> http://www.conrad.de/ce/de/product/104400 <S> They have rather sharp tips, so they don't tend to slip, but not as sharp as a needle, so it doesn't tend to cause injuries. <S> The tip is spring-loaded, which helps to avoid excessive force.
|
One variant of this is called "shrouded" probes.
|
What electrical connectors to use underwater? I am looking at doing a project with a AUV (autonomous underwater vehicle) and need to know the best type of connectors to use. I have listed the things I need from most important to least important: Reliability Ease of in installation Availability(ship time) Project Details My project is to have a main board(small atom motherboard), and a few other small micro-controller boards(arduinos) to be inside a main compartment. This compartment will utilize the connectors to provide a leak-free interface with the AUV's navigation(thrusters, ballast) and sensor systems(sonar, depth gauge). The vehicle will only be subject to about 20 - 40 feet dept, or around 18 psi. I need something that can be connected "dry", and then is waterproof afterwards, rated IP-68 . I have looked a little into Buccaneer . Does anyone have any experience on what is the best, or if I can DIY these? Picture of Buccaneer Connector <Q> I have come up with an idea for an inexpensive underwater connector system, using PEX swivel adapters, that might be of use to you: http://edwardmallon.wordpress.com/2015/01/29/a-simple-diy-underwater-connector-system/ <S> Those adapters are rated to 100 psi, so should be good to a reasonable depth. <S> The key is scoring the inside surfaces of the barbs with a wire brush so that the epoxy that seals the barb onto your cable gets some good mechanical adhesion. <S> Be careful not to hurt the oring seats though. <S> I also make sure that the wire insulation does not pass continuously through the epoxy, so that water can not wick down the conductors into the join if you accidentally cut jacket/insulation on the cable. <S> Links to the parts I am using are in the post, but there are plenty of companies making the parts. <S> I will be testing these guys at depths up to 30m in a couple of months, as part of some new sensor assemblies that I am building. <S> They will be left underwater for several months, but that means I won't have the final word for you on how well they handle long term depth exposure till mid year. <S> Addendum 2015-0-901 <S> I just thought I should add a note that the connectors made it through their first real world tests: spending more than four months at between 7-10 <S> m depth: <S> http://edwardmallon.wordpress.com/2015/08/26/field-report-2015-08-12-success-with-ds18b20-temperature-strings / <S> We put both of those loggers back in the water, with one unit stretching from 10 to 20m. <S> We will leave them in for 4-6 months on this run. <S> Will post that update next year. <A> SeaCon is the company we use at work, but at hundreds of dollars per connector in most cases, are probably way out of your league. <S> That SubConn connector is a lot more than you need as well. <S> It's designed for underwater mating, which I doubt you'll do. <S> You're probably planning on connecting everything up in air and then dunking it in water. <S> Underwater mating connectors also have ridiculously high mating/unmating forces and are rather large. <S> Given that your max depth is 20 feet, and pressure is about 1/2 PSI per foot <S> , you're looking at 10 PSI. <S> So any connector that can maintain a hard vacuum (14.5 PSI or so) would be feasible. <S> There's not a huge market for these things (most UUV projects are research or oil exploration related, can afford Seacons or equivalent, run to thousands of PSI of pressure, use pressure-compensated or water-blocked cables, and buy a lot more than you), <S> so most of the products you can afford and that might work will not say anything about pressure resistance. <S> They are usually variants of standard connectors like USB or Ethernet, and have an extra outer shell, screw lock, and an O-ring seal. <S> Be careful with O-rings. <S> It's real easy to pinch one and ruin it if you treat it like a normal connector, and sometimes they need a lubricant/sealant to work well. <S> You should probably rig up a leak detecting circuit, get a harsh environment connector, put it in 20 ft. of water, and see if it's up to snuff. <A> Rather than using an expensive connector specifically designed for this situation, some penny-pinching fishermen report success with an approach something like this: drill a hole through the hull (while in dry dock, so water doesn't immediately begin rushing through the hole) snap a rubber <S> grommet in the hole (so the hard edges of the hole don't directly rub against the outer insulation of the cable) <S> run the cable through the hole in the grommet (optional) route a slot in what will be the "hull side" of a small polyethylene board, from one edge to a little past the center. <S> Fill the slot with sealant and cover the rest of the "hull side" of the board with a thin layer of adhesive/sealant. <S> Arrange things so the cable runs out the hole in the hull, then the cable runs inside the slot to the edge of the board, and then out into the water. <S> Press the board against the hull, with the hole in the hull more-or-less centered and covered up by the board. <S> Seal the hole with silicone caulk / marine epoxy / marine <S> GOOP <S> / 3M-5200 marine adhesive. <S> In theory, you only need 2 rings: one to seal between the cable and the grommet, and one to seal between the grommet and the boat hull. <S> In practice, most people end up making a huge blob on the inside and the outside, completely covering up the rubber grommet. <S> put whatever connector you prefer <S> (it doesn't need to be waterproof) on the "dry" end of the cable. <S> wait at least a day for the sealant to dry <S> (Many boat manufacturers and fishfinder manufacturers discourage people from drilling a hole below the waterline. <S> Instead, they recommend running the cable up and over the lip of the hull, or at least up and through a hole above the waterline -- but neither one is an option with a completely submerged UUV / AUV). <S> How to Install a Fish Finder ; How to Install a Through-Hull ; How to Install Depth Finders ; Drilling Holes in Fiberglass ; Use epoxy to fill in holes below the water line .
|
I'd recommend starting with "harsh environment" connectors.
|
DC Motor very high acceleration I believe DC motors accelerates from 0 to maximum speed when power is applied. Let's say, it takes 5 seconds so that the DC motor could reach the maximum speed given certain power. Is it possible to rotate (or give torque) to the DC motors so it can reach the maximum speed directly (say at half a second)? <Q> In an ideal DC motor, rev is proportional to voltage and torque proportional to the current. <S> So if you connect it to a constant-voltage supply, it would ideally reach the maximum speed immediately. <S> Of course, this does not happen in reality: the mechanical parts have a finite moment of inertia, so you get an increase of angular momentum -> <S> torque - <S> > <S> current, which would be infinite for an immediate-response. <S> Such a current is prevented by two factors: a non-arbitrarily powerful supply, the internal resistance of the copper wire inside the motor. <S> Assuming you have an over-sufficiently powerful supply, you can also overcome the latter factor to some degree: the voltage that drops off at the copper resistance simply follows Ohm's law. <S> You can determine the resistance \$R\$ by applying a small voltage to the motor while this is blocked mechanically. <S> Then, rather than simply using the constant voltage that corresponds to the desired rev in torque-free mode, you always add the voltage <S> \$R\cdot I\$. You need to be careful not to produce resonances with such a feedback circuitry. <S> Also, not all motors might cope very well with the large currents that may arise with this method. <A> In order to speed up the start you need to apply a great power. <S> There are two problems: heating by overcurrent and isolation by overvoltage. <S> Most of motors can handle about 10% over the specification for small amount of time, 10 - 30 seconds. <S> But this will reduce the life of the motor by almost 50%. <S> It is like this becouse they are made to overcome the inertial load force on starts. <S> If you're not starting with full load applied, increasing the voltage/current may be a solution, but in this case try to use a good protection system. <S> Another option, that is commonly used on big motors, is to use another smaller and faster motor in the same axis that will help the main motor to get out of inertia. <S> This also reduce the main motor current consumption on start. <A> If you apply a constant voltage, you get approximately an exponentially decaying current, from the stall current down to the running current. <S> As the current decays, so too will the torque, and the consequent angular acceleration. <S> If instead you were to force a constant current, equal to the stall current, the torque wouldn't drop off, so neither would the acceleration, and the speed would come up more quickly. <S> However, as the speed comes up, the back emf generated in the motor will also rise, which means that the voltage appearing across the motor will rise quite significantly, so you'd probably want to make sure that the motor's voltage rating isn't exceeded, lest the insulation break down. <S> Now, to keep the current constant, at any instant the voltage would have to be equal to the nominal rated voltage plus the emf due to the motor's speed at that instant. <S> When the motor reaches rated speed at the rated voltage, its emf is almost equal to the rated voltage; so by the time your constant current drive gets the motor up to rated speed, the motor will have twice the rated voltage drop across it. <S> Some motors may take this, some may not.
|
A speed controller can also be useful.
|
How to know that I am grounded with an anti-static wrist strap? The resistance of my Belkin anti-static wrist strap shows 0.983, but how do I know that I am grounded by attaching it to computer power supply alone? See the picture below. How do I know if that resistance is absorbed by the grounded contact? Must I touch a metal plate below the strap with one lead and power supply with another lead? UPDATE: I wanted to know if there is a contact between wrist strap and power cable's grounded contact through power supply. Since wrist strap works, i wanted also to know that grounding it to power supply and then connecting to power outlet will work as well so i touched wrist strap's metal plate with one lead and grounding contact of power cable with another lead and saw same resistance as mentioned above. This means that everything works. <Q> A proper ground strap connection should show 1 to 10 megohms between the part that contacts your skin and the ground terminal of the power cord. <S> This resistance is there to prevent electrocution through the strap. <S> The point of a ground strap is to dissipate static charge. <S> A large resistor does this slowly enough to not "zap" you, but also doesn't turn you into a large ground rail yourself. <A> Your wrist straps clamp <S> should only ever be attached to ground(also called earth) on the wall plug. <S> Nowhere else except a special grounded spot which exists in some lab setups. <S> It must never ever be attached to any cable coming out of the power supply. <S> The wrist strap is there to protect your equipment from you. <S> Not the other way round. <S> It is meant to dissipate static electricity on your person to ground, so you dont harm any sensitive electronics components. <S> A computer power supply is not a sensitive component. <S> The wrist strap is not there for your safety. <A> I presume the 0.983 resistance is 0.983M\$\Omega\$. <S> Like posipiet says, the grounding is there to protect ESD-sensitive electronics from electrostatic charge you carry. <S> On a dry winter day this can easily run to several kV. One those days I almost always get a discharge when I get out of my car and touch the garage door's handle. <S> A 2cm spark is not uncommon. <S> Think of what damage charges like these could do to CMOS circuits. <S> That's low enough to let any charge leak away, and at the same time high enough to prevent connecting become a shocking experience in case you would be charged to kilovolts. <A> Most places I have worked have a wrist strap tester . <S> Either you check daily or it is built into the socket at the bench.
|
If you are not perfectly positively sure your grounding is safe, you are better off not using a wrist strap. The connection from the antistatic wrist strap to the ground is usually rather high resistance, typically 1M\$\Omega\$.
|
Is it possible to use a Microchip PIC32 as a USB host and device at the same time? I'm designing a system and maybe (if I don't find better alternatives) I will need to use a PIC32 as a handler in between two USB devices and a host. My plan is to use the PIC32 to hide the devices, so the PIC has certain protocols downstream and another protocol upstream. I've been reading a lot about the USB specification and about the support of USB on Microchip PIC32 micro controller series. But still, I have one fundamental doubt: is it possible to connect two devices downstream of the PIC and to connect the PIC upstream to a host at the same time? In other words, is it possible for the PIC32 to act as a host and device at the same time? I would really appreciate any hint or suggestion about this Thanks in advance. <Q> The USB can either be in device mode or in OTG mode. <S> You cannot have OTG on the same USB bus as a host like a computer. <S> Multiple OTG devices can switch between host & device mode using "HNP" (Host negotiation protocol) but you can't do that with a pure host. <S> You would need two separate USB busses - one between the PC and the PIC, and one between the PIC and the devices. <S> I don't think there is any PIC device that has 2 distinct USB interfaces. <S> I would suggest using a second device along side the PIC32 to act as a USB device to connect to the PC, and use the PIC32's USB in OTG mode to talk to the devices. <S> This other device could be as simple as a FTDI chip to talk to the PIC32 through RS232, or something more powerful like another PIC (maybe a PIC18 with USB support) <S> so you can talk through other protocols like I²C or SPI. <A> It seems you are talking about something similar to a USB hub. <S> As Majenko says, (and as far as I know too) all the PIC32s only have one USB port, so this would not be possible with the PC involved. <S> As Kevin asks, do you have to talk to the devices with USB? <S> If this is not a necessity then use SPI, I2C, UART or whatever and things become much simpler. <S> Telling us a bit more about the devices might bring forth some useful suggestions. <S> Depending on the processing power needed, you might want to look at Cypress and TI and FTDI (Viniculum?) as they do some USB controller ICs that have a uC built in, so may be a better choice than the PIC32. <A> If what you are trying to do is connect 2 downstream devices to a PIC32, the answer is no... <S> you would need a hub, and PICS don't have those drivers yet (not from Microchip) <S> (unless you want to write the driver yourself, and share it with us, that'd be great ;-) ) <S> If what you are trying to do is connect a PIC as a USB device, the answer is a simple yes. <S> If what you are trying to do is connect a PIC as both a host and a device at the same time, the answer is a clear no. <S> You would need a uC with 2 USB ports... <S> no PICs yet. <S> Maybe your situation goes like this: <S> PIC-1 working as a device to get connected to the PC (able to "hide" your other devices) <S> PIC-2 working as a host connected to one of your devices <S> PIC-3 working as a host connected to your other device PIC-1, PIC-2 and PIC-3 interconnected with i2c or other bus to share information among them Finally, do PICs have the power to handle that situation, the answer is yes
|
You would need another USB device (e.g. FTDI, Cypress IC, another PIC) to connect the PIC32 to the PC, and then the PIC32 can act as host to the downstream devices.
|
How to find out if electrical outlet ground is working? Just want to make sure my outlet's ground is working. How to do that? UPDATE: My main aim is to test resistance of anti-static wrist strap, but since I know it works by testing it with multimeter, I now want to be sure wall socket's ground works as well. This is why I asked this question. Maybe I can test wall socket's ground with a multimeter? <Q> I use a digital voltmeter and measure three ways. <S> line to neutral shows 120VAC <S> (in Canada) <S> line to earth shows 120VAC <S> since neutral is earthed some distance away neutral to earth shows a very low voltage (not always zero, but very small) <S> If the earth is open, you won't see the line-to-earth voltage on the meter. <S> This is essentially replicating the functionality of the circuit tester gadget described elsewhere in the thread. <A> I don't know how things are wired in Israel, but here in the US the neutral is tied to ground at the breaker panel. <S> For most cases (exception below), that means neutral and ground are equivalent at the outlet, except that neutral is intended to carry the return current whereas ground is intended for a safety return path when something goes wrong. <S> The ground might be tied to a metal chassis, for example. <S> Normally that is a open connection, but if something inside shorted to the chassis, the current would be carried by the ground <S> lead instead of a person touching the chassis. <S> Therefore, you can test if the ground is working by very carefully connecting a small test load between the hot lead and ground. <S> A small lightbulb is ideal for this. <S> The lightbulb should light just as if it were connected between hot and neutral. <S> Now for the exception. <S> Since there isn't ever supposed to be substantial current on the ground line (think of the chassis, just little capacitive coupling and some small leakage perhaps), current on the ground line indicates something went wrong. <S> This can be exploited for additional safety by shutting off the hot line when ground current is detected. <S> This is called "ground fault detection", and you can get "ground fault" breakers that have this built in. <S> These are often found in bathrooms and other places where the human user is more likely than usual to be connected to ground. <S> The lightbulb test described above will therefore not only test the ground lead, but by putting current on the ground line it will also test any ground fault interruptor on the line. <S> If the bulb lights normally, then you've got a working normal outlet with a good ground line. <S> If the bulb lights for a fraction of a second then goes out, you have a working ground fault breaker somewhere. <S> In that case, you will have to reset that breaker to get power back at the outlet. <S> If the bulb doesn't light at all, then you have a broken ground lead, which should be taken care of promptly. <A> With a socket testing plug. <S> In the UK there are many, and they look like this: <S> I don't know which country you are in, and what socket type you have, but check your local hardware store - they may well stock your local equivalent. <S> The one pictured costs about GBP 16 / EUR 19 / USD 26.
|
Around here at least, you can also get outlets that have a ground fault interruptor built in.
|
Is it considered a hack to use an op-amp in place of a relay? I have an application that would traditionally be solved by the means of a relay. I have a 12 VDC load that I would like to switch on and off via a 5V microcontroller pin. But, I'm already using some 6134 (rail-to-rail) op amp chips in my project, and I have a free one I could use, since the IC comes with 4 op amps per chip. Would it be considered a hack if I used my remaining op amp as a comparator instead of adding an additional relay to my circuit? If I put 2.5 V into the inverting input and the microcontroller pin into the non-inverting input, could that replace the relay? The positive rail of the op amp is already my 12 V load, and the negative rail is ground. <Q> You ask that question like it is a bad thing! <S> If it does what you want, over the conditions you want (voltage, temp, lifespan, etc.) <S> then what's the problem? <S> LED's are used as photodiodes. <S> Bipolar transistors are used as diodes. <S> Op-amps are used as voltage comparators. <S> I've even seen CMOS logic devices used as opamps and analog buffers! <S> The bigger question for you is: Are you using op-amps and relays correctly? <S> And by correctly, I mean within the specs of the devices. <S> Replacing a relay with an op-amp is certainly non-traditional. <S> The two devices are different enough that it raises lots of red flags and other questions, but there are situations where that could be fine. <S> Your question didn't give enough details for us to comment on directly. <S> So... <S> Your question is, "Is it considered a hack to use an op-amp in place of a relay?" <S> The answer to that is: <S> Yes it is, but there is nothing 'wrong' with that-- provided that it works. <A> Your questions assumes that a relay was required to switch the load and that it would normally be the "right" answer. <S> If the load requires so little current that a 6134 opamp could supply it directly and you don't need isolation, then why do you think a relay is the benchmark to judge other solutions by? <S> That would not be on my short list of solutions to that problem. <S> Instead of comparing solutions to each other, compare them to the specs. <S> Unfortunately, you provided very few of those except that apparently you need a 12 V high side switch. <S> The big question of course is what's the current? <S> If it's a few 100 mA or more (which one could infer from your original approach of using a relay), then the opamp by itself won't work. <S> If it's only a few mA and within what a 6134 is specified for, then there's no problem using the opamp. <S> Since you apparently don't need isolation (another thing relay infers), there are many other possibilities for driving a high side switch from a 0-5V digital output. <S> Two transistors and two resistors can do this easily. <S> Since you have the spare opamp, you can use it to replace the first transistor and resistor. <S> The opamp output drives the base of a PNP thru a resistor, emitter to the 12V rail, and collector to the load. <A> It is possible, BUT <S> it is unlikely that your chosen opamp can do what you want. <S> The LM6134 opamp (datasheet here) is rated at about 2 mA drive sink or source worst case, typically you may double or triple that and absolute maximuj rating (non operating) is 25 mA. <S> If your load needs no more than 2 mA <S> your op amp is a potentially good solution. <S> For more than 2 mA a suitable MOSFET and NOTHING else can work OK, or a small bipolar transistor plus 1 resistor. <S> A MOSFET could provide any level of load current from 2 mA to amps with no more complexity except a suitably sized FET. <S> With a MOSFET with a suitable low Rdson (on resistance) <S> you could switch 10A+ in a DPak surface mount pkg or even in a SOT23 with due care. <S> eg dissipation at 10A and 50 milliohm Rdson = <S> 10 x 50 <S> = 500 milliWatt. <S> Lower Rdson allows even lower dissipation.
|
However, other things you've said indicate that a relay might be inappropriate or at least overkill in the first place. The use of an opamp is OK for anything that an op amp can do while not violating its specifications. People use electrical components in "non-traditional" ways all the time.
|
When is a FPGA preferred instead of a CPLD, and vice versa? I am starting out with programmable logic, and I am mostly using schematic entry. (Hey, I like to see the schematic instead of VHDL/VERILOG :P) I have been using a Xilinx CPLD originally that had 128 macrocells, and the design has a data bus and used tri state buffers extensively. Turns out it did not fit into the CPLD, and the next step on digikey was a Xilinx FPGA ($5.80), so I figured all I would have to do was change the device to the FPGA in the ISE. Apparently the Tri state buffers do not exist on an FPGA which means I have to redesign a great deal. Also, one of the main reasons I wanted to use a FPGA was because the FPGA can be programmed using a SPI flash instead of JTAG. (I don't have any JTAG programmers, but I have MCU's to program SPI flash) There is the MachXO2 on digikey for similar price but with 640 macrocells, which I figure should be more than enough, not to mention that it can be programmed using SPI flash, and probably has the Tri state buffers. So, here is the question. When are CPLD's used instead of FPGA's and vice versa. In what applications does a CPLD not make sense, but a FPGA is better suited for? <Q> CPLDs are mostly used for random logic that used to be implemented using individual TTL and CMOS chips. <S> FPGAs tend to be used for complete systems or complex sub-systems. <S> There will obviously be some overlap, and Altera CPLDs are actually small FPGAs with on-chip configuration memory. <S> FPGA <S> I <S> /Os can usually be tri-stated. <A> Usually it is a system trade-off. <S> How many voltage rails are needed, how many discrete ICs are required, how much power, amount of logic. <S> CPLDs, usually, are smaller (less programmable resources), usually require a single voltage rail, do not require an external PROM. <S> As mentioned, usually used for glue logic, in place of discrete gates. <S> Require multiple voltage rails, consume more power. <S> Most projects people describe are most appropriate for FPGAs. <A> A typical CPLD will have a small number of circuits to compute logic functions--typically 1-4 per output pin--but each circuit will be able to act upon a large number of inputs. <S> An FPGA will typically have a much larger number of circuits to compute logic functions, but each of them will only be able to act upon a few inputs. <S> From a hardware efficiency standpoint, it would seem like it would be best to combine the approaches, since it would seem somewhat wasteful to have to use one out of a small number of 36-input logic circuit to implement a two-input NAND gate, but on the flip side it would be wasteful to use nine separate three-input logic elements, and all the routing associated with them , to implement a seventeen-input AND gate. <S> In practice, though, most devices tend strongly toward either the FPGA or CPLD camp; I suspect that is because while a human might have a good sense of how to implement a smaller project using a variety of different resources, it's easier for software to implement a design if a chip has a large number of resources that are exactly equivalent. <S> Consequently, I would suggest that a major factor in deciding between an FPGA and CPLD will often be the extent to which a device needs to generate a small number of complicated functions, or a larger number of simple ones.
|
FPGAs are, usually, much large (more logic resources).
|
Grounding and AC Applications w/ Microchip ICD 3 I have been doing some simple stuff with PIC's, using a $12 cable from Sparkfun to program them. Wanting to do more advanced stuff, I bought an ICD 3 and with it came a warning about proper grounds with respect to AC powered applications. I'm not entirely certain what you need to look out for when using an AC powered 12v supply on your target, be it a simple wall wart or a regulated linear power supply. Can someone explain this more clearly than the Microchip documentation? The same warning also came with a USB logic analyzer and I would like to better understand this before I blow something up. <Q> Therefore you cannot power up your application circuit in a way which raises the 0V above or below earth potential without causing problems. <S> If your application circuit is powered from a floating output eg from a wall wart or bench PSU, you would not have a problem. <S> The problem normally comes when someone is developing a circuit which is directly mains powered, so that the PIC 0V is connected or referenced from live or neutral i.e. without an isolating transformer. <S> In that case, you are well advised to use a USB isolator between the ICD and the PC, and an isolation transformer and ELCB for your circuit. <A> Those warnings apply more to the older ICD 2 unit, which needed a separate power supply if it was required to power the target system. <S> There is a good description of the problem in the IN-CIRCUIT DEBUGGER DESIGN ADVISORY document (51764b.pdf). <S> If you do damage the ICD 3 you will get a free replacement from Microchip very quickly. :) <A> In North America, typical AC distribution has the neutral tied to earth, and most HV and LV circutry on the primary side will reference a primary return separate from the earth. <S> See below: <S> The return labelled "PRI" would be the reference point for most primary-side stuff. <S> The point labelled "PE" represents the earth connection. <S> (Fuse omitted - my bad) <S> So far, so good. <S> Another common practice is to tie the returns of low-voltage secondary (i.e. mains-isolated) circuits to earth. <S> Most everything out there follows this practice, for a multitude of reasons (safety, EMC, etc.). <S> What happens if you connect an earthed-secondary instrument to a primary return? <S> You've earthed the primary return. <S> What does that mean? <S> Is this really so bad? <S> Actually, it is quite bad. <S> Notice that direct connection from N to L through D2? <S> This 'path of least resistance' will invariably include whatever wires / PCB traces / connectors that happen to be in the secondary return of your test gadget (usually very small and not rated for line current) as well as the primary return traces of the DUT (size depends on where you connect your test gadget - if it's a low power circuit, usually small and not rated for line current). <S> This is why earthing the primary return usually blows the snot out of everything . <S> That's also why isolated test gadgets are essential for primary-side work. <S> I believe it's always sane to assume that the primary of any mains-connected circuit is never isolated . <S> That way, I always instinctively use isolated test gadgets like differential probes, and use USB isolators without exception. <S> Further to your question: if your 12V power supply has a properly-designed transformer in it, you're no longer mains-connected. <S> The transformer breaks the connection between neutral and earth, and you may earth the secondary return of this transformer without the same catastrophic risk. <S> You may not , however, stick your earth in the primary side of the power supply, since it's still mains-connected.
|
The ICD is connecting the PIC and its application circuit's 0V reference to the PC, which normally has a path through to the mains earth. The connections involved often burn and fuse before the input fuse does, leaving you with lots of burning silicon.
|
Can I use arduino USART tx and rx separatly? My idea is to receive GPS sentences in the RX pin, parse the data and send the result to my computer via the TX pin. (with same baud rate. 9600 for instance) Is it possible or may I encounter buffer issue for non-consume bytes ? <Q> RS-232 is really two separate serial lines, one in each direction. <S> Likewise, UART hardware is independent for receiving and transmitting, except for the baud rate generator. <S> So as long as you want to use the same baud rate (which you do), there should be no problem. <S> Think about it. <S> The micro just sees a RX and TX line. <S> It has no way of knowing whether they are connected to the RX and TX of one other device, or split so that TX goes to the RX of one device, and RX goes to TX of another. <S> How would you imagine it could tell the difference? <S> If you just want to pass GPS bytes along to your computer, that would work. <S> However, if the GPS needs to be sent something to get it going or otherwise needs to be controlled, then it won't work. <A> It is definitely possible, as long as you don't expect to multiplex the two devices. <S> Whether it is advisable or not, is quite another matter entirely. <S> So, just wire up the RX pin to the GPS and the TX pin to the PC. <A> Yes you could probably do this, but is there only one UART available? <S> If so, and you would like be able to send and receive from either/both PC or GPS, then you could maybe look into bit-banging a second UART.
|
Of course if the higher level protocols for either of those devices is bi-directional, then this won't work. You will not be able to transmit to the GPS nor receive from the PC.
|
Is there any reasoning behind component names? All the components I own have strange names, like a transistor called 2N2222 and a motor driver called L293D. When you see these kind of things writen down do you instantly know what it means or do you have to google it every time? How much information is hidden in these codes or are they totally random? <Q> The prefix often has a specific meaning, but the numbering following the prefix often doesn't. <S> In general: <S> 1N... <S> = <S> diodes <S> 2N... <S> = <S> transistors <S> A... <S> (2 letters + 3 digits) = <S> germanium transistor, e.g. AF117 <S> B... <S> (idem) = <S> silicon transistor, e.g BC847 <S> For diodes like 1N400x the last digit is kind of counter to indicate the diodes belong to the same series: <S> 1N4001: <S> 50V <S> 1N4002: <S> 100V <S> 1N4003: <S> 200V <S> 1N4004 <S> : 400V <S> 1N4005: <S> 600V <S> 1N4006: 800V <S> 1N4007 <S> : 1000V <S> The 1N4148 is a typical switching diode. <S> For it's SMT counterpart manufacturers use the same number (4148), but with a different prefix: Fairchild calls it an LL4148, Rectron an MM4148. <S> On the other hand, the SMT version of the BC547 transistor is the BC847, so there they keep the prefix, but change the number. <S> You try and find the logic in it. <S> IC manufacturers often release new devices with their own prefix, like "LT" for Linear Technology, or "LM" for National Semiconductor, so sometimes it refers directly to the name, but often it doesn't. <S> When other manufacturers make compatible parts, however, they often stick to the same part number, so that prefix doesn't always tell you who the manufacturer is. <S> A MAX809, for instance, is made by (at least) <S> Maxim, On Semiconductor and NXP. <S> " <S> TIP" originally meant "Texas Instruments Power" but you'll also find a TIP110 transistor with Fairchild. <S> He mentions the MAX232 as an EIA232 driver, and guess what the MAX485 is. <S> FTDI's FT232R is also an EIA232 bridge. <S> But those are really exceptions. <S> Sometimes the last digit refers to the number of opamps, for instance, in a device. <S> LF411 = single opamp <S> LF412 = dual <S> LF411 <S> I once asked a question about other than manufacturer's prefixes in IC type numbers, but there seems to be little systematical in it. <A> I used to work for a semiconductor chip company. <S> While there we came out with a new chip <S> and I was involved in the talks for what the part number should be. <S> We requested that the part number was "CS100". <S> The request for this number was flatly denied. <S> The reasoning was, "The part number is not long enough". <S> The point is: Manufacturer part numbers only make sense to the people who came up with them-- and then only barely. <S> Any resemblance to sanity is purely coincidental. <S> While I've only worked for one semi manufacturer, my experience with other companies has shown that this is true for all companies. <S> The bigger and older the company, the worse it is. <A> For ICs, it's whatever the manufacturer feels like doing. <S> Older stuff, like the 74xxx series logic have names that meant something internal to the manufacturer, which in this case was TI. <S> Nowadays with the proliferation of ICs and trademarks, you see more and more the manufacturer name or a registered trademark of the manufacturer added into the full part number. <S> For example, all Microchip microcontrollers have their PIC tradename in their full product number, Maxim parts numbers tend to start with MAX, etc. <S> Other part numbers like the common 2Nxxxx for transistors and 1Nxxxx for diodes come from standardization attempts. <S> The 2N and 1N types are Jedec(?) registered, which is why various different manufacturers make a 2N3906 transistor. <S> Sometimes manufacturers will add a prefix or suffix to this, and sometimes they will use the bare Jedec number for their conforming part. <A> You can often get the manufacturer from the prefix (AD for Analog Devices, LT for Linear etc), and often different families have similar numbers, so if you know one you may half recognize another. <S> Some are numbered after their function (MAX232 is an RS-232 driver) <S> Other than that it's totally at the whim of the manufacturer. <A> It is sort of as with words in everyday language. <S> There might have been some sense in it for the hunter-gatherers that migrated from India to Europe eons ago. <S> Some scholars devote their life to discovering such sense, but for most of us words are just (barely) pronounceable collections of letters, with a meaning that you just have to learn by heart. <S> Which we do. <S> If you say 2N2222 <S> I see a small metal can with three leads <S> and I think "must be an old US circuit, otherwise they would use <S> BC107/BC547 (European) or something more modern (2N3906?) <S> ". <S> If you say L293D I see a small two-motor car whirling around, and I hope the built-in freewheel diodes will hold out, and the poor DIP package will not get too hot. <S> Did the designer know that a motor will draw much more current when stalled? <S> Maybe not, <S> so I remove my foot from the path of the little Car. <A> The early semiconductors had the first letter always <S> O <S> this was for Britian . <S> Example OC72 ,OC44 ,OC28. <S> The <S> O stood for Zero which was the heater voltage because semiconductors did not have filaments like vacuum tubes .Some <S> Vacuum tube manufacturers had a prefix number to represent heater voltage .Examples <S> 6AV6 <S> 12AX7 <S> 6AQ5 . <S> This meant that those newfangled semiconductors could be easily incorperated in the existing Valve catalogs where gas filled regulator tubes that did not have filaments already started with O .A represented the first commercial semiconductor of Germanium. <S> B represented Silicon which came later .So <S> once apon a time there was a valiant attempt to make part numbers actually give some technical information. <A> Sometimes the part number is also just a marketing gimmick. <S> When I worked at Linear Tech we released a cost reduced version of the LT1012 and called it the LT1097. <S> Why 1097? <S> Because the 1000 piece price of the part was 97 cents.
|
Like Matt says sometimes the number following the prefix refers to the device's function. Our reasoning was that we wanted our chip to show up first in an alphabetical list of chips the company sells.
|
Will a faster rate of change of flux improve electricity generation? From what I remember about electricity generation, a varying magnetic field is used, either the magnetic field or the coil moves to generate electricity. e = dB/dT where e = voltage induced B = magnetic field T = Time Would more voltage be induced if both, the magnets and the coil, are mounted and geared to rotate at different velocity? <Q> In theory, yes. <S> Practically, your idea makes no sense for the following reasons: <S> Of course in reality this is way more complicated and there are a huge number of restraints. <S> Also, the mechanical power input must always exceed the electrical power output. <S> Not like you can magically create twice as much electrical power with the same input. <S> The idea is, having magnets pass changes in the field more often. <S> Practically, this is done by giving the generator more poles. <S> This means the same: more changes per revolution. <S> Rotating both magnet and coil at the same time is a bad idea for several reasons. <S> In big installments, it is a challenge to rotate even one. <S> Having both rotate coaxially adds even more of a challenge, so much so it is basically idiotic to try. <S> How do you apply mechanical power to both, etc? <S> In power stations, the generator is also set up in a way to have the coils standing fixed, avoiding the need to grab huge currents from a rotating part. <S> Also, power generation is generally synchronous, 50 or 60 Hertz, so it is inadvisable to change the amount of fluctuations per second. <S> The setup for the generators is very much fixed. <A> Induced voltage is proportional to the rate of change of magnetic flux, so to get more voltage, you can either use faster rotation, stronger magnets, or both. <S> Be aware that a number of things can go wrong with rotating a machine faster than its design spec. <S> The insulation on the windings may not be able to withstand the greater voltage, and simply break down. <S> The increased current that could result from having an increased voltage could cause thermal damage to the windings. <S> Centrifugal forces on the rotor could cause outright mechanical failure. <A> Higher speed ( all else fixed ) increases the voltage ( better not to use the term "more electricity" which is open to many interpertations ). <S> It does not matter if this is by turning one part or the other or both. <S> Turing both is mechanically more difficult than just increasing the speed of one, and would be unusual. <S> Power and current depend on other circuit elements but in any case energy will be conserved and values like torque may also change. <S> ( torque could easily go down, attach a generator to a light bulb. <S> Increase the speed, generally we think of the angular speed of a generator, until the light bulb "burns out". <S> Under most conditions the torque will drop ) <A> We all are aware that the power loss from mechanical energy of the rotor during the conversion of electrical energy in generator is also due to frictional forces on bearings, air resistance <S> to rotor apart from conversion efficiency. <S> Can we think a situation where magnets and rotors are fixed but the magnetic flux variation is brought in by a rotary curtain moving at high velocity between the rotor and the magnets. <S> The curtain material blocks magnetic flux. <S> It has rectangular slots at regular interval to allow magnetic flux to pass. <S> There by changing flux to the rotor coil at high speed. <S> I believe this can generate electricity with lower wear tear and low cost generators. <S> Request comment on the feasibility.
|
Your basic idea is right, faster variation of flux means bigger induced current, quite simply.
|
Moral Designs - Or - My Parts Match Your Parts? So I was designing a front end for a 16bit ADC and had settled on a design and preliminary values. I decided to google around and see if any other designs could help me make things better when I stumbled upon a project that used the exact same parts with the exact same intent but with different descrete values. This project I found was for an old product from 2004 that the company had open sourced the hardware for but previously it was closed source. My question is simple. When you are designing something and it is very close to a competitors design and you are both using that design for the same purpose, are you liable for intilectual property infringement? I do not want to design something and start selling it to find out a year later bigOrg LTD. Holds IP rights on that "style & usage" of said part and I owe them $5M... This might not seem to happen that often but I have run into it twice so far. I designed a logic analizer and to scale the unknown 0-7V input into the TTL range of my buffer I made a 1M/5M/1M divider between 5V and GND, input with a 330ohm resistor and 10pf cap to my buffer. I got to these values using spice and making a way to really ram in a logic change without going over specs. About 6 months later my buddy sent me a hack on the ZeroPlus Logic Cube and they use that exact layout with only two resistors of different value. <Q> I Am Not A Lawyer, but... <S> the usual run of intellectual property divides into these areas: <S> patents (government-granted monopoly of a method or system for accomplishing particular functions that are non-obvious, useful, and novel) copyrights (right to prevent others from using identical design elements) trademarks (government-registered brand names / logos) trade secrets (ideas kept secret, no legal protection here) <S> (And the same for them to prevent you from doing so.) <S> Resistor dividers + capacitors probably don't meet either criterion (although the US Patent Office has granted patents for things that are more obvious), so I wouldn't worry about it. <S> If you're talking about more complex ideas, you should probably talk to an attorney who specializes in intellectual property law. <A> In the US: Copying their PCB layout is copyright violation. <S> Re-draw your own layout from the schematic, even if the components end up in the same place (which is often necessary to make things work right). <S> Copying their circuit, however, is lawful reverse-engineering, so it's fine. <S> If they want to prevent people from copying their circuit, they need to patent it. <S> http://en.wikipedia.org/wiki/Reverse_engineering#Legality <A> Legal questions are alwas troublesome (or rather, the answers are). <S> Although the big picture is global, the nitty gritty details differ a lot from country to country (USA: state to state??). <S> When you have decided on your jurisdiction, you will find out that a lot of things are not that clearly expressed in law, and a lot depends on court rulings, which often surprise even the specialists. <S> And sadly a lot of interesting cases are settled out of court and under non-disclosure, creating "invisible law" :( <S> When you design something "from fresh" (without knowledge of the competitors product) you will generally not have to worry about copyright law, because that is about copying of a relalization rather than an idea. <S> (not 'generally'...) But when you take something obtained from someone else and copy it verbatim, you might well be in trouble. <S> Patent law is a different beast, because it protects (or can protect) more broad ideas rather than a specific implementation. <S> The positive side is that you can't patent something that is not new. <S> Or rather, that is the theory... <S> And you might come up with something that is not new now , only to discover (in court) that someone has patented it 20 years ago. <S> But patent lawsuits are costly affairs, so <S> the big players genrally won't hurt you unless you are big too, in which case you probably have a legal department.
|
Unless you have a patent on a particular functional piece of circuitry, or you can prove that someone else made an effort to copy widespread portions of your schematic/layout/software, it would be difficult to keep someone else from using similar circuit elements.
|
Triggering a capacitive sensor electronically? I'm working on a little project I call my "Green Box". Basically, I'm trying to drop my electric usage as low as possible, without losing the convenience of my gadgetry. So far, I'm incorporating a passive IR sensor for motion detection, an ambient light sensor, and using [hopefully] a small SNMP subset to an ethernet shield to determine the state of activity. Based on these factors, I want to turn on/off various devices (PWM for fans speed of laptop cooler, IR to power on/off a few components, wireless X-10 for controlling lights), etc. I'll admit, I'm lazy; I could just do all of this myself, but with 6 kids running around, it's easy to forget to hit a power switch (let alone 5 or 6). I have 2 Samsung monitors which have capacitive touch controls on the front. I would like to trigger these with the Arduino in the box to turn the monitors on/off, without having to rip them apart and hack them. I'm a perpetual upgrader, and I'd like to sell them in "like new" condition when I decide to. So, from googling, I've found a few people mention that I could put a small metal plate over the sensor, and use a transistor to ground that plate to trigger the touch. I know nothing but theory of how capacitive touch works so: This seems plausible to me; is it? If so, can it be ANY gound (the one from the Arduino), or does it have to be the ground from the monitor? Based on answers from the previous questions; could I run a single lead to a PNP transistors base and collector, and connect the emitter to the plate? Would this work? <Q> On how capacitative touch "works", have you had a chance to read through the CapSense library page on the Arduino Playground? <S> It's a decent overview. <S> The technique is typical - measure how long it takes to "charge" a metal plate up to some voltage through a known resistance and infer the capacitance from that time interval. <S> There's also a very instructive lab exercise at Cornell's microcontrollers course website . <S> What are the physics going on here? <S> When you bring your hand closer to the plate you are increasing capacitance (by narrowing the distance between "the plates") - see also wikipedia entry on capacitance . <S> You kind of serve as the plate of the capacitor connected to GND. <S> So yes in principle driving an actual plate to GND through a transistor could work. <S> Furthermore, if your Arduino is plugged into the wall, you most likely don't need to worry about whether you're at "the same" GND, it will be close enough. <S> You might have a slight issue if you're Arduino is battery or USB powered though. <S> As for the actual circuit. <S> I would actually try just connecting an actual digital pin to the plate. <S> When you want to simulate "no touch", turn the pin to an input (without internal pullups enabled). <S> When you want to simulate "touch" turn the pin to an output set to LOW. <S> The only reason for using a transistor is if you have a current demand that exceeds the rating of the pin (about 40mA <S> I believe), and this case really doesn't qualify. <A> It doesn't make sense to me that you're taking current Acer stuff and trying to make it lower power; surely quiescent power is 20 milliwatts if not less? <S> No fair just following the breakers with triac sense/controllers? <S> It seems simplest to splice into HDMI or whatever cables and switch VSYNC or another enable pin in or out. <S> Was a copper plate 50mm^2 (in wood chopsticks) triggering things by itself? <S> The trick is that you'd tristate/float it (or otherwise present more than a megohm between it and anything) to make it insufficient to the cap sense electronics; it's not so much your finger as what it's attached to that impresses the sense circuit. <S> By that measure some stainless mesh with a label might be handier.... <A> This is easy. <S> Use a relay to enable/disable a connection to another piece of metal (same ground as sensor, or any floating piece of metal may even work). <S> You can't use a transistor. <S> You need the actual physical connect and disconnect of a relay. <A> I have had good experiences in similar situations using a piece of metal (copper foil or similar) covering the sensor with a wire running from the foil to a microcontroller pin. <S> How to optimally drive the metal conductor depends on the capacitive sensor and the algorithms used to detect a touch, but a good starting point would be to switch between driving the pin low/high and setting the pin to float (usually done by setting the pin as an input-pin with no pull-up or pull-down). <S> Another strategy that I have had success with is to output a pwm-signal to the pin, on some sensors this can be picked up as a touch.
|
Any semiconductor pin will trigger due to parasitic capacitances.
|
What is ALC on a preamp? I have a preamp rescued from an old stereo: BA3308 It has a pin "ALC" and the data sheet keeps going on about how splendid this ALC is and how it has a built-in ALC diode and such. Nowhere does it tell you what ALC is, or how you should use this ALC pin. I have looked for meanings of ALC online, and I have found 2 possible meanings that would fit this device: Automatic Level Control Audio Limiter Control There may be others... What is it? How should I connect it? is it an input, or an output? It's a major feature of this chip, and I guess it's assumed you know what it is as you chose the chip. <Q> If you look at the datasheet, there is an example application circuit: <S> Notice how the amplifier is used for amplifying for both recording and playback. <S> The same tape head is also used for both functions. <S> A variable-gain amplifier is a bit tricky to do without distortion, so having it integrated into the preamplifier was a convenience for the system designer. <S> I don't know what you plan to do with the part, but an obvious choice would be an audio compressor. <S> It won't be super high-fidelity, but maybe good enough for a guitar stomp box. <A> If they talk all the time about ALC, and fail to explain what it is, all I can say then is that the datasheet stinks. <S> The application example on page 3 gives us some idea. <S> The ALC signal is taken from the output, via a diode and an external capacitor. <S> That means it's a peak detector, whose level is then used to control the amplifier's amplification. <S> So that looks very much like Automatic Level Control, though Audio Limiter Control is a close relative, if not exactly the same. <A> As the manufacturer says in this tech note , ALC means Automatic Level Control. <S> There's a block diagram that looks like the ALC picks up the output signal and uses it to adjust integrated potentiometers at the input pins of the forward path. <S> It looks like the IC is intended to be used with cassette tape recorders. <S> Cheapo recorders often don't have a potentiometer where one can set the recording level. <S> Instead, an circuit tries to adjust the level of the signal that is to be recorded such that it is neither too silent and vanishes in the tape noise, nor too loud <S> so it would cause tape saturation (distortion). <S> The text next to Fig. <S> 15 explains how to use the feature. <S> Basically, there's an RC combination that allows you to set how fast the IC will react to varying levels of the signal. <A> See this one: AGC- <S> Automatic Gain Control <S> It mean variable dB on amplifying. <S> ALC- <S> Automatic Level ControlIt mean limitation of Peak.
|
ALC (automatic level control) was an important function in tape recorders, as the signal had to be the right level, strong enough to overcome noise but not too high to cause saturation.
|
Connector name/where to buy I find lately that this connector type would come in very useful for the projects I make. but I have no idea what the connector is called, could someone please point me in the direction of its name, maybe I can buy a strip to cut to size? Thanks <Q> It looks like a standard type socket(or plug/receptacle) for a 2.54mm pitch header. <S> Names like Molex, Tyco (now might be TE <S> I think), Harwin, 3M, Samtec make various types of these. <S> If you go to Mouser, Digikey, Farnell and type header into the search you will get lots of options. <S> Places like Sparkfun and Adafruit will almost certainly have some options also. <S> You will need crimp contacts and a crimp tool to fit the wires (also sold at the above places). <A> Here are the Harwin M20-106 crimp housings I use with M20-1180046 crimp socket inserts and 0.1" single-in-line headers: <S> http://uk.farnell.com/harwin/m20-1060800/crimp-housing-8way/dp/865667 <S> They are available in various lengths, I buy the longer ones and cut them to size. <S> I use a cheap crimp tool intended for use with Molex terminals with the sockets; it requires some care, but works quite well. <A>
|
These are called Pin Headers, though that term is usually meant for the metal pins the pictured socket connects to.
|
Could smoke allow arcs to form? I've been trying to find the cause of power supply failures, and noticed that an NTC is smoking if it runs at full power. Obviously the NTC needs changing. But is it possible that the smoke in the chassis could then allow an arc to form between 400 V traces or components when it wouldn't otherwise? Either carbon particles on the PCB or ions in the smoke. Particles from cigarette smoke or smoke after a fire can land on electronics and can cause them to short circuit. from a dubious source (Or maybe it's possible, but components are designed with materials that won't have this effect?) <Q> Interesting problem. <S> Smoke can conduct electricity. <S> From the research here <S> (first Google link btw.), "A surprising result was that the conductivity between parallel plates remained high although the optical density in the smoke chamber dropped drastically, indicating that there was very little smoke in the air." <S> The research also states that high voltages promote the growth of 'soot bridges', further strengthening the assumption that yes, smoke can cause arcs between high-voltage traces. <A> The issue isn't as much arcing thru air since even dense smoke is a tiny fraction of the overall air. <S> However, the smoke particles will settle and coat everything nearby. <S> This kind of smoke particle surface layer can definitely provide a easier path for arcing. <S> As dirt in general builds up, with smoke being another type of dirt, and especially at high humidity, the surface resistance of a PC board decreases dramatically. <S> The resulting leakage currents can cause problems if the board was not specifically desinged to deal with them. <S> For example, guard traces are one way this is dealt with in high impedance analog circuits. <S> You put a trace all around the high impedance one, which is then driven by a unity gain buffer. <S> Seen from the high impedance trace, the leakage resistance is now connected to nearly the same voltage as the trace itself, so very little current flows. <S> Little current thru the leakage resistance is the same in practice as a very high impedance to surrounding traces. <A> First off, the NTC in a power supply should never be smoking. <S> One of two things could be happening: <S> the NTC is under-designed for the load current <S> it's intended to carry (extremely unlikely) <S> there's an NTC bypass circuit that's not working (most likely) Most higher-power (100s of watts and up) <S> power supplies use the NTC as an inrush limiter only, bypassing the NTC with a triac or a mechanical relay once the bulk capacitors are charged up (avoiding \$I^2 <S> \times R\$ losses in the NTC). <S> If there is no bypass, the NTC must be rated to handle the maximum rated output current under the minimum rated input conditions without failing. <S> Smoking != 'rated to handle'. <S> Tangental rant aside, when PCB layouts are evaulated for safety compliance, a 'pollution degree' factor is applied to determine the necessary creepages and clearances. <S> A 'clean room' installation gives you pollution degree 1 (the smallest spacings), and stuff used outdoors or in especially nasty environments gets pollution degree 4 (the largest spacings). <S> Most office and information technology equipment (PCs, copiers, power supplies for office equipment, etc.) are certified under the '60950' standard, which uses pollution degree 2. <S> So
|
yes, external factors like dust (especially toner dust) can and do influence safety spacings.
|
Input voltage range of opamps I understand that, for an ideal opamp, Vo is bounded by Vee and Vcc (i.e.; Vee < Vo < Vcc). But, what about the input voltage range? What is the allowed input voltage range in which opamp works normally? Can we apply Vn and Vi voltages which are below Vee or above Vcc? For single supply opamps, can we apply negative input voltages? Does opamp being ideal, practical, rail to rail change the answer of this question? <Q> In normal operation, V+ and V- are the same. <S> If they are different, the op-amp is being used as a comparator. <S> An important spec in choosing an op-amp is the "input common-mode voltage" range. <S> The voltages at the inputs must be in this range for proper operation. <S> Some op-amps are "RRIO" or rail-to-rail input/output. <S> As you might guess, this means the input common mode range goes from the Vee rail to the Vcc rail. <S> Some op-amps which include only the Vee rail in the common-mode range are referred to as "single-supply" op-amps. <S> Here is the spec in the LM324 datasheet: <A> It's important to note that some op amps can behave very strangely if either input voltage gets too close to the supply rails. <S> If an op amp has a common-mode voltage range that extends down to 0.5 volts, for example, that would clearly imply that if both inputs are below 0.5 volts the op amp might be unable to distinguish which is higher. <S> On some such op amps, however, an input which goes below 0.5 volts might be regarded as being higher than the other input--even if the other input is well above 0.5 volts. <A> (1) What they all said. <S> (2) Note that a few opamps can swing to slightly beyond supply rails - this is achieved by generating voltages within the opamp that give it a true operating voltage wider than what is supplied. <S> (3) Note that common mode range is allowable voltage which eitherm input MUST be within. <S> It is not the difference between them. <S> If either is outside the range then it is not guaranteed to work. <A> The input voltage range can vary, but has to be within the supply voltages (you may see some that can go e.g. 0.3V above/below) <S> so if single supply then no negative voltages are allowed. <S> Generally there will be information about the common mode input range in the datasheets, here is an example of an opamp without a rail to rail input range (specs are for +/-5V): <A> The specification you are looking for is called "input common mode range", and is almost always limited to the supply rails. <S> On many opamps, it's limited to somewhat less in one or both directions. <S> You can take a normal opamp and make one with a large input voltage range exceeding the supply limits by putting a resistor divider in front of each input. <S> The input offset voltage also gets multiplied by the same value though, and it will cut down on common mode rejection to the extent that the dividers aren't exactly matched. <S> If your input signal is AC, then you can get a very large input common mode range by transformer coupling. <A> But note in a inverter the input to the resistor connected to the inverting input can easily be much larger than the op amp limit. <S> The overall circuit function can often keep the inverting input within range.
|
It depends on how the differential input stage is set up, some opamps use a complementary input pair (P-channel and N-channel in parallel) to achieve a rail to rail input, each pair covering part of the range.
|
Reading very low capacitances with Arduino I'm trying to measure the capacitance of a very low capacitance sensor (two parallel plates across a block of foam). This is a self-produced force sensor; I'm trying to eventually use some of the work presented here . I'm estimating that the capacitance should be in the neighborhood of 90 pF. I started with the CapacitanceMeter tutorial from the Arduino web site. I modified it to use micros() instead of millis() and output pF instead of nF. I also swapped in a 10 megohm resistor in place of the 10K ohm one, and updated the code. However, I'm getting readings that swing by over 50 pF. How can I improve the accuracy of the setup? Thanks! <Q> Small capacitances are best measured using an HF oscillator, and measuring the change in frequency with and without the DUT in the oscillator tank circuit. <S> The capacitance can then be calculated. <S> This could be done automatically on the Arduino, and the result displayed. <S> Here is the schematic for a PCB I designed for the Elsie LC meter which uses that technique. <S> Using conductive foam and measuring the change in resistance as it is compressed would be easier. <A> The circuit looks something like this: C2 is the unknown capacitance you're trying to measure. <S> C1 is a reference capacitor of known value, and about 50-1000 times the value of C2. <S> R1 isn't too critical, 1k Ohm or so. <S> The idea is to charge C2 with a known voltage (5 or 3.3 V, whatever V+ is), and then transfer its charge (q = C*V) into C1. <S> Each time we transfer the charge from C2 to C1, C1's voltage increases by a tiny amount proportional to C2. <S> The number of times we have to transfer charge to make C1's voltage exceed some threshold (for us, the logical "1" threshold of pin A) is then inversely proportional to the value of C2. <S> The trick is to take advantage of the high-impedance state of the microcontroller pins. <S> If we kept the bottom side of C1 grounded while charging C2, then we would also end up fully charging C1. <S> Instead, we let the bottom side of C1 float by configuring pin B as high-impedance. <S> Now, whatever the top side of C1 does, the bottom side does too, always keeping the same voltage across C1. <S> The measurement algorithm goes like this (in pseudo-C): // <S> Step 0: <S> discharge C1 to prepare for a new measurementPIN_A <S> = 0;PIN_B = 0;delay(some_time); // long enough to discharge C1bool under_threshold = true; // has the voltage across C1 exceeded the threshold?int count = <S> 0;while <S> (under_threshold){ // <S> Step 1: Charge C2 PIN_B <S> = <S> Z; // Z means high-impedance PIN_A = 1; delay(some_time); <S> // long enough to charge C2 // <S> Step 2: <S> Transfer charge from C2 to C1 PIN_A = <S> Z; PIN_B = 0; delay(some_time); // long enough for C2 to discharge into C1 // <S> Step 3 <S> : Check if the threshold is exceeded if (PIN_A || (count > COUNT_MAX)) { under_threshold = false; }}return count; You can see a demonstration of the circuit at https://www.circuitlab.com/circuit/uq2zs6/cap-sensing/ <A> Since you use a capacitive force sensor and you want to know the real time value of the capacitance, you can use a sauty bridge. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> With Cx : the capacitance you want to measure. <S> C, R and E are known. <S> By applying Kirschof's laws, you have : $$Vm= <S> E.\frac{C-Cx}{2(C+Cx)}$$By measuring Vm <S> you can have Cx : $$ <S> Cx= <S> C.\frac{E-2Vm}{E+2Vm}$$ <S> The resolution depends on the constants you are using and the quality of the Voltmeter you use.
|
You can get an approximate measure of the capacitance with just 2 microcontroller pins, 1 resistor and 1 known capacitor.
|
VHDL 2008 fixed and floating point type synthesis support? Which VHDL synthesis tools support the VHDL 2008 fixed and floating point types as described at vhdl.org/fphdl ? TheVHDL.org site states "all these packages are designed to be synthesizable inVHDL-93". Which tools have yield successful results synthesizing the VHDL-2008 fixed-point and floating-point types? Second question, what is the status of VHDL-2008. Has it been ratified? <Q> Yes, VHDL-2008 was ratified " <S> In February 2008, Accellera approved VHDL 4.0 <S> also informally known as VHDL 2008, which addressed more than 90 issues discovered during the trial period for version 3.0 and includes enhanced generic types. <S> In 2008, Accellera released VHDL 4.0 to the IEEE for balloting for inclusion in IEEE 1076-2008. <S> The VHDL standard IEEE 1076-2008 was published in January 2009." <S> - http://en.wikipedia.org/wiki/Vhdl <A> This doesn't answer your question exactly , but ANY working VHDL 93 synthesizer will work with fixed and floating point VHDL libraries under VHDL 93. <S> To get these, see http://www.eda.org/fphdl/ . <A> I have used the VHDL fixed-point libraries in Altera's Quartus II (v9.1), with a Cyclone III. <S> They synthesized an IIR filter and an LMS adaptive filter fairly efficiently - I noticed no major difference in resource usage compared to my previous implementation using numeric_std.
|
So, I am confident that Quartus supports the fixed-point libraries.
|
Adding voltage cutoff to a circuit? I'm powering a project with a 2-cell 7.4V LiPo battery. What circuit do I add to make the unit stop drawing power when the voltage from the battery drops below 6.4V? The goal is to protect the LiPo battery from discharging below 3V/cell. <Q> In all the following a TLV431 1.25V reference is specified. <S> This requires < 100 uA minimum regulation current compared to about 500 uA for the 2.5V <S> TL431. <S> When on the TLV431 on voltage is about equal to the reference voltage - <S> NOT 0V. TLV431 current is a battery load even when output is off. <S> At about 100 uA this drains about 2.5 mAh/day. <S> Voltage sensing divider is also a battery load. <S> This can be small. <S> Hysteresis is not used in any of the following circuits - except the one copied from internet. <S> A whiff of hysteresis could be used to stop battery on/off cycling when load is removed. <S> Ask if unclear how to do this. <S> (1) Opamp based P Channel FET high side switch. <S> TLV431 1.25 V reference. <S> R2/R3 divide Vmin to = <S> 1.25V. <S> (2) <S> N Channel FET, low side switch. <S> TLV431 1.25V reference. <S> FET Vth < <S> < Vmin (3) P Channel FET, high side switch. <S> TLV431 = <S> 1.25V reference. <S> FET Vth << (Vmin-1.25)V (4) <S> From web - similar to my N Channel low side circuit. <S> From <S> This discussion page . <S> Here R6 adds hysteresis. <A> You could use a reset IC like the MAX809 . <S> This will output a low level when the input voltage is below the device's threshold. <S> If the input voltage is higher than the threshold the output follows the input. <S> You can use this voltage to switch an N-channel MOSFET, like the FDC653N . <S> You'll have to use a high resistance voltage divider for the input voltage, since the highest threshold available is 4.9V. <S> The MAX809 has several manufacturers. <S> I prefer the OnSemi because of its low ground current. <A> I am not at all familliar with LiPo batteries. <S> I have this age old book ... <S> Hope it helps you--
|
But To detect the Voltage level going below certain limit, You can always use OP-AMPS...
|
What does a half-digit means in case of accuracy? I am just wondering what does it mean when somone says something like"3 and 1/2 digit" in case of accuracy of test equipments (or maybe A/D converters). Can somone explain this a bit with some numbers as example? <Q> 3 digits would be 0 through 999 3 1/2 digits is 0 through 1999 (typical for DMMs) <S> 3 3/4 digits is typically 0 through 3999 <S> Has nothing to do with binary digits, but decimal digits, or rather their representation in 7-segments displays. <S> To display every digit you need all 7 segments, but if for the fourth digit you only have to display a "1" you only need the two rightmost segments, so that can be interpreted as the right half. <S> That was when most DMMs had a maximum reading of 1999. <S> Recently more accurate DMMs became available, having readings up to 3999. <S> If "1" as the highest value for the highest order digit is half a digit, with some imagination you could say that a highest value of "3" is 3/4 of a digit. <S> Note that for displaying only "1", "2" and "3", you don't need the upper left segment, which a 3 3/4 digit DMM indeed doesn't have for the leftmost digit. <S> It's a small cost saving, but a saving nevertheless. <A> David L. Jones did a video about Multimeter Counts, Accuracy, Resolution & Calibration . <S> There he also explains what these half digits are. <S> To summarize his explaination what 3 1/2 digits mean (in the video 0:30 - 1:30) <S> : <S> A 3 1/2 digits meter can display 1999. <S> A 4 1/2 digit meter can display 19999 and so on. <S> The half means that the most significant digit can only go up to 1. <A> My best guess with this is that it is in reference to LCD or LED displays. <S> Some test equipment may well have a "3½ Digit" display. <S> That is, a display with 3 whole digits, and only half of the fourth digit (i.e., a "1"). <S> So the full range of a 3½ digit display would be: 0 to 1999 <S> All segments on would give you: 1888 <S> Take this one as an example: <S> That one's from a 12-hour clock, so there is never any need for the first digit to ever go above 1. <A> This is a useful marketing term used to explain the nature of a digital display. <S> A 3 digit numeric display can display numbers from 000 to 999. <S> A 3.5 digit display displays numbers from 000 to 1999 or twice as much. <S> By adding a relatively low cost display to the system the manufacturer doubles the displayed range. <S> This results in eg multimeters with <S> 2, 20, 200 Volt or mA ranges rather than 1, 10, 100, 1000 ranges. <S> Note that on a 3.5 digit display multimeter the max range on AC volts may be eg 600 Volts rather than the possible 1999 Volts. <S> This is a safety and implementation limitation. <S> The 3 or 3.5 digit display does not affect the accuracy - but it does affect the displayed apparent resolution. <S> Note that most multimeters have absolute accuracies typically around 1% to 2% on Volt and mA ranges and worse on ohms and Amp ranges. <S> This despite the fact that a 3 digit display has a 0.1% resolution and a 3.5 digit display has a 0.05% resolution. <S> In such cases adding the extra resolution can be useful even though the accuracy is already more than outstripped by the display resolution. <S> Rarely you may see 3 + 3/4 digit meters - these have eg 0000 to 2999 resolution. <S> This can be extremely nice to have. <S> It gives eg 4, 40, 400, ... ranges. <S> My experience with these is that it often eliminates range changing in typical use when maximum resolution is required with a widely varying signal. <S> These are very seldom seen. <A> As noted, the term "3 1/2 digit" was coined some time ago to refer to displays that could show three digits 0-9, and a leading digit which could be blank or 1. <S> When some later displays came along with a leading digit that could display 0-2 or 0-3, the terms "3 2/3 digit" and "3 3/4" digit were coined. <S> Note that were it not for the earlier usage of "3 1/2" digit <S> , it would perhaps be more accurate in terms of magnitude to say "3 1/3" digit for leading 0-1, "3 1/2" digit for leading 0-2, and "3 2/3 digit" for 0-3, since log10(2000) is 3.3, log10(3000) <S> is 3.5, and log10(4000) is 3.6, but the terms are what they are. <S> BTW, a 3 2/3 digit display needs three controllable segments for the left digit (the upper-right segment, the lower-right, and everything else that makes up a "2"); a 3 3/4 digit display needs four controllable segments (upper-right, lower-right, lower-left, and all three verticals). <S> Counting up to 4 would require five segments (split out the middle one), 5 would require six (add the upper left), and seven would require all seven (split the top from the bottom). <A> All the other answers here are talking about decimal digits on displays. <S> For A/D converters the meaning of accuracy is totally different and is usually given as a fraction of an LSB (least-significant bit), which means that the value of the conversion is accurate to within that numerical amount. <S> This is also captured in the ENOB (effective number of bits) which is also a fractional number -- for instance, an "8-bit" A/D converter will probably only have an ENOB of around 7 bits. <S> The reason the number can be fractional is due to several things. <S> If it was only due to quantization, and all else was perfect, all conversions would be accurate to 0.5 bits. <S> The reason it's not exactly that is due to other effects such as conversion non-linearity and distortion. <S> Reading up on ADC terms more may help.
|
It means that the most significant digit can be either 0 or 1.
|
Temperature logging setup for refrigerator I've been having some issues with my refrigerator lately, and so I've been imagining some kind of temperature logging system. I want it to log the temperature every 5(?) seconds, door open/close events, and compressor start/stop. Having little to no electronics experience, my head said the following: Arduino-ish controller (or .NET CF, since I know C# best) Amp-clamp thing around the power cable to register the compressor on/off (and some way to connect it to the Arduino Photoresistor(?) to register the light on/off (for registering door open/close) Some kind of temperature sensor of course (maybe multiple sensors for several zones in the fridge. Possibly with 2 decimal points of accuracy?) The best would be to log to a web server using some kind of wireless networking (WiFi-shield?), but logging to an SD card could also be a possibility. What kind of hardware would you recommend for this? And could it be a good "noob"-project? <Q> Adafruit has some related tutorials and kits you might find useful. <S> It's logging with an SD card, but depending on how close your fridge is to your other computer(s), you might be able to use an XBee to transmit data. <S> Another fridge data-logging project is here . <A> You head seems to have the right idea generally :-). <S> You have provided a good enough answer in your question :-). <S> Anything much more becomes a shopping list without more specific technical questions. <S> Processor / Computer: - your choice - anything that works will work. <S> Arduino or whtever is fine. <S> Temperature sensor ICs are commonly available. <S> The famed LM335 is not the cheapest but is well known - about $1.70/1 Digikey. <S> Many more listed at Digikey and elsewhere. <S> Ad22103, AD592, LM61, ... <S> For extra points use a thermistor for temperature measurement. <S> Compressor run could be sensed by noting sudden sharp drop in coil temeperature and cessation of same at end of run. <S> Not as precise as direct monitor. <S> Motor is often sealed in a metal can so maybe mains lead detection best. <S> NB no mains connection needed !!! <S> Door open could be microswitch or internal lamp sensor or room light sensor. <S> (Or PIR person sensor or RADAR or ... :-) ). <A> Getting a WiFi signal out of your fridge (unless the case is all or mostly plastic) will be a challenge; you're probably better off planning to write an SD card. <S> If you don't compress your data, you'll need to store 2 bytes per sample or 1440 bytes/hour (3600[sec/hr] / <S> 5[sec/sample] * 2[B/sample]. <S> Depending on your choice of u-controller and your logging time requirements, this will fill up a small RAM rather quickly. <S> You can either "borrow" some unused space in the program memory (flash) or you'll need to add on some storage. <S> (And yes, I think it will be a fine newbie project - I'm planning to do the same thing myself!) <A> I would recommend Mastech MAS345 multimeter (it comes with the thermocouple) and a laptop computer. <S> Connect the multimeter to the computer with a serial cable, and write a script to take measurements. <A> Wicked Device makes an inexpensive product called the Wicked Node that you could put in your fridge with an LM34 temperature sensor (or similar) mounted and set it to 10-second mode. <S> Then set up an Arduino with the Wicked Receiver shield plugged into it and you could log the data to your computer. <S> It should work up to a few hundred feet away from your fridge... <S> If you also set up a magnetic reed switch or some kind of push-button in your fridge on sensor input 4, the Wicked Node will also be used to count the number of times that switch was "pressed" (i.e. the door was opened) during each interval and send that as part of the data it transmits every 10 seconds... <S> If you were so inclined, each Node could host up to three temperature or LDR sensors as well to get your "zone" concept. <S> Many Nodes can transmit to a single Receiver, although in 10 second mode, you'll probably have trouble with more than three or so.
|
The Arduino datalogger shield tutorial for monitoring light and temperature in your fridge seems right up your alley. For even more points use a silicon diode. You should be able to sense compressor run by using a Hall effect sensor on the mains wiring or near the motor.
|
How can I identify lead-free solder if it's unpackaged? Is there a test to determine whether solder is leaded or lead-free? Perhaps conductivity/resistance? <Q> Try soldering a 0.5mm pitch component with it. <S> If you get frustrated and want to throw it across the room, it's lead-free solder. <A> https://web.archive.org/web/20160203163608/http://leadcheck.com/ <S> Here is a new link to the same product. <S> 3M Lead Check Swabs <A> Keen or desperate? - measure <S> it's specific gravity. <S> Compare with published or calculated data. <S> Take a large enough sample and weigh it = <S> M1. <S> Suspend in water and weigh again = M2. <S> SG = M1 / (M1-M2) or Weigh = M1. <S> Then measure volume by water displaced when inserted into a just full container. <S> Water mass = M2. <S> SG as above. <S> Lead solder makes "shiny" joints when properly used. <S> Lead free solder makes more matte appearance joints. <S> Melting points vary. <S> Lead chemistry, various. <S> Based on Leon Heller's link Various lead test kits are available. <S> These are usually intended for testing for lead paint but should be very effective with solder. <S> You can do DIY test solutions using Sodium Sulphide solution. <S> Here is an excellent article explaining Sodium Sulphide testing for lead . <S> This test can be used on hands etc to check for lead contamination and to show how effective cleaning proceures are. <S> Excellent discussion - Science Fair project starter on lead testing <A> Lead-free solder has a much higher melting point than leaded. <S> If you have a soldering iron and some leaded solder, set your iron to a temperature where it just melts the leaded stuff. <S> Then, try heating up a component on the board at that temperature (make sure it isn't connected to a large copper pour). <A> Unreliable yet simple test. <S> If you rub it between your fingers and play with it a while and your fingers turn dark gray or black from the deposits,, it's probably lead solder.
|
If you're having trouble getting the solder to melt, there's a good chance that it's lead-free. Use one of these lead-check swabs: [edit: link updated] http://leadcheck.com/
|
Can a Computer Motherboard Speaker/Buzzer output voltage switch a relay? Most 12v relays I've come across require 4v to switch on. I don't have a voltmeter handy to test my computer motherboards voltage output, and if it did give out +4v and held a long enough duration would it even be possible? Using C# or any programming language I can send a frequency and duration signal through the motherboard speaker pins so I'd like to use this as a cheap mod to control an actuator. :) <Q> A motherboard buzzer takes a lot less current to operate than a relay winding. <S> So it could work for a bit, but it might burn out the driver. <S> In other words, it's the current drive that matters. <S> You're much better off using the speaker output to drive a transistor (BJT or MOSFET) that switches the relay. <S> Transistors require very little input current to operate. <S> They can also level shift, i.e. drive a large output voltage swing with a smaller input voltage. <S> Remember the reverse-biased diode across the relay winding, which clamps the voltage when you turn off the relay. <S> Otherwise, the relay winding voltage will head for -4 V or -12 V (the negative of whatever voltage was on it when it was on) and not stop until some part of your chip looks like a forward-biased diode. <S> It's an inductor, which can change voltage instantly but not current. <A> As others have said, you will need something between your 4V speaker output and the 12V relay. <S> Not only will the speaker drive <S> most likely not be capable of enough current, it's also not enough voltage. <S> Another problem is that you can't rely on whether the speaker output is normally high or normally low. <S> It's quite possible this is a small speaker tied between the 5V supply and a low side switch. <S> In addition it is pulsed, but you want to keep the relay on the whole time during a tone (as I understand it). <S> Here is a circuit that should reliably deal with all these issues. <S> These are all common, cheap, and off the shelf parts. <S> The diode can be any small signal switching type, like the common 1N4148 shown, but many others will do. <S> All three could be Schottky diodes too. <S> The input is capacitively coupled, so its DC level doesn't matter and it can idle high or low. <S> C1, D1, D2, and C2 form a charge pump that makes a voltage on the left side of R1 when the inupt is actively wiggled. <S> That voltage causes a current thru R1, which turns on the transistor. <S> There is enough charge storage in C2 to keep the transistor on for a little while. <S> As long as the input is pulsed fast enough, the transistor will stay on. <S> The transistor is then a low side switch turning on the relay between it and the 12V supply in your computer. <S> D3 may look like it doesn't do anything, but it's important and leaving it out <S> will eventually fry Q1 and the circuit will no longer work. <S> The relay coil has considerable inductance, so current thru <S> it can't be interrupted instantaneously. <S> D3 provides a safe place for this current to go until it ramps down on its own. <S> Without it, the inductor will create whatever voltage it needs to keep the current going, which will damage Q1. <S> This circuit should be good enough to drive small 12V relays that require around 50 mA to drive. <S> I showed 5 kHz example tone frequency. <S> Higher is better, since it allows the charge pump to deliver more current into the base of Q1. <S> If you can tell the PC to make 10 kHz out, do that. <A> 4V is extremely low for a 12V relay, are you sure about that? <S> A more typical "Must Operate" voltage would be 8V to 9V. <S> Anyway, a PC's buzzer or speaker takes only a few mW, much less than the required power to operate a relay, which will be a few hundred mW. <S> You'll have to rectify (diode) and smooth (capacitor) <S> the signal. <S> This could work, but still is an odd way to control a relay. <A> Not only does a computer's buzzer require a very small current (typically 50mA at 5V), so won't be able to directly drive the relay, but it is also not a straight DC current. <S> The speaker will be being driven with a square-wave signal at a 50% duty cycle. <S> The frequency of the square wave determines the frequency of the sound coming out of the speaker. <S> It would, however, be possible to arrange some form of timed latch system - called a monostable so that as the first pulse of the square wave arrives the latch turns on for a predetermined time. <S> Each successive pulse of the square wave would reset the monostable, so it stays on as long as the speaker is active plus the length of time the monostable is set for. <S> As long as the period of the monostable is greater than the time between the peaks of the square wave (\$\frac{1}{f}\$) <S> then you should get a nice clean on/off signal in relation to the speaker's sound on/off. <S> The output of the monostable, depending on how it is designed, may first need to be passed through a transistor in order to drive the relay. <S> A simple system for making a monostable is the time-proven 555 timer . <S> Setting it up as a monostable is simple: <S> The selection of \$R_1\$ and \$C_1\$ are what determine the period of the monostable output.
|
Like Mike suggested you can use a transistor or MOSFET to control the relay.
|
Do PIC micorcontrollers NEED an external oscillator? I'm trying to write my first and a simple program on a pic16LF84, but I'm confused as to whether an external oscillator is required or optional. I'm reading a pdf called "Book: PIC Microcontrollers Programming in C" and it states: CLOCK SIGNAL Even though the microcontroller has a built-in oscillator, it cannot operate without external components which stabilize its operation and determine its frequency (operating speed of the microcontroller). Depending on elements in use as well as their frequencies, the oscillator can be run in four different modes: · LP - Low Power Crystal; · XT - Crystal / Resonator; · HS - High speed Crystal / Resonator; and · RC - Resistor / Capacitor. ^It's actually referring to the pic16f887. I just want to make a simple LED blinker and ADC, so do I need an external oscillator? <Q> Yes, the 16F84 does need an external oscillator. <S> It is a very old PIC. <S> I would really consider getting hold of a newer PIC, something like a 16F690, or 16F1824/16F1828. <S> These are far more current, and can do anything the 16F84 can do and much more. <S> If you want to use your 16F84 though, either use an external clock (e.g. from 555 timer or oscillator based on e.g. an inverting gate with RC or crystal) or crystal as specified in the datasheet , or if you don't have an external clock or crystal use the RC option. <A> First, please return the 16F84 to whatever museum you found it in. <S> Most modern PICs have a internal R-C oscillator. <S> In fact some, like the 10F series, can run no other way. <S> PICs with enough pins contain a crystal driver. <S> You add the crystal <S> and it's load caps, and the PIC does the rest. <S> Your PIC is a ancient relic that does not have a oscillator built in. <S> The section (from the datasheet?) <S> you quoted above is a bit misleading. <S> It does have driver circuitry for external crystal or R-C oscillator built in, but not the whole oscillator itself. <S> Note that it also says it cannot operate without external components . <S> You can also find ceramic resonators with the appropriate caps built in, but I'd stick to the crystal. <A> PIC16F84 is an obsolete microcontroller and it doesn't have internal oscillator. <S> I suggest you use PIC16F627/628/648 or PIC16F1826/1827. <S> They are compatible and have internal oscillator and much more peripherals. <A> Clock configurations for microcontrollers can generally be divided into 3 categories. <S> Complete oscilator circuit is external, microcontroller simply receives a clock signal. <S> Oscilator drive circuit is inside the microcontroller but timing components are external. <S> Often there are multiple different drive modes, one for RC circuits and one or more for different speeds of crystal. <S> Complete oscilator circuit is inside the microcontroller. <S> Older Pic models like the F84 and F887 tend to only provide options in the first two categories. <S> Newer PIC models tend to provide options in all three categories.
|
However almost all of the newer PICs have an Internal RC Oscillator that can be selected, which will be mentioned in the datasheet. So to answer the question about what you need to make this PIC run, is a crystal and two load caps.
|
Can you put a 120vac positive line into a breadboard? Is there anything I need to know about putting a 120vac positive line in my breadboard? (Like, for example, if it's a bad idea to do that to begin with.) It will just be a christmas lights strand at less than a quarter amp. I will only be putting the positive line into a DIP relay. I've only heard a few instances where people have done this and my only electrical experience deals with 5vdc so i've never been shocked. I know that I will not be touching this while it is actually plugged in as well. I also will have 5vdc control wires on the other side of the breadboard. Should I throw in some diodes to protect my Arduino, or should the relay keep the power isolated pretty well? <Q> Do not put 120VAC on a breadboard. <S> While there's nothing preventing you from putting 120VAC on a beardboard, that's really dangerous <S> so don't do that. <S> Get a perfboard to solder your relay in. <S> Mount said perfboard with the relay into a plastic project enclosure box. <S> That way, you won't accidentally short any of the relay contacts. <S> Drill a hole in the box to allow for 120VAC connectors. <S> You can get all those items at your local Radio Shack or Fry's electronics. <S> Or just about any electronics supply store. <S> According to your comments, you have a HSR412. <S> You should still get a perfboard and plastic box and solder this device into it to protect it and to protect yourself and others from a potential shock. <S> The datasheet says that it provides "4,000 VRMS Isolation", so w.r.t. isolation you should be fine. <S> The datasheet specifies that the control LED has a voltage drop of 1.6VDC @ <S> 10mA. <S> Assuming that your Arduino outputs 5VDC, you need a resistor in series with the LED to drop 3.4VDC while passing 10mA. <S> This is to get the 5VDC down to 1.6VDC. <S> You can use Ohm's Law (\$V = IR\$) to figure out the required resistance: <S> \$R = <S> V/ <S> I = <S> 3.4\text <S> { V} / 10\text{ mA <S> } = 340\text{ }\Omega\$. <S> There isn't actually a resistor that's exactly 340 ohms, so select a 390-ohm resistor. <S> Now, calculate the power across the 390-ohm resistor: <S> \$P = <S> IV = I^2R = <S> (10\text{ mA})^2(390\text{ }\Omega) <S> = 0.039\text <S> { W}\$. <S> So a 390-ohm, 1/8 watt resistor connected in series with the LED should be appropriate. <S> So you can connect your Arduino to your relay like this: Arduino HSR412----------------+ <S> +---------- <S> | 390 Ohm 1 | control pin +-------/\/\/\/-------+----+ <S> | 1/8 <S> Watt | <S> _ <S> |_ | <S> | <S> _\_/_ <S> | 2 <S> | <S> | | <S> +-------+----+ <S> | __|__ | | ___ <S> | <S> | <S> _ <S> | <S> | <S> | <A> That the 120 V AC line doesn't care that you plan to use only a quarter of an amp. <S> Could be 15 A. <S> Don't do it <A> As others have said, bad idea . <S> I understand you don't plan to touch the breadboard, but stuff happens. <S> Some have the bare metal of the clips exposed there. <S> Even those that don't usually have just a paper sticker over the bare metal. <S> Are you really sure it's rated for 120 VAC insulation strength? <S> I'm not.
|
Again, it's best to put your relay in a plastic enclosure to protect yourself from the 120VAC that will be present. You are only current limited by the circuit breaker at the mains. The maximum pin source current from an Arduino is 40mA per pin IIRC, so you should be able to just drive the LED and resistor directly. Take a look at the bottom of the breadboard.
|
Measuring duration and distances between pulses I want to know how it is done (or at least how would you do) to measure duration and distances between pulses on a signal in a micro controller(or a better way). Example: I have a couple of Arduinos and a couple of this RF Transmitter/Receivers(http://bit.ly/oT05Qg) and have a protocol setup that says I'm supposed to receive 4 bits (1111) with duration of 0,5 micro seconds and the space between them as of 1,5 micro seconds. If it is any different, I should ignore the information. How can I/would you do this? P.S: The best example in real life I could find was this: http://en.wikipedia.org/wiki/File:Interrogation.jpg <Q> I certainly wouldn't be trying to do this with a Arduino (remember, you asked what I would do). <S> Measuring characteristics of pulses at 500 kHz rate is going to be tricky. <S> The big question you left open is how close does it need to be, or more accurately, how close to you need to know it is to the perfect 500 ns and 1.5 µs timings? <S> If you need to know this to within 1%, for example, then it's going to be difficult and get quite expensive. <S> If it's good enough to sample the signal every 250 ns and live with the resulting uncertainty in timing, then it's easier but still tricky. <S> In that case you could sample the signal into a shift register at 4 MHz, then analyze the result in firmware. <S> Generting a 4 MHz clock output with most advanced micros is easy, and many will have a SPI peripheral that can be repurposed to a serial to parallel converter. <S> On a processor like a PIC 24H, the instruction rate can go to 40 MHz. <S> That only leaves 10 instruction on average per bit to process, which sounds too little for this method to be workable. <S> Another approach is to gate counters on for the high and low times, and thereby get a count of the number of clock ticks between edges. <S> You still have 1M edges per second to deal with, or 40 instructions per edge. <S> That still sounds tight, but possibly doable depending on what else you need to do and what has to be done with the result. <S> The 24H has "input capture" modules that do most of this in hardware, but the firmware still has to make sense of the resulting duration measurements. <S> Note that your pulse train has a average level of 1/4, which might be possible to exploit with some cleverness and depending on what else is going on, how fast you need it, and a lot of other things you haven't said. <A> Many asynchronous serial communication schemes, like RS232, involve a known idle/mark state of the line and a start signal/bit as well stop bit(s). <S> Oversampling the RX line allows one to sync up to the middle of the start bits in the middle and finally sample each of the bit and validate the state of the stop bits. <S> http://en.wikipedia.org/wiki/Asynchronous_serial_communication <A> However, it is not suitable for your purposes as <S> the detectable pulse length range is 10 microseconds to 3 minutes. <S> Also, once the measurement is done, you will have to process the result (at the very least store it somewhere), which takes time and may make you miss the start of the next pulse. <S> You may be able to measure shorter pulses by setting an ISR to the pin with attachInterrupt(digitalPinToInterrupt(pin), ISR, mode); and using micros() function which has a resolution of 4 microseconds, but that's as far as you can get. <S> Arduino is simply not fast enough to measure shorter pulses without special hardware. <S> The most promising would be to use SPI if your boards have it, but it will only work if you receive pulses in groups which could be mapped to SPI transactions.
|
There is an Arduino function specifically designed to measure pulse length: pulseIn(pin, value)pulseIn(pin, value, timeout)
|
Adjustable linear led driver? Linear, not PWM I'm working on a product that requires an led to output currents varrying from 0mA to 350mA and as many possible levels in between (~1000 would be sufficient I suppose). I CANT output a PWM signal to the led because that would defeat the purpose of my product (This is important). Does anyone know an integrated circuit that allows this level of current control? Otherwise does anyone have an idea of how I could build a circuit to do this? I have thought about Voltage Controlled Current Sources built with op amps, but I have no experience with these or know of any specific circuits. It also must be able to run off of batteries. The LED is going to be moving at an extremely fast rate through the air and has to maintain a solid beam of light rather than a blink. thats why i can't use PWM. <Q> For an "all-in-one" option, the ADB8810 looks pretty close to the kind of thing you want. <S> If you search for "programmable current" on e.g. Analog Devices, Nat Semi, Linear Tech, TI, Maxim, etc you will probably find quite a few options like this. <S> For ~1000 levels you would need 10 or more bits, so this would be pretty cheaply done. <S> Something like this circuit might do: <S> The transistor could be any NPN or MOSFET (with appropriate Vth) or darlington capable of sinking the necessary current (EDIT - as Wouter mentions <S> the 2N2222 is not a good choice, something in a package rated for higher power e.g. a TO-220 package would be better) <S> Opamp should be rail to rail in/out if possible to make things easier. <S> The 1 ohm sense resistor can be changed to suit the current required. <S> This was set up to output 1mA per 10mV in, so 3.5V produces 350mA ( <S> at the opamp input it is actually 1mA per 1mV, the resistor divider divides the DAC input by 10) <A> You can still use PWM to adjust the drive level. <S> What you are really saying is that you don't want the LED to pulse. <S> This can be achieved by low pass filtering the PWM output, then using that to drive the LED. <S> Here is one simple way: <S> Whenever the PWM output is high, Q1 sinks about 20 mA. <S> When low, it sinks 0. <S> The average current at the collector of Q1 is therefore proportional to the PWM duty cycle. <S> All this current must eventually go thru the LED since the capacitor can't conduct current long term. <S> C1 and R2 low pass filter the individual current pulses so that the current thru the LED is the average, not the individual on/off pulses. <S> Let's say you are using something like a PIC 24H to make the PWM. <S> It can run at 40 MHz instruction rate, which is also the maximum PWM clock for the regular PWM outputs (there is a special high speed PWM peripheral that can go much higher, but that's not necessary here). <S> To get 1000 different output levels that means the PWM frequency will be 40 kHz, or 25 µs per pulse. <S> At the half way point, the capacitor is being drained at 10 mA rate, and that will happen for 12.5 µs. <S> (10mA)(12.5µs)/22µF = <S> 5.7mV. <S> That's how much the voltage on the capacitor will vary peak to peak at the worst case operating point. <S> That divided by 180 Ω <S> is 32 µA, which is how much the current thru the LED will vary. <S> That's 0.16% of full scale or one part in 630, which is impossible for humans to see. <A> The LM8502 is a LED IC Driver that would do the job. <S> You can control the output current amongst other things. <S> http://www.national.com/pf/LM/LM8502.html#Overview <A> The TIL300 precision linear optocoupler has an extra photodiode for feedback. <S> The datasheet ( http://www.ti.com/lit/ds/symlink/til300.pdf ) has an example application circuit showing how an opamp could be used with it.
|
I'm sure there are a lot of other similar LED IC Drivers that does the same task too. Another option would be to use a DAC (or indeed a potentiometer if no uC involved) to control an opamp with transistor set up as a current source. There are lots of ways to average a PWM signal to ultimately have that average drive the LED instead of the individual pulses.
|
Spectrum of a LED As I understand it a LED emits a photon when an excited electron falls back to a lower orbit, and this is always the same energy (read: wavelength). So then why is the spectrum of a LED a bell-shaped curve instead of just a line (maybe a couple of lines for different electron transitions)? <Q> Several reasons. <S> Without getting too deep into quantum mechanics, the main reasons are: <S> If the LED isn't at absolute zero temperature, its atoms are vibrating. <S> The semiconductor allows longitudinal and transverse waves of many wavelengths, all going at the same time in ways described by thermodynamics. <S> These are quantized, like anything else, and called "phonons" The energy and momentum of phonons interact with the usual antics of electrons and photons. <S> You get a spread of photon energies coming out. <S> Even if a phonon doesn't exchange energy/momentum with an electron or photon, just because the crystal lattice is moving you get a Doppler shift in the emitted light. <S> Heisenberg says you can't measure both energy and time intervals with ultimate precision. <S> This isn't really about measuring but generating photons of a specific energy. <S> An electron is excited to a higher state, then comes back down. <S> To have a perfectly precise energy change in a quantum system you must allow it an infinite time interval to establish the initial, intermediate and final states. <S> Waiting that long would make for a dim LED! <S> Photon generation processes in real LEDs take place quickly, on the order of picoseconds or nanoseconds. <S> Emitted photons will necessarily have a spread of values. <S> While the semiconductors used in electronics components are very pure, with carefully controlled amounts of dopants added, they're never perfectly pure. <S> There are undesired impurities, and the dopant atoms we do want, are distributed randomly. <S> The crystal lattice isn't perfect. <S> The exact energy levels an electron can choose from are varied and dependent on position. <S> An ideal semiconductor has well defined bands of allowed energies and forbidden energies. <S> In an imperfect semiconducture, these have fuzzy edges. <S> So you get a range of wavelengths for emitted light. <S> I haven't yet mentioned effects of electron and nuclear spins, or that different isotopes, having different masses, add to the imperfection of the crystal lattice. <S> You can imagine why we physicists have a wild good time studying the details of spectra of light from glowing materials. <A> I guess that the orbit fallback energy is not strictly constant, but depends (a little bit) on the neighbourhood of the atom, for instance how exactly it fits in the grid, location of nearby impurities, if atoms of various isotopes are involved teh exeact isotope of the atom, etc. <A> In addition to what others have said, LED housings (the clear plastic bits) are doped/mixed with phosphors that absorb some of the light, then remit the energy at their molecular resonances (read: their color). <S> Phosphors need not be simple molecules or mixtures, either -- they will emit several energies in varied intensities, depending on the incoming photon energy and intensity, crystal orientation, mixture concentration, etc.. <S> quite a bit more Gaussian (macroscopic description of real measurements).
|
In line with what the others said, photons generated by an LED go through quite a few atoms to get to your eyeball or detector, transferring energy countless times, making the Fermi distribution (quantum energy description of a discrete system)
|
Controlled impedance in presence of vias and through-hole components (PTHs) We have some controlled impedance traces on layer 4 of a board. Layer 3 is a GND plane. Layer 5 is a 3.3V plane. Both planes are unbroken (they occupy the entire layer), with the exception of vias and holes. There are a lot of holes on this PCB, because we have a lot of through-hole connectors. See the not-so-pretty picture below: The white circles are the holes in the PCB. My question is, how do all these holes affect the impedance of the traces? Is there a minimum distance that should be maintained from the holes to ensure that the impedance is within specified tolerances (100ohms +- %5-10 for differential lines for example) Another somewhat similar question: Consider the picture below: Let's assume that layer 3, the GND plane layer is now split into 2, one AGND and one DGND section. Do the traces running entirely on a single plane layer (like in the picture) maintain the controlled impedance value? Is there a limit to how close they can get to the edges of the planes before starting to show deviations from the target characteristic impedance? <Q> Trace characteristic impedance, that of either microstrips or stripline, is determined taking into account the PCB stackup/geometry without vias. <S> At 3x the calculated required trace width nearly all ( e -3 ) of the original signal will have dissipated. <S> The signal return path is important for high-speed currents. <S> At high frequencies current follows the path of least inductance, not least resistance, which is normally whichever path is closest to the signal trace. <S> Return current density falls off inversely with 1+(D/H) 2 , at a point D units away from the signal trace on a return layer H units thick [1] . <S> So, one needs to pay attention to the D/H ratio in addition to trace width W: stay <S> 3xW and 4xH away from the trace ( <S> 4.36xH.. for 95% dissipation). <S> [1] See eq. <S> 5.1, pg. 190, of High-Speed Digital Design by H. Johnson, M. Graham. <A> For the first question, I would analyze the board in HyperLynx or similar post-route signal integrity tool. <S> If I didn't have such a tool, I would keep the space to hole spacing at 20 mils or 4x the trace width, whichever is more. <A> If you can manage more separation, that's even better. <S> Also, if the trace length is less than 1/10 wavelength at your frequencies of interest, determined by the rise and fall times of your digital signals, remember that it probably doesn't matter much what you do. <S> That's a trace length of 1.4 meters at 10 MHz or 14 cm at 100 MHz. <S> If your sketch is showing through holes spaced at 0.1 inches, it looks like your board is less than 1 inch square <S> and you could get away with well over 100 MHz signals without worrying excessively about controlled impedance and careful terminations. <S> Edit <S> This is not to say you should totally ignore good design practice and get rid of your ground plane or run traces across slots in the ground plane, as indicated in comments below. <S> Also, the distance values above (1.4 m and 14 cm) are corrected from my initial answer.
|
If the height between the signal trace and the ground plane is h , a fair rule of thumb is to keep all potential perturbing features at least 3h away from your traces.
|
How to non-destructively test unknown LED strip? I have a tiny LED strip that I took out of a smashed LCD in my Digital camera. I remember lighting up the strip in the past but can't remember how. I have been trying now with my bench supply to power it up but can't get it to light, I'v gone as high as 3.7 volts with no lighting, I fear I may have already destroyed it, but if I havn't how do I go about testing it without blowing the LEDs? Image to indicate scale and layout, dots on paper are 2mm spaced: <Q> I would use a 5V power supply with maybe a 1 kΩ resistor in series and start probing pairs of pins. <S> The smallest likely forward drop accross a LED <S> is 1.8V, which would put a bit over 3 mA thru it. <S> Neither 5 V nor 3 mA should damage the LEDs, but that should be enough current to see them light up if you're doing this in normal office lighting. <A> Note that all my comments below, and olin's ones, assume a single LED or 2 or more in parallel. <S> If there are 2 or more in the strip then they are quite possibly in series - <S> so multipling the values I give below by number of LEDs may be needed. <S> You may be able to trace out the PCB track and find how many LEDs and how connected. <S> Start witha low voltage - see below. <S> Olin's advice is usually exceedingly good technically, so I'm always wary of contradicting him, but in this case I'd be slightly wary of 5V as some LEDs <S> may not like 5V reverse bias. <S> LEDs are very prone to damage if Vreverse_max is exceeded. <S> other than that <S> his method is good (of course :-) ). <S> You'll be able to use a larger resistor but 1K is fine. <S> Nice table of LED forward characteristics - necessarily indicative only. <S> If the LED was white when it lit then Vfwd_operating is probably 3V to 3.5V. <S> Red <S> then Vfwd is more like 1.8 - 2.2 V Orange, yellow = similar to red Yellow to greenish, green = higher. <S> Depends on technology. <S> Blue - similar to white 3 - 3.5V. <S> If you get to 3.5V and see nothing then it is probably dead, but try 4V. <S> At 4V with 3.5V across LED (which it almost certainly won't be at low current) <S> you get <S> I = <S> V/R = <S> (4-3.5)/1k = 0.5 <S> mA. <S> If you look closely at the LED then 0.5 mA is easily noticeable and in some cases is surprisingly bright. <S> Just about to look at some LED data sheets for reverse voltage abs max. <S> Cree LP377FWh1 = <S> 5V <S> Cree <S> LP476 = 5V <S> Harvatek HT-F259 = 5V at 100 uA Luxeon Rebel ES = <S> Don't do it. <S> Nichia NSPW500CS = 5V at 50 <S> uA <S> Looks like Olin hit the typical max value exactly :-). <S> ie at 5V you may well be OK. <S> But, use less to start. <A> You can always use a constant current source such as the LM317, 5-10mA setting should do fine then just measure the output voltage. <S> Most DMM's should be able to measure the Vf.
|
So I'd start at a lower voltage - say 2.5V or less, with the 1K resistor that Olin suggested and try both polarities and then work up in say 0.5V steps.
|
Broken headset, repaired, but microphone doesn't work on computer, does work on phone I have a headset for my desktop computer. It's an analog device with two 3.5mm jacks, one for the headset, one for the microphone. It also has inline volume and microphone toggling. By wire was chewed up by a cat and torn between the headphone jacks and the inline controls. I have repaired the headset by re-soldering the wires. It works fine...sometimes. When I plug the headset into one phone, and the microphone into another, I can play audio onto the headset and record my voice just fine on the other phone, with no crossover. However, when I plug the cables back in to my computer, the headset works just fine, but there is nothing but what sounds like some background interference coming from the microphone when I test it. I have tried it with two sets of audio jacks on the system, both produce the same result. Why would it work on the two phones, but not on the computer? This isn't making much sense to me and I hope it would to someone else. <Q> I think it sounds like the mic signal and headset ground lines are shorted together. <S> The mic signal will be shorted to ground when both plugged into the same computer (i.e. shared ground) <S> When they don't share a ground, the problem goes away as the only common signal path is up to the short and should be of negligible resistance. <S> Testing with a multimeter would confirm this, just touch one probe to the tip of mic jack and other to headset sleeve (The other larger contact - I'm assuming mono TS Jacks, as opposed to TRS jacks) <A> This is more query than answer although an answer may be found in answering. <S> Will edit or delete in due course. <S> Did it DEFINITELY work OK on the SAME PC <S> you are trying it on now prior to the chewing? <S> Did you definitely match colours etc when resoldering. <S> Have you shorted two wires together? <S> This can be checked with a multimeter on ohms range <A> The mic and headphone ports on your computer might not have a common ground <S> thus your mic might not have a complete circuit if the soldered joint isn't good. <S> The reason it might work on your phone is a shared ground or it could even be that you're using a 2 x three pole 3.5mm to 1 x four pole y-split adapter which would join the mic and headset ground connections. <S> EDIT <S> Sorry, just read your comments on Russell McMahon's answer. <S> So this probably doesn't help.
|
You might be able to easily test this by leaving the headset plug unplugged but run a small wire from it's ground to the mics ground.
|
What software I can use for CPLD programming? I would like to learn more about CPLD circuits (because they are cheaper than FPGA), but I am facing a major problem. I cannot find any simple and userfriendly software for programing and debugging CPLD. The CPLD I have is XC9500XL from Xilinx. But I hate Xilinx's ISE WebPack. We work with this application in school and it is too complex, huge and not user friendly. Is there any alternative I can use? Ideally some open-source, which can run under Mac OS. <Q> There is software from design monsters: Mentor Graphics, Synopsis and Cadence, but their price is 6-figure. <S> Haven't used them for FPGA, and cannot confirm if they support synthesis specifically for this chip. <S> Anyway, if you know VHDL, you can get any VHDL editor (even simple text editor) & simulator, and after you finish your design - just run synthesis in 'terrible software', so that you'll spend very little time in it. <S> But none of these is going to be simple, small and user friendly. <A> When you pick a programmable logic vendor, you're effectively choosing the vendor's software. <S> These things are too complex and proprietary for there to be open source versions (so far). <S> I've mostly used Xilinx, but I've played around with Altera and Lattice software, and the workflow is pretty much the same. <S> You have to resign yourself to the initial learning curve, whatever you choose. <S> I suggest going back to ISE 9.x, which has less bloat than later versions and will still work with your CPLD. <A> You need ISE for place and route; that part of the flow is always vendor-specific even if you use another synthesis tool (as @BarsMonster suggested). <A> Consider switching to Altera CPLDs.
|
The Altera Quartus II software is much easier to use than Xilinx WebPack, and the CPLDs are better. You might also consider a command-line based workflow, which I have not tried myself, allowing you to dispense with the GUI.
|
Powering my Prototype PCB - onboard Regulator or External Supply? I'm laying out my PCB for the first prototype of my project. The board is relatively simple as it only consists of two CPLDs (Altera 240Z Max V) and a AT Mega 128L. I am now thinking of laying out the power section but am wondering if I should just power it from an external supply. The supply meets my requirements (3.3V and 1.8V rails) and has enough juice to run the board (2A @ 3.3V and 1A @ 1.8V). I would really prefer this approach but am wondering if this is a good idea. It keeps the simplicity as it means I don't have to test and pick voltage regulators at this stage. The power requirements may even change in the future depending on my CPLDs. So my questions are: Are there any drawbacks I should be aware of of this approach? Should the power section be always close to the relavent chips? Based on the advice from my previous question, I feel I have sufficient decoupling now (0.01uF and 1uF caps on every power/gnd pair with very short loops). But should I include a large capacitor (say, 470uF) and apply power straight to that? <Q> As you say, it saves picking a VReg at this stage. <S> Yes, you should have a nice meaty capacitor where the power enters the board. <S> On the times where I do want to have an unregulated power input to my prototypes (say a wall wart) <S> I usually over-spec the regulator to use, so that I don't have to worry about the power requirements changing. <S> I often don't worry too much about efficiency at this point though, and very often go for a linear regulator with heat sink where a switching one would be far better, but for a quick-n-dirty prototype it's not too much of an issue. <S> It is quite common for the power supply portion to be on a separate board any way - makes for a more modular system that is easier to design / redesign. <A> Why not lay it out with pads/holes for say 7805 form-factor regulators even if you plan to power it from a bench supply at this point? <S> You don't have to populate them <S> , it won't cost any more to have the boards made and you will be ready to experiment with regulators if/ <S> when you want to. <A> One thing you generally have to worry about with programmable logic (and chips with multiple voltage supplies) is supply sequencing: the overall timing of voltage rails coming up to nominal when power is turned on. <S> This can be an issue when the start-up speeds vary (i.e. linear versus switching), which is something you can see easily on a scope (use one-shot triggering). <S> However the MAX V device handbook, chapter 5, says "MAX V devices are designed to tolerate any possible power-up sequence. <S> " <S> Since there are no specific requirements, you don't need to worry about this particular aspect in your design.
|
Also if you are involving high voltages (well, mains - I know some of you don't think of that as "high") keeping it away from the main board is best as it means you can have the board running and not worry about handling it live. Personally I usually power my prototypes from my bench power supply (it's an old ATX PSU).
|
Differentiating between a square wave or sawtooth wave with a circuit...? I want to build a simple sensor that takes a 100 kHz square or sawtooth wave with a known amplitude and outputs a high if it receives a square wave or a low for sawtooth. I'm pretty sure this requires some sort of comparator, but I'm not sure how to approach this problem myself. Could anyone outline some sort of approach? (I'd like to figure out the details). Thank you in advance! <Q> If the frequency for both waves is going to be 100 kHz with the same amplitude, you could construct a narrow bandpass filter at 200 kHz to put the signal through. <S> In theory a pure squarewave should only have odd harmonics, so there should not be much output at the second harmonic frequency. <S> On the other hand, a sawtooth wave has booth even and odd harmonics, so you will get a greater output. <S> The peak amplitude for the second harmonic of a sawtooth wave will simply be \$ \frac{2A}{\pi} \$, where A is the peak amplitude of the input sawtooth. <S> If wish you can then follow up the output of the bandpass filter with a peak detector and some kind of comparator. <A> An outline of a solution: Maybe run it through a differentiator. <S> The derivative of a square wave will be alternating positive-going and negative-going spikes, whereas the derivative of a sawtooth should be more or less constant at a low value in one polarity during the rampy bits, with periodic larger valued spikes in the opposite polarity when the sawtooth resets. <S> So then HPF that to get rid of the constant low-values you get from the sawtooth ramps, and look to see whether you're getting spikes of both polarities, or just a single polarity. <A> You can easily detect some simple waveforms by detecting the flanks of the signal. <S> A square has quick rising and falling flanks, a sawtooth has only quick rising or quick falling flanks, depending on the signal. <S> So you check for rising and falling flanks: if you detect both, it is square. <S> If you detect only one type, it is triangle, as long as you are sure only these signals will be input. <S> Try with a differentiator circuit, which is easily done with an opamp. <S> See here: http://www.physics.iitm.ac.in/courses_files/courses/eleclab03_odd/mathematical_operations.htm <S> The steepness of the flank is represented in the output of the differentiator. <S> Feed this signal and its inversion into Schmitt-Triggers and / or retriggerable monoflops, and you have logic level representation of RisingFlank and FallingFlank, which in turn you can use for further computation or display. <A> Some approaches are more difficult than others. <S> Since I have a background in audio, I would use an audio based approach. <S> I would rely on something called the " crest factor ". <S> The crest factor is, basically, the difference between the RMS and the Peak level. <S> So if you made two "VU Meters", one that measured the peak value and another that measured the RMS value and compared the difference then you could fairly accurately tell the difference between a square wave and a sawtooth. <S> For a square wave, the RMS and Peak levels will be identical. <S> For a triangle wave the RMS level will be 4.77 dB lower than the peak. <S> A sawtooth wave will be similar to a triangle wave, but I don't have the exact number handy. <A> If one passes a square wave or sawtooth wave through a high-pass filter whose cutoff frequency is far above the fundamental of the original wave, the output will either be an alternating sequence of positive and negative pulses (for a square wave), or else will only have pulses in one direction (for a sawtooth). <S> See this circuit on Falstad: <S> Measurements: <A> Another simple solution for a fixed amplitude: <S> Use a comparator to compare the signal against a 95% amplitude constant voltage. <S> E.G. if the amplitude of the wave is 0v.. <S> 1v, then compare it against 950mv. <S> A 50% duty cycle square wave will give you a 50% duty cycle square wave out. <S> A saw tooth wave will give you a 5% duty cycle square wave out. <S> You can use a microcontroller to detect this on a cycle by cycle basis. <A> The details on the duty cycles will determine which average value is higher. <S> If, however, the square wave is 50% duty cycle and the triangle wave is 100%, then the average will be equal, and you'll have to explore a more complicated solution.
|
If the signal has a fixed amplitude, then you can run the signal through a low pass filter (average the signal) and compare the average values. There is no one "right" answer for this, since it really depends on the ability of the person designing the circuit to build it correctly.
|
How to decap a chip to expose the die? Any suggestions to open a surface mount package ( TSOP , QFN etc) to expose the die? Possibilities tried or considered: Split the package using wire cutters - sometimes works and sometimes doesn't Grind the top off with grinder - Some chips have no cavity between the die and the cap. Soak in MEK - I heard this works but haven't tried it. Why would I want to do this? To photograph for forensics purposes - to look for damage or to get die numbers. I don't expect the part to function afterward. Electronic forensics labs seem to be able to open chips easily but I'm not sure what tools/techniques they use. <Q> Travis Goodspeed has the tutorial: http://travisgoodspeed.blogspot.com/2009/06/cold-labless-hno3-decapping-procedure.html <S> Only slightly related, but look through Travis's Flickr stream for a lot of interesting dieshots. <A> Hot red fuming nitric acid is the stuff to use, it dissolves the plastic. <S> It's rather nasty, several kids in my class at school got acid burns when an experiment performed by our chemistry teacher went wrong and there was an explosion. <A> I heat them with a heat gun, then gently drive a sharp chisel (the chip I mount horizontally in a table vise) to split the chip in half. <S> You can do this same procedure with ceramic chips that have a gold cap over the die. <S> The gold cap is held down with solder, so the heat weakens it. <S> I have not been able to mechanically expose the die in an epoxy chip, and don't plan to use any nitric acid.
|
Basically you put the part in a test tube with NO3 and swirl it around and leave it overnight until the encapsulation is dissolved. Your safest option is to stick with ceramic eproms and chips that have the thin glass layer between the brown ceramic parts. From what I have seen, the epoxy has no open space between it and the top of the die inside.
|
Gate Output as a Switch? I was randomly browsing around some Introduction to circuits websites when I came along this: The text that went with it is: Now let us consider what happens when using the output of a chip, such as the 74HC04, to operate an external device. For example, the circuit on the right drives an LED. When the gate is HIGH, then there is no path to GND for cathode of the LED L1. When the gate is LOW, then output pin 2 is connected to ground, and current flows. Since R3 only allows 15mA of current to pass, the gate is safe from being overloaded. Remember that most gates can handle 20mA of current. The same holds true for most microcontrollers. Can someone explain how this works (I realize this is probably super newbish to most people)I understand how logic gates work, that is an OR gate correct? My "assumption" is that since it's an OR gate....when the Input (or 1) is set to low (or zero) it allows current to pass through?....but if thats the case shouldn't it be like....facing the other way. I guess im confused at why the LED is on the output side with Vcc. I guess I just don't understand why the OR gate isn't facing the other way. Im probably being dumb lol <Q> To expand a bit on @Barsmonster's answer, if you look at the CMOS implementation of a gate, there is a "pull-up" network of P-type transistors and a "pull-down" network of N-type transistors. <S> The inverter is the simplest case of such a gate and it looks something like this: When A (labeled "1" in your diagram) is set to Vss (GND), the P-type transistor turns on (and the N-type transistor turns off), and Q (labeled "2" in your diagram) is effectively connected to Vdd. <S> When A is set to Vdd <S> the N-type transistor turns on (and the P-type transistor turns off), and Q is effectively connected to Vss. <S> The current limit they are talking about is how much the N-type transistor can sink without burning up. <A> It's not an OR gate, that would have at least 2 inputs. <S> The output would be active (read: high) if input <S> A OR input B (or both) would be active. <S> The 74HC04 is an inverter, it makes the output high if the input is low and vice versa. <S> So the output is either low (0V) or high (+5V). <S> If it's high then there's no voltage difference between the output and \$V_{CC}\$, so there's no current. <S> Remember Ohm's Law: \$I <S> = <S> \dfrac{V}{R}\$ <S> If the output is low there is a voltage difference and current can flow from the higher voltage \$V_{CC}\$ (+5V) to the lower voltage of the gate's output (0V). <S> The drive capability of a gate is sufficient to light a LED, for more power-hungry devices as a relay <S> you'll need to add a transistor to provide the required current. <A> Majority of gates does not pass current. <S> They ether connect output to VCC or connect output to GND, that's it. <S> The difference between them is when they connect output to VCC/GND.
|
For this invertor gate, it connect output to VCC when input is LOW, and to GND when input is high. This is invertor, not OR gate.
|
Backdriven stepper motor "powering" rest of the board I have a stepper motor powered by a breakout board that uses the A4983 stepper motor driver (http://www.sparkfun.com/products/10735). Sometimes when the power is disconnected and the drive wheels are back driven, all the LEDs on the the boards light up and it seems like the system is being powered by the stepper motors. I have the board set up this way: Stepper motors connected to the stepper motor driver. Power coming from battery is directly hooked up to the driver's motor power supply. A 5v regulator comes off the same battery line and powers the micro controller and other 5v electronics. Three questions: 1) what exactly is happening? I know when back driving the motor it will create a current, but this is a bipolar stepper, wouldn't the current be AC and thus destroy the circuit? (up until this point, everything still works just fine). How is the current flowing into my other electronics? 2) How harmful is this back driving? Are there serious voltage spikes that I should be worried about or is the stepper motor driver chip dealing with it? 3) how do i prevent or protect the circuits against harmful effects? I'd put a diodes between the motor driver and the motor but bipolar steppers are basically AC motors and that wouldn't work. <Q> The voltage coming out of your motor probably is AC, but that is being rectified by the kickback catch diodes in the driver circuit. <S> Assuming this circuit was designed and wired up correctly, only the correct polarity voltage will be fed back onto the DC power input net. <S> As long at this voltage doesn't exceed what the circuit is rated to operate at <S> , there should be no problem with this. <A> It can be somewhat distracting, for example, if turning a motor that's attached to a powered-off devices causes it to freewheel until the device powers up and then start dynamic braking. <A> There are 3 parts to this question: <S> The first is adequately answered - the AC is rectified and powers the board. <S> As for the second and third: Yes, this can be dangerous. <S> I've burnt boards this way. <S> Olin's answer says "As long at this voltage doesn't exceed what the circuit is rated to operate at..." - which is exactly the problem. <S> Sparkfun lists that chip at 2A/30V. <S> But you may be able to back-drive the motor to produce more than 2A. <S> There are 2 ways to prevent this: <S> Add a physical brake solenoid that engages when power is off. <S> Disconnect the driver chips from the motor power lines when power is off. <S> The first one prevents the external force (a human?) <S> from back-driving the motor. <S> The second solution prevents the back-driving force from hitting the driver chips. <S> I've worked on projects that employ both techniques. <S> On one project, we had a pick-and-place device with a counterweight. <S> If the counterweight was removed or lifted the elevator would fall with greater acceleration and top speed than the driver chips were intended to handle.
|
Accidental powering of a board by motor-generators is often not physically harmful, provided that the motor isn't driven so fast as to subject the board to excessive voltage, but even when it is not harmful it can be a nuisance.
|
Generic PIC 40-Pin and 18-pin development boards I've looked at Guide in choosing good overall PIC dev board page already, but didn't really find what I'm looking for. I have found some 18-pin, 28-pin, and 40-pin PIC development boards at Sparkfun http://www.sparkfun.com/categories/9 . However, I want to find out whether I can interchange different models PIC chips with the same number of pins onto the board. I'm looking for development boards that have similar level of peripheral support built-in onto the board like the Arduinos or T.I. Launchpads. What do you know of the options? On a second note, where can I get economical PIC programmers? <Q> I can't tell exactly what you are looking for, but we sell both PIC development boards and programmers. <S> Take a look at our products page. <S> The ReadyBoard series is meant to make it easy for you to implement your own circuit around a PIC. <S> The board provides the basic infrastructure, like power supplies, RS-232 interface, reset control, debug LEDs, etc, but doesn't try to include "peripherals" as such since every project is different. <S> Instead we include a large breadboard area where you can add your own circuit that does just what you need. <S> Note that this is different from the PIC 24, 30, 32, and 33 28-pin footprint. <A> You can find enough choice at the microchips' website, and the formalities are simple to buy through Microchip Direct. <S> Other better choice is MikroElektronika Development tools, which can be found at http://www.mikroe.com/eng/categories/view/6/pic-development-tools/ <A> It will certainly work for quite a few of the 40-pin PICs, and would probably be quite easily adjusted to work with others too. <S> You could work things out for yourself by looking at datasheets/pinout and check they match up with the board pins, but as this would take a while I would ask Sparkfun to give you a list - it says "see list of related ICs below" <S> but then only gives 2, which is probably only the ones they stock, not the full list of compatible PICs. <S> I imagine most 16F and 18F 40-pin PICs will be compatible, but I don't think the dsPICs/PIC24 will be (I think they are slightly different IIRC <S> I remember modifying a few 18F boards for dsPIC <S> a while back) I would also want to see a picture of the bottom of the board to check how the proto tracks are arranged and how easy it would be to modify. <S> EDIT <S> I noticed the 18-pin version does have a picture of the underside <S> - it looks like stripboard with a few traces for the ICSP lines, so easily hackable. <S> You don't give any specific details about what kind of peripheral support you are interested in (the options are endless) but for a system with lots of different plugin options check out the PIC18 Explorer (here is the page <S> it came from with other options) <S> For an economical programmer that can be used with pretty much all the current PICs grab something like a PicKit 3. <S> Or PicKit 2 if you want to go a bit cheaper and still program most PICs. <A> I found some alternatives listed http://en.wikipedia.org/wiki/List_of_Arduino_compatibles <A> In August I decided to take a look at micro-controller development using PIC's. <S> After searching for some time I found Matrix Multimedia's E-Blocks system. <S> It is worth taking a look. <S> Matrix Web Site
|
I prefer Microchips' development boards and programmer. The ReadyBoard-02 is targeted to USB applications and therefore comes with a 18F2550, but it is compatible with any 16F and 18F in the 28 pin DIP footprint. I just looked at the product page for the 40-pin board, and the schematics seem a bit out of date plus the info is a bit lacking on supported chips.
|
RS-485 over many 1000s ft, ground wire and termination always needed? I've only ever used RS-485 over short connections before. I may have a project coming up where the cables will run several 1000 ft. My questions are: Is the gnd wire needed? Should the shield in the cable be used as the gnd wire? When must terminator resistors be used? <Q> I would think it would be asking for trouble if you did not use termination and grounding. <S> See Jan Axelson's write up. <S> Also the further your cable extends, the lower the baud rate will be. <S> At 4000' the maximum baud rate is 90kbps. <S> I think using the shield as the ground is okay, but you need to isolate each node with 100 ohm resistors. <A> For 3. <S> you need termination resistors to avoid reflections, especially at distance or high speed. <S> This is even more true for RS-485 where the signal can be driven from the middle (or at least not at the end). <A> If dealing with 1000s of feet don't forget to keep an eye on cable resistance when speccing the cable. <S> Yes termination will be necessary. <S> In some circumstances you may be able to do without a gnd but this depends on the topology of the transceivers. <S> You also definitely want one end to be galvanically isolated from local ground as you have no idea <S> what potentials there might be between local grounds at each end. <A> For the record, I have my own write-up here (with links to further reading at the end): <S> http://support.fccps.cz/download/adv/frr/rs485/rs485.html#standard <S> Suppose your baud rate is 9600 bps. <S> That means 1 bit is about 100 us. <S> Suppose that your cabling has maybe 66% velocity ratio. <S> That's about 200 m per a microsecond. <S> That's 1 km in 5 us, or a reflection round-trip of 10 us. <S> So... the first reflection will be back in 10 us. <S> Depending on where the "sampling point" is within a bit duration in your UART (some UART's have multiple sampling points per bit and make a "quorum consensus" of some sort) <S> the reflection in 10 % of bit length may or may not be a problem. <S> Also, the reflection tends to fade with distance... <S> so does useful bandwidth :-) <S> Reflections are one thing, and a common gnd potential is another. <S> If your ground potentials wobble about a lot, and your transceivers are not isolated, the RX part of the transceiver may see voltages outside of its working range (about -3V to +7V typical) and may garble random bits. <S> Worse yet, if the transmission line goes through an outdoor environment, it may face atmospheric electricity. <S> Providing a common reference ground (one more wire or shield in the TML) is always a good idea, but it may not be enough to "unify" local grounds at very distant locations. <S> Consider using isolated transceivers (to make the normal ground wobble irrelevant) and consider adding surge arrestors on top of that. <S> Arrestors combined with transceiver isolation are as good as it gets. <S> Except that a good arrestor (dual-stage cascaded, with spark chambers and transils) can be more expensive than an SFP transceiver, and an optical cable is not significantly more expensive compared to decent twisted-pair copper. <S> Yeah <S> right - SFP's are no good for RS485. <S> I'm mentioning this just in case Ethernet was an option.
|
I have used RS485 for short hops (~100' or so) without using termination or grounds, but I think for K's of feet you would be wise to stick to the rules.
|
Obtaining a -3.3v with +3.3v and ground I have a +3.3V supply and ground through usb on a board. I want to get a -3.3v supply from it for giving reference to an adc. Do you know how to do it? <Q> LMC7660 is a standard part for this. <S> If you don't require any more than a few mA, this circuit should work fine. <S> It can operate from +1.5V to +10V and provide an output of -1.5V to -10V. <A> Since you say this is for "reference", you apparently only need a little power but also some accuracy. <S> In that case you probably want to use a charge pump followed by a negative linear regulator. <S> For completeness, I want to show the switching topology to use when higher power is needed: <S> When the switching element SW1 is closed, inductor L1 builds up current thru it. <S> When the switch is opened, that current can only come thru D1 which charges up C1 and makes a more negative voltage on -V. <S> Of course in a real case SW1 would generally be a transistor and there would be some feedback controlling the switch to regulate -V to the appropriate level. <S> I am just trying to show the basic switching power supply topology to make a negative power rail from a positive one. <A> The device you need is called a Charge Pump Inverter <S> There are many different ones around. <S> For example, Maxim has a wide selection: <S> http://para.maxim-ic.com/en/search.mvp?fam=chargepumps&828=Inverter&tree=powersupplies <S> And all the other major IC manufacturers do their own equivalents.
|
As others have said, a charge pump is the simplest way to get a negative voltage if you don't need much power.
|
Why are h-parameters used? What is the reason for using h-parameters when describing transistors? Why are they used instead of the physical description? <Q> You don't use h-parameters instead of a transistor. <S> The h-parameters of a transistor will give you a good idea what it can do, how to use it effectively in a circuit, and whether it is appropriate for a particular circuit. <S> In practise, only a few h-parameters are commonly used. <S> The most common one if hfe, which stands for h-forward-emitter. <S> That means it is the ratio of output to input in the common emitter configuration, which in turn means it is the ratio of collector current to base current, which is basically the gain of a bipolar transistor. <S> Beta is another similar but not completely identical measure of gain, although in most cases the two can be used interchangably since a good circuit doesn't rely on exact values of gain anyway. <S> Sometimes you might see hre (h-reverse-emitter) which is a measure of how good a current source the transistor is at a particular fixed base current. <S> There are more h-parameters, but they get increasingly obscure and less commonly used. <A> A small addition to Olin's good answer: a transistor (or many other kinds of analog circuits) can be considered as a two-port network , or quadripole. <S> That means a block where the internal circuitry is not necessarily known, but are known the relationships between voltage and current at its ports. <S> So, you have a quadripole. <S> You can draw it this way: to describe the relationships between the four magnitudes, you need two equations of two variables, composing a square matrix. <S> Depending on how the equations and the variables are arranged, the coefficients can be different magnitudes, and in this case: Adimensional: voltage over voltage, current over current Impedance: <S> voltage over current Admittance: <S> current over voltage <S> You can arrange the equations to have only impedances (z-parameters), only admittances (y-parameters) or a mix of them. <S> This is the case of the hybrid parameters (h), where \$\mathrm{V_1}\$ and \$\mathrm{I_2}\$ are expressed as functions of \$\mathrm{V_2}\$ <S> and \$\mathrm{I_1}\$. <S> This leads to four h-parameters, specifically: \$ <S> h_{11} = h_i = \left. <S> \dfrac{v_1}{i_1 <S> } \right|_{v_2 = 0 <S> } \$ <S> \$ h_{12} = <S> h_r = \left. <S> \dfrac{v_1}{v_2} \right|_{i_1 = 0} \$ <S> \$ h_{21} <S> = h_f = \left. <S> \dfrac{i_2}{i_1} \right|_{v_2 = <S> 0} \$ <S> \$ h_{22} = <S> h_0 = \left. <S> \dfrac{i_2}{v_2 <S> } \right|_{i_1 = 0} \$ <S> Therefore \$h_{fe}\$ represents the h-parameter that describes the forward current gain in the common-emitter configuration, or commonly the current gain of the transistor. <A> In my point of view h-parameters are used for small signal frequency analysis. <S> It knows system performance by calculating the output gain. <S> It has one disadvantage, it is not suitable for large signal amplification. <S> In this model input voltage and output current are dependent.
|
H-parameters are one system for characterizing bipolar transistors.
|
Is it possible for a SPI slave to talk to other slaves? I'm developing a device that will have a flash chip and a RTC on the same SPI bus, selected using two different select lines. I also have a front panel for this device that needs to access these devices and is currently wired up to a UART, but I'm thinking of making it also an SPI device so I wouldn't have to use the extra pins. My basic question is this - could I somehow have the front panel MCU, which will be an SPI slave, talk to the other slave devices on the bus somehow? If not, how would I be able to achieve this? I'm thinking about doing this by re-initializing the SPI bus by causing an interrupt on my main MCU, but I'd rather first see if anyone here knows if I can do slave to slave SPI comms. Thanks for any help. <Q> A "slave" SPI device that controls another slave becomes a master by definition. <S> ie <S> Your masters need to cooperate physically: If two masters try to work at once, or if one master asserts a signal line (eg clock) that affects the ability of the other master to control the same line when desired then "there will be problems". <S> Your masters need to cooperate logically: If one master "thinks" it is controlling the bus but the other is also altering the clock or data lines "there will be problems". <S> From the UART and SPI IC's point of view the physical identity of the master device is unimportant as long as the signal levels and signal flow occurs correctly. <A> The only difference between a master and a slave is the master genetates the clock and SS signals and the slave listens for them. <S> While the front panel in not actively being a master there is no problem with it listening for an incoming SS signal and working as a slave. <S> An interrupt would be ideal for this. <S> Direct slave to slave communication is impossible as there would be no clock. <A> One of the advantages of SPI is that there are no bidirectional communications lines. <S> This allows for things like signal boosters or repeaters which don't have to keep track of any state. <S> Unfortunately, it also means that SPI is not well equipped internally to handle multiple masters and negotiation between them. <S> If speed and operational constraints permit, I would suggest having one master for all communications, and having the other device that wants to exchange information with a slave ask the master for assistance. <S> Electrically, the simplest way would be for the master to send the other micro a "what do you want to send and receiv " message, get a response, send that data out the SPI bus, get the response, and send that information to the other micro. <S> If the master and other micro have suitably-reconfigurable <S> I/ <S> O, it may be possible for the other device to ask the master to send out some number of bytes' worth of clock without outputting any data, and have the other device itself supply the data. <S> That would improve data throughput, but add electrical complexity.
|
If your front panel software is capable of implementing either slave or master roles at different times there is nothing to stop it doing so, provided that the hardware can accomodate the necessary signal flow and the "normal" SPI master does not interfere or "become confused" by the action.
|
Can I using nichrome wire to light a candle electronicaly? I want to be able to create a set of candles that light automatically (for a presentation) however it's almost 100 candles and I need an inexpensive solution. I know that nichrome wire get's hot when you pass current through it but can it get hot enough to start a candle. I figure that I could wrap the wick with the wire to get it started (I don't need it to out afterward). The question is: can I heat up nichrome wire enough with less than 12 volts of electricity? <Q> I would look at purchasing some type of electronic ignition module (e.g. like those used for pilot lights in heating/hot water systems) but here are some thoughts regarding nichrome: The 12V question - yes, if the supply can source enough current. <S> Nichrome will vary in ohms per metre for different gauges. <S> I have some nichrome wire here <S> somewhere that is around 10ohms per metre (28AWG IIRC, see resistance table at bottom), which says it can be used up to around 1100 degrees centigrade. <S> I'm not sure of the exact temperature needed, but parrafin wax usually ignites around 199-249 C according to this page. <S> If we assume say 400 degress will be sufficient to start the ignition process (I'm guessing here, you will need to do some more research, or just try it out and see what works best) then using the table below we can calculate ~2A is needed for 28AWG (so your supply needs to be able to source at least 2A) <S> For ~10 ohms per metre and 12V, this would be 12V/2A = 6ohms, <S> so 1m <S> * (6/10 <S> ) = 0.6m. <S> So 60cm of 28AWG Nichrome wire across 12V should heat to around 400 C. Nichrome Temperature Nichrome Resistance <A> Summary <S> Yes, you will be able to make it work either by using nichrome wire on th wick directly or if that is not consistent enough, by using a match head. <S> to light the candle and lighting the head with nichrome. <S> The voltage is not what counts, it is the energy that matters. <S> You will probably want a Watt or two per candle to do it well. <S> Many batteries will do this. <S> Nichrome melts at 1400 C which is well above candle ignition temperature. <S> Wikipedia article on Nichrome <S> Getting rapid and consistent ignition may be "tricky". <S> What would work far better is to use nichrome wrapped around a match head. <S> Embed a match head and igniter loop in each candle next to the wick. <S> (Long long ago I used to ignite match heads using copper wire wrapped around them, to form an igniter for other material. <S> It worked well and fast. <S> Voltage is not the main issue in ignition. <S> To get temperature rise you need power and/or energy. <S> Power = <S> Watts = <S> volts x amps. <S> Energy = <S> Watt-seconds = power integrated over time. <S> You will probably need a Watt or few to get fast ignition. <S> The nichrome or similar wire can be sized to give the right power level at the available voltage. <S> Another suitable wire is "constantan" which is made of 55/45 Copper-Nickel. <S> It is commonly available and AFAIR has a higher resistance for a given length and diameter than Nichrome. <S> Per Watt, at 6V you need about 160 mA, at 3 V <S> = 1/3 amp, at 1V = <S> 1A. <S> AA NimH batteries can provide currents of this magnitude. <S> Be awwre that resistance in the leads and in any connections can drastically alter the result at low voltages. <S> Wikipedia comment on flame temperaure <S> says 1400C at core and 1000C mean. <S> This page says the wick ignites at about 240C and the wax vaporises at under 650C. <S> This very nice fore investigation paper says wax will flash at 204-270 C, the fore point is 238-260C !!! <S> This says Tmax in flame is 1400C as others do, but main value is its many references <A> <A> With all the math and tables you can figure out theoretically what should work. <S> My experience with Ni-Chrome and paraffin is practical. <S> MANY times when Ni-Chrome is used it burns out at the point <S> it is bent or rolled, ie, the point at which it is to perform its work (light the candles). <S> There are also way too many variables here with wind, relighting, etc. <S> If you watch them try to light the big candles inside Church on any given Sunday they are using a direct flame and sometimes it lights right off, others you stand there until it does. <S> My solution to lighting the first time right away is to use a hair dryer to loosen up the paraffin on the wick and roll a little plasticized black powder from a sporting goods gun shop reloading supplies onto the wick. <S> Wrap it with the Ni-Chrome. <S> You will be getting a little flash but if the Ni-chrome burns out you'll get that anyway.
|
A popular igniter used by firework enthusiasts Talon will work if you only need one ignition. However, the properties of the wax and wick may make the practicalimplementation tricky.
|
What are Y5V or Z5U capacitors good for? I was thinking decoupling, but you would have to overdimension them because of the high tolerance and temperature stability. And doesn't a 1uF capacitor (instead of 100nF) have the same inductance problems as a 1uF X7R for decoupling? Are there other applications where the tolerances and variations are so little important that a Y5V or Z5U could be preferred over X5R or X7R? I realize they're somewhat cheaper but that doesn't count if the quality is too bad to be useful, IMO. <Q> I would say the uses can vary depending on your initial project goals/specifications (e.g. what temperature range you want the circuit to perform under, <S> voltage range etc) <S> You decide the specs/tolerance limits for a particular project, so if you run the numbers and the circuit will function under worst case scenario with slacker tolerance on certain components then all should be well. <S> This may mean in one project you avoid them completely and in another you use nothing <S> but. <S> Check the datasheet for graphs over temperature, frequency, voltage, etc and decide whether the part will be suitable for a particular use. <S> Monte Carlo SPICE analysis is a useful tool for determining how a circuit will perform with component variations. <A> I suspect that in many applications, if a "10uF" cap with an inferior dielectric, paralleled with a good 0.1uF cap, will work as effectively for bypassing as would an ideal 1uF cap, but will cost less than a 1uF cap with a good dielectric. <S> On the other hand, I've sometimes thought that for bypassing devices which will be switched on and off fairly often, having a cap whose capacitance dropped off sharply with voltage could actually be an advantage . <S> Suppose one has a 3.3-volt device which draws 1mA, needs 1uF of bypassing, and is needed for 1ms once per second; the device will completely drain the cap between uses. <S> Charging the cap to 3.3 volts will require 3.3 microcoulombs of electricity, every time the cap is switched off, that energy will be wasted. <S> Every second, the device will require one coulomb of energy during the 1ms that it's "on", and burn 3.3uC uselessly after it's "turned off". <S> In effect, the cap would be wasting three times as much energy as the device was actually using. <S> Now suppose that one could get a cap with a capacitance of 3.3uF at below 0.1 volts, and zero capacitance above that, and one wired that cap in parallel with the power switching device; assume further that the input to the power switching device has 100uF of usable capacity. <S> To allow for inductance in that cap or the 100uF board cap, the device also has 0.1uF of "normal" capacitance in parallel with it. <S> In that scenario, each on/off cycle will require charging the 0.1uF cap to 3.3 volts, requiring 0.33uC, and charging the 3.3uF cap to 0.1 volts (no energy will be spent charging it from 0.1 to 3.3 volts) using another 0.33uC. So energy wastage would be cut from 3.3uC (or 330% of the current usefully employed by the device) to 0.66uC (or 66% of the current usefully employed). <S> Wastage would be cut by 80%; energy consumption would be cut by over 60%. <S> In practice, I doubt one can get caps of suitable values with such a sharp fall-off of capacity versus voltage, but if one could, it would be possible to greatly enhance the efficiency of some battery-powered devices. <A> In most home consumer electronics, rated to operate from only (say) <S> 10C - 35C, the temperature coefficient doesn't matter that much. <S> The poor tolerance could be compensated for by using multiple low cost Y5V/Z5U capacitors. <S> Also sometimes the standard 100nF decoupling capacitor can be made smaller without significant performance loss. <A> Yet another answer, but no one mentioned it.. <S> While y5v's seem whimpy, from an emi standpoint they can have a slight advantage over x7r in some applications, which is in regards to their self resonance. <S> x7r's are quite peaky, and y5v's are somewhat flatter. <S> Play with this tool for example - http://www.avx.com/SpiApps/#spicap <A> bulk bulk bulk bulk bulk bulk bulk bulk.... <S> Bulk capacitance, where you need to store as much energy as possible in a given package. <S> You supplement it with smaller capacitors that have better high-frequency characteristics if you want good overall bypassing.
|
Generally I would agree that they are commonly used as cheap decoupling/bulk capacitance, but there is no reason why you couldn't use them for e.g. a rough timer/oscillator if it still works as intended within your specifications.
|
Sub-Miniature version of the 12AU7 valve (vacuum tube) I want to make my own valve amplifier, and for that, I'll be using an 12AU7 dual triode tube. Since the 12AU7 is quite large, is there a sub-miniature version available? Also: the main difference between the European ECC82 and the American 12AU7 is the heater voltage of either 6.3V or 12.6V. I heard they can be both wired to use both voltages, could someone please explain how? <Q> As for the heater voltage, the two heaters can be connected in series (12.6 V @ 150 mA) or parallel (6.3V @ 300 mA). <S> Parallel is more common since most mains transformers for valve designs have a 6.3V secondary winding. <S> I have no idea whether a sub-miniature version is available. <A> So you will likely need to re-engineer the circuit, or at least recalculate dissipation. <S> I would suggest finding another medium-mu dual triode on ebay, look at the specs on http://pw1.netcom.com/~wa2ise/radios/penciltubes.html and see if it will work in your circuit. <S> For example, the 6111 has low gain like the 12AU7, but dissipation and plate voltages are limited. <A> I would not suggest to anyone to use subminiature tubes instead of highly available 12AU7 or ECC82 if you prefer (or E82ECC). <S> Besides this tube is very, very good in hi-fi assemblies and <S> you should not low anode voltage way below 250V, although i made guitar amp with 12V on <S> it's anode. <S> If you're not familiar with voltage higher then 100, I strongly suggest to use ECC88, very nice (maybe better) <S> double triode which runs beautifully at 90V. <S> And yes, this tube has different heater characteristics (only parallel heaters). <A> the 12AU7 and other 12A?7 derivatives can be run off a 12-Volt supply. <S> try a google search on DIY headphone Hybrid amplifiers. <S> in addition there are now Low voltage pencil tubes available out of the Former Soviet Union, some of these tubes have a maximum plate voltage of 30 volts, which are designed to be run off battery packs.
|
There are probably subminiature tubes that will work, but submini's tend to have smaller maximum power dissipation and plate voltages. There is no significant difference between the ECC82 and the 12AU7 - it's just different nomenclature for the different markets.
|
Measuring voltage across a resistor using a micro controller I want to measure voltage across a resistor using the ADC of a PIC micro controller. But my problem is that both ends of the resistor are above GND and may be above 5V. But the difference is always =<5V. I need a circuit which operates at 5V, because i can use only a 5V supply in my design. <Q> Use an instrumentation amplifier, with the two ends of the resistor connected to the + and - inputs. <S> The ADC input is connected to the output of the amplifier. <S> This technique is often used for current measurement. <A> The voltage dividers as shown allow only 20% (100K/(400K+100K)) of the voltage to appear at the inputs to the microcontroller. <S> Choose other values as needed. <S> As Olin as pointed out, this arrangement exceeds the maximum recommended impedance for PIC ADCs, due to the time constant of the ADC input capacitance and the source impedance. <S> It might still be okay as long as the voltage across the resistor doesn't change rapidly and you can tolerate a long acquisition time. <S> It might be worth trying and see if the values you obtain are suitable for your application. <A> The best method depends on things you haven't told us. <S> If the maximum voltage is only a little above 5V, then a resistor divider may be good enough since you're only attenuating each signal a bit. <S> The problem with dividers is that the more you divide, the lower the efective resolution ends up being after conversion. <S> Each divider will also have some gain error, which messes up the differential calculation. <S> Since you are doing two A/D conversions to get the difference accross the test resistor, you lose a bit there because the errors on each conversion add. <S> If you do use a divider, don't do what trcrosley suggested. <S> Look at the PIC datasheet carefully and you will see a maximum impedance for the signal driving a A/D input. <S> If you go above this, acquisition times will increase and the specified accuracy is no longer guaranteed. <S> Most of the older PICs can tolerate up to 10 kΩ. <S> Some of the newer ones need less, especially the high speed <S> A/Ds. <S> In any case 80 kΩ as tcrosley suggested is way too much. <S> What you are trying to do is a common problem when wanting to measure current with a high side sense resistor. <S> There are chips specifically for that purpose. <S> If this is a one-off, check out some of the Maxim parts.
|
As long as you can tolerate tying each end of the resistor to ground via a large resistance (500K or so), without disturbing the circuit, you can use an arrangement like this: where you use two channels of the ADC (or two ADC's), and compute the difference between them.
|
Time-series Statistical Analysis with FPGA Suppose I have two time series, such as stock valuations or radioactive diagnosis, for which I need things such as covariances (QP -problem) among other things. Covariance calculations should be easy easy speed up -- the future stages are not depended on latter. Can I do this kind of problems in constant time in FPGA? -If I have understood right, yes. What other statistical analysis -toolbox things you can considerably speed up with FPGA? Everything not on depended on the last stage? Look if my thinking is right, there must be a massive potential here -- could someone help me to find out projects specializing in time-series analysis with FPGAs? <Q> In theory, you could do it in constant time, but only until you run out of resources. <S> Let's just consider hardware multiplies for now, since they will likely constrain the design. <S> For example, the largest Xilinx Spartan-6 (the value line) contains 180 multipliers; the largest Virtex-6 contains 2128 multipliers (and will probably cost tens of thousands). <S> These are 18-bit multipliers, but for the sake of argument treat them as abstractions. <S> The number of multipliers then gives you the number of multiplications you can do at one time. <S> If I understand the problem right, the square root of that number gives you the dataset that can run in one clock cycle. <S> In practice there are add/subtractions to worry about, the required precision will lower the amount of multiplies you can do, and the connections you'll need to make across the FPGA fabric will be very dense. <S> All of these factors lower the maximum speed you can clock the FPGA at. <S> Plus you have to get the data in and out of the FPGA. <S> Thus my gut feeling is that this is not a 'killer app' for FPGAs. <S> Conventional processors and GPUs are probably a better bet. <S> (See R+GPU .) <A> You're misunderstanding or misrepresenting the definition of \$O(n^2)\$ - Anything which can be done in parallel can be made \$O(1)\$ for a small, finite value of \$n\$ by implementation on a multi-core CPU, graphics card, FPGA, or networked supercomputer array. <S> Let's work through your example of calculating covariances of stocks. <S> There are approximately 3500 stocks on the NYSE <S> right now, so let's build the system to support 4096 items. <S> On a single-core CPU, that would require \$\left(2^{12}\right)^2 = <S> 2^{24 <S> } \approx 16,000,000\mbox{ }\$ calculations (Which is not a lot of time, consider that a 4GHz CPU can do that 250 times per second), because the algorithm is \$O(n^2)\$, as stated before. <S> If you had a 4096-core CPU, ignoring inefficiencies, you could do this in 4096 instructions. <S> You've simply divided the number of operations by the number of parallel cores on which to do the operations. <S> If you had an FPGA algorithm that could calculate the covariance of 4096 items simultaneously, and room on the FPGA to assemble 4096 of these blocks, you could theoretically calculate the covariance of 4096 or fewer items in a single operation. <S> That doesn't mean that the algorithm is now \$O(1)\$, it means you've divided \$n\$ by \$2^{24}\$. <S> The algorithm is still \$O(n^2)\$. FPGAs are great for some tasks, but they're not magic. <A> Yes, if there are no data-dependencies, then it should be an easy speedup. <S> But it'll be an easy speedup to any other kind of parallelism (such as using the GPU or SSE) <S> and you'll probably find that they can beat an FPGA in most applications for that. <S> For sufficiently large problems you might be able to build a lower-power or higher-throughput implementation in FPGA, but don't forget to factor in the power and time required to get data sets from a processor to the FPGA and get the results back again. <S> One place FPGAs <S> can get spectacular speedups over other implementations is when there's lots of parallelism <S> and you know lots about how memory accesses are patterned and a processor cache controller can't "see" those patterns. <S> You can take advantage of this to schedule memory accesses to ensure that the memory bus is never idle (or flushing things it's going to need in the near future)
|
Yes, these can be done in constant time on an FPGA, but only for a value of \$n\$ limited by the number of gates in your FPGA.
|
Why are pull up resistors more common than pull down resistors? I noticed that pull up resistors are much more common than pull downs, why? For example, the Arduino's MCU has internal pull ups but these tend to invert the physical logic of things you are working with (such as working with switches) whereas a pull down resistor would do the same job and avoid the logic issue. <Q> TTL has a threshold between low and high that is closer to ground than to the positive rail, so it is better when the stronger transistor pulls the output down against the relatively weaker resistor. <S> In general ground is presumably a better (e.g. more stable) reference voltage than a power rail. <S> You can use open collector/drain outputs as voltage converters, if you connect the resistor to the positive rail of the target voltage. <S> The ancient resistor transistor logic even used this as its working principle throughout. <S> That said, some microcontrollers have configurable internal pull-ups and pull-downs, <S> e.g. the NXP LPC1xxx. <A> This stems from the TTL era. <S> Floating TTL inputs are seen as high, no pull-up needed. <S> So you could just connect a switch between the input and ground. <S> Later, with the advent of CMOS the switch position was kept, but the floating input (switch open) left the input undefined, so a pull-up was added. <A> There are a lot of open-collector and open-drain outputs, which require a resistor in order to drive logic inputs. <S> These almost universally switch the output to ground; I'm not sure if there are any open-drain type outputs that pull the output to the positive rail. <S> Besides, given the choice, ground is the better rail to pull to, since it's conventionally the voltage reference for the rest of the circuit. <A> We can take a high impedence point to logic 1 <S> (Say it is 5V) by just pulling it up (possibly through a high impedance) to VCC. <S> But pulling dowm the same point may not make the point to GND potential. <S> A good quality zero logic means that it has low impedence sinking capacity. <S> Suppose you made a switch using an NPN transistor, and the base is pulled up. <S> And now you have a logic circuit, which has an input and a single output. <S> Here you can never turn off the circuit using a pull down resistor, you can turn the switch off only by directly connecting the input terminal to GND.So we can't say a pulled down terminal is logic ZERO. <S> But finally it depends on the type of logic that we use.
|
Also, if you're not driving a logic input but switching a load current, any resistor present has more to do with limiting load current than with pulling up a voltage.
|
LED lighting with incandescent spectrum? Is there any reason why they don't produce LED lights with a spectrum closely matching that of an incandescent bulb. Incandescent bulbs produce a nice warm light, while LEDs (even warm white ones) produce a kind of harsh light. I think it should be possible to mix several LED dies (maybe 5-10) together to build up a spectrum closely matching an incandescent spectrum. <Q> Better is coming. <S> Better costs money. <S> Present white LEDs usually use a single phosphor so you get two broad spectrum peaks - one from the direct light from the blue LED itself and the other from the yellowish phosphor. <S> In their recent PAR60 alternative LED bulbs (60 Watt mains replacements) <S> people like Philips are placing the phosphor on a "globe" outside the LED and are using multiple phosphors to get several overlapping emission peaks and a better overall spectrum. <S> The standard measure of the "goodness" of the white from a light source is "CRI" = colour rendering index. <S> This is essentially a measure of how well a range of test colours appear when illuminated with the test light compared to illumination with "white" light. <S> A CRI of 100 is "perfect". <S> CRI of >= 90 is very good. <S> CRI of 80 - 90 is bearable for many purposes. <S> CRI of 70 - 80 is definitely getting poor in most cases <S> *. <S> CRI < 70 - they usually won't tell you. <S> I say "in most cases" as I have some LEds with a CRI in the 70-80 range but most people (and me) find the light very nice <S> indeed Spectral peaks in multiphosphor LED. <S> Usually you get blue plus one other. <S> Multiphosphor LED chromaticity diagram. <S> Excellent multiphosphor overview paper <S> PDF version Related technical paper <S> And again <A> Incandescent lights produce light by superheating an object that acts like a blackbody , which defines its emission spectrum. <S> This is why, to get a colored light, you have to filter the emissions down to just the desired color. <S> Light-emitting diodes, however, generate light by different physics. <S> To get an LED to emit light, you forward-bias the diode to excite the electrons in the junction's band gap. <S> These electrons will later return to their ground state energy level by emitting a photon. <S> Since the energy of a photon and its wavelength are directly related, the color of the emitted light is directly related to the width (in energy) of the band gap (i.e. the difference in energies between an electron's excited state and its ground state). <S> This band gap is set by the doping and chemistry of the semiconductor. <S> This is why LEDs generate pretty much one wavelength <S> (it's actually more of a Gaussian, because the band gap isn't exactly the same everywhere). <S> To get a wider emissions spectrum, you have to either use fluorescence (as in Russell's answer) or have multiple LEDs with different colors (Red-green-blue being the usual combination). <S> The really fun part, though, is that the chemistry wasn't there until the 1990s for full spectrum. <S> Up until the blue LED was invented, the shortest wavelength (highest frequency, highest energy) that the photons could have was around 550 nm, about yellow-green (commonly known as "green" LEDs in the 80's, now still known as "green" even though there are "true green" versions, based on blue LED chemistry, which are far better for mixing with red and blue to make arbitrary colors. <S> So it wasn't until blue LEDs became feasible that LED lighting made any sort of sense. <S> Thus, LED makers have an uphill battle: they are trying to approximate a blackbody spectrum with wide-band rare-earth fluorescence and narrow-band direct light. <S> I have seen a driver chip for RGB LEDs that is intended for backlighting purposes, though. <S> It allows the light composition to be adjusted as the LEDs age, to try to keep the light in line with a target color temperature, say 5000 K. <S> It will be interesting to see if this makes it into general use. <A> A warm white strip I bought recently definitely had a much lower colour temperature than the RGB strip I have (when set to equal intensity on every channel) but still nowhere near as warm as incandescent light - much closer in fact to fluorescent lights. <S> One interesting thing to note though, was that the 5 leds at each end of the strip must have been from a different batch of surface mount LEDs, as they were all much warmer than the rest. <S> In fact I would have been much happier if all of the LEDs had been of this type. <S> As another point of reference, I recently stayed in a hotel which used an LED strip for feature lighting and that also had a relatively warm light output, being warmer than the cold fluorescent lights in the room, but colder than the warm fluorescents.
|
You can currently buy LED strip lights in both bright white or warm white options.
|
Does this amplifier work with 5V? I'm using an Arduino to read an analog signal from an electret microphone.Here is the circuit: But I will be powering it with 5V from the Arduino, So would this work okay? Thanks! <Q> The critical part is the opamp. <S> The LM358 is not an RRIO (Rail-to-Rail I/O) opamp, which here means that the output voltage will be a few volts shy of the supply voltage, so don't expect it to go higher than about 3V. <S> So if you keep the amplification to a decent level (controlled by R5) this should work. <S> You can also set the virtual ground to 1.5V (halfway the output range) instead of 2.5V, by choosing R3=22k. <S> This will give you an output voltage swing of 3Vpp, instead of 1Vpp. <S> As an alternative to the LM358 you might use a rail-to-rail output opamp, like the LMV321 . <S> You can then leave R3=10k. <S> (Rail-to-rail input isn't required since the input stays around the virtual ground.) <A> Your basic topology looks OK. <S> Please fix the schematic to include the component values directly. <S> It's annoying and error-prone to have to look over at the side to see what value each component is. <S> Some comments on the circuit: Check the datasheet for the microcphone. <S> R1 should possibly be lower, especially with a lower supply voltage. <S> I didn't look up a LM358, but you have to make sure the opamp runs well from only a single ended 5V supply. <S> For 5V, you usually want a CMOS rail to rail input and output opamp. <S> Microchip makes some nice ones for that voltage. <S> The MCP602x might be a good choice. <S> You should add a cap to ground at the opamp positive input. <S> You want this to essentially be a DC level close to 1/2 the supply voltage. <S> Your DC level is right, but as you have it now it will also get 1/2 of the noise on the supply. <S> A 1µF cap to ground will squash most of the noise nicely. <S> R2 is too low and will load down the microphone output too much. <S> You therefore won't get the gain you expect. <S> Use a lower R1 (check microphone datasheet) and a higher R2, <S> then R5 about 100 times R2 to give you a top gain of 100. <S> If you want more gain, use a additional gain stage. <S> Don't try to make this single stage give you more than 100x voltage gain. <A> Keep in mind that the gain for this circuit shifts your frequency response slightly, it's only about 15hz but feels a little sloppy. <S> The microphones I use generally require a much higher gain. <S> [EDIT] <S> Also, if there's no additional stages remove the cap to the next stage or You'll only be able to measure half the signal as it swings around vcc/2 and the cap removes the dc component.
|
On the lower side there's no problem, the datasheet specifies an output low level of 5mV typical.
|
How are Sensors Interpreted by the Microcontroller? I've always wondered this, how exactly are sensors interpreted by/for the microcontroller?Like lets use an example of a Heat Sensor...how exactly is something like say.....an Arduino interpreting the data? I mean using a LM35 Precision Centigrade Temperature Sensor which is pretty common but small at the same time. <Q> I'm not familiar with the Arduino, but in general microcontrollers interface with a sensor in one of two ways -- either as a voltage (using the ADC for input) or via a serial bus such as I2C or SPI. <S> The LM35 outputs a voltage proportional to the temperature in degrees Centigrade, so you would interface its output to the ADC input of the Arduino. <S> The raw output of the LM35 is 10 mv/degree C, <S> so 2 degrees <S> C would be 20 mv <S> , 100 degrees <S> C would be 1 volt, and room temperature (22 deg C) would be 0.22 volts. <S> Assuming a 10-bit ADC with a reference voltage of 3.3 volts, 0.22 v would be represented as 0.22/3.3*1024 or a count of 68. <S> Note that you are not using very much of the range of the ADC, even at 100 deg C. <S> You could increase the voltage of the LM35 by adding a rail-to-rail op-amp with a gain of 5 which would allow you to measure 0 to 65 deg C and use the full range of the ADC. <S> 0 deg would still be 0, 65 deg C would be 0.65 <S> *5/3.3*1024 or a count of 1008, and 22 deg C would be 0.22 <S> *5/3.3 <S> *1024 or a count of 341. <S> In order to measure temperatures below 0 deg C with the LM35, it would be necessary to provide a negative bias to the output (see the LM35 datasheet for details). <A> For a microcontroller to act on a signal, it has to be turned into a sequence of numbers that represent the signal. <S> That produces a number proportional to the voltage every time it does a conversion. <S> Most microcontrollers have A/Ds built in. <S> Small cheap micros may have 8 bit A/Ds, 10 bits is quite common, but 12 bits isn't too unusual either. <S> After that, it gets difficult to construct the A/D accurately enough with the same process used to make the digital microcontroller. <S> Past 12 bits therefore usually requires external A/Ds that interface digitally to the micro, such as via SPI or IIC, or less commonly today a bunch of parallel bits. <S> Once you have the analog signal represented as a sequence of numbers, you can apply all sorts of techniques to it. <S> In fact, this is specifically what DSPs (digital signal processors) are optimized to do. <S> Ordinary micros can do this too, but are slower at performing some of the fancy filtering operations. <S> They are generally used in control applications as apposed to signal processing applications. <S> For example, a micro might convert the voltage from a temperature sensor to a number in it's A/D, then use that number to decide how hard to run a fan. <A> Some temperature sensors output a voltage that can be fed into an ADC (much as tcrosley has suggested ) but there are also devices with digital interfaces (e.g. DS18S20 which boasts a 1-wire digital interface) that return the temperature in degrees Celsius. <S> A Google search can provide multiple tutorials about interfacing the DS18S20 with an Arduino.
|
Most commonly, the signal is a voltage and it is periodically sampled with a A/D (analog to digital converter).
|
Homemade printing and soldering for small components.. the best way Which is the best way to solder small components such as SOIC or QFP44 packaged components to a PCB without using adapters? And how can I manage to print PCBs with small track distances and widths for those type of packages? <Q> Tack down two opposite corners ensuring that the chip is correctly positioned, apply plenty of jelly flux, put a small blob of solder on a medium tip and drag it along each row of leads. <S> Remove any solder bridges with desoldering braid. <S> I use a mini-hoof cartridge with my Metcal system which is specifically designed for drag-soldering. <S> I often make my own PCBs at home using the photo-etch process; the UV exposure unit cost me about £20 to make, and I print the transparencies on my HP inkjet printer. <S> I don't have any problems with fine-pitch devices, and can go down to 8/8 mil track/spacing. <S> I normally use 10/10 or 12/12 mil, though. <A> You can make your own Reflow oven from a small Toaster oven, and something to control the temperature. <S> There are many sites on the net where people have documented their attempts. <S> As for the production of the boards - I wouldn't recommend trying to make your own. <S> I assume you mean with the toner-transfer method... <S> Having tried myself and had poor results I wouldn't recommend even bothering to try it. <S> Firstly, getting the heat just right so the toner transfers well without it blurring and blending with the neighbouring tracks is almost impossible at those distances. <S> Also, you need a very good high resolution laser printer in order to get the detail levels. <S> Secondly, you really really really require a solder resist mask, which you won't get when you make it yourself. <S> Without that you'll just end up with a homogeneous blob of solder instead of a nicely soldered line of pins. <S> For TT board production I rarely go below 20/20 (20 mil track width and 20 mil track spacing), and never below 15/15. <S> Even then I sometimes get problems. <S> Of course, you could always invest in the equipment to do <S> Photo Resist etching - <S> but that's not cheap and only worth it if you're going to do quite a few boards. <S> Personally I like to use a service called "Go Naked" from Spirit Circuits here in the UK. <S> They will create a professional prototype board for you free of charge, but with no solder mask or ident layers - just the tinned copper tracks. <S> It's pretty good for testing things or making a one-off to try out an idea. <S> It can be a bit of a pain not having the solder mask layer though, and I tend to paint the critical areas with liquid latex (under the name of Multi-Core Solder Resist Mask - price about £10 per 250ml bottle) to make soldering easier. <A> I'd go buy a hot air rework station, like the one reviewed here: http://www.youtube.com/watch?v=vva2t21sOAs <S> The rework station is an absolute must-have if you plan on doing anything with SMD <S> and you can do a lot of assembly using one. <S> An IR oven is nice to have if you plan on producing several PCBs, but you can't do rework with one. <S> Unless you are in a hurry, then forget all about making PCBs yourself, order some from China in stead, it's much higher quality than what you can do yourself <S> and it's really cheap these days. <S> See this page for a description of what you can expect and a link to the webshop: https://github.com/dren-dk/HAL900/wiki/Quirks-of-PCB-manufacturing-at-ITead <A> SOIC packages can be soldered with out the need of any special soldering equipment. <S> http://murlidharshenoy.wordpress.com/2009/10/17/diwali-project-led-luminaire/ <S> For finer pitch packages try the Hot plate technique. <S> This blog has good instructions on how to solder Finer pitch packages http://kennethfinnegan.blogspot.com/2010/12/soldering-goodfet-31.html
|
Drag-soldering works very well for me. For the soldering of those type of components you either want a Hot Air Rework station (a small hot-air blower that gently blows air at hundreds of degrees C) or, ideally, a reflow oven.
|
How do you build a machine in a solid block? I'm aware that a number of mass produced electronics are embedded in a solid thermal resin of some form. How reasonable is that for the home hacker?What materials are used?How do you do it?Are there resources and examples available on the topic?What are the pros and cons of such a project? <Q> It is called "potting" electronics. <S> The electronics are constructed as normal, and then potting compound is poured in. <S> This then sets hard and leaves what you see. <S> It's extremely feasible to do at home, all you need it some form of container to hold the resin as it sets, and this is normally the enclosure. <S> Do make sure the enclosure can't leak through! <S> Potting electronics helps with a number of issues. <S> If the electronics are going through shock or vibration it helps keeps the components on the board and functional. <S> It will help somewhat with moisture, although if the water is in the air, it has a tendency to get between the board and the potting compound, and then get held there. <S> If you have high power components, potting compound will increase the temperature as it doesn't conduct heat away as well as air, as well as losing any airflow. <S> As the compound sets, it does tend to get quite hot, so make sure your components are up to this. <S> Most are, but I have had some sensitive components like sensors break. <S> There is also outgassing. <S> As you pour the compound in, there is a tendency for bubbles to form, which will become voids in the potting. <S> The best way to remove this is to place the enclosure being potted in a vacuum chamber which forces the bubbles out, but <S> at home I'm sure pouring slowly would suffice. <S> There are plenty of places that carry potting compound, and examples from Farnell would be: Dow Corning Elastomer - which is an elastomer so is slightly springy. <S> Also easier to rework if needs be. <S> Very expensive though! <S> Electrolube Potting Compound - is a more traditional potting compound and sets very solid. <A> It's called potting compound and it comes in a liquid form. <S> You usually put the assembled board into a thin walled box and then pour in the potting compound and let it set. <S> You can buy packs from electronics suppliers, they usually come in two bags which need to be mixed to activate them. <S> The cons are: impossible to service the product, need to mask off connectors, messy, can crack if one component gets <S> too hot (professional potting includes coating some components in a rubbery compound first to allow for expansion), adds weight, makes recycling the components virtually impossible (European WEEE directive). <A> I've tried this using E6000 <S> which seemed to work well for my application and was cheap and available.
|
It is a reasonable activity for the home hacker but we aware that it is messy and the potting compound leaves permanent stains in clothing. The pros are: prevents physical tampering with the product, waterproofs, reduces effects of shock and vibration, distributes heat evenly.
|
How does this capacitor work in this schematic? So I'm looking at an AVR Programmers and setup and I see this schematic: How exactly does this work? (Keep in mind I'm a newbie at schematics), but the way the schematic looks makes it seem like that a separate 22pF capacitor should go on each side. Is it because ceramic capacitors have no polarity, you can just put them in between? Am I missing something here or just being stupid? The schematic makes it seem like there should be 3 things where the one blue (what seems to be a capacitor is). <Q> I agree with what Steven said, but want to add a few things. <S> Ceramic resonators look electrically very similar to crystals. <S> The main differences are: Resonators are cheaper than crystals. <S> This is the primary reason they are used over crystals, especially in high volume applications. <S> For one offs, the difference is small and therefore irrelevant to hobbyists and anyone doing small scale builds. <S> Crystals are more accurate, which is the primary reason they are used over resonators. <S> Resonators may be accurate to 1% or 1/2%, but that's still way more slop than the 50 ppm even a cheap crystal can do. <S> Note that 1/2% is 5000 ppm. <S> Crystals good to 20 ppm are readily available and not much more cost than 50 ppm. <S> 10 ppm is available, usually at a premium. <S> Temperature controlled crystals can be good to around 1 ppm. <S> Resonators are mechanically more robust. <S> They can take more shock and vibration than a crystal can. <S> Resonators are preferred in automotive applications, for example, for this reason. <S> Resonators usually require a little higher drive to operate than a crystal. <S> Either is still well within what CMOS circuits can do, so this is not a reason to chose one over the other except in very low power applications. <S> But, it is something to consider when using a resonator. <S> Some microcontrollers, for example, have several different drive levels the crystal circuit can be set to. <S> A resonator may need one level higher than a crystal of the same frequency. <S> Added: I meant to say this before but got distracted. <S> The schematic above is missing the bypass capacitor. <S> This may seem unimportant, but it's not. <S> You should solder a 100nF to 1µF ceramic cap accross the power and ground pins of the chip right under the socket. <S> The loop from chip thru cap and back to chip should be as small as possible. <S> Various flaky things may happen without this capacitor, even if it appears to be working. <A> AngryEE is almost right: most ceramic resonators have their capacitors integrated. <S> You can tell if they have their capacitors integrated by the number of pins. <S> If the caps are integrated the resonator will have 3 pins: one connecting to pin 9 of the controller, one connecting to pin 10, and one (the middle pin) connecting the 2 capacitors to ground. <S> A resonator without the caps will have only 2 pins. <S> A ceramic resonator is often used instead of a crystal to save cost . <S> It's less precise and less frequency stable than a crystal, though. <S> Like Russell says resonators are more shock and vibration <S> resistant than the more fragile crystals. <A> You're right to be wary—very confusing situation here. <S> What you might have there in that blue blob is not just a crystal but a 'resonator'. <S> A resonator is a crystal with the load capacitors built in. <S> So the two caps and the crystal are all contained in the blob and the blob has three pins—two clock and one ground.
|
What appear to be three separate components in the schematic is one ceramic resonator .
|
Diode substitution in power supply Can I substitute 3A diodes in a plug in power supply for 2A 50V diode? Should I replace all 4 in the bridge? It's a 15VDC 1300mA power supply. <Q> You do not need to replace all four, however two or more diodes may be bad in that bridge. <S> The safe bet would be to do all four. <A> As long as the replacement diodes have at least the same voltage and current rating it should be fine. <S> Diodes have other parameters too, but in this case they won't matter. <S> It will be fine to replace the 2A 50V diode with a 3A 50V (or 100V or even 400V) diode. <S> You only need to replace the broken one. <A> It's safe because the bridge rectifier only sees rectified line frequency. <S> If the diode was being used elsewhere (a high-speed rectifier in a switching power supply, for instance) <S> other parameters like capacitance and reverse recovery time become critical, making substitution much more difficult.
|
No problem replacing the 2A diode with 3A if the PIV rating is the same or greater as in the original, 2A 50(piv). There is no issue of matching in this case.
|
What is a good communicaton device among teensy and arduino besides "XBees" I have been using XBees to communicate my teensies so far.However, as you know, XBees are really expensive and when I want multiple devices to communicate with each other, I have to pay for several teensies + several XBees, which come up to be more than 200 dollars. Also, An XBee is for between two designated teensies. I want all of my teensies to communicate with each other Is there any communication device out there that I can hook up to multiple teensies or arduinos at once without buy as much XBees? Or what is a communication device that lets everything within the range to communicate with each other? Or any other way to let them communicate without using individual teensies? If you can answer any of them, please help me out!! <Q> What about using 'dumb' rf transceivers and building a protocol on that? <S> RFM12Bs or even something cheaper. <A> I would look into using other wireless modules. <S> XBees are nice, but are indeed expensive. <S> I posit that you probably aren't using all of the options they provide in your projects anyways. <S> Things like mesh networking are AMAZING, but aren't usually strictly necessary for most projects. <S> A very cost effective option, while still retaining some error checking, is to use IC's by Nordic, esp. <S> the nRF24 series. <S> There is an excellent arduino library for these modules that most likely can be ran on the Teensy with minimal adaption, especially if you are using the Teensyduino. <S> This library also allows for some mesh communication (obviously not as robust as the XBees); see here (http://maniacbug.github.com/RF24/starping_relay_8pde-example.html). <S> If you order non-amplified versions of these modules, they can be had for under $7 per module. <S> Here are some for $5.50 each .Amplified <S> versions are in the range of $15-$20, so <S> if node to node distance is greater than about 40 ft the cost effectiveness compared to XBees goes down dramatically. <S> It all depends on your usage. <S> From the same store that had the cheap Nordic modules, there are some cheap bluetooth modules that might be worth looking into; these have caveats in that they are meant to be connected to by a computer (a master unit) rather than each other (slave units). <S> You can buy a master Bluetooth module for about $20 from ITeadStudio though. <S> Then your cost is much lower per unit, around $25 instead of $25 + $16. <S> See "Building Wireless Sensor Networks: with ZigBee, XBee, Arduino, and Processing" by O'Rielly for more details. <A> I use the HopeRF RFM12B transmitters. <S> They are the same ones used in Jeenodes, and there are already communication libraries from Jeenode that work just fine with any Arduino-like board. <S> They are substantially cheaper than the Xbee. <S> They also come in both 3.3 and 5v versions, which can communicate between each other. <S> I believe the manufacture has discontinued the 5v ones, but you can still find them around. <S> The only thing I don't like about them is the 2mm pin spacing, since you can't just drop them into a bread board or strip board. <S> However, if you do try using them, I recommend getting some laptop IDE cables - they have 2mm spacing and can be cut to fit the RFM12 nicely to use it in a breadboard. <A> The router has a USB for connection to the teensy and is a full WiFi router. <S> You can load DD-WRT on it. <S> An example config . <S> And, as a bonus, the router will power your teensy through the USB connection. <S> Downsides: it's much larger than an xbee module or similar.
|
Alternatively, the XBee CAN be used without a microcontroller for simple sensors and other uses. You can often find a rebate program to bring the net price to $30 or so. I use the Asus WL-520GU WiFi router with USB.
|
12 bit vs 14/16bit ADC for ph sensor interface I am making a ph probe interface board for a project. What resolution ADC would you recommend? I am definately going with at least 12 bit, but is it worth it to go with any higher resolution? What are the implications of using higher res? Does the input need be more stable? Obviously the cost is higher, but am I gaining anything to begin with? Would noise be too high for the extra resolution to be useful? Are there any ADC's/ic packages that can directly read the small signal voltage from the ph probe(differential) and perform any gain/buffering of the signal as well as perform the digital conversion? Otherwise, I need to design this with opamps. Any recommendations in terms of design for this? <Q> Like JustJeff says, if you design your circuit for a pH range of 6 to 9 you have a resolution of better than 0.001 in 12 bits. <S> If you want the full pH 0 to pH 14 range your resolution will be \$ \dfrac{14 pH - 0 pH}{2^{12}} = <S> 0.003pH <S> / <S> LSB \$ <S> You can achieve 0.001pH by using a 14-bit ADC. <S> But it's important to draw a distinction between resolution and precision . <S> Example: a digital fever thermometer which you can buy for less than 10 euro. <S> This gives a reading with 2 decimals, like 36.87°C. <S> But is that also the precision? <S> In other words, is the "7" correct? <S> No it isn't. <S> It's even possible that the accuracy is worse than 0.1°C. <S> The same goes for a pH meter. <S> You can have a reading with 3 decimal digits, but don't expect this to be the precision, think about the quality of other electronic parts. <S> edit Also keep temperature compensation in mind. <S> Temperature variations will cause the pH to change, and also change your probe's reading. <S> Unless you have a highly accurate temperature reading it's no use going for better than 0.01pH precision IMO. <S> Good temperature measurement isn't a sinecure in itself. <S> This site says "[The] temperature error is very close to 0.003 pH/°C/pH unit away from pH7." <S> So at pH 10 a temperature variation of 1 <S> °C will result in a reading change of 0.01pH. <A> As Steven already showed, 12 bits is plenty if the 0-14 pH range is covered linearly. <S> If the signal from the pH sensor is not linear, then you have to find the resolution at the part of the range where it changes most slowly as a function of pH. <S> However, here is another idea. <S> For slow low level signals like this, it can sometimes make sense to use a really high resolution delta-sigma <S> A/D. <S> These are available in 20 bits and more. <S> They trade off speed for resolution and are not that expensive. <S> A typical conversion time might be 15-20 mS, for example, but that should be plenty fast enough for something like a pH signal. <S> The advantage is that this reduces and in some cases eliminates the need for amplification circuitry with its inherent gain, offset, and drift errors. <S> For example, I've done thermocouple measurements with just a little passive filtering in front of a delta-sigma A/D. <S> I understand pH probe signals are high impedance, so you will need at least some buffering. <S> You haven't characterised the pH sensor output, so I can't tell if a high resolution delta-sigma A/D is appropriate in this case. <A> Note: <S> standard pH calibration solutions are NIST to +/- <S> 0.01 <S> pH. few standard meters read better than <S> 0.02 pH (might output the 0.01pH number but look in the manual) and if you're using a standard pH sensor probe (glass bulb) there isn't a man alive who will have much faith in anything you claim tighter than 0.02pH without a very massive proof detailing your calibration solutions for the entire system (not just 2 or 3 calibration points) as well as your gage R&R in the same report. <S> That being said, anything closer than 0.01pH is likely measurement error in the probe and wouldn't even be useful for analyzing drifts. <A> Especially the last digits become non-saying. <S> You could calibrate your pH sensor, but that costs time and you need reference measurements to do that (i.e. get liquids you know are exactly a pH value and make a reference measurement with an already calibrated device). <S> The only reason I could see a high bit ADC is remotely useful in if you want to see small very drifts in pH without losing your Dynamic Range. <S> This is only useful if the noise floor of your system (from sensor to ADC input) is not exceeding that of your ADC. <S> I have no idea what the noise level of your pH sensor is. <S> Maybe you can refer to the datasheet (if it's mentioned at all). <S> You could use oversampling to reduce the noisiness of your signal, but then your output sampling rate goes down (or you need to get a faster converter/processing unit!). <S> This only makes life more complicated. <S> Furthermore, temperature drifts may be a huge factor as stevenvh pointed out, not only from your sensor but also from the electronics. <S> But as I said, if you know temperature is a constant factor in your measurements you can see relative changes more accurately. <S> About actual ADCs: There are differential ADCs with PGA. <S> PGA stands for Programmble Gain Amplifier. <S> You can amplify the signal by certain factors, like 1x, 8x, 16x or even more. <S> It depends on your pH sensor whether you can easily amplify the region of 6-9pH.
|
Unless the output is highly non-linear, a 12 bit A/D is probably good enough and is certainly attractive because you can get that built into a microcontroller. Precision is hard to obtain when you're getting very high resolution.
|
Call Serial.print in a separate tab/header file I'm writing a program in Arduino 0022. Calling Serial.println works fine in my main sketch code, but when I attempt to use it in my header file " Menu.h ", which is in a separate tab, I get an error: In file included from AppController.cpp:2: Menu.h: In constructor 'Menu::Menu()': Menu.h:15: error: 'Serial' was not declared in this scope How can I use Serial.println outside of sketch code? <Q> You should not be calling functions from within header files. <S> Header files are for defining pre-processor macros (#define) and references to variables / functions in other files. <S> You should be creating multiple C files and linking them together at compile time. <S> The header file is used to tell each C file what functions and variables the other C files have. <S> To use multiple files in the Arduino IDE you require at least 1 header file to describe the functions that are in the other files that you want to share between them. <S> Also, any global variables that you want to use across all files. <S> These definitions should be qualified with the "external" attribute. <S> Then you need to add one or more "pde" file which contains the actual code and variable definitions for the functions. <S> For instance, I have a "mouse.h" file: extern void <S> mouse_read(char *,char *, char *) <S> ;extern void mouse_init(); and a "mouse.pde" file: #include <ps2.h <S> > <S> PS2 <S> mouse(6,5);void <S> mouse_read(char <S> *stat,char * <S> x <S> , char *y){ mouse.write(0xeb) <S> ; // give me data! <S> mouse.read(); // ignore ack *stat = <S> mouse.read(); *x = mouse.read(); *y = mouse.read();}void mouse_init(){ mouse.write(0xff); // reset mouse.read(); // ack byte mouse.read(); // <S> blank <S> */ <S> mouse.read() <S> ; // <S> blank <S> */ mouse.write(0xf0); // remote mode mouse.read(); // ack delayMicroseconds(100);} Then in my main file I have: <S> #include "mouse.h" <S> and I can call the functions that are in "mouse.pde" as if they were in the local file. <A> You may need to # <S> include <Serial.h <S> > <S> in your class's implementation file to be able to call Serial methods. <S> I'd be careful about doing this thoug as there are obviously side effects to calling Serial functions (read in particular). <S> I prefer to define a method in my class that takes a char * and pass bytes from the serial interface into it from my main program, rather than having it interact with the serial interface directly. <S> #if defined(ARDUINO) && ARDUINO <S> >= 100 <S> #include "Arduino.h"#else <S> #include "WProgram.h"#endif <A> I found a way to have the Serial class/object declared in header files/tabs: <S> #include <WProgram.h <S> > // <S> at the top of the file <S> This doesn't feel super clean to me, but it doesn't seem to have any drawbacks yet.
|
As an alternative to @Majenko's very good answer, you could make a C++ class to encapsulate your functions and put it in the libraries folder as described in http://www.arduino.cc/en/Hacking/LibraryTutorial .
|
How to shift out 16 bits fast on arduino board I'm coding a system that need to shift out 16 bits fast from a uint16_t variable to two paired 74HC595 shift registers. I'm running the code on an Arduino (atmega328@16Mhz) and the shiftOut in the Arduino is way too slow. The librarys digitalWrite function is slow as well. The best idea I came up with is a for loop that loops through all the 16 bits of the variable and writes 1/0 to data pin, set the clock bit high as short as possible and then goes to the next bit of the variable. Is this the fastest solution and if so, how do I loop through a uint16_t variables bits in c++? <Q> If you're looking to use a software data transfer, you don't want to use the functions digitalWrite. <S> They are very slow, this is because they need to translate the pin number through a table to an actual register (PORTx), mask the right bit and change it. <S> All pins in arduino are mapped to numbers, while underneath they can belong to port A, B, C, and even more on the MEGA version of the Arduino. <S> It's much faster to directly modify the AVR registers. <S> Such as PORTB and a-like. <S> You indeed need to step through each bit. <S> I would create a for loop from 0 to 15 and do some bit shifting and masking. <S> Because I don't you know pinning configuration <S> I can't give an exact example. <S> However it will probably look very close to this. <S> With 'very close' I mean that this is untested. <S> void ShiftOut(UI16_t data){ // <S> Initialize <S> (you may want to set CLK to low) - as we're toggling later on. <S> // step from bit 0 to 15 for(UI08_t <S> i = 0 <S> ; i < 15; i++) { // <S> Check the content of this data bit // <S> Shift data <S> so this bit is LSB, and mask it with 1 <S> so we only look at this bit. <S> if ((data >> i) & 0x1 == 1) { // set data pin high, like PORTB <S> |= 1<<4; <S> // <S> when pin 4 of portB is your data <S> pin <S> // <S> Doing an OR will make pin B4 always high } else { // set data pin low, like PORTB &= ~(1<<4); // <S> Doing an AND with the inverse means all pins except B4 will be unchanged <S> } // <S> Generate clk to 'transfer' the bit: // <S> This can likely be done by using PORTB ^= <S> 1 << 5; (pin B5 in this example) <S> // <S> ^= <S> toggle // <S> Do this TWICE, so CLK goes high/low } // <S> as you're using a shift register, you may want to toggle LATCH pin as well..}To find out what hardware pin number (don't assume pin 4 is pin B4 or A4!) <S> you need to look at the schematic of Arduino. <S> I've ran a similar code on a PIC32 (runs at 80MHz). <S> The PIC32 was able to do this at about 1,5 MHz, but a few extra lines of code was running in main() to compute a new output. <S> Nevertheless, it can be done very quickly. <A> This is simple enough with the SPI library. <S> Connect your shift register input to the MOSI pin (Master Out, Slave In) - <S> Digital pin 11 - and you will have nice fast transfers. <S> There will be a very slight delay between the upper and lower 8 bits of each word transmitted. <S> For example: #include <SPI.h> <S> void begin() <S> { SPI.begin();}void loop(){ unsigned int val; val = rand()%0xFFFF; // <S> Generate a random 16 bit number SPI.transfer(val > <S> > 8); <S> // Output the MSB first SPI.transder(val & 0xFF); // <S> Followed by the LSB delay(1000); // <S> Wait a sec...} <A> I've never used an Arduino, but the online reference suggests there is an SPI library you can use. <S> If that doesn't suit your needs, you can look up the SPI peripheral in the ATMega datasheet. <S> SPI peripherals are usually fairly easy to setup and use. <A> I am old school, been coding since 100 kHz processors. <S> Use inline code for bit manipulation directly to the port, rather than a loop. <S> Loop requires overhead, inline is faster although takes more program space. <S> See AVR035: <S> Efficient C Coding for AVR for bit manipulation of the ports.
|
You need to use the SPI peripheral instead of doing the shifting in software.
|
What kind of chip can a person download sound from PC into What kind of chip or device can you use to download 1 minute of music or sound from your PC into it and this same chip or device will sound what you downloaded into it when connected to a small micro controller? <Q> They have many variants but the simplest ones require little more than the IC to record and playback and can be microcontroller or PC controlled or standalone. <S> The initial products had analog only interfaces, requiring recording f analog sound signals, but current offerings allow recording of either analog or digitised audio signals. <S> Data storage / recovery rate and compression methods can be varies across a wide range allowing quality/duration tradeoffs. <S> [I have used their ISD2500 devices in the past with good results. <S> I have not used their digital recording capable parts but expect them to meet their claimed performance specifications equally well.] <S> They say: Nuvoton's ChipCorder® is a complete, single chip solution for voice and audio recording and playback. <S> It is designed to offer the highest quality single-chip voice record/playback solutions for embedded applications. <S> Non-volatile and highly integrated, they are ideal solutions for adding voice prompts, alerts, interactive menus, and voice memos to consumer, industrial and security products. <S> Available pre-recording services make it easy to add voice to system design. <S> A good start to look at is their ISD15100 series with datasheet here Application example here: <A> Many open-source music players use a SD/MMC flash card or a CompactFlash card to store the music. <A> If you go the simple route and use uncompressed 8-bit PCM (.wav), a 1 minute sound byte, sampled at 8kSPS (max 4kHz frequency components), will have 60*8000=480000 bytes, or 468.75KB, of raw data. <S> On top of that you'll need some code space, stack space, and some data packaging overhead (wiggle room). <S> It will need a serial input capable of this download. <S> Keep in mind that at 115'200 bps this will take over 30s. <S> Finally, it'll need one or two pins with which to drive a speaker amplifier at 6kHz and more; two is better. <S> One could also use an integrated DAC, but it's not required. <S> With these rough requirements in mind, head over to Microchip's site, or whichever brand you fancy, and use their parametric searches . <S> It looks like the PIC32 family has a few 64-pin, 512KB monsters that'll fit the bill. <S> The real kicker is the memory -- without that requirement, nearly any 8-bit micro will do the job. <S> Consider external memory modules, such as davidcary 's Flash suggestion , to expand your options. <S> Other memory modules can be spied in Digikey 's IC>Memory section. <S> (Look at this little guy!) <A> You can make a cheap high quality playback system with a SPI flash memory and Audio DAC. <S> With slightly creative use of an SPI port and timer output on a small MCU you can stream the data from the memory to the DAC without it passing through the MCU.Choose <S> a DAC that has a DSP format option - this relaxes the timing requirements on LRCLK. <S> Realtime recording is not practical due to the flash erase/write times.
|
There are many sound and speech recording solutions, but amongst the easiest and most compact to use are the ISD ChipCorderIC's by Nuvoton .
|
Conducting plastic for capacitive touchscreens As I am disabled I have to use a headstick (see picture below) to do stuff on the computer. I also have a phone with a resistive touchscreen, which works well with my headstick. But here is the problem: I cannot operate any devices with capacitive touchscreens, since the tip of the headstick is made of plastic. I heard, though, of conducting polymers, and wondered if my problem could be solved using those. So basically I thought of just making a new tip of such a conductive plastic. What do you think about this approach? How expensive are these materials? What can yu say about their electrical properties vs. human skin? Would this be a good idea? Would something different work? Like putting a little coil inside the tip of the headstick? <Q> Instructables has a guide to making your own "iPhone gloves" . <S> Here, they use some conductive thread between finger and outer surface. <S> I assume you could do the same between your head and the end of the stick. <A> The tip is presumably made of plastic to prevent damage to the touched surface. <S> Butyl rubbers are available which are loaded with carbon-black to make them conductive. <S> A tip of such rubber with a conductive path may work. <S> You can mix carbon-black into various adhesives to make them conductive. <S> This may includes silicone rubbers and epoxy resins. <S> Conductive silicone rubber is liable to be non damaging. <A> As a quick experiment, a rolled up piece of metalized anti-static bag sometimes can work as a capacitive-screen stylus. <A> Capacitive touch screen systems react to a local change of capacitance on the touch panel. <S> Human finger as well as conductive material like a coin are working because electronic charges attracted by them. <S> Putting a conductive surface on top of an insulator (the touch screen cover is like an insulator) is making a capacitor, right? <S> The larger the better! <S> Remind this formula
|
What is important is not only the conductive property of the touching material, but also the size of contact area .
|
shooting object by using a DC motor This is not directly electrical, but I am working on making a real life version of a coin block from Mario. Basically I use an LDR and to detect if someone punches the block and then use a transistor to turn on a DC motor. The problem is that I want to be able to 'shoot' a coin up from the box using the motor, but I am not sure how I could achieve this. I have tried attaching some objects to the motor, which then hits a stationary coin, but that isn't very effective. In summary, I want to be able to use a motor to shoot a coin up against gravity, <Q> To shoot a coin, you need a fair amount of speed. <S> A DC motor will probably accelerate too slowly to achieve the required speed in such a short distance. <S> My advice would be to use something with less travel but more speed. <S> They typically travel less than an inch, but with a good current pulse, will kick pretty hard. <S> If you don't have enough current available, then you can charge up a large capacitor, and discharge it suddenly into the solenoid. <S> Alternatively, you can mount the coin on a spring which is held back by a little solenoid. <S> When you energise the solenoid, it pulls back a catch which releases the spring which fires the coin. <S> The down side is that you would have to re-set the mechanism each time. <S> (or you could use a motor to pull the catch). <S> Whacking the box pushes the coin into the wheels, which grip it and throw it skyward. <S> The downside to this is that you need to keep the power on to keep the wheels spinning, which is a bit of a waste. <A> How about a leaf spring underneath the coin, and the motor has an armature which presses against the end of the leaf to move it down. <S> Once the armature slips off the end of the leaf the energy is released causing the coin to fly upwards. <S> With some gearing of the motor you can get quite a lot of torque out of it, thus allowing a relatively stiff leaf spring to be used to give you a nice powerful flick. <A> Have you looked into an electric cordless nail gun? <S> These are standard nail guns that use electricity instead of compressed air to fire the nail. <S> It basically works like this: <S> There is a flywheel that is spun up. <S> Once the flywheel is at speed, some mechanism forces the nail in contact with the flywheel and it is then forced into the wood (or brain). <S> The diameter, weight, and speed of the flywheel is changed to match whatever the nail/wood is. <S> You could do something similar. <S> Have a flywheel with two posts or whatever sticking out. <S> There are two to keep the thing balanced. <S> A motor gets the flywheel spinning, and keeps it spinning. <S> When you want the coin to pop, a small solenoid drops the coin so it hits a post on the flywheel and gets launched. <S> Of course you would need some guides so the coin goes in the right direction. <S> Using this method you could use a relatively small motor to launch the coin. <S> And if you are inventive enough, you could auto-load the next coin and be ready to fire again in 10-ish seconds. <S> This would also work well if your coin was large (6 inches?) <S> or you needed it to go far (across the room). <S> The main disadvantage of this is that you have a flywheel spinning all the time, consuming power and making noise. <S> Another super easy approach is the slingshot method. <S> Basically you use some rubber band or surgical tubing to make a slingshot, then just have a simple solenoid to release the thing. <S> Super easy, good "firepower", low power consumption.
|
A solenoid can be used punch something pretty hard. Lastly, as David Kessner suggested, you could have a pair of counter-rotating flywheels.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.