source
stringlengths 620
29.3k
| target
stringlengths 12
1.24k
|
|---|---|
How do magnets affect the ATMega328? I'm building a small circuit with an arduino bootloaded ATMega328 chip. The project will be housed in a small box, and is intended to be stuck to the side of a fridge using a magnet. Everything in my brain tells me that magnets and chips do not mix well. What is the likelihood that the sketch loaded onto the chip will become corrupted, or that something else will happen as a direct result of the magnetic forces, causing the chip to cease operation/ operate incorrectly? <Q> Magnets cause problems with magnetic storage (hard disks, tapes, etc). <S> The AVR chips use flash, so won't be a problem. <S> Recently, I did some experiments with AVRs and hall effect sensors. <S> I never saw problems from being near magnets. <A> Joby hit it on the head as far as storage goes. <S> I would caution people experimenting with magnets and electronics (like reed switches) to be very wary of the filings that collect on powerful magnets. <S> You'll get nearly invisible shorts when an iron filing that collected on the magnet falls onto your chip, embeds itself in some leftover flux, and takes down your system. <S> Industry is worried about tin whiskers 10um in diameter and less than 1mm long - iron filings are just as dangerous. <A> Magnets cause damaged to hard disks and floppy disks (remember those?) because they misalign the domains and destroy the data. <S> However, if you happen to have long traces on your PCB and strong (especially pulsating) <S> magnetic fields, you could get induced voltage in these traces. <S> This could range from a tiny bit of additional noise causing no harm to damaging the microcontroller from a voltage spike. <S> This is only theoretical. <S> You'd probably need MRI-level magnetic fields to induce any significant voltage. <S> As you are using a fridge magnet I do not see any of the above being a problem.
|
Magnets will not usually affect the chip.
|
What are the .NET Micro Framework ready systems available? Once I heard of Netduino I began to wonder which other systems would provide the same features: Processor and Memory Micro .NET Framework ready USB interface Cheap Portable <Q> TinyCLR produces several different boards that support the .Net <S> Micro Framework, the most popular was once the Fez Domino , now deprecated and replaced by the Fez Panda II : FEZ (Freakin' <S> Easy!) is a tiny open-source board running Microsoft .NET <S> Micro Framework. <S> This means, you can write code with much more efficiency using C# programming language under free Microsoft Visual C# express. <S> Build your next projects in minutes by connecting FEZ Domino to one of the shields or the many available components. <S> Includes USB cable. <S> Many libraries are already included like FAT file system, threading, USB Client, USB Host, UART, SPI, I2C, GPIO, PWM, ADC, DAC and many more. <S> FEZ offers many features not found in Arduino, BASIC STAMP and others: <S> Based on Microsoft''s .NET <S> Micro Framework. <S> Runs on 72Mhz NXP ARM processors. <S> Supports runtime debugging (breakpoints, variable inspection, stepping, etc.) <S> Use Visual C# 2010 Express Edition for development. <S> Advanced capabilities like FAT, USB device and USB host. <S> Easily upgrades to hardware such as EMX . <S> Open source hardware design files. <S> Use existing shields and holder boards. <S> Based on the USBizi chipset (ideal for commercial use). <S> FEZ Mini is BS2 pin-out compatible with extra I/Os. <A> Complementing "O Engenheiro" answer: GHI EMX US$ 299.95 72 MHz 32-bit ARM 7 <S> Processor <S> 16MB RAM and 4.5MB FLASH <S> 320 <S> x 240 3.5" TFT Display with touch screen. <S> RJ-45 Ethernet connector. <S> GHI WiFi-Expansion compatible. <S> Standard JTAG connector (only available for GHI partners). <S> TFT signals exposed. <S> GPIO signals with interrupts exposed on 0.1" header pins with on-board pin descriptions. <S> 2 SPI Master bus (8/16bit). <S> I2C interface. <S> 4 exposed UART (serial ports), one RS232 interface with hardware handshaking. <S> 7 analog inputs (ADC), 2 are used with touch screen. <S> 1 analog output (DAC). <S> 2 <S> CAN interfaces, CAN 1 is connected to CAN PHY with 9-DSUB interface. <S> 6 PWM signals. <S> One-wire interface support SD/MMC card connector with spring. <S> USB Device port USB Host port XBee module socket. <S> UEXT interface for easy expansions such as GPS, MP3 decoder or 3-axis accelerometer. <S> Real Time Clock backup battery. <S> LEDs and push buttons. <S> On-board Piezo. <S> Powered by USB or <S> DC power (input 6 volts through 2.1mm power connector). <S> Tahoe-II <S> US$ 399.00 Meridian CPU (ARM920 @ 100MHz) 8Mbytes SDRAM and 4Mbytes <S> Flash 3.5” Landscape TFT LCD with touch-screen <S> 9 user input buttons RS232 serial (DB9) USB Function Ethernet Accelerometer, with support for event notification including free-fall detection SD Card interface Temperature sensor and <S> 2x ADC channels Interface for XBee <S> wireless module (and additional ADC channels if fitted) <S> PWM output Expansion connectors that expose GPIO, I2C, SPI and UART <S> signals <A> I'll also post about Netduino US$ 34.95 , <S> a open source platform Processor and memory Atmel <S> 32-bit microcontroller <S> Speed: 48MHz, ARM7 Code Storage: 128 KB RAM: 60 KB digital <S> i/ <S> o <S> features <S> all 20 digital and analog pins: <S> GPIO digital pins 0-1: <S> UART <S> 1 RX, TX digital pins 2-3: UART <S> 2 RX, TX digital pins 5-6: PWM, PWM <S> digital pins 7-8: <S> UART 2 RTS, CTS <S> digital pins 9-10: PWM, PWM <S> digital pins 11-13: SPI MOSI, MISO, SPCK <S> analog pins 4-5: I2C SDA, SCL <A> Tahoe 2 GHI EMX <A> Here's a recently announced system. <S> It may not be available for purchase yet . <S> The .NET <S> Gadgeteer http://research.microsoft.com/en-us/projects/gadgeteer/gadgeer_modules.png http://research.microsoft.com/en-us/projects/gadgeteer/gadgeteer_example.jpg
|
FEZ Domino is Arduino pin-out compatible with extra I/Os.
|
Are watts usually measured in watt-hours? Pardon me, I'm a total newb to electronics. My question is, when a device is measured in watts, such as a 60-watt light bulb, is this ALWAYS supposed to be assumed to be watt-hours, i.e. 60 watts per hour? <Q> Energy is an amount, while power is a rate at which energy is used. <S> Energy is measured in watt-hours (W·h) or joules (J). <S> Watt-hours are like buckets, and watts are like buckets per hour. <S> If you have 5 buckets of energy and you pour one bucket per hour, you'll be able to pour for 5 hours before you run out. <S> If you turn on a 60-watt light bulb for 1 hour, you have used 60 watt-hours of energy. <S> If you use it for 2 hours, you have used 120 watt-hours of energy. <S> If you turn it on for only 1 minute, you have used 1 watt-hour. <S> It's a little confusing since the "per hour <S> " is inside the term "watt", so to make the rate into an amount, you need to multiply by a time unit to cancel it out. <S> It would be a lot more intuitive if we worked in kilojoules and kilojoules per hour. :) <A> One point not yet mentioned: a 60 watt bulb will use 60 watt-hours per hour, or 60 watt-seconds per second, or 60 watt-microseconds per microsecond, or 60 watt-centuries per century. <S> In other words, the "watts" part of the bulb's power usage has nothing to do with hours or any other unit of time. <A> The concept of 'Watt-hours' as Watt x Hours will be confusing to someone who cannot conceptualize Watt - being 'enegergy used per amount of time'. <S> I sometimes try to explain this using more familiar concepts: If we use the term 'Keem' in stead of 'km/hour', one could use 'Keem-Hour' to describe distance travelled - going 60 Keem for half an hour means you've travelled 30km as 60 x 0.5=30 Just like a rental company that's interested in the distance your travelled in their car, the energy company is interested in the energy used - they will charge you per Watt-hour. <S> If a Watt-hour costs 1c, it will cost you 60c if you leave a 60 Watt lamp on for one hour. <A> Stimpy, the power rating tells you the rate at which the device consumes energy. <S> So yes, a 60-Watt bulb will consume 60W*h or 0.06kWh of electricity in one hour. <S> Watt-hours measure energy consumption. <S> There is a simple little page here <S> that shows some calculations. <S> I would also strongly recommend reading the HyperPhysics box on Work, Energy, and Power , and especially the links on the Power Concepts page . <A> You are correct in assuming a 60 watt device will consume 60 watt-hours in one hour, but the former (power) is a rate, the latter is an amount (energy).
|
Power is measured in watts (W) or joules per second (J/s).
|
Easiest and cheapest way to get digital outputs from a computer to the real world I need a number of digital outputs to connect my computer to the real world, however it seems that this job is not nearly as easy as I had hoped. I've looked into a number of different methods, ranging from dedicated digital I/O cards, micro controllers with USB interfaces, serial ports, parallel ports, ect. However all of the solutions seem to be either too expensive, too much work, or the technology is too dated. I hope to have 64+ digital outputs running at approximately 1khz each, individually controllable. So far the best idea I can come up with is sticking the outputs of a serial port to an 8-bit serial to parallel shift register and sending chars down the serial connection whenever I wish to change and output (run from a USB to serial port adaptor). I haven't tested this yet so i don't know if it will work. Is there any other quick and dirty method of getting a fairly large number of inexpensive digital outputs from the computer of which I can easy control with very basic C++ commands? <Q> Sounds like you intend to flash some christmas lights. :-) <S> Anything wrong with using an arduino or similar?It would be fairly easy to expand the number of IO ports if the number of ports say on the mega 1280/2560 aren't enough. <S> You can drive it via serial/USB terminal. <S> Using standard components like that will give you the shortest amount of prototyping time. <S> Note, my way may not be the cheapest. <S> But it's effective and will actually get you rolling quickly. <A> The serial to parallel shift register will work. <S> Using the SPI port you willhave no problem with the 1KHz update rate. <S> IIRC on an ATmega328 with an 8MHz crystal (or higher) you should be able to get 1Mbits per second. <S> A lot of other microcontrollerswill work as well. <S> Another option is to use multiple microcontrollers. <S> For example -- using an ATmega328 (which is around $5 with the passives) would give you 18 lines while keeping the TXD and RXD lines free. <S> Parallel up the RXD lines and then all the uCs will receive the same command strings. <S> You would need to parse the command strings on the uC. Use an FTDI cable to get toUSB. <S> Add an Arduino bootloader to the uC <S> and you could use the Arduino tools. <S> The serial to parallel conversion is more straight forward. <S> If your application canuse open-drain outputs you could use a 16 channel LED driver. <S> This would mean addingfour chips. <A> The simplest option I've come across seems to be the IOIO-OTG . <S> It's a PIC-controller based external OTG USB device, designed for android, but usable with a PC, via Eclipse and the Android Development Toolkit. <S> It has 46 3.3v GPIO pins , as well as bunch of other useful stuff. <S> It doesn't have the 64 pins necessary for your project, but you could just use a few serial to parallel shift registers, as mentioned by jluciani (or use stepper motor controllers instead, and use less pins). <S> There is also this PIC-based USB IO board , which does similar things, but has less pins.
|
You could use shift registers on the output pins of the arduino or you could use the i2c port expander and drive through that.
|
How can computer parts suffer if the computer isn't protected by an UPS? In datacenters it's common to use Uninterruptible power supply (UPS) to protect the computers. They are used for several reasons, but one is that electronics possibly can suffer from the power grid if the power isn't "filtered". Is it only the power supply unit of the computer that can suffer or can the computer parts also suffer? And how can they suffer? Does an Uninterruptible power supply work differently to an Power supply unit (PSU) or is the PSU already protecting the computer parts from the power grid? <Q> I'm not an expert on this, but I think there's a device here you haven't mentioned: a power conditioner . <S> These devices take power from the wall and pass it through filters to make a (fairly clean) output power signal. <S> In some cases they also have automatic voltage regulation, and can boost/cut the power from the wall. <S> In certain cases, they are also tailored to the applications they are used in. <S> For example, APC makes a seperate lines of power conditioners and UPSes for home theater and computing, as they have different power usage profiles <S> (home theaters tend to have high peak usage). <S> I don't have any hard numbers on this, but if the power signal is out of spec or the PSU <S> you are providing with that power signal is poorly designed, damage may occur to the device. <S> Specifically what, I don't know, and others that know more will have to chime in. <S> Some UPSes perform a power conditioning function, but most don't. <A> An UPS is generally used to keep power to your system during a power outage. <S> On the most basic level, it is just a battery bank connected with a relay and an inverter. <S> When the power goes out the relay switches to the inverter(often just a modified square wave with off the shelf UPS). <S> Don't assume that the ups has any filtering without reading the spec's. <S> Cheaper UPS's only give a direct feed from your outlet until there is an outage, so if you have dirty power from your outlet, it is likely you will have dirty power entering your electronics. <S> A PSU is different in the sense that it may not have a battery backup. <S> A PSU on a computer generally just takes AC power and converts it to DC. <S> There will be some filtering effects in this process but I would suggest still using a surge protector for any valuable electronics. <S> The cost of a surge protector vs replacing is minuscule. <A> Is it only the power supply unit of the computer that can suffer or can the computer parts also suffer? <S> The power supply is the area that can be damaged by surges in the AC mains. <S> But if the power supply is really damaged, and it delivers overvoltages in its output, the CPU and other parts can be damaged as well. <S> It's all about failure propagation. <S> If you have a lightning strike, there's no telling what can happen. <S> For what it's worth : if you protect your power supply with a surge protector or other power conditioning device, make sure that all connections to your computer (telephone line for modem / ethernet connection) are protected, so that in a lightning storm the surge currents can't find a back-door into damaging your computer. <A> Take into account that the output of the PSU under load never changes instantly, due to the inductance of the transformer, the output inductors and the caps. <S> The MOSFET should go pop before anything bad happens. <S> It's more like that the power supply will fail before delivering increased voltage, but if you want to be extra-safe, use a surge protector. <S> I opened up a scope power supply (from a HP 54501A) to find it has spark gaps on the input mains. <S> Don't see that quality much more. <S> Remember: <S> most UPSes are not line interactive, and continue to supply voltage to your devices unless a complete power failure occurs. <S> A cheapy UPS will not do anything. <S> It might have some MOVs on the inputs, at best. <A> UPS are used in data centers to prevent data loss and maintain services during power outages. <S> In alot of cases UPS's are just used to give the computer enough time to save the contents of RAM to the harddrive and properly shutdown. <S> In a data center application the UPS systems provide power long enough for backup generators to startup and usually allow for a few hours of operations if the generator fails to start. <S> In telecom downtime is expensive so great lengths are taken to make sure power is never lost. <S> Interesting random fact: <S> Data centers and telco central offices must have disconnects for all power sources in case there is a fire(to <S> make it safe for firefighters to work). <S> These are often big red buttons mounted on the wall for easy access. <S> These often get hit by new guys and sales people wondering what they do and cause huge business losses.
|
For an example if a computer was in the middle of a harddrive write during a power outage the file system might get corrupted.
|
What are some alternative power sources for wireless sensors? I'm looking to power several small, Wi-Fi enabled sensors, in a domestic home or office environment. As such I'm interested in keeping them powered as long as possible between charges. Obviously an expensive Li-xx battery would be simple solution, but I've also been looking for more 'inspired' alternatives, such as Micropelt thermogenerators . What other alternatives are there that would provide a decent amount of power, in a small size? Alternative wireless networking ideas are welcome, but I'm keen to use WiFi - most homes have a WiFi network and enabled computer - I'd like to keep the extra equipment needed to an absolute minimum. [There is a related question , about energy storage . My question is about generation and my needs are fairly specific (size, high power etc.] <Q> Rachel's Electronics has been posting about a solar-powered Arduino solution for remote sensors lately. <S> Not sure if that provides enough power for Wi-Fi, though. <S> I'd look at less power-hungry wireless if I were you. <S> Are you really sending 10 Mbit/s? <S> Or do you just need a few kbit per hour? <A> You should specify what sort of environment you're talking about. <S> However, that's getting expensive as well. <S> Ideas <S> I've seen used successfully to some degree: Solar is the first one, but it does require light. <S> Any light will do of course, even fluorescents. <S> Will it keep your circuit powered for a significant amount of time? <S> Depends on where it's put. <S> Vibration/Piezoelectric generation has been used successfully to power sensors placed under busy stairs. <S> The key is busy stairs - imagine the New York subway or the main stairs at a university between classes. <S> EM capturing - <S> If there's a lot of ambient EM then you can put out an antenna, rectify the results and regulate it - boom, power. <S> However, it's usually illegal to do this with significant sources. <S> For example, you can power a light bulb if you're with a quarter mile of a large radio antenna, but harvesting that power is illegal in most countries. <S> It WILL be noticed too. <S> As Endolith said, you'll probably want a less power-hungry module. <S> Consider Zigbee instead of WiFi <S> - it was designed to be used in low-power devices that transmit for short bursts then stop. <S> [EDIT] <S> Ok, office/home/domestic is the application. <S> If you control it significantly, maybe you can alter it. <S> Say by adding inductive chargers? <S> I don't think there's that many source of power in a standard office other than solar. <A> How often/how much data do you need to send? <S> If it's fairly intermittent (on the order of a minute or so), some AA batteries could last you a very long time. <S> For sensor applications, the most important thing to optimize is the sleep-mode power consumption . <S> You can wake up and send data using several hundred mA (seemingly typical for a 802.11* module) for a few seconds, but if you can then sleep for a few minutes using less than 1 mA, plain ol' alkalines will work just fine. <S> NiMH might be an alternative, but in an optimized wireless sensor design their internal discharge rate will limit their life more than capacity. <S> Batteries can happily deliver a watt each with no added cost. <S> A much more tried-and-true method for RF sensors all about is using, as mentioned before, ZigBee (well, <S> 802.15.4--very <S> few people use true ZigBee). <S> They will run for years with a very modest battery, and you can easily bridge them to an 802.11 network with some Digi ConnectPort X2 's. <S> 802.15.4 modules can wake up and send data in milliseconds using several times less power with a much greater range. <A> There is the WISP <S> http://wisp.wikispaces.com/ <S> They use a large dipole and a cascaded rectifier to generate voltage.
|
Most of the methods I've heard of also use batteries to store the energy, but you could also use an array of supercapacitors. If you use some complex energy-harvesting thing, you will need to spend a great deal on supercaps, as using a solar cell, peltier junction, or RF harvester will give you nowhere near enough power .
|
When laying out circuit board traces, what impedances do I need to consider? I do low-speed circuit design for microcontrollers and such (usually at less than 20 MHz), and now I'm getting started on some more high-speed circuits. What I want to know is: What considerations need to be made for traces in high-speed circuits? Do I have to impedance-match each line between two high speed devices? Do all the traces need to be the same length? Is there a good reference for these rules? Can this be done using open-source circuit design tools ( gEDA and company)? <Q> (I should say at the outset that I have some experience with boards in the 100 MHz range, but I'm far from an expert.) <S> The canonical reference is High-Speed Digital Design by Johnson and Graham. <S> Johnson also wrote a more advanced sequel, High-Speed Signal Propagation, in 2003. <S> You can lay out any board with gEDA and company, but it can become arbitrarily difficult to the extent that I would seek a better tool if you can get it. <S> Matching the lengths of many traces by hand gets tedious quickly. <S> As for what you actually need to do with traces, here are the things I watch out for: <S> The length of traces starts mattering once your traces are longer than 1/6 of the rising edge of a digital signal. <S> For a rise time of 1 ns on a typical PCB, the rising edge spans around 6 inches, so you want your traces to be less than 1 inch in length. <S> You want to match the termination of your traces to their characteristic impedance to prevent reflected signals. <S> In practice, this means either putting a resistor to ground right before the trace reaches its destination or putting a resistor in series at the start of the trace. <S> I've found the diagrams in chapter 12 of Analog Electronics by Crecraft and Gergely to be worth staring at for extended durations: http://books.google.com/books?id=lS7qN6iHyBYC&lpg=PP1&ots=cg6ZMM2GI1&dq=analog%20electronics%20crecraft&pg=PA296#v=snippet&q=propagation%20of%20a%20pulse&f=false <S> Manufacturer's datasheets will sometimes have recommended termination schemes. <S> As your signal speed increases, you have to start worrying about voltages induced in neighboring traces due to mutual inductance and rapidly changing currents (V = L * di/dt). <S> People call this "crosstalk. <S> " <S> This means that you need to spaces traces away from each other, use a ground plane under all your traces, and/or put ground traces ("guard traces") between the traces you're trying to isolate. <S> That's all that I actually worry about in practice. <A> Many signal transmission lines also require termination. <S> This reduces reflections and inter-symbol interference. <S> The trace's impedance is determined primarily by it's width and the PCB stack-up, but the signal return path also plays a role. <S> Switching layers or routing a signal across a split ground plane will create impedance discontinuities and will degrade the maximum speed at which the link can operate. <S> Trace length matching requirements will be driven by the timing requirements of the bus protocol used by the signals. <S> E.b., a DDR memory interface will require that the DQ (data) signals arrive within so many pico-seconds of the DQS (strobe) signal. <S> A rough estimate of the mismatch can be calculated from the trace length mismatch and the propagation delay of the transmission line. <S> Signal integrity engineers create more precise analyses of timing skew by running simulations of the routing topology and models of the I/O drivers. <S> A great reference on the subject is Dr. Howard Johnson's book "High Speed Digital Design: A Handbook of Black Magic" (http://www.amazon.com/High-Speed-Digital-Design-Handbook/dp/0133957241) <S> Jason <A> This all really depends on what you mean by "high speed". <S> The most important factor in determining whether you need termination is the amount of time it takes for a rising edge to propagate. <S> If your rise time is 100 ps, then it doesn't matter if you're 100 MHz or 10 MHz, reflections will still hurt you. <S> But reflections are only a problem when you reach "transmission line" lengths. <S> I think that's something like...for every 300 ps of rise time you can go about an inch without termination. <S> So for a rise time of .9 <S> ns, you can go about three inches. <S> As far as the impedance of traces, you should google "microstrip". <S> You will need a solid ground plane underneath the trace. <S> Then, the distance of the trace from the plane (determined by board stackup), and the width of the trace, should largely determine trace impedance. <S> Many PCB design tools will automatically calculate the trace impedance for you. <A> You don't need to make the traces the same length unless your circuit requires it. <S> For example DDR memories require it within a certain amount and differential traces require it. <S> The standard for simulation is HyperLynx (by Mentor). <S> LineSim does it pre-layout; BoardSim does it post-layout.
|
For high speed digital signals, you'll want to match the impedance of the trace to the output impedance of the signal's output driver.
|
Resources to learn and test VHDL Good Morning, I am a scripting programmer (PHP) and do a lot of backend development with web servers. I am very interested in learning VHDL, but the tutorials I have tried seem very antiquated and difficult to follow without some previous coding experience directly in that language. I am considering buying a Xilinx FPGA, but would like to learn more before I make an out-of-pocket purchase. I especially interested in online or downloadable testing environments where I can prove out a theory before I move forward. Any advise here is appreciated! <Q> My advice is to borrow a book at the library. <S> Most of the books on VHDL will cover the basics well but not teach all the nuances, and you really do need the basics because logic design is fundamentally different from imperative programming. <S> There are many simulation tools available to test your theories, including Xilinx WebPack (gratis) which you'll be using if you do get a Xilinx based board later, or GHDL for a free software example. <S> Several books already come with an analysis/simulation tool. <S> Once you have a fair knowledge of the structure of the language, dig around for examples. <S> Opencores.org is one place to look, and fpga4fun.com has basic examples. <S> You may even want to head there first for links to tutorials, explanations and so on. <S> Edit: <S> Most projects won't be very interesting in simulation alone, so you'll quickly want to get some hardware to play with as well. <S> These will have a bunch of concerns, such as purchase price, tool flexibility, and included peripherals. <S> Kits like Spartan 3[AE] <S> Starter have a fair range, from expansion ports through switches and LEDs to video and audio ports. <S> Simpler ones like Papilio One may have nothing at all but what you add. <S> Make sure you get the software side working, though, because there's little more frustrating than a limited time license to use what you paid for while it doesn't work. <A> The software is free and open source and you do not have to purchase the book to use it. <S> The other book I recommend is "Digital Electronics : <S> A practical approach with VHDL <S> " it uses an Altera FPGA to demonstrate important concepts and teaches you VHDL along the way. <A> I've been in a similar boat and I can recommend two books that have been assisting me in getting "up-to-speed". <S> Both books were recommended from friends that have spent years developing VHDL. <S> Embedded System Design: A Unified Hardware/Software Introduction <S> - Provides a great bottom-up discussion of hardware logic and embedded software. <S> Related lab-style examples can also be found at this website: <S> http://esd.cs.ucr.edu/labs/tutorial/ VHDL for Programmable Logic is another highly recommended book.
|
There is the book "Elements of Computing Systems : Building a modern computer from first principles" which includes a companion simulator that lets you build almost any chip you want to simulate.
|
Drawing a comparator op-amp in Multisim I'm attempting to draw the following two circuits up in NI Multisim 10, to attempt simulation and confirm my calculations. However, I'm not sure how to represent the Vin and Vout sources. Also, multisim only seems to have amplifiers with power supplies, but all theory I read seems to draw the amplifiers without. Does that matter for a eventual simulation? Also, ff there's any better software for the purpose than Multisim, then please tell. Thanks. <Q> I'm pretty sure it's quite common to omit an op-amps power connections when doing a circuit schematic <S> , it's just for clarity <S> I think - it's presumed you know they're supposed to be there, it keeps diagram complexity down and makes other connections easier to visualise. <S> I'm not familiar with Multisim, but I'd imagine - <S> If the option to connect the power rails is there, you should probably hook them up, in theory the op-amps will not function correctly if they don't have the power hooked up, but this may not be the case in the sim-world. <S> You can always test both - if the simulation still works without the power connection - it may be that it assumes the nominal power supply is connected. <S> The connection may be more applicable for testing power supplies outside the nominal range. <S> Also - The de-facto circuit simulator that most people seem to use is SPICE , <S> as it's quite common, it has a good community base <S> and there's loads of help and tutorials available for it. <S> Just my thoughts on the matter, some of it may be helpful :) <A> Multisim does have ideal opamps, they can be found in the master database under Analog>Analog_Virtual_OPAMP_3T_VIRTUAL, but as Kortuk said, you should strongly consider using an opamp that forces you to include a power supply. <S> If you have a particular opamp that you know you will be using in a lab, you should see if you can find it in the multisim database. <S> Multisim has very good models for how the opamps will actually act even more then just how you are powering them. <S> As for your question about Vin and Vout, in Multisim you can go to Simulate>Instruments and select what ever instrument you want to place. <S> So you could put a function generator in for Vin and a Oscope for Vout. <A> Your issue is which op amp you are using from their library. <S> You are using an ideal op-amp. <S> Almost always students in class will show me a simulation where they use an ideal op amp <S> and it does not work, or it works too well. <S> I just opened my library and I have many many options. <S> You need to determine which one fits your applications. <S> They will have power connections, non-infinite gain, not be able to completely hit the rail, so forth so on.
|
Try selecting a different op amp from the master database that has connections for power.
|
What are the differences between NAND and NOR flash? What are the differences and where would you use each? <Q> NAND flash is cheaper, so you want to use it if you can. <S> The drawback is that it's not as reliable. <S> NAND flash is faster at most operations, with the notable exception being small random access reads. <S> If you want to read a couple bytes from a random address in memory, NOR is faster. <S> For large memory reads, NAND does reasonably well, and actually beats NOR for large enough chunks. <S> Most embedded operating systems include code to correct the errors in NAND Flash. <S> There are also microcontrollers with hardware error correction. <S> The real problem happens at boot time-- <S> first-level bootloaders don't have error-correcting code, and they haven't configured the memory controller to run hardware ECC yet. <S> It's a bit of a chicken-and-egg problem-- you can't load the ECC code without errors because you haven't loaded the ECC code yet. <S> To get around this problem, some memory manufacturers will specify a certain region of the chip that is guaranteed to be error free (the first 4 kB, or something like that). <S> You put a bootloader with software <S> ECC there <S> (like U-boot ), read it out with no errors, and then use it to read out your OS kernel, correcting errors as you go. <S> You can also store a bootloader in a serial flash, and just use NAND flash for large stuff like an OS kernel or filesystem. <S> I've found this Atmel application note useful: <S> http://www.atmel.com/dyn/resources/prod_documents/doc6255.pdf <A> There is a lot of trade-off to it. <S> Wikipedia also: Despite the additional transistors, the reduction in ground wires and bit lines allows a denser layout and greater storage capacity per chip. <S> In addition, NAND flash is typically permitted to contain a certain number of faults (NOR flash, as is used for a BIOS ROM, is expected to be fault-free). <S> Manufacturers try to maximize the amount of usable storage by shrinking the size of the transistor below the size where they can be made reliably, to the size where further reductions would increase the number of faults faster than it would increase the total storage available. <S> So, NOR flash can address easier, but is not even close to as dense. <S> If you take at a look at a pretty decent comparison PDF. <S> NOR has lower standyby power, is easy for code execution and has a high read speed. <S> NAND has much lower active power(writing bits <S> is faster and lower cost), higher write speed(by a lot), <S> much higher capacity, much much lower cost per bit and is very easy for file storage use. <S> due to it's lower read speed when using it for code execution you really need to ghost it to ram. <S> To quote a small section with a great table above it... <S> The characteristics of NAND Flash are: high density, medium read speed, high write speed, high erase speed, and an indirect or I <S> /O like access. <A> NOR allows for random access, but NAND does not (page access only.) <S> From Wikipedia : <S> NOR and NAND flash get their names from the structure of the interconnections between memory cells. <S> In NOR flash, cells are connected in parallel to the bitlines, allowing cells to be read and programmed individually. <S> The parallel connection of cells resembles the parallel connection of transistors in a CMOS NOR gate. <S> The series connections consume less space than parallel ones, reducing the cost of NAND flash. <S> It does not, by itself, prevent NAND cells from being read and programmed individually.
|
The characteristics of NOR Flash are lower density, high read speed, slow write speed, slow erase speed, and a random access interface. In NAND flash, cells are connected in series, resembling a NAND gate.
|
Components for a WiFi enabled IR controller I don't have any experience with electronics really but I do have experience in programming. I'm interested in writing a program to control my stereo, TV etc. To achieve this I'll need a piece of hardware which is WiFi capable and can generate a range of infrared signals to control my TV, stereo and other infrared capable devices. Given my lack of experience with microcontrollers etc, I'd probably find it easier if I could minimize the amount of work the hardware had to do and focussed it on converting data it receives via WiFi into infrared. What components would I require and are there any relatively inexpensive out-of-the-box solutions which will have the majority of what I need without requiring too much additional soldering? Also, at a high level, what way should the operation of such a device be architected? <Q> Check out the USB Infrared Toy (from the people who brought us Bus Pirate). <S> Of course, you'll still need the wifi part. <S> A linux based router running OpenWRT could be a good choice. <A> So you need to check the connections in your IR receiver and wireless module (signal levels, host/slave configuration, etc). <S> Probably your best bet is to get a USB-to-Wireless bridge module. <S> EDIT: If you want to make your IR receiver truly wireless, you probably should look for a way to power it and the wireless bridge module. <S> Take a look at these links (can't post more than one link, so check second link as a comment below ^.^): <S> Parts for Solar/Bluetooth Hot-Swappable Unit <A> Your simplest solution would be a Microsoft Media Center IR blaster <S> many types are available, note that some require you to connect external transmitter diodes, something with wifi running linux (eg a Raspberry Pi) and lirc . <S> Lirc has a sensible API and a huge library of ir codes. <S> The traditional solution to this was the logitech harmony, but they recently shuttered their APIs.
|
You could hook up a RF/Bluetooth (cheap) module to your IR receiver, which usually requires a UART header (USB IR Toy's UART header is not supported in the firmware, only UART-to-USB bridge), or you can use some kind of USB-to-Wireless converter (USB IR Toy uses USB CDC/ACM).
|
How does a quartz crystal work? Could you explain how a quartz crystal works, maybe with a simple schematics with the essential things ? I know it acts like a kind of stabilizer for an oscillator, but nothing more than that. <Q> Similarly, if you place charges on its surface, it causes mechanical stress in the crystal. <S> The way a quartz crystal benefits a circuit is that mechanically the crystal acts much like a tuning fork, with a natural resonant frequency, and the piezoelectric property allows that to be coupled into an electronic circuit. <S> Since the resonant frequency is mainly determined by the physical size and shape of the quartz, you get a frequency reference that is much less sensitive to temperature than you would get using just LC circuits. <A> There are already two great answers, so I am just going to try to give a different explanation of the same thing. <S> Background <S> So, in a Pierce oscillator you have a digital system connected to a crystal oscillator. <S> Now you have probably seen how logic gates switch state, with a specified rise time. <S> If you put any time into learning about Electromagnetic Compatibility or just high speed digital design (the best book in existence being the one by Johnson ), you will learn that this can be looked at as a wide range of frequencies. <S> What the crystal does There are two ways of looking at what the crystal does, from the frequency domain and from the time domain. <S> I will start with the frequency domain due to personal preference. <S> I push every electrical engineer I work with to become at home with the frequency domain; many problems become simple here, and complicated responses have meaning. <S> Frequency Domain From the perspective of the frequency domain, a crystal is a filter at a very specific frequency with a very high Q(quality) factor. <S> This means that of all of those frequencies you generate, you only allow the specific one the crystal allows through. <S> Time Domain <S> The other way is to think of a gate tied back on itself. <S> If there was nothing there, it would create a square wave with a frequency equal to the delay, but this frequency is not extremely reliable, and also will vary based on many manufacturing parameters. <S> This is where the crystal affects it. <S> If the crystal has a rising edge placed on it, it will only "pass through" the signal at the frequency it has selected for. <S> Suddenly, the 100MHz square wave becomes a 20MHz sin wave due to the crystal. <S> A little extra thought Wonder why oscillators pull so much current? <S> You are charging and discharging the capacitance in the oscillator circuit 20 million times per second. <S> Also, for all the clock cycles many transistors in your circuit do the same. <S> if you do not need speed, a 32KHz oscillator costs very little in power on microcontrollers. <S> Let me know if I can be more clear. <A> From Wikipedia : An oscillator crystal has two electrically conductive plates, with a slice or tuning fork of quartz crystal sandwiched between them. <S> During startup, the circuit around the crystal applies a random noise AC signal to it, and purely by chance, a tiny fraction of the noise will be at the resonant frequency of the crystal. <S> The crystal will therefore start oscillating in synchrony with that signal. <S> As the oscillator amplifies the signals coming out of the crystal, the signals in the crystal's frequency band will become stronger, eventually dominating the output of the oscillator. <S> The narrow resonance band of the quartz crystal filters out all the unwanted frequencies. <A> I like to mention some additional - rather important - features: <S> The quartz can be operated in series as well as parallel resonant operation (however, both resonant frequencies are pretty close to each other); <S> In some applications (in particular for transistor-based oscillators like the Pierce type) the quartz is used NOT as a resonant circuit but as a high-quality inductor .
|
Quartz is a piezoelectric material, which means that if you mechanically deform it, it develops charges on its surface.
|
Is there any way to determine power rating of a potentiometer? I salvaged a 1kΩ potentiometer from a broken circuit. Is there any way to determine how much power can it take without destroying it? EDIT Picture of the potentiometer: The distance between left-most and right-most connector is about 2cm. <Q> Hmm... how big is it? <S> Most potentiometers I have found are rated for 1/2W or 1W. <S> A general rule of thumb though is that you shouldn't be putting much power through it anyway - it should only be controlling a small signal. <A> Please note that the power rating of a potentiometer is for the entire end-to-end resistance. <S> If you use (as is typical) a fraction of the potentiometer's end-to-end resistance, the power is reduced accordingly. <S> The easiest way to think about it is that there is a maximum current through the pot. <S> If you have a 1W 100 ohm potentiometer, the max. <S> current is 100mA (full voltage = 10V); if you are using only 27 ohms of the potentiometer then the max. <S> current is still 100mA and your effective max. <S> power is 0.27W. <A> That particular pot is similar to those used in old-time hand-held transistor radios. <S> My recollection is that thost are good for perhaps 200 mW at most. <S> You can often estimate how much power any particular potentiometer can handle based on the physical size and the material that the resistive track is made from. <S> Digikey or Mouser have great on-line catalogs, for example. <S> Resistive track material is important. <S> You can usually tell if the track is wire-wound by simply rotating the shaft and feeling for the telltale lumps that occur as the wiper moves over the track. <S> If the rotation is smooth, the track is most likely either carbon or carbon film.
|
Although experience helps you arrive at an estimate, you can also simply look at a catalog of pots and compare what is in the catalog to what you have.
|
My Atmega328 seems to be overkill, what should I use instead? I'm using an Atmega328 chip with the arduino bootloader in a very small circuit. The sketch simply plays a tune using the tone() function to play a melody through a piezo speaker on a single pin. Clearly using this chip is overkill, but the programming environment is so simple for arduino, and easy for me to use. Can I use a Attiny with the arduino bootloader or something similar? What would be the right way to miniaturise this project, so I don't feel like I'm wasting components. If it's a case of using a different chip/environment entirely, where do I start? (for clarity, I am not using an arduino in the circuit, just the Atmega328 chip) <Q> Using Atmel chips in the Arduino IDE For the ATtiny45 and ATtiny85 you can use this library that you put in the same directory as your sketches (make a "hardware" directory, then unzip this in there). <S> I found lots of things just work, but not everything. <S> These chips are pretty tiny. <S> You only get 4 input/outputs (or 5 if you have a high voltage programming device), and you have to be careful which ones can produce the type of output needed by tone (probably only 2 of the pins). <S> These guys are in the $1.25 to $2.25 range. <S> I switched to using AVR style GCC, as its not much harder and <S> if something breaks I know its my fault. <S> The 2313 has a ton more pins (not as many as the ATmega), hardware serial support, etc. <S> It is in the $1.50 to $2.50 range. <S> The ATmega328p is more in the $3.00 to $4.50 range (and currently is often out of stock). <S> You can think of the Arduino IDE as consisting of 3 main parts: a nice, reduced programming language for AVR style chips (mostly by providing you with simple to use functions like tone) <S> a nice, easy to use upload mechanism for ATmega and larger ATtiny chips (the bootloader) a nice GUI interface that makes it easy to use the right part when you need it <S> When you work with the ATtinyX5 chips, the bootloader doesn't work, but you can use an Arduino to program the ATtiny's very easily. <S> The library I linked to makes the first and third parts of the IDE available to you. <S> If you want something cheaper, but mostly the same as the ATmega328p, I would go with the ATtiny2313. <S> If you want something smaller, then the 8-pin ATtiny85 is nice, but it is not too much cheaper and lacks a lot of the nice features of the ATtiny2313 and the ATmega328p. <S> I haven't tried the other Atmel AVR product lines, but they definitely have others. <S> Luminet (mentioned in another answer) uses the ATtinyX4 line and has a modified IDE to work with them. <S> They appear to be in the $1.80 to $3.00 range. <A> The Arduino libraries <S> don't actually depend on the bootloader <S> - it's merely a convenient delivery method, if you have the serial connection. <S> In theory you could use most any AVR that has some RAM built in, though I never tried (I tend to write directly with avr-libc). <S> Given the task, however, you'll probably want to pay attention to the fuse settings for clock options as Arduinos tend to run at 8 or 16MHz while the chips often default to roughly 1MHz. <S> LumiNet uses the Arduino environment ported to the ATtiny84 chip, as an example. <A> There are plenty of options for another chip entirely. <S> One to consider are TI's MSP430 value line devices. <S> TI sell a complete dev kit (programmer + 2 DIP MCUs) called the Launchpad for $4.30. <S> Like AVR <S> , there's a gcc port. <S> So, it's not a huge leap. <S> http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_%28MSP-EXP430G2%29?DCMP=launchpad&HQS=Other+OT+launchpadwiki <S> http://hackaday.com/2010/06/22/ti-makes-a-big-bid-for-the-hobby-market/ http://www.43oh.com/
|
You can also use ATtiny2313's, but I've not tried using the Arduino IDE with them.
|
RFID reader for a keyless residential entry system? What are some good RFID readers to look at for a keyless residential entry system? Are there any on the market that can read a key fob or similar RFID token from a range of 3 feet or more? This would be a DIY project for a new home, so price is less of an issue than reliability and ease of integration. <Q> Sparkfun has some RFID devices that are fairly DIY ready. <S> Here is a link to one: <S> http://www.sparkfun.com/commerce/product_info.php?products_id=8419 <S> This is if you are wanting to actually build your own device to do keyless entry. <S> If you are wanting a pre-built key-less entry you might need to look else where. <S> EDIT: <S> After answering I did realize you mentioned that you wanted reliability and ease of integration. <S> My solution probably isn't the best for this requirement. <S> Look at this site: http://www.househacker.com/permanent/DIY-RFID-Access-to-your-Front-Door <A> Jon Oxer (the co-author of "Practical Arduino") has documented home-access RFID systems on his website . <S> He is also the first Australian to have an RFID implant. <A> I will be trying to find a tear-down of this or a similar unit that describes the components it uses. <S> I'll try to keep this answer updated with what I learn.
|
Doing some more Googling on this topic (armed with some hints provided by Kellenjb, tronixstuff and avra), I have turned up an example of the kind of reader I'm interested in: Home Automation RFID Reader
|
How can I connect the KT3170 (The DTMF reciever) to USB (4bit data)? This will be my first try at USB intefacing ! May I know how to transfer the data from pins : 11-15 of KT3170 IC to USB ? Data sheet : http://www.datasheetcatalog.org/datasheet/SamsungElectronic/mXuusvq.pdf I guess I will need to configure a Microprocessor for making the OS uderstand what profile of device is this , In that Case what will be my device profile ? Mine is an RF remote control receiver using DTMF which I want to connect to the PC. I also have a doubt on fast can The KT3170 can interpret the DTMF tone. That is if I press a button (say 1) and immediately within the same second if I press key 2 Will it be able to recieve and decode the DTMF correctly with proper time synchronization ? What will be the latency if I transmit this signal through Frequency Modulation (FM) ? <Q> I'd suggest a microprocessor with built-in USB, such as the PIC 18F2455 (or one of its variants). <S> The USB interface to your PC is very simple and ends up looking like an RS-232 serial port to the PC. <S> The driver is probably already in your OS if you're using recent Windows. <S> The way I interpret the data sheet, I would connect Q1 - Q4 to digital inputs on the microcontroller. <S> Then connect the DSO (pin 15) to a digital input with an interrupt-on-change and process when it goes high. <S> When you get the interrupt, read the Q1 - Q4 data, do whatever pre-processing you may want and send it out the USB port. <S> I can't definitively tell by the data sheet if the KT3170 output would change if you pressed a second key while the first one is still pressed, but I'd guess that the fist output would stay latched unless you fully released the first key prior to the second press. <S> You might have to just try and see. <S> If you press one key and then quickly press the next, you should be okay and get the second keypress as the maximum interdigit pause time is 40 ms. <S> As long as you aren't faster than 40 ms between presses, you'll get the second press. <S> I don't know what your transmit latency will be. <S> You'll have to look for that in the transmitter/receiver pair documentation. <A> I'd have a look at the AVR USB chips and the Teensy dev boards. <S> How to build a USB controller having knobs, sliders, and switches <A> If reading the decoded data from that DTMF signal is all you want to do, programming a microcontroller seems unnecessarily complicated. <S> With the (relatively cheap) DTMF transmitters I have,if you hold down one button for 0.1 seconds, then continue holding it down while pushing a second button, it transmits an (impossible to decode) mishmash of more than 2 frequencies. <S> If I'm reading your data sheet right, it ignores such impossible-to-decode signals, and during such times acts the same as when it hears nothing but silence. <S> If I'm reading your data sheet right, the latency from pushing a button on a hard-wired DTMF encoder to the rising edge on DSO is less than 0.1 second. <S> I don't know anything about the delay your FM modulator and demodulator will add to the system, but I suspect the total latency will still be well under 0.2 second. <A> Incidentally, another approach would be to simply feed audio into the USB port using an off-the-shelf product, and then have the computer perform the DTMF recognition. <S> Depending upon the exact application, a computer may be able to do a better job of DTMF recognition than a simple IC could manage. <S> For example, a computer could take advantage of the fact that DTMF is generally gated on and off relatively cleanly. <S> If the computer sees something that starts out looking like a DTMF tone but the frequencies change after 100ms, it might be able to (depending upon the application) retroactively determine that the tones weren't really DTMF after all. <S> There's no way a DTMF chip could do that.
|
Instead, I would use one of the USB-to-parallel interface devices available from many companies, such as the Breakout Board for FT245RL USB to FIFO .
|
PLL usage in DIY hobby project I was wondering if anybody was using PLL (Phase Locked Loop) in DIY hobby project? If yes what was the application? Did you made it from discrete components (as opposed from one placed in uController or FPGA) ? <Q> I used a PLL made of a Signetics NE565 PLL chip plus a few discrete components in a walkie-talkie. <S> It was used for FM demodulation at 300 kHz. <S> From Google, it looks like Signetics has been bought by NXP; I can't find a product page for the chip. <A> I use the onboard PLL on dsPIC processors. <S> Normally designed to operate at 40 MHz output (80 MHz internally) it will go up to 65 MHz with no sign of problems. <S> This was on a breadboard, but the only part connected to the breadboard was the chip's pin, connected to a scope probe. <S> The PLL is only designed for internal use by the chip as the CPU clock. <S> But it can be used to synthesise frequencies. <A> They work fine for me. <S> The only problem I've had with them is when I’ve set them up incorrectly. <S> This causes you to get a clock frequency different from what you are expecting. <S> I’ve found that outputting the clock to an I/O pin then taking a mesasurement with an oscilloscope can easily detect this issue. <A> I've also only used PLL's in clock systems for AVR (tiny26) and FPGA (NIOS) applications. <A> Many years ago I used the Signetics NE565 PLL chip to build a 1 MHz frequency standard phase-locked to the BBC 200 kHz long wave transmission.
|
I use the on-chip PLL’s in Microchip PIC parts to increase the clock frequency.
|
SRAM which two chips can read/write I'm looking for a small, 32KB or so SRAM device that two MCUs can read or write (at two different times; I don't need simultaneous reading/writing.) It would be good if it used a serial interface as well. The problem I'm trying to solve is sending data between two devices without the other device having to pause to receive this. I would transfer an audio sample into the buffer, then the other chip, as required, would read the audio out, and do something with it. I've found serial SRAM's like Microchip's 23A256/23K256, however, they seem to have a single serial interface. Is there any way to have two chips accessing this? Additionally, the receiving device only has 2KB data memory free (maximum) so it looks like using DMA or some similar transfer mechanism through I2C or other interface will not work. <Q> " <S> Either way, your software will have to monitor the bus conditions to see if it lost the bus and if so, wait for another opportunity. <S> For SPI, <S> the MOSI, CS and CLK lines must be tri-stated (or open-collector) with pull-up resistors to keep the lines from floating. <S> You will also need some kind of bus arbitration. <S> This can be as simple as a single GPIO between the two masters so that the one with higher priority signals the lower-priority master that the bus is unavailable, but a more elegant solution would be a single open-collector line between the masters. <S> When the bus is idle, neither master is yanking the line down <S> so it floats high with a pull-up. <S> The logic is that if the line is high, the bus is available. <S> The master that wants to use the memory would look at the "bus available" line and if it's high, drive the line low and wait a few ms to make sure the other master didn't grab the bus at the same time. <S> If the RAM SPI CS line is still inactive, it can be safe to assume that the bus is yours. <S> Do the transfer, tri-state your MOSI/CLK lines and let go of the "bus active" signal. <S> The "wait a few ms after yanking the bus request line low" is necessary since it is possible for both masters to grab the line at the same time. <S> If you are only ever using one shared device and that device does not require multiple transfers, you could use its CS line as the "bus available" signal, but this isn't quite as robust. <A> The easiest way would be to implement a multi-master SPI bus. <S> You could use two additional I/O lines between the masters for arbitration using a handshaking mechanism. <A> It may be not be simple/possible to use as I do not know if FIFO chip with simple interface (such as SPI) exist. <S> The FIFOs I know have parallel interface. <S> 2) Share the mentioned SRAM from Microchip with two SPI masters (in two uControllers). <S> When first is in use, the SPI ports in other uController have to be in high impedance and opposite when second uController will use the SRAM. <S> You will need some simple handshake interface between uControllers (something like read request/read done/busy lines). <S> This can be implemented using 2 or 3 unidirectional connections between uControllers. <S> Your imagination is the limit. <A> Incidentally, one approach not yet mentioned for use with parallel memories is to have two or more devices given fixed time slots to access data. <S> This approach was used in many 6502-based computers made by both Apple, Commodore, and some other vendors (not, interestingly, Atari). <S> The popular 6502 microprocessor used a two-phase clock, and always performed its memory accesses on the second half of each cycle (the address was available during the first half, but the data would be written during the second half or latched at the end of the second half). <S> The Apple and Commodore machines would thus during the first half of each memory cycle use an address generated by the video circuitry, latching the data at the end of the half; during the second half of each cycle they would use the address generated by the CPU, and let the CPU either write the data or latch it at the end of its half. <S> This approach required memory that was twice as fast as would have been required without memory interleaving, and required the addition of 3-state drivers on the processor's address outputs (the 6502's address outputs were always driven high or low) but it otherwise worked very smoothly to make the same memory available to both the processor and to external circuitry. <A> There are several ways to do what you want. <S> Program another "buffer MCU" to sit between your two CPUs and buffer the communication -- something like the "Baudrate converter" shown at http://www.romanblack.com/PICthread.htm . <S> Program it to present "dual-port" an indepent interface on each side. <S> The (internal or external) SRAM is directly connected only to this buffer MCU. <S> Reprogram your "transmitter" MCU to store a buffer in SRAM, instead of directly sending it to the receiver, and act as a slave to pull data from that buffer and send it only when your "receiver" MCU (acting as a master) requests it. <S> The (external or internal) <S> SRAM buffer is directly connected only to the transmitter. <S> (i.e., combine the functionality of both what your receiver is doing now, and the above "buffer MCU"). <S> Use some GPIO lines, as Andrew Kohlsmith and mjh2007 suggested, to arbitrate between the transmitter and receiver who gets access to a shared external 32 KByte SRAM chip such as the RAMTRON FM24C256.
|
You don't need dual-port RAM or even a serial RAM with two interfaces; For SPI it's a little trickier, but I2C allows multiple masters "out of the box. I see two possible solutions for your problem: 1) Find FIFO chip that is suitable for your needs (one example ).
|
Why does Oscilloscope cause short? I want to measure how much power my PIC is using. At the output of my 3.3V regulator I put a 1 ohm resistor in series with the rest of the circuit. I was going to measure the voltage drop across that resistor to get the current and so on. With the 1 ohm resistor installed the circuit works just fine but when I put the probe of my o'scope across it it my 3.3V goes to zero. It seems as though the scope is creating a short to ground or something. Does anyone know why this happens or how to make it stop? <Q> The ground clip on your o-scope is actually tied to ground. <S> it is a hard short and rather low resistance. <S> This means that you are shorting the 3.3 rail to ground with your ground probe. <S> To fix this there are two options, Put the resistor in the return pathso that one side of it is ground. <S> That way the ground probe does nothurt it. <S> Use two probes, one foreach side of the resistor and usethe math function on your O-Scope. <S> Let me know if this is not clear. <S> I can add more information. <A> Does the circuit need to be grounded? <S> If you can supply it from a battery or double-insulated power brick, you should be able to connect any single point to the scope probe's Earth ground without affecting the functionality. <A> It's not like the normal probes on your scope are + and - , they are actually Voltage and Ground (single-ended). <S> If you really would like to measure + <S> and - , you would need a differential probe. <S> But I guess you haven't got those lying around, so using 2 probes on both sides, or moving your resistor to the low-side of your device could work more practical.
|
Maybe another channel is already tied up to the real ground of the system, of the scope is sharing the same real ground in another way.
|
Best practices for production programming of data/NAND flash devices A project has finally reached the point where prototypes are operational and ducks are lining up in rows for the first pre-production lot of boards. It uses a SOC device that boots its ARM core from an external NAND FLASH chip, which normally contains a boot loader, the embedded application, and other data resources. With a minimal boot loader and application in FLASH, it is easy to field upgrade. The prototypes got boot loaders installed with a JTAG cable, but that seems more than a little unwieldy for production lots larger than a dozen or so boards. If this were a NOR FLASH or OTP PROM I would expect a vendor to be happy to take an Intel HEX or Motorola SRecord file and deliver devices that just work when soldered down. Given the different nature of NAND FLASH devices, what issues should we be watching for? What questions should we be asking vendors? What form of image should we be expecting to be able to supply? In short, what is the usual practice for pre-programming a NAND FLASH device before assembly? Edit: If it were to make a difference, it is an STM (numonyx or micron, why can't the chip companies stop selling each other their product lines mid design cycle?) NAND512xxx 512 Mb SLC family device that wants programming. <Q> The trick here is PogoPins <S> ( Wikipedia ) <S> Basically you make a jig where you drop the board in often descriped as a Bed-Of-Nails In-Circuit Tester /programmer, <S> and it's then flashed without having to deal with the connector-mating aspect of the jtag interface. <S> LadyAda did a tutorial , and so did SparkFun <A> It turns out that the distributor has figured out that they can perform this service on loose parts before delivery to the assembly house. <S> I'm personally not involved in the purchasing process, and can't begin to guess how much (if anything) <S> this increased the cost of the parts. <S> We had to produce a file containing a copy of every bit to be programmed including the 16 extra bytes per page, with the extra bytes properly formatted with the ECC and bad block information structure that matches the assumptions of the NAND driver, and with all unused blocks (and their extra bytes) left blank. <S> The file was as large as the device, but ZIP had lots of leverage for compression. <S> Along side that, we had to produce a table of base addresses and expected sizes of the partitions in use in the device. <S> Apparently the Data I/O FLASH programmer will verify each page during programming, mark pages that fail as bad, and automatically retry on the next page. <S> This requires that the partitions have enough spare space to allow for some bad pages. <S> The part will be rejected if a specified number of pages are bad, or if a partition won't fit. <S> Our first batch are in process based on an image dump of the live chip in a prototype unit. <S> Our plan is to improve on that by writing a tool that can produce the necessary image on demand or as a final build step. <A> When I've done similar things, I've always programmed the SoC with JTAG (or a gang programmer) then had the ARM core format and program the NAND flash (being fed data over serial or ethernet). <S> This way, the software can map out any bad blocks in the NAND. <A> One possible way to avoid the bad block issue may be to have just a minimal bootloader in the initial guaranteed error-free area of the NAND, and have this program the main content via whatever interface the product has available during test. <S> e.g. temporarily connect a SD card or something. <S> Another option <S> if you have plenty of space in the NAND is to preprogram multiple images, and have the processor derive a good image from these images the first time it powers up. <S> It would be worth talking to companies who already offer programming services, as they may have already found solutions to this. <A> When that isn't practical, I would think the best approach is often to simply have a means of feeding the required data into the target circuit so it can program the memory chip using whatever forms of error-correcting and bad-block memory it uses.
|
The most versatile approach, though I don't know if anyone supports this, would be to have a chip programmer read a chip and write it to a file, then run a user-supplied program to update the file with what should be in the chip, program the resulting file into the chip and read it out, and run the user-supplied program to verify it (possibly repeating the program cycle if the verify program wasn't satisfied with the result).
|
How can I handle a low power condition with PIC? I am working on a project that uses a PIC24F mcu.The power to my pic is backed by a very large capacitor (1F).When there is a main power loss, I can sense that immediately via a port pin but the PIC itself stays powered for several minutes via the capacitor as the charge in the cap slowly dissipates. Once I detect that the main power is cut, I want to perform some actions (several micro seconds only) and then stop the PIC from doing anything else (sleep or hibernate i guess). But as the caps charge slowly dissipates the power to the pic will VERY slowly decrease below 3.3V down to zero. At any point, if the main power is re-applied, the pic should detect it at the Port Pin, and restart normal operation. I am wondering what would be the best way to handle this in software? I know that the PIC has Brownout detection and some kind of Low Voltage Tracking but I don't quite understand how to use them. <Q> Use the instruction "PWRSAV #SLEEP_MODE". <S> This puts the chip into a power save sleep condition where it draws a few microamps. <S> Remember to turn off peripherals before doing this, or they will draw current in sleep. <S> This is a single cycle instruction. <S> You can set up pin change interrupts to wake the CPU from sleep. <A> The easiest way to handle this is to add a pull-down to a pin that can be set up to interrupt on a change. <S> Then put a diode from this pin to VIN and another diode from VIN to VCC. <S> Then you will receive an interrupt when the VIN is removed where you can gracefully shut down and then goto PWRSAV #SLEEP_MODE. <S> When power comes back the system will then get an interrupt which will take the part out of sleep mode. <S> The diodes should be Schottky diode like a bat54c. <S> The capacitor is use to filter out quick changes in VIN. <S> PIN --o---|<|----- <S> VIN ------|>|----- VCC <S> | <S> o----- <S> \ <S> | <S> / --- <S> \ --- <S> / <S> | <S> o----- | GND <A> If you have a certain state that you want your pic to be in when it comes back on, you could save settings to eeprom just before putting it to sleep. <S> Then, every time your pic starts you can have it check eeprom for your state settings and act accordingly.
|
When your devices power gets too low, your PIC will reset itself.
|
Troubleshooting a broken speaker system First I apologize if this is the wrong place for this question. Recently my sub-woofer/amplifier stopped working, and I would like to know what is broken. I opened the case and didn't find any physical damage, and was wonder how I should proceed to discover what the defect is. I am electronics novice, but would like to use this as an opportunity to learn more. What is the general procedure in a case like this? Should I use multimeter to find where the current is blocked? Any help would be greatly appreciated. <Q> well, to be honest you'd have to have a decent understanding of the circuit to really track down a component failure. <S> That being said i've fixed a few of my own internally amplifier speakers, it was almost always a solder joint that cracked or came free from its pad, probably as a result of thermal stress. <S> So one thing you can do is look over all the solder joints carefully and re-solder any that look like they are possibly cracked. <S> All you should need is a soldering iron, some flux and some solder. <S> EDIT: <S> One additional common point of failure in such electronics: electrolytic capacitors. <S> They are used a ton in audio electronics and have limited life spans, look for any bulging or exploded cans. <S> They are pretty easy to replace if this is the issue. <A> First checks are the obvious ones; things like the fuse and the wiring require little experience to verify. <S> Then use your multimeter to test the power supply. <S> Use it on DC volts and measure the output. <S> A failure in the power supply will likely take out the whole amp. <S> Be careful - mains voltages are present in some parts. <S> Other things to test would really come down to the exact model and specifications. <S> Consulting the service manual, which is usually only a google away, may be very useful. <S> Often lower end brands don't have service manuals, because they intend for the models to be replaced anyway. <S> But higher end gear will have some. <S> Test equipment of at least a multimeter will be required, but a scope is invaluable, even if it's just a 10 MHz single channel model (though I'd recommend a 50-100 MHz dual channel.) <S> A scope is a serious bit of kit and the price reflects that - around $200 is about what you'll pay for an second hand one and you can pick up a nice new 50 MHz digital storage scope for ~$400. <S> With a scope, you can compare the reference waveforms often given in a service manual with what you see on the screen. <A> In general when troubleshooting, you need to isolate the problem by proving whether parts work or don't work. <S> Does the power supply work if it's disconnected from anything else? <S> Does the preamp work if it's disconnected from the amp? <S> Does the speaker work if connected to another amplifier? <S> Do you have only a multimeter? <S> A scope would be more useful. <S> With a meter you can still test for signal by measuring AC voltage, though. <A> You state that your "subwoofer/amplifier" is not working. <S> Typically the first step of a troubleshooting like this would be to localize the problem to at least a single device. <S> That is, you need to determine whether the problem is in the amplifier or the speaker before anything else can be done. <S> You should try your subwoofer with another amplifier or your amplifier with another subwoofer if possible. <S> Note that you can probably use a speaker that is not a subwoofer with your amplifier just to check if it's working as long as you restrict yourself to "quiet" levels. <S> A good (and easy) test to do on any speaker is check its resistance with a multimeter. <S> It should be roughly 4 or 8 ohms. <S> This number may be printed somewhere on the speaker, but you probably won't get such a precise value. <S> Anything in this ballpark, as in not "zero" or "infinite" (read as OL on many multimeters), is probably okay. <A> Repairing electronics is an interesting and sadly disappearing art. <S> Everything I've learned about it <S> I've learned from one blog: <S> Keith's Electronics Blog <S> Apparently it's his job to fix electronics and he has decent writeups on everything he does. <S> From what I've read, 90% of the time it's the power supply - and he's written up power supply fixing. <S> I would read his blog for no other reason than it's interesting, but also it will probably give you an idea of what fixing your speakers will require and whether it's worth it. <S> Good luck.
|
Make sure the speakers are actually okay, by testing them on another system, if possible, or by testing another set of speakers with the amp.
|
How to get Video Input I help maintain an old beaten down LED sign on the side of a highway. Right it has a program running on Win98 to generate the image that should be on the sign (FLASH animation, temperature, etc), and drive a PCI IO card which in turn drives the sign logic. I'd like to (be able to) replace the control package of the sign with something less painful. A different sign we're working on has a DVI input to a control board. The control board takes a specific portion of the video and sends it off to the sign. I like this scheme because it makes it easier to change out the computer if it breaks, and allows a lot of freedom in terms of what software/hardware can be used- so long as a PC has a DVI port, it can drive the sign. Core Question: How can I go from 'video input' to a copy of what is on the screen for consumption by digital logic? The one thing I've come up with so far is using a TFP401A , and feeding that into an FPGA where a lot of accompanying logic would sit. Does that seem reasonable? Is there a better way? At least one concern is that I don't have any experience with high frequency design- I'm not certain how much care needs to be taken on the traces between DVI connector and receiver, as well as from receiver to FPGA. EDIT: Few added details: The sign is low resolution (47x127 image, 24x64 sign) It displays animation (refresh rate > 10Hz) I'd prefer something without dependence on software on the PC (suggests taking a video signal of some format) This is 80% learning experience- while the goal is a practical replacement system, I would like to end with the knowledge of how this can be done. <Q> The fundamental question here is how fast you need to update the sign's image. <S> (And placing something that shows video next to a highway seems like a very bad idea) <S> You're probably best off using a frame-buffer in your hardware, and using something like a FT232 or FT245 to dump images to it. <S> The FT2 <S> ** <S> IC Gives you ~8 MBps of interface bandwith over USB, and a dead-easy software driver you can talk to. <S> Alternatively, depending on your sign's resolution, you could use a simple serial interface. <S> I would assume you would be sending raw bitmaps to the sign (it makes the software end easier). <S> Then you just cache them in the hardware, and then serve them up to whatever interface the sign implements from your hardware. <A> How about something simpler? <S> Perhaps a compact flash card with a bitmap image file or GIF89a on it?A microcontroller could read the card and drive the display. <A> Decoding DVI is going to be tricky - some cards provide digital+analog, while some only provide digital outputs. <S> And resolution can of course vary.
|
I think you'd be better off with a simple serial interface that you could connect to the computer to and send commands, e.g. "turn LED 3,4 on red", "draw this sprite", "clear screen"... If you don't need to update it more often than once every few seconds, DVI is WAAAAAY overkill.
|
General directions for a timer circuit which will not use microcontroller and which can measure several hours needed Some background info first: In my country, price of electricity depends among other things on the time of the day when energy is used. Because of that, many people tend to turn on big energy consumers after midnight, when electricity is cheaper. One of my friends needs a new laundry washing machine, so I went browsing with her. We noticed that many new machines have a delayed start option which would be very useful because it would be possible to fill the machine and program it and it would start working by itself during cheaper time. I don't think that it would be too complicated to make a circuit which will start a washing machine after X amount of time. More relevant part: After examining my washing machine, I noticed that machine itself is started by a normally off pushbutton. I'm thinking that the button could be replaced by a transistor or some sort of normally off relay. Anyway that's not (yet) the problematic part for me. The question itself: How would I design a circuit which would wait for several hours and then "push" a button without using microcontrollers? I know that a microcontroller is the most elegant solution, but I'd rather skip collecting necessary gear for working with them at this time. Discrete logic gates, flip-flops or anything else which doesn't need a programmer is acceptable for me. My first idea is to create or find prefabricated some sort of counter which would be connected to a slow oscillator. The oscillator would have very low frequency (say 2Hz if possible) and the counter would send signals to a device which would respond when counter reaches a certain number (say after 18 000 seconds). I was thinking about using 74LS162/3 counters. In 74LS162's datasheet under minimum frequency it says 25MHz if I'm reading it right, so I guess that it doesn't fit my needs, but 74LS163 has 0 as minimal frequency so it looks like a logical choice to me. As for the oscillator, the slowest crystal I could find is 32 768 KHz which is too fast for me. I thought about using capacitor and coil to make my own oscillator. Some (maybe too) basic calculations tell me that L*C needs to be 1.989*10^-2. What capacitor/coil combination would be good for that? I didn't think too much about power supply, but I'd either use "wall-wart" adapter or check the insides of the washing machine for any available power sources. The last part of my question are vibrations. Are there any special considerations for circuits which are going to vibrate? I was thinking of using one of those solderable protoboards for basic circuit board. I know that a book can be written for every point, but at this moment I'm just looking for some rough ideas. <Q> CMOS 555 timers can be used to achieve delays of hours. <S> A C of 4,700µF and R of 15 Mohm would time for 7550 seconds, or 2.09 hours (2 hours, 5 minutes, 50 seconds.) <S> Due to the input current on bipolar 555 timers, they cannot be used with such large resistors, similar to how you cannot use high valued resistors with bipolar op-amps. <A> I know you specifically said that you did not want to use a microcontroller, but I think you should consider taking the plunge into the microcontroller world. <S> Doing a timer like this is very easy to do on a very cheap micro since you don't need it to do anything special. <S> In general I have found that using a "complex" circuit of discrete components is usually plagued with minor errors in both design and construction that cause them to take a lot of time and money. <A> I have used these in the past for long interval timer projects - before PICs came along :-) -=mike=- <A> I think the best solution is to use CD4060 with a crystal oscillator which can produced 1Hz pulses. <S> Then use a counter using the 1Hz pulses as clk and use it to count the seconds. <S> There are problems with 555 timer approach. <S> The resistors and capacitors use to set the frequency are not all that accurate, and they drift with temperature. <S> Actually the 555 Chip itself can drift with temperature. <S> Check this site: hackersbench.com <A> For what its worth... <S> I implemented a circuit on my dryer for programmed start with an Omron PLC. <S> There is a button for ARM and a button 4hr / 8hr setting. <S> The PLC has 6 inputs and 4 outputs. <S> The outputs go to the buttons and one is paralleled with the dryer start switch as you mentioned. <S> (might be a relay in there too for the dryer switch) <S> The PLC was a cheap one I bought second hand on ebay (Omron CPM1A). <S> IT takes 120v AC as an input and provides a 24v DC output for driving relays (or switch lights in this case). <S> Works <S> well. <S> It was interesting to program with ladder logic too. <A> buy one of these that fits your countries power system, they make digital ones too that aren't much more expensive if you need greater control. <S> Plug your devices and an AC relay rated for your countries power into it. <S> Use the relay's output to "push your button" however that needs to be done for the particular device.
|
Have a look at basing your circuit around a CMOS 4060 14-stage ripple counter and oscillator.
|
Best solution to get 3.3V from 5V-20V @ 250mA For my Super OSD project, I need a +3.3V supply at 250mA from a variable input of 5.5V to 20V. Cost is a concern, as is size. Originally, I considered an LM317 in a SOT-223 package, due to the small size. Unfortunately, it's difficult to get a heatsink for SOT-223 packages. Then I did some calculations; the LM317 would be dissipating up to 4.175W with 20V input and 250mA of load and with a θJA of 140°C/W, the LM317 would cook along nicely at 584°C above ambient. So not practical. The next solution would be a little buck converter, but I'm looking to get a small design and a cost of <$3. Does anyone know of an ideal chip for the job? Or is it still possible to use a linear regulator? I'd prefer to do so, but getting rid of the wasted heat is really a problem. Power efficiency is not critical for this application, as an electric motor will be drawing 10's of amps, compared to the few hundred mA for this module. <Q> I'd look at some of the electronics distributors out there with good parametric search capabilies like Digikey, Newark, or Mouser <S> that might have something already designed that will work for you. <S> Although it's a little more expensive than your $3 cost target. <S> Look at this drop-in switching regulator. <S> It handles the output current and input voltage range you've specified. <S> It's $5.10 in quantities of 100. <S> Take into consideration the time saving cost benefit of not having to design one yourself. <A> This buck converter is $1.19 in 1000 unit quantities. <S> Input 4-40v, output fixed at 3.3v or three other voltages or adjustable from 1.3 to 37v, @500 ma. <A> You could use a mc34063 chip as a step-down converter. <S> There is a calculator here which you can fill in and get the right parts out of it. <S> So is for the inductor. <S> Those will probably be the 2 major expenses, as with any switching supply. <S> I think you should be able to design such a circuit for under $3. <S> It's possible to get that chip for under $0.30 at digikey (at quantity)
|
There are number of companies that offer drop in switching regulators that might meet your needs. Note that you need a good diode, i.e. one that is fast enough to switch your operation frequency, and is able to handle the peaks (Schottky).
|
What is a good way to learn the Parallax Propeller chip? I am experimenting with the Parallax Propeller chip but don't have any ideas for projects to learn with. What are some good strategies on how to learn this chip? Are there any techniques or projects I should try? <Q> Whenever I start with a new microcontroller I always go back to a few of my standard projects. <S> The things I enjoy playing with most are RGB LED's, 7 Segment Displays and i2c real time clocks like the DS1307 <S> + <S> My first projects almost always revolve around something I am familiar with like these components. <S> I might start off with just lighting up the RGB leds. <S> Then I'll get more adventurous and work out PWM on the chip and start making lots of different colours. <S> This gives me some time with the development tools and I can start to learn my way around the chip. <S> This is just as important as what to make or how to learn about the micrcontroller you are using. <S> Most controllers these days have a reasonable library so it should be relatively easy to get i2c going. <S> So that instantly opens up a world of add on components to play with. <S> The RTC chips are pretty easy to get going and they teach you a few programming techniques like BCD conversion. <S> Seven segment displays are also easy and fun. <S> You can play around with single displays or even use the microcontroller to multiplex additional displays. <S> Not hard to get going and the projects are semi useful and fun right off the bat. <S> So by learning i2c, seven segment and driving leds. <S> You can now build a very simple clock. <S> Now I realise these aren't propeller specific, but for anyone starting off it might just give you an idea about what to try! <A> You will find lots of projects on the Parallax Propeller forum. <A> This means you are forced to work through problems, which is usually where you learn the most, as problem solving requires more knowledge of more aspects of the system to track down the problem. <S> If you are just tinkering, you tend to wander aimlessly around problems instead of working through them. <S> Think of it like learning your way round a city. " <S> Go find this particular resturant" will make you learn more of the area than "go find any resturant". <A> There is a weekly podcast where this registered nurse asks a couple of propeller guys question after question about this chip. <S> She doesn't know anything about it going in - <S> so it's pretty much perfect for any one who's interested in learning about Propeller and Spin. <S> Funny to boot, which is always nice. <S> You can find it over at http://FirstSpin.tv/ <A> the education kit book is a must read to learn the propeller. <S> It contains a gentle introduction to the SPIN langage and a bunch of exercices for every concept introduced. <S> Also, you don't have to actually purchase the kit if you already have a propeller chip. <S> You'll only need very common components to follow the book (a bunch of LEDs, resistors, push buttons, etc...). <S> It's also good to know that you don't need to purchase a PropPlug to program the microcontroller, most FTDI adapters will do the job (I use the much cheaper USB BUB from modern device myself). <A> I tried a few basic LED blinkenlightz experiments with the Propeller and found I liked it a lot. <S> So I plunged ahead and bought a Stingray <S> … I have to admit it has mostly languished on my workbench since then — <S> but that has more to do with my day job than with the kit. <S> The cool part about the Stingray is that it's a very bare-bones chassis. <S> It's sort of a blank page as far as fun robotics experiments go. <S> And the Parallax forums are simply awesome! <S> If you're a Mac user, there's even a tool called bst <S> (Brad's [?] <S> Spin Tool) <S> that lets you develop code on your Mac natively rather than forcing you to run a toolchain under Windows.
|
The best way to learn any new chip/language/devtool/whatever is to have a definite project that you want/need to get working.
|
Software To Create Karnaugh Maps Does anyone know of any (foss) application to create karnaugh maps. I don't need a K-map solver, just to be able create them so I can export them to ms-word. <Q> There is at least a LaTeX package for Karnaugh maps and Veitch charts . <S> K-map on sourceforge looks promising too (though the source included no Makefile). <S> I hope we'll see others listed here! <A> If you are looking for software to simplify logic equations or create logic diagrams from truth tables I would recommend Logic Friday . <S> I think there is an export feature as well. <A> It can generate html reports, that can be printed after, and (but it has some bugs as I can find) can copy k-maps images to windows clipboard. <S> In free version it is some watermarks added to K-Maps images, but I think in your case that is not a problem. <S> In other reasons that soft seems as dynamically developing and I think it grow up more functionality in the nearest future. <A> I found that the Gorgous Karnaugh was moved to the http://gorgeous-karnaugh.com .Also <S> , I find the couple of coupon codes to get discount - 'fallexams' and 'springexams'. <S> As written on site, this codes have limited time to be applied, but this codes can be used throughout the year. <S> Apparently, there are lazy guys removes announcements about discounts, and do not change the discount itself. <S> With coupon it seems to be easier to buy than to find serials/cracks, or keygens. <S> My friend saves a few bucks using this small lifehack ;) <S> Maybe someone handy ;)
|
I seen nice program that can pretty draw k-map at purefractalsolutions.com , it's named "Gorgeous Karnaugh".
|
How to remove solder from via? I am trying to swap dead capacitors in my motherboard. Removing them was relatively easy, but I can not insert the new ones. The solder melted into the vias and the desoldering wire does not suck it out of the hole.Is there any safe method to remove the blocking solder from the vias? <Q> Have you tried a desoldering pump ? <A> Beyond what has already been answered, you can try to use wick solder remove. <S> There is a great article at wikipedia: http://en.wikipedia.org/wiki/Desoldering <S> And Youtube has many videos about: http://www.youtube.com/results?search_query=desoldering&aq=f <A> If you do it fast enough, you end up with the solder frozen on the wire sticking out the other side of the board, and you can break the solder off and then just pull the wire back through. <S> Another thing that sometimes works is to heat the via and then quickly tap the board against the edge of a bench, moving the board in a short swing in the direction of the via. <S> The inertia of the molten solder will cause it to keep going forward (and probably onto the floor) when the rest of the board stops. <S> And (obviously, I had thought) <S> you don't want use this technique on any but the sturdiest of boards . <S> Like the blowing technique, the down-side of these is that they can produce tiny, loose bits of conductive material to watch out for, which can cause shorts if you don't get them all. <S> Suction is really the way to go. <A> Thanks for your tips. <S> Here are my observations: desoldering pump - After cleaning and oiling my pump <S> I had still no luck with it. <S> Maybe I have to practice more :) <S> desoldering braid - Adding some fresh solder before using this definitely improves the cleaning effect, but it leaves the solder inside the hole. <S> I've tried three different types of solder wick without success. <S> tap-tap method <S> - It seems usable for smaller boards but not for a computer motherboard <S> so I have not tried it. <S> Pushing out - I had no thin solid wire here, so I added a little extra solder and heated the via while pushing in the new capacitor from the opposite side. <S> Sometimes worked but this thing has two legs and I have only 1 soldering iron :) <S> Blowing out - I tried to blow with my mouth without any effect. <S> Then I found something in my drawer: <S> It is a plastic bottle with metal needle head, 1 USD from DX . <S> I inserted it to the hole from the opposite side <S> then I heated the hole. <S> After removing the soldering iron I quickly squeezed the bottle. <S> It cleaned out the via! 8 of 10 times I was able to insert the new component to the hole without problem. <S> For the remaining two holes I used a sewing needle to broaden the hole. <S> Still not the best method, but it worked for me better than any others mentioned here. <S> However I am considering to buy a vacuum desoldering tool to save a whole day next time :) <A> If you can justify it, look into a desoldering iron, such as the Pace <S> SX-90 . <S> I've found them very useful because you don't have to remove your heat source to suck out solder <S> , they're temperature-controlled, and they also can pull vacuum indefinitely. <S> (They use a vacuum pump, instead of a spring piston.) <S> Granted, the Pace iron requires a controller, but that controller can also control a temp-regulated iron as well. <A> Try melting the solder and blowing it out. <S> You might find that desoldering braid works better if you add some more solder to the pad, first. <A> What soldering Iron are you using? <S> Or more specifically the ground plane is sinking enough heat to not get the solder up to the proper temperature. <S> I use a metcal MX500 and when i have this issue stepping up to a larger tip usually transfers enough heat to solve the problem. <S> As a last step you can try a hotter tip, or if your using an adjustable iron, turn the heat up, just be careful not to go too high, if it gets too hot the pad will separate from the board. <S> Failing that, hold the board on edge, apply heat to the back side of the pad while pushing the cap in the top side, move the cap in as you move the iron out. <S> This usually works for me. <A> Here's a cheap and easy technique which works better than any other method I've tried. <S> First, get a good quality turkey baster which can withstand high heat. <S> Amazon sells silicone hear resistant ones for cheap under $5.00. <S> Make sure you are using an iron capable of a wide heat range. <S> Most simple plug in type irons just can't deliver enough heat. <S> Apply a blob of solder to both sides of the via. <S> Add paste flux to both blobs, but wait until they are sufficiently cool. <S> You don't want the flux to liquify and run off the hot blob. <S> Anchor the PCB vertically between vice jaws or two heavy objects. <S> Then immediately heat the other side of the with the iron. <S> As soon as both sides liquified suction in quicky squeeze the turkey baster's blub to blow out the solder. <S> Make sure you cleanup and solder droplets when you're done.
|
Sometimes you can just push the majority of the stuff out, by quickly pushing a couple inches of un-heated solid wire through the hole while the solder is melted. This sound suspiciously like the pad's your having a problem with are tied directly to the ground plane and your iron isn't transferring enough heat effectively. Using the iron at a high setting, heat one side until it melts and immediately place your turkey baster's tip over it and hold it there. Then I tried a dust blower, but I cannot aim it precisely into the hole. You could use a vacuum action, but unless you form a really good seal around the via, it doesn't work very well.
|
Small, inexpensive microcontroller capable of high speed SSP? I'm looking for a small microcontroller that can accept high speed serial data. NXP calls it an SSP peripheral -- it works with an SPI, Microwire or SSI bus, and I'm using it in a 32-bit SSI application. By small I mean both physically (under 50 pins) and in terms of RAM/Flash (the 8 KB RAM and 32 KB Flash is more than enough). High-speed means working as an SSI slave with clocks up to about 50 MHz or so. I'm currently using an LPC2103 , and it performs pretty well up to about 2-3 MHz as an SSI slave, but I can only see the first 16 bits of the 32-bit word. I'm using both the SSP and SSI peripheral to grab all 32-bits, but that's a real kludge and for the next version I'm hoping to do away with the speed limitation and word length barrier. As far as architecture goes... it's really open. The LPC's ARM7TDMI of course, but PIC or AVR would work just fine, I'm not tied to any particular architecture and have worked with practically all of them at one point or another. I'd even looked at a small FPGA chip, but it's also near impossible to find a low pin-count FPGA with a large number of programmable logic. <Q> An XMOS chip can easily manage 50 MHz SPI in software, the I/Os can handle 100 MHz events. <S> A CPLD such as the Altera MAX II could also be used with a PIC or AVR. <S> They are available in small 44-lead packages but development would be harder. <A> You're not going to find a 50MHz serial port on a PIC or an AVR as far as I know. <S> Why not slow down the baud rate generator on the master when talking to this slow device? <A> This might be one of the niches where a PSoC would fit. <S> If I were you, I would ask the people at the PSoC forums http://www.psocdeveloper.com/forum/ : "Can the PSoC digital peripherals can be configured to emulate a 32-bit SPI/SSP slave at 50 MHz?"I <S> see that some people have already programmed a Cypress ARM Cortex PSoC device to emulate a 16-bit SPI slave at 33 Mbit/s. <S> http://www.cypress.com/?docID=37034 <S> I suspect 32-bits would be easy on a PSoC; perhaps even 50 MHz.(Some Cypress PSoC ARM Cortex chips are rated at 80 MHz). <S> 50 MHz as a SPI/SSP slave is pretty difficult. <S> I see that one SPI debugging tool can only listen to SPI traffic (more or less as a slave) at 25 MHz --although <S> it can drive the SPI bus at 50 MHz (as master). <S> http://www.byteparadigm.com/kb/article/AA-00701/0/What-is-the-maximum-frequency-of-SPI-Xpress.html <S> Another SPI debugging tool apparently can listen to 100 MHz SPI traffic. <S> http://support.saleae.com/hc/communities/public/questions/200362675-BBB-Arduino-RasPi Even hard-wired logic, using something like the 74HC4094 or 74HC595,their datasheets claim the chip can "typically" go 50 MHz <S> but it's not guaranteed. <S> You may be forced to use a CPLD or FPGA to handle this fire-hose of data. <A> Several years have passed. <S> STM32H750 seems good enough, https://www.st.com/en/microcontrollers-microprocessors/stm32h750-value-line.html <S> Core Speed: 480MHz <S> SPI SCK: ≥ 100MHz for both master and slave Price (budgetary): <S> $3.37 <S> I have considered XMOS. <S> It is perfectly a good match for my requirement but not massively available due to its high price.
|
My guess is you'd need to look at something on the order of a cortex-A8 SoC to get peripherals that fast.
|
What's the best way to protect a board from corrosion in a hot/moist environment? Some of my projects need to live outside for long periods. Sometimes, moisture gets into the enclosures. That means that a circuit board might be sitting around in contact with water for hours on end at upwards of 100F. I've noticed that solder joints can start to corrode, and recently moisture made it under the solder mask on a board and actually ate through one of the traces, breaking the circuit. I know the ideal answer is to make a perfectly sealed enclosure, but I'd like to toughen the boards up a bit as a second level of defense. Can anyone suggest some tips and tricks for making PCBs more corrosion resistant? Does scrubbing off excess flux help? What about spray acrylic sealant? Special solder? <Q> I know from experience at one of my previous companies that it does help. <S> Material varies, but the article in the above link explains a lot and internet searches for "Conformal Coating" will yield many products. <S> I have used brushes to apply the coating after reworking PCBs, but in volume production, spray or dipping are used. <A> The coating zebonaut mentioned is the best solution. <S> Another thing to pay attention to is avoiding DC voltage gradients wherever possible. <S> What I mean is that when your choosing which pins to use on parts, don't choose 2 adjacent pins such that one is almost always say, +5V, and the other is always 0v (GND). <S> The constant voltage gradient between the two pins will drive electro-chemical reactions, corrosion and the like. <S> Try to separate pins when possible, use the lowest voltage possible, and as a last option if the signal levels can be modulated, even if it serves no purpose but to modulate them, such as pulsing an LED or a switch you don't really need to, do it to avoid the constant gradient. <A> In re conformal coating: a garage shop I talked to once admitted that for conformally coating boards, they just dipped them in urethane deck varnish. <S> They claimed this worked well enough that they used it for PCBs for salt-water marine installs. <S> I actually got them to do a dead board for me. <S> Cosmetically it wasn't nice (ever seen an epoxy-coated board? <S> Like that, big drips and all) but coverage was 100%. <S> I chickened out of trusting them with the real thing though. <S> For a hobby project or a garage shop, I think it's worth trying. <S> The big problem with any conformal coating is masking - keeping coating out of where it shouldn't be. <S> Given that most coatings are transparent and thus noninspectable (my experience is that UV dyes don't homogenize and so are worse than useless), process is everything. <S> Do it wrong <S> and you're dead. <S> Dipping has the advantage that you can keep connectors clear if they are all on one side. <S> If not, you can use an acid brush to paint around them. <S> In summary: haven't tried it myself, but <S> "Home Depot Brand" coating is what I'll try if I ever do my own outdoors project. <A> I used to "paint" the ready PCB with rosin soluted in alcohol. <S> When the alcohol evaporates, it leaves a air-sealing rosin coating on the PCB. <S> However I don't know how it behaves in outdoor conditions maybe it melts in hot. <S> , here is an overview: http://www.acc-silicones.com/products/conformal-coatings-from-acc.ashx <A> Conformal coating (something silicone-based) is the less extreme solution, but if your part is small enough (or environment harsh enough) you might consider potting it. <S> However, when potted, boards will be extremely difficult to rework if needed, while conformal coat is somewhat easy (if annoying) to scrape off. <A> I can tell you the conformal coating things are worth crap in the marine industry <S> it has to be completely encased in potting
|
Sounds like your boards are in a very tough environment, but anyway, it is common practise (and an accepted industry standard) to use so-called Conformal Coating . Alternatively there are special PCB protecting sprays
|
How to resolve I2C address clashes? I want to connect multiple I2C slave devices to a micro controller all on the same set of pins but the I2C devices all share the same address. The addresses are fixed in the hardware. Is there any way to connect multiple devices with the same address? Perhaps some kind of I2C address translation module with each device with an configurable address so I can assign my own addresses to each one. <Q> There is nothing built into I2C to do this, normally slave devices will have some externals pins that can be set to 0 or 1 to toggle a couple of the address bits to avoid this issue. <S> Alternatively I've dealt with a few manufacturers that have 4 or 5 part numbers for a part, the only difference being its I2C address. <S> Most devices have specific hardware that handles the I2C communication, that is the slave ACK is in hardware <S> so you really can't hack around it. <S> As for the translation module, you could buy some $0.50 PIC's with 2 I2C buses and write some quick code to make them act as address translators i guess. <A> I've just run into this problem with multiple I2C devices with a fixed address. <S> Our solution was to use I/ <S> O lines on the microcontroller to force the SDA lines high on the devices that we don't want to address, while the I/O line for the device we're targeting is set as input (high impedance). <S> This means that only the targeted device matches it's I2C address and the others ignore any subsequent data. <S> The resistors on the SDA line for the inactive devices end up acting as pull-ups for the bus, so the exact value will depend on how many devices you have and what pull-up you need for your bus. <S> So if you choose 10K resistors, then 3 inactive devices gives a 3K3 pullup. <S> The schottky diodes ensure that the device can still pull the SDA line low enough when transmitting data back to the host. <A> If none of the I2C devices use clock stretching (handshaking), and if you're bit-banging the I2C master, a simple hack is to have some of the devices swap the clock and data pins. <S> During the transmission of a byte, the device which has the clock and data pins swapped will see each "0" bit as a non-event (data rising and falling with no clock) and will see each "1" bit as an I2C stop and start (clock rising while data is low, fallowed by data rising and falling, followed by clock falling). <S> Intentional stop and start conditions for one device may be seen as data bits by the other, but unless one device has an excessive number of start and stop conditions between "1" bits, it would be unlikely that any device would "accidentally" see a start condition followed by eight data bits without an intervening stop condition. <A> Bus switches are very low capacitance and resistance, and unlike buffers/drivers, they are true switches that connect or disconnect two circuit nodes. <S> Bus switches usually have one odd characteristic, that doesn't matter for I2C because it uses open-drain devices: a bus switch has low on-resistance when tying together voltages near 0 <S> (Vss), but <S> the resistance rises dramatically as the voltages approach the power supply Vdd. <S> (This is because they're basically MOSFETs with gate voltages at the power supply when they turn on, so as the switched voltages approach Vdd, the available Vgs is much lower) <A> I had two TCS3414 color-light sensors that I wanted to compare (The FN and CS packages, which have different filters). <S> The I2C address is hardwired. <S> After looking at how I2C works in terms of the SCL(clock) and SDA(data) lines, it seemed that turning off the SDA line would prevent the chip from getting a start or stop bit and thus leave it dormant. <S> So used a CMOS analog switch (4066B) to switch on or off the SDA line to each device. <S> This worked just fine for switching between the two devices. <S> I know it's a hack, and the PCA9548 would be much better, but I didn't have one handy. <A> There is now an answer- <S> Linear Tech has the LTC4316/17/18 series of address translators. <S> They are relatively new, and availability is uncertain. <A> Several manufacturers offer I2C bus multiplex- and switch ICs. <S> A mux can activate one channel at a time; a switch can enable multiple ones in parallel. <S> Check for example <S> the offerings of NXP , TI and Maxim . <S> For experimentation, Adafruit has a TCA9548a board . <S> If you have 8 target chips with identical addresses, select an 8-to-one MUX. <S> Before accessing any of the target chips, configure the MUX to activate the correct I2C bus. <S> Advantages Requires no programming (vs microcontroller based approach) <S> Can support the I2C features and speeds you need (vs regular analog / digital bus muxes). <S> For example, a regular (non-I2C) MUX will not pass general call addresses to all its channels.
|
I'd consider using bus switches to multiplex the I2C bus among the devices with conflicting addresses.
|
Does it make sense to use MWh/h as unit of measure? Since MW is actually the rate of energy is being used, why would we use MWh/h as in Fingrid 's electricity market Load and Generation forecast page ? Wouldn't MWh/h be the same as MW??? <Q> MW is a unit of power. <S> MWh/h is a unit of AVERAGE power during a certain period, so it is used to show ENERGY consumption. <S> For example, I as a consumer can be buying power from the utility with a 1 MW power (that is, I pay to have a MAXIMUM DEMAND of 1 MW) <S> but I only consume 12 MWh of energy per day, so <S> I have an ENERGY consumption equivalent to 0.5 MW - flat. <S> To distinguish between one and the other, the first is referred to with MW, while the second one might be referred to as MWh/h. <A> No, it doesn't. <S> h/h = 1, so it's MW. <S> But power companies never made sense anyway :) <S> Maybe they think the target audience doesn't understand watts but have a vagues idea about what MWh is and know how to think of magnitudes per hour. <S> (And fingrid? <S> What shame. <S> ;) <A> agreed, it is power companies trying to keep their end simple consistent. <S> As people are generally billed in kWh or (MWh for big business?) <S> it is simpler to indicate the a unit of power per time period. <S> * kWh and MWh are alternatives to joules for representing an amount of energy, <S> * kWh/h and MWh/h are alternatives to kW and MW for representing power (or energy production/consumption). <S> As appliances as generally rated in W (or kW) telling people they have been charged for 100MJ of electricity might be confusing to the end user, so instead they have opted for kWh as the unit for energy. <S> The kWh/h and MWh/h is just an extension of that, to provide end users with units that have meaning to them. <S> For example Fingrid is now generating enough power to supply a 1,000,000 fridges (assuming 1kW fridge). <S> So it does make sense, in weird non scientific kind of way <A> It clearly makes sense. <S> Consider it as Joules rather than kWh: kW = <S> J/s Instantaneous energy consumtion. <S> A graph would often look like white noise. <S> kWh/h = <S> J/h Energy consuption per hour <S> , you will see the morning, dinner and night in a graph. <S> kWh/month = <S> J/month Energy used per month. <S> In a graph you see summer and winter. <S> kWh/ <S> y = Joule per year Energy per year. <S> In a graph you will see "hot" and "cold" years and climate change. <S> For the total world consumption: 16 kWy/y ca 400 EJ/y = <S> ExaJoules per year. <S> To write 16 kW here would express worlds instant energy consumption or Joules per second, not very informativ. <S> All are energy per unit time, but by changing the actual time periode one can address different aspects of energy consumtion.
|
MWh is a unit of energy.
|
How to clean my soldering iron tip or how to determine that it's beyond repair? First, I've read though questions Soldering Iron Maintenance and Going through Soldering tips quickly and was unable to solve my problem. I have recently (as in less then a month ago) obtained Multitip 25 ERSA Microsoldering iron with 0172BD/10 tip. From the start I had problems wetting the tip. I tried everything but solder just wouldn't flow over the whole tip. I later found information in one of manufacturer's catalogs that I should wrap solder with flux around the tip and then turn on the iron. After few tries, I managed to get a big part of the tip wet (and it was working great), but one small part wouldn't wet. After some soldering I decided to try to get whole tip wet and obtained 0TR01/SB tip refresher. After using it according to the manual, the whole tip was covered in black substance which should be easily removable, but it isn't. Now about half of the tip is contaminated and about half seems to be working (I managed to clean the working part). My question is: Is there any other way to clean the tip? Two things from questions I linked I didn't use were dedicated tip cleaning mesh (couldn't find a source of them in my country) and flux outside the wire (because I don't have any at the moment) and how to decide when a tip is dead and needs replacing? Also, how do the tip refreshers feel (I'm assuming that they are more or less all alike)? I often find them described as paste, while the one I got is solid (but melts when in contact with hot tip). <Q> (Solid) tip "tinners" are almost always ammonium phosphate with some tin (or tin-lead) bits mixed in. <S> They are moderately aggressive at cleaning oxides off, so shouldn't be used constantly, but only when needed. <S> Practice good tip care. <S> I use a Hakko iron and tips at work and mine <S> has lasted about a year (moderately light use, maybe 5-6 projects). <S> Put a good amount of solder on the tip when storing it or leaving it idle for any length of time; don't , for instance, wipe it off, put it in the holder, then leave it on over lunch. <S> Additional guides: <S> Hakko <S> Tip Life Checklist <S> (PDF, attachment to above KB article) Adafruit <S> Tip Tips (PDF) <A> Well, the solution to my problem turned out to be both very simple and very unexpected. <S> I decided to buy a real stand for my soldering iron and the one I got came with its own sponge. <S> It did a great job cleaning the tip and the tip looks like brand new now! <S> The sponge itself as a spare part is just about 2.5€, so the moral of my story is don't try to save money on the sponge! <S> Buy a high quality sponge and save yourself lots of headache! <A> Cheap soldering irons (the unregulated kind that run at 10-25W and the power cord goes straight into the handle) have a lot more problems with corrosion than the nicer regulated irons. <S> It doesn't matter too much if it's ugly, as long as you can get a nice shiny bit right at the tip. <S> Dedicated tip cleaning mesh is the best thing I've found for that, but the traditional damp sponge works fairly well. <S> Just try to wipe it off after every 4-5 solder joints. <S> Don't worry too much if the whole tip isn't nicely covered in solder. <S> You only need the last 5 mm or so - the part that comes in contact with the parts you are soldering. <S> As a last ditch kind of thing, I've been known to go after a badly corroded tip using a metal file. <S> I'd only do this on a really cheap iron, but I had one where the tip had been eaten away in an irregular pattern <S> and I was able to reshape it and get some more use out of it with the metal file. <S> Do not try this with a fancy iron like a Weller or Hakko that has a ceramic tip. <A> I've always used this stuff: <S> https://www.digikey.com/catalog/en/partgroup/ttc-lf-mm01921-lead-free-tip-tinner-cleaner/64996 <S> It can't repair all tips, but it does a pretty good job on ones which are slightly oxidised. <S> I haven't found it gets stuck on the tip; just melt some solder on it after wiping the iron through the stuff to tin it again. <A> Sal ammoniac. <S> Comes in a block and you can buy it at Delphi Glass for about six bucks. <S> I have used one block to clean the worst on my irons over the years as I forget to shut them off when I get busy or to add solder before shutting them off. <S> I still have the block I started with 20 years ago <S> so it is a bargain. <S> The block creates a smoke when you are cleaning, but it dissipates very quickly. <S> I agree with the others, don't scrub your tips or file them if you can help it. <A> Have you tried a tip polish to remove the black oxidized parts of the tip? <S> It's fairly inexpensive so it may be a good thing to try. <S> Plus it doesn't hurt to have it around to clean future tips. <S> http://www.gotopac.com/FS100_01_Tip_Polish_p/fs100-01-hak.htm . <S> That may work. <S> If it doesn't I would suggest just replacing the tip. <S> Most tips are not very expensive and depending on what kind of solder iron you have, can be fairly easy to find. <S> Just make sure you tin the new tip right away before using it for any soldering. <S> Hope that helps. <A> Because @nick t said that a solution is mildly acidic I used distilled vinegar as a quick test. <S> Seemed to work wonders and <S> so now i am going to try to keep the tip tinned as this was not something I used to do.
|
If some of the oxides are just sticking really well, you could try to mildly abrade them on a brass sponge, copper braid, or similar, but you can't be too hard or you will damage the iron plating (good tips are typically copper core, plated with iron, then chromium everywhere but the working area). The best tip tinner is your solder--tips should always be coated with a small amount of solder. It doesn't work forever, and of course you must take good care of your tips.
|
Identifying the SPI master I'm trying to reverse engineer the SPI communications between two chips. But, it's not clear who's master and who's slave. I've found the chip select. Without lifting any pins or cutting traces is there a way to detect which end is asserting it? The chips are:CC1110 (SoC radio) and CY7C63803 (USB MCU). The chip select comes off of the SSEL (slave select) line on the CY7C63803 and into a GPIO pin on the CC1110. The CY7C63803 is an SOIC, so I could lift a leg, but I don't want to break it. <Q> It's difficult to use a GPIO pin on a slave device as a chip select. <S> If the chip select signal is not detected soon enough at the slave device after it is asserted you can miss the data that the master is clocking out. <S> Since the CY7C63803 has its SSEL pin connected to the chip <S> select line <S> my guess is that it is the slave. <S> The CC1110 is probably the master. <A> How about holding each of the chips in reset (in turn) and observing the CS line? <S> The theory being that the line will tristate while the chip's in reset. <A> How fast is it toggling the line? <S> If it is slow enough, you could you measure the voltage between the pins with a good multimeter to determine which side is trying to sink the current. <S> From pullup values/drive strength/trace resistance that I'd guess it might be possible with my 187 for instance. <S> Short of absolute proof though, mjh2007 is probably right; if one side is using the SS pin shared by the SPI hardware peripheral while the other uses some random GPIO, that's all but conclusive. <A> Try zooming waaaaaaaaaaaaay in with a really high resolution o-scope. <S> Maybe you can see the reflection on the trace? <S> The ringing at the load should be worse than the ringing at the source. <A> You'd need to figure out which way <S> the current is flowing-- <S> the upstream chip on the chip select line is the driver. <S> That's hard without cutting traces. <S> My best idea would be to place a coil of magnet wire connected to a large resistor next to the trace. <S> Measure the voltage induced in the resistor through the mutual inductance when the chip select line changes state. <S> The polarity of the voltage should correspond to the direction of current flow. <S> But honestly, that's just a theoretical answer. <S> Given that you're probably trying to detect uA, which would induce nV potentials in the coil, I think the chances of it actually working are very close to zero. <S> Maybe try it with a wire and a signal generator first, to see how small a change you can detect?
|
You will probably need to lift a pin on one of the devices to know for sure.
|
How to read the text printed on top of every IC? I find very difficult to read part numbers. I haven't figured out how which kind the ideal amount of light and inclination would help me. I also wonder why chipmakers don't paint the numbers in white for a better contrast. <Q> 1. Clean up the text with a cotton swab dipped in rubbing alcohol. <S> 2. <S> Wait for the alcohol to evaporate and rub yellow or white chalk on markings. <S> 3. Wipe gently with a cotton swab and bingo! <S> Source (in Portuguese): http://www.piclistbr.org/paginas.php?fname=%20dicas.htm%20&autor=%2009/2010%20-%20Luciano%20Sturaro <A> Also using a white paint marker will make a big difference in reading IC's: <A> Use a 10x loupe, very handy. <S> Occasionally some markings might be illegible after soldering and splattering some flux on them, so flux cleaner can help there. <A> I usually keep my digital camera with me when I'm working on stuff for this exact purpose. <S> Put it in Macro mode, play with the flash settings as required and take the photo at an angle between 30 and 45 degrees from board level. <S> Not only will the part numbers be plain as day - and you can zoom in for more detail - but the photos tend to look pretty awesome as well. <A> It sounds obvious, but have you tried a magnifying glass? <S> I always use one when trying to read part numbers. <S> Once I've done that, I usually print out a sticky label with the same information and stick it to the part. <A> I rarely have to break out a magnifying glass, <S> unless the print has started to rub off - bad design if you ask me, I've got a load of old 555 timers and 386 amps that are hard to tell apart as there's barely enough print visible to distinguish them. <A> I use a USB microscope with built in LED lights. <S> It is very useful for reading part numbers, but also comes in handy when reading values of resistors and small caps. <S> I'm not sure on the magnification range, but I think it's from 5x to 50x. <S> Around 10x-15x works well for reading part numbers. <A> The reason it's often hard to read is that the part number is often lasered, not printed. <S> (You wouldn't think manufacturers are idiotic enough to print dark gray on black, would you?) <S> Though a scanner may be more involved than a magnifier glass, I find that the lighting from my scanner makes the marking very clear, even when lasered. <S> And you also get a higher magnification than any magnifier glass will give you. <A> After reading the posts above, I decided to experiment with my digital microscope. <S> It's one of those $40 jobs from Celestron that plugs into a USB port. <S> Here are two photos of the same chip. <S> I cleaned it with alcohol and a Q-tip and dried it prior to shooting the pictures. <S> Other than that, the only thing that is different is the position of the microscope. <S> I did not even change the focus. <S> The first picture is from directly over the chip. <S> The second picture is at about a 45-degree angle. <S> Nothing was done to the chip between the two pictures except to change its position relative to the microscope. <S> The microscope has several LEDs around the lens to provide illumination, so even the lighting is constant.
|
Get an LED torch with blue or clear/blueish LEDs, it works well for highlighting the text on chips - and it's handy to have while rummaging through the dark depths of the parts cupboard! Sometimes you can change the contrast by wiping the markings with your fingers; the skin oils can change the reflectivity to make it easier (or more difficult) to read.
|
What do the colors of resistor bodies mean? I don't mean the colored bands, but the colors of the bodies themselves. They come in brown, blue, green, etc. Is there a standard? For instance, epanorama says : But there are two resistor body colors which you should know what they need if youre fixing some electronics circuit. Resistor body colors white and blue are used to mark non-flammable resistors and fusible resistors. If you encounter tjis type of resistor in the circuit do not replace it with normal reistor because this would cause fire danger is something goes wring in the circuit. Is this always true? Only with certain manufacturers? <Q> I've seen a few manufacturers that make their high precision metal film resistors blue and their generic paper/carbon ones pale brown, but I'd guess it's not a universal thing <S> ...it's like when Walkers (Lays) crisps messed around with the colour flavour combos, everyone had to relearn cheese & onion and salt & vinegar grrrr! <A> <A> You haven't seen different colors until you've seen inside a scope, or at least an old one. <S> From a HP 54501A. <S> You can take a guess at what the colors mean, but without knowing the manufacturers it is difficult, nigh impossible. <S> In this example suspect the green ones are precision (probably ±0.1%), while the pink and blue ones have larger tolerance, due to the relative quantities of them.
|
It's up to the manufacturer, it doesn't have any relevance to the properties of the device.
|
What to think about when designing HF PCB's? I am currently designing a small PCB in Eagle Cad that has a GPS 1PPS signal (one short pulse per second) as input. The pulsetime for the 1pss is something like 1us. Ok, I know thats not super HF but still. What are good design practises when designing PCB's for HF? Are curved corners of routes better then perpendicular? Is thicker routes better than thin or opposite? Groundplane = good? etc.. <Q> Howard Johnson has a massive collection of high-speed digital design newsletters. <S> http://www.sigcon.com/pubsAlpha.htm <S> One of my favorites visibly demonstrates the return currents that darron mentioned. <S> DC will flow in a straight line (the path of least resistance ; a straight line on the ground plane), while AC will flow underneath the signal conductor (the path of least inductance ; a mirror image of the signal path on the ground plane) <S> So avoid having that return path cross a split plane, avoid having it cross too many other high-speed return paths, etc. <S> Also, power planes can act like ground planes for a return path, and the return path can jump planes through a capacitor (remember, cap is a short to high frequencies); the return path always chooses the plane closest to the signal. <S> http://www.sigcon.com/Pubs/news/8_08.htm <S> I believe there are other newsletters. <S> For instance, 90 degree angles aren't really that bad; they merely add excess capacitance to the trace. <S> At "regular" high speed frequencies, this is no big deal. <S> But when you hit microwave, the parasitic capacitance can do you in. <S> http://www.sigcon.com/Pubs/edn/bigbadbend.htm <S> Regarding trace size, this largely depends on your stackup. <S> If you use a solid reference plane (ground or power!), then your trace impedance is a function of trace width and distance from the plane. <S> If you don't care about the impedance, then trace size largely doesn't matter, as long as it's not too small. <S> Unless you're trying to carry obscene amounts of current (amps?), in which case you need traces big enough that they won't melt! <S> i.e. for an 6 layer board, signal layers 1 and 3 reference ground plane 2, and signal layers 4 and 6 reference power plane 4. <S> If signal planes are adjacent, be careful that there are no long parallel runs that could induce cross-talk. <S> This is less of a concern <S> if there's a reference plane (although the return currents can still cross-talk, it's not as bad) <S> Keep clock traces and other strong sources of noise as far away from other traces as you can <S> (I think the rule of thumb is 5x the trace width away for clocks and 3x for other switching signals). <A> Yeah, that's not really HF. <S> Still... Ground plane, definitely. <S> The one big thing about noise if you remember anything is to think in terms of current loops. <S> All signals must have return current going back to complete a loop. <S> All else being equal... <S> the larger the area formed by the path of the signal and it's return current, the more noise you'll emit and receive. <S> So, if you've got a signal with a ground wire half a foot away, you're going to be spitting out a lot of noise and coupling a lot of external noise onto your signal. <S> One major reason for ground planes is that they provide a very very close return path for the signal. <S> Strangely, the HF components of return current tend to follow underneath the path of the signal trace and not just the straight path across a ground plane to the battery/input voltage. <S> If you think of minimizing noise in terms of minimizing return loops... <S> then most other noise-reducing steps become self-explanatory if not self-evident. <S> Like, you don't want to have a signal trace going across a big slot on ground plane if you can help it... since the return current will have to divert around the slot and create a larger return loop area. <S> Putting traces on your ground plane can also cause problems for the same reason. <S> You can do these things, you just need to try your best to route other signals in ways that don't cross them. <S> Vias are tricky. <S> If you have a typical signal-ground-power-signal 4 layer board, then when you transition to the bottom layer through a via, then the HF components of the return current may have to detour to the closest decoupling capacitor in order to follow underneath the bottom layer signal trace on the power plane. <S> So, put decoupling caps relatively near to any vias. <S> On cabling, twist the signal wires together with a ground wire. <S> If you've got ribbon cable, alternate ground and signal. <S> (Or ground-signal-signal-ground-signal-signal-ground-... <S> so that a signal is always next to a ground) <A> Probably best to keep the high frequency signals as direct as possible. <S> Place the IC/components you are going to feed the signal into right next to the input where possible.
|
Try to keep signal planes adjacent to reference planes.
|
Ceramic or electrolytic capacitors for a switching buck regulator? I'm using the LM2734Z (step-down DC/DC converter), which operates at 3 MHz. I'm using it to step down 4.8 V - 20 V down to 3.3 V +/-5%. Is it better to use ceramic capacitors or electrolytic capacitors in this circuit? They seem to show ceramic capacitors in the datasheet, but would electrolytic capacitors be smaller and better at filtering ripple and handling load transients? Size is critical for this product, and cost is a minor issue. I would like the operational temperature range to be -40 °C to +85 °C, if not that then -20 °C to +70 °C. <Q> With chips like that it's best to follow the manufacturer's design closely, unless you really know what you are doing. <S> Ceramics are generally preferred in that sort of application, they are smaller and more reliable than electrolytics, handle high temperatures better, and often have a lower ESR. <A> At 3 MHz, most electrolytics are useless due to ESL. <S> (Some ceramics, too. <S> Check the datasheets carefully!) <S> They're OK on the input side, but stick with ceramic on the output side. <A> If size really is critical, you're going to have to go with ceramic. <S> 5 <S> -10 years ago, this wasn't even possible with the values you might need (100uF) but it is today. <S> I think you've got it figure out about the ESR, the resistance with the capacitance will change the frequency response of the circuit, so that's the only thing to watch for. <S> I usually use LTSpice to simulate similar switching type circuits , as you can start playing with the detailed specs on the capacitors and see how the circuit responds (just choose one of the similar LT 1A buck switchers). <A> One big advantage of high-frequency switching regulators is that they allow you to use ceramic capacitors instead of low- <S> ESR <S> tantalum <S> (because you don't need such large capacitance values as you would in a lower-frequency regulator). <S> Tantalum is a comparatively rare material, not mined in that many places, so tantalum capacitors are perpetually expensive and difficult to buy in large quantities. <S> Large electronics companies have at times suffered delays in meeting high demand for their products due to shortages of tantalum capacitors. <S> Electrolytic capacitors have a high ESR in comparison to tantalum and ceramic, as well as being quite a bit larger.
|
Ceramic capacitors tend to be much cheaper and more available.
|
High output current hex inverter in SMD capsule I am trying to find a hex inverter which has as high output current as 74AC04E (50mA) but surface mounted. I haven't had any luck so far... <Q> They often come with 4,8,16,32 <S> I/Os. <S> Texas Instruments has a few, I chose them at random though, there are plenty of companies that make such parts. <S> likely at whatever voltage/current/propagation delay you could want. <A> You might want to use a Darlington driver chip with six or more channels. <S> Some come with built in inverters, and some come in versions with inverters and without. <S> These can output up to 500mA per channel, depending on thermal dissipation and the output current for all other channels. <A> You could try using a p channel mosfet. <S> Pull up the gate to your logic level, say 5 V, and connect a series resistor from your logic source to the gate. <S> This will invert a logic level of 0 and turn the p-channel mosfet on, and a logic input of 1, will turn the p-channel mosfet off. <S> So you have inversion, and current is only limited by your choice of mosfet. <A> The 74AC04E has a rated operating of current of <S> +-24mA. <S> The 50mA is the absolutemaximum rating which you should not be operating at. <S> There is also an absolute maximumrated current of 100mA into Vcc or GND for the package. <S> IIRC LVC family form TI has the same +-24mA output currents. <S> TI also has some power logicdevices. <S> Not sure is they have a hex inverter or just a shift register. <S> You could alsotry Allegro. <S> For CMOS devices you can parallel the input and outputs of gates within the same packageto increase the current drive. <S> Do not parallel gates from different packages.
|
You'll have better luck searching for what your after as a "inverting buffer" or "inverting line driver" or simply a "buffer" as many have an invert option.
|
How can I build a switching circuit that scales several 12v signals down to <5v? Let me start off by saying that I know just enough about electronics to be dangerous (how to solder, follow a simple schematic, and check for connectivity problems and usually figure out what each wire is for). I've installed a cruise control kit in my car, and I want to use a set of Honda steering wheel controls instead of the stock controls from the kit. The cruise kit controls are expecting 12 volts, but I'm not comfortable running any more than 5 volts through the small steering wheel wires next to the airbag wiring. I'd prefer even less, like 2-3 volts. So I need to build a switching circuit that will provide the 12 volt signals to the cruise kit. I was thinking of keeping it solid-state, since I don't know of any relays that will switch on 2-3 volts. However, if there's a good reason to use relays then I can. Here's a rough drawing of what I need: How can I get started with this project? <Q> The potential safety issue is the current, not the voltage. <S> You can use a resistor to limit the current so a short won't cause irritating fires. <S> The control switches may not be expected to pass a significant amount of current <S> but you can measure that with a multimeter. <A> I assume by switching, you mean logic level translation. <S> That is, you want to step 5V up to 12V. <S> The simplest solution would be a set of 5V SPST relays, connecting the coil to the switches and the NO (normally open) to the 12V and the output to the cruise control system. <S> If you want a cheaper and better solution you could consider using a transistor wired as a switch. <S> And be careful with auto electronics, if that doesn't go without saying. <S> Possible transistor circuit: <A> Airbag requires about 6V only to set it off, so setting 5V as your ceiling is probably pushing it, I think I remember it needed less than 200mA, so a fuse is actually a waste of time, if not a bad placebo. <S> I only know this because I once helped build an airbag tester to be used for Volkswagen and BMW on the Uitenhage plant in South Africa, AND had to wait patiently while everyone still messed about with antistatic gear (which I thought was overkill, but I may be wrong). <S> The trouble with relays or switches, is that they need to have a good bit of juice running through the contacts, else they do not make good contact (they are designed to actually arc, and in low current applications, a small ceramic is used to sometimes make a tiny spark to weld the contacts together). <S> DC is also not that great, since the arc carries metal with it. <S> So a transistor switching (boosting) circuit (which you have designed) is also getting my vote, you can use the transistors to drive a 12V relay (small one), ro regulators needed, and since car battery is 13.5V and the darlington-style circuit (which you drew) often looses just over a volt anyway. <S> The voltage (and needed current) for the BASE of the darlington is going to be low enough to be safe. <S> Just remember to place a diode across the relay coil for back EMF taking your transistors out. <A> Why exactly are you concerned about 12V on those wires? <S> Its perfectly fine and doesn't represent any more or less danger than 5V would, or even GND honestly. <A> Using a BJT transistor will work, but I recommend using a MOSFET. <S> They are more efficient and can handle more power without getting hot due to the very low "on" resistance. <S> Consider this circuit: <S> The P channel MOSFET gate is pulled HI by RA, so it is turned "OFF." <S> Remember, P channel transistors (or PNP) <S> work opposite to that of N channel transistors (OR NPN). <S> Since the FET is OFF, the outputs signal is pulled LO by RB. <S> If a switch is closed/pressed, then the FET gate is LO, turning the FET "ON." <S> Now, the transistor acts like a switch, connecting the output to the 12V power source. <S> There is a bit of loss in the transistor, but not a lot. <S> Using a "Power MOSFET" is necessary to handle the level of current required to operate an automotive relay - not a problem since many of these transistors can switch dozens of amps. <S> Since the MOSFET is a voltage controlled device, only a negligible amount of current would be needed to control the transistor (this is the current through your steering wheel wires). <S> See this website on using a MOSFET as a switch: http://www.electronics-tutorials.ws/transistor/tran_7.html <S> But realistically, this is all probably unnecessary. <S> Have a look at the wire gauge table on this website: <S> http://www.powerstream.com/Wire_Size.htm <S> You will see that the few hundred mA needed to trip a relay are safely carried in wire size all the way down to 27 gauge (handles 288 mA). <S> You should check those wires to see how big they actually are (usually printed on the side of the wire somewhere).
|
To answer your question, you just need to convert the low voltage to a high voltage by use of a transistor switch. A similar circuit could be made using an N channel MOSFET instead.
|
How much more does it cost to fab a 4 layer board compared to a 2 layer board and is it worth it? I'm wondering at the moment with my Super OSD project whether to go to a 4 layer board. At the moment, it consists of two micros and some additional circuitry such as a discrete audio amp and switch logic, and a serial EEPROM plus a temperature sensor. There are probably around 40 resistors, 10-15 caps and a few other components (all surface mount 0805 or 0603.) It might get tricky to route it. Is it worth paying the extra bucks to get 4 layer boards for a relatively simple project? I'm on the fence, I like 2 layer because it's cheap and if you've got the right equipment you can even do it at home, 4 layer is more expensive, but allows me to squash more stuff into each square millimeter. I've seen a couple of open source projects (Super OSD is open source) using 4 layers but many more using 2 layer. So, opinions? <Q> Some reasons to move to 4+ layer: <S> Need additional routing space <S> Need power and ground supply planes due to current draw Need to control trace impedance. <S> You can only control the impedance of a trace if it has a consistent reference on the adjacent layer(s). <S> This is critical for signal integrity of many signals but mostly associated with medium-high speed digital and/or long traces. <S> Need low noise performance, either analog or digital. <S> Its almost impossible to pull this off without at least a ground plane in the stack up. <S> EMI: Unless you're able to devote the bottom to a full ground pour you have to be very vigilant with your ground return paths to avoid current loops. <S> I'm sure there are more, that's just what popped into my head. <S> I've personally never had a board fabbed that wasn't at least 4 layers <S> so I can't say too much about the cost of 2 layer. <S> The move to 6 or 8 layers is usually what I have to fight with and <S> most of the time the same rules I listed above are the driving forces, with the addition of needing to route very high speed signals between plane layers to reduce EMI. <A> I agree Mark, but would like to add some info about cost. <S> If you are looking purely at prototyping in low quantities you can get a 4 layer board from Advanced Circuits for $66 and $33 for a 2 layer board. <S> If you are looking further into the future and want to think about large quantity fab you will need to consider that PCB fab houses will look at everything, more then just number of layers, when they give you a cost. <S> Some items include size, number of vias, special cuts, number of holes... <S> So in this sense, if you are able to get a board to be half of the size and with half of the vias by going to a 4 layer board it may be well worth it. <S> Also, when you get to higher quantities you will probably need to be looking at FCC testing. <S> So hopefully by now you can tell that there are many many factors that factor into which way is the smarter choice. <S> It is hard to tell which way to go, but at some point you have to make it. <A> Put it this way, the cost of the time you save by being able to route on 4 layers (or having internal power planes to ease routing) will pretty much always outweigh the cost difference between a 2 and 4 layer board. <S> So its very worth it in my opinion
|
Many times in order to pass FCC testing you would need to get a 4 layer board in order to get your unintentional radiators down.
|
Are decoupling caps necessary for analog ICs (e.g. LM339, LM324...)? Often 100n to 1µF decoupling caps are placed across IC supply lines for digital logic. For analog circuitry, are decoupling caps necessary when the environment is also shared by microcontrollers and digital logic? I have never placed them and haven't had any troubles, but I haven't made production stuff yet, so wouldn't have much experience. <Q> In a mixed signal environment for production that has to pass FCC, yes absolutely. <S> More specifically, what you need to do is look at your current usage, the frequencies that will be present, and determine what your overall power supply capacitance needs to be to minimize those frequencies on the supplies. <S> Otherwise you'll get ringing on the supply planes that can be a huge EMI issue. <S> You'll get some capacitance from the PCB stack up, assuming you have power and ground planes. <S> You'll then usually come up with a needed capacitance and size of capacitors to achieve your goal. <S> For instance you can come up with something like: <S> 30 <S> 0.1uF <S> 0603 <S> max 30 10nF 0402 to avoid lead inductance <S> 5 <S> 10uF tantalum <S> Then sprinkle these around in a logical manner. <S> 1 <S> 0.1uF <S> and 1 10nF per power pin. <S> One tant per major IC or near a section of smaller current/analog ICs. <S> With mixed signal design you always have to remember that just because a signal is low frequency analog you still have to treat it as an EMI threat. <S> There will be transients from the rest of your system on that signal no matter how amazing your isolation is. <S> Not only talking about high speed here either. <S> A system with a 25Mhz clock and easily have these issues and fail FCC pretty miserably <S> (trust me :0) <A> This really depends on the ICs you are using. <S> Generally the higher bandwidth an analogue device has the more important power supply decoupling becomes. <S> Most of the time the data sheet for different devices will give you an indication of what is required. <S> Any high speed amplifier or comparators may be susceptible to oscillation if not correctly bypassed. <A> You can see very strange behaviour (bouncing between states being quite common) if there isn't good decoupling <S> and there's some HF noise on the supply. <S> Coming from an analog switching power background - if I suspect an op-amp or comparator isn't doing what I think it should be, the first two things I always check are: (1) is there a decoupling capacitor, and (2) if there is, is it in a good electrical position in the layout? <A> Another point to consider with decoupling capacitors on op-amps is they need to go from rail to ground, not rail to rail. <S> For example an op amp with +/-5 <S> V rails needs to capacitors one from each rail to ground. <S> This will ensure the op amp has properly decoupled power supplies. <S> You also need to have them on signal paths also, for example a small capacitor across the feedback resistor will help your op amp circuit transition from a simulator to a real PCB with out noise and oscillations. <A> Usually I'd have gone with no. <S> The reason decoupling capacitors are critical for digital circuitry is that they can use high currents when switching states; the capacitor will then reduce the size of that current loop, and even out the draw from the source. <S> For analog circuitry this may be less of an issue, although some of the time the reason it's an issue is because analog circuitry will produce poor results because of the supply noise. <S> Sensitive analog circuitry is therefore separated to its own supply, possibly with capacitors and inductors to smooth things out. <S> I'm also fairly inexperienced, however, so expect better answers soon. <S> Edit: Indeed there were better answers. <S> Do decouple opamps, and particularly comparators. <S> Glad I learned something!
|
Analog ICs like comparators and op-amps most certainly DO need decoupling, especially if they're used as hysteretic switches.
|
How to read an audio signal using ATMega328? I was trying to use the ATMega328 ADC port A0 to read a signal. The hardware I used was: Seeeduino Stalker Electronic Brick Shield Microphone Electronic Brick (I found a link to the original developer store ) The signal I got seems to be only the positive part of a sine wave. Is it possible that this setup isn't suited for audio recording? What I have to change? <Q> Without having ever used any of those parts, let me see if I can take a stab. <S> Do you happen to have access to an oscope? <S> If so you might want to check your signal before you start building anything. <S> Most likely <S> your microphone/amp is outputting a wave that is centered around 0v, meaning you have + and - voltages. <S> Think of a sin wave that fluctuates between -1v and 1v. <S> In order for your micro to use this, you will need to add a DC offset such that you most negative voltage becomes slightly above 0v and <S> your most positive voltage is slightly below the max that your micro can read (probably around 5v). <S> With out looking into your components in more, it is hard to tell you specifically what you need to do in order to get your DC offset, but maybe this will put you in the right direction. <A> Do you have a DC-blocking/biasing capacitor at the input? <S> The combination of the C with the R sets the lowest frequency that can pass through to the ADC. <S> DC (the ultimate low frequency) is blocked, while AC passes through. <S> In this case, the cutoff frequency would be 1 Hz , which is plenty low for audio. <S> The DC bias is provided by something in the middle of the ADC range, with low noise. <S> For example: This would produce 2.5 V at DC, but the AC is closely coupled to ground by the capacitor, so it filters out any fluctuations in the supply. <S> (Originally I linked to this image , but that would only work if your 5 V supply is noise-free.) <A> The solution is to use an Amp-Op <S> In a circuit like this: You can simulate it using the Java Circuit Simulator where you can import the following code: $ 1 5.0E-6 10.20027730826997 57 5.0 50g 240 240 240 288 0r 240 112 240 160 0 <S> 47000.0r 240 192 <S> 240 240 0 <S> 47000.0R 240 112 240 80 0 0 <S> 40.0 5.0 0.0 <S> 0.0 <S> 0.5r <S> 272 384 <S> 336 384 0 <S> 1000.0R 176 <S> 384 144 384 0 <S> 1 <S> 40.0 0.5 0.0 <S> 0.0 0.5w 176 <S> 384 <S> 192 <S> 384 0c 192 <S> 384 256 384 0 <S> 1.0000000000000001E-7 <S> -2.9572014071857935c <S> 192 <S> 176 192 240 0 <S> 1.0000000000000001E-7 2.5000000000001608w 192 240 240 240 0w 256 384 272 384 0w 336 <S> 384 336 192 0r 416 240 512 240 0 100000.0w 512 <S> 240 512 176 0w 192 176 <S> 240 192 0w 416 240 416 192 0w 240 192 240 160 0a 416 176 512 176 1 5.0 0.0 1000000.0w 416 160 240 160 0w 336 192 416 192 0o 13 64 0 35 20.0 9.765625E-5 0 <S> -1 <S> The gain will be proportional to the ratio between the resistance of the 100k resistor and the 1k one.
|
A larger capacitor would improve the noise at lower frequencies.
|
I don't care how a transistor works, how do I get one to work? Every reference I can find on transistors immediately launches into theory-heavy alphabet soup. The above seems also to be assumed knowledge for reading a datasheet. I don't care; I just want to get one to work. I understand there's some relationship between the current/voltage applied to the base to get a particular current to flow from the collector to the emitter. Which numbers on the datasheet relate to that? If I'm only trying to operate the transistor in "switch" mode, do I really need to care what current I apply to the base or will I be fine just whacking a 1k resistor in between my logic level output and the transistor base? Is the only difference between an NPN and a PNP transistor which way the current flows when a current is applied to the base? <Q> The base-emitter junction is like a diode. <S> When the voltage across it (Vbe) exceeds approximately 0.65V (can be as low as 0.55V and as high as 0.9V, check the datasheet for your transistor) <S> it begins conducting. <S> The current (not voltage!) <S> through the base emitter junction is amplified by the gain of the transistor, which is known as HFE. <S> Ic(collector current) = <S> Ib(base current) <S> * HFE. <S> Remember HFE is not constant for transistors, it varies from transistor to transistor and depending on temperature, previous usage, etc., so don't rely on it for controlled amplification. <S> For the 2N2222 it is around 160, plus or minus 30. <S> By applying a base-emitter voltage exceeding 0.65V to the transistor you can use it as a switch. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> (It is an NPN transistor you want. <S> 2N3904 or 2N2222 will do.) <S> If you want to use an LED which is not blue or white then use a 47 ohm resistor in series with it. <S> When you press the switch the LED will come on. <A> NPN (and PNP) implies BJT s. <S> No, you do not need to understand the bipolar transistor to great depth <S> (is an advantage, of course). <S> Just know and use standard circuits. <S> Easy to follow explanations and calculations for finding resistor values (or checking that the 1 kohm resistor is OK) for the switch you have are in " Transistor Switch ". <S> Standard small signal amplifier circuits are also listed on the same page. <S> A more detailed explanation can be found in " Transistor as a Switch ". <A> Watch this cool video about transistors . <S> It'll trick you into being interested about the alphabet soup. <S> You should really learn about the basic chemistry of p-type materials, n-type materials and doping. <S> You can then visualize the potential differences and where the electrons are going to go without having to really memorize anything. <S> Don't be lazy here. <S> :) <S> Then an article like this will fill in the gaps. <S> Learn about the concepts behind a basic transistor/diode. <S> Then all of the other acronyms will fall into place without any real effort on your part. <A> Those answers and comments that say, "I know you don't like it <S> but you have to learn the alphabet soup," are wrong. <S> I was lucky enough to come across EXACTLY <S> the video(s) <S> you want some time ago. <S> It teaches you how to USE transistors without the ubiquitous lesson of how they are made in silicon. <S> Despite what others say, you will learn BETTER if you leave out the abc soup until you have practical knowledge. <S> I never really understood transistors before; I'd been taught to think of them as little switches (which is very misleading, at best). <S> Now I know enough to comfortably put them into use. <S> Here are the videos: <S> What is a transistor? <S> How does a transistor work? <S> Part 1 <S> What is a transistor? <S> How does a transistor work? <S> Part 2 <A> I'd propose starting step by step with something tangible. <S> Chew on one case at a time. <S> You might start with the simple case of a switch and <S> I'm sure you can find very simple examples by looking. <S> Don't dive into an old book with CE bipolar amplifier biasing with half a dozen resistors, compensation and h parameters flown through on the first page written by someone who doesn't remember what it was like not to know all that stuff first. <S> :) <S> If you look around, it should be easy to find some tutorials with BJT , JFET , <S> MOSFET ... <S> Maybe skip P and depletion devices first as well. <S> Mostly P (PNP) does look like a mirror image, once you have an idea how the N part works, it should be easy to relate to the P part. <S> That way you won't get so much chance to be confused by negative voltages and currents and circuits drawn upside down (they really do all that). <S> Then you really need to look at the datasheet parameters like just how much current and voltage <S> it can take safely, what's the ratio of base current (gate voltage) needed/taken for a given collector current, total power dissipation ( <S> voltage loss * current) etc. <S> Once you're done with switches, you might look at turning on/off only partially (amplifier, current control). <S> All three types behave a bit differently. <S> Then maybe see different typical circuits: regulators, current sources and mirrors, timers, logic gates, B and AB power amplifiers. <S> But you should be able to jump in with ballpark values first. <S> Use some cheap parts (with the datasheet, at least for the pinouts and type) and perhaps a simulator to try things out.
|
A bit of theory (multiplication, Ohm's law, diode...) is necessary, more will help you understand what's going on and predict things.
|
Reflow at home or solder manually? I'm considering doing DIY SMT Reflow for production of my Super OSD project. An overview of the component count: Resistors: ~50 x 0603; precision 0.1% resistors as well as 1% and 5% components Capacitors: 17 x 0603, 2 x 0805, 1 x 1206 (all ceramics), 2 x EIA-3216 (tantalums.) Inductors: 1 SDR-0604 package Chips: SOIC-8 (EEPROM), SOIC-28, TQFP-44, some SOT-23 (temp sensor + TL431.) Transistors: 3 x SOT-23 (2 x N-ch mosfet, 1 x NPN) Diodes: 2 x SOT-23, 2 x SOD-323 Misc: polyfuse 0805 x 1, LED 0603 x 1 As can be seen this going to be a monster to solder manually so I was thinking of doing DIY toaster oven reflow. Would this be suitable? Are there any pitfalls I need to be aware of? Otherwise I'm going to have to solder them up myself but I see it being a real problem with almost 80 tiny components per board. <Q> If you can get hold of a dissecting scope and some decent tweezers, you could probably solder all those parts in about 2 hours. <S> I've done a similar board with around 125 components in about 3 hours. <S> Here's my setup. <S> This isn't to say that you shouldn't use an oven-- <S> I haven't tried that; it might be better. <S> Seems a little bit like all your eggs in one basket, but I guess you could always rework parts in either case. <A> the solder reflows. <S> Next phase was for the semiconductors (transistors and mosfets and the like) followed by integrated circuits. <S> Final stage was handsoldering the larger connectors and through hole components. <S> Spending the time to kit and prepare good assembly drawings (hand colour coded to match the bins of the parts) <S> it meant placing all the passives went quickly as did the soldering. <S> This method will help speed up small one man batch production, at the expense of setup time. <A> How many do you intend to build? <S> Have you considered getting a quote from some contract manufactures? <S> If you are building enough of them, a robot is going to make it cheaper than placing by hand. <S> Although you will have up front tooling to produce a solder paste stencil and engineering or setup costs to consider.
|
At my previous work place, the guys would kit all the SMT components into little trays and then do small batches using solder paste and place all the passive resistors and capacitors, then using a handheld hot air soldering iron go over each component briefly until it "wiggled" into place and
|
ADC input impedance on MCUs What is the input impedance of a typical MCU ADC? In this case I'm working with a PIC24FJ64GA004. I don't need high speed sampling - a maximum of 100 samples per second. I wish to connect a resistive divider with a 100k resistor and a 10k resistor, so the impedance should be higher than 1M or else the impedance will start skewing the readings. <Q> MCU ADC inputs can experience variable input impedance depending on whether the sample-and-hold cap is connected to the pin or not. <S> It might be worth the trouble to use an op amp to buffer the signal. <S> The op amp would have the added benefit of allowing you to filter out frequencies above Nyquist, which is also good practice. <A> Input Leakage Current <S> To determine your resistors voltage drop from the gate you need to use the leakage current from the datasheet. <S> Microchip specifies an "Input Leakage Current" on their datasheets. <S> This could cause a .1V or 100mV, which is only double what robert calculated, probably not a problem on your signal. <S> Now remember, if you are dividing a 30V signal down to 30/11(2.7v) <S> volts <S> full read <S> then the 100mV is added to this, causing up to 3% error on your 30V signal. <S> If you need a resolution of 1V, divide that by 11 and then add the 100mV. <S> This 100mV could be larger then the 1V signal. <S> Input Capacitance <S> Robert is correct, there will be a capacitance, but this really specifies an amount of time that is needed to take the ADC measurement. <S> This also, combined with your input resistance you chose, creates a low pass filter, if you ware wanting to measure signals with a higher frequency, you are not going to be able to capture them. <S> Reducing the error <S> The easiest way is to either reduce your resistance on your divider, or to buffer your signal. <S> When you buffer the signal you will replace the PICs leakage current with your op-amps leakage current which you can get quite low. <S> This 1uA is a worst case, unless it costs you a large amount to make minor changes to the design, fab your design and test how bad it is for you. <S> Please let me know if there is anything I can do to make this easier to read. <A> One point not yet mentioned is switched capacitance on the input. <S> Many ADCs will connect a capacitor to the input while they take a measurement and then disconnect it sometime later. <S> The initial state of this cap may be the last voltage measured, VSS, or something inconsistent. <S> For accurate measurement, it is necessary that the input either not budge when the capacitance is connected, or that it bounce and recover before the capacitor is disconnected; in practice, this means that either the capacitance on the input must be above a certain value, or else that the RC time formed by the input capacitance and source impedance must be below a certain value. <S> Suppose, for example, that the switched input capacitance is 10pF, and the acquisition time is 10uS. <S> If the input impedance is 100K, there is no input capacitance other than the capacitance of the ADC, and the difference between the starting cap voltage and the voltage to be measured is R, then the RC time constant will be 1uS (10pF * 100K), so the acquisition time will be 10 RC time constants, and the error will be R/exp(10) (about R/22,000). <S> If R might be the full-scale voltage, then the error will be a problem for 16-bit measurements, but not for 12-bit measurements. <S> Suppose there were 10pF of capacitance on the board in addition to the 10pF of switched capacitance. <S> In that case, initial error would be cut in half, but the RC time constant would be doubled. <S> Consequently, the error would be R/2/exp(5) (about R/300). <S> Barely good enough for 8-bit measurement. <S> Increase the capacitance a little more and things get even worse. <S> Push the capacitance to 90pF and the error would be R/10/exp(1) (about R/27). <S> On the other hand, if the cap gets much bigger than that, the error will go back down. <S> With a capacitance of 1000pF, the error would be about R/110; at 10,000pF (0.01uF), it would be about R/1000. <S> At 0.1uF, it would be about R/10,000, and at 1uF, it would be about R/100,000. <A> Take a look at page 198 of the datasheet . <S> There's 6-11pF at the pin and 4.4pF on the holding cap. <A> In addition to the good points that supercat has raised in his post, there is a further subtlety to note when you are using an unbuffered voltage divider with an external capacitor. <S> The charge transfer that happens every time you run through a sequence of ADC readings, when multiplied by a sequence repeat rate, becomes a current . <S> The DC average value of this current is Csamp * deltaV * f, where Csamp is the sampling capacitance (not the external capacitance!) <S> , deltaV is the voltage between successive input channels, and f is the sequence repeat frequency (how often you cycle through 1 complete sequence of samples). <S> When you have an external capacitor to reduce the charge transfer effects and keep from having a long sampling time, it has the negative effect of low-pass-filtering this input current required to charge the sampling capacitor, which will appear as an input-voltage-dependent leakage current that causes an offset voltage across your source impedance. <S> Just for some sample numbers: your voltage divider (100K || 10K) is about 9K, and if deltaV between channels = <S> 3V, Csamp = 10pF, and f <S> = 10kHz, this will cause a voltage error of 2.7mV, or slightly less than 0.1% of deltaV. Not a lot, but enough to be aware of. <S> You should not be using a 1M || 100K voltage divider with 10kHz sequence repeat rate -- of course, this is fairly fast, and for slower repeat rates, you don't need to worry as much. <S> I've written about this and other ADC driving issues in a post on my blog .
|
The datasheet that I have looked up specifies an input leakage current of 1uA.
|
Easiest and Best PoE Ethernet Chip/Micro/Design for DIY Interface with Custom Arduino Board (AVR Solution) I am looking for a PoE Ethernet chip that I can incorporate in a design I plan on using along with some of the Arduino features. I would prefer to implement a standalone mcu for the Ethernet device capable of providing Ethernet. All possible solutions must support PoE to power the Micro. I do not plan on buying an Arduino nor do I want any shields per se. I am looking for a PoE Ethernet chip that would work well with the Arduino firmware and micro controller. A chip that I can incorporate into my own custom Arduino board. I would also be interested in any AVR chips which provide the same capabilities (pin wise) as the Arduino ATMega168/etc that has Ethernet built on board. My devel platform would be AVRStudio or something like it with a Jtag ICE MKII. I do not have the ability to use PIC as I do not have a programmer, the software, nor the cash to invest in another platform. Thx in advance for your help. Edit : Andrew noted that I should post more info. First of all Andrew: I have not looked at the MFGs you mentioned. I will do so now. I would like to place a few Freeduino type setups around the house to do various home automation tasks. My home is already wired with Cat6 and I plan on plugging certain network drops into a 10/100 8 port Linksys POE switch. I would like to provide network and power to each device without having to hack the network cables. I have verified that the switch conforms to the 802.3af standard. I would like to create each board to solely pull power off of the PoE lines to provide sensor and relay capability (relays would be SSR - GA8-6D05 from Crouzet which requires 3-32VDC for the relay. I would expect the PoE chip to deliver either full PoE voltage or be nice enough to drop it down to 7-12VDC. If needed, I can add a 7805 or appropriate chip to ensure voltage regulation. In the end, my micro would need 5V + 3V DC regulated @ 1A. Hope this answers anything my original post left out. <Q> You really haven't given us any actual information to help you with other than you don't want an Arduino shield solution. <S> What kind of power supply do you need? <S> How many voltages, and at what current levels? <S> Are you just powering the AVR? <S> Do you need galvanic isolation? <S> Depending on how you want to hook it up, it'll give you full galvanic isolation and multiple output voltages. <S> My particular setup gives me 3.3V at 2A and a separately-isolated 5V at 1A. <S> I "slave" an LTC3523 off the 3.3V to give me 1.8V and 5V supplies that aren't isolated from the main 3.3V supply. <S> Many companies offer PoE PD controllers. <S> National, Maxim, Linear Tech, TI... <S> Have you done any poking through their websites to see what's out there <S> so you can narrow down your search? <S> EDIT now that I have more information from the edited question. :-) <S> TI's TPS2370 looks like a perfect fit. <S> It's an 8-pin SOIC device that takes care of the 802.3af spec part and you can drive pretty much ANY regulator off of that. <S> So a really simple supply would consist of the TPS2370 and something like the BD9001 (personally I like Linear's LT1676 <S> but I don't think it has a high enough input voltage spec for PoE) from the previous answer. <S> Two 8 pin SOIC devices, a handful of passives and a small inductor would get you what you're after. <A> The Olimex PIC Micro Web board seems to support POE with a BD9001F switching regulator. <S> This looks like a low cost way of adding PoE to a device. <A> The Freetronics EtherTen web pages claims "Power-over-Ethernet support, both cheapie DIY or full 802.3af standards-compliant." <S> It appears to be a "open hardware" design, implying you are welcome to download the design files and incorporate as much as you want into your own custom boards. <S> From the schematic, it appears to use the WIZnet W5100 single-IC Ethernet interface. <S> Circuit Cellar issue 208 (November 2007) has an article by Fred Eady titled "iEthernet Bootcamp - Get Started with the W5100". <A> Looks like you've got a good answer already, but I thought I'd point out this shield (yes, a shield!) <S> from Freetronics: Freetronics — Ethernet Shield with PoE . <S> His design files are linked to at the bottom of the page. <S> Those might provide some insight into making your own design.
|
I have successfully used National's LM5071 PoE PD controller in one of my designs.
|
Power-up Initialization of HD44780 LCD Module I'm using an HD44780 clone LCD module a KS0066U. Everything works ok on the module except when I rapidly power cycle the device (on->off->on). For some reason a very short interruption in the power causes the display module to improperly initialize as a 1-line LCD instead of a 2-line LCD display. What would cause this behavior? Is there any way to prevent it in software? EDIT: I'm using the display controller in 4-bit mode not 8-bit mode. <Q> I changed my initialization code so that it sent the upper 4-bit nibble of the function <S> set command twice. <S> Following which I resent the upper 4-bit nibble followed by the lower 4-bit nibble. <S> This does not match the datasheet which seems to indicate that you can send the upper 4-bit nibble then send the function set command upper 4-bit followed by lower 4-bit. <S> // <S> Works sometimes pseudo-code port=0x20; <S> e=1; e=0; <S> port=0x20; e=1; e=0; <S> port=0xC0; e=1; e=0; <S> // Works all the time pseudo-code port=0x20; e=1; e=0; e=1; <S> e=0; port=0x20; e=1; e=0; port=0xC0; e=1; e=0; <A> My guess would be that you are missing a necessary delay in your initialization sequence. <S> If the display is busy when you try to send a command, that command will be ignored. <S> If when you start your procedure, the display is in four bit mode and has just had "0000" clocked in as the first half of a command, then when you clock in "0011" the display will see the whole command as "00000011", which will cause the display to be busy for up to 1.6ms. <S> Incidentally, it is good if possible to wire the low-order data wires from the display in such a way that when a "0011" command is sent to the display, the whole 8 bits seen by the display will form a mode-set command which is correct for the type of display you are using. <S> That will help avoid any display glitches when resetting a display which is already in use (periodically resetting the display is a good idea, if it can be done glitchlessly, since it will ensure that if the display somehow gets into a bad mode it will fix itself). <A> I found a workaround for the problem: <S> I added a 1000milisecond delay at startup, before initializing/configuring the LCD controller. <S> It worked pretty good for me. <S> A lower delay(100, 200ms) not worked so well. <S> Just a note: It happened only in 4bits databuss. <S> Good luck! <A> A maximum of a few hundred milliseconds. <S> You could also try connecting the LCD power to the microcontroller and powering off the LCD for a second after start up. <A> Not sure if this helps AT ALL, but I messed with the KS0066U on an Arduino project. <S> Here is the link .
|
Inserting a delay in your code so when it switches on it gives the LCD long enough to initialize when it starts up.
|
Is there a directory of open source hardware projects? I would like to print a fairly common circuit. But I don't want to design the PCB myself. Where should I look when searching for PCB layouts? <Q> If you're interested in arduino, there is http://shieldlist.org . <S> It's a wiki listing of all of the boards that can interface to the arduino board. <S> All should be licensed as open hardware. <A> Several places publish open-source PCB design files: <S> Olimex sponsors open-source PCB contest every month; all documentation (including the PCB layout) is posted on the Massmind Circuit Cellar magazine hosts design contests a couple times a year; often PCB layout and other documentation is posted on the Circuit Cellar "contests" page . <S> The Open Circuits wiki has a list of open-source hardware projects . <S> A few places are trying to make it easy to buy open-source PCBs -- the actual, physical things you hold in your hands, not merely some computer file: <S> BatchPCB will sell more copies of your PCBs to anyone else that wants one. <S> And give you money. <S> Why wouldn't you want that? <S> BatchPCB discussion forum at Sparkfun . <S> A database of PCBs other people have designed . <S> Open Source Hardware Bank ( early discussion ) has a library of open-source PCBs Seeedstudio has discussed a library of open-source PCBs . <S> Arduino Shield List links to the source of many Arduino shield designs. <S> Some of those sources merely publish the PCB layout files; others, in addition, sell the physical hardware -- typically as a kit. <A> I found some open source hardware at http://code.google.com/hosting/search?q=hardware <S> but there are many software projects in these results also. <S> The only way I found of getting hardware only results is searching for PCB files: http://www.google.com/codesearch?as_q=file%3A%5C.(grb%7Cpcb%7Cpcbdoc%7Cbrd%7Cgto%7C057%7Cgbl%7Cgto%7Cgbo%7Cgts)%24 <A> Maybe you find something interesting in the Arduino board at Dangerous Prototypes forum: Project development, ideas, and suggestions >> Arduino <A> http://bildr.org/ aims to be a complete open source electronics community (wiki, forum, etc.) <S> http://www.opencircuits.com/ <S> aims to be a complete open source electronics wiki <S> (I found both via SparkFun) <A> I have built kitspace.org with expressly this purpose. <S> It is an open source site for posting open source hardware electronics projects. <S> The site makes it easy for others to find the Gerber design files and buy the required parts.
|
Sometimes people post open-source hardware design files on one of the popular open-source software places -- Google code, Sourceforge, Launchpad, Github, etc.
|
FPGA development kit for beginners , Spartan6 or Spartan3? I intend to purchase an FPGA, development kit and I have looked at both the Xilinx and Digilent website. Both seem to have good development kits. I have never worked with FPGA's before but have some experience working with microcontrollers. I see that the entry level Spartan 6 boards are on a par in terms of price with the Spartan 3A/AN boards. I've not compared the features. From your experience what development kit would you suggest Spartan3A/AN or Spartan6? <Q> It looks to me like you still get a lot more to play with at a lower price point with Spartan-3. <S> I found three different Spartan-6 options: Avnet Spartan-6 LX16 evaluation kit, $225 <S> Spartan-6 SP601 evaluation kit, $249 (limited time offer) Digilent Atlys, \$199 academic or $349 Of note here is that only the Atlys has a lot of on-board common I/O connectors, such as audio, video and keyboard. <S> The LX16 kit has most of the interesting details on a Cypress PSoC instead, though it features a battery that may be interesting. <S> It boils down to what your intended projects are. <S> With the lower budget Spartan-6 boards, you get an FMC-LPC connector that you can attach your own builds to; the LX16 kit also has a pin header, which is easier to get connectors for. <S> With the Spartan-3 kits, such as I have, we have a quite varied set of connections of more limited quality, and for major expansion <S> there's the Hirose FX2 connector (again, somewhat unusual). <S> If your plan is to do video processing, I'd be very tempted to save up the extra money for the Atlys. <S> It doesn't have very many expansion pins, but it has multiple on-board HDMI ports. <A> If you have never worked on FPGAs before, have you considered Altera FPGAs? <S> Terasic makes some great ones with nice reference materials. <S> You can check out www.terasic.com. <S> Also I hear that Altera's Quartus environment is a lot more user-friendly than Xilinx's. <S> budget -> <S> Altera DE1 suggested -> Altera DE2 or DE2-115 (because there's SO much resources online at college websites which include their source codes) <S> Also, the Altera university program is a great place for beginner tutorials. <S> They start from the very beginning of "Hello World" type programs. <A> I would highly recommend going with a CPLD board first (something like this ), or an Actel flash-based Igloo Nano, or something small like that. <S> Big FPGAs can be kind of overwhelming, and they have so many pins <S> it's quite time-consuming to get things hooked up properly. <S> Plus, as soon as you want to integrate one into your design, you'll realize they come in very large packages, with dozens of power pins. <S> Most of them require several voltages to operate at, not to mention that most FPGAs are SRAM-based, and not flash-based, so as soon as you disconnect power, they lose their design. <S> So, you have to at least have an Active Serial Flash Memory chip wired up, but many people use sidecar CPLDs or microcontrollers to load designs onto the FPGA. <S> It's all very overwhelming. <S> CPLDs, on the other hand, are great! <S> They're usually single-supply operation, and if you want 5V-compliancy, you can still buy older Altera MAX 7000 chips. <S> Plus they have on-board flash memory, so they don't need other components to bootstrap them. <S> And CPLDs function more or less the same as FPGAs, so you program them by writing VHDL/Verilog, or using a schematic editor. <S> Same jazz about clocking (remember to use crystal OSCILLATORS not crystals!), and same manner of programming over JTAG. <S> CPLDs have far less logic elements than FPGAs, so you can't toss soft processors on them or do anything too crazy. <S> But if you're just getting going, they're definitely the way to go -- and they cost a couple bucks each and come in big-enough packages that can be hand-soldered, which makes them practical to integrate into little projects you may have on your desk. <S> Another option is the low-end Flash-based FPGAs made by Actel. <S> I've been recently playing around with the Igloo Nano Starter Kit, which is about $100. <S> These devices are just big enough to fit an 8051 core on it along with some custom digital logic, so they're a great option when you're mixing program-flow states with custom logic. <A> S3 has been around a while <S> so you'll probably find more options, and cheaper ones as used boards may be an option. <S> If you're doing it with a view to making a product in the forseeable future stick with S3 until Xilinx get their act together on availability of newer parts. <S> I also hear that the ISE software is getting flakier in later versions, so with S3 you can use an older. <S> more stable version. <A> I have used a Spartan 3 in college, and the board had a vast array of connectors (of that age): <S> PS2, VGA, DB9, and the classic pinheaders, plus some leds, 7segments displays, push-buttons and switches. <S> That was more than enough for me. <S> PD: the simulator was SO huge that was better to "compile" the gates and test them on board. <A> its pretty easy to get started. <A> Something worth considering is the range of boards offered by Opal Kelly. <S> There isn't much of a difference in price between their entry level Spartan 3 and Spartan 6 boards. <S> The big advantage we find with them is the on board USB support with associated HDL blocks for the FPGA and library code for your computer that makes it very easy to use. <S> http://www.opalkelly.com/products/ <A> If you'd like to do some breadboarding and hookup your own I/ <S> O devices (LEDs, 7-segs, buttons/switches, etc), while figuring things out for yourself (doesn't come with docs) <S> you can get a 'barebones' mini FPGA board on eBay for around $50. <S> I picked up one of those and have been reasonably happy with it. <S> I'll probably still end up getting a more full-featured board or make my own custom one someday, but for now this 'mini board' is fine for learning purposes.
|
I'm not sure about Digilent boards, but the Altera boards have full documentation as well as code demonstrations for every peripheral.
|
Total current consumed from a battery I would like to know how could I know the current consumed from a battery using this sensor , or other similar, using a microcontroller. What I would like to know is shown in this video , where you can see the current consumption. <Q> In order to measure the current consumption or the battery's state of charge, you need to integrate current over time. <S> The most basic method is to sample a current sensor (be it a hall-effect, shunt resistor, whatever) at a fixed rate fast enough to capture your current signal (10-100 Hz might be fine for a RC plane), and multiply it by the sample time to obtain charge (A·h, mA·h, coulombs, whatever). <S> The Allegro sensors have an adjustable bandwidth, so you could get away with fs = <S> 2*BW <S> Once you have the current consumed, you could subtract that from your battery's capacity to obtain the 'fuel level', preferably padded with a good margin of safety. <S> This method will not be terribly accurate, because the battery's useful charge is not exact, and will fluctuate wildly depending on discharge rate and temperature, among other variables, but it should be good enough to provide a rough 'gas gauge'. <A> I've used a small high-side current-sensing resistor and connected an Arduino ADC to each side to measure the voltage on each side (--> voltage difference -- <S> > current). <S> You could improve on this by using an op-amp to amplify the difference in voltage, and then output a single DC voltage corresponding to the current. <A> I didn't see a datasheet for this sensor via the supplied link, but from the photo see that the sensing element is a hall-effect device, p/n ACS754. <S> According to the manufacturer's website, this is a discontinued part: "DISCONTINUED PRODUCT. <S> These parts are no longer in production. <S> The device should not be purchased for new design applications. <S> Samples are no longer available. <S> Date of status change: <S> May 3, 2010." <S> Also, according to the ACS754 datasheet, the output offset voltage at zero current and <S> 25C is +/- <S> 10mV, which (at 40mV/A) means that any readings less than 250mA could be suspect. <S> What current range do you intend to sense?
|
It's not very accurate because of the limited resolution of the converters, and because the important quantity is a small difference between two similar voltages.
|
Is a single channel oscilloscope enough for most purposes? So I have spent the past two days going through various budget oscilloscopes and checking their specs VS price. Most of the information I have gathered has been from here and I am almost sold on an MSO-19. The only reason I haven't bought it already is that it's a single channel oscilloscope and before I spend £180 on it, I want to make sure it's going to cover 95% of my electronics needs. I think my major problem is that I don't know what area of electronics I will be going into in the future and so can't predict exactly what I am going to need. Currently I work as a software engineer and so am already playing around with PICs, AVRs and MSP430s. I think, in the short term, I will be looking into making small intelligent robots (not bump and turn stuff you see on most hobbyist sites but something with 'character'). I have been in AI for a number of years and whilst I'm no Marvin Minsky, I do know a thing or two about what makes something seem intelligent. The other thing I have been looking at is this 32-channel logic analyser ( Open Workbench Logic Sniffer ) which is only £30 and is a more powerful logic analyser than comes with the MSO-19. Would it be a better idea just to buy that? I'm open to other suggestions too but I don't want to spend over £250 in total if I can help it. <Q> I agree with the others that two-channels is very convenient at times. <S> Particularly if there is a separate trigger input (almost like a third channel). <S> What are your minimum bandwidth requirements? <S> Do you really need something as fast as the MSO-19? <S> The DSO-2090 is a 100MS/s, 40 MHz dual channel (plus external trigger) <S> PC-based scope for £139. <S> You would then have money left over to buy the standalone £30 logic analyzer. <A> A single channel scope is a complete waste of time. <S> Maybe worth a fifth of a 2-channel one. <S> You almost always want to look at the relationship between signals. <A> You need two channels for most tasks. <S> The reason that two channels is import is you often interested in the relationship between different signals. <S> Here are some examples of when two channels can be very important: A clock signal and a data signal where you need to check the setup and hold timing. <S> An enable signal to an analogue circuit, where you need to see how fast the analogue circuit stabilises after being enabled. <S> This might be the case in a low power system where an sensor is only powered up when it needs to be sampled. <S> To examine the relative timing of some tasks on a microcontroller, where you set each task to toggle a different IO pin upon entry and exit. <S> Where you have a PWM output with a complementary drive and you need to confirm the dead time between the top and bottom switches. <A> As soon as you get a single-channel, you will want the double-channel. <S> Heck, I have a double and am shopping for a four-channel. <S> You will get to the stage where you need to compare signals, for education, troubleshooting or fun. <S> With your budget of 250 quid you should be able to scrape in with the perennial favourite, the Rigol DS-1052E . <A> It's worth scouring eBay for a second hand DSO. <S> I got my Tektronix <S> TDS-210 <S> for £180: <S> 2 channel + separate trigger <S> 60MHz <S> 1 GS <S> /s <S> I bought an Open Logic Sniffer too. <S> It's a great device for the price, but given the tiny amount of RAM it has, it feels a bit like keyhole surgery. <A> Single-channel scopes should be banned! <S> Most of the times you want to see (at least) two signals in relation to each other. <S> Two examples: Phase Phase for a single signal is meaningless, you always compare phase with the phase of another signal. <S> You can do this by looking/estimating how much time the signal has shifted, but the better way is to look at the Lissajous figure in XY-mode. <S> Single-channel scopes don't have XY-mode. <S> Serial protocols <S> Except for Manchester coding data and clock are separate on most protocols. <S> Want to analyze your data with only the data channel? <S> Like this: <S> Well, good luck! <S> This is the SDA channel of an I2C bus. <S> Any idea of what it represents? <S> Not without the clock: Now you not only can see what SDA is on each clock pulse, you can also see the I2C start condition: <S> SDA going low while the clock is high. <S> Impossible on a single-channel scope. <A> If you are only going to deal with low speed digital signals then a logic sniffer will get the job done. <S> If you get higher speed you may need an o-scope to check for signal integrity issues. <S> If you do analog, you are going to want an analog o-scope. <A> I have <S> the MSO-19 and I like it. <S> It works well under VMWare on my Mac. <S> I do often find myself wanting a 2nd channel, however. <A> Dual channel allows you to debug most serial protocols. <S> It is also crucial for the analysis of complex signals, like video (for example, with my OSD project I need to compare the video signal and Csync.) <S> Heck, I have a quad channel scope <S> and I say if you can get one second hand for a little extra <S> I say it's well worth it.
|
It is virtually impossible to use a single channel oscilloscope other than for basic measurements.
|
How can I persist data onto the Netduino? Mainly, I want to persist data onto the onboard Netduino memory (if there is any?) without hooking anything else up. The idea is that I either read the data back in the next time the Netduino is plugged in (for settings), or read the data when it's plugged into a computer (for analytical data). Specifically data from sensors like temperature, ambient light, GPS Position, xyz orientation, etc. I know there is the Netduino Plus, which has a MicroSD slot to store data via System.IO , but I have a regular Netduino :( <Q> SkippyFire, you can add an SD card using the v4.1.1 firmware and an expansion shield. <S> There is a feature within .NET <S> Micro Framework called "ExtendedWeakReferences" which can be used if you recompile the firmware and enable it--but I'd highly recommend using MicroSD instead. <S> Simpler, standard, and powerful. <S> Chris <A> I'm not familiar with the Netduino, but most PIC microprocessors have self-writeable flash memory. <S> Some of them even have a small amount of on board EEPROM ~1kB. <S> Both types of memory are non-volatile and will provide you with a way to store data between power-ups. <A> MSDN provides a extendedweakreferences sample and I believe this requires to write and read to flash memory, which I guess the Netduino has. <S> So essentially the extendedweakreferences class is just a way of letting you use flash memory. <S> In relation to your question is it safe? <S> Yes it provides a way of encapsulating the read/write process, although it may not be safe for whatever data was already on the flash memory in the same location.
|
The Adafruit MicroSD expansion card also works.
|
Battery level - how to check How can I check the level of charge left in a battery? <Q> Two things happens to batteries as they discharge. <S> The open-circuit (unloaded) voltage goes down, but there is also internal resistance in the battery that goes up with increasing states of discharge. <S> Depending on the battery technology, the voltage may gradually slope off over time, or it may only dip a couple of tenths before suddenly giving out all at once. <S> So generally you can tell the difference between a fully charged battery and a nearly dead one by measuring voltage, but it can be difficult to tell with partially discharged batteries. <S> The internal resistance is what really matters anyway. <S> You can't measure it by sticking an ohm-meter on a battery, but you can infer it by measuring the battery voltage while it's under a load. <S> You need a load appropriate for the battery voltage and current capability, so you might use an automotive incandescent bulb for a small 12V lead-acid battery, or an LED for a coin cell. <S> Just something you'd typically expect the battery to be able to power. <A> I think the way a lot of commercial devices do it is with measuring the current coming out of the battery over time, known as "Coulomb Counting". <S> If your battery holds 1000 mAh, and you measure 300mA being used for an hour, then you know there is 700mAh left in the battery, or 70%. <S> Here's a page that talks about this method (along with the less accurate voltage-based method) <A> If you have a multimeter, set it to "voltage" mode by turning the knob until it says something like "V" for voltage. <S> (If you have more than one mode with "V" in the name, just try all of them.) <S> Then connect the black wire of the multimeter to the negative terminal of the battery and connect the red write of the multimeter to the positive terminal of the battery. <S> The multimeter should tell you the voltage. <S> You can then compare this to the expected voltage level of a fully charged battery. <S> If you have a microcontroller with an ADC, you should make a simple voltage divider circuit using a few resistors that in the 10-100kOhm range, and connect the output of the voltage divide to an ADC pin on your microcontroller. <S> The point of the voltage divider is to divide your battery's voltage down to a level that your microcontroller can read (typically 0-3.3V or 0-5V). <S> If you are using a battery whose voltage is always in that range already, you don't need to use a voltage divide. <S> Here's an explanation of voltage divider circuits: http://en.wikipedia.org/wiki/Voltage_divider
|
If you measure the voltage while the battery is powering the load, you get a much better indication of how charged it is.
|
Wiring up old phone ringer to arduino I just obtained an old rotary phone at a garage sale. I am working on hooking it up to an arduino project, and I was able to get the dial and hook switches figured out pretty easily. I cannot really figure out how the ringer works, or how to wire it up. It is an old western electric C4A ringer. It has two bells and a striker arm between them. There is a coil, and some magnetic plates that move the ringer, with four wires going into the coil. I have found schematics online for how the thing connects to the other phone components for normal operation, but I really just wanna figure out how to make the thing ring on its own. I read that most phone lines run in the vicinity of 90 volts ac. Is there any possibility I can make this thing ring with a 12 volt wall wart, or am I gonna need a full 120 line and a relay or something? <Q> Look at page 2 and 3 of the schematic .pdf <S> from this page . <S> Sparkfun have done it using an H-bridge and voltage booster circuit. <S> Quite nifty really. <A> Phone lines normally run on -48v DC (referenced to ground) when the line is idle. <S> During the ringing cycle (in the US, 2 seconds on, 4 seconds off), a ringing voltage of 75-90v AC (typically 20 Hz in the US) is superimposed on top of the -48v DC. <S> When you take your phone off-hook, the line card at the central office (CO) senses the current and disconnects the ringing voltage. <S> Meanwhile the voltage at the phone drops down to -12v <S> or so, mostly due to the voltage drop across the line from the CO to your house. <S> So you cannot ring an older style phone with a voltage lower than 75v AC or so. <S> Also, do not use 60 Hz AC from your house outlet -- that won't work either. <S> You need some sort of circuit that will create a 20 Hz sine wave (square wave would probably also work), that is amplified to 90v. <S> There is a circuit on this page , under "Telephone Ringer". <S> (Note: I haven't built it, but it looks like it could work.) <S> You would need a relay connected to the Arduino to turn it on and off. <A> If you run 5V AC into the 6.3V secondary, you should get about 5 <S> * (120/6.3) <S> = <S> 95.2V <S> out on the primary side, which is a little high, but not terribly so. <S> You could probably get away with using a single switching transistor to drive the secondary from your 5VDC supply, but be sure to put a fly-back diode across the coil to keep the transistor from getting killed. <S> Then it's just a matter of turning the drive transistor on/off at about 20Hz for the desired length of time. <A> You can ring a phone with 120 volts at 60 hertz. <S> It sounds somewhat more like a buzz than the musical sound that 20 hertz produces, but you have probably heard 60-hertz ringing in many movies and didn't notice the difference. <S> The bells have to be adjusted closer to the clapper than normal. <S> Usually the attachment holes in the bells are drilled off-center, to allow adjustment by rotating them.
|
You could take a small one of those 120V to 6.3V step-down transformers (like RS sells), and 'use it backwards' to step up a low voltage signal from some drive transistors to nearly the right voltage for the phone ringer mechanism.
|
How can a PHP programmer go to robotics I am a PHP programmer with basic knowledge of c/c++ and electronics. But i have keen interest in robotics and AI. What are the basic things that ineed to learn before switching tothe robotics ? What languages areused to write the code and how isthat code transferred to the chips ? What are the basic components that ineed to know ? I would like to learn about the both hardware components and the programming part. (Are these different streams?) <Q> I would suggest starting with an Arduino board and one of the many " Getting Started with Arduino "-style books out on the market. <S> This is a very beginner-friendly way to get introduced to the world of embedded processors, device programming and simple circuit hacking. <S> A few hours with an Arduino will also help you decide where your interests are really focused. <S> (E.g. if you hate having to wire up an LED circuit just to see your program work, you probably want to focus on a more ready-made platform for robotics exploration. <S> Whereas if you find the hardware tinkering appealing, you might want to move on to a very basic, bare-bones kit like the Parallax Stingray .) <A> 1) <S> What are the basic things that i need to learn before switching to the robotics ? <S> Really, all you need to know is what your goals and interests are. <S> Often, you can't find this out until you try a few things. <S> Without this knowledge, there's a huge amount to learn. <S> Motion, size, code volume, and interfaces are all very different in various systems. <S> 2) What languages are used to write the code and how is that code transferred to the chips ? <S> The vast majority of the time, code is written in C, possibly with a little bit of assembler to do some hardware operations that can't be done in C. <S> Sometimes, C is used to build up an operating system, and then code is written for that operating system (again, still using C) or a virtual machine is created, which runs a higher-level language like Java, Lua, or C#. <S> Usually, this is done on a PC with a cross-compiler, which creates a hex or which cannot run on the machine that the compiler runs on, but can run on the micro. <S> Then, a programmer is used to interface with the microcontroller using USB, serial, or even Ethernet. <S> Sometimes, this 'programmer' is located on the same PCB as the microcontroller, such as on the Arduino board. <S> Communication protocols like JTAG, ISP, and other various standard methods can be used, although some chips require specialized programmers. <S> 3) <S> What are the basic components that i need to know ? <S> Again, this depends on what your end goal is. <S> You should have a basic understanding of electricity <S> (Ohms' law can probably get you by in most cases, as well as an understanding of diodes and transistors/MOSFETs). <S> Blinking an LED is an easy first step (off a tall cliff). <S> If you're serious about robotics, you should learn about motor drivers, servos, and stepper motors. <S> I would like to learn about the both hardware components and the programming part. <S> Are these different streams? <S> Only slightly so. <S> It is possible to use hardware components without having to write a program, and it is possible to buy premade hardware modules and then just do the programming part, but eventually the two go hand in hand. <A> You should learn by experimentation. <S> Code is often written in C, but sometimes it can be written in other languages like Basic, and some processors support .NET. <S> Resistors, capacitors, diodes and transistors are probably the most common devices you will encounter, in that order. <S> I would recommend you try with a board already available, like an Arduino or PICAXE. <A> I've been in robotics for several years but before then I was in web, information retrieval field. <S> So I can understand how the OP feels when s/he got interested in robotics <S> but the skill set might seem very different. <S> Indeed it is different <S> but I just want to share a bit of my experience. <S> Basically the other people's responses are more direct and thorough answer. <S> If you're from web, not necessarily php programmer though, the necessity for web development is about to boom even in robotics. <S> A few areas I can think of that are heavily dependent on web technologies: <S> Needs for mobile devices as a human interface is getting bigger & bigger, where web or mobile phone apps do the work. <S> java script , android , iOS are needed. <S> An example of prominent projects might be the one called rosbridge . <S> Using web as a source of data is the same in robotics application development. <S> Some people call it as Cloud Robotics .
|
To your questions: You should learn basic electronics theory, and the basics of microcontrollers.
|
Why are polyfuses so big? Why are polyfuses so big? I was looking at a 500mA polyfuse, it is in an 0805 package, but there was only one of them - the rest were 1206. I have two questions. Why so big? Does anyone make 0603 polyfuses? <Q> As I can see from wikipedia, a polyfuse works as that it is a thermistor where the resistance changes non-linear with it's temperature. <S> It's designed to heat up much faster when the current goes after a certain point. <S> That's why there is a tripping time, because the fuse has to heat up. <S> I can see why they aren't in 0603 because you would blow them up too quickly. <S> Also I can imagine that the series resistance can't be very low (it needs to heat up), and it might be difficult to produce a polyfuse with very low series resistance for it's size and current. <A> Littelfuse make 0603 polyfuses <A> Because they have to absorb a (relatively) large amount of energy in a short time. <S> This 0805, 500mA Poly-Fuse has a minimum resistance of 150m\$\Omega\$, and at 8A trips in 0.1s. <S> That's 10W in 0.1s, the same energy as 1W during a second. <S> Note that 0805 resistors are only rated at 125mW. <S> And yes, they also exist in 0603 .
|
Polyfuses aren't indestructible , for sure they will go bang if you trip them with too much current. I think to make them a lot more durable, because they need some room to have enough material in place.
|
How's my crystal oscillator layout? The HC-49 xtal is an 8 MHz crystal, and the radial crystal is an RTC 32.768 kHz crystal. C11, C12 are 22pF, and C13, C14 are 18pF. The traces go directly into a micro (a PIC24F.) I tried to follow Microchip's guidelines on this, but they advised using surface mount xtals and talked about "guard rings" which are alien to me. <Q> I realize you are using a through hole crystal, but the idea is the same. <S> In a professionally fabricated board I would have smaller vias allowing me to place more along my shield as well as some under my pic. <S> As a note, only 1 of the pins on the PIC is ground, but I went ahead and connected an IO pin to ground. <S> And as another note, it is not shown here, but I a full ground plane that my vias are connecting to. <A> It's a good idea to return the ground for the feedback capacitors directly to the nearest ground pin on the MCU, to reduce emissions. <S> A guard ring is simply a track connected to ground. <S> It shouldn't have any other connections made to it, as it shouldn't carry any current. <A> Guard rings are a term used to describe low-impedance traces that surround or "guard" a high-impedance or sensitive signal. <S> Usually the guard ring is a ground connection, but it can be any low-impedance signal. <S> A quick google search for "guard ring" with a few other terms (layout, crystal, oscillator) brought up several useful links such as this , <S> this and this , among others. <A> I would move C13 and C14 to the right of the crystal. <S> I would also put more space between the oscillator signals and the RTC signals. <S> On C14, you have the trace going right through it. <S> I've seen recommendations against this for thermal reasons. <S> That pad will leak more heat and cause the solder to solidify differently. <A> General uC layout guidelines can be found in Atmel's AVR042 application note. <S> I like it a lot <S> and it has some good basic advice. <S> Specifically it has guidelines on laying out the board with crystals in mind: http://www.atmel.com/Images/Atmel-2521-AVR-Hardware-Design-Considerations_ApplicationNote_AVR042.pdf
|
The recommended way is to put a small stub from the main trace to the pad.
|
Most Simple Stoplight circuit What would be the simplest way without using a microcontroller to make a stop light circuit. All it must do is go from Green -> Yellow -> Red. <Q> You could do it with a 555 timer and a counter: http://www.kpsec.freeuk.com/projects/trafficlight.htm <A> I tried a circuit right now, it includes a astable mv (you can also use a 555) and one op-amp: circuit simulator <A> Eight and a half years too late for leisx <S> but there is a simple circuit that provides the correct sequence and timing, unlike the other answers. <S> I already knew the simplest way, but for fun created a new circuit that is about as simple. <S> It is built on a 74HC74 D flip-flop; one section forms an oscillator and controls the green and yellow LEDs; the other toggles to control the red LEDs. <S> ( Note: <S> this only works with 74HC flip-flops, not 4013 etc.) <S> For FF1, R1 and C1 determine the time the green LED is on, and R3 and C2 determine the time the yellow LED is on. <S> R2 discharges C1 quickly when the Q output is low, 10K is a good value. <S> The oscillator could be made with one cap and three resistors, but would require a nonpolar cap and the G and Y times could not be set independently, so I opted for the version shown. <S> R4,5,6 set the LED current so you can match the brightness of the different colors. <S> ( The LEDs could be wired so only one resistor is used but this requires six LEDs of equal brightness.) <S> The little timing chart shows the sequence, which is correct for North America. <A> You are going to want a very slow clock source, but this should be relatively easy to do with next state logic and 3 flip-flops (clearly you only need two, but one hot encoding makes it easy for 1 extra flip-flop) just feed the flip flops to each other in a loop, have it reset so that one goes to green, and you have it.
|
The minimal autonomous circuit, I think, involves at least a 555 (or another astable multivibrator, some TRC circuit perhaps) and a counter (or some opamps or diode-diode logic).
|
Supercap compared to a battery What is the current state of things when it comes to super capacitors and batteries? Are super caps anywhere near rivalling LiPo's in capacity? I've often heard people talking about super caps as being a viable replacement for batteries, in that you can charge virtually instantly and recharge millions of times, but is this just a pipe dream? <Q> I would say, anything that you would consider a coin cell battery for you can "start" to consider a supercap. <S> The other aspect is that in devices that need current in spurts (like a wireless transmitter), you can use a supercap to provide the short bursts of power needed and then slowly charge them back up from your battery. <S> This method extends the life of your battery. <A> They're much easier to charge/discharge than batteries. <S> If you have lots of incidental power coming in short bursts it makes sense to store it in a capacitor instead of a battery immediately. <S> They don't match batteries for energy density yet <S> (and they're certainly not as cheap joule for joule). <S> If you plan on having this sit around a long time without any power coming in to charge it and expect it not to have lost any charge I don't think you'll be happy. <S> You're better off with a high-resistance battery if it has to sit a long time and not source a large amount of current. <S> The exact determination depends on what you're doing <S> but I think you'll be happier with batteries. <A> Some ballpark figures I remember from a year or two ago: <S> Batteries have 10 times the energy density of supercaps. <S> Supercaps have 10 times the power density of batteries. <S> So for the same size you can store a lot more energy in batteries, but draw much more power from supercaps. <S> That's why some trams use supercaps and not lithium batteries. <A> Super caps are lower voltage (1.2V or so each), so need to be wired in series and parallel combinations to be able to get accessible voltage from them. <S> You will generally need a buck boost converter on the output side to adjust the voltage dependent on the charge left in the super capacitors. <S> Compared to a Lion battery where you can get a much linear voltage over a smaller range in relation to charge, so generally a buck converter will suffice. <S> So as a replacement for battery not really, there are too many issues with them. <S> As a complement to a battery use. <S> Do you want to the device to remain powered after power lose? <S> for a reasonable time to change batteries and the like? <S> then super caps may be the answer.
|
Supercaps can be worthwhile if you'll be doing energy harvesting.
|
Can a credit card be demagnetized with a nearby cellphone? Suppose I have a standard credit card with a magnetic stripe, lying right on top of a cellphone, or in a regular leather wallet that's lying right on top of a cellphone. The cellphone is on (but not in a call), uses a 3G network, and is in a good reception area. Will the credit card be demagnetized (to the point where it can't be read) in the above 2 scenarios? If so, how long will it typically take? An answer that shows all assumptions and calculations used would be especially useful! <Q> Mythbusters did this: http://en.wikipedia.org/wiki/MythBusters_%28season_1%29#Eelskin_Wallet <S> If I recall correctly, they tried rubbing cards with magnets and cellphones, but failed to cause any damage. <A> No, you're fine. <S> However a GSM phone could knock out a 3.5" floppy disk - I learned that lesson the hard way a long time ago. <A> Generally, to demagnetize a credit card, it would take a 1,000 gauss magnetic field. <S> A cell phone's magnetic field intensity ranges from just 1.2 to 10 milligauss. <S> http://members.questline.com/Article.aspx?articleID=17783&accountID=1285&nl=10213 <A> I don't know about credit cards but last year I stayed at a hotel with key cards <S> and I carried the card in my pocket with the cell phone and it disabled the key card. <S> At least that is what the desk clerk said when I had to go down and get another one. <S> It worked for a while before I did that <S> so it wasn't the card. <S> I have been careful since then. <A> Magnetism tends to exist in "domains", which are little collections of magnetized molecules. <S> These domains tend to stay stable until sufficient energy overcomes them. <S> This means that the information in the magnetic stripe will resist being changed until exposed to a strong enough field. <S> So, the answer to the "how long" question becomes, either "instantly", or "not at all". <A> But the radio is not the problem: speakers in the phone have permanent magnets. <S> Vibration motors have permanent magnets, the case of the phone is really thin and does not shield at all magnetic fields. <S> A credit card in the wrong place at the wrong moment and for enough time eventually will be ruined. <S> FWIW, it really happened to my mother, three times! <S> Her pocket purse compartments were arranged in a way that put her phone motor exactly in the magnetic stripe center. <S> Three ATM cards rendered useless in less than a month.
|
If you're VERY unlucky, and if you're talking about the magnetic stripe, yes, it could be rendered unreadable. The answer is “no.”
|
Are coin cells a suitable replacement for AA batteries? I am currently using AA batteries in my projects but would like to look at cell batteries for my next project, due to their compactness. Apart from the physical appearance, how do cell batteries differ from the more chunky AA batteries? (I am guessing the mAH would suffer for example?) <Q> Let me sum up your limitations of a CR2032: <S> 10mA is about the max current youwant to pull from a single, it iseasy to put them in parallel, but alarge amount of testing(more than2000 batteries worth) has confirmedthis. <S> * <S> They can be purchased to have400mAh, the less current you pullthe closer to this <S> it will be,pulling more then 1mA decreases this a decentbit. <S> ** <S> Under a 1mA load they willdecay all the way to 1.5V beforethey fail, they will be at 2.7Valmost right away. <S> You can measure an almost full voltage on them with a multimeter when they are dead. <S> This is solved by placing a load on them. <S> * <S> ** <S> If you are lazy, it is very easy to tell how much charge they have left by how much they make your tongue tingle. <S> Your tongue acts as the load and measures. <S> This is probably by far the easiest way to test them, although it does pull a decent bit of current. <S> I think Thomas wrote a good answer <S> , I just thought it might be helpful to give some details of the coin cells since it seems you have used AA quite a bit. <S> * Wikipedia says up to 15mA pulsed , but we confirmed that up to 1mA shows a nearly consistent capacity. <S> ** Wikipedia shows a standard that is a bit lower, but my company would always purchase 400mAh or 450mAh CR2032. <S> When you buy a "standard battery" you can expect 200mAh it seems. <S> *** People often will measure batteries without load, when someone tells you on a project that ran out of power early, ensure their original battery measurement was under load, very easy mistake. <A> I'll compare against alkaline AA's and lithium CR2032's as these are the most likely candidates to replace each other. <S> However, they have several differences: <S> Coin cells are usually 3V, instead of 1.5V. Coin cells can only deliver a few mA before the voltage drops too low - you can power an LED with them at most. <S> Coin cells are usually more expensive per cell compared to an AA cell. <S> Their terminal voltage characteristic is to keep a stable voltage (>2.7V) for a long time before dropping very quickly, whereas alkalines generally fall to ~0.9V before dropping out completely. <S> This can create difficulties for low battery warning circuits. <S> Here's an image that shows what I mean: <A> This isn't a direct answer to your question, but it's related. <S> I assume you're using multiple AA batteries in series (in order to achieve a higher voltage for your circuit to operate). <S> In that case, you might consider using a buck/boost circuit to boost the voltage from one AA battery. <S> You'll pay a penalty in terms of how much current you can supply, but compared to a coin cell, it will be better. <S> Sparkfun sells a kit that will take in down to 0.3v and output 5v at 500 mA , for example.
|
Coin cells have significantly less capacity, you'd be lucky to get 100mAh out of a coin cell whereas 2000mAh isn't unusual for a good AA and even the cheapies will do >1000mAh.
|
Is it worth getting a function generator? Is a function generator necessary for every day lab use, or is it special purpose equipment? That is, does it have similar utility to an oscilloscope, or multimeter - would you use it regularly enough to justify it's cost? <Q> If you're working with digital systems and square waves <S> /pulse trains only, then it's probably not necessary. <S> However, for analog amplifier design (ex. audio), it's an imperative. <S> If you haven't been stymied on a project because you lacked this tool, you probably don't need it. <S> Spend your money on an oscilloscope and logic analyzer instead. <S> Conversely, if you can't imagine why you would need a logic analyzer, you should spend your money on a function generator. <A> In the audio frequency range you can use your soundcard. <S> Use google to find the software. <A> Depends on what waveforms would be useful in everyday work. <S> I like to play with waveshaping and signal processing, so a good versatile function generator is one of my favorite instruments. <S> It's likely to be useful for almost anyone into electronics who's gone beyond building crystal radios and blinking LEDs. <S> A more important question is: which waveforms will you need, and at what quality? <S> Sines are good for testing linear filters, taking measurements at specific frequencies. <S> For accuracy, the sines have to be low distortion. <S> Less expensive generators have poor sine waves (look at the THD). <S> Triangles and squares are good for testing amplifiers - our eyes aren't sensitive to small deviations from a sine, but are very good at seeing problems with straight lines and square corners. <S> Ramp waves are good to sweep oscillators over a frequency range, which is also good for testing linear filters, and also circuits like mixers, modulators/demodulators, and audio testing. <S> If you're into experimental physics, pulses that you control in fine detail can be useful in controlling equipment, data acquistion, strobing to observe fast repetitive phenomena. <A> I found a fairly cheap one for $153: http://www.bellnw.com/products/0762/ <S> It's pretty much no-name <S> but it will certainly be quicker for me to use as the PWM input to a breadboarded switch-mode power supply than rigging up something with an Arduino and op-amps. <S> Plus, only $153. <S> That's an expensive dinner for four, or a couple of outfits. <S> If you'd buy a $1k plus scope, buy this, no question. <S> EDIT: It may be worth it to get the SFG-1013. <S> It has a voltage display. <A> This all depends on what work you are doing. <S> Some people don't even need a scope or a dmm. <S> More generally, some people will say its not worth getting a computer (even some EE's), yet I am sure most of us would argue it is worth it. <S> So what work do you do that you wish you had a function generator? <S> If you can't think of anything then it's not worth it. <A> If you check ebay, you can quite a few between cheap and $50. <S> Frankly, I'd do that and put your extra money into oscilloscope. <A> A software DDS with a suitable MCU is a low-cost way to make a function generator. <S> This design of mine will go up to 200 kHz or so. <A> As far as a good all-around tool, I've had pretty good luck with the National Instruments myDAQ <S> (not an advertisement, we bought a couple to evaluate for our EE department). <S> They can be had for 175 dollars with the educational discount, and it covers most of the basic needs. <S> It is basically a function generator, an oscilloscope, and a multimeter all in one. <S> The analog output (function generator) operates at up to 200 kS/s, meaning that you can pretty accurately generate waveforms for the audio spectrum (I believe that the software allows up to 20kHz). <S> Much higher, and you'll have to shell out more money. <S> The feature that I like is the arbitrary waveform generator, which can be very useful depending on the circuits that you are building. <S> Basically, the need for most test equipment is determined by what sorts of projects that you are working on. <S> If you are doing hobby-level projects, you may not need any sort of expensive hardware.
|
In most cases, for serious accurate work there are specialized instruments for the job, but even with a budget for such things, a function generator is useful for quick and dirty experiments of all kinds.
|
Increasing ADC resolution by supersampling on a successive approximation ADC Is it possible to increase the resolution of an ADC by supersampling on a PIC24F ADC, which has 10 bits of resolution and is implemented using a successive approximation engine? Speed is not critical - greater than 1 kHz or so. My initial thought was no, as it is not a Delta-Sigma ADC and results are not cumulative, so I thought I could add noise to the voltage reference (3V nominal) using a pin of the MCU and a high valued resistor. Would this work? The additional noise should improve the resolution, but I'm unsure if this applies for all types of ADC's. <Q> Atmel has very clear application note about increasing ADC resolution by oversampling with sources in C. Description in PDF is here , sources are on Atmel website. <A> oversampling allows higher ADC resolution, if you oversample at 4x nyquist you can gain 1 bit of resolution via spreading quantization noise and decimation. <A> (wow, long sentence)I think this is probably very difficult to code compared to the method that Mark mentioned where you over-sample. <S> What I would worry about in the method is the error caused by adding more non-ideal components to a system where you are looking for very high precision. <S> If you are concerned about noise, you can over-sample, and then in code filter and then down-sample. <S> This method will actually give you less noise then to just sample at your desired rate, but costs more in the since of processing time. <A> I think that you've confused two different things: Supersampling (a.k.a oversampling) is the process of increasing signal time-resolution (you might say: horizontal). <S> It multiplies the sampling rate of a sampled signal by adding extra samples between existing ones with interpolated values. <S> This allows for higher-precision processing further the road and helps minimize some processing artifacts. <S> This process applies only to digital signals, because analogue signal isn't sampled, it's continuous. <S> One could say that an analogue (voltage) signal has infinitely high sampling rate, but that's not technically true, it's just a figure. <S> Dithering is adding noise to increase the dynamic (vertical) resolution of the digital signal that is about to be quantized. <S> Quantization is necessary to store samples in finite precision numbers (digital files). <S> Adding noise before quantization replaces the quantization distortion that produces audible artifacts called quantization distortion, with much less audible noise floor. <S> You can't increase sampling rate (and therefor frequency range) by adding noise to the signal, but you can increase the dynamic range by replacing quantization distortion with it.
|
If when you say adding noise to your reference, you are adding a known offset to your offset in order to determine when a signal shifts to reading a different value and then interpolating, then yes, I think that should work.
|
Serial control of 25 LEDs from a single pin I have a microcontroller with one available digital pin. How can I control 25 LEDs? <Q> Shift Register and I2C is good, but only if there are at least 2 pins free. <S> I suggest Dallas 1-wire port extender DS2408 will be an optimal solution. <S> Code for Dallas 1-wire <S> device access is not so complicated and there are plenty of examles on the web. <S> You may use several DS2408 connected to one pin or implement more logic after single DS2408 whichever you'd like. <A> I2C IO Expander : - <S> Some protocol overhead, but it should be expandable to a very large (thousands) number of LEDs. <S> Simple shift register - Dead Simple interface, the LEDs may flicker when updating if the shift register clock is not fairly fast. <A> The only thing that hasn't been mentioned yet is the possibility of adding another slave to your SPI port. <S> SPI is called a 4-wire protocol <S> - You have two data lines, a clock line, and a select line (as well as a common ground, but that doesn't usually count). <S> However, the first three are shared among all the devices on the bus, so each device after the first one takes only one more trace/wire. <S> SPI also increases your bus to full duplex, but that won't matter for this application. <A> I'd just chain a few shift registers together. <S> (This reduces the frequency with which you can toggle the LEDs, of course..) <A> If you really have only 1 pin available the Dallas 1-wire bus looks like the most obvious thing. <S> However, since this is output-only, there are cheaper solutions. <S> A serial PWM bus which carries both data and clock is easy to set up; see for instance Roman Black's page as also mentioned by davidcary. <S> You only need serial-in parallel-out shift registers like the 74VHC164 , which you can cascade for as many outputs as you want (one '164 has 8 outputs). <S> In this solution LEDs are driven statically. <S> If you do have other I <S> /O you can share, like SPI of I2C, you may go for more luxurious solutions, like Maxim's MAX6950 . <S> The MAX6950 has blinking and brightness control, and slew-rate limiting, to name a few features. <S> LEDs are multiplexed, which means you only need one 16-pin driver. <A> The answer is probably "a series of shift registers," but can you be more specific in your question? <S> What microcontroller? <S> What do you mean by "digital port"? <S> A single pin? <A> 25 LED's depending on size can draw a lot of power for a single digital IO pin on a micro-controller. <S> Rather than driving them directly, you should probably use a simple FET switch (so the IO is tied to gate) to control the power to the LED chain. <S> Depending on your application, there are other more robust ways to accomplish this. <S> But throwing in a fet will probably get you working the fastest. <S> For example, if you want to gate a variable signal, there more complicated devices, sometimes called digital relays, that give you a way to digitally switch it. <S> As for individually controlling 25 LED's with a single IO port. <S> As others suggested, you can use a few shift registers. <S> There are more complicated solutions involving communicating with another IC using a serial protocol (I2C for example). <A> Roman Black describes the shift1 system that allows you to independently control any number of LEDs from a single microcontroller pin. <S> @Fake Name, @Tim, <S> @pingswept all suggest chaining some shift registers together, the DO data output pin on one feeding the DI data input pin on the next. <S> The 74HC595 would work fine.(Perhaps <S> some other chip would work slighly better ). <S> (@reemrevnivek, with this kind of daisy-chained SPI, each device after the first does not require any more pins on the microcontroller, contrary to what many people claim -- why do you listen to them? :-). <S> Normally this requires 4 pins on the microcontroler -- MISO, MOSI, SCLK, and latch. <S> Since you are only doing output, you don't need a MISO input pin. <S> Roman Black has figured out that with a some very careful timing on on a single microcontroller output, and with some careful tweaking of an analog circuit, a single microcontroller pin can drive a simple-looking analog circuit that separates out the common SCLK, the DI pin of the first chip in the chain (MOSI), and the common latch signal. <S> Then that microcontroller can control 25 LEDs from a single pin. <A> You can connect another microcontroller via that single pin, and talk to it via 1wire (or your own protocol if you need high speed). <S> Then that other microcontroller deals with LEDs.
|
With only 1 IO pin, you can use a 1-wire expander/shift register or add another device to your I2C bus, as already pointed out. Using a double buffered shift register will fix this.
|
What is needed to go from single Ethernet to many? I have an embedded Linux system with a single Ethernet port, but I need to go to many ports. It is obvious I need to add magnetics and ports. The trickier parts follow. My processor has an on-board MAC and I'm using a single-driver PHY. Do I only need a new PHY with more drivers? Is it possible to use multiple PHYs on the same MAC? Do I need a MAC for each port? <Q> If this is for a prototype - consider adding a USB ethernet adapter. <S> If you're building a product, I'd consider an onboard ethernet switch chip. <S> Like this: http://www.micrel.com/page.do?page=product-info/fastether_sw.jsp <S> (source: micrel.com ) <S> The <S> ADM6996 <S> may also be an option, if you can find it. <A> If your processor only has one PHY, you're not going to get a lot more speed by embedding the switch on your board. <S> It will be much easier to just add a switch: <S> As the text on this example indicates, any halfway decent switch will autonegotiate 10/100/1000 Mbps, cable crossover. <S> Switches are available in anywhere from 4 to 48 ports, with 5 ports being a common number for simple desktop switches. <S> They can sit on your desk or be rack-mounted. <S> You can chain them together for ridiculous numbers of ports, if you feel so compelled. <S> You can get them for less than $10 (visit Newegg ), or as much as 10,000. <S> One important thing to consider is whether you want a managed or unmanaged switch, but we'd need more information to make this decision, and this is swiftly turning into a question for ServerFault. <S> It will be physically larger than putting the contents of a switch on your PCB, but I wouldn't do that unless it was absolutely necessary. <A> If each port is going on a completely separate network you can get away with a single MAC address, but this really doesn't work if you are going to have it on the same network. <S> I would highly recommend having separate drivers with separate MAC address per port. <S> My answer is focused on if you were creating a device like an embedded firewall where you were wanting traffic to come in on one port, filtered, and then be sent back out on a different port going to a different network. <A> I second the switch suggestion. <S> If you need to separate different networks then configure the switch chip to split the ports into different VLANs and trunk all VLANs to the port that the Linux box is on. <S> Linux will be able to access all VLANs as though the system had individual network interfaces to the different networks. <S> Most, if not all, switch chips can be configured via a serial EEPROM, so modifying an off-the-shelf switch for a POC or a one-off hack ought to be easy enough.
|
An external switch is probably the most flexible, simple, and cheap way to do what you want.
|
Why do my compact fluorescent lamps keep dying? I know that this question may be off-topic here, but I'll ask it anyway since they do have electronics inside. I've noticed that my fluorescent lamps keep dying after only couple of months of use. When they die, they die in groups of 2-3 and as far as I can see, both new and old lamps may die during such events. As far as I can see, electronics inside dead lamps look normal to me, but then again, I don't have much experience in electronics, so I could be wrong. So I'm asking you people what could be the cause and how can I prevent it? I'm thinking about bad electricity supply, because I have frequent brown-outs, but as far as I can see, deaths of lamps aren't more frequent during times when I have brown-outs. I'm thinking about connecting lamps over a UPS or "power conditioner". UPDATE: I did some investigating and I think that I've found source for my problem. As I mentioned, I had brownouts. I noticed that nobody in my area had brownouts, so I the problem was probably with my installation. Then I noticed that voltage for two phases was between 220 V and 230 V, as expected, but one was between 190 V and 200 V. The main cause for that seems to be a 35 A DIAZED DIII fuse which is connected to the phase which powers my lamps. It turned out that the tip of the cartridge and fitting element of the fuse case were corroded and were sparking and overheating (the cartridge was so hot that I had difficulties removing it). It also turned out that when power company replaced my electromechanical meter with solid state meter, they installed new circuit breakers in such way that fuses are serially connected to breakers and are "downstream" from them. I talked to few electrical engineers and electricians and they all believe that since circuit breakers are installed, fuses should be removed. I'll get an electrician to remove them will report back how that effected lifetime of my lamps. <Q> Schematics & Photos for 17 CFLs Failures <S> Common failure is broken capacitor C3. <S> it is possible mainly at cheap lamps, where are used cheaper components for lower voltage. <S> Whet the pipe doesn't lights up on time, there are risk of destroying transistors Q1 and Q2 and next resistors R1, R2, R3 and R5. <S> When lamp starts, changer is very overloaded and transistors usually doesn't survive longer temperature overloading. <S> When the pipe serve out, electronics is usually destroyed too. <S> When the pipe is old, there can be overburned one of filaments and lamp doesn't lights up anymore. <S> Electronics usually survives. <S> Sometimes can be pipe broken due to internal tension and temperature difference. <S> Most frequently lamp fails, when power on. <S> Reviewing Most of these compact fluorescent lamps use same or very similar wiring. <S> More expensive lamps use a little complicated wiring with electrode preheating and thanks to it <S> they have longer lifetime. <A> As you said, it's going to be tricky to figure out the cause of why these bulbs die - but it could be affecting other appliances too. <S> Have you noticed any other devices malfunctioning or breaking? <S> Most CFL's and the ballasts are designed to be cheaply produced; the ballast is based off a simple self-resonant circuit and thus has little protection against problems on the line. <A> <A> Most are designed to be used in open fixtures with the base down so the heat can rise away from the electronics. <S> To keep costs down, they have electronics designed on the hairy edge. <S> The heat can easily dramatically shorten their life <S> I started recording lifespans and found that in an enclosed fixture, my CFLs had a typical life of one to three months. <S> Used as designed, open, vertical and base down, they tend to not die. <S> I'd suggest either going back to incandescent in your closed fixtures or paying extra and purchasing CFLs specifically rated for enclosed fixtures. <A> Funny you mention that your CFLs have a short life. <S> In this month's Silicon Chip magazine, page 7, a reader wrote in with the same complaint. <S> It turns out that Philips would not offer a warranty on their CFLs if used in an enclosed fixture. <S> However no explanation to why was offered by Philips or discussed in the article. <S> I would scan the page to show you the letter <S> but I don't need Leo Simpson getting cranky with me. <A> seems the new bulbs are made in bulk with cost saving strategy. <S> Not a novelty any more. <S> We will have to figure out what brands are lasting and what brands are blowing early. <S> I have had 9 of these bulbs blow in 4 months. <S> However, I have larger ones that have lasted over 6 years now. <S> Seems the compact ones are the problem. <S> I have them enclosed and open.
|
Off the top of my head: Vibration from ceiling fans, many on/off cycles, heat, bad power format, cheap CFL. If your CFLs are in enclosed fixtures and are not specifically rated for such, I'd say that's the problem.
|
What's causing this high frequency ripple on the output of my LM317? I'm using an LM317T to regulate 5 V to 3.38 V for a microcontroller. R1 is 330 ohms and R2 is 560 ohms. There isn't any input capacitor and the output capacitor is 470 µF 25V, because I had that value in a pack of 50. The microcontroller is drawing at least 50 mA, so I'm fairly sure I'm meeting the minimum load specifications. The regulator is being powered from a computer SMPS , but I had a very similar configuration set up last time running off an SMPS without any problems. Here's a scope trace of an I/O pin to show you what I mean: The ripple is about 60 mV p-p , but as you can see it also happens when the pin is low. I'm worried it might affect the microcontroller itself (for example, make it unstable.) What I'm more worried about are these large bursts of noise which occur seemingly randomly about 100 times per second: It turns out this noise is coming from my power line network adapters ; it's leaking through from the power line into the computer SMPS and to the 5 V output. <Q> Make sure that there is a small ceramic decoupling capacitor at the supply pin(s) of the microcontroller. <S> Something 100nF - 1uF should be OK. <S> (The 470uF cannot deal very well with HF noise). <S> How is the grounding on the microcontroller side? <S> Is there a large ground plane? <S> Is the circuit return earth-referenced? <S> Is the scope connected to the same earth reference? <S> If you don't have a spring-clip for the ground, and don't mind abusing a probe, you can solder short pieces of solid wire from the supply rail to the probe tip and ground ring (under the probe tip) which will cut down on CM noise pickup dramatically. <S> In general, most ripple measurements in the switching power world are done with short probes (or direct coax) with 100nF and 10uF ceramic / tantalum caps shunting the probe and the scope set @ 20MHz bandwidth limit. <S> (CM noise <> PARD) <A> The ripple could come from a number of sources. <S> It's a little hard to tell from the photo, but it looks like the ripple is at 100 kHz. <S> Is there anything in you circuit that operates at that frequency? <S> If anything is getting switched at that frequency it is most likely the source and you will have to find some way to isolate it from the power supply. <S> But first, check that the oscilloscope ground isn't picking up the noise. <S> Make sure it is connected to a sensible reference point so that there is no common impedance that could be coupling the noise. <S> Secondly, remove the ground wire and use a spring ground clip to ensure that no mutual inductance it coupling into the probe. <S> If there is no 100kHz frequency in your circuit and you have a bench supply, try running the circuit off that to remove any influence of the switch mode supply. <S> You could also double check the bypassing on your LM317. <S> These will often require input decoupling. <S> (The data sheet suggests input decoupling if it is more that 6 inches from the power source) <A> The 317 has a rather big voltage drop (Vin-Vout). <S> At room temperature, it is at least 1.5 V at light loads (20 mA), increasing to as much as 2.5 V for larger loads (roughly two diode drops). <S> What may happen is that the uC draws a larger current every once in a while, the regulator can't maintain 3.3 V with as little as 5 V at its input and goes out of regulation, causing what looks like noise. <S> Try using a low dropout-regulator (Vin-Vout < 0.7 V) instead of the 317, or try increasing the input voltage. <A> I just looked at your oscillograms again, and there is one detail that may hint towards your problem: The ripple seems to be just as bad when the uC's output is low. <S> Try tracing back the problem from there, by considering both the VCC and the GND rail. <A> Noise when the output is low...to me, that implies ground bounce. <S> But nothing in your statement implies anything that could cause that kind of ground bounce. <S> Are you drawing enough load from the ATX supply? <S> They have minimum load requirements. <A> The LM1117 instead of the LM317, with some protection diode and improved ripple rejection should do this job. <S> Oh, and don't use an SMPS direcly with the LM317. <S> You can use the SMPS itself to give many more voltages than it has. <S> Examples: +5 v to GND = <S> 5 <S> V +12 V to 5 V = 7 <S> V AND most "GOOD" computer PSUs have a "GOOD, stable" 3.3 V supply for the processor. <S> Afraid of its current? <S> Limit it with a 33 ohm resistor (100 mA maximum) and be happy.
|
If it was the 317, I would expect the problem to be worse at a high output voltage, and maybe even almost invisible with an output at the low state. It could be picking up the noise it two ways.
|
Connecting two phone handsets to talk I am hacking some old phones into my arduino project. I am currently controlling all of the ringers, dials, and hooks through my board. At a certain point, I would like to connect the two handsets and let them function kind of like a basic intercom. There are four wires into each handset, two for the microphone, and two for the speaker. As I understand it they function much like any cheap microphone or headphones you could plug into your computer. My initial thought is that I could just connect the mic of one to the speaker of the other, but I don't know audio circuits very well and am not sure if additional circuitry or op-amps would be required. What is the simplest way to do this? Also, what would be the best way to toggle this connection, so I can control if the lines are open or closed? <Q> Your microphone will need to have a simple amplifier in order to power the speaker. <S> You will just have to make sure that the op-amp can output enough power to power the headset. <S> If standard op-amps are not powerful enough to power to speaker you will need to go with a more complicated amplifier. <S> As for the toggling the connection, are you wanting to just have a dedicated 1-1 connection that can either be on or off? <S> If so, you could do this by powering off the amps with a simple switch. <S> If you are wanting some switch capabilities, such as 1 phone can be routed to 2 different locations, you should look into analog multiplexers. <A> About 10 years ago, I bought a device called "Party Line" from a company whose name escapes me. <S> This device has six telephone jacks on it, and simulates the telephone main office. <S> You could plug in up to six regular phones, and they could call one another. <S> Think of it as a very simple PBX (with no connection to the real phone network). <S> Any phone can dial any of the other five by dialing a 7-digit number where one of the digits indicates the line to connect to. <S> It only supports one connection at a time, though. <S> But for two phones, that's all you need. <S> I bought it as a kit, and assembled it myself. <S> Inside it has a PIC and some discrete circuitry. <S> I used it while developing some software that would transfer data over a modem connection. <S> I had two computers with 56K modems, each connected to the Party Line. <S> It worked very well, and I made thousands of calls from one system to the other without tying up my real line or incurring any charges. <A> After all, at the time when they were designed (1920's?), there were no active elements that would fit inside the phone case and which also would not require bulky power supplies. <S> Basically, the whole phone was passive elements and ran off batteries in the local office, the voltages being surprisingly low. <S> I don't know the exact levels off the top of my head (google is your friend here) but want to say that while off-the-hook, the voltage is somewhere around 7 volts. <S> The only significant part you find inside an old phone, other than the mic and the speaker, (and disregarding the mechanical ringer and dialer) is some kind of a multi-tap transformer. <S> Not sure what the transformer accomplished. <S> The microphones used a finely divided carbon powder, under a diaphragm, and were basically variable power resistors that respond to sound. <S> I know, from fooling around with them as a kid, that you can put a 6V lantern battery, a carbon mic, and an 8 ohm speaker in series, and you can get a signal through. <S> If you put two such microphones in series with two speakers, and of course, the battery, you should get at least some signal back and forth. <S> The transformer in the phone was (speculation!) <S> probably there to get a better signal into the ear piece by doing an impedance match. <S> At some point (1960's maybe, or 70's?), they stopped using those carbon microphone elements in favor of more modern microphone technology, at which point there would have to have been an amplifier involved. <S> The carbon mics I've referred to can be recognized by the fact that when you unscrewed the mouthpiece cover, this nearly 2 inch diameter mic element would fall out in your hand. <S> If your old phones are newer than that, just disregard everything I said.
|
If those are truly old fashioned phones, (e.g., like 1950's phones) there is probably a way to interconnect things without needing any active elements. This might depend a little bit on what speaker is actually being used in the headset but an op-amp circuit should work for you.
|
How are dot matrix LCDs controlled? I've seen microcontrollers which claim to drive LCD segments. For example, the CC430 can drive 96 segments. But, it's a 64 pin chip. So, it must be providing signals for some kind of mux, what is this interface called? For dot matrix LCDs, could a microcontroller like this drive more than 96 segments by scanning? I want to drive a small (eg. 32x32 pixel display). <Q> They are typically made of custom LCD glass and how the display is multiplexed is built into the LCD glass itself. <S> You will need to check with the display vendor to determine how many common and segment lines there are for your LCD and how they are wired. <S> For a dot matrix LCD you will probably need an external LCD controller. <S> The LCD display vendor can probably recommend one. <S> For some background in how a on-chip LCD module works. <S> Microchip application note <S> AN658 <S> EDIT: <S> NXP Has a number of LCD segment drivers available and application notes explaining how to use them. <S> I have not seen a microcontroller that has a built in LCD driver for more than a few segments and certainly not 1024. <S> I'd recommend something like the PCF8576C. You can cascade multiple chips together to drive more segments. <A> First, there are many types of dot matrix displays, some even receive ASCII data via parallel or serial buses, the following answer covers the pixel-addressable ones. <S> The dot matrix displays that I've analysed (various LED, LCD and a pair of fluorescent ones, all grey-scale) use two lines (for v-clock and h-clock) and one line for pixel value, internally they integrate a mux for one dimension and a shift-register for the other (used as a counter). <S> Sometimes, for adding shades of gray, the MCU holds the clock for the shift-register and refreshes the same line several times. <A> mjh2007 hit the nail on the head when he said that they're typically used with custom LCD glass. <S> You used the CC430 as an example; it's integrated into the TI Chronos watch, with a watch LCD on the face. <S> See pages 75 (Schematic) and 83-84 (LCD information) of the watch manual for a description of this implementation. <S> It uses its 24 segment pins and 4 'com' pins to drive those 24*4 = 96 LCD segments. <S> It's probably easier, though, to just get a dot-matrix display with an integrated controller. <S> Do you have a source on a display without a controller? <A> Non TFT LCDs consist of an array on pixels on the inside of usually the bottom glass of the glass sandwich. <S> The top glass can have 1, 2, 3 or 4 different backplanes, each backplane located directly across from a specific array of pixels. <S> In the duplex mode (TWO BACKPLANES), 48 pins of the MCU drive both sets of 48 pixels each. <S> The two backplanes are used to select which array of pixels is enabled. <S> It's an optical multiplexing trick, that fools the human eye into seeing one large set of 96 pixels by multiplexing the two backplanes are 100 Hz or higher. <S> Thus a 96 pixel display can be driven by 50 pins of the MCU (48 pixels plus two backplanes).
|
Microcontrollers that drive LCDs are typically for driving segmented LCD with very few segments.
|
Microcontroller with >30KB RAM and high performance in a TQFP-44 or similar package I'm looking for a microcontroller in a TQFP-44 package with 30 KB or more of RAM and, if possible 40 MIPS instruction cycle speed or faster. I can find dsPIC33F's with 30 KB of RAM, but they come in TQFP-100 packages, and I'm only going to be using maybe 15-20 pins of those so it seems like a massive waste of space and money. So I'm looking for some reasonably sized package with lots of RAM. I've given up on the SO28's but if anyone finds one it would be excellent as well. Current candidates are the Parallax Propeller, but that only has 20 MIPS instruction cycle, and the dsPIC's in TQFP-100's. One parameter but not both!! This is for my Super OSD project. <Q> Atmel makes a 32-bit 60 MHz AT32UC3B1256 <S> That's as close as I could find to your specs. <A> Atmel makes some Cortex-M3 parts that come in LQFP-48 (or QFN-48) packages. <S> There are three different RAM sizes available...16, 32, and 48 KB. <S> ARM claims the Cortex-M3 executes 1.25 MIPS/MHz and these parts have a maximum clock speed of 64 MHz <S> so figure 1.25*64 = 80 MIPS. <A> Consider an ARM microcontroller. <S> To find exactly what you want, I recommend that you search manufacturer websites (TI/Luminary, Atmel, ST Micro, NXP, etc). <S> They all have product search systems. <A> Running your requirements through Digikey's interface (In stock, then 32kB+ of RAM, then 40MHz+, then >48-pin packages) results in: <S> P8X32A-XXX : $8, 80MHz Parallax Propeller, in DIP, QFP, and LQFN packages, 32kB RAM AT32UC3B1128 : $10, <S> 60MHz Atmel <S> AVR32 in QFN Exposed Pad, 32kB RAM ( <S> LPC2105 : $15, 60MHz NXP ARM7 chip in 48-LQFP, 64kB RAM <S> I feel bad just throwing Digikey pages at you, but it's pretty easy. <S> I started to do Mouser, but they can't seem to figure out how to sort their values. <S> Also, the cost will probably be determined as much by the volume in which the part is produced as by the number of pins. <S> Don't sweat 40 vs. 64 pins. <S> Oh, and please break out the other pins to through holes or at least test points for future hackers! <A> You don't often see large RAM or flash in low pin counts due to the size of the die - the large pin count isn't a major factor in cost, it's the die size for the RAM etc. <S> Similarly you don't see large pin counts on low-end devices as the size of the pad ring dictates the die size, so it would be a waste of silicon to not use it for functionality.
|
AVR microcontroller with 256K of flash, 32KB of RAM in a 48-pin TQFP package. Check the PIC24 range - there are some 44 pin parts, some with USB host, which may have more than normal RAM to support the USB functions.
|
Looking for a small inductor buck converter in a SOIC-8 package I'm looking for a buck converter in a SOIC-8 package which requires a small inductor (preferably ≤10µH) which can convert 6V-16V to 5V @ 1A. Unfortunately the package must be a SOIC package, because the person I'm designing for requires the SOIC package to be easy to place and solder. At the moment I've drawn a blank: all the high speed buck converters I have found only have a 6V or so maximum input voltage or they come in strange packages which are difficult to hand solder. <Q> Allegro A4447. <S> Wide supply range and also pretty cheap. <S> It has a thermal pad, but at low outputs you may not need to solder it, so can treat it as a normal SO8.Only possible issue is input voltage range at the low end - won't quite go down to 6v <A> Texas Instruments TPS 5410, although 68 uH inductor is recommended. <A> Linear Technology LT1172CS8 appears too meet your criteria: <S> Input voltage range: 3 V to 60 V Internal 1.25 <S> A switch Applications: Logic supply 5V, etc. <S> 8-SOIC package <S> 100 kHz AN19 - LT1070 Design Manual AN30 - Switching Regulator Circuit Collection Is the 20SOIC package too big? <S> ( LT1176CSW and LT1176CSW-5 ) <S> Is it possible to tweak one of the "Black regulator designs" to meet your criteria?If <S> you can't find a monolithic integrated solution, then you have no other choice but to build it up from discrete components like this. <S> May I ask what in the world you are doing that needs 5 W of power, but is so space-sensitive that a TO-263 package is "too big"?In <S> my experience, tiny devices are typically micro-power,and devices that require more than 4 W generally have plenty of room for the TO220-5 through-hole or TO-263 packages that many switching regulators use. <A> Maybe something like the LT1765-5.0 or the <S> TPS54232 ? <S> Both are SOIC-8, plenty of power and high frequent which makes for very small inductors. <S> If you get regulators that only switch at 250kHz or even slower, you get rather large inductors (>47uH) for these applications. <S> It also depends on how much current you are typically using , so read the datasheets properly. <S> Please note that the board design is very crucial if you're working with any type of switching regulator, but especially these regulators that switch at 1MHz or so. <S> What I also recommended to do with these regulators is to calculate the maximum power dissipation. <S> I haven't checked the datasheets extensively <S> so I don't know how much the SOIC-8 will have to dissipate. <S> Usually a SOIC-8 package is terrible, and if the chip is available in something like a SOT263 (which cools much better - especially with planes) you will not be able to completely use the chip specs in that package (but it will still work to some extent). <A> 2A out, SO8 (Thermal pad), up to 2MHz for small inductors/caps. <S> Vary cheap. <A> Check MP1584 out. <S> This chip has a maximum frequency of 1.5MHZ and can deliver up to 3mA current. <S> A friend of mine uses a module sold from china containing this chip to charge his tablet. <S> The datasheet contains the inductor specifications and I can see all of them are <S> less than 30uH.
|
Semtech SC4524A looks a good fit 3-28V in,
|
Reading up to 8 PWM's I want to read 8 PWM inputs (standard servo PWM, 1ms to 2ms) without an input capture module (my module only has 7 channels.) Could I use a capacitor and the ADC on my MCU? Does anyone know of any successful implementation of this, or have any references for this? <Q> What MCU are you on? <S> Where are you getting all those PWM signals from? <S> If it's from an RC receiver, then a much better solution would be to get at the multiplexed signal instead, see this page . <S> If the receiver demultiplexes using a 4017, then the different servo signals will be staggered and you can re-multiplex them, simply by OR'ing the signals using diodes and a pull-down resistor. <S> ... <S> bottom line is that it's much easier to decode one multiplexed signal than it is to mess about with 8 inputs. <A> I would suggest that you put all of the PWM lines on port B. You can then setup an interrupt that is triggered on any change on that port. <S> (I believe port B is the correct port for dsPIC33f, not sure about AVR32 though) <S> When ever you are interrupted you can check all of your inputs and see what has changed. <S> With a separate timer/counter running you can count the on time for each servo. <A> As a side note, I see you already accepted an answer. <S> You need it to have a cut-off of a low enough frequency to stop you having a varying output based on the phase of the PWM going by, but you must also pick a PWM that will react to a change in duty cycle fast enough for you to see it. <S> I hope that makes sense. <S> This is a very easy way to do it, and with some external comparators you could use it to easily tell if a certain threshold value is violated.
|
You can use an RC circuit with a cutoff frequency below the frequency of your PWM to average the PWM.
|
Are decoupling capacitors needed with battery power? Currently I run all my gadgets from batteries and don't use decoupling capacitors. Are they generally needed/useful when drawing energy from a battery? <Q> In broad terms, you should always use them. <S> It is simply something that cannot hurt you to do, but could cause serious problems to ignore. <S> You have probably not seen any major problems with your batteries because they are placed relatively close to your chips and because they have an internal resistance to snub higher frequency signals. <S> This could still cause power concerns in higher frequency signals. <S> If a Microcontroller runs at 20MHz then you are having 20e6 pulses of current pulled per second. <S> This may not seem like a big issues, but when enough inputs change at once you may cause ground bounce or many similar problems that come with high inductance paths to ground. <S> The wikipedia article has some background if it helps. <S> Little extra on decoupling capacitor terminology <S> The job of a decoupling capacitor is to "decouple" your devices power draw from the rest of the circuit. <S> If a decoupling capacitor does its job you will only measure a DC power draw. <S> They remove the AC wave. <S> There are different terms for decoupling capacitors. <S> Without a bulk filter cap you will have to have time dependent current as your chip pulls power on it's cycle. <S> Bypass capacitors are often of lower value and are designed to terminate higher frequencies. <S> As frequency reduces your impedance decreases for capacitors. <S> A smaller value capacitor has a higher impedance. <S> These small capacitors are the backbone of terminating higher frequency waves. <S> Decade capacitors are another term for bypass caps but the name implies more. <S> If your bulk filter cap is .1uF then your decade caps will be .01uF <S> and .001 and <S> even .0001uF <S> depending on what you are doing. <S> Normally I only see 1 decade cap, but I have had to use 2 or 3 before. <A> Decoupling isn't about smoothing out power, decoupling is about suppressing the high frequency noise generated by circuits that generate high slew rate signals, especially logic circuits. <S> When a node changes through several volts in a matter of nanoseconds, it takes a brief slug of current to charge/discharge the capacitance at that node. <S> If you have a bunch of IC's sharing supply wiring, the inductance in the supply lines means that those slugs of current going into one IC translate into supply voltage dips for the other IC's, and this can glitch things into unintended states. <S> The reason you stick a good high-frequency cap on every IC is to provide individually for these gulps of current, thereby 'decoupling' the supply demands of the ICs from one another. <A> They're useful because devices drawing power can also cause ripples - not just the regulator. <S> For instance a microcontroller will draw more current on a clock rising edge and less otherwise. <S> This draw causes the supply voltage to be drawn down ever so slightly. <S> If everything is running off of the same clock it gets worse. <S> With a capacitor on the power pins there's a reserve available to minimize this ripple. <S> It's a good idea. <A> A battery has an internal resistance. <S> The pulses of current drawn by microcontrollers and other digital logic can cause dips in the battery voltage. <S> A bulk decoupling cap (10µF or so) across the power rails is necessary to prevent big dips causing problems. <S> Don't forget small 100nF caps are also necessary on the Vdds of all digital logic ICs to provide a local current source. <S> The inductance of traces on your PCB will make these necessary, or you may discover strange and unusual bugs are affecting your circuit. <A> Every time a transistor changes state in a digital system, it takes a tiny bit of current to switch. <S> Tons of the transistors in a logic chip or microcontroller are changing at nearly the same instant. <S> When that happens, the power consumed by the chip spikes briefly. <S> Bypass (or decoupling) <S> capacitors help supply that power so that those brief load spikes don't cause the supply voltage on other chips to drop. <S> (Especially since the other chips might be briefly needing their own surge of current at the same time.) <S> That's why you want very fast (small, low ESR) <S> caps located near each IC, as close to the power pins as practical. <S> The big caps near the power supply provide the current to carry the load while the AC supply goes through 0V, and the small/medium caps near the supply help refill the bypass caps scattered all over the board.
|
The bulk capacitors act as large power sources that can supply power for periods of time, these are required for functionality.
|
General tips for 4 layer boards For my Super OSD Pro project (Super OSD is divided into two versions: Lite and Pro) I'm going to be using a 4-layer board. Are there any gotchas to be aware of when using 4 layer boards? I was thinking of having the most widely used nets (+3.3V and GND) on layers 1 and 2, and having layers 3 and 4 for carrying signals. I could also occasionally use layers 1 and 2 for carrying signals where 3 and 4 are full up. One other thing I'm also concerned about is how to connect pins to the right layers? Say I want to connect a pin on the top to layer 2. I've always routed a trace from the pin to a via, then dropped the via to that layer, but is there a better way? I've heard of via on pad but I've also heard that can produce bad results and is only really for BGA's, not the TQFP's I'll be working with. <Q> It's more usual to have the ground and power planes on the inner layers. <S> It's best to keep them free of tracks. <S> Just use a short track and a via to connect leads to the other layers. <A> You'd normally put power/gnd planes on inner layers, mostly as these are the least likely to need track-hacking to fix errors or aid debugging. <S> Almost all 4L PCBs you'll see do it like this. <S> You will often have space available on the power plane to route a few signals. <S> There can sometimes be some marginal benefits in EMC and track density (due to via size) by putting them on outer layers <S> but you'd only do this if you'really struggling to avoid going to 6 layers, or need a little extra EMC performance due to the shielding effect of outer planes. <A> You do not want vias in your pads except when you need them there for a specific reason, such as leading away heat or excessive solder paste from the middle ground pad on a BGA.
|
Ground and power planes are best to put on the inner layers.
|
Is Y5V okay for decoupling capacitors? Y5V capacitors are much more temperature dependent, but is that really critical for decoupling capacitors and a product operating over a -40°C to +85°C range maximum (typical -20°C to +55°C)? The reason I ask this is the cost is much lower, compare 0.8p with 8p per capacitor. <Q> You may also want to use more caps or higher capacitance and/or voltage rating than with X5R or X7R, as Y5V capacitance has a dependence on applied voltage as well as temperature. <A> 8p seems expensive. <S> In large volumes, MLCCs in surface-mount should be a fraction of that price. <A> If the application must operate over a wide temperature range Y5V is not recommended. <A> I looked some Y5V caps up last week. <S> The money is what you get, they are very cheap, and very bad. <S> They might lose about 80% or their capacity over temperature or voltage. <S> Depending if you need the capacity, you might be better of spending a bit more on X5R. <A> For decoupling purposes the variation in value is practically irrelevant. <S> The standard practice is to specify .1uF, but there's nothing inherent in that number that makes it right for this purpose, and it could just as well be .22uF <S> or .047uF. <S> In other words a change of a factor of 2 won't really make any difference. <S> So yes the Y5V is perfectly fine for decoupling. <S> If you're worried about the possible loss of capacitance at high temp (-80% for Y5V) then just select a larger value like .15uF <S> or .22uF.
|
Decoupling would be about the only thing I would consider using Y5V for (and only if I didn't have X7R or X5R available). In the majority of digital electronics applications, the value isn't so important, as long as it's "big enough", so just use whatever you can find.
|
Where to find pre-made wires for plugging into headers? Headers like these: http://uk.farnell.com/harwin/m20-8760342/header-smt-vertical-2x3way/dp/1517388 I'm looking for cables that connect to these, with female headers on either end. Any length more than ~5cm is ideal. But I can't seem to find any results on my favourite websites. I'd rather not spend time crimping them myself as I have to produce a lot of them. For this application I need 4 way connections, but it would be nice if many different way counts were available, so I know what to buy in future. <Q> 4P/F to 1P/F Jumper Wire MDFLY Jumper wire with one 4-pin female connector on one end and four 1-pin female connectors on the other end. <S> ' <S> x'P/F to 'x'P/F Jumper Wire Combination <S> MDFLY <A> Couple of ideas -- <S> SparkFun sells individual wires with a female connector at both ends, designed to plug into pins spaced 0.1" ( <S> 2.54 mm) apart. <S> Wires are 12" (4.75 cm) <S> long. <S> Sold in packs of 10 or 100. <S> Samtec has ribbon cables with single-row 0.1" sockets (HCSS series), but only has options for 5, 8, 10, 12 or higher count wires. <A> Digikey sells something along those lines. <S> They are flex cables with headers mounted on either end. <S> Keep in mind that they are pretty pricey versus building your own. <S> They are on page 74 and 75 of the 2010 catalog: <S> http://dkc3.digikey.com/PDF/US2010/P0074.pdf <S> http://dkc3.digikey.com/PDF/US2010/P0075.pdf <S> Adafruit sells them as well, but only in 6-conductor, 6". <S> http://www.adafruit.com/index.php?main_page=product_info&cPath=33&products_id=206
|
Select a jumper wire with 1-pin to 8-pin female connector on each end.
|
How do I plan for in circuit programming of an AVR? My usual method of reprogramming AVRs (so-far limited to ATtiny13 and ATtiny2313) is to disconnect the chip from the host circuit, plug it into another breadboard with all of the ICSP hookups in place, program, then replace. However, I keep hearing that one can program the chip in place (which is, I understand, the whole point of ICSP). Are there any special hardware considerations one has to take into account before programming the chip in situ? For instance, I worry that the ICSP process may damage circuit components connected to the same AVR pins which are used for ICSP. Does one occasionally need to add diodes or some other kind of buffering to protect these components? I know this question sounds kind of vague, and I guess it is - but I've not provided details of my particular circuit because I'm interested in more general rules of thumb. I.e. does one never have to worry about this, or does the answer really depend on the particular circuit the MCU is a part of? <Q> I've used ISP for just about every AVR board I've done; it's nothing to be afraid of. <S> The AVR ISP mkII manual gives a pretty good summary of the limitations you need to look out for in the "Target Interface" section. <S> I wouldn't worry about the ISP damaging other components; it's not a high voltage programmer. <S> The signals all run at 5V, so if it can damage an external component, so can your microcontroller. <S> If you're really stuck with a board that doesn't permit ISP programming, I'd at least try to use a ZIF socket for your programming board. <S> They're pricey, but it will greatly improve your quality of life. <A> Use a jumper or a switch so that you can physically disconnect the ICSP header. <S> This way you can share the pins with other functions without worrying, and without having to fiddle with your other components. <S> This seems like the most obvious and safest solution, and it's what I use. <S> (My first answer was deleted, so I have tried to add more detail). <A> Unfortunately, you cannot do in circuit programming for your AVR's if the pins are shared by other functions, for example lighting LEDs. <S> While it might work, it's not guaranteed as it may cause the programmer's or µC's outputs to drop too low for it to work. <S> One other alternative is to order your chips pre-programmed. <S> I know Microchip offers this for some of their chips, but I'm not sure about Atmel.
|
Basically, if you run the MISO/MOSI/SCK pins directly to the programmer and have about 820 ohms between them and the rest of the circuit (and aren't doing anything funky with the reset pin) you're okay.
|
Failure mode of FLASH memory What is the failure mode of flash memory? I've got some chips rated for 10,000 cycles - what happens after 10k cycles? Do the chips stop writing properly, do you get read errors, etc.? Does it also happen to EEPROMs? <Q> Here's a project designed to destroy an EEPROM by writing to it repeatedly: Flash Destroyer <S> According to the comments, though, it's not a particularly good demonstration: <S> I am guessing that this test will actually not show the real problem very obviously, or should I say early. <S> Since I think the real issue is that the data retention time will drop with number of writes. <S> I.e. after 1 million writes it will store the data for a number of hours specified in the datasheet. <S> Eventually the data retention time will be so short you will see problems, but in real-life, problems with lost data would occur much earlier. <S> I also asked a similar question on SuperUser: What happens when a flash drive wears out? <A> Essentially the dielectric structure of the memory cell degrades and becomes unable to maintain a 'low' state. <S> (Think of a N-channel MOSFET - <S> a high on the gate turns the device on, which makes the drain-source resistance low. <S> If the gate is damaged, the drain-source channel can never be established.) <S> There is often a mechanism to 'mask' these bad blocks once they're identified (usually by a verify operation failing after a write) preventing them from being used - a bad block table, essentially. <S> See here and here for more details on the physics of it all. <A> I suppose if your flash is broken, you can write a value to it <S> but i doesn't take it correctly. <S> For example, some bits are maybe unable to go low anymore which yields a different value. <S> Some flash drives in PC's like SSDs have controllers that monitor the broken parts of the flash chips and saves the data to different spots and reports a decrease in capacity. <S> It's just like a normal hard drive has about 0,5% of extra sectors when some turn out to be bad sectors. <S> If you are speaking in normal EEPROM chips or memories that are embedded into MCU's or external, I am not sure if they got any error correction system built in. <S> It might just write the value and not know it fails in doring so correctly.
|
Flash memory degrades as a function of the number of write-erase cycles it is subjected to.
|
Electrostatically charging a capacitor By rubbing a cotton cloth along a PVC pole, static electricity is generated. How can this be used to charge a capacitor? http://home.earthlink.net/~lenyr/stat-gen.htm is what I'd like to do, but it doesn't explain how it should be wired up. <Q> To get the charge from the PVC into a capacitor, you could ground one side of the cap, and attach a wire to the other side of the cap. <S> The end of the wire should preferably end in a fine point or collection of fine points, and you sweep this over the charged surface of the PVC to collect what charge you can. <S> If you use a smaller capacitor you will tend to get more voltage, but even a small capactior (e.g., 100pF) is probably only going to get as far as a couple of volts, even off a PVC surface charged to 10's of kV, because the capacitance of the PVC surface probably isn't even 0.1pF. <A> Sounds like you want a Leyden Jar (an early type of capacitor), here's a tutorial: http://www.sciencebuddies.org/science-fair-projects/project_ideas/Elec_p049.shtml <A> This is a good way to explain the behavior of capacitors, actually. <S> People talk about "charging up" a capacitor, but they don't actually store charge. <S> They store energy in the form of a displacement of charge. <S> The electric charge of an empty capacitor and a full capacitor are both 0. <S> The reason capacitors can store so "much" is because you're removing charge from one plate and depositing it on the other. <S> If you connect one terminal to ground, you should be able to add more charge to the other terminal, since an equal amount can "escape" to the earth from the other side. <S> http://amasci.com/emotor/cap1.html <A> <A> Don't forget Charge Conservation. <S> (It's sorta like forgetting energy conservation!) <S> You cannot create charge by rubbing with a cloth. <S> You can only separate the opposite charges which were already there. <S> Which means, the negative charge on the plastic has an exactly equal positive charge on the (slightly conductive) cloth. <S> This is commonly lost through your hand and to ground. <S> So, to 'charge' a capacitor, stop dumping the opposite charge into ground. <S> Instead wear thick rubber gloves, so the cotton cloth becomes one terminal, the plastic pipe the other. <S> One method for transferring charge from an insulating surface is by induction, via "Faraday's Ice Pail." <S> You'd need two steel mixing bowls. <S> Place them on insulators (glass or plastic.) <S> Connect them to corresponding plates of your Leyden jar. <S> Charge your two objects and place them in the bowls. <S> Disconnect one capacitor terminal, then the other, et voila!
|
If you charge up a piece of PVC and touch it to a floating capacitor, it won't accept any more charge than any other piece of metal of the same size. My favorite demo of charging a Leyden jar is by Makezine's Collin Cunningham, it's a very basic video that looks at capacitors in general, but it does show how to charge a simple Leyden using the PVC pipe and cloth method.
|
How much background "noise" is normal on an oscilloscope Following this question , I purchased a DSO-2090 USB oscilloscope . When I power it up, I see lots of small fluctuations in the waveform, whether connected to nothing, a battery source, itself (small waveform generator on the back) or by shorting the ground clip. ( See the large version ) In the screenshot above, the CH1 is connected to a small, battery powered circuit of mine. CH2 does not have the probe connected at all. I have spoken to a colleague about this and was told that I should see a flat line so I am worried I have purchased a faulty unit. My question is whether or not background noise like this is normal in an oscilloscope? Edit 1 Added 1kHz waveform example as per comment: ( See the large version ) <Q> As an indicator that the second capture you displayed looks normal, here's one I just made of a 1 KHz square wave, from my ELAB-080 combination instrument (dual channel DSO, 16-channel logic analyzer, arbitrary waveform generator (AWG), and dual channel power supply) which also has a vertical 8-bit resolution in its DSO section. <S> (Note: at $495, the ELAB-080 was over your budget in your other question where I recommended the DSO-2090). <S> You can see the noise at the top and bottom of each square wave, which looks almost identical to your trace. <A> I have one of these scopes (a DSO-2250, so a slightly faster model). <S> Basically, these scopes are worthless for anything but digital work, which is what I bought it for anyways. <S> One of the few uses <S> I have found for the thing <S> is to use it with a laptop, which gives you a simple battery-scope, which can be useful when you have ground-loop issues. <A> I would have to touch the oscope to confirm something. <S> This amount of noise is common. <S> There are many sources of noise, but with a noise magnitude that small, it is probably not a concern. <S> Let me list off a couple things. <S> Sources of Noise <S> The loop of your ground <S> clip creates has an inductance with everything on your board. <S> any electrical signal nearby can induce a wave on your ground loop. <S> This ground loop also acts as a low pass filter, albeit the frequency that it cuts off is normally in the high MHz range, not normally any issues for a 40Mhz scope. <S> I have drawn a red line around what I am referring to in the following image. <S> The fact that you have a ground reference in one circuit, and another ground reference in the other circuit plus your ground line connecting them can create ground loops <S> (not to be confused with the ground clip issue I mentioned above, have to love similar terminology). <S> This can actually create quite a problem, and is also no fun to fix. <S> One method is to wrap the probe almost the the extreme tip with aluminum foil and ground it at the o'scope. <S> This shields the interior ground connection and greatly decreases ground loop problems. <S> It also looks awesome(not at all). <S> Testing for issues <S> To see if it is just a 1bit bounce,try changing your resolution andwatching if the noise changes in theamount it is jumping by. <S> To check if the ground loop is yourissue, try using an sharp blade andtouching between the ground at thevery tip of your probe to the groundon your board. <S> This gives more thanan order of magnitude drop ininductance. <S> To check for ground loops, you getto wrap your probe in foil. <S> Do notenjoy this too much. <S> If your noise disappears just from connecting to the waveform generator on your scope then your circuit is probably the cause. <A> I don't have a PC scope but a real bench oscilloscope. <S> When running normally I see around 500µV noise on all settings about 5mV/div, and about 1mV noise on the 5mV/div setting. <S> The noise is uniform across all channels. <S> This noise is not significant for any of my uses so far. <S> It's also not unusual for the scope to read ±1mV dc offset when there is zero input; some scopes have this calibrated out but expect a slight drift over time. <S> Mine's quite old (manufactured '93), so I get around -3mV offset.
|
I can confirm that there is approximately ~1-2 bits worth of noise at all input settings.
|
Reduce background noise from a .wav file? I am planning to compare two audio files. I have recorded two voices and compared them using cross correlation. Since the presence on background noise while recording the resulting correlation value is always near 0.5. If i give any recorded waves from internet, i am able to get the correct value. So how can i reduce the background noise from the recorded .wav file. If i come to know how to do it, then i will try to implement technically. Any basic ideas will be helpful for me to learn and apply it. Thanks. <Q> Noise usually creeps up at various specific frequencies in audio, these frequencies change depending on the environment. <S> Option 1 <S> There may still be noise at the same frequency of your voice, but this will be much harder to deal with. <S> Option 2 <S> I am not sure what Audacity does, but I have seen many programs that require a sample of "silence" and use that to determine the noise. <S> In other words, you record your voice but leave a gap of dead air at the end or beginning. <S> Then you can go analyze what frequency components are around in your dead air. <S> From this you can know how much of each frequency to remove from your voice signal. <A> If by "background noise", you mean noise that has a wide bandwidth and is relatively stationary, then spectral subtraction should work quite well for you. <S> This is the general technique that Audacity/Cool Edit use when they say "Noise Reduction". <S> Spectral subtraction is a very google-friendly term if you're interested in more research. <S> You take a sample of sound where there is no signal, and you create an FFT noise template from that. <S> Then, you subtract that FFT noise template from the FFT of your signal + noise. <S> Some algorithms get fancy and smooth the resulting frequency domain waveform before doing the inverse FFT. <S> You have to be careful about how "strong" the reduction is, or you get these "underwater musical echoes". <S> Sometimes it's better to do two "weak" passes than one "strong" pass. <S> However if there's e.g. cars moving in the background this won't work. <S> In such a case, you might want to look at crazier stuff like Wiener filters. <A> I recommend you look at the software package Audacity. <S> It's free open-source software, and it has a noise reducing algorithm/plugin. <S> I wouldn't expect you could copy it straight from the source, but it might give you some ideas on how it's done.
|
The easiest way to get rid of noise is the put a band pass filter right around where the frequency of your voice is at.
|
SMD vs. Through-hole components in high vibration environments This is more of a opinion question than a information question. I am designing some boards that will be working near decent sized actuators, so I ask you, what is more resistant a 0805 SMD or a 7mm thru-hole resistor? <Q> Less mass has to be better, and an SMD resistor has a lot less mass than thru-hole. <A> The only vibration (SAE J1455) <S> SMT problems I've ever seen for common components are failures for large aluminum-electrolytics. <S> The solution there is just to anchor them down with a gob of silicone. <S> An 0805 resistor will not fall off from pure vibration unless there is a tremendous amount of board warping going on (then it may fracture), or unless you are going to expose it to several thousand g routinely (in which case you have bigger things to worry about). <S> An 0805 resistor weighs about 4 milligrams, and the pound of force or <S> so I just put on one (on a PCB on my desk) with my fingernail did nothing, <S> so that's equivalent to about 113,000 times earth's gravity ? <A> Are you up against twisting forces at all? <S> Or just vibration? <S> On the other hand, the through-hole component won't care nearly as much if the board is flexing because it's got <S> wire leads that should let it move around a bit. <A> I've had problems with microphonic (converting vibration into signal) <S> surface mount capacitors that were resolved by switching them to through-hole <A> A friend of mine who does control boards for windturbines (read: high-vibration, high-reliability) <S> swears by SMD, specifically BGA, even QFP have too long pins and will suffer from fatigue too soon in that application. <S> The shorter the pins, the stiffer the mount and the higher the reliability. <S> You must protect the board from warping, though, because there is no give in those stiff connections and BGAs will crack before jumping off the board. <A> for design in previous role for defence and aerospace, we would subject our boards and enclosures to large amounts of shock and vibration in order to comply with the required standards. <S> From a construction perspective, any boards with larger components (or where possible) would be fitted with anti vibration (AV) mounts of some sort. <S> Generally we never had issues with surface mount components. <S> Large electrolytic capacitors, inductors, transformer and so on would normally need some extra adhesive. <S> Poly-sulphide was used for this, not a pleasant chemical to work with, but it would meet the stringent environmental requirements of the defence and aerospace industries, and stop the large components from vibrating off. <A> Mike is right: less mass is better, since the part will exert less force on the soldering when vibrating. <S> So the SMT will be better, even when PTH has a larger soldering contact. <S> (An 0402 resistor weighs only 1 milli-gram). <S> When I was in college we learned that in very high-vibration environments they would use wire-wrapping instead of soldering. <S> But that's many moons ago, and I guess soldering techniques have improved since. <S> The space shuttle didn't exist yet (talking about high-vibration)
|
SMD component has a bit less mass, so for a given amount of vibration it'll put less stress on it's joints.
|
Use diodes to obtain lowered DC voltage? I am building a digital voltage gauge for my motorcycle for fun. I am buying a nice little display which has common ground, so that I can provide 5 and 12 volts from the same source. I was hoping to use a "7805" regulator to control the 5v, but do not want to provide the varying 12+- volts directly to the 7805. I would like to drop about 7 volts before I apply the power to the 7805. I looked at Using diodes to limit current to LEDs which seems to indicate that using diodes forward voltage drop is not a good idea for leds, and maybe using a zener diode is not either. If I just use a series resistor, I would have to guestimate and experiment to get in the ballpark (as I don't know the current draw), and, as I understand it, the voltage dropped over the resistor would vary with the applied voltage. Here are my questions: Is using a diode(s) to drop the voltage independent of current a bad idea here? (Is it always a bad idea?) Do I still get he same IIR loss for the voltage dropped whether it is a resistor or diode? Is there a conventional "best practices" approach I should be using? Lets go out into left field for a minute: other than heat-sinking the 7805, can I pot the whole mess with RTV silicon to vibration and moisture resist? Always nice to know if the alternator is working OK. Not an electronics guy, just a tinkerer. Thanks! ================================== Thank you Nick and Thomas. I agree that a motorcycle is about the harshest environment one can choose-greater vibration, direct exposure to rainwater, probably greater variations in regulated voltage due to greater variations in engine (and so alternator) speeds. I had hoped to fuse and put the dropping resistor at the battery connection to provide the greatest protection for anticipated faults in the wiring run and/or the digital readout itself. Based on your comments, I will fuse at the battery connection, run fine (#28?) wire to a MIC2945 and let it do all the voltage dropping. I anticipate a mounting plate fastened directly to the 2945 heat sink, with the entire remainder of the assembly "glued" to the mounting plate with RTV silicon. Waterproofing is a concern, for which I will rely on the RTV silicon. <Q> First, why would you do this? <S> The 7805 will be perfectly fine with 12V. <S> If you're passing a lot of current, use a heatsink. <S> The diodes will only move power loss from the regulator to the diodes themselves. <S> So for example getting 5V from a 12V source using 10 diodes in series would be bad, and the voltage could range from as much as 7V to as little as 2V, depending on the current draw. <S> The 7805 has a minimum voltage of 7V to output 5V at 1 amp, so as long as you can guarantee this 7V <S> you should be okay. <S> Note that the output of the 7805 will vary depending on input voltage by a few millivolts <S> - it will be slightly higher at 12V than at 7V. <S> The same loss happens no matter if you use resistors or diodes. <S> The energy must go somewhere and it is converted into heat by either resistors or diodes. <S> Introducing more components into the circuit will make for more chance of failure. <S> Why is a heatsink not practical? <S> Here, I'm unsure if potting would work. <S> Best to ask someone else. <S> You should be cautious when using the 7805 in an automotive circuit. <S> The battery line is a harsh place. <S> When you turn the headlamp(s) on your car/bike off, for example, the excess energy in the alternator has to go somewhere <S> and it does <S> - it appears as up to a 60V spike on the 12V line. <S> And in some rare circumstances you can get a negative voltage on the battery line. <S> Both of these situations will destroy a 7805, and the output could short, connecting the battery line to the 5V output, giving your load 12V instead of 5V. <A> 1. Usually. <S> 2. <S> The energy will go somewhere <S> How much current are you drawing? <S> A conservative junction-to-ambient Td for a TO-220 is <S> 65°C/W, so much above 1 W or drawing 100 mA <S> you will need some form of a heat sink. <S> It doesn't have to be anything glorious, e.g. a screw, if you get really high <S> you could screw the regulator directly to some plate of aluminum and have that be exposed in your enclosure. <S> Echoing Thomas's fear of vehicle DC power <S> , I think motorcycles are worse than the typical car due to a much smaller battery and the more variable output from the dynamo. <S> The standard operating voltage range (SAE J1455) is 9-16 V, faults of +24 V (double battery), -12 V (reverse battery), and some spooky transients. <S> 3. <S> Nevertheless, a stock 7805 should be just fine with a reverse blocking diode, and preferably a TVS to chop off any high (>30 V) transients. <S> Additionally, always remember to fuse vehicle electronics . <S> Currents can be ridiculously high, and if you drag the bus down for very long, you might cause problems or even damage everything else like the ECU and ABS (not really standard on most motorcycles, but on cars). <S> Even if you splice into a fused line, it can still be nice to only blow your fuse instead of one that will take other things with it. <S> 4. <S> I would think your environmental protection selection will depend a little more on the mechanical considerations of your other parts (gauges...) <S> in addition to the regulator's power dissipation. <S> RTV isn't the best heat conductor, so if you end up needing a good heatsink, you'll need to expose that to the air in some way. <S> It was used fairly commonly at my previous company to protect the more vibration-sensitive parts (SMT electrolytics, large TH parts) in small blobs, but never to fully pot assemblies as it's fairly spendy (but for hobby projects, whatever :P ). <A> The LM7805 is not sensitive to low current voltages exceeding its rated 35VDC input parameter; so if a 6V 5W zener is used in series with input VDC the initial minimum current requirement for the zener will not damage the 7805 at 41 volts and its output will still be 5.0 VDC as soon as any current is drawn by your device connected to it, the zener's operating voltage will reduce the 41V to 35 or lower <S> should it ever go that high on your bike. <S> If you think the 7805 is vulnerable, you may stack it with more than 1 - such as 2,3 etc all with the leads in parallel and effectively increase its rated output current proportionally. <S> Also, there is a new regulator on Digikey.com, the LM317HV handles 60VDC in at 1.5A output which can be adjusted from 2.5-57V with a couple of resistors. <S> Your project sounds like fun!
|
The best practice here is just to feed 12V into the 7805. In this case it should be fine, but diodes do not drop a fixed voltage; the voltage drop varies depending on current in a non-linear fashion.
|
When is it appropriate to mount components at a 45 degree angle? I've seen some PCB's with components mounted at multiples of 45 degrees (45, 135, etc.) I recently discovered my PCB program (gEDA PCB) supports these, though it isn't a GUI function and you have to run a command. When is it appropriate to mount at these angles? And what about angles of 30 degrees and 60 degrees, or arbitrary angles? <Q> Another reason would be for indicator or display components. <S> It's not terribly uncommon to see chip LEDs at varying angle to fit the aesthetics of a particular device. <S> Whatever the reasoning, most SMT machines can places parts at angles without issue. <A> Placing a QFP chip at 45 degrees can make it easier to connect the leads to pins on a DIL board. <S> Try it for yourself. <S> Other angles aren't helpful. <A> Parts can be at whatever angle they need to be to help layout or fit into some bizarre package. <S> Your manufacturing engineer may not like it, but if it's required, <S> then oh well. <S> As Duane mentions, this is rarely a problem nowadays, but be sure. <S> Conversely, your manufacturing engineer will pretty much demand 45° rotation of QFPs if they are to be wave soldered. <A> When is it appropriate to mount components at a 45 degree angle? <S> Whenever you feel like it. <S> Don't stop at 45 degrees, use any angle that makes sense. <S> Here's a board using 30 degrees. <A> Inductors and magnetics that may generate fields are recommended to be offset from one another. <S> As an example, don't line up L1, L2 and L3 next to each other. <S> Place L1 as you normally would, L2 at right angles to L1 and L3 at a 45 degree angle. <S> I took this example directly off a datasheet but forget whose (Microchip, I believe). <A> Ha! <S> The layout program specified (gEDA PCB) <S> doesn't support rotating a square to 45 degrees. <S> The thermal pad of a QFN is usually a square. <S> Rotating it at 45 degrees doesn't work. <S> One workaround is to make it a not-quite-square. <S> You will also encounter another problem with gEDA PCB:text cannot be rotated to arbitrary angles. <S> Only 0,90,180,270 degrees. <S> I don't recommend PCB for anything other than simple rectilinear designs. <S> edit: I have been using pcb for increasingly geometrically complex designs, and it gets harder and harder. <S> Finally, I made a script to convert DXF to pcb's format, such as it is. <S> The script is here: http://vivara.net/software/dxftopy.tar.gz <S> It goes from qcad: <S> To pcb: Resulting file (ben-mode render): <S> But this process is an unspeakable pain in the hindquarters. <S> pcb is terrible at editing anything that is not on a grid. <A> When you want to wave solder (not much done anymore) <S> QFP parts you simply have to place them at a 45 degree angle. <S> If you place them orthogonally the solder wave will short all the pins transversal to the wave.
|
45 degrees allows to place solder thieves that take any excess solder. Whenever it helps the layout.
|
Shifting into an EE Career - with or without Master's first? I've been working in software for way too long, dislike it for a number of reasons, and would like to shift completely into electronics engineering work. I'd prefer analog, microwave, optoelectronics or maybe some specialty yet to be invented, but any electronics is better than any software. I have more talent and interest in electronics, and my love of herding electrons goes back to when I was a kid. I read IEEE publications and understand them far better than anything coming out of the software development or computer science world. Unfortunately I have no formal degree in EE, only in Physics, a fine subject but apparently not sufficient to land an EE job, so I've found over the past several years. The question is whether it's best to somehow get into a full time job first, with my existing experience, enthusiasm and education, and then perhaps earn a Master's to further my career, or to go full blast studying for a Master's in EE while continuing work in software, and only then try to land a job. I'm currently employed, live next to a reputable tech school, and my employer depends heavily on electronics although there aren't any opening right now. <Q> In my experience the usefulness of the person decreases with the level of degree above Bachelors. <S> The problem is that to get the higher degrees the candidate has to specialise in a narrower and narrower field and as a result loses their general spread of skills that will always be required in a real work environment. <S> Having a Masters degree specialising in the dielectric properties of PCB materials really does not help when trying to debug the memory interface on the processor or designing the switch mode power regulator. <S> I would try to get some hardware practice with a processor, or design yourself an audio amp, anything that you could point to to show your enthusiasm. <A> In the longer term, a Master's is a good investment, but you'll get more out of it if you have a year or two of experience first. <A> I agree with pingswept, that if you can get a nice job without that extra education so go for it. <S> But the jobs you get with formal education tend to be more advanced. <S> And don't forget that formal education makes it easier to get to the job interview, but to land <S> then job is up to you. <S> But to stop working and go back to school is a huge investment, in both time and money, but if you feel that it is right then go for it since you would probably regret it if you did not do it... <S> Good luck. <A> I think getting my Masters was a great idea, and I studied with several students coming from a physics undergrad degree. <S> It gives you a foot in the door to any EE job, takes only about 18 months, and will often be paid for by the school if your grades are decent. <S> It's true <S> I don't end up using what I learned for my degree for my day-to-day, but it's a fun party trick to explain exactly how heterojunction bipolar transistors work. <A> If you're not quite sure what you want to get into as far as electronics goes <S> you should start working on a hobbyist level and see where it takes you. <S> It will give you actual experience and help you refine your goals, plus it looks good to employers. <S> It's one thing to say you love electronics and are very interested in it, but another thing to end the sentence with '... <S> and this is what I did with it.' <S> Watch job openings and see the words they use, then try to figure out what they mean. <S> You may already have experience with 'mixed-signal board-level design' and not know it. <S> But I honestly don't know what employers are looking for. <S> I got my first job because of my masters degree in controls. <S> Nowadays it seems to be buzzword bingo with HR and otherwise soft skills like 'working well with others', 'self-motivated','good at solving complex problems'. <S> And it's not easy to get feedback from them either - <S> the last employer I tried to apply with flatly said 'No inquiries' when I called to ensure they got my application email. <S> A good cover letter tends to work wonders when applying for jobs. <S> It certainly doesn't hurt to address your lack of EE degree - in fact hit it head on and say something like ' <S> Despite the fact that my degree is in physics <S> I'm a good electrical engineer because...' <S> Then you have to practice the heck out of interview questions. <S> A fairly good (and free) interview guide from a blog I like is here: http://www.askamanager.org/2010/08/ask-manager-guide-to-preparing-for-job.html <A> If you are are bachelor in software, then its OK to have associate or bachelor level in electronics. <S> Don't overspend your time on master degree, unless your current education was poorly sourced and you are questioning it. <S> I had 3.5 years in electronics, then switched to computer sicence. <S> Stayed in boring financial industry doing software for 20 years, then returned to robotics and industrial automation with some luck in job search.
|
If you can manage to get a job doing what you want to do without a degree, do it. A masters' degree can make you seem too expensive and unless a company is looking for candidates with a masters' they are more likely to see it as a liability than a benefit.
|
Voltage and current in this schematic I'd like to understand this simple schematic to see if I get things clearly If I understand things correctly: when the switch is open, the current at the right black point is zero, the voltage is 12V. when the switch is closed, the current at the right black point is 20 mA, the voltage is 0V If this is correct, suppose now a similar schema with the following difference: between the switch and ground I have another 600 ohm resistor. the potential at the black dot with the closed switch is now 6 V ? any point along the horizontal connection between the T junction and the black dot are at the same potential. I guess they also enjoy the same current. If two points in a circuit experience the same potential and they are directly connected, do they always experience the same current as well ? <Q> When you close the switch, you short one end of the resistor to ground, so there's a 12V drop across it and I=0.02A. <S> In your second case, with the switch closed, you are creating a voltage divider so the point between the resistors is at 6V. <S> If you don't have a load connected along Vout (between the black dot and ground), <S> then I=0 there since there isn't a voltage drop along the horizontal connection. <S> Measuring along the path connecting the resistors/switch, you'll see your 0.01A, and since there is no other path for the current to take, both resistors will see the full 0.01A. <A> I see where you are coming from, but you have 1 concept wrong. <S> From what you show, it is unknown what happens at vout. <S> If you just have it connecting to something that is measuring the voltage, say a dmm or a microcontroller, then you can assume you have a very large resistor from vout to ground. <S> So case that the switch is open, you have 600ohms in series with a very large resistance. <S> V/R=I, but since R is 600+verylarge, I is almost 0. <S> Now in the case the switch is closed, you have a wire (0ohms) in parallel with with very large, which results in an effective resistance of 0. <S> So now you have V/R= <S> I <S> > <S> 12/(600 <S> +0)=.02V <S> Now you can step back and look at voltages: <S> For the case that the switch is open, you have little current through the 600ohm resistor <S> so V=0 <S> *600ohm=0v drop across the 600 ohm resistor, so Vout is 12v. <A> "I guess they also enjoy the same current." <S> No, that's wrong. <S> Your understanding of the current through the resistor with switch open and closed is correct. <S> With nothing connected to the output the current only goes through resistor and switch. <S> So the switch sees the same 20mA the resistor sees. <S> When you place another 600\$\Omega\$ in series with the switch that will be <S> 10mA. Let's keep that resistor there. <S> This circuit in itself is useless, you always want to connect something to the output. <S> Let's assume that's a circuit which can represented by a 1200\$\Omega\$ resistor to ground. <S> Then, with the switch open the output will be 8V, and there will flow 6.67mA into it. <S> Zero through the switch. <S> When you close the switch the 1200\$\Omega\$ becomes parallel to the switch's 600\$\Omega\$ giving an equivalent resistance of 400\$\Omega\$. <S> The total current through the top resistance will then be 12V/(600\$\Omega\$ + 400\$\Omega\$) = <S> 12mA, causing a 7.2V drop across the top resistor, so that the output level is 12V - 7.2V = <S> 4.8V. <S> Now you're right that all components on that horizontal line to the output will see that same voltage, but they don't share the same current . <S> Part of the 12mA will go through the switch with its resistor, part will go in the output's 1200\$\Omega\$. <S> The distribution of the current is inversely proportional to the resistance of the different paths. <S> The switch will draw 4.8V/600\$\Omega\$ = 8mA, the load will draw 4.8V/1200\$\Omega\$ = 4mA.
|
(In ideal conditions)You're correct in your understanding of the first case.
|
Help me decode this mechanical drawing of an SD card PCB layout I'm trying to understand this mechanical drawing so I can create a layout for it in gEDA PCB. Specifically on page 4. I've already managed to place GND 1 and GND 2; those were fairly simple to work out. But GND 3 confuses me, because it's apparent from close inspection of the drawing that it doesn't quite line up with GND 1 and the offset doesn't appear to be given. The same is true for GND 4 which doesn't quite line up. Also on a semi-related note it is unclear whether the pins are in the order as they are on the SD card or if they are numbered arbitrarily - that is, does pin 1 correspond to pin 1 on the SD card? While this isn't strictly electronics, I think it passes as an appropriate question because it is an electronic connector and it requires a PCB layout. <Q> If an offset isn't given from the center-line or some other point, it should be symmetrical about the c.l. <S> (always has been in my experience). <S> So 4.7 mm between the inside of GND3/GND4 would mean they are each 2.35 mm away from the c.l., likewise with the 8.3 mm outer to outer. <S> The pins appear to correspond to the SD card pinout I looked up. <S> It appears backwards on the footprint because the actual SD terminals would be on the right side, but the contacts lead to the left to connect to the board. <A> Converting drawings to actual library packages is always fun. <S> You have to think like a mechanical engineer. :-) <S> You have a centerline and dimensions from the center line; you have to work all the math from that point. <S> Specifically, GND3/4 start 2.35mm from the center line and are (8.3-4.7)/2=1.8mm wide. <S> You can see that they are 13.55mm center-to-center to GND1/2. <S> I would ohm it out myself or contact the manufacturer though to be sure. <A> I think it might be easier to put down the numbered pins before GND3 and GND4, then justify GND3 and GND4 to them instead of trying to justify them to the GND1 and GND2 pins. <S> But if I give it a shot.... <S> You can determine the distance between the horizontal centers of GND1 and GND3 - it's all the way at the bottom and has a value of 13.55 <S> +/- <S> .05 <S> mm. <S> A good helper is the dotted center line that runs through the middle of the footprint. <S> If we assume GND3 and GND4 are symmetric about that line and they're the same size <S> then we can use two measurements (8.3mm and 4.7mm) give us a height for each of 1.8mm. <S> This means they should be the same height as GND1 and GND2. <S> We can use this information to determine the vertical center of GND3 with respect to GND1. <S> The top of GND3 is 4.7mm/2 from the center line which is 2.35mm. <S> Its center is .9mm from the edge, so it's 3.15mm from the center line. <S> The center of GND1 is 2.4+.9mm = 3.3mm from the center line, so the vertical center of GND3 is .15mm higher than GND1. <S> Tada! <A> Consider this approach: http://www.penguin.cz/~utx/pstoedit-pcb
|
If there is no mapping given, it's relatively safe to assume that the pins line up with the SD card.
|
Have a look at my PCB design and tell me how I can improve Here's the current design for Super OSD Lite, an open hardware project to bring a low cost on screen display to the masses. The price target is $71 to $90. bigger image There are components on the bottom, but most components are on the top. It's one of my first PCB designs involving such a complex circuit, so I expect I've made a few mistakes. Constructive criticism appreciated! <Q> Looks great! <S> A few thoughts: <S> Where you have space, label the pins on your connectors. <S> Add a pair of vias to ground that you can solder a little loop of wire to. <S> Then you can clip your scope ground to it. <S> Make sure your CONN2 and CONN3 connector bodies don't overlap in the real world. <S> The orientation dot for U6 is almost hidden by a via. <S> Add vias <S> so you can easily probe your EEPROM data lines. <S> Make sure <S> your mounting holes are sensibly spaced (not 2.718282 inches apart). <A> Put a part number and revision number on the silkscreen. <A> I checked out the .pcb file from the git repository. <S> http://super-osd.googlecode.com/hg/hardware/V3%20Lite/pcb-v3-lite.pcb <S> I loaded it into pcb and ran DRC on it, with the following results: <S> Rules are minspace 10.01, minoverlap 10.0 minwidth 10.00, minsilk 10.00min drill 15.00, min annular ring 10.00Found 251 design rule errors. <S> Some traces are too close. <S> For example, the via under D1 is 2.5 mils away from shorting out against the pad. <S> It will be very hard for you to find a fab with 2.5 mil spacing capability, and will be extremely expensive if you do. <S> Dave of EEVblog fame wrote a good pcb design guide: http://www.alternatezone.com/electronics/files/PCBDesignTutorialRevA.pdf <A> Make a prettier png! <S> Use my "pcbrender" script. <S> pcbrender input.pcb output.png #/bin <S> /shINFILE=$1OUTFILE=$2DPI=300OVERSAMPLE=3PCB=pcb <S> #/home/markrages/src/pcb/src/pcbPCBOPTS="-x png --photo-mode <S> --dpi $(( $OVERSAMPLE*$DPI )) <S> --use-alpha --only-visible"$PCB $PCBOPTS --outfile /tmp/$INFILE.front.png <S> $INFILE && \$PCB $ <S> PCBOPTS --outfile /tmp/$INFILE.back.png <S> --photo-flip-x --photo-flip-y <S> $INFILE && \montage /tmp/$INFILE.front.png /tmp/$INFILE.back.png <S> -tile <S> x1 <S> -shadow -geometry <S> "+50+50" -resize $(( 100 / $OVERSAMPLE))% <S> -background lightblue $OUTFILE <S> rm <S> -f <S> /tmp/$INFILE.front.png /tmp/$INFILE.back.png <S> Here's the output: <A> I don't know what PCB houses require for board production. <S> But stencil printer and pick-and place lines always need 3-4 fiducials on corners of panel. <S> Panel can contain single pattern of board or multiples of patterns if you will go with mass production. <S> The distance from panel edge to center of fiducial is 5-7.5mm. <S> Fiducial is a copper circle 1-1.5 mm diameter. <S> It is surrounded by circle 3-4mm large of bare substrate, so no solder mask is covering fiducial. <S> Same fiducials should be created on stencil (solder paste mask made of steel) <A> First, I see a couple of components (C22, Z6) suspiciously close to the board edge. <S> For low cost, volume assembly you will want to pick-n-place the parts onto the boards while they are still panelized. <S> Then the individual boards will be cut out of the panel with a pizza-cutter-like tool. <S> This can cause local stress on parts near the board edge and end up damaging them. <S> Ceramic capacitors are particularly susceptible to this type of damage. <S> Alternative singulation methods are available, but my understanding is that the "pizza cutter" is the lowest cost. <S> Second, I suspect that your parts placement is generally too tight to get the best pricing for pick&place. <S> Generally I expect to see the spacing between two-terminal passives (0603 or 0805 packages, for example) nearly equal to the size of the components themselves. <S> The spacing between U2 and RTC and CONN7 in particular looks problematic for pick & place and for re-work. <S> The body of other components should be outside the bounding box of the U2 pads to be able to get a soldering iron fixture down onto all the U2 pads at once for rework. <S> Third, depending on how the assembly will be done, pay special attention to the SMT parts on the backside of the board. <S> For the lowest cost, you might want to keep all SMT off the backside of the board, even if it means making the board a little bit bigger. <S> If you do need to put SMT on the bottom side, keep all SMT parts well away (like 1/4" or more) from all through hole pads. <S> This will enable a selective wave process to attach the through-hole parts and avoid the need for gluing the SMT parts down for wave processing. <A> I am also inexperienced and a learner on this. <S> However, here are my thoughts: <S> I would re-layout <S> the "Buck Power Supply" part. <S> I am hopeful that you can lessen its EMI radiation by reading a little on SMPS PCB design and current loops etc. <S> Especially, see the application notes and sources below that were really helpful to me. <S> For the "Buck Power Supply" part again, the tracks could be wider <S> , I think you have space for that, forexample the connection from D2 to L1. <S> Your designators could face the same direction so that one can easily read them without turning his/her head. <S> Here are some of the sources I remember and benefited much from: National Semiconductor - Application Note 1229 Maxim - TUTORIAL 2997 <S> Analog Devices - An article from Analog Dialogue EDN designfeature article by Jay Scolio <A> R6 is damn close to the QFP packaged IC. <S> I would move it away slightly for easy hand-assembly. <S> Also - U4 (your crystal), is your through hole crystal really that small? <A> On the bottom, north of R36, is a GND fill that is isolated from the main GND fill. <S> It looks like this is CONN6-4.
|
Make all your designators readable from one direction (or at least within 90 degrees of each other). If you want to have a board that can be manufactured easily, I suggest you adjust the sizes and move traces until DRC passes.
|
How to pick a switching transistor to drive LEDs? Or, how to read a transistor data sheet? I'm going to be driving a bank of 20-25 LEDs from a single output of a PIC micro. Obviously, I need a transistor, because that's going to be somewhere in the vicinity of 400 mA (the LEDs are speced at 20 mA with 3.2V of drop, which I'll get close to by using a 100 ohm resistor and a 5V power supply). I get into trouble when I try to figure out what sort of transistor I should use for this, because I don't understand how transistors are rated. In discussions of general transistors, the 2N3904G & 2N3906G come up as good, all-around NPN & PNP transistors. How do I look at the transistor data sheet and understand that these transistors will work? What parameters do I need to pay attention to? I want to be sure the transistor can handle the load, and I want to be sure that my PIC's output can force the transistor all the way on. I've got some familiarity with digital electronics, but when we get into the analog world I just don't have enough of a frame of reference yet. <Q> The 2N2222 might be a better choice - inexpensive, commonly available, handles the current, and overall a good choice for switching. <S> The spec you want to look at most Icmax, or sometimes just Ic <S> (The 'C' being a subscript) which is the maximum current <S> you'd normally be able to put through a fully turned on (saturated) transistor. <S> The 2N2222 apparently is popular enough to get its own web domain http://2n2222datasheet.com/ <S> where I found several PDF spec sheets. <S> I see (pun not intended) <S> that Ic is 600mA - you could use one transistor to drive all your LEDs. <S> Another spec to pay attention to is beta - the current gain. <S> If you're switching 400mA and the transistor has a beta of, say , 100 then you'll need to supply 400mA/100 = 4mA to the base from your digital output. <S> Beta isn't very consistent from transistor to transistor, even of the same type. <S> Just make sure the math works out for the lower end of the beta range when choosing a resistor for the base. <S> Practically all the other specs aren't of as much importance, not a your low 5V supply, unless you're going to drive the LEDs very fast, e.g. a few MHz. <A> With the bipolar transistor the LED current will be proportional to the PIC output current, and you will always lose 0.7 V across the emitter. <S> A mosfet will have a low Rdson which can result in much less losses across the switching device. <S> For selection purposes you need to know your maximum bus voltage, then double it, to give you margin of error <S> , next look a device with the smallest Rdson for a given voltage and package and cost. <A> For bipolar transistors if you are in ballpark of voltage, current, frequency, then the only critical part is power. <S> And for switching circuit the power is even not that important. <S> So, any part with matching V, I, f and P will do.
|
You might be better off with a pchannel mosfet (inverted logic out) or low side n-channel mosfet as they will perform will as switches for this type of application, and reduce the voltage drop across the device to be directly proportional to the LED current.
|
Does anyone have any sample code or suggestions to help me to interface my 100 pin uc3a1512to a device via RS-485? I am attempting to connect and control a device which only accepts RS-485 input. I wish to communicate to this device via my existing UC3A1512. Does anyone have any existing source code or examples that may help me to create this interface? I need a method of outputting date via RS-485 format. I do not need to establish round trip communication, I simply need the ability to send commands to the device. I have looked at Atmel's website and also on AVRFreaks and I see nothing of value to my project. Any help is welcomed and appreciated! I originally posted this question on StackOverflow before I knew of electronics.stackexchange.com <Q> You need to put a RS-485 transceiver on your USART. <S> Maybe a TI SN65HVD11, looks like it works with 3.3V IO. <S> As you you need to transmit, any sample that writes out the USART in asynchronous mode will do. <S> As you don't mention having to share a RS-485 bus, tie the TX enable on on the transceiver. <S> That way RS-232 example code will work for you. <A> Are you asking about the RS-485 physical connection or the data protocol that you have to use? <S> From the phrasing of the question I will assume that it is the former. <S> RS-485 specifies the signal levels and number of wires used to send the data together with the maximum transmission distances for the various data rates used, in much the same way as RS-232. <S> These are available from many suppliers (Maxim, TI, ON-semi...) <S> As you say you only have to transmit to the remote device, you can just leave the receive side open and use 3 wires to connect to the remote device (TxA, TxB and Gnd). <S> The commands sent to the remote device are defined in its protocol spec and will be sent in exactly the same way as on any other async serial interface. <A> 3 led on/off by one swoft switch to 8051 in asm51 code. <A> Try the MAX485 or MAX483 from Maxim IC: http://www.maxim-ic.com/datasheet/index.mvp/id/1111 Very cheap and easy to use. <S> Plus they can send data up to 4000 feet. <S> Here's someone's tutorial on using them with Arduino: http://pskillenrules.blogspot.com/2009/08/arduino-and-rs485.html
|
All that you need to do, from a physical point of view, is to replace any RS-232 driver with an RS-485 transceiver.
|
How much power is really wasted by a wall wart? The title pretty much sums it up... Hyperbole aside, how much actual power is consumed by a typical wall wart when the device it's attached to isn't powered on? And are there designs for wall warts that minimize or eliminate this sort of parasitic load? <Q> How much gas is wasted by a car? <S> Old AC/DC converters just had a large transformer, some diodes, and a capacitor, but nowadays many are switching converters that offer better regulation, improved efficiency, and smaller size. <S> From the couple transformers I've looked at on Digi-Key, all the Energy Star level IV and V transformers have a maximum of 0.5 W usage at no-load. <S> Energy Star has a whole report on this , and fancy graph (on page 5): <A> About 1 billion percent. <S> No useful work is being done except to heat your house, and energy is being dissipated which would not be dissipated if the wall wart was not plugged in. <S> For some math, if a device is just barely CEC certified (0.5W no-load dissipation) and left in the wall unused all month <S> , you have 730 hours (in one month) <S> * <S> 0.5W <S> * 0.001 <S> W <S> /kW = <S> 0.365kWh <S> [kilowatt hours] and electricity costs of, say, $0.20/kWh, and you have a cost of $0.07 Find a dime, pay the bill. <S> Compare that to, say, your 73W fridge, which will be around $10/month. <S> If, however, you have a lot of wall warts, or the small losses are significant to you, look at switch-mode power supplies. <S> They're more expensive, but more efficient both at no-load conditions and during use, and switch-mode supplies will actually regulate, as opposed to transformer-based designs which require further regulation circuitry. <S> You can tell what kind a converter is just by the weight - A switch-mode supply will have just a lightweight circuit board with some electronics inside, while a traditional wall wart has a big, heavy transformer. <S> I've used CUI switch-mode PSUs before, they're a good company with a nice line-up: <S> See this page for some of their AC-DC converter products. <S> See their Compliance page for more information on efficiency ratings. <S> Note: Some people use the term "wall-wart" for the transformer-based devices only, while others use it for both switch-mode and transformer-based wall plug-in AC-DC converters. <A> Not enough to worry about. <S> If you want to save the earth, you're better off washing your clothes in cold water, line-drying them, and using the microwave instead of the oven. <S> Some actual tests of wall wart power consumption: <S> Unplug Your Wall Warts and Save the Planet? <S> measured 0.5 to 2 W (= 0.4 to 1.5 kWh/month). <S> Weird & Wireless: <S> Does unplugging all your wall-warts really matter? <S> measured 0.4 W on average (= 0.3 kWh/month) <S> Vampire power, Jack Ganssle, November 07, 2011 <S> 4× <S> <0.1 W (= 0.07 kWh/month) <S> 1× <S> 1× <S> 8.1 W (= 6 kWh/month) <S> By comparison: A single hour of running an electric oven uses 2.4 kWh <S> A single load of laundry in a hot clothes washer uses 4.5 kWh <S> If the wall wart is warm to the touch when unloaded, it's wasting a little energy and you could try to unplug it when not in use. <S> If it's cool to the touch, then it's wasting very little energy. <S> Don't worry about it. <S> SMPS supplies and AC supplies shouldn't draw too much (an unloaded transformer is just an inductor, and only the residual resistance is wasting energy). <S> DC supplies with linear regulators inside would be the worst. <S> And in winter, definitely don't worry about it. <S> The "wasted" energy is heating your home and making your heater work less. <S> All household appliances magically become 100% efficient in the winter. <A> Numbers: <S> The best ones will waste < 0.5 W when no load is connected, but the no-load-losses can be as high as > <S> 10 W, depending on the design, and even for switch-mode wall warts. <S> My guess is that most typical wall warts used today consume about 1...3 W when no load is connected. <A> Depends on the wall wart. <S> For example some cheaper ones may use higher leakage capacitors which might waste a tiny bit of current. <S> And the diodes might drop some voltage and waste this as heat when charging up this leakage. <S> And then you've got other losses, like those of the transformer, or in some cases of the surge protection devices (MOV's) across the input.
|
A single load in an electric dryer uses 3.3 kWh It depends on the manufacturer and particular model. The actual quantity is small, so I wouldn't worry about it too much if you're concerned about your electricity bill - A few cell phone chargers left in the wall 24-7 won't make a dent. 0.6 W (= 0.4 kWh/month)
|
What's the name of the device I'm looking for I'm looking for a device which monitors a 3.3V line. When the line drops below, say, 2.7V, I would like it to switch power over to a battery backup (3V lithium coin cell.) It would also be good if it provided a logic signal to alert of the supply failure so the MCU in my project can switch over to a low power mode. It needs to be able to switch up to 120mA when the supply is high. What is the name of this device? I have a feeling it's quite common in applications like laptop computers. Ideally it would have 5 pins: Vin main, Vin backup, GND, Vout, Logic out. <Q> Power Management Controller / Power Management IC <S> The functionality your after would normally be part of a full system power management IC or a battery charging/management IC. <S> If all you need to implement is exactly what you asked for, a single FET with a low Drain <-> Source voltage drop and maybe a couple resistor to set the trip point are all thats required. <S> If you need to smoothly handle bounce, such as the bounce that occurs when you plug in a DC barrel jack, you can use a supervisor/reset controller designed to deal with bounce and use the reset output to trigger the FET. <A> Power Supervisor IC <A> It sounds like a Diode-OR'd power with the line voltage also going to a digital input pin to read the line voltage. <S> But there's probably a chip for that. <A> Trying to replace OR-ing diodes ? <S> How about an OR-ing controller ? <S> Such devices are generally designed for much more current. <S> Maxim has some interesting battery backup supervisors . <A> Done properly you can switch from one battery to another as the input to your 3.3V regulator without its output fluctuating below spec. <S> If switching to a smaller battery you'd probably want to reduce the load at the same time. <S> This question is basically the same: How do I design a device to automatically switch to the backup battery?
|
Instead of measuring the output of your 3.3V regulator to find out when it's crashing due to low battery input, you should probably be measuring the battery voltage so that your battery doesn't get overdischarged.
|
What's Special about Resist Pens? Just what is special about the resist pens used to draw directly on PCBs before etching? Would a permanent marker work as well, or some other kind pen or marker? Naturally I have in mind something cheaper but good enough. This is for one-off handmade projects, single or double sided boards only. <Q> Many shops that sell markers have testers you can try so maybe take a bit of copperclad with you & try a few. <A> I used to get very good results with ordinary cellulose paint, applied with a fine paint brush. <S> Thinning the paint a little with cellulose thinners helped if I needed narrow tracks. <S> It worked better than the resist pens and was much cheaper. <A> A permanent marker will work but the finishing may not be that very great <S> and you might want to give it a solder coat later. <S> A resist pen just forms a thicker layer than a marker would do, giving it more isolation from etching chemical and a better finish. <S> I have used it couple of time <S> If I am lazy for other long method where I get the circuit done on a PCB designer and get it printed on photo-paper etc. <S> But for a good finish and a complex circuit I would suggest this method of etching is the best and reliable. <S> I have been using it since years and never had a problem. <A> "pcbprt - Experiments in inkjet PCB printing" by pascal. <S> Some inkjet printers can print directly CD and DVD. <S> They can print on copper-clad FR4 to make reasonably good etch resist. <S> The main trick seems to be baking the freshly-printed boards to dry out the ink and get the dyes/pigments to stick to the copper -- otherwise the water-based ink immediately washes off as soon as you drop the board in the etch tank. <A> I've had success with some overhead-projector-transparency pens (remember OHPs? :). <S> The dark blue and brown Staedtlers worked best IIRC, the purple one <S> not very well at all - remember to use the "permanent" ones, not the water-based ones. <S> A bit of trial and error is the order of the day!
|
It's mostly about how much ink they put down - certainly worth testing some standard permanent markers on some scrap material.
|
Keeping those IR LEDs For all the other stupid things I often do, I've found ways to boobytrap myself. For example keeping my wallet on the floor where the door opens - I can't help but stumble on it when I leave the house. But here's an electronics parts problem that has me stumped. I sometimes accidently throw out IR LEDs as "nonworking" since they don't visibly glow when tested. How can I prevent myself from doing that, at least to force myself to reconsider and remember there's such a thing as IR? <Q> Tape your trash can shut, and instead of throwing the LED away, put it in a 'TO TEST' container :-) <S> There is a way to test them visually: <S> get your digital camera <S> turn camera on power the IR LED <S> You can find video's on Youtube about this. <A> After LEDs fail, they rarely electrically resemble diodes any more. <S> If you have a DVM that has a diode test mode, use that. <S> Mine shows a representative forward drop of 1.2 to 1.5V for various sorts visible LEDs (just talking reds, yellows, greens here), and 0.9 to 1.1V for IR ones. <A> Almost all digital cameras like the one in an iPhone has enough bandwidth to pick up IR. <S> To prove this to yourself get your digital camera and look at an IR remote with it and you will see the IR LEDs. <S> As pointed out by others expensive digital cameras sometimes put optical filters to allow only the visible range in. <A> What Vincent mentioned above is the method I'v been using so far, and is the easiest :)just take any cam (mobile or point n shoot) and when you see the IR LED through it you should be able to see a purple color light I guess (Unless I am color blind ;) ) <S> JUST AS A NOTE <S> DON'T FORGET TO KEEP A RESISTOR(lower value like 220-470E) <S> IN SERIES TO THE IR LED WHILE YOU POWER IT UP <S> AS <S> YOU DON'T WANT IT TO BURN UR LED :) <A> Funnily enough, I've solved the problem myself assuming the question didn't come up, and only then searched for it :). <S> Although I think the camera phone approach is usually the most practical, here's the solution I applied, in case someone finds it useful: <S> If you have a photoresistor that's sensitive to IR, you can just connect it to a multimeter and place it in front of the LED. <S> Obviously, if there's a change of resistance as you turn the LED on and off (without affecting ambient light sources), this means the LED is working. <S> Caveat: you have to have to at least have the datasheet for your photoresistor somewhere handy (and <S> one good enough to show you wavelength sensitivity), and at least remember the highest operational wavelength of the IR LEDs you have stocked. <A> You could also try using an IR filter as you would find in a camera store. <S> Under such filter they should glow, just about enough to be visible.
|
A fun thing to do is to use your phone camera to look at things like atms and other security devices that use the IR range to operate in. point camera at LED look at camera screen, you should see the LED lit up (if it still works)
|
Is it possible that the phases of the moon could have an effect on the operation of certain types of electronics? What type, what could the potential effects be, and why would this happen? EDIT: Yes, I am talking about physics not the supernatural. I figured this would be obvious unless people thought I was joking around, the tides are effected I know that much so obviously there is something physical going on here and I know some electronics can be very sensitive at very 'small' levels (not sure if 'small' is there word I am looking for here). <Q> A long time ago I encountered a network (thin Ethernet) issue that turned out to be due to tide height in a river next to the building - to cut a long story short, the tide height affected the height of the ground water table below the building which, in turn, affected the ground/earth voltage level in different parts of the building, giving rise to changes in noise levels and earth loop currents. <S> The fix was to arrange for better, common ground points. <S> As the moon's phase affects tidal flow, I would suggest that you could therefore say 'yes' to your question. <A> Not the answer you were looking for <S> but if you're designing electronics which will run ON the moon you'll have to take into account the big (~ 290 degrees C) temperature differences between the light and the dark phase. <A> There is no evidence whatsoever that the phases of the moon have any effect on electronic equipment, unless it is light-sensitive. <S> It used to be thought that they affected human behaviour, which is where the word lunacy comes from, but studies have failed to show any associations. <A> Yes: 1.) <S> In case a design is so sensitive the miniscule influence of the moon (capacitance, inductance, luminosity, gravity, shielding from cosmic rays etc) leads to a change of results, it is reasonable to assume the moon might have an influence. <S> But this means a design mistake has been made in the first place. <S> The influence of a person with an electric wristwatch will be way bigger probably. <S> It means the electronics design is unreliable in the first place. <S> 2.) <S> It is darker in moonless nights, so with optical sensors feedback will be different. <S> (or other types of sensors, for that matter) 3.) <S> If your electronics are right on the waterfront of tidal waters, because tides are of a different height depending on the phase of moon, the effects of saltwater on the electronics might differ. <S> 4.) <S> Since there seems to be an influence of moon phase on people (even if only they believe there is), the interpretation of electronics results might be psychologically attributed to the moon (poor thing). <S> Or maybe the users just use the stuff wrong. <A> I actually think the phase of the moon could have an effect on the noise level on an antenna. <S> In satellite applications there is usually planned outages where the satellite you are talking to is in line with the sun. <S> The noise from the sun is so great your system fails. <S> Now the moon would have much much much less noise, but I could see it still adding a bit of noise. <A> Maybe: The moon can have a slight effect on perceived gravity; look at tides. <S> I am not sure though if just the phases would have an effect. <A> The people at CERN did notice that the position of the moon has real effect on their equipment when they are using it to do their particle smashing. <S> The reason is that even though the moon's effect is not much in terms of gravitational pull, the equipment at CERN is quite sensitive to many things. <S> The beam of subatomic particles does get effected by the Moon and this has to be taken into consideration when doing the experiments. <A> In theory the gravity of the moon would cause small changes in very precise accelerometers and gyros. <S> As a practical matter there are gravity deviations due to mountains, ore deposits and so on that would be larger. <S> As these don't normally effect equipment, I doubt the moon does. <A> Yes: http://www.outpost9.com/reference/jargon/jargon_31.html#TAG1361 iow: If someone tries to print out the phase of the moon to aid in debugging and fails to do that in some situations. <A> There is a list of relativistic effects of gravity and speed on clocks, including GPS clocks. <S> Tidal potentials of the Moon is namely known. <S> Amplitude of periodic effect is on the order of 1 ps. <S> I dont know if its over the range of 1 day. <S> so yes. <A> YES . <S> A light sensing circuit would be affected by the amount of light reflected off the moon into the sensor. <S> How bright it is at night depends on the phase of the moon. <S> The hypothetical circuit would measure this. <S> There are many such sensors: <S> photodiode's, phototransitors, phototubes, etc... <S> Here is an example of an existing circuit/product that would do this: http://unihedron.com/projects/darksky/ <S> Of course their are many others.
|
If you had ultra precise accelerometers or devices for measuring this, then you might notice an effect due to the rotation or position of the moon.
|
Is it okay to wire an MCU output to an MCU input on the same chip? My dsPIC33F does not seem to support routing the comparator to the input capture module. Would it be okay to run a wire from the comparator output to the input capture input? I'm using a dsPIC33FJ128GP802 . <Q> All pins are inputs on power up. <S> Commonly used by embedded software guys like me to give a interrupt from a GPIO. <S> Who says there's no software interrupt instruction ? <A> I did something quite similar for a PIC16F690 with no problems. <S> For that PIC, it could use the comparator output internally to trigger an interrupt, but there was a note indicating that there's a small window where the comparator can miss the interrupt. <S> In the end, I connected the comparator's output to an Interrupt-On-Change pin to make sure that I would always get an interrupt. <A> Provided the processor doesn't set them both as outputs during reset (most unlikely, and probably not very harmful in real life anyway), then you'll be fine.
|
It's not just possible, it's darn useful.
|
What kind of options are there for very high bandwidth long distance data links? I'm considering a future product. A high definition (720p) video transmitter. Ideally a compressed MPEG link would be used but this would still require at least 80 Mbit/s. I'm not looking at a simple solution, and I don't even think it's possible without high cost and big transmitting gear, but what is everyone's opinions? What about sending component video over long distances? I'm talking about 10km or so and the link must be wireless. The nodes may move, one would likely be an RC plane. <Q> We use Microhard Systems 1.5 Mbps radios that send data over 100km. <S> They run at 900Mhz www.microhardcorp.com <S> They make 54Mbps broadband wireless gear too, quoted range is 16km. <S> We've used their 900Mhz gear for years, and it's only gotten better, from 1200bps to 1.5Mbps. <S> Works great in cluttered environments (urban or forest) <A> A 10km link for 80Mbit/sec? <S> Not going to happen. <S> You're going to have a hell of a problem getting consumer gear to do 10km with one endpoint mobile, let alone 80Mbps. <S> Why not encode that stream with an FPGA or encoder chip to get it down to a more manageable bit rate? <S> Now you can start looking for high-power commercial gear, but I'm guessing that you won't find anything you can use without a license. <S> The gear that Tim is talking about is all for fixed point to point links. <S> I've set up some long range 2.4GHz stuff but again, fixed points where you can use a big antenna and jack up the EIRP. <S> Sorry for the letdown of an answer, <S> but there isn't consumer gear which can do this yet, and the commercial gear will either be pricey or simply unavailable. <A> There are a few things you need to consider in a project like this: <S> What are the wireless regulations for the markets you are planning on selling to? <S> Typically the wireless spectrum is very limited on what frequencies you can use, how much power, and for how long you can broadcast. <S> Of course you can usually pay a licensing fee to go above it, but you would have to look into the rules for the area you would be selling to see if the license is something you can afford for your project. <S> What is the free space and obstacle loss that are associated with the range and environment that you want it to work in? <S> Now how much power will you need in order to go that far? <S> Portable or fixed? <S> How high (elevation wise) will it be? <S> Because of the curvature of the earth, the longer distances you want to go the higher you have to be. <S> Do you want the user to have to aim their antenna or is it going to be omni-directional. <S> How tight of range are you going to have? <S> The tighter the range the higher your effective gain will be on your antenna. <S> Are you going digital or analog? <S> This will effect how you will encode your data, acceptable error amounts and acceptable signal to noise ratio. <S> I think once you consider these items you will probably realize it isn't practical for a consumer application. <A> What about using a TCP/IP data link established with some modern mobile phone or modem? <S> I guess GPRS is too slow but 3G might do the job. <S> Mobile phone might even use it's camera and compress the picture for sending, or you can just put it in an automatic answer mode and use it as a simple 3G video phone. <S> This solution might also spare you wireless licensing problems. <A> If one end is mobile, then you will need to steer the antennas to keep them pointing in the right direction. <S> I'd find some low-bandwith + long-range radios that can be used to transmit the GPS position of the rover back to the base to allow the base-antenna to be aimed. <S> An alternative solution would be to have two radios at either end and scan the second radio around to optimize the aim of the main radio, but mechanically that's quite complicated and heavy. <S> You might get away with an omnidirectional antenna on the rover and only use a directional antenna on the station, but range will suffer a lot.
|
First of all compress the data to get the bandwidth down to less than 20 Mb/s, then get long range 5GHz 802.11n radios with directional antennae like these: http://ubnt.com/
|
building an audio amplifier for 2.5 ohm speakers I recently dug out of my box o' stuff a pair of seemingly decent 2.5ohm bookshelf speakers. I wired them to an old mp3 player I have and while they sound good at low volumes, I get lots of distortion at high volume. Given that they are only 2.5ohm, I'm assuming that this is because they are trying to draw more current than the poor mp3 player can produce. Rather than buying one (or new speakers for that matter), I'd like to try and build an amplifier for these speakers. I was looking at using an IC such as the TDA7924 but like all of these chips, the advised load impedance is 4 ohms. It doesn't specifically state anywhere that the absolute minimum is 4-8 ohms, but has anyone had any experience with this sort of thing? Will it still work at a lower load impedance if I just make sure that the volume is limited? If not, will I be able to use this IC if I chuck a big 2 ohm power resistor in series (as much of a waste of electricity as that is)? I'll probably get some anyway to play with but I am a poor student and I would prefer not to blow up several $12 chips. thanks! <Q> If you don´t mind to lose stereo sound, you can wire up the speakers in series resulting in one load of 5 ohms. <S> I think that a 2 ohm resistor is not a good solution because a common output voltage will be arround 10 volts and with current of 5 amp <S> you´ll need a resistor of 50 Watts, which is pretty expensive. <S> Maybe buying an cheap tweeter will be better and improve high frequency sound quality. <S> Looking in the datasheet I found that this IC specifically (TDA7924) have an short-circuit and overload protection. <S> Using a load of 2.5 ohms may not be a problem if you don´t exagerated in the volume. <S> Some other thoughts, how did you measured the speaker impedance? <S> If it was only using an DC multimeter the number you got (2.5 ohms) is only the resistance of the speaker. <S> The impedance also needs to consider the inductor. <S> If the DC resistance is 2.5 ohms probably the total impedance is alredy 4 ohms, so you don´t need any modifications on the circuit. <S> The speakers whose impedance are not 4 or 8 ohms are rarelly manufactured. <A> Transformers match impedance by the square of their turns ratio, so if your device has an 8 ohm output, to match a 2.5 ohm load you'd want a ratio of sqrt(8/2.5), or about 1.8:1. <S> Using a 2:1 transformer would make a 2.5 ohm load look like 4*2.5=10 ohms, which would still be a closer match to 8 than 2.5 is. <A> Ahh!!! <S> I remember doing one in my school days. <S> I have few tips for you where you can still have these speakers work perfectly fine with the least risk ;) coz I tested them on mine. <S> For reference I have used the datasheet from this site http://www.st.com/stonline/books/pdf/docs/1057.pdf <S> The logic here is the lower the resistance of speaker <S> the higher current it will end up drawing from the amplifier, so what you have to take care is to make sure the current your speaker are drawing to keep it within safe operating range of the amplifier. <S> Some tips you can use are <S> Keep the input voltage much less that the MAX SOURCE VOLTAGE of the amplifier, in this case its 40V. You can use a 12V supply with 1AMP current. <S> Make sure you have good HEAT SINK, a big one. <S> preferably use the "heat sink paste" and screw it up tight and arrange it properly in the board such that it gets a good AIR CIRCULATION. <S> And since the speaker are just 2.5 ohms from my experience they are going to be real loud and noisy at higher volumes <S> (I re-winded the coils for higher ohms in my case and used custom cloth spider and cone to get the best out of my speakers ) <S> So keep the volume low :) <A> I would suggest you do some research into Op Amps , as they will allow you to manipulate the output of the mp3 player into a more suitable input for your 2.5Ω speakers. <S> You can in essence create a pre-amplifier for your speakers. <S> More information on Op Amps can be found at Wikipedia . <S> While your amp does not emphatically state itself to be an op amp, have you metered the impedance of the speakers? <S> I found a link at http://www.prestonelectronics.com/audio/Impedance.htm , which states" a 4 ohm speaker will typically measure about 2.5 - 3 ohms, and an 8 ohm speaker will typically read about 5-6 ohms, while a 16 ohm speaker will measure around 12 ohms. " <S> If you speakers actually meter to 2.5Ω and the typical speaker meters 2.5Ω also, then your speakers should work fine on the "op amp" you have selected then you may find you are able to utilize your amp.
|
You could try using an audio transformer to get a better match between the output impedance of the amp and your low-impedance speakers.
|
how do energy consumption (Ah, kWh) meters work? How do devices which measure energy consumed work? For example the ones in solar regulators/chargers which display how many Ah went into the battery and how many went out? Do they just measure the current for example every second and a microprocessor constantly adds up the measurements, assuming that the current 0.5s before and after each measurement is the same as while they take the current measurement, or do they have a way of really measuring how much energy went through, without referring to such, possibly inaccurate approximation? <Q> Ah would be measured with a coulomb counter - basically what you said, measuring current and numerically integrating this over time. <S> As for kWh, you could measure current and voltage, multiply them together to get power, then again, numerically integrate this over time to get kWh <A> An MCU is not required to perform this sort of measurement. <S> The <S> STC3100 is a simple I2C interfaced coulomb counter that measures the charge state of a battery. <S> It works by integrating the measured current into/out of the battery over time and providing the result in a form that can be read by the processor. <S> I have used this device on a couple of products and find the results better than I would have thought bearing in mind <S> the large variations in the load current that can be seen, in my case the load current varies over at least 4 orders of magnitude. <S> The errors due to the sampling of the varying current seem to cancel out over time. <A> Mechanical wattmeter is essentially a motor with voltage and current sense windings. <S> The velocity of motor is proportional to multiplication of voltage by current. <S> In case if the multiplication gives negative result, the motor will rotate backwards. <A> In practice, yes an MCU will be doing individual measurements of current and voltage and assuming an average over the time period. <S> Depending on the frequency of the measurements and how the voltages are filtered before digitizing you will get something that's very, very close to the truth. <A> DC Energy consumption is fairly simple, as others have stated. <S> AC power meters like the Kill-A <S> -Watt have to do a bit more, because with AC systems <S> current * voltage ! <S> = <S> power for reactive loads. <S> Basically, what the device has to do is sample at a frequency much higher than the AC carrier for a short period of time, and integrate the product of the voltage <S> * current for that period. <S> This enables the device to account for any phase difference between the current and voltage. <S> The Tweet-a-Watt project has more info, though it is not a great example, as they are sampling at too slow a frequency to get highly accurate results. <A> Energy consumed by the electrical loads or appliances can be measured by the Induction type energy meter. <S> The basic principle governing the working of the energy meter is same as that of wattmeter (power measuring instruments) except that in an energy meter a counting or registering mechanism is used which accounts for time interval over which the meter is being used, i. e, power integrated over a time which gives the energy consumed. <S> In energy meter we have a rotatingAluminum discwhich rotates due to the torque exerted on it (the torque is produced due to the interaction between the flux and the eddy current induced in the disc) .The rotating torque is proportional to the power consumed, To have a constant speed of rotation a braking magnet is installed which enables the disc to rotate with a constant speed which is directly proportional to the power consumed. <S> Since a recording mechanism is used(consisting of gears and racks and pinions arranement), which gives integral of Pdt, <S> i. e <S> the energy consumed which is equal to the total number of revolutions(integral of No. <S> Of revolutions <S> × dt).Hence by knowing the number of revolutions and the meter energy constant we can calculate the energy consumed.
|
You sample the voltage and current at regular intervals, interpolate, and integrate for total power consumption.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.