source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
Does somebody know about a tool to design filters for DSPIC? I have to make a filter with DSPIC33 and I want a program that design the filter (there are a lot), yet export code to DSPIC (in c, any compiler or assembly). <Q> Microchip sells such software: http://www.microchipdirect.com/productsearch.aspx?Keywords=SW300001 <S> Alternatively if you don't want to pay, you can use any FIR or IIR filter design software you want to come up with your coefficients, implementing the filter on the dsPIC is really easy with microchip's DSP library which is included in the C30 compiler, which I assume your using. <A> Best way is to design and simulate your filters and algorithms in matlab and then implement the functions by writing your own C code. <S> At some point you will need to consider rounding and errors (for example real filter coefficents are floats in matlab) and you will probably want to implement them as integers on the pic to reduce the overhead of floating point arithmetic. <S> Once you have written your code and tested it, transfer it back to matlab to see the effects of the rounding errors, and optimise your filter coefficients there. <S> This may sounds difficult, but in the long term it will give you a few things. <S> Better understanding of the filters, better understanding of the dsPIC architecture and built in hardware (integer multiplier), understanding of rounding errors on the filter coefficents, and most importantly highly optimised code! <S> It is the optimised code that you really want running on your dsPIC. <S> You will only be able to acheieve this by iterating between matlab and your c code (perhaps even assembly if you want to getter maximum performance out of the pic). <A> I thought that matlab had a solution for filter design where you could export to dsPICs. <S> I saw a lot about it, I can look into it later. <S> After Research Take a look at the application note that Microchip about it . <S> I also found that there are a few notes at http://www.kerhuel.eu/RTWdsPIC/download.html <S> I cannot guarantee that this will get the job done for you, just trying to show you rapid prototyping options.
By using matlab you can tune your filters on real data for optimum results and then write your c code based on the initial values.
What is the difference between a ceramic capacitor of the same dielectric, but different voltage rating? What is the difference between a ceramic capacitor of the same dielectric, but different voltage rating? Would the lower voltage one have lower ESR or ESL? For example, X7R 10uF 4V as compared to a X7R 10uF 10V <Q> ESL is almost entirely determined by lead inductance, so the size and type of the package determine this value. <S> Voltage rating is a function of dielectric strength and thickness. <S> So, if a package size is fixed, say both 0805, you should expect the same or extremely close ESL, while the dielectric strength or thickness would need to have increased to increase the voltage rating, so ESR would be higher. <S> This isn't a firm rule, remember that ESR varies with frequency. <A> I respectfully disagree with Mark on point, that ESR will vary for the same material when thickness is different. <S> If capacitance is the same and ESR is mainly defined by properites if dielectric, then with doubling of dielectric thickness, the area will be also doubled to maintain same capacitance. <S> I'd also guess that ESR is mostly function of conductor plate material, its surface and geometry. <S> Why I am so certain, is because ESR is highly frequency dependent. <S> Capacitance is much less dependent on frequency. <S> So ESR on higher frequencies can be blamed on skin effect. <S> Answer is no. <S> Can not expect change in ESR, ESL <A> It's sometimes useful to think of capacitors and batteries as containing charge-storing 'stuff' and charge-carrying 'stuff'. <S> The material on the surface of each electrode and the dielectric between electrodes work together to hold charge, but are not very effective at moving it around. <S> The metal interior of each electrode is very effective at moving charge around, but practically useless for holding it. <S> Some capacitors and batteries are constructed with a lot of metal inside the electrodes, so that charge can be exchanged with any part of the storage surface with minimal resistance. <S> Others are designed with a lot less metal. <S> Reducing the amount of metal in a given volume will make more space available for charge-storing surfaces, but it will also increase the effective resistance between those surfaces and the external terminals of the device. <A> Ceramic capacitors close to their maximum voltage rating lose capacitance. <S> A 6.3V cap may have up to 60% lost in capacitance at the full rated voltage and over the full temperature and tolerance range. <S> Depending on your application, this could cause a lot of intermittent problems.
ESR is a function of many things, but one of them is dielectric thickness, as thickness increases so does ESR.
Is it safe to recharge a battery without a specific device? I have 9V Li-ion battery. If I apply regulated 9V to it, will it recharge?What about other kinds of rechargeable batteries? <Q> No, it is definitely not safe. <S> The Li batteries and compatible chargers usually mate with more than just 2 wires. <S> The battery must include termoswitch or thermometer circuit which is servo feedback to charger controller. <S> The constant parameter of control loop is not a voltage or current, but top temperature over time figure to avoid fire damage. <A> See the graph at endolith's link: http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries <S> You need a constant current, followed by a constant voltage, followed by switching off the charging circuit. <S> I have used a standard adjustable-current bench supply for this. <S> It works fine if the current and voltage limits are set appropriately. <S> (For safety's sake, don't charge the battery all the way. <S> If it starts to feel warm, shut off the charger.) <A> Yeah. <S> It'll recharge for a few seconds. <S> But then it explodes, bummer. <S> Battery chargers exist for good reason.
You don't need an official charger, but a constant voltage isn't what you need either.
Exercise based book to learn Verilog/vhdl? I was planning on learn an HDL (preferably verilog as I have to take a course in it in subsequent semesters). My initial plan was to first learn the syntax and then implement all the digital systems I studied in my digital electronics course using HDL. But just out of curiosity, is there a book which would combine teaching computer architecture with HDL implementation? I think that would be much more fun. <Q> Peter Ashenden's " The Designer's Guide to VHDL " uses a DLX CPU design to illustrate many topics. <S> However, if you're only interested in Verilog HDL then this might not be the book for you. <A> My two recommendations, only read the later <S> but I like the author <S> so i'll plug the other one as well: Computer Arithmetic and Verilog HDL Fundamentals <S> It may depend on what your after though, if your EE classes walk you through the entire design of a microprocessor as mine did you may find both useful eventually. <A> There are tools available on android also to practice syntax errors. <S> Just check out https://play.google.com/store/search?q=skand+vlsi <A> I decided I wanted to learn how to work with FPGAs, so I bought a Xilinx Spartan-3A Starter Kit. <S> Since I was new to this, and wasn't sure which flavor of HDL to learn, I got these two books: FPGA <S> Prototyping By Verilog Examples: <S> Xilinx Spartan-3 <S> Version FPGA Prototyping by VHDL Examples: <S> Xilinx Spartan-3 Version <S> both by the same author (Pong P. Chu). <S> Each book has dozens of examples that apply directly to various Spartan-3 based boards but can be applied to others. <S> More importantly, the exact same examples are used in both books (as one would expect), so one can compare the complexity and readability of each one, Verilog vs VHDL. <A> Coincidence or not, I just came across to this today: http://www.nandland.com <S> [moderator note: <S> This answer had arrived here as a result of a merge.]
Digital Design and Verilog HDL Fundamentals Digital Design and Verilog HDL Fundamentals is probably more what your looking for, the first is more focused on implementing mathematical operations.
Is it okay to briefly exceed a resistor's power rating in a high-reliability product? I am dealing with a 0.01R 500mW resistor. It is a current sense resistor and measures the current flowing through a MOSFET and inductor. According to simulations, when the supply starts up, the RMS current is very high (~3A) for about 1 millisecond, and the resistor will be exposed to pulses of ~1.2W. The pulses then drop down to 200mW, and the RMS is around 125mW. Is it okay to briefly exceed the ratings of any resistor? If I have to pick a 2W resistor it will be much bigger, so I'd like to use a smaller resistor, but reliability is a high priority for this product. <Q> The data sheet should mention the peak power or current capabilities of the resistor. <S> It is usually much higher than the mean power rating, but if it is not specified anywhere, I would rather not rely on it. <S> Note that not all resistors of the same size and power rating are created equal. <S> There are some that are designed (and specified!) <S> for peak power ratings well beyond the mean power rating, and there are some that are not. <A> Be careful of film resistors, where the film can be easily vaporized during power surges, EVEN IF the temperature of the entire package remains within safe limits. <S> Wire wound and resistive pellet resistors have much more thermal inertia than film resistors. <A> sounds like you need to include inrush current limiting in your circuit. <A> It is OK if you are in I^2T window. <S> This figure is typically applied to motors, not resistors, but still applicable for large resistors. <S> Say if you know that 5W over 10Sec is a limit, then 50W over 1 sec is same limit. <S> But for very small parts with very low thermal mass, its better to use equivalence 10 or 100 times shorter in time. <S> Say 0.5W over 1sec is 5W over 0.1 sec. <S> So answer is yes. <S> For your example in ms range it is ok if part is heavier than say 0.2..0.5 gram. <S> This kind of parts is designed for precision, so the specs are about staying accurate within working currents. <S> If you exceed the current 10 times for ms you only loose precision, but part is far from being destroyed or self desoldering. <A> If there are any circuit failures possible that would result in the peak current becoming the steady-state current, then you need to allow for the larger power rating. <A> 3A through 0.01R is 90mW, <S> not 1.2W. 1.2W would be about 11 amps.
I have seen resistors fail when their mean power rating was exceeded just briefly, so it's indeed necessary to check what manufacturer and type you're using and if it has the right specs.
For a small Vin-Vout difference, is it worth using an LDO vs a buck regulator? I want to step down 5V to 3.3V at around 250mA. As far as I see it, there are two options to consider: Buck: more space, higher cost LDO: less space, lower cost, more difficult to remove heat(?), less efficient(?) What I am wondering is will the LDO be more efficient and better at doing this job? I've heard things like 6V to 5V solutions usually use LDO's instead of buck regulators because they are more efficient, but I'm wondering if this works for 5V to 3.3V? <Q> Dropping 5 to 3.3 V at 250 mA will mean having to lose 0.425 <S> Watt in the LDO, you will need a massive heat sink to make that work. <S> I have a mis-designed PCB right now where I tried doing exactly what you are proposing to turn 5 V into 3.3V at 200 mA and even though I have a large'ish copper plane as a heatsink the LDO still reaches 80 deg C in a few seconds. <S> I'm currently redesigning my power supply to use a MC34063A converter in stead. <A> LDOs will not be more efficient: ( <S> 5  <S> V - 3.3 V)  <S> * 250  <S> mA = 0.425 W. <S> Already quite a lot for smallish (SOT-23) LDOs, at least a DPAK is likely necessary. <S> The design (not the efficiency) could be improved with series resistors at the LDO's input to take heat away from the IC and into the resistors, but make sure the voltage drop across the resistors R ser  × I max doesn't get too big for the highest current that is required. <S> At I max and at the low end of the available input voltage V in, min , you still need to meet the LDO's minimum input voltage, i.e. V out,  <S> max  + V drop, LDO, max  ≥ V in, min  - R ser  × I max . <S> This trick sometimes help if you can't dissipate all the heat within the LDO's own package and want to spread it across more components. <S> Also, the series resistors in front of the LDO sometimes act as a poor man's short circuit protection, given they can handle the full input voltage for a while. <S> All this is cheap and dirty, <S> so yes: Might well be worth using a buck. <A> Many have already given you an opinion on the power efficiency, I would just like to bring up some of the reasons I have seen others do this. <S> Noise immunity. <S> buck/bost regulators, more broadly [SMPS][1], have very poor noise characteristics. <S> They almost guarantee harmonics at the switching frequency. <S> LDOs do not, they create very smooth power. <S> Simplicity, you are only dropping a small voltage, keep your circuit clean and your components count low. <S> This noise immunity is normally one of the main reasons I see this. <S> The specific reason LDOs are so popular is related to the fact that you can use a buck/boost to get your voltage just barely above the operating voltage of your LDO. <S> I have seen this often in 5V circuits, they boost power to 5.5V and then LDO it to the 5V rail. <S> This gives very low noise high quality power while only suffering a 1/11 power loss, still getting about 90% power efficiency off of the LDO. <S> So, from this perspective, you could always drop the voltage to 4V with a buck and LDO it, but I would just LDO it and make sure you have it connected to a low resistance thermal path so that the heat is easily dissipated. <A> It depends on your requirements: For a high-efficiency digital circuit: buck. <A> It is not quite true than an LDO will never be more efficient, as at some point the switching losses and supply current for the switcher will outweigh the benefits. <S> Oh, and 34063A is a pretty lousy converter as switchers go - for 5 V to 3.3 V <S> it wouldn't surprise me if the benefit is minimal. <S> There are much better converters for this voltage range. <A> For digital signals, use a buck converter. <S> Often times you will find a solution that is smaller than LDO solutions, given that inductors has gotten quite a small footprint and the number of external components needed is low. <S> If you need both digital and analog, you want to clean the signal by using an LDO. <S> In your example, you might use dual DC/DC converts to get both digital and analog voltage out of a single chip. <S> For instance you can get a chip that converts 5V to 3.3V digital, and then connect that output to get 3.0V analog voltage. <A> I think you have a misconception about LDO. <S> LDO means low-drop-out or when you need a very few difference from Vin to Vout. <S> What you're trying to do doesn't require a LDO, a regular 7805, LM317 or another crap will perform the same (read poor). <S> You can think about linear regulator's efficiency as Vout/Vin so in your example, it's clearly that 3.3/5 = 66% is a poor number. <S> This means that at anytime, your regulator will heat atmosphere with the rest of 34%. <S> Even with so poor efficiency, a linear can work very well as long as power dissipated on it (that is, make the difference Pin and Pout) will be adequate for regulator's package + natural cooling or PCB plane (read rising package temp at 50 deg for example). <S> This can be easily calculated from datasheets. <S> But if you're trying to convert 3 from 3.3 will achieve 90.9%, much better (and cheaper) than most of buck regulators. <S> In this case you will need a LDO (and a good one), since 300mV can't be handled by LM317. <S> So in your case, buck will be far better in terms of efficiency. <S> Cheers, <A> Buck converters usually perform poorly at 'standby' currents of just a few microAmps. <S> I've actually used battery powered designs combining both an ldo and a buck converter together, where the uC runs of an ldo, and switches on a buck converter powered circuit which consumed ~300mA for a few minutes at a time.
An LDO will never be more efficient than a buck converter, unless you need so little current that the power used by the regulator itself becomes an issue. For precision, low-noise analog circuits: LDO! LDOs cannot be beat on this note, you pay power to get clean output power.
How do I keep PCBs cool when soldering? I've noticed that when soldering small PCBs can get very hot. Since I haven't yet been able to find a good vise in which to hold PCBs, I mostly hold them in my hand and after several minutes of soldering, they tend to get uncomfortably hot. I haven't seen many information on Internet about this, so I'm asking for tips here. <Q> Shouldn't need to cool them while hand soldering. <S> In fact, cooling them whilst soldering would induce a lot of thermal stress with cool areas of the PCB and really hot areas in other bits of the PCB. <S> You may be overheating the PCB with incorrect soldering technique or maybe your PCB has big ground polygons/planes and you're soldering on joints connecting to these ground polygons/planes without a thermal relief. <A> Having a vise is critical, especially for small chips, but since you are holding out of the right one, here are some suggestions: Having the right size soldering iron and power will reduce the amount that your PCB heats up. <S> Ideally you want a soldering iron that can quickly transfer heat to your pad so that you can get your solder on and take the heat off fast. <S> To do this you will want to use the largest tip that you can find that still gives you the precision needed for what you are soldering. <S> Adjustable temperature soldering irons are nice, but you need to also make sure that your iron is able to output enough power to keep your iron at the temperature you want it at. <S> If you have a large ground plane, you will most likely have to heat it up in order to get good soldering. <S> You can added extra space at the edge of your PCB with no copper for you to be able to hold on to. <S> If you aren't holding it where there is metal <S> then you are more then likely over heating your board and should look at my prior suggestion. <S> The next investment you should consider getting is either a better soldering iron and/or nice lighting. <A> Like others have said: use a clamping vice. <S> I use a Bernstein Spannfix : <S> It won't help to keep the PCB cool, but at least you won't burn your fingers. <S> The seemingly hot PCB is not really a problem. <S> A PCB which is at 60°C may be too hot to touch, but during reflow soldering the whole PCB is exposed to temperatures close to and above 200° <S> C for minutes . <S> This way much more thermal energy is applied than you can with a hand soldering iron. <A> <A> This is one of the places where proper equipment helps loads. <S> If its a particularly small PCB a third hand type device is invaluble, in more ways than one (it also serves to hold leads in place), though i suppose you can use a small clamp as a temporary improvised holder. <A> A vise is an essential tool for soldering. <S> If you're still looking, I'd recommend the Panavise tools . <S> The pads for the 203 and 303 heads often have (or can be made to have) grooves which hold PCBs well, or you can use a vise specifically designed for holding PCBs, like the 315. <S> However, if you're burning your hands because you don't want to spend the money on a vise, or you're just looking for a more economical alternative, a set of 'helping hands' is a perfectly fine for holding small PCBs. <S> These can often be found for less than $10, and usually include a magnifier and heavy base. <S> If you need it right now, you can probably save your fingertips from being burned with just a heavy piece of wire affixed to your workstation and a pair of alligator clips screwed to each end of the wire.
But, with that said, you should really consider getting yourself a nice vise that lets you put your board at any angle that you want, this will really help with getting a great soldering job. Try holding your PCB in a vise. Special PCB vises are available.
Fans: suck or blow? For a fan, should air be sucked in, or should it blow air out? I'm talking about an enclosure mounted fan. <Q> Airflow is the key. <S> Any direction will do. <S> Just keep in mind where the hot components inside your enclosure is. <S> However, if you blow into the enclosure, you have the option of putting a dust filter on your fan. <S> Whereas if you have your fan blowing out, air will enter your enclosure through all sorts of holes, and lots of dust may eventually accumulate. <A> In my experience, the choice of direction determines where the inevitable dust build-up will occur. <S> Dust seems to accumulate wherever the air enters the case. <S> With fans blowing in, you tend to get the most dust build up right in front of the fan. <S> You wouldn't want this happening on the heat sink of your CPU, as the dust acts like an insulating blanket. <S> On the other hand, with fans blowing out, you get dust in the case near every possible way for air to get in. <S> One place this can be a problem in a PC is when the air comes in through the openings for removable drives. <S> Probably the best design I've seen involves having two fans, one blowing in and the other out. <S> The exhaust fan sits near the heat sink of the CPU to ensure good air flow there, w/o the dust problem, and the other fan pulls air into the case to keep the pressure in the case high enough to prevent sucking air (and dust) in through all the other openings. <A> When I design something like airflow, there are a few important points. <S> What components generate heat, and how distributed my heat sources are. <S> Where I can expect the user to be in reference to the device. <S> Dust buildup. <S> In order. <S> If you have single units that generate a bulk of your heat, they need something near them. <S> You have options, a fan on them in extreme cases similar to a high end processor or a fan on the enclosure next to them. <S> If you have generally generated heat, you just need to focus on getting general air flow. <S> After you know where fans are needed, you need to think about the user. <S> Why would your o-scope have a fan on the front that blows in? <S> It is generating a lot of heat there, but if it blew forward and blew warm air in the user's eyes all the time I doubt they would thank you. <S> Design air to exhaust in a direction the user can be expected not to be. <S> Now, on dust buildup, you want to limit this. <S> I have two directions for this. <S> Fan with filter blowing air in. <S> Without a filter the high speed air will pull in dust with the air, but as air slows down it will act like a river slowing down and drop silt. <S> Exhaust in a few key locations you can pull in over a large area and expect significantly less dust to enter the enclosure due to low air speed entering the device, but you will still have dust issues. <S> I would prefer everyone used filters, but I do not mind blowing out devices once in a while with an air compressor(just kidding). <A> If you are talking about a fan on an enclosure, then the whole point of this fan is to cycle hot air out of the enclosure and pull cool air in. <S> You have to have the appropriate vent on the other side of the enclosure to allow this to happen. <S> Some enclosures have fans blowing both directions to help the process along. <S> If you only have one, make it blow out, and near the biggest source of heat. <A> All the air that gets in will get out and the air resistance is the same in both direction so it is more or less the same thing. <S> There are however some scenarios where it does make a difference. <S> For example, if you have: | Low power sensible components | High power components | Fan --- <S> > <S> | <S> Another aspect to keep in consideration is that air speed is faster and more directional at the output of fan and slower and more distributed at the input. <S> If you have a single very high power component that is difficult to cool down, you may want to point airflow directly to it, even if it will cause the rest of the unit to be hotter. <S> | Heat resistant components | Single very hot component | Fan <--- | <A> Generally, airflow isn't reversible in electronics without ramifications. <S> Complex software like Flowtherm is used to pattern airflow and heat patterns for a specific air direction. <S> Usually parts are placed to maximize cooling with specific direction and speed of air. <S> Going against this could potentially lead to hot spots and bad things like thermal runaway. <A> I do believe in a simple thing about cooling: it's better to cool the components instead of draining the heat. <S> Why? <S> Let me show you a simple reason, that was done on my lab. <S> power supply on pictures below: <S> This is my lab bench supply with 80x80mm FAN mounted on back. <S> It is blowing air from OUTSIDE to the INSIDE. <S> Why? <S> Look another photo below. <S> It's not the best, but that's all I got on me right now. <S> If I would be sucking air from inside to the outside, the fan would suck the air from closest gaps to the fan. <S> But instead of this, the air is being blown into the power supply across the components, which will cool them all and go through any hole in the power supply cover as it wants.
Then you definitely want the fan to take the air out because otherwise, the high power component would heat the sensible component.
What situation would you use flexible termination ceramic capacitors? These capacitors from Kemet have flexible termination. The datasheet says it caters for applications where the board flexes and normal ceramic caps can fail. However, I fail to see a situation where PCB's flex? If PCB's had the potential to flex, wouldn't you just get a tougher enclosure? <Q> Normal components in this application can sprout fatigue stress-fractures that gradually enlarge over time until they fail, which in some automotive applications can have catastrophic effects. <S> It is very hard to completely remove vibration-caused flex without massively supporting a PCB, and that is very expensive, even compared to fancy caps like the Kemet ones linked. <S> As tronixstuff mentioned, they are also commonly used in situation where the environment is fairly extreme, as there is no way to completely prevent thermal stresses, since the different aspects of a PCB have different coefficients of expansion as the temperature changes. <S> Basically, they're for high-reliability/extreme-environment applications. <A> Data sheet says shear stress and thermal cycling. <S> Good points. <S> Furthermore, a PCB may flex in use if it had a socket for something that was inserted and removed more than occasionally. <S> Or perhaps in high-vibration environments such as a data logger in an off-road vehicle? <A> Here is an example of an interesting case where flexible PCB is used: Mechanical connectors for flexible PCBs? <S> Like other have said though, the biggest focus is applications where you have vibrations. <A> Flexing can occur in the manufacturing process for long PCBs. <S> Cracked caps can not all be found in manufacturing tests and could fail in the field.
Flexible-termination caps are commonly used in automotive applications, where vibration causes the board to flex back-and forth a small amount repeatedly.
How does E-Test at a PCB Fab work? I always see the option for E-testing when sending PCB's off to a fab house. I gather it is an electrical test to test all the connections. But how do they do it? They don't have my schematic! Only gerbers? And surely it is done by machine? <Q> As I understand it, they extract a pad-list and netlist from the gerbers, and then have a machine with robotic arms carrying test-probes (Termed "Flying Probes") to manually ohm-out all the connected nets. <S> See: <S> http://en.wikipedia.org/wiki/Flying_probe <S> http://www.spea.com/ElectronicsIndustryTestAutomation/FlyingProbeTesters/tabid/108/language/en-US/Default.aspx <S> http://www.youtube.com/user/speamovies <S> (Really cool videos) <A> This measures the resistance / conductance from locations on the PCB board surface to other points on the surface. <S> From the Gerber files they know where there should be conductance and where there should be opens. <A> E-testing is primarily used to detect bad plated holes, as this is the most common failure as it's more process-sensitive. <S> Bear in mind that a flying-probe e-test rarely checks for shorts as it requires a huge amount more checks (therefore test time) than a continuity test - each node to each other possible node. <S> Probably easier on a bed-of-nails tester which has connectivity to all nodes at the same time. <S> I've certainy had a few supposedly e-tested boards with shorts.
Some manufacturers also use a " bed of nails " tester.
How do I safely drive a 500W inductive load with a computer power supply and suppress voltage spikes from switching? I need to find a safe and reliable way to power a DC hobby motor off mains supply. The motor is large (i.e. 500W) 14.4V. Therefore, the current requirements are large i.e. 35A for a 14.4V supply. I can't find such a power supply to purchase and my budget is small. Therefore, I thought I could use an ATX power supply from a computer. They typically have a high current 12V line that can deliver the required current, 42A in this case. I will be using a power MOSFET to regulate the power going to the motor by switching it on and off using pulse width modulation PWM. There should be some huge inductive spikes created. I need a way to protect the power supply from these. I was thinking of using several layers of protection just to be safe as long as they are compatible with each other. There location in the order that I mention them is arranged starting closest to the motor and moving towards the supply. The first line of defense is a freewheeling diode put in parallel with the motor forward biased from 0 to the positive supply direction. In addition, perhaps an RC snubber also in parallel. Then a 12V standoff TVS also in parallel in case the other two fail. However, this will short the power supply if it is triggered. If the supply doesn't have over current protection it will kill the supply. I need some sort of fast acting fuse or polyswtich to at as a current limiter in series with the supply. I've noticed that a the polyswitches are very slow. like 9 seconds to "disconnect" the line and I don't want to use a fuse that I have to replace when this happens. Is there a good solution to this problem, or is this all too much? That is, should I just leave the TVS and polyswitch out of the design? <Q> A PC supply may well have a problem with the startup current surge of a large motor. <A> I have bad experience of similar attempt. <S> The cause is that contemporary switching supplies are too smart for dynamic inductive load with regenerative an other switching spikes. <S> The only workaround is to use raw power supply (transformer, bridge, zero active components). <S> What you will possibly see if you try direct connection: <S> Motor will accelerate OK on low torgue Motor will trip supply when acceleration is high on start from zero velocity Motor will accelerate OK with high acceleration but will trip supply protection when decelerated Motor will never burn, but supply very likely will Nothing will will break and will work ok, but you will trip mains 20A breaker once in a while. Trying to put ferrite chokes on positive wire will make no difference, supply will keep tripping Overall currents will never be near 50% of rated by supply, but peak values will keep protection tripping even if the motion is smooth The protection diode (overvoltage 50V surge diode in parallel to 48V supply) can help for 90% of motions, but supply will be ever tripping unpredictably over long run etc. <S> So answer is probably the thing we did not try, but which can help: Calculate the energy budget for motions and double it and put super large capacitor at the output. <S> With surge diode with voltage rating 1-2V greater than nominal voltage and a bit lower than overvoltage protection of supply. <S> Other aspects involved: <S> The breakdown of high power semiconductors is caused not by voltage, but by speed of voltage increase (about 5000V/microsecond typically). <S> Rule of thumb <S> "Everything is thyristor" <S> The TVS is a must. <S> They survive at 49.. <S> 50V 400W loads with no sweat. <S> Custom FET switching is cause of trouble, simply because you cause mechanical shock with infinite torgue on start, unless you use PWM with clever S-curve acceleration. <S> Safety is also not last aspect if you deal with near horsepower motion. <A> You've considered protecting the supply, but not the FET. <S> The FET will also be hit by spikes when switched off. <S> In fact, as it is gating the supply, it should be the only device subject to the spikes. <S> If you have it on the low side then that might not be true. <S> Also, have you considered using the PS_ON pin to do duty cycle modulation instead of an external FET? <S> I'm not sure how fast the supply will work with this though - it might take 100ms to switch on and this might limit your modulation rate. <S> You'd also have to be aware of the supplies' spikes as well as the motor. <S> The TVS will cook itself long before the supply overheats from the overcurrent situation. <S> 500W into a TVS will toast it if continued for more than a few seconds.
The regenerative energy absorbtion (large capacitor and/or power resistor with few diodes) is a must if voltage is over 100V. Can be skipped for low voltage setup unless you need 24/7 run in hard conditions. The supply could get very large spikes on it if lots of load is dumped suddenly.
3.3V @ 10mA from 5V - 35V Any ideas on how to get 3.3V from 5V - 35V at a low 10mA current level? 3.3V need not be precise. It can be 3.5V or 3V, it is powering a small microcontroller. I'm looking for a small and cost effective solution. That pretty much rules out through hole stuff. <Q> Use a linear regulator that can handle 5V to 35V input. <S> It outputs 3.3V. <S> It is that simple. <S> You can use a buck regulator, if efficiency is an issue. <S> but 10mA at a 35V drop is still only a 350mW dissipation. <S> I suggest the linear, keep components/complexity/noise down. <A> You'd struggle to find a buck reg with 35v input range that didn't draw 10mA quiescent before you got any power out. <S> 35V is a bit on the high side for many linear regs <S> so you need to look carefully at specs. <A> This LTC3631 handles 4.5 to 45V in, 3.3v out, and comes in either a 3x3 mm or MSOP-8 package. <S> 81% efficiency at 36v in and 10 ma out (page 4). <S> You should be able to get a suitable inductor in an 0805 (2 x 1.3 mm) or smaller package. <S> The MC34063 might also work but <S> it is a larger package (SOIC-8), uses more quiescent current (2.5 ma) and would require more external components. <S> But it is 1/4 the cost of the LTC3631. <A>
At such a low current level I would be inclined to pre-regulate down with say a 12v zener and stick a cheap-as-chips LDO on there
How do I neatly bridge to a ground plane? I have boards that through a mistake of my own have a bunch of vias that should connect to the ground plane, but are actually isolated. See all of the holes that are isolated: So, I need to bridge all of them to the ground plane. Since there is no solder mask I figured I could just use solder to bridge the connections. Here is what my solution looks like: Not so pretty. I am wondering if there are any suggestion of what I can do to short these in a better manner. I will have it fixed in my next board revision, but it is a few weeks before I will have the boards and need to solder a few of these up now. ADDITION: The biggest problem I was having was the ground plane heated up very slow and It didn't seem to want to stick to both the pad and the ground plane at the same time. <Q> you'll have a very hard time heating up that ground plane. <S> You could put the PCB in a board heater then maybe solder. <S> Alternatively you can use conductive epoxy <S> , that should work as long as the impedance to ground isn't super critical for the circuit. <S> Also, isn't that pad underneath that TO-220ish looking package shorting to the ground plan? <A> Get a better soldering iron. <S> It's not the easiest solution, but in the long term (having a better iron improves everything ), I think it is the best. <S> I have an OKI-Metcal soldering station , and I can easily solder D2PAK devices down to a solid copper plane with no thermal relieving at all. <S> Any similar "Serious" iron should be able to do similar. <S> (They generally run ~$200. <S> It's an investment) <S> Also, what tip do you have on your iron? <S> For something like that, a chisel tip <S> (pick one for your iron, link is just an examle) is really essential to get good thermal contact between your iron and the copper plane. <A> Is soldering a requirement? <S> Because if it's only a prototype or something, you can use conductive copper foil tape to "patch" the holes. <A> You found out that the copper plane takes a lot of heat away, so that the temperature at the via will hardly be high enough to melt the solder. <S> When the vias are connected to the plane they will be through thermal reliefs, which isolate most of it from the plane, leaving only a few bridges to make the connection. <S> I would use a Dremel Moto-Tool with an engraving tool bit to cut away part of the copper around the via to emulate these thermal reliefs. <S> This may require some patience, but I guess just trying to solder was taxing your patience as well. :-) <S> What also might work is to separate the bridging operation from the plane soldering. <S> The bridge will require rather much solder before it connects to both ground plane and via. <S> First solder a tinned wire on the ground plane, so that it runs over the via, or maybe even insert it into the via. <S> You'll see that soldering it then to the via is a piece of cake. <S> (The ground plane will remove enough heat from the wire that this side won't come loose again.) <A> Maybe a heat gun or hot air rework station would improve things. <S> But you are still going to have the problem of the ground plane transferring heat away from the area you want to heat up moreso than the vias. <S> When the solder starts to melt, it would adhere to the ground plane and via. <S> Then just remove the heat and let it solidify. <S> Like a drywall patch for PCBs. <S> Does anything like THAT exist?
For everyone else: I'm envisioning something that would fix this problem perfectly - sort of a mesh (like a solder wick, but small and circular) that would be coated in solder which you could then place over the via and heat up with a hot air gun.
What do you use to probe small circuits quickly? I still haven't found a really good solution for grabbing tiny surface mount stuff. Alligator clips are definitely way too big. Mini-grabbers like this with the spring-loaded hook are an ok solution for bigger stuff, but no good for little surface mount components. I can solder on little bits of wire and then mini-grab those, but it's tedious and time-consuming. And in my experience they tend to be broken more often than not: I got some Tektronix KlipChips and some HP 5090-4356 clips on eBay. The Tektronix clips are hard to open, because the plastic head tips to the side and jams instead of sliding down when you try to squeeze it. The HPs don't have that problem. The Tek pincers are made of wire, so they splay out sideways instead of grabbing well (and get permanently bent, making them jam on each other and not close completely, so connections to thin wires are intermittent). The HP pincers are made of thin strips of metal, so they are more rigid in that direction. The wire pincers depend on the bendiness of the wire to overlap each other side-by-side (which doesn't work very well) while the HP pincers fold inside each other, with one a little shorter than the other. This seems to work better, but they get bent outward, and the tubes are plastic, so they get bent outwards by any angular stress and no longer close well. The orientation of the pincers on the HP relative to your fingers is more natural. These work on SOICs or bigger, but after they've become worn they don't stay on as well. They don't work for surface mount resistors (they just pop off if disturbed even a little) or smaller-pitch ICs. And I've broken the retractable hook tip for oscilloscope probes by attaching it to a circuit and then letting go, and the weight of the bulky probe and wire put too much stress on the plastic tip and bend it. Ideally I'd like something that can grip one side of a surface mount resistor, or a pin on a smaller pitch IC, not fall off, not produce any stress on anything, and not break easily. Any advice, ideas, tips, tricks, ingenious alternatives, cheap Chinese knock-offs of better clips? (Previously asked on xkcd forums and adafruit forums .) <Q> If you're designing your own boards, add test points. <S> I find that the amount of time it takes to strip and solder a wire is far less than what I'd otherwise waste futzing with clips or trying to hold a probe <S> just so while also keeping an eye on a scope. <A> They look similar to the Pomona clips. <S> I haven't broken any yet. <A> Are you asking about debugging others' boards or your own? <S> Just a little rectangle of copper makes a world of difference in avoiding shorts, damaged traces, and the like. <S> Even a small pad can be poked reliably with pogo pins or an oscilloscope probe. <S> However, if you want to be able to clip to the connection, either solder a little loop of wire onto the point, or get some of Keystone's test points [pdf]. <S> They have SMT ones as small as .1"x.04" which are easy to put down and then remove for later use, and the through-hole versions clip and unclip in a .04" or .063" diameter hole. <S> Just enlarging a few vias on your main communication busses in case you need to plug one of these in is an easy way to protect yourself. <S> If you're working with boards over which you have no control, a Chip Clip is often helpful. <S> It looks like this (8-pin SOIC clip shown): <S> It breaks the contacts out to .1" headers. <S> They're available for PLCC and SOIC packages, and I think TSSOP as well. <S> They require a chip with exposed leads and a grippable body, so that rules out QFPs, BGAs, and rectangular passive devices, but those are nearly impossible to clip even with other methods. <S> I recently had to reprogram several hundred SPI flash chips and didn't want to take the time or money to solder the required computer interfaces onto all those sparsely populated boards. <S> So, I removed the chip from one board (which had the interface), ran wires from the empty pads pads to chip clips, held the micro on the new board in reset (It was the only thing connected to the SPI bus), and went to work. <S> I went through a few clips in the process, but it was nowhere near the cost of the magnetics. <A> I haven't tried it myself, but I've seen insulin syringes used . <S> I think the idea is that they're sharp enough to catch on pads and components. <S> http://travis.frob.us/~travis/public/blog/images/syringe/probe_un.jpg <A> The options i've seen are: Solder a blue wire onto the pin you need to look at (what i usually do) <S> Both agilent and tektronics make probes with solder-able, replaceable tips, <S> expensive Use a 'third arm' device, tektronics and agilent make ones specific for scope probes <S> but they are expensive. <S> However you can get ones designed for chemistry work that are just as effective in my opinion and are much cheaper. <S> Examples here and here . <S> This holds an advantage for testing signals in potentially noisy areas of the circuit by limiting both the length of wire from test point to probe and keeping the probe/probe wire as far from the circuit as reasonably possible. <S> The best solution is to include test points, or at least a via big enough for a blue wire on a signal <S> you know you'll need to test. <S> Some times this obviously isn't possible. <A> For passive components there are small spring-loaded plier-like probes with two 0.6mm contacts from Hirschmann. <S> For IC pins there are some really small ones from Pomona 6351/6352/6353 , though the price is inversely related to the size (or maybe the square of the size?) <S> , so these are really expensive. <S> I've used two of these on adjacent pins with 0.5mm pitch (unfortunately they weren't mine). <S> A good search term is "grabber". <A> Those Pomona grabbers starblue posted are great and work very well <S> but they break very easily and <S> you would have to support most of the weight of the grabber or it will come of the pin. <S> I'd say they are not worth it for home use unless you are extremely careful and use them sparingly. <S> They do work very well once you get one on properly. <S> Unfortunately I don't know of anything else except for soldering or holding a probe on the pin as an alternative. <A> Get a header of 0.1" pins. <S> Or glue on a suitable piece of protoboard and solder the header to that. <S> Get some small gauge enameled magnet wire and connect each node <S> you are interested in to the header. <S> Get a paper label of appropriate size and label all of the debug connections. <S> Obviously, this is no good for RF or precision analog or very high-speed digital circuits. <S> For those things a very short ground path is needed. <S> This mates with the Open Workbench LA . <S> Or I can plug a normal pin header in for oscilloscope connections or whatever.
If you have the ability to control the PCB, some test pads are an easy thing to add. Attach this to your prototype board with hot glue or double-sided tape, securely enough that you can attach test probes without it pulling off. Aside from that, soldering on short bits of wire is the best solution I've found so far. I've found these SMD test clips quite effective. The plastic jaws grip the underside of the chip (between and below the leads), and there are contacts for the chip. I always at least include a spot where i can hook to a decent ground. I have lately switched to Digikey part S5493-ND (picture follows).
Computer to Arduino Interface Options I need to send 800 bytes of data from a computer to an arduino board every 20ms (approximately). I began with the serial library which works nicely but it is too slow even at its highest rate (115200 baud) for interfacing with a computer. What other interfaces are available that can send at a faster rate? Can I use usb or spi? I can't seem to find libraries for these. I need something with about a 320 kBaud rate. edit Are there any shields that might be able to do this? Bluetooth or wifi? <Q> The limiting factor is likely your computer's serial port, drivers and/or the Arduino library. <S> If I recall correctly, the AVR UART can go up to its clock rate divided by 8 or 16, and an FTDI chip can be at arbitrary baud rates <S> equally high (3 Mbaud for this FT232RL on my desk). <S> Most shields are going to communicate over the AVR UART, so if the Arduino library is limiting you then they won't help. <A> How about only sending changed bytes each 20 ms? <S> You'd need an additional 9 bits for addressing, but if you stuffed that bit in the empty bit in your 15-bit color data, you could do it with just one extra byte per LED. <S> Depending on how fast your display is changing colors, that might work well. <S> You could make a threshold, so if the color changes by less than X, you wait for the next round to send that data. <S> Or maybe try interlacing the data? <S> Send even rows and odd rows in alternating sequence? <S> Or use 4 Arduinos in parallel? <S> Or control the LEDs through a shift register, and then send 15 bits to 15 Arduino pins via a parallel port (assuming you can find a PC with a parallel port)? <A> There are PCI communication cards that support this baudrate, but more popular are USB<>RS232 convertors. <S> If I remember well, all FTDI based convertors can handle it. <S> The bigger problem is AVR side, where you will not be able to do anything else while data is received. <S> RX should be the only interrupt allowed on AVR side. <S> You will also probably have to clock your AVR as high as you can (16 or 20MHz depending on the model, <S> 14.746 <S> Mhz if you want to have 921600 exactly ). <S> Then you will send from PC the whole communication packet, AVR does the job after receiving it, and sends acknowledge byte that it is ready for next packet. <S> When PC gets acknowledge then it can send another packet. <S> And so on... <S> Simple timers on PC side are (because of multitasking in windows) very bad at handling 10ms like resolution and they are not accurate at all (except multimedia timers when handled properly), so using simple acknowledge byte already described is a much better option. <A> I do not know what shields are available, I am only a microcontroller guy in general. <S> SPI is very simple and will allow baud rates in excess of 1Mbps very easily. <S> However, if you just need to get to 300kBaud or even 1MBaud and are okay with UART <S> the FTDI chip line is the real deal . <S> One of the chips that can do this specifically is the FT2232H . <S> These do not support SPI, but can handle very fast UART. <S> From their specs: <S> RS232/RS422/RS485 UART Transfer Data Rate up to 12Mbaud. <S> (RS232 Data Rate limited by external level shifter). <A> Arduinos are awesome, but they have their limitations. <S> Unless you are programing In C and just making use of the arduino bootloader they will tend to run a lot slower. <S> Im not a big guru on data rates etc <S> but i would expect that at 50hz you would be hitting the wall for the arduinos capabilities. <S> I would suggest looking at programing in C <S> (hackaday.com has just done a great set of tutorials on this) or trying another microcontroller, my favorite for projects like this is the parallax propellor essentially 8 microcontrollers in one.
With proper hardware, Windows can handle serial communication up to 921600bps (115200 x2, x4, x8). As your baud rate goes higher a synchronous protocol makes a very large amount of sense.
What is the simplest way to make a small low power and low price circuit that flashes LED's I am wanting to make a small handheld circuit that could flash anywhere between 4-6 leds in a programmed order. It has to be as small as possible and use very little energy. I am trying to make these cheap enough that I can make a lot. I was thinking about using one of the AVR series mcu. Size wise I was thinking of having it run on triple A'S. I am open to suggestions. Edit I am looking for DIP MCUs not smd. <Q> Depending on how programmable/complex <S> your flashing is - you may be able to do it without software. <S> In which case: Most Simple Stoplight circuit Blink an LED with just a capacitor? <S> If you do need to use a microcontroller - with 6 <S> I/O pins which is low power and small <S> then I'd look at: MSP430 (Value Line) . <S> Here's an app note on powering an MSP430 from a single cell (using a charge pump) . <S> There's also now an MSP430 which runs at 0.9V . <S> AVR PicoPower is also worth a look. <S> Even the ATMega168/328 used in Arduino though can be put into quite low power modes. <S> Here's a couple of Arduino libs to do it: http://code.google.com/p/narcoleptic/ http://www.arduino.cc/playground/Code/Enerlib <A> Have you looked at the MSP430G2231 ? <S> It's really low power and is pretty cheap too. <S> Plus it isn't a SMD MCU. <A> if you want cheap you dont even need a micro controller for simple on/off. <S> Infact i would avoid them alltogether. <S> a Simple sequence of leds that repeat you could use a simple 555 timer and a counter module, i cant think off which ones off the top of my head <S> but there are lots of option and would take some time to plow through data sheets. <A> But I'm sure you can find some way to "trim the fat" on this project :-). <S> MiniPOV 1 <S> MiniPOV v2 <S> MiniPOV <S> v3 has <S> a parts list that links directly to a distributor of each part <S> MiniPOV discussion forum <S> MiniPOV <S> 3 kit for sale -- note that this price does not include an outer case or batteries, which could easily double the materials cost of this item. <S> I've been told that lots of designers find it easier to make a new system when they can start with a "scaffolding" of a known-working system, even when they end up completely changing everything so there isn't any part of the scaffolding remaining. <S> Using a microcontroller for a simple LED sequencer seems like overkill, but any alternative I can think of requires more than 1 components to replace the 1 microcontroller chip -- and how can "more components" be simpler? <A> Have you seen the Throwie that blinks in Morse code? <S> Instructables and Ward's own website .It uses an 8 pin DIP microcontroller(less than $3 in ones).
You might also look at the MiniPOV.It's the simplest, smallest, and lowest-cost way to flash LEDS with a microcontroller that I've ever seen.
Need comments and ideas for LED flashlight project I'm thinking about making a simple LED flashlight. After doing some research, I think I'm going to use some 5 mm 12 Cd white LEDs with 3.6 V drop which can pass 20 mA. I'm not yet sure how much LEDs I'd need, but for now, I'm thinking about 5 or 10. For power supply, I was thinking about single 6LR61 battery or 4 serially connected LR6 batteries or maybe even two serially connected 6LR61 batteries (but I'd like to avoid that as 6LR61 are pretty expensive here). The 6LR61 batteries popular here according to data sheet have capacity 550 mAh while LR6 have capacity of 2600 mAh. Minimal voltage for 6LR61 is 4.8 V and 0.8 V for LR6. Since LR6 batteries have considerably higher capacity, I'm most likely going to use them, unless you provide a reason why to go with 9V battery. Also, if I serially connect batteries, would pack's capacity increase? As for circuit itself, I was thinking something like battery pack with a switch serially connected to it. I'd the use parallel connection to connect a number of branches consisting of a resistor and LED to the switch on one end and battery pack on the other end. However I'm concerned about energy usage. I'll have lots of resistors and each one will consume some energy. If I go for 9 V option or even 18 V option, I'd reduce amount of energy wasted by resistors, since I could connect several LEDs serially with a single resistor. Another point which bothers me is what type of resistors to choose. I'd like to use up as much of the batteries as possible and have device work as long as possible. I've been experimenting with results form http://ledcalc.com/ , but I'm still not certain what to choose. EDIT 1 Another idea: Would a 555 timer plus a transistor as a switch be a good choice for making device PWM controlled? <Q> Well, let's analyze the circuit. <S> We know that the power required in a DC circuit is: P = <S> Vsrc <S> * Iout <S> We know that I = <S> (Vout - Vled)/R and the power delivered to the LEDs is all that matters, so we want to maximize Pr = <S> (Vout - Vled) <S> * I = <S> (Vout - Vled)^2/R Pled = <S> Vled <S> * <S> I = <S> Vled <S> * <S> (Vout - Vled)/R <S> Clearly, we want to minimize Pr and maximize Pled. <S> We can do this without decreasing the current by reducing R and making Vled close to Vsrc. <S> This is accomplished by putting the LEDs in series. <S> However, your battery (isn't the 6LR61 <S> a 9V battery?) will go from some nominal voltage (ex 9V) to a lower voltage - <S> 9Vs are spec'd to be dead at 4.8V. <S> This means that a passive solution will go dim while there's still charge left in the battery. <S> For your original schematic, that might mean that you'd end up below the minimum current to turn the LED on, or for the series version, the voltage might go below the diode forward voltage. <S> A simple way to extract more brightness with the same power is to pulse the LEDs - Human eyes percieve blinking light to be brighter than continuous light, even if the average power is the same. <S> A 555 timer or other oscillator/switch combination will be able to do this, no microcontroller required. <S> Try playing with the duty cycle and frequency of your LEDs to see where it looks the brightest - You may be surprised! <S> Also, a switching power supply can increase the efficiency of your regulation circuit to 80, 90, or even 95%. <S> However, that will drive up the cost and complexity of the design, and may not be necessary. <A> This way you can adjust the luminosity while increasing battery life. <A> You need a buck DC-DC converter for highest efficiency. <S> It has to be designed to produce the desired average current rather than a fixed average voltage. <S> The ideal is to design the product to have zero resistors - then you know that the power wasted as heat in resistors is zero. <S> After that, efficiency is a matter of LED semiconductor physics - good luck with improving that! <A> Series connected batteries add voltage but the capacity stays the same, more or less. <S> You could consider a boost circuit to suck the last joules out of your battery. <S> Something like a MCP1640T would let you run the 3.6V LED's from a 1.5V battery. <S> If you're clever and set the output voltage of the MCP1640T at the same voltage as the LED's you'll only need a small resistor, say around 1 to 10 ohms (to help with balancing the current between the LED's.) <S> Unfortunately, the MCP1640T is a surface mount only part, which could pose problems for a one-time project. <A> Those little T1-3/4 LEDs aren't very good for illumination. <S> The high power ones are more efficient. <S> Check out DIY forums on www.candlepowerforums.com for really good resources on LED lighting and flashlights.
Parallel connected batteries add capacity, if they are of the same voltage. One idea is use a microcontroler, so you can drive the leds via a PWM output.
How to solder MSOP-EP package with just an iron? I have a MSOP10 package with an exposed pad. How do I solder this, if at all possible, with just my temperature controlled iron? <Q> Have not tried myself but here is video of soldering QFN <S> (I believe exposed pad technique should be identical with MSOP): <S> http://www.youtube.com/watch?v=d-f-SBC0GrU For general SMD soldering <S> I found this helpful: <S> http://www.youtube.com/watch?v=3NN7UGWYmBY <S> BTW: Kudos for makers of this two videos. <A> Ideally you put a via in the center of the pad, so you can do it from the back. <S> If one isn't there and you can drill a hole, that may work as well, possibly using some wire to couple the heat to the pad. <S> If the pad has a plane (or very large trace) leading outside of the package, you may be able to get heat into the joint via that (possibly after scraping off solder resist). <S> If you have a few parts to do like that, it may be worth it to do it on a hot plate. <S> Tin the part and pad (preferably use paste), then heat it up to 240-250°C for a brief time (non-contact IR thermometers are handy for this). <A> Put several small vias underneath ( better than fewer lare ones for themal conduction, leave a hole in the bottom solder resist, or scrape of resist. <S> Apply some paste to the pad,place the part, and apply heat & a little solder for thermal contact to the underside and wait til the paste reflows. <A> An MSOP10 package doesn't have an exposed pad according to any datasheet I can find. <S> Here's a link [PDF] to Fairchild's description <S> - It's just a smaller SOIC. <S> What are you working on? <S> In general, though, if you've got a package with an exposed pad, the general method for soldering pads underneath a package is one two large vias (large enough to push a soldering iron tip and solder through), which should allow you to heat up that ground pad and the solder will wick around to the whole thing. <S> However, be aware that this is difficult to do right sometimes. <S> Especially if you can't see the wicking action, it's really hard to get the bottom of the package to heat up enough to get solder to pull up to it. <S> Often, all you get is a dome of solder on the pad and a cold joint at best to the underside of the chip. <A> Perhaps attaching a small flat piece of aluminum to a conventional solder iron tip would work. <S> Solder will not "wet" or flow onto aluminum. <S> But the aluminum would get as hot as the tip. <S> First get solder onto each pad, using an iron or solder paste. <S> Position the chip on top. <S> Press the flat edge of the hot aluminum against all the chip leads along one side of the chip at once. <S> The heat will reflow the solder already there. <S> I haven't tried this yet.
You may be able to expose some of the pad on the circuit board and heat that up (use a big chisel tip!).
What do phase dots on an inductor mean? I have a SEPIC supply with coupled inductors. The inductors have phase dots. What do these "phase dots" mean? Is it important to have the phase dot in the same place? <Q> Currents entering on the dotted ends of the windings will produce magnetic flux in the same direction, whereas if you have current entering one dotted end, and leaving another dotted end, the currents will produce opposing flux. <S> If you're looking at something like a power supply schematic, the dots show you the ends of the coils that have the same phase angle. <A> If we're thinking about same thing, then dots show relation between coils. <S> Here 's an article about that. <S> If I get the dot relation correctly (and I'm not sure that I do), if current is going into the dot on one side of the inductor and the other dot is on the same side of the inductor, that means that current is going into the dot on the other side too. <S> How important it is to have dots in the same place is up to design of the circuit. <S> In some cases it may not be relevant, but often it is important to take it into account. <A> Normally we apply AC voltage on the (input) primary coil of the transformer and we have an (approximately) resistive load on each (output) secondary coil of the transformer. <S> In that case, the dotted end of every coil will reach the positive peak voltage relative to the non-dotted end of that coil at (approximately) the same time. <S> Also at that same instant current will be flowing into the dotted end of the primary coil and current will be flowing out of the dotted end of each secondary coil. <S> The dots describe which way each coil was wound. <S> If I take a CAT5 cable and wind it around a ferrite core, each wire-end at one end of the CAT5 cable is dotted. <S> Each wire-end at the other end of the cable is not-dotted. <S> I honestly don't know if dot orientation makes any difference for a SEPIC converter. <S> I know that the dots are important in the very similar "Coupled Inductor Cuk Converter" and "Integrated Magnetics Cuk Converter" ( The Four Topologies ) <S> .If one accidentally swaps the two ends of a coil in that converter, you get increased (worse) ripple on the input or output or both. <A> In short and oversimplifying: The dots indicate which winding terminals have the same phases of induced AC voltages. <S> That assumes you're driving one winding and others are not loaded. <A> I think I can help. <S> The dot indicates the outside wire of the inductor, particularly for inductors that are wound on a ferrite spool or bobbin. <S> This can be useful for minimizing unwanted emissions. <S> For example, if you are designing a switching converter (buck, boost, or SEPIC), one end of the inductor(s) is normally tied to a DC power rail while the other end is switched up and down. <S> If you tie the "dot" end of the inductor to the DC rail, the inner windings of the inductor will be doing most of the voltage swinging, and the outer layers will help shield them from radiating. <S> In a SEPIC converter, inductor coupling is optional. <S> The only way to couple the inductors is to wind them on the same core. <S> If you're buying single inductors off-the-shelf, your design is UNcoupled and you want to make sure the inductors do not interfere with one another. <S> For uncoupled inductors, tie the dotted end of the series inductor to the input voltage and tie the dotted end of the parallel inductor to ground. <S> That will minimize emissions and unwanted coupling between the two inductors. <S> Film-type capacitors are marked the same way. <S> Film capacitors have no voltage polarity restrictions (unlike electrolytics and tantalums), but they still have a polarity mark on them. <S> Film capacitors are made by wrapping foil and insulating film (or metallized film) like a roll of toilet paper, and the dot indicates the outer layer of that winding. <S> Tie the dotted end to DC, and the capacitor is partially shelf-shielding. <A> Wurth indicates the dot is the start of the winding (which makes it the inside winding) and therefore the dot should be placed at the switching node for the reasons Marc mentioned above. <S> I don't know if there's a convention for this, but if there isn't, I would ask the manufacturer what the dot indicates when used with switchers. <S> https://www.we-online.de/web/en/passive_components_custom_magnetics/blog_pbcm/blog_detail_electronics_in_action_109450.php
The dots just indicate the polarity of the windings on the schematic.
Large-value ceramic caps in small packages? I'm looking at some capacitors, namely ceramic, 10µF 50V caps. Here are the search results on Farnell UK. Most are in big packages, 2220 or some form of stacked capacitor. But then there are the occasional X7R and X5R caps in 1206 and 1210 packages, like this one: GRM31CR61H106KA12L . It seems too good to be true, it's half the size of others and very low cost. It's not available yet, otherwise I would have bought some and tested them. Any opinions? Has anyone tried these? <Q> ESR <S> The larger cap can probably handle much larger surge and RMS currents, and likely has significantly lower ESR. <S> Remember, there is more to a cap than voltage and number of uF. <S> If you're putting the cap in a big DC-DC that dumps 10A into the cap every switching cycle, and the 1206 cap has an ESR of .05 Ω, it'll get really hot and fail in a hurry. <S> The big stacked ceramics are typically used in extreme-duty power supplies, where a tantalum or electrolytic cannot handle the conditions. <A> Unfortunately there are some major leadtime issues on the denser ceramics at the moment, so the latest dielectrics seem to include some unobtanium. <A> The part you listed is apparently X5R, not X7R, and yes, ceramic caps have become incredible in the last few years. <A> Some capacitors exhibit capacitance which varies with voltage. <S> As a physical analogy, a "perfect" capacitor will behave as a cylinder filled with liquid (adding a particular volume of liquid will increase the pressure, always at the same rate) while some caps behave more like a point-up code (the amount of liquid required for each unit increase in pressure decreases as the cap fills up). <S> Note that beyond the fact that one may have to use a higher-rated cap to get the capacitance one wants at the actual working voltage, there's another consequence of this behavior for intermittently-powered devices in battery-operated systems: <S> whereas a normal cap will take 9/16 as much energy to charge to 3 volts as to charge to 4 volts, a cap with whose capacitance decreases with voltage will require more energy for the lower-voltage part of the charge. <S> If a cap will be charged to 4 volts and needs to supply a certain amount of energy before the voltage drops to 3 volts, the latter cap will effectively waste more energy each time it's switched on. <S> What would be ideal would be if someone could construct a cap which had the opposite sort of behavior--something electrically equivalent to a cap wired in series with a battery <S> (so that capacitance would be maximized at voltages near the battery voltage). <S> There would be no net current flow into or out of the battery, but shifting the maximum-capacitance voltage would allow intermittently-powered devices to work more efficiently. <S> I wonder if using different metals for the anode and cathode of a cap would have such an effect? <A> Look at them all its to do with the tolerances the cheap ones have a much higher tolerance than the more expensive ones.
It is very likely that the 1206 ceramic cap and the large stacked ceramic cap differ greatly in one very important characteristic.
What 'cool' things can you build as a parent and child activity? I would like to have a list on things a parent could build with his or her child? The things should be considered 'cool', fun and not be too advanced (the child should be able to help out and be able to understand what we are doing). A child would be anything from a 3-4 year old kid up to (say) 12. I know there are tons of science kits (and lego kits such as lego mindstorms and lego technic) out there so please try to avoid mentioning them. Example: One can build a laser from an old DVD burner [insert guide here]. <Q> Snap Circuits is great for that, or 7+ years with minimal supervision. <S> It's like breadboarding, but easier. <A> My father bought me the bits for one when I was 12, and I progressed from there. <A> Well one thing I remember now which I did with my father when I was maybe 10 or so was to make a miniature airplane (he teaches aerodynamic constructions at local university, so we didn't have to do a lot of research). <S> We made body of the plane out of a fountain pen, main surface of monoplane out of folded lightweight cardboard, hobby motor to drive the propeller and cardboard to make the tail. <S> We got wheels form toy cars and used small paper clips as axles. <S> Propeller was made out of a piece of 0.5 mm aluminium sheet. <S> Then we connected it to a base of a vise via rotating joint and a lever. <S> A counterweight was attached at the other side so that the plane side of the lever was just a little bit heavier than the weight side. <S> We run a cable form the base of the vise to the plane and connected it on the other side with a potentiometer, analogue voltmeter, amperemeter and a wall wart. <S> Yeah, I know it isn't very electronics related, but it did show relation between current and voltage. <S> It was also very visible that changing voltage could make plane start moving on the table and that changing it even more could make it lift off and control its altitude. <S> At the time I thought it was pretty cool. <S> Some of the other things I did was to make electromagnets form pieces of iron and thin cables. <S> They were very simple and not very cool to me at the time, but they could lift small nails and similar objects. <S> Two things that are simple and could be cool are LED Throwies and LED Floaties . <S> There are also improved LED Throwies which only work in dark, so they save battery energy. <S> I can't think of anything else interesting at the moment. <A> Since Christmas is coming up, how about a LED Christmas tree? <S> All you need is a piece of hardboard, cut to a tree shape and painted green, with holes for LEDs. <S> Both red & green LEDs, either flashing or always on. <S> I once built a similar shop sign with an 8 year old, and he was perfectly capable of doing the work with supervision. <A> You can make a simple electric motor with stuff that you can find at a craft store - and there are any number of ways to make them. <S> All it takes is a few turns of enamel covered wire, a suitable magnet, and a single flashlight battery is usually enough to move it. <S> The tricky part is arranging the commutation, but there are lots of websites that show different ways to do that. <A> You could make some Bristle Bots or Solar Bots .
A crystal set radio would be a good start.
How to repond to a kinetic impact electronically Say I have a large soft surface such as a jacket and I want to register it getting hit by a paintball from a paintball gun, how would I do that? What type of sensors could I use? <Q> a piezoelectric sensor will create an electrical signal when hit. <S> They are used in many different types of devices and would most certainly register a paintable hitting a jacket. <A> Not going to be easy, i don't think an accelerometer is going to cut it. <S> I think the easiest answer would be to modify the jacket (or make an under shirt) which is pressure sensitive. <S> You could do this by using 2 layers of conductive fabric and a sparse semi insulator in between and carefully sewing it all together. <S> Setup a circuit to measure the resistance between the 2 conductive fabric layers and when something compresses them (such as a paintball) the resistance should drop. <S> More math work, less sewing. <A> How about piezo film sheet eg <S> http://www.meas-spec.com/product/t_product.aspx?id=2488 ?
Alternatively, if a paintball is really your use case, you could use a microcontroller with a little microphone somewhere on the jacket and process the audio looking for the sound of the impact.
Is it current (and power dissipation) which damages things, not voltage? With higher voltages (more than about 5V), microcontrollers may be damaged. Is this because the voltage actually physically damages them, or because it allows excessive current to flow? - and thus increases power dissipation beyond safe limits. How does this apply for other devices? <Q> It's primarily because the insulating layers in the device can only withstand a certain voltage. <S> The insulation breaks down with excessive voltage and causes internal shorts. <A> P,I,V are well known, but rarely designers and users pay attention to dV/dt. <S> In power electronics the damage is caused by dV/dt, say about 5000V/microsecond. <S> At this speed the multiple layers of semiconductors (which very often have parasitic thyristor somewhere) open wide and cause avalanche of destructive events. <S> So it is possible to damage 1000V 200A device with momentary combination of much lesser current and voltage, because energy will dissipate in parts/places of structure different to normally expected. <A> Reverse biased PN junctions can only take so much voltage before they start to conduct. <S> Sometimes they are designed for this, like zener diodes, but more often they're not. <S> When multiple transistors are fab'd into an integrated circuit, reverse biased junctions can be used to isolate them. <S> If you get one of these normally reverse biased junctions conducting, for example by exceeding the peak reverse voltage it can take, all sorts of unintended conduction paths can be opened, a cook the IC. <A> The most common form of electrical damage to things is overheating caused by total power dissipation. <S> In many cases, one can safely get by either limiting voltage to a very low level and not worrying about current, or limiting current to a very low level and not worrying about voltage. <S> There are some exceptions, though: <S> It is possible for excessive voltage to cause a sudden current flow, or for excessive current to cause a sudden voltage drop, and these currents or voltage drops may be sufficiently localized that damage can occur with very small total power dissipation. <S> As others have noted, excessive voltage or current applied to a pin of a device which is powered may cause the device to enter a mode (such as latch-up) that converts a lot of supply power into heat. <S> Even if the power into the over-voltage or over-current pin is limited, the supply may feed enough power to totally destroy the device. <S> Overvoltage and overcurrent conditions may accelerate physical or chemical changes in a device sufficiently to cause it to fail prematurely or go out of spec; an electrolytic capacitor which is charged beyond its rated voltage, for example, may have its dielectric gradually get thicker as a result, reducing its capacitance. <S> Note that such effects can cause damage even if power dissipation is slight and cooling is sufficient to prevent overheating. <A> Answer is, it depends on the device and how the voltage/current is applied. <S> If you put too much voltage on a CMOS transistors gate, then it'll punch through damaging it. <S> Maybe enough that the circuit doesn't work, or maybe not. <S> It's classic problem with <S> analog IC's, they get zapped, then they get noisy. <S> Same thing can happen to bi-polar transistors. <S> Classic failure in CMOS <S> IC's is latch up, where a current spike flips on parasitic SCR's associated with CMOS transistors. <S> Current then flows from VCC to ground, potentially overheating the device. <S> And also high currents frying the protection diodes on inputs, causing them to leak. <S> And as the man said, dV/dt tends to kill power devices. <S> Often because it causes them to partially turn on in localized areas, which then overheat and punch through. <S> Which is why rolling your own motor controller usually results in big smoke. <A> I know this is gross simplification, but the way I always looked at it was; over voltage breaks down the insulation layer between conductors and damages devices, over current damages the conductors themselves primarily through over heating.
In some cases, particularly with overvoltage, it may possible for localized capacitance to hold enough energy to damage the device even if current is externally limited.
How do LEDs fail? I am trying to develop a very high reliability product, with a MTBF exceeding 100,000 hours, hopefully in the 250,000 hours range. Yep, I know - stupidly high reliability, at least 10 years. Most LED's I've seen have a reliability rating of only 20,000 hours. What happens after this? Do they reduce in output too much? Are they usable as power indicators past this point? <Q> Must say I've always been highly sceptical of the meaningfulness of MTBF figures. <S> Running at well below the specc'd current will increase lifetime many-fold. <S> And would failure of a power-on LED be counted as a failure of the product? <A> I think you are utterly doomed trying to get to MTBF of 250000 hours on any usefully complex product, but then you haven't said what it is, so it might be very simple. <S> LEDs tend to age faster if they're hotter / driven at higher currents, and the failure mechanism is different for white leds (which are fluorescent) and natural-coloured LEDs. <S> But generally they get dimmer as they age. <S> I would expect that you would get very long life if you significantly under-drove the LED (modern traditional-colour (red, etc)) <S> LEDs are incredibly bright and tend to need very little current to act as a useful indicator, and if you weren't too fussy about the specific output you could play faster-and-looser about the failure condition. <S> But if I was trying to make a fantastically reliable product, one way I'd do that is to dispense with absolutely every component I possibly could. <S> I expect the power-on LED would fail to make the cut in that regard. <S> Update: Well, clearly I know even less about reliability than I thought I did - it seems lots of diskdrives claim MTBFs well over 250k hours <S> - so good luck with your product! <A> MTBF is based off of actual run time. <S> So at a goal of 250,000 hours you are hoping your product can run 24/7/365 for almost 30 years. <S> A MTBF of 20,000 gives you just over 2.25 years of constant run time at recommended max power. <S> This time is pretty good for most commercial products right now. <S> If your LED is on for 8 hours a day, you are looking at a life of almost 7 years. <S> Now if you decrease the power your putting into the LED you can even extend this life longer. <S> Now with all of that said, if it is just a power indicator you wont be switching it often so you will put less wear on the device. <S> I know I haven't directly answered your question, but I am hoping you are starting to realize that MTBF isn't something you should worry about too much. <S> I realize you want your device to last awhile, which is a good thing, but you will probably find that if you always go with the highest life items they will generally be more expensive which will cause your product to be inflated in price, resulting in very few wanting to buy it. <S> What good is a device that lasts for 30 years if no one buys it? <A> MTBF is assurance that reasonable derating guidelines are met. <S> Nothing more. <S> An MTBF of 250k hours does not mean any single piece of equipment will last 30 years. <S> It's possible to get that sort of MTBF on equipment that uses electrolytic capacitors, which almost certainly will dry out in much less time than that. <S> Drive the LED with the minimum amount of current that provides a useful amount of 'signal' <S> (i.e. is viewable under whatever conditions you deem inportant.) <S> The LED manufacturer should have datasheet information about operating current / temperature rise / ambient temperature, so you can judge how 'hard' you're driving it and make your own decision about reliability.
LEDs will gradually reduce brightness over time, but it will be many times their stated life before they cease to be useable as a power indicator.
Why is it important for mains power supplies to be isolated? In all the computer power supplies and other power supplies I've taken apart, I've noticed they are fully isolated from the mains. Galvanic isolation through transformers, and often optical isolation for feedback. There is usually a very visible gap in the traces between the primary and secondary sides, at least 8mm across. Why is it important that these supplies be isolated? <Q> Because the mains supply is very unpredictable, and can do all sorts of things outside its nominal specification, which might damage components or at least break the nominal design assumptions. <S> A non-isolated design also has all its voltages referenced to one of the mains conductors, which might or might not have a useful/safe relationship to other potentials in your environment <S> (like earth/ground, for example). <S> If the only stuff on the low-voltage side is inaccessible electronics, then non-isolated supplies are fine - they tend to much be cheaper/simpler than isolated supplies, and lots of household equipment uses them. <S> Even things like televisions used to work like this, if you go right back to before the time when they had external video/audio connections. <S> The antenna connection was the only external socket, and that was capacitor-isolated. <S> If a human being or 3rd party piece of equipment needs to interconnect with the low-voltage side of your design, then an isolated supply both gives you a clear barrier across which dangerous voltages won't pass, <S> even in the case of component failure, and it means your circuit is now 'floating' relative to the mains. <S> In turn, that means you can arrange for all the electronics to operate near ground potential, with all your interconnected equipment having at least roughly the same voltage reference to work from. <A> Short answer (oooh, this is a pun, wait for it...) <S> : safety. <S> What would the effect of a short from 240V or higher to... <S> well, anything, be? <S> Low voltage devices? <S> Dead! <S> House? <S> On fire! <S> Lawsuit? <S> Pending! <S> Isolation at least makes a direct short to wall voltage impossible and an indirect short less dangerous and less likely. <S> For instance, if the wall voltage totally fries everything on one side of the transformer you have a non-working transformer. <S> A non-working transformer means no coupling and no voltage on the other side, so no damage. <S> Plus there are more protection options for the lower voltage side (less expensive protection options anyhow). <A> I can think of a few: <S> Helps isolate the outputs from dangerous line-level events (lightning strikes, surges, etc.) <S> since most transformers are step-down in commercial power supplies <S> Allows you to use the chassis of the equipment as a safety shield, by earthing it <S> (any conduction from the mains to the chassis will instigate a fuse blow or breaker trip, rapidly disconnecting the fault) <S> Ensures that sufficient margin exists in the design to prevent arc-over from primary to secondary even under less-than-clean environments <S> (toner dust is a particularily nasty gap-bridger) <S> Reduces the 'stiffness' of the power source - <S> a small transformer will saturate out much more quickly than the mains, which also has the effect of driving the primary current higher and activating some sort of safety device (fuse, breaker, etc.) <S> Regulatory organizations require it in most applications: IEC 60950, CSA C22.2, etc. <A> In addition to the safety issues mentioned, there's also a practical issue: even if one knew that the neutral AC supply leads would always be at ground potential, it would be difficult to design a transformerless low-voltage DC supply which drew current equally on the two halves of each line cycle without the DC side having a significant common-mode voltage swing relative to the neutral supply line. <S> Using transformers to float a supply is not really any more difficult than making the DC ground coincide with the AC supply neutral. <S> There's not really any disadvantage to having low-voltage DC supplies float relative to both power input leads, and in practice having the DC ground tied to AC neutral would introduce some needless safety hazards. <S> Those arguments together form a pretty compelling argument in favor of isolating low-voltage DC supplies from the AC line. <A> We can't rely on either of the supply conductors being safe for several reasons. <S> In some countries you can't rely on which conductor is live and which is neutral either because the sockets are unpolarised, because the installers don't pay much attention to polarity or because use of extensions <S> /adapters that may not correctly maintain polarity is common. <S> Wires can break, if the neutral wire breaks and there is load on the system then the neutral wire will come up to mains volts. <S> Even in normal operation with correct polarity there can be voltage on the neutral due to volt drop. <S> While the voltage is low the impedance is also very low, so it can be a fire risk. <S> As a result of this modern appliance standards generally treat both the live and neutral conductors as potentially hazardous. <S> This leaves appliance vendors with two main options for protecting the uses. <S> Insulate and touchproof all electrical parts, that works ok for simple devices <S> but it's not really practical for things like computers with a bunch of user-accessible ports. <S> Put an isolation barrier in the power supply so that the low voltage part is safe to touch.
Even if the voltage swing on an exposed "ground" would be low enough not to pose an electrocution risk, connecting the DC-side grounds of different devices could still be likely to disrupt their behavior.
Generating electricity with wet newspapers? For a project we're thinking of generating electricity out of wet newspapers. Is that possible? How much current would it generate? <Q> You will need to soak your newspapers in a suitable electrolyte, water will not work. <S> You could try lemon juice as a weak acid (vinegar could work). <S> You will then need two dis-similar metals one for the Anode and the other for the Cathode. <S> Let us say a piece of copper and a piece of zinc (galvanised steel will do). <S> Place the two metals in contact with the sodden newspaper and measure the voltage between the plates. <S> You should get around 0.85V. <S> You will not get much current out of this cell as the internal resistance of the soggy newspaper will be quite high. <S> It should light up an LED. <S> You could just get a lemon and stick the two metals through the skin into the fruit, dispensing with a messy pile of soggy newspaper. <A> Once upon a time you might have been able to get a weak voltage from soggy newspapers. <S> The ink that was used had small amounts of various metals that would be conductors. <S> The paper itself was bleached and certain amount would not get rinsed out. <S> Today the ink is soy based, it does not contain any metal. <S> The paper has little if any chemicals left in it from processing. <S> You could add metal as electrodes and add a electrolyte like acetic acid (citrus juice), but if you do that you don't need the newspaper. <S> There has been some attempts to use cellulose (paper) with carbon nano tubes suspended in ink for manufacturing batteries, but this is much more the wet newspapers. <A> It mostly depends on the chemicals the newspaper has been soaked in. <S> The material of the electrodes placed in/on the newspaper. <S> I seem to remember a project a while back which used copper and zinc for +/- <S> . <S> Something about the different metal properties allowed electricity to flow. <S> Do some searches with those keywords. <A> Batteries are formed by compounds with dissimilar electrode potentials , so you will require some sort of additional reactants (usually metals) that you could keep separate with newspaper. <S> Copper/zinc as Brad mentions are fairly easy to obtain and cheap, though the possibilities are vast (magnesium, lithium, iron, tin, nickel, silver...) <S> The current any battery generates is based on the speed it can react components, which is governed by the geometry of the cell above all else. <S> If you only know the materials (we don't here anyways), the best you can do is estimate the voltage. <S> Roll up paper-foil-paper-foil, apply a reverse voltage to grow the aluminum oxide dielectric, and presto, capacitor.
Alternatively, you could use wet newspaper as a spacer for aluminum electrolytic capacitors. The newspapers themselves won't generate any electricity as they don't react with anything.
Good checklist for PCB design to be used by the EE (not by the PCB designer) I don't do my own CAD work. I have a mental checklist of what to look for when the PCB is placed, critical routed and routed. But is there a good checklist you have or can point me to? I'm not looking for schematic items, that is covered here . <Q> From the previous question, this link also contains Atlantic Quality Design's PCB checklist. <S> A one you can check off is here <S> Edit Jan 6 2011: <S> An archive of one from Avanthon has a good list. <A> This is my list for boards I lay out in Ultiboard. <S> Are there any antennas? <S> Edit -> <S> Copper Delete -> <S> Open Trace Ends <S> Are there any unused vias? <S> Design -> Remove Unused Vias <S> Are there any design rule errors you can't explain? <S> Are there any connectivity errors at all? <S> Does it look wrong? <S> Look at the board for obvious stupidity like parts that have been eaten or moved. <S> Are there bypass caps directly on the power rails of EVERY chip? <S> Even the ones that don't look like ICs, like regulators? <S> Are there filters directly on EVERY transistor gate/base? <S> Even the ones in processors? <S> Half an inch is probably too far away. <S> Are there filters directly on A/D converter pins? <S> Are the traces wide enough? <S> Especially power traces? <S> Make the traces as large as reasonable, unless you have specific reason not to. <S> Use power planes where possible, especially under processors <S> Are the thermal reliefs as you intended? <S> High-current components get no thermal relief, but also no solder mask! <S> Otherwise it will be very difficult to solder. <S> Make sure there's plenty of exposed copper on both sides of the board for those components. <S> Everything else gets standard thermal reliefs, 10 mil or so is probably fine spoke width. <S> Are all test points labeled? <S> Is the board name (or part number) printed on the silkscreen? <S> Correct revision? <S> Is there sufficient distributed cap on the power rails? <S> One big cap in the corner isn't as good as four smaller caps spread around the board. <S> Are all isolation barriers wide enough? <S> Are all high voltage clearances in place? <S> Look particularly for traces under heat sinks tied to high voltage through a transistor tab. <S> Check all the layers. <S> Sometimes I've left the solder mask layer turned off, only to find that there was some odd shape on it that I'd placed by accident. <S> Are all footprints and pinouts correct? <S> Collector-emitter reversal has happened to me on more than one occasion. <S> Is the silkscreen correct, showing reference designators, not values? <S> Check the actual exported gerber. <S> Are all user terminals marked with function, + -, other relevant information? <S> Are all op-amp power rails connected? <S> Ultiboard likes to randomly eat them. <S> Don't trust the auto-router . <S> It's tempting, but ultimately not worth the effort. <S> Only use it if there's a question if something is at all routable. <A> Preliminary Check the footprints, especially for connectors, parts that are available in multiple packages, and those new footprints. <S> Print 1:1 plots and place the parts on them. <S> Since they go from power to ground, it isn't obvious where they were intended to go without looking at the schematic. <S> Check connector placement, board size, etc. <S> Don't forget mounting holes. <S> Critical Route <S> Inspect every critical route, including before and after and resistors used for termination. <S> Full Route Report on all net lengths. <S> Check for ones that are too long. <S> Other Fiducials, both global and for BGAs.
Placement Check that the decoupling caps are where you wish. Also look for clearances to any mounting holes. Electronic Product Design has one with some unique items. Have PCB fab check your controlled impedance calculations.
What are the standard connectors used on 12V hobby batteries? I'm looking for a right-angle PCB board mate for the standard 12V hobby battery connectors. Where can I find these connectors? <Q> Also called <S> the "(Standard or Large) Tamiya Connector" in R/C speak ( ref ); not sure if other manufacturers make them (guaranteed someone somewhere does), <S> but here are the Molex part numbers (Digi-Key) for the Wire-to-Wire connectors : Device Side (usually) <S> Plug - 35143-0201 <S> ( WM2308-ND ) <S> Socket - 35728-0201 <S> ( WM2311-ND ) <S> Battery Side Cap - 35141-0201 <S> ( WM2309-ND ) Pin - 35727-0201 <S> ( WM2310-ND ) <S> Molex does not make this style in Wire-to-Board; so any knockoffs of just Molex product probably won't either. <S> An easy-to-use replacement with both Wire-to-Wire and Wire-to-Board that I've used are the Molex Mini MATE-N-LOK 2 connectors ( like these ), depending on the current you may need regular MATE-N-LOK. <A> "The nice thing about standards is that you have so many to choose from." -- Andrew S. Tanenbaum. <S> There are a variety of standard 12 VDC power connectors .Perhaps <S> the most common are: Anderson Powerpole (formerly Sermos) <S> Deans Ultra Gold Bullet Connectors Tamiya connectors <S> Many battery packs have a wire soldered directly to the battery with one of these connectors on the other end of the wire. <S> There seem to be quite a few people on the internet comparing these connectors. <S> ( a b c <S> d <S> e <S> f <S> g ) <A> First of all there is no standard for 12V hobby battery connectors, so if you are designing a new product or working on your own gear then by all means feel free to pick your own connector type.
If you have any choice at all go with Deans style connectors in stead, the Tamiya connectors are utter shit, they have comparatively high resistance and will get loose and unreliable with a little use. There are PCB mount connectors that fit PowerPole connectors ( h ).I've also seen PCB-mount high-current spade connectors.
Why are power supplies almost always made using through hole components? Why are power supplies almost always made using through hole components? Every computer PSU I've taken apart uses through hole components, though occasionally (not in all cases) surface mount components are found on the bottom. Don't these have to be hand assembled? (before reflow or wave soldering) If so, why are they still doing this, even though labour costs are low in China, it still must cost less for a machine to pick and place SMT stuff... or am I missing something? <Q> Because PSUs use many big lumpy parts that are not SMDable and/or need good mechanical fixing. <S> Also, for minimum cost they like to use <S> single-layer PCBs - TH is a little more amenable to this as parts act as jumpers over tracks. <S> TH parts can be machine-inserted - e.g. <S> http://www.youtube.com/watch?v=eOQ3pZkKX24 <S> (30kparts/hour!) <A> One last reason that I haven't seen here <S> (And it's likely the most relevant one): <S> SMD components are too small. <S> I mean literally. <S> When you're dealing with high voltage, you have to worry about flashover/board creepage distances, which means that the connections for high voltage have to be separated by a certain amount (There are standards for this, which are required to get UL or similar ratings). <S> With 240V AC, the distance is (off the top of my head) ~.25", which is far larger then even 1206 parts. <S> This is also the explanation behind the slots cut into the PCB, which you often see under optocouplers/input filter caps. <S> Basically, to pass testing, the separation on the component's leads is not great enough, so they have to actually mill slots the board. <S> This increases the overall path-length between component pins on the PCB. <S> It's much easier and cheaper to mount a TO-220 package to a cheap extruded aluminium heatsink then have a board with very thick copper fabbed that can dissipate the same amount of power from a TO-263 device. <A> Half the parts are too big or for other reasons can't be re-flowed (power dissipation, etc) and the cost of doing a re-flow run and a hand process run is higher than just doing it all by hand. <S> You would be amazed how cheap hand soldering is in Asia. <A> The power dissipation for a component is much higher for TH. <S> They get better airflow from fans also.
Lastly, most of the power devices are through hole because through hole packages can dissipate more power than SMT parts.
Control a bicolor LED with just one pin Is it possible to control a bicolor LED with just one pin of a microcontroller? Instinct says NO, because you can have one end grounded and the other going to the micro's pin, allowing you to turn it on or off but not change its color. But maybe someone has a better idea? <Q> You can do this with a bi-color LED that has the two LEDs back-to-back if you connect one LED terminal to an intermediate voltage eg 2.5V on a 5V design and connect the other side to the MCU via a suitable resistor (I used 560R). <S> Then a low output gives one colour, high gives the other and tri-state leaves the LED off. <S> You can adjust the intermediate voltage to compensate for different LED forward voltages too. <S> I used an LM2904 op-amp to provide the intermediate voltage - it works with supply voltage down to 5V. <S> There are plenty of other devices that can operate at lower voltages and still sink and source enough current to drive the LEDs. <A> If you didn't need an off state, and your Voh was sufficiently large (edit: to overcome the forward bias voltage of the LED), you might be able to hook one end of the LED to a mid-rail voltage. <S> Outputting a 1 gets one color, outputting a 0 gets the other color. <S> To turn it off... <S> ha, good luck. <S> Maybe you could try putting a capacitor in there, and then driving the output with a PWM that the cap would smooth out to mid-rail? <A> You can Charlieplex it
Pulse width modulation will allow you to control brightness (switching output between active and tri-state) or mix the colours (switching output low to high).
In what way is a Craft Port different from a conventional RS-232 Port In what way is a Craft Port different from a conventional RS-232 Port? It seems to be similar. Are there any interface or other important differences? Does craft port imply a higher level protocol on top of RS-232 as well? <Q> This web page seems to corroborate: http://forum.wordreference.com/showthread.php?t=1944943 <S> Here is a datasheet for one of their CraftPort devices: http://www.analog.com/static/imported-files/data_sheets/ADM101E.pdf <S> So in short, it doesn't seem to be a protocol, but instead the name of the transceiver line. <S> Shouldn't be any different from regular RS-232. <S> I guess people like the sound of the name and use it on their products. <S> Ah, one edit: <S> It seems that the output voltage levels are + <S> /4.2V <S> and it allows full + <S> /-15V input. <S> Some ' <S> RS-232' transceivers don't like the full +/-15V range and only produce 0-5V output. <S> This is a step above those in terms of compatibility with the true RS-232 standard, which is not often completely met nowadays in terms of input/output voltages. <A> From this Expert sexchange question (scroll to bottom): A craft interface is a direct connection to a device, usually, as you have read, through an RS232 port using an RJ45 type connector or a DB9 or DB25 connector. <S> This interface provides access to a command line for the purpose of configuring the device or diagnosing problems, or for whatever reason the "user traffic" interfaces are inaccessible. <S> In any event, the craft interface provides access to diagnostic and configuration functions. <S> It sounds like you provided the proper answer, where "Craft" is just a protocol that sits on top of lower level links-- <S> RS-232 perhaps being the most common. <S> Perhaps analogous to AT commands . <A> The connection is often over an rs232 or similar serial port on the physical device itself but can also be via telnet, ssh or various other methods. <S> Typically these interfaces are complex and hard to use for those not familiar with them. <S> Each is specific to the manufacturer, device type and often the particular device. <S> They can have hundreds of complex commands and multiple contextual modes with many inconsistencies in the way different commands and modes work. <S> For this reason the word "craft" is often thought to come from the idea that when you're faced with the cli prompt you "Can't Remember A F...n Thing."
A craft interface is a command line interface for directly configuring a network device - typically an ip router or switch. Quick search reveals that it may be essentially a marketing term for Analog Devices series of RS-232 transceivers meant for low-power portable applications.
What does "Wait State" access mean on a MCU's datasheet and how does it affect me? I'm considering using an AT32UC3B in my project (the Super OSD Pro version.) However, something about the datasheet has me worried. Page 31 0 Wait State Access at up to 30 MHz in Worst Case Conditions 1 Wait State Access at up to 60 MHz in Worst Case Conditions What is a "worst case condition"? The output stage for my OSD needs to be able run at 60 MIPS (the processor's maximum operating frequency), and I presume a "wait state" means it has to wait to load data from the memory... which would limit me to <60 MIPS. I suppose, worst case, I could load the code into RAM and execute it from there (I presume this is possible with AVR32s?), but it still has me confused. <Q> This addition of wait states will limit your processing speed to less than 60MIPS (whatever that means). <S> The AVR32 has a banked/interleaved flash memory design so that the wait states are hidden for straight line code allowing it to access program flash at the full 60MHz <S> but as soon as you execute a branch or CALL then this will break the interleaving and incur a wait state penalty. <S> The AVR32 can run code from its RAM but this is a somewhat limited resource on the 32B devices. <S> If you REALLY need the full 60MIP operation for your code to function then you will have problems. <S> How will you cope with interrupts taking processor time..... <A> Often operations are going to run faster then external memory. <S> It is saying that when you are having to load from memory you will have to have wait states. <S> Now they have in their datasheet that it is 30MHz <S> no wait state from flash. <S> they do have it optimized to allow pipelined access to flash to hide the delay cycle. <S> you are correct <S> that ram is an option, but you should test your algorithm and see if you have issues. <S> If you keep your keep branch instructions out of your code it should be able to pipeline and hide the wait states. <A> The AVR32A architecture is a 3 stage pipeline and it doesn't look like <S> that model supports branch prediction so any branches in your code will stall the pipeline. <S> Also not all instructions are single cycle. <S> Generally speaking never choose a processor based on its MIPS rating. <S> In almost all real world scenarios you'll never get close to its theoretical peak MIPS rating.
The wait state is an extra bus clock cycle that is added to the memory access to allow time for the information to be extracted and appear on the processor bus.
Strategies for mapping an area perimeter with a mobile robot I'd like to build a bot that when placed in an area would have the ability to find the perimeter of the area and map the obstacles present. Later it should be able to navigate to different parts of the area on demand (e.g. navigate to the NW corner or continually monitor the entire area or return to a specific point in the area). What hardware/software would be necessary to make this happen? I've considered using IR to detect the obstacles & wall but it seems like the resolution may be a bit low for these purposes (could IR recognize an area is just large enough for the bot to fit into?). What prior work is available on these subjects, what sensors might I consider to get started? <Q> To successfully accomplish this, you probably want the following: <S> Localization Sensors - If you are on a smooth surface, wheel odometry should be enough. <S> The rougher the area that you are operating in, the more sensors you would need. <S> You can also use LIDAR sensors data to do localization. <S> Obstacle Detection - As Kortuk says, probably a LIDAR. <S> Possibly a Kinect, since that's the new hotness. <S> A decent LIDAR will probably start around 1000 USD for a Hokuyo, and go up from there. <S> You can then put this data into a map. <S> It has a lot of the software features such as localization, mapping, LIDAR drivers. <S> As far as the actual path, just spiraling out from a central point would work, taking into account obstacles and whatnot. <A> Excluding doing computer vision with a camera, which NI has some hardware to help you with, for a cost. <S> I would suggest you look into using a LIDAR . <S> These are not overly expensive by my recollection. <S> One of the robots a team did at my school last semester for an autonomous robot competition used a LIDAR mounted on a servo that it would rotate constantly to keep track of obstacle locations. <A> Use SLAM and the code from here as a start. <S> Use a camera and a high power DSP like the blackfin. <S> or dedicate a PC (depending on your size, costs, ability) <S> http://www.robots.ox.ac.uk/~gk/PTAM/ http://www.robots.ox.ac.uk/~bob/research/research_ptamm.html <A> The manufacturer released the Kinect's (and DevKit) Windows and Unix drivers here: http://www.openni.org/
Other common sensors for localization: Digital Compass, IMU, GPS, Vision Tracking (Fiducial Recognition), Stargazer (Indoors). As far as the Kinect goes, check out the PrimeSense devkit (the makers of the Kinect) From a software point of view, there are several options, but the one that I've had good luck with is ROS.
Multiple receivers in a 4-20mA current loop? How can I design a system that would allow me to put multiple receivers on a single 4-20mA current loop? Assume that I have design control over only one of the receivers. Sensor: Loop powered (2-wire) Supply voltage: 12-28VDC Max Load: 250 Ohms @ 12VDC (500 Ohms @ 24VDC) Current Receiver Design: 250 Ohm resistor to ground Loop power supply ground is connected to ADC ground <Q> This scheme was latter adapted for instrumentation use, with 4-20 ma as the standard. <S> Instead it should be passed on to the next receiver, like the old series Christmas tree light strings. <S> The last receiver connects to a lead which goes back to the transmitter ground. <S> At each receiver, a 250 ohm resistor is placed in the loop. <S> The two sides of the resistor can then be fed into an optical coupler, which will turn a transistor on/off which you can feed to your circuit. <S> (Or if you need to still be able to power your sensor from the loop, you will need to make the sensor run off a floating ground reference tied to one end of the sensor.) <S> If the sensor requires a minimum of 12v, using a 250 ohm resistor this implies a current of 48 ma, not 20 -- so I'm not sure if this is really a 4-20 ma loop or not. <S> If you have to use the current receiver design, it should be placed last. <S> All of the others must allow the loop to be passed on. <S> (Which limits you to two receivers, one new and one original design if you are allowed only one new receiver.) <A> As the sensor you are using has a maximum load <S> I think that one (maybe good) alternative is use a hall sensor on the loop. <S> This way you can extract the information on the current without interfering in the main loop. <S> The other receiver can be a regular one. <A> Have a look in to the HART protocol - it allows multi-drop communications over existing 4-20mA lines
In your current receiver design, one end of the resistor is connected to ground. Current loops were initially designed to connect multiple teletypewriters in series (originally 60 ma was used instead of 20 ma).
Why do switches and relays have lower current ratings at higher voltages? I have a switch which reads 6A 125VAC / 3A 250VAC. I can't figure out why this would be the case. The only reason I can think of the rating is the wires and contacts are only rated to take so much current and so much power dissipation. A higher voltage should not lead to more power dissipation. So why do switches and relays have lower current ratings at higher voltages? <Q> Keeping the same current as voltages increase will allow arcs to persist longer and cause more damage to the contact surfaces. <S> On small relays and contactors, these arcs are tiny, but if viewed in a darkened room, you can see that they do exist. <S> Over several thousand cycles, (especially with inductive loads such as motors) the arcing will cause pitting and oxidation of the contact surfaces. <S> Damaged surfaces are more resistive, which heats the contacts, and promotes more arcs. <S> Failure will come much sooner under these conditions of accelerated wear. <A> The information you see on a relay is really a condensed from of what is called a load limit curve. <S> It's better to really think that the relay can switch a maximum power, rather than a given current and voltage. <S> To a large extent, this limit is due to arcing - both from the point of an arc forming and being sustained and destroying the relay, or in terms of the contacts becoming pitted and not reaching the rated number of switching cycles. <S> If you take a look at a data sheet e.g. this one on page 7, you will see load limit curves. <S> In the top chart, they have drawn a constant power line at 40W, which is entirely below the load limit curve. <S> This means that the switching capacity of the relay is 40W across the range. <S> The switching capacity is the largest DC load that the relay can switch, irrespective of current or voltage. <S> It has nothing to do with power dissipation in the relay itself, which should be minimal. <S> The quoted numbers on a relay are generally just indications of current at line voltage in a few countries. <S> Load limit curves can be derived experimentally, but I think quite a few are just based off theory on switch geometry, contact material, speed of opening etc. <S> DC is more prone to sustaining an arc than AC, so the curve is for DC. <S> Sometimes they also show lines with derating applied for inductive loads. <A> 6A @ <S> 125V (assume DC for simplicity) is 750 Watts.3A @ <S> 250V <S> = 750 <S> WattsThat sis why they have same rating. <S> Its expressed this way because this switch is designed for switching mains current. <S> In USA thats 115V and in UK/Asia its 230-250VSo the manufacturer is trying to help you select this switch based on your current draw. <S> The same applies to wiring in the USA and elsewhere. <S> In the USA you need a thicker cable to carry more current at a lower voltage than in Europe (for example) - all to supply the same power. <S> But we generally do not rate these items by power - so the conversion to V/A is printed to make your life easier.
I would imagine that the current derating at higher voltages would be due to arcing when the contacts open. At the extremes of very low current and low voltage, arcing isn't as much of an issue, so the rating will be slightly higher here.
What will happen if I feed this rangefinder 3.3v? I have this rangefinder http://www.hobbyengineering.com/H2951.html and my MCU is running on 3.3v (MSP430G2231), will this thing work poorly if I feed it 3.3v instead of 5v? I really don't want to have TWO voltage regulators on this board. If not what else can I do to get it the voltage it needs? The power source is a 9.6v battery pack with a LD33V - 3.3V regulator. Spec sheet: http://www.parallax.com/dl/docs/prod/acc/PingDocs.pdf <Q> You really aren't putting the two in parallel. <S> Both inputs will be connected to the voltage source and the differnt voltage outputs will go to the different sections of the circuit. <S> (You still need your input and output caps). <S> I do this quite frequently with 12V and 5V regulators without any problems. <S> I didn't see a minimum trigger voltage spec for the TTL trigger pulse going to the range finder <S> so you'll need to ensure that it will recognise the signals from your 3V MCU as high. <S> At the worst, you would need a logic level converter like this one from Sparkfun. <A> Just add a 5V regulator to your board. <S> MSP430 inputs aren't 5V-compatible, IIRC; a 1k series resistor might be all that you need to avoid damage. <A> Another option is to put the regulators in series. <S> A rangefinder and MSP430 are both going to be very low-power, but when you're regulating from 9.6V, 12V, or more, it's usually cheaper to put one heavy-duty regulator at your highest voltage, and then run your lower voltage regulators off of that. <S> Usually, you can get away with heatsinking just the pre-regulator in this situation, instead of heatsinking two independent regulators. <S> You'll just have to make sure that you have sufficient capacitance that you don't get any oscillation from their interaction.
You shouldn't have any problems with two regulators. It's not likely to work very well unless you feed it with 5V.
Best package for heat sinking? I'm buying a LM317 and it comes in 3 different packages. Which is the best for attaching a heat sink? The options are: TO-3 TO-220 TO-92 <Q> LM317 in TO-92 <S> only does 100mA, wheras the TO-3 and TO-220 are both 1.5A - so it depends on how much current you need! <S> "Best for attaching a heat sink" - hard to say. <S> It's easy to attach a TO-220 to a heatsink, just a hole and thermal compound (or one of the clip on ones). <S> You can also just attach them to the PCB for a bit of extra cooling. <S> T0-3 can have a lower thermal resistance to the heatsink, but generally are more awkward to mount. <S> TO-92 isn't really possible to attach to a heatsink. <A> Linear publishes this information <S> \$\theta_{JA}\$: <S> TO-3: <S> 35° <S> C/W <S> TO-92: <S> 160°C/W <S> TO-220: <S> 50 <S> °C/W <S> So the TO-3 wins in \$\theta_{JA}\$, which implies that it would be able to transfer the most heat to a heatsink as well. <S> Never seen a TO-92 attached to a heatsink, i would thing it would require a lot of support to try to do so. <S> TO-3 would take up more space in most applications. <S> Several other companies publish similar charts but a quick google-fu didn't turn one up for national, send em an e-mail, I'm sure they have the data somewhere. <A> TO-220 would be the easiest/best for attaching a heatsink in your application, I'd suspect
In terms of physical attachment, the TO-220 and TO-3 are about the same, just a different type of heatsink is needed.
Why is my power supply putting out 3.85v instead of 5v? I made a power supply using two 47uf electrolytic (aluminum, I believe) caps and a L7805CV 5v power regulator. I also added a 100ohm resistor and an led to vout. I'm using a battery pack of 4 NiMH AA batteries. The pack reads 5.43 on the multimeter with no load. When I hook up a motor to vout and ground, I get 3.85v instead of the expected 5v. I'm wired up like so: battery positive -> vin battery negative -> ground vout -> 100ohm resistor -> led -> ground vin -> 47uf cap -> gnd vout -> 47uf cap -> gnd Here's a pic: http://sphotos.ak.fbcdn.net/hphotos-ak-snc4/hs1169.snc4/154180_170665839624424_100000430264071_471279_1472098_n.jpg"> Any ideas? <Q> The L7805C has a dropout voltage of 2v typical. <S> So with 5.43 volts input you can expect an output of 3.43 volts typical. <S> (Although dropout is not really spec'd when the output is below regulation voltage.) <A> Did you measure the voltage of your battery pack under load? <S> This means they measure almost full charge for most of their life if there is no load. <S> If you then place a load their charge can change significantly. <S> The lithium battery I use at work measures 2.7V under no load but under a 1mA load drops below 1.6V. <S> These batteries are effectively dead, but still show quite a bit of voltage if you do not need current. <S> Chances are your battery pack is between 4.3 and 4.9V under load. <S> this depends on your regulator. <A> This may seem obvious, but did you wire it correctly. <S> linear regulators cause a rather large drop if you mix up ground and power. <S> There are a number of other ways dependent on your package that can cause odd problems. <S> It just takes mixing up power and ground to cause funny things to happen. <S> They are required for transients, not for a constant DC(although still suggested).
Battery packs can have a small dip in voltage due to charge level, but often the way a battery fails is best simulated as an ideal voltage source with an increasing resistance in series. Secondly, try removing the caps to see if it helps. You may have a bad one.
What is the significance of -3dB? My oscilloscope has 100 MHz -3dB bandwidth. -3dB is 0.707 units (sqrt(2) / 2). What does this mean, why 70.7% attenuation? Is there any particular reason for this attenuation level? <Q> Voltage vs Power when using dB <S> The -3dB point is also known as the "half power" point. <S> In voltage it may not make not make tons of sense as to why we use ( \$\sqrt{2}/2\$ ), but lets look at an example of what it means in the sense of power. <S> First off, <S> \$P= <S> V^{2}/R\$ , but lets assume R is a constant 1 \$\Omega\$ . <S> Because of the constant 1ohm, we can remove it from the equation all together. <S> Lets say you have a signal at 6 V, its power would then be \$(6 \text <S> { V})^2 = 36 \text{ W}\$ . <S> Now I take the -3dB point, \$6\text <S> { V} \cdot <S> \left <S> ( \frac{\sqrt{2}}{2} \right) <S> = 4.2426\text{ V}\$ . <S> Now lets get the power at the -3dB point, \$4.2426 \text{ V}^2=18 \text{ W}\$ . <S> So originally we had 36 W <S> , now we have 18 W (which of course is half of 36 W). <S> Application of -3dB in Filters <S> The -3dB point is very commonly used with filters of all types (low pass, band pass, high pass...). <S> It is just saying the filter cuts off half of the power at that frequency. <S> The rate at which it drops off depends on the order of the system you are using. <S> Higher order can get closer and closer to a "brick wall" filter. <S> Brick wall filter being one that just before the cutoff frequency you are at 0dB (no change to you signal) and just after you are at -∞ dB (no signal passes through). <S> Why filter the input to an Oscope? <S> Well, many reasons. <S> All devices (analog or digital) have to do something with the signal. <S> You can go as simple as a voltage follower up to something more complex like showing the signal on a screen or turning the signal into audio. <S> All of the devices required to convert your signal into something that is usable <S> have attributes about them that are frequency dependent. <S> One simple example of this is an opamp and its GBWP. <S> So, on an O-scope they will add a low pass filter so that none of the internal devices are having to deal with frequencies above what they can handle. <A> The modulus graphic on the bode diagram of a first order high pass or low pass filter, can be approximated by two lines. <S> The point which the two lines meet, when compared to the real line gives us the number of -3db. <S> This point is called the cutoff frequency. <S> So, lots of systems are designed to operate in normal conditions until they met the cutoff frequency when they lose at maximum 3db. <S> If you operate with signal above that frequency the signal can be more attenuated. <S> More info in Wikipedia about continuous low pass filters . <A> The -3dB, come from 20 Log (0.707) or 10 Log(0.5).to determine the bandwidth of signal, whendecrease the voltage from maximum to 0.707Maxor decreasing the power from max to half power. <A> Kellenjb's answer is excellent, I just wanted to add a webpage that gave me a "Ohhh" moment when I was reading about this -3db thing. <S> Maybe it helps to visualize. <S> I read a tutorial on Band Pass filters which includes a great image of a Bode Plot. <S> You can see the key image below. <S> It nicely illustrates how signal attenuation varies depending on the frequencies. <S> We see there is no phase shift at the center frequency, so we have complete signal transmission. <S> However as we go out of the Pass Band, we get to a point where the Band Pass Filter shifts the signal to lag or lead the central frequency by 45 degrees, and we see our point of -3dB. <S> At this point, we can note that sin(45°) = <S> \$1/\sqrt(2)\$ <S> For me the visual below really helps to bring some sense into this seemingly arbitrary choice of \$1/\sqrt(2)\$.
When an oscope says its -3dB point is 100 MHz they are saying they have placed a low pass filter on its input has a cut off frequency (-3dB point) of 100 MHz.
Can I use an amp before my voltage regulator to ensure I get 5v? I have a 4.8v battery pack and I made a simple power supply with a L7805CV voltage regulator, which has a 2v dropout. So I'm only getting like 3.5v out. Is it possible to throw an op-amp or something like that before the voltage regulator to make sure I get at least the 7v I need to achieve 5v on vout? If not, what is best practice? <Q> Leon is correct here. <S> Let me approach your question in more detail. <S> The issue here is simple, for an op-amp to output 7V <S> it needs to have a rail that is at-least 7V, so you will still need another power source to power the op-amp. <S> In most designing for op-amp they also do no pull much power from the first source(actually dissipating this power to ground) <S> so this is not the method you want. <S> What you need is something that takes power from your first source and delivers it at an increased voltage. <S> You could step up your voltage and then use your 2V drop Linear regulator to step it back down, which they have very good noise characteristics, so if you need low noise, you just have to cope. <S> Now if you get a buck/boost style switching regulator you can step it to 5V from the 5.4V input voltage, all the way down to 2V input with still getting 5V out. <S> These are nasty to layout <S> so you want to purchase a solution that has already been done. <A> On the other hand, 4.8V (when the battery is fully charged) is very close to 5V. <S> Your electronics may work fine without any power supply circuitry. <A> One of the National Semiconductor Simple Switchers would be ideal, you could use a 3V input and you won't need the 7805. <A> No, you can't do that with an op amp. <S> Op-amps require power supplies. <S> Many opamps have dropouts just like your 7805, so the output cannot quite reach the power rails. <S> Others, called rail-to-rail opamps, can operate over the entire supply voltage. <S> They're just drawn as triangles in some textbooks because it gets tedious to draw the power supplies every time (same with logic symbols). <S> Even if you could power an op-amp to beyond the rails, it's not advisable as a replacement for a 7805. <S> Most opamps are low current (<20mA), and suitable only as precision voltage references. <S> Your options are, from easiest and cheapest to most difficult and expensive. <S> : <S> Tolerate the 4.8V and associated droop as the battery discharges <S> (4.8V is a nominal value, not exact/constant). <S> Many simple circuits can run off of 4.8V just as well as 5V. Use to get a higher voltage battery pack or put more battery packs in series to raise the supply voltage. <S> Use a low dropout regulator[LDO] to regulate to a slightly lower voltage (3.3V, for example). <S> 78XX isn't the only series of regulators! <S> Many LDOs are available with dropout voltages of less than 0.2V. <S> Use a boost regulator. <S> The final option uses switching of current through an inductor to generate voltages above the input. <S> You will probably need a boost/buck regulator, since your input is so close to your output. <A> Opamps can never output more voltage then what is given to them on their rails. <S> You might want to look into a charge pump . <S> In many ways they aren't as good as boost chips, but I think they are easier to use.
A switching voltage regulator can produce 5V from a lower voltage and you will not need the L7805C at all. Also, even if they could, opamps generally can't output much current, so they aren't great solutions for anything requiring power. Use a switching boost regulator. A switching boost regulator will do what you need it to do, but sometimes this can be a little difficult for DIYers to use depending on what you buy.
Is it possible to obtain very small Peltier modules with fast response times? I have a thin 2x2 mm surface that I'm trying to cool by 5-10 degrees Celsius in 1 second or less. Some very rough back-of-the-envelope calculations reveal that I need to remove ~50 mJ of energy to do this. I've been thinking of using a Peltier module, but have no real experience with TECs, and therefore don't know exactly what to look for in terms of specs. The speed of the temperature change is my primary consideration. My questions: Are there any manufacturers that sell very small Peltier modules that would roughly match my specifications, in prototyping quantities? Are there any further considerations that I've missed? <Q> I found some information by looking around online. <S> Here I found some mini-TEC (ThermoElectric Coolers). <S> They seem to be able to do Watts, which I think converts to joules per second, with an efficiency of 5% they should be able to do what you need. <S> You may need to buy a few and test them, or tomorrow I will look on their site more and get more info. <S> I know that this is done, so I am sure you can find a way. <S> They are not cheap though. <S> They are also quite small. <S> I hope this helps. <A> As well as the other stuff people have said, you may also need to be careful about the lifetime of the modules under such aggressive cycling. <S> Differential thermal expansion rates mean cycling is a cause of 'wear' to Peltier modules, and it's reasonable to think that the faster the ramp-rates are, the worse this wear will be. <S> You can certainly get small coolers, <S> though - somewhere like here, for example: http://www.kryothermusa.com/indexf526.html?tid=48 <A> Small coolers of this order of size are used inside laser diode modules for fibre-optic comms- <S> not sure how easy or otherwise <S> it would to obtain seperately. <S> Look at datasheets for peltiers to get an idea of heat pumping capacity versus size and power. <A> Could you use a hybrid mechanical/electrical solution? <S> You pre-cool a relatively large block of aluminum to a very low temperature. <S> When you want to cool your mystery object, you quickly drop it on top (or maybe you drop the mystery object on the block instead). <S> I suspect that the limiting factor will be the thermal conductivity of your surface. <S> To the extent that you need the surface plus a small depth, you just need to be sure that the block is much colder and more conductive than your mystery object. <A> Just obtained some today. <S> The big problem is that they are a lot more fragile than most. <S> The ones used in Casio projectors are believed to be very efficient, possibly 1.3* better than units found in typical camping refrigerators. <S> You may be able to use one of these as part of a stack.
If you really need to cool just the surface, just clamping on a cold block will do it instantly.
Create a circuit that can flash IR LEDs at 38.5kHz and be turned on or off by microprocessor Several other questions are posted about methods for flashing an LED, but one additional requirement I have is the ability to turn the circuit on or off with a micro controller (Netduino, 3.3v). This schematic is very close. What changes would be necessary to achieve 38.5kHz? Also, how could I make an additional adjustment to start or stop the circuit via a pin on the Netduino? <Q> You can tweak the frequency with the 5k potmeter. <S> I think you can get a pretty good range with that. <S> If it's not enough, you could probably change the other resistor to something or a little larger value so the frequency drops. <S> To make it possible to switch the LEDs on and off <S> I would probably a transistor (or a MOSFET) <S> after the two leds. <S> You could then connect the base or gate to your netduino with a 1k resistor or so. <S> It doesn't start/stop the circuit, but it does start/stop the LEDs which I think is the result you want to go after. <A> Here ( http://www.netduino.com/projects/ ) we have two tutorials on how to blink the led and also how to turn it on and off using a button. <S> You will just need to attach the infrared led to an I/O port and map it in the software. <A> Since you have a microcontroller around for switching the signal on and off it makes sense to let it do the dirty work as well. <S> I'm not acquainted with Netduino, but I see that it's an ARM7 running at 48MHz, which makes it more than powerful enough for this. <S> Set a timer to a 13\$\mu\$s period, and let it toggle an I/ <S> O pin on each timeout. <S> The signal's period is then 26\$\mu\$s, giving a frequency of 38.5kHz with only 0.1% error. <S> Duty cycle will be 50%.
If you're using Netduino, maybe you can drop the 555 circuit and use software temporization.
What prevents semiconductors working below -40°C or so? Most devices seem to be characterised over -40°C to ≥85°C. What limits them to cold temperatures? Can an IC be damaged by keeping it too cold? Does this apply to other devices, e.g. diodes, transistors? <Q> Problems with operation would be due to increased resistance (semiconductors' temperature coefficient of resistance is negative). <S> When the temperature and doping concentration is low enough, semiconductors will essentially become insulators and not conduct at all, causing unspecified operation. <S> Some ICs will operate just fine at cryogenic temperatures but they must start up warm to allow bandgap voltage references to boot. <S> In theory if some transistor "fails" due to carrier freezeout, the IC could damage itself elsewhere (not very likely, as most failure modes are thermal, and everything on the die is very tightly coupled.) <S> See the tutorial pages here for more. <S> Edit: <S> As you note, most devices are characterized between usually -40 <S> °C to +85 °C. <S> Nothing says they will not work down to cryogenic temperatures. <A> You can characterize parts yourself below -40, and mechanical failures can be largely avoided if the temperature cycle is slow. <S> Some package options work, some don't. <S> heheh. <S> you have to do that experiment yourself. <S> You can characterize parts below 0C yourself ( easily using a domestic freezer.) <S> Astronomers just love dunking stuff in liquid nitrogen to get rid of thermal noise in their camera chips and A/D converters. <S> For extreme conditions, fit heaters to significant parts (large caps, problem IC's.) <S> Then your power sequencing systems turns the heaters on till the parts are in a temperature range you've characterized. <A> Other than the physical aspects of cold silicon, -40/85C tends to fit the most stringent conditions that most folks would need (commercial/industrial). <S> Practically, characterizing a device is a very time consuming process because it requires test fixtures and other equipment capable of the temperature range. <S> It's not about buying a better freezer since many devices are characterized using the same test equipment used for production testing. <S> The fun part is collecting and parsing the characterization data just to realize that the test fixture froze over and started collecting garbage data.
Damage to an IC package at low temperatures while unpowered would be due to mechanical effects; differences in thermal expansion coefficients between the epoxy, lead-frame, and die.
Is Hand Soldering a DFN Package Possible? Is it possible to hand solder a DFN package? It's leadless, so it could be tricky. I can't find any videos on YouTube about it, so I'm sort of thinking it as difficult, if not impossible. <Q> Heres a vid I made on reflowing a QFN without hot air <S> http://www.youtube.com/watch?v=d-f-SBC0GrU <A> Hot air is really the best hand approach especially if there is a pad under the package. <S> You should be able to find lots of tutorials by searching for QFN soldering as that package is the same general structure as a DFN but much more common. <A> PCB Manufacturing <S> If you are manufacturing the pcb in house it may be a little difficult to do. <S> Preferably you really need to have plated holes and soldermask. <S> The plated holes are a must as the center pad is usually for thermal purposes and must have a good thermal connection to your ground plane. <S> This means you will have to have several of them across this center pad. <S> You can get away with no soldermask, but it makes life much easier. <S> The Footprint <S> There are 2 things you can do to make your soldering life easier while making the footprint. <S> The first is to extend your pads out long enough that you can stick a soldering iron to it. <S> The second is to round the corners of the pads on the inside of the chip. <S> Typically I see students have issues with solder liking to bridge from the center pad to the others. <S> They have found that rounding the back corners has extremely helped prevent this. <S> Time to Solder <S> Apply flux. <S> Place your IC. <S> Tack 1 pin on each corner down by pushing solder into the pad along your extended pad. <S> Flip your board over and apply solder to all of your vias. <S> Make sure you get it nice and hot first, it will take it a bit longer for the heat to transfer to the IC. <S> You want the IC to be hot when solder gets to it. <S> This is a bit hard to tell <S> so you will just have to do some guess work. <S> You have put enough solder down when your vias becomes completely filled with solder. <S> Flip it back over and continue soldering all other pads with the method of pushing the solder into the pad. <S> Check the board and your done. <A> You can hand assemble or disassemble QFN/DFN with a toaster oven (or hot plate). <S> It's worth learning because the process is about the same as a real SMT line. <S> The toaster oven is $30. <S> Solder paste is $3 from dealextreme. <S> Unlike hand soldering, there is no technique to learn -- <S> just cook it in the oven until the solder melts. <S> Then turn it off and let it cool down.
Its possible, its much easier if the leads are exposed on the sides as well as the bottom. There are some via techniques that you can use at home that will work, but I do not have any experience with them.
Can I replace this circuit with an IC? I moved my Arduino-logic-level-5V-to-12V-LED strip circuit off project board and onto Veroboard and I'm very proud to say everything worked first time: (I'm not at all proud of the soldering job, so you don't get to see that.) So this is the point where you all tell me I can replace the whole shebang with a $0.65 IC. The LED strips pull a few hundred mA per channel and I want to drive them off the Arduino's PWM pins. I've found the ULN2803A , but that's 8 Darlington Pair array in a DIP18 package, I want a 3 or 4 Darlington Pair array in a DIP8 or thereabouts. This question might actually contain the answer I'm looking for, but I don't know enough to even work that out. Secondary question: how do you even know things like the ULN2803A exist? I happened upon it randomly and from there I worked out that "transistor array" was the search term I wanted. But aside from simply hanging around here, how does one answer the question, "What IC can I buy that will replace this portion of this circuit?" <Q> "Secondary question: <S> how do you even know things like the ULN2803A exist?" <S> Search Google for something like "transistor array". <S> Add words like "IC" or "semiconductor" to weed out unrelated stuff. <S> http://www.google.com/search?q=transistor+array+semiconductor finds http://www.onsemi.com/PowerSolutions/product.do?id=ULQ2003ADR2 <S> G <S> When you find a manufacturer's listing of a specific part that looks vaguely relevant, use the manufacturer's site navigation to "go up one directory" and see what similar parts they have. <S> That page has a breadcrumbs navigation at the top "Home > Products > Product Catalog > Drivers > <S> Load / Relay Drivers <S> > <S> ULN2003" Click "Load / Relay Drivers" to see similar stuff. <A> The best I found was an ULN2065B, in a DIP-14. <S> I used Farnell's parametric search to do this, but you could also use Digi-key, or a vendor independent site like FindChips or Octopart. <S> I think you're going to struggle to get DIP-8 for four channels: there would not be a pin available for ground, unless it used some kind of serial interface to communicate. <A> There are plenty of options for "ULN2803A" http://ciiva.com/CloudSearch/SearchComponent?searchCondition=ULN2803A <S> And for each "ULN2803A", you can find their alternatives on Ciiva E.g, http://ciiva.com/CloudSearch/Component/997843/stmicroelectronics-uln2803a
You might be able to find a triple driver in this: one pin for ground, three for control signals, three outputs and maybe a pin for Vcc, if the chip requires it.
Using oblong / rounded surface mounted pads for chip resistors, capacitors and inductors I'm learning to layout PCBs and lately I came across practice that made me curious. The chip passives' pads are etched with oblong / rounded shape, instead of rectangular shape that is used in all example libraries and even the IPC-7351B standard (you can download LP Viewer for free registration and see for yourself). Here are the examples (I marked the interesting pads with yellow): Beagle Board : Arduino Mega : The question is: what are these rounded pads good for? Should I use them instead of rectangular ones to make my board look more "pro"? My first thought was that it might be because it might be better for reflow soldering, but I'm bit puzzled about that reasoning. The one advantage I see with these is more routing space around such rounded pad (no "sharp" edges). <Q> They are recommended by IPC. <S> Here is a reference I found. <A> I prefer the rounded pads when I'm etching a board myself. <S> I find that by using a rounded pad and making it a bit larger than it needs to be <S> I have more room for errors in etching or drilling. <S> It's especially useful for through-hole components. <S> If your hole isn't exactly where it needs to be and your pad is circular then a rounded rectangle leaves more area in case the hole is off. <A> As Leon noted, 90 o corners are undesirable because they heat up faster. <S> Another downside even if you're not doing reflow work is that the corners are the first thing to lift if you abuse the board during rework, just like the corners of a sticker are the easiest and first things to peel up. <S> However, I route at 45 degree angles, so an octagon is a better shape than a round pad. <S> It minimizes the space required of the trace around the pad, while simultaneously maximizing the area of said pad for soldering strength, board-to-copper adhesion, and heat dissipation. <S> Here's a diagram in hopes that it will help you see why. <S> The diagram is for a through-hole component, but the same logic applies to SMDs. <S> The 135 o angles are better than 90 o ; but I'm not convinced that going to fully rounded corners is significantly better than 135 o . <S> Also, (insignificantly)I like the uniform look that octagonal pads and 45 degree routing produces; I think round pads look out of place.
Rounded pads are better for lead-free surface mount assembly using reflow, because lead-free solder doesn't flow as well as leaded solder, and the higher temperature causes problems with the flux at the corners.
How to cool ICs? I've read this question and in its comments it is said: LDO and IC heatsinks will generally have a very different answer then computer motherboard heat sink. This question really doesn't belong here What I'm asking is how to use coolers with IC packages. For example let's say I have a device in TO220 package which according to my calculations needs cooling. How would I cool it? Most obvious answer is of course using a cooler, but that part isn't very clear to me. I've seen that sometimes heatsink is directly connected to the package by a screw but sometimes insulator is used to prevent direct contact between screw and package. Some other times, heat conductive insulator is used together with insulator for screw to prevent direct contact between package and heatsink. Sometimes silicon paste is used and sometimes it isn't. How would I determine when it is needed and when it isn't needed? My experience with computers tells me to always use it. I've also seen silicon pastes marketed as for use in electronics. How are they different that ones used in computers? Would thermal pastes for computers work well with ICs? <Q> Cooling is pretty tricky to get right. <S> In most cases, a heatsink is all that is necessary, however, for higher loads, you will need a fan. <S> Look at a computer power supply. <S> They all use fans, but many will run without them. <S> The heatsinks are usually quite big because the supplies are not very efficient (it turns out it's cheaper to make an inefficient power supply with a big fan than an efficient power supply with a smaller fan.) <S> The fan helps circulate air inside the case, and prevent the other components in the computer from overheating. <S> The first question you need to ask is whether or not the IC you are using can actually dissipate enough power to require a heatsink and/or fan. <S> Many cannot. <S> For example, the LM7805 has a 5°C/W J-CC rating, which means at best (assuming an infinitely large heatsink attached to it), running at the maximum junction temperature of 150°C, at room temperature, the power dissipation is limited to 25W. <S> In most cases you can get away with just a heatsink with this amount of power, but if you're wasting this much power in a linear regulator, you have more problems than cooling! <S> Dave Jones has an interesting video on this. <S> He discusses heatsinks and fans. <A> When you see a heatsink with a screw, that is because the chip it is mounted to has a hole for a screw mount. <S> Sometimes the plate that you have to heatsink is going to be a different voltage <S> then the surrounding board, so you need to use something that is electrically isolating, but thermally conductive. <S> These replace the need for conductive paste. <S> If you have the area of the regulator/IC that generates heat at a voltage like ground, and the other connections for your heat-sink will be ground, you can connect them directly, and you normally want to use a form of thermal paste. <S> I have attached a heatsink without thermal paste and still had a device temperate at almost 90 degrees C. After adding thermal paste it measured at 5 degrees C above room temperature. <S> Often being able to connect your heatsink to ground via solder helps dissipation as it dissipates to the ground plane. <S> In computers you have a very specific task, cooling the Processor. <S> In electronics it can be a very large range of tasks, and often you are willing to pay more to cool something because you design calls for it, or you are willing to pay less because your design does not need some very nice thermal paste. <S> This keeps things simpler for a tinkerer. <S> For any chip you get that you think needs heat-sinking, read what they suggest to do (on the datasheet), and follow it. <S> Last but not least, thermal paste for computer processors will work for ICs. <A> Just like cooling mosfets, you bolt them to a heatsink with some form of thermal paste that does not conduct electricity. <S> The bigger the heatsink, the better. <S> All thermal paste does is it fills in all the little holes and dents in the surface of the heatsink, and the component, thermal paste is thermal paste regardless of what application it is used for. <S> Yes thermal paste used in computers would be good to use. <S> (If someone disagrees with me, say why you do, not just that you do.)
In general, you are going to just want to use thermal paste, you do not have to worry about insulating your heat-sink if you leave it floating in the air, or ensure where it mounts to the board there is not a voltage connection.
How to avoid input noise? I'm playing with UDN2981 source driver IC . But its inputs are so sensitive that the noise collected by connector wire switches them on. A simple touch is enough to set it on, but actually I don't want to make a touch sensor :) I tried using pulldown resistors, but only under 1K worked successfully in all conditions, which is too small for pulldown, I think. Are there other tricks to avoid false switching? EDIT: added schematic It should display 3 <Q> From a quick look at the two datasheets: You should expect the 2981 to have very sensitive inputs - these are voltage driven logic inputs, which take a few hundred uA max to turn them on. <S> They're expecting to be driven by a source which is confident about what voltage it's driving. <S> If you disconnect them, you can expect them to wander around. <S> I'm not really clear what the 2981 is bringing to the party here, but I guess you want more segment drive. <S> If that's the case, you should convert the SEGx current outputs to voltage outputs, by arranging a pull-down resistor on each one. <A> Change R1 to be 40-50kohm. <S> 100kohm is way off the charts (literally its not even on the chart in the datasheet) for the device <S> so i would venture a guess that the current limit is so low that they 7221 can't drive the inputs of the 2981 adequately causing the output voltage to drop to the point that its causing the malfunction. <S> You have a second problem as well. <S> The DIG0 pin has to sink all the current from the common cathode. <S> Are you sure your within the limits of the 7221's current sinking limits? <S> Even more a problem, when the DIG0 isn't driving it doesn't tri-state but pulls to V+ which +5V vs the LED drivers <S> +12V. <S> In this one digit case that may be ok <S> but it means that digit will never turn all the way off <S> , you couldn't hook up a second digit like this. <S> It also could mean that if DIG0 goes high and a segment is driven low, it will see a reverse 5V across the LED, i have no idea <S> the reverse voltage specs on such a driver, but worth a safety check. <S> One interesting idea. <S> When the LED drive is high (+12V) if the DIG0 line is released (+5V) <S> your basically applying 12-LEDdrop to the +5V line on the 7221, that should result is fairly high current, as much as the LED will pass. <S> It looks like the 7221 survives this, but if its current limit kicks in for all IO, this current may be triggering the rest of the chip into current limiting mode causing the SEG-IO pins to drop in voltage. <S> Just a random guess tho, either way use a P-channel FET to control the common cathode to ground and see if that solves the problem. <A> Instead of pull down resistors you can try to use a capacitor to ground and a series resistor. <S> Just remember to keep the time constant (R×C) lower than the speed of changing of the input. <S> A factor of two to ten times lower could be enough. <S> The noise seems to be a kind of EMI noise, as you said that you're touching the wire and the lamp. <S> From wikipedia: [http://en.wikipedia.org/wiki/Capacitor-input_filter]
You will need to chose the current programming for the SEGx drives, and the resistor value, to give you sensible input voltages for the 2981. Independente this case and pi filter could be a better alternative as it can reduce the noise from both sides of the circuit. The segment outputs of the 7219 are current source outputs, which are expecting to supply current (mA) to the anode of an LED - instead you've connected them to a high-impedance input which basically draws no current at all.
Suggested schematic check DRC settings for Tools>Verify in DxDesigner I am using DxDesigner for the first time (9.2). When running a Design Rules Check (DRC) there are many rules that can be applied. Many of them make sense to check, e.g. "Property name exceeds maximum length". Others are giving me trouble, e.g. Un-driven Net is an error if I enable it when a net is driven by a transformer with pin type analog. Which ones do you use? Disable? Check, but often ignore the notes or warnings? Updated 11/23/2010: Under Connectivity here are some I had questions on. drc-101 Output and bidirectional pins connected togetherdrc-102 Output and tristate pins connected togetherdrc-103 Un-loaded netdrc-105 Un-driven Netdrc-106 Multiple Output Driversdrc-116 Output directly connected to Power or Ground Note that I am not doing circuit simulation. <Q> I can answer for Altium, and maybe you can translate to DxDesigner. <S> I also pay attention to minimum trace width, minimum annular ring, minimum hole size, silkscreen over component pads, minimum soldermask sliver, and net antennae. <S> I totally ignore everything in the groups "Testpoint," "SMT," "High Speed," "Placement," and "Signal Integrity. <S> " I bet I'll need to worry about those eventually, but they haven't hurt me yet (so far as I am aware). <A> un driven nets, net mismatch, no output, two inputs and <S> so on are DRC errors from the schematic checks. <S> They can be useful and bring your awarness to certain areas. <S> Trying to fix each one individually can take some effort, but you are on the right track in identifying the issue. <S> In my 10 years of various cad packages (mentor, altium, cadence/orcad) I have never used the full schematic DRC. <S> Either I down grade those errors to warnings, or ignore them, depending on the job (for example aviation you cannot ignore them!) <S> The most useful schematic DRC's are net name checks (review this often V5+ is not V5 and so on even if you intended it to be so), unconnected nets (force you to place a no connect object), and nets with only one connection. <S> Reviewing these three I have found to be most useful, as many projects I have been caught out on subtle typos on net names not being connected, are parts that look schematically connected but are not (Altium I am looking at you). <S> So do review the net name summary from the checker and ensure all is well, and check for unconnected nets! <S> Not sure how DxDesigner handles netnames, but I have been burnt with Orcad in the past, so always stick to short net names with no spaces or punctuation. <A> Here's my working list. <S> Migration are all on: drc-001 Property can't be mapped to Common Properties <S> ^(~?[a-zA-Z_0-9+ <S> -@.# ] <S> +) <S> $ <S> Errordrc-002 <S> Invalid net name format ^(~?[a-zA-Z_0-9 <S> +-.]+)$ Errordrc-003 Invalid property value format Errordrc-004 Invalid symbol name format <S> ^(~?[a-zA-Z_0-9 <S> +-]+)$ <S> Errordrc-005 <S> Property name exceeds maximum length <S> 40 <S> Errordrc-006 Property value exceeds maximum length 80 <S> Errordrc-007 <S> Net name exceeds maximum length 120 Errordrc-008 Symbol name exceeds maximum length <S> 120 Error Electrical doesn't check voltage and power drc-201 Open collector pin not pulled up Errordrc-202 Open emitter pin not pulled down Errordrc-206 <S> Tristate buffer not pulled up or down Error Integrity drc-401 <S> Missing symbol property Errordrc-402 <S> Missing symbol pin property <S> Error <S> (change the Properties to the column you are using, e.g. ITEM. <S> If it is multiple words, put double quotes around it).Since <S> I'm not using Links <S> these may not be useful <S> drc-820 <S> Isolated link Errordrc-821 Un-named link <S> Errordrc-822 Multiple destinations Notedrc-823 Link and net naming consistency Warning
I pay heavy attention to the group of rules labeled "Electrical": clearance, short-circuit, un-routed net, and un-connected pin.
What is the skin effect? What is meant by the skin effect? <Q> It causes the outer surface - the "skin" of the wire - to be used more than the inner surface for carrying current - engineers say the surface has a higher "current density", or amperes per meter squared. <S> This causes an increase in the effective resistance of the wire. <S> Because the outer surface must carry more current the wire is more expensive, because you can't get rid of the inner surface easily. <S> In electrical power distribution, the skin effect is very important, because it decides the type and thickness of the wire you use. <S> Skin depth reduces at higher frequencies. <S> Carrying a 50 Hz signal takes less wire than a 1 kHz signal, for example. <S> Skin depth also varies with the type of wire. <S> See here for more info . <A> The skin effect means that the current of AC signals will be concentrated near the surface, the "skin", of a conductor. <S> The higher the frequency the thinner this layer. <S> For very high frequencies it's no use to have a massive conductor; the core wouldn't carry current. <S> Hence for HF braided copper wires are used, which have a larger combined surface. <A> At very high AC frequencies, basically RF, all the current goes through the "skin". <S> In radar systems, we use hollow wave guides instead of solid conductors. <A> Here you find a physical explanation which is using maxwells law. <S> link to physics.stackoverflow
The skin effect is a usually undesirable effect which occurs when using AC signals.
Things that to be considered while choosing electronic components to get high Durability Creating the Electronic circuits is Ok not so much complicated for experts. But needs to think about the persistence of the electronic circuits. Its very difficult to make the circuits to work for life time. But its important to have the long run electronic circuits. Of course it depends on individual components that we assemble on the PCB. And are there any factors that need to be keep in mind while choosing and assembling the components to have high durability. <Q> Run all components well inside their ratings, and avoid high temperatures. <A> Don't use anything mechanical if you can avoid it - use solid state (like SSR's instead of mechanical relays, capacitive sensing/force sensing instead of switches, etc). <S> Use protection for every possible contingency - if it gets struck by lightning it needs to keep working. <S> Don't require any active cooling - fans break or get dirty too easily. <S> If it's in any kind of high-vibration environment, don't use connectors. <S> Solder everything to the board. <S> If necessary, use redundant modules. <S> I believe one of the Voyager probes has five independent computers any three of which are on at a time. <S> They all work on the same problem and the solution that at least two of them agree on is used. <S> The computer that created the bad solution is turned off and another is turned on in its place. <S> Have the ability to update any software on the device in the field when you find errors. <A> Choose electrolytic capacitors 1.5x - 2.5x required voltage rating. <S> Run components at least 20 degrees C cooler than rated temperature. <S> E.g. for 105C cap, run it at a maximum of 85C. <S> A general rule is for each 10C drop in operating temparature lifespan is doubled. <S> Where possible avoid electrolytics where something like ceramics would work - although with careful consideration they can be used, they are generally pretty poor components. <S> Input protection on all inputs - including ESD and overvoltage protection.
Ensure your project can survive voltage spikes on the power supply, if necessary.
Why does turning on my desk lamp crash my board? Whenever I turn on my desk lamp, my board crashes. Sometimes I get garbage out of the serial port, sometimes it resets. I tried adding some extra bypass capacitors on my breadboard, but that made no difference. (My desk lamp uses a 20W, 12V halogen bulb. It has a transformer in the base) Can anyone offer suggestions as to why this might happen and how I can stop it? Here are two of the boards - they were USB dongles, but are both now powered from a single wall-wart via a 3.3V voltage regulator. Watching on a scope, when I flick the light switch I see a spike on both 3V3 and wall wart lines. Edit: Here are traces of the input and output of the 3V3 regulator when turning the light on and off respectively. 5V is on the top, 3V3 on the bottom The regulator is a ZSR330 . Edit: Some careful reading of the datasheet threw this up: The RESET_N pin is sensitive to noise and can cause unintended reset of the chip. For a long reset line add an external RC filter with values 1 nF and 2.7 kΩ close to the RESET_N pin. My programming cable connects a long wire via a breadboard to the reset pin. I suspect that this was the problem. <Q> The transient is getting through the regulated supply. <S> Try adding an inductor to the power supply positive output. <S> That may suppress the positive-going transient. <A> Is that mains circuit overloaded? <S> This should only last for a split second, just long enough to heat the filament up to operational temperatures. <S> Halogen bulbs do run very hot so perhaps this affect last longer / draws more current than your average incandescent, i'm not sure. <S> I would say that current spike is causing some issues on your mains lines. <S> Did you scope the input to the 3.3V regulator? <A> I had a similar issue with my powerline ethernet network adapters. <S> When communicating they would induce up to 200mVp-p noise on the 3.3V line of my breadboard. <S> It didn't cause any problems, because my MCU was rated from 3V to 3.6V, but it was interfering with my ability to scope the system. <S> I never really sorted out the problem until I moved the adapter to another plug extension. <S> This might have provided sufficient isolation between the power supply I was using (old computer ATX), or it could have been something else. <A> I see ground loop and may be you have lots of power, signal loops. <S> effectively you have large area of single turn inductances. <S> This loops work like secondary coils of air transformer (magnet antenna) which reacts to AC magnetic fields. <S> The midpoints of loops where you have joints are some center-points of this coils and produce variety of signals with very low source impedance and short circuit currents up to milliamperes, which make voltage of noise signals that high. <A> If I was going to power USB dongles directly from a PSU, it would be a 5V one, not a 3V3 one, because USB VBus power is 5V not 3V3. <S> Not sure if that's the problem, but if they're incredibly marginal on supply voltage, that wouldn't help. <S> You will probably struggle to measure induced spikes sensibly with a scope, because so much will be picked-up on the scope's ground lead, but if you're going to try, then make sure you measure with both the ground-lead and the probe at the load, not somewhere else in the circuit. <A> This doesn't apply to you, but maybe someone searching will find this: Semiconductors are light sensitive. <S> If you have a precision analog circuit, and parts of it are in translucent cases, like glass diodes or metal-can op-amps (the bottom seal is translucent), you can expect significant offset shifts when light shines on the circuit. <S> Modern black epoxy packages are less susceptible. <S> It's easy enough to check if this is causing the problem: If the problem stops when the circuit is covered by a box or something, the problem is the light, not the EMI.
Halogen bulbs draw a large amount of current when they are cold, like 10+ times their normal current draw. You don't say where your bypass caps were added, nor their value, but you should make sure that you have plenty of capacitance right at the point the supply is used, not the far end of 6" of cable from the load. But probably your problems are just the kind of craptastic grounding you get on breadboard - your supply rails probably form a vast weak loop, just waiting to have problematic voltages induced on it. To fix it, try to rewire all inter-board symmetrically with single "grounding tree" and power, signals coming over twisted pair wires.
How far apart should PCB traces be for mains isolation? As a hobby project I'm building a power line monitor to detect when a load is switched on and turns on some additional loads. I have 120 V 220 V running through my board and was curious what the standard board spacing is for high voltages. I'm sure there's some specs by UL or other agencies for this, but I'm cheap. Edit: Correction, the voltage I'm working with is 220 V, powers a cabinet saw. In any case, is there a general formula, possibly even for higher voltages (e.g. flyback for fluorescent lights) <Q> Minimum 2.5mm for standard insulation (across mains), 5mm for reinforced ("double") insulation (mains to low-voltage) <A> Consider looking at footprint of smallest 400-600V capacitor (which is minimum DC for 220V AC, with peak-to-peak 310V, so <S> overrate is extra 33..100%). <S> If its pins are 15..20 mm apart (I have not seen less than this), then with traces it makes about 11.. <S> 17 mm. gap. <A> (Note I mean mains = "low voltage", low voltage = "safety extra low voltage in standards terminology)
Various standards I have read seem to indicate 1.5-2mm for mains-mains, and 6-8mm for mains-low voltage.
Is it okay to use SMT for 250VAC parts? I've found some 400V 0805 resistors . However, as in my previous question, I noted that almost no power supplies used surface mount components . One of the things I'm working on is a capacitive power supply. This is connected to the mains and has no isolation, but operates inside a completely sealed box so there is no hazard to the user there. However, I'm not entirely sure if it's okay to use 0805's when dealing with such high voltages... it just seems like arc-over or something similar would happen. And, say there was a fault - would through hole be better at handling a line transient than SMT? <Q> Creepage is the term you're looking for. <S> You'll want to use that for trace spacing too. <S> If the part is rated for 400V <S> it's good for it. <S> However, you may have <S> more than 400V. 240Vac is actually RMS voltage and has a tolerance. <S> Add 10% to the line voltage (240*.1= 264Vac) to accommodate its tolerance and remember to design your circuit with the possibility of being supplied 10% less of 240V. Convert to peak-peak voltage (264x1.414= 373.3) because flash-overs pay little attention to time. <S> Now, you could fret about aging components, temperature cycling, dust, moisture, bad luck and worse math then decide to add another 10% to the figure (373.3+10%= 410.6Vp-p) "just to be sure." <S> That's cutting it close, but if you throw an MOV across the line (behind the fuse, of course) <S> then maybe that'll be enough to redeem you from omitting that last 10% and keep your house from burning down. <S> Maybe. <S> Concerning SMT vs. TH transients, the components are rated as they're rated. <S> 400V applies whether you're reading a TH or SMT datasheet. <A> In the case of resistors that actually have mains across them, use multiple parts in series -resistors are cheap. <S> As well as increasing creepage for safety, it improves reliability, as resistors with high voltage across them are prone to failure. <S> The main difference between TH and SM is thermal mass, i.e. SM parts tend to have lower surge withstand capability. <A> Bear in mind that even though the part is OK for 400V, you may need a slot in the PCB to ensure that there's sufficient clearance between the pads. <S> In general, axial devices beat SMT for transients simply because they have higher power handling capability. <S> (Power supplies that I've help design have hundreds, if not thousands of SM parts - not in the power train, but in control and monitoring.) <A> Direct connection of rail to rail 250VAC gives you amplitude of 354V (twice that for peak to peak). <S> So at 100Kohms you are looking at a power dissipation of almost 1 watt peak and the resistor is only rated for 0.125W. Now since it is actually AC your rms voltage will be about 250V, but even using that number you are still looking at an average power dissipation of .625W. Other Cases <S> I can see cases where you would be using a resistor like this in a power supply circuit, but it wouldn't be having 250VAC across the pads, instead it would be some other smaller voltage.
Power supplies often use tons of surface mount components - cheap, made in Asia commodity power supplies often don't use any SM because they're cheap and commodity products.
How to implement delay functions in Keil ARM MDK How to implement delay function in Keil ARM MDK that waits given time in microseconds that can be recompiled to any reasonable clock speed defined in Keil project settings ? And all of this without using timers. <Q> The best approach IMHO is to have one hardware timer which is never written to but simply free-runs. <S> This will allow one to easily emulate an arbitrary of poll-able timers for durations up to half the length of the hardware timer. <S> To "start" a timer, simply compute the value of the hardware timer when it should expire. <S> To see if a timer has expired yet, subtract the expected expiration time from the current time (regarding both quantities as unsigned), and see if the (unsigned) result exceeds half the maximum timer value. <S> If so, the timer has not expired. <S> Alternatively, if one wants a timer for measuring time since a certain event occurred, one can simply latch the timer value when the event occurred, and later compute the difference between the latched value and the present time. <A> Specifically you want to know the exact number of clock cycles it takes to get 1 loop to be completed of the style: for(long <S> i=0;i<NUMBER_OF_LOOPS_REQUIRED;i++){ __NOP();} <S> By making the #define for number of loops required reconfigure itself to be automatic based on the requested delay and the clock speed you are currently running at. <S> This can all be wrapped up in a macro. <A> #if _Main_Crystal <S> == <S> 25000000 <S> #define <S> LOOP_DELAY 400#elif <S> _ <S> Main_Crystal == <S> 16000000 <S> #define LOOP_DELAY 256#else <S> #error microsecond delay must be adjusted!#endifvoid usDelay( void ){ for (int i = 0; i < LOOP_DELAY; i++) { SERVICE_WATCH_DOG(); }} where <S> SERVICE_WATCH_DOG() is a macro to service the watch dog timer. <S> This can also be replaced with a NOP . <S> Use a test function to figure out what your LOOP_DELAY constants need to be for each clock frequency: <S> void TestDelay( void ){ SetIOPin(); // <S> Use a scope to start measuring elapsed time here. <S> usDelay(); ResetIOPin(); // use a scope to end measuring elapsed time here.} <A> A hardware timer reference is preferred because a good optimizer could remove the loop altogether or alter it based on settings. <S> The other problem with timing loops not mentioned here is if an interrupt occurs during your timing loop, it could take much longer. <S> Interrupts should be short anyway but not every system follows that mantra.
You will have to determine the length of a NOP, then using #Defines make it so that based on clock speed it inserts the correct number.
What are some good ideas to practice on the MSP430 I've got 4 launchpads (I'm a hog, I know, I got 'em while I could) and I'm getting used to the programming, e.g. the timers, ADC, PWM, LPM, etc. I don't have a lot of money and would like to do some projects to solidify my knowledge. What are some little projects I could do on a budget to have fun? The blinky apps only go so far. <Q> Here are some of my projects: blog.hodgepig.org/tag/launchpad/ — <S> [this site no longer exists -ed] <S> You'll also find loads of great ideas over at http://www.43oh.com/ <A> Try using the ultra-low power modes of the MSP430's. <S> This is one area where TI apparently rules king, though I haven't dealt with low power MCU's <S> so don't really know. <S> TI has a video showing them being powered from fruit . <A> You could look at interesting projects on other platforms and try to find neat ways to do them on the 430. <S> Things like PoV, IR remotes/receivers, robots, meters (internal ADC), dataloggers, alarm systems, PIR sensors, rotary encoders, keypads, game controllers, games (that might be pushing it), clocks (put that 32k crystal to good use), fan controller... <S> Perhaps find out if some of them can neatly be done in the interrupt driven bursty fashion to minimize active time. <S> Use parts with I2C, SPI, PS/2, shift regs etc. <S> New poject ideas I'd love to see: Full blown 430 JTAG and software using the launchpad. <S> Other pogrammers. <S> Maybe a 430 Bus Pirate. <S> A programmer for the USB SoC on the launchpad <S> so you could use one LP to reprogram another for some other use. <S> Full writeup on a data logger. <S> SD(HC) card interface. <S> MIDI master/slave skeleton/library. <S> Interfaces to game controllers, keypads, rotary encoders, pots... <S> Join the two above :) <S> Adapters for wiring random commonly available controllers to vintage computers/consoles for which compatible controllers are hard to come by today. <S> Adjustable PID controller (heater, motor revs, whatever). <S> Photograph, write notes and publish everything of course. <S> You're bound to get feedback and more ideas :) <A> Play music. <S> You don't need to spend one cent extra money. <S> http://franktu.com/playing_music.htm <A> Here are some o the projects that i have done,they mainly deals with interfacing 7 segment LED displays,serial and RS485 communication,building robots etc. <S> A DIY tutorial on building a two wheeled robot from scratch using MSP430 launchpad and L293D motor control chip. <S> I have written a detailed account on building the robot base and electronics using commonly available materials. <S> Source codes for controlling the robot are also provided. <S> You can check the link below for details. <S> http://www.xanthium.in/make-your-own-msp430-launchpad-robot <S> controlling the DC motors connected to Launchpad through RS485 connection. <S> The control software written in Pytho and CSharp runs on PC and controls the motors through RS485 Protocol. <S> Link is given below. <S> http://www.xanthium.in/remotely-controlling-dc-motors-using-rs485-protocol <S> Interfacing MSP430 Launchpad with 7 segment displays. <S> http://xanthium.in/interfacing-7-segment-led-with-msp430-launchpad <S> Creating an RS485 network between a PC and MSP430 Launchpad. <S> http://xanthium.in/RS485-communication-using-MAX485-and-MSP430-Launchpad
Alternatively, see what neat parts (chips, displays, rotary encoders, buttons, sensors...) you can find and how to use them on the 430.
What PIC24 C compilers are out there, and what is your opinion or review on them? Specifically, the PIC24 series. I tried out microchips C30 compiler, but it seems to be a bit too complicated for me, and I couldn't find any libraries with it. Then I tried CCS, and it seems far too simple, and I cannot view the code for say, I2C_write, which is quite unnerving for me. What about Hi-tech C? I did not get a chance to check it out yet, is it in your opinion good or bad? Are there any other C compilers for pic24 out there? Does not matter if they are free or not, as long as they have some examples. <Q> Microchip's C30 compiler comes with extensive libraries for all the peripherals, and lots of other stuff can be downloaded. <S> I bought the full version but the free version is adequate for most users. <S> All the Microchip code examples use it. <S> The other compilers don't have a very good reputation, judging from comments on the Microchip forum. <A> MPLAB C30 is a very powerful variant of GCC. <S> I'd recommend you use it because it's what Microchip use for all their code examples and thus gives compatibility. <S> I'm currently using it for my project; but I am not using any libraries apart from standard stuff (e.g. printf.) <A> C30 is OK but has a major downside in that <S> (unless they've fixed this recently) the linker is so dumb it can't be told to eliminate ( or even identify) unused code sections. <S> The reason that this is an issue is Microchip provide lots of nice source libraries for networking, graphics, USB etc, and as these are general-purpose, they will inevitably contain features that any particular user won't use, yet they get included anyway, wasting space. <S> It's hardly rocket science <S> I can't believe anyone has the nerve to charge for a compiler without such a fundamental optimisation - pathetic. <A> HiTech C for the PIC24 generates code that is not at all size optimized. <S> I called the support team about this and the well optimized code generator is not available for PIC24. <S> They had promised to do this work, but then were acquired by Microchip, and work on the HiTech PIC24 "C" compiler stopped. <S> They suggested C30. <S> I had already paid a lot of money for HiTech PIC24 "C" a while back and got stranded with a half finished compiler and no offer to swap for Microchip C30. <S> Also our large code base was written with HiTech intrinsics and library use, and would have been a pain to port. <S> We're out of ROM space on our PIC24 part which is a shame because a better compiler would free up about 20% of the space based on the wasteful assembly the compiler produces. <S> All-in-all <S> I think Microchip did not think all aspects of their tool support through, and left many of us stranded.
Most people use C30 for the PIC24 and dsPIC.
book recommendations on FPGA what book titles would you recommend to get started with FPGAs and VHDL? edit I noticed that a few of the recommended books date back from 1996. I can imagine that the devices referred to will be seriously outdated, but has VHDL also much evolved since? <Q> The Designer's Guide to VHDL, Volume 3, Third Edition by Ashenden is quite good. <S> Others I have found useful are VHDL for Programmable Logic by Skahill and VHDL <S> Made Easy! <S> by Perrilin. <A> To complement these answers -- there is also a lot to be said for also spending some real quality time with the vendor's data sheets and app notes for the FPGA devices, libraries, and tools themselves. <S> Otherwise you may well miss a beneficial feature or dangerous pitfall of the particular device, library, or tools that you are going to be using, that are often not covered in an introductory textbook. <S> Also devices and tools tend to evolve faster than textbooks can keep up. <S> See also my old bit on the Art of High Performance <S> FPGA Design http://www.fpgacpu.org/log/aug02.html#art . <A> Assuming that you are already familiar with programming, then this book is good reference to the VHDL language. <S> Next I would continue with Writing Testbenches: <S> Functional Verification of HDL Models by Janick Bergeron. <S> It does not only cover VHDL, but focuses on a number of topics that are important when writing test benches and code for verification. <S> I think it does a better job of emphasizing the difference between VDHL for simulation and VHDL for synthesis than The Designer's Guide to VHDL . <S> After that I would recommend studying the HDL coding guidelines provided by you FPGA vendor. <S> The provide a lot of useful tips on how to write your VHDL code so that it efficiently maps in to the hardware primitives found in the particular device you are targeting. <S> And finally: Download, read, and understand real-world code. <S> I've found the GRLIB IP Library a useful source of inspiration. <S> GRLIB is an open-source SoC library based on the SPARC processor from SUN. <A> Rapid Prototyping of Digital Systems by Hamblen, Hall and Furman. <S> It makes a very good introduction to FPGAs (based on Altera hardware and software) and contains lots of interesting projects that can be implemented on a low-cost board available from Altera. <S> I designed a small PCB using a Flex 10K10 FPGA that was suitable for most of the examples in the first edition, including a small 8-bit CPU. <S> I bought my copy for about £22, brand new, via Amazon. <S> It's very good value. <A> When learning any sort of HDL (Verilog, VHDL...) <S> it is important to keep one thing in mind. <S> It is not software programming and things work in parallel. <S> That being said, I find that the best way to learn any HDL is to learn how to think in hardware and describe the hardware (that's why it is called a hardware description language). <S> So far, I have rarely seen books that show you how your HDL gets translated into hardware. <S> I've read through one when I was at Synopsys (pages filled with code and schematics) <S> but it was an internal publication. <S> However, even lacking this book, you can still see how your code gets turned into hardware by running it through synthesis on free-software. <S> The reason that I wish to stress this is because there are many ways to solve a problem. <S> You will only be able to write code that solves it efficiently, from a gate count and timing stand point, if you understand how it gets translated into underlying hardware. <S> Good luck! <A> They offer a very comprehensive introduction to RTL design using either Verilog or VHDL. <S> They also provide an introduction to traditional soft cores like Nios from Altera or Picoblaze or Microblaze (2017 edition) from Xilinx. <S> The coding style is clean and the methodology to translate algorithm to FSMD (finite state machines that control data paths) is very useful. <S> I like all the other books cited previously, but Pong Chu books are clearly my favorite. <S> Ashenden books is more advanced concerning VHDL, but the limits of RTL vs simulation is not as clear as Pong Chu's.
The first book I would start with is The Designer's Guide to VHDL by Peter J. Ashenden. I definitely recommend every book written by Prof Pong Chu .
Is it really a bad idea to leave an MCU input pin floating? I've heard that leaving a pin floating on an MCU when configured as an input (vs. the default output) is bad for the pin, and can eventually cause it to fail prematurely. Is this true? N.B. in my instance the pin is floating somewhere between 0.3V and 1.3V due to an incoming video signal. This sometimes falls in the no man's zone of 0.8V - 2.0V when operating from 3.3V. <Q> Problem: Leaving a pin configured as an input floating is dangerous simply because you cannot be sure of the state of the pin. <S> Like you mentioned, because of your circuit, your pin was sometimes LOW or sometimes in no-man's land or could sometimes go to HIGH. <S> Result: <S> Essentially, the floating input WILL definitely cause erratic chip operation or unpredictable behaviour. <S> I have noticed some chips froze by simply moving my hand closer to the board (I wasn't wearing a ESD wrist band) or some would have different startup behaviour each time the board would powerup. <S> Why: This happens simply because if there is external noise on that pin, the pin would oscillate, which would drain power as CMOS logic gates drain power when they switch states. <S> Solution: Most micros nowdays have internal pullups as well, so that could prevent this behaviour from occuring. <S> Another option would be to configure the pin as an output so it does not affect the internals. <A> It's a little worse than just being in an unknown state, or toggling needlessly. <S> Digital circuits nowadays are mostly of CMOS type, with transistors switching both high and low sides; when we have clear 1s and 0s, they are either off or saturated, the two most efficient states for the transistors to be in. <S> In between, however, is a region of linear operation; it's used for analog amplifiers, but it is not as efficient as the extremes - meaning more power is wasted as heat in the transistor. <S> In the worst case, both the high and low side transistors leak thus (because the pin is in fact neither high nor low), and they can then combine to cause a notable current within the chip as they try to drive the internal state both high and low - possibly doing the same to the next gate in a chain reaction. <S> The heat could become a problem even if the power isn't. <S> IntelliChick's solutions still apply. <A> In practice the main effect is increased power consumption. <S> If a pin is actually floating as opposed to connected to some indeterminate voltage source, it is possible for oscillation to occur, which as well as increasing power draw may introduce noise into other parts of the system. <S> Any pin which has the ability to be used for an ADC or comparator input will have the facility to disconnect the digital input buffer to avoid this problem. <S> (DIDR on AVR, ADCON1/ <S> ANSEL on PIC) <A> Generally it is a bad idea to leave input pin as floating as this may cause: a) <S> Functional problems - unknown input state, toggling (for example may trigger interrupt with undefined ISR that would hang processor) b) <S> With this structure when the input is far enough from either rail (for example at half supply) <S> significant cross over current will flow constantly. <S> c) <S> If the cross-over current will flow the phenomena know as hot carrier injection may actually decrease lifetime of the device. <S> The input gate may be designed just for normal switching not continuous conduction so device may fail catastrophically. <S> Note however one would need place device in such condition for many hundreds of hours at elevated temperature for this to happen. <S> Note the a) and <S> b) are real problems that one most likely one will encounter. <S> As for c) it is less likely problem to happen but why take risk? <A> The input will toggle between 0 and 1 based on any EMI. <S> I'm not sure if it will cause the input to fail, but it will cause more power to be used because the transitions from 0 to 1 to 0. <S> Set it to an output and be done with it. <A> Some high-speed CMOS devices may be destroyed if an input is left floating, but the most common problem one will observe is increased current consumption. <S> On PIC series microcontrollers, the extra current is on the order of hundreds of microamps per floating pin. <S> Not enough to cause device damage, but enough to severely impact battery life in an application that would otherwise draw 5uA. <S> Some chips have options to disable a digital input; if an input is disabled, it may freely be left floating.
For pins also connected to ADCs, some microcontrollers offer the function to disable the digital input buffer, to prevent both this problem and leakage distorting the signal. Increased power consumption - most likely the input gate is similar to CMOS inverter.
How do I add a wireless hotspot to my project? I just read on the description of a YouTube vid that Parrot AR Drone creates its own wifi hotspot. How does it do that? Is it possible to do a similar thing for a UAV project I've been thinking about? <Q> It has hardware inside that allows it to act just like a wireless router. <S> If you wanted to add a wifi hot spot to the UAV project you would effectively need to add a wireless router inside your device. <S> If you had a PC connect you could them give it special drives <S> so what it sends over wifi is what your device needs to be controlled. <S> To keep it simple, this will not be an easy task. <S> Simpler methods Roving Networks <S> has some great solutions if you have a connection point. <S> Your microcontoller interfaces through serial and it can act as a bluetooth hotspot. <S> They also have modules that connect to wifi <S> and then you can connect through sockets. <S> This is relatively easy to do with C or java, as they have examples. <S> The microcontroller will still just pipe serial data. <S> Past Experience with Roving Networks <S> In my senior design project we used a roving networks bluetooth module to get a bluetooth signal from a sensor connected to the OBD-1 Connector on a car. <S> We placed the device underneath the dash and with a dongle from 40 feet (no line of sight as it was under the dash) still had a signal without a problem. <S> This allowed easy debugging. <S> When you pick bluetooth the class determines the maximum range, you can get a class one radiator and they can actually use what could be licensed as class three. <S> They just paid the licensing fee to go higher, but chose not to. <S> The roving networks module actually used the maximum power of a class one bluetooth device and coupled that with good receiver sensitivity. <S> The range was very well done. <A> Add ethernet to your device with whatever module you can get and connect them with a patch cable. <S> Then on the software side, you could use Zerconf to let your client know what services it can access, e.g. video and control streams. <S> I believe that many of these routers also support adding an RS232 serial port, and maybe you can communicate to the network via that, but I'm not sure, so you wouldn't have to add an ethernet module. <A> As an alternative to putting an access point onboard, there are some cellphones and PDA's that might have this functionality. <S> They might be smaller and carry their own batteries but might add weight.
I would buy a DD-WRT compatible router and flash DD-WRT on it, so you can get features like attached storage and hotspot management.
Using 38 KHz IR receivers to measure distance Can I somehow use Vishay's TSOP series IR receivers and IR LEDs to measure the distance from an object? Has anyone done that before or has any idea how one could do it(clever programming or circuitry, maybe?)? <Q> Sure, see paragraph 4 about Vishay's fixed-gain receivers : <S> Many other applications require a reflective sensor that detects not only presence but also proximity by measuring the strength or weakness of the reflected signal. <S> Instead of a fixed detection threshold, analog information from the sensor is needed. <S> This is possible with the TSOP4038, TSOP58038, and TSOP58P38 <S> IR proximity sensors. <S> The length of the sensor’s output pulse in response to the emitter signal varies in proportion to the amount of light reflected from the object being detected. <S> For near objects, the output pulse approaches 100 % of the emitted pulse, for far objects the output pulse becomes shorter. <A> I doubt you could do better than just detect the obstacle this way. <S> What you need is a device like Sharp GP2D12 , which measures distance between 10cm and 80cm. <S> About USD 10, IIRC. <A> You will need to have to approach it one of a different ways. <S> It is very important that you recognize different materials will reflect IR differently making it very hard to get accurate results unless you know what materials will exist. <S> The Receivers also have automatic gain control that will remove a continuous signal at the frequency and can remove yours if you send it continuously. <A> You can get some effective LED power control by adjusting the mark/space ratio of the 37khz carrier. <S> However it isn't a good way to get any sort of repeatable distance info - could be useful for object detection and approach/retreat discrimination .Elmos's Halios can do IR ranging by comparing reflected light with a local reference signal, but unless you're designing high volumes there are cheaper and simpler ways. <A> Yes. <S> You can sweep modulation of frequency of the transmitter and use the very sharp roll of of sensitivity around 38kHz of the receiver to estimate distance based on signal. <S> It is not that accurate though and is influenced by ambient light as are other IR distance sensors that rely on output amplitude for distance measurement. <S> You can also get interference from sunlight and Fluorescent lamps among other things. <S> But you can derive a distance scale based on frequency ranges up the receiver sensitivity slope. <S> You know what frequencies let an object be detected so can estimate how far based on prior calibration tests. <S> I did this in 2012 using Parallax Arduino BOEBOT kit.
one method would be to sweep what power you are radiating with the LED (something like a digital potentiometer to control the current) so that different range of objects will be detected.
What options are there for programming MCU's in production? For my Super OSD project I'm going to need to program large batches of MCU's, probably about 10-15 boards an hour. I could just use my trusty PICkit 2 to program them (there are two - maybe three - on each board) but it would be very laborious to load each file (up to 128KB and 256KB in size), hit program, and repeat for each MCU, and probably wouldn't allow me to meet my target speed. Also, the MCU's are surface mount, so I have to have headers on the board to allow this. Ideally, I'd like to remove these headers, but it may not be an option. So what options are there for mass programming of MCU's - are there faster ways to do it? I'm kind of on a budget of less than $100 USD, so things like Microchip's MPLAB PM3 at $895 USD, while nice, wouldn't be an option. I'm dealing with PIC microcontrollers of various types. There's a PIC16F887, PIC24FJ64GA002 and dsPIC33FJ128GP802. However, I am also interested in options for AT32 and STM32 processors, as I may also be using them. Please note, I'm not currently considering ordering chips from the manufacturers pre-programmed because the software may change by the time the chips arrive, and because of the additional cost involved. <Q> What we do for production, is to first load a program into the PIC that tests out the board (using a small test board that independently verifies the 3.3v rail is within spec using a couple of comparators, and then we use the ADC on the PIC to check everything else out. <S> We had enough pins left over to allow this (it required some extra resistors to act as voltage dividers for the voltages over 3v). <S> After the tests pass, the real production code is flashed into the micro. <S> Some additional tests are run, and the PCB is ready for assembly into a case. <S> This is all done via a program on the PC that only requires an operator to connect the board, click one button, and wait for the result PASS/FAIL. <S> All test results (including ADC readings) are logged. <S> The entire process (including the programming of the PICs via an ICD 3) is controlled via the PC program, which runs batch scripts to do the actual programming. <S> Communication to the PIC to control the tests is done via one of the UARTs, whose pins are brought out to the test board (so in addition to the pins required for programming, we also have TX/RX as a minimum). <S> We set up several stations like this at our contract manufacturer. <S> BTW the ICD 3 is much faster than the ICD 2 (USB 2.0 vs 1.1). <A> Get a pickit 3 and put it in programmer to go mode. <S> You tell it you want programmer to go mode <S> and you load your rom, then you no longer need a usb port for more than power(yes, you still need it for power). <S> As you plug into devices you hit the program button and it loads the program and lets you know when it is done, takes less then 20 seconds a board. <S> Costs no more than 50$ <A> The PICkit 2 isn't a production programmer. <S> You really need to get an ICD 3, which is classed as a production programmer, if you want to be sure that the devices are being programmed properly. <A> Microcontroller programming is usually a small part of a larger functional testing process. <S> What is the rest of your test plan like? <S> For any non-trivial product, you will need to design another board to test the board under production. <S> Generally, the test board will have a computer interface and will connect the target to test equipment with RS-232 or GPIB capabilities. <S> Then a computer can run through a script, programming the board, then running whatever tests are appropriate. <S> It is helpful to have this test board running for firmware development as well. <S> Implement enough tests to catch regressions in the firmware. <S> The start of your test board is probably the PICkit 2 circuit. <S> The firmware is open-source, it will take care of the programming part, it has a handy bootloader, and you can extend it to do anything else your functional test will need. <S> I like to write my production test scripts in Python, but I think the industry standard is Labview. <A> One method you could use is to make a clamp or something akin to a test bed ( example video ) with pogo pins , so that you don't need to solder pins for the programming connectors. <S> A PCB edge connector, such as an old style floppy cable, might be a cheaper (but more board area demanding) option. <S> You'll have to come up with a way to program each microcontroller, probably using either multiple programmers or a batch file like David suggested. <S> You could combine it with a large switch (perhaps one of the rotary switches from an old printer sharing switchbox, or a few relays), to reconnect the programmer from one PIC to another without moving the connector. <S> The techniques also apply for other in-system programmable controllers, although the JTAG capable ones may make it yet easier because JTAG TAP is designed to be chained, so there'd be no moving the programmer from chip to chip. <S> Also, for chips like AVRs that can use ordinary logic levels for programming, the switching could become easier. <A> There is a command-line utility called <S> PK2CMD <S> for Windows and Linux <S> that lets you program your PICs with the PicKit <S> (so you don't have to use MPLAB or some other GUI). <S> You could use your favorite scripting language to make a little program that runs the correct PK2CMD command when you press a key. <S> This would make the computer side of your production less laborious (just 1 key press per MCU) <S> but you would still need a way to connect the PicKit to each of your 3 MCUs. <A> Microchip's programming service is very cheap last time I used it, <S> Once you cover the setup cost it's very cheap - pennies per chip for 12F's - not looked at higher end ones. <S> They can also do marking/labelling etc. <S> Even if you intend to change the FW, having a bootloader preprogrammed may make this easier. <S> For a production programmer I like the Asix Presto - tons of options for stuff like serialising, and very fast
Alternatively, you could buy your chips pre-programmed from Microchip or a distributor, if you have the code finalised.
Suitable motor for robot I'm planning on building my first robot using an Arduino. It's going to be a small obstacle avoiding robot powered with a 9V battery. What should the voltage of the DC motor used in the robot be? Also, if you you've done this before please give some tips, or refer me to some link.Thanks. <Q> You probably want to step up to a larger battery pack than a 9V. <S> You'll find that the 9V doesn't really supply the current that you need, and will run out very quickly. <S> You can probably find a small rechargeable pack online or at a local hobby store that will do the trick. <S> They come in many sizes/speeds/torques, and you will probably be able to find one that meets your specifications. <S> You can also interface with them using the Servo library on the Arduino. <S> You can either buy a servo pre-modified, or you can modify it yourself using the instructions found on Acroname , for example. <S> For finding these parts and more, I have compiled a list for our undergraduate projects, you can check it out here: Auburn SPaRC Suppliers . <S> This is a list of common suppliers that we use for many different robotics pieces and parts. <A> Also consider re-purposing the chassis from a toy, if you can find something with dual-wheel-skid or tank steering. <S> There was a whole generation of robots built around the motor/transmission unit from the Big Trak toy (at this point in time an original is probably worth too much to cut up, but there is a modern version and other things along those lines). <S> In some cases it may even be possible to tap into the toy's motor drive electronics in place of its radio receiver or original microcontroller. <A> 6v solarbotics motors are good, they are very powerful and only take a small current, <S> you will also need an ultrasound pinger and some sharp ir distance measurements. <S> +1 for the nicd packs. <A> I believe these are the motors used in a number of robot chassis's from Dagu (RP5, Rover 5, 4WD). <S> Might be a good choice. <S> Agree on the batteries mentioned above. <S> There are battery holders for 6 AA's as well as for 4.
As far as the motor, if the robot is suitably small, I would use a modified hobby servo.
What are the disadvantages of using a 555 timer as a resistance to frequency converter? Since we know that a 555 timer configured as an astable multivibrator depends on the resistance the timing capacitor sees, what stops people from using a 555 as an ohmmeter? How does the accuracy compare to using a traditional ADC to sense resistance via a resistive divider and looking at the voltage drop? <Q> Capacitors usually do not have very good tolerances, and may change greatly due to applied voltage and temperature. <S> This will affect your measured resistance. <A> I think generally the reason that this approach wouldn't be used is first in the answer that @cksa361 gave. <S> Capacitors tend to vary pretty wildly over the course of one production run. <S> One capacitor may be an order of magnitude larger or smaller than one immediately next in the line. <S> The traditional resistor-divider method can be easily produced into one monolithic package. <S> You can find several of these on Digikey or other providers. <S> Another reason that the resistors would provide a better solution is that they would have a much more predictable temperature coefficient than capacitors. <S> This would lend itself to a high-accuracy circuit. <S> Finally, the frequency output of the 555 timer would probably be less useful than the straight voltage output of a traditional resistor divider. <S> High-precision ADC chips are much easier to come by than high-precision frequency-counters. <S> Generally, the 555 timer would work in theory, but the practical manufacturing considerations drive the design towards the one that you see in many ohmmeters. <A> Within limits, it is possible to get quite good accuracy, better than possible with a DAC with 10 bits of precision if you don't need speed. <S> While it is true that extreme resistances (open circuit and short circuit) are hard to measure, that is true in general. <S> The main trick with using the 555 is to not rely on frequency, but use the duty cycle instead to compute the ratio of R1 and R2. <S> That way, the exact value of the capacitor doesn't matter at all. <S> To me, the main strength is that a really large range of values can be measured. <S> For example, when using a 100K NTC, resistance might vary between 100K and 250 ohm. <S> Using an ADC with a straight voltage divider makes it hard to get accuracy at both the low and the high end of the scale. <S> -Geert
Also, high-precision capacitors tend to be more expensive than high-precision resistors.
Making a camera follow me I want to record some lectures I am giving next semester. I have a video camera, and can change its direction using a servo of some sort. However I have no idea how to detect where I am. Me carrying some broadcasting device would be fine. Mostly the sensitivity should be able to determine if I am in the left or right side of the room, but I do not need much more than that. <Q> You could wear some simple IR LEDs, you could then also place a number of IR receivers, just simple IR photo-diodes would work, with a narrow viewing angle. <S> If you place these around the base of the camera and then have a microcontroller read which one has the greatest signal you can point the camera towards the IR source. <S> Sounds complicated, but it is very simple, and does not require a computer. <S> The hardware is easy to do, although you will probably find in noisy environments (bright light) <S> you will want to modulate your IR to get away from broadband noise you receive. <A> It's a commonly used technique in robotics and vision processing. <S> Depending on your programming chops, you can use OpenCV (open source computer vision libraries) available in both C++ and Python. <S> Other languages may have libraries that support blob tracking. <S> I believe that LabVIEW and Matlab also have libraries to support this. <S> Generally, the setup will be a computer processing the video and finding a blob (you) of a particular color. <S> You can then use the information of the position of the blob in the camera frame to determine where to point the camera. <S> If you are, for example, driving the servo on the camera with an Arduino (or any other microcontroller), you can send commands via the serial port to update the desired position of the camera. <S> When the blob leaves some desired "box" in the center of the frame. <S> If you want, you can do some more clever tracking by implementing some combination of Proportional, Integral, and Derivative control (PID, if you are searching around the internet), to try and keep yourself centered in the frame, but this may be more than you need for your application. <S> Edit: <S> A bit of searching yielded this result: Creative Applications . <S> This is more or less the solution that I explained. <A> Wearing <S> one or more IR led's might let a camera like a wi controller track you <A> <A> This is why grad students were invented. <S> I'm sure you could do this electronically eventually, but there would have to be a lot of lectures before it is worth doing that compared to having someone with a brain handle the camera. <A> I am the person who asked this question, and I really like both the OpenCV answer and the IR led answer and will be playing with them both. <S> At this point both have some issues for me though: <S> my IR led order is getting delayed, and my webcam is unwilling. <S> That being the case <S> my eye fell on an LV-Maxsonar EZ that I bought to play with a little while ago. <S> I never really got to it, but now it seems like it might give rise to a decent solution here. <S> I am the only person moving in front of the room, so no interference, and no computer needed either. <S> This device gives distance measurements in a specific direction. <S> If this distance changes someone moved in front of it, and the camera should move in the direction that that sensor is pointing. <A> Check out the PrimeSense devkit (the makers of the Kinect) <S> The manufacturer released the Kinect's (and DevKit) Windows and Unix drivers here: http://www.openni.org/ <A> Have a look at motion , specifically, the motion tracking feature . <A> Tracking IR splash (and filtering it from the camera, the room's insolation agreeing) give you and the students a good chance at ADR work that helps put you and your chosen context in zone zero. <S> That said I would have probably have drawn from a bundled webcam application well-reviewed on Cnet.com (or another critical venue, Amazon, Acer Support or otherwise) or Camtasia and used that as directed.
What you are looking for may be related to "blob tracking". Sounds like an ideal job for a Kinect and some processing software - it can separate subjects with the 3d info, has pan-tilt motors and a video output.
Project ideas for five hundred AT89C52s? I happen to have some 500 old AT89C52 controllers and am looking for ideas how to use them in a project. That's an 8051-based controller with 8K Flash, so you get an idea. And no, trashing them is not a project! :-) I remember that in the 80s Steve Ciarcia (of Circuit Cellar fame) wrote in Byte Magazine about a "supercomputer" he built with sixty-four 8048s. Nowadays a quad core Pentium will easily beat five hundred 89C52s, so maybe that's not the way to go. Instead I'm thinking of a series of separate devices, each with its own controller (where a single Pentium would be of little use). Suggestions? <Q> Independent sychronising fireflies: http://tinkerlog.com/2008/07/27/synchronizing-fireflies-ng/ <A> If you are looking for something a bit more challenging, you could use them as a sensor mesh network. <S> Get a transceiver to allow objects to report their distance from some sensor event. <S> Or just the magnitude of some sensor event. <S> You could measure light, sound, even RF energy at a frequency. <S> Place your mesh network around the room at mapped locations and have them all report back to a computer what their strengths were and map the strengths in relation to points an locate the device. <S> This step could easily be used to make up a thesis project for a masters, even a dissipation if you increase the complexity and develop sexy algorithms(I think algorithms can be sexy so sue me). <A> Do you really want to use them in a single project? <S> Two things that come to mind are: Sell them or make a batch of 500 (kits?) of some '51 project. <S> Educational SBC with Paulmon or some other monitor, some external memory and peripherals comes to mind.
You could also place them all at the same height and use a dipole antenna (due to it having equal radiation strength in all directions) and have them record RSSI of every message they receive from others and try to map their locations and then use that to map the even location.
Possible to cut Heat Shrink tubing lengthwise and reattach? I need to get some Heat shrink tubing around something that is too big on the ends for it to slide over. Is it possible to cut the heat shrink along it's length and somehow reattach it before applying heat to get it to shrink? If you have any alternative suggestions I need the material to be transparent. <Q> Actually it is possible. <S> I did it myself. <S> 1) You have to cut the shrink tube lengthwise. <S> 2) Wrap it around the part where you want to apply. <S> 3) Apply superglue to the separated part and reattach them (it is not necessary to attach the ends exactly at cut part, you can attach them as you desire). <S> 4) Apply Heat and VOILA it works. <S> Please do some experiment before you commence this procedure. <S> P.S <S> - I know I am 4 years late. <S> Just wanted to share. <A> My alternate suggestion would be to use a self-annealing (self-amalgamating, self-fusing) tape. <S> Your local electrical supply store should have some - it is a step up from regular electrician tape. <S> It is usually similar to double-sided tape, in that both sides have "something" on them, and that as you wrap it, and stretch it a bit, it binds with itself. <S> Here is one specific example and a hopefully long-lived link at 3M , one manufacturer of the stuff <S> (not used that specific brand, but mine is from a very local supplier) Good Luck <A> How about cutting the tubing in spiral instead of lengthwise. <S> I am tempted to try that as I have just regular heat shrink tubing (not 4:1) <S> and I want to heat shrink my iphone cable and connector. <S> Another option would be to add something under the tubing like a spring wrapped around the cable. <S> That will give it some thickness. <A> So happy to see the superglue solution posted by Arin Chakraborty. <S> I have a 3/16-inch diameter cable coming out from a box and the sheathing around it is broken <S> but I absolutely cannot cut it. <S> I have been searching for a while for a solution. <S> Here is what worked: <S> I chose a 1/2 inch diameter heat shrink and cut it open lengthwise. <S> Removed excess so the circumference wrapped loosely around my cable with an overlap of about 1/8 inch. <S> Applied a thin line of Krazy Glue on the overlap area and allowed the bond to form to reclose the heat shrink to wrap around the cable loosely. <S> The idea is to keep the glue line thin because the glued area will not shrink under heat. <S> Allowed time (a few minutes) for seal to cure. <S> Applied heat as usual <S> and it worked perfectly. <A> You can sometimes get away with cutting it if your heatshrink has adhesive, but this generally isn't a good method. <S> Ideally you want to put the heatshrink on before the connector goes on. <S> If you haven't done this you can get away with getting larger heatshrink if it is able to shrink enough. <A> Cutting won't work. <S> You can get heatshrink with shrink ratio up to about 4:1, but possibly not transparent. <A> The method described in this video <S> first stretches the heat-shrink tube to fit over the connector, which doesn't seem to affect its shrinking ability. <S> Comments to the video suggest that using needle-nose pliers and/or chopsticks works best to stretch the heat-shrink tube.
Your other option is to use electrical tape or heatshrink tape.
Are there resources for learning to write drivers? I have a decent amount of experience designing hardware and embedded systems in general, but I have never written a driver for an operating system. I would like to know if there are any good guides, preferably online, although good books would interest me, that will give me a good start on what I need to know to design and implement drivers for an operating system. This will probably have people shooting at me, and although I would love to see a good guide no matter what OS it is based on, I would like to see a guide that is windows based, mostly due to the fact that most of the people I would sell a product would have windows. Please let me know if there is any extra information I can add to make this more clear. <Q> A good driver encapsulates the capabilities of the hardware and makes these available to the OS/applications in a natural way. <S> How best to do this, depends a lot on which operating system you're targetting and what sort of hardware the driver is for. <S> My experience is all with Linux and small custom <S> real-time OSen. <S> For Linux, I'd recommend reading Linux Device Drivers . <S> It's give a good introduction to the different flavours of Linux drivers and the abstractions the operating system provides for them. <S> Devices like serial ports where data is read sequentially are usually handled by character device drivers with a device node in userspace for applications to read from. <S> cat can read from these. <S> Random access devices like flash storage and hard disks are handled by block devices. <S> dd can access these. <S> For a good example, have a look at the Linux MTD system. <S> Drivers which do low level fiddling with hardware will almost certainly need to be implemented in kernel space. <S> You might choose to make a runtime loadable kernel module or to place your code in statically in the linux kernel. <S> Drivers which build on top of existing generic drivers, like USB, may be written in userspace. <S> Using, for example, libusb . <A> Most of my recent experience in writing actual OS drivers has been with Linux, and the best reference IMO is Linux Device Drivers, 3rd Edition by Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman (2005), which has already been mentioned. <S> It is available on Amazon , Safari Books On-Line , and also as a free download . <S> For Windows device drivers, the latest book on the subject (published two weeks ago) appears to be Windows 7 Device Driver , by Ronald D. Reeves, Ph.D. (2010). <S> It is also available on Safari Books Online . <S> An older book, which would cover Windows XP, is: Programming the Microsoft Windows Driver Model, Second Edition , by Walter Oney (2002). <S> It is also available on Safari Books Online . <S> Another book, which appears to be out of print but available on Safari Books Online, is Developing Drivers with the Windows Driver Foundation , by Penny Orwick and Guy Smith (2007). <S> I assume it would cover Windows Vista. <S> Finally, Microsoft has pointers to a lot of blogs etc. <S> discussing driver development. <A> I don't have any experience in this issue, but I'm going to give my two cents. <S> You can start here <S> http://www.osr.com/index.html or here <S> https://www.osronline.com/index.cfm <S> Here in Brazil we have a good blog about this issue. <S> It's written in Portuguese and English. <S> Most articles are in Portuguese unfortunately. <S> There is a post in Portuguese about books in this blog: <S> http://translate.google.com.br/translate?hl=pt-BR&ie=UTF-8&sl=pt&tl=en&u=http://driverentry.com.br/blog/%3Fp%3D825&twu=1 <S> I hope I have helped a little
A couple more books on the same subject are Essential Linux Device Drivers , by Sreekrishnan Venkateswaran (2008) (also available on Safari Books Online ) and Writing Linux Device Drivers: a guide with exercises (Volume 3) by Dr Jerry Cooperstein (2009).
Will there be any voltage drop when connecting load to batteries? In my project I am planning on using 10 AAA Batteries(to give me 12v as each battery is 1.2v) to power my project. I am wondering if there will be any voltage drop when I connect a load. If so how can it be calculated? This is so that I can account for it. <Q> Yes, the voltage will drop. <S> A reasonable approximation would be the internal resistance of the cells and other resistances in the wires, switches, etc, times the current consumption. <S> On an unrelated note, using 10 AAA cells sounds like a bad idea; AAAs have very poor energy density (wasted space due to the casing, etc) compared to AAs. <S> I would suggest using larger cells and a step-up regulator. <S> On a related note, larger cells also have lower internal resistances. <S> Energizer Datasheets/Whitepapers: <S> Battery Internal Resistance technical bulletin <S> E92 cell datasheet (AAA) <A> The short answer is it depends how much current your load draws. <S> The longer answer is, I believe, that if you are attempting to draw more current than the batteries can source chemically <S> (batteries are not an "ideal voltage source"), you will see a the battery voltage dip sharply attempting to compensate for this imbalance. <S> Regardless of this effect, the internal resistance of the battery will induce a voltage drop proportional to the current drawn by the load as well. <S> You can calculate the internal resistance of a battery (Rb) by (1) measuring the open circuit voltage (V) of the battery using a voltmeter, then (2) using a known resistor (R) (e.g. 5% 10kOhm resistor) and measuring the current (I) <S> it draws from the battery (using an ammeter to complete the circuit). <S> The deviation from V = <S> I <S> * R is due to the internal battery resistance, i.e. in reality V = <S> I <S> * (R + Rb) <S> so... <S> Rb = <S> V/I - R. <S> Obviously the quality of that calculation is tied pretty much directly to the accuracy of the known resistor as well as the accuracy of your measurement equipment. <A> There are two types of battery resistance: Electrical resistance which is virtually instantaneous and usually constant. <S> Ionic resistance which is what causes the terminal voltage of the battery to rise after the load is disconnected and the battery has been left alone for a while; and vice versa, causing the voltage to decay after a few hundred milliseconds when a load is added. <S> If you're driving a stepper motor, both will be important. <S> The first is important for any load really; but pulse loads such as stepper motors will be affected by ionic resistance more. <S> The effect is more prominent on batteries near their end of life. <A> If minimum weight is the aim then a converter with fewer. <S> larger batteries will likely end up lighter overall, as you have fewer battery casings. <S> Don't know offhand <S> the weight difference between AA and AAA but capacity is about double.
If you step your motor on a battery with high ionic resistance you will find it runs fast for a few seconds but then slows down.
Waking Up From Deep Sleep Modes Most microcontrollers (e.g. AVRs,MSP430s, PICs, etc) support a number of different sleep modes. The "deepest" sleep mode is the one that purports the lowest power draw (e.g. "Power Down", "Shut Down"), but all the clock systems are typically halted in these modes and it seems to me that the only way to "wake up" from them is via external stimulus (e.g. pin change interrupts, chip reset). Am I missing something? Are there awesomely low power methods of generating a periodic wakeup signal for an MCU? Assuming my goal is to minimize power consumption (i.e. sleep deeply for as long as possible, stay awake as briefly as possible), while periodically waking up to execute a function, what's the common way to achieve this type of behavior? To further simplify matters, lets assume that my function is stateless (I don't have to remember anything from the past to perform it). I've had some success using the WDT on the MSP430 to get this effect. I just made my main routine be my function, with the last line enabling the watchdog timer to expire after a certain period and going into LPM4.5 or whatever the "deep sleep" mode is called. The net result is the function is performed, the MCU sleeps, the WDT expires, and the chip resets, ad nauseum. Seems to work, just wondering if there is a "better" or "more elegant" or "more power efficient" way of getting this type of behavior? I haven't tried this approach with an AVR yet, but I think the WDT is more "power hungry" in the AVRs than on the MSP430 so it may be less attractive for low power work. Perhaps there is not a "universal" approach to low power, and you have to use the tools afforded by a given product line? I know the new picoPower line has lots of whiz-bang features like the Event System and Sleep Walking that in some cases hardly require the CPU to be awake at all if you can make your application fit into that structure... OK enough of my wandering, lets here what ya'll have to say :) Edit Concrete examples illustrating techniques would also be cool! <Q> Most micros support a low-power 32.768 kHz watch crystal oscillator with some kind of prescaler and timer interrupt. <S> Set the prescaler so the timer is counting slowly and the interrupt happens at the period you desire. <S> The datasheet for any low-power micro will list the power with 32.768 oscillator (and nothing else) running. <S> It's pretty close to zero. <S> You can do the math to see if this is acceptable, and compare it to the current drawn by the watchdog. <S> OK, for example on the msp430f2013, let's look at power in the datasheet. <S> 0.5 <S> μA is almost zero, although it is five times the true OFF mode. <S> For more detail, we can look inside the datasheet. <S> Going from LPM4 (everything off) to LPM3 (running the oscillator) is the difference between 0.5 μA and <S> 1 μA. <S> Suppose the battery is CR2032 with 225 mAh capacity. <S> Then standby in LPM4 is about 50 years and in LPM3 is about 25 years. <S> 25 years is long enough for many applications, because the ON-current (during the measurement itself) dominates the consumption. <A> Some parts have pretty low-power oscillators (a few uA) for wakeup, and some PICs also have hardware to allow a very slowly rising voltage on a pin to wake - this can be from an external capacitor set up before sleeping to charge over the required wake period. <A> PICs with RTCs can have the RTC set to an alarm state, so it will wake up the MCU at a given time, with an external 32.768kHz crystal. <S> They draw ~450nA IIRC in RTC+sleep mode, but only 20nA with RTC off. <A> AVR watchdog timers aren't as bad as you seem to think. <S> According to the ATTiny13A datasheet, current draw in power-down mode @3V is 2μA without the WDT enabled, and 4μA with. <S> Sure, it's 2x more, but the current itself is small enough for around 6.2 years of operation, which is around the same amount of time it takes the battery to degrade by itself anyway <S> (source: the best-before date). <S> Additionally, practically anything else you hook up around the μC would draw lots more. <S> In fact, the trickiest part of designing such a low-power circuit is shutting off all current in the rest of the schematic during the sleep period. <S> The wakeup delay is also nicely configurable, from ~12ms to 8s, if memory serves. <S> The actual frequency doesn't make any noticeable difference if short interrupt routines are used: I got away with turning on the ADC, sampling a 1K pot, calculating some stuff from the results and going back to sleep with no noticeable change in overall consumption (smoothed with a large capacitor to compensate for the sluggishness of my multimeter). <S> Do note that the WDT is not an accurate timekeeping tool, so you might want to hook up an external RTC. <S> Those can consume mere nanoamps, so it should be a good pairing. <S> In fact, if the RTC in question can generate regular pulses, you could use that as your wakeup source instead of the WDT at the cost of using up a pin.
Some micros also have a built-in low-power RC timer if exact timing isn't critical.
Does my open source project need be Arduino based to be successful? I am debating which micro-controller to use for a new open source hardware project. Spec wise, I would rather use an ARM Cortex M3, which is at a similar price-point to an Arduino(avr) based solution but with more processing power/peripherals. The only concern I have going with ARM based hardware is I don't want to lose potential contributors/developers who might be put off by working with ARM. Or competition wise--someone reproducing the project but with an arduino instead(e.g. Ardupilot overtaking Paparazzi) I realize there is no straightforward answer to this question but I would like to hear your thoughts on the topic, and what other factors you think might weigh more on the success of the project. <Q> I think it depends who you're trying to attract. <S> Having an Arduino derivative which can be programmed directly from the Arduino IDE will attract Arduino users. <S> But, in my experience, the average Arduino user is not neccessarily a skilled developer who will contribute usefully to a project. <S> Of course, there are many expert Arduino users, but it's a device aimed at the beginner. <S> On the other hand, the kind of user who can get a toolchain and debugger going for ARM Cortex-M3 is also likely to be capable of fixing your bugs for you. <S> But, there are considerably less of them. <S> I'd say - pick <S> what's right for your project. <S> If it's good, users will get involved. <A> The way to have a successful open source project is to get people interested in it. <S> Just because your project is open source doesn't mean anyone will want to work on it (or care). <S> Your project needs to be interesting beyond "oh, I know [language] and have the toolchain for [development environment]" <S> The product engineer in me thinks that being unable to select between Arduino (an extremely limited subset of AVRs) and ARM is a big hint <S> you don't really know what you want to do; though I guess you're trying to figure out if you want to trade off extensibility versus accessibility? <A> You can't limit yourself. <S> An ARM Cortex M3 can do thing an Arduino just can't. <S> In fact the Arduino uC is one of the more basic/vanilla/limited processors in the AVR line itself. <S> Don't hamstring your project and yourself just to try to gain followers. <S> If this project doesn't help you learn and extend your own boundaries <S> then I don't think it's worth doing. <S> If you've outgrown the Arduino, move on. <A> The short answer: <S> No. <S> The longer answer: <S> Well... <S> A major incentive for outside developers to get involved and help your project is how much it costs for them. <S> An Arduino is a relatively expensive and clunky piece of hardware compared to just a bare AVR, so if you are building something that's supposed to be in actual use then using an actual Arduino is a horrible idea. <S> Making a system <S> Arduino compatible is a whole different matter, it can be as easy as bringing out TXD, RXD and RESET on a header with an FTDI-cable pinout and using one of the AVRs that the Arduino IDE has support for. <S> Casual tinkerers might then use the Arduino IDE with your board, while more advanced users could use plain C and a make file. <A> A Cortex M3 based target doesn't have to be more complicated... have a look at the Maple , an STM32 based "Arduino copy". <S> To program and debug you can use OpenOCD based JTAG or just use the USB cable. <S> And the answer to your question is, no <S> it does not have to be Arduino based to become a great success.... <A> I would say being another <S> * *duino project will make it less interesting, but there probably is a group of people who only care about or have access to that platform. <S> I expect that applies to a lot of other platforms. <S> If you're after a project, you pick the tools that make sense to you and use those.
My personal take on platform choice is that you shouldn't care or think about popularity.
What is the foam pad on the bottom of a large, through-hole capacitor for? Large, through-hole capacitors (typically electrolytic) sometimes have a foam pad on the bottom like the one in this picture: What is the pad for? <Q> It is a rubber seal. <S> It keeps the magic smoke in. <S> Or at least the electrolyte. <S> From Nichicon tech data : Vishay tech data gives a better view of the seal: <A> That doesn't necessarily look like a foam pad from the picture (textured plastic?), have you poked at a few at your bench? <S> Having said that, the picture does show a 400 V cap with (w.a.g.) <S> 5 <S> mm lead spacing <S> , so something to isolate it as you suggest might be in order. <S> In general, that piece under the capacitor is some rubber or soft plastic that allows the capacitor to vent the hydrogen it produces during operation. <S> The rubber is usually covered by a plastic spacer so the bottom of the can can't sit tight against the board forming a seal. <S> As to why , see CDE's Aluminum Electrolytic Capacitor Application Guide (pp. 3-4) Impregnation <S> [...] <S> Water in the electrolyte plays a big role. <S> It increases conductivity thereby reducing the capacitor’s resistance, but it reduces the boiling point so it interferes with high temperature performance, and it reduces shelf life. <S> A few percent of water is necessary because the electrolyte maintains the integrity of the aluminum oxide dielectric. <S> Whenleakage current flows, water is broken into hydrogen and oxygen by hydrolysis, and the oxygen is bonded to the anode foil to heal leakage sites by growing more oxide. <S> The hydrogen escapes by passing through the capacitor’s rubber seal. <S> Sealing <S> The capacitor element is sealed into a can. <S> While most cans are aluminum, phenolic cans are often used for motor-start capacitors. <S> In order to release the hydrogen the seal is nothermetic and it is usually a pressure closure made by rolling the can edge into a rubber gasket, a rubber end-plug or into rubber laminated to a phenolic board. <S> Too tight a seal causes pressure build up, and too loose a seal shortens the life by permitting drying out, loss of electrolyte. <A> I'd say for electrical insulation. <S> It could easily arc since it's rated for 400v.
In small capacitors molded phenolic resin or polyphenylene sulfide may replace the rubber.
What is a pull up and pull down? Can some one explain this terminology please I think I understand it but not completely sure. I think pull down is where you place a resistor between +V and the other component and pull up is where you place the resistor between 0v and the component. If I am completely wrong then let me know! <Q> It's the other way around. <S> Pull up is where you place a resistor between a signal and +V, pull down is pulling it to ground. <S> (from http://roguescience.org/wordpress/?page_id=11 ) <S> Here, you can see that when the switch is open, in the pullup scenario the input pin will read high, but for pull down it will read low. <A> The basic function of a pull-up or pull-down resistor is to insure that given no other input, a circuit assumes a default value. <S> But one pulls the line high, the other pulls it low. <S> Good source to learn: http://www.seattlerobotics.org/encoder/199703/basics.html <A> Common uses are where an input to some component requires one of two voltage states to operate reliably but you are driving the input with some component that can only drive a signal in one way. <S> Maybe the input is the gate of a FET, maybe an input to a microcontroller or a logic gate. <S> Maybe the output is coming from an open drain fet or an open collector BJT transistor or maybe you have a situation where many outputs got diode <S> or'ed. <S> The deal is that the input can deal with the driven signal from the output but when that signal is no longer present, there's a good chance that you now have a situation where the input sees high impedance. <S> Under these circumstances, what signal the input "sees" is unpredictable. <S> It could pick up noise from nearby electrical cables. <S> It could pick up static electricty discharges from nearby etc. <S> The input may end up switching states at undesirable frequencies. <S> Of course usually you don't want the input to be able to "switch" on its own at all. <S> So you pull the signal up or down when the opposite driven signal is idle. <S> The value of a pull resistor depends on your power budget, the max current/voltage/power the output components can deliver and what voltage/current the input requires to see a steady state that is opposite to the "driven" output state. <A> Lots of valid points here, examples of what pull-ups are , and certainly you can work out which way is up from them, but I'm going to aim this at the 'explain the terminology' aspect.. <S> The mnemonic that makes sense (to me anyway) is that the resistor is used to 'pull' the pin to some established voltage; so usually one speaks of pulling 'up' toward the positive supply voltage, or pulling 'down' toward ground or a negative supply voltage. <A> I think your confusion stems from what you're pulling. <S> You may see the resistor between V++ and the output either as pulling down from V++, or pulling up from output/input. <S> The thing is that it is no use pulling V++; it will remain V++ (as long as you don't exaggerate the pull). <S> Likewise you can't pull ground up; it's ground, it's your reference! <S> Hence the explanation is that you pull the output/input. <S> Towards V++ is up, towards ground is down. <A> Let me make an attempt in answering a so-commonly-asked question the best I can. <S> Say we have an Arduino - A <S> and we want to digitalRead a signal from a pin A2 .We <S> will later reference Arduino 5v pin as A (5v) and its ground pin as A (gnd) <S> Let's me make a simple connection below and read the digital INPUT on Arduino Serial console: <S> Connection 1: A2 to A(5v) will read 1Connection 2: A2 to A(gnd) will read 0 Fact, if we were to add a button <S> B in between to the above simple connections in a pressed-down state <S> nothing will change to the INPUT digits. <S> Connection 1: A2 to B(pressed) to A(5v) will read 1Connection 2: A2 to B(pressed) to A(gnd) will read 0 <S> But what will happen when the button is released? <S> Will the digitalRead always guarantee to deliver the opposite digit? <S> No! <S> But do we want to? <S> Yes, of course! <S> To ensure the reversed digit is delivered when the button is released we would need to add a Resistor - R to the above respective connections as follows: Connection 1: A2 to R to A(gnd) will give an opposite read 0 when button NOT pressedConnection 2: A2 to R to A(5v) will give an opposite read 1 when button NOT pressed <S> Now you can finally see the answers for yourself. <S> a. Connection 1 is <S> PULLDOWN coz Resistor pulls it DOWN to the ground to give you 0 in OPEN state.b. <S> Connection 2 is <S> PULLUP coz Resistor pulls it UP to the 5v to give you 1 in OPEN state. <S> Oh wait <S> , now you know why in the PULL-UP the button delivers 1 when open. :) <S> Happy soldering!!! <A> These are generally used in digital logic. <S> As they can have 3 states. <S> They can be on , off and the third state is HiZ (tristate) which is a high impedance state. <S> The resistor connected to the load and ground is locked down to the low state. <S> This is known as the pull down resistor. <S> The resistors connected to load and positive Vcc is locked down to the high state. <S> This is known as the pull up resistor.
A pullup resistor will be found connected between some signal and v+.A pulldown resistor will be found connected between some signal and signal_ground(0V).
Is there a Dual Voltage Regulator? I am working on a circuit design that has multiple IC's on it. My MCU requires 2.5-3.3 VDC for it's power. Another IC that I am using requires 5V for it's logic power. So what is the cheapest and simplest solution for powering both of these devices. I figure my options are: A) Use two voltage regulators a 3.3 and a 5V.B) Use just a 5V regulator and used diodes or something to drop the voltage down the an acceptable level for the PIC.C) Maybe there is a dual voltage regulator out there?D) Something else? <Q> Microchip has a document called 3V Tips ‘n Tricks . <S> It has some options you can chose that will help you. <A> What you're asking for is pretty common since there are a lot of mixed-voltage IC applications out there with the same constraints (especially the two voltages you listed since most ICs operate off either of those two). <S> Here are two options for you: MIC5211-LXYM6 from Micrel should do what you want. <S> It's a dual-output, +3.3V/+5V linear regulator but only can output 80mA. TPS767D301 from Texas Instruments if you require more power than that. <S> It has a +3.3V fixed output and an adjustable output which will go up to +5.5V. <S> It can output up to 1A (per supply) and should be able to source most projects that I could think of. <S> If you require more power than either of these two, it would make sense to go to two separate supplies. <A> <A> Dual LDOs (even triple) are very common. <S> Here is what Micrel offers, though ST, National, and Linear should have additional options. <S> If you're concerned about efficiency for battery life or heat dissipation's sake, it is also fairly common to use a SMPS to step some input voltage rail to 5 V, then use a LDO from there to 3.3 V. <S> Providing standby power to the 3.3 V rail is somewhat difficult then...not knowing much else about your design I'll stop guessing though.
There are plenty of dual regs, but it is often cheaper to use two seperate ones unless you have severe space constraints, as there are many more parts to choose from in single-output versions.
Why do high voltage power lines hiss when it's raining? I noticed when walking home the other day that the high voltage (200kv I believe) lines running through here were hissing in the rain. What is causing them to hiss? <Q> High-voltage partial discharges across the insulators. <A> I was taught that this is due to the Corona effect. <S> Basically, the power lines ionize the air around them, causing audible hum, along with havoc in the EM spectrum. <S> This is <S> why really high voltage lines and transformers will sometimes have a slight aura around them. <S> Generally, the effect is undesired, because it robs the transmission lines of energy (the hum/light/heat dissipates energy), so a lot of equipment is manufactured to try and stop this effect. <S> The Wikipedia article will do this subject much more justice than I can. <A> Good stuff in the answers so far, but I work with power lines and want to put in my two cents. <S> This isn't technically a partial discharge; occasionally you may be hearing the crackle of what is usually called a corona discharge. <S> I admit the phenomenon is related, but it is not the same. <S> See, all uninsulated lines show corona. <S> Its just not a big deal until you're dealing with a pretty high voltage. <S> As the voltage goes from a very big positive to a very big negative, the air around it gets ionized, so about 50 or 60 times a second, it switches direction. <S> This is the normal mains hum discussed in another answer. <S> Water is much, much heavier than air, and it ionizes just as easily. <S> So on a rainy or humid day, the corona is pulsing with water in it. <S> This gives it momentum, so the heavier water particles travel out farther. <S> But they themselves are ionized, which means they can ionize more air than the line could normally reach on its own, and ionized air is conductive. <S> And there's almost always 3 of these lines pretty close together. <S> This is actually the worst time to be anywhere near them; the air is supposed to be their insulator, and at that moment it isn't working as well. <S> Occasionally you might see a full corona discharging with the naked eye; it looks like a tiny bit of lighting crawling up the line. <S> If it gets really bad, you'll see a momentary line to line or line to ground short, which looks exactly like a real lighting bolt, just not from the sky. <A> They'll actually do it when it's not raining too. <S> It's called mains hum . <S> Power lines carry AC voltage at either 50 or 60 Hz which is at the low end of the audible range of most humans. <S> In the presence of an electromagnetic field (like the one generated by AC power), the molecules of ferromagnetic materials (the metallic conductors inside of power lines) will not only try and align themselves with the field but sometimes change or distort their shape if the applied potential is strong enough. <S> This alignment/change in shape can cause collisions between the molecules comprising the power-lines which, given enough of them, can be heard by an observer. <A> Corona is usually worst around points of sharper curvature, where the electric field gradient is most intense. <S> Higher voltages, like the 200kV you mention, would make this more pronounced. <A> There are several causes but the most common is high voltage discharge along surface contamination on the insulators. <S> This has a characteristic "hissing" noise, whereas most other phenonomon generate noise primarily at the line frequency or 2nd <S> harmonic. <S> During dry weather dust builds up on insulators and it always contains some quantity of salt. <S> When weather gets damp, enough water gets into the mix to allow it to become conductive, so small quantities of current start flowing. <S> Once that happens any organics in the current path quickly become carbonised and the arc becomes more-or-less permanent <S> (heavy rain will wash the insulators clean and the cycle then starts again) <S> The noise peak for hissing discharges is ultrasonic, so detecting where the actual arc is located is done using a small parabolic microphone with a viewfinder. <S> (see http://www.arrl.org/files/file/Technology/PLN/Ultrasonic_Pinpointer.pdf for an example) <S> The hissing you hear is the least of it. <S> Radio hams HATE arcs because they generate a lot of radio interference <S> - so they tend to be the most enthusiastic purchasers/builders of ultrasonic arc locators. <S> Dust buildup is the primary reason why high voltage insulators aren't smooth - the typical "stack of discs" design makes it very hard for enough dust to build up to let current flow under damp conditions, so dust-based arcing is usually found only on 11kV or lower tension poles, where the insulators are a much simpler design. <S> Corona effects are usually only found on very high voltage lines (over 220kV)
The sound you're hearing is a million teeny tiny electrostatic discharges from all the charged up water particles interacting with each other with nearby lines or grounded objects. My wild guess would be that the hanging water droplets might be causing corona discharges.
How can I plug an arbitrary USB device into two computers? Ultimately, my goal is to have a "keypad" with between 5 and 10 buttons, where pressing one of those buttons effectively presses some key on two computers simultaneously. In the ideal scenario, the "keypad" would just plug into both computers, sending whatever signal I generated out over 2 USB lines. As far as I can tell, this flat doesn't work (a single USB device cannot connect to two hosts). I saw online some instructions for connecting a USB keyboard to a hacked-together pair of PS2-USB adapters (connecting the PS2 side, which apparently is happy to have multiple "hosts" with a single device). Even without doing the hacking part, my current keypad won't work when plugged in via keypad->USB to PS2->PS2 to USB->computer. Cutting apart connectors to allow it to be keypad->USB to PS2->2 x PS2 to USB->computer isn't likely to improve that any. I'm not clear if Windows no longer supports PS2 (saw that somewhere online), if the hardware keypad doesn't send the necessary signal to be "converted" to PS2, or what. Are there any other approaches I'm missing? Any intelligent ways to do it with software (so the keypad plugs into one computer and that computer sends the signal to the other computer)? Immediacy is pretty important, but that route seems to have some legs. <Q> You are missing the fact that USB is bidirectional serial protocol, and having two USB hosts talking to a single USB device is not supported neither on physical neither on logical level of the protocol. <S> What you can do is to make each key of the keyboard connected to two MCUs each capable of beeing USB HID, and have their USB cables connected to two PCs. <S> You can use two cheap AVR MCUs for this and use USB HID software implementation, just make <S> two <S> identical HIDkeys and connect each key to both. <S> Btw, read the license carefully. <A> You could avoid mucking about with hardware quite easily by relaying key-presses on one Windows computer to another with something like PyKeyLogger and SendKeys <A> They seem to work similarly to a KVM switch, and the cheap switches need to be switched manually, but some also support switching via software.
This probably won't help you accomplish your overall goal of simultaneous use of a USB peripheral from two computers, but a USB switch can allow non-simultaneous use of a USB peripheral from two or more computers.
What is the relevance of "typical values" in datasheets? When working on a design I always work with minimum/maximum values from the datasheet (whichever is worst case), never typical values. I was reminded when in another discussion the leakage current for a BAS416 diode came up: 3pA typical, 5nA maximum. That's a factor 1000! In this case I surely would dismiss the 3pA. What's the relevance of "typical values" in general? Do you use them in a design? <Q> If you use maximum values, you'd end up with a much shorter battery lifetime than would "typically" be achieved. <S> Usually it is the typical battery life that one would be interested in, and not some extremely short time that will never result anyway. <S> Sure, when you're designing power supplies..etc, I would take max current consumption values for all the devices that it's going to power as a safeguard. <A> One thing to bear in mind when reading technical datasheets, is they are finalised by marketeers!!! <S> not engineers. <S> If it was up to engineers to publish datasheets you would only have the min/max relevant values and more information about the statiscal variations that you can expect. <S> Many people are involved with the writing of the datasheets, and ultimately it is people in marketing that have the final say! <S> So when you read a typical value that is so far away from the min/max values that is simply marketers doing there thing. <S> Generally when doing a parametric search typical values are what are listed and get you in to review the datasheet. <S> Latter on you discover that 3pA is a maximum of 5 nA, sometimes latter in the design process!! <S> I will generally review the min/max values to really appreciate the range and perform worst case calculations/montecarlo analysis to really work out the expected performance! <A> You may optimize for the typical case. <S> For example if I need 5 <S> A max but <S> 2 A typical, I will design/buy a 5 A supply but choose the one that is most efficient at 2 A. <A> Often when companies spec those values they have not done that much work determining it. <S> I have talked to many companies that their specs are purely off of simulation of what variances they will have in production. <S> If you are making a million phones, check the spec on what you are buying, determine what is feasible. <S> if you have to trash 1 phone out of 1/1000 because you get a perfect storm of devices being out of spec, that is probably much better than manufacturing problems. <S> If the diode is almost always worst case, get a different diode. <S> If you are making 3, fab them for typical, allowing some tolerance, and if it ends up having a major variance in one part, replace it with another. <S> If it is mission critical part, check it first. <S> If over-spec is not an issue for your 3, just spec worst case. <S> You will spend more on components then you need, but you are building <S> three, 10 dollars only makes 30. <S> No real cost lost. <S> If you are making millions, you need to confirm conformance yourself. <A> The word typical is "content free". <S> Real statistical estimates require at least a range, and a confidence. <S> Better yet, a density function. <S> For instance, quantity X falls between 3.7 and 4.3, with 95% confidence means something, whereas quantity X is typically <S> 4.0 is absurd. <S> What does that mean? <S> What is the probability that X lies between, say, 3.999 and 4.001? <S> If there is any earnestness in such a "typical" claim, the interpretation should be like this. <S> Since the 4.0 is given as two significant figures, it means that there is some high confidence (like 95%: two standard deviations, or 99.7%: three standard deviations) that it will not fall bellow 3.95, which would cause it to be rounded down to 3.9, nor rise to or above 4.05, which will cause it to be rounded off to 4.1. <S> That is to say, if, say, 95% or more of the time a parameter measurement, when rounded to two significant figures, does not show 3.9 or less, nor 4.1 or greater, then we have justification in claiming that it is "typically 4.0" (but not necessarily that it is "typically 4.00"). <S> I don't know of any source of assurance that datasheets apply this sort of standard to "typically".
When estimating battery life in a device, I tend to use the typical values.
How do you remove insulation from headphone wires? How do you remove insulation from headphone wires (these tiny) to prepare it for soldering? <Q> Usually, you can remove laquer by melting solder onto the wires <A> I've used a microtorch to burn off the insulation with a lot of sucess - use the microtorch on the tip of the wire, and let a little more burn off on its own <S> and you're good <A> On smaller, thin wires, simply applying heat from the iron will delaminate (ie, remove insulation from) the wire. <S> I've done this ( <S> by accident - creates interesting situations in a wiring harness <S> if you are lame like me and try to shrink heat-shrink tubing with an iron - don't do it!). <S> You might be able to use a chemical agent to strip the insulation too. <S> You could also try a razor blade, but you need ninja-class hand-steadying abilities. <A> I usually use sharp scissors to remove a bit of insulation at the start of the cable and then just start soldering on the small exposed part. <S> If I'm quick enough, insulation will shrink just enough to not be a problem. <S> If you need to remove insulation from the middle of the cable, I have no idea how to help you. <S> EDIT: I just did some soldering to a middle of a cable <S> and I've noticed that on thin audio cables it is possible to just solder directly over the insulation. <S> It requires a bit more time and heat, but insulation will break and shrink from the heated area leaving a piece of copper conductor exposed. <A> My usual approach to removing insulation is to bend the cable to put the insulation under stress and then cut it carefully with a sharp knife until it comes apart. <S> I don't know if this would work for these tiny cables, though. <A> Use a lighter to get it off. <S> It works really well!
I just did some soldering with small wires and noticed that if you heat up the cable, insulation will shrink back from the heated part.
Are there any special tools used to adjust trimmer potentiometers? Is there any special tool used to adjust trimmer potentiometers? I have some similar to the one on the picture: I've tried using small slot, Phillips and Pozidriv screwdrivers, but they all don't seem to fit nicely giving me impression that there is some special tool used to adjust trimmer potentiometers. If there isn't any special tool, what has proven to work well for you? <Q> Goot Zirconia Cross Screwdriver for Electronics DIY <S> This is a very interesting key for those who working with radio, or anything else that requires adjustment in bobbins, trimpots, trimmers and the like. <S> Its tip is a type of a white ceramic (the package says " <S> zirconia" <S> but it is actually Zirconium dioxide ), which gives a high stiffness and does not change the tuning coils because it is not obviously of magnetic material. <S> Source (Portuguese): http://badulaquesdachina.blogspot.com/2010/03/chave-de-alinhamento-de-ceramica.html <A> The only time you need something more than a small screwdriver is on things which have a protruding screw like multiturn pots and trimmer caps, as standard screwdrivers slip off too easily, especially when doing multiple turns - a proper trim tool with recessed blade works a lot better for these.e.g. <S> http://uk.farnell.com/vishay-spectrol/acctritob308-t000/trimming-tool/dp/145507 recessed blade one end, protruding blade on other <A> Just use a small flat-head screwdriver. <A> They do make tools like this one , but most people use a small screw driver. <S> The only real advantage of the special tools is that they are often nonconductive plastic. <A> I have found that the screwdrivers in glasses repair kits work very well for me. <A> I think the thing is, you want something that isn't magnetic or conductive to adjust the device . <S> Maybe that isn't a big deal for potentiometers, and <S> a regular metallic screwdriver works <S> ok (in my experience, at least) <S> but for tunable inductors or tuned circuits I would think it might be an an issue. <S> Many screwdrivers, even the small ones, are easily magnetized. <S> In a kit from school I got a small plastic "screwdriver" for this purpose. <S> O <S> Engenheiro's answer describes another device that does something similar. <A> While at first sight they may look that way, trimmer potmeters are not meant to be trimmed with a cruciform screwdriver like a Phillips or Pozidriv. <S> What appears to be a cross is actually a slot with an arrow in it, which points to the position of the wiper.
So simply use a small flat-head screwdriver, like one from a jeweler's set.
Why do Solid State Relays cost so much? Solid State Relay (SSR) Crydom CN240A24: Eur 10.72 Same function with basic components Optocoupler MOC3043 (zero-crossing detect, triac out): Eur 0.726 Triac BTA06-600CWRG (snubberless): Eur 1.16 2 resistors: Eur 0.212 Total for the second solution: Eur 2.10, or 80% less than the SSR solution.Prices from the Mouser catalogue. Similar devices from other manufacturers have similar prices (quick check). So, the question is: what's so special about Solid State Relays that they cost so much? edit I guess at Crydom the LED and photo-triac are bonded directly to the thin PCB. Packaged components may be used for small production runs, though. <Q> Principally, you're paying for the testing. <S> Also, lifetime and reliability testing (the crydom relays are specced to 100,000 cycles), which means that crydom has actually run a number of the devices through 100,000 cycles at load. <S> Furthermore, you're also paying for liability insurance. <S> If an appliance fails and kills someone, and the only AC-facing component was a crydom relay, it's crydom's problem. <S> If the AC components are your own, it's your problem. <S> Lastly, while it's true that a discrete relay solution is preferable in large volumes, you often see SSRs in small-volume or specialty products, where assembly and testing costs dominate the expenses, rather than raw component costs. <A> You are comparing the component cost against a manufacturer item with heat sink (the back plate), housing, screw terminals and pcb. <S> Add a few euros for those items and your true bill of materials cost is getting closer to 3-4 Euro. <S> Finally manufacturer the items in china, and they will wont some money too! <S> ship it, handle it, distribute it, and you can quickly see where the costs are going. <S> Of course, design your own, and you incur the NRE, buy one pre done and it is much cheaper for low volumes. <S> So yes you are paying more, but it is off the shelf and ready to go and allows you to focus on the bigger picture - your application. <S> When you need to make 1000+ of them, then doing your own will work out cheaper. <S> As you know the application you can add more electronics to the circuit board and design it to fit within your enclosure as needed. <A> You are also paying for assembly, packaging, testing, approvals, sales & marketing and a whole bunch of other things. <S> Also bear in mind that pricing in Mouser is not a particularly good representaton of the 'real' cost, as different manufacturers have different pricing structures for low volumes, and different distributour discounts. <A> I would guess that probably the MOC+triac combination is so good and cheap that almost nobody wants to buy the packaged version (maybe someone with very restricted board area <S> but I am not sure if the SSR is much smaller). <S> It is expensive to manufacture such components in low volumes.
UL and CE testing is Very expensive.
How do I in-system program LPC17XX? I plan to buy an mbed module to get started with NXP LPC17XX. Developing and downloading code seem the easiest possible. What are my options for in-system programming this code in non-mbed devices? I understand the bootloader only requires a UART connection to my host PC. What tools are available for Windows PCs? Can they directly work with the object code I created on the mbed site? Can I use code for the LPC1759 directly on other LPC17XX devices? <Q> You can use the lpc21isp programmer which was originally written for the LPC21xx series but recent versions also support the LPC17xx series. <S> It requires only a serial port but it is helpful to connect the RESET and ISP pins because they will have to be manipulated to force the chip into the bootloader. <S> There are binaries for Windows and the code compiles without problems on both Linux and OS X. PS. <S> There is also JTAG but who would want to use that. :) <A> The mbed forum is the best place for questions like that, it's been answered there. <S> However, mbed binaries can be executed on any target using the same device. <S> Here are the details from the mbed Notebook. <A> Looks like the LPC17XX series is all the same core, just different peripherals, memory size and clock speeds. <S> So the code should work, as long as you don't run out of memory, try to use a peripheral that isn't there or have timing dependent code. <S> There is a pin that needs to be held low at during reset to get into the on chip bootloader. <S> See the user manual for more details.
You can program the chip via JTAG or its built-in bootloader which allows programming via UART0 which could be attached to a RS232 port, a UART to USB chip, or whatever you want.
Repair a burned trace on a PCB I've got a PCB (from a multimeter) that apparently has 2 traces on the PCB burned away.How they did it, I don't exactly know, but the traces are really gone completely.The problem is however, that these traces disappeared up to a via they were connecting to... So little graphical representation("=" = trace, "-" = disappeared trace, "o" = via) : =====-----o Another complication: if I would solder a small wire through the via, it can't protrude at the other side, because the other side are the sliding contacts of the dial of this multimeter. So, who's got the best option to repair these traces? Thanks! <Q> Scrape any solder mask away from the via and solder to the via itself. <S> Use very thin wire, since this trace is acting as a fuse. <S> Or throw this meter in the trash before someone gets hurt. <S> There's probably something you can do with conductive glue, but I have no experience with it. <S> Where else does the trace go? <S> You can connect anywhere else on the circuit node and it should work. <S> (Not always.) <A> The burnt traces are a symptom. <S> Something shorted out and caused them to burn. <A> Can you place a piece of tinned copper foil on the dial side? <S> You could solder a wire on it, feed it through the via, and solder it to the damaged trace.
Unless you can find and fix the root cause, there is no sense in repairing the traces.
What I2C address should I choose? Now I know in order to have an I2C address reserved for yourself you have to pay the I2C people some money. But I don't want to do this. I'm asking for advice on what address I should choose for my slave and master MCUs on my project. There will also be an EEPROM on the board. So I will avoid using the address of the EEPROM. I plan for the master to connect to a wide range of sensors, including gyros and accelerometers, and perhaps additional memory devices. Are there any blocks of addresses I should stay clear of? I was thinking of just using 0x00 for the master and 0x01 for the slave, because those seem to be rarely used. Another question: would it be a bad idea to mix 10-bit devices and 7-bit devices on the same bus? I was considering the possibility of having my MCUs communicate with 10-bit addressing, but only using 7-bit addresses for sensors. <Q> Pick a device you positively won't be using in your design and use it's I2C address. <S> For instance, if you won't be needing a RTC, you can use 0xA2 and 0xA3, which are used by the NXP <S> PCF8563 (and probably other RTCs). <A> First, don't use 0x00 and 0x01, those are reserved! <S> Table 3 of the I2C Bus Specification lists the reserved addresses (and reasons why): <S> Slave addr <S> R/W Description 0000 000 <S> 0 General call address 0000 000 <S> 1 START byte 0000 001 <S> X CBUS address 0000 010 <S> X Reserved for different bus format 0000 011 <S> X Reserved for future purposes <S> 0000 1XX <S> X Hs-mode master code 1111 1XX 1 Device ID <S> 1111 0XX <S> X 10-bit slave addressing <S> You should also steer clear of 0x00 because that has no edge transitions, and might be an error condition <S> (and it's hard to debug). <S> Other than that <S> , I'd say "Just make it configurable. <S> " If you want to be able to plug in a wide variety of sensors, then you can either pay NXP for an address, or give it adjustable addresses. <S> Software modifications should be obvious if you want to distribute the source code. <S> A hardware option to toggle one or two bits of your selected address (solder jumpers on digital pins) is cheap and easy, or a ladder network of resistors with jumpers connected to an A/D pin could give you complete control in the hardware. <A> Here is a list of allocated addresses as of 1999: http://www.nxp.com/acrobat_download2/selectionguides/SELGUIDE.PDF <S> They don't release a full list with this reasoning: <S> Q: Is it possible to receive a list of all I²C-slave addresses used to date? <S> A: <S> No. <S> NXP Semiconductors do not issue this list of all previously assigned slave addresses, as this is the only way we can guarantee the list stays up to date and each assigned address is unique. <S> If this list were made available, I²C-bus licensees would start selecting slave addresses themselves and the central list would soon become incomplete, which could lead to address conflicts. <S> The principle established, proven to work well, is that each licensee sends a slave address request to a single contact within NXP Semiconductors, who then allocates the slave address based on a single master list. <S> From <S> http://www.nxp.com/products/interface_control/i2c/faq/ <A> As Kellenjb says you won't get a full list of slave device addresses. <S> However there are several reserved addresses which you can not use (0x00 for example <S> is the general call address). <S> The list is here <S> Mixing 10 and 7 bit addressing is fine as long as the 7bit slaves obey the I2C standard and ignore 10 bit addresses.
Now, if everything is going to be internal to your project, there is no reason you can't just select any address that you want as long as it doesn't conflict with anything you plan on connecting.
Want to make a UAV I've been inspired by the guys at DIY Drones and I'm toying with the idea of making a UAV. To transmit the sensor data, I was thinking I'd go with a 60mW XBee, but I also would like to transmit live video. I'm having a hard time finding a way to transmit live video because I think the XBee will only transmit at low speed. Any idea what camera/transmitter/receiver combo would be possible? I think 1-5 miles range would be ok. I'm looking for specific products/links. <Q> I believe that the legal option here would be a 900MHz or 2.4GHz solution. <S> Remember that it is currently illegal to fly R/C aircraft outside of your line-of-sight <S> (both the AMA and FAA are pretty strict on this). <S> All model aircraft must remain in the pilot's sight during the entire duration of the flight. <S> I'm not sure how enforced this is, but you would probably be wise to stay on the legal side of things as you are doing your UAV experiments. <A> Legal issues aside, use a separate communication channel for the video stream. <S> This way it will simplify your hardware and allow you use commercial off the shelf wireless transmitter and receiever the video, and a dedicated control and sensor channel using Xbee (or alternative) communication channel. <A> Use analog video and a video transmitter/receiver pair. <S> Total cost less than $50 US.
There are some specialty RC Wireless and Video suppliers like Hobby Wireless that carry several different camera/transmitter/receiver solutions.
Is there a sure-fire way to determine if an MCU is fried? I have a PIC24FJ32GA002. I think I killed by accidently exposing it to 5V instead of the rated 3.3V. It was very quick, less than half a second. I am not able to get it to communicate with my programmer, but I didn't test it beforehand, so I am not sure if my circuit is wrong or I have wired something up incorrectly. Unfortunately I can't get any more MCUs any time soon. Is there any way to determine if the MCU is truly dead? <Q> You could try wiring up the bare minimum you need - supply and ground pins (decoupled), MCLR, PGC and PGD - and seeing if you can program it. <S> If that doesn't work the only sure way to find out if the chip is functional is to get another one. <S> If that works, the first chip is faulty. <S> I always buy at least two of any MCU. <A> Are you looking for a general solution to verify RAM, Flash, and peripherals, or just to determine if it's still programmable? <S> It reads like you're looking for the latter, but I'm not sure that's wise. <S> If you've exposed it to conditions outside its ratings, it's likely to have something wrong with it. <S> Whether you discover it now, later, or never (there was nothing wrong), I wouldn't want to have to keep asking myself <S> "Is it the MCU?" <S> every time there was a fault. <S> If this is for production, you should have a test set, which verifies all the functions of your device. <S> In that case, if it passes the tests, it's good. <S> If not, toss it. <A> Is there a sure-fire way to detect every failure? <S> No. <S> Failure or damage can occur in a variety of ways, some of which are very subtle. <S> Some failures are obvious (failure short-to-ground, for example). <S> On the other hand, if you have damage to an onboard peripheral which causes 1 bit error every 500 bytes, how would you check for it? <S> Anyways, I would imagine that the PIC may be ok. <S> I once accidentally ran a PIC12 on 12V for long enough that it actually melted my breadboard (the voltage regulator failed short input-output), and it apparently kept working fine, it just got really hot.
Fundamentally, ass you can really do is exercise whatever aspects of a device you are intending to use, in such a way that any erroneous behavior is detected.
24bit or better ADC at 10V with at least 100ksps? I have a signal from 0 to 10V dc. I need to 24bit or better ADC that signal at 100ksps or greater. I can't find ADCs that will do that, they either read at lower voltages or not as fast. I have contemplated using a normal ADC with a MUX http://www.sparkfun.com/products/9907 and tune each section to a seperate voltage range, then scan till its in range and ADC the signal then. I didn't want to have to manipulate the data that much. Or use a 4 2.5V ADCs using relative ADC line references and scan 0 - 2.5, 2.5 - 5, 5 - 7.5 , and 7.5 - 10. Then add them together in the end to get the total ADC. I would like to do this on one chip or know a "good" way to do it. Thanks for the help. <Q> If you're feeding this to a MCU or similar, I would use a basic resistor voltage divider to cut the 0-10 V to 0-5 V or similar. <S> I might pad the range a little to avoid saturation near the top-end due to tolerances, and maybe add some clamping diodes depending on the application. <S> Many MCUs are capable of 100 ksps nowadays, some DSPICs can even do 1 Msps. <S> Random anecdote: <S> One of my first PCBs I had made as an intern was a big resistor divider array for our test engineers who had to connect automotive analog stuff (0 V to BATT; 9 to 16 volts) to their 0-5 V DAQs. <S> Additions <S> 24-bit <S> @ 100 ksps...not doable with any MCU (I know of). <S> You can use oversampling and decimation to hit 24 bits, but you take an effective 4x sample rate hit per bit of increased resolution. <S> I don't know about your application, but I might try to cheat and go with a 96 ksps rate. <S> 96 kHz audio is fairly common nowadays, so it might be easier/cheaper to get an ADC for that. <S> Possible parts available @ <S> DK: <S> 108KHZ <S> 10-TSSOP <S> (Cirrus has a few others, CS5346-CQZ, CS53L21-CNZ) <S> Analog Devices AD1974YSTZ-ND - IC ADC 4CH W/ON-CHIP PLL 48LQFP <S> Texas <S> Inst. <S> PCM1808PWR <S> - IC ADC 24BIT STER <S> 96KHZ <S> 14-TSSOP <S> In any case, regardless of the IC, halving the range per bit with a voltage divider is a very clean and basic method, almost assuredly lower noise than passing through any demultiplexer. <A> Robert's MAX197 has a multiplexer, which you maybe don't need. <S> You also don't mention word width. <S> Here are a few single channel ADCs from Maxim: <S> MAX1156 : 14-bit <S> , 135ksps MAX1177 : <S> 16-bit, 135ksps <S> MAX1187 : 16-bit, 135ksps MAX1157 : 14-bit, 135ksps <S> MAX1132 : <S> 16-bit, 200ksps <S> MAX1142 : 14-bit, 200ksps <A> There are a couple of other versions that are similar, but this is a starting point.
Cirrus Logic CS5343-CZZ - IC ADC AUD 98DB Try a MAX197 .
My board works intermittently... when I short some pins I'm trying to get an I2C bus working. I'm using a PIC24FJ32GA002 micro. At the moment it's not connected to any other devices. It doesn't work. I then run a screwdriver along the pins of the MCU and it starts working. Power cycle and it's not working, same trick with the screwdriver and it starts working. The most confusing thing is I do not need to hold the screwdriver there - simply running it across the pins once or twice is enough to get it working. The software is basic, just an infinite loop sending out I2C data. What could be wrong? It's on a breadboard. I'm beginning to suspect a faulty connection, but what about a breadboard would cause it to stop working after power is reset? <Q> Ah! <S> I think I fixed it! <S> And I learned some things about my MCU in the process. <S> I2C is not working properly because of a chip errata . <S> Item 10. <S> Module: I2C™ (I2C1, SDA Line <S> State)When <S> using I2C1, the SDA1 line state may not bedetected properly unless it is first held low for150 ns after enabling the I2C module. <S> In Master mode, this error may cause a bus collisionto occur instead of a Start bit transmission. <S> Transmissions after the SDA1 pin has been heldlow will occur correctly. <S> In Slave mode, the device may not Acknowledgethe first packet sent after enabling the I2C module. <S> In this case, it will return a NACK instead of anACK. <S> The device will correctly respond to packetsafter detecting a low level on the line for 150 ns. <S> The I2C2 module operates as expected and doesnot exhibit this issue. <S> This explains why the screwdriver trick works. <S> I was shorting SDA to Vss when I ran the screwdriver along the pins, which allowed the module to start correctly. <S> It only affects A3/A4 silicon. <A> Here's a checklist - useful to anyone with this kind of problem. <S> Do you have pullups on both of your I2C lines? <S> In an I2C bus, both clock and data lines float, so they can be driven by any device on the chain. <S> An I2C bus needs 2 pullup resistors. <S> Have you checked your I2C signals on an oscilloscope? <S> Are the edges clean, are the timings right? <S> Is your microcontroller connected up correctly? <S> Is reset tied? <S> are all power and ground pins connected up? <S> Do you have enough bypass caps? <S> Is your power supply clean? <S> Is your I2C running at a sane speed? <S> Breadboards and high speed signals don't mix. <A> That PIC24 might not work properly on a breadboard. <S> Good decoupling of all supply pins is essential with the 16-bit PICs, which would be difficult to achieve. <A> I then run a screwdriver along the pins of the MCU and <S> it starts working. <S> Do you mean that the I2C part starts working, or the MCU? <S> Flash an LED during startup to show if the microcontroller is running or not. <S> This may be stabilising the oscillator source enough to allow the MCU to start up. <S> Sometimes it will work without the caps (especially on breadboards which introduce a small capacitance), but I wouldn't recommend it. <A> All VDD and VSS pins connected appropriately, including VDDCORE? <S> ENVREG tied high or low? <S> MCLR pulled up?
Assuming you're not shorting adjacent pins together, then the screwdriver is probably introducing a small capacitance as it touches the pins. If you're using an external crystal oscillator, make sure that you've got the appropriate load capacitors connected (usually in the order of 20pF).
I²C level shifter pulls low side up I am using the well-known I²C level shifter from that appnote from Philips . The 3V side is supplied by an LP2950-3.0 regulator and is loaded only moderate (a few quite lazy 74's). The problem I'm obserivng is that the 3V side is being pulled to 5V. I loaded the 3V side with a resistor and calculated that the level shifter presents a resistance of only 2.7 kOhms. I consider this rather low and I wonder: Is that normal behaviour or did I make some mistake? Isn't this harmful for the devices on the 3V side? There are several ICs that according to the datasheet are explicitly not 5V tolerant, not to forget the regulator. <Q> I've just checked quickly, but your diagram looks good to me. <S> I suspect it might be some other problem, maybe assembly of the parts or something along that line. <S> Could you please check the following for both the SCL and the SDA line, using an ordinary Multimeter: <S> Are you able to measure one diode drop (approx. <S> 0.5-0.75V) across the parasitic diode in the MOSFETs from the 3V side to the 5V side? <S> Do you get a reading of nearly infinite resistance (or at least some kOhms) <S> when connecting the Multimeter's test leads the other way round, i.e. from SCL's or SDA's 5V end to their 3V ends? <S> Please note that these single MOSFET transistors are very (!) sensitive to ESD discharge, so even if you assembled the right parts the right way, they may have some hidden type of damage. <A> OMG, epic fail. <S> However, it could be that I was right (and the BSN20 wrong) in the first place and made the mistake not before I replaced them. <S> I don't know, because I am out of BSN20 and put in BSH108 (which have better specs anyway). <S> Now it works fine. <A> The gate threshold of these parts can be as low as 0.4V at 25C according to the NXP datasheet . <S> What is the measured gate-source voltage? <S> If it's too high you'll have to adjust your pull-ups or choose a MOSFET with a higher Vgs threshold.
I would guess that loading on the +3V side of the MOSFETs is creating enough Vgs to turn the FETs on in the linear region. I just found out that I grabbed from the wrong box and placed all BC857 where there should be BSN20.
24V 3A from ATX power supply? I am looking for a cheap way to get +24V DC max 3A from computer power supply. I prefer easy soldering solution like DIP, and standard components that do not need to be purchased over internet. Any ideas, please? <Q> You can open the supply and look for the TL431 chip. <S> There will be two resistors forming a voltage divider from the 5V rail to the 2.5V that the TL431 compares against. <S> If you calculate the right resistor values, you can set this divider to output half the voltage it currently does. <S> Then you can get the output up so that the +5V rail becomes +10V and <S> the +12V rail becomes +24V. <S> You will probably need to install new output filter capacitors of higher voltage rating as well. <S> And if you modify an ATX supply this way, please cut off the ATX connector and install something else, so it won't plug in to a motherboard. <A> I have done this in the past using 2 supplies in series. <S> The ground for the supply is the wall ground so to make it work I had to take one of the supplies apart and mount the board on nylon bolts to isolate it from the case. <S> Then that supply floats and can be put in series. <S> Not quite sure what happens around the current limit of the supply. <A> I am not sure you can get 3A out of it, but there are both +12V and -12V leads in ATX. <S> You have -12V on blue wire, 0V on black, and +12V on yellow. <S> So it's 24V betweeen blue and yellow. <S> If you need +24V from black wires, you'll have to arrange a boost converter and draw about 6A from the 12V. You'll likely want to use more than one lead then. <A> If you see the schematic of the power supply, you can see that there is no difference between the +12 V rail and the -12 V rail, except the rectifier diodes and the electrolytic capacitor in the output. <S> If you get the rectifier diodes (from another PC power supply) you can put the high current rectifiers in the -12  <S> V. In this way, if you use -12 V to <S> +12  <S> V rail <S> you will get 24 V with 7 A at least if the +12 V is specified with 15 A.
Another way can be by modifying the -12 V rail:
Why are things like RESET/MCLR active low on most ICs? Convention? Easier to implement? Another reason? Is there a reason things like MCLR or RESET on microcontrollers are active-low, that is, you have to pull them down to reset the IC, and pull them up to "run" the IC. I'm just curious because this causes me some problems. If it were active high, I could avoid the capacitor on MCLR required in some instances and deal with just a pull-down resistor. It seems only to add to complexity. <Q> Look at what happens during power-up: Vcc rises to a point where it's high enough to make everything work properly. <S> However, that point isn't clearly defined and may vary from device to device. <S> It makes sense not to use this voltage to reset the controller. <S> It's easy, however, to keep a level low regardless of Vcc. <S> After all, Reset is already active the instant you switch power on, since at that moment everything is at a low level. <S> edit <S> The graph below illustrates how the output voltage of the reset controller (i.c. an MC34064 ) remains low until Vcc is high enough to have the complete microcontroller stable. <A> Wikipedia says : Many control signals in electronicsare active-low signals (usuallyreset lines, chip-select lines and soon). <S> This stems from the fact that most logic families can sink more current than they can source , sofanout and noise immunity increase. <S> Italso allows for wired-OR logic if thelogic gates areopen-collector/open-drain with apull-up resistor. <S> Examples of this arethe I²C bus and the Controller AreaNetwork (CAN), and the PCI Local Bus. <S> RS232 signaling, as used on someserial ports, uses active-low signals. <S> Hope <S> this helps. <A> In addition to Igor's answer, there are two minor reasons why active-low signals are used: <S> In addition to the amount of sink current available being higher than source current, it is easier for TTL circuits to produce a voltage that is close to ground (just a Vce drop) than a voltage close to Vcc <S> (Vbe drop + usually a little more). <S> If you use an active high signal, you need to make Vcc available to those external circuits, which carries a risk of the Vcc node being shorted to ground. <A> There is no reason to change it. <A> It's not uncommon for different parts of a system to be powered by different supplies which share a common ground. <S> This may be because some parts need 3.3 volts while others need 2.0 or 5.0, because some parts may need to be powered on and off separately from others, because some parts may generate a level of electrical noise on their supplies which other parts would be unable to tolerate, etc. <S> In some cases, the circuitry which generates a reset may not operate or be controlled by the same supply that operates the CPU. <S> Having the reset generator on a different supply from the CPU is not a problem if one is using an active-low reset and either the CPU can tolerate voltage levels above VDD or the reset line can be weakly pulled high by something attached to the CPU supply. <S> As a simple example, imagine a 3-volt CPU which is interfaced with 5-volt chips. <S> The external circuitry will malfunction in arbitrary fashion if VDD drops below 4.75 volts and would require reinitialization after voltage rises above that point. <S> The CPU itself might be able to run code just fine if the main supply voltage drops to 3 volts, but might not be able to do anything useful; the cleanest way to ensure that the external hardware will get initialized after VDD rises above 4.75 volts will be to reset the CPU whenever VDD is below that point. <S> Using an open-collector reset chip and a passive pullup to the CPU's VDD would be the simplest approach. <S> About the only disadvantage to that approach of handling reset is that a passive pull-up will consume current continuously while the system is in reset. <S> In systems powered by mains, energy storage devices [capacitors] expect to be drained completely dry without damage. <S> In systems powered by rechargeable batteries, however, draining current from a discharged cell may cause excessive wear. <S> Even in systems powered by disposable batteries, continuous current draw may undesirably increase the risk of batteries "venting" [spewing goo].
It is easier for external passive circuits (e.g. pushbuttons or limit switches) to safely produce an active low signal: just use a pullup resistor on the receiving end, and on the external source end, short the circuit node in question to the ground potential. Sinking more at low levels, and active-low signals in general dates back to the days of TTL - now it's just a common convention.
What causes turning ON a single output pin on Microchip PIC16F690 to spontaneously turn OFF another pin on the same port? What causes turning ON a single output pin on Microchip PIC16F690 to spontaneously turn OFF another pin on the same port? I can work around this problem by writing a byte to the entire port, controlling all pins simultaneously, instead of just a bit to control the pin state. I'm using the Hi-Tech C compiler here. I am determining the state of the pin with 9 LEDs each consuming 3 mA. This is way below the max power specs. The mplab header file has the 0 pin on port A declared as such: volatile bit RA0 @ ((unsigned)&PORTA*8)+0; I am turning the pin on by writing a high value to it. RA0 = 1; Is the problem that the complier is treating the "1" as a byte and writing to the whole port?Do I need to cast it? If so, shouldn't have the complier given me an error? RA0 = (bit) 1; If I write to the whole port everything works as expected: PORTA = 0b00000001; <Q> It's the well-known read-modify-write problem, you will find details in the data sheet. <S> The 18F and 16-bit devices don't have the problem. <S> There is a good description on page 2 in this document . <S> Changing bits in a "shadow" register then writing the register to the output port is often used to get round the problem. <A> Make sure you have the port you are using defined as digital. <S> ANSEL = 0 <S> ; <S> If a port is defined as analog and you do a digital read it returns 0. <S> So, when the PIC F16xxx does the read-modify-write operation it reads 0 on all analog pins. <S> Then is writes 0 back to all these pins. <S> If you have ANSEL set to 1 for PORT B <S> the code below will turn on PORT B for 500ms, then read PORTB as 0b00000000 <S> (because it is analog). <S> Then turn PORTB off because it thought it was off. <S> ANSEL = 0b11111111; TRISB = 0; PORTB = 0b11111111; __delay_ms(500) <S> ; current = PORTB; <S> PORTB = current; __delay_ms(500); Make sure you set the corresponding ANSEL bit to 0 for any pin you want to use as digital! <A> I use Microchip's compiler. <S> It has a header file where all the registers have a union with the bits defined. <S> So, in my code I write: LATAbits. <S> LATA0 <S> = 1; Also, I would use the latch register instead of the PORT register to set the output. <S> I think some chips don't care, but some do. <A> I'm 99% sure the compiler is doing this. <S> The bit casting might help <S> but I don't know how (bit) is defined <S> so I can't be sure. <S> The compiler won't necessarily give you an error if the value being written to the pin is of the proper type - I'm guessing the (bit) mask might trigger some logic to preserve the state of the other pins but still return the same type as your constant. <S> It's not surprising that writing to the port itself works - but working with individual pins is much more complicated. <S> Either there's a bug in the code provided, it wasn't meant to be used with this compiler or you're just not using it correctly.
Whatever structure is defined to access the pin has ambiguity in it that the compiler is resolving to create this behavior. You have to write to the whole register, as you have found.
Making a plastic card that looks like a credit card with a long-range module inside Does anyone know how I could make a card the size of a credit card with something like a GPS/bluettoth/RFID module that could be detected from a relatively long range. The purpose is to see where this card is on a map for example. Are there GPS modules that are that small? If someone could direct me to some tutorials or help. EDIT: Really the idea is, If I ever lost my wallet for example, I could track where in the house I lost this wallet. A lame example but this is the basic idea. Thank you. <Q> If your goal is to make some sort of tracking device that you could find somewhere further than you could throw a ball, RFID and BT are out. <S> You could take the components commonly found in cell phones and boil it down to only what matters for this application: a GPS module and a cellular radio. <S> Both could be made quite thin, the limiting factor would essentially be PCB thickness, IC height, RF shielding, and battery. <S> To access anyone's cell network you will need a SIM card or other method for them to bill you. <S> Be aware that designing a circuit to be thin (let alone credit-card thin) and with a high level of integration is a very difficult and very costly problem. <S> There's a reason a Droids and iPhones cost $500+, even when sold by the millions. <A> I've looked in to this a fair amount for some projects that I was considering. <S> In short, it is possible(ish), but hard. <S> A handful of companies offer solutions doing this intended to track items in warehouses, and they are expensive. <S> Here is a more detailed (although slightly old) discussion on using RFID tags and multiple readers to determine 3-space position of the tag. <S> There have been some advances, but the fundamental theory and difficulties are the same. <S> The main problem you will run in to if utilizing another solution is power storage. <S> RFID in its various incarnations is the only passive communication technology. <S> You can get much more accurate results from sound or possibly some sort of RF beacon (would be expensive due to the tight timings needed to get accuracy), but you need some sort of battery to run the thing. <S> Batteries are thick, so that probably knocks the "credit card" size out. <S> Wireless power and low-power micros have come a long way in the last few years, so it might be possible to blast your space in enough power to get something more complex to work. <S> I'm not aware of any wireless power technologies on the market that work at more than inches, but they are coming. <S> Good luck :) <A> Is that form factor absolutely necessary? <S> Consider if instead of a thin card, you could have a small box - smaller than a matchbox. <S> Would it be an option? <S> I'm asking because Telit has a module that integrates GPS+GSM, and is programmable via python. <S> You only have to add the antennas, a battery and a SIM chip. <S> http://www.telit.com/en/products/gsm-gprs.php?p_ac=show&p=7 <S> I don't know about other manufactures, but probably Telit isn't the only one to offer such a product. <A> What's available depends on where you operate and what you can get and are willing to use I suppose. <S> A couple of ideas: Closest that comes to mind is a modern cellphone with GPS (for locating itself) and GSM/3G/other network for communicating that location. <S> Not quite credit card, but same kind of shape. <S> Imagine the data modem and GPS parts there <S> and it might give you an idea of the complexity and size of that method. <S> Reception might be enough for "detecting" it, as the question says. <S> There are also some microcontroller devkits that carry radios in 400-800-900-2400 MHz bands that might have fair range outdoors (maybe even legally). <S> Bluetooth is clumsy, elaborate and primarily short range. <S> Then there's also PMR, but I'm not aware of anything smaller than a stripped radio phone / baby monitor for that. <A> Since your goal is to track a lost wallet in your house, you could just look for an appendage for a key ring chain that replies when you whistle to it, and put it into your wallet. <S> Then just whistle around the house and it will reply. <S> Cheap and simple. <A> If you limit yourself to staying indoors and place location beacons around your house, you can track position using ZigBee. <S> Overview: http://www.smallformfactors.com/articles/id/?3041 <S> App Note: <S> http://focus.ti.com/lit/an/swra095/swra095.pdf <S> Essentially, you place a bunch of radio beacons in known positions then use the RSSI (Received Signal Strength Indicator) in the mobile node to calculate location.
You might also be able to make a small (more or less legal) simple radio beacon (quite slim with SMT) and see if you can track that with RSSI or AOA or other location methods.
maximum trace temperature on FR-4 What is the maximum temperature you would recommend for an isolated trace on the surface of FR-4? (I.e.: not an inner-layer track.) Is there an IPC recommendation? Does it really matter if it is past the glass transition temperature ? (What is this value for FR-4? Wikipedia says "above 120C".) I mean, even if it's soft, will the track still stick with high reliability? 'Suppose what I'm looking for is a MTTF vs. temperature (vs. trace area) set of curves, but experienced guesses are encouraged. This is useful when calculating trace widths vs. temperature rise. I've always limited traces to the lower of about 100C or whatever the connected parts can manage. [For the Mech-E, Chem-E, and Mat-E: I guess the question can be boiled down to the intersection of shear stress between copper and FR-4 caused by differences in thermal expansion, which would be related to track width, and the decrease in shear modulus as temperature rises.] <Q> This is not my area of expertise <S> so I cannot point you towards any MTBF data <S> but I work with tools that routinely operate in environments up to 175° <S> C <S> so I can tell you from experience what I watch out for. <S> Voltage regulators with thermal protection. <S> These usually cut out about 125°C. <S> Solder. <S> Depends on the lead/tin ratio this can vary greatly. <S> You have to check the rating on each type <S> but you can typically get solder that doesn't melt until around 220 <S> °C Components vary greatly. <S> You have to read the datasheets carefully. <S> For instance, a microcontroller might be rated to operate at 125°C but that is 100 MHz. <S> If you only run it at 12 MHz it might run much hotter. <S> There is a good article here that talks a bit more about this. <S> I haven't experienced any trouble with traces separating from the boards before these other failures occurred. <A> Individual parts may become hotter (e.g. a MOSFET or diode in a TO220), but the solder joints (and the traces) must be at or below 130°C. <S> This maximum temperature of 130° <S> C seems to be reasonable not only with regard to safety approvals, but also with regard to what the board really can take. <S> I have taken boards out of the climatic chamber with some parts' temperature readings at ca. <S> 170°C, and dames en heren, that smell was bad and that board was black! <A> I suspect you will render any ICs on the board useless due to high temperature long before the copper and FR-4 become a problem.
AFAIK, safety regulations (e.g. UL) require that the temperature on solder joints and traces be lower than 130°C for regular FR-4 material.
Is there a voltage regulator IC that takes PWM input? I am looking for a small IC that provides a regulated dc voltage based on the duty cycle of the input. This is probably asking for a lot but does anyone know if one exists. Essentially I need a low pass filter but I need to conserve board space as much as possible as I am VERY limited. Also, I have done LPF's in the past with just a resistor and capacitor but I can never seem to get the noise out. I usually end up with at least 20mA of ripple. My PWM would likely be 3.3V pk-to-pk but I could also manage 5V as well. Any ideas? <Q> I doubt such a device exists. <S> A PWM signal as such is not a good start to generate a stable output voltage with as little ripple as possible. <S> The regulator would require a filter with a rather large capacitor (I guess you want to draw some current from it), which will need to be external anyway. <S> It wouldn't save you any space in any case. <S> If your PWM signal is to supply power, and not just a voltage, you'll have to provide a power driver, since PWM signals usually only provide a voltage. <A> You didn't provide any specs on how small you want to go <S> but you could consider an op-amp as a voltage regulator with a small pass transistor and LPF for the reference. <S> If you have an adjustable regulator, consider a digital potentiometer. <A> If you have access to the regulator's voltage reference, you could use the PWM signal to lower the V_ref according to the PWM's duty cycle. <S> Will be slow, because you will need a significant low pass filter, but it might work.
Or, you could look for programmable voltage regulators; these are usually SPI or I2C.
Why does solder turn dull grey on my iron and exhibit poor wetting? I have a relatively new soldering iron. I can't remember when this started(and I've only used the iron 5-10 times) but I stopped being able to tin the tip. When I stick soldering to it it just balls up in one spot on the iron and then after 5 or 10 seconds on the tip, the solder turns a dull gray color(rather than shiny silver). I have used nothing out of the ordinary on it. Only a brass sponge, a wet piece of cloth, and solder tip tinner/cleaner(which I only just started trying to use). Even with the tip tinner, the tip will stay shiny(and conductive) for about 5 seconds and then rapidly turn a dull gray color, eventually even with a few black spots. Is there something I can do to fix this? Did I just get a lemon tip or is this all normal(note I'm sorta new to soldering still) Also, the soldering iron is this one with the included tip <Q> Soldering iron tips should never be "clean" from everything. <S> You must maintain a small amount of solder on them at all times to avoid oxidizing the iron plating (as in Fe iron, major component of steel, iron). <S> After brushing excess solder and flux from the tip with a sponge, reapply a tiny bit of clean solder. <S> Tip tinner should only be used sparingly as it is fairly aggressive and will ultimately eat through the iron coating. <A> You get what you pay for with soldering equipment, you can't expect much for $9.95! <S> Get a good quality temperature-controlled iron. <A> Either it's oxidized, not getting hot enough, or both. <S> Unscrew the tip and check the contact with the heater. <S> Scrub the heck out of the tip with your brass sponge and dip it in a bit of flux. <S> Hopefully it's not pitted. <A> I have used nothing out of the ordinary on it. <S> Only a brass sponge, a wet piece of cloth, and solder tip tinner/cleaner( which I only just started trying to use ) <S> So you've never tinned your tip? <S> If that's the case then that's your problem. <S> Buy another tip, TIN it, and always make sure you tin it before storing it. <S> NEVER store it "clean" or it will oxidize and you will have a bad tip. <A> It doesn't necessarily mean your tip is too hot etc. <S> , sometimes it might well be low quality solder. <S> I bought two rolls of solder (a 1lb and another 1/2lb) <S> when I'm using it I kept getting this same result: While my iron is on it <S> it's pretty shiny <S> but as soon as I move the iron it turns to a matte grey colour. <S> I ended up buying another 1lb spool 60/40 Nippon America brand <S> and it's perfectly shiny after every joint, <S> however this solder <S> I end up getting <S> is a bit too thick for my daily use at 1.2mm. <S> I still uses my low quality solder though because it still gives a good joint just not shiny, I uses my NA brand solder now as just a tip tinner and tin the tip with it when I putting it away, it leaves the tip with a shine when I'm done with it. <S> Here are some tips: Try not to leave the iron too long on the joint because you can damage the pad and burn away the flux resulting in a poor connection. <S> Always tin your tip before, during and after soldering to prevent oxidation. <S> With practice you will master this skill, soldering isn't hard to do just keep on practising. <S> Have fun and happy soldering.
If your solder turns a dull grey, that would be due to it's oxidization, which means you're either waiting way too long or the iron is way too hot.
Is there any way to acquire -12 V from +12 V? Is there any way to get -12 V (DC) using only: +12 V DC Ground OPAMPs Resistors Capacitors Inductors Diodes <Q> Label the wire which is currently ground "-12V". <S> Label the wire which was previously 12V <S> "GND".(There is no step 3) To test: <S> Connect a DMM's ground lead to the wire you've labeled "GND". <S> Connect the positive lead to the wire you've labeled "-12V". <S> The display will read -12 volts. <S> Of course, this won't work if you've got any other signals referenced to the original ground, so it's rather tongue-in-cheek. <S> Just wanted to point it out in case <S> it wasn't obvious. <S> More seriously, my solution would be a charge pump driven by an RC oscillator. <S> Without transistors, this will limit you to the output current of your opamps. <S> On further consideration, it might not be possible due to the problem of bootstrapping your opamp power supplies. <A> Of course, you can make nearly anything with all of those. <S> Normally one would use a dedicated SMPS controller, with internal oscillator, and gate driver along with a handful of transistors to implement these, but apparently you can't use them. <S> You must design a harmonic oscillator out of inductors and capacitors, then buffer and clean up (make square) <S> this signal with op amps. <S> With this chopper signal you can implement either of the above SMPSs as well as stabilize the LC oscillator (it will die). <A> LM7660 or equivalent * <S> 7660 part. <S> Have a look how it works, it is fairly easy to implement with an op-amp and a few external components. <S> I'm not going to do all your homework, though.
Depending on your current/power requirements, you are looking at one of the following switching supplies: charge pump : a personal favourite, requiring only a cap and uC pin boost, with its many variants
Best way of making a battery powered USB charger? I recently made a USB charger that takes a 9V battery. I've noticed it doesn't work with a lot of devices though. It was very simple though, just a 5volt regulator hooked to a USB plug and 9V battery and a switch. Note: I'm wanting to use what I have on hand(all sorts of capacitors, resistors, and 5v regulators) so the minty boost is out of the question(requires some components I don't have any of, such as inductors) So what did I do wrong? I just shorted together the data+/- pins(bad idea now that I've thought about it). Should I have these hooked to something or just left unhooked? Also, should I worry about installing a 500mA PTC fuse? And lastly do I need any kind of capacitors to handle any rippling and such? <Q> I just shorted together the data+/- pins(bad <S> idea now that I've thought about it). <S> Nope. <S> That's the standard, actually. <S> The official USB Battery Charging v1.2 <S> Spec is almost completely unreadable, but it does say: A Dedicated Charging Port (DCP) is a downstream port on a device that outputs power through a USB connector, but is not capable of enumerating a downstream device. ... <S> A DCP shall short the D+ line to the D- line. <S> The the current is literally limited by the charger. <S> There is no negotiation of what the device is allowed to draw, the charger just drops its voltage when the device tries to draw more current than it can handle. <S> (And the device then has to lower its draw in response or the charger shuts down?) <S> Of course, Apple has to do it their own proprietary incompatible way for iPods and iPhones: <S> The mysteries of Apple device charging The nice thing about Apple is that they tell the device how much current it's allowed to draw, and it obeys. <S> And the phone manufacturers had their own ways before the standard, usually using the ID pin: USB charger specifications and compatibility list <S> I don't know if there's a circuit that will work with all of the above, but if you find one, let me know. <A> What devices are you charging? <S> Latest generation iPod touches and their ilk require some resistors on the data lines; apparently to detect if the charger is an authorised Apple one. <S> http://www.ladyada.net/make/mintyboost/icharge.html <S> It's pretty simple <S> - just 4 resistors. <S> Don't worry about the PTC. <S> Most linear regulators have thermal limiting and current limiting. <S> It's pretty difficult to damage a properly designed linear regulator. <S> Remember with a linear regulator excess energy <S> is dissipated as heat. <S> Power dissipation in a linear regulator is (Vin - Vout) <S> x Iout. <S> So for 0.5A out, 9V in and 5V out, the regulator is dissipating 2W and providing 2.5W to the device; 4.5W in total, with an efficiency of about 55%, which is pretty poor. <S> But, it may be fine for your application. <S> Almost all linear regulators require small decoupling capacitors. <S> Most require 100n caps on input and output, but some require larger bulk decoupling. <S> Specifying exactly which regulator you are using would help. <A> I am going to link you to an answer I wrote with respect to the USB charging spec. <S> I hope it can be of help.
It varies from regulator to regulator.
Using multiple power supplies to increase current I need 1300mA at 3.5V, but the highest power AC-DC wall adaptor I have is 1A 12V. Is it possible to use two of these to get ~2A? I'm thinking that diodes would be needed from the positive pins of the supplies? <Q> 1A at 12V is 12W ( P = IV ). <S> You can step the voltage down to convert this power into more amperage. <S> Specifically, at 3.5V you could get up to 3.4A. Bear in mind that conversions will introduce power losses. <S> What is the load? <S> You may not even have to limit voltage -- only current. <S> To answer your question directly, it depends on the type of wall wart. <S> There is a danger when paralleling sources that one of them takes more of the load than the other. <S> This is especially true with regulated or switching supplies, which have feedback systems to regulate their output voltage. <S> It should not be much of an issue when using identical supplies that are a simple transformer, full-bridge and low-pass filter. <S> They won't be perfectly matched, so don't use them to a full 200% of either's power limits. <S> You could put current-sense resistors inline with both to measure their contribution to various loads. <A> And the resulting output voltage is still 11V <S> (12V minus the diode drop). <S> Going from 11V to 3.5V at 1300mA by means of a linear regulator will result in a 10W dissipation in the regulator. <S> That's more than twice the power you actually need, and almost as much as one wall wart can deliver. <S> One wall wart can deliver 12W and you need 3.5V \$\times\$ <S> 1.3A = <S> 4.55W. <S> That's only 40% of the available power, so we only need a 40% efficient conversion. <S> Piece of cake for an SMPS (Switch-Mode Power Supply), aka switcher . <S> This one from Linear Technology will give you even 85% efficiency, so that you'll only draw 0.45A from the 12V wall wart. <S> This is a typical application for 3.3V out, for 3.5V replace the 316k resistor with a 343k type. <S> Another well-known switcher source is National Semiconductor. <S> Their Webench applet designs your switcher to your specifications and gives you a schematic including BOM. <A> Basically a DC-DC converter will do that, but I guess the cost of making/buying such device is more than another adapter. <S> You could maybe add 2 diodes in series of the output of an adapter and connect them together after that, so they won't be able to feed each other. <S> If you're using a linear regulator after that to get down to 3.5V, that won't be much of a problem.
You could 'solve' the need for parallel supplies by using a switch mode supply after your adapter to get the voltage down and have a respectable amount of current going out. You could try to parallel two wall warts with diodes, but I don't recommend it, because it requires two closely matched output voltages.
Can I break batteries by putting them in the wrong way? If I put in batteries the wrong way (+ and - sides reversed), is there a risk that I will break them? Or the device? Or start a fire? In particular, I am talking about rechargeable Ni-MH eneloops and cheap electronic toys for kids, and most of the time not all of the batteries are put in the wrong way, just some of them are reversed (which is probably even worse, right). <Q> Consumer Devices <S> Almost all consumer electronics have protection in place to prevent any damage when connecting the battery backwards. <S> Companies know they can't trust consumer to put the batteries in the correct orientation and it is usually cheaper for them to add the protection <S> then it is to deal with support calls and returns. <S> Batteries in your own device <S> If you are wanting to make your own device, you will need to add protection or it will be almost guaranteed that you will have ICs that smoke. <S> The battery itself probably wont be hurt. <S> They can output ALOT of current. <S> Because of this the batter will only have a short time where it is having to put out a lot of current. <S> How to protect your device <S> The easiest way to protect your electronics is to put a fuse in-line with your battery. <S> This is a good all-purpose fail safe. <S> Fuses are too slow to blow to protect all ICs, but at least it prevents your project from catching on fire. <S> If you place a single diode in series with your battery you can prevent any current flowing in the wrong direction. <S> Do be prepared to see a 0.7v drop across the diode. <S> You can also use a 4 diode configuration to allow your circuit to continue to work regardless of how to battery gets connected. <S> This disadvantage of this method is that you have 2 diode drops (about 1.4v). <A> If you put one of two batteries the wrong way, then there's no problem, neither for the batteries nor for the device; total voltage is + <S> Vbat - Vbat = <S> 0V. <S> No voltage is no current, so your batteries won't discharge. <S> It's just that the device won't do a thing. <S> If you reverse both batteries the result may be worse: most likely the device will be damaged, esp. <S> if it's electronic. <S> The batteries may survive without too much damage unless the reversal causes a short circuit. <A> The designers may not added a protection circuit (i.e. a diode) because it's battery powered and they need all the voltage they can get. <S> If a device causes a short, that can damage the batteries. <S> Otherwise it's more likely that the batteries will damage(destroy) <S> any IC that gets a voltage outside their maximum ratings. <A> The answers I read here assume a single battery or several batteries in series ( + connected to - ) <S> .There are however devices in which batteries are connected in parallel ( + to + and - to - ).This is to increase power rather than voltage. <S> I have some Chinese samples and none of them has a protection of any kind. <S> And powerful they are !!! <S> Should you put one battery in the wrong (reversed) <S> way, you make a bomb !!! <S> Extremely high current will flow in circle through 2 batteries. <S> They will rapidly heat up and explode, causing fire and personal injuries hazard. <S> There are some exploding 18650 Youtube videos around to watch. <S> The best self-defense I see is to cut the plate making the + contacts in separate pieces if not already to connect them to the + source through a resettable fuse each <S> Of all the measurements I made, current never exceeded 1.5A per battery. <S> But the power pack rating may be up to 2A, 2.5A max. <S> So, the fuses choice could be 10×2A SMD @ <S> 1.85€ or 10×3.5A SMD <S> @ 2.75€Wired fuses are more expensive. <S> That's what I'm seeing right now on eBay. <S> Or just a thin wire. <S> At what current does a multistalk wire stalk melt?
If you put in both batteries the wrong way and apply a negative voltage, your device may be damaged. All of your ICs and polarized caps will usually break in such away that they will act like an open circuit. A typical case is a so-called "power bank" in which up to 6 18650 batteries may be in parallel.
Is passive GPS retransmission possible? Is it possible to passively pipe GPS satellite signals indoors via a waveguide, or 2 antennas connected by a coax? If so, with what type of waveguide, antennas, coax, etc. should I try and experiment? Thanks. <Q> We've done this for a development project that involved GPS reception. <S> We just wanted to be able to get a GPS signal indoors at our engineering office, for basic development of the GPS drivers. <S> We put a good quality GPS antenna on the roof, with coax going down into the office below. <S> On the ceiling of the office, the coax connected to a GPS-band RF amplifier, which output through an antenna also on the ceiling. <S> It was a low power amplifier, so it only radiated an effective signal over a short distance within the office space--less than 10 metres. <S> But that was enough to serve our purposes. <S> The other equipment we used sometimes was a GPS simulator, which simulated a bunch of satellites, and could convince a GPS unit that it was at any location of our choosing. <S> It radiated through an antenna, again, at low signal levels so it disrupted only a small area. <S> And we only used it indoors, within our offices. <A> You could use a large antenna on the roof, pipe the data through an RF channel and then radiate it into the building with another antenna. <S> Expected Problems <S> If you place an antenna on the roof and pipe signals into the building and then receive them in the building, you are effectively making the point you are receiving at the antenna upstairs. <S> Once they hit this point they are piped in series into the building. <S> The noise will be a problem, each antenna will lose power and the cabling with have loss. <S> I would suggest an RF amplifier connect at the antenna end on the roof, if not, one inside will still give an improvement. <S> This will make getting a lock much easier (if you do have problems). <S> Some suggestions <S> I would suggest coax cable, running a waveguide is not very feasible. <S> A waveguide will be easier to pipe the signal in with, but will make your power amplifier hard. <S> Your antenna on the roof needs to have a wide receive angle. <S> This will take some research, you will probably want a high effective area to receive as much power as possible. <S> Inside you will want an antenna that is very directed at the location you want your device for the best receive. <S> I would suggest a horn antenna. <S> I did this quickly, I will spend more time on it later if I can <S> , I think this gives a general idea. <S> Getting this to work will not be easy. <S> Please let me know if there is something specific I can add to help. <A> We provide equipment that will bring the GPS signal indoors. <S> Yes, you need a passive antenna and an active antenna - you have to be able to calculate the correct amount of cable and possibly the use of an amplifier. <S> All of this is regulated by the FCC. <S> Unless you are a Federal agency, part of the military or using this in an anechoic chamber, you have to apply for a license from the FCC. <A> This seems like a lot of work, for very little gain, to me. <S> You would have to subtract the lengths of each of the waveguides from the distances calculated by the GPS receiver electronics. <S> In fact it's more complicated than that: the signal would reflect around inside the wave guide, making the apparent length longer than the actual length. <S> My suggestion: put the receiver on the roof, in a weather-proof housing, and then send the coordinates wherever you need them, wired or wirelessly. <S> Edit: I think I didn't understand the point of the OPs question. <S> I thought he was interested in putting GPS in a moving vehicle like an RV. <S> If Ian's assumption is correct and OPs goal is to test a GPS from indoors, then my suggestion won't really work either. <S> But make sure the coax is just the right length for the frequencies used - GPS signals are very weak and any line losses would certainly cause problems. <A> Note: I think the other answers for this are better than mine. <S> Just wanted to throw this out there, especially if you use an active device. <S> This is effectively building a GPS repeater. <S> To my knowledge, at least in the US, there are regulations as to when/where you can use one . <S> It can be done, there are devices to do it if you look around (how else would people design devices that use GPS if they had to be outside all the time???), but you need to meet regulatory standards and the rules so as to not interfere with others.
I think the only solution possible would be to use a piece of coax with an external antenna.