source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
What is an Electronics Databook? So I'm reading through the Tab Electronics Guide to Understanding Electricity and Electronics , and I'm literally at the first few pages of the introduction and he mentions electronics databooks. The author describes them as such: The manufacturers and distributors of electronic components publish data books, containing cross-referencing information and individual component specifications. A few examples of such books are NTE Semiconductors , The GE Semiconductor Replacement Guide , and SK Replacement Cross-Reference Dictionary . Your first project in the field of electronics is to obtain all all of the electronics data books that you can get your hands on ... They are that essential. After reading the whole section on this (about ~3 pages), I still don't really understand what they are, and why / if I need them. Also, this book has a 2000 copyright... has anything changed (e.g., have these things gotten digitized and become free?) <Q> Sometimes manufacturers would include application notes or white papers in the databook as well. <S> Back in "the day", engineers would have a large library of databooks. <S> Around 1997 my library was made from six 6-foot bookshelves completely full of databooks-- <S> that used all the wall space in the employee break room. <S> Around the same time, manufacturer representatives and field-sales people from distributors would drive from customer to customer with their trunk full of databooks. <S> This was before the Internet was useful, and PDF's were commonplace. <S> Databooks have been mostly obsoleted now, to the delight of field sales people and employees taking breaks everywhere. <S> Cookbooks are entirely different. <S> They were almost always published by third parties, not the chip manufacturers themselves, and thus were mostly manufacturer agnostic. <S> Cookbooks were more like application notes, while datasheets were more about formally documenting the manufacturers specifications. <A> First there was print. <S> Databooks were the bibles in component information. <S> Have the audio databook on your desk and you conquer the world. <S> Before the Internet era I worked at Philips Audio, and just the Philips databooks was a 2m pile. <S> Very awkward if you needed the book at the bottom :-). <S> Then there were the databooks from the other manufacturers, and you needed several sets, so you ended up with a library with several hundreds of databooks. <S> But databooks are impractical, not only because of the place they take. <S> They needed updating with new products, and as a small customer you had to buy the new version every so often, or the manufacturer had to ship tens of thousands free to their big customers. <S> Then there were CD-ROMs. <S> You can get your complete collection of datasheets on a couple of CD-ROMs, they're virtually free so you can have a set for each design engineer, and publish a new version twice a year. <S> And PDFs are searchable! <S> Much better already. <S> Not good enough! <S> Your sales engineer comes along to present a new product, and you want the datasheet, preferably by yesterday. <S> The next CD-ROM isn't due before November, so you would get a leaflet (for a diode) or a book (for a microcontroller). <S> With the Internet databooks and printed datasheets are things of the past. <S> You can get the datasheet on the manufacturer's website the day it's published, and you can subscribe to newsletters which inform you of any new information. <S> While the manufacturer's website seems the logical choice for information (you can't get more up-to-date than that) <S> I often use Digikey as a starting point. <S> That's because I need a component for a specific function , and I want to see what exists. <S> At that moment I don't care about the manufacturer yet. <S> Digikey (or Mouser, or...) will let you compare different manufacturers, and they link to the datasheet on the manufacturer's site too. <A> Notice that the book, which O.P. is quoting , dates back to year 2000. <S> Databook is a collection of datasheets printed and distributed as a physical book. <S> A databook usually covers a family of devices. <S> However, datasheets are published in PDF online these days. <S> Databooks predate internet and PDF datasheets. <S> I think, they are obsolete now. <A> Here is an example <S> It sounds like the author is referring to what are sometimes called Cookbooks. <S> This of these like encyclopedias of semiconductor components and IC's. <S> For example, if you had a TTL cookbook, it would list every TTL chip. <S> Most of the time, chips from different manufacturers carry the same number. <S> Such as a 74LS00 could be made by anyone, its still a 74LS00.The cookbook will tell you electrical specifications, pin assignments and truth tables (if they apply). <S> They are not required by any means, as you can find these same specs online. <S> They are just easier sometimes. <S> And some EE's like to have books to reference. <S> Some manufacturers come out with their own specific books also. <S> For regular TTL or CMOS IC's, cookbooks are great. <S> However keep in mind for newer IC's or for MCU's, its usualy (always) better to go to the net and get the latest cutsheet. <S> They are very very handy, save me alot of time hunting the internet looking for data sheets.
A databook is a collection of datasheets, in printed book form, from a single manufacturer.
Do switching type AC adaptors limit the current by themselves? Do switching AC adaptors limit the current they provide to the rate described? I have thought that they do not, and that it simply gets dangerous by overheat, but now I am thinking that they might. I had a power unit with pretty much small capacity (60w) on my mini-ITX computer, and it worked for a while, but after I started to attach usb units and gained current, the computer frequently shut down, so I suspected the power unit's capacity was not enough, and replaced it with a larger one (120w) but kept using the AC adaptor (12V 5A) that was designed for the smaller power unit, and it still shuts down frequently. After calculating the power that I am using, the power unit should be enough, but the adaptor may not. Now I am suspecting that the AC adaptor does not have enough capacity. A different reason I came to think that AC adaptors limit the current is when you connect a AC-to-usb adaptor to ipad that is not designed for ipad, it does not charge at full speed because ipad requires 2A, which is more than what ordinary usb power supplies. <Q> Without going into too much detail on the hows and whys and variations, for all intents and purposes the answer is yes, power supplies will only supply up to what they are rated to supply. <S> Basically, if you have a 12V 5A supply, you can't try and draw more than 5A without the output voltage sagging, or some current limiting kicking in, fuse blowing, or smoke appearing. <S> Usually with a well designed supply it will be current limiting or thermal fusing. <S> So if you have a computer that has a 120W power unit (I take it <S> this is a mini ATX type thing) <S> then you need at least a 120W adaptor. <S> If the unit runs from 12V, then you need 120W / <S> 12V = 10A minimum. <S> If you use the 60W adaptor with a 120W ATX, you effectively have a (slightly less than due to inefficiency) <S> 60W <S> ATX, as you can only get out what you put in. <S> So you need a new switching adaptor. <A> Many switching power supply controller ICs have a built in current sense input to avoid damage of the switching element when a over-current situation occurs. <S> Regarding the iPad charging, I read somewhere that there must be a specific resistor combination on D+ and D- lines in order to charge it at full current. <S> This is to avoid over-current situations when connecting it to computer USB ports. <A> Most inexpensive duty-cycle controlled switching power supplies (flybacks, forwards, half-and full-bridges, etc.) will have primary-side current limiting, as this is inherent in the widely-use current-mode control methodology. <S> More robust designs will also have secondary-side current limiting, which uses some sensing element to measure the current going to the load and some logic to take action if a specific current threshold is exceeded. <S> Fuses generally aren't good for overload protection unless the overload is catastrophic (a short-circuit in the power train, for instance). <S> It's always good to target some overhead in your power budget - if you need 100W, aim for at least a 150W power supply, for example, to ensure that you're not operating the power supply near its theoretical maximum.
There is some sensing element in series with the primary of the transformer, which cuts off the duty cycle if the current gets too high in a given switching cycle.
How to detect high current I am working on the project which involves running a DC motor which is used to raise/lower window glass in the vehicle. While running, motor draws about 1.5A of current. However, when the window reaches the end of the sliders and the motor can no longer raise/lower the glass, it starts drawing up to 15A until you release the button. I want to use AVR microcontroller to control this motor and would like to stop the motor when the window reaches the barrier. I managed to come up with three solutions thus far: Use switches which will trigger and inform microcontroller when the window reaches the barrier. I'd like to avoid this because this means installing two switches per window and running extra cables to the microcontroller. Use timer function which will turn off the motor after a specific amount of time. This is not applicable because the voltage may vary and the motor might turn faster or slower than normal. Also, the window might be in an unknown position when starting the timer (all the way up, in the middle...). Use some kind of high current detector and route it to microcontroller's input, alerting the program when the current threshold is reached (say 5A). Something like a transistor, relay or similar device which can handle the current this high on the input. I am pretty much a beginner when it comes to electronics, so I was thinking if there is a way to detect this high current (motor is running on ~12V) and provide this signal to microcontroller (which is running on 5V). I'll appreciate any help. Thanks! <Q> The ACS712 can detect currents up to 50 A. <S> The ACS712ELCTR-20A-T has a sensitivity of 100 mV/A, so you can use the microcontroller's ADC to detect when the 500 mV (5 A) threshold is reached, or better, use a comparator, which interrupts the microcontroller. <S> Many AVRs have a comparator on-chip, with an interrupt exclusively assigned to it. <S> The ACS712 has a current sense path resistance of only 1.2 mΩ , so even at 15 A it will only dissipate 270 mW , which it can sustain forever. <S> That's the main advantage over a more traditional current sense resistor as in Rocketmagnet's answer. <S> Even so, a 5 W type is recommended for the sense resistor. <A> This should be pretty easy. <S> You can detect the difference between 1.5A and 15A using a simple resistor. <S> A value of 0.3 ohms will give 0.45v at 1.5A and 4.5v at 15A. <S> A digital input pin on the microcontroller will read 0 at 1.5A, and 1 at 15A. You could wire this straight to the microcontroller's input pin, but it would probably be best to add a little filtering and protection. <S> RF and C1 provide a low-pass filter to make the voltage more stable. <S> D1 provides over-voltage protection in case the current greatly exceeds 15A. <A> There are these things called magnetic reed switches. <S> Basically like a relay; a current causes a field which closes some contacts. <A> Not really an electronic solution but a mechanical <S> : If you have control over the mechanics, you could use a switch solution at the motor, e.g. by transfering from a small to a large gear that will turn less than one time during the whole process. <S> A dent on this gear could trigger a switch. <S> (This is how our garage door opener does it.)
If you throw one in series with the motor, you should be able to find one that will remain open at 1.5 or 2A, but close at 15A. Ground one of the switch contacts, pull the other end up to your logic +V, and voila, an isolated digital input signal. There you need a relatively high resistance to get the high level at 15 A. Mike calculated that Rocketmagnet's sense resistor will dissipate 36 W when the motor stalls, so timing is critical there (for a moment disregarding the 131 W dissipation in the motor). Allegro has a number of current sensor ICs, based on Hall effect sensors.
different USB speeds on different chips I have a USB to ethernet chip (USB 2.0 480 Mb/s) and a microcontroller (MSP430F550x family, full-speed USB 12 Mb/s) that connects to a USB hub (USB 2.0 480 Mb/s). How would I make these work together? Will the USB hub go at the slowest speed, which would be the microcontroller? Is there any way I can have everything work together at 480 Mb/s? Thanks in advance for your help! <Q> The USB protocol will solve the speed problem for you, the faster element (USB-ethernet chip or HUB) will use the slower protocol (because the faster protocol 'contains' the slower protocol as a required fall-back). <S> Your real problem will be the driver sooftware: do you have a driver for this USB-ethernet chip that can run on your MSP uC? <A> Unless I'm reading the wrong document (quite possible) <S> the MSP430F550x family doesn't have a USB host interface, only USB device. <S> Therefore it would seem that both this processor and your ethernet interface are plugged into downstream hub ports, and something else like a PC or more powerful microcontroller is plugged in upstream as the ultimate host device. <S> Assuming the upstream device and hub support USB2, the ethernet adapter would be able to take advantage of that, while traffic intended for your micro would be sent at the slower USB full speed. <S> There would be no communication between the two devices, other than any transfers between them done by the ultimate host in software. <A> In my case, if the host was a PC with USB 2.0, then I wouldn't have to worry about the microcontroller, for example, being slower.
I've found that the USB hub chip I'm using has transaction translators (TT) that essentially speed up the slowest device to match the speed of the host.
Is electronics driven by scientific papers? Is electronics driven by scientific publication, similar to other academic fields? Two famous publications I came across, Gordon Moore's seminal paper , and Leon Chua's discussion of the memristor , did not leave me breathless. Coming from a mathematics background, I have been disappointed by electronics theory. No visionaries stand out, especially contemporary ones. Is electronics simply not a publication-driven discipline? Are there examples of seminal papers where theory paved the way to technological breakthrought? <Q> Electrical Engineering can be seen as the practical application of Physics. <S> As such, EE is not so concerned about carefully controlled scientific studies and research. <S> To make matters worse, there is a lot of money to be made in the EE field, so any research done tends to be done by well funded companies who have economic reasons to keep their results either a trade secret or to patent them. <S> Any scientific papers on EE that do get published are generally done by universities and published in journals more suited to physics or other hard sciences. <S> Electrical Engineering was not always this way. <S> Up into the 1970's it was more common to see private corporations sharing information with the general public in the form of papers. <S> But that really died off in the 1980's and is almost nonexistent today. <S> I'm not sure exactly why that is. <S> Around the same timeframe this industry has also become more lawsuit-happy and patent-happy which might have something to do with it. <S> It is not surprising that the papers and other work that people have mentioned in other answers and comments are all mostly pre-1980's. <S> There still is the IEEE and ACM groups which do help advance the state of the art somewhat. <S> But even these have lost much of their impact in the past 25 years. <S> The papers they publish now are either university studies (nothing wrong with those, really) or not exactly groundbreaking new research from corporations. <S> So today, EE is mostly the practical application of physics. <S> Of course there is always some overlap between physics research and physics application, but these days there are not many published papers from that area of overlap. <A> Classically, look into the work of James Clerk Maxwell, Oliver Heaviside, and Hans Christian Oersted. <S> On the more contemporary side, look into Nikola Tesla's work, and pretty much anything that came out of Bell Laboratories. <S> That is ground zero for modern electronics. <S> If a seminal paper is what you're looking for, Shockley, Bardeen, and Brattain's 1956 Nobel Prize in Physics paper is probably it. <A> The IEEE has a collection of classic papers . <S> I believe it is free/open access, though I'm a member <S> so I might have a login cookie set. <S> Additional random suggestions. <S> Most meta-references which might point to classic or at least interesting papers. <S> The Monolithic Operational Amplifier: <S> A Tutorial Study - not seminal in itself, but contains references to classic works circa 1960s and 1970s. <S> Wilder, etc. <S> Analog Devices' Op Amp Applications Handbook has a chapter on op-amp history, with references to a group of seminal papers on amplifiers, feedback, op-amps, and related in its Section H: <S> Op Amp History (PDF 3MB). <S> I would bet that some of the late Bob Pease' columns (try starting with The Best of Bob Pease ) drops some hints on classic papers on analog electronics worth reading.
Besides the Bell Labs Technical Journal (it's had various names over the years), on the mostly computing side the IBM Journal of Research and Development is worth looking at for some classic computer (hardware / computer engineering) related papers.
Replacement Transistor for Ultrasound Cleaner I'm trying to repair the generator board on a Sonix IV ultrasound cleaner. I need to find a replacement for a transistor (in a TO-3 package), but the manufacturer uses an in-house part id, so I'm trying to figure out what kind of transistor this is. This guy has a similar problem, but a slightly different generator board: Replacing a transistor when I can't find any info on it . I suspect it is the same transistor though. Like him, the manufacturer is unwilling to give information about the part. I have tracked the part-placement and wiring on the board, and created a schematic. Can anybody use this to suggest a suitable replacement part? Schematic: Board: Top layer PCB: Bottom layer PCB: Silkscreen: <Q> I am a former employee. <S> It is an NPN High Speed switching transistor (similar to a BUV48A in a TO3 case). <S> You will also need to check the diode closest to the transistor, because it ran hot and failed in this board version. <S> Use an ultrafast 2 amp. <S> Change the 1 ohm resistor (R2) to a 24 ohm 3 watt, and change the 56K resistor closest to the 1uf 400v Capacitor (R4) to a 100K 3 watt. <S> You may need to change the turns on the feedback (toroid) transformers, depending on the output waveform. <S> One full cycle of the output on the oscilloscope should be approx. <S> 16.4usec (~60khz). <S> Measured from the Emitter to the Collector. <S> The "on" and "off" should be as close to symmetrical as possible <S> ( 8.2usec: 8.2usec). <S> Approx 350vpp. <S> The turns on the toroid should be 10T and 4T in general. <S> I suggest using a 2amp GMA pigtail fuse instead of a 1 ohm fuseable resistor. <A> From having a look at the various links and previous question, my guess is <S> it's a high voltage <S> NPN designed for line switching. <S> Something like the 500V, 20A <S> NTE98 . <S> This is assuming the input to the connector marked "PWR" in the schematic is a rectified line voltage (can you tell us anything about the input voltage?) <S> I think your schematic is not quite correct, the schematic in this link seems more likely <S> (I know it's not the same model) as it has the base feedback from the coil tap. <S> I'd check the traces carefully, particularly the toroidal feedback coil, I think it should connect to the base junction. <A> Hard to say.. <S> My guess is they made an online regulator for driver / 60KHz <S> *1 clock/ and a fast TRIAC switch. <S> *1 or whatever resonant frequency of piezo device is.. which you can measure. <S> That's why it's proprietary. <S> That's also how they can transfer a lot of power in a small transformer and have a shielded driver with CM rejection on the other side of transformer. <S> I might call it a high power chopper design for resonant switching with 60Hz AM. <S> ( no need to make it smooth modulation.) <S> What is not clear on your schematic is if the piezo resonant element is a powered port with its own driver @50Khz or so, and thus all you need is a switch (Triac) or if it is passive and it needs an integral switch & driver (chopper) . <S> Judging by the lack of Line filters for Chopper, I would guess the piezo port is AC powered only. <S> Hence Triac only AC switch for TO-3. <S> but transformer looks like only 10W size at 50/60Hz. <S> What is the power rating on ultrasonic output? <S> If higher than 10W, then transformer might handle more power at higher chopper rate, but then where is LISN or line filter? <A> If I looked at the diagram, I think the builder of that unit has changed the type of the active component (in this picture is the"transistor"). <S> On my experience with a few electronic diagram, it is NOT a transistor , but it is a hybrid switching generator which usually used on the switching regulator (like TOP derivate of switching regulator). <S> I hope this information is useful for you.
Any high speed switching NPN transistor with a rating of at least 600v, 15 amps, with a low hfe should work.
Good solution for more interrupts on an arduino? I'm building a circuit with an Arduino Mega and simple IC chips (e.g. 7432) but I have many lines to monitor for interrupt conditions and not enough pins on the Atmel so I'm looking for a way to expand this. Problems ensue because I need to be able to switch the trigger condition from rising edge to falling edge for some lines based on conditions, and some lines will remain high after having been serviced, so a priority encoder would suffer from the condition that a higher priority interrupt would mask a lower priority one. For the latter problem, I am thinking of using a register and some gates to allow disabling of some interrupts, but I don't have a good solution for the former. Does anyone have any suggestions? I'm getting new chips as needed, so solutions involving extra 7400 series ICs or similar would be appreciated, but something more exotic would be OK as well. <Q> You could use a Programmable Interrupt Controller (PIC) such as the 82C59A . <S> It will cascade if you need more than the eight interrupts it provides. <S> It's a bit old school <S> but I think it will handle all of your requirements. <S> From these lecture slides : <S> Block diagram of 82C59A <S> It is treated by the host processor as a peripheral device. <S> It is configured by the host pocessor to select functions. <S> Chip Select is again used to address the 82C59A when necessary. <S> \$\text{A0}\$ address selects different command words within the 8259 <S> \$\text{INT}\$ <S> and \$\overline{INTA}\$ ared used as the handshaking interface. <S> \$\text{INT}\$ <S> output connects to the \$\text{INTR}\$ pin from the master and is connected to a master IR pin on a slave <S> In a system with master and slaves, only the master \$\overline{INTA}\$ signal is connected. <S> Interrupt inputs \$\text{IR}_{0}\$ to \$\text{IR}_{7}\$ can be configured as either level-sensitive or edge-triggered inputs. <S> Edge-triggered inputs become active on 0 to 1 transitions. <S> Cascade interface \$\text{CAS}_{0}\$ - \$\text{CAS}_{2}\$ and \$\overline{SP}\$/\$\overline{EN}\$: <S> Cascade interface \$\text{CAS}_{0}\$ - \$\text{CAS}_{2}\$ carry the address of the slave to be serviced. <S> \$\overline{SP}\$/\$\overline{EN}\$ : <S> = <S> 1 selects the chip as the master in cascade mode. <S> Currently produced by Intersil and in stock at Digikey . <A> I'd use an I/O expander like the MCP23008 or the MCP23017 . <S> Both have SPI and I 2 C versions; interrupts can be configured (edge-sensitive, level-sensitive) for each input. <A> An Arduino Mega has “only” 24 pin change interrupts for its 80 pins. <S> Still, that may be enough for the original poster, and he may not have been aware of this possibility, because the “INT" pins have API support in the Arduino environment, while the pin change interrupts don’t. <S> Here’s some fairly elaborate code to attach to pin change interrupts <A> I know this answer is a bit late, but I'm answering it for any late readers to this question. <S> There are libraries for it that allow any pin to be able to trigger an interrupt because the ATMega is capable with a little clever coding.
The software version of adding more interrupts would be to do a "Pin Change Interrupt" .
Placement of decoupling capacitors The recommended power schematics for Atmel's AT32UC3C (figure 6-1) shows the use of 2 decoupling capacitors from the power supply to the digital circuitry, CIN1 and CIN2. These are meant to decouple VDDIO1, VDDIO2, VDDIO3, and VDDIN_5. However, the pin layout of the chip has these pins on different sides of the IC, each with their individual grounds. The IC is 16mm*16mm so it seems to me that the traces connecting all the pins to a common decoupling capacitor set might get quite long (somewhere I found a recommendation that decoupling capacitors should be within 1/2" of the pins). Should I duplicate CIN1/CIN2 for each VDDIOx/GNDIOx combination? Why or why not? If not, which pins should I place the decoupling capacitors closest to, if it even matters? <Q> All you have to do is place <S> the caps on each of the pin pairs, as close as possible to the pins. <A> Check out Table 40-19 in that datasheet. <S> It outlines the actual decoupling requirements. <S> The way I read the datasheet, I would get the decoupling capacitors right up next to VDDIN_5. <S> That seems to be the power pin that powers the entire IC. <S> You shouldn't need to decouple the VDDIOx pins separately. <A> VDDIN_5 supplied the internal 3V3 regulator and then the 1V8 regulator for the core. <S> The VDDIO pins supply VDD to the IO pins. <S> Those caps are important to stop switching noise from the IOs getting into the rest of your circuit. <S> If you are not using any of the IO's connected to a particular pin you could possibly leave off the cap. <S> We just put 100n close to the VDDIOs and have had no problems. <S> There are GND pins right next to them. <S> You need to connect all the GND pins to each other externally and likewise with the VDD pins
Decoupling capacitors should be as close to the pin as possible. The designers did a perfect job in the pin assignment: Each of the power pins is right next to a ground pin; you can't get better than that!
What does BSC SQ mean? I'm reading this DAC datasheet . The last page (p. 32) gives certain of the chip's dimensions, some in units of "BSC SQ". What does BSC SQ mean? Is it standard to express sizes in BSC SQ? <Q> BSC means "Basic Spacing Between Centers". <S> This is often used if the reference lines don't refer to a physical point or edge, like in the case of the pins: the reference is in the middle of the pin, instead of one of the edges. <S> BSC SQ = <S> BSC square, i.e. in both X and Y dimensions. <S> Usually a mechanical drawing of a package will show minimum and maximum values. <S> BSC SQ must be regarded as nominal, so may deviate, but it doesn't say by how much. <A> In its most generally used form "BSC" means "distance between two nominated points. <S> "BSC SQ" when referring to an IC package means that the side is BSC units long and that the package is "square" so that the side at right angles to this one is the same length. <S> The words may literally stand for "Basic Spacing between Centers" but the term is used even where there are no specific centers involved (as in eg the package side measurement in the example given). <S> Where holes are involved <S> the distances are measured between the centers of the holes. <S> Where eg pins are used the distances are between the centers of the pins. <S> A side or other dimension that has nothing to have a formal center means that the dimension is measured between the mean edge locations. <S> Some explanations say it stands for "Basic Spacing between Centers" but that seems to be more an attempt to put meaningful words to the term than a genuine meaning". <S> Regardless - you can expect that either all the left hand edges OR all the right hand edges or all the centers of pins along an edge are spaced at a spacing of BSC within the specified accuracy tolerances. <A> "BSC SQ" is an abbreviation for "Basic square". <S> "Basic" has a specific meaning defined in the dimensioning and tolerancing standard (ASME Y14.5M for the curious), but it roughly means "nominal". <S> "Square" simply means that the feature is square, so there is no need to clutter the drawing with an extra dimension for the perpendicular direction. <S> Neither abbreviation has anything to do with spacing between centers. <S> To get technical, "basic" really means that we aren't going to specify the tolerance of the feature through the dimension, nor through an inherited tolerance coming from the title block. <S> Instead, there would be a feature control frame defining the region that the part's surface could lie within. <S> For example, something like this pointing at the side of the package: would mean, "The surface of the package must lie within a volume 0.2 mm wide centered on the ideal location given by the basic dimensions." <S> This kind of detail isn't shown on the data sheet, but it would be on the company's internal and proprietary mechanical drawings of the package and tooling for manufacturing it. <S> The referenced JEDEC standard likely defines details of the package shape somewhere between that of the data sheet and a full mechanical drawing. <S> For most purposes the detail on the data sheet is sufficient. <A> I think one of the actual questions being asked by the poster, is what are the units of terms like "7.00 BSC". <S> Since the datasheet linked has a mechanical drawing that specifies that all dimensions are given in millimeters, the units are millimeters. <S> The "BSC" part doesn't change the units. <S> Thus <S> 7.00 BSC is equivalent to 7mm, with the spacing measured between "centers" (not really the centers of anything in the specific example of one side being 7mm between "centers"). <A> I've always interpreted it as meaning a 'basic dimension'... <S> A basic dimension is an ideal, exact dimension, and as such has no tolerance. <S> Important features of the device are often shown like this. <S> Pitch is pretty commonly basic. <S> Of course the real life device won't be exact. <S> What is ideal is what is relevant here though... <S> Apparently Microchip agrees with me:
The abbreviation BSC is misused in the case of the package outline, and overall dimensions, as they are specified by physical edges which can be measured.
Different decoupling capacitors in parallel Page 29 of this DAC datasheet gives a typical operating circuit. I notice the power supplies have two decoupling capacitors in parallel: 100nF and 10μF. What caught my eye is that there is a different symbol for each. (One has a curved edge, the other not.) As I understand, one is a "polarised" capacitor, and the other is not. What is the qualitative difference between the two capacitors? Why are the types mixed in this application? <Q> These are decoupling capacitors . <S> They are there primarily for two reasons: Power supplies take time to respond to a demand for more current from the device. <S> The capacitors act as a local reserve until the power supply responds. <S> Digital logic devices demand current very abruptly (due to the steep logic edges). <S> The inductance of the power supply traces makes it impossible to transfer a step in current from a power supply to the logic chip. <S> To solve the problem, one places "decoupling" capacitors very close to the chip. <S> As the remaining traces are very short, the edge problem is reduced. <S> The reason for the two different types of capacitors is as follows: <S> The device apparently requires a 10µF decoupling capacitor. <S> Capacitors of this size are typically electrolytic capacitors. <S> The problem is: they respond quite slowly compared to the edge time. <S> To solve the problem, one places a (typically) ceramic capacitor in parallel. <S> To simplify the issue: they only exist in fairly small values. <S> Functioning: <S> The ceramic capacitor (100nF) smoothes the edge time of any current requests from the device and the electrolytic capacitor (10µF) supplies the bulk of the current once it kicks in. <A> In this answer different capacitor symbols are discussed. <S> Nevertheless the same symbol is also used for non-polarized capacitors, which is nonsense, because there the orientation doesn't matter, which should be indicated by a symmetrical symbol. <S> In that case an electrolytic is indicated by a plus next to the symbol: <S> Here there's no plus, but <S> the 100 nF uses a different symbol, so it's safe to assume that the ones with the curved lines are electrolytics. <S> Yes, it's complicated. <S> nishu says the polarized (electrolytics) are mainly used for high voltage, but that's not completely true. <S> Mains voltage EMI suppression capacitors are non-polarized, and have to be , because of their AC use. <S> On the other hand, in this schematic a polarized cap is used for 5 V DC, so that isn't high voltage. <S> Electrolytics are mainly used for higher capacities, say starting at a few µF. <S> You can have ceramics with that capacity too, but they're more expensive, and then most often aluminium electrolytics are chosen, despite their worse performance. <S> Conclusion: <S> the 10 µF parts are electrolytics, preferably tantalum. <S> The 100 nF are ceramics, preferably X7R. <A> The next page explains it under layout guidelines: The polarized capacitors are tantalum bead type and the non-polarized capacitors next to them should be low ESR and low ESL ceramic capacitors. <S> My main guess why both are used here is because smaller ceramic capacitors are better for filtering out high-frequency noise, while the tantalum capacitors can store larger amounts of energy. <S> They can also have higher ESR and ESL than the smaller ceramics do, so they won't be able to respond as quickly as ceramics to high current demands. <S> So ceramics respond faster and provide some extra time for the current to start flowing out of the tantalum capacitors.
The asymmetrical one will be an electrolytic, which is polarized, and then the difference between the straight and the curved line allows you to identify the polarization.
General "rule of thumb" for unused IC pins This is somewhat similar to this question about NC pins . In cases where the datasheet doesn't specify what to do with unused IC pins , what is the recommendation to do with these pins? In particular I'm thinking of GPIO pins for the AT32UC3C microcontroller, but also more generally for other IC types (for example multi op-amp IC's). I can think of a few possible combinations: Provide a solder pad/hole so the chip is secured but leave pin floating. Connect the pin to ground (possible through a resistor/capacitor/etc.) Connect the pin to a supply source Something I can't possibly think of <Q> "Provide a solder pad". <S> Of course you will. <S> All the IC's pins should be soldered. <S> Always. <S> It may change level all the time, which may have undesired effects to the internally connected circuitry. <S> You always want to have predictive behavior. <S> If the input has an internal pull-up resistor this is a good solution, though, as long as you don't forget to enable it. <S> "Connect the pin to ground". <S> That's a good solution, provided that you can guarantee that the pin will never become an output. <S> Output high and you short-circuit the power supply. <S> A resistor would prevent that, but that's an extra cost. <S> Don't use a capacitor; it would leave the pin floating, and the microcontroller doesn't like the capacitive load in case it would become output. <S> Same as above: if the pin should become output low you'll have a short-circuit. <S> That's the best solution. <S> Don't use the possible alternate functions, like ADC or serial. <S> A high level is preferred in case you forgot to switch off the internal pull-up resistors, which otherwise would cause a (small) leakage current. <S> For opamps the output can be left open, and the inputs to a fixed voltage, but not both to the same! <S> I recently saw in a Linear Technology application note how they connected the non-inverting input to V+, the inverting input to V-. <S> Szymon rightly points out that this can't be used if the inputs have clamping diodes. <S> The best thing to do with a surplus op-amp <S> it is to use it. <S> There are lots of places in an analog circuit where a buffer amplifier may improve performance - and a unity gain buffer uses no extra components. <S> (from this article , linked to by Szymon) <A> I'll start by saying there is no right answer to this question. <S> Usually the microcontroller manufacturer will have recommendations for each pin category. <S> This is certainly the case for the MSP430 chips I've worked with where power consumption is a major consideration. <S> The problem you will encounter if you don't terminate GPIO is that the default state of the pins is often "input". <S> Depending on the input circuit, this could cause your pins to float in at a non-digital value, and your IC's transistors will behave accordingly, drawing more static power than the would otherwise. <S> If the datasheet doesn't say anything it is likely that there is an app note from the manufacturer that discusses it. <S> The closest thing I could find was one related to the XMega family ( <S> AVR1010 ) that states: <S> To minimize power consumption, enable pull-up or -down on all unused pins, and disable <S> the digital input buffer on pins that are connected to analog sources. <S> If you search the interwebs on this topic, you'll find a lot of different opinions. <A> For microcontrollers, generally the best idea is to make the pin an output and drive it either high or low (or pullup/pulldown can be used) <S> What you don't want is the floating halfway scenario where both the input transistors are half on and passing current. <S> For opamps, the general way is to connect the output to the inverting input, and then connect the non-inverting input to the supply midpoint (or somewhere between rails) <S> Basically you don't want the output to saturate, it should be somewhere within the output swing of the opamp. <S> Be careful with non-unity gain stable opamps though.
"Connect the pin to a supply source". Leaving it floating is NOT a good idea. "Leave unconnected, but make the pin output". In "specialised" cases the datasheet is likely to have a suggestion for what to do with any unused opamps. The context of your chip matters a lot.
Limiting the short circuit current of a power supply I'm using a repurposed ATX power supply for my hobby projects since it's got 3.3/±5/±12 outputs, all of which are really convenient. But one thing I didn't really think about until I slipped my probes across the pins of an opamp, since I've always dealt with commercial/proper lab power supplies in my school labs, was that an ATX power supply will gladly deliver lots of current if that 12V line (or any other) is shorted to ground. The poor LM318 didn't stand a chance. My meter and supply survived, but in the interest of not killing anything in the future, myself included, I was wondering what the best option was for short/overcurrent protection? I was thinking of sticking some high wattage resistors at the output of the supply before connecting them to the rails of my project breadboard (I use a separate breadboard with terminal blocks for power, which the ATX supply connects to). The problem is if I'm drawing a lot of current (LEDs etc) this will sag the voltage on the line. And, for example, if I use a 1W 200ohm resistor on the 12V line, it limits my current to only 60mA - if I want more, I need some really beefy wattage resistors. I can probably work around the voltage sagging by using a voltage regulator (eg at 10V), but this all doesn't seem like the best way to go about doing things. I'd appreciate some input from someone more experienced than I am. <Q> Use a fuse. <A> The 'big spark' is hard to limit if the output of the ATX supply has lots of capacitance. <S> There isn't a protection circuit fast enough to save you from that sort of instantaneous energy. <S> You may want to consider using the 12V rail to feed some buck converters, generating your own 5V and 3.3V rails. <S> The bucks will have their own easily adjustable shutdown thresholds and provide you some measure of 'protection' from the stiffness of the 12V rail. <S> For the 12, you may want to consider a LDO regulator instead of power resistors. <A> Use a low voltage MOV across the supply rails to protect the LM318. <S> The resettable fuse (or PTC) goes between the supply and the MOV, to protect everything from the excessive current when the MOV turns on. <S> The MOVs are good parts but the specifications are a little hard to understand. <S> They vary with temperature and have a tolerance. <S> Use a higher voltage in order to prevent the MOV from turning on at too low a voltage. <A> I suggest checking this guide (in Italian) that allows you to not only limit current to arbitrary values, but adjust also the voltage, all using the original chip provided in the ATX PSU. <S> A 350W PSU becomes a 0.15-20V 0.1-16A lab supply (of course, you don't get 20V and 16A at the same time...). <S> You will lose all positive power outputs except for one (the chip can regulate only one at time), but that one will be very accurate. <S> Given the cost of used PSUs and the cost of this little mod, simply mod three of them. <S> The mod benefits from a small daughter board (easy to build) to avoid too much mess inside the PSU. <S> http://www.chirio.com/switching_power_supply_atx.htm
You can buy e.g. PTC resettable fuses that will limit the high current and will automatically reset after some time. It will drop less power plus give you some measure of overload protection that resistors would not.
Shift Register output to Relays sorry for the length. This is a continuation of my recent question . I have an optocoupled 8-relay board that I’m trying to connect to my microcontroller. I have placed a 74HC595 shift register inline to consolidate the input ports. In doing so however the board has been exhibiting some strange behavior. If I don’t plug anything in, or just a small load into the relays all works fine using the shift register. They turn on and off without a problem. As soon as I plug a 1+ amp pump onto the relay you can hear the relay trip on then it quickly trips off. IN1 (diagram above) LED lights up for a split second as well. Sometimes though (1 in 5) the relay and pump actually stay on. Now this is where it gets weird; if I remove the shift register and directly connect the pins to the microcontroller it works fine at turning on the pump. So interference on the shift register was brought up but as far as I understand the relay board design, the shift register is only powering the LED in the optocoupler (U1) and is in no way connected to any other part of the circuit (shift register and controller were powered by battery). The board is also Active Low, so as I understand it the shift register is sinking current from the optocoupler. Could it be the optocoupler is requiring more current to switch the higher load than the shift register can sink? I may be way off as this has me baffled. Also, is there are way interference could make its way in even though it's isolated and on a battery? All tests where done with a Battery powering the microcontroller \ shift register, and a very simple sketch that targeted only a single shift register pin by byte. The 8-relay ( Info ):It’s currently configured with a separate 5V wall wart powering the Relays. The microcontroller provides 5V to power the optocoupler only. I appreciate any help you can give me. Update Aug 13: Still no go but I did a bunch more testing:I moved the shift register and Arduino 3 feet away from the relays and mains power. Both were powered by a 9V battery. The only thing connected to the relay board was a 5V rail from the Arduino and the 8 wires from the shift register to the relay board inputs. Same results, 100W light works great, pump causes it to trip out.If I remove the shift register and plug the output pins in directly to the Arduino the pump turns on without problems. Just to verify nothing was going on with the dedicated 5V wall wart that powers the relays, I unplugged it and replaced the jumper on JD-VCC and VCC and attached the Arduino GND. Same result, 100W light works, pump causes it to trip. It has to be shift register. I also placed a 47uf decoupling capacitor on the power rails, as well the shift register has a 104 right next to it. Tonight I will try putting a Multimeter in line with one of the output pins, I want to see how much current the optocoupler is pulling. I just got an oscilloscope too, so I’m still learning how to use it but maybe I can figure out how to measure any interference on the 5V rail or in the output lines. Update August 14: I managed to capture it failing with my oscilloscope. Rigol wfm files below. Channel one is attached to an output pin on the shift register. Channel two is attached to the 5V rail. WFM Files I just did some testing and I managed to reproduce a 500mv-1V spike (sometimes it was a drop) on both the 5V rail and one of the output pins from the shift register. That's the problem right? Would that type of spike make the shift register trip out and act wierd? August 15: Below is a capture when I manually switch on\off the pump. Not using the shift register to do it. The Blue line is the Shift Register output pin 1, the Yellow line is 5V. I have also taken some pictures of the setup: Full Size Full Size I also have a forum post that I have been updating results to as well: Arduino Forum August 16: I was able to capture a way better picture today. I didn't realize the oscilloscope only captures so many points when running at 1 second intervals (totally makes sense now).Here is the evil emi over Pin 1 from the shift register: I'm going to pickup all the recommneded components this weekend and try adding them on one by one. August 18: Problem confirmed. The pump was causing so much noise that nothing I could do on the low power lines could contain the ripples. Those ripples where making there way into the shift register clock\latch\data pins and causing corruption \ resets. So I went to the far extreme and tore out a high power APC Rack surge protector circuit and put it in front of the pump. Now there is barely a blip on any of the lines anywhere. Hurray! Now the whole point was to keep this contained in that enclosure footprint so I'm going to see if I can make a more compact version, as I think this board is overkill and I would need one for each of the 5 pumps I have. I will start with just a single MOV and see how much it cuts down the noise. Issue Solved:I decided to buy a Line Filter to see if I could filter out the pump noise right at the source. I bought this: Delta High Performance Filter . Now I don't even get so much as a blip on the oscilloscope. Thanks for all the help everyone, I wish I could mark you all as solvers but I can't so I just gave it to whomever offered the most tips. <Q> How is the shift-register wired? <S> Do you have <S> a 0.1uF bypass capacitor across the power leads close to the IC package? <S> The fact that it results in the shift-register register-state getting reset makes me think it's a power issue. <S> Also, how are you wiring the shift-register. <S> With a 74HC595, you need to: Tie the two register clocks together (Pins 11 and 12) <S> Pull the master-reset pin high (tie <S> pin 10 to VCC) <S> Pull the output-enable line low <S> (tie pin 13 to ground) <S> Lastly, you need a 0.1 uF bypass capacitor between pin 16 (Vcc) and pin 8 (Gnd). <A> Try moving the Arduino as far away from the relay module and pump as is practical. <S> Then use some twisted pair or CAT5 cable to send the on/off signal from the Arduino. <S> I can't open the wfm file (I guess it's some hex values but this will be hard to visualize if opened anyway), but from your description it sounds like you have captured the event. <S> This spike (which may be faster/larger than shown on your scope depending on BW and settings) will likely be the problem. <S> How such a spike is getting onto your rails remains to be figured out - I think at this point a photo or two of your setup would probably help a lot, and if possible a detailed diagram of all your wiring (pump, relay module, all power supplies, arduino, etc) Is the relay adaptor and arduino ground tied together? <S> EDIT - looking at the picture, the layout doesn't look great <S> , it's a bit cramped. <S> It seems there are mains cables going underneath the relay module - these may be coupling to the isolated Arduino side. <S> Try to move these away if you can. <S> Also you should really be using the CAT5 or similar for the shift register signal - run it together with the 5V to lessen loop area. <S> At this point I would also try adding a couple of reverse biased diodes to 5V and ground from the shift register output, to clamp any spike that does appear (5V zener optional, but good idea <S> if you have one) <S> You could also place a smallish capacitor from the line to ground (e.g 100nF) as it's only a switch signal. <S> To make completely sure there is no connection between anything there shouldn't be, it's probably worth testing for continuity between Arduino ground and Relay module ground, and Arduino 5V and Relay 5V. <A> This certainly sounds like an Electromagnetic Interference issue. <S> The Arduino power supply Ground should be connected to the "green ground" of your local power system. <S> A blank plug with a single wire to the 'green ground' could be used. <S> Try to separate the pump wiring physically from the microcomputer stuff. <S> You also might add a "surge suppressor" MOV (Metal Oxide Varistor) across the pump to absorb the spikes that can happen when the load is switched. <S> What voltage and current levels is the pump? <S> Your wiring looks right.
Also make sure any (pump) power related cables are not nearby the Arduino. It sounds to me like a noise issue, particularly since it's only triggered when you have a load on the relays.
What is the typical max voltage out of a PC speaker Jack? I'm trying to use CD4051BCN chip to channel some speaker outputs from a computer. these chips handle analog voltages from +/-5V. What is the audio line max/min Voltage coming out of the desktop PC? I just need the audio line this is without any amplification. Would it be better to use a series of relays with higher voltage/current ratings? <Q> I just measured the voltage from my smartphone headphone jack, which should be similar to what you'd get from a PC headphone jack. <S> I got +/- <S> 1.5v (3.0 volts peak to peak). <S> This was not under controlled conditions with a known audio source. <S> I would guess that the output could peak at higher than +/- <S> 3v <S> (6v peak to peak). <A> In some cases [ not extreme cases] due to the ground looping it may get up to more than ~60V. <S> So if you designing a system, where poor groundingand many places are grounded, and with different power sources, I HIGHLYrecommend you to use a 1:1 transformer too. <S> This is called an isolation transformer. <S> If your not using that, you better ready for >~60V. <A> The average power output should be 3 V RMS, so that speaker components may not blow up. <A> Typically about half a volt for consumer audio, maybe up to 2 volts depending on your sound card. <S> See Line Level
This voltage may vary due to application as well as the use of sound cards or on board power.
I2C optocoupler separation - which IC? I am designing a circuit which will have some external I2C sensors connected to it and thus I want to protect it from noise - via an optocoupler. I have to say that I am a complete novice to this all and after much searching, I came up with following source: Opto-electrical isolation of the I2C-Bus The thing is, I would ideally like to see an IC, which would have two sides and I would plug in power + signal lines of the both sides into either side and it would do it all, without any extra complexity. I have looked at RS components but to be honest, it just makes my head spin and I cannot really see which one to choose. Which IC can I use here? <Q> You want the ADUM1250 , which is not optical but is an isolator. <A> Are you sure you need isolation? <S> The I2C bus carries digital signals, and is relatively low impedance; you can go as low as 2 kΩ. <S> So noise may not be a too big problem there. <S> If it's the power supply you worry about then isolating the bus doesn't make much sense. <S> Make sure the sensors' power supplies are properly decoupled. <S> For a proper PSRR (Power Supply Rejection Ratio) you can have a separate LDO close to each sensor. <S> If you think you do need isolation <S> this document may help to get you started. <S> edit <S> If you want to protect your RPi against spikes there may be a more simple solution: use TVS (Transient Voltage Suppression) diodes, possibly in combination with a small series resistor. <S> That resistor's value shouldn't be too high for two reasons: it will form a divider with the pull-ups and so lift up your low level, and also it will deteriorate the falling edges of your signal. <S> 100 &Omega might be a good value. <S> For the TVS diodes you could use these , for instance. <S> Further reading Opto-electrical isolation of the I2C-bus , NXP application note <A> (This part is often used with optos, but works just fine as a buffer by itself.) <S> Optocouplers can pose challenges at high frequencies, especially if you intend to operate at 100kHz or higher. <S> CTR, propagation delays and current consumption are all key areas that need to be considered when optically isolating the bus. <S> Digital isolators from ADi and Silicon Labs are robust and don't require lots of external parts, but can be expensive compared to simpler solutions (especially if you don't need galvanic isolation.) <A> There are some parts specifically designed for I2C isolation http://www.mouser.com/Semiconductors/Interface-ICs/Digital-Isolators/_/N-62fhb?Keyword=i2c <S> E.g. ISO154x <S> parts have power and ground on both sides and bidirectional (SCL and SDA or bidirectional SDA and unidirectional SCL) as you want.
If you don't need galvanic isolation, a bidirectional buffer like the NXP P82B96 may be all that you need.
What is the difference between many core and multi core? These terms seem to be same but in a guest lecture i found that they are not but i have not been able to find the difference even after googling around for a while . <Q> Multicore typically refers to devices with 2-8 or so cores in them. <S> As far as I know, there's no hard definition of when you go from a multicore to manycore device. <S> My guess would be that the words were defined by someone's marketing department... <S> One difference between them is that manycore systems will only run efficiently with software that is designed with multiple cores in mind - single threaded software will be extra slow on such equipment. <A> Multi-core: <S> A system with 2-8 cores and particularly does not implement parallel architecture (either at HW or SW) <S> Many-core: <S> A system with hundreds or thousands of cores and implements parallel architecture (HW and SW). <S> A cluster may be made of Multi-core and Many-core systems. <A> Multicore: <S> Main the execution speed of a sequential program. <S> Many-core <S> : Maintain Execution throughput of a parallel application
Manycore typically refers to devices with dozens or hundreds of cores.
Feasibility of PCB edge plating? How feasible is it to edge plate a PCB or at least a portion of one? I've seen it done but as I understand the outer edge is only cut after plating at most fab houses. Is this something that's commonly possible? I'm currently working on a board that would benefit from this as it slides into a metallic case and needs to be connected to it. <Q> If you mean solid edge plating (rather than castellations) then it's certainly possible, but you will have to ask your PCB house if they can do it. <S> As far as I am aware it's not too hard to do, it's just not such a common requirement (good for EMC behaviour ). <S> One of the few prototyping companies that offers this option regularly is PCBWay . <S> image source: http://www.eurocircuits.com/blog/Copper-and-the-board-edge/ <A> It's used on solderable modules like these Telit GSM modules. <S> A detailed view of castellations: Some prototype PCB shops will do it for you. <S> If you're in Europe, try Euro Circuits or Hi-Tech Corp <S> . <S> In America try Saturn Electronics . <S> But talk to them first about pricing, and how you define them in your Gerber data. <A> The board on the radio product that I work on has its edges plated so that it makes contact with the metallised housing and screens. <S> The most important thing to ensure is that your internal power planes do not come to the edge of the board and short to the edge plating. <S> I believe that these edges can then be plated at the same time as any plated through holes. <A> Edge plating is no big deal its simply a matter of routing the slots at the same time as drilling the via holes prior to electroless copper plating. <S> The image is then formed with photo resist and the electroless copper is re enforced by electroplating copper then either tin lead or gold as an etch resist. <S> Obviously make sure any inner layers are not shorted out by leaving a gap before the edge plating. <S> In Europe try Telydyne Labtech in the UK, or Optiprint in Switzerland.
During the manufacture the edges to be plated are cut by milling slots in the board material. It's quite feasible, and also known as Castellations (because they look like the turrets of a castle).
Any good solutions for dealing with resistors for color-deficient tinkerers? Possible Duplicate: Resistor suggestions for colorblind person My color deficiency is bad enough that a year of fiddling with resistors in high school was enough to frustrate me right out of considering EE as a career. I'm spending a fair chunk of time on the arduino now, but it is still a frustration: identifying resistors. Most of the seasoned EEs I know could scan through a pile of resistors and spot the one that they're after, looking for the pattern of colors that they knew would be on the parts. For me, this is quite simply impossible. If you think it's no big deal, try finding your resistors in a pile with only the light of a deep blue LED to work from. So, before I go out and buy 500 of every resistor and just dispose of them every time I pull them off a breadboard, does anyone have any suggestions? I'd love to find a supplier of axial resistors who actually prints resistance values instead of color bands. Failing in that, I'd even resort to stickers. I'm not about to pull out my phone to try to ID resistors. That would take more time than futzing with the multimeter, and I want a better solution than that. Thanks. <Q> Get a cheap DMM, and a small breadboard. <S> Wire the DMM between a couple columns, even parallel a few adjacent columns together <S> so you don't have to be accurate when placing it. <S> You should really measure every resistor you use anyway. <S> Mislabeling and defective parts do happen in large batches. <A> There are axial leaded resistors with the values printed on them. <S> Until surfacemount parts became standard, we used these exclusively in mil-spec electronics. <S> One manufacturer is Vishay/Dale. <A> You could switch to SMT. <S> SMT resistors have their resistance printed in digits on them, like "473" being 47 kΩ. <S> As markrages points out the smaller ones, 0402 and smaller, downto 01005, don't have any marking, but since you're currently using PTH the size of an 0603 or 0805 <S> probably won't be a problem. <A> Good news! <S> Color-coded resistors are obsolete. <S> All my recent designs have used 0402 <S> SMT resistors that are completely unmarked and anonymous. <S> So don't fear becoming an EE: you are on a level playing field with everyone else. <A> Tinted contact lenses. <S> Differently colored lenses for each eye, or a colored lens in just one eye. <S> Tinted regular reading glasses ought to work too, I suppose. <S> Idea <S> no has tried yet, AFIK: <S> Not sure which colors would work best, so long as your two (or more?) <S> eyes receive different impressions of the scene where there are colors. <S> BTW, my paternal grandfather was color blind, and was an artist who painted pictures of big ships in the great lakes. <S> He had to get correct colors on flags, logos on the ships, etc. <S> Grandma may have helped review the finished works, but mostly he relied on clearly labeled tubes of paint and written sources describing the flags, etc. <S> Online info, from quick superficial search (quality not guaranteed): http://www.colblindor.com/2008/03/29/improving-color-vision-with-lenses-for-the-colorblind/ http://www.scripps.org/news_items/4271-many-shades-of-color-blindness <S> http://www.colour-blindness.com/solutions/cure/
Then, when in doubt, just stick the resistor in your breadboard. wear polarizer glasses, such as for watching a 3D movie, and colored lamps with polarizers illuminating the work area and parts containers.
Using SPST switch as digital input? I am new to "electrical engineering" and I am working on a little arduino project. I want to have a SPST switch be used as a digital input on the board. I have one of the switch leads connected to posative and the other connected to the digital input. The problem with this is that when the switch it off I can't be sure the input will be grounded. How can I make sure the input is grounded when the switch is off? Would it work if I connected the digital input to a resistor that is connected to ground so when the switch is off it will be grounded, but when the switch is on it wont short out -- would that work? <Q> Yes it would work as you described. <S> That is called a pull-down resistor because it assures that when the contact is open the digital input is at the logic state 0 (low). <S> Usually you can use a 10 KΩ resistor for this purpose. <A> The most conventional solution would be to connect one side of the switch to ground. <S> Connect the other to the digital input, and also to a resistor between 1 and 10 K ohms going to the positive supply. <S> Going the other way, with a pull down resistor as Bruno describes, is possible but less preferred. <S> Many inputs already have a degree of implicit pull-up and will read a '1' if unconnected, though not quite reliably. <S> Many microcontrollers also have internal pullup and/or pull down resistors on GPIO pins which can be enabled by writing to a configuration register. <S> If you are driving an input of such a microcontroller you might not need an external pull up/down resistor at all, though not every microcontroller features these. <A> That will work, and will give you positive logic: a high level (logic "1") when the switch is closed. <S> But like Chris says the inverted thing is more common <S> : switch connected to ground, and a pull-up (instead of pull-down) resistor to the power supply. <S> Your logic will be inverted: a logic "1" will correspond with an open switch. <S> A good reason for the pull-up version is that most microcontrollers have them integrated, and you can enable/disable them depending on your needs. <S> Some microcontrollers also have configurable pull-downs, but these are less common. <S> If you want an external pull-up 10 kΩ may be a good value. <S> A microcontroller's input can have a leakage current of up to 1 µA, and then 10 kΩ will drop <S> a negligible 10 mV. Lower values are certainly possible, but keep in mind that they will have a larger current to ground when the switch is closed. <S> A 1 kΩ resistor will draw 5 mA at 5 V supply, which is a waste of power really. <S> For the 10 kΩ that's only 500 µA. <S> For very low-power applications you may increase the value to 100 kΩ, but remember the leakage current; 1 µA will give a 100 mV drop!
But if your switch is already connected to the positive rail, then a pull down is an okay solution, though many prefer to use a small resistor when connecting logic inputs to the positive rail.
Blowing a Fuse to Permanently Disable Functionality Certain electrical designs require permanently disabling hardware functionality on the fly. Sending an overcurrent to a weak fuse may be a method for accomplishing this, breaking the circuit in a particular region of a device. My questions are: What are the potential risks caused by this process, assuming a fairly weak fuse? Are there alternatives to this method for disabling functionality permanently ? <Q> We don't know much about your application, but assuming that it has some level of intelligence, writing flag bits to EEPROM is a proven way to inhibit functionality based on certain criteria. <S> As long as you're not working on a game console or other application where the effort to reverse engineer the protection scheme has a financial payoff, it may be "permanent enough". <A> Assuming that by "permanent" you mean "without physical repair", what you describe is reminiscent of a crowbar circuit : short the bus, blow the fuse. <S> I'm not aware of any safer way of doing what I understand you to want. <S> An SCR is probably a good choice. <S> To avoid that, check the \$I^{2}T\$ rating of the fuse and of the device. <S> If the \$I^{2}T\$ rating of the device is higher, it should not detonate before the fuse fails. <S> You may need to use high-speed fuses, which may be difficult to find, depending on the voltages and currents involved. <S> Another risk is accidentally triggering the crowbar early. <S> How you deal with that depends on the context, and how irritating a false trigger is compared to a missed trigger. <A> Assuming that the device uses EEPROM/Flash, One way to disable to device is to program a key in EEPROM initially and checking for the key every time. <S> Once the security condition is triggered, erase the EEPROM and/or the program flash.
Risks include detonation of the device being used as the crowbar, if it absorbs too much energy from the short before the fuse opens.
Micro-Controller Operating System with GUI I'm looking for embedded OS for w micro-controller, it's not clear until now for me what'll be the controller type, but my first priority is to found an OS with GUI can be written in C# or any .NET family or JAVA. I found some good operating system like: emWIN , easyGUI , PEGbut all of them could be customized in C++, Any help please about same OSs but not in C++. and due to I'm new in embedded systems developing and until now not clear with the main structure, is it possible to let developers create applications and install it on my embedded system or the main structure only allow to customize the software and burn it to micro-controller, or in other words.. in advanced mood. Can I create SDKs for my embedded system or the only way to create a software on an embedded system is to customize my OS with my applications and burn it.. Thanks and sorry if am not clear with that field but am trying to collect a lot about it. <Q> Basically, this question is not capable of being answered. <S> You don't need to consider what OS you're going to use at first. <S> First, you need to consider what kind of micro-controller you're going to be using. <S> Various ARM CPUs will be perfectly capable of running a "OS" in .NetHowever, AVR and PIC and such will not be able to use even the most micro of .Net frameworks. <S> Second, you need to consider why you're needing to use .Net. <S> The .Net micro framework will have a lot more overhead than a direct native program. <S> If using .Net is only a priority because you don't want to learn C++, you probably just need to man up and learn C or C++. <S> And what kind of OS are you looking for? <S> An RTOS, or a more general purpose OS, such as Linux? <S> You're going to have a hard time finding an OS of much complexity implemented in C#, because of the reason I said above. <A> It has a Free IDE supported by Microsoft you can download here . <S> Netduino is an open source electronics platform using the .NET <S> Micro Framework. <S> Featuring a 32-bit microcontroller and a rich development environment. <S> Suitable for engineers and hobbyists alike <S> Atmel 32-bit microcontroller <S> Speed: 48MHz, ARM7 Code Storage: 128 KB RAM: 60 KB <S> It is cheap but some accessories can be expensive (But you can make your own cheaper) <A> How about a $35 computer? <S> The Raspberry Pi is the latest viral trend for cheap but extremely powerful "Micro Controller" <S> The supported OS is a special version of Debian for ARM6 <S> but it can run almost anything the normal Debian does and also has Input/Output pins. <S> Most of software is also Free <S> The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. <S> It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. <S> It also plays high-definition video. <S> We want to see it being used by kids all over the world to learn programming. <S> CPU, 700 MHz ARM (ARM11) <S> GPU, VideoCore IV, OpenGL ES 2.0, 1080p30 <S> h.264/MPEG-4 AVC RAM 256mb (depends on model too) <S> Storage, Unlimited (Whatever you connect to it) <S> (Priamry SD-Card, USB and Network) <S> Ask the dedicated Raspberry Pi Stack Exchange Community for more questions... <A> ARIA ARM9 SoM <S> A very similar product to the Raspberry Pi but runs on an ARM architecture that is fully supported by many Linux distributions. <S> The nice thing about this is that you make the rest of the circuit- <S> SO you can embedd a 2GB flash and run your own build of linux with API's on it while offering LAN, SPI, GPIO,I2C etc. <S> Aria G25 is a small SoM (System-on-Module) <S> thought of for hardware designers who want to reduce the development time of OEM Linux embedded devices. <S> Aria G25 can be used either as a SMD module on a PCB or as stand-alone module to wire directly to other modules. <S> ARM9 @ <S> 400Mhz <S> 128 or 255 ram USB and LAN 0.3 watt power consumption <S> 24 Euro's Fully expendable for you design! <A> If your target is an embedded Linux ARM board, then you can use CodeTyphon to cross compile to it, or fpGUI to have an on board compiler. <S> Both use FPC compiler, so not your priority.
If you like C# you can use Netduino
Suggestions for a Point-to-Point reliable Wireless Communication Module I've to implement a wireless communication system. Details are as follows. Range is about 600m Point-to-point communication No LoS is available. (but not highly obstructed) Won't need much higher data rates. Should be reliable. No constraints with supply power, size etc... Intended to handle with PICs of Arduinos. Price is not a major issue (but prefer a reasonable price..) Please point me to a proper transceiver module that can be used for the purpose. Don't have prior experience with wireless modules (so, you can assume fine details and then let me know of them), a straight answer is much appreciated.. Thanks! <Q> You ask about the Xbee-Pro 900 . <S> As the name suggests this works in the 900 MHz. <S> The datasheet mentions a LoS range of 3 km, but since you don't have LoS that may be considerably less. <S> The module has an RF connector, though, so you can connect an external high-gain antenna, which, again according to the datasheet, would increase the range to 10 km <S> LoS. Should be enough for your application. <S> Your link is to an eBay reference. <S> I wouldn't buy from sources like that. <S> For Sri Lanka Digi has a distributor in India , which will probably give you better support. <S> (Many product you buy on eBay you can't get any support for at all.) <S> Further reading <S> Xbee-Pro 900 Manual <A> It has a longer range version called RFM12BP, but I am not certain about it's cost. <S> Jeelab's JeeNode, which can be programmed using Arduino environment (as an option), embeds RFM12B for ISM band short-range communication. <S> The data-rates are not high, and infact lower than Xbees (or other Zigbee implementations). <S> Do note that ISM band has restrictions around max. <S> transmit power, and max. <S> continuous transmit duration in many countries, and same set of ISM bands are not really globally accepted. <S> For instance, while many people advertise 434MHz as a universal ISM band, there are exceptions. <A> You didn't mention price range, but if it is not an issue, consider Freewave. <S> They have long range radios (km), and have a simple rs232 (with TTL level option) interface. <S> Take a look at the FGR-115 . <S> For a lower price alternative, the xbee mentioned in another answer, or Digi's XStream .
While Xbee might be the easier option, but an alternative, with a much lower cost, but requiring some more "work" on application layer to define the communication protocol could be the RFM12B, which sells for about $12 a pair.
Why do some of my signals 'shiver' (have jitter)? I have a 2 MHz SPI bus but one thing I've noticed that is that some of my signals often 'shiver'. Yes my trigger is setup properly so I don't think the issue lies there. You can see what I mean here: (this is with persistence mode on). This is the clock of my SPI bus. The SPI does work fine. I've transferred hundreds of megabytes on multiple boards and haven't seen an issue so far. But I'm still interested in knowing what could be the issue here. Also, should I bother fixing it even it works? The measurements were taken right at the source with a VERY small ground clip. This is a simplified schematic of my circuit. Of course the board has more SPI devices but for the purposes of this question this is accurate because the board has nothing soldered onto it yet except the uC and the SD Card. The master (AVR Mega 128) is running off it's internal RC oscillator - I don't know if this would be relevant but since the signals shift in time it's possible that the RC oscillator's jitter is also ending up in the SPI bus. Just thought I'd mention it. It also occured to me that during these measurements I ran the controller in an infinite loop. Here's the code: while(1){ setFirstBitOnDriver(driver); // this sends a 8-bit command on the SPI bus. GLCD_SetCursorAddress(40); // Change cursor position on the display. GLCD_WriteText("LED: "); for(wire=0;wire<72;wire++) { itoa(wire+1,str,10); GLCD_WriteText(str); GLCD_SetCursorAddress(44); _delay_ms(10); shiftVectorOnDriver(driver); // another command on SPI. 8-bit wide. }} The jitter/shiver could happen when the internal runs for 72 times and then exits. Since it takes an additional time to execute the first three lines it could be that every 73rd waveform arrives at a slightly different time due to the additional processing time. If I had to bet, I'm guessing this is the cause of my issue (if I could, I'd confirm it this instant but my boards at work and the next week is off!) But I'd still like opinions/answers of SE on this matter. But considering the uC is running at 8 Mhz I don't jitter due to software would be because in nanoseconds but rather microseconds. But in the 2nd figure a flat line is visible. This occures for a very brief second where the entire waveforms shifts in time and is invisible on the screen. I'm guessing that this is due to the loop and the jitter in the first picture is due to the RC oscillator. <Q> This looks like signal jitter to me. <S> The clock period is minutely varying, enough that the persistence of the scope is making the edge look 'smeared'. <S> I don't know if your Rigol scope has the capability of calculating statistics when it measures. <S> If it does, you can adjust your trigger point so that your trigger edge appears on the left edge of the screen, adjust the timebase to show a complete period and measure the frequency variation over time to get a feel for the variation. <S> (Jitter can look worse than it is when the trigger edge is offscreen.) <S> If you want to narrow down the sources of jitter, I'd start with the RC oscillator. <S> See if you have an option to use a different clock method (like a crystal), implement it and remeasure the jitter. <A> What your scope shows is a classic example of jitter , which means an error in the timing of an event (rising or falling edge), independent of whether there's any voltage noise on the signal. <S> But what can cause the jitter in your system? <S> As you speculate, if the uC main clock is jittery that jitter will most likely transfer directly to the clock output from the SPI peripheral. <S> Inadequate bypassing <S> (you should have additional bulk bypassing on your board in addition to the two 100 nF capacitors you've drawn) <S> could lead to jitter in the uC clock circuit. <S> The jitter could be inherent in the performance of the uC's SPI peripheral. <S> It has to generate the SPI clock with reference to the system clock. <S> If it uses a simple divider (4-to-1 in the case of 8 MHz system clock and 2 MHz SPI clock) you wouldn't expect to see much added jitter at all (though system clock jitter would pass right through). <S> But if it uses a more complex scheme, like a PLL, that circuit could be varying the SPI clock pulse widths to keep in sync with the system clock, and you would see that as jitter. <S> A PLL circuit could also be particularly sensitive to power supply noise. <S> If the jitter amplitude is limited to a small fraction of the clock period, <S> as it seems to be here, there's no reason this jitter will cause errors on the SPI bus (in agreement with your observation that the SPI bus appears to work as expected). <A> Scope images can be misleading, and you have to look at all the parameters to interpret the data correctly. <S> The first image shows a 10 ns jitter, and that would not be so nice if the trigger was just at the left off screen. <S> But bottom right it says trigger + 1.78 µs, so that 10 ns is actually only 0.5 % of the time interval. <S> Expect the jitter to be reduced by at least one order of magnitude with a crystal oscillator. <S> You say you haven't met any problems yet in the SPI data transfer. <S> That's thanks to the relativity of the 0.5 %. <S> If you would MOSI 1 µs before the CLK pulse the 0.5 % jitter will cause a 5 ns jitter, this is not going to violate setup and hold times. <S> If you need reassurance just set the timebase such that you can see a complete bit time, both the MOSI and CLK channel. <S> You'll notice that the jitter will be hardly visible, and that the successive edges remain well separated. <A> Jitter is a form of noise. <S> If you consider the inter-arrival times between the edges of pulses to be a kind of signal, then if those edges do not jitter whatsoever, it means that your system exhibits a noise-free signal! <S> Square waves are often generated by thresholding on a more continuous wave, with some Schmidt-trigger type circuit that has hysteresis behavior. <S> Crystal or RC oscillators do not "natively" put out square waves. <S> So, if that input wave has some voltage noise on it, that noise will translate to slight shifts in the triggering, as the voltage reaches sometimes reaches either threshold sooner and sometimes later. <S> And thus, noise of one kind (voltage noise) turns into noise of another kind (timing noise).
That level of jitter may well be due to the RC oscillator. Power supply noise introduced by other circuits on your board could also have this effect (but would be reduced by more bypassing).
Efficient low-power buck (step-down) regulator IC for Li-Ion - 3.3V conversion? It's not easy for electronics novice to find good element base, so I hope this suitable question. Requirement: Efficiently power a lean, 3.3V-based MCU design from a Li-Ion battery. "Efficient" means no more than 20uA quiescent current, 10uA is better. Ground current for 1mA output current <50uA. Maximum required output current >= 50mA. Having a SOT package (vs those <2x2mm SON packages) is also a plus. Higher frequency and smaller inductor is also good (especially if doesn't conflict with package requirement ;-) ). Good availability and price matters too. That's definitely subjective, but providing 2-3 names is better than telling that X is the best. Thanks! <Q> You don't want a switcher. <S> Your input-output difference is so low (for most of the discharge curve the voltage <S> is less than 3.8 V) <S> that even at 90 % efficiency <S> it won't do better much than an LDO. <S> Have a look at the Seiko S1167 : <S> Ground <S> current typical 9 µA <S> Available in 100 mV steps from 1.5 V to 5.5 V 1 % output voltage accuracy <S> 150 mA output current <S> 150 mV drop-out at 100 mA Shutdown input <S> SOT23-5 package edit Found an even better one in the S1313 : Ground current 0.9 <S> µA <S> 200 mA output current <S> Seiko doesn't give data for ground current under load, but in my experience you should count on 1 % of load current, so at 1 mA that would be around 10 µA, most likely less than 50 µA. <A> You should start by using parametric search, provided by the various distributors (e.g. http://digikey.com has a fantastic parametric search) and manufacturers. <S> Usually you can search for the parameters you have given in your question. <S> After you have found some parts that meet you requirements, you should consult the datasheet and verify that the part is realy what you want. <A> Consider the battery range to be 4.0V down to 3.4V (ignores initial brief period above 4.0V and allows 0.1 V output headroom). <S> Vin = <S> 3.4 min, 3.7 mean, 4.0 max. <S> For 3.3V out a linear regulator gives efficiencies of 3.3/3.4 = 97%, 3.3/3.7 = 89% and 3.3/4.0 = 83% <S> Actual mean efficiency will depend on cell used and load level etc but say 3.7 Volt in is typical (which it probably is) for 89% efficiency. <S> A very good buck regulator with synchronous switching and careful attention to detail should be able to reach around 95% for much of this range. <S> The difference between the linear and buck supplies is small, but notable. <S> Ground current can be a VERY bad performance measure: <S> Note that using ground current as a figure of merit for a linear regulator can be VERY misleading. <S> eg imagine a linear regulator with zero ground current and Vin = 3.6V and load = <S> 1 <S> mA. <S> The efficiency will be 3.3/3.6 = 91.7% so about 8% of the input energy will be lost. <S> This is equivalent to a regulator with 100% conversion efficiency but a ground current of 8% of the load. <S> ie here 8% x 1 <S> mA = 80 <S> uA. <S> So even if the regulator has 10 uA ground current at 1 mA load this will be swamped by unavoidable conversion losses across most of the Vin range, Finding an IC to meet the above spec will take care. <S> Buck regulators usually give peak conversion efficincies for limited combinations of Vin Vout, load and more. <S> Outside optimum ranges the efficiency will fall off - sometimes badly. <S> I looked at the Digikey parametric selection guide to see if a suitable part could easily be identified. <S> It's not an instant task as eg setting Iout_max to 100 mA may mislead as the most efficient IC may have a switch capable of switching higher current than is needed. <A> Just to show that I'm doing my homework, here's what I found so far: <S> Linear has lots of that magic. <S> Caveat: very expensive, usually more than $2 in vendor prices. <S> Besides being just expensive, it also means availability problems, because few parties want to buy such golden stuff and local distributors don't bother to carry it (being hobbyist, I'm interested in single quantities and DHLing from Digikey and friends is not a good option). <S> Anyway, LTC3525 is even a boost/buck with Iq as low as 7uA (will be likely rather more in buck mode). <S> LTC3620 is buck with Iq=18uA and Imax=15mA <S> which is probably too low, packaged into that 2x2mm DFN. <S> LTC1474 <S> /LTC1475 is 10uA no-load Iq MSOP/SO8 package. <S> Sourceable from eBay. <S> TI's TPS62230 is good at 22uA and even sourceable locally, but complete curse at 1x1.5mm. <S> So it seems that chips I found so far are "too new" (based on packaging), it would be nice to find "previous generation" in SOT23, so hints welcome.
The best buck may be the best choice: The very best available buck converters will be superior to a linear regulator.
What should the voltage of a fully charged lead acid battery be? I don't have a proper lead acid battery charger... But I own a small Yuasa 7Ah battery. I am using a 13volt 1.5A wall wart to charge it. And I have a volt-meter to check the voltage. At what voltage should I take the battery off the charger? <Q> See my stack exchange answer to "Lead Acid Battery Charger Design Factors" which relates, and follow the link there to the Battery University site which will tell you far more than you knew there was to know about lead acid (and other) batteries. <S> From the above answer note the quotes from the above website. <S> Setting the voltage threshold is a compromise, and battery experts refer to this as “dancing on the head of a needle. <S> ”On <S> one hand, the battery wants to be fully charged to get maximum capacity and avoid sulfation on the negative plate; on the other hand, an over-saturated condition causes grid corrosion on the positive plate and induces gassing. <S> To make “dancing on the head of a needle” more difficult, the battery voltage shifts with temperature. <S> Warmer surroundings require slightly lower voltage thresholds and a cold ambient prefers a higher level. <S> 2.30 <S> x <S> 6 = 13.8V <S> 2.45 <S> x <S> 6 = 14.7V <S> 13.8V is the nominal voltage that many automobile systems operate at. <S> 14.7V is higher than you'd usually meet but around 14.4V <S> is common for "topping" mode charging which is used to equalise charge in series connected cells. <S> See the Battery University site for MUCH more information. <S> If you charge to only 12.6V as several people have recommended your battery will not ever be at full capacity and will have a shortened life. <S> See also Safe operating area for different types of battery chemistry? <S> And also Can I charge a 12v sealed lead acid with an old wall-wart (not made for charging)? <S> And also Charging lead-acid batteries? <A> Deep Cycle Batteries charge on 3 stages. <S> Bulk charge, toping and float charge. <S> During the bulk charge the current density Amper/ cm2 or Amper/dm2 it is very important. <S> If the current is smaler than needed for the surface of electrodes the crystalin structure will occur. <S> Sponge material is reversible, but cristaline material <S> it is reversible and this is very important for PbSO4 too. <S> After the battery gets charged 80% then the current decreased and during the floating is less than 1 Amper. <S> The best choice is using a Smart Charger. <S> The way a battery is used and maintained can change the battery life from 6 months to 7 years. <S> Newer let a dischaged battery to rest uncharged, and discharging the battery at 50% before recharging can prolounge the battery life 2 to 3 times. <A> When in the armed forces, and frequently abroad for between 2 weeks and 6 months, which ruined car batteries, I purchased a variable voltage transformer (5 amp). <S> Ensured battery fully charged (negligible charge indicated on ammeter when running engine)Connected trickle charger and voltmeter to battery, plugged charger into output from variable transformer. <S> Then wound transformer voltage down until voltmeter indicated approx. <S> 12.6/12.9 volts( I.E. slightly lower than ideal?). <S> Was away nearly 5 months. <S> Quick check: <S> power still on and voltage not changed; electrolyte level appeared unchanged. <S> Unplugged everything, hand pumped fuel up to the carbs. <S> Engine started , battery seemed not to have aged and ammeter was very quickly showing normal fully charged indication while engine was running. <S> May not be theoretically sound or perfect but proved very effective. <S> Never had a problem using that system: it paid for the transformer, and my car was always ready to go (after I had checked tyre pressures).
Especially in this context The correct setting of the charge voltage is critical and ranges from 2.30 to 2.45V per cell .
Drawing 100mA / common ground for a bus-powered USB hub I am trying to provide an external 5V power supply to a (previously) bus-powered USB hub. My first attempt at this was to just connect the USB host's data pins to the hub's data pins, and the external 5V to the hub's power pins, like so: PSU 5V ----- Hub VCC InPSU GND ----- Hub GND InHost D+ ----- Hub D+Host D- ----- Hub D- However, the hub (and attached devices) were not detected by the host PC. My assumption was that as the Host GND and Hub GND were no longer connected, the levels were off, so I added that connection: PSU 5V ----- Hub VCC InPSU GND ---=- Hub GND InHost GND--/Host D+ ----- Hub D+Host D- ----- Hub D- Still no luck. I then read that a USB host expects a device to draw around 100mA in order for it to be detected, so assuming that the host would output 5V, I added 50R of resistance between it and the host GND so that 100mA would always be drawn: PSU 5V ------ Hub VCC InPSU GND ----=- Hub GND InHost GND -=/ | 50R |Host 5V -/Host D+ ----- Hub D+Host D- ----- Hub D- In this configuration, with the host PC and the PSU turned on, I measure 70 mV across the resistor and zero resistance. When I unplug the USB cable from the host, I measure the 50R properly. Am I missing something here? Why would the USB host not detect the hub, and why would it appear to short its own 5V and GND pins? Note: I have read this question , in which the answers suggest that just connecting the ground lines would be enough, and this one , which confirms my belief that it's OK for the USB hub to just draw 100mA and not negotiate for its current requirements. <Q> USB doesn't have Tx and Rx, it has D+ and D-. <S> These need to be connected by name ( <S> so D+ to D+ and D- to D-) <S> You shouldn't need a resistor from Vcc to GND anyway, the host doesn;t need to have 100mA drawn to detect a device, it detects it with a pulldown of one of the datalines) <S> If the hub has a separate supply, then you just need to connect the ground lines - you don't want to connect Vcc together. <S> Obviously if it doesn't you need to power it from the host supply (i.e connect both) <A> Any USB device that connects to a computer tells the computer about its power requirement and generally USB HUB is bus powered. <S> This is hard programmed in firmware. <S> After connecting to the host computer long data stream flows bet hub & host. <S> Only after proper information is exchanged bet the two, host recognizes the hub. <S> So I think it will be difficult to change the situation just by changing connections. <A> I then read that a USB host expects a device to draw around 100mA in order for it to be detected Plain wrong. <S> A device may draw up to 100mA without telling the host. <S> an external 5V power supply to a (previously) bus-powered USB hub <S> The Hub will still tell the (Windows) Host that it is Bus-Powered. <S> So the Host will power it down once the sum of the connected devices (including the Hub itself) is over 500mA. <S> You should really use a self-powered Hub.
If you connected these the wrong way round it's possible the host will shut the port down to prevent damage. A self-powered Hub should draw next to nothing from the Host (Upstream) port.
capture raw data in COM port I have a Bluetooth transmitting device and my PC (Windows 7) is connected to it and configured as if it was connected through a RS232 serial port (COM4). How can I capture the raw data transmitted by the Bluetooth device, or, equivalently, the raw data received in COM4? <Q> You can use a standard terminal program to capture the data in different formats. <S> I suggest using Bray's Terminal , it's really easy and has a lot of options! <S> Or do you want to capture and interpret the data in some kind of own application? <A> The best solution I have found, though a bit crude, is Tera Term http://ttssh2.sourceforge.jp/index.html.en . <S> Bray's doesn't play nicely with Windows 8. <S> While it is impossible to tell what exactly it is doing without the source, it appears that it is making some assumption about the location of a registry setting. <S> portmon also did not work for me on Windows 8. <A> My personal favourite terminal emulator for debugging is RealTerm <S> which has a nice range of display options for embedded systems. <S> Both RS-232 and TCP/IP operate fine under Windows 7 x64 and below <S> (I haven't tried under Win 8 but don't have any reason to think it wouldn't work). <S> A few features I find especially useful are: ASCII / HEX view of data Capture files can include timestamps <S> There's an easy way to send binary data sequences <S> Hardware flow control pins can easily be monitored / changed <S> There are also quite a few other options for I2C, SPI, Dallas 1-wire and GPIB. <S> I haven't personally used those features but there's a good summary on the SourceForge page above. <S> Here's a screen capture of the main display tab view: <A> I'd recommend bray as well, if you're not sure about the baud rate open up the hardware manager, browse to COM ports and select properties, it's listed there though not always accurate. <A> <A> The UARTs historically found on typical PCs have only been able to record accurate timing information or capture 9-bit data by having the processor grab each byte as it arrives, without buffering; later operating systems and drivers are generally not equipped to do that, and UART-to-USB chips are hopeless in that regard. <S> If your PC can receive data at twice your desired data rate, you could have a microcontroller receive bytes of data and for each byte send out two bytes. <S> The first byte would have the MSB set, report the MSB (or two MSB's if 9-bit) of the incoming data in the next bit(s), and use the bottom 5 (or 4) bits to report amount of time (0-30 or 0-14) since the middle of the previous byte's stop bit (measured in units of e.g. one bit time). <S> The second byte would have the MSB clear and contain the remaining 7 bits of data. <S> When no data is being transmitted, FF pacing characters would be sent every 30 (or 14) bit times. <S> Software receiving these reports would thus be able to reconstruct very precisely (within one bit time) <S> the exact timing of incoming data. <S> If the data rate feeding the PC was four times the data rate being monitored, one could use this general scheme to multiplex two receive channels into one PC port (use a bit of the header byte to identify whether it contained data for the first or second port). <S> While timing things accurate to one bit time may seem excessive, there are times it can be useful, especially when monitoring the two sides of a communications link (e.g. to judge how long it takes one device to respond to data sent by the other).
Depending upon your exact requirements, it may be helpful to use a microcontroller which can capture and time-stamp the data and then forward it to the PC. There's portmon : a sysinternals tool that act as a datascope for COM ports.
Production testing, design-for-test, test points, and other techniques I have been working with some board layouts that include a test point for every net on the circuit (or close to it). This lead me to a search for other topics about test points and general design-for-test procedures and guidelines around here, but I found nothing. So, my question is a bit broad and ill-defined, but here goes: What manner of production testing do you commonly employ on your product designs? Is there a point at which some methods become worthwhile, and where are these points? E.g. manual testing of populated board, to flying probes, to bed-of-nails, etc. I read about the design and building of the BeagleBoard, which is considerably more complex than our board, but it does not appear to include any of this sort of testing at all (e.g. no bed of nails or test points, they have a software test). All of our boards are microcontroller based. Are the basic functions of power, ground, and clock reliable enough in manufacturing to use the micro for a built-in self test? <Q> I add test points to a majority of the boards I work on - unless the client specifies otherwise. <S> I won't add test point for every net, but power and ground nets definitely get a test point. <S> When we get a batch of boards back from the fab house, I grab the DMM and "Ohm out" the test points, to make sure nothing is shorted to ground. <S> We mostly do very low volume production at my work, so most of our testing is done manually. <S> We do have a higher volume product, though, that does use a bed-of-nails test fixture. <S> In addition to power and ground nets, we have test points for other functional blocks like Ethernet, SPI, audio (speaker/mic). <S> If you are doing a first run prototype, you might want to have all those test points for debugging. <S> But in later revisions, after functional blocks have been proved OK, you can remove them from the board if you want. <A> Always have the bare board (PCB) 100% tested against the netlist you supply. <S> If you are depending on controlled impedances, have the board fab for that too. <S> JTAG doesn't add to the cost of the board or require additional chips, just a connector. <S> But make sure you can seperate the chains, e.g. one for a FPGA and one for a processor. <S> Flying probes avoids the cost of bed-of-nails. <S> If you are making < 1000 units; I expect it wouldn't make financial sense to develop a bed-of-nails tester. <S> Microcontrollers are good for testing RAM and connections to FPGAs. <A> Test points should be added with some thought to their effect on the design (eg analog pins or high speed pins may change their behaviour with the extra copper/line length). <S> Wherever possible I like to monitor <S> /log the various power supplies with an ADC (micros usually have a couple of ADC pins spare). <S> Though I have used stand-alone ADCs that can be removed to save BOM costs, I have yet to work on a project where in-field monitoring of voltage levels was rejected for the small part savings. <S> Logging prototype, production, and field failures is also really important especially if your BIST does not provide full coverage.
In the end, it really comes down to your production volume and how much risk you want to take with testing/not testing certain aspects of the board.
USB powered device with multiple Decoupling Capacitors I have a USB powered device with multiple IC's. From what I've read it's standard practice to use a combination of multiple range capacitors for decoupling each individual IC, with the smallest being as close as possible and larger capacitors not too far away. However, I'm running into a dilemma: According to this source , the maximum allowed decoupling capacitance for a USB device is 10uF. With several IC's all having a combination of 0.1uF and 2.2uF/4.7uF decoupling capacitors, I'm easily exceeding this limit because they're all in parallel. The only solution I can think of is to reduce/eliminate the larger decoupling capacitor and/or try to clump a few IC's larger decoupling capacitors together while keeping the smaller decoupling capacitors close to each IC. In my mind neither of these solutions seem ideal. What is the recommended decoupling layout for multiple IC's on a USB powered device? The theoretical power consumption of all the IC's under use is still below the limit that can be supplied via USB 2.0. <Q> A USB device cannot present more than 10uF of capacitance when connected. <S> This does not necessarily mean that you can only have 10uF of capacitors, it means that you need to limit the inrush current to that required to charge a 10uF upon connection. <S> The 10 μF capacitance represents any bypass capacitor directly connected across the VBUS lines in the function plus any capacitive effects visible through the regulator in the device. <S> The 44 Ω resistance represents one unit load of current drawn by the device during connect. <S> Furthermore: If more bypass capacitance is required in the device, then the device must incorporate some form of VBUS surge current limiting, such that it matches the characteristics of the above load. <S> As you probably know, your device is allowed to draw 1 power unit, or 100mA, upon connection without any negotiation. <S> If I was designing a high power USB device then I would: A. Live with the 10uF requirement, such as if I'm using a switching power supply or <S> if my VDD is going to be 3.3V or B. Use a "soft start" circuit such as a 47 ohm resistor in series with my enormous bulk capacitor. <S> Use a comparator to sense the voltage across the bulk capacitor. <S> When the voltage is within 100mV of the USB bus voltage then have the comparator turn on a P-MOSFET that shorts the 47 ohm resistor. <A> The 100 nF ones are the most crucial. <S> Be sure to place those and like you say as close as possible to the pins. <S> 2.2/4,7 µF to place in parallel is a high value, and shouldn't be required in a properly decoupled power supply. <S> Especially not on each IC. <S> Here the power supply will be some distance away, and then a capacitor of a few µF is strongly recommended. <S> Use the highest value you still can afford after subtracting the 100 nFs, and place that close to the IC which will draw the most current, unless that would be the other end of where the USB enters the PCB. <S> Then you'll have to compromise: in the path from the USB connector, and not too far from the biggest current consumers. <A> While not exactly what you're looking for, I have used power-management ICs to accomplish this. <S> For instance, the TPS2113APW . <S> I prefer this specific chip because it allows me to make dual-powered devices that can operate with either a wall-wart or off the USB, automatically preferring wall-power if it is available. <S> If you don't need dual-powered, you could use something like the MIC2545A <S> Ultimately, any capacitance "behind" the power-management IC (i.e. hooked up to the IC outputs) isn't "seen" by the USB; the bus only sees the capacitance "in front of" the IC (i.e. hooked up to IC inputs). <S> You still have to worry about inrush current - the "plus any capacitive effects visible through the regulator" part of the spec - but those ICs also have variable current limiting. <S> Figure out the parallel resistances that you need to have 100 mA limitation and 500 mA limitation (and optionally n mA limitation if you want to limit wall-power), and then use FETs to short out the resistors as needed to enable various limitations. <S> Through these chips, I have attached PCBs with several hundreds of uF to the USB, and a DMM set to fast current max verified that the inrush during attachment did not exceed 100 mA. <A> The "maximum capacitance across the Vbus pin" ruleis intended to keep the Vbus voltage from dropping low enough to reset the other USB devices whenever a new USB device is plugged in. <S> I've seen a few USB devices that only need a ferrite bead to keep the inrush current within specs. <S> They connect only 2 things to the Vbus pin of the USB connector: <S> the 1uF minimum VBUS decoupling capacitance directly across the Vbus and GND pins of the USB connector,and a ferrite bead that supplies power to the rest of the device. <S> That allows them to use a net capacitance of slightly more than 10 uF on the other side of that ferrite bead. <S> Most of the schematics for USB-powered devices that I've looked at have a voltage regulator that converts between the 4.45 V to 5.25 V from the USB host to the 3.3 V used by all the chips on the device. <S> Using a voltage regulator with a "soft start" circuit keeps the inrush current within specs;that enables the designer to put any amount of capacitance on the output of the regulator -- between 3.3 V and GND -- without any problems on the USB side.
From the USB specification: The maximum load (CRPB) that can be placed at the downstream end of a cable is 10 μF in parallel with 44 Ω.
Using reset controllers with modern microcontrollers Are reset controllers necessary for modern microcontrollers, such as the LPC2138 or 9S12XD256? Most ARM processors I have seen have their own brown-out detectors and reset properly, and I don't see reset controllers used with them. However, I've needed to use them on a 9S12-series part in the past, so I'm debating whether or not to use them on a 9S12X based descendant. <Q> You only mention brown-out as a reset condition. <S> However, in some systems, there could be multiple reasons for wanting to reset the processor. <S> In which case, having a separate chip to monitor all those reasons and either reset the processor or provide it with some type of notification could be of benefit. <S> For an extreme case, take a look at the Lattice ispPAC-POWER607 . <S> It is capable of monitoring six power supplies, digital <S> I/O for manual reset, and external watchdog circuitry. <S> It also has it's own internal timers, the power supply monitors are completely programmable, it has an embedded PLD for logic code, and it has FET drivers to control the power supplies. <S> Like I said, that is an extreme example. <S> Especially if all you need is brown-out detection. <S> And there are, of course, chips to suit any need in between the three pin single voltage monitor and the 32-pin fully programmable system management chip. <A> Many microcontrollers won't need rest controllers anymore, as they have internal reset and brwon-out detection, like you say. <S> There are still exceptions, though, like some MSP430 controllers I've worked with. <S> One reason to work with external reset controllers may be power usage. <S> A brown-out detector may consume several tens of µA, which may not seem to be the end of the world, unless you want to run the microcontroller on an average of 5 µA. IIRC AVR's BODs need something like 35 µA. <S> They suggest to switch it off to save power, but that's a Bad Idea™, unless you have an alternative. <S> I've used MAX809 reset controllers with MSP430 microcontrollers, which together with a voltage regulator needed less than 7 µA. <S> You do not want the Maxim devices, they consume <S> up to 35 µA. Go for OnSemi, their MAX809 <S> consumes less than 1.2 µA. <A> External reset controllers are an absolute requirement in high-integrity applications, e.g. rail and aerospace. <S> An "independant monitor" is seperate from code and does not require clocking, meaning the boards MTBF increases as a result - just whats needed in these kind of environments. <S> Also they are used in multi-CPU designs or where there are combinations of CPUs, FPGAs, CPLDs etc to give a "global reset" to all devices, you might want to avoid the situation of 2 devices having slightly different brownout levels hence being in different operating states
But if your system has a more complicated reset scheme, then having an external programmable controller can be very useful.
What is the difference between 3 axis and 6 axis gyros? Is there any real difference between those two modules? If so what is that? <Q> There is no "6 axis gyroscope"... <S> If you read "gyro: 6 axis" somewhere, this is possibly because of a limited knowlege of the person filling in the fields or a limit of the fields given (e.g. there is a description field for "gyro" but none for "accelerometer"). <S> It will actually mean 3D gyro (3 axis) + 3D accelerometer (in 99% of the cases, could be a 3D-compass too). <S> There are only 3 possible axes for a gyro. <S> So having 6 measurement values, would mean: measuring (at least indirectly) all the axis twice. <S> This could make sense, if you want to avoid failure of the whole device if one gyro is defective. <S> Also: achieving more accurate measurements. <S> But note that most measurement noise is due to spikes/noise of the power supply. <S> So you would have to have 2 independent power supplies to have really independet measurements (therefore achieving a 3dB improvement of the measurement noise [=half the noise]). <A> A gyro measures rotation rate and in a 3D system that can only be around 3 axes: roll, yaw and pitch. <S> Like Jim says the other 3 parameters may be from an accelerometer, that also gives you a rotational position around those same 3 axes. <S> You need 6 parameters to describe an objects position and orientation: distance in X, Y and Z direction, and rotation about X, Y and Z axis. <S> The gyro/accelerometer may help you with the rotation, but can't detect lateral movement. <S> (The accelerometer may indirectly measure displacement, but needs a double integral for this, which may compromise accuracy.) <A> <A> I'm confirming the question about a 6-axis gyro system. <S> It is used to correct radar images on a sailboat. <S> The primary pitch, roll, yawl are the typical 3-axises and the rotation acceleration for each axis is the second 3-axises. <S> Why? <S> Well on a boat you have a very complex movement, even more so than an airplane. <S> On a boat you're pushed and tipped sideways by the wind and up an down by the waves and sliding off axis by the current. <S> The complete rotational MOMENT is very useful to correct the radar image. <S> Especially when you consider that the radar is mounted on a mast well above the center of mass. <S> Having said all of that the 6-axis difference over the 3-axis gyro (or if you will fluxgate accelerometer) is a small benefit, so.. <S> often a 3-axis will do the job. <S> However an aircraft carrier in rough seas when trying to land a fighter jet with a side wind and a nervous pilot will always prefer the 6-axis. <S> We can all thank Mr. Isaac Newton for this tid bit. <A> I think they call it a "6 axis gyro" is because the gyro function and the accelerometer function are done by the same device, the "gyro". <S> This is to differentiate between the simpler 3 axis gyro only devices, as the two are essentially the same part, there is no separate accelerometer, it's just an added functionality to the "gyro" that costs little to nothing to add, but they can add big money to the pricetag of the model for. <S> This is how the "flybar" went extinct, the 3 axis gyro made it obsolete when it replaced the one axis "heading hold" gyro for next to nothing in added cost.
I believe a "3 axis gyro" is exactly what it says, and a "6 axis gyro module" is a 3 axis gyro plus a 3 axis accelerometer.
Name of connector for attaching to bolt I have a heating element (essentially a very resistive wire) that has two threaded bolt-like connectors on each end. I want to avoid soldering any components of the heating element, so I asked a friend what would work best for this situation, as the heating element need to be connected to a power supply. He advised that I use two nuts on the bolt to hold what he called an "automotive connector" in place. He didn't know the actual name of this part, but described it as a washer with an extension off of one of the edges, where a wire can be soldered. I was hoping someone could tell me the name of this part, as I am looking for places to buy it. <Q> If you mean this <S> it's called a cable lug . <S> They also exist with screw terminals: or U-shape: <A> What you're looking for are ring terminals. <S> You would usually crimp the wire into these. <S> Although if you feel it necessary, they are solderable. <A> If you plan to use solder on this connector, you need to be sure that the heating element will not make it hot enough to melt the solder! <S> If that's the case, a crimp would be good enough. <S> Make sure to buy the connector appropriately sized for the wire AWG <S> you plan to use (not related to the size of the threaded bolt) <S> so you get a good crimp.
You usually don't solder them, but insert the cable/wire and use a crimping tool to fix it to the lug.
How to make Quartus II find the Altera DE2 board? I use Quartus II web edition and using that driver my computer can find the card: And the card appears in the device manager so it indeed looks correct so far. But when I start Quartus Programmer to download my logic to the board, the hardware part of the interface is blank where I expect to see my card: What can be done? The instructions I have are available here . Can you help me? Update I reinstalled the drivers, reinstalled Quartus II different versions many times, reset the board, tried both the Quartus version from the CD and from the internet, I see many other people have the same problem with the same board, thank you Altera for making us lose valuable time wasting our time on faulty software. Why can't it work? From the command-line I can run a tool named jtagconfig that actually seems to find the board but this is from the command line: Update 2 I reinstalled and ran the program this time with admin privileges and antivirus turned off and then it worked. The DE2 board appears in my Quartus Programmer and I can download the logic to the board. <Q> Close the programmer and power cycle the board. <S> If that doesn't work, I've also had success using the Windows Reinstall Driver function. <A> You have to install the driver manually for the board. <S> Don't let windows install it for you. <S> The driver you need is in Altera's Driver folder. <S> The path on my machine is C:/altera/11.1sp2/quartus/drivers/ <A> Although the thread is rather old, but this problem exists with some of Altera's product. <S> I still have a DE0 board which uses Cyclone III and no matter how old it is, it works perfectly. <S> However, Quartus has stopped supporting Cyclone III from v14.0 and we want to use windows 10. <S> Important thing to note is I found out that the driver files came with v12.0 (which I tried to use at that time) are not working with Windows 10. <S> The indication is that they are not signed files and windows should warn about that. <S> But it doesn't show any warning even if you enter TEST mode of Windows 10. <S> Another thing is that the driver came with Quartus v7.2 is a good one. <S> So, here are the procedures that worked for me: <S> 1- Install v12.0 (or v13). <S> 2- Don't install the driver. <S> 3- <S> Install <S> v7.2 <S> (my recommendation). <S> 4- <S> Enter Windows 10 test mode. <S> See the steps here . <S> 5- Open device manager and then power on the board (mine is DE0). <S> 6- <S> You will see that USB blaster is listed but it shown as other devices. <S> 8- <S> You will see unsigned warning. <S> Click to continue. <S> 9- <S> Open Quartus v12.0 and go to toold->programmer->hardware_setup <S> and you will see USB_blaster. <S> 10- Don't forget to turn off windows test mode. <S> 11- Enjoy! <S> Note that the driver files came with <S> v7.2 is different from v12.0. <S> Please see the picture.
7- Try to update the driver by navigating to C:\altera\72\quartus\drivers\usb-blaster and make sure you have checked "include subfolders".
Share battery between different voltage devices I have a keychain-sized China-made camera that has an internal LiPo 3.7v dc battery, and a TI MSP430 microcontroller that operates between 1.5v and 3.6v dc. I want to use the microcontroller on the same battery as the camera, and use the controller with transistors to digitally "press" the on/off and start/stop buttons on the camera. The end goal is to take periodic photos for time lapse usage. My question is: How can I drop the voltage from a 3.7v battery to about 3v so I can use the same battery for both? A CS professor I talked to suggested in passing that I can use a resistor. Will that work, and if so where would I need to insert it? How do I determine what resistance the resistor would need to be? <Q> That will drop about 0.6 V (the MSP430 will probably not consume much power). <S> A resistor's voltage drop will be less constant. <S> The MSP430 will operate at voltages as low as 1.8 V, and then the camera will have given up already. <S> To simulate a button-push you can control a transistor which you mount parallel to the button, from the MSP430. <S> The diode will give you a constant voltage drop, so if the battery's voltage sags to 3.5 V <S> the MSP430 will get 2.9 V instead of 3.1 V. <S> It doesn't matter much for its operation, like I said it will keep working at a voltage as low as 1.8 V. (At work I tested how low it would go, and it still worked at 1.3 V, <S> but that's no longer guaranteed.) <S> If you want to be a Good Boy you would use a voltage regulator , in this case an LDO, for Low Drop-Out. <S> Many voltage regulators are three pin devices: 1 pin input, 1 output, and a common ground, that's the negative pole of your voltage. <S> Standard regulators need a few volt more input than output, so for 3 V out you may need 5 V in, more than the battery can supply. <S> An LDO will work with less voltage difference. <S> For instance a 2.5 V LDO may need only 2.7 V input. <S> The regulator will keep the output at 2.5 V as long as the input is higher than the 2.7 V. <S> You'll also need a couple of capacitors, one for the input, one for the output. <S> Oli's MCP1700 is a good choice. <S> It has a very low ground current, together with the MSP430 you should be able to stay below 10 µA, so you'll barely discharge the battery. <S> 44 cent at Digikey (Farnell is 55 cent). <S> A 1N4148 diode costs 10 cent. <A> It's actually very simple if you want to do it using a resistor as well: R <S> = V <S> / I <S> R = 0.7 <S> (Potential difference across resistor) <S> / <S> I <S> What this mean's is that the resistor you'll want to use will change based on the current being supplied from the battery. <S> This is why I'd suggest using a linear voltage regulator. <S> To a certain extent, it will deal with a range of input currents and it will automatically regulate voltage for you. <S> Note that if you choose to use a linear regulator then you must pay attention to the so called 'dropout' voltage. <S> Essentially this value is the minimum input voltage above the specified output voltage in order to produce the desired output. <S> For instance, if you were to use a 3.0V linear regulator with a dropout voltage of 0.5V, you'd have to supply 3.5V in order to reliably get the full 3V. <S> So the maximum dropout value of linear voltage regulator you could use would be 0.7V as that is what is being provided by your battery(though in reality <S> you'd want it to be a bit less than this to account for battery voltage variation). <S> At my usual electronics site I found a 3V regulator that has a dropout voltage of 0.38V @ <S> 200mA within a minute or so, selling 50 for £8.85, so it's entirely possible to get them cheap as well. <S> Regarding efficiency, the efficiency drops as the input voltage increases relative to the output voltage. <A> A resistor won't work very well, as the voltage will then depend on how much current the microcontroller is drawing. <S> A very simple method would be to use a series diode to drop ~0.6V from the supply (e.g. 3.7V - 0.7V = 3.1V), but the most accurate/stable way would be to use an inexpensive 3V low dropout linear regulator (LDO) like <S> this (also has an SOT-23 version ): <S> It costs £0.35 qty 1, can handle a current up to 250mA, and has a dropout voltage of just 178mV (this means it will stop regulating properly at 178mV above <S> it's setpoint, <S> so ~3.178V, which is well below the battery nominal voltage) <A> It's been a few months since OP asked, but frankly, the msp430 can take more than 3.6v. <S> The datasheet for most of the valueline shows 4.1v as the maximum rated voltage, with 3.6 as the recommended. <S> Giving it 0.1v more than recommended won't kill it. <S> tl:dr <S> ; there is a difference between recommended voltage, and maximum voltage.
Between the low current draw of the msp430 and the voltage drop that the camera will cause, you will be beyond fine. The cheapest way is a diode in series with the 3.7 V LiPO. Yes a resistor would work, but you could also use a Linear Voltage Regulator .
Line Tracing robot when sensors are behind the robot I am trying to design a robot, a line tracer basically, but the catch is that, instead of the sensors being placed on the front, they are going to be placed on the back. So I am trying to develop an algorithm, but I haven't had any success so far. The best I can think of is, when a curve comes and the it is sensed by the sensors, then the robot will move back and take the turn. That is what I can think of. I tried googling it, but it seems as if no one has thought of this before. So can I get an efficient algorithm? I use an ATmega 128 microcontroller. <Q> You haven't seen an algorithm for this before because it's silly! :) <S> That's why dogs have their sensor package up front! <S> The problem is that by the time you have detected leaving the line, it is too late to correct for it. <S> Further, if your robot is anything like other line-following robots, when you rotate to get back on course the sensors will actually move in the wrong direction-- causing further confusion and sensing issues. <S> Your "back up and try again <S> " method is on the right track, but not perfect. <S> Let me suggest a couple of things. <S> Keep in mind that what follows is pure speculation. <S> While I have written autonomous vehicle navigation software this might not be 100% right, or even be possible with your hardware. <S> Basically, an internal model of the playing field (a.k.a. the floor with a line). <S> It also needs good enough dead-reckoning accuracy to be able to create this map and navigate within it. <S> Initially the map is empty and as the robot moves around it fills in the map with where it finds the line and where it doesn't. <S> If the robot drives off of the line it will have to back up to get back on it. <S> This maneuver might be a little more than a simple reverse. <S> It could include some spinning or whatever to help relocate the line easier and fill more of the map in. <S> At some point the map is complete enough to contain the entire line. <S> I assume that the line is one giant loop. <S> The robot can switch modes where it tries to navigate around the course based mostly on the map. <S> It uses the sensors to determine when it deviates from what was expected, and then corrects itself. <S> In this way it can compensate for some slippage of the wheels or inaccuracy in its dead-reckoning. <S> This type of software is non-trivial, but not impossible. <S> You will need a good amount of RAM to store the map, and your motors/wheels will need some rotary encoders on them. <S> But it can be a fun and rewarding project! <A> It is certainly possible to do this, but as David Kessner pointed out, it's very difficult to do this with a traditional 2-wheeled robot. <S> Imagine what happens when the sensor realises that the line is slightly off to one side. <S> Which way should the robot turn? <S> Turn one way, and the sensor is now above the line, but the robot is actually steering away from the line! <S> Turn the other way, and the robot steers towards the line, but the sensor is further from the line. <S> Whatever you do, you lose. <S> However, if you are building this robot from scratch, then there is a solution. <S> Use omnidirectional wheels! <S> Using these wheels, and some clever mathematics, you can actually make your robot drive as if the whole of the robot was actually behind the sensor! <S> You'll have to spend some time studying the behaviour of the wheels, and working out the maths, as this is too much to explain here. <S> To get you started, here is a some cool video of the wheels in action : <A> Another way to approach this problem is to make the sensor move. <S> As I mentioned above, if the robot steers in the right direction, then the sensor will obviously get moved off the line. <S> OK, so why not mount the sensor on a moving tail and move it back onto the line! <S> Actually, the best way to do this is to concentrate on the tail. <S> Now couple the steering and the tail together. <S> As the tail moves, so do the steering wheels. <S> The robot will steer in the right direction, and the robot won't lose the line.
What your robot needs is a map. Servo the tail so that the sensor is always held above the line.
What is the "Max current" for AWG#16? I read many informations from many webs,all never give an answer with easy understand. <Q> The reason you're getting lots of different answers is that there is no hard maximum current a particular cable can handle since it depends on the application. <S> You need to specify what physical limit you don't want to exceed for your "maximum" criterion. <S> Do you want the wire not to rise above ambient temperature some amount? <S> If so, what amount? <S> If you can only tolerate a 10°C rise, then the maximum current will be less than if you can tolerate a 50°C rise, for example. <S> Or maybe the limiting parameter for your application is voltage drop, which could make the maximum current quite different again. <S> AWG #16 copper wire has a resistance of 4.016 Ω per 1000 feet, or 4.016 mΩ/foot, or 13.18 mΩ/m. <S> If you need to limit the power dissipation to 1 W/foot, then you can't push more than 15.8 A thru it. <S> 1 W/foot would get noticably warm, but should not be dangerously so for most uses. <S> If you are using it for house wiring, then it becomes a legal matter and you simply look up the answer. <S> One chart I looked at says the limit is 3.7 A for "power transmission". <S> That was chosen to be very conservative so that some amount of degradation and screwups can happen and your house is unlikely to burn down due to overloaded wiring. <S> Legal limits will vary by jurisdiction and which electrical code is being applied. <S> That same chart that shows 3.7 A as the maximum for power transmission also shows 22 A maximum for "chassis wiring". <S> Presumably more temperature rise is acceptable inside a chassis. <S> So to get a straight answer, you have to tell us what you are really trying to do. <S> There simply is no inherent maximum current until you get to where the copper melts. <S> Even that depends on ambient temperature assumptions. <A> It is important to note that the current that can flow through a wire depends on a few factors: allowable voltage drop. <S> As mentioned in the answer by stevenvh, it depends on the length of wire you are using and the application in question allowable temperature of the wire, and insulation <S> I've usually worked with the idea that a wire at 70 degrees is pretty damn hot. <S> I believe a lot of the time the ratings for cable insulation sheath is rated to 100 degrees. <S> If you have 16 AWG wire with a silicon insulation you'll find its rating to be substantially higher than cheaper plastic insulation. <A> This table says 3.7 A. <S> According to the same table AWG 16 has a resistance of 13.17 Ω per km, which means that at 3.7 A one meter of wire would cause a power loss of 180 mW, and a voltage drop of 48 mV. PetPaulsen 's nomograph doesn't show a value for AWG 16, but you can compare the values for AWG 22 with those of the table. <S> The table gives much lower current values. <S> That's because the wire's electrical insulation also acts as thermally insulation, whereas the PCB traces the nomograph is about can drain their heat to both the PCB's mass and the air, so that their temperature won't rise as much as for insulated wire.
If you need to keep the voltage drop along 1 m of wire to 100 mV or less, then you can't push more than 7.59 A thru it. You will have to consult the electrical code that applies to your area and circumstance to get the answer.
1N4148 not giving correct voltage drop I am trying to drop the voltage coming from a USB power line to 3.3V. I actually plan on using resistors to create a voltage divider (which I may have questions about later), but for now I was trying to experiment with the 1N4148. As I understand from the data sheet , it has a forward voltage of about 0.70V. Well, what I did was connect one to VCC, and checked what the voltage was. Prior to attaching the diode, I was getting about 5.42V, and after connecting, I was getting about 5.0V. Why is the drop not close to the forward voltage? Thanks. If a diagram is needed, please let me know (although this is quite a simple circuit). EDIT: Please find a diagram below <Q> Actually it sounds like you're getting about what you should. <S> The voltage drop accross a diode <S> is a non-linear function of current. <S> It is not a fixed voltage source, but is around 600-700 mV for most normal currents. <S> If the only load thru the diode is a voltmeter, which are designed to draw as little current as possible, it may look like the drop is only 200 mV or so. <S> The basic problem is that you are trying to use a forward biased diode as a fixed voltage source. <S> That does work in some cases when the situation is well enough known or controlled, but this is not the best way to achieve what you want. <S> What you do want is a linear regulator. <S> There are many to chose from, but something like the 3.3 V version of the <S> MCP1700 is a cheap chip that would supply a few 100 mA and should work for your case. <S> Another issue is that your USB voltage is high. <S> I don't remember the exact full range of valid USB voltage as can be seen by a device, but 5.42 V sounds out of spec. <S> Still, most 3.3 V fixed linear regulators, including the MCP 1700, will be fine with that. <A> You have placed the diode the wrong way (if red wire is VCC and black is GND). <S> With your diagram you are not drawing any current, hence, the diode actually will have no voltage drop, so I assume your connection diagram is a bit wrong. <S> The cathode (line on diode) should be placed towards ground, having the anode side on VCC. <S> These diodes does also come with different quality depending on where you buy them. <S> I think that the voltage drop you see is actually a leakage through the "blocking" direction of the diode, and not at all what everybody else are answering. <A> On page 4 of the datasheet there is a graph, Figure 3, which shows the relationship between forward voltage drop, current, and temperature. <S> It shows that there could be a fairly wide range of voltage drop depending on those factors, and 0.42v drop is not outside of what the part is spec'd at. <S> Another thing that graph shows is two lines, one for "typical" and one for "maximum". <S> So even at the same current and temp there could be some variation from part to part. <S> In short, the forward voltage drop will vary and cannot be relied upon to be a constant value. <A> The forward voltage drop for a given load current can be accurately calculated using the Shockley diode equation. <S> This can be tedious and monotonous, so just keep the following in mind. <S> A silicon diode's knee voltage is soft - at very light load currents, the forward drop is less that what it is at the rated current for the device. <S> If you look at the curves on page 4 of the datasheet, you can see that the diodes are soft below 100mA or so. <S> I would argue that your application is using much less than 100mA, so you're in the soft region, hence the drop is lower than your expectation. <A> Since you are not drawing any current, the voltage drop will be ~0. <S> Have a look at the current/voltage characteristic of a diode. <A> You won't get any voltage drop until you draw some current. <S> Put a resistor across the leads where you measure the voltage, and see what the result is.
You could also try setting your multimeter to diode test, connection the leads to anode and cathode, getting a measurement of how big the voltage drop is over the diode. You are seeing 420 mV drop, which is certainly plausible for some small amounts of current.
Common types of diodes to keep around I'm working on stocking my home workshop with frequently used parts so I can spend more time tinkering and less time watching my mailbox. What are the differences between different kinds of diodes? I've seen schottky, zenner, signal, and rectifier all used to describe diodes, but I don't know what the differences are and when you would use a particular one. What are the most frequently used diodes that you would keep around to be able to build most common circuits? And how do you know what makes a suitable substitute when a circuit calls for a particular diode? <Q> 1N4148 and 1N400x <S> (*). <S> Definitely. <S> The 1N4148 is the standard signal diode, the 1N4001 a rectifier capable of 1 A and 50 V. <S> If you need higher voltages you can go for the 1N4002 through 1N4007, for 100 V and 1000 V respectively. <S> See also this answer . <S> Zeners . <S> You don't want zeners. :-) <S> Well, you could keep a few, but what voltage(s)? <S> Most often you'll use a three-legged regulator, like an LE33 , for instance. <S> They regulate much better than zeners. <S> Unless! <S> (and this should please Russell) <S> There's always the TL431 , which is an adjustable zener, and because it has an adjustable voltage you only need one type. <S> Costs hardly more than a zener, but has much better specs. <S> (*) <S> I first mentioned the 1N4001 here, but on second thought the 1N4007 may be a better choice: you can use that for almost any application, including rectifying 230 V AC, like Olin says. <S> Not what I would need everyday, but the 1N4007 is exactly the same price as the 1N4001 at Digikey anyway (6.49 ¢ a piece @ 100s), and the 1N4007 has a lower junction capacitance as well. <A> What are the differences between different kinds of diodes? <S> As Olin says in his answer, they have lower forward voltage drop and generally faster reverse recovery characteristics. <S> They're often used in switching power supplies to minimize losses. <S> Zener diodes are silicon-junction diodes that are designed to have well-controlled reverse-breakdown characteristics. <S> When reverse-biased with a low voltage they will conduct only minute currents, like normal diodes. <S> But when reverse-biased beyond their reverse breakdown voltage they will conduct strongly. <S> Normal diodes also have reverse breakdown behavior, but the Zener diode is designed to break down at a well-controlled voltage. <S> The breakdown voltage can range from 1 or 2 V up to 50 V or more. <S> They are often used as shunt voltage regulators or in input protection circuits. <S> Rectifier and small-signal diodes are just normal silicon diodes, but optimized or specified for two different applications. <S> Rectifiers are used to block current in one direction, for example in a bridge circuit to convert AC to DC. <S> Small-signal diodes do the same, but for smaller currents and often at higher frequencies. <S> These diodes are optimized for low capacitance and sharp turn-on instead of current carrying ability. <S> You might also add varactor diodes (used for their variable capacitance when reverse biased), p-i-n diodes (often used as rf and optical detectors), LEDs, and laser diodes to your list of diode types to be aware of. <A> I agree with Steven about the 1N4148. <S> That's a very common fast signal diode. <S> However, I would get 1N4004 instead of <S> 1N4001. <S> These are both common 1 <S> A silicon power rectifiers, but the 1N4004 has a higher voltage rating. <S> There is very little benefit to using the 1N4001 in low enough voltage applications instead of a 1N4004, but the 1N4004 allows for power line applications that the 1N4001 doesn't. <S> I know of at least one case where a manufacturer actually made a single type of diode for a class of different products rated for different voltages. <S> They would send them unlabeled to distributors, who would then label them appropriately according to what voltage rating the customer paid for. <S> All diodes were actually identical, but the lower voltage rating sold for less money. <S> I wouldn't be too surprised to find that many 1N4001 and 1N4004 from a single manufacturer are actually the same diode with different markings. <S> In addition to these two, I'd also get some 40 V 1 A Schottky diodes. <S> Schottkys have two main advantages over silicon diodes in low voltage applications. <S> First, they have about half the forward drop. <S> Second, they have instant reverse recovery times for most purposes, which full silicon rectifier diodes certainly don't have. <S> This can be very important in switching applications. <S> I don't have specific model numbers, so look around on Mouser and see what is available. <S> The SMA package is convenient for the 1 A current range. <A> I would like to prefer two diodes for your own home amateur or professional lab. <S> Diode <S> 1N4148 is highly recommended for high speed communications, This has 4nS switching time, which is very very fast, it is ideal for communication purpose as well as low voltage and current AC to DC rectification. <S> Its maximum rated current is low as compared to 1N404x series. <S> Small General purpose Diode <S> 1N4007 is highly recommended for lab general purpose, however you may use from 1N4001 to 1N4007 diodes, all these diodes have rated current upto 1A , the only difference between them is of maximum voltage ratings, I personaly recommend 1N4007 diode, which is best among 1N400x series, due to its maximum voltage level which is 1000 volts . <S> all diodes from 1N4001 to 1N4007 comes with almost similar price. <S> 1N4001: <S> 50V <S> 1N4002: <S> 100V <S> 1N4003: <S> 200V <S> 1N4004 <S> : 400V <S> 1N4005: <S> 600V <S> 1N4006: 800V <S> 1N4007: 1000V 3.6V zener diode is recommended, if your dealing with USB communication projects. <S> 5.1V zener diode is recommended for general purpose use. <S> It can be useful to produce 5.1V supply, as well as for reference voltage supply, It can be used in communication project where micro-controller pins are directly connected to external boards for keeping communication line voltage levels in between minimum and maximum voltage levels of micro-controllers (for this use connect cathode of zener diode to micro-controller pin and connect anode pin to common ground of micro-controller board)
Shottky diodes are formed by a metal-semiconductor junction instead of a junction between two differently-doped semiconductor regions.
A simple on-circuit RS-232 to USB converter I want to interface a PIC microcontroller ( 18f452 ) to a PC via the USB port. I learned that there is a USB class for serial communication so I will not have to write device drivers for it. I want to know a simple way to connect my PIC to a USB port. I prefer a one IC circuit.Is there an IC that will do my job? <Q> The FT232R mentioned by Toby is the standard solution. <S> FTDI has become the main supplier of USB connection solutions for microcontrollers and other logic devices. <S> You install a Vitual COM Driver on your PC (downloadable from the FTDI website) and then you use the USB as a transparent communication channel for your UART. <S> Means that the PIC will only see UART in and out, and the PC software will think the PIC is connected to a serial COM port. <S> This is the minimum configuration. <S> As you can see that it's hardly more than the IC and the USB connector. <S> A breakout board like <S> this one only needs ground Tx and Rx connections with the microcontroller. <S> If necessary it can also provide the power supply for it. <S> edit <S> m. <S> Alin mentions the Microchip <S> MCP2200 <S> as an alternative to the <S> FT232R. I didn't know the device, and only had a quick look at the datasheet, but it looks promising: only half the price of the FT232R, and has both UART and GPIO. <S> Breakout boards available: (I'll study the datasheet a bit more tomorrow and report back.) <A> It has drivers for all the main operating systems. <S> There are breakout boards available. <A> The MicroFTX would do what you want. <S> It's an extremely tiny breakout board for FTDI's new lower-cost <S> FT230X <S> USB to serial chip. <S> There are solder jumpers on the bottom that let you configure things like I/O voltage and power options.
The FT232L is a popular choice.
Calculate output voltage and current of a boost converter If I have two AA rechargeable battery (1.2 V, 2000 mAh) connected in series, and I then connect it to a boost converter (DC to DC converter) so that the output voltage is 5V, what is the maximum current I can get? Can you please show how to calculate this? Just to give you a bit more info, I have one of these so called "mobile boosters" which can charge your phone from 2 AA batteries. At the back, there is a small label saying that the maximum output is 5 V @ 500 mA . However when I plug it to my Blackberry, I turn on the engineering screen, I can see that the charging current is 1250 mA which is what I normally get when I use the wall charger. When I plug it to a computer, the charging current become 500 mA which makes sense as USB2 port can supply up to 500 mA. What I don't get is why does it say 1250 mA when the source can only supply 500 mA. So is the Blackberry gives out false information or the mobile booster actually deliver more than 500 mA? Please try to keep the answer simple, don't get too technical, I'm not that great with physics :D <Q> There's the Law. <S> The Laws of Thermodynamics, to be precise. <S> One of the things following from them is that you can't create energy out of nothing. <S> So you'll have to do it with the energy stored in the batteries. <S> Energy is power x time, and for the batteries that will be \$ <S> U = 2 <S> \times <S> 1.2 V \times <S> 2000 mAh = 4800 <S> mWh \$ <S> So if your switcher has a 100 % efficiency you should be able to get \$ \dfrac{4800 <S> mWh}{5 <S> V} = <S> 960 mAh \$ from it. <S> Forget 100 % efficiency, 85 % will be nice. <S> So that's 15 % less, or 816 mAh. <S> It's up to you how to use that. <S> If your device uses 10 mA you can power it for 81 hours, that's more than 3 days continuously. <S> If it needs 100 mA the batteries will be gone in 8 hours. <A> So it looks like there is not enough data to answer your question. <A> Assuming your DC-DC convertor is 100% efficient, and assuming the current you're drawing is small, the current on the 5V side will simply be 2.4/5 times the current on the battery side. <S> If the current from the battery is <S> \$I_{bat}\$ <S> then the power being generated by the battery is just voltage times current or \$2.4I_{bat}\$. Similarly if the current from the DC convertor \$I_{conv}\$ the power is \$5I_{conv}\$. <S> If the convertor is 100% efficient no power is lost so the two powers must be equal: $$ 5I_{conv} = <S> 2.4I_{bat} <S> $$ <S> so $$ I_{conv} = <S> \frac{2.4}{5}I_{bat} $$ <S> This argument assumes the currents are low, because as you raise the current you get a voltage drop within the battery due to the battery's internal resistance. <S> Similarly your DC-DC convertor will also have an internal resistance and this will lower the voltage you get on the convertor side. <S> However, when a manufacturer specifies a maximum current this is normally a safe maximum current rather than the current <S> you'd get if you just shorted the battery. <S> The safe maximum current is typically low enough that you can ignore internal resistance, and you can simply use the equation above.
I would say your "maximum mA", i.e., maximum current, depends on the resistance of your load (although we can assume it is zero for maximum current), internal resistance of the batteries, and some characteristics of the converter (efficiency, internal resistance, maybe something else).
Difference between Line and Neutral in AC I want to find out what is the difference between the AC (220 VAC) lines, (phase and Neutral). As I know that the Alternating Current (AC) has no polarity, so why do we have a "phase" line and a "Neutral" line ?! Why one of them (the phase line) would make danger on human if touched, while the other doesn't ?! I also want to know, what's meant by "Analog Ground"? .. is it the Neutral line ? or what ?! <Q> The voltage is a difference between the electric potentials of two conductors. <S> Hence, to change voltage, only one of the potentials has to change (although both can). <S> In AC power only one of the wires (live/phase) changes it's potential, while the potential of the other one (neutral) remains constant. <S> In the picture above, the orange horizontal line represents the potential of the neutral line (marked as zero for convenience), while the blue curve shows the constantly changing (in relation to zero) potential of the phase line. <S> Since in properly constructed power network the neutral wire is maintained at a potential level close to ground potential, there is nearly no voltage between the neutral and the ground. <S> Hence, touching neutral will not cause current to flow through human body into ground. <S> Live line, however has a potential that rapidly changes from highly positive relative to ground potential, to highly negative. <S> This difference in potentials (voltage) of the conductor you're touching with your hand and the one you're standing on causes a current flowing through you and at typical outlet voltages can be very deadly. <S> Analog Ground is a reference to a constant potential wire, that all other signals (voltages) relate to. <S> Is is what you name your "0" when measuring other signals. <S> For example, in most battery-powered devices it is the wire connected directly to the negative terminal of the battery. <S> Naming "ground" or "0" is a matter of convenience, however in outlet-powered applications the designations are often separate, since "ground" is electically connected to actual ground. <S> See also http://en.wikipedia.org/wiki/Ground_and_neutral <A> Your phase is just one of three in a 3-phase network. <S> In the diagram the neutral is at the center, and each arrow represents a phase vector. <S> In this case the mains voltage is 120 V, and when you look at only one phase you could invert the arrow and still have a 120 V sine. <S> But the phases aren't just related to the neutral, they're also used with respect to the other phases. <S> If you would measure the voltage between the A phase and the B phase you'd find that it's \$\sqrt{3}\$ larger than 120 V, or 210 V. <S> These voltages are often used in industry where 3 \$\times\$ <S> 210 V will give you more power at lower currents than just 120 V. Under a balanced 3-phase load there <S> won't flow any current through the neutral, while there will be current for each phase. <S> Analog ground in a circuit is a reference voltage. <S> Voltage is relative and is only meaningful when you say what other voltage you compare it to. <S> So in a circuit we choose a reference level to measure all the other level against, and we call that "ground". <S> It will often be the lowest voltage in the circuit, so that all measured voltages are positive, though you may also have a dual voltage supply of for instance <S> + and - 15 V, symmetrical about ground. <S> " <S> Analog ground" is the reference for the analog part of your circuit, but should be the same as the digital ground. <S> The difference is used during PCB layout to keep noise from the digital part away from the analog part. <A> The Alternating Current do not have polarity, but Live wire is dangerous and neutral wire can safely be touched. <S> You can resolve the vector sum of the voltage of three phase given in the picture, assuming that all three phases are balance. <S> You will get Neutral voltage zero. <S> I was not able to post image. <S> You may email me if you want.
The reason is that, the neutral is the point at which all electrically balance voltage which is 120 degree phase shift from each other is connected together.
cheaper alternative to microcontroller What options would I have for a cheaper alternative to using a micro controller like the Atmega for mass production products?. I just want something cheaper and smaller than an Atmega micro controller. Because I can get them from China for cheaper price but they maybe fake or something as they are half the price than a authorized dealer. See if I buy from a reseller they cost about $2 each I need for under $1 each. I would prefer 10,000 pcs at 0.80 cents each for example. How can this be done? or could I deal with Atmel direct to get at right price? <Q> I am more familiar with Microchip PICs, but I'd be real surprised if Atmel doesn't have a few sub $1 offerings too, especially at 10k quantity. <S> By the way, 10k quantity isn't all that high, but high enough so that you should talk to your local manufacturer's rep or sales guy to find out how to buy them to get the good price. <S> Of course, don't expect a ethernet MAC/PHY, 80 pins, 16 channels of 12 bit A/D, two UARTs, and the like for under $1, but there are some reasonably capable ones. <S> If you're not locked into a particular product line yet, check out the PIC 10F, 12F, and the 16Fxxxx (4 digit part number) from Microchip. <A> You'll have to be more specific about the type you need, but you can get ATmega48 for USD 1.08 each at 10 000 at Digikey. <S> But for quantities like this I would go to a distributor , that's where the manufacturer also would send you to. <S> Atmel sells through big ones like Arrow, Avnet and EBV. <S> For 10 000 pieces you'll also get support, which I don't know you'll get from resellers. <S> Personally I find EBV very good. <A> I use the NXP Cortex M0 devices for my products. <S> Some can be had for around 80 cents in the 10k quantity range . <S> Might even get a better price going through NXP directly at that quantity. <A> You may use ATTINY Microcontroller from ATMEL AVR sereies which unit price of one ic is 0.8 ATTINY13A-SSU From DigiKey . <S> All ATTiny Series controller are much cheaper among all other microcontrollers of different manufacturers. <S> From DigiKey you may get maximum quantity, but from Chinese distruber you will get your required quantity at very lower price. <S> I am also using ATmega series for my products, and before oddering full quantity, alwasy order some sample chips from China. <S> In this case you will get trusted Chinese Supplier <A> Well it just depends what you capabilities you need in your micro <S> but you can get MSP430F2001 for 50 cents in 2000 <S> qty @ digikey. <S> But again those are extremely simple and flash limited devices and they are available in the 16-QFN package too. <A> Discrete logic can be cheaper than a microcontroller, depending upon how much is required; application-specific chips can be cheaper if one makes enough of them to recoup one's engineering and tooling costs. <S> Programmable logic is usually more expensive, though, because the elements which store the configuration must be scattered around the chip near the things they control (meaning they don't pack as efficiently as simple addressable flash memory), and because its higher cost tends to limit its uses to applications where microcontrollers would be too slow. <S> Note also that even a comparatively simple chip like a 16V8 (the simplest common programmable logic device) has 64 rows of fuses, with 32 fuses per row, plus a few mode-select fuses. <S> That's over 2,048 fuses in total. <S> A cheap microcontroller like the PIC 10F200 has 3,072 bits of flash. <S> Given that flash memory packs more tightly than the control bits in programmable logic, it may be possible for the 3072 bits of flash needed by the PIC, plus everything else in the controller, to take less die space than the fuses-and-logic block of a 16V8 <S> (it would probably be pretty close). <S> The next larger CPLD (20V8) would have over 2,560 fuses, and the one after that (22V10) would have over 5,500. <S> Programmable logic may seem simple, but microcontrollers are often smaller and simpler.
There are plenty of legitimate microcontrollers available for under $1 if you buy them from the right place.
What to look for in a multimeter? When selecting a multimeter, what should one look for in terms of safety features and measurement capabilities? What can you look for in the specifications to tell a good meter from a crappy one (besides price)? I'm looking at cheaper multimeters for hobby use - so I don't need super high accuracy, and am not planning to measure any higher voltages than normal household power. But I want something that's a little better than the $10 one I have from Canadian Tire. I'm not looking for specific product recommendations, just what to look for in choosing a multimeter. <Q> Accuracy . <S> Which is something else completely than resolution. <S> Your meter may have 4 digits, that's a 0.1 % resolution, but if its accuracy is only 1 % that last digit is useless. <S> Accuracy is given by two numbers, an absolute error and a relative error. <S> The relative error is the one expressed in %, like 0.5 %. <S> The absolute error is expressed in digits, like 2 digits. <S> If you have a 0.5 % meter, +/- <S> 2 digits, that means that a reading of "100.0" may as well be (100.0 + 0.2) <S> * 1.005 = 100.7. <S> Engineers fresh from uni often neglect or underestimate measurement error due to the number of digits the meter gives them. <S> The absolute error becomes less important when the reading gets larger, like for a 900.0 reading 2 digits are relatively less (0.022 %) than for a 100.0 reading (0.2 %). <S> RMS . <S> If you need to measure non-sinusoidal waveforms you'll need that. <S> Non-RMS meters assume your waveform is a sine, and will only produce correct results if it actually is. <S> Autoranging . <S> You don't want to put your probe aside all the time to turn the knob. <S> USB interface . <S> May sound as luxurious, but can be handy to log a whole series of measurements in the computer. <A> Good things to look for if you may be tempted to poke at light switches, wall outlets power supplies etc or anything over 50V or that might be near something <S> > <S> 50V <S> once in a blue moon. <S> Safety - HRC fuses, MOVs, <S> creepage/clearance distances, overlapping case halves. <S> Separate sockets for A (uA/mA, A) and V - Safety. <S> Jack alert - don't want to measure 240V using the A socket. <S> Safety. <S> Flexible test leads/probes with marked credible safety rating. <S> Good things to look for in general <S> Clear display with good contrast - $1000 meter no good if can't read it. <S> Stable stand - see above. <S> Autoranging Accuracy - not as important as you might think but 0.5% better than 1% <S> Microamps range - <S> One day you might be curious about base current on a BJT. <S> Touch-Hold (not Data Hold) - press button, look at DUT, connect probes, hear beep. <S> Fast, latched continuity buzzer. <S> True RMS - if you need accurate measurements of non-sinusoidal AC. <S> Bar graph. <S> Buy a $10 cap meter kit. <S> Diode test - don't think you can test LEDs with it. <S> Bad things to look for and avoid Transistor test - invariably a sign of a cheap unsafe meter. <S> Glass fuses (or no fuses) <A> Autoranging, as stevenvh said, is very useful. <S> I always miss the ability to measure unusual things like capacitance when I don't have it. <A> Useful for sanity-checks on signals at the interface of a u-controller, timing software loops (complement an output bit on every loop execution), timing a function ( <S> raise & lower an output on entry & exit). <S> I probably use this one function as much as all of the rest combined.
Things that may be unimportant Capacitance range - few measure down to 1 pF caps. Frequency & duty-cycle . Some meters also have temperature probes, or ability to measure inductance.
The resistance between the 1.2V rail and GND is 40 Ohms, is it safe? I have a power supply board that supplies a DSP, FPGA, CPLD and other components of a system. When I measure the resistance between power rails and GND using a multimeter I get the following readings: Between 12V and GND: Infinite Between 5V and GND: Infinite Between 3.3V and GND: 250 Ohms Between 1.2V and GND: 40 Ohms The 3.3V and 1.2V rails have many decoupling caps around power supply pins of the DSP and FPGA, are they the only cause for this much reduced isolation between these voltages and ground? Is it safe for the long run to work with these specs? The system is now running perfectly. Also how can I avoid this issue in future designs? Edit #1 In a project I'm currently working on, one of the tests that will be done on the product will be isolation tests. The customer will measure the resistance between supply rails and Chassis ground and want it to be greater than 10 Mega Ohms, that's why I want to avoid these low resistance values. Is there a device used to measure isolation? or it's done with a normal ohmmeter? Edit #2 These measurements are done when the system is powered OFF. <Q> When I've heard about power supply "isolation testing" before, the context has been a test done on the mains inputs to a system or device. <S> I've also heard these tests called "insulation resistance" tests or "hipot" tests, though those could be slightly different tests. <S> The test confirms that voltage applied to the mains input won't connect to the case of the UUT and cause a shock hazard. <S> The test involves applying a fairly high voltage (1 to 5 kV or so) to verify there's no spark gaps or insulation breakdown paths between the mains and user-accessible surfaces. <S> According to this , isolation testing tests <S> The maximimum voltage (ac or dc) that can be continuously applied from the input to output or input to case of an isolated power supply. ... <S> Testing power supply isolation requires specialized equipment (Hipot tester) and can be destructive. <S> The main point is that this is a test you would do on the mains input of an isolated power supply. <S> It is not a test you should be doing on the inputs where your operating circuit expects to receive its local regulated input power. <A> A multimeter measures the resistance by applying a test voltage and measuring how much current flows. <S> When you measure something that isn't a resistor, the measurement that you get doesn't make much sense. <S> Instead, you should use an ammeter to measure the current consumed on each of the rails while your circuit is functioning normally, and determine if that current is within the range you'd expect. <A> There is no problem with having an open circuit output resistance of 40ohms. <S> Possibly, it's a fixed divider (internally). <S> Without having knowledge of the circuit exactly, it's hard to say exactly how much power is going to be absorbed, but just use I=1.2/40=30mA as a start point -- nothing to be worried about. <S> Lower voltages typically have more decoupling capacitance, because the signal to noise ratio is lower by virtue of a lower supply rail.
If you want a better gauge of current being drawn, measure the current through an external load with power on... from there, you can derive current being absorbed by the internal resistance.
Replacement for MC34072P Op Amp I am working on a schematic that requires the operational amplifier MC34072P but I couldn't find it here in local stores!So, anyone would suggest any substitute to use? I'd be grateful.And by the way, what are the basic things should I look at in specs to compare such ICs?Thanks in advance! <Q> The MC34072P appears to be at End of Life. <S> You can see the results of my search here at this page on Mouser .On <S> that page, you can broaden the parameters (i.e., remove some of the filters) to see more part options. <S> Method of searching for parts similar to any PartXYZ, for the future You can use the Search tool of a seller/distributor website like Mouser or Digikey. <S> Find page of PartXYZ on the website. <S> Go to the parent category containing the part, ideally in a new window/tab. <S> Then on this category listing page, you will see a Search tool (which will now search within the category you just chose). <S> For the Filter parameter options, set the parameters equal to the ones of PartXYZ, especially the parameters that are important to you. <S> The Search tool of the website should now give you various options similar to, and including, PartXYZ. <S> And so on; depends on what your application needs really. <A> "I want to amplify a signal coming from audio stream (audio signal) so that I filter it and deliver it to LED making a LED organ." <S> Good news: <S> almost any opamp can handle this, so that I wonder how you got at the MC34072P, especially since you can't find it. <S> You don't need a high bandwidth or slew rate, or low noise and distortion. <S> Your main requirements will be power supply and output drive. <S> The LM358 can source minimum 20 mA, typical 40 mA which is probably enough to drive your LED. <S> This current is specified at +15 V supply however, so if you only would have +5 V <S> you might get less. <S> You can always use the opamp's output to drive a transistor. <S> Don't use a dual supply, like <S> +/- <S> 15 V. <S> If the output would go -15 V <S> the negative voltage will destroy the LED or transistor. <A> If you're not tied to some super-special characteristic of the MC34072, I suggest you use the TL072 . <S> The TL071 <S> /TL072/TL074 series are very common and very widely used JFET-input OpAmps, and I think it's even safe to assume than Motorola (now OnSemi) introduced their MC34071/2/4 series OpAmps as a second source for TI's parts. <S> For most applications, both types will likely work as interchangeable drop-in replacement parts. <S> There's no trouble at all obtaining the TL07x parts.
Two available options that are (nearly) equivalent include MC34072PG , and MC34072VPG , as well as MC33072PG . Specs to look for in opamps: Gain, Bandwidth, Noise, Offset voltage/current/drift, Bias current, Output impedance, Slew rate, CMRR, Packaging, Price...
Any ideas to make IR LEDs identifiable during position-tracking? Background Johnny Lee demonstrated various interesting ideas (detailed, e.g., in this video as well as this page ) that take advantage of the Infrared camera from a Wii-Remote. The IR camera has 1024X768 resolution, and is designed to position-track the 4 brightest infrared-lit points in its view, at 100 Hz. Each of these 4 "points" could be a moving marker in the form of, e.g., an infrared LED -- the LED's emission is detected by the camera, which in turn outputs at 100 Hz, the position data of the IR "blob" observed. Which allows a fast and inexpensive DIY position-tracking system. Problem In the above setup, if each IR LED is not just powered on but also somehow made uniquely IDENTIFIABLE, it would give rise to many interesting possibilities. For example, this would allow continuously position-tracking each marker in space uniquely (i.e., with knowledge of which blob is which). In addition, having each IR LED marker being unique also means the setup could be extended to any number of points (say 50 markers) instead of just the 4 brightest points. The question is: Assuming you start by connecting each IR LED marker to a microcontroller, what would be the most effective way to extend the above setup so that each IR LED marker is uniquely IDENTIFIED? I roughly describe one approach below -- is there some more versatile or simpler approach than it, or perhaps can improvements be made to it? First, a method that is NOT promising: Since each infrared MarkerLED is connected to a microcontroller, you could have each MarkerLED blink in a unique pattern. But the IR camera has only 100 Hz refresh rate so if there were 50 LEDs, it would be difficult to fit in a unique pattern for each, without the camera's effective position tracking of the points becoming really slow. Below is a rough idea I'm currently considering (tracks & identifies 50 IR LED markers): Start by tagging on a simple IR-Detector next to the IR-Camera, both of whose ouputs are read/tracked in sync by a common microcontroller or computer. Now, let's say there are 50 Markers. For each MarkerLED/Microcontroller circuit, you also add on a second IR LED, called the IdentifierLED, thus there is a pair of IR LEDs for each marker, both controlled by the microcontroller. For a given marker, so that its position can be tracked, the MarkerLED is only turned ON for exactly a specific 20-millisecond-window out of each second (each marker has its own 20-msec window). During that same particular 20-msec-window, the corresponding IdentifierLED is pulsed in a specific manner by the microcontroller at a high frequency (e.g., 38 kHz), setting up a unique pattern/ID for that specific marker. And the same for the remaining 49 Markers consecutively, each with its own different 20-millisecond-window and its own high-frequency identifying-pattern. That takes care of the markers' side of things. Now, on the sensing side of things: For each consecutive 20-millisecond-window during a second, the IR-Camera detects the position of one specific marker (whose 20-millisecond-window it is) via the corresponding MarkerLed. At the same time, the IR-Detector identifies WHICH marker it is, from the detected pattern of the corresponding IdentifierLED. And this position- and identification-tracking continues for all fifty of the 20-millisecond-windows within each second. Thus, all 50 markers are tracked, with the tracking-side microcontroller able to update each marker's data once per second. <Q> You forgot some sort of initialization/broadcast heartbeat, otherwise the marker would not know when to light up. <S> Depending how good your sensors and leds are, you may be able to use different slices of the IR spectrum. <S> This way you could distinguish an LED with a 300 µm wavelength from one with 200 µm. <S> If you have multiple cameras, you could use different optics/filters (is feasible).Otherwise invest in a camera with a higher frame rate and let each marker blink in an unique pattern. <S> The pattern must not only be on/off, but can leverage frequency modulation too. <A> I assume there is some kind of powerful computer which is processing every frame of video, and can do things like measure (approximately) <S> the brightness of each IR LED. <S> Take a simple case first: LED1 would vary its brightness in a 10Hz sinewave, from 50% to 100% brightness. <S> The computer can now track the brightness of the LED, run it through a low pass filter, and use zero-crossing to measure its frequency. <S> LED2 would be varying at, say, 15Hz, and the PC could easily distinguish between them. <S> It could take up to a second before the PC got a good frequency lock on both of them. <S> OK, but this isn't going to work for 50 LEDs. <S> It's hard to have that many distinguishable frequencies that can be sampled by a 100Hz camera in a shortish space of time. <S> The solution is to use DTMF! <S> DTMF is a method used on oldy worldy telephones to send data using tones. <S> 8 tones are defined, and the transmitter would send two different tones at the same time, and the receiver would look up the pair of tones in a grid to choose one of 16 results. <S> Now, you could easily use a 7x7 grid, to allow you to have 49 different IR LEDs. <S> The computer should be able to distinguish between 14 frequencies if it can see the LEDs for about 1 second each. <S> You would use much lower frequencies than the DTMF ones, say, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32 Hz. <S> alternatively, use just 8 frequencies, and select any two of the 8 to give 56 (8x7) combinations. <A> Rather than transmit the marker ID code from the marker to a central receiver,perhaps it would be simpler to transmit the marker ID code from a central transmitter to the marker. <S> The central transmitter (perhaps a 38 kHz IR transmitter or some wireless transmitter) would send, in effect, "Marker number 22, please turn on for the next 20 ms on my mark: <S> NOW".(Ideally, while that marker is glowing for those 20 ms, the central transmitter is sending out the ID of the next marker to turn on). <S> Since that one central transmitter is controlling the timing, you won't have to deal with markers getting out-of-sync and accidentally transmitting at the same time. <S> Hopefully you can place that central transmitter close enough to the position tracker, so that if any marker can't see the commands sent by the central transmitter, that marker wouldn't be in the visual field of the position tracker anyway. <S> That also gives you the flexibility of using the data you get back from your position tracker to dynamically adapt which markers you select: If some markers seem to be motionless or extremely slow-moving, perhaps you only need to check on them once every 3 seconds or so. <S> Perhaps you can check up on the latest positions of more than one marker at a time; something like "OK, marker number 22 and 23, please turn on for the next 20 ms on my mark: NOW". <S> If some markers are not visible from this vantage point, perhaps you only need to check if any of them have re-entered <S> the visual field once every 3 seconds or so. <S> The time slots you free up with the above techniques could be used to track the remaining markers at a somewhat faster update rate than you could if you simply cycle through every marker in a fixed pattern. <S> If, say, marker #22 is so close to marker #23 that receiver of #23 is blinded when marker #22 is active, you could shuffle the order you turn on the markers so that the "#23 please turn on" message happens a few slots before the "#22 please turn on" message.
Simply modulate the brightness of each IR LED at a different frequency, and let the computer recognise the frequency of each one.
How to find a footprint? I have just started using KiCAD (with no other experience e.g. in Eagle). I was basically able to put together a schematic and layout a board but I am struggling with some footprints. How would I search for, e.g., a footprint for these ?Can I expect footprints somewhere in the library for most components or is creating my own a common task? <Q> I use Eagle and, despite its huge libraries, most of the time I prefer to create my own footprints since I can adjust them to suit my needs. <S> For example, I usually use a 0.25 grid and the 0603 capacitor as it is on the library doesn't allow a 0.25 mm trace to pass between pads with a 0.25 mm clearance without warnings <S> so I redesigned the footprint so it generates no warnings. <S> Besides that, it is common not to find the components you need on the libraries or to make slight modifications to adjust them to your design preferences. <A> In the long run, you'll spend more time making sure libraries you download are accurate than you would spend just making your own correct footprint. <A> There are a lot of existing module and footprint libraries for KiCAD, but sometimes they may be difficult to locate. <S> Here's the default starting point: http://www.kicadlib.org/ . <S> On the top of the page, there's also a link to a KiCAD library search engine . <S> Another option is converting existing libraries from another CAD tool to KiCAD format. <S> Particularly, there's an Eagle2Kicad conversion script . <S> Regardless of how you obtain a library, it's always a good practice to double-check the particular footprint against the component in your hand. <S> For some components, there's just too much variation (and mini-USB receptacles are among those).
Make your own footprint from data available in the data sheet for the component you're using.
is there some sort of paste, grease, spray or similar thing that helps make more contact surface for high-current battery? I have terminals attached to a battery, which will conduct high-current (40A to 200A), and these are copper plates. As the plates, and battery terminals are not perfectly even (even if they appear to), just squeezing the contact with a screw won't make the most contact surface as I can get. Is there some sort of semi-liquid paste, grease, spray or something of similar consistence that I can put between the plates before I squeeze them together to improve the contact area and so improve high-current flow through the contact? There are thermo-conductive pastes that you put under the fan of the CPU to improve heat flow, as there similar pastes for improving electricity conductivity? I have been searching to find some, but was unsuccessful, maybe I don't know the right keywords. What kind of pastes I should look for? With copper, silver or graphite? What would be the best? There are some copper pastes, but they are sold as a lubricant for high temperature applications, for breaks, etc. I am not looking for a lubricant, these plates won't move, I am looking just to improve battery electrical contact. There is also graphite spray, which is said to give electrical conductivity to any surface, meant to be used for applying electrical conductivity to the outside of devices to prevent electrostatic damage, but is that the best thing I could use for my application, considering that none of them listed improving high-current battery contact as a possible application? I just find it strange that I couldn't find any product which has listed improving a high-current battery contact electrical connection, and it'd seem that'd be a pretty common and useful application, i.e. car batteries? There is also silver glue, which is meant to be used for repairing circuit boards, but I don't want to glue this thing together, I just want some paste/grease. <Q> Two common products used in the power industry include NO-OX-ID and Noalox . <S> These products primarily improve conduction by preventing oxidation. <S> The NO-OX-ID page specifically mentions its use in battery terminal applications. <A> There is a product sold by Chemtronics -Kennesaw, ga see CircuitWorks Conductive Pen .It is called Circuitworks conductive pen. <S> It puts out pure silver that does conduct electricity <S> but it is not cheap. <S> They also no offer a Nickle conductive Pen. <A> The compound only needs to be more conductive than the air gap it is filling. <S> And it cannot prevent the much better metal-metal contact from occurring (apply sparingly). <S> When different metals touch, be careful not to set up a corrosion reaction!
You can also try DeoxIT which I found using the search term "electrical grease". You could test different compounds using the the four point method to measure the contact resistance with and without an applied compound. I think metal based thermal compound are electrically conductive and should work.
Microchip PIC10 (8 bit microcontroller) learning reference. Where to start? So I've generally learned how to use an Atmel Attiny13a, but now I have found that I need to switch to a Microchip PIC 8 bit microcontroller such as the PIC10 series. Can anyone give me some good online resources or names of books that teach microchip 8 bit microcontrollers? I know there are some advanced 16bit microchip resources available, but I can't find anything on any of the 8 bit series. I have no idea where to start. Thanks! And the switch to microchip is due to cost and programming cost as well... It is a very low power simple product with only 3 I/O pins needed. <Q> The problem (as hinted at by Olin) is many App notes can assume knowledge of x and y and can be badly written or promote bad practices, so it's usually best to treat them as a starting point rather than the final word on the particular subject. <S> There are a few good books around for PICs, so have a look around and maybe pick up a couple with good recommendations (I can only think a few by Lucio di Jasio <S> but he mainly writes about the 16 and 32 bit PICs) <S> Website wise, I think the Gooligum tutorials may be just what you are looking for. <S> I have heard it well spoken of and recommended many times on the PIClist <S> (the author is also a member there) <S> I have not looked in detail, but it appears there is plenty there on the 8-bit baseline and midrange devices, presented in small tutorials on covering various things like: Basic Digital Output Introducing XC8 and CCS PCB Simple control of digital output pins on baseline PICs Reading Switches Reading and debouncing simple switches and using internal pull-ups <S> Using Timer0 <S> Configuring and accessing Timer0 <S> Using Timer0 for event timing, background tasks, debouncing switches, and counting (with some examples of C macros) <S> Sleep Mode and the Watchdog Timer Using sleep mode, wakeup on change, and the watchdog timer on baseline PICs <S> Driving 7-Segment Displays Single and multiple 7-segment displays, lookup tables and multiplexing on baseline PICs ( <S> using the PIC16F506) <S> Analog Comparators Comparators, fixed and programmable voltage references Analog-to-Digital Conversion and Simple Filtering Analog-to-digital conversion (ADC) and calculating a moving average (accessing banked memory) <A> The only real reference is the datasheet for whichever PIC you want to use. <S> For example, if it's a PIC 10F200, '202, '204, or '206, then the answer is PIC10F200/202/204/206 Data Sheet , which is designated as Microchip document number DS41239D. <S> It is well written and everything you need is in there. <S> Any other reference at best won't garble anything. <S> Since you have already used other microcontrollers, you don't need a general introduction to them, just what is specific about the 10F. <S> That is exactly what is in the datasheet. <A> If your looking for a great book try Designing Embedded Systems With PIC Microcontrollers <S> I learned a ton from that book
I agree with Olin that there is no substitute for reading the datasheet, but for someone new to micros in general, specific examples are also very useful. There is no substitute for reading the datasheet.
Measure Water Flow in a Swimming Pool I've got an inground swimming pool, and was inspired by an ill-formed question that was recently posted. I would like to non-invasively measure the volume of water my pump is circulating through the pool over a given period of time. By non-invasively, I mean I would rather not have to hack into the plumbing and embed a sensor into the stream, but rather I'd like to measure it inferentially somehow (e.g. perhaps the water current actually has an electrical current that can be measured through the PVC pipe with a hall effect sensor an an instrumentation-amp — not to bias the answers or anything). For the sake of bounding the problem with some requirements, I'd be happy with an accuracy of ±1 gallon/min and a component cost of less than $100. To be clear though, these are artificial requirements, since I just want to build something like this for myself. <Q> One very simple method if you know the pump specs (gal/min) and assuming pump runs at a constant speed, would be to time the on period of the pump and calculate total from there. <S> For example (just for completeness) if the pump pumps at 0.5 gal/min and it runs for 5 mins you have a total of 2.5 gal. <S> Just hack into the pump and tap into the on/off circuit then send to micro. <A> A quick google search turned up a website with a variety of flow measurement techniques and even full products for sale (albeit, quite expensive). <S> Some of these are invasive while others are not. <S> The most promising non-invasive ones I've noticed: Using ultrasound waves. <S> . <S> Takes advantage of the Doppler effect to measure fluid velocity, which can be used to calculate volume flow rate. <S> Using magnetic induction. <S> . <S> Takes advantage of Faraday's law generate a voltage from moving ions through an electric field. <A> Proton spin / Proton Precession / Nuclear Magnetic Resonance Swimming pool flow meter ! :-) <S> : <S> This would actually work ! :-) <S> Surprisingly cheap to build once you have <S> it sorted out. <S> Coil around pipe or even against (plastic) pipe. <S> High current pulse to produce brief strong magnetic field. <S> Protons in water have "spin" induced with a characteristic frequency related to the field strength, which decays over some seconds. <S> Spin induces RF field. <S> RF detector downstream slightly looks for time to peak of RF signal which depends on flow rate. <S> Wikipedia Magnetometer <S> DIY Proton Magnetometer - with circuit diagrams for transmitter. <S> They use this for field measurement so pick up signal from the TX coil. <S> Practical guidelines for building a magnetometer by hobbyists. <S> PPMs - superb report <S> Related - may be usefu <A> Does threading instrumentation down one of the plumbing ducts count as non-invasive? <S> The frequency of the hall effect output would be linear with flow. <S> Optical interrupt would work the same way. <S> 2- measure inflow and outflow pressure, and flow should scale with the pressure difference as the hydraulic analog of ohm's law. <S> 3- thread a thermistor down the plumbing in self-heated mode, and it will cool in a way related to flow. <S> If memory serves, if you get the heating current correct this will be fairly linear. <S> 4- <S> Some form of thermodilution-- inject a bolus of hot water somewhere and measure temp a bit downstream, and the area under the temperature change curve will be linear with flow. <S> 5- Thread a pitot tube down the plumbing -- the type with ports <S> both aligned with and perpendicular to the flow. <A> Magnetic inductive flow meter. <S> Fluid needs to be somewhat conductive. <S> Pool water should be OK. <S> Alternating magnetic field at right angles to flow. <S> Voltage is induced across water normal to flow and field. <S> Non invasive measurement of voltage could be challenging. <S> [Wikipedia](Manetic flow meter](http://en.wikipedia.org/wiki/Magnetic_flow_meter) <S> Commercial product Simple description <S> Useful Video with annoying sound
1- You could thread a non-instrumented propeller down the plumbing, with a magnet on one of the arms and a waterproof-cased hall effect device near the outer radius.
Single Board Computer (SBC) suggestion for interfacing with DMA I am taking over a project where a Spartan 6 FPGA provides the interface between an ADC and a DDR2 memory chip. The FPGA takes 16-bit data out of the ADC and stores it into the RAM at a rate of 28MHz. I have the option of making the DDR2 controller multi-ported so that a processor can access the DDR2 memory and begin analyzing it. Ideally I would like to find a COTS single board computer ( SBC ) for under $150 that has Direct Memory Access ( DMA ) available for an off board connection to the memory. The SBC would eventually run some type of Linux distribution so it would have to be more powerful than a standard micro controller. This is kind of stepping out on a limb for me, since I have previously developed using PIC's or Xilinx Microblaze where I designed the entire board. I'd like to move up to running Ubuntu on an established board, which is why I took this project on. Just hoping I can get some suggestions and let me know if there are any details I am not clear on or if I should be posting in a different forum. Thanks! <Q> Your numbers suggest a bandwidth of roughly 53.4 MB/s (MegaBytes!). <S> This makes me wonder about the requirements for the rest of the system given that you want to add the overhead of a heavy Linux OS like Ubuntu on top. <S> For what it's worth, there are some SBC Linux boards that offer DMA to a memory card reader to achieve somewhere in the neighborhood of 6 MB/s <S> - this figure probably does not take protocol overhead in to account so the actual data throughput is probably less. <S> Your calculation however, is all raw data, which adds even more to the challenge. <S> I'm curious to know what kind of application requires that high of a sampling rate - I can imagine something like high frequency radio transceivers need something this fast (or faster) <S> but I won't speculate as to what you're using this for - high speed data acquisition ( if this is even really considered high-speed ) is not within my knowledge. <S> Given the bandwidth requirement, what I would do is start with a computer peripheral bus that is capable of moving that kind of data. <S> PCI: <S> 133 MB/s PCIe (1-lane, gen1): <S> 250 MB/s <S> If you're willing to decrease your sampling rate, USB 2.0: 480 Mbit/s(effective throughput up to 35 MB/s) <S> These figures may or may not include protocol overhead, so keep in mind that your calculated required bandwidth is already pure data and may require much more than 53.4 MB/s considering protocol overhead. <S> After choosing the right bus, now you have the pleasure of implementing your own peripheral card to plug in to a typical PC capable of running Ubuntu. <S> You'll have to write a linux driver for your custom PCI/PCIe/USB device too. <S> I'm hoping someone replies with a nice SBC that exposes a memory bus with DMA instead... <S> the above solutions will surely be a challenge. <S> By the way, what was already processing the data after the FPGA in the first place? <S> Was it not good/flexible enough? <A> I think you've painted yourself into a corner here. <S> There are Linux-capable boards for less than $150, but none that I know of bring a memory bus out to an external connector. <S> There are boards that do have such connectors, but they're much more than $150. <S> The closest thing I can think of would be a "Blackfin Stamp" board. <S> The Analog Devices "Blackfin" family of DSPs can run ucLinux, and have, among other things, a high-speed PPI (parallel peripheral interface) that can handle video data. <S> But I'm not sure if these boards are still generally available. <S> But normally for this type of application, you'd have the FPGA and processor integrated on the same board. <S> Several manufacturers make boards like this, such as Technologic Systems . <A> Thanks for the advice regarding the different peripheral bus options. <S> I re-read my original post <S> and I realized I left out a critical piece of information. <S> My apologies. <S> The ADC is pulling data from an image sensor at 28MHz and an image is being taken about once every 30 seconds. <S> Meaning once data is stored, it can be transferred out at a slower rate. <S> My original hope was to connect the RAM bus to the SBC so that I wouldn't have to re-copy the data to the SBC, but this is looking like it might not be possible with a cheaper board. <S> If this is the case, I think a DMA interface is not the best way to go. <S> If you only need to pull the contents of the DRAM every 30 seconds, you have a LOT more flexibility. <S> Tie it into the FPGA through a SPI interface <S> (there is a hardware SPI connection brought out in the GPIO of the PI), and with a clock rate of a few megahertz, you should have plenty of time to read out your image data. <S> Now, assuming you're building the FPGA interface in-house, and don't mind making some modifications, I would suggest re-designing the FPGA board with a Xilinx Zynq microprocessor. <S> The Zynq 7000 family incorporates an extensible processing platform into devices to address high-end embedded-system applications, such as video surveillance, automotive-driver assistance, next-generation wireless, and factory automation. <S> Zync-7000 FPGAs integrate a complete ARM Cortex-A9 MPCore-processor-based 28 nm system. <S> The Zynq architecture differs from previous marriages of programmable logic and embedded processors by moving from an FPGA-centric platform to a processor-centric model. <S> For software developers, Zynq FPGAs appear the same as a standard, fully featured ARM processor-based system-on-chip (SOC) that boots immediately at power-up and can run a variety of operating systems independently of the programmable logic. <S> Basically, you use the FPGA fabric to read-out your image sensor, and then make it available to the CPU over a local DMA channel. <S> All in the same IC.
There is a dev-kit you could do testing with called the ZedBoard . For now I'm going to forget the requirement of an SBC and suggest a full blown PC. I think the cheapest, easiest way to go would just be to slap a Raspberry Pi in there.
What is this type of digits-only LCD called? I've seen this type of LCD many times in weigh scales, calculators, gauges, micrometers, etc. I know it's a fairly traditional display but I really like its compactness, simplicity, and maybe it even costs less, versus TFTs or smartphone-type touch displays. [ What is it called? Answered by @kevlar1818 and @stevenvh: "Seven-segment display"] I would like to work with this type of LCD, for example, I just found this 8-digit one called VIM-878 from the Digikey catalog; here is its datasheet . How do I interface with it? I would like to know what would be a good/common way of interfacing with it from a simple AVR microcontroller like an Atmega8 -- preferably with interfacing circuitry/parts that aren't too physically large. I presume some sort of driver or multiplexer would be necessary? I guess I'm looking for some beginning perspective from others who may have better experience interfacing with this type of LCD. <Q> Unlike the dot-matrix character displays <S> kevlar refers to these <S> are most often not intelligent module. <S> Most dot matrix displays have an HD44780-compatible controller which you simply can write ASCII codes to, but a 7-segment LCD will often be just the glass, with connections for segments and a number of backplanes (often up to 4). <S> Driving LCDs can be awkward since they don't use just two levels, so you can't drive them with common digital logic. <S> The best thing you can do is select a microcontroller with integrated LCD controller, which you can connect the display directly to, like the TI MSP430x4xx . <S> Like most controllers this one also knows just segments; it isn't aware of digits or anything. <S> (Great, first we had a dumb display, now we have a dumb driver as well!) <S> There's reason for this. <S> These LCD drivers are often used to drive custom LCDs which may be a mix of a numeric part, bar graphs and custom symbols. <S> Such a symbol is also a single segment, so it makes no sense to talk about digits. <S> This display has symbols like "battery" and "alarm clock", but also all text fields, like "AM", "PM" and "SNOOZE" are symbols consisting of a single segment (i.e. controlled by a single bit). <S> Further reading MSP430x4xx Family User's Guide . <S> LCD controller is covered on p.709 ff. <A> A seven-segment display or dot matrix display are what you're referring to I believe. <S> Here's an example on Sparkfun with the relevant datasheet . <S> Found this AVR example/tutorial in the "Documents" section of the product page. <S> Isn't Sparkfun great? <S> Given this 14-segment display , and its datasheet , let's figure out how to use it. <S> Let's take the example of showing a 7 in the first (leftmost) segment cluster. <S> To write a 7 , we need to assert segments 1A , 1B , and <S> 1C , as seen in the datasheet. <S> These segments all map to pin 35 of the device, but on different COM lines. <S> With such a cryptic datasheet, my best guess would be that these COM lines map to pins 17 through 20, given the table in the datasheet. <S> Thus, to assert each segment above, you would hold pin 35 high while quickly cycling between asserting COM1 , COM2 , and COM3 via pins 18, 19, and 20 respectively. <S> The three segments would all appear lit simultaneously, creating a 7 . <S> This being said, well-written code simply will use some sort of map for any given character to be displayed. <S> The challenge is to make this map work for ANY of the segment clusters. <S> I still recommend a dot-matrix display like the first one I linked to; there are certainly more lightweight designs out there. <S> The benefit to using a dot-matrix display is that most have a data register built-in, so you can just pass it 8-bit ASCII characters, no funky implementation issues like in the 14-seg example above. <A> What you are thinking of is called a 7 segment LCD. <S> If you know how to light up a regular LED then your 1/8th of the way there. <S> Here is the Wiki to it. <S> It has some theory on how you would create numbers by lighting up different arrays of the LED's: http://en.wikipedia.org/wiki/Seven-segment_display (de)Multiplexing is a good method for lighting up a large 7-Segment panel, although not necessary. <S> If your I/O ports are limited then it's the way to go. <S> The basic's of demuxing work like this (assuming you know binary here). <S> Look at this picture: With a 3 bit binary number like 000 we can represent up to the number 7 (I.E. to select port 5 <S> we'd have ABC be 101). <S> What would happen in the demux in your situation is one input is something like a high signal, and AB&C are I/O ports. <S> The 0 to 7 are connect to each segment of the LCD and by writing to ABC from your controller you can light up a segment. <S> You may be saying wait <S> but if I want to light up a number I need many segments lit, not just the 5th segment. <S> Well after that you can look into two roads to get the LCD to display a number. <S> The first is add more demux's for additional needed segments. <S> The second is a software approach which involves very very quickly flashing each of the segment required to create the illusion that the panel is completely lit. <S> The AVR chip in your mega is operating in the Megahertz range if you write a loop to display ABGED (from the wiki pic) you will end up seeing something that looks like a number 2. <S> Hope this gets you started.
It's a 7-segments display .
Difference between Multiplexer/Demultiplexer and Analog Switch What (if any) difference is there between mux/demux IC's and analog switch IC's? I'm comparing this in the context of chips with the same IO lines (for example a 1:2 or 2:1 mux/demux vs. a SPDT analog switch). <Q> If you are referring to a digital mux/demux, then the flow of information is in only one direction, from the input to the output, and the signals are strictly digital. <S> This means that exact voltage levels are not preserved, just logic states. <S> A basic analog switch is SPST, so it can connect two signals together and the flow of information can be in either direction. <S> The resistance of the analog switch is relatively high when the switch is "open" and relatively low when the switch is "closed". <S> An analog mux/demux is basically a collection of N analog switches where one end of all of the switches is connected to a common point. <S> Some digital logic is used to decode the selection inputs and make sure that only one of the N analog switches is closed at any given time. <S> If you set N to be 2, then the analog mux/demux can also be considered an analog SPDT switch. <S> If you set N to four <S> you have an SP4T switch or a 4:1 mux/demux, and so on... <A> Analog switches usually have a much lower on-resistance, to less than 1 Ω , and can switch currents up to a couple of hundred milliamperes. <S> HCMOS mux/demux ICs are designed to switch signals only, and then a resistance of a couple of hundreds of ohms is often acceptable. <A> The definition of the multiplexer is pretty wide - it can be analog, in which case it's very similar to an analog switch; but it can also be entirely digital, built from logic gates. <S> I assume you are asking about analog multiplexers. <S> The general difference between a mux/demux and an analog switch is this: a mux is a signal selector, allowing you to route a signal from N inputs to 1 output. <S> A demux will do the opposite, routing a signal to one of the N outputs. <S> Analog switches, on the other hand, have topologies similar to those of regular switches: SPST, SPDT, etc. <S> If, for instance, you take a quad SPDT analog switch, and connect the common terminals to each other, you will create a what is topologically similar to a 4:1 multiplexer. <S> There are many other differences, like directionality of the signal, of course. <A> A multiplexer is a device which takes one of several signals (which may be digital or analog) on the input and makes it available to the output. <S> Multiplexers are generally designed so that a device attached to the input will not "notice" whether or not it is feeding the output. <S> In many cases, a multiplexer will include amplification on the inputs, output, or both, so as to ensure that the device feeding the input will see a constant load whether or not it is being routed to the output. <S> An analog switch is a device which simply connects wires together, generally without regard for which wires are "inputs" and which are "outputs". <S> Analog switches, like mechanical switches, are available in SPST, SPDT, DP4T, SP8T, and other configurations. <S> If the common wire of an analog switch is connected to a high-impedance input, and the "poles" are connected to low-impedance outputs, the analog switch may be usable as a multiplexer; indeed, a typical method of multiplexing analog signals is to pass each signal into an amplifier (whose output will be low impedance regardless of the impedance of the driving signal), use a multi-pole analog switch to connect one of the amplifiers to the input of an output amplifier (whose output impedance would not be affected by switching). <S> There are many situations where a multiplexer would be ideal, but an analog switch will work adequately. <S> In some situations, an analog switch will be inadequate and a buffered multiplexer will be needed.
There are some situations in which an an analog switch is needed and a multiplexer would be unsuitable, since an analog switch allows free bidirectional flow of information and a multiplexer does not.
Step up DC/DC 5V -> 6V I have a circuit that runs 5V. I need to integrate a CO2 sensor that requires 6V. What would be the simplest, most cost effective way to do this? I need about 200ma for the sensor <Q> But it costs 1.88 dollar in 1s at Digikey, while the cheapest I found is only 70 cent. <S> That's the Semtech SC4503 . <S> This is the typical application schematic from the datasheet. <S> Again, this will be similar for many other step-up switchers. <S> The SC4503's reference voltage is typically 1.25 V, so for 6 V out you have to set R1 to 190 kΩ. <S> At 12 V out and 200 mA the SC4503 will have a 90 % efficiency, for 6 V you can expect a slightly higher value. <S> It can supply more than 1 A of output current, so you'll have lots of headroom. <S> Comes in a SOT23-5 package, and the 1.3 MHz switching frequency means you only need a small inductor. <A> It is available in SOT23-5 package as well as 6-SON (similar to QFN), so you can start with a larger prototyping-friendly footprint, then move on to a smaller one for a final product. <S> Also, it's a fairly popular and inexpensive part, so you should have no trouble obtaining it. <S> I think it costs a $1-2 in single-unit quantities. <S> I have used it before (for an LCD backlight application), and had good results with little layout effort (minimal number of peripheral parts, including a 10uH inductor). <S> Here is its datasheet . <S> If you can't get that one, frankly there are dozens of options out there; just look under stepup/boost regulators in Digikey or Mouser. <S> I just find that particular one to be convenient and reliable. <A> Check the acceptable voltage range for all your components. <S> There's a good chance you can run both all of your logic AND the CO2 sensor at 5.5V, so you'd just need to adjust your primary supply.
The TPS61040 (from TI), among other adjustable-output step-up regulators, can accommodate 200 mA or more current draw at output voltage of 6V, from input voltage of 5V. boardbite 's TPS61040 is just one of many step-up converters which will do the job.
Multisim and choosing a FPGA Board A couple years back in my Digital Electronics class we designed circuits in NI Multisim and then used Xilinx Impact to put it on a FPGA board via USB. It has been a while since I dealt with that stuff and I am again interested in designing circuits doing more with it. I really have no clue what board I used in class other than it was the size of a computer motherboard and had a small breadboard for sensors and to light up led's, control motors, etc. What kind of board do you recommend for this beginner use and future? Also if you have any software/applications that would be helpful, please suggest. Just found a great article: http://hamsterworks.co.nz/mediawiki/index.php/FPGA_course Edit:Here is a couple of questions I have created after some answers. How do I know if a board can take PLD Logic from Multisim? What can I use the ports on the board for (serial, expansion headers)? <Q> I don't know what your budget is, but Digilent have quite a couple of different boards - and also offer student discounts. <S> We used the Spartan3/3E starter boards and the Nexys2 boards at my university. <S> A Spartan3/6 board would allow you to do all the basic stuff, and the Xilinx ISE Webpack software suite used for programming it is freely available. <A> I am Altera fan. <S> The Quartus Web Edition package is a little more user friendly, and the compile times faster in my experience. <S> If you're interested in higher speed and lower parasitics, I would go with the DE0. <S> I have used both of these boards, and they're both good. <S> Edit: <S> Using Multisim to develop for FPGAs is going to limit what you can do significantly, and I'm pretty sure that is a Xilinx only feature. <S> That's a good way to learn basic gate functions, but seriously, no real developer does that. <S> To really take advantage of an FPGA, you really need to learn an HDL. <S> VHDL and Verilog are most common. <S> If you really want to draw schematics with the logic gates, Quartus has that feature. <S> As far as the ports, most go to the FPGA pins. <S> Some go to Vcc and Gnd for convenience. <S> The thing you need to understand about FPGAs is they were designed to be extremely flexible and fast to develop. <S> Very few pins on the package have a dedicated function. <S> Outside of the obvious, like Vcc, Gnd, etc, most are general purpose IO ports. <S> That means they can be inputs, outputs, high Z, didirectional, etc. <S> Do you want it to be a serial port? <S> Then you need to develop a hardware description that produces a meaningful serial output. <S> There is a reason that FPGA development boards are expensive. <S> Not many sell because to really dive into FPGA development, you really need to take a class or have someone that knows what they're doing around to help you. <A> I just bought this board to play with: Avnet Spartan-6 LX9 MicroBoard
Development board wise, I would get a De1 board or a DE0-Nano .
What is a false path timing constraint? In FPGA world, what exactly are false path constraints for an HDL compiler? Why are they useful? <Q> False paths are timing paths that will never really be exercised in the final design. <S> Suppose you are designing a 4-bit counter and it turns out that there is a very slow delay path when incrementing from 12 to 13. <S> If your design always resets the counter whenever the count equals 9 then that slow path will never be seen in the actual design. <S> You label the slow path as a false path so that the compiler doesn't spend any time, or add any extra logic, in an effort to make the false path run faster. <A> A false path is a path that does exist in the design but does not play a part in the operation, so it's not necessary to include it in the timing analysis. <S> There could be various reasons for this being the case, but since the timing analysis tool usually doesn't know (although there are some tools which can detect them) which paths may be used or not, you have to tell it. <S> It's similar to a multi-cycle path, where you can tell it that a certain path is allowed to use more than one cycle to complete. <S> An example (of a false path) is a register that might be written once on power up, but then remains in the same state. <A> There are two of reasons to exclude paths, first because the false path will make the tools work harder to meet timing for that signal which will in turn affect legitimate signal paths possibly causing additional timing errors and because it will cause the timing check to report failures possibly distracting the designer from legitimate timing errors. <S> False paths are caused by logic paths between unrelated asynchronous clocks or clocks of the same frequency but with unknown phase relationship or a path that would never be activated during normal circuit operation. <S> Telling the tool to ignore a path doesn't make the timing work only that the timing is not checked. <S> It is up to the designer to manually insure the correct synchronizing logic is used for these ignored signal paths.
Simply, a false path is a logic path that you want excluded from being checked to see if it meets timing during timing analysis.
ATMega32 vs. ATMega32A - one works, that other one not I've got a setup with an ATMega32 running perfectly. When replacing the ATMega32 with a ATMega32A, nothing happens any more, not even the crystal oscilator swings. According to the changenote from Atmel, the reset pull-up resistor has a good value and the pull capacitors next to the crystal are also in place.I tried with many different parts (all from one shipment) of the ATMega32A, always the same behaviour. Changing back to the ATMega32 everything is fine again. Finally I setup a circuit only with the AVR, reset pull-up, crystal and pull-capacitors. ATMega32 works (crystal swings), ATMega32A does not work (crystal swings not). Could you think of anything but all ATMega32A I have in the lab are broken? <Q> You haven't mentioned fuse bits anywhere - you may have to set the ATmega32A fusebits to the proper values. <S> That's usually the issue when the oscillator doesn't work. <A> Even though the specs are the same, you might get different behaviors when running the parts slightly out of spec, due to different manufacturing processes. <S> For example, if your loading capacitors on the crystal weren't quite in the right range, the ATmega32 might have worked anyway, while the ATmega32A could be more picky. <S> Same with voltage, supply current, supply noise, timing constraints on the programmer, etc. <A> Hi for my ATMEGA32A PU <S> this helps: <S> avrdude -c <S> usbasp <S> -p <S> m32 -B 3 <S> To write a hex file to micro-controller I use: <S> avrdude -c usbasp <S> -p <S> m32 -B <S> 3 -U flash: <S> w:Program.hex
The two devices may have fuse bits set for different oscillators and/or startup times.
Cleaning Circuits with Compressed Air I've been arguing with a colleague whether it is a sensible solution to clean dusty PCBs with compressed air. While I think this is the best solution (nothing touches the PCB), he claimed that spraying off the dust can cause ESD, because the charges that may have accumulated in the dust win't bleed off in the process (and it's better to leave everything as it is). I'm not really convinced by this argument and my (limited) knowledge of ESD production doesn't help getting peace of mind in this matter. What is your input? <Q> You'll indeed risk building up high static voltages. <S> Blowing air can do this easily. <S> Think of thunderstorms when a cold front slides under the warmer air pushing it high upwards: the air-against-air movement can build up millions of volts. <S> In the case of the compressor your "lightning strikes" will be restricted to a few cm maximum, with energies of a few mJ, but that will be enough to destroy your CMOS parts. <A> IPC-A-610: Acceptability of Electronic Assemblies Section 3.1.2 mentions compressed air as a possible source of electrostatic discharge. <S> This forum post which claims to lay out the "Truths, myths, and flat out lies" about ESD notes that compressed air is a source of ESD due to the air rubbing against the air. <S> But it claims that most of the charge is dissipated from the air particles before they hit the surface. <S> However, if you read the IPC spec, it talks about building up charge due to the air moving over insulating surfaces. <S> So the charge will build up as it leaves the nozzle from air to air friction. <S> Some (but not all) of that charge will dissipate as it travels to the board. <S> But more charge will build up as the air moves across the laminate of the board itself. <S> The compressed air will defiantly have some charge as it leaves the can and it will build up more charge as is blows across the board. <S> Whether or not the amount of charge is enough to damage your parts depends on a lot of factors. <S> But it is very possible. <S> When in doubt, test it . <A> I really don't think that clean, dry air can carry a charge or cause ESD. <S> After all, ionized air is often used to reduce ESD risks. <S> However, if there are any particles or droplets at all in rapidly moving air, these can easily transport charge from one place or another, acting just like the belt in a Van de Graaff generator. <S> It's the raindrops in a thunderstorm that create lightning, and I have gotten some surprising jolts from the plastic hose of my shop-vac when cleaning up large quantities of sawdust. <S> That said, I still think that "cleanliness is next to Godliness" with electronics, and the consequences of leaving dust in equipment are far worse than the risks of removing it. <S> I regularly clean dust out of gear using both a vacuum cleaner and/or compressed air. <A> While I'm not a technical guru like the likes of you all, I believe the key element of this part of the debate hinges on " conductive ." <S> When the air is dry, your body (or the ESDS devices) are the best conductor around, so the static suddenly discharges into you or the tech, as the best path of least resistance. <S> When humidity is high, the air is relatively better as conductor (as Dave Tweed said), so the static generated/accumulated by your movements, clothing, carpeting, etc. <S> dissipate and discharge more readily, in a diffuse fashion. <S> (And yes, it is the water and ice droplets passing up and down, shearing off electrons, that negatively charges up thunderclouds, as Dave also mentioned.) <S> Thus the reason electronic assembly areas keep humidity above approximately 40% to reduce worker's charge build up. <S> Ionization of course, can be the problem or a cure: <S> neutralizing static through active air ionization becomes an option in cleanrooms and the like (ex. discharging injection mold plastics for use in devices), in addition to or as an alternative to insulating and grounding. <S> " <S> Active air ionization employs high-voltage ac or pulsed dc to produce ionized air to neutralize surface charges. <S> " A little plus works a treat with the negative, and discourages particles otherwise drawn to charged surfaces too. <S> So, to my pal Dave T, the key there is that the ionized air used to reduce ESD levels is positively ionized, to balance the negatively charged (electron) static. <S> (Much like, in lightning strikes, the flow of negatively charged energy downward is met by a jolt of positive flowing upward to the highest point of a tree or rod--the opposites attract. <S> This is how lightning chooses its path.) <S> Ultimately, the concern is less about preventing the creation of static, but where the charge is going to go when it is. <S> Take preventative steps, consider risk vs. need, test and good luck. <A> Yes, fast moving air can cause ionisations and therefore present a risk of ESD damage to your pcb. <S> Second, why do you wish to clean the pcb?If the board is working, then leave it alone as much as possible- <S> otherwise you risk introducing defects or damage in addition to the ESD issue. <S> If the board is not working and you wish to repair it...find the fault and do as little as possible to the board to fix it.
As embedded.kyle pointed out far more technically, compressed air will in fact create charge particles in the air and on the boards. Dust inhibits the transfer of heat, and dust+humidity can develop into conductive surface contamination that can be very hard to remove later.
What is the simplest way to interact with an I2C peripheral? I have an I2C peripheral that I need to interact with using a Windows 7 PC. The interaction could be through a terminal emulator, or any program that can produce a real-time log that I can process using a scripting language. Based on your experience, what is the least painful way to achieve this? <Q> In my experience the easiest way is the Bus Pirate, which is also a cheap alternative: http://www.seeedstudio.com/depot/bus-pirate-v3-assembled-p-609.html?cPath=61_68 <S> You can find a good tutorial for it: http://dangerousprototypes.com/bus-pirate-manual/i2c-guide/ <S> And people in forums such as this is are familiar with it. <S> For hobbyists, bus pirate is the way to go. <A> The are plenty of USB to I2C converters around, this would maybe be the "least painful" way to connect to your peripheral. <S> Here is an example : <S> This one is a bus master, and seems to have half decent documentation and some sample C# code. <A> I would use the ATMega chip from an Arduino Uno, or the Arduino itself. <S> Examples abound in Arduino land...
It is easy enough to interface via a terminal from a PC, then link commands from the terminal to the Arduino and have it do things with the I2C bus.
Why do computers only use 0 and 1? Why do computers only use 0 and 1? Won't the addition of other numbers such as 2 or 3 speed up computers? Also, 2 and 3 can be used to shorten the bit-length of integers (2 and 3 can be used to end an integer, so that the number 1 only needs one two bits.).. Why is binary computer more preferred? <Q> It wouldn't speed them up. <S> Now it's easy: to make a basic logic gate like a NAND the logic inputs either pull the output to Vdd or to ground. <S> If you would use intermediate levels you would need FETs to go to levels like Vdd/2 or Vdd/4. <S> This would consume more power, and would require more accurately working components, which would need more time to settle to the final level. <S> If you would stuff more values in a single data unit the required accuracy would increase, as would settling time. <S> The binary system used now just pushes the FET hard to Vcc. <S> exscape mentions noise immunity, and that's what the accuracy refers to: how much may the signal deviate from nominal. <S> In a binary system that may be almost 50 %, or more than 0.5 V in a 1.2 V processor. <S> If you use 4 different levels they're only 300 mV apart <S> , then noise immunity can't be better than 150 mV, possible <S> 100 <S> mV. Note that there are Flash devices which use multiple levels to store more than 1 bit in a single memory cell <S> , that's MLC (Multi-Level Cell) Flash. <S> That doesn't increase speed, but packs more data on a single chip. <A> Binary level storage and computation are very cheap, small and fast. <S> This text may be oversimplifying, but I guess it gets to the point: <S> Reading a binary memory cell consists of just one simple comparator doing its job: high / low. <S> Computation comes down to very simple tables of four input combinations (00, 01, 10, 11) to two bit output (0 and 1) mostly. <S> Now if you have to compare for several possible values, there has to a more complicated comparator setup that is either slower or way bigger than the simple one. <S> Also, the computation tables become bigger, so the computation is also more complicated. <S> While we might save some small area for making storage smaller, everything else, like computation & transport would become exponentially more difficult and slow. <S> As discussed in another answer, the whole setup also would have to be way more precisely built to keep noise immunity. <S> All these things combined mean: it is way more efficient to place billions of binary gates on a chip than just half a billion of quaternary ones. <A> Go around your house, or if you dont have any of these kinds of switches go to a hardware store, see how easy or hard it is to put and leave the switch in the middle of on an off, adding a third state, now try to see if you cant make for distinguished positions. <S> Another example, take a coke can or beer bottle or any other object that is cylindrical and lay it on its side, then balance a marble on the top, how easy and fast and stable is that balanced marble? <S> using a transistor as a switch is very easy, drive it to one rail or the other, easy to sense the output. <S> Now if you were to try to have all the transistors not be on off switches but instead calibrated to different ranges one for each state <S> (in addition to all on and all off, two middle states as you suggest). <S> Now the entire system has to be much more accurate, expensive, subject to error and failure, etc. <S> Basically this was tried, an or some early computers tried to be decimal (10 voltage levels), it failed. <S> be it a tube transistor or silicon <S> , it is significantly easier, cheaper, faster, more reliable to use the transistor as a switch and have only two states, lower rail and upper rail. <A> Clearly it can be done. <S> All† digital storage on this planet is 4-state. <S> DNA encodes data as one of four base pairs per bit, arranged in bytes of 3 bits each. <S> Each byte therefore can have 64 different states.   <S> †Except for a infinitesimal fraction artificially created by one of the sentient life forms. <A> Binary number system is made up with 0 and 1, as you know. <S> Other popular or previously used number systems were Octal, Hexadecimal and Decimal number system. <S> Binary, Octal, Decimal and Hexadecimal has 2, 8, 10 and 16 digits respectively. <S> Why? <S> That's because we can only rely on two digits to construct the circuits. <S> The circuit design is comparatively easier to implement. <S> Using Binary number system in designing circuits is less time consuming, less complex, need less circuit elements and in all aspects it's more affordable than others. <S> Octal and Hexadecimal systems were used earlier in designing computers. <S> But they were complex. <S> The circuitry were complex too. <S> So Engineers started using Binary system for previously mentioned advantages. <A> Why is a binary system used instead of decimal system Good question. <S> Actually, there exist computers that don't use the binary system. <S> These computers, constructed from op-amps, are called ANALOG computers. <S> The analog computers can add, subtract, multiply and divide, and even do some types of integration. <S> Why is binary computer more preferred? <S> Binary computers are more accurate, sometimes. <S> Also, binary computers (like my laptop) can be millions of time more complex. <S> I guess. <S> Analog computers need to be operated in certain limited conditions, and give limited answers. <S> You can make a digital computer as complex as you want.
For implementing logic circuits, Binary system is a bit less complex.
Alternative to A4988 stepper motor driver? The stepper motor driver based on the Allegro A4988 (also A4983 ) has a lot of problems with temperature. It is getting very hot and stops to work. And it is difficult to set up with the potentiometer. When the current is too high, driver gets hot and steps get lost. When current is too low, there might not be enough power and steps get lost as well. Are there any alternatives to this A4983? Pololu A4988 Datasheet <Q> There are many companies who do do dedicated chips for stepper drivers. <S> The A4988 has a step+dir digital interface. <S> If that's what you want, then you could for example use the Texas Instruments' <S> DRV8825 <S> I was myself looking at different ways of interfacing stepper motors (not just step+dir), and made a comparison table of stepper motor drivers . <A> I also have the a4988 stepper drivers and am running into the same problems as you are, so I am very interested in finding alternatives. <S> This won't answer your question but maybe will help alleviate the quirks of the a4988. <S> I have found that attaching small heat sinks (such as these ) and putting a fan across them helps with the overheating. <S> Pololu also has the "Black edition" of the a4988 which has 4 layers instead of the normal 2 and supposedly gives it better heat dissipation. <S> I haven't used this myself. <S> Good luck <A> It seems manufacturers are trying to make the chips smaller to impress each other, but they would work better if they were bigger. <S> The L6207 L6208 ran very cool.
One could also imagine attaching a peltier cooling system to them in order to further alleviate the heat dissipation problem. Ive used the L6474 and it runs terrible hot too.
Scale 30-50 mV signal to 0-5 V range I have a CO 2 sensor that output signal values 30-50 mV. I need to translate these voltages to 0-5 V for my microcontroller with the highest resolution. I understand that I can amplify the voltage using a non-inverting op-amp circuit, as shown, to a range of 3-5 V, but is it possible to expand that range to 0-5 V in order to get better resolution of sensor values? <Q> You can use a differential amplifier to subtract the 30 mV offset. <S> When R1 = R2 and R3 = <S> R4 <S> the transfer function is \$ V_{OUT} = <S> \dfrac{R3}{R1}(V_2 - V_1) <S> \$ <S> So set V1 to 30 mV and choose R3 = <S> 250 \$\times \$ R1. <S> A problem with differential amplifiers is that R1 will load the resistor divider to get the 30 mV offset, so that you have to recalculate the resistors, and also V2 will have an input impedance which may distort the measurement. <S> Most instrumentation amplifiers are differential amplifiers with a buffering input stage. <S> The input stage sets the gain, while the differential stage is usually a \$\times\$1 amplifier. <S> The amplification is then \$ V_{OUT} = <S> \dfrac{2 R2}{R1}\cdot \dfrac{R4}{R3} <S> (V_2 - V_1) \$ <S> The Microchip MCP6N11 is a suitable device. <A> An instrumentation amplifier is what you need here (though an opamp could be used with some attention to detail) <S> Depending on your supply (single, dual) you need to be careful though. <S> If using a single supply (e.g. 0-5V) you must make sure the InAmp can handle common mode inputs of the level of your input signals, which will be 30-50mV relative to ground (so the input range must include ground) Also since your output includes ground (and power rail if using a 5V supply) you must make sure the output can swing fully to both rails. <S> Many InAmps don't do either of these things. <S> The LTC2053 is one rail to rail in/out option, as is the MCP6N11 Steven mentions. <S> EDIT - the <S> LTC2053 will not be suitable as the input impedance is not high enough. <S> The MG811 datasheet specifies the need for an Opamp/Inamp with an input impedance of >100GΩ, so something like the MCP6N11 Steven recommends is needed. <S> This has an input resistance of \$ 10^{13}\Omega \$, which is \$ <S> 10\ T\Omega <S> \$. I have left the rest of the answer to demonstrate a typical setup, since the principle is the same regardless of the Inamp used. <S> Anyway, as long as you take care with the above, the setup is pretty simple. <S> Apply 30mV to the inverting input, signal to the non-inverting input and set gain for (5V - 0V) / <S> (50mV-30mV) = 250. <S> Here is a dual rail (+ <S> -5V) example circuit with the LT1789 InAmp: <S> Simulation: <S> Single supply <S> LTC2053 circuit (simulation not shown as it's the same as above): <A> Use an instrumentation amplifier like this one . <S> Since you want to amplify 30-50mV to 0-5V, 5V/(50mV-30mV) = <S> gain of 250. <S> Use the datasheet to select a gain resistor. <S> For my example, G = 1 + (100k/Rg), so Rg = 100k/(G-1) for 402 Ohms. <S> These values need to be pretty exact, and when in doubt make it a little bigger and sacrifice a little span. <S> Since you want 0-5V, you'll want to set the reference voltage to 2.5V since that is the middle of the span. <S> Use a reference diode for that.
An instrumentation amplifier is the solution.
Why does connecting batteries in series result in doubled current sourcing while shorting? I have Duracell Ultra Power AAA batteries, current draw is around 2.5A when shorting for single unit. I have just tried connecting them in series and parallel then measure discharge current. Results: Parallel: A bit increased current sourcing Series: doubled current sourcing It doesn't make sense if we think in terms of V=IR since series connection also increase internal resistance. So my question is why? I doubt battery chemistry is the limiting parameter not the internal resistance ( maybe it is low enough?) (BTW my end goal is to use 2 AA batteries to step up to 3.6V while supplying 2A for short bursts) <Q> I think this is due to how you are measuring the current. <S> Your results all make sense if the resistance of your current meter is higher than the internal resistance of the battery at the measured current. <S> Think of the limiting case where the batteries are pure voltage source (no resistance) <S> and you put a fixed resistance accross them (your current meter in this case). <S> Under these conditions, the current would be proportional to the total voltage, and you'd get pretty much what you measured. <S> The other limiting case is where each battery has a fixed finite internal resistance. <S> This can be thought of as a resistance in series with a ideal battery. <S> In this example, the "short" is truly a short of 0 Ohms. <S> Now the short circuit current of any one battery is fixed, which is the battery voltage divided by its internal resistance. <S> In this case adding any number of batteries in series won't change the short circuit current, but putting then in parallel multiplies the current by the number of batteries. <S> From your measurements, I think what is going on is close to case 1, not case 2. <A> All you need is a single external resistor and a voltmeter. <S> First, a battery can be modeled as a series of an ideal voltage source of \$V_{BATT}\$ volts and a resistor of \$R_{BATT}\$ ohms. <S> \$R_{BATT}\$ is the battery's internal resistance. <S> This model is not perfect, because \$R_{BATT}\$ actually varies with charge, load, temperature, etc. <S> But it's close enough, so a typical rechargeable AA / AAA battery may look like this: <S> \$V_{BATT}\$ is easily measured with a voltmeter - it's the open-circuit voltage of the battery. <S> Now, to calculate \$R_{BATT}\$, we need that extra resistor of \$R_{LOAD}\$ ohms: <S> When the \$R_{LOAD}\$ resistor closes the circuit, it forms a voltage divider with \$R_{BATT}\$. <S> If the voltage across \$R_{LOAD}\$ is \$V_{LOAD}\$, then: $$V_{LOAD} <S> = V_{BATT} * \frac {R_{LOAD} }{ R_{BATT} + R_{LOAD}}$$or, by rearranging:$$R_{BATT} = <S> R_{LOAD} <S> * ( \frac{V_{BATT}}{V_{LOAD}} - 1)$$ <S> All values on the right-hand side can be measured directly. <S> Note <S> : On the schematic above, when SW1 is open (or \$R_{LOAD}\$ is absent), VM measures \$V_{BATT}\$; when SW1 is closed (i.e. \$R_{LOAD}\$ completes the circuit), VM measures \$V_{LOAD}\$ <S> Note <S> : There are a couple of things to consider, when choosing the value of the load resistor: <S> It has to be low enough, so that the \$V_{LOAD}\$ measurement yields a useful result. <S> With an internal resistance typically in the range of 0.05 ~ 1 ohm, a 100 ohm load resistor would drop 99+% of the voltage and would introduce a lot of error in calculation. <S> It has to be high enough, so that the discharge current is not too high - batteries don't like that and may be permanently damaged if (near-)short-circuited for too long. <S> I can't provide exact values, but anything under 1A should be OK. <S> It has to be high enough, for the specific resistor package / wattage, so that the resistor itself does not catch fire in the process. <S> The power dissipated in the resistor is approximately \$V_{BATT}^2/R_{LOAD}\$ <S> A common 10 ohm 1/4W resistor should be fine for a quick test of AA/AAA batteries: <S> Discharge current is 0.12 <S> ~ 0.15A <S> , dissipated power is 0.144 ~ 0.225W. <S> To be on the safe side, a 1/2W resistor would be a better choice. <A> Maybe a shorter answer would be more to the point: paralleled, = <S> > <S> 1.5V <S> series = <S> > <S> 3V <S> Suppose the resistance is 1 Ohm = <S> > <S> 1.5/1 <S> = 1.5A <S> 3/1=3A <S> Extend this to your case: the finite multimeter resistance (+wires) plus internal ones.
You can estimate the internal resistance (hence the shourt-circuit current), without using an ammeter.
Running router out of its case I'm currently building a robot, and as part of its spec it must connect to a wifi network. I have a Belkin wireless router, which I have taken out of its case to expose the PCB. My question is: Is it dangerous to run the wireless router when its out of its case, as the case provided some sort of shielding? I am only 16 and studying electronics, so I am not really sure if the plastic router case actually sheilds anything, or is only there to house the electronics... <Q> About the only thing I would consider "dangerous" in a router would be the wall power. <S> I doubt the case was ever any kind of shield. <S> At best it was a mechanical barrier to prevent dirt from getting in and things falling onto the circuitry that could cause shorts or whatever. <S> Keep in mind that the router will produce a relatively strong radio field in the immediate vicinity of its antenna. <S> Too much metal nearby <S> the antenna can reflect and refract the radio waves, and de-tune the antenna. <S> This effectively means the range will be reduced, but this probably won't matter if the robot is not operating at the fringes of the access point's range. <S> The radio field can also interfere with other nearby eletronics. <S> Try to keep the antenna above and away from other electronic things. <A> The plastic casing adds safety in the obvious sense of preventing one from touching Mains-AC-levels and likewise that one's hands won't cause electrostatic damage to the sensitive parts. <S> However, do verify for your project's sake that removing the housing on your specific router doesn't remove any of the FUNCTIONALITY, i.e., in case there are any components that are attached to the case. <A> No the plastic doesn't shield, and you can use it out of the case. <S> If it had shielding it would look like a thin aluminum foil. <S> Since it doesn't seem to have that it will comply with FCC/EU regulations without it, and will so out of its case too.
If your router is powered from a wall wart, as many of them are, then there is little that can hurt you inside the case. But aside from that, if you are careful about what you are doing with the PCB itself, you should be fine without the case.
Why are we still using resistors with %5 tolerance while they can even manufacture a 14.318182MHz crystal? Year is 2012 and I can only find %5-tol resistors in the local market. They can make transistors at molecular scale, they can manufacture 14.318182MHz crystals, they can place trillions of flip-flops inside a memory chip. Then why don't they start manufacturing %0.01-tol resistors? Is resistor manufacturing a more difficult job compared to the ones I mentioned above? What is the reason for still manufacturing %10-tol and %5-tol resistors? (I'm asking this because I learned that the following circuit may not work because the resistor values may differ greatly from the rated ones.) <Q> 0.1% resistors are widely available. <S> Digikey lists 59,000 part numbers. <S> But the price is higher, like @ $0.04 in reel quantities, instead of $0.001 each for 5% tolerance. <S> If your design needs high tolerance, and your market isn't sensitive to a few dollars of price difference, there's absolutely no reason not to design with tighter tolerance than 5%. <S> At my previous job, we used 1% resistor tolerances as a standard, figuring that it was cheaper to spend a tenth-cent or so extra per resistor, rather than do the extra engineering to be sure the extra tolerance is acceptable (or to skip it and end up shipping bad products). <S> But in other markets, a few cents per resistor (say you have 1000 resistors in a design, those pennies add up) does make a difference. <S> Also remember that any cost difference in the BOM gets multiplied up by a few times by the time the product gets on the shelf at Best Buy. <A> The basic answer to your question is that for 99.9999% of the applications of resistors, the improved tolerance would have no value. <S> Circuits are generally designed to work just fine with 5% and 10% resistors. <S> In the specific example you show, it really isn't the absolute tolerance of the resistors that's important, it's how well they're matched to each other. <S> You can indeed purchase matched resistor arrays (and tight-tolerance resistors) for such applications. <S> Needless to say, they're rather more expensive then the jellybean 10%, 5% or even 1% parts that are more commonly used. <S> That's also why monolithic instrumentation amplifiers are valuable in such applications. <S> They have all of the matched resistors integrated into the chip, and they're constructed so that all of the thermal, process and geometry variations (mostly) cancel out, so they're very well-matched indeed. <A> One more point worth considering <S> : Maybe there's a problem with the local market? <S> In my local market, I have no problems getting 1% resistors and sometimes there's a larger choice of 1% resistors compared to 5% resistors. <S> It's not always the question of can it be made but will people buy it too. <S> Maybe your merchants for some reason believe that not enough people will buy 1% resistors, so they don't bother having them in stock (Basically what's it worth to them to have a part in stock when others sell well enough?) <S> or they may be just lazy <S> *. <S> Maybe very small amount of people actually expressed their desire to use such resistors. <S> Perhaps there's a non-obvious way for those resistors to enter your local market? <S> Here where I am, we have companies that specialize in obtaining components which nobody else has in stock in amounts low enough so that working directly with foreign distributor would be too expensive. <S> Since we know that 1% and better resistors are commonly available in some parts of the world, the reason could be something specific to your market. <S> * <S> For the end a short story about human nature possibly related to this issue: I lived in another country for several years and found there a brand of printers that I like very much. <S> When I returned to my homeland, I noticed that nobody even heard of that brand. <S> It so happened that I stumbled upon the office of the distributor for that brand and talked to them for a while. <S> I was basically told that they're not expanding since they already have enough customers to sustain their company and that they don't want to bother having more customers than it's necessary for them to continue existing. <A> You are mistaking the number of digits in the specification of the nominal frequency of the crystal for its tolerance. <S> An inexpensive 14.318182 MHz crystal is not accurate to single-digit Hz. <S> Those in the Digikey catalog are rated at between 10 and 50 parts per million, which is to say they are specified to have an error of +/- <S> 143 to 716 Hz depending on which one you pick. <S> Just as with resistors, the tighter tolerance you want, the more you will pay. <S> And at a certain point, the specified tolerance can only be achieved <S> if you use it in a temperature controlled environment matching the calibration temperature - this is fairly common with precise crystal oscillators, such that you can buy "oven" crystal oscillators which include a heating element and control circuit for it. <S> You would also need to match the load capacitance for which the crystal is designed: <S> conversely, by varying this you can "pull" the frequency of the crystal a few KHz - non-linear, but enough to have been historically useful for giving some frequency choice in crystal-controlled narrowband morse-code amateur radio transmitters, without the more substantial calibration and stability problems of an LC variable frequency oscillator. <A> While 5 % resistors will be fine in a lot of circuits I tend to use 1 % resistors. <S> The word is reproducibility . <S> Murphy's Law: tolerances will work hand-in-hand to bring the system as far as possible from its stable setpoint. <A> The reason for the 5% is that the resistor values in the series then overlap in value. <S> For example, the E24 series resistors have a 5% error rate, so that one resistor with +5% slightly overlaps the next resistor value with a -5% value. <S> So is there also a E12 series with a 10% error and a E48 with a 2% error. <S> This is a good article about that: http://www.logwell.com/tech/components/resistor_values.html
Maybe people are so used to 5% resistors that they don't feel the need buy more expensive resistors since they haven't actually had the chance to see them in action.
When using a Laptop, is it desirable to keep it charged from the Mains all the time? While using laptop I usually plug in my Laptop charger (i.e., from Mains power). What is more effective - to keep Laptop plugged in at all times when possible, or some other approach (e.g., running on battery till it fully discharges, then plugging in the charger, and so on)? "Effectiveness" here could relate to battery lifetime as well as what is good for the laptop internals' life. <Q> It is certainly better to have your laptop plugged in all the time. <S> During that time, the battery level will oscillate between ~97% and 100%. <S> This will have a minimal strain on the battery. <S> Every full charging cycle significantly reduces battery life. <S> A typical li-ion battery will survive up to a thousand charging cycles. <S> High temperature also affects battery life. <S> Bad heat management of your laptop will take its toll on battery life. <S> Keeping your laptop directly on your lap will shorten battery life. <S> Basically everything you do shortens battery life! <S> I have a friend who decided to maintain his battery capacity at a maximum by not using it. <S> He keeps his battery in a shelf and plugs it in once a week. <S> This way, the battery will have its maximum capacity in times of need. <S> I guess it works for some people. <A> Depends on a lot of variables, but I will answer for a specific (but very common) setup: <S> The reasoning: Li-ion charger designs usually have load sharing such that circuit power is ensured alonside any battery charging that might be required, but the key point here being, at all times, the charging power source itself is providing the power to the circuit once the battery charging is finished (a one-time thing). <S> Whereas, on the other hand, if you were running off the battery then charging, and so on, you would drain the battery (adding to its discharge history), and then it would have to use the power from the charger to recharge the battery again. <S> This discharging-and-charging is not desirable because Li-ion batteries have a limited number of charge-discharge cycles : <S> e.g., after typically 300 cycles, the battery pack's capacity goes down about 25%. <S> In particular, allowing a Li-ion to undergo smaller depth of discharge (i.e., no discharge or even only 50% discharge, as opposed to 100%) will allow the battery to last longer by increasing the number of possible discharge cycles for a Li-ion battery. <S> Note that overcharging, overdischarging, etc., while the charger is left plugged in, are not issues at all because battery packs and the charger designs are smart, i.e., they already have overvoltage and undervoltage protection built-in. <S> Something else that is of interest for certain situations is to even consider pulling the battery out of its socket while running off the charger alone . <S> This might be of particular relevance to laptops that run very hot. <S> This is because Lithium-ion batteries, among others, suffer from stress under heat, with even 30 degrees celsius considered as "elevated temperature" , and recoverable capacity declining markedly at higher temperatures. <A> My main job in life is mending laptops, and the main fault is a dead battery or faulty charging circuit. <S> From my own personal experience (owning several laptops of the years) I would never constantly run the laptop from the mains supply with the battery attached. <S> I have found that similar to mobile phone batteries, the battery of the laptop gets to a point where it will not properly charge, and its active usable life is reduced to only minutes or an hour or so. <S> Some say the battery gets a "Memory" point (or it has hit it max number if recharges), where it will not fully charge past? <S> With my Sony Viao, I only run from mains when the battery is almost flat, or when I have fully charged the battery, and the battery is removed from the laptop. <A> In fact, recent laptops nowadays use Lithium-Ion batteries, which means that the charger will stop after the battery reaches the full charge. <S> So you don't have to worry about the battery and its lifetime if you keep working with the battery in and the power is from AC. <S> Nevertheless, you can take out the battery and keep running the laptop from AC power, it's up to you. <S> Now talking about charging non-fully charged batteries, it doesn't matter if the battery is fully discharged or partly discharged; what really matters is the cycles of use... each battery has a limited number of using cycles and differs from one to another. <S> So, every time the battery is fully discharged its lifetime is decreased by a cycle. <S> From this point I recommend you to use the laptop on AC power as long as you don't have to be away from it.
Assuming the laptop is powered by a Lithium-ion battery pack (which is true for most laptops), I would say it is better (for battery lifetime) to keep the charger plugged in as much as possible , as opposed to running off batteries.
How to diagnose and repair a radio? A friend gave me a Marine VHF Radio Receiver which is working badly, and asked me if I can look into it and try to repair it (I'm not going to charge him). The first time the radio is turned on, the reception works OK, but after a few minutes the reception dies, and turning it off and on again immediately won't fix the issue. I have to wait a few more minutes with the radio turned off to again start receiving OK. The squeltch is always at minimun, receiving noise. When the radio dies there is a high pitch noise coming out of the speaker. The external speaker connection is wired directly to the same internal speaker circuitry. Since the problem goes away after a few minutes I guess the issue is a broken component, like a capacitor or resistor. I have no electronics background, just a few soldering skills. I want to learn how to repair stuff the DIY way. A few weeks ago I repaired an audio amplifier . The problem was simple, a burned track on the PCB. What are the steps required to pinpoint the problem? My toolset is limited, I have no oscilloscope, and no capacitance and inductance meter, just a couple of cheap multimeters. <Q> gbarry suggests I post this as an answer. <S> Thanks for the support, gbarry! <S> You can do quite some troubleshooting without complicated tools. <S> For a start we may not even need the multimeter. <S> That would explain that you have to wait some time before it works again, so that it can cool down again. <S> Try to find out if a certain part gets really hot. <S> If you can't pinpoint a component that way, use cold spray to cool components selectively. <S> Just spray on components until it works again. <S> (You'll probably have to spray only briefly; the spray we use allegedly can cool down to -50 °C.) <S> Look for discolored resistors and leaking capacitors. <A> If you have an external audio amplifier, try to unconnect the central wire from the volume potentiometer, and connect it to the external audio amplifier with the common GND. <S> If you can ear continuosly that way you insulate the problem being in the audio or MF/RF section of your receiver. <A> First, find out if the problem persists after disconnecting that added speaker. <S> Then, take @stevenvh's advice about overheating and the use of cold spray.
If it works for a while and then stops working that sounds like some component is overheating. When you find the culprit it may be defective itself, or one of the parts surrounding it.
Multiple motor speed control with a single triac I have a requirement where I have to control the speed of 10 motors. The motors are 230V AC single phase motors. The speed of the motors need to be increased or decreased using a electronic controller (no varistor). All the motors need to run at the same speed. I am considering phase angle voltage control to control the speed of the motors. Each motor consumes maximum 2A current. I have identified BTA24 Triac which supports 25A load current. This is a snubber less triac. My question is whether I will be able to control all the 10 motors using a single triac. i.e phase angle control using 1 triac and feed the output to multiple motors. Whether this setup is possible or is there any drawback in using a single triac (any thing to do with induction current etc) or do I need to have a triac for each motor separately Just to clarify on speed: I am not worried about synchronised speed on all motors. All my concern is if I supply a chopped voltage to a set of motors connected to a single triac, will the presence of multiple motors on the same triac affect the output voltage or current at the triac output. For ex: Each of my motor is rated at 350W. If I supply 240V via the triac I expect all of them to run at X rpm. If I am firing the triac at 90 degree,I expect to supply 120V to all the motors assuming a 240V mains line. Can I expect all the motors to run at X/2 rpm (+/- few rpms is acceptable) <Q> While the answers above are excellent, you have failed to identify the types of AC motors you are using. <S> Are they brushed motors? <S> Or squirrel cage types or? <S> If your motors do not have brushes, then you should not realistically be looking to control speed, as they will naturally try to assume the speed of the windings/armature ratio versus frequency of the supply, and under a real load, you could end up cooking the windings and the triac. <S> If your motors have brushes, (ie, like vacuum cleaner motors, blenders, drills and saws use brushed motors), then it's a lot easier, since you're dealing with a commutator that chops the voltage to something like pulsed dc. <A> In loads like motors which have inductance in it would follow source (sine wave) with an angle. <S> This is called "phase difference". <S> The following link has some information, look for the title "Phase Difference of a Sinusoidal Waveform" http://www.electronics-tutorials.ws/accircuits/phase-difference.html <S> In power electronics, we would like to trigger our switches when the load current is zero or passing by zero value. <S> And this called "ideal switching". <S> This zero point will be in different time for each load. <S> You can trigger your switch some where else too, but the switching losses will heat your semi-conductor. <S> Because of these, you can't use multiple loads like motors. <S> You're gonna have to trigger each motor individually. <A> ( depends upon how close you want your motors speed to be) <S> Also you can not use a single triac to drive all the motors as Hammers has rightly pointed out, each motor has different resistance & inductance value and so different driving profiles. <S> You have to go for separate drivers with having synchronizing facility so that all drivers will work as per master control.
If you want to have same speed of all the motors then you should have closed loop control system. This phase difference will be different for each load according to their resistance and inductance values.
What is the basic difference between AM and FM radio? I want to know the basic/fundamental difference between AM and FM radio. Why nowadays FM radio has replaced AM and has become more popular? <Q> Short answer: FM is far less susceptible to disturbance of the signal. <S> This is an AM modulated signal. <S> The contours are the baseband signal which we recover by demodulation. <S> Notice that there's a spike in the signal, which may be caused by a thunderstorm for instance. <S> This is the demodulated signal. <S> The demodulator doesn't "know" that the spike isn't actual part of the signal, so it can't remove it, and the listener will hear a tick in the symphony <S> she's listening to. <S> FM has a constant amplitude, and the demodulator won't be fooled by spikes in amplitude since it will detect variations in frequency. <S> This is an FM signal. <S> The baseband signal determines the change in frequency of the carrier. <S> Notice that the spike doesn't change the frequency, so it won't be audible after demodulation. <A> AM radio is amplitude modulated, meaning that the amplitude of the carrier frequency is varying in the same manner as the audio signal you are transmitting. <S> Illustrative image: <A> A complementary question to: <S> Why nowadays FM radio has replaced AM and has become more popular? <S> Might be: <S> Why hasn't AM radio been replaced by FM yet?" <S> First, we'll infer from the question that we are talking about the broadcast range. <S> I would like to simply add to the already excellent answers that broadcast AM radio (in the Americas) uses 540 to 1610 kHz whereas broadcast FM radio (in the same region) <S> uses 88 to 108 MHz. <S> These frequencies correspond inversely to wavelength; higher frequency has a smaller wavelength whereas lower frequency has a longer wavelength. <S> Where v = velocity, f = frequency, and λ = wavelength <S> One important property is that longer wavelengths have greater propagation. <S> (Ignoring some other variables like atmospheric conditions, transmission power, antenna location and type, etc.) <S> The lower frequency of the AM band gives it greater distance coverage than FM. <S> One reason why broadcast AM radio continues to survive may be that the ability for listeners to tune in somewhat more distant stations gives it a unique quality property. <S> It's important to remember that amplitude modulation (AM) and frequency modulation (FM) are independent of frequency, so <S> my answer is less about the modulation type and more about the frequency range of the broadcast bands you refer to. <A> FM Modulation is less sensitive to disturbances as stated in other answers, but this comes with the drawback of having a larger Bandwidth. <S> To have an approximation of the FM bandwidth you should check the Carson Rule (the bandwith is theoretically infinite, but it can be constrained to a certain amount after which the values are no more significant). <A> AM radio the signal strength changes. <S> on FM the frequency changes at the same rate as the audio rate. <S> the advantages of FM less static do to to signal strength, so your ratio detector ignores the static allowing a static free reception on FMfrequency's. <A> In FM signals, all the transmitted power can be used, but in AM wave the transmission carriers contain most of the power. <S> So, complete use of power is not possible. <S> FM waves are waves having constant amplitude. <S> These are independent of the modulation. <S> So, due to this the power transmission of these waves is also constant. <S> The power transmission of FM waves is better than that of the AM signals. <S> Amplitude modulation (AM) is a technique used in electronic communication, <S> most commonly for transmitting information via a radio carrier wave.frequency modulation (FM) conveys information over a carrier wave by varying its frequency <S> (contrast this with amplitude modulation, in which the amplitude of the carrier is varied while its frequency remains constant). <S> FM signals have a great advantage over AM signals. <S> Both signals are susceptible to slight changes in amplitude. <S> With an AM broadcast, these changes result in static. <S> With an FM broadcast, slight changes in amplitude don't matter -- since the audio signal is conveyed through changes in frequency, the FM receiver can just ignore changes in amplitude. <S> The result: no static at all.
FM radio is frequency modulated, meaning that the frequency of the carrier frequency is varying in the same manner as the audio signal you are transmitting.
Wheel encoder using an IR sensor I made a rotary encoder using a IR sensor and a wheel with printed black and white spokes. Everything seems to work but I'm wondering if there is a better way to code this. The IR signal looks ideally like a square wave and I have it looking for the rising edge of each wave. Then calculate the time between rising edges to calculate the wheel's RPM. int wheelPin = 11; // I/O pin for encoderint count = 0; // number of encoder ticks bool rising = false; // bool for rising edge of encoder signaldouble dt; // time between rising edgeslong dtStore[2]; // FIFO array holding current and previous rising edge timesfloat rpm;void setup(){ Serial.begin(57600);}void loop() { int wheelVal = analogRead(wheelPin); // get encoder val/* check to see if we are at a low spot in the wave. Set rising (bool) so we know to expect a rising edge */if (wheelVal < 200) { rising = true;}/* Check for a rising edge. Rising is true and a wheelVal above 200 (determined experimentally)*/if (rising && wheelVal > 200) { dtStore[0]=dtStore[1]; // move the current time to the previous time spot count++; dtStore[1] = millis(); // record the current time of the rising edge dt = dtStore[1]-dtStore[0]; // calculate dt between the last and current rising edge time rpm = (0.0625)/dt*1000*60; // RPM calculation rising = false; // reset flag } Serial.println(rpm);} <Q> There are two things you should do. <S> Firstly, implement a little bit of hysterisis. <S> Currently, it look like you're using 200 as the threshold in both the rising and falling direction. <S> What you'll always get with analogue sensors is a bit of noise. <S> This means that, even during a rising edge, you might actually see a tiny falling edge sometimes. <S> You might even see it cross your threshold up, then down, then up again! <S> The green line shows what you hope your sensor is producing. <S> The red line shows what it's probably producing. <S> Actually, it's probably much worse than this. <S> The purple line is what you want <S> The black line is what you could be getting <S> So, when the signal is rising, use 200 as your threshold. <S> And when the signal is falling, use something like 150 as a threshold. <S> Secondly, you could use both the rising and falling edges to calculate your speed. <S> That way you can have twice the update rate. <A> Regarding a "better way to code this" you could use Analog Comparator that is in Atmega chip. <S> It works by comparing voltages that are present on two specific pins of microcontroller - AIN0 and AIN1. <S> Add a potentiometer that sets a threshold for transition on AIN1, then connect your sensor to AIN0. <S> When voltage from sensor is above voltage set by potentiometer, Analog comparator can be configured to rise an interrupt - you add your logic to servicing routine for this interrupt. <S> You would have to resort to programming an "AVR level" C to do all of this rather than Arduino lingo. <S> Edit <S> You still can do that from Arduino environment, this is a sniplet on using analog comparator in arduino, it just uses defines from avr-libc directly inside arduino code: void setup(){ pinMode(7,INPUT); Serial.begin(9600); ACSR = <S> B01011010; // comparator interrupt enabled and tripped on falling edge.}void loop(){}ISR(ANALOG_COMP_vect) { Serial.println("Interrupt Executed!")} <A> I'm doing something rather similar at the moment. <S> But with two differencs: I've a schmitt-trigger (74HCT14) between the signal source and the controller <S> I do not measure the time between two edges <S> but I count the edges for a certain amount of time and compute the RPM from the division of number of edges and time <S> Seems to me, that generating a constant frequency interrupt (like 1Hz) and count pulses is easier and more robust than measuring a time in ms range. <S> But maybe this approach does not apply to your design. <A> As well as hysteresis for analogue signal level transitions, you might want to use a de-bounce algorithm once digitised. <S> You set de-bounce timers to be a small value relative to the expected switching rate at maximum rotation speed. <S> E.g. <S> For 4 spokes, maximum 120 rpm you expect an 8 Hz square wave output. <S> With a period of 125ms, you can afford debounce timers of say 10ms on each transition. <S> The idea is to keep 10ms "small" relative to your 62.5ms hold times. <S> E.g. a L-H transition might force a 1 output for 10ms, a H-L transition might force a 0 output for 10ms etc.
Another way to code this could be by using external interrupt functionality on Atmega - you get an interrupt on rising or falling edge on some specific pin of microcontroller, but you would need to do a signal conditioning using a separate opamp to be able to set threshold and hysteresis.
Why don't interfering radio stations both play at the same time? Since radio-waves are additive, I would expect that overlapping stations (eg. two different signals broadcasting on 95.7 within range) to both play over my radio at the same time. But that's not what happens. Instead, I hear only one station at a time, with the radio switching back and forth between the two stations as I drive, and some static inbetween. Why does this happen? Why don't I ever hear both stations at once? <Q> Your mention of the frequency (97.5 MHz) tells us this is an FM receiver. <S> (AM will behave differently, as will other modulation schemes). <S> Because FM is encoded by modulating the signal frequency, anything to do with AM is undesirable. <S> To deal with this, most receivers over-amplify the signal until it becomes larger than the later stages can pass. <S> The signal then "clips" to the voltage of that amplifier. <S> This stage is called a "limiter"--it limits the amplitude to some fixed value. <S> In theory, any signal weaker than that drops out and just becomes noise, and any signal stronger than that has a very nice fixed level that the FM detector can handle without having to worry about amplitude variations. <S> The amplifier-limiter stages create a phenomenon called "capture", where the strong signal tends to eliminate the weaker one. <S> This is why you hear only one station. <S> If the signals were very close in strength, you would indeed hear them "mixing together", but that only happens for a fraction of a second as the signal levels rapidly change (presumably, you are in a vehicle), so you normally don't hear that. <A> Here's my take on it: While the carrier signals may have the same frequency , they have different phases . <S> As the PLL in the FM decoder drifts, it locks first onto one phase and then onto the other, leading to alternating broadcasts being decoded as time goes on. <A> FM radio signals are not Additive. <S> If you add two FM signals together, you do not get one "mixed" FM signal. <S> You just get noise. <S> Fortunately, FM receivers are good at picking an FM signal out of noise, so your radio is able to separate one - or the other - of the two signals out of the noise. <S> It does this by locking onto the phase of one carrier signal, which allows it to treat the out-of-phase signal as amplitude noise, which it always rejects. <S> Which signal gets followed depends not on the amplitude (unless the amplitude difference is big enough), but on (1) <S> the music (which is doing transient drifts to the carrier phase) and (2) the transmitter phase drift, and (3) <S> the receiver (which will have a drift preference at any moment). <S> It is possible to make FM receivers which are not phase-locked. <S> You can, for example, convert the frequency into amplitude before doing conversion. <S> In that case, your mixed FM signal wouldn't work at all, because the noise wouldn't have a recoverable carrier frequency.
The problem is that, as the two signals drift in and out of phase (something that happens because of the music, even if the two transmitters are perfectly phase locked, which they aren't), the locked signal gets captured by one - or the other - of the two transmitters.
Is this a proper way to connect a piezo speaker to MCU? Is this a proper way to connect a piezo buzzer to microcontroller pin? Is there anything that could be improved in the sense of robustness and power consumption? How do i select D1? <Q> Not all piezoelectric buzzers are made equal, <S> Basically you have the very simple ones, those are only a sort of a small piezoelectric speaker, (like those old Motorola tweeters, all plastic case, no magnet), beware; those are destroyed by DC, so use a capacitor (0.01 uf) to avoid dc going through the transducer, and make sure that you are feeding the beast with some square or sinusoidal wave, and.. <S> Then the piezo buzzers that have a built-in oscillator/driver circuit, that drive the piezoelectric element, with those you must have the specs of the buzzer, but I have found that most of them behave well with 5 Volts dc. <S> mass production have made them dirt cheap. <A> A simpler way which I have used a lot is to directly connect the piezo in bridged mode, using two I/O pins. <S> This technique is only to be used with the much cheaper bare piezo elements, not buzzers which have a fixed frequency driver built in. <S> For the latter, the questioners circuit should be used. <S> By definition, a piezo will not output much more voltage than is used to drive it, and the protection diodes on the port will protect the MCU from any spikes. <S> This gives twice the supply voltage across the piezo, peak to peak, which gives much better volume and avoids the slow discharge one would get with the single-ended driver circuit above. <S> Also, this way of doing it removes all the ancillary components. <S> It does require a little coding to set up the PWM to output the correct frequency, but if you want full control of the output frequency and volume, it's very cheap. <S> It is a commonly used technique, often used in musical birthday card circuits for example. <A> You can probably stand to increase your pull-down resistor value significantly. <S> (try 100k or 1M) - <S> As far as the 1K resistor goes, as this provides a discharge path for the piezo's capacitance, its value will be determined by the size of the piezo, as well as the frequency range you intend to drive it at. <S> A higher value will be less lossy, but may not provide adequate discharge for the piezo if it is very large or you intend to drive it at a very high frequency (where a quick recovery is necessary) <S> This is easy to estimate if you know the capacitance of the buzzer. <S> D1 should be a fast diode, any schottky type should do fine. <S> Depending on how loud you want the buzzer, you can add a resistor in series with the buzzer itself. <S> I would start with low resistance values (10s of ohms) and work up to something you're happy with. <S> Again you're taking a loss, but if you can't adjust your drive voltage, this is an option.
Most PWM modules in modern MCUs can be configured to use two output pins; one non-inverting, and one inverting. A capacitor in series with the buzzer is also an option, to provide a power limitation, as well as change the character of the tone.
What shift register ICs am I looking for? I'm designing a project that requires far more I/O than a typical microcontroller offers. No problem, right, just use shift registers and stuff. Wait nope, why am I having problems? I'm planning on driving 24 outputs with one serial data line, a clock, and a chip select. 16 of the outputs are connected to LEDs and the remaining 8 are connected to a HD44780 LCD display. So what I thought of doing for the 16 LEDs was to connect them up to two 8 bit counters that feed the serial data bit through to the specific LED and then change to the next consecutive output when clocked -- like a demultiplexer, but serial. For the LCD, I need to actually hold onto the data and send it all out at once, so I need an 8-bit serial-parallel register and wait until 8 clocks pass to enable it. Finding an IC which does the latter is easy -- 74HC595 seems to do it -- but for the LEDs, I can't seem to find a 7400 series chip that does what I want. All the ones I can find hold onto previous values and just shift them over, and the decoders I've found 1) don't have a data line - they're always true when selected and 2) require a binary word, not a clock. If it's not already clear, I want something that does what's on the left: I swear I've used a chip that does what I'm thinking of before when driving an LED matrix, but I can't remember its number. Any help would be appreciated. <Q> The item on the left isn't a shift register at all; it's known as an "addressable latch". <S> 74xx259 is one example. <S> However, I'm not aware of any off-the-shelf components that have an internal counter; they all expect you to supply the 3-bit binary address for the latch that is to be updated. <S> It would be easy to create such a device using a PAL or CPLD. <S> Also, if you have a SPI or I2C bus on your controller (or are willing to bit-bang one on GPIO), there are many kinds of <S> I/O expander chips available for these buses. <S> One example that I've used is the Microchip MCP23S17 (SPI) / MCP23017 (I2C). <S> Each chip gives you 16 more lines of GPIO. <A> I am not understanding why you cant use the 74HC595 for the LEDs. <S> Shift in your data, then blip the clock for the storage register to hold that 8-bit value. <S> As long as you aren't pulsing the storage register clock, you are free to shift bits all day long without effecting the final output bits. <S> You can use the same serial data line for all your outputs and just selectively 'gate' which shift register will latch up. <S> Please leave a comment if I have misunderstood what you are doing. <S> I will elaborate my answer further. <A> I do not understand why you can't use the 74HC595. <S> Here are all the choices I see. <S> 74HC299, 8-bit universal shift register; <S> 3-state, if you can tri-state your outputs while you shift. <S> 74HC594 serial-in shift register with output registers <S> 74HC595 serial-in shift register with output latches <S> 74HC596 serial-in shift register with output registers and open collector outputs <S> 74673
16-bit serial-in serial-out shift register with output storage registers, three-state outputs, if you need 16 bits.
Detecting the placement of my finger on an invisible grid Yes, a similar question was asked before, but mine is different. Let me explain what I am thinking of. Suppose I have an invisible 3 x 3 grid on my desk, is there any way I can detect which square I place my finger on? To clarify, when I say invisible, I mean I cannot see it, but the computer knows it is there, and I have a general idea where the 9 squares should be. If it makes it any easier, imagine the grid is drawn on a piece of paper, and I need to detect which square I place my finger on without attaching anything to the individual squares. The way I thought I could accomplish this task is to use one of those distance sensors, one for each row (or column). So I have three distance sensors, and depending on how far away my finger is from the sensor corresponding to row which my finger is on, it gives me a reading to indicate the exact square. This method seems simple, but the drawbacks for me are that the device will be too bulky if I use the commonly known HC-SR04 sensor (is there a smaller one?), and would be a nuisance to extrapolate to, say, a 20 x 20 grid (not to mention expensive). Is there a cheap method I can apply to measure distance or position somehow on an invisible grid? <Q> Use a webcam, and some software (such as OpenCV ) to define the "touch areas". <S> Entire " virtual keyboards " have been built using this technology. <A> You can use a PCB with copper squares, or rectangles to sense capacitance. <S> This would require minimal hardware and very simple software. <S> I already tried it and it works quite well. <S> You will need to connect each capacitive pad to a I/O pin on the µC, then you would follow these steps: <S> Set the pin as an output. <S> Output a high level for enough time for any eventual capacitive load (that could be your finger) to charge. <S> Set the pin as an input. <S> Wait just enough time in order to allow all the pads that are not touched to discharge. <S> Read all the pins. <S> (The pins read a high are the ones that are being touched.) <S> You can even (and should) add an insulation to the pads like a soldermask or adhesive film. <A> This would be an ideal situation to try a variant of the method pioneered by Johnny Lee using an IR led and a IR (infrared) camera, e.g., found inside a Wiimote or bought off ebay for $25-30. <S> The camera tracks X-Y coordinates of a basic infrared LED in its view region, so you can get creative on where you place the camera. <S> As far as the infrared LED/marker, you can wear it your moving finger/hand. <S> Lots of flexibility. <S> You can watch Johnny Lee's video demo 1 and video demo 2 of something similar to this; the demo is rather impressive given the minimalistic setup. <S> Also, take a look at his original writeup . <S> For this method, three pieces of software that might come in handy: <S> Johnny Lee's C# open source to work with the IR camera's output UweSchmidt's Java version <S> If you use an Arduino to interface with the camera, there is a library by Stephen Hobley
Alternatively, if you don't want to wear an LED on your finger, you can have an array of several infrared LEDs sitting in a fixed position, emitting radiation which is detectably reflected by your finger if you put a piece of reflective tape around your finger (works rather effectively). Any IR camera can be used, but the one from the Wiimote is superb for this because it's tiny and yet has a high resolution (1024 X 768) and a 100 Hertz update rate, better than even most standard (visible-spectrum) webcams.
Conductive Lubricant for Connectors? I'm making a safety disconnect for an experimental RC craft. It will be tethered to the ground, and if it goes out of control the tether will pull a plug disconnecting the power. I will make the plug from a male Deans connector (pictured below) looped to connect the positive and negative terminals. The female connector will be in line with the battery. What's the best material to lubricate this connection? I would like the plug to disconnect as smoothly as possible when tugged by the tether. In general, what are the most common connector lubricants that are (a) conductive, (b) will not cause shorts, and (c) not messy? <Q> In marine applications silicone grease is used on all copper contacts for corrosion resistance: water-resistant, non-corrosive, etc. <A> Try dielectric grease (sold for starter battery terminals), petroleum jelly, or WD-40 (wiped, not sprayed). <S> As long as it is very liberally applied and doesn't chemically attack/soften the plastic shell of the connector, it will likely work just fine. <S> Be sure to mechanically strain relieve the assembly so that the connector housings take the load during disconnect rather than the conductors. <S> If you had a bad crimp on the battery side of the connector, you might pull the connector right off the battery leads during the disconnect event, allowing them to short together directly. <S> Not recommended! <A> It is commonly used as lubricant for locks. <S> I don't know, however, if it is a good idea to use it for connectors. <S> Here graphite is recommended also for electrical connectors. <A> It will be difficult to control the insertion/removal force this way. <S> Connectors with defined force like USB have dedicated springs for this, and keep load on the conducting pins low. <S> I'd probably use a magnet to define the removal force (which can then be adapted by changing the distance between the magnets), and two simple contacts pressed onto each other by the magnets for the actual connection.
A wide range of lubricants will work for your application. The lubricant does not need to be conductive - the contact pressure between connector halves will push the lubricant out of the way and ensure a good connection. If you really insist on something that is a lubricant and is somehow conductive graphite powder comes to my mind.
How do I disable clearance check for a layer or for only some certain elements? I'm designing a PCB in Altium Designer. There is a very large heat sink in my project. When I put it on the PCB, there will be plenty of empty space under it where I can put other small components. I tried to put some part of this bridge rectifier under it; that's geometrically possible in real life. But, Altium Designer gave a clearance warning (or an error?) about it (the elements turned into green as you see in the image). How do I disable this warning/error just for these two elements, or for the entire top overlay layer? <Q> Design > Rule > <S> Placement > Component Clearance , Add new rule like this: Advanced query: InComponent('D1') <S> //assume <S> the component is 'D1' Constraints: Min Vertical Clearance 0mil <S> Min Horizontal Clearance <S> 0mil <S> Then Altium Designer will not check this component's clearance. <A> This isn't necessarily an answer on how to do this specifically in Altium, but more of a generic thought: why not simply specify the outline of the heatsink so you can see it in the board layout view, and know it's there, but not have it be something that is used in a clearance check? <S> This seems like the easiest way to approach this sort of problem without having to try and make the program understand exactly what's going on. <S> In fact, it almost seems like more work to try and quantify that there is space under a part. <S> To do it properly, you'd need to quantify the 3D aspect of ALL components on the board so it could properly calculate clearances in 3D. <A> You can use Design > Rules > Placement > ComponentClearance > New Rule <S> The lowercase and star after the component are in place in case you have multiple components who have collisions like: usb_1, <S> usb_2 and usb_3 Make sure that the priority of this rule is higher than other rules, who might be conflicting with this one. <A> When I want Altium to ignore clearance on several objects, I just quickly add them to the Component Clearance queries, like: First Object Matches -(Name <> 'S1') <S> And (Name <> 'D1') <S> Second Object Matches -(Name <> 'S1') <S> And (Name <> 'D1') <S> Basically, that just means when the first and second objects are not S1 and not D1... <S> then do the normal component clearance check (otherwise don't do any clearance check). <S> It still does electrical checks, so it'll catch a short circuit or any other rule you have. <S> Typically, when I want to do this, it's to make the PCB compatible with multiple footprints in the same spot, like an MCU with a DIP and SOP package... <S> or in this example, an I/O that can be populated with an SMT switch or LED. <S> Obviously you need to be careful with those objects, since collisions between all objects in the list will be ignored... <S> like for example if I added S2 and D2 to the list, then collisions between D1 and D2 would be ignored, even though I really just wanted S1/D1, and S2/D2 (you could make more complex rules to handle that, but it's never been a big deal to me). <S> Collisions with other objects (i.e. D1 and R1) will still be caught.
You can specify a design rule for that component:
Arduino - pin13 is HIGH by default I've made some tests with my Arduino UNO, all worked great: analog i/o, digital i/o, serial i/o. Then I've noticed that built-in LED on pin 13 is always on. I've uploaded an empty program like void setup(){} void loop(){} and it still was on. When I manually turned it off by digitalWrite command it switched off. So it works well. I just want to know if I've broken the board somehow or it's just some feature, which I do not get? NOTE: a mate of mine has the same board with the same problem. Any ideas?Thanks much! <Q> Taking a look at the Arduino Uno's schematic explains this, if I understand the schematic correctly. <S> I don't own an Arduino Uno, so I can't verify with a multimeter, so I might be wrong. <S> When you (or anyone) upload a program that doesn't do anything to pin 13, it's default state is an input without a pullup. <S> When a digital pin is configured as an input without a pullup resistor, it has a high impedance (high-Z) and unspecified voltage. <S> It can be 0V, but might be something like 1.5V as well. <S> The measurement will depend on the impedance of your meter, among other things. <S> Upload an empty sketch and check the voltage on the pins - you'll find they're pretty random and not always 0V . <S> Now, a high-Z input pin with, say, a few volts will not be able to power an LED. <S> However, this voltage is buffered by the Uno's op amp, and repeated on the output. <S> This op amp will be able to power up an LED, and apperently, it does. <S> I think the Arduino team should add a high ohmage pulldown resistor (e.g. 50kOhm) to make this less confusing. <A> "So it works well." <S> Apparently your board isn't broken, since the LED can be switched on and off, and your mate's Uno shows the same behavior. <S> It's called a "feature" :-). <S> Just assign any function you wish to it. <A> The arduino has a nice pull-up, but I also noticed that the LED blinks a few times when uploading stuff. <S> And yes, I know what the TX and RX leds are, but pin 13 works too...
As I understand from the schematic, pin 13 of the arduino, the SCK pin, is connected to an op amp buffer. By default the LED seems to be used as a power indicator, and to draw your attention to it: "Hey, if you need a LED don't forget you already have one on the board!".
how to connect 4-20mA signals to my PC I'd like to run some tests by using 4-20mA sensors outputs, by somehow connecting them to my PC (and eventually run some analysis on the collected data). I'm looking for a converter (that can perhaps be plugged in via USB), or some other interface method to my PC / Laptop. Any suggestions? <Q> Remember if your sensors are very sensitive <S> then you should't supply them from PC. <S> If your budget low you can simply use your PC sound card for measurment with few external components like there http://www.marucchi.it/ZRLC_web/INTERFACCIA_ZRLC_p.pdf .What <S> about data collection - you can simply access your PC sound card with Matlab "Data Acquisition Toolbox" and have sampled data direct in Matlab for further analysis. <S> But much more easier to buy one of these "USB ADC DAC converter" and they have software. <A> Why not use a microcontroller with a UART? <S> RS232 would be easiest, but you can use USB too. <S> The Arduino is a micrcontroller too, but everything is there for you on a PCB, all you need to do is plug it into the PC via USB. <S> Unless I am misunderstanding your requirements, I think a microcontroller may be quite suitable for your intentions. <A> You may want to have a look at this one: <S> http://www.yoctopuce.com/EN/products/usb-electrical-sensors/yocto-4-20ma-rx <S> It is USB, isolated, driver-less (really driver-less, not serial over USB). <S> It features a data-logger and can power your sensor. <S> Most importantly, it comes with libraries for most common programming languages. <S> You should also check out the competition http://www.dataq.com/4-20ma-current-loop-data-logger/4-20ma-current-loop-data-logger.html
Or use an Arduino for a quick and simple solution (not to mention cheap).
Do you need to UL Certified the enclosure with the board inside? I want to use the RaspberryPI in an industrial environment that requires all devices have UL certification. The RaspberryPI board has UL certification but there is currently no enclosures that are certified . I have been told the UL certification process is expensive and probably beyond the scope of this project. My questions are: Do I need to UL certify the enclosure for a board that is already certified. Can you certify a enclosure without the board inside of it? (So i can pick up a board off the shelf and put the RaspberryPI in it) How expensive is the UL certification process for an enclosure where the board has already been certified? <Q> The Raspberry PI is not UL approved, to the best of my knowledge. <S> The original intent was not to have any certification done at all since it's essentially a development kit. <S> However, things changed and they were forced to do some EMI and ESD tests to get CE certification , which they successfully did . <S> They're OK for CE, FCC and C-tick approvals, but not UL. <S> Don't be surprised if UL doesn't want to do a full investigation, including the Pi. <S> You'll likely also have to guarantee that your setup will use an approved power supply for the Pi. <A> Usually, "UL" certification for industrial control panels refers to UL/ETL 508A Listing or Recognition. <S> There are other organizations that perform compliance testing to the UL/ETL 508A standard, although UL is among the best known (and often the most expensive). <S> It is not possible to obtain certification to 508A unless all components are Listed or Recognized or a certification/verification is obtained at the assembly level. <S> You can have your industrial control panel and Raspberry PI verified and stickered in compliance with UL-508A as an assembly, <S> provided that your design meets the requirements of the standard. <S> Generically speaking, it is possible to achieve compliance without every component being UL/ETL <S> recognized if the device consumes less than 200W and is mounted in a Listed enclosure. <S> Check the standard for the fine print. <S> At the end of the day, you'd have an ETL apply a serialized sticker to each panel you make that indicates that it was found to be in compliance with UL/ETL 508A, without having UL certify your panel as a standalone product. <A> "UL Listing" is only required for components that directly plug into AC Mains, which is why most electronic manufacturers use UL-Listed transformers with their boxes. <S> The box is therefore essentially a low-voltage, dc-powered component and not subject to the UL-listing requirement. <S> Only the transformer has to be UL-listed. <A> I have a UL certification for the following: <S> Raspberry Pi HMI Touchscreen Panel, Type 4X indoor rating. <S> Here are answers to your questions: <S> Do I need to UL certify the enclosure for a board that is already certified. <S> No such thing since Raspberry Pi is <S> a low voltage device UL will not certified just the Raspberry Pi or Just an off the shell enclosure. <S> Can you certify a enclosure without the board inside of it? <S> (So i can pick up a board off the shelf and put the RaspberryPI in it) <S> The answer is no for the same reasons as number one. <S> How expensive is the UL certification process for an enclosure where the board has already been certified? <S> Cost $10,000-$15,000 to get the UL File <S> Plus ongoing UL Inspection Fees paid once per Quarter and end of year maintenance cost. <S> Around $5000 per year to keep UL Listing. <S> You can find my information at my website if you are interested in our Raspberry Pi HMI Touchscreen Panel, Type 4X indoor rating <A> IEC EMC\EMI and Safety standards are different for commercial, industrial and residential products. <S> If you have a power supply, then yes, you'll probably need a certification. <S> And if your marketing it to industrial customers they will probably have other saftey and EMC\EMI standards that your product will need to comply to depending on what kind of environments it will operate in. <S> I can't speak for these because I don't design products that go in chemical, food or manufacturing environments. <S> I would find a regulatory consultant that deals with industrial regulatory requirements.
The product only needs to be certified if your customers require it.
My amplifier produced a negative gain when it should be positive. Why? Disclaimer: I am a Mechanical engineering student and I don't have a huge background in electrical engineering. In on of my lab classes, we just dealt with the response of amplifiers to a variable DC voltage source. The lab consisted of DC power supply as the variable voltage source, an amplifier, amplifier power supply, and an oscilloscope. We varied the DC power supply from -12V to +12V in 2V increments and we had to record the output voltages and plot the final results. At 0V there was a offset of 2.54V caused by the amplifier being powered by the DC power supply. After we plotted the results, the graph of input voltage vs output voltage looked as expected with lower saturation limits, then a linear increase in voltage and high saturation limits. Our results showed an amplification factor (the slope of the linear region) of less than 1, which caused the gain of the amplifier to be negative. My TA said the setup looked fine and could not explain any reasons why we got a negative gain. Does anyone have any reason as to why the amplifier would produce a negative gain, thus defeating the purpose of the amplifier? <Q> The term "negative gain" is reserved for those cases where the line has a downward slope and so reverses the polarity of the signal (a 180° phase change). <S> A op-amp in an inverting configuration is a prime example. <S> What you have is an attenuating amplifier; the signal out has a somewhat decreased amplitude from the signal coming in but not a different sign. <S> (I'm ignoring the offset of the sloped line in order to keep it simple) <S> The relation of the voltage-over-voltage gain (V/V) to dB gain often confuses people since the dB measurement actually strips out the "inverting" property of negative-gain amplifiers (since you take the log of the absolute value of the gain). <S> Let's set up fours scenarios for different line slopes (V/V gain): <S> Gain: 2 V/V or 20*log(|2| <S> ) = 6 dB and 0 <S> ° phase difference <S> Gain: 0.5 V/V or 20*log(|0.5|) = <S> -6 dB and 0 <S> ° phase difference <S> Gain: -0.5 V/V or 20*log(|-0.5|) = <S> -6 dB and 180° phase difference <S> Gain: -2 V/V or 20*log(|-2| <S> ) = 6 dB and 180° phase difference Scenarios 1 and 2 have a positive slope/gain and <S> thereby a 0° phase difference while scenarios 3 and 4 have negative gain (signal inverting) and <S> thereby a 180° phase difference. <S> Scenarios 2 and 3 have a gain who's absolute value is less than one and thereby are attenuating amplifiers, expressed by a negative dB gain, while scenarios 1 and 4 are "amplifying amplifiers". <S> The Wikipedia page on Gain might explain it better then I can. <S> The purpose of an amplifier isn't always to increase the voltage amplitude of a signal being passed through. <S> It might for example be used to drive a current-hungry device when the source signal/device can't, like loudspeaker power amplifiers do. <A> What you are saying is contradicting itself. <S> You say the graph shows a gain a little less than 1, but suddenly you are saying the gain is negative (less than 0). <S> The gain in the linear region does seem to be right around 1 according to the graph. <S> I can't begin to guess how you got a negative gain out of that, especially since you apparently read the graph correctly. <S> At first approximation, the gain is 1.0. <S> If you use the numbers from the table from input 0 to 6 V, the gain is 0.98. <S> That is certainly not negative. <S> Added: <S> After reading some of your comments, I think you are confused by how you are expressing gain. <S> Gain is simply the ratio of a output response size divided by the input size to get that response. <S> In your case, over the range from 0 to 6 volts in, you get 2.54 to 8.41 volts out. <S> Therefore gain is:    <S> Gain = dOut / dIn = <S> (8.41V - 2.54V) <S> / (6V - 0V) = <S> 5.87V / <S> 6.00V = 0.98 <S> This is close to 1, meaning the amplifier actually attenuates slightly, but it is certainly not negative. <S> The problem seems to be that you then express this gain logarithmically, and the negative result confuses you. <S> Voltage gain expressed in dB is 20*log10(gain), which is -.19 dB in this case. <S> Note that logarithmic values, such as dB, will be negative when the linear value (the straight gain in this case) is less than one. <S> In other words dB gives us a scale where 0 is unity gain, negative values represent attenuation, and positive values amplification. <S> While there is nothing wrong with gain less than 1, and therefore that gain expressed in dB being negative, this is not the same as negative gain. <S> Negative gain means the output is inverted from the input. <S> For the gain to be negative, the output would have to go down when the input goes up, which is clearly not happening in your case. <A> "Negative gain" is an ambiguous term and should not be used. <S> Better to say that an amplifier has a gain or attenuation and also that this gain or attenuation is either inverting or non-inverting.
"Negative Gain" could mean an inverting gain if the gain is specified as a ratio of output to input magnitudes or it could mean attenuation if the gain is specified in negative dBs.
What is the part number for a SIO connector? What actually is an Atari SIO connector, if I wanted to order the part? I have tried Farnell for DB13, Dsub 13 etc but no joy. I am assembling a SIO2ST for an 800XL . <Q> I'm the owner of the site you linked to (SIO2ST schematic <S> http://mixinc.net/atari/pinouts/stxl.htm ). <S> However these connectors are still available from a few sources (like BEST Electronics or B&C Computervision) many people choose to mount such an interface into the Atari itself and just connect the few wires to the internal side of the SIO chassis. <S> You can use a DB9 chassis and make a hole exactly above the SIO chassis to fit the DB9. <S> Wire it in a way <S> so you can use a standard modem cable to make the connection between the Atari XL and Atari ST. <A> It's proprietary. <S> You may have some luck via <S> Best Electronics <S> (apologies for the gaudiness of the linked site) since they seem to have tons of old Atari inventory. <A> Part number is CX-81 for the 5-foot cable. <S> There is also a 3-foot and a 1-foot cable part number; see http://www.best-electronics-ca.com/ B&C Computervisions also stock there. <S> You can also obtain the SIO connector plugs from both sources (email for this; not published online). <S> As others have stated, these are proprietary plugs and are NOS (new old stock) or used. <S> So far, nobody has generated free 3D printer models for these, sadly. <S> If you are semi-permanently connecting these, I would skimp on the cable and just use female to male jumper wires soldered to a pair of Ethernet cables <S> (tho the SIO cables are cheap...). <S> Also see: http://whizzosoftware.com/sio2arduino/
This connector is indeed a proprietary one, only used on the Atari 8-Bit line of computers (400/800/XL/XE).
Identify a light emitting component here's a picture of component that is not a LED but emits light, it's a tiny glass light bulb with a resistor and a red plastic case for mounting it. <Q> It's a neon light. <S> Like it says it works at the mains voltage, you can't make it work at 5 V or so. <S> The thing with the neon light is that it needs a higher voltage to ignite, but then the voltage drops, and the series resistor then will control the current, just like for a LED. <S> So you need the resistor, which may have a high value, like 100 kΩ IIRC. <S> Then the current will be in the order of 1 mA. <A> That looks like a neon lamp to me. <A> Typically from a wall socket or other high voltage source. <S> It will also light up if placed in close proximity to high RF energy (typical of a high voltage transformer as in older television sets or radar units where high RF energy is always present). <S> It will also work close to some microwave systems. <S> I used to use them attached to the plastic cover of an alligator clip to test RF energy being produced in an aircraft radar system while I was in the Air Force; and used them to verify proper output of the high voltage section of televisions to see if the transformer was producing sufficient RF to power the picture tube. <S> Reketek
It is a neon light bulb and requires AC voltage to operate.
Protecting diode bridge from higher current I have designed a battery charger circuit. The circuit is simple AC to DC power supply circuit, it is composed of a 220 Volt to 16 Volt stepdown transformer, a diode bridge and a capacitor. Now the problem is that whenever I connect the charger to the battery the battery starts taking high current up to 19 A and the diode bridge is burnt because the diode bridge can't withstand current higher than 10 A. How can I limit the current to 10 A so that the current is kept in 10 A safe range for the diode bridge. Note that I can't find a high current diode bridge in market here. <Q> If you are confident that the transformer output is appropriate for charging your battery, one solution would be to simply increase the current-carrying capacity of your bridge rectifier. <S> You mention that you can't obtain higher current diode bridges. <S> Can you obtain higher current discrete diodes? <S> If not, and your application can handle the cost of 2 diode bridges, you can make an effective 20A-rated full bridge rectifier out of two 10A full diode bridge modules. <S> If you look at the schematic for a full bridge rectifier, you'll notice that it is possible to connect the two AC input terminals together to obtain two diodes in parallel between the AC input and each of <S> + <S> and -. <S> Since the diodes in a bridge rectifier are usually on the same die, they are likely to be reasonably well matched and likely to current share reasonably well (though never perfectly, so some derating is warranted). <S> Simply use two full bridges connected in this way (one bridge for each AC input with the rectifier + and - terminals each connected in parallel) <A> You need a current limiting element in your circuit, like a regulator IC. <S> Or you can use a transformer that has the desired secondary winding resistance to limit the current in a simple fashion. <S> Or use a higher rated diode bridge if you would like to charge at the higher current and your battery can handle it. <S> A resistor could be used for smaller currents but at this level you would need a very large and expensive resistor. <S> If we say the battery is at around 12V, then (16V - 12V) <S> * 10A <S> = 40W! <S> So the resistor is out. <S> There are various ways of doing this with regulators, ranging from simple to complex. <S> There are certainly many inexpensive commercial solutions out there that you may want to consider. <S> For a simple circuit based on a linear regulator, have a look at the various circuits at the end of the LM338 datasheet Here are a couple of 5A examples: <S> And also a simple 12V battery charger: <S> There are many app notes from TI, Linear, etc, on battery chargers based around their linear and switching regulators, many far more sophisticated than the above. <S> Also there are dedicated battery charge ICs available on Digikey, Farnell, etc you may want to consider. <A> Selection of the resistor has to be made based upon the voltage difference between the charger output and the battery voltage and the current level you want to limit to. <S> Also make sure to evaluate how much power will be dissipated in the resistor, (I <S> * I)/R , and select one with a suitable wattage rating. <S> Have you actually checked the voltage out of your diode bridge? <S> If it is too high you could be forcing a lot more current into the battery than is intended for the type of battery being charged. <S> A sophisticated battery charger will replace the above suggested series resistor with a current control circuit that monitors the battery voltage and adjusts the charge current in an appropriate manner. <S> Think of it as a programmable current source to the battery.
One way to limit the current would be to place a resistor in series with the output of the diode bridge and the connection to the battery.
Turn on a relay when the output is high I purchased a 5V 8 channel realy to use with Arduino. When the output is low the relays are on. I need to turn the relays on when the output signal is high. Is there a way to make the board respond to a high input and to turn on the relay? <Q> This would be my choice. <S> put an inverter between the Arduino and the relay board. <S> Take for instance a 74HC540 (my original suggestion) or a much more common uln2803 as StevenH suggests. <S> This would be my choice if you really can't change the software. <S> change the board itself. <S> Bad choice IMO. <A> Inverting the logic in your software, like Wouter says, is the zero cost solution. <S> If you don't want that you can change the logic with little hardware. <S> For a single relay I would use an NPN transistor, but you have 8 relays and <S> then the ULN2803 is a good solution. <S> It's an array of 8 transistors with base resistors integrated, so you don't need any other components, not even a power supply. <S> Due to the higher saturation voltage of the Darlington transistors your LED current will be a bit lower, but the Darlington on the relay side will fix this. <S> You may also decrease the value of R1, the LED's series resistor. <A> Maybe I'm misreading the device data, but with this device you have both options available to you? <S> A logic 0 at the input connects relay pins 1 and 2A logic 1 at the input connects relay pins 2 and 3 <S> So if your load is currently over pins 1 and 2, swap it to 2 and 3 <A> Have a look at Arduino cc and look at digitalWrite() <S> You then set your pin to output low to turn your relay on <S> don't forget to set your pin as an output. <S> Bob <A> Inverting the logic on the code is not always a good solution because the relay can be turned on while the device is booting. <S> Another solution is using these connections: <S> JD-VCC <S> ---- <S> > 5VVCC <S> ---- <S> > <S> Digital IOIN <S> ---- <S> > GNDGND <S> ---—> <S> GND <S> The digital input can be 3.3V <S> Unhappily it does not work when we have many relays on the same board sharing the same VCC and GND.
You could invert the signal inside the software.
Is there any motor which moves slowly and gives strong torque? I need a strong torque motor which move slow. However, I don't want to use gear train because gears will be damaged easily by the strong torque. Please give me some suggestion. <Q> You can salvage a few of those from old printers and scanners. <S> And if you use microstep control , you can make it very slow and accurate (below the fundamental step of the motor). <S> The problem with steppter motors is that they consume lots of current regardless of speed. <S> In any case, there are gears that can take a lot of torque. <S> The gearbox in your car does a good job, for instance. <A> Did you know about these motors : <S> I think the industry name is direct drive motors or torque motors , these are AC or DC servo motors that are wound and designed for High torque and low speed . <S> Their main purpose is replacing a geared motors ( higher efficiency , better inertia , faster response , zero backlash ) <S> there main application is rotary tables in 5Axis CNC machines and anywhere slew drives where used previously. <S> Some manufacturers are : HIWIN motorpowerco kollmorgen <A> A gear reduction or pulley reduction would likely be your best option to get increased torque and reduced speed. <S> However, this would restrict the working speed to the exact ratio between the input and output gears or pulleys. <S> There are variable pitch pulley sets that use a belt or a metal belt. <S> The metal belt would likely not be practical for a custom-made device, but there are currently variable ratio transmissions in some automobiles. <S> Check out the transmission in a new Nissan
Therefore, the solution would be a variable pitch pulley that would provide a wide range of ratios to arrive at the desired speed. The cheapest and most common thing you will find is a stepper motor.
Best IDE for 32-bit microcontroller on Linux I'm choosing a 32-bit microcontroller to implement a Kalman filter. I am very attracted to the Atmel Studio 6 IDE. However, it only appears to run on Windows. Could anyone suggest a good Linux IDE? Otherwise, I think I'll go with Atmel Studio 6 IDE in a virtual machine. Many thanks in advance, <Q> I have used it for embedded development on Linux and found it to be quite useful. <S> PS: Here is the link to their site: http://www.geany.org/ . <S> Good <S> though it is, I'd still recommend you to go ahead with Atmel Studio because IMO it is the best free IDE for embedded ever made. <A> I run Atmel Studio 6 in a VM, and it works fine. <S> It will probably be the simplest method for you. <S> Or as @elf said, Geany for more basic projects. <A> I'm a fan of Code::Blocks, but I use my own makefiles as the back-end rather than their build system. <A> What kind of 32-bit? <S> If it's ARM, Rowley Crossworks is an IDE many people seem to like <S> and it has native Linux support. <S> http://www.rowley.co.uk/ <S> It's not free though.
Geany is small, fast and has a good feature set. Otherwise I like to use Eclipse in Linux, it is also available in Windows too, and it has a lot more features than most other Linux IDE's.
What's this connector pictured called? Can anyone identify the connector on the right of the picture? A picture of the same, taken from a different angle: <Q> If you are trying to use the ready made assembly that you had pictured - ...with the automotive accessory plug on one end and the unidentified molded job on the other end it may turn out to be more productive for you to simply cut off the end of the cords and attach a more readily available type of connector. <S> One type of plug and jack series to consider would be these: <S> There are latchable cable ends, panel mount and PC board mount styles to select. http://www.mouser.com/ProductDetail/Kycon/KPJX-PM-3S-S/?qs=sGAEpiMZZMu2f9RNbWupYsheFHL1OiH6%252bfIsWV6Yx1o%3d <A> Makes me think this is perhaps a proprietory connector? <S> The only times I have found one on the net they are linked in some way to Waeco portable fridges, and these guys also seem to manufacture for a lot of brands. <S> Might be specific to them? <S> You can buy spare cig lighter leads with this connector end either from Waeco fridge dealers <S> (be prepared to pay the equiv of US$30+) or from Ebay more reasonable, about US$10. <S> Here's a link for an auction in progress. <S> He ships worldwide and is charging about US$7 for a made up lead. <S> Prob the best way to go my friend! <S> On the other hand, you could do what I did and solder a little flylead on the rear of the DC connector, with a standard type DC socket on the other end. <S> Poked it out of a vent hole easily and tied a knot for strain relief... <S> I did that <S> and it works a treat, if I get round to buying a proper lead I can chop it off and make it look nice again. <S> Fridge back in action for the next fishing trip and the beer is cooling! <A> Yes it looks like the Kenwood plug. <S> I've measure one: <S> Drawing vs measurement: <S> 14mm = <S> > <S> 13.2mm , 5mm => <S> 5.7 <S> mm Total thickness 7.74mm. <S> Distance between the contacts <S> 7mm Be aware the CB connector is a bit smaller: <S> Distance between the contacts <S> only 6mm. <S> Also it has rounded sides. <S> Kenwood socket (rear of TR-7200G): <S> Kenwood connector: <S> On the connector it reads : <S> AC 250V 1.5ASuppose <S> it was legal those days... <A> This looks like an IEC 60320 connector. <S> http://en.wikipedia.org/wiki/IEC_60320 <A> Asking for a part for a brand name will always be more expensive than obtaining a generic part (as if you didn't know). <S> Cheers
This is an R2PPC DC connector, commonly used on mobile R/T equipment and some Kenwood/Trio Comms receivers 20 - 40+ years ago. I have been researching myself, to the point of dismantling my coolbox to see if there are any part numbers etc on the chassis connector - and there weren't.
What is a typical example of a combinatorial feedback loop? By looking at some of the details of the Altera timing analyzer TimeQuest, the concept of a "combinatorial feedback loop" was mentioned. The obvious search is not terribly helpful and there doesn't seem to be a Wikipedia article on the topic. What exactly is a combinatorial feedback loop in the context of FPGA and ASIC design? Is there a typical example to illustrate the concept? If an example is provided using an HDL, I much prefer Verilog over HDL. <Q> A combinatorial feedback loop is created when the output of either a gate or a combinatorial path is fed back as an input to the same gate or to another gate earlier in the combinatorial path. <S> The most simple case may look like this: always @ <S> (a or b) a = a + b; <A> The simplest example would be an inverter with the output tied to the input. <S> Combinatorial loops are almost always errors, but sometimes they show up in ASIC designs in the form of long chains of inverters connected in a loop. <S> These can be used to provide information about the speed of the device technology. <A> An incompletely specified case statement can cause this. <S> In the undefined cases, the output isn't changed. <S> And the output is based on the previous output, so there is a loop. <S> This also creates latch.
A combinatorial loop is when a loop is formed where the output of a gate feeds back to the input without passing through any sequential element.
USB micro B receptacle has 6 mounting tabs. How many do I actually need to ground? This USB micro B has 6 mounting tabs. If I ground none or only 1 of them, will it ruin the signal? There is a pad for the signal ground that is separate from the mounting tabs. Fyi USB 2.0 has a max signal rate of 400 Mbps, and an effective payload throughput of up to 35 Mbps, according to Wikipedia . Is there a general best practice for lazy / layout-confined people to decide how many mounting tabs have to be grounded for a tens-of-megabits connector? If I only ground one of the tabs, should it be the one closest to the board edge (i.e. to the cable)? Thanks! <Q> I think normally you don't ground the USB shield on the device side. <S> Instead, you should connect your shield to the chassis/other shielding components, and connect your PCB ground to the USB ground. <S> Between the USB ground and shield you can add a 1Mohm resistor in parallel with a 4.7nF ceramic capacitor. <S> References: Cyprus Semiconductor: <S> Common USB Development Mistakes <S> Atmel: <S> USB Hardware Design Considerations <S> edit: <S> did a little more digging, and for higher speed connections <S> it seems like you do tie the shield to ground? <S> I'm not entirely positive about this. <S> How To connect USB connector shield <A> <A> It's not clear to me. <S> http://www.hardwarebook.info/Universal_Serial_Bus_%28USB%29#Shielding says to connect the shield to ground only at the host, which makes sense from a ground loop perspective, but the discussion at http://forum.allaboutcircuits.com/showthread.php?t=58811 shows standards that point to direct connections, connections through a ferrite bead, and connections through a capacitor! <S> The big cahuna, the USB2.0 Standard at http://www.usb.org/developers/docs/ , says 6.8 USB Grounding <S> The shield must be terminated to the connector plug for completed assemblies. <S> The shield and chassis are bonded together. <S> The user selected grounding scheme for USB devices, and cables must be consistent with accepted industry practices and regulatory agency standards for safety and EMI/ESD/RFI. <A> The tabs soldered to the board are an essential part of providing a secure mounting of the connector to the board. <S> I'm reading comments here regarding your not wanting to put vias by every tab into the GND plane. <S> What in the world are you trying to save here?? <S> BTW, I have actually found that vias actually can play a role in making a pad stay on a board more securely than just a free copper area. <A> Ground all of them; I can't imagine what you would save if you aren't making millions of the boards (literally). <S> You can't run signals there. <S> If they aren't through-hole, just pads you aren't effecting the lower layers.
The main function of the mounting tabs, besides of course providing ground connection, is to hold the connector in place and prevent it from damaging the tracks on the PCB during connection of the cable.
Initial experiments with an oscilloscope So I finally have access to an oscilloscope, after wanting to use one for a very long time. Now that I am in university, I can use the lab equipment. So my first question is, what should I do with this new found resource? Are there any experiments which you all suggest I should try as an introduction to this tool? Thanks, I hope this question is not too vague. <Q> The first thing I would do is read some literature on how scopes work. <S> Tektronix has a good white paper called XYZs of Oscilloscopes . <S> Next, you should hook up a function generator and figure out how the different display controls work. <S> This includes the Y scale [Volts] and the X scale [Time]. <S> Once you feel comfortable with those get comfortable using the triggers. <S> Triggers allow you to capture a waveform at a certain point based on your trigger settings. <S> As an example, you may set the trigger to start capturing a waveform once it sees a rising edge at 300mV. <S> If you are on single capture in "normal" (not auto) mode it will freeze that waveform on the screen until you push a button to capture another one! <S> Being able to use triggers is something many new engineers don't master, effectively making scopes useless to them. <S> Get good at them and you will be teaching the rest of the class! <A> If you're using a scope in a lab where others have access to it and can use it at will, I have a suggestion that will save you a ton of frustration at the bench! <S> I can't tell you how many students I've seen work at a circuit for tens of minutes without understanding what they were seeing only to find that somebody had set a channel to AC-couple the input!! <S> Same with channel inverts, and trigger settings like HF-reject, etc. <A> If you can afford to spend a few bucks, hit up Amazon for a copy of Charles Roth's programmed text Use of the Dual-Trace Oscilloscope . <S> It is ancient (1982), but still useful. <S> Two, maybe three full generations of EE students have learned the basics of scope fu from this book (or its predecessor). <S> Full Disclosure: I own a copy, although I never used it in class, and instead learned my scope fu hands-on. <S> I had Dr. Roth for two classes, Back In The Day. <S> He is one of the best teachers I've ever encountered, and that's saying something, as UT Austin had a LOT of good ones. <S> He's the only professor I ever encountered who could write a test that would take me exactly the time alloted, cover exactly the critically important stuff, not cover any of the fluff, not throw any trick questions, and still leave me limp as a wet dishrag at the end of it. <S> I think that must have been his superpower.
Develop a routine where as soon as you walk up to the scope, you check all those nasty settings on the individual channel menus and trigger menus that others could have changed, and set them to your personal baseline.
Placement of undervoltage monitor and cutoff Suppose I have a circuit running at 3.30V, supplied via an LDO regulator (e.g., ADP124 ), powered by a Li-ion battery. In other words: Now, I would like to implement an undervoltage cutoff to "turn off the power", because of these two coexistent reasons: This prevents the load (i.e., microcontroller, ADC, etc.) running at anything less than a regulated 3.30V Equivalently, this also prevents the battery from discharging to anything lower than 3.50V (i.e., equal to 3.30V + 0.20V dropout) thus ensuring that it doesn't enter deep discharge. Question 1: Which of the following options is preferable for the undervoltage monitor's sense-LOCATION (i.e., point where it measures the voltage)? Option 1) Option 2) Option 3) Other? Question 2: Which of the following options is preferable for the undervoltage monitor's switch-ACTION (i.e., the way it implements the cutoff)? Option 1) Option 2) Option 3) Something else? To me, Option 1 appears best/most-direct for both Question 1 and 2 above, but perhaps I'm missing some considerations. <Q> Q1. <S> Option 1 - because the regulator output would need to be monitored for say 3.25V to allow some variation, and worst case temperature variation needs dealing with, and load transients may be an issue (or not) whereas monitoring at the regulator input achieves a "Minority Report" <S> (Movie :-) ) effect of "detecting the problem before it causes a problem" and acting on a smoothly falling variable ( = Vin). <S> Note that 3.5V is well above safe Vmin for the LiIOn or LiPo battery and only the regulator dropout needs to be considered. <S> Q2: Various issues. <S> Needs more discussion. <S> Option 1 OK. <S> Option 2 probably also OK. <S> Has power down current considerations. <A> Question1: <S> Option 1 is better for the following reasons: You can precisely set the cutoff voltage and you don't depend on the manufacturing tolerance of the regulator. <S> Second: you can easily include a small security zone because unvervolting LiIon is quite bad in terms of capacity loss (afair!). <S> Regulators have (almost every time) a low quiescent current and don't add additional resistance in the path between the power source and your load wasting energy <A> Question 1: Option 1. <S> This is a more reliable indicator of the actual battery voltage. <S> Question 2: <S> Use the regulator's enable input if it has one. <S> This saves you having to add an extra transistor. <S> This will reduce the amount of current drawn by the regulator. <S> There are two ways you might implement this: 1) Use a potential divider to create the Enable voltage. <S> When the output voltage of the divider goes below the enable threshold voltage, then the regulator switches off. <S> The problem with this is that the voltage threshold of the enable input is pretty flexible: <S> The threshold is somewhere between 0.4v and 1.2v! <S> This isn't going to be accurate enough for your purposes. <S> Instead, I'd suggest using a comparator: <A> For question 1, I would go with the second option. <S> 3.5V cutoff is not near a deep discharge (this would be at 3.0V). <S> So your first reason for switching off the circuit is not needed, since you could discharge the battery safely to 3.3V. Measuring after the the LDO ensures that your second reason is considered, since you then aren't depended on the dropout voltage of the regulator. <S> If it is larger than 0.2V, you switch of too late, and the MCU supply voltage drops below 3.3V. <S> If the dropout voltage is smaller than 0.2V, you switch of too soon, and could have run longer on the battery.
Question 2: I'd go for the cutoff on the regulator as any switch will have a small current flowing throught it. The drop out of the regulator will be affected by current.
Using an open-collector output from one IC to trigger a level change on the input pin of another IC? So my problem is simple: I have an IC that provides an output pin to alert you when some condition is met. The output pin is open-collector, high-impedance when active. I want to monitor this output on another IC (a microcontroller, specifically). Is this as simple as having a pull-up on the output so when it's "on"... the level goes low and I just monitor for the high-to-low transition? I feel like I'm overthinking this, but it's not immediately setting off a light-bulb in my head. <Q> Yes! <S> It's that simple. <S> That's part of the reason open collector is so popular. <S> You'll find that all the cheap comparators (e.g. LM393) have OC outputs. <S> If you attach a pull-up a resistor from the range of 1kΩ − 15kΩ everything should be O.K. <S> If you want to do everything properly, consult the IC's datasheet for the OC current ratings and use an appropriate resistor. <A> Jonny and Bruno already confirmed that this is the right way to do it. <S> Most microcontrollers have internal pull-up resistors on their I/ <S> O pins, so you could use that and save an external part. <S> You may have to enable the pull-up resistor, since they're not always enabled by default. <S> Open collector outputs have two main uses: wired-ANDing a line, by connecting more outputs to the same pull-up resistor. <S> The line will be low if at least one open collector output pulls it low. <S> Typically used in I2C, for instance. <S> Connect to a different voltage: <S> a 3.3 V logic output can be pulled up to for instance 5 V to connect to TTL level. <S> For high speed the open collector has a disadvantage, however. <S> While the transistor can sink enough current to discharge a capacitive load fast (think of a long wire), the pull-up resistor will make rising edges slower, depending on the RC time constant. <A> The typical value for the pull-up resistor is 10 K. <A> One point not yet mentioned is that while a resistor may be used to pull up an open-collector line, it will waste more current for a given level of performance than would some other methods. <S> The problem is that while the open-collector output is simply sitting low, the resistor passes the most current even though nothing is happening and thus speed really doesn't matter, and only half as much current when the output is approaching half-rail and speed does matter. <S> A constant-current source would pass the same amount of current in both scenarios. <S> Some more sophisticated circuits can do even better, passing only a little bit of current when the output is simply sitting low, but increasing the current as soon as it starts to move. <S> Such approaches can greatly reduce quiescent current without significantly sacrificing performance; the biggest danger is that if the output isn't being driven hard low, they may (depending upon the exact approach) draw excess current and/or oscillate. <S> Still, active approaches may be helpful in some cases where one needs to e.g. detect quickly when a switch opens but doesn't want to burn much current through the switch while it's sitting idle.
Yes, all you have to do is to add a pull-up resistor to the open-collector output, provided that the other IC input doesn't need much current it will be OK.
Is it advisable to stay stick to Arduino IDE? Is it better to move to AVR studio (or any other better alternative?) over the Arduino IDE. Feel like it's so simple and childish. I need to know the experts idea and choice.. <Q> It's simple because it has to be accessible to everybody , and that works: <S> everybody and his little sister can program Arduino. <S> If you feel you can handle something more like Real Programming <S> I would certainly do so. <S> You'll have to write more code, but also will have more control. <S> An important point: the Arduino library is horribly inefficient: functions like DigitalWrite and DigitalRead can be made up to 50 times faster . <A> A huge advantage of using e.g. AVR Studio is the ability to use all the libraries made for ATmega168/328 before the dawn of Arduino. <S> FFT libraries, libraries for using some obscure IC you have purchased, rudimentary digital filters, and many more can be found on AVRfreaks and hundreds of other hobby sites. <S> You can also write more efficient code if you learn how to utilize standard AVR libraries and study the microcontroller's datasheet (or tutorials). <S> However, sometimes you want to control the timing more efficiently. <S> AnalogRead <S> () needs 100µs to execute. <S> That corresponds to 10ksps (thousands of samples per second). <S> You can easily pump that to 70ksps if you access low-level code for the ATmega168/328. <S> You can do all of that in the Arduino IDE, of course, but at some point your projects might become too complex, and you will want to write your own libraries with faster functions. <S> AVR Studio might be more suited for that. <S> Also, if you ever want to program any AVR chip other than those offered by Arduino, you will need a programmer and a different IDE. <S> Small projects that use 1kB of code can be done on an ATtiny. <S> You can buy a dozen of those for the price of a single ATmega328. <S> Those chips are cheap and have most of Arduino's capabilities: I2C, SPI, ADC. <S> You can even find libraries that add a USB HID interface! <S> No serial drivers or anything! <S> Personally, I first write code in the Arduino IDE, without code optimization. <S> If it works, that code can be easily transcribed into standard C++ libraries and made more efficient. <A> Most of the responses have focused on using the Arduino board as a standard AVR board. <S> But you can also use a more advanced IDE and still take advantage of the simplicity of the Arduino coding and built-in libraries (along with the disadvantages mentioned above). <S> EngBlaze just did a tutorial on this: Tutorial: <S> Using Atmel Studio 6 with Arduino projects <A> The Arduino IDE trades code efficiency for convenience and speed of development for small projects. <S> Because experts have deadlines too, it's perfectly acceptable to use the Arduino IDE for a quick proof-of-concept or to help debug another project. <S> If you want to specialize in embedded software development, you must be able to use more powerful development tools, such as AVR Studio, or avr-gcc and your preferred IDE. <S> Going beyond mastering the development tools, learning the inner workings of a microcontroller and knowing some assembly is definitely a plus if you intend to work on systems with small memory, and/or low power requirements, and/or high performance.
For simple applications, arduino code is easy to write and debug.
What are the practical uses of ASIC? Microcontrollers, FPGAs, ASIC (Application-specific integrated circuit) all are used for similar type of applications (at different levels). I know about microcontrollers and FPGAs. But what is an ASIC really? I have a hard time understanding why we have all off these very similar technologies. <Q> We used an ASIC in a number of products where a microcontroller used too much power. <S> It was a fairly simple device, a couple of hundreds gates, and had to consume less than 100 nA static, which for microcontrollers at the time was not possible. <S> Price was comparable to a microcontroller due to high quantities; you'll probably need >100 k/yr. <S> An FPGA would not only have been overkill, costing a lot more, but would have needed an external code Flash, which added to the already bigger footprint. <A> When you're trying to design an electronic system, you can generally come up with a multitude of technically valid solutions using a combinations of off-the-shelf chips, including programmable components (µC, µP), analog components, programmable logic (FPGA, CPLD) and memories. <S> Sometimes it can be interesting to integrate just the functionalities you need in a chip dedicated to your application (or a limited sub-class of applications) and that is what an ASIC is: a combination of analog functions, digital functions, programmable logic, programmable controllers, and different types of memory, in a single chip . <S> An ASIC might also be the only possible solution when your system needs to reach a high energy efficiency (eg. <S> lowest joule/operation) or very high performance (eg. <S> lowest latency, or highest operation/second). <S> ASIC cost a lot to develop (100's of k€, often much more), but the cost to produce thousands of silicon wafers after the initial investment is low (cents to tens of cents per chip). <S> They also take several month to design, verify and produce, and require a very complex methodology, and outrageously expensive development tools. <S> That's why they're used for high-volume applications (eg. consumer electronics) and application where you can charge a huge price per chip (eg. space hardware, routers for ISPs, etc.) <S> so the distinction is not always simple, but the following is generally true : FPGA as available off-the-shelf <S> , ASIC are not FPGA cost 10-1000€ per piece <S> , ASIC cost 0.1-10€ per piece development tools for FPGA are accessible, for ASIC it cost a fortune <S> FPGA systems can be designed in weeks, ASIC take months FPGA are less power efficient than ASIC that are designed for power efficiency <S> FPGA are less powerful than ASIC that are designed for peak performance <S> FPGA are available with a limited set of analog functions, ASIC can be designed with all kinds of analog functions (for power management, signal processing, interface, etc) <A> ASIC is an integrated circuit (IC) customized for a particular use, rather than intended for general-purpose use. <S> For example, a chip designed to run in a digital voice recorder is an ASIC. <S> Field-programmable gate arrays (FPGA) are the modern-day technology for building a breadboard or prototype from standard parts; programmable logic blocks and programmable interconnects allow the same FPGA to be used in many different applications. <S> For smaller designs and lower production volumes, FPGAs may be more cost effective than an ASIC design even in production. <S> Says wikipedia .. <A> ASICs have great utility in aerospace applications. <S> Because they are not field programmable they are more radiation tolerant. <S> This is generally important for space applications, because of the harsh environments, and for military applications, where hardware may need to operate through induced radiation environments. <S> At large volumes ASICs can actually be cheaper than FPGAs, such as in high-production-rate missiles. <S> The downside of ASICs is that because the logic is burned into the circuit you have to get it right before you spin a large lot. <S> FPGAs are often used for initial development with ASICs design and fab coming relatively late when the underlying logic is solid. <A> ASICs are application specific ICs which are designed for a particular application or purpose. <S> I would say that something like the A6 processor on the new Apple iPhone would be a good example of an ASIC. <S> Everything on it would have to be designed from scratch so generally the non-recurring cost or the research cost that goes into it is really high. <S> So, generally ASICs are used when the ICs are going to be produced in very large quantities so that the total cost of each IC is very small. <S> The cost of each IC is given by Cost of each IC = variable cost + (Non-recurring cost/Volume of ICs), where the variable cost is the manufacturing cost of each IC and the non-recurring cost is the amount that went into designing the initial IC. <S> However, FPGAs are ICs which serve a more general purpose and are available off the shelf like someone has already mentioned before. <S> But this is a cheaper option only when you need a few ICs. <S> Going out on a limb and this should only serve as a means of trying to understand the difference, I can say that if the FPGA technique was used for the A6 iPhone processor and the obvious number of iPhones that Apple sells, the FPGA technique would be costlier for Apple when compared to the ASIC method. <S> You might to take the last statement with a pinch of salt.
Some ASIC integrate programmable logic like a FPGA, and some FPGA integrate application-specific analog blocks
"USB is also a serial communication method" is this true? I'll repeat the title. Is it true that USB is also a serial communication method ? (a bit confused, someone told me @ facebook :D) <Q> Most wired communication nowadyas is serial, and so is USB. <S> Expensive term: Time Division Multiplex , compared to Space Division Multiplex , where different bits use different physical wires in parallel. <S> Remember the old IDE hard disks, floppy drives and SCSI devices for instance and the flat cables they used. <S> Serial has the advantage of smaller and cheaper connectors and cable, but needs a much higher bandwidth than parallel. <S> Nevertheless at high speeds also parallel communication <S> may be timing sensitive if there are delay differences between the different lines, so that all signals may not arrive simultaneously. <A> Yes. <S> USB= <S> Universal Serial Bus. <S> "Serial" just means that the info comes across the bus one bit at a time, as opposed to parallel schemes where nibbles, bytes, or words come through. <S> When serial busses were slow, there was more advantage to parallel ports. <S> These days its hard to buy a computer with a parallel port <A> How do you define "method"? <S> Do you mean protocol? <S> Interface? <S> All of the above? <S> USB stands for Universal Serial Bus. <S> The canonical definition of USB is: <S> Universal Serial Bus (USB) is an industry standard developed in the mid-1990s that defines the cables, connectors and communications protocols used in a bus for connection, communication and power supply between computers and electronic devices. <S> There are numerous device classes associated with USB, like mass storage, HID, audio, all of which have somewhat different protocols and software requirements. <S> I would argue that USB encompasses many methods of serial communication, and is too broad a term to be referred to as a singular method 'per se'.
Serial just means that bits are transferred one after another in time, so that you only need one wire (two if you want to do it differential, like in USB).
Are capacitors and inductors capable of absorbing positive power? A resistor is capable of absorbing positive power.Why wouldn't this be true for capacitors and inductors? <Q> An ideal resistor dissipates (converts into heat) electrical power. <S> They are not capable of delivering power. <S> Capacitors and inductors both are capable of absorbing and delivering (positive) power. <S> When power is absorbed by an ideal capacitor, all of it is stored in the form of an electric field. <S> Likewise, all of the power absorbed by an ideal inductor is stored in the form of a magnetic field. <S> These devices can deliver this stored energy, but cannot produce energy. <S> Real capacitors and inductors, however, are not ideal, and will dissipate some power due to imperfections within the device (leakage within a capacitor, for example). <S> This is why in simulations, capacitors and inductors will sometimes have very complex models to attempt to simulate real-world behavior (such as a leakage within a capacitor, which can be modeled simply with a high-resistance resistor in parallel with the capacitor). <A> In DC analysis: Capacitor acts as an open-circuit (I=0 Amperes) <S> Inductor acts as a short-circuit (V=0 Volts) <S> If \$Power = Current <S> \cdot <S> Voltage\$, therefore: Power in capacitor is <S> \$0 \cdot <S> Voltage = 0 \; <S> Watts\$ Power in inductor is <S> \$0 \cdot Current = 0 \; Watts\$ <A> By convention,Positive Power is the on that flows from source to load. <S> Negative Power is the one that flows from load to source. <S> But as soon as power source is disconnected they release back the absorbed power to the circuit. <S> In case there is no circuit available to provide path for power flow to source the energy remains trapped and this is how a capacitor retains charge. <S> For inductor,the energy stored compenstaes(opposes) <S> the change in current when source is disconnected. <S> In an ideal capacitor or Inductor Ohmic losses are zero. <S> Thus power absorbed = <S> power released and there is no net power dissipation.
Yes,Capacitors and Inductors absorb positive power and store it in the electrostatic and magnetic field respectively.
L298 H-Bridge not working I have an L298 H-Bridge, but I cannot, for the life of me, get it to work.I have connected Vss to +5v, GND to ground, Input 2 to +5v, Enable A to +5v, Input 1 to ground, Vs to +5v, Output 2 to a motor terminal, Output 1 to the other motor terminal, and Current Sensing A to ground. The motor will not spin. I lack a volt meter at present (very short term, I usually do have one), so I tried tasting the wires. There is no electrical tang whatsoever (power supply does taste tangy, so that's not the problem!) This is the simplest circuit I could think of to test this thing and it will not work. Please help me! <Q> It is always an immensely good idea [tm] to provide a datasheet link like this <S> What you describe SOUNDS OK. <S> Do you have protection diodes? <S> Without them it may have switched once and then shuffled off its mortal coil <S> *. <S> (*=made magic smoke, visible or not). <A> You will never guess my problem. <S> I will give you a hint: it wasn't my wiring... <S> sort of... <S> The stupid package this chip is in doesn't fit very nicely in a breadboard. <S> This is the second stupid-mistake question I have asked on stack exchange recently. <S> What is the appropriate action from here? <A> I have similar question, but in your case, I think you have made a very BIG mistake. <S> Vs <S> must greater than Vss about 2.5V at least. <S> Check the datasheet. <S> e.g.: Vs=7.5V(power supply for the motor) <S> Vss=5V (logic voltage) <A> I just had a similar problem with the L298 not working. <S> It turned out that the sense pin must be connected to GND (via a current sense resistor or not) as it somehow controls the output current, and when not connected, the output current is quite close to 0. <S> This was not quite clear in the datasheet which, in the introduction, states that the corresponding external terminal can be used for the connection of an external sensing resistor. <S> which sounds like one could optionally connect something to the sense pin if one then wanted to measure the current that flows. <S> However it becomes clearer with this: <S> The current that flows through the load comes out from the bridge at the sense output : <S> an external resistor (Rsa ; Rsb .) allows to detect the intensity of this current. <S> So the Sense terminals are actually the emitter of the respective stage.
I had rocked the chip back wiring it up which disconnected all of the pins on one side.
What problems could occur when chaining 40 shift registers? I'm planning on chaining together 40 x 74HC595 shift registers. The whole chain of 74HC595s will be controlled by a 5 V microcontroller, which will generate the SDI , CLOCK & LATCH signals. Each shift register and the microcontroller will have its own PCB, as illustrated in the diagram below: Because of mechanical constrains, the distance between each shift register will be of about 30 cm (12 in), so the control signals will travel along a distance of aprox. 12 m (40 ft). Besides that, the whole system will be mounted in a very noisy environment (near fluorescent lights, mains wires etc.) My concern is that the control signals will be very noisy and the shift registers might output the wrong things. I was thinking of: Using a buffer IC on each board, to buffer the control signals. Which one would you recommend? Using shielded cables between the boards for the signals Lowering the CLOCK frequency as much as possible. I only need to update the registers' content a few times a day. Are the above solutions a good thing to do? What else can I do to keep the (potential) noise in the signal wires to a minimum? <Q> Use Schmitt-trigger buffers at the inputs of each board. <S> They will clean up the signals so that any noise won't give false pulses on the clock, for instance. <S> The 74LVC3G17 is a triple non-inverting buffer. <S> Also, pass the buffered signals to the next board. <S> Otherwise all inputs would be parallel and you may exceed the fan-out of the driving microcontroller (I'm especially thinking of the total capacitive load). <S> The daisy chain of clock and latch signals will give a ripple delay throughout the chain, but the data will do so as well, and you plan to go for low speed anyway. <A> The problem that can occur is that some SR clocks before the next SR clocks, so that next SR will clock in the wrong data. <S> A (standard?) <S> solution for this is to wire the clock starting at the last SR. <S> I would consider adding a (schmit-trigger?) <S> buffer at each board for all 3 signal lines. <S> (edit) Lowering the clock frequency won't help (unless it was far too high to begin with). <S> The problems you can have occur at the clock edges, which you will have anyway, no matter how low you choose your clock frequency. <A> The biggest issue when chaining shift registers is ensuring that the timing relationship between the clock used by each board uses for receiving data and the change in data from the previous board is predictable. <S> The fact that the output of the 74HC595 changes on the same edge as the clock is a little annoying in that regard. <S> I would suggest that the clock signal should be buffered as it goes through each board and that the data signal coming out of one board's 74HC595 should be put through a buffer that will delay it by a time slightly longer than the clock buffer. <S> If the number of 74HC595 outputs you'll be using is one (or more) less than the number supplied by your chips <S> (e.g. on a board with two 74HC595's you actually only need 15 outputs) you could feed the last 74HC595 on a board with a clock inverted from the others, but that would cost you the use of one 74HC595 output for each time the signal passes between a non-inverted-clock 74HC595 and an inverted-clock 74HC595.
Alternatively, you could use a shift register like the 74HC4094 which has its data output change on the falling clock edge, or you could add a flip flop between the output of the last 74HC595 on the board and the next board, and have that flip flop latch its output on the falling edge of the clock that drives the 74HC595's (perhaps pass the clock through two inverters to buffer it and feed the inverted clock signal to the flip flop).
Separating the Grounds for 2 Chips I am working on a design that requires Two Chips - Energy measuring chip (for analogue measurement) and a MCU (for connecting to a communication peripherals, and connected to a PC.) Both Chips is to be powered by a 3.3V DC supply. But the ground for both chip has to be different. How can I possibly go about that? Please refer to page 3 of ADE7878 Eval Board Power supplies. I intend to use a SMPS for this design. Thanks a lot. <Q> In a production design, you would use an isolated DC-DC converter to transfer power from the microprocessor domain to the metering domain. <S> You can purchase these as pre-built modules from any number of vendors. <S> Make sure that the isolation rating of the converter is sufficient for the mains voltages you're dealing with. <A> One way is to use two optocoupler. <S> Connect your chip to input optocoupler and output to MCU. <S> So, your MCU ground and chip's ground will be differ. <S> But it depends on your chips behavior. <A> In normal configurations, you maintain the analogue and digital grounds as separate grounds, joining them together at a single point. <S> Depending on your circuit, you may include coupling capacitors or an inductor at the connection. <S> However, as observed by @Dave <S> (and I'll quote the datasheet) <S> this device needs to maintain different, isolated grounds: <S> The ground of the ADE7878 power domain is determined by the ground of the phase voltages, VAP, VBP, VCP, and VN, and must be different from the ground of the micro-controller’s power domain. <S> So please refer to Dave's answer...
For prototyping, two separate AC-input power supplies can be used.
What does "net current" mean? I am sorry if this sounds to be a silly question. Maybe I am having trouble interpreting the expression in english since it is not my first language. I would like to know what the expression "net current" means. Example of usage: "KCL states that no net current can flow into a node". <Q> "Net current" means the sum of all currents, keeping current direction in mind. <S> If there's going 1 mA into a node, and 5 mA out, then the net current is 4 mA out. <S> KCL says that the sum of all ingoing currents must be the same as the sum of all outgoing currents. <S> Note that this doesn't only apply to nodes, but to any bounded region. <A> The sum must be zero, because there's no place for any "extra" current to go. <A> I would like to know what the expression "net current" means. <S> It's similar to the notion of "net force". <S> If you consider all the forces acting on an object, the net force is simply the vector sum - it's the resultant force. <S> Similarly, the "vector" sum of currents ( in is positive, out is negative) gives the net current into the node. <S> (If you reverse the sign convention above, you get the net current out of the node.) <S> KCL simply says that the net current into (or out of) a node is zero. <S> As an analogy, think of a bank account. <S> Cash deposits in to the account are positive, cash withdrawals out of the account are negative. <S> The net money in to the account is just the "vector" sum of deposits and withdrawals. <S> If "KCL" applied to this bank account, the net money in to the account would be zero which means that whatever amount is deposited is also withdrawn. <A> "net current" = <S> total current Current is the rate of flow of electric charge. <S> KCL follows directly from the principle of conservation of electric charge and states that the vector sum of all currents flowing through a node -- i.e., the net current -- vanishes. <S> To calculate this vector sum, simply add the currents flowing in (positive) and out (negative) of the node. <S> The result is always zero. <S> Whatever goes in, comes out.
In this context, "net" means the sum or total of the individual currents flowing into (positive current) and out of (negative current) the node.