source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
Can you send data usefully over one wire, literally one wire? It is possible to design networking systems that only use two wires: one for data and one for a common ground. Examples include 1-wire and Pin&Play . These are called single wire systems because the requirement for an earth wire is implied too. But you can also get systems to extend home networks that use the home earth to connect network points, like Power Line Communication . How is this possible over just one wire? == EDIT == From the answers (thanks!) I think I failed to word this question clearly. Let me try again. Can you send data usefully over one wire, literally one wire? Radio is zero, 1-wire is two, but is it possible with one? "No, and here's why" or "Yes, here's how it is done in X" are the kind of answers I am hoping for. (N.B. I'll also change the question title from "Single wire systems need two wires; so how does ethernet over ground work?" to "Can you send data usefully over one wire, literally one wire?") <Q> Over a very limited range - yes. <S> You will need to have a return path that is supported by electric fields. <S> The best way to look at this would be like a AC coupled circuit - coupled through a capacitor of which the capacitor is formed by some plate that the circuit is coupled to and another plate that is providing a return path. <S> We know that electric fields can couple over long-ish distances, some Anti-aircraft proximity fuzes from WWII used an e-field detection technique that would trigger the bomb because the shell and the aircraft would be carrying different levels of charge and thus e-field lines would form linking the two and thus change the capacitance in an internal circuit. <S> This in no way violates physics, it's best to view it as a capacitor that is so physically large that you can walk between the plates. <S> However, the actual capacitance value would be very small. <S> uChip just released some technology that uses a similar effect that is called GestIC and they couple with E-Fields. <S> Here they couple on both the top rail and the return path <S> so it is a "Zero" wire solution. <S> But it will also work if you ground one of the plates inside the remote device to one polarity of the plate in the "pad". <A> Yes it is possible, but only really as a extension to radio if you don't want to consider systems that use a implied second conductor, like the earth. <S> Radio works, so you can use the single wire to greatly decrease the loss between transmitter and receiver. <S> With radio propagating thru space, the power per area falls off with the square of the distance to the transmitter. <S> The falloff with a wire is quite different, with modest distances yielding less loss. <S> The loss in a wire is exponential due to ever-increasing resistance, so eventually radio actually wins over wire. <S> Some old commercial power distribution systems worked this way, with the earth carrying the return currents. <S> If you can send power this way, you can also send information this way. <S> However, no such power systems are being built new, and I think all the old ones have been phased out and replaced with full out and back wires. <A> There is such a setup, called a Goubau line - but it actually requires the wire to be terminated with antennas, as it is more of an open-faced waveguide than an electrical circuit. <S> Like a waveguide, it won't be DC coupled and won't be practical for operating frequencies below the shortwave RF range. <A> EDIT - because of the reshaping of the question. <S> my answer at the bottom isn't that relevant. <S> To the edited question: - "Can you send data usefully over one wire, literally one wire?" <S> My answer is "Not with any level of success". <S> Reasoning - if you are sending signals you need a forward and a return path for the current. <S> If the return path is tenuously connected (such as through the ground), any ground interference in the vicinity of the return path adds to the signal received and has a tendency to corrupt that signal. <S> However, couldn't the ground be classed as a wire? <S> Avoiding this issue, if there were a tenuous ground connection that is validated as not adding an extra wire, the answer could be "Yes <S> " providing the transmitted signal was powerful enough to overcome natural and unnatural interference in the vicinity of the return path. <S> If the signal were RF and transmitted via "a single wire" such as an antenna you could argue the answer is " <S> Yes" but would the receiving antenna be counted as a wire making the RF argument null and void? <S> Ultrasonic signalling or optical signalling don't need wires to make a connection so they are invalidated in my answer. <S> Answer to question before revision <S> : - I use zero-wire systems quite a lot - these receive their power and transmit data using NO (repeat NO) interconnecting wires. <S> Data transmission is a little under 1Mb per second and of course for a (decent) network that is dreadful. <S> Ditto for powerline comms and 1-wire and Pin&Play ( <S> worst of the lot). <S> If you want a decent high-speed network then wide-bandwidth systems are required and twisted pair is needed to get any reasonable distance between offices. <S> WiFi is good but this uses sophisticated modulation techniques and radio to achieve high-speed - the ones in your home haven't got a lot of range though. <S> Yes you can design networking systems that only use two wires but they would be significantly faster and less-prone to errors if they were a balanced pair. <S> You can even phantom power equipment connected to them just like 1-wire <S> (2 really) does. <S> Don't be hoodwinked by all the marketing up-front blurb
You can also have what appears to be a single wire system by implicitly using some nearby large conductor, like the earth, as the other "wire".
Why does my AVRISP MKII Programmer not work? I am using Ubuntu and I am trying to upload a hex file (called src.hex ) to my ATtiny85 with my AVRISP MKII programmer with avrdude. But I get a strange error. I run this command: sudo avrdude -p t85 -c avrispmkII -P usb_device -U flash:w:src.hex I get this error: avrdude: stk500v2_command(): command failedavrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Target not detectedavrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. I have all pins connected correctly, I have my programmer plugged in my computer, I have the cdc-acm module running, and I have a .rules files places in the director /etc/udev/ (from this question). How can I resolve this error? <Q> Assuming everything is hooked up correctly, target microcontroller is turned on, then... <S> ISP mkII is running too fast for target device. <S> (shouldn't be a problem out of the box I dont think, but if the target is running slower it can be. <S> The -B flag can be used to slow it down, I'm not sure how it works with the mk2, though. <S> Target has no clock - fuses have been bungled, crystal isn't installed if it is set to crystal, no external clock if it is set to external clock. <S> Some peripheral you have <S> it hooked up to it <S> is overloading / driving the SPI lines, causing bus contention. <S> Or your reset circuit won't let reset be pulled low, or low fast enough.(too much capacitance, too stiff of a pull up, etc). <S> More fuse bungling - ISP can be disabled, as can the reset pin (which also disables ISP). <S> This may have happened in the past. <S> Not on a new one, though. <S> You'll need a high voltage programmer to get around this one. <S> And lastly, it could be blown. <S> Fairly likely that is miswired, or one of the above, though. <A> Either the ICSP header is on backwards, or you are not providing power to the chip while attempting to program it. <A> Does your circuit have it's own power supply? <S> If you don't know, install the (free) AVR Studio, set up the AVRISP mkII with your microchip and run a first test. <S> AVR Studio shows when your circuit has no power. <S> Read further here: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=81120&start=0 <S> As shipped, the AVR ISP Mk2 DOES NOT supply target power, it only senses it. <S> Additionally, it must be able to pull down the reset pin to ground. <S> Normally this is accomplished by tying the Vcc pin to supply voltage through a 10K resistor and also a 0.1uF cap to ground.
It must see voltage on both the Vcc Pin as well as the Reset pin supplied by an external source.
Measure current on a constant current source I need to measure current on a constant current source(LM317), because I am using a 3v3 chip I also need a voltage divider to read it. Will this circuit work Or will it wreak havoc trying to increase voltage to drive current over the voltage dividers? simulate this circuit – Schematic created using CircuitLab <Q> With 156 mA through 19.01 Ohms (load + shunt), the maximum voltage will be 2.966 Volts , which should not be a problem for typical 3.3 Volt microcontrollers. <S> Therefore the voltage dividers may be unnecessary for reading the voltage at either side of that shunt. <S> Further, the Voltage developed across the 10 milliOhm shunt will be a mere 1.56 milliVolts . <S> At approximately 3.22 mV per consecutive ADC reading on the MCU ( 3.3 Volts full-scale / 1024 , assuming 10 bit Atmel MCU ADC) there will not be much to be read between the high and low side of that shunt. <S> Adding the voltage divider does nothing useful as far as I can see, and it definitely will reduce the voltage to the ADC, challenging it to read anything useful. <A> The circuit you have shown theoretically works but practically it has difficulties in matching the 4 x 30k resistors to get decent accuracy. <S> I'm not saying it shouldn't be considered but an alternative is this: - Place the 10milli-ohm resistor in the ground lead of the 19 ohm load. <S> Then you can directly measure the voltage developed across it into an ADC input. <S> There are still complications with this but they are less than with high-side measurement you propose. <S> The complications are keeping the ground potential at a really decent constant level around the load sense resistor. <S> I'd also consider using a load sense resistor that is as big as you could make it. <S> On your circuit, at 156mA, the voltage across 10 milli-ohms would be 1.56 milli-volts and then your circuit attenuates that by two with the 30k resistors!! <S> It's very unlikely <S> you'll get a meaningful voltage that represents load current AND even with my suggestion there are going to be resolution problems with the in-built ADCs on MCUs. <S> I'd definitely want to make it maybe 0.1 ohms <S> and also I'd consider an amplifier <S> BUT I don't know how this would fit in with your application? <S> Of course, if the 19 ohm load is constant then you can measure the voltage across it either directly (if the voltage is within the ADC range) or via a potential divider. <A> However, it won't be very accurate. <S> Unless you pay a lot for extremely high precision resistors, errors (say about 1% of 150ma <S> * 20 ohms, 30mv ) in the voltage dividers will be larger in magnitude than the voltages you are measuring across that 10mohm (0.01 * 156ma=1.5mv) shunt. <S> You lose the inaccuracy of the dividers, and whether the load goes open or short circuit the ADC is still safe. <S> You probably need to increase the shunt to 1 ohm, or add amplification, to get any accuracy though.
As long as the load is connected, it'll work, but if the load or the shunt becomes disconnected or burns out, expect it to fail as you described (the voltage you see depends on the voltage available to the current source : if that's only 12V, the ADC inputs have enough protection to survive). A safer and more accurate version would put the current shunt on the earth side of the load and eliminate the dividers.
How to design contact pins for testing SMD board? Only optical inspection possible testing technique? The point 6.56 and the Teensy's testing are examples about testing, also the pictures below. Now suppose you want to do a SMD board to the size of fingerprint or smaller. The earlier video mentioned things such as "automatic optical inspection" about 4.20. I think the Teensy-style physical testing with pressing to some conductive golden pikes is impossible with very small SMD boards -- or production/testing boards should be larger to have some testing holes that are cut out later. How can you test some very small SMD boards? Examples about testing with pikes <Q> For very small boards, you can test before depanelizing. <S> Bring the test points out into the panel, through an inner layer so the depanelization process doesn't tear up the rest of the traces. <S> Or just use smaller probes. <S> Semiconductors are tested before sawing up the wafer, using machines that are maybe 60 dB more expensive than pogo pins in a circuit board. <A> In the semiconductor industry these are called DUT (for Device Under Test) or Load boards and they map from the ide pins to the tester standard connection format. <S> They can be fairly expensive because of size and thickness (to ensure stiffness). <S> However, you don't need most of that. <S> at the center of a DUT board <S> are cantilevered comb like structures that are very stiff but are spaced at the 100 um pad pitch with 50 um tips. <S> These are relatively inexpensive, no more than the cost of a single pogo-pin. <S> Here is a super fancy, RF matched and reinforced version: <S> If you look closely you can see a bunch of very fine fingers. <S> Of course you can only use these under a microscope as you will bend the crap out of them if you hand place them. <S> here is what a old style DUT board looks like. <S> A lot of the design is the interface to the system electronics, which you don't care about. <S> Here is a picture of wafer probe or probe fingers taken from UP patent 7688097 B2 <S> This is still very fancy. <S> I have seen these "combs" go for only a few $100's <S> Here are some picoprobe probecards from GGB industries which I've used. <S> And finally if you search on probecards you get lots of hits. <A> Pogo pins can be found in super small sizes. <S> A quick search shows 0.52mm pitch. <S> That's almost as tight as 0.4mm pitched ICs, grain of rice sized chips. <S> They can be tested off board, as @Markrages has mentioned. <S> The panel would have test points on the cutoff parts. <S> Visual (Camera) inspection is also possible, for any single or dual layer board. <S> Anything with internal layers will not be able to use simple camera inspection. <S> This is often needed for bga ICs, where you can't inspect the soldering else wise. <S> But final testing is simply programming and running a test sequence.
Originally pogopins were developed to contact the DUT board to the tester. Xray inspection can be done.
Selecting communication between microcontrollers at high temperature I have been assigned to a project to find the best possible communication between several PCB boards which have microcontrollers for a specific function. I need to have all microcontrollers communicate with the main board which contains a CPU. I need to send some information from the mainboard to the controllers and receive a response from the controllers. Each controller board is designed for a specific purpose. I don't need to communicate between the microcontrollers, but even if one microcontroller fails to communicate then it won't effect on others. Presently, I need to have six microcontrollers communicate, but in the future more than that. I want to avoid more wired connections between the mainboard and the other controllers (it should be fewer). The communication should not be affected by the temperature (250 °F (120 °C)) and pressure (high). The distance between the mainboard to the final controller may be more than one meter. Which type of controllers are best? I need to perform some calculations and sensor readings. Each board having more than two sensors. I need to perform some calculations on sensor readings or send values directly. I am new to this type of project. I have searched for the best communication, but I am confusing which is best. Some people are suggesting me to use CAN communication. If I choose CAN communication, what type of microcontrollers is best? I have attached a simple diagram how it is going to look like as shown below. <Q> I2C or RS485/RS422 are good choices too, depending on the electrical characteristics of the situation (distance, noise, power). <S> The rest comes down to the protocol you use for communicating - how to address messages, control flow, avoid collisions. <S> I'll wish you good luck finding a micro which will work at 180c, automotive spec tops out at 125c <S> and I don't think even military spec improves drastically on that. <S> You need to start with layer 1 (electrical) to work out what the physical interface has to do, after that it's mostly a software issue on how you talk. <A> You can take a look at http://www.keil.com/dd/chip/3648.htm LPC 2129 <S> ARM7TDMI-S with CAN support. <S> This can help if you fix your interface as CAN. <S> You can also have Industrial or MIL grade connectors and cables because of your temperature constraint. <S> Check out vendors like Radiant cables, TE connectivity, Amphenol, Allied Connectors which manufacture stuff meant for high temperature environment. <A> For CAN (and I would strongly advice CAN for your setup) I recommend the LPC11C24 , an ARM Cortex-M0. <S> I think it is the only one that has the transceiver already incorporated, so there is no need for an extra chip to implement the physical layer (as is usual in the rest of CAN microcontrollers). <S> It also has some nice and easy to use C libraries built-in in ROM for CAN and CANOpen standard. <A> Freescale S08D family or some cheap Kinetis has CAN and support to 125ºC. <S> However highest values of temperature you get only on valuable chips on Freescale <S> (source: <S> parametric search).Try Parametric Search of all sites! <A> CAN is pretty complicated in implementation in software. <S> Why not to use RS-485 which is also industrial standard? <S> There are many RS-485 transceivers with 125'C temperature support.
If you choose CAN then the "best" micro is one with CAN built in (many have this, Coldfire MCF5225x is one example). These days, ethernet might even be a viable option if the micros have the space to run a modest OS. Also, you can check out some heat resistant materials such as teflon that help protect the communication interface.
What is the reason that the value "47" is so popular in electrical engineering? We often see component values of 4.7K Ohm, 470uF, or 0.47uH. For example, digikey has millions of 4.7uF ceramic capacitors, and not a single 4.8uF or 4.6uF and only 1 listed for 4.5uF (specialty product). What's so special about the value 4.7 that sets so far apart from say 4.6 or 4.8 or even 4.4 since in the 3.. series we usually 3.3,33, etc. How did these numbers come to be so entrenched? Perhaps a historical reason? <Q> - These are the 13 resistors that span 10 to 100 in the old 10% series and they are 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, 100. <S> I've plotted the resistor number (1 to 13) against the log of resistance. <S> This, plus the desire for two-significant digits, looks like a good reason. <S> I tried offsetting a few preferred values by +/-1 <S> and the graph wasn't as straight. <S> There are 12 values from 10 to 82 hence E12 series. <S> There are 24 values in the E24 range. <S> EDIT - the magic number for the E12 series is the 12th root of ten. <S> This equals approximately 1.21152766 and is the theoretical ratio the next highest resistor value has to be compared to the current value i.e. 10K becomes 12.115k etc. <S> For the E24 series, the magic number is the 24th root of ten (not suprisingly) <S> It's interesting to note that a slightly better straight line is got with several values in the range reduced. <S> Here are the theoretical values to three significant digits: - 10.1, 12.1, 14.7, 17.8, 21.5, 26.1, 31.6, 38.3, 46.4, 56.2, 68.1 and 82.5 Clearly 27 ought to be 26, 33 ought to be 32, 39 ought to be 38 and 47 ought to be 46. <S> Maybe 82 should be 83 as well. <S> Here's the graph of traditional E12 series (blue) <S> versus exact (green): <S> - <S> So maybe the popularity of 47 is based on some poor maths? <A> Have you ever noticed the dials on a scope <S> are always 1-2-5-10-20 <S> -50-...? <S> This has a simple and similar reason, although the values on the dials are a bit more rounded for convenience. <S> Many phenomena are perceived as being logarithmic (the best known one being sound). <S> Look at this sequence: \begin{array}{|c|c||c|} n & \log(n)\\\hline10&1.00\\22&1.34\\47&1.67\\100&2.00\\220&2.34\\470&2.67\\1000&3.00\\\end{array} <S> See how nicely and evenly spaced they fit on every \$\frac{1}{3}\$ and <S> \$\frac{2}{3}\$? <S> You can't even see the line is slightly curved. <S> The practical use for this is when you want to do a quick log scale graph. <S> Instead of trying to draw a log scale yourself you just draw a line with an evenly spaced grid like the image below and you are nearly spot-on. <S> And the grid is nearly on octaves too, at least good enough for a quick pen and paper analysis of a circuit where things vary with 6dB/octave. <S> With decades this number is actually closer to 20dB/decade than 18, but I'm talking orders of magnitude here. <S> Both lines are pretty easy to draw. <S> The resistors/capacitors/inductors are pretty much similar. <S> If you want an evenly divided range of resistors you can simply pick the 10-22-47 values. <S> See how handy these values are? <S> They are easy to do calculations, evenly spaced and therefore commonly used. <S> Remember that in 'the old days' computers and calculators weren't too common, so values were chosen to make things as easy as possible. <A> The standard 10% tolerance values for resistors (very old) are 10 <S> 12 <S> 15 <S> 18 <S> 22 <S> 27 <S> 33 <S> 39 <S> 47 <S> 56 <S> 68 <S> 82 <S> So 47 was already a choice. <S> 10, 22, and 33 are also popular. <S> The standard 5% values are: 10 11 12 <S> 13 <S> 15 <S> 16 <S> 18 <S> 20 <S> 22 <S> 24 <S> 27 <S> 3033 <S> 36 <S> 39 <S> 43 <S> 47 <S> 51 <S> 56 <S> 62 <S> 68 <S> 75 <S> 82 <S> 91 <S> This allows 47 as well. <S> They are roughly logarithmic steps, see this page for more details. <S> Additionally a 48 is only 2% above 47. <S> Hard to get excited about that if the part's tolerance is only 10% or 5%. <A> Uhm, there are lots of answers stating that power series are chosen for values, but there no answers WHY power series are chosen. <S> In first glance there's nothing suspicious with linear series. <S> Let's choose simple series like 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10 ohm for resistors. <S> Ont bad. <S> Now, expand series to 100 ohm: 11, 12... hundred of different values... <S> thousand values for kiloohm and... million for megaohm range? <S> Nobody will make them all. <S> Ok. <S> we can make them with different step for every decade: 1, 2, 3 ... 9, 10, 20, 30 ... 90, 100, 200. <S> This seem more reasonable. <S> Very old series had such values (capacitors were). <S> Let's look on a problem from another side. <S> Say, 10 ohm resistor is actually somewhere between 9 and 11 ohm and 1000 ohm one is between 900 and 1100 <S> (i took 10% tolerance for example). <S> You see, there's no need to make 1001 ohm resistor, because such small difference does not make sence with such broad range. <S> So, it is reasonable to choose neighbour values such way, that tolerance margins will touch together: R[i]+tol% <S> = R[i+1]-tol%. <S> This leads us to solution to choose step proportional to nominal value (and near to twice the tolerance): say, after 100 should be 120 and after 200 should be 240, not 22. <S> Lets build such series for example (given 5% tolerance, so every next value should be 10% greater): <S> 1,1 × 1.1 <S> = 1.11.1 <S> × 1.1 <S> = 1.211.21 × 1.1 ≈ 1.33 ... <S> 1.46 ... 1.61 ... <S> 1.77 ... <S> 1.94 ... <S> 2.14 ... <S> 2.36 <S> Look, we get power series very similar E24 series. <S> Of course actual E24 is somethat aligned, first to have whole number of steps in a decade, and <S> second to include most values already produced (thats why 3.0 and 3.3 there, not 3.2 not 3.1). <A> They are preferred numbers . <S> They reduce the amount of values needed to be stocked. <A> The number 47 is a preferred number . <S> THE NEED for preferred numbers came to a head during WW2 for compatability of radio parts between Britain and USA . <S> Before this there wasn't adherence to preferred values and you see all these funny numbers in prewar sets like 300 ohm <S> 200ohm 5 ohm 160 ohm <S> 170ohm etc .
Due to resistor colour-coding bands on leaded components two-significant digits were preferred and I reckon this graph speaks for itself: Fabrication process have tolerance, generally constant in units of nominal values.
How do I verify that my 3.3v power rail meets the requirements for an Ember EM357 SoC? I've built a circuit that is going to supply 3.3v to a CEL Meshconnect Mini Zigbee module and now I want to test and verify. The only two things I know to look for is:-Make sure it's actually 3.3v-Find out how much ripple there is Can any basic oscilloscope tell me how much ripple there is?How much ripple is too much for a Zigbee SoC?Are there any other factors(i.e. noise) that I'm not taking into account?Am I over thinking this? <Q> It's more important to know how much current the module can draw. <S> If your DC source isn't up to the task, the module will collapse the rail and all sorts of interesting behaviour can ensue (hiccupping, brown-out, etc.) <S> Industry practices for power supply ripple measurements must be done with a short probe (no long ground lead) or a direct-connect coax with proper termination, with 20 MHz bandwidth limiting turned on, and a combination of ceramic and electrolytic capacitors at the measurement point to attenuate CM noise and give you a 'true' indication of what the ripple is. <S> In industry, it's common to use a 10 microfarad electrolytic capacitor in parallel with 100nF ceramic. <S> Less is generally better when it comes to microcontroller-based gadgets, especially ones that do a lot of analog-to-digital conversion. <A> The ripple limit should usually come from the datasheet, manufacturer communication and/or your EMI requirements. <S> In order to determine how much noise you have on Vcc, do a popper measurement and read of the Vpp. <S> Sounds simple, right? <S> The best paper I know of that describes how to do this measurement <S> is this one: http://www.electrical-integrity.com/Quietpower_files/Quietpower-21.pdf <S> In short: Use a coax cable soldered directly to your board. <S> Run the 50R coax into your oscilloscope set to 50R input impedance. <S> Select AC-coupling. <S> A bandwidth that is adequate (minimum 500 MHz). <S> And infinite persistence. <S> If you make the measurement using a high impedance probe with a long "pig-tail" for ground - you may have extra noise not related to your Vcc noise picked up. <S> When in doubt, always do the null-experiement: touch the probe tip to the ground point, so both tip and ground of the probe touches the same point on the board. <S> If you don't get a flat line, something is being picked up by inductive coupling into the loop formed by probe and ground lead. <S> So do you have too much noise? <S> Suppose the datasheet of this device calls for 3.3V +/-5% for the Vcc supply. <S> That means you have +/-165mV as the limit. <S> Let's assume you have a 2% accuracy of your DC regulator. <S> And let's assume you have a 0-1% distribution drop in the connections between the regulator and the device (cables, connectors, traces, filters etc.). <S> That leaves 2% to the AC-noise/ripple or +/-66mV <S> (132mVpp). <S> If you are designing a supply for a daughter card module, you really should measure the voltage on the module using this principle. <S> Note that you may very well find that the module was not well designed and there is nothing you can do on your board to fix it. <S> That is one of the downsides of using modules. <A> CEL has an application note now: ZICM35xSPx Hardware Design Guidelines <S> It specifies +/- <S> 0.3Vpp ripple.
How much ripple your module can actually tolerate is hard to judge unless the manufacturer has specified it.
Have I fried my Arduino UNO? So I've recently been playing with my first Arduino, until it, for some weird reason, stopped working. What I did: I had it attached to a breadboard. When I say attached, I mean it was supplying power to the breadboard. I was messing around with a motor, which wasn't performing very well when using the standard 5v output the Arduino supplies. So, I decided to buy some batteries - 10 AA batteries, to be precise. As I connected my battery back to the other side of my breadboard (there are two power input rows on my breadboard - one on the left and one on the right. (I thought) the Arduino was supplying power to the left input), I had completely forgotten that I had the two power input rows linked together with jumper wires. So I had the Arduino powering both the left and the right side rows of the breadboard. So all of a sudden, when I linked the battery pack to the right side row of my breadboard, my Arduino turned on. I was puzzled. When I finally realized the two power input rows were linked, I slapped myself. Now, my Arduino turns on, but the code I had on it is no longer executed. And usually, when I turn the Arduino on, the "L" LED blinks twice. Now, it just turns on and stays on. The power outputs still work, as I still have power flowing through my breadboard. The reset button does nothing. The Arduino IDE also no longer detects my board. Infact, my whole computer doesn't even detect it. I know it was really stupid of me to supply 14+ volts to it, but I didn't do it intentionally. And, the only reason I used 10 AA batteries was because that's the amount my (only) battery pack required. Bad news? What do you guys think? Am I screwed? Is it fried? <Q> The reality is that you most likely did fry it. <S> We can think about it this way: you supplied much more voltage to it than it was designed to handle, and now it doesn't respond to your computer. <S> What other possibility is there? <S> The question now is: what exactly did you fry? <S> One thing that could very well be toasted is the ATmega328 chip. <S> If it is the former, and the chip is dead <S> then you'll need to get a new Uno, unless you have advanced soldering equipment. <S> If it is the latter you can buy a new ATmega328PU and replace it in your Uno, however, even in this case the solution isn't necessarily easy. <S> The problem is that you'll need to get a bootloader onto your new ATmega328PU, and without an Arduino or an ISP programmer <S> this isn't easy to do. <S> Fortunately, ATmega328PU with bootloaders already on them are sold on ebay for just a few more dollars than the bare ATmega328PU which runs about $3-$4. <S> It could also be the case that other (non-MCU) components are damaged either instead of, or (worse) in addition to the MCU: the USB interface chip, voltage regulators, or any of the many passive components that are directly connected to the +5 rail. <S> The trouble is that even with a multimeter it may be difficult to assess the damage. <S> For my money, the best option is to buy a new Uno and move on, however, if you are interested in a (potentially complicated) project, at least the schematics are available. <S> So you would want to look at the schematic drawing and test at least <S> every component that is connected to +5 and ground. <S> Then you might want to test every component connected to those components, in case the blown out component shorted out something else. <S> In the end you might have to test everything. <S> The alternative strategy would be to assume the best, and look, and maybe try to smell the damage, and replace one or two components that look suspect, and then pray for the best. <A> Since you placed 14 (15? <S> 10 <S> * 1.5V Alkaline AA) volts on the 5v rail <S> , you have possibly (Considering the Uno Rev3) damanged both ATMegas, a few capacitors, and two leds. <S> The ATMegas both have a maximum voltage of 6 Volts on any pin, except the Reset pin, which has a maximum of 13 Volts. <S> The capacitors are common ceramics, with no specific part number mentioned. <S> They might be 6.3V, <S> 10V or 16V maximum, so in 2 out of 3 cases, they would be fried. <S> If neither the code already on the arduino is running, and it is not recognized by the computer, most likely, both ATMegas are dead. <A> You really should have only used 4 AA batteries - a USB connection provides 5V, and the voltage regulator works with 9V, but the fewer volts supplied, the fewer watts dissipated and the lower the heat. <S> 6 volts is close enough to 5 and lower than 9, and would use fewer batteries. <S> Also, I think that it is most likely the little ATmega16u2 <S> /u3 is bad - that would be the small little un-socketed chip that interacts with the USB. <S> It's possible <S> both the 16u3 and the 328p are both bad, but the 328p is replaceable and the 16u3 isn't. <S> If your computer doesn't detect it, it is definitely the 16u2/u3. <S> The best thing to do now is to get another and not make that mistake again. <S> get a new battery pack, (or do what I did and make one out of popsicle sticks, wire, solder, and electrical tape :) <S> but that's dangerous.)
There is also the possibility that the usb fuse has blown, you might want to check that with a continuity meter. Whether you are in luck or not depends largely on whether you have an UNO with the SMD chip or the DIP ATmega328.
Voltage regulator too hot to touch I'm working on an RGB LED project. I'm using this as the power supply: https://www.sparkfun.com/products/114 It uses an LM317 which according to the data sheet can supply up to 1.5A. The LED's I'm using are these: http://www.adafruit.com/products/314 And the mains power supply I'm using is a 12v DC 2 AMP one. Here's the problem. If I have just all of the red parts of the LED's lit up (I have 8 LED's), within about a minute the voltage regulator is far too hot to touch and I disconnected it when it started to smell funny. I attached a coin to the heatsink part of the voltage regulator (Not great I know, but I'm still waiting for some proper heat sinks I ordered to arrive) and within about a minute that too was far too hot to touch. How can this be? Each red part of the LED uses 20mA, so multiplied by 8 that is 160mA. So the circuit isn't drawing too much current, is it? I'm using 150 Ohm resistors for each LED. Why is it heating up so much, and what am I doing wrong? Thanks (Also, if I powered up all red, green, and blue parts of all 8 LED's, the voltage regulator gets blisteringly hot) (I've just being reading about "switching" regulators being used as they produce less heat, would this be a better idea?) <Q> A linear regulator dissipates heat proportional to the amount of voltage it must drop, and the amount of current flowing through it. <S> Input supply = 12 Volts Option A: Output V out = <S> 3.3 Volts V f red <S> = 2.1 Volts Current = <S> (V out - V f ) <S> / R = <S> 7.5 mA per LED = <S> 60 <S> mA total Power dissipated by regulator, P = <S> (V input - V out ) <S> x I = 522 mW Over half a watt is being dissipated by the linear regulator in this case. <S> Add the green and blue channels, and dissipation will tend to thrice that figure. <S> Option B: <S> Output V <S> out = 5 <S> Volts V f red <S> = 2.1 Volts Current = <S> (V out - V f ) <S> / R = <S> 19.33 mA per LED = <S> 154.67 <S> mA total Power dissipated by regulator, P = <S> (V input - V out ) <S> x I = <S> 1082.67 <S> mW <S> Over 1 watt is being dissipated by the linear regulator in this case. <S> 1 <S> Watt is a substantial amount of power being emitted as heat. <S> The regulator getting too hot to touch is not unexpected in this case. <S> Adding the green and blue channels will make things much worse. <S> Recommendations: <S> Use the breadboard power supply in 3.3 Volt mode until you have a good heat-sink attached, even 7.5 mA per LED channel should provide a reasonable amount of illumination from the LEDs. <S> Switch over to a DC-DC switching regulator or buck regulator, those waste much less power as heat. <A> Problem: You power the LM317 with 12V and it generates an output of 5V @160 <S> mA. So 12V - 5V = 7V @ <S> 160 mA that the lm317 needs to dissipate (heat). <S> P(watt) = <S> I <S> * U = 0.160 <S> A <S> * 7V = <S> 1.12 W of heat <S> The datasheet of the LM317 says: The Thermal resistance, junction to case is 5 °C/W The Thermal resistance, junction to ambient is 80 °C/W (no heatsink) so total thermal resistance is: 85 ° <S> C/W Temperature rise is: 1.12 W * 85 °C/W = 95.2 °C When the room temperature is 21 °C the case temperature will be <S> 116.2 ° <S> C <S> The LM317 has protection so it starts to shut off when it gets to hot. <S> Recommendations: <S> OR ... <A> Yes, the LM317 can handle up to 1.5A, but when dropping 12V down to 5V, it needs to get rid of 10.5 watts worth of heat in the process! <S> There's no way it can do this without a substantial heatsink attached. <S> Its temperature will rise until the amount of heat being transferred to the air equals the amount of heat being generated. <S> If there isn't much surface area over which that can happen, the temperature will quickly rise above the maximum rating of the device. <S> The coin adds a little area (and a little thermal mass), but not nearly enough. <A> The quoted maximum current the LM317 can supply requires that you provide a way for the chip to get rid of the heat it must produce to 'boil away' the voltage difference. <S> You don't say what the output voltage of the LM317 is, I assume 5V. <S> That means that each part LED that you turn on caused the LM317 to dissipate 0.02 * (12 - 5 ) = <S> 0.14 <S> Watt. <S> A TO220 package without any additional heatsink can dissipate ~ 1 W (but it will get hot!). <S> For 24 LED parts that is 3.4 Watt. <S> That requires a decent heatsink for the LM317. <S> A heatsink can be calculated much like a resistor. <S> You want to dissipate 4 Watt, over a temperature difference of let's say 40 degrees <S> C. <S> Hence you need a heatsink of (at most) 40 degrees / 4 <S> Watt = <S> 10C/W. <S> That is not a very big one. <S> This will not reduce the total power dissipation, but it will distribute it over all resistors. <S> use a small switching converter to produce the 5V <S> (I removed the suggestion to put the same color LEDs in series, because that is not possible with RGB LEDs, and Loyd seems to want to control the LEDs individually.)
You really need a better heatsink OR lower current usage OR a lower input voltage Even at the 160 mA your red LEDs are drawing, the regulator is dissipating well over 1 watt. You did not give details about your circuit, but other options could be using a power supply that outputs 9V instead of 12V, or even one that outputs 5V if you use 2803-style open-collector drivers: feed the LEds directly from the 12V.
Is this arduino motor driving circuit correct? I got an Arduino Pro Micro and some parts to play with. I want to control a little 5v motor from an external power supply by using the Arduino to trigger a transistor. Like this: Is that at all correct? Will it work? I want to experiment but I don't want to break my new toy in the process. The transistor I am using is an NPN, 2N3904. <Q> You want to use your transistor as a switch. <S> I found a nice site about that which gives this circuit: <S> Now forget about all the garbage and strip the design down to this: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Your circuit is correct, except that it's missing the base resistor (R1) and the pull-down resistor (R2). <S> Also, the load (your motor) has to be on the collector of the transistor, not on the emitter. <S> At last, use a flyback or flywheel diode with the cathode to V cc , like in the first image, to avoid high voltages. <S> So in the end, your schematic would look like: <S> simulate this circuit Explanation of the circuit: <S> R1 is required to limit the current on the base of the resistor and thereby the current drawn from the Arduino. <S> If you do not use the base resistor, your Arduino might break. <S> R2 is a pull-down resistor which makes sure the voltage on the base of the transistor is low enough to not conduct whenever there is no input signal from the Arduino. <S> So this resistor makes sure you know in what state the circuit is when the Arduino is disconnected. <S> This resistor is not required, but recommended . <S> D1 is a flyback diode which eliminates the voltage spike when the motor stops or starts working. <S> It goes too far to explain why, but whenever you let a current flow through a coil or when you stop letting the current flow, a voltage spike may occur. <S> With the flyback diode, you make sure that spike is eliminated immediately. <S> Usage of this diode is highly recommended . <S> One last thing to explain: why the motor has to be on the collector side and not on the emitter side of the transistor. <S> Wouter explains this in his answer , in short: with the load on the collector side you are in charge of what voltage the motor gets; with the load on the emitter side, this voltage cannot be higher than the voltage on the base (minus something). <A> It might work (at least for some time), but there are a few issues: <S> you did not mention how much current the motor will draw. <S> a 2N3904 is a small-signal transistor, it might not survive the motor current (note that a stalled motor draws a much higher current) like a relay, a motor can generate voltage spikes. <S> I would put a diode in parallel to the motor. <S> (observe the polarity!) <S> you use the transistor as emitter follower, hence the voltage on the motor can only be as high as the output voltge of the arduino (minus 0.6V or so). <S> This might work, but I would prefer the motor 'in' the collector wire. <S> This would require a suitable resistor in the base 'wire'. <A> I wouldn't even use a NPN tranistor to begin with due to heat dissipation (Pd). <S> Pd can be calculated using: NPN/PNP - <S> > <S> Pd = <S> Vf*I = <S> 0.7V*I <S> As you can see here, if you're drawing 1A, then that transistor will heat up like there's no tomorrow. <S> (0.7V)*(1A) <S> = <S> 700mW. <S> MOSFET - <S> > <S> Pd = I^2*Ron <S> = <S> small number <S> As you can see here, even at 1A, there's essential no heat giving off. <S> Since the on resistance is typically in the milliohms. <S> (1A)^2 <S> *10mOhm <S> = <S> 10mW. <S> Also, most MOSFETs have built in flyback diode! <A> Here is a question: you say that the 5V power supply for the motor is not connected to the Arudino at all. <S> In any case, relying on stuff to be coupled through mains power unintentionally is not how you want to design circuits (for example, it will stop working if either the Arudino or the motor goes to battery power). <S> For example, in this circuit, the V_be (base-emitter voltage) is undefined. <S> A simple fix is to connect the ground of the Arduino to the ground of the motor power supply. <S> If you really insist on not having a ground coupling, you need to have some other form of coupling, whether optically (opto-isolator) or magnetically (transformer).
In this case, I have my doubts that the circuit will work, unless it happens to be ground coupled somewhere else (for example, if your Arduino is powered by USB, which is coupled to the AC ground, and the motor power supply is coupled to the same ground through the outlet).
Eagle configure autorouter to solder components (except vias) only on bottom layer of double sided PCB In double sided PCBs it is difficult to solder through hole components like IC bases, headers, etc. in the top layer. Normally the Eagle autorouter places the solder pads on both sides. That is, in a through-hole IC base some pins should be soldered in the bottom layer and some in the top layer. But I need routes in the top layer and vias. Is there a way in the Eagle autorouter to tell it to avoid soldering in top layer? Please see the "Design requirements for hobby boards" and "Turned-pin IC sockets" sections of Joe's Hobby Electronics: Making double-sided PCBs for more information about the problem. <Q> While I have to agree with the previous answers - you are indeed a lot better off in the long run if you route manually <S> , I feel your question has not really been properly answered. <S> A quick-and-dirty workaround for you might be copy the component(s) to a library of your own <S> add a new package, in which you put a GND rectangle around the entire component on the top layer only in the circuit, replace the original component with your tampered component <S> let the autorouting commence go back to your circuit, and swap the component back to its original package. <S> Now, before the rotten-egg-throwing sets in, a few extra words why you should not do that. <S> While Eagle takes quite a bit of effort to get the hang of, it is definitely worth practicing these things on simple designs. <S> As you advance, you will get to the point where you have to route manually, because some signals must be laid out in certain ways. <S> There might still be workarounds for each specific problem, but you will never have practiced to place the components in a way that it is possible to route with minimal effort and losses. <A> That way possible routing solutions that use the top layer are rated lower than those with shorter track lengths or other optimized solutions. <S> Higher costs mean less likely use of the top layers. <S> You may need to change this on all route and optimize stages for it to be effective. <S> To prevent Eagle from using the top layer, you should make the PCB a one-sided board by turning off the top layer. <S> This will make the design much more difficult to route, and will require good part placement. <S> I would still recommend routing the board manually - that way you know the trade-offs yourself instead of depending on an algorithm to find an answer. <A> An easy solution/hack is to draw a circle/rectangle with around the pins with the layer you want the auto router to STOP using. <S> So in your case you will draw a circle using the top layer on every pin of the IC which will force the auto router to start routing using bottom layer.
If you want to discourage the autorouter from using a layer, you can tell Eagle to increase the routing cost of a layer in the autoroute dialogue.
Arduino AnalogWrite and its frequency and effectiveness Reading about the arduino analogWrite function I have come to understand that it uses PWM for the variable DC voltage. (by controlling the width of the pulse) However how do we control the frequency of the pulse? I came across a few articles about the same but couldn't get them. Any help is appreciated. Moreover how effective is it to use that analogWrite voltage as say a biasing voltage? Or maybe as a variable Vcc itself. Does the fact that DC is obtained via PWM will effect underlying circuitry expected working (where the underlying circuitry is anything one can do with a transistor) <Q> Changing PWM frequency is not directly supported by Arduino command set, but it can be done. <S> For this you need to know a couple of things: find the datasheet for the exact microcontroller (ATmega..) that is on your Arduino <S> which Arduino pin you want PWM frequency to change; which pin on the controller <S> it is connected to <S> (this is described on http://arduino.cc/ ); find the chapter on PWM in the datasheet that discusses the controller pins you are interested in. <S> On top of that, some of the PWM pins are attached to timer0, which is heavily relied upon for other system tasks (like delay(); ). <S> So fiddling with PWM may change the execution speed of some code. <A> The frequency of the pulse can be controlled by direct manipulation of the timer control registers. <S> The details vary quite a bit depending on what timer and what pin you’re using. <S> Some pins allow fine grained control of both frequency and duty cycle, while others only allow controlling one or the other. <S> For many applications (e.g. LEDs), the exact frequency does not matter as long as it’s high enough. <S> Ultimately, a PWM signal behaves quite differently from a true analog signals. <A> The Arduino PWM frequency library works excellently. <S> The library is a third party open source contributed library, not part of the standard distribution. <S> There is a forum discussion including library documentation and update history here . <S> I have used this library extensively, no complaints. <S> Regarding obtaining variable DC from PWM, the standard technique is to use a low pass filter: at the simplest, a resistor and capacitor. <S> The lower the corner frequency of this filter, the slower it will respond to PWM duty cycle changes, but the lower will be the ripple on the output, given a PWM frequency significantly higher than the corner frequency. <S> Conversely, to reduce ripple and yet have responsive DC output, a higher PWM frequency would be used - along with a higher cut off frequency for the low pass filter. <S> The ripple contribution also increases with higher load current, so to counter that higher frequencies are used, as well.
For some applications, e.g. controlling LEDs, a PWM signal is more convenient than true analog (i.e. relationship of PWM duty cycle to brightness), but for the applications you mention (biasing voltage), PWM is not really suitable.
Any DC-powered, low flow-rate, inexpensive water pumps? Looking for small water pump, which can pump up water from a container, kept at ground-level to another container, placed 10 feet above ground. It should ideally be DC powered, and be able to transfer about 10 liters/hour. In my search I've come across, pumps called "Rolling Pumps", and another type called "Dosing Pumps". Searching for "Rolling Pumps" brings up "Peristaltic Pumps" page on Wikipedia. Searching ebay for "Peristaltic Pump", returns "Dosing Pump" results, but not sure if they are similar. Oken Sieko (who make "Rolling Pumps") website shows a twin-diaphragm based approach. The "aquarium pumps", I believe are all air-pumps, right ? They suck-in and pump-out air, to oxygenate the water. They are not water-pumps, right ? These seem to be fairly inexpensive. What kind of pumps do the small table-top fountains use ? <Q> A/C submersible aquarium pumps are designed to work underwater, why are you worried? <S> I've used similar pumps in fresh and salt water for years and never had one encounter an electrical failure. <S> I have tested these submersible DC pumps with fresh water and they seem to work OK. <S> Haven't tried them outdoors yet, but they are fairly quiet in case that matters. <S> They only claim 6.5 feet of head, but that site has other pumps that may be more suitable. <A> I believe those are popularly called fountain pumps . <S> However, I believe most fountains use a submersible pump . <S> The wikipedia talks about big applications, but of course the size of the application depends on the size of the pump and vice versa. <S> I couldn't found reference, but this shop says: All fountain pumps are submersible and have flow control. <S> (This is of course only guaranteed to go for their own products.) <S> Also, on that page are some smaller pumps, so there are smaller applications than the on the wiki <S> mentioned oil well! <S> Most of these pumps are AC powered. <A> Most aquarium pumps have very high flow capacities compared to 10 l/hr however their head (height to pump water) is minimal <S> My 10 usd, 25 W pump has 1800 lr/hr flow capacity and mere head of 20 cmSeems you have a mini irrigation project in mind. <S> (drip or flow)If that is the case, you also need to consider UV resistance
There sure are DC powered submersible pumps, however, I couldn't find them as small and cheap as the AC powered mentioned in the first shop.
Do engineers still design for volume using discrete through-hole bipolar transistors? As a hobbyist who likes plugging BJTs and discrete components into solderless breadboard for entertainment and education, I recognise that people like me are an insufficient market to make it worthwhile for manufacturers to continue production. I've noticed that on this website a lot of questions about BJTs are answered with recommendations to use a purpose specific IC or a PIC instead. I also enjoyed reading 555 best IC ever or obsolete anachronism I note 555s and through-hole BJTs are available and pushed by hobbyist shops online. I have some cheap solar powered LED lamps to mark the edge of a path, recently one was broken so I opened it up and found this board with three through-hole BJTs and a bunch of other discrete through-hole components on a single-layer board. So why do some large-volume manufacturers still use this sort of technology? The only reasons I can come up with are Its a really old design and not worth redesigning? The educational market is bigger than I imagine? Maybe old BJT production machinery can be shipped to low-wage economies and keptrunning for years at minimal cost? Wages are still low enough in China to sustain this kind of technology? There are a lot of old engineers around leveraging accumulated wisdom with 555s & BJTs? Discrete through-hole BJTs are still the best solution for something (what?) Do engineers still design for volume production using through-hole BJTs? <Q> Low low low cost is the aim. <S> A small volume maker with no expertise in anything other than manual soldering (if that) can make these. <S> They can be even made at home by workers if desired. <S> Single side phenolic board. <S> Cheap. <S> Not only manual assembly but component size and hole spacings <S> not well matched and leads are hand bent and nobody cares. <S> A design like this does not have to be efficient or long life - it just has to work well enough to persuade a western company's "buyer" that they can sell it to the eg US public at an adequate profit. <S> The parts on that board plus the board cost probably 10 to 20 cents. <S> (Junk resistors under 0.1C, inductor 1 or 2 cents maybe, transistors about 1.3 cents say, LED a few cents, PCB under 5 cents, wire 1 cent. <S> Labour costs need to be low to match. <S> That's for quality components that I am accustomed to :-) <S> - presumably even less if quality matters nowt. <S> Even 10 cents plus labour is getting costly as you have to add battery, housing, lenses, box etc and sell it out the factory door at about 20% to 25% of eg US selling price. <S> Chinese minimum official labour rate is now about 2000 RMB/month AFAIK (maybe more by now) <S> but you may work 6 days/ week and 10 hour days for that. <S> Say 6 <S> x 10 <S> x 4.333 = 260 hours. <S> An RMB is worth $US0.16 at present <S> so per hour <S> that's 2000/260 <S> *0.16 ~~= $US1.23/hour. <S> Some workers will get that for a 5 day, 40 hour week = <S> 50% more per hour. <S> Others will work longer and get half that. <S> And be pleased enough in many cases ! <S> : <S> -(.Worst case I saw was 10 hours per day <S> x 365 days/year except leap years. <S> Really. <S> (US owned/managed. <S> NOT mainstream. <S> No names). <S> At many such places you get free lunch. <S> That added 25% to the labour cost at the 3650 hours pa place. <S> Which may explain why your PCBA looks as it does <S> :-(. <S> 5 year old photo. <S> Tasteful precision blanking by me. <S> Factory has long passed on to other things. <S> This is typical enough "cottage industry" level manufacture. <S> Not much equipment needed. <S> Entirely reasonable quality can be attained when done well. <S> Or you can get things like in your picture if not. <A> Yes they do, particularly if the margins are very tight. <S> That is part of engineering <S> is to find the right solution, which for certain markets may be only about cost. <S> That circuit above has 3 transistors and 3 diodes and with the pierce and blank phenolic board, might be only a few cents fully stuffed in volume production, for example the resistors in total may only be ~ $0.01. <S> In fact there may not be an IC solution that can implement this function, and spinning your own you may not ever be able to recoup the NRE (Non Recurring Engineering - i.e up front) costs or the talent base <S> may not be there. <S> They can easily change the design and get it back into production quickly in it's current form. <S> The performance may not be any better in an IC. <S> The often hidden presumption is that an IC solution is always superior. <S> That is not the case. <S> You must evaluate on a case by case basis. <S> You will see this kind of design in toys and high volume simple consumer goods. <S> As to your " ... <S> recommendations to use a purpose specific IC or a PIC instead. <S> " thats simply because that is what those people know best. <S> If your only tool is a hammer - every problem begins to lok like a nail: is one saying that might apply. <S> Or it could simply be that being a smallish site <S> there isn't the diversity present. <A> Looking at that board, it wasn't even assembled with an ancient piece of pick-and-place machine - it was assembled by hand. <S> In this case, I guess, the manual assembly was done for extremely low labor cost. <S> However, some other new designs use through-hole parts as well, most prominently switch-mode power supplies, even expensive ones. <S> The reason is that you have some big through-hole components anyway (terminal blocks, transformers, large electrolytic capacitors), so you need the assembly and soldering process already. <S> Using through-hole components for the rest may be a bit more expensice as far as the stuffing process for just these parts goes, but the overall cost may still be smaller. <S> As you guess, there may be plenty of reasons. <A> Remember that on this site, most people asking questions are building circuits in small quantity. <S> If you only need one of something, then it can make sense to spend $20 on parts <S> so you get it done and working in a reasonable time. <S> If you need to build tens of thousands, then you'll want to spend a lot more time redesigning to get the unit cost down. <S> That redesign may use much lower cost parts and manufacturing techniques. <S> Also, as rawbrawb alluded to, some of it is education and what you know. <S> I very often see hobbyists using expensive parts and complex designs to do simple tasks because they don't have the engineering background to design something efficient. <S> Like the saying goes: anyone can build a bridge; It takes an engineer to build one that barely works.
The product lifetime may not be long enough to justify spending too much tie on the design cycle.
ways to generate (small amounts of) electricity I'm searching into ways of generating very small amounts of electricity, by small I mean enough to light a couple of leds, nothing more The main idea is to have toys that my daughters (2 and 4) can play with. I started with a pet project that, installed on the steps of the stairs, would light a led when step on it (using a piezo; does pavegen uses the same piezo principle?), and then went on investigating other means of generating electricity. know of any? <Q> A DC motor with some kind of asymmetric weight attached to the shaft would probably output a bit of useful current when shaken. <A> If all you want to do is light LEDs, set yourself up a piece of sheet metal at so many feet off the ground. <S> Run it to a capacitor with a diode in series and ground it. <S> You'll charge the cap from a couple of energy sources: 1) <S> whatever happens to be the dominate frequencies in the local environment and 2) PLUS the "electron leak" energy available in the dipole between earth and sky -- basically like electron leakage across capacitor plates. <S> The higher you raise the metal from the earth, <S> the higher your rate of charge should increase. <S> If most of the energy comes from the local frequencies, then you can put two caps in parallel each with an opposite facing diode, and you'll be able to get twice as much energy since you're pulling energy from both sides of whatever the dominant frequencies are in the environment. <S> If the dominate energy is coming from the dipole between earth and sky, then only one diode direction should be dominant (at least theoretically. <S> It's been a few years since I ran these kind of experiments). <A> Make a battery out of lemons. <S> you will probably need about 4 cells (lemons connected in series) to power an LED. <S> here is a link on how to make them. <S> http://www.how-things-work-science-projects.com/lemon-battery.html
You could even light two different colored LEDs this way, since depending on the direction the motor starts moving in, you'd get a different polarity on the output.
How do I calculate battery life allowing for duty cycle? I have a battery rated at 2610mAh.The device it's powering transmits to the network for 35ms during this time it uses 1.95mA of power. the rest of the time the device draws 0mA. I want to workout how long the battery would last in seconds. Here's what I've done to calculate this. I'm not too sure if I've done it right. First I converted the 2610mAh (battery rating) into mA seconds: $$2610 \cdot 60 \cdot 60 = 9396000\ mA \cdot s$$ Then I calculated how many mA the device uses each second: $$\frac{1.95}{35} = 0.055714 mA/ms \cdot 1000 = 55.714 mA/s$$ Now I use the formula \$t=\frac{C}{I}\$: $$\frac{9396000}{55.714} = 168647s$$ Is this the correct way to do this? <Q> If it's a duty cycle of 4%, then the average load is 4% of 1.95mA, or 78 uA. <S> Over 3 years. <S> Battery capacity changes with temperature, time, and discharge rate (and <S> the 2610 mAh rating isn't too precise either, in my experience.) <S> These calculations are probably within ±20% of the real answer. <A> Your device needs 1.95 mA × 35 <S> ms = 68.25 <S> µA-s per transmission. <S> Your battery is good for 2610 mA-h / 68.25 µA-s = 137.65 million transmissions. <S> To turn this answer into a time value, you would need to know how many transmissions occur per some unit of time. <A> Useful battery life is a function of two main parameters: <S> How quickly the chemicals in the battery will be depleted <S> The level of depletion at which the device becomes unusable The capacity figures for batteries indicate how much current they can supply before they are depleted to the point that the manufacturer does not expect them to be useful for typical applications. <S> A battery's ability to supply power, however, will diminish throughout its useful lifetime, and even batteries that with half of what the manufacturer would regard as "useful" energy remaining may be unable to supply enough power to operate certain devices. <S> If one wishes to estimate how long a device will operate properly on a set of batteries, and the expected lifetime is sufficiently long that one doesn't want to wait it out, one might start with a fresh battery, drain it about 40% using a resistor or current sink (probably sized to drain over a period of an hour or two), let the battery rest for a little while, and test whether the device still works. <S> Then drain the battery another 5%, test whether the device still works, etc. <S> If one finds that the device starts malfunctioning after one has drawn e.g. 80% of the battery's nominal capacity, then assuming the current draw isn't affected by voltage, one should estimate battery lifetime in days as being 80% of its capacity, divided by the amount of charge the device consumes per day. <S> Note that depending upon the purpose of the device, it may be helpful to have it drop into a "lower-power" schedule when the battery gets low. <S> For example, a temperature-monitoring device might transmit readings once every minute under normal battery conditions, but once every five minutes once the battery reaches a certain threshold. <S> Such behavior could substantially extend the period of time at which the device could offer some degree of usefulness, at the expense of reducing the time during which it offered full utility.
The battery should last 2610 / 0.078 hours, or 33461 hours.
Can I replace a SMD capacitor with a wire I have a cheap device, which has blown one of its SMD capacitors (no markings) and I was just wondering that what will happen if i remove the cap and put just a jumper wire to its place? <Q> I was just wondering that what will happen if i remove the cap and put just a jumper wire to its place? <S> You would be wiser wondering what would happen if you simply removed the failed capacitor since, for DC, a capacitor is an open circuit. <S> A capacitor is, theoretically, a wire only at infinite frequency. <S> So, if you're planning on operating your circuit at infinite frequency only... <A> No. <S> Not usefully. <S> For practical purposes you can consider that a capacitor blocks DC and passes AC. <S> A wire passes AC and DC. <S> The fact that the capacitor has "blown" indicates that there is a signifcant energy source present. <S> Usually a cap would 'blow' physically only when there was a problem elsewhere. <S> Using a wire will probably transfer 'problem energy' into even more wrong places :-(. <S> BUT!!! <S> How do you know that it WAS a capacitor and not a resistor or some other device?Clear, sharp photo would be of great value. <S> + circuit diagram useful if available. <A> Here are a couple of uses of caps that come to mind: shunt caps used to clean up the noise. <S> Typically you see several caps in parallel with values vary by a factor of ~10. <S> RF matching/tuning caps. <S> Caps and inductors are used to create a desired RF impedance. <S> In this case replacing a cap with a wire might fix the problem (the device will likely work but not as well as with the original part) <S> Caps are used to create some sort of a timed response (e.g. dimmer). <S> Replacing the cap with a wire will likely cause a failure of the device. <S> So, if you want to try a quick and dirty fix, I would just remove the cap and see if the device works without it. <A> No, bad idea. <S> A wire has drastically different characteristics from a capacitor. <S> Think about it. <S> If the circuit would work with just a connection, then why would someone have gone to the expense of putting a capacitor there? <S> Unless you believe that you have discovered something about electronics that the electrical engineer trained in these things that designed the circuit <S> didn't know, how can you possibly imagine this would work!!?
In this case, replacing a cap with a wire will create a short and will likely cause a catastrophic failure of the device. In most cases, it would be a bad idea, but it is impossible to say so without more information.
Does heat affect the magnetic field of an electromagnet? I know that heat destroys perm magnets, but how about electromagnetics? Does heat affect the strength of an electromagnetic field? <Q> No, heat has no influence on the strength of a magnetic field produced by current flowing around a coil of wire. <S> The strength of that magnetic field is strictly the result of the ampere-turns of current going around. <S> However, heat can effect the magnetic permeability of various materials. <S> If the electromagnet has anything other than a air core, then how the field resulting from the ampere-turns is concentrated and shaped can differ with temperature. <S> This concentration and channeling of the magnetic field can make a electromagnet <S> appear to have a stronger field, and can make it act "stronger" in many applications. <S> For example, let's say you wrap 100 turns of wire around a wooden rod and put 1 A thru it. <S> The magnetic field strength is strictly a function of the 100 ampere-turns of current going around. <S> However, this magnet will be able to pick up heavier objects if the wooden rod is replaced by a iron rod of the same shape and size. <S> This is because the iron is a much better conductor of magnetism than air and wood are, so the magnetic field lines will be concentrated at the ends of the iron rod. <S> This more concentrated field is able to pick up heavier magnetic objects as a result of this concentration, even though the overall magnetic field has the same average strength in both cases. <S> In the example above, the apparent strength of the electromagnet with a iron core depends on material properties of the iron, which can vary with temperature. <S> Of course extreme tempertures change the wire and will eventually melt it so that you don't have a electromagnet anymore at all. <S> That obviously changes things, but I'm assuming that's not the kind of effect you are asking about. <A> Since the MMF power of an electromagnet is a function of currnet (A*t), and current can limited by resistance and resistanse is higly depented by the temperature, so <S> YES when temperature in electromagnet increase (due to wrong design), MMF will decrease accordingly. <S> Try to wind randomly a wire to a random form. <S> Appling a random DC power and voi la.. <S> two main possibilities: One is the electromanet to have a very weak force and almost not responds. <S> The other is to see an attraction of a piece of metal, but after a some minutes the coil becomes very hot and metal releasd. <A> You have to be careful about what you mean by magnetic field. <S> It is a term that is used for two closely related terms the H - field and the B - field. <S> The B-field is known as the magnetic field and also know as the magnetic flux density is measured in units of T (Tesla). <S> The other magnetic field also know as magnetic field strength and is measured in Wb (Webers). <S> These two fields are related to each other via:$$ B = <S> \mu H + M <S> $$ <S> Where M is the magnetization, for para- and dia- magnetic material <S> this becomes simply:$$ B = <S> \mu H$$ With \$\mu\$ being a material constant <S> that may or may not be affected by temperature. <S> A case in point is the Curie temperature of certain materials that when exceeded the material looses it's magnetic properties. <S> If you use H as your "magnetic field" then it will not be temperature dependant because H is material independent. <S> This confusion is due to sloppy usage or people not realizing the difference. <S> The most common usage is to call the B field the "magnetic field", it's not uncommon to hear people use units of Tesla or Gauss (both are units of flux density). <A> If only the field is subjected to reasonable changes in temperature, the answer is "No." <S> However, since electromagnets have to be wound with something conductive in order to generate the desired magnetic field, and since the resistivity of all elemental metals increases as temperature increases, the resistance of what the coil is wound with (copper, usually) will increase as it gets hotter. <S> That means that with a fixed number of turns and a fixed voltage driving the coil, as its [the coil's] temperature increases, the current through it will decrease, weakening the strength of the magnetic field because of the coil's diminishing ampere-turn product.
The magnetic permeability of free space is not effected by temperature, so the same coil without a core would make a magnet that does not vary with temperature.
Soft latch switch seems incompatible with boost voltage regulator I am using a lithium ion battery to power a circuit board at 5V. I am using the LM2623 boost voltage regulator, which works fine when the battery is hooked up to the circuit board. I would like to add a soft latch switching circuit between the battery and the voltage regulator. I have successfully replicated this soft latch circuit on a breadboard. I am able to use the soft latch switch with the battery as the input voltage to light up an LED. There are no issues whatsoever with latching. I am also able to use the soft latch switch with the 5V output from the voltage regulator as the latch's input voltage. The P-MOSFET I am using is the IRF9510 , which is rated up to 100V and 4A. The voltage regulator doesn't ever pull more than 2A to handle its switching circuit. The N-MOSFET I'm using is the ZVNL110A . Works: battery --> latch switch --> LED battery --> voltage regulator --> latch switch --> LED Doesn't work: battery --> latch switch --> voltage regulator This non-working set-up has strange behavior at the output of the voltage regulator. Upon clicking the button in the switch circuit, the voltage out of the regulator will spike to about 1.3V and then slowly decay down to 0V. This decay takes at least a minute or two, which has me thinking that this issue has something to do with the fact that the load is capacitive and that is why the switch won't latch. I am wondering whether this is a result of the switching circuit within the voltage regulator circuit, or due to the input/output capacitors to the regulator circuit. For all I know, it could be malevolent fairies who don't want my circuit to latch. I don't think the problem has to do with the P-MOSFET being unable to handle the current that the voltage regulator wants to pull from the battery, and I know it isn't the battery's discharge rate that is somehow limiting the current into the circuit. I also don't believe it is the N-MOSFET's current limitation in the switching circuit causing the problem, because I don't believe that component ever receives an excessive amount of current or voltage. I am a relative n00b when it comes to electronics, so any help would be much appreciated. I can provide more info if needed. ---Edit--- I tried monitoring the voltage at the gate of the P-MOSFET to get to the bottom of this. When I have 3.7V coming into the latch circuit, the gate reads 3.65V. If the voltage regulator is not attached, clicking the button will bring the gate voltage down to 0 V. If the voltage regulator is attached, however, clicking and holding the button only brings the gate voltage to 3.32V. <Q> I'm not an expert, but I think your problem is your weak 1M pullup R3. <S> Until your soft latch switches on, the load circuit will be acting as a pull down through that 100k and it might keep the gate low. <A> And DC/DC converter has capacitor on input. <S> You must place 10k resistor as load first on output of this switch and then also put diode to + wire and then connect something what you want to control by this switch. <S> Capacitor hold voltage up after switching action and R2 in this circuit then doesn't work like it should. <A> I had the exact same problem. <S> I tried different soft latch circuits, but it didn't work. <S> I then changed the size if the capacitor on the input side of the voltage regulator, to a larger size, and it worked. <S> It seems like the voltage regulator become unstable when the transistor of mosfet of the soft latch switches.
If you have capacitor on output of this latching switch, it doesn't work.
Get wattage (electrical power) from applicances and devices plugged in around the house Firstly, I'm not really an electrician or an electrical guy with lots of knowledge about electronics but I'm always interested learning to it. Yesterday, I asked my wife to help me out determining the wattage (electrical power) of an electrical device such as TV, Reff, PC, Laptop, Tablet, etc, etc anything around the house that uses electricity and I plotted each one of them and log at least 3 wattage and average it. I have this: that's 95% of our electrical devices here around the house. I can play with values and see how much it costs if this device is turned on for this hours. But doing it is pretty tough job because we had to turn off everything and turn on and off each device to check its wattage. But I wonder if an multimeter can do this? Can I check the wattage of an electrical device such as TV, Laptop , etc even if they are plugged in? I only have this cheap small digital multimeter I carry around the house. Here in Philippines, meters are exposed and some are digital, like ours. That's the way I check the wattage of the device - sort of like this one: <Q> But most multimeters typically lack the range to be useful for things like appliances. <S> Instead, a product like the "Kill A Watt" meter is particularly well-suited for what you're trying to accomplish. <A> Power is an RMS voltage measurement multiplied by the current. <S> You can get current clamp meters to safely measure the current, and then having measured the voltage you could perform the calculation manually. <S> There is a good open source project here that explores many options of cheap power measurement. <A> There is systems that allows you to continuously monitor the powerusage around your house, this is a bigger investment but is really cool. <S> There is project called OpenEnergyMonitor that tries to this with Open Source and Open Hardware, so this project can give you some ideas. <S> http://openenergymonitor.org/emon/
A multimeter can be used to measure amps (multiply by volts to get volt-amps, which is typically not far off watts).
Use old PC power supply for 24v solenoids? I'd like to use the +12 and -12 leads from an old PC power supply to power 24v irrigation solenoid valves. The values are rated 0.22A inrush current and 0.1A holding current. I only plan on 1 or 2 solenoids being energized at a time. I can arrange for them not to be initially energized at the same time. I see from some wikedpedia info on PC power supplies that the -12 is only rated for "minimal" current. But what is a typical -12 max current value for some random old PC supply? Q: Would a 1A max load be a problem? Bonus Qs: Any problem using the +12 and -12 leads for 24 V potential? I'll be controlling the solenoids through a relay. For the solenoid loads, should I use diodes across the solenoids? <Q> The maximum load for -12V on a typical ATX power supply (regardless of output rail) is only 300mA. <S> That won't help you much. <S> You'd be better off boosting the the +12V rail to 24VDC with a switching converter and using it to power the solenoids. <A> Here is a random 350W power supply ( http://intrl.startech.com/Computer-Parts/PSUs/Dell/350-Watt-ATX12V-201-Replacement-Power-Supply-for-Dell-PC~ATXPW350DELL ). <S> It can provide 0.8A on the -12V rail. <S> My guess is it will struggle with 1A. <S> Why do you need the 1A? <S> 2 solenoids <S> x 0.22A inrush makes me think you need about 0.5A at worst case scenario? <S> Is there anything else on that line (especially semiconductors?) <S> It is good practice to put catch diodes on the relays and solenoids to avoid large voltage swings but <S> if there is nothing sensitive on the line you can do without them. <A> Have you tried triggering the Solenoid with 12v only? <S> I think you will find they are quite liberal with their input voltage range, and with a standard ATX supply, the +12v rail can handle a couple amps no sweat. <S> As to your direct question, most if not all ATX or similar power supplies have their voltage and current ratings listed on a sticker on them. <S> Since you are combining rails to produce a 24v differential, which ever has the lower current rating would be the one that decides how much power you can source/sink through it. <S> Undoubtedly, the -12v Rail will be the weaker one. <A> In my experience the 24 volts is for AC not DC. <S> Check the markings carefully. <S> I am thinking of using a 24 vac valve ( solenoid ) on dc to make it easier to power with a battery. <S> I expect a greatly reduced voltage. <S> I do worry that I may polarize the magnetic material, but will have to try the experiment.
Bonus Qs: There is no problem using a -12 and +12 to get a 24V potential. The answer for your specific power supply will depend on the power rating - try to find the datasheet or look for stickers on the back.
TXERR error in CAN communication I tried CAN communication using PIC18F25K80 and MCP2551 . Using two nodes, I could transmit data from one node to other. But, data was transmitted only when the receiver buffer was set to ignore all errors and both the nodes were configured in 'Normal mode'. And, then I configured the receiving node in the 'Listen only mode' and data was received even when the receive buffer was set to 'Receive all valid messages as per the EXIDEN bit in the RXFnSIDL register'. But, as the TXERR and IRXIF bits were set in the transmitting node, TXREQ bits was not cleared and the message was continuously sent. What could be the reason that causes these errors? (I have used the internal RC oscillator set at 64 MHz and the baud rate was set as 100 kbit/s.) <Q> As Martin says, lack of proper terminators can certainly be a problem. <S> However, R-C oscillators are generally not accurate enough for CAN. <S> Usually you need less than 1% mismatch, which would imply .5% accuracy at each end, which the internal oscilators of these PICs isn't going to give you. <S> Try with a crystal driving each PIC and see if you still have problems. <S> By the way, I have used the 18F25K80 and MCP2551 in numerous designs and never had a problem. <S> However, I used a crystal each time. <S> Added: <S> Of course this is important. <S> The CAN lines as driven by the MCP2551 are differential, but are still directly connected. <S> As such, they have a limited common mode range. <S> Both lines float at about 2.5 V when in the passive state. <S> In the dominant state, each line is pulled about 900 mV from the idle level. <S> The MCP2551 can tolerate a reasonable amount of common mode offset on receiving, but of course it needs the lines to be fairly close to the nominal values when transmitting. <S> Such CAN systems require a ground connection. <S> In this case, CAN is a three-wire bus: CANH, CANL, and ground. <S> This is why it gets the frame correctly. <S> However, due to the common mode offset it can't successfully put the ACK bit on the bus in such a way that the transmitter sees it. <S> The transmitter therefore thinks there is a error and retries. <A> CAN bus should have at least TWO active nodes. <S> CAN Transmitter considers a transmission successful only if it gets ACK. <S> When you configure a node in "Listen Only Mode", it recieves data but doesn't Acknowledge it. <S> As there is no other node on bus, Transmitter doesn't get any ACK and hence Error. <S> Try connecting one more active node on bus and do same experiement. <S> As far as my Experience, You will not get any errors. <A> Most likely it is due to not terminating the cable at both ends with the 120R resistor. <S> If that has been done and there are still problems, make sure you have set the same baud and other CAN settings at both ends.
Another problem is now apparent, which is that you may not have a common ground between the two nodes. What is probably happening is that the common mode offset is within the range of the receiving node to receive.
Why is it desirable in an amplifier to have high input impedance and low output impedance? I've learned that it's desirable in an ideal amplifier to have high input impedance and low output impedance. Why exactly? What are the implications an amplifier has the opposite- low input impedance and high output impedance. I don't exactly understand how impedance input and output. <Q> Actually, the premise of your question is only true if the signals you are interested in are voltages. <S> In that case, if the amplifier draws no current through its input (has infinite, or at least very high input impedance), then connecting it to a source won't affect the signal voltage, regardless of what the source impedance is. <S> Similarly, when you connect a load to the output of your amplifier, if the amplifier has zero output impedance, the signal voltage won't change, regardless of the current drawn by the load. <S> These properties make it much easier to analyze the behavior of the system overall. <S> However, if the signals you're interested in are currents rather than voltages, you want your amplifier to have zero input impedance and infinite output impedance for the same reasons. <A> The ideal amplifier should not draw any current at all from its input. <S> Assuming a two input amplifier the signal current in both input probes is zero. <S> In other words the input impedance must be infinite! <S> The output, shoul operate as the ouptut of an ideal voltage source. <S> This means that the pottential between the output and the ground must be \$A(v_2-v_1)\$, no matter how much current would a load conected to the output would draw. <S> In other words the output impedance must be zero! <S> For a real amplifier, the input impedance must be as large as possible while the output impedance must be as low as possible! <A> Simplified answer relating mainly to audio amplifiers: - An audio amplifier with a low output impedance can deliver larger powers to its loudspeaker more efficiently than an amplifier with higher output impedance. <S> Thus, you will find that audio amps have output impedances measured in less than 1 ohm and in a lot of cases in milli-ohms. <S> If, an audio power amplifier's impedances were reversed, as you suggest, it would potentially produce a noiser signal on the loudspeaker and, be power-inefficient to the point that it would get significantly warmer in generating the equivalent sound level from the speaker. <S> There are other problems with low input impedances in that reshaping of the frequency response of some microphones may occur. <S> This is also true of the high output impedance - the electro-mechanical nuances of the speaker may cause some signals to appear louder than what they should be. <S> As an aside, there are many amplifiers that do have a fairly low input impedance and these are typically in the field of RF where you need to match impedances to prevent signal reflections. <S> No-doubt there are other examples I've missed. <A> Negative Feedback is used to 'linearize' the output of an Amplifier. <S> An amplifier is linear if it's output is an exact amplified copy of the input. <S> If an amplifier is not linear , the output is distorted. <S> Linear Distortion is one of the specifications that is given for any good audio amplifier. <S> A side effect of Negative Feedback is that, in common configurations, it creates a low-impedance output. <S> No matter what load you put on the amplifier, the output Voltage is the same: the output voltage is feed back into the input to linearize the amplifier, and that makes the output voltage insensitive to load conditions. <S> So: Good amplifiers use negative feedback: voltage feedback is common: good amplifiers commonly have low output impedance. <S> The voltage response of some loads (particularly speakers) is quite non-linear, and quite frequency sensitive. <S> For this reason, high-impedence-output amplifiers, that is, current-drive amplifiers, are considered by some audio engineers to be superior to low-impedence-output audio amplifiers. <S> High-output-impedence amplifiers are not necessarily any less efficient at transferring power into speakers (loud speakers inherently sound better than soft speakers), and are not inherently any less efficient at transfering power from the power supply into the speakers (electrical power in that quantity is cheap anyway), but current-sense circuits have always been slightly more difficult, slightly more expensive, and slightly less linear than voltage-sense circuits. <A> It is desirable to minimize the loading effect either when the amplifier(voltage) is used to drive a circuit or when it is being driven by some other circuit.
On the other hand, a weak and feeble signal from (say) a microphone doesn't want to struggle with feeding its signal into an amplifer with a too low an input impedance - this may potentially (and significantly) attenuate the signal and require higher levels of amplification to compensate thus increasing noise pick-up etc..
Would a capacitor labeled 470K be 47pf or 470pf I have a cap labeled 470K. I would have thought for sure that it would be 47pf until I saw this link where it said if a capacitor has a 0 as the last digit, it is the whole thing in nano-farads. How can I figure out this without a capacitance meter. 470K 100V C is the whole label if that helps. <Q> According to this site , 470k would be 47pF... <S> And you can see in the image below: <S> 471 -> 47 <S> x 10 <S> = 470pF <S> In general, on those small, rounded, ceramic capacitor, you don't have too much space to write. <S> The brown color doesn't help, too, to use colors like resistors. <S> And in general this size of capacitor will have a low value. <S> So, to me , it makes sense to write the value using just 3 numbers, and also it's ok that those values are expressed in pF... <A> Sometimes, it's a single letter, and sometimes it's a string. <S> You can read more at this link . <A> If you have a 471 capacitor of the same type, then clearly a 470 capacitor is not 470pF.If <S> you have a 47 capacitor of the same type, then clearly 470 capacitors are not <S> 47pF.You can make the same judgements if you have capacitors of the same type marked xx1 or xxFor example 331 (330pF) and 33 (33pF). <S> You can compare the physical size of the capacitor to a 472 and a 479 of the same type. <S> You can connect it to a resistor, and observe the decay curve with an oscilloscope. <S> You can download the spec sheet for the capacitor, or for the manufacturer, and read what the marking convention is. <S> You can connect it to a linear regulator that requires 470pF load, and see if it oscilates You can buy a 47pF capacitor of the same type, and see what how it is labeled. <S> OR <S> You can assume that it is a 47pF capacitor. <S> If it's a K labeled capacitor, the chances that anyone would label a 471 as 470 are small. <S> 470 <S> 10% on a small can might be 470pF, but 470K is 47pF.
Generally, I'd take a 470k cap to be 47 pF. For a lot of small capacitors, the letter at the end of the value simply denotes a tolerance.
What the name of this connector? I've spent a load of time looking for the answer to this question, but I cannot find it. What is the official name of this connector? <Q> It's a female crimp terminal (sometimes called an open barrel or u-barrel crimp connector). <S> Seems like that information was available from where you apparently got the image on ebay <S> If the case was that you happened across this image out of context, I recommend images.google.com . <S> Google lets you search by image, basically you can bypass the 1000 words by just uploading the image. <A> The metallic parts are called crimp connectors - typically sold in strips such as in the photo, and removed from the strip before / after crimping to wire. <S> The black plastic parts are called single row crimp connector housings . <S> They would be specified with pitch (distance between centers of each slot) at the least, with the common ones being 0.1" single row crimp connector housings . <S> The housings are available in singles, twos (as in the image in the question), threes, and so on, as well as in single, double, and even triple rows, maybe more. <A> At http://uk.rs-online.com , search for M20-1060200. <S> They call it "M20 CRIMP HOUSING, SIL, 2w, 2.54mm"
More specifically, since it has the plastic housing, it's called a PCB female crimp terminal.
Why does grounding my switch cause the fuse to blow? I'm working on restoring an old ATV, and I'm having a bit of trouble with the wiring. When I got the ATV it was missing the ignition switch, so I decided to replace it with this awesome looking switch instead. Which I'm guessing, internally looks something like this... After looking at the wiring diagram, I've figured out how to connect the switch. Click for larger view When I install the switch like this, the ATV powers up. However, when I ground the switch so the LED will light... The fuses blow. If I don't connect the ground and I connect the pink and black wires to the switches Ground terminal, the LED lights but the ATV is not powered up. How can I connect the switch so that it turns the ATV on, and the LED on the switch itself also lights? <Q> You need a resistor between the LED pin and ground. <S> Try anywhere from 220 to 1K ohm. <S> The LED, being a type of diode, will allow as much current as it can if directly connected from power to ground. <S> If it blew a fuse, it's possibly blown the LED too... <S> but you may be lucky. <A> Since the switch description does not mention an LED, I suspect this is an SPDT switch, with no LED, so the third terminal is one of the switch contacts. <S> If so, you should not make any connection to the third contact. <S> You should be able to test this with an ohmmeter - measure the resistance between the center contact and either side contact, with the switch in both positions. <A> There is no google-able technical info for this switch, but if you read the customer reviews on the RadioShack site, you can find a few clues. <S> (Firstly, it's worth to pay attention to the negative reviews about how the switch has weak plastic housing, plastic threads, and wears easily. <S> One reviewer advises against automotive or marine use.) <S> User "Ridgeline" from Washington <S> , DC wrote this: I needed to find a switch for the amplifier in my car, so i could turn it off and on when i want, this worked perfectly, only thing it had no instructions <S> and i haven't wired anything in 5 years. <S> But i got some help from some friends, "POWER" goes to power (duh), "ACC" goes to whatever it is you trying to turn on with the switch, "GROUND" goes to ground (i just tied it to a bolt on the car) <S> The issue doesn't appear to be that the switch needs a resistor in series with the LED. <S> User "TJ N" from New Jersey writes the following, without any mention of a resistor: <S> The LED appears to be a true 12V LED, and I have taken it up to 18V without it burning out. <S> They have separate supplies (Bat1 and Bat3; red, and pink with grey stripe) with separate 15A fuses, but you've turned them into one big 30A circuit. <S> Be that as it may, the problem here, I suspect, is this: <S> When I got the ATV it was missing the ignition switch <S> That someone possibly removed it while trying to solve an electrical problem, which they were not able to solve, and which you've now made your problem. <S> Maybe grounding the ground terminal of the switch just tickles the problem, or maybe it is just a coincidence. <S> If you only repeated the trial once and blew one set of fuses, that doesn't prove anything. <S> The problem must be reproduced to confirm the hypothesis, otherwise you could waste a lot of time on a distracting, false hypothesis. <S> As it is, I'm afraid that this question is "too localized".
The wiring concept looks okay, except for the small problem that you're combining the ignition circuit with the accessory circuit. The switch isn't there, because someone removed it.
Interpreting the power rating of the refrigerator My refrigerator is rated as 130W of power. I need to know how to interpret this. Does that mean if the compressor works for a whole hour then only it consumes 130W? Or is 130W the average power considering that the compressor will be sleeping for most of the time? The refrigerator is from LG electronics. <Q> 130W continuous power draw would be a huge fridge (if it is any good at its job). <S> For example, my fridge does 25W on average over 24hr and has a capacity of approx. <S> 200 liters cooling area + 94 liters fridge area. <S> A fridge in Europe comes with an energy label that specifies its consumption / power-hungry'ness, if you search for your exact type on Internet you'll find these specs for your fridge too. <S> Amongst other things the label will specify the power use per year. <S> In my case 219kWh/year. <S> So if there are: 1000 <S> Wh in a 1kWh <S> 365 days in a year 24 hours in a day <S> Then the average power equals: \$P_{avg} = <S> \dfrac{219 × 1000}{365×24} = <S> \boxed{25\text{W}}\$ <S> The type plate however states 90W. <S> This is maximum power when the compressor is running and probably when the lighting is turned on. <S> The type plate also states 0.7A, which would come to 230V × 0.7A = 161VA. <S> Notice <S> these are VA, not W! <S> The higher current probably be drawn during compressor start up, and probably has some safety headroom too. <A> Assuming this comes from the nameplate label on the refrigerator, it is the maximum continuous power that the device can consume. <S> In other words, it is the power consumed with the compressor running, condenser and evaporator fans running, fridge light on, etc. <S> It is not the power consumed when the compressor/fans are starting (higher peak current), nor is it any sort of long-term average draw. <S> The compressor duty cycle will be dependent on factors that vary wildly between use cases - Is the fridge in 0C ambient or 50C ambient? <S> Was the door left open? <S> New refrigerators come with an efficiency sticker that compares annual energy consumption for a particular model to models of a similar size and with similar features. <S> This is as close as you'll get to a comparison of average power consumption, and it's only going to be relative to other models, not absolute. <A> You're going to have to contact the manufacturer (or read the power rating information in more depth). <S> There are many ways to measure the power draw of an appliance, and a number of standards for providing ratings as such. <S> We can't give you more information without knowing which method the manufacturer has used. <S> For what it's worth, I would guess that that is an average power rating.
If you step back and think about it, there's no way it could be anything other than this - the average power consumption of a refrigerator will be a function of the compressor duty cycle.
Trigger Monostable 555 When Capacitor Raises above 0.5 Volts So I want to trigger a monostable 555 to fire when a capacitor raises above 0.5 volts. My plan was to use a Zener diode to bias an NPN transistor that would trigger the 555. But I discovered the smallest zener voltage you can buy is 1.8 Volts. Is there any way I can somehow bias the zener to react to a lower reverse voltage than its actual threshold? -or- Does someone have a better idea on how to get the 555 to trigger when intended? ASIDE: I would also be satisfied with having the 555 trigger when the capacitor drops below 0.5 volts. I don't think it matters to me if it's going up or down, just so long as I can make the trigger at the stated voltage (very close to zero). The purpose is I'm trying to trip the 555 at some point where the cap is very close to zero volts. <Q> The threshold triggering could be done using a rail-to-rail comparator, such as the Linear Technologies LT1711 , using a 0.5 Volt reference voltage. <S> Depending on the precision required, the voltage reference can be obtained by using a sub-bandgap voltage reference IC such as the Analog Devices AD130 which has a 0.5 Volt output, or through a resistor voltage divider between the supply voltage and ground. <S> For a hybrid compromise, a Zener diode shunt reference of say 1.8 Volts can be used with a resistor voltage divider connected across it: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The triggering slope (rising or falling) can be switched by interchanging the inputs to the comparator. <A> Jippie pointed out in his comment this: Voltage drop of a normal (eg. <S> 1N4148) forward biased diode is about 0.6 or 0.7 volts, maybe that is worth an experiment? <S> A Schottkey diode (eg. <S> BAT43) would be around 0.3V <S> My note: <S> Brilliant! <S> A regular diode won't begin to saturate with current until the forward voltage is reached. <S> Excellent! <A> This is hard and fast solution. <S> You can use diode forward drop to bring down Trigger and Threshold requirements. <S> Here is an example. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> There could be more elaborate schemes to manipulate Pin 5 <S> (Control) <S> to more accurate value for Trigger.
So just using a regular diode in the forward direction and connecting it to the base of a suitable NPN transistor would allow the transistor to be biased on strongly only when the diode voltage threshold was reached.
Failed to get Device ID - PICkit 3 & PIC16F684-ICD & AC16205 Like it is already mentioned in the title I have question regarding this dev stack: MPLAB X IDE v1.80 PICkit 3 PIC16F684-ICD ( datasheet ) AC16205 There is image of how things are connected (I don't think there is a problem): Powering settings: There is simple program I am using for testing: /* * File: main.c * Author: Primoz * * PIC16F684 * * Simple test program. */#include <xc.h>// CONFIG#pragma config MCLRE = OFF // MCLR Pin Function Select bit (MCLR pin function is digital input, MCLR internally tied to V#pragma config FOSC = INTOSCIO // Oscillator Selection bits (INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN)#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)#pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled)#pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled)#pragma config BOREN = OFF // Brown Out Detect (BOR disabled)#pragma config IESO = OFF // Internal External Switchover bit (Internal External Switchover mode is disabled)#pragma config FCMEN = OFF // Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is disabled)void main(){ TRISA = 0b111101; PORTA = 0b000010; for (;;) { ; }} I successfully programmed the device only few times. Most of the time I get this output: Connecting to MPLAB PICkit 3...Firmware Suite Version.....01.28.72Firmware type..............MidrangeTarget detectedFailed to get Device ID So my question is what could be a reason for such an odd behaviour? How can I make it work? If you need any additional information, please let me know... <Q> I checked out if there are any loosed connections like suggested by @pjc50 - found none. <S> I even ordered new header and on my surprise the issue was still not gone. <S> After many trial and error I figured out that it works if I set Voltage Level to 4,875 (instead of 5V ): <A> No promises, but I have personally experienced that exact same behavior more than one hundred times. <S> Every single one of them was fixed by throwing away my connecting cable, and wiring a new one. <S> This means <S> The plug on the PICkit3 <S> The physical connector on the PIC side itself <S> The physical wires between those two plugs <S> Your current observations might be totally confusing you; as mine confused me repeatedly when this was happening over here. <S> When you consider broken wires which are "sometimes there" the picture becomes quite a bit more clear. <S> Incidentally, if... <S> The problem recently started <S> You have only one set of these connecting wires arranged for your use <S> They used to work perfectly <S> You are currently seeing "sometimes" results (perhaps, "random success") .. <S> then my suspicion increases. <S> Again, no promises, but this is what happened to me on my PIC24 arrangement with an ICD-3 and <S> occasionally a PICkit. <A> I have a similar issue with firmware 01.28.72. <S> When I went back to 1.12.01 it worked again. <A> I had the same problem, getting error messages such as "Failed to get Device ID". <S> My configuration is the 44-pin demo board with a PIC16F887, Pickit 3 (firmware version 1.28.18), and MPLAB 8.88. <S> I followed PrimosK advice,above, and it was right on the money: <S> Reduced the voltage from the default 5.0V to 4.875V and everything worked. <S> But also noted that MPLAB does not keep the settings and had to set them again the next time I started MPLAB.Good luck. <A> I had the same problem, working with a Pic16F883, and PicKitt3. <S> And Now is fix it, I power the target card with a external source (5Vcd) and in the Project options -- <S> > <S> Programmer, I uncheck box the option "POWER TARGET CIRCUIT FROM PICKKIT3", I hope this info help you. <A> Similar problem was faced by me. <S> I have a 24FJ128GA308 based controller board with a 128*64 COD display interfaced and board is powered up externally. <S> For a unit with just manufactured (un programmed controller), when invoked 'Program' option, it gave error as "Programming Failed - ThePICkit 3 is missing a Memory Object.' <S> I tried with changing - with Controller board powered up from PICKit 3, still it didn't work. <S> Then under Programmer option, I used 'Hold in Reset' for 2-3 seconds, released back, then 24F got programmed and board started functioning. <S> Incidentally, I have a right reset circuit. <S> -Chandrashekhar Joshi
What you are describing is exactly what I observed.
Breadboards and ground loops The book Practical Electronics by Scherz and Monk states (3rd ed., p 48): A ground bus, or bus bar found in breadboards... serves as an adequate substitute for a single point ground. Is this statement correct? <Q> The only real problem with that statement is that it doesn't give any context. <S> It certainly isn't true for high frequency circuits, but perhaps they figure that if try high frequency circuits on a breadboard you'll have bigger problems anyways. <S> Basically there is so many other crappy aspects of breadboards <S> (trace to trace coupling, additional capacitance, poor connections, loops of wires ...) <S> that this is the least of your worries for doing performance circuits. <S> But people do circuits on tose all the time and get results so there obviously is a usefulness to them. <S> In this case it really isn't an issue with whether or not it is bussed, that bus in there can probably handle amps <S> it is the connection to the bus that is the issue. <S> Most of the frequencies that you deal with on circuits that can run on breadboards are modeled by lumped circuit elements so the distribution of wiring plays less of a factor. <S> The author should have really stated the limits and their assumptions to avoid that being too broadly applied. <A> No, the statement is not correct. <S> X is not an adequate substitute for Y, when Y is specifically designed to fix issues with X. <S> At least, not in those circumstances when those issues are a problem. <S> If bussed returns were absolutely adequate, there would be no point in star grounding, because star grounding is more difficult to lay out and takes up more PCB space, and creates more messy point-to-point hookup cabling when it's done between devices in a chassis. <S> It is much more tidy to daisy chain devices. <S> Imagine if every light in a Christmas tree had individual wiring all the way back to the power supply. <S> But chaining, convenient though it may be, introduces parasitic interactions between circuits or devices. <S> You can have a ground loop even on a single circuit board. <S> For instance a the power output stage of an amplifier can generate large currents which can appear as a voltage on the reference ground of a sensitive input stage, because the return path happens to be shared. <A> I'm going to play the devil's advocate and say that it is correct, within the context of a breadboardable circuit. <S> As nice as a star ground topology sounds, a breadboard has no practical way of keeping return loops small. <S> The bus bar is thick and relatively wide, and will have low inductance and dc resistance compared to the wires in a star topology. <S> Mildly high frequency power related returns can be localized with capacitors. <S> So I'm going to go on a limb and say that if the circuit works on a breadboard with a bunch of grounding wires, it will also work with the bus bar <S> , therefore it is an adequate and far more convenient replacement.
A single point ground is used specifically to avoid daisy chained returns, because it addresses problems caused by them. So yes, I think it is correct, within the context of a breadboard that lacks power planes and alike, and with reasonable inductance on pretty much any connection you make.
How do I solder this USB Connector? I bought this micro usb part : I need to solder it to a PCB that I designed, but I'm having a ton of trouble figuring out how to do so because the tabs are very close together and hard to reach. Is there a technique to do this / are there extraneous parts on the connector that I can remove to make it easier to solder? <Q> Provided your PCB already has the correct footprint, the best way to solder this is hot-air/paste or an oven. <S> Here's a picture of what the footprint for a similar connector (or the same, I'm not exactly sure) <S> looks like on a board I designed recently. <S> The important thing is getting all of the contact points molten at once, otherwise you'll be stuck with mechanical stresses on the joints (which is, obviously, undesirable) or bad connections. <S> An oven and solder-paste could also work quite similarly. <S> A general method for that would be to apply paste, mount the connector, put the board in the oven and heat it until the joint forms. <A> Your best option assuming that you do not have hot air gun or soldering iron with a very small tip is to place the connector on your PCB, solder all pins at once and then remove shorts using solder wick. <S> Some tin will remain between pins and pads holding your connector. <A> You can use 'swipe soldering' for this. <S> There's a good video on YouTube about it. <S> Basically you apply flux to the whole area, then just swipe the iron and solder across all the pins. <S> The solder will separate if you do it right. <A> I tried numerous methods and found the following to work best: Use a fine tip Flux on the connector pins and on all the pads on the board <S> Pre-tin the connector pins one by one Place the connector on the board - carefully align all the pins on the pads, leaving a bit of extra space on each pad. <S> Carefully apply pressure on the connector while soldering one of the side flaps to the board. <S> Careful not to move the connector. <S> If moved by accident, desolder the side flap and try again (from step 3). <S> Solder the other side flap. <S> The connector will not move easily but still be careful. <S> Solder each pin to its pad by touching the soldering iron's tip to the extra space you left on each pad. <S> You might need to add a bit of solder to the tip before soldering each pin but be very careful not to add too much or you might risk creating bridges between the pads. <S> Good luck! <S> EDIT: typo
I soldered these connectors onto the PCBs by paste and hot-air (you can check out a quick video on what hot-air looks like here ).
How do I buffer a high Frequency clock on a Spartan 6? I am trying to create a high speed clock on my Spartan 6 Atlys Board . The onboard clonck is 100MHz. I am trying to use an on chip PLL to get a faster clock. I am using a the clocking wizard IP to generate a higher speed clock. Things work fine as long as my clock frequencies are below 400MHz. If I try to run the output clocks any faster, I see the warning - "CLK_OUT1 frequency requires that this output clock must drive a BUFFPLL" The datasheet of the clocking wizard states that If a clock output requires special buffers like BUFPLL which the wizard does not generate in the design, alert messages are flagged to the user. Feedback for the primitive can be user-controlled or left to the wizard to automatically connect. If automatic feedback is selected, the feedback path is matched to timing for CLK_OUT1. The Spartan 6 clocking guide mentions BUFPLL as a primitive. I have never done any such designs. How do I proceed. How do I create a BUFPLL in my design? Is this simply beyond the capability of a Spartan 6 or my board? <Q> I haven't used Spartan6 specifically, but you should be able to instantiate a BUFPLL <S> (page 52) primitive and feed the output of whatever is generated by the wizard into that. <S> Page 80 of <S> Xilinx Spartan-6 Libraries Guide for HDL Designs will have the info you need on instantiation. <A> Anything higher than 300 MHz needs optimal design and environment conditions. <S> Even if frequencies higher than that are observed on the Oscilloscope they would be attenuated and not of the right voltage level. <S> To achieve higher clock speeds you need to get faster FPGAs (Kintex Series etc.) <A> If that is the case you indeed need a bufpll to access the io-banks. <S> you can find an instantiation template for bufplls in your ise enviroment (yellow bulb) on top of your ise controlpanel. <S> you can find it among other usefull stuff like plls and dcms below the clocking tab. <S> copy this into your hdl source code. <S> do not forget to include the unisim library and that a bufpll can only be driven by port clk0 or clk1 of your pll. <S> frequencies up to 1 ghz as io-clk are possible. <S> although you might also need a oddr primitv, which can also be found in the library ive mentioned.
Your problem seems to be routing a highspeed clock to io-logic to provide this to an external peripheral.
What is the difference between a PLL and a DLL? Phase Locked Loops (PLL's) and Delay Locked Loops (DLL) are used in various applications but there isn't yet a salient discussion of the key aspects of these circuits, how they operate, in what applications they might be used, the comparison between the two circuits and why one should be used vs. the other. <Q> A PLL controls a voltage-controlled oscillator in order to bring its frequency (or some derivative of it) into phase (and frequency) lock with a reference signal. <S> PLLs have many applications, from creating a "clean" replica of a noisy reference signal (with amplitude and phase variations removed), to creating new frequencies through multiplication and division, to demodulating phase- and frequency-modulated communications signals. <S> The input-to-output transfer characteristics of a PLL can be controlled through the design of its feedback network. <S> The input to the delay line is usually also the reference signal, so the various taps provide additional signals that are interpolated and/or extrapolated from the period of the reference signal. <S> DLLs are commonly used in high-speed communications among chips on a board (e.g., between a memory controller and its SDRAM chips) in order to "cancel out" things like input and output buffer delays as well as wiring delays, allowing very tight control over setup and hold times relative to the clock signal. <S> This allows data rates to be much higher than would otherwise be possible. <S> With suitably-designed phase detectors, both PLLs and DLLs can work with nonperiodic reference signals; a common application involves aligning data signal transitions with a reference clock. <S> While the mentioned above (i.e. clean version of signal - <S> > PLL) <S> a key aspect of where PLLs/DLLs differ is that PLL's filter and effectively block jitter in the source from affecting the VCO output, whereas DLL's propagate jitter. <S> At first this may appear to be a negative aspect of DLL's <S> but it can be used to great effect. <S> In some cases you need to pull the main sampling point from the signal that is arriving and ignore the jitter in the signal, you would use a PLL. <S> In other cases, say when a signal and clock signal are subjected to the same jitter inducing effects either at the source or in the communications channel. <S> You can use a DLL and multiple sampling delay times to reduce/eliminate the relative jitter between the two signals (because they have the very similar jitter) and use the delayed clock to align to an ultimate sampling point. <A> They are different in their structure. <S> PLL's use a Voltage Controlled Oscillator (VCO) which DLL's don't. <S> DLLs are newer than PLLs and used more in digital applications. <S> DLLs use variable phase to achieve lock, i.e. they lock onto a fixed phase difference whereas PLL's use variable frequency block, i.e. they adjust their frequency until there is a lock. <A> The key differences between PLLs and DLLs are: 1) <S> PLLs extracts (locks on) <S> both frequency and phase of the input signal. <S> DLL extracts only phase. <S> 2) DLL needs a reference clock. <S> PLLs does not need a reference clock, instead it generates it. <S> 3) PLLs uses VCO. <S> DLL does not have VCO. <S> So, in a sense, one can say PLL is stronger than DLL because it can extract frequency of the data, not only phase. <S> Assuming ideal reference clock present (the frequency of the data is known), DLL and PLL may perform the same function - aligning data relative to the reference clock present at the receiver. <S> However, the way "the alignment" is performed is different. <S> PLL varies frequency, while DLL varies delay (by adjusting current pumping transistor's capacitance inside VCDL). <S> Appendix Images' source: R. J. Baker "CMOS Circuit Design, Layout, and Simulation, Third Edition"
A DLL controls a voltage-controlled delay line, which typically has many taps, in order to bring one of those taps into phase alignment with a reference signal. For most digital reclocking applications you can use them interchangeably.
Oscillocope interleave mode and repetitive mode Could someone tell me what interleave mode and repetitive mode are in oscilloscope? References would be good too. <Q> I'm slightly guessing here, and I think you are using an analog scope. <S> The average oscilloscope is single beam and can therefore only draw a single line at a time. <S> But you have two (ore more) input channels. <S> To be able to draw both channels two different tricks can be used, mainly depending on the selected time base. <S> The commonly know terms are as follows: 'alternating' for 'repetitive' mode. <S> 'chopping' for 'interleave 'and Alternating <S> The simplest mode to show two or more traces on an oscilloscope is alternating mode. <S> A full timebase sweep is made by drawing the first channel full left to full right on the screen, then the timebase is restarted and draws the second channel again full left to full right. <S> This repeats itself indefinitely and when fast enough, it appears to the eye asif both traces are drawn at the same time. <S> The disadvantage of alternating mode is that it takes at least twice as long to refresh a single trace and the display will start to flicker nervously when the refreshes for a full screen drop below approximately 20ms. <S> Chopping <S> Some oscilloscopes will automatically switch between chopping and alternating mode, some have a manual switch. <S> Rule of thumb is that for time base setting at 1ms/div or below you want to switch to chopping mode. <S> In chopping mode the oscilloscope switches very fast between the channel inputs, drawing an extremely short subsection of each trace. <S> As the scope manages the beam to switch very fast between the two traces, the vertical line will not show, but input traces will. <S> The disadvantage for chopping mode is that when the time base setting gets lower, the screen updates faster, the chopping effect will start to show on screen. <S> Digital Digital scopes, and especially the ones with an LCD display <S> , don't suffer from this problem as these displays don't use a single electron beam to draw the display but an LCD panel instead. <S> You won't find this setting on digital scopes. <S> Found the image in this article here. <A> Repetitive mode <S> This mode is used when the input signal is changing faster than the analog to digital converter can do its conversion. <S> The mechanism behind this mode is that the signal measured is repeating itself. <S> So what happens is that the signal is measured for example at t=0, t=10, t=20, t=30, t=40, ... To increase the picture quality/resolution <S> , after the first full timebase sweep subsequent measurements are taken: t=1, t=11, t=21, t=31, t=41, ... And again t=2, t=12, t=22, t=32, t=42, ... <S> You get the picture. <S> A full image is built over time. <S> This mode only works when the input signal is repetitive. <S> Advantage of this mode is the much higher frequency you can capture, disadantage is a higher probability to miss glitches. <S> For interleave mode refer to @ThePhoton 's anwer. <A> I found the manual for your scope here . <S> You can have one or both of these functions on or neither of them. <S> Interleave mode "doubles the amount of memory per channel, while cutting the number ofchannels in half." <S> Essentially it disables channels 2 and 4, and makes their memory space available for storing data captured on channels 1 and 3. <S> It allows storing and manipulating longer data records on channels 1 and 3. <S> Repetitive mode is described by @jippie in his answer --- a way to sample a repetitive signal with more resolution, without increasing how often the ADCs are actually triggered.
Interleave mode and Repetitive mode are separate/orthogonal functions.
How to Power a Tank Circuit with Mosfet without the Inductor Undesireably Triggering the Mosfet BACKGROUND: I have this circuit that I asked about in a previous question: Someone kindly explained that the problem I'm having with the circuit is that the mosfet is being triggered by negative voltage in the tank circuit causing the mosfet to stay on longer than I want it to. It's being caused by the initial field collapse of the inductor before the first oscillation begins. The result is the appearance of a delay between the end of the gate pulse and the start of the first oscillation. The result is the following messed up scope shot (green signal is mosfet gate, and yellow signal is mosfet source voltage): MY NEW QUESTION: Can some folks give me direction on a better way to power the tank circuit without causing this behavior? I guessed that using a BJT would probably fix the problem, but I was wondering if there's a way to stick with mosfet. I'm finding that I'm running into the same problem in other configurations with inductors and mosfets. <Q> One problem with your present circuit is that by putting the N-channel MOSFET on the "high side" of the tank circuit (between the power supply and the tank), it is dissipating far more power than necessary. <S> You're essentially forcing the drain-source voltage to be equal to the gate threshold voltage (about 4V, based on your waveforms), rather than allowing it to be as low as possible. <S> One obvious solution would be to put the MOSFET on the low side of the circuit, between the tank and ground. <S> Or you could stay with a high-side switch, but make it a P-channel MOSFET instead (which will require an inverted drive signal). <S> Either way, the MOSFET will stop conducting as soon as the gate pulse ends. <S> However, this means that you may see some very high (or low) voltages at the drain of the MOSFET because of the inductive kick of the coil. <S> Just to put some numbers to this, and assuming zero losses, the peak current in the coil will be $$I_{peak} = \frac{V}{L}\cdot <S> t_{ON}$$ <S> And the peak voltage after the MOSFET cuts off will be $$V_{peak} = <S> I_{peak} <S> \sqrt{\frac{L}{C}}$$ <S> Which means that you can control V peak by either limiting the on time of the gate drive signal, or controlling the ratio of L to C, or a combination of both. <S> Using some numbers pulled from your scope traces, it looks like if your capacitor is 5 µF, your coil must be about 2.5 mH. <S> Also, your t ON looks to be about 1.6 ms. <S> Therefore, I peak is going to be about 7.68 A (!) <S> V peak will be about 172 V. <A> There are some things to be aware of with LC resonant circuits: Parallel LC circuits ( <S> like you have here) are best driven by current sources. <S> Voltage sources (like you seem to be trying to do here) are good for driving series LC circuits. <S> Any ringing in the circuit will decay due to resistive losses (dampening) in the circuit. <S> The easiest way to get sustained ringing will be to use a switched voltage source into a series LC, and apply pulses at a period of t = <S> \$2 \pi \sqrt{\text{LC}}\$. <S> You could use a half bridge or synchronous switched source like this. <S> Pulse <S> width of the pulses will depend on the loss of the circuit. <S> The less loss, the narrower the pulse width would need to be. <S> For the example LC values shown you would want to apply a pulse every 200uSec. <S> For example a one time pulse of 50uSec (or 1/4 the LC resonant period) <S> width would give a maximum amplitude of \$2 V_{\text{cc}}\$. After that you would only want to apply maintenance pulses of narrower width to keep the ringing going. <S> HighDrive and LowDrive signals could be provided by a half bridge drive IC of your choice (like a IR2104, or LM5104 for example). <A> Based on what everyone put in, it appears to me that I really need to switch to BJT's. <S> My purpose is to maximize voltage rise, and now I understand how it's extremely difficult to do this when using MOSFETs since any excessive voltages will impact the gate/source field and destroy it by putting too high of voltage difference between them. <S> BJT's will be a lot more rugged and don't have the field stress problem.
You will want to add something to the circuit that limits the voltage to whatever the MOSFET can tolerate — perhaps a large-value zener diode.
Mathematical rigour in Signal and Systems I'm an electronics engineering student with high inclination to analysis and pure mathematics ( abstract algebra/linear algebra ... ). I was just wondering if there was any book ( or any resource ) that treats signal and systems and signal processing with a lot of mathematics rigour ( actually doing proper complex analysis, using functional analysis and linear algebra rigorously to explain convolution, fourier, laplace and z transforms for example ). I'm very disapointed with the books i've read ( Oppenhein, Lathi and related ) because it actually throws a lot of the beauty of analysis and algebra away, focusing on the computational side. Thanks a lot <Q> This xkcd comic comes to mind. <S> EE is some kind of hybrid of applied physics and mathematics. <S> It's easy for a mathematician to pick up an electronics book and move to the left. <S> It is not as easy for a EE to pick up an advanced mathematics book and move to the right. <S> For most practical things, the the math is well understood. <S> For example, filters are commonly developed from canned topologies, and most practicing EEs let MATLAB or other software do the number crunching. <S> It's just not worth the time it would take to work through all of the transforms manually to get the transfer function, especially for filters higher than second order. <S> If the filter is going to be implemented digitally, all it takes is a z transform and some algebra to get to a difference equation. <S> The majority of the guys that care about the math at the level you're interested in are researchers. <S> You might look at the Proakis signal processing and communications books. <S> They have quite a bit of math in them, but your expectations aren't clear enough to me to say whether you'll be satisfied with them. <S> You would probably be better served to look for straight math books that cover the topics of interest. <S> Unfortunately, I cannot provide any recommendations there. <S> That question may be better suited for Math. <S> SE <A> However, it doesn't offer a lot of background on sampling and digital signal processing - but any good communications engineering 101 will, like, maybe, here (MIT, English) or here (TUM, German) . <S> A very good one on network analysis is "Linear and Nonlinear Circuits" by Chua, Leon O., Desoer, Charles A. and Kuh, Ernest S. 1987. <S> McGraw-Hill. <S> ISBN 0070108986. <S> Using books like these for theory and reading The Art of Electronics when it comes to practical circuit design will be very useful and get you pretty far. <A> I'm not sure that you realize how ironic your question is. <S> You talk of "pure" mathematics and yet every field of mathematics that you mention (with maybe one exception) in your purity list is considered to be in the "applied" math field and would hardly meet the criteria that mathematicians would consider as pure. <S> This is especially ironic given your interest in signal processing since that does in some cases delve quite deeply into topology and multi dimensional math and what not. <S> The good news is that yes there are a lot of these sorts rigourous analysis' <S> but it's mostly in the original papers in the seminal articles. <S> Here is a short list: 1) <S> Andrew Viterbi with trellis decoding, 2 <S> ) Cooley and Tukey with the original cooley tukey algorithm, became known as the FFT, actually originally by Euler. <S> 3) Shannon and signals theory. <S> I suspect most books that you're dissing as not being rigorous enough have references and citations, follow up on the articles cited. <S> Most authors don't spend a lot of time in depth analysis in text books for the obvious reasons that they don't need to prove that, for presumably the upteenth time, that this meets all the necessary rigour. <S> Look more towards graduate level texts as well. <S> Particular journals in no particular order or reason: a) Chaos and bifurcation theory, but even that has applied in <S> it's full title. <S> b) Arxiv.org c) plos.org <A> "Mathematical Methods and Algorithms for Signal Processing", by Todd K. Moon goes through the linear algebra, at the EE grad level, used in signal processing. <S> This is a link to Amazon: <S> http://www.amazon.com/Mathematical-Methods-Algorithms-Signal-Processing/dp/0201361868 <S> See also <S> The first chapters are about Fourier Transforms, sampling, uncertainty principle, etc. <S> http://www.amazon.com/Wavelet-Tour-Signal-Processing-Third/dp/0123743702/ref=sr_1_1?s=books&ie=UTF8&qid=1368539706&sr=1-1&keywords=mallat+wavelet
Besides lecture notes or basic books about signal processing and communications engineering, I like "Wideband Amplifiers" by Peter Staric and Erik Margan (2006); it offers a lot of good math and extends this to transistor-level amplifier design ( Sample) . "A Wavelet Tour of Signal Processing", by Mallat.
Arduino Mega 2560 - Ghost Values on Analog pins Yet again in need of your help... I have the Arduino up and running reading 2 external temperature probes. I'm using a common ground (tried separate ground same result) and Analog Pin 0 (A0) with 1 probe and the second probe connected to Analog Pin 16 (A15). I am displaying the output correctly on the serial screen but as I have it looping through each of the 16 Analog pins it is displaying a value for those pins that nothing is connected to. In other languages you should always initialize all variables, inputs & outputs.. is this the same for the Arduino and if so, what is the Correct method to initialize or set the Analog pins prior to reading. Don't laugh at the code.. ;-) void setup() {Serial.begin(9600);}void loop() { for(int I=0; I < 16; I++){ int sensorValue = analogRead(I); // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V): float voltage = sensorValue * (5.0 / 1023.0) - 0.04; Serial.print("Address = "); Serial.print(I); Serial.print(" "); Serial.print(voltage); Serial.println(); delay(5000); }} The Output on the display is:- Address = 0 2.01Address = 1 2.09Address = 3 1.97...... Up to the last pin. Only Pins A0 & A15 should have values. Thanks Heaps Again...Mark <Q> It's quite normal for unconnected ADC pins that are floating to produce random results so you're probably looking for a problem that doesn't exist. <S> Do the readings from the actual channels used look OK? <S> Rather than looping through the whole lot maybe try something like the following which is untested because I don't have the Arduino IDE loaded: <S> #define SENSOR_COUNT 2const int analog_pins[SENSOR_COUNT] = {0, 15};void loop() { for(int I=0; I < SENSOR_COUNT; I++){ int sensorValue = analogRead(analog_pins[I]); float voltage = <S> sensorValue <S> * (5.0 / 1023.0) - 0.04; Serial.print("Address = <S> ") <S> ; Serial.print(I); Serial.print(" "); Serial.print(voltage); Serial.println(); delay(5000); }} <S> If the channels you're interested in don't look good maybe the input impedance is too high, try something below 10K which I believe is the usual recommendation for most AVR parts. <S> If you have a higher impedance and low sampling rate you could probably do two reads in a row so that the analog MUX has been stable a while disregarding the first reading: analogRead(analog_pins[I]);delay(1000);int sensorValue = analogRead(analog_pins[I]); <A> One other item to take into account, depending on your analog sources, rapidly switching between them with analogRead's will have some noise. <S> While there are (6 <S> ? 16?) <S> Analog Input pins, there's only 1 ADC that is muxed between the pins. <S> When the mux changes with a high impedance source, the voltage will take time to stabilize. <S> The advice I've always seen is to use two analogReads; the first to switch the mux, and to give time for voltage to stabilize, the second as the actual reading. <S> If the inputs were tied to ground or voltage (digitalWrite(HIGH) typically turns on an internal pull up resistor), you should see them stabilize at 5V. <A> Quote from here <S> The Atmega datasheet also cautions against switching analog pins in close temporal proximity to making A/D readings (analogRead) on other analog pins. <S> This can cause electrical noise and introduce jitter in the analog system. <S> It may be desirable, after manipulating analog pins (in digital mode), to add a short delay before using analogRead() to read other analog pins. <S> Like CoderTao says - try grounding the unused pins. <S> It has a sample and hold amplifier which will "hold" the voltage from An even when An+1 is read UNLESS the input into An+1 forces a new voltage. <S> The force takes a few microseconds and having an input floating does not force a change.
The similarity in values read from the unused pins to the values on your used pins is symptomatic of multiplexing several analogue inputs to the input of an ADC. The voltages read on pins 1-14, assuming they're otherwise disconnected, are probably biased by the applied voltages on 0 and 15 (everything is close to the 2V on pin 0).
How does less cable impedance, source/termination impedance, lead to longer cable length for higher data rates? This question is about high speed digital transmission on a transmission line, I need to know about how does the (1) impedance of the transmission line and the (2) source impedance and(3) termination impedance, effect the (1) cable length when we want to transmit a fixed high data rate, and also (2) effect data rate for a fixed length cable. <Q> I understand you asking these sort of questions <S> and I've tried to answer in the format that you presented the questions. <S> Please forgive if I have misconstrued something. <S> Q1 - cable length when transmitting high data rate: - (1) Impedance of the transmission line is independent of cable length <S> (2) Source impedance is independent of cable length (3) Termination impedance is independent of cable length Q2 - data rate for a fixed length cable: - <S> (1) Impedance of the transmission line is generally higher for better data success (2) Source impedance can be zero for improved results providing the receiver has good terminator <S> (3) <S> Termination impedance needs to be the correct value for the cable to minimize reflections corrupting the data <A> Q3: <S> Termination is needed at the far end to stop reflections, especially for high data rates and long cables. <S> The termination should be from the receiving end to ground. <A> This minimises reflections. <S> The actual impedance of the line is mostly set by cable design constraints. <S> The best balance of different types of signal loss is achived at impedances of the order of 50-100 ohms.
The important thing for high speed communications is that the impedance of the endpoints closely matches the characteristic impedance of the cable.
which RPM measurement method is suitable? I have a PMDC motor which is electronically controlled for speed. And it is a closed loop system. A proximity sensor is there to measure the speed of the motor and there are 12 bolts attached to the shaft of the motor so that when it rotates the proximity sensor produces 12 pulses per revolution. I have written a code to measure the rpm in which I count the pulses in one second and thus calculating the speed. But the problem is I could get a resolution of 5 rpm only. Is there anyway to get a higher resolution like 1 rpm on this system without changing the feedback technology? <Q> At 500 rpm the shaft rotates 8.3333 times per second therefore, in 1 second you count: - <S> 12 x 8.33333 pulses = <S> 100 pulses <S> At 505 rpm the shaft rotates 8.416667 times per second therefore, in 1 second you count: - <S> 12 x 8.41667 pulses = <S> 101 pulses <S> You want greater resolution so you can add more bolts BUT <S> to get a resolution of 1 rpm you'll need 5 x 12 bolts and that sounds impractical. <S> You could do a rolling count over a 5 seconds and <S> each second throw away the oldest 1 second count and introduce the newest count <S> but you'll still have <S> a sluggish mechanism for measuring rpm - changes in speed won't be seen as dynamically as you might want. <S> You can average 12 results (one full revolution) to reduce positional errors of the bolts. <S> How fast can you clock and count? <S> Answer - you have a clock with period 256usecs - this means it toggles 3906 times in one second. <S> If you count these clock toggles for every 12 pulses on the proximity sensor (aka one revolution of the shaft), at 500 rpm you'll count for 0.12 seconds and accumulate a total of 469 clock cycles. <S> If you accumulated 468 clock cycles, this would be the equivalent of 501 rpm. <S> You, of course have the option of counting two or more revolutions to give greater resolution at higher speeds. <S> At significantly lower speeds you might want to revert to counting proximity pulses per second OR clock counts for a fractional rotation of the shaft. <A> The most accurate approach for speeds in the range you're looking at is to have each incoming pulse increment a counter and latch the value of a timer. <S> Periodically sample the counter and latched-timer values, being certain that the sampled values "go together". <S> For example, if you have hardware pulse-capture counter and pulse-capture circuitry wired to the same input, you might read the counter, then the captured timer value, and then read the counter again. <S> If the two counter-reads yield different values, repeat the process. <S> The time to retry the process is less than the minimum time between input pulses, then on the second try both timer values should match. <S> Once you have done this, then at your desired update interval, compute your speed in pulses per minute as: Speed = <S> (NewCount-EarlierCount <S> ) * TimerCountsPerMinute / <S> (NewTimer-EarlierTimer) <S> Except when NewCount equals EarlierCount, this approach will yield a value whose precision is +/- <S> one timer tick. <S> To put it another way, if the input speed is constant, and the timer is itself accurate, the correct reading will be somewhere between Speed = <S> (NewCount-EarlierCount <S> ) * TimerCountsPerMinute / <S> (NewTimer-EarlierTimer-1) and Speed = <S> (NewCount-EarlierCount <S> ) * TimerCountsPerMinute / <S> (NewTimer-EarlierTimer+1) <S> Using this approach, if you have a 1MHz timebase, provided your input pulses arrive at 10Hz or faster, you could update your display ten times per second and show a value that was precise to the accuracy of a typical crystal. <S> Depending upon what you're doing, you may want to suppress updates except when the total difference between the displayed and actual readings reaches e.g. three units on the display (so that when values are changing quickly the display numbers change quickly, but if a value is alternating between 123.4 and 123.5, the display would spend enough time showing each value that a person could see it). <A> Measure the time between pulse leading or falling edges. <S> You get a time estimate for how long it takes to go 1/12 revolution with every pulse. <A> If the minimum speed is 20 RPM <S> then you get one revolution every three seconds, and only four pulses per second. <S> You can't get a resolution (much less accuracy) of 1 RPM by simply counting pulses per second. <S> To get the resolution you want at a very low pulse frequency you are going to need to determine the period between the pulses and then calculating the RPM from that. <S> To determine the period, use the pulses to start/stop a counter. <S> The counter must be clocked fast enough that you can still get at least 500 counts when the pulses are coming at 100 Hz (500 RPM) <S> so you need the counter to run at 50kHz or more.
Alternatively you use a high frequency clock and measure the number of counts between pulses.
What can be causing output voltage to drop on LT1763 with very little load? On a breadboard, I am using an LT1763 5V regulator connected as per the "Typical Application" diagram on page one of the datasheet ( LT1763 DataSheet ). From a benchtop power supply I give 12V at the input and measure a steady 5.011V on the output. Now, if I add a 10K resistor between the output and ground (which should only draw 0.5mA), the output voltage sinks to around 4.8V. I put an ammeter on the input line and can see that the regulator is only drawing well less than 1mA. This regulator is rated to 500mA. I swapped out a 3.3V regulator and see similar behaviour (output voltage drops to well below 3V with the resistor applied). I moved around to another location on the breadboard and still the same. Checked all the capacitors on my Fluke and they are all good. Tried different input voltages from 6-15V and the behaviour is the same. There is nothing else connected to this regulator and I am completely stumped. Any ideas as to what I am missing and why the voltage could be dropping so much? <Q> It could be oscillating. <A> Maybe useful for future users, <S> your device is perhaps not stable due to the capacitors. <S> The output capacitor max ESR is 3.0 Ohm, and for the minimum ESR are also criteria for stability (see datasheet). <S> In my case the device was also not stable, when I removed the bypass capacitor the device worked properly. <S> The output capacitor I used had a very low ESR, so perhaps one capacitor with a higher ESR would work better. <A> Many regulators (linear and switching) have minimum load requirements. <S> If your load is lighter than the minimum then output voltage regulation is not guaranteed. <S> I cannot find anything in the LT1763 datasheet that specifies a minimum load, but that is not a guarantee that this isn't an issue. <S> Try putting a 10+ mA load on it and see what happens. <S> If that isn't the problem then you probably hooked it up wrong. <A> If you have a 5V fixed regulator, pin 2 (SENSE) should be tied to the output. <S> Do you have the SHUTDWN pin tied to Vin? <S> I doubt you need a min load current. <S> Do you still have the ammeter hooked up on the VIN side? <S> If so, is the input cap tied directly to the Vin pin? <S> If not then the ammeter's finite impedance is maybe messin with you and causing oscillation. <S> That 1uF input cap is an important source of charge that needs to be close to the Vin pin. <S> Take the ammeter out (flying leads, inductive). <S> Make sure all the traces (or lead lengths) are short. <S> If you still have problems, I would go back to the starting setup, which is the bench supply, no ammeter, no load.
It's difficult to ensure short connections unless a PCB is used.
Is it better to have a poor top layer copper pour or no copper at all? For a few small 2 layers boards I'm doing, I'm using the top layer for parts and signals and a ground pour on the bottom layer with no or very short traces, based on comments and answers to my previous question Since the top layer becomes too chopped-up with a lot of islands, which makes it practically useless and I'm also trying to minimize the current loop between the ICs and decoupling caps (if I leave the top layer it will connect to the caps and the ground pins separately and not in a single point), so I decided not to use a copper pour on the top layer at all for the mentioned reasons. The problem with this approach is the manufacturing side of things, if I understand correctly FR4 material could wrap if the copper on both sides of the PCB is unequal (although I don't understand why that doesn't happen with a 4 layer board typical stack-up sig-gnd-vcc-sig), so I'm back where I started I've been going back to this a lot doing a lot of research but still can't find a conclusive answer and I can't decide what to do. This is an example board, the one on the right without top copper pour. Update: based on your comments, I revised the board to avoid breaking the ground as much as possible, but still can't decide on the top layer though. <Q> In general, I would say keep the top-side pour; it certainly does no harm, and it has some secondary benefits, such as less etching required and less thermal stress on the board during reflow. <S> You do still need to pay attention to current loops and place the vias appropriately, not just scattering them about randomly. <S> Since the FT232R is the only active chip on the board, focus on its outputs. <S> There are two LEDs that are powered by V USB , and a few outputs associated with the serial port that are powered by V CC . <S> Where do the currents flow when any of these outputs change state? <S> Try to keep the paths as short and direct as possible. <S> Note in particular, the ground path for the USB connector in your non-pour example. <S> It has to go down, cross below the chip, then come up on the right before it gets to the ground pins on the top of the chip. <S> The top-side pour shortens this considerably. <S> In either case, it would help if you adjusted the vias near pin 1 of the chip so that the bottom pour is continuous there. <S> One side point about your design: Try to avoid having three etches come together at an acute angle, like you have on your Vcc trace. <S> Make that a right-angle tee connection. <A> In this case no copper seems better than a poor copper pour. <S> With I2C you're not really at high frequency but the gates might be switching in about ~350ps <S> which could still cause emf, ringing, etc. <S> As Andy Aka suggests, (and this answer is only meant as supplement to his), maintaining a better ground plane in the bottom is more important here and you're better off trying keep that from being broken. <S> Notice that TXD is causing a divide in the bottom copper and makes a "bay" and disconnect around the bottom left. <S> If you via to the gnd plane, run as short of a trace as possible. <S> If you do pour copper, make sure you remove anything that looks like a peninsula/bay, long dangling strip, etc; or place a via to the gnd at the tip and stitch them. <S> That whole L shaped copper pour around top pins of the IC looks like an antenna to me <S> (disc: I'm NOT an RF expert) and keep in mind the emf radiation is affected by the area of the rectangle that L shape copper makes. <S> At some frequencies (or harmonics) that thing might light up nicely. <S> As far as power plane decoupling properties of the copper, you'll need at least 1 sq inch of copper at less than 10 mil prepeg (gnd-vcc layer gap) to get anything going. <S> So don't worry about it here. <S> Quote <S> : They say there are two types of engineers: " <S> Those who make antennae intentionally, and those who make them unintentionally." <A> Firstly, there are at least three tracks I see that don't need to route to a different layer - it's fairly vital you minimize breakages in the bottom pour even if it means adding two inches (300 pico seconds) to a track on the top layer. <S> You develop an eye for these things: - TXD to pin1 can all be on top X1 pin1(?) to U2(?) <S> can all be on top U1 pin 16 to X1 can all be on top <S> Pins 22 and 23 needs the vias shifting so that the bottom flood connects thru - yes I know it's fiddly <S> but it needs to be done. <S> R2 has a blue track wandering off somewhere that seems superfluous. <S> DTR to pin 2 can be on top <S> OK I've said these things and one track being routed exclusively on the top may make another suggestion hard to do but you will find a better way that minimizes tracks on the bottom. <S> GET that 0V better!! <S> However, if I see a chance when the bulk of the routing is done I may make little extra compromises to the bottom layer if it can give me decent flooding with Vcc (or another ground) on the top layer. <S> I'll get my routing done then get Vcc routing done and see what I can do with a top pour (if any). <S> sig-gnd-vcc-sig is "balanced" because the sandwich is symmetrical about the centreline of the board - <S> this assumes that the amount of copper on the inner layers is about the same and that there isn't much in the way of big Cu stuff on one area of the outer layers BUT this is "old school production values" and shouldn't be a big concern. <S> Obviously gnd-sig represents a lot of Cu on one side compared to the other <S> but again it's old-school care that is superceded by better modern production standards.
Personally I don't care about a top pour and I'll tend to treat supply voltages to chips (for the analogue/digital stuff I do) as tracks on the top layer.
How exactly does switched capacitor system work, what exactly is the detail of the primitive that switches I have been seeing these switched capacitor circuits for some time now and have even seen Z-transform being used to model how these circuits behave. While I can see that there is some capacitor that switches, what exactly is the mystery behind this 3 terminal device one terminal of which comes from some sort of clock. How is this clock generated? I am wondering how do these things work from within a circuit but don't know how to get a good thorough answer. <Q> Until there was a need the circuit technology and theory wasn't developed, once circuits got smaller the need arose and bingo! <S> it appeared. <S> The relationship between resistance and capacitance in a switched cap circuit is: \$R_{equ}=\dfrac{1}{Cf_{clk}}\$ <S> If I want to emulate a \$10M\Omega\$ resistor I can do it with a \$0.5pF\$ cap and two switches running at \$200 kHz\$. <S> the switches can be a CMOS transmission gate of 1 PMOS and 1 NMOS. <S> This might take up \$0.001 mm^2\$ in a \$0.5 \mu m\$ process. <S> In comparison a \$10 M\Omega\$ diffused resistor in the same process might take \$ <S> 1.0 mm^2\$. <S> This is a factor of ~\$1000\$. <A> Picture S2 closing w/ S1 open, and then S1 closing and S2 opening. <S> The charge transfer is \$ <S> \Delta q=C_1(V_2-V_1) <S> \$ . <S> If you repeat this N times in some time, t, the amount transferred is \$ \frac{\Delta q}{\Delta t}=C_1(V_2-V_1) <S> \frac{N}{\Delta t}\$ <S> The term on the left is simple current (charge per time), and <S> \$ \frac{N}{\Delta t}\$ <S> is simply the clock frequency of the switching, \$ <S> f_{clk}\$ <S> So, rearranging a bit, we get \$ <S> \frac{(V_2 - V_1)}{i} <S> = \frac{1}{C_1 f_{clk} <S> } = <S> R\$ <S> As this is a sampling system, one must be wary of aliasing. <S> Further, clock noise can bleed through your whole board if you're not careful. <S> Switched Cap filter IC's are often designed such that the corner frequencies are much lower than the clock freq, so you can filter out the clock with a simple RC filter. <A> If you have a black box load across a voltage source and you looked at the average current into that black-box, you would not be able to say whether the black-box contained a resistor or a switched capacitor to ground. <S> It's all based on R = <S> V/I and Q=CV. <S> I = <S> dQ/dt and dQ = <S> CdV <S> /dt etc... <S> The switching frequency of the capacitor has to be beyond the highest frequency that your voltage source can produce <S> i.e. it has to obey the nyquist criterion <S> but if you are dealing with audio (for instance) <S> this is not hard to implement. <S> I remember MF10 ICs coming out and today (like @rawbrawb says) the capcitors are inside the chip and things are easier. <S> I mentioned nyquist <S> and you mentioned Z-transforms <S> - you have to treat this type of filter with some care - you are now sampling the input at a clock rate and this requires some analysis in the Z-plane but mainly, chips like MF10s and their successors make it easy for you to design pretty good high order filters.
Switched cap circuits are typically used in chip design because it's far far easier to get small, high value caps that match each other than it is to get resistors that meet all those same criteria.
why is wall voltage measuring 175V? I was trying to use a DM-4100A multimeter to verify a power supply, and I'm not sure I'm using the multimeter correctly. The multimeter is >10 years old too, so maybe it is not working correctly. When I set the meter to measure AC voltage, with a 500V or 200V max, it reports 170-175V. I was expected more around 120V (I am in the USA). Is 170V an expected voltage, or would that suggest I'm doing it wrong? UPDATE: It sounds like it may be reporting peak voltage instead of RMS. The multimeter does not seem to have an RMS setting. Can I just take the voltage and divide by 1.414 to get the RMS voltage? I want to do this for the purposes of verifying whether power adapter is still producing the correct voltage. <Q> At 120 \$V_{rms}\$ your peak voltage should be \$\sqrt{2}*120=169.7\$ -> ~\$170\$ <S> so you must have a peak hold function on that DMM. <S> It's either that or all the appliance you have plugged into that circuit are exploding around you ... <S> becasue 175 <S> \$V_{rms}\$ represents a 2X factor in power, most appliances would have problems with that. <S> update: after posting the manual, it's apparent that this DMM does not have a \$V_{peak}\$ ability. <S> The natural conclusion is that the DMM is not functioning properly. <A> 170V would be approximately the peak voltage reading of a 120V (rms) AC source. <S> If you multiply the rms voltage of 120v by 1.414 you will get 170v. <S> Does your meter suggest that it is measuring Peak voltage? <S> Does it have another setting which measures RMS voltage? <A> The manual you linked to, on page 3 says "Average responding, calibrated in RMS of sine wave", so it should not display the peak value of the AC voltage. <S> I would not trust it, or "adjust the reading to RMS" by dividing by 1.4. <S> I suggest you get another meter, as this one appears to be broken in some way. <A> UPDATE: <S> It sounds like it may be reporting peak voltage instead of RMS. <S> Can I just take the voltage and divide by 1.414 to get the RMS voltage? <S> I want to do this for the purposes of verifying whether power adapter is still producing the correct voltage. <S> If this is indeed correct, then YES. <S> $$V_{rms} = <S> \frac{V_{peak}}{\sqrt{2} \approx 1.414}$$
The multimeter does not seem to have an RMS setting.
What is the minimum temperature for FR-4 PCBs? My company is working on developing a product that will go into commercial freezers, so my boss asked me to provide operating temperature specifications for the product. I can find "operating range" temperatures listed for everything but the PCB itself, which is just plain old FR-4. Wikipedia helpfully lists "Temperature Index" (whatever that means) as 140 C, but there are no indications of a minimum temperature. I'm not really worried, as I'm sure that the other components on the board will be the limiting factors, but for the sake of completeness, I would like to have it listed. Does anyone known the minimum operating temperature of FR-4? (And what would the failure mode be?) <Q> FR4 PCB is glass-reinforced epoxy laminate. <S> Several research studies have been published of the effect of low temperatures on such material. <S> A specific quote from the paper " Dynamic failure behavior of glass/epoxy composites under low temperature using Charpy impact test method " ( <S> Shokrieh et al <S> ): <S> it is found that failure mechanism changes from matrix cracking at room temperature to delamination and fiber breakage at low temperatures. <S> This study applied a temperature of -30 o C, not low enough for spontaneous crystalline brittleness. <S> Another study, " The Influence of High and Low Temperatures on the impact properties of glass-epoxy composites " (Putic et al ) takes the temperature down to -50 o C, and finds the appearance of brittle cracks in the material at such temperatures. <S> These are two key assumptions regarding the device touched upon in the question: <S> The freezer temperature will not reach as low as those used in these studies There is limited risk of vibration or impact upon the actual circuit board, hence brittle cracks are unlikely but not ruled out If either of these assumptions is invalid, the material in question needs to be reconsidered. <S> There do exist special-purpose industrial ceramics / alumina PCB substrates designed specifically for extremely low temperatures, typically used for device deployment in space or in cryogenic equipment. <S> Those materials might be more suitable in this case. <S> The point to note in such environments is the possible fracture of packages, casings and solder junctions for the electronic components on the board, not just the PCB itself. <S> A commonly recommended procedure for deploying circuit boards in extreme temperature conditions, is to bring the device to the desired temperature in slow stages , thus avoiding any rapid shrinkage or thermal shock to board or parts. <A> FR-4 easily survives cryogenic temperatures. <S> It has been used in various hobbyist satellites, tested in liquid nitrogen and my place of employment uses some FR-4 adapter pcb's in a cryogenic vacuum chamber. <S> Due to difference in temperature coefficients we use copper laminate pcb's for temperatures under 40* Kelvin. <A> When it comes to PCB laminates, there is 'FR-4' <S> and there is 'FR-4' and other types. <S> I am not repeating myself: <S> all that FR-4 really means is it meets a flame retardant standard (usually 94V0). <S> There are a number of laminate manufacturers out there, such as Isola who make a wide range of laminates each with different properties for different markets. <S> Hitachi Chemicals also make a wide variety of base laminates. <S> Although the answer above is excellent, sometimes the best people to ask are the laminate manufacturers. <S> As you appear to be in a bit of a niche area, I think the laminate manufacturers may be best placed to help you from this point.
If FR-4 successfully functions at -60*C and -90*C, then it should survive the freezer.
Providing DC power with failover DIY for IP camera I'm building a simple battery backup box for a 5V IP camera. I've got a few options for battery, sealed lead battery or a mix of portable LIPO style "USB" power bricks. I've seen boards built for security systems that supply power to the system via 110 to 12V DC while keeping a sealed lead battery charged then without interrupting power switch over to the battery when the power goes out. These boards are $70-$100. The USB battery pack bricks are nice because they regulate down to 5V built in. The one I'm testing now has a 19V power supply for charging and so far it will charge the battery while the camera pulls power from the USB connection. My concern in this configuration is that The battery will be in a constant state of use and charge while the camera pulls power. I'm guessing the impact of constant use and charge will shorten battery life versus keeping the battery charged without use. So my goal is to find a way to connect two 5V sources, one is the factory 5V camera adapter, the other being the battery source and have it switch to the battery source when the DC adapter looses power without interrupting power to the camera. The battery has a built in charge regulator so while the camera runs off of the 5V from the DC adapter the battery will stay charged. <Q> SparkFun has a LiPo <S> Charger/Booster that works online. <A> The application described is almost ideally suited to the use of a simultaneous charging and power sourcing IC. <S> Texas Instruments <S> BQ24030 .. <S> 35 series Charge and System Power-Path Management ICs . <S> This part can autonomously select between AC adapter and USB sources, as well as supplement the AC or USB input current with battery power as required. <S> From the datasheet: On Semiconductor CAT6500 Autonomous Power Selector Switch Input voltages up to 18 Volts, 3 Ampere current rating, autonomous switching, but no facility to use battery power to supplement any current shortfall from the two sources. <S> Several other manufacturers offer similar power source selection devices, with various additional features. <S> It would be worthwhile to examine and distill the design requirements to greater detail, then narrow down to a specific part that would best fit such requirements. <A> The battery will be in a constant state of use and charge while the camera pulls power. <S> I think this is un-true. <S> The battery will largely see a "float" voltage, and act as an impedance reducer for the source power seen by the load. <S> Even LiPo batteries, notoriously finicky and unwilling to "trickle" charge, can work fine in a "float" situation where the floating voltage is lower than the top charge voltage. <S> I'd expect the proper float voltage to vary by specific cell, but be in the 3.9-4.05V range. <S> If you want ready-made products, the SeeedStudio LiPo Rider Pro might be something to look at.
As long as the battery management system ("charge/load controller") knows to do the right thing with the float voltage, you'll do fine.
What's an easy way to supply power to a breadboard without using batteries? There are a number of kits available (for example sparkfun's Breadboard Power Supply USB - 5V/3.3V and Breadboard Power Supply 5V/3.3V or Adafruit's Adjustable breadboard power supply kit - v1.0 ) but these all come as kits. What is a common and easy of-the-shelf way for a beginner to supply DC power to a breadboard without using batteries? <Q> I have found these breadboard power supplies ( $2.12 or so on ebay.com , shipped) very useful for the purpose described: Jumper-selected 3.3 and 5 Volt simultaneous outputs from wall-wart, USB or 9 Volt battery. <S> They have a convenient 2.1 mm barrel jack port on board, besides a power button and an indicator LED. <S> You can choose to have 3.3 Volts on one of the power rail rows of the breadboard, and 5 Volts on the other, something I find especially useful. <S> As a fellow breadboard user, you might also find two of my answers to other questions on this site, of interest: <S> On " Good Quality Breadboards " On " “Starter Kit for electronics” - <S> What to buy? " <A> Many are odd voltages or unregulated (the voltage changes with load) although many are quite usefully designed. <S> Alternatively, old PC power supplies - Dangerous prototypes do an ATX breakout board, either use one of those or read about how it works & use the information to power your circuit. <S> PC PSU's typically have 12v, 5v, <S> 3v3 available which gives you everything you should need to get started. <S> Just beware that many require a small load (resistor/light bulb) to work properly (the ATX breakout adds this if required). <A> Really any basic power supply would do. <S> For example, I use this: simulate this circuit – Schematic created using CircuitLab Transformer, rectifier, large capacitor and a variable voltage regulator. <S> You can also split R1 in two (5K and 500R) for extra fine tuning. <S> Gauge the potmeter so you can see the output voltage without measuring. <A> I asked some colleagues too and got a couple of interesting answers. <S> Cut a USB power cable and solder on wires that can connect onto header pins in the breadboard. <S> (Not off-the-shelf, but doesn't sound tricky either.) <S> I have several .Net <S> Gadgeteer kits so this one's easy for me. <S> Take the Gadgeteer power module (for example this one from GHI ) <S> Run the Gadgeteer cable from it, but instead of hooking it up with the Gadgeteer mainboard, as one usually would, run it instead to a Gadgeteer extender (like this one) onto which header pins have been soldered. <S> (N.B. One manufacturer makes the extender board with the header pins already on, but I cannot find them at present.) <S> The schematic of the power board should say which pins are 5v, 3.3v, and ground, or you can use a multimeter. <S> Of course this is of little use unless (like us) you have lots of Gadgeteer kit around the office!
Use a Gadgeteer power module. Wall wart power supples - cheap, plentiful, just be careful of their output voltage.
Can I achieve a one shot button without a 555? I have a complex circuit, but my problem only relates to one small part. I have a relay, which is energised by pulling the low side low using an NPN. I would like a pushbutton to operate the transistor (and therefore the relay) for a time (500ms ish) then deactivate it and wait for the next push (ignoring the button if held). I understand how I can achieve this using timers (or a MCU), but I was hoping there might be a more simple and compact solution... The image shows a simplified schematic of the starting point... <Q> If your question is simply can you do it without a 555 or a MCU, absolutely! <S> Alternatively, you could do it with discrete transistors, but that would almost invariably take more parts then a 555, and probably take more board area. <S> No matter what you do, you're not going to get that <S> much in terms of size-reduction over a 555. <S> The whole point of an IC is to reduce the parts count. <S> Really, the best you could hope for in terms of board/part complexity reduction is a fancier timer IC. <S> The LTC6993 TimerBlox: <S> Monostable Pulse Generator is a pretty cool part, and it only requires 2 external components. <S> Note: in this situation, it's being used as a missing pulse detector. <S> That is why the input is labeled "modulated carrier". <A> Here is a circuit that will come close to what you want that uses discrete components. <S> This circuit will have the relay coil in place of the 120 ohm resistor. <S> Remember to add a diode in reverse bias across your relay coil to protect the transistor from over voltage spikes when the transistor goes off. <S> There are a few things about this that you should be aware of. <S> The relay drive will persist as long as the the switch is until the 100uF capacitor no longer supplies current to the NPN base. <S> This behavior will make the relay turn off even if the switch is held closed for a long time. <S> If the switch is held shorter than the capacitor charging time then the relay will shut off when the switch is released. <A> In the end I decided to use a small MCU as it was worthwhile overall, as it gives me capabilities I can use elsewhere to replace other bits of circuit (not shown). <A> How about a discrete monoflop like this: simulate this circuit – Schematic created using CircuitLab <S> Not entirely sure about the sizing of the components (especially R4 and C1) as these are very dependent on the power supply voltage. <S> C2 ensures that pressing the button too long does eventually release the load; Either R3 or R1 can be replaced with an relay (in parallel with a flyback diode, cathode at Vcc); R4×C1 defines the delay time; <S> Either transtor Q1 conducts or Q2; Q1 is conducting while in rest.
It appears there is no simple ciruit to do this, it requires a timer or a complex(ish) circuit that's larger than a timer chip. You could use a 74HC123 retriggerable monostable multivibrator, or any of a dozen similar .
Synchronizing SPI ports for higher data rate I am designing a new board which uses the NXP LPC4330 (Cortex M4 microcontroller) with a XESS Xula2 FPGA development board. In this design, the Xula 2 has limited I/O pins since it is designed to fit into a DIP-40 form factor. The primary form of communication between the micro and the FPGA is through SPI. I would like the bus to be fairly high speed, on the order of 80 to 100 Mbps. It might be enough to run a single SPI port at 80 MHz, but since the main clock on the FPGA is only running at 120 MHz (and it drives the SPI interface), I'm not sure that the SPI would work at such a high data rate. The LPC4330 has multiple SPI ports, and one idea I have is to use 2 SPI ports so that each can run at a slower bit rate. There is plenty of room on the Spartan 6 FPGA, but I do not have the I/O pins on the development board to have 2 sets of all 3 of MOSI/MISO/SCK (plus a single CS). Therefore, I am wondering if it is possible to synchronize the ports on the LPC such that they share a SPI clock. The fast communication only has to happen in a single direction, so I would only need to double up the MISO pin (the micro needs to read quickly from the FPGA, not vice versa). There doesn't appear to be a special mode to synchronize the SPI ports, but I assume that they would be on the same clock domain due to the clocking architecture of the micro. I realize there is also a multi-port SPIFI (spi-flash memory interface) on the NXP. Has anyone had an experience creating a block on the FPGA which basically emulates a SPI flash? So my questions are a) do you think this will work? and b) is there a better way to do this? <Q> Use SGPIO. <S> It contains 16 shift registers with 32 bits each and is very flexible in what it can do. <S> You can chain up to 8 registers or run up to 8 inputs or outputs in parallel. <A> This would likely require physical wires interconnecting the clock pins for the SPI ports. <S> SPI slave implementations sometimes have quirky timing restrictions and behaviors, but it should probably be possible for an SPI slave to handle any speed the SPI master could produce if both devices are running from the same source clock. <S> If you use DMA, be certain that the SPI slave has higher priority than the SPI master. <S> Otherwise if there's enough bus contention to delay a slave write but <S> not a master write, the master could try to clock out data before the slave is ready with it. <A> I just read the specifications on the LPC4330 and it appears to support quad-SPI. <S> This is a variant of SPI which uses clock, select and 4 bi-directional data lines to transfer 4 bytes per cycle. <S> This may be what you need.
It may be possible to program one of your microcontroller's SPI ports as a master and one or more other ports as slaves.
Slowly turn a planisphere at the sidereal rate My problem is to rotate a planisphere (a star chart) at the sidereal rate. I will set the planisphere to its initial position manually, then turn on some device which rotates the planisphere on its central axis, to keep it in sync with the current sky at my location. That is, the problem is to rotate a circular, laminated bristol-board (heavy paper) disc once every 23 hours, 56 minutes. The laminated disc may be from 10 cm across to 60cm across, and is fairly lightweight. The disc may be horizontal, or vertical (hung on a wall). Constraints: A small, lightweight mechanism is preferred. Battery power is preferred. High accuracy isn't needed. The disc would be rotated\updated once every 10 minutes or so. I'm thinking that the mechanism would likely be placed at the edge of the disc, not the centre, and a little wheel would be firmly pressed against one face of the disc. When the little wheel spins a full rotation, it turns the disc by perhaps a few degrees. I prefer simpler mechanisms over complex ones. Can you provide suggestions for implementing this? Here is a photo: <Q> At the risk of oversimplifying the problem, here is a suggested sequence of steps that may serve the purpose, perhaps with some empirically determined tweaks: <S> Buy an inexpensive electronic wall clock movement, such as those sold for DIY clocks - look for one using older technology, i.e. discrete crystal and possibly (though unlikely) through-hole parts, plus an electromagnetically driven rotation actuator. <S> By replacing the crystal on the board with ones of higher and lower frequency, determine what range of possible tick rates the clock movement can work with. <S> Calculate convenient gear reduction ratios for a tick rate within this range, as required for a gear or pair of gears to reduce the hours (or minutes) actual rotation rate to the desired one At the simplest, a 1 minute tick rate (no crystal changes) and a 1:10 gear reduction should provide the required rotation. <S> Get your friendly neighborhood laser cutting shop to cut you the required gears, in a fairly large size (since precision is not essential, and bigger gear teeth can tolerate laser cutting imprecision better). <S> Attach these gears to (a) <S> the hours or minutes shaft, and (b) a shaft on the planisphere disc, to mesh without too much strain. <S> While this isn't actually an electronic design solution, hence perhaps not ideal for this site, it addresses the problem through minimal engineering and readily accessible tools. <A> For example, to drive a 60-cm planisphere, you would need a drive disk of 60 cm / 23.93447 <S> = 2.5068 cm <S> Since the basic accuracy of the clock mechanism is very good, the overall accuracy would depend on how accurately the diameter of the driving disk can be controlled (relative to that of the driven disk). <A> In order to bring this into the realm of electronics, I offer a solution involving a microprocessor: <S> First, I like the idea of using an existing clock as the timebase. <S> The hour hand on a standard clock makes 1 rotation every 12 hours, or every 720 minutes. <S> You want your planisphere to make 1 rotation every 1436 minutes. <S> That works out to 50.139% as fast as the regular clock. <S> Here's where the microprocessor comes in. <S> Wire up an output of the processor to switch power to the clock, probably using a transistor or FET. <S> Now program the processor to switch on for 300.834 seconds out of every 600 seconds (10 minutes). <S> Attach your planisphere to the hour hand shaft of the clock, and Bob's Your Uncle. <A> For what it's worth, I sell ready-to-use 24 hour sidereal clock movements on Tindie . <S> I take ordinary movements and replace the controller board with one of my own design that includes a microcontroller so that I can make the clock tick however I want. <S> One of the firmware options is for sidereal time.
My first thought would be to take a battery-operated clock mechanism (available from many suppliers for a few dollars) and replace the minute hand with a disk that drives the edge of your planisphere disk.
How to read RPM from 3-wire fan - PIC18F4550 I am working a PIC µC project. I am using 12VDC PC fan (Coolermaster) for my application. A part of the project is to return the RPM from the third wire of the fan to an LCD. First of all, How can I read the signal? Is it a sort of pulses every rotation?Also, Do I need to use an ADC pin or just a Digital one would suffice?I found lots of diagrams telling to connect a pull up resistor to +5V. Why? A sample code of how this works will be helpful. Thanks. <Q> Here's a specification for 4-wire (PWM controlled) fans from formfactors.org "brought to you by Intel": http://www.formfactors.org/developer%5Cspecs%5C4_Wire_PWM_Spec.pdf <S> Tachometer <S> Output Signal Fan shall provide tachometer output signal with the following characteristics: <S> Two pulses per revolution Open-collector or open-drain type output <S> Motherboard will have a pull up to 12V <S> , maximum 12.6V Note that the pull up is supposed to be on the motherboard, i.e. not on the fan. <A> Reading the signal The main point to notice is that the tach output from the 3 wire fan switches from 0 to 12V. <S> If connected directly to the input of the PIC it would exceed the voltage rating of the device. <S> Connecting the tach output to a 5V supply through a resistor would not prevent it from exceeding 5V as that resistor would simply form a potential divider with R1 and leave the tach output sitting at a voltage between 12 and 5 volts. <S> A quick check with an oscilloscope or voltmeter would verify this voltage. <S> To reduce the output to a 0 - 5V pulse suitable for the PIC input you could: <S> (i) <S> Use a resistor (R2) across the output (a slightly smaller value than R1) to give a maximum 5V at the output (quick and dirty solution) ( R2 should be about 0.7 R1 to give a 5V output) <S> (ii) Connect a small signal npn transistor - base to the tach output. <S> Connect a pull up resistor from its collector to 5V. Emitter to ground. <S> Take the new tach (inverted) output from the collector to the PIC input line. <S> (iii) Connect an opto isolator with a pull up resistor to the 5V line(pin 2, 4 to ground (0V) , pull up resistor from 5V to pin 5. <S> Take output from pin 5. <S> Pin 6 is left unconnected) <S> This circuit will invert the pulse signal but as you are counting pulses it does not matter. <S> It also protects the PIC input from exceeding 5V. <A> Typically, the third (tach) wire is grounded "n" times per revolution, where "n" varies between fan models, but typically 2 or 4 times per revolution. <S> (The data sheet fro the fan should specify this.) <S> You will need to add a pull-up resistor to give you a square wave signal which you can feed into a digital input. <S> You will need to measure the period of the square wave or count transitions per second to compute the RPM. <S> For example, assume 6000RPM and 4 pulses per revolution, you will see 400 pulses per second and the average period of a pulse (leading-edge to leading-edge) would be 2.5ms (1/400). <S> Alternatively, you can loop pooling the pin looking for changes and record the timer values. <S> Edit: Jim Deardan correctly notes that on most fans, the tach wire is already pulled up to +12V and the voltage needs to be reduced before connecting to an input on the PIC. <S> Please read his comment. <A> The safest way is to force the fan tacho output to behave only as open-collector by adding a diode and then using your own pullup: simulate this circuit – <S> Schematic created using CircuitLab <S> That way it doesn't matter if the fan has a pullup resistor or what its supply voltage is, <S> it cannot pull your MCU pin too high. <S> You can use the "weak pullup" functionality on your MCU pins if it supports them, or add an external resistor as pictured. <S> Even a fairly fast fan (6000RPM) is only 100Hz, which means pulses at 200Hz. <S> The usual way to measure speed is to use an "input capture" feature on a timer, i.e. leave a free-running timer going fairly fast (tens of kHz) <S> configured to capture the timer value on the falling edge of the input, then subtract consecutive captured values in order to measure the time between pulses. <S> Don't forget you also need to catch the timer-overflow interrupt and figure that into your period calculations. <A> Elaborating on DoxyLover's answer. <S> You can use the Capture/Compare/PWM (CCP) module for this. <S> Basically the capture mode does exactly what DoxyLover described, it records the value of a timer based on a programmable event on a pin (in this case, you probably want it to record the falling edge). <S> So you can have the associated timer run, have the module record the timer value on the falling edge, and then read the value of that capture register at your leisure. <S> This way you don't have to have an interrupt for every time the fan contact is pulsed, and also the result is not dependent on things such as interrupt latency.
As for actually reading the pin, the easiest way would be to set up an interrupt on a transition (either up or down) and record the value of a high resolution timer in a buffer, which you can read in your main line to compute average period over several cycles. Computer fans usually produce 2 pulses per revolution but there are variations.
On multi master i2c bus how to determine which device is the master of the bus? On a multimaster i2c bus, how to determine which device started the transfer? update (from comments made below by the O.P.) : I am trying to make sense of http://www.i2c-bus.org/serial-resistances-and-debugging/ where it says: it is possible to recognize which I2C device is currently active by analyzing the low level on the I2C lines What does that mean? <Q> I 2 C spec itself doesn't have provisions for "from" address, AFAIK. <S> You would have program the masters to transmit their IDs in the payload part of the I 2 C packet. <A> In some cases, one may be able to infer which device started a transfer based upon the relative voltages at the ends of the connection, or if different devices will send different sorts of data. <S> Otherwise, the only thing any device knows who's the master of the bus at any given time is "maybe me" or "not me". <S> Note that if two devices both try to perform the same transaction roughly simultaneously, it's possible for both devices to regard themselves as having been masters of the bus. <S> This could in some cases cause problems. <S> For example, if an I2C slave device has a counter which increments every time it's read, and if masters try to assign themselves addresses by reading that counter, it would be possible for two masters to issue simultaneous requests to read the counter, and for each to read the response and think that it's the only thing in the universe that read that value. <S> If nothing on the bus knows who the bus master is at any given moment, there's not apt to be a 100% reliably way for an outside observer to figure it out. <A> Different devices will have different output stages and so will drive the bus slightly differently. <S> Since I2C is an open drain bus, the only thing that you can look at is the low level as the high level is determined by the pull-up resistors. <S> If you can identify what specific voltage each master drives as a low level on the bus, then you can figure out which master is controlling the bus. <S> You will need an oscilloscope to measure this and observe the bus traffic; a logic analyzer or protocol analyzer that only records the level as high or low is not sufficient. <S> These resistors will form a voltage divider with the bus pull-up resistors and will change the low voltage as asserted by the devices. <S> Putting different resistor values on different devices will make them easier to identify. <S> Note that the resistors have to be as small as possible so as to not slow the bus down too much or shift the low level too much. <S> Another thing to look at is the precise period of the clock. <S> Different masters will have different clock sources and baud rate generators and may produce slightly (or significantly) different baud rates. <A> What the linked article is trying to say is that not every I2C device will "pull" the bus down the same as others, and goes on to exaggerate this by intentionally weakening one of the devices with a series resistor. <S> Trace resistance and drive strength will determine just how low a logic low really is, as you can see from the picture on that page: <S> The author of the page has placed a 200 ohm resistor in series with the SDA line and is measuring the voltage at the slave. <S> Since the master has been made weaker, it won't pull to ground but rather to a small positive voltage (which is still low enough to be seen as a logic 0 by the slave). <S> Thus with a scope you can see that the device that is driving all the way down to zero is the slave (since it does not have an additional 200 ohms of resistance between its driver and ground), and the device that is pulling almost to ground is the master. <S> I used a similar technique when I was debugging the Nintendo 64 controller protocol. <S> It's a one-wire bidirectional protocol and I wanted to know what each side was transmitting. <S> I placed a 330 ohm resistor in the data line and measured across the resistor. <S> Positive pulses were the master talking to the slave, and negative pulses were the slave talking to the master. <S> You could do the same here, as long as your oscilloscope's ground lead was not tied back to earth ground (or if you used a differential probe).
It may be possible to track which master is controlling the bus looking at the clock period with a fast oscilloscope or logic analyzer. You might be able to put some low value resistors in series with the I2C pins on one or more of the masters.
Why are high end audio connections gold? Silver has a lower resistivity than gold and is cheaper, so why are high end audio components gold plated? <Q> It is also fairly soft, so the mating surfaces deform slightly, increasing contact area to reduce resistance. <S> The gold plating is very thin, so the added resistance from the gold is easily overcome by its other properties. <S> Note that gold is only needed on the actual contact areas - gold plating (or colour) on the body of the connector is only there to attract the gullible. <S> Many commercial (not audiophile) connectors have selective gold plating on the contacts - the gold is only placed where it really matters. <A> Mainly for marketing purposes: Gold is always better than silver, right? <S> But also, silver oxidizes (tarnishes) <S> readily while gold does not. <A> Tarnished contacts cause distortion. <S> You can really hear the audio quality degradation; it is not some audio-fool nonsense, like directional speaker cables or two hundred dollar amplifier power cords. <S> Even a dyed-in-the-wool objective measurement man like like <S> Doug Self acknowledges this problem, in no uncertain terms, right in the middle of his treatise on "Subjectivism": Corrosion is often blamed for subtle signal degradation at switch and connector contacts. <S> By far the most common form of contact degradation is the formation of an insulating sulphide layer on silver contacts, derived from hydrogen sulphide air pollution; the problem seems to have become worse in recent years. <S> This typically cuts the signal altogether, except when signal peaks temporarily punch through the sulphide layer. <S> The effect is gross and completely inapplicable to theories of subtle degradation. <S> Gold-plating is the only certain cure. <S> It costs money. <S> A switch with gold-flashed contacts can cost five times as much as the silver version. <S> [Source] [Bold emphasis mine]. <S> Other metals like silver will do, but the contacts will require regular polishing to perform their best. <S> Gold is more maintenance-free. <S> I own a bunch of old audio and guitar gear, and I can tell you that if you put a little bit of toothpaste on a cotton swab and vigorously polish the inside of a 1/4" phone jack on some old amplifier or signal processor, it comes out black. <S> The sound quality improves drastically. <A> An important thing to remember is that when dissimilar metals are joined, and there is a thermal flux, a voltage is generated due to the thermoelectric effect . <S> This voltage is called a thermal EMF. <S> A good discussion of this effect can be found in the classic Linear Technology application note AN-86 by the late Jim Williams. <S> See in particular page 48 for a table of thermoelectric EMFs. <S> From that table, note that copper-copper junctions have the lowest thermal EMF of less than 0.2 uV/ <S> °C BUT notice that copper-copper oxide junctions have the highest thermal EMF of over 1000 uV/°C. <S> Copper-gold junctions have a reasonable thermal EMF of 0.3uV/°C. <S> So, in precision voltage / current / resistance measurements we often use cleaned copper-copper junctions or copper-gold junctions to minimize thermal EMFs. <S> That said, in audio applications, if the contributed thermal EMF was 100uV, if the full scale signal is 15 volts, that's only 6.6ppm (parts per million). <S> That's nearly -120dB. <S> It's pretty hard to make the case that a human can hear 6ppm / -120dB. <A> Some professional audio gear does use silver or silver alloy contacts (or did : <S> the items I am thinking about are well and truly obsolete!) <S> - such equipment served the broadcast audio for decades - BUT it was regularly and thoroughly maintained, with metal polish being an essential item of the toolkit. <S> The rotary "stud faders" in BBC mixer desks up until the 1970s were of this type : <S> not variable resistors but switched attenuators with something like 1dB steps, a huge array of precision resistors, and solid silver contacts. <S> These lasted until the stereo era. <S> Prototype stereo "stud faders" were tried - but however accurately they were made, the two channels switched gain at slightly different times, and the "blurring" in the stereo image during fades was judged to be quite unpleasant. <S> Here is a description of a mono one - as you can see, rapid maintenance was an important design consideration. <S> (I cannot embed the picture, it appears to be protected) <S> The contacts look pinkish; they need cleaning to show their true colour. <S> So silver has a long history in audio, and not all of it can be dismissed as woolly headed nonsense (though there is plenty of that too!). <S> But gold is easier to deal with and, while lower conductivity, quite good enough for most purposes and overall better for domestic equipment. <S> Unless you are so dedicated to perfect sound that you are willing to overhaul every connector and switch contact on something like a regular six-monthly schedule.
Gold is highly resistant to corrosion or oxidation, so prevents poor connections from those sources.
Arduino and FTDI Communications Short Version Can I make a serial connection from an Arduino to a device with an FTDI connector? Long Version I have a wifi shield for an Arduino that is misbehaving. I know their is an FTDI connector on the shield that you can use to do diagnostics on the chip but I do not have an FTDI cable at the moment. Is the FTDI connector just a serial interface or is it something different? If it is serial would it not be possible for me to actually write an application for the Arduino that would issue commands over the FTDI connector for diagnostics purpose? <Q> As you can see on the far right, the FTDI connector has 6 signals, two of which are RX and TX. <S> Those are the ones you would want to hook your Arduino's UART pins to. <S> However, depending on the complexity of the diagnostics program (the computer program you are supposed to use to issue the commands and parse the responses), it might be simpler to just pony up and buy something like the product I linked to. <A> "If it is serial would it not be possible for me to actually write an application for the Arduino that would issue commands over the FTDI connector for diagnostics purpose?" <S> Yes. <S> You would need to implement a second UART or Serial port, as the hardware serial port on the Arduino is tied to the serial/usb connection. <S> The original serial port talks to your computer, and the second talks to whatever serial device you would like, in this case, the wifi shield. <S> See http://www.arduino.cc/en/Reference/SoftwareSerial for a software uart. <A> Is the FTDI connector just a serial interface or is it something different? <S> The documentation for your WiFi shield (daughterboard) will answer this. <S> FTDI is Future Technology Devices International - a company that makes integrated circuits commonly used to bidirectionally translate between low-voltage serial communications and USB "virtual serial port" communications. <S> I say "low-voltage serial" because historically, serial mostly meant asynchronouse serial, usually RS232, which specifies higher voltages than are typically availble in modern 5V or 3.3V microprocessors. <S> If the pins are labelled "TX", "RX" etc - it's probably low-voltage serial. <S> In the above board the 6-pin serial connector is labelled "FTDI cable" because it's pinout matches the popular "FTDI cable" product sold by Sparkfun and others. <S> So <S> yes, If you have a computer or microcontroller device that has a low-voltage async serial interface, you can use it to debug your Wifi Shield.
As far as I know, there isn't really any such thing as an "FTDI connector" but it is possible that phrase is being used for a connector for low-voltage serial data lines that can be hooked up to an adapter that uses an IC from FTDI (or equivalent IC from competitors). Yes, see here for the schematic of the sparkfun FTDI breakout.
What is the purpose of capacitors and resistors in this USB bus? Trying to understand the purpose of the capacitors and resistors in this bus powered configuration for the FTDI chip, I think the capacitors are for filtering high frequency noise, not sure what the resistors for though, maybe line termination ? <Q> The series resistors are for line termination. <S> From http://www.semtech.com/images/datasheet/usb%20line%20termination%20_ag.pdf <S> The Universal Serial Bus (USB) line termintation is specified in the USB 1.1 specification to insure proper terminations so that signal integrity is maintained. <S> The termination requirement varies depending on what driver chipset is used, whether the port is upstream or downstream, and if the transceiver operates in full or low speed. <S> When the USB 1.1 specification was written, a series resistor between the range of 28Ω to 44Ω was required. <S> Most USB drivers will require a termination resistor of 16 - 33Ω. <S> This is in addition to the pullup/pulldowns used for identification. <S> The caps are used to ensure the line meets the required rise/fall times as well. <A> The inclusion of the two capacitors to ground before the termination resistors is a bit unusual. <S> According to FTDI app note AN232B-06 (found here http://www.ftdichip.com/Support/Documents/AppNotes/AN232B-06_11.pdf ) page 10: <S> Some USB 2.0 hubs appear to be extremely sensitive to noise. <S> A glitch on the USB lines can in some cases cause a device to hang. <S> This problem can be fixed by adding two 47pF capacitors to ground on the USB DP and USB DM lines. <S> These should be located between the 27[Ω] series resistors and the hub <A> The resistors end up both helping prevent ringing (by making up a RC filter) and electrically protect the input, as well as impedance match the end of the long wire. <S> They may also help guard against load dump when the connection is hot disconnected. <S> The smallest cap across vcc/gnd seems useless given that there are already a ceramic and an electrolytic there. <S> Those are there to manage load dump during hot disconnect as well.
Typically the goal is to minimize stray capacitance to ground before the termination resistors to minimize the impact on signal integrity.
PWM Control with MOSFET switch I plan on using a 555 timer for a PWM signal (variable with a potentiometer) and a gate driver to use a MOSFET as a switch. Essentially, I am trying to take a +300V rail and "step" it down using the PWM. The total current through the MOSFET wouldn't likely be more than 25mA, and would be more likely under 10mA. Mostly, what I am wondering is if it is safe to leave the MOSFET on for an extended period of time- at most, a few hours. I see no problem, but I haven't exactly tried it either. I also understand that the greatest losses are switching losses, so I'll try to minimize the switching frequency while still providing a, relatively, clean output that capacitors can filter. The alternative to using such a PWM scheme is to simply put the potentiometer on the voltage rail and generate a drop across that, but that would likely load the circuit more than the MOSFET would, which is why I prefer the MOSFET. <Q> If I'm reading this correctly you are using the MOSFET (switch) to charge a capacitor to a certain voltage. <S> The voltage across the capacitor is being drained by the (fixed) load connected across it. <S> The turn ON/OFF times are to be controlled by a 555 used as a PWM. <S> Something like this: Essentially it is an open loop system. <S> The ripple voltage across the capacitor will be a function of the chop rate and the M/S ratio of the PWM.My first reaction would be to make it a closed loop system by monitoring and comparing the voltage across the capacitor (too high/too low) and using this information to control the PWM. <S> Instead of altering the PWM 'manually' you would simply change the reference voltage (variable resistor) and the circuit would self adjust. <S> I would also think an inductor between the storage capacitor (C) and load (and possibly a second capacitor across the load - pi filter) would be helpful to smooth the ripples. <A> I may have happened on a better circuit that performs the same function. <S> In fact, it is actually very similar to a normal MOSFET/load switch. <S> The load has a capacitor around it to smooth ripples. <S> Also, the gate takes an inverted output from the 555 (will be done with an inverting gate driver), since the 555 can never have a shorter mark time than space time. <S> While I think I figured it out, I am still very open to other answers. <A> What are you trying to accomplish with PWM? <S> Do you want to convert the voltage efficiently? <S> You can't do that without an inductor: <S> Can a charge-pump be 100% efficient, given ideal components? <S> If you do add an inductor, then you have a buck converter . <S> You can roll your own, or buy them as complete modules. <S> Or is efficiency not as much of a concern as simplicity? <S> If your load won't require more than \$25mA\$, then we aren't talking about a whole lot of power. <S> At worst: \$25mA \cdot 300V = <S> 7.5W \$ is dissipated, either in the load, or in something dropping the excess voltage. <S> The share of that between the load and the something else is determined by the voltage required by your load. <S> A TO-220 can dissipate \$7.5W\$ with a heatsink, and around \$2W\$ without. <S> If you can deal with the excess heat and reduced battery life, then what you want is a linear regulator , which will be simpler, cheaper, better regulated, and more reliable than any inductorless 555 PWM scheme, while not being any less efficient. <S> There are many ways to make linear regulators, enough to merit another question, but it would be hard to get simpler than this: <S> simulate this circuit – <S> Schematic created using CircuitLab Regulation is poor and could be improved with an error amplifier, but it's hard to get simpler. <S> It will be just as efficient as your 555 circuit, and at \$2.5mA\$, how efficient do you need to be?
You may have to add a resistor in series with the MOSFET to limit the charging current and a fuse (from 300V supply) would be helpful in case of a short circuit caused by a faulty capacitor or an accidental short circuit output.
Energy efficient one button on/off with extra function (Old) cellphones have a button to turn it on (when off), end a call (when on, short press) or turn it off (when on, long press). I need something similar for a microcontroller. The device is battery-powered so the circuit should be as energy-efficient as possible. In addition to that, the fewer IO pins I have to use the better. I understand I need at least one as an input to read the state. Size isn't really an issue, but smaller is better. The microcontroller in question is an XLP PIC16F1829 . If I'd use a SLEEP instructions and an input button on an interrupt pin, it would consume about 40uA in sleep, considering the peripherals I'm using. I hope I can get something drawing less current. The circuit should be energy-efficient when on as well. What are some common energy efficient ways to make a one button on/off function with an extra option for a microcontroller? As you can see, I already added a circuit myself. However, I don't know how energy-efficient it is when on, and there might be better options. <Q> If you need a solution that doesn't require a voltage regulator i.e. operates directly on the Vcc lines to the PIC <S> then I've modified it slightly (and for a good reason): <S> - The reason it's modified is that the BJT pass transistor might drop a little too much voltage under load if you are just switching an already regulated Vcc to the PIC. <S> I've replaced the pass-transistor with a P channel FET and removed the 2k2 and 33k resistors on your circuit. <S> The 2k2 is needed to protect the BJT pass transistor and the 33k put a max limit on the pass transistor's base current - not needed when using a P channel FET. <S> I've also added a 10k pull-up on PD3 but this can be an internal pull-up in the PIC. <S> What looks like a suitable P-channel FET is the TP0101 - it's the first one I came across when googling "Low Vgs(theshold) P channel MOSFET". <S> There will be plenty that will do <S> but this one has low on resistance (<1ohm) with just 2.5V drive on the gate <S> and that was my primary aim. <S> It will also work up to over 10V so could be used prior to a regulator too. <S> Energy efficiency when "on" will be better that the BJT circuit because it doesn't need base current to keep it on. <S> When powered off, both circuits will be really low on current <S> but maybe the P channel leakage will "waste" 1uA leakage into the load - <S> it's probably a good idea to make sure this 1uA doesn't somehow develop a voltage on the PIC that might cause it to "strangely" power-up - use a 100k load on the output - <S> this will develop 0.1V across the PIC's power pins and kill off the possibility. <A> (Dutch) <S> According to the site, this circuit draws less than 1uA when off. <S> I didn't test it myself. <S> I don't know how much it draws when the device is on. <S> When SW1 is pressed, Q1 starts to conduct and the microcontroller starts up. <S> In the startup routine, PD2 should be brought high to keep Q1 via Q2 enabled, so that the device stays on. <S> On PD3, the state of SW1 can be read. <S> You can check in the code how long the button is pressed, and execute different functions depending on the time the button is pressed. <S> It can be used without the voltage regulator as well, I suppose . <A> One option would be a lower power microcontroller. <S> This board can be used to develop for one (TI MSP430) capable of about 0.8 ua in low power mode; on a button press it can be active in 1 us.
I searched around a bit of course and found this: Source: http://www.circuitsonline.net/schakelingen/145/computer-en-microcontroller/one-button-onoff.html
What safety concerns are there for discharging capacitors directly through a short? If I discharged my caps on thick bronze rails connected to the caps by copper wires and nothing else, would that be dangerous? I'd like to safely discharge the caps as fast as possible for the highest amount of current I can get. What's the best method to use multiple capacitors in a way to maximize the current safely while minimizing power loss? Bonus Question: I said bronze, but I need the highest amperage possible while being sturdy. What would be a good material? Could copper be better? <Q> You're going to run into two dangers doing this. <S> 1) <S> The spark. <S> That will need to be contained. <S> Repeated applications could lead to damage of the terminals or the discharge bars. <S> I'd recommend using a contactor to make the actual connection. <S> Depending on the voltages and currents, that could get pricy. <S> 2) <S> The current. <S> Again depending on the voltage, the ESR of the cap, and the resistance of the discharge path, you could be talking about kiloamps of current. <S> It's a very short pulse, which thick wire and bar and good connections should be able to handle, but the instantaneous thermals might damage the capacitor. <S> You should consult the datasheet, or else the manufacturer, to find out the instantaneous pulse current the cap can supply. <S> My guess is that most aluminum capacitors wouldn't support that kind of behavior for large numbers of repetitions. <S> And if they failed after a few shots, it might be pretty sudden. <S> As for maximizing the current and mimimizing the power loss, you'll want low ESR caps, lots of them, in parallel. <S> Without specs it's impossible to make more concrete recommendations. <A> Copper is usually good. <S> You'll be wiring your capacitors in parallel for effective discharge. <S> The limiting factor is the equivalent series resistance of the capacitors, which will be shown as ESR in the datasheets. <S> The datasheet might also describe how fast they can safely discharge. <A> Trying to destroy your capacitors? <S> It's not possible to give a good answer without knowing what kind of capacitors: half-inch filter caps, or 300LB laser caps? <S> High-volt caps have a limited lifetime for direct-discharge (shorting.) <S> Even the ones designed for this (defib, laser, or "energy storage" caps) can be progressivly ruined, then finally fail open. <S> Direct shorting can also trigger a discharge inside the dielectric layer. <S> So, if you're building a capacitor-discharge rig, DON'T waste your capacitor lifetime by connecting with a shorting bar, use a resistor bank and a HV relay.
Depending on the voltage on your caps, there could be a very large spark when you suddenly short the terminals.
Using forward voltage drop of diodes with linear regulator I want to clamp the output of a adjustable three-terminal linear regulator Vout to -1.8V relative to a reference voltage Vref. My approach is to use the forward voltage drop of three diodes but I am having trouble sizing the resistor to ground R2. Clearly, it needs to be large enough to limit current through D1...3. What other boundary conditions are there? I imaginge it must not be too large either to avoid pinching off the regulator's ground connection or create an voltage rise due to Iadj? Or what are the relevant boundary conditions for sizing? The LM338 has: Iadj = 50 µA Vref = Vout-Vref = 1.25V simulate this circuit – Schematic created using CircuitLab In the alternative I thought of something along the lines of: simulate this circuit <Q> Using an op-amp is probably the best way to deal with this requirement <S> but you might be better with an emitter follower circuit: <S> - The op-amp will drive the NPN so that its emitter (Voltage across the load) is the same voltage as the +Vin pin on the op-amp. <S> I borrowed "The Photon's" drawing because although it was wrong, it was easily amended to show an emitter follower. <S> BJT base drive only needs to be 0.6V above the emitter - I'd still recommend using an op-amp with rail-to-rail output capability so that Vin can be a bit lower. <S> I'm also assuming the op-amp is powered from Vin and GND. <A> I'm not sure I understand the reason for using the regulator in your proposal. <S> Why not something simpler: simulate this circuit – <S> Schematic created using CircuitLab <S> (Edit: Note, diagram fixed in response to AndyAka's comment) <S> Edit: <S> Again, I fixed the diagram in response to AndyAka's comment about stability. <S> Adequate bypassing of the load at C1 is needed to make the circuit stable. <S> Also, while doing simulations to prove to myself that bypassing is the correct means of compensating the control loop, I realized that if the load might draw very low current, the op-amp will need to drive very close to VIN to adequately cut off M1. <S> If VIN and the op-amp positive supply are the same, a rail-to-rail type is needed. <A> You want to use the LM338 as a tracking regulator, to follow a control voltage (\$V_c\$) <S> minus 1.8V. <S> Maybe you like the built in current limit or thermal limit of the LM338. <S> Or maybe you just have some LM338s available and thought why not put them to good use. <S> Whatever the case, here you will see a simple way to implement a tracking function by adding an opamp and voltage reference to the circuit. <S> Most of these three terminal non-lowdrop regulators are very similar to each other. <S> They regulate the voltage between the output (\$V_o\$) and the adjustment pin (\$V_{\text{adj}}\$) at 1.24V (or something pretty close). <S> Typically a resistor (\$R_{\text{set}}\$) will be placed between \$V_o\$ and \$V_{\text{adj}}\$. <S> \$R_{\text{set}}\$ defines a constant current (\$I_{\text{set}}\$) of \$\frac{R_{\text{set}}}{\text{1.24V}}\$ that will pass through a resistor (\$R_{\text{adj}}\$) between \$V_{\text{adj}}\$ and ground. <S> The only purpose of \$R_{\text{set}}\$ and \$I_{\text{set}}\$ is to determine the voltage at \$V_{\text{adj}}\$. \$V_o\$ <S> is then just 1.24V + \$R_{\text{adj}}\$ \$I_{\text{set}}\$ <S> , basically the regulated 1.24V is stacked on top of whatever happens to be at \$V_{\text{adj}}\$. <S> If you supply \$V_{\text{adj}}\$ then there is no need for either \$R_{\text{set}}\$ or \$R_{\text{adj}}\$, and that's what we'll do here. <S> You will need an OpAmp and an adjustable reference set to 3.04V. <S> It is 3.04V because you need to account for the 1.24V to get <S> \$V_c\$ - 1.8V at \$V_o\$. <S> Here is the OpAmp circuit: You would insert the OpAmp into the LM338 circuit with \$V_c\$ hooked to what you are calling Vref, and \$V_{\text{adj}}\$ hooked the the Vadj pin of the LM338. <S> And 3.04Vref would come from the reference voltage you will need to add. <S> Resistors R1 and R2 in your circuit are not needed and would be omitted. <S> And of course you don't need any of those diodes in your circuit either. <S> Be aware that tolerances add up quickly in differential amplifiers like this. <S> For example if you want to meet 2% tolerance for the \$V_{\text{adj}}\$ voltage, you might need better than 1% resistors. <S> I'll leave that as an exercise for you.
If you did use a FET (N channel with source to load) this would work but you might find that Vin needs to be higher for it to work. You might use a reference like the LM4121 or you could also look at something like the LM611 which has an opamp and an adjustable reference.
What do you use a board like this for? I'll start by saying that I'm a software guy, I know literally nothing about electronics. I recently bought a raspberry pi, and while browsing at my local electronics shop, saw this board for $5. I realize now that I don't know what I would actually use a board like that for. I would like to know a few things: Does a board like that require soldering? Is this at all similar to a "breadboard?" Is it possible to use a board like that to connect with GPIO ports? If not, what would someone use a board like this for? <Q> That is a protoboard/veroboard/perf board/etc. <S> Does a board like that require soldering? <S> Is this at all similar to a "breadboard?" <S> Mostly, yes, you would solder it. <S> You could also use wirewrap, but frankly, that kinda defeats the purpose. <S> It is similar to a breadboard, except that it has a different layout, and is used for (mostly) permanent or final circuits. <S> Breadboards allow you to move things around easily, because they are solder free. <S> Is it possible to use a board like that to connect with GPIO ports? <S> Off the bat? <S> Maybe. <S> But with a few caveats. <S> The layout of the one you pictured wouldn't be ideal for a header used on the RPI. <S> You could solder it on directly, but that would make removing it hard, you most likely would need to wire around it, you would have to put it on upside down, etc. <S> You could use a female header to get around some of the issues. <S> Most of the time, people use a cable between the RPI gpio port and a circuit board. <S> See http://lookmanowire.blogspot.com/2012/07/raspberry-pi-and-xbee.html or http://www.atbrask.dk/?p=27 for examples on a perf board connected directly to a RPI (with a header) <S> If not, what would someone use a board like this for? <S> And you can google image search "raspberry pi perf board" for even more examples. <A> The linked product is a generic pre-etched circuit board. <A> These boards go by many names: PC board, prototype board, perf board, etc. <S> They come in numerous shapes and sizes with different types of pad connections. <S> The particular one you link to is designed for use with integrated circuit chips and has designated power rails as well. <S> An IC will fit perfectly across the two center rails and has a few connected pads on either side to easily interface with external components. <S> Here is a bigger example: <S> Typically, one side will be nonconducting - <S> this is where the components typically go. <S> The other side will have copper pads identical to the patterns shown on the top side - this is where you solder components to the board. <S> Jumper wires can be added on either side of the board to connect various things together. <S> Although, there are some which are double sided - that is, they have copper pads for soldering on both sides. <S> This kind of board is also designed for use with through hole parts, although, you can use a surface mount part if you get creative: <S> There are boards likes this specifically for use with surface mount components:
It does require soldering to use, although the pads are connected together by traces as shown by the white areas on the top. Essentially they are a simple way for someone to quickly assemble a prototype circuit without waiting for a custom PCB or etching their own. Practically most hobbyist circuits can go on a perf board like that.
Basic Electronics - I want to learn the "why", not just the "how" I have been looking for a very basic book on electronics, but many of them explain what the components do (and how they are made) and then go into designing circuits that do stuff. They tell you to put the components in various parts of the circuit to make it do what it's supposed to do. However, they don't tell you exactly why it does what it does. For example, a circuit with a transistor, a couple capacitors and resistors, and a transformer causes a speaker to warble. Logic tells me that there is an oscillation going on in the circuit, but I need to know why the components are placed where they are placed for the circuit to work. Please direct me to a book that explains the 'why' very clearly. <Q> BUT I need to know why the components are placed where they are placed for the circuit to work. <S> As a consumer electronics technician, I felt the same need. <S> That's why I left the field and enrolled at the School of Electrical Engineering at the Georgia Institute of Technology. <S> You won't find the answers you seek in any single book; learning "why" is a process and that process begins with quite a few prerequisites in, e.g., calculus and physics. <A> If you want to know answers to why-questions in regard to an electronic circuit which appears in any book or schematic that you can find online, stop looking for another book and try this website . <S> But as far as books go, take a look at The Art of Electronics by Horowitz and Hill;and <S> also Electronic Principles by A. Malvino. <A> Microelectronic Circuits by Sedra and Smith <S> ; I've used this textbook along my electronics course in Computer Engineering at "Sapienza" University of Rome, and it is one of the best textbooks I have bought these years. <S> It doesn't talk much about the really basics (resistors, capacitors, inductors), but it extensively talks about everything else, especially regarding opamps, diodes, transistors, and everything related to them. <S> Of course, it tells you exactly "why", and it guides you to understand that. <S> Again, it is not really for the very beginner, to fully appreciate this kind of books you should have a good understanding of the basic principles of electronics, from Kirchoff's laws to Thevenin-Norton equivalent circuits, from voltage dividers to RLC oscillating circuits, and you should have some understanding of calculus, because most of the circuits that operate in AC conditions (like an audio amplifier) need to be studied in the frequency domain, a thing that may be quite complex sometimes. <A> I came across this site, All About Circuits , and as someone with virtually no knowledge of electronics, I found it helpful in explaining why electronics work. <S> I am still at the beginning of Chapter One, but my overall impression is very positive. <A> , I've found particularly useful while studying. <S> I'm in my second year of Mechatronics, and anything to help me understand analog <S> I've considered gold. <S> I agree with the top two answers Malvino has been hailed by my professors as the definitive textbook for Electrical Engineering, but I felt it made too many assumptions on the reader, for instance you should already know how to solve basic circuits using Thevenin's and Loop analysis. <S> Storey's book is much more intuitive and starts from the basics all the way to the more advanced stuff. <A> Apart from all those books mentioned one very good approach, is that of Rizzoni, Principles and Applications of Electrical Enginnering . <S> It's a book that start from point zero <S> , develops in a rather simple and not demanding way the methods used in analysis and gives a great variety of solved problems <S> let alone the numerous examples of circuits used in everyday life. <S> I totaly recommend that books if you want to start from scratch and understand electronics.
Electronics: A Systems Approach by Neil Storey
Ceramic vs. Film Capacitor: Which one is preferred in audio circuits? I'm considering building an amplifier following instructions from a MAKE magazine article. However, as I was reading the circuit schematic , I noticed that the author denotes that the capacitors C101, C104, and C105 are supposed to be "film capacitors." Is there a reason as to why one would use film instead of ceramic capacitors in this application? Also, if a website denotes " metal film capacitors", is that the same as a "film capacitor"? Right now, the only difference I know of in types of capacitors is that electrolytic capacitors have a polarity, while ceramic ones don't. I was wondering if film vs. ceramic has a similar differentiation. <Q> Depending on the exact type, ceramic capacitors tend to have some nonlinearities. <S> What makes them less than ideal in the audio signal path is, most of all, the varying capacitance with a change in voltage. <S> Here's a diagram for various types of ceramics (and it doesn't even show ceramic dielectrics like Y5V ): <S> Image Source: <S> Wikipedia With your audio signal changing, your capacitors change, too. <S> This causes non-harmonic distortion. <S> Think of a high-pitch note superimposed on a bass note. <S> While your bass note is close to zero, your higher note passes through a capacitor with the nominal value. <S> When the momentary voltage of your bass note is higher, a (bad) ceramic capacitor has a lower value, i.e. your high pass filter has a higher cutoff frequency. <S> This may lead to the higher note becoming damped more strongly. <S> For audio applications, you will often need large capacitor values. <S> Only non-linear types of ceramics tend to have these. <S> Film capacitors are quite linear and usually better suited for analog signal processing. <A> "Film Capacitor" typically denotes polyester or polymer film as the dielectric - as another answer points out, metallized film capacitors are the same thing: A metallic coating being applied to an extremely thin polymer film, to create the conducting electrodes of the capacitor. <S> Another issue with ceramic capacitors is that they tend to behave as microphones, thus picking up ambient sound and modulating the voltage across them accordingly. <S> Also, for smaller values (a few pF), ceramics were more commonly used, <S> while larger values were somewhat likely to have film considered as an option - or at least that was how it used to be, before capacitors became so inexpensive with the advent of SMT, that the price difference became negligible except for huge volumes. <S> Both film caps and ceramic ones are non-polarized, so that isn't a difference. <A> There is another reason for avoiding ceramic capacitors: Piezoelectric effects. <S> Some ceramic caps (particularly MLCC SMT parts) can actually generate voltage across their terminals when subjected to physical stress. <S> Ceramic caps are also often microphonic , which predictably can cause issues in analog applications. <S> The ceramic EIA Class 2 dielectrics used in high-K capacitors ("Z5U" and "X7R") are piezoelectric and directly transform mechanical vibration into a voltage in exactly the same way as a ceramic or piezoelectric <S> microphone.[2] Film capacitors using soft (mechanically compliant) <S> dielectric materials can also be microphonic due to vibrational energy physically moving the plates of the capacitor. <S> Likewise, variable capacitors using air as a dielectric are vulnerable to vibrations moving the plates. <S> Capacitors using glass as the dielectric, while quite expensive, can be made to be essentially nonmicrophonic.
In general, ceramic capacitors are somewhat non-linear in their frequency and voltage responses, compared to film capacitors.
Is this a common LCD display? I'd like to know if this LCD display is a common one like the HD44780. Sadly there is no model number on it, only the brand(?) "onv" or maybe it should be "auo" when you read it upside down. It's part of a car radio. It has a 40 pins connector. connector: whole display: <Q> That display is almost assuredly a graphics display. <S> That would make it MUCH different from a HD44780 style display that natively displays characters. <S> Enough information is not provided to determine if this display has a controller onboard that is capable of receiving the graphics display pixels and managing the refreshing of the screen to keep the display alive. <S> In this alternate mode the display would be working similar to a computer driven LCD monitor that requires a continuous feed of a VGA or DVI video signal to keep the screen active. <S> In either case be prepared for a fair amount of work to get the display going. <S> Personally I would suggest that you begin work with something that you can get some decent information on it in order to figure out what it does and how you can "talk" to it. <A> I know this post is old <S> but I just recently took apart a Kodak ESP 7 AiO printer and found a lcd just like this. <S> Mine is a 3". <S> The connector looks a little different but has the same amount of pins. <S> It had a number printed on the back 59.03A13.001 . <S> I looked at the data sheets and everything looks pretty good. <S> I havent thoroughly looked through it yet. <S> Datasheet Mirror <A> they are used in Kodak printers but i have had no luck finding data sheets for those either... <S> ONV is actually AUOas for model - going to there website helped a little <S> but still i could not find my screen <S> a "s501" http://www.auo.com/?sn=149&lang=en-US&c=39 <S> and you could perhaps follow something like this <S> http://g3nius.org/lcd-controller/ to give you and idea on how to start using it
Alternatively this display could be one of the type where a real time video signal needs to be fed to the display in order to keep the screen active. When I googled that number I got a model number A030DN01-V0 .
How can I figure out an unknown UART's speed? So I have a piece of hardware I'm reverse engineering. I believe I've found a UART on the board. I have an FPGA connected to it that just does: ExtTX <= PCRX;PCTX <= ExtRX; So, in this way I can theoretically handle any speed the FTDI on my FPGA can(which is fairly fast). So, I have the hardware portion covered. Now though, using Linux(or Windows), how can I figure out what the speed and stop bits and other configuration options of the serial connection should be? <Q> You want to measure the shortest transition-transition time. <S> This will, assuming the bus you're looking at has a decently varied content, tell you the bit-time for the serial interface. <S> You can then go from that to the overall baud rate. <S> Really though, if you're serious about doing reverse-engineering or any sort of electrical engineering at all, you will need an oscilloscope (and probably a logic analyzer), so you should think about buying one soon. <A> With a little luck, brute forcing can sometimes be faster than pulling out your oscilloscope or logic analyzer (or your only option when you don't have this kind of equipment). <S> I have a USB<=>Serial cable lying around that I use for these challenges. <S> I just connect GND and RxD wires from it to the circuit and just try to capture data. <S> I usually start at 9600 8N1 (which is pretty common), where 9600 is the Baudrate, 8 is the number of data bits, N is short for no-parity and 1 is the number of stop bits. <S> The slow method is using a program like PuTTY and configure it for every Baudrate you want to try, my fast method is a Perl script that I can access from the command line and takes the Baudrate as option, followed by a tool that hexdump's the data received. <S> Here is an example (Linux): cat_usbCable --baudrate=2400 <S> | hexdump <S> -C00000000 7f 45 4c 46 <S> 02 01 01 00 00 00 00 00 00 00 00 <S> 00 <S> |.ELF <S> ............ <S> |00000010 <S> 02 00 <S> 3e 00 01 00 00 00 <S> 40 13 <S> 40 00 00 <S> 00 00 00 <S> |.. <S> >..... <S> @.@ <S> ..... <S> |00000020 <S> 40 00 00 <S> 00 00 <S> 00 00 <S> 00 <S> c8 62 00 00 00 00 <S> 00 00 <S> |@........ <S> b...... <S> |00000030 <S> 00 00 <S> 00 00 <S> 40 00 <S> 38 00 <S> 09 00 <S> 40 00 1c 00 1b 00 <S> |....@.8...@..... <S> | Common baudrates are: 300, 600, 1200 , 2400, 4800, 9600 , 14400, 19200, 38400, 57600 , 115200 . <A> If you don't have those tools available you will probably need to write a decoder for your FPGA to calculate the bit and word timings using a reference clock.
The easiest way would be to use a logic analyzer with built in RS232 decoder or an oscilloscope to probe the signals.
Why use a pull-down resistor with a LDR and microcontroller? I am looking at this: http://learn.adafruit.com/photocells/using-a-photocell It's connecting VCC <-> LDR <-> resistor <-> GND . And the analog input is between the LDR and the resistor. I understand than a resistor may be necessary to control the current (in case the LDR resistance is very low). But Why can't I just do the following: VCC <-> LDR <-> resistor <-> Analog Input And forget about the pull-down? <Q> When working with a digital circuitry that senses analog voltage, for example a microcontroller, or let's say Arduino, you are measuring voltages. <S> However, without current, voltage cannot be present. <S> For a voltage to be created on a component, there need to be a current flowing on it. <S> According to Ohm's law; \$V=I*R\$, when \$I=0\$, the equation becomes; \$V=0*R=0\$. Thus, no voltage will be present, and the microcontroller will not be able to measure anything. <S> Proper way of sensor connection Check out the schematic below. <S> First, have a look at the left side, a proper LDR connection with a proper pull-down resistor. <S> A current will flow through R2 and create a voltage drop on it. <S> \$Vanalog <S> = <S> Isensor*R_2\$, where \$Isensor\$ is determined with the total resistance of the sensor and \$R_2\$. Since LDR's resistance changes with the light, the current, hence the voltage will change. <S> You may have noticed that there is a resistor I drew in the input. <S> This is called the input resistance, or impedance, of the microcontroller and is generally very big, such as \$10M\Omega\$. <S> In this configuration input resistance and \$R_2\$ are connected in parallel, so their effective resistance is going to be; \$\dfrac{1}{\Omega_{total}}=\dfrac{1}{R_2}+\dfrac{1}{R_{in}}=9990.00999\Omega\$ which is almost equal to \$10k\Omega\$. <S> So, there will be no change. <S> The voltage AnalogValue is then, \$Vanalog= <S> Isensor*10k\$, where \$Isensor\$ is \$\dfrac{Vcc}{R_1 <S> +10k}\$ <S> Let's say our sensor \$R_1\$ is 10k at the current lighting condition. <S> And \$Vcc=5V\$; \$Isensor=\dfrac{Vcc}{R_1+10k}=\dfrac{5}{10k+10k}=250 \mu A\$, \$Vanalog=2.5V\$ <S> What if there was no pull-down resistor? <S> If there was no pull-down resistor, the configuration would be as shown in below diagram. <S> The sensor current, \$Isensor\$ would be the same as \$Iinput\$, since all the currents on a wire are the same. <S> Our microcontroller measures the AnalogValue , the voltage on the pin. <S> Let's calculate the values for this scenario, too: <S> We know that \$Isensor= <S> Iinput\$, now let's assume, again, that LDR is \$10k\$, AnalogValue is calculated as follows; \$Vanalog= <S> Isensor*R_{in}\$, where \$Isensor\$ is \$\dfrac{Vcc}{R_1+R_{in}}=\dfrac{5}{10k+10M}\approx500 <S> *10 <S> ^-9\approx500nA\$ <S> Thus, \$Vanalog= <S> Isensor*10M\approx(500 <S> *10 <S> ^ <S> -9)(10 <S> *10 <S> ^ <S> 6)\approx5V\$ <S> As you can see, since almost no current flows, there is almost no voltage dropped on the sensor and even though we could read 2.5V on the previous proper configuration, we have read 5V with the same light, i.e. when \$R_1=10k\$. This configuration will not work. <A> In your second example by connecting Vcc, the LDR and resistor in series you'd essentially only allow different amounts of current to flow to the analog input. <S> The analog inputs on a microcontroller tend to have a high input impedance <S> so under most circumstances you wouldn't get a good / reliable change in the readings. <S> In practice for typical LDR values I'd expect you'd get a full scale reading all the time much like connecting the ADC input to Vcc via a 10K resistor. <S> By connecting the circuit to ground you're forming a voltage divider so instead of small changes in current you'll be getting a change in voltage. <S> That allows the internal capacitor in the ADC sample and hold circuit to charge quickly for an accurate reading. <A> Two things: <S> A microcontroller's input has a high impedance state, which means: not ground, not Vcc <S> A microcontroller's input measures voltage, not current <S> The voltage over the normal resistor is the voltage the input will read and you can calculate it with V=IR, R being the resistance of the normal resistor, and I the current through both resistors. <S> Since the current depends on the total resistance, the voltage on the input pin will depend on the resistance of the LDR. <S> However, when you connect the two resistors to the input instead of ground, no current can flow (remember the first point). <S> Therefore, the resistors just work as a pull-up and not as a voltage divider. <S> The voltage on the pin won't depend on the resistance of the LDR anymore. <A> The pull down resistor is simply acting in the circuit to create a potential divider . <S> The LDR resistance can change over a wide range depending on the light level (say a few hundred ohms to a few hundred thousand ohms.) <S> The junction between the LDR will therefore give a variable voltage between (nearly) 5V and (nearly) 0v <S> i.e. the range of voltage the input of the micro controller can handle. <S> The resistor (10k) does limit the maximum current that flows through the LDR but <S> its function is to to provide a voltage signal. <S> Your second circuit without a ground (0V) connected the input (which takes very little current) <S> means that the input would only see the 5V (Vcc) even when the resistance of the LDR changes between its extremes.
When you connect the two resistors as a voltage divider, like they do, current will flow from Vcc via the resistors to ground.
What are the factors that significantly affect the life span of a DC motor? I'm currently planning to run a DC motor continuously on solar power. So I would like to know which things I should be very careful about for optimum lifespan of the motor. I found the following two, and would like to know what other factors do: Voltage Current Source <Q> Good bearings and brushes, preferably self lubricating voltage equates to speed of rotation - more volts, faster rotation current equates to torque. <S> More load, bigger current. <S> Explanation <S> Basically the speed at which the motor turns induces a back e.m.f. <S> just under the value of the applied voltage. <S> The actual speed depends upon the type of motor but for small DC motors a rough guide is about 1000 r.p.m. per volt <S> The current that flows through the motor is determined by the difference in these two voltages and the coil resistance. <S> Adding a load on the motor's shaft (torque) slows it down and increases the voltage drop across the windings as the back e.m.f. is reduced. <S> This increases the current taken by the motor. <A> Voltage and current <S> - Basically because you will run your motor continuously, you will want to run your motor at or below its nameplate rating. <S> Too high of a current means your motor will heat up too much (see below). <S> Higher current also increase the current density in your brushes which will shorten life. <S> Too high of voltage would mean your motor is rotating faster than typical and could reduce bearing life. <S> At higher speeds your brush pressure may not be optimized, either, so you could reduce brush life. <S> Temperature <S> - Most standard motors are designed for a maximum ambient operating temperature of 40 °C. <S> This temperature takes into account the temperature rise that will result from running your motor at its rated temperature. <S> If your ambient temperature goes above 40 <S> °C (or if you run your motor above its nameplate rating) <S> your motor may getting hotter than it should. <S> If insulation temp is an issue, you can go to a higher class insulation (for example, from Class B to Class F or from Class F to Class H). <S> If bearing temp is an issue, you can look at getting higher temperature grease in your bearings. <S> The temp of your brushes can cause a change in the friction between brush and commutator. <S> You can get different grade brushes with different coefficients of friction that can help you with this. <S> Low temperatures can also affect life. <S> For example, your bearing grease has a lower temp limit as well and you can specify a low temp grease if necessary. <S> Moisture - If your motor is outdoors or needs to be washed down, then your motor should be sealed. <S> Basically you want to prevent corrosion on metal parts. <S> You can get sealed bearings, water-proof wire exits, o-rings between end bells and housings, etc. <S> to prevent leaking. <S> High humidity can actually cause brushes to have a shorter life, too. <S> UV - Some plastics and rubbers will degrade in sunlight, so if the motor will see direct exposure to UV, you will want to make sure your materials are compatible. <S> This may affect lead wires, grommets, brush holders, etc. <A> This is a very broad subject, only partly touching on electrical engineering. <S> I suggest finding a good mechanical engineering source on motor installations. <S> First thing that popped up when I searched for a definition of 'axial load' was the Bodine manual. <S> Offhand, the first thing that will wear out a motor is asking its bearings to support loads they are not designed for. <S> Avoid side to side forces on the shaft, and axial forces: <S> The next thing that will wear out a motor is over-temperature. <S> Provide cooling if it needs it. <S> At the very least, do not obstruct it's cooling vents! <S> Bearing seals can fail, lubricants can run dry. <S> Brushes wear out, grit can get in the gears. <S> So keep it clean and protected, and at the same time available for inspection.
If the motor gets too hot, it may affect the life of the insulation, the life of the bearings, or the life of the brushes.
Double side PCB with solder via? Normally vias are made with through hole plating. In the past they used to make vias by soldering a piece of wire to connect the top and bottom layers (like a short piece of 24 gauge copper wire). Could the same be done with solder? Question: Can a VIA in a double sided PCB be connected with solder? Is there any precedent for such? <Q> I don't see why not, but I think you will find that it's easier to assemble with wire. <S> The trouble I suspect is heating both sides of the board simultaneously such that you can get the solder to flow on both sides, then overcoming the surface tension of the solder and getting it to go through the hole. <S> That, and solder is more expensive than wire. <A> I personally do it this way. <S> Imagine you have 50 or 100 vias which you have to fill. <S> I think either way is OK as long as the speed does not concern you. <S> Quality is the same and it does the job anyway. <A> I don't think it's possible because surface tension will prevent solder from filling unplated vias especially small ones (less than a couple millimeters). <S> As RF4 material repells solder.
To use solder is much, much faster than a wire.
Recommendation for ADC noise filtering? I'm using an ADC (adc081c021) with a pretty noisy input: There is also a 5-second video here: http://tinypic.com/player.php?v=2ue47cm&s=5 The objective is to detect the two peaks. How could I smooth this input in order to have better ADC readings? Is there a better option than a LC filter? Any recommended values? <Q> Since you have an example of the signal on your scope, the best thing to do is capture the data and transfer it to a PC. <S> Then use a tool like Matlab or Octave to simulate the effect of different filters. <S> You are looking for a filter, just defined in terms of poles (and maybe zeros) that minimizes the noise, without disturbing the desired features of the signal. <S> When you have a filter definition, then worry about how to build it. <S> For a two-pole filter, the Sallen-Key op-amp circuit is known for having relatively good tolerance for changes in the component values. <S> An LC combination is also possible. <S> For higher-order filters (which I doubt you need), a cascade of Sallen-Key filters is preferable to a ladder of LC stages, because the op-amp provides buffering that prevents component value shifts in one stage from affecting the characteristics of other stages. <S> Edit <S> In reply to your comment, I'm not a DSP guy, but here's how I'd work out the equivalent continuous time filter: <S> Your filter function in discrete time is \$y_n = <S> a <S> x_n + (1-a) y_{n-1}\$ <S> Given an impulse input, the time constant is the time it takes to decay to \$e^{-1}\$ of the value of \$y_0\$. <S> This is given by <S> \$(1-0.025)^n = <S> e^{-1}\$ <S> Solving this, n is about 39 samples, or 156 us. <S> So you want to choose R low enough that the input impedance of the ADC doesn't affect the filter performance much, then choose C to give RC = 156 us. <A> A quick and simple option to investigate is to average the ADC values over a given number of measurements, resulting in a simple low pass filter. <S> This method does come with a maximum delay of the ring buffer length times sample frequency. <A> What I would do would be to only use the ADCs input if the value was higher than x. <S> You can do this by using a comparator to check if the value is above <S> x and then reading the ADC if it is.
If a single-pole filter is adequate, a simple RC circuit solves your problem. Best option would be a ring buffer of a certain size in which you push the most recent value at the end and average across all values in it.
DC-DC converter, 12V to 400V? Is this possible? To be able to charge a high voltage battery (~400V) from solar panels I need a dc-dc converter that can boost up the voltage from the low voltage system (~12V) to the higher voltage.The power needed is about 400W, or 1A at the output. I have read that it is not practical to boost more that a factor of 6, and this is a factor of about 30-35. Would two boost (step-up) converters connected is series work or is there a better solution? <Q> In general, a single boost circuit is preferable to using two boosters in series. <S> I say this because, given the powers you require, a transformer is the most efficient way to do the step-up from 12V to 400V. Not using a transformer will limit the power you can handle in stepping up the voltage. <S> At these sorts of power levels you'd be hard-pushed to find a booster that doesn't use one. <S> Once it is accepted that a transformer is a requirement, any turns ratio from a 100:1 (step-down) to 1:100 (step-up) is just a matter-of-fact (see comment below next paragraph). <S> Because a transformer is necessary to economically achieve the power output, the turns ratio is going to be an easily achievable 40:1. <S> A 24Vp-p input at a frequency of (say) 10kHz will, under no-load conditions, produce an output of 960Vp-p which after rectification/smoothing is going to be about 475VDC. <S> But, high turns ratios and efficiencies don't always go hand-in-hand <S> - I'm thinking of X-ray tube power supplies that I've used - they were 50KV/4mA output (200W). <S> The step-up transformer was a large ferrite operating at 50kHz and, with about 1200 turns on the secondary you were starting to hit self-resonance. <S> It was a resonant transformer circuit so that was no problem but <S> more than 1200 turns <S> and you were on the downward slope of decreasing efficiency. <S> Input turns, from memory were about 6 so turns-ratio of about 1:200. <S> The output fed a multi-stage cockcroft-walton voltage multiplier to take the output up from about 2000Vrms to 50kV. More than likely (given the power), you'll need a H-bridge driver which will apply nearly 24Vp-p to your primary winding and the turns ratio will be 40:1 to produce +400VDC. <S> It will need a reasonably sophisticated control system that involves pulse width modulating the drive to the primary and decent monitoring of the output to ensure you stay regulated. <S> I would also say that a secondary shut-down circuit would be needed should a single-fault arise. <S> Caution - fire hazard, electric shock hazard <S> Given the power supply's sophistication I'd be very hesitant to believe that two boosters would be at all more effective than one booster on the grounds of efficiency, performance, physical size or cost. <A> LT3751 is a High Voltage Capacitor Charger (and I suppose that it can be used for batteries with the help of some protection ICs). <S> I have skimmed the datasheet and it seems that it can handle several tens of amps as input, and can go to 400V output. <S> In any case, you will have to spend some time selecting the magnetics and switches which fit your application: <A> You can achieve this ratio in many ways. <S> Two stage boost <S> is one option <S> , it is definitely the easy option as you can use off the shelf controllers and you don't need to design a transformer. <S> If you choose to use an isolated topology you can probably go with forward or push-pull converter. <S> You can also use more complex converters boost topologies like this two switch boost with integrated magnetics:
One stage boost is probably also an option but it will require more know-how and state of the art semiconductors and magnetics (to get ok efficiency).
What advantages to permeability tuning as against capacitive tuning? I learnt recently about the RBZ80 ; a vintage valve receiver which used variable permeability tuning rather than variable capacitor tuning. In thinking about the possible reasons for permeability tuning in lieu of capacitive tuning the thoughts that come immediately to mind as follows The receiver was designed for hostile environment. Air dielectric would be bulky. Any other dielectric may be damaged/corrupted by exposure to the elements (e.g. salt water). What advantages does permeability tuning offer as compared to capacitive tuning? <Q> The permeability tuning (variable inductance) is essentially a slug of ferrite that can be screwed in and out of a coil wound around a former. <S> Once the circuit is tuned wax can be used to seal it into position or the screw thread can be locked mechanically. <S> The variable capacitor has large inter-meshing plates that are subject to mechanical damage or vibration and is physically a large component (size matters). <S> Switching coils (bands) is easy to do. <S> Variable capacitors are quite expensive (not a military consideration) to produce <S> so there is a cost saving as well. <S> For a portable radio used in warfare size, mechanical robustness and functionality are important. <A> I remember seeing an old radio with slug tuning and two seperate inductors were slug-tuned in-tandem. <S> I'm guessing here but that possibly performed the function of input tuning and local oscillator tuning thus keeping the LO 455kHz away from the desired radio channel. <S> I know that dual variable caps were often used for the same purpose but given the physical size of variable caps for AM broadcast bands I think <S> ferrite slug tuning would win-out. <S> I would also consider that tooling up for ferrite slugs and coils is simpler and, if design adjustments needed to be made, a few turns added or removed would be simpler than altering the plates of the capacitor. <S> Different ferrite slugs gives yet another option over caps. <S> I also remember the push-button pre-select tuning on car radios - although the mechanism was a little tortuous on ferrite tuners (the "system" mechancially memorized the slug position), I'm struggling to visualize how this would work with variable caps (which of course rely on rotation of the interleaved plates). <S> I'm also pondering the prospect of (say) 3 or 4 slugs operating in tandem negating the need for a local oscillator, mixer and IF strip because the RF selectivity would probably be good-enough to funtion as a half-decent AM radio. <S> EDIT <S> A day later <S> and I've thought of yet another advantage - tuning across a band of frequencies for the desired channel is OK but for either a variable cap or variable inductor tuning, the Q of the resonance changes from one end of the dial to the other. <S> I can imagine that if the ferrite slug introduced into the winding was low loss (on introducing the slug) and gradually got "lossier" along its length, as inductance rose (and selection frequency dropped), the Q of the circuit could be maintained flat (or nearly flat). <A> One advantage is that permeability-tuned coils are quite a bit smaller than variable capacitors. <S> Another is that permeability-tuned coils can be more temperature stable than ganged capacitors. <S> Another is that you have the opportunity to linearise tuning by using a variable pitch thread. <S> Source: <S> Radio Designers' Handbook. <S> The Quad FM and FM2 tuners are further examples of the technique.
The range of tuning using variable capacitors is greater than inductive tuning for a single tuning coil.
N-Ch FET with open-drain output I stumbled across this line in this datasheet (page 10): Serial Data Output Pin. Internal N-Ch FET with open-drain output that requires external pull-up resistor. It shifts out the previous eight SDI bits that allow daisy-chain operation of multiple packages. Could somebody briefly explain what this means? Specifically, if I'm not planning on using the daisy-chain functionality, can I leave this pin unconnected or do I need to connect it to an external pull-up resistor regardless? <Q> The data that you shift in on SDI will be shifted out on SDO . <S> You can optionally connect multiple of these devices in series: simulate this circuit – <S> Schematic created using CircuitLab <S> This means you only need a single data pin and a clock pin on your microcontroller to access all these device, all you need to do is apply enough clock pulses to get the data to/from all the devices. <S> The open drain means that the output can only pull low, pull to ground. <S> It cannot by itself make a high signal, it needs help for that from an external resistor. <S> The transistor pulls the output low and when the transistor is 'released' the resistor will pull the output up to Vcc. <S> simulate this circuit <S> The advantage of open drain (or open collector <S> when using a BJT) is that you can tie multiple outputs together without problems. <A> If you are not using the serial daisy chain then you can leave the SDO pin open and not have to install a pullup resistor on this pin. <S> The AD5290 part is designed to allow its use in analog circuits that have power supplies up to and including +/- <S> 15V. <S> This allows the "digital pot" terminals to connect into OpAmp circuits (and other similar types) that operate on voltage rails of this magnitude. <S> The main reason that the SDO pin on this part is open drain is that it allows the device to be built into a package of 10 pins and eliminates a need for a digital logic level supply pin. <S> If the SDO pin (the only digital output on the part) was designed with a push-pull output then the extra digital supply pin would be required. <S> Instead it can have a role in the daisy chain operation when the digital supply levels are other than a 5V supply. <S> A close look at the V IH and V IL specifications for the part will show that the inputs to this device can be driven equally well from a digital realm of 5V or from 3.3V.The open drain SDO can be externally wired up to a 5V or a 3.3V pullup with equal utility depending on which digital rail is used in the system. <A> See page 16. <S> SDO is only used if devices are daisy-chained. <A> SDO is an open-drain output-only pin. <S> It needs a pullup resistor in order to drive a logic 1 out, otherwise the SDO pin will remain at ground. <S> The internal NFET drives a "0". <S> Open drain pins allow multiple devices to be tied together w/o fighting, since there's no active pullup.
As others have stated the open drain nature of the pin is such that the pin could be be tied together with multiple other open drain outputs but that has very little utility in the use of this particular part.
Likely places to look to find cheap sources of FPGA? Which devices should I open first? I have a large group of new and old devices and I would like to find a FPGA to start poking around on. What products or types will be likely to have FPGAs in them? I recently asked this question on the reverse engineering stackexchange, but was directed here and thought the question would benefit from the original source that has inspired my search: http://www.youtube.com/watch?v=VY9SBPo1Oy8 <Q> FPGAs are rather hard to find in the wild, since once the prototyping phase of a project is done, the company will usually switch to an ASIC instead. <A> One additional problem is that if you find an FPGA the packages aren't typically suitable for breadboarding. <S> Some smaller devices will have SMT packages such as TQFP that you could potentially remove and install onto a TQFP to DIP adapter, but some are just about impossible to deal with at home coming in high density BGA packages. <S> For reference a TQFP package is a kind of quad flat package that has surface mount pins extending out from around the outside of the package, the pitch (gap between pins) varies depending on the size but 0.5mm is a common one. <S> With some practice and fairly basic tools they can be removed and resoldered at home. <S> The pins are sufficiently small that they need to be soldered to a circuit board however. <S> You can get TQFP to DIP adapters where you solder the chip on top and <S> 0.1" pins extend down that can be plugged into a breadboard. <S> A BGA is a ball grid array that has balls at the bottom of the package that aren't even visible when viewed from the top, so hand-soldering them one-by-one isn't an option. <S> Specialty equipment is needed to rework those reliably and sometimes X-ray inspection is used to inspect the solder joints because it isn't possible to see them otherwise. <S> The gear you're most likely to find them in such as high-end routers, switches and video processing equipment are likely to use the larger devices. <S> Many (most?) <S> FPGAs also require multiple power supplies and the I/O lines often aren't tolerant of higher voltages so they're also pretty easy to destroy unless you're careful with the design. <S> As haneefmubarak suggested Digilent make an excellent range of prototyping boards. <S> They take care of the tricky interfacing requirements and are an ideal way to get started. <S> I purchased one for around $100 some time ago and had it up and running with a simple design in a manner of hours. <A> Since you want to know places to look for FPGA boards. <S> Try this wiki page that is usually uptodate! <S> Joel Williams - Cheap FPGA Development Boards <A> EDIT: <S> Added specific boards. <S> I would go for a device based on a Spartan 5 or 6 , so one of Digilent's Nexys or Atlys series'. <A> you can opt for something like HD video boards. <S> then use some vide peripherials to connect it. <S> But it depends on how you define cheap.according to your hackaday link, that device the guy uses is found in video hardwares, i think it has something to do with the matrix in television. <S> http://www.amazon.com/electronics/dp/B00BUUV4X6 <S> you can buy one for 15$.the dev boards <S> Papilo is 65$ and LatticeXP2 <S> is 49$. <A> Ask your local FPGA distributor. <S> They make have some older ones that are cheaper than the current generation of parts. <S> But if you are "poking around on", you probably want an evaluation board. <A> Here is a similar question: Cheap/old consumer devices to recover FPGA boards from And a slashdot thread with some similar discussions: http://hardware.slashdot.org/comments.pl?sid=2086242&cid=35835256 <S> If you are willing to buy new but cheap take a look at digilent (especially their educational prices) and papilio ($38 as of now) here : http://store.gadgetfactory.net/papilio-one-250k/ <A> If you are familiar with the Arduino and are interested in (fairly) simple FPGA development, then you could give this a look. <S> I personally don't have experience with it, but SparkFun tends to make/carry good products. <S> It even has some interesting accessories for VGA and other connectivity. <S> Hope this helps!
The best place that I can think of, especially as a student myself, would be http://www.digilent.com The best place to find them would probably be discarded FPGA evaluation boards.
Using a 7 segment display to show numbers 1, 2, 3 and 4 with four inputs I have in my car 4 LEDs which illuminate in the instrument cluster depending on the gear the vehicle is in. This is a factory standard setup which I have already run feeds from ready for the next part. I would like to, using those 4 led inputs, build into my dash board a 7 segment LED display to show which gear the car is in, 1, 2, 3 or 4. I'm not really sure where to start with this but I'm ready to do some fast learning! <Q> If the drivers for the original LEDs can supply enough current you can do this with a diode matrix: <S> route the current from each of the original LEDs to the segments you want to illuminate when that LED would have been on. <S> In my experience a high-brightness display will be OK with ~ 1 mA per segment. <S> Details will depend on exactly how the current LEDs are wired (to ground, to power; can you get access to the connections behind the resistors). <S> In general, my first impulse is to throw a micro-controller at any problem I see. <S> But it in this case that seems ridiculous (especially given the uC-hostile environment). <A> As you already have the 4 (12v) signal lines you can connect up a 7 segment display using a few diodes. <S> The resistors are a few hundred ohms and are there to limit the LED current. <S> The circuit shown is for a common cathode display. <S> No need for (expensive) micro controllers just 16 small signal diodes and 4 resistors. <S> I would leave the g segment permanently powered to indicate the neutral position. <S> The alternative circuit <A> As a high-level overview, you'll need: A way to sense the current gear that the car is in. <S> This could easily be done by reading which of the 4 LEDs (or what combination of them) is lit. <S> A way to control the LEDs and 7segment. <S> The easiest way, for me at least, would be to build in a small Arduino or micro controller. <S> Lighting/reading one, two, three, or all 4 LEDs, along with displaying a number on the display, can easily be done with an Arduino and a BCD decoder (for the display). <S> You'll need at least 7-8 digital pins; four for the LEDs as inputs and at minimum three for the BCD decoder (the most significant bit of the BCD code can be tied to 0 if you are only displaying 0-7, but four would be standard). <S> And, of course, you'll need to tie it all together and hide it nicely in the dash. <S> Overall, I think this is a pretty neat project idea. <A> I see 2 simple solutions: 1) Get a PLD with 4 inputs and 7 or 8 outputs and program it to output the signals to light up the appropriate segments. <S> 2) Get yourself a small 8-bit PROM/ <S> EPROM/EEPROM and program locations 1, 2, 4, and 8 as above. <S> Note that this is contingent on the LED signals being strong enough to run the devices, but not too strong to destroy them; if not then you may have to buffer them with a transistor each to normalize them.
BTW you could just connect up the 4 outputs to the f (1), e (2), b(3) and c(4) segments to give you a mimic display of the gears (up, down, up across, across down). The nice part about Arduino is that it can handle 12V on the Vin pin, which simplifies setup.
I don't understand what are the difference between UNO and Leonardo? I found that they sell UNO Starter kits and Leonardo Starter kits . There are many different products. My eyes are so busy. I am a greenhand. If I want to buy a stater kit, which one should I buy? UNO or Leonardo? <Q> Let me make a proper writeup of comments. <S> Start by looking at the product page at the Arduino website: <S> Leonardo and Uno . <S> A practical difference is that the Uno has a chip that can easily be replaced when you manage to blow up one or more pin drivers. <S> I just found that the differences are the Microcontroller, Digital I/ <S> O Pins, Analog Input Pins and SRAM. <S> Except these, their function are the same? <S> – <S> Sue2013 34 mins ago <S> 2 <S> From an practical and average Arduino user perspective the pin functionality will be the same. <S> For the nitty gritty details refer to the datasheet ATmega32u4 for Leonardo and ATmega328 for UNO <S> Frankly, I heard a lot about UNO and seldom hear about Leonardo. <S> In this case, I am quite interested in it and want to know the difference. <S> Really thank you for your advice. <S> Nice~~~ – Sue2013 <S> 13 mins ago Leonardo is much younger than Uno <S> , that's why you hear more about Leo. <S> The blog also mentions a few nice Leonardo features: Simpler and cheaper hardware; <S> USB is integrated in main processor; Able to implement other protocols than serial UART (eg. act as mouse or keyboard); More analog inputs (12) and one more PWM pin than UNO; R3 header pinout: I2C is aways in the same place, regardless of the exact microcontroller on the board. <S> This makes R3 shields more universal. <S> The IOREF pin can inform a shield whether the Arduino is using a 3v3 or 5V micro. <S> R3 shields are more future proof. <A> The Leonardo is 20% cheaper which might be important if you have almost no money. <S> It has a few extra capabilities but lack of these are unlikely to hinder most beginners learning about Arduino and microprocessors. <S> See Uno vs Leonardo <S> The Uno uses a replaceable microprocessor where the Leonardo uses a fixed surface mount device (SMD). <S> If you damage the microprocessor you can replace it. <S> You can damage the microprocessor by connecting it's IO pins to the wrong voltage or allowing too much current to flow. <S> You can also have spare microprocessor chips with different programs loaded in each or use the Uno to load programs into microprocessor chips that you intend to use in home-built circuit boards. <A> The major difference between Uno and Leonardo is that Leonardo has an ATmega32u4 which has support for the USB, whereas the UNO has ATmega328 which doesn't have the USB support onboard. <S> So how this affects you and the cost: Since Leonardo has USB support onboard it doesn't require an external microcontroller for USB connection. <S> Whereas the UNO requires an additional microcontroller to provide the USB capability. <S> Cost wise Leonardo is cheaper than UNO by 20%. <S> So, go for Leonardo as it is low cost. <S> Then you can harness the USB capability of Leonardo if you want. <A> The Leonardo is a very nice board, but compatibility with shields can be a bit problematic, since the SPI pins are available exclusively from the ICSP header. <S> There are also other subtle differences.
For a beginner, the Uno might be a better choice, except if you either know you’re not planning to buy shields, or if you have plans for fancy USB projects.
Which way will I place a momentary Tactile switch in a solderless breadboard Well I am a beginner in electronics. So, I have some 4 pin tactile switches and I am confused about placing them in the breadboard. Here is the poorly drawn photo of the two ways of placing by me. Forgive me for such shitty kind of photo. So,when I place the switch in the way (A)(follow the image) , the switch is so loose . I am adding another image. So, In A type, When I connect one upper end to +ve of a battery , direct flow of current is seen on one lower end (IMAGE 2) but the other lower end doesn't flow current , only if I push the switch and hold it, the other end also flows current. now, go to type B. here, I am placing the tact switch horizontally (B), and connect any of the 2 left side pins to the +ve of battery , the other left side pin also gets charged , because of the vertical hole lines (vertical with respect to the images) of breadboard. so , if I connect that, the right side two ends both gets charged . even if I push the switch, still the right end pins get charged. I've seen many comples circuit tutorials on youtube where they used a tact switch and placed it in type (B) , and they pushed the switch once but did not hold it, and the current started to flow. they pushed the switch again , and the circuit broke , How can I properly use a tact switch as a proper switch by placing it in type (B) and I want to use it a a proper on-off switch . Please help. If there are mistakes in my description , then you are welcome to re-edit it or comment. Please do help. I know that I dont know much of the electronics terms and I just started everything as beginner. Please help. <Q> Perhaps this drawing will help. <S> As you can see on the right hand part of the part of the diagram pins 1 and 2 are connected together. <S> Pins 3 and 4 are connected together and the switch action is between these pairs of pins. <S> These correspond to pins (1,2) and (3,4) in the diagram. <S> To get a switch action you need to connect one side of your circuit to pins 1,2 and the other side to pins 3,4. <S> Of course you do not have to connect both pins on each side of the switch. <S> It will work by connecting 1 and 3 or 2 and 3 etc. <S> a data sheet can be found here http://www.omron.com/ecb/products/pdf/en-b3s.pdf <A> It looks like you have one of these: <S> All of the ones I've used have been SPST switches with the 2 legs that point toward each other connected together in electrically identical pairs; the switching is done from pair to pair. <S> In your B diagram, the switch is just acting as a jumper between the pads, as you noticed. <S> In A , the lower right pin should always at +Ve; the 2 left pins would be at <S> + <S> Ve when the button is pushed, and floating otherwise. <S> These switches were designed for printed circuit boards, not solderless breadboards, but they'll work OK if you straighten the pins a little bit. <A> One suggestion is to get an Omron B3F-6000 series (I ordered the Omron B3F-6022, Mouser has 'em) or equivalent switch instead of the four-legged types you are currently using. <S> As the drawing below indicates -- these switches have two pins, on a 5mm spacing, which makes them almost ideal for breadboarding. <S> Simply clip them from the tape with a pair of side-cutters and stick them in as you would any other two-legged component.
Using a multimeter set to low ohms (resistance) you should find that the two sets of pins that are short circuit.
Voltage source connected to single inifinitely long wire I have in my mind a thought experiment which I cannot figure out. Imagine a voltage source working on let's say 1 GHz. One end is connected to a ground, which is very small (we can abstractly assume it is just a point in space) and keeps constant voltage, 0V. The other end is connected to infinitely long single wire. I wonder how different parameters like input impedance, radiation, voltage and current propagation are gonna look like. If there were two paralell wires, there would be an electromagnetic wave travelling between them, no mistery about that. Is there gonna be any propagation in a single wire case? If yes, I would be pretty sure that it would include a lot of radiation and, at some point, all the energy would be radiated off. The question is, how far can the signal go? Also, I'm wondering what would be input impedance in such a case? It would have to be resistive if radiation occurs, am I right? I'm getting really mixed up about this because I know that propagation over a single wire is impossible. Is it really? Or is it impossible because of radiation? What I mean is that maybe (that's what I don't understand) voltage can propagate over a single wire but at some point it would radiate all the energy off so effectively, propagation over single wire can be regarded as "impossible", because we have very strong limitation - radiation. I get even more confused when I think about it from the perspective of Maxwell equations. I know that close to the source, there would be E vector between two ends of a source. How would E vector look if the voltage propagated over a single wire far away (like 1 km)? I hope some of you could clear things up for me :) <Q> That's simple: 376.73031 ohms (approximately). <S> To put it differently, a single wire (no ground wire or shield) of infinite length will appear as a 376-ish ohm load to whatever is driving the signal down that wire. <S> This assumes that the copper in the wire has a 0 ohm resistance. <S> Here is the Wikipedial page for Impedance of Free Space . <A> Remember, "ground" is not an absolute reference, it's just whatever circuit node you choose to measure your voltages against. <S> Your infintesimal "ground point" cannot pass any current, and therefore, <S> neither can your voltage source. <S> More importantly, no current will flow into or out of your (semi-)infinite wire. <S> With respect to everything else in the universe, the long wire will keep the same voltage at all times; while the 1 GHz voltage source is madly wiggling your "ground point" up and down to no effect. <S> One way to think of it is to realize that your long wire has an infinite amount of capacitance to the rest of the universe, while your ground point has none. <A> It's a weird thing but everything has capacitance. <S> Even if you have a single point in an ideal empty space that point will have a capacitance that is equivalent to the electric field lines terminating at infinity. <S> It's just that this capacitance is so very small that it is swamped by the relative coupling capacitance to other equipotentials in normal scenarios. <S> So in this case (as Dave Tweed said) your wire will have infinite capacitance, your "ground" will be wiggling up and down ... <S> but it will have a small effect. <A> The voltage along the wire will be described in both time and space by cable theory, first applied by Lord Kelvin to model decay in underwater cables. <S> Today, the most common application is in biophysics. <S> See http://en.m.wikipedia.org/wiki/Cable_theory
What you are really getting at is: "What is the impedance of a wire in free space".
A very small microcontroller that can be programmed wirelessly For fun, I'm building a microcontroller and a couple of sensors into a toy. The microcontroller must fit into a 2 cm wide cylinder. Also, removing it from the toy takes some time, so I'd like to be able to program it wirelessly. It doesn't matter how (IR, wifi, Bluetooth), as long as I don't have to remove it from the toy during testing. I don't have much experience with these things, and so I don't know what to search for or if such a microcontroller even exists. What would you suggest? <Q> That is going to be very difficult. <S> The typical way to do this is to have two MCU's. <S> One with a wireless connection that can program the other MCU's. <S> The programming MCU would require some firmware in it that can receive the wireless communications and twiddle the pins on the main MCU to program it. <S> You also have to power this circuit, which will put a burden on your toy's batteries. <S> This is a big project to make one MCU program the other, and the number of people who would benefit from this (a.k.a. pay money for it) is small. <S> That's why you don't see this in the market. <S> While cool, the market for it isn't large enough to justify the development costs. <S> If I were you, I would instead focus on a way to make the programming signals accessible without removing the PCB from the toy. <S> There are many ways to do this using fancy connectors or even just spring loaded "contacts" that touch metal bits on the toy. <S> Sometimes the straightforward approach is the best. <S> Skip the wireless. <A> It's not going to be easy as Mr Kessner says but if you are going to try here is a texas instruments device that probably will do what you want. <S> The blurb says: - The SmartRF Flash Programmer can be used to program the flash memory in Texas Instruments low-power RF system-on-chip devices and for upgrading the firmware and bootloader on the related evaluation boards and debugger (SmartRF Evaluation Boards, CC Debugger, etc.). <S> SmartRF <S> Flash Programmer can also be used for programming the flash memory of MSP430 devices via the MSP-FET430UIF and the eZ430 dongle . <S> The bit in bold implies that if you chose the MSP430 MCU you'll be able to programme it via rf. <S> Good luck, not for the faint-hearted. <S> BTW I googled "msp430 rf bootloader" for the information. <A> There's a new version of the arduino in development Called pinnochio. <S> It will support wireless programming, and the mcu they use <S> comes even in 9 <S> *9mm packages. <A> Here's someone who created a circuit that programs an mcu via an opto-coupler. <S> https://forum.arduino.cc/index.php?topic=495706.0 <S> With some luck , it wouldn't be too hard.
Since an opto-coupler is just a led and a light sensor, if you use a clear plastic cylinder, you could put the sensor on the inside of the cylinder and the led on your external programmer , and make it work.
Lower voltage and stay energy efficient My circuit need to be plugged into a normal (canadian) 120V outlet.But everything on it is made to run 5V. I'm very beginner, so yet, I'm thinking of adding a bunch of resistance, but I feel that it would be a terrible way to proceed ... if it would work, a lot of power would be dissipated in heat. How do you proceed to lower voltage from 120V to 5V ? Thanks ! <Q> Lots of things run on 5V these days; any charger that has a USB connection (and a lot that don't). <S> If you look at the fine print on the charger, it will tell you the voltage and the amperage, and you can use that to figure out whether it will work for you. <A> Use a transformer to efficiently reduce your 120 V a.c. from the wall outlet to something like 9 V a.c. <S> Add a bridge rectifier to convert the 9 V a.c. to pulsing d.c., <S> and then a capacitor to smooth the d.c. <S> Finally, add a linear regulator, like a 7805 to give you a nice steady 5 V power supply. <A> This will offer less heat build up and much better efficiency than even trying to use a 60Hz stepdown transformer with bridge rectifiers and a linear regulator. <S> Since attaching circuits to the AC line represents a huge safety hazard it may be best to acquire a ready made 5V output switcher type wall wart. <S> These days these are readily available. <S> You could even re-duty one from a powered USB hub or some other USB charger device. <S> These will offer current capability of 2 or 2.5A.
For best efficiency use an isolated switcher module to convert the AC voltage to your 5V DC requirement.
10V from USB port I want to connect a loading cell to the computer via USB port.The recommended excitation voltage of the load cell is 10V, and USB output is 5V. The current through the load cell is about 20mA at 10V. Is it safe to just make serial connection of 2 USB ports to get in sum 10V from them? I suppose that it would draw 40 mA at 5V from each USB port which is far below maximum USB specification of 500mA. If not, maybe there is some very simple electrical scheme to convert 5V DC to 10V DC so that it can be connected to a single port? <Q> You cannot connect two USB ports in series to obtain a higher supply voltage. <S> This means you'll short the power supply and if you are lucky <S> you PC will restart fine after removing the short circuit. <S> These are available from many webshops/ebay for couple <S> Dollars/Euro's and do exactly what you want: <S> input voltage eg. <S> 5V and output voltage <S> most of the time adjustable. <S> Here is a random <S> example of what I mean. <A> For doubling a positive voltage, i.e. the 5 Volt nominal supply from a USB port, the Maxim MAX660 <S> switched capacitor voltage converter lends itself well to the task. <S> The MAX660 is a higher current equivalent of the venerable ICL7660. <S> The output will track at almost precisely twice the input voltage. <S> So, for an input of 4.85 Volts, which is what I am measuring on my USB port right now, the output is around 2 <S> x 4.85 = 9.7 Volts : Not exactly 10 Volts, but close enough for government work, so to speak. <S> The MAX660 can output up to 100 mA, with efficiency approaching 90% in theory with carefully selected components. <S> For 20 mA through a resistor, I measure the device drawing around 52 mA from my USB port on a breadboard implemented circuit. <S> With a proper soldered circuit, even lower current draw i.e. higher efficiency should not be surprising. <S> As the internal oscillator operates at 10 KHz in the positive voltage doubler mode (see Application Information section of linked datasheet), the very small ripple would be an issue only for high frequency work - <S> presumably the load cell will be sampled at significantly less than 10 KHz, so there is no cause for concern. <S> Unfortunately in this mode, the device cannot be forced into its 80 KHs internal oscillator mode, else even that ripple would disappear from consideration. <A> Another alternative is to ask what the consequences of running the load cell off 5V would be?As <S> I understand it, they are approximately resistive bridges, and a basic load cell should happily work off a lower voltage. <S> The output signal would be halved : you can make that up by increasing the gain of the amplifier it feeds. <S> Unless you need the lowest noise performance this may be a better option than adding a boost convertor. <A> The power sources of the two USB ports are linked together. <S> When you connect the negative pole of the one to the positive pole of the other, you're short-circuiting your USB ports. <S> That's not healthy for your computer. <S> What you need is a DC/DC converter. <S> It will consume some more current (so you won't get 100% efficiency), but not too much for the port. <A> look at this 1.IC555 based voltage doubler <S> 2.TI app note using NE555 <S> In the 1st reference, IC555 is wired as an astable multivibrator with a frequency of 4.5KHZ and duty cycle of 53%. <S> The output of IC is connected with the diode,capacitor charge pump so it will increase the output voltage.
You will short out the PC's power supply and although USB is specified with protection for a similar situation, many motherboards do not implement that. As an alternative look for a step up / buck / boost converter.
How to reverse rotation direction of stepper motor Is it possible to reverse a stepper motor's direction of rotation by changing the polarities of its wires? I'm asking because I have two stepper motors connected to one single driver and mounted on one axle, and I would like to spin the axle from both sides so one motor would have to spin clockwise and the other one counterclockwise. <Q> (Your bipolar 4 wire motor?) <S> Current through 1a, 1b coils will turn the rotor so it is aligned as shown above. <S> Turn on the current (in the appropriate direction) <S> the rotor turns clockwise (half step) between 1a, 2a. <S> Turn off the current to 1a, 1b and the rotor turns clockwise (another half step) to align with 2a, 2b. <S> Reversing the direction of the current in the coils produces motion in the same direction. <S> To change direction you need to reverse the current in one set of coils only. <S> At the moment the two motors are connected in parallel and turn in the same direction. <S> Swap ONE of the coil pairs over and you should be able to get the two motors turn in the opposite direction with the same drive signal. <A> Here's a timing diagram of a stepper motor: <S> As you can see, you have to do the following for one step: <S> Both clock lines are default high <S> Bring <S> CLK A low Bring CLK B low <S> Bring <S> CLK A high Bring CLK B high <S> When you want to step the other way around, you have to do this: <S> Both clock lines are default high <S> Bring CLK <S> B <S> low Bring CLK <S> A <S> low Bring CLK B high <S> Bring CLK A high <S> Therefore, you can just swap the clock lines. <S> You can also invert the polarity of the lines (high <= <S> > <S> low). <S> Unfortunately, I can't see anything specific to your setup because you didn't give specific information. <S> Also see this website for more information. <A> Short answer: <A> You can also connect the A coil of one motor to the B coil of the other and vice versa. <S> You'd connect: DriverA-Motor1CoilA-Motor2CoilB-DriverĀDriverB-Motor1CoilB-Motor2CoilA-DriverB̄
Yes, just reverse the connections to one winding and the motor will go the other way.
Fastest way to toggle a bit in ASM What's the fastest way to toggle a bit 1 in MPASM for the 14-bit enhanced instruction set? (I'm working with a PIC16F1829) The code has to be standalone - I mean that it can be called on any moment, without knowing the value of the bit on that moment. Key criteria is speed here: a program with fewer instruction cycles is better. The number of instructions cycles is calculated as the number when the bit is 0 + the number when the bit is 1, divided by 2. 1: with toggle I mean that the code has to be similar to pin=!pin in C <Q> You could try the following using an XOR: movlw 0x01 ; move 0x01 to W registerxorwf lat, F ; XOR W with port & store result in port latch <S> An exclusive OR operation will preserve the values in bits where the bits in the working register are set to zero and invert the values where it is set. <S> So you could also use the same technique to toggle multiple bits. <A> I came up with this: ; Cycles if 1 | Cycles if 0btfss port, pin ; skip next instruction if 1 1 | 1goto $+3 ; pin=0, goto PC+3 <S> 1 | 2bcf port, pin ; pin=1, clear pin and... <S> 1 <S> | goto <S> $+2 ; <S> ...proceed program <S> 2 |bsf port, pin ; pin=0, set pin and proceed program | 1 +; ... ---------------------------; 5 4 <S> This takes 4 or 5 instructions cycles. <S> Is something faster possible? <A> What's the fastest way to toggle a bit1 in MPASM for the 14-bit enhanced instruction set? <S> (I'm working with a PIC16F1829) <S> The code has to be standalone - <S> I mean that it can be called on any moment, without knowing the value of the bit on that moment. <S> Key criteria is speed here: a program with fewer instruction cycles is better. <S> The number of instructions cycles is calculated as the number when the bit is 0 + the number when the bit is 1, divided by 2. <S> 1 <S> : with toggle I mean that the code has to be similar to pin=!pin in C <S> I have assumed that the bit you want toggle is part of a register that has "don't cares" in the other bits and therefore swap nibbles would work. <S> You never said it couldn't work like this and if you are so short of registers that you need the other bits <S> then a code rewrite or MCU upgrade is recommended. <S> It's a one cycle operation and doesn't need 1 in the w register setting up. <S> Of course, in the rest of the programme you'd have to adhere to this method of changing the bit <S> BUT again, you haven't said that you can't - in other words BCF or BSF instructions are outlawed. <S> I thought about rotates but they rotate thru carry and this would probably corrupt stuff <S> - I haven't written PIC code in over 20 years so forgiveness ought to be at the forefront of your mind when down-voting!!! <A> If you want to invert a PIN, you have to load the state of the pin, so you will have to select the bank for PORTA first. <S> So here's the code in C: // PORTAbits. <S> RA5=~PORTAbits. <S> RA5;PORTA= <S> PORTA <S> ^ 0b00100000 <S> ; with the result in ASM : <S> MOVLB 0x0 <S> MOVF PORTA, W XORLW <S> 0x20 <S> MOVWF PORTA
You'd need to setup 11110000 (any pattern would do providing bn does not equal bn+4) initially but after that every time you want to invert one of the bits you use: - swapf f,d
How do I decide the bandwidth of a driver through 'input transition rise and fall rate'? I am carrying out a design with a driver:74LVC1G125 datasheet of 74LVC1G125 . Signal that will go through this driver is about 600khz so I have to know the bandwaidth of 74LVC1G125. I have read the datasheet and I can not find anything about bandwidth but an unknown parameter:input transition rise and fall rate. I think it must has something to do with the bandwidth of 74LVC1G125 and I find a description about it input transition rise and fall rate .Unluckily, it makes me more confused that this parameter is about the amount of ground current. So can anyone give suggestions about bandwidth of this driver? <Q> Bandwidth isn't the term your looking for, you want to know what the maximum operating frequency or switching rate is. <S> Look to table 11 snipped here. <S> I'd use max numbers, so at 5.0 V and room temp you can run that at 4.0 ns + 4.0 ns = 8.0 ns which is 125 MHz. <S> The IC will run that fast <S> but it may not be useful for you unless you can make sure that you can handle the variable delay in subsequent circuits. <A> Firstly, your table is telling you that the recommended rise/fall rates for inputs to the device are 10ns <S> /Volt - it is saying to you, that for a 5V supply, do not feed inputs to the device that are slower than 50ns. <S> OK slower inputs won't damage the chip but the recommended condtions are what they are <S> - it's a manufacturer's get-out clause in a way. <S> You need to be looking at table 11 - dynamic characteristics/propagation delay <S> This tells you that on a 5V supply an input change will take typically 1.7ns to get to the output. <S> Figure 8 shows a picture and note that on this device Tpd = <S> Tphl = <S> Tplh <S> so it is symettrical. <S> I guess this just about <S> means you could get a 250MHz clock through it <S> - it won't be pretty but <S> it'll get through. <S> Designing with typical values is a risky business and better to use maximum values. <S> EDIT <S> - your 2nd link is also telling you about the input rise/fall rates - too slow a rise or fall on the input will cause larger-than-normal earth currents that can cause a glitch in the output and this can ultimately cause multiple glitches. <S> Ensure your 600kHz signal has rise/fall rates below this value to prevent unpredictable results. <A> Notice that the input transition rise and fall times are maximums , not minimums. <S> These indicate the slowest rise and fall times you should provide at the inputs. <S> Slower edges might cause the output to chatter as the input voltage passes between the valid input high and low levels. <S> Even taking the worst case scenario, a 1.65 V Vcc at 125 C, the propogation delay is 10.5 ns. <S> For a full cycle of a periodic signal you'd need 21 ns, meaning this chip can handle signals into the 10's of MHz. <S> At 600 kHz you'll have no problem at all.
To find the maximum data rate the device can handle, you need to look at the propagation delay specs:
Three Phase Input to Single Phase Output We have three phase input and the voltages in the three input is not the same always. Sometimes, one or two or three phase will be off. I would like to connect the phase to output which lies within the range (110 - 290). Below will be the example, Phase 1 (290v), Phase 2 (245v), Phase 3 (190v) I need to select Phase 1 in this case.Ampere rating would be 40A on the selected output. Did searched in google for single device (circuit / IC) which can does this, not finding one. Any direction would be helpful. Voltage Reference: (Added) Voltage reference is to the neutral line.It would be a 4-wire input to 2 wire output with a common neutral line. Circuit Thoughts: Thought 1: http://www.cy-sensors.com/CYVS14-xnS3.pdf Compare the voltage on each phase with a voltage comparator, connect the output with a solid state SSR in the output. I would need a power supply now that can input from magic three phases and generate DC output. Not finding the right one. Will that work? Thought 2: This seem to be a cheaper and reliable solution, without inductive circuits.Please suggest if I have missed something to consider. SMPS - Switch Mode Power Supply (5V). Thought 3: This is the cheapest solution, if the input voltage is constant. With the varying voltage, the coil does not seem to take a varying voltage. (100-300V).Help from https://electronics.stackexchange.com/a/71066/24465 . Thanks to the community. If you think something can be improved, please share your thoughts. <Q> Conceptually this is an easy problem, the reality is that you are dealing with relatively large load currents (40 A) and several 10's of KW. <S> This all combines to very large components, with relay like switch gear, switching between phases which will cause glitches and drop outs just through the switching action. <S> Also, I suspect that is a very dynamic situation, and having relay contacts hammering away at the phases are dynamically changing will wear them out very quickly. <S> Any way you look at it this is not a trivial problem to solve. <S> The one solution I can think of that will provide the smoothest transition between phases is to duplicate a non-bypass type UPS (Uninterruptible Power supply). <S> This would comprise of a 3 input full wave bridge rectifiers that are generating high voltage ripple DC, the AC input with the highest voltage automatically contributes the most. <S> And then you run an inverter that generates a stable 220 V AC @ <S> 40 A from that HV DC rail. <S> Designing and building such an inverter is not a trivial task, but perhaps you can buy such a unit. <S> 2:1 step down ratio, 3 bridge rectifiers that generate your HV DC rail at ~ 110 V DC ripple that then is fed to your inverter which boosts it to 220 AC. <S> But this is even a harder design at these high power levels. <S> It is entirely possible that one of these stabilizer units that you linked to could possibly fill in as your inverter. <S> But it very much depends upon how they are designed. <A> Not sure about the English terminology, but this is what I mean: <S> In a graphical representation of a three phase system, the three phases can be viewed as the corners of a triangle. <S> When the load on all three phases is identical, null will be exactly in the middle of the triangle with equal voltages to each phase 230V in the image above. <S> However when the load differs per phase, the null will shift away from the middle and the voltage measured will be different per phase. <S> In above example, in ideal situation you measure 230V between any phase and null. <S> In worst case the voltage between a single phase and null may rise to up to 380V. <S> Cause is a not properly connected null wire. <S> As voltages may rise to 1.4 times the rated value you really want to get it fixed. <S> Either properly connect null to the grid or maka an equal distribution of the loads over the phases. <S> In Dutch it is called "zwevend nulpunt", but I'm unsure about correct English terminology. <A> This seem to be good and cheap solution for the problem. <S> This seem to be a cheaper and reliable solution, without inductive circuits. <S> Please suggest if I have missed something to consider. <S> SMPS - Switch Mode Power Supply (5V).
Because of the wildly fluctuating inputs (from 110 - 290 V) it might be better to have 3 transformers @
Arduino incorrect readings from analog pin One of my analog pins, A0, on my Arduino Uno, is not giving totally accurate results. Where as one of the other pins will do a full 0-1023 in a certain use case, the problem pin only seems to be outputting around 50-730. Is this pin getting interference somehow, or is it perhaps defective? <Q> I was running into the same issue, I tried reading voltage input on A0 and A1 (just to see if A0 was bad) and I was getting values higher than expected. <S> 3.6 instead of 3.4 <S> so the line voltage = <S> sensorValue <S> * (5.0 / 1023.0); wasn't outputting the correct value <S> My Arduino mega 2560 was being powered by rasberry pi via USB Solution: <S> Supply your arduino board with regulated dc input and don't rely on USB power for your 5v or 3.3v boards. <A> The chip is defective I would say. <S> All analogue input pins tied together produces consistent results except for A0. <S> The chips gets warm when focussing on reading A0 - <S> this could be an over/under voltage on the input but this has been ruled-out by the previous test. <S> This could have happened through a static discharge or it could be a random failure - these things are very rare in my experience but they will happen once in a while for someone. <S> If previously that pin was used as an output (I'm not too familiar with Arduinos) <S> maybe it got over-stressed somehow. <S> Being that it is A0 (and not A1, 2, 3 etc) that has failed makes me suspect a previous incarnation of its use but <S> this is also a long shot. <S> Buy a new one I think is the best advice or live with the defective pin if you can avoid using it. <S> If it also doubles up as a digital output maybe you can test to see if that side of things still works? <A> The problem may be with your specific Arduino Uno board, not the microcontroller. <S> With the power off, check the resistance between the A0 pin and GND pin, and A0 and Vcc pin, respectively. <S> The heating up of the board, and the lower-than-expected readings, lead to a possible conclusion of a short of some sort. <A> I had some thing similar. <S> One analogue input was showing a constantly odd value compared to the other three analogue inputs i was using. <S> All resistance measurements where ok. <S> I used a trim resistor (slider) applying the ATmega2560 reference voltage to the ADC inputs. <S> No idea why but this only worked on 3 of the 4 ADCs. <S> I then used the 5V supply at the slider and - surprise - all readings where as expected. <S> I have no idea what went wrong there. <S> I will read the spec of the Vref - but might not find this page thereafter... <S> just in case... <A> I had a problem with the arduino uno where the A/D raw value would only go to 1022. <S> The board was powered by the USB. <S> When I switched to en external power supply set to 6V it fixed the problem. <A> Decoupling capacitor will fix it for you. <S> Place one across + and - rails on the breadboard before pins that you use for powering the joystick. <S> Mind the polarity so you don't give yourself a booboo. <S> 100uF usually does the trick and the trick is that it smooths out voltage spikes, ergo your joystick will spit back readings based on the normalized voltage. <S> simulate this circuit – <S> Schematic created using CircuitLab
If either appears to be a short or (more likely) a low resistance, examine the A0 trace with a magnifier or microscope for a solder short somewhere.
Software to translate code description to PCB design? Is there an application available that allows you to define each component and it's connections in a circuit (kind of like Entity Relationship Diagrams in database design), and have the application generate the most logical use of space on a PCB for you? <Q> No, not really. <S> What you are asking for is called auto-placement , which largely doesn't exist, and works poorly when it does. <S> This is one of those problems where the human brain is still better than software. <S> Determining layout is a complex issue with a very large solution space, and as such hasn't yet yielded to anything more than toy software implementations. <S> However, most of the rest of going from a schematic to a PC board can be automated or at least largely assisted by commonly available software. <S> Even for layout where the human makes the decisions, the software can make sure some basic rules are met. <S> Once you have a layout, which defines where what parts go on the board, then the next step is routing . <S> That refers to figuring out where all those copper tracks go that form the connections between the parts. <S> Even that isn't to the point where you can fire and forget, but such software can take care of a lot of the details for you. <S> Usually routing is a iterative process between you manually adjusting a few things, then letting the software do the grunt job of routing the things that are less critical. <S> Sometimes the software can't find a solution, or you don't like what it did. <S> You then move a few things around, manually route some traces, set some constraints, and let the software try again. <S> Anything that calls itself a E-CAD <S> (Electrical Computer Aided Design) package will have schematic capture and routing capability. <S> Some will additionally have auto-routing capabilitiy or at least the option to add it. <S> Examples of such E-CAD software are Eagle, Altium, and quite a few others. <A> As mentioned in the previous answers, this is basically the function of Electronic Design Automation (EDA) or Computer Aided Design (CAD) tools. <S> The process of entering the connections between the components is known as schematic capture . <S> Nowadays its normally done graphically rather than textually (as in traditional SPICE). <S> The schematic may be annotated with additional indicators to show, for example, which wires must cary high currents, which wires should be layed out with controlled impedanc, or which ones must be length-matched to each other. <S> The EDA tool then converts the graphical schematic to a netlist file, which might be a plain text file or might be some kind of binary. <S> The netlist is imported into a layout design tool. <S> In order to improve autorouting, the user has to carefully program <S> constraints <S> that indicate the design rules the tool should follow in placing the components and routing the wires between them. <S> Managing these constraints to get the best results is the main skill needed to use the autoplacer and autorouter effectively, and it can be very time consuming. <S> In my experience, like others indicated, I get better results by doing manual placing and routing, possibly with some tool assistance. <S> For example, I do most of the routing manually but use the tool to route multiple lines in parallel after I lay out just one of the lines. <S> Or use the tool to add zig-zags to a line to make it length-matched to another line. <A> The O.P. basically describes an EDA software package. <S> The part tasked with automatically creating a layout from schematic is called PCB autorouter . <S> But be aware that the layouts generated by autorouters are rarely most logical. <S> A lot of professional PCB designers don't use autorouters. <A> The database you describe sounds a lot like the SPICE model that sits underneath almost all electronics simulation / CAD software in some way or another. <S> The old command-line SPICE stuff is, I'm fairly sure, available free & open-source. <S> Translating from that model to a PCB layout ( in theory ) should be a matter of finding a PCB-CAD package & importing the database in the correct format, then telling it to auto-route the PCB. <S> In practice you probably need a fair bit of background work to tie the simulation to specific components, footprints, etc. <S> However, Auto-route is about the worst way to lay out a PCB and is likely to result in a non-space-efficient and inelegant layout using more tracks, layers, vias, or links than you need. <S> Autoroute will work for very basic stuff, but then you may as well lay those out by hand for all the time it saves you. <S> For anything more complex it will throw its hands up and leave the rest to you, having made a rats nest of the first half for you to untangle.
For this step, auto-router software is available and can be useful. Such software does exist: Cadsoft EAGLE, OrCAD, KiCAD, Altium, to name a few.
DC Motor Efficiency at Fixed Torque I am in a muddle here, so thanks for making the effort to have a read. I understand that electrical power going into motor is given by:\$P_e=I^2R\$ I understand that mechanical power out is given by: \$P_m=\tau\cdot\omega\$ Where \$\tau\$ = Torque at motor output shaft Where \$\omega\$ = Speed at output shaft I understand that for a DC motor, torque is proportial to current:\$\tau=k_E\cdot I\$ Therefore if current is proportional to voltage via resistance, and electrical power in is proportional to current, power is proportional to current. Then imagine that a motor is reacting a fixed torque value, and the supply voltage is increased to raise the output speed. A fixed torque and a rising speed means a rising output power. However input power is fixed, since torque is fixed because current is fixed. Graphing this (x-supply voltage, y-Power) gets you a flat line for electrical power in and an angled line for mechanical power out. Therefore the lines must intersect and therefore on one side of the intersection point, output power must be greater then input power, which is impossible. I am clearly overlooking something so any pointers would be greatly appreciated.Cheers now, all the best. <Q> Now let's run the motor at current I. <S> The V required is not IR. <S> (If it is, the motor is stalled so that the back EMF = 0.) <S> Instead, V = IR + back-EMF. <S> Now, I * back-EMF is the electrical power delivered to the load as mechanical power, and I <S> * IR is the power wasted in the motor as heat. <S> Let's increase V and increase speed keeping I constant. <S> Now, input power has increased (IV) but the motor's resistance hasn't changed : therefore IR is the same and I*IR is the same. <S> But what HAS changed is the back-EMF - obviously, since it is proportional to speed (which has increased). <S> So the power dissipated in the motor as heat is constant; but the electrical power delivered to the load (I * back-EMF) has increased, exactly as the mechanical output power (torque * speed) has. <S> No magic, and it all adds up correctly. <S> But what IS interesting is that the efficiency has increased because the wasted power is constant but the useful power has increased. <S> So a general rule is that electrical efficiency is higher in a lightly loaded motor running fast, than a heavily loaded motor running slow and drawing high current. <S> (There are limits to this : the less you load a motor and <S> the faster you run it, the higher a proportion of power lost to friction in bearings and especially brushes. <S> Bearings (ballraces) are easy : brushes are not, so brushless motors have a big advantage at high speed and high efficiency) <A> The input power to a motor (any motor, not just DC) is always the voltage at the lead wires times the current into the motor (not I 2 R). <S> The output power is, as you said, always speed times torque. <S> The difference between the input power and the output power will always be greater than zero and is referred to as the losses. <S> I 2 R losses will generally cause most of a losses but there are also core losses (eddy current and hysteresis), friction/windage losses, and stray load losses. <S> Many of these losses are dependent on speed (for example, core losses are dependent on the frequency of the magnetic switching in the iron), so even if torque stays constant, it doesn't mean that efficiency will remain constant as speed increases/decreases. <S> As others mentioned, a DC motor can be modeled electrically as V = IR + Vemf, where Vemf is the back-emf, which is proportional to the speed of the motor. <S> At high speed, V and Vemf are (almost) equal and there for little current flows. <S> At zero speed, you have maximum current flow. <S> If the load torque is constant but the speed is variable, then current flow will be roughly constant with slight changes due to different losses at different speeds and temperatures. <A> Ok. <S> Sorry to drag this out <S> but I really want to get to the bottom of it. <S> On their website, national instruments claims that electrical power supplied to the armature of a DC motor is given by: <S> \$P_e= <S> V_b\times <S> I\$ <S> Where: \$V_b = Supply~ <S> Voltage ~(V)\$ http://zone.ni.com/devzone/cda/ph/p/id/46 <S> I would assume this was a reliable source - and so answers my question. <S> However it still makes no sense to me that you would use the supply voltage in this calculation. <S> Unless the motor is stalled, the supply voltage does not describe the real potential difference across the motor terminals. <S> It therefore does not drive the current which is also used in the calculation. <S> If anyone could shed some light on this I would be really grateful. <S> Thanks.
Some of your basic premise is correct : torque is proportional to current, and power DISSIPATED IN THE MOTOR ITSELF is a constant I^2*R, where R is the (constant) DC resistance of the motor, as measured across its terminals with the motor stationary.
Suggestions for solar / LiPo powered 3.3v supply for Arduino I am building several slightly-differently-purposed Arduino + Xbee systems to monitor various things around my home and property. Some of these are line powered, while others must use solar. Many LiPo solar + DC chargers exist, but most output 5 VDC. I'm hoping to find one that puts out 3.3 VDC, directly rather than having to then use an on-board linear regulator, and waste that power. Of course, with the addition of a large enough cell, a drop from (say) 4v to 3.3v is unlikely to waste much heat. I believe I need about 250 mA to be safe, but for very short bursts. When the Arduino is sleeping along with the Xbee, I cannot even measure its current draw with the three meters I have on hand. The majority of the current draw comes from the Xbee's transmit power requirements of up to 205 mA. The Arduino itself should be fairly constant, so with the 8 MHz clock running and a nominal 3.3 V supply, it looks like the Arduino will draw under 10 mA. My ideal system would have connections for a solar source input, a DC input (or USB) and have indicators I can read the status of, to have the Arduino report on its own power supply state. I am assuming a single cell LiPo here, or a package with internal cell balancing. Also assume I am doing all the smart stuff (powering down the unused components on the Arduino, setting the clock speed to its lowest setting, sleeping and waking only when there is something interesting to do, and sleeping the Xbee unless there is something to transmit.) I can calculate the power requirements and size the solar / LiPo properly. <Q> So to confirm - you want a LiPo charger + a buck-boost regulator to 3.3V (primarily cause you want to be power efficient). <S> So you have a ton of options. <S> I personally use the TPS63031DSKT in one of my designs, and I'm using the exact same schematic as in the first page of the datasheet ( http://www.ti.com/lit/ds/symlink/tps63031.pdf ). <S> The efficiency curve is great for the Iout range you are expecting. <S> However, if you are starting from scratch, I'd look for a PMIC that combines the two like the LTC3558 from Linear ( http://www.linear.com/product/LTC3558 ). <S> That will really help cut down on board space, and cost. <S> Really great chip - all its missing is a battery gauge. <S> I know that MAXIM makes similar PMICs <S> but I can't find it right now. <A> You can use lipo directly with the 3.3V pin of the arduino, no regulator, the ATMEGA328 can run with 2.7 to 5.5 V at 8 MHz. <A> Adafruit may have what you need and then some. <S> Here is the link <S> https://www.adafruit.com/product/390 <S> Actually no scratch that it has exactly what you need. <S> Both DC Jack and Micro-USB connections <A>
If you want to go with the Microchip battery charger that comes with the Sparkfun breakouts ( https://www.sparkfun.com/products/10217 ) or Adafruit breakouts (), there are a ton of buck-boost regulators you can put in the next stage. If all your chips can take 3.0-4.2V safely you can just get away without a regulator and power your project directly with a LiPo.
Is it possible to measure constant velocity using accelerometer/Gyro I have a board that has a gyro and a 3-axis mems accelerometer. Is it possible to measure constant velocity using accelerometer/Gyro. I find velocity by integrating (summing) acceleration over time. Now if the body is moving with constant velocity, acceleration will be zero, and so velocity will come out 0 (falsely, since it might be some other constant also). What do I do, what is the alternate method I can use? <Q> Integration of an acceleration is not a velocity alone, but velocity due to acceleration over time, plus the constant initial velocity. <S> Therefore the rationale of integrating acceleration to determine velocity is invalid, unless the initial velocity is provable to be zero. <A> Accurately? <S> No, not without some sort of aiding from other sensors. <S> Consider the case of white noise on the sensor. <S> Integrating (acceleration + noise) will result in not only velocity, but a Random Walk which will forever grow with time. <S> That's before we consider bias, non-linear effects, bandwidth and everything else that affects "real" accelerometers. <S> Furthermore, unless the accelerometer is held in exactly the same orientation, then you'll get errors too unless you precisely know your angular orientation. <S> That's before we consider the earth's rotation! <S> There's good reasons why Inertial Navigation Systems cost hundreds of thousands of dollars - because it's so hard to make it precise. <S> You'll find it much easier to find another sensor. <A> Also, the gyro has nothing to do with translational acceleration. <S> If you were talking about angular velocities, however, the gyro will give you a good readout of constant angular velocity.
The answer: No, an accelerometer, or a gyroscope, can not be used to determine constant velocity, without some additional sensor, or baseline data i.e. initial velocity.
Regulate brightness over video composite signal I have a b/w camera that outputs a video composite signal. At night it works very well, but during the day it's so bright everything just turns white. Is it possible to add a potentiometer to be able to dim the brightness? If so, what resistance value should I use and how should I connect it, in series with the video signal or a to-ground from video signal setup? <Q> Your camera's sensor is probably saturating in daylight so attenuating the video signal would just mean that everything looks grey rather than white. <S> The only cure is to use a lens fitted with an iris to reduce the amount of light entering the lens. <S> Better still, fit an automatic iris lens which uses the video signal to adjust the iris aperture to keep the video level constant. <S> It is also possible to use neutral density optical filters to reduce the light which would be cheaper to retro-fit but difficult to make adjustable. <A> Changing the composite signal is not the way to go as it will render the signal useless and out of standard. <S> Your sensor is saturating and is probably blooming. <S> There should be AEC (Automatic exposure compensation) on the camera board that responds to the light levels and changes <S> \$T_{int}\$ (the integration period), right now it seems that your frame time seems to be the integration period. <A> I had a similar problem, digitizing VHS through a composite video output using EasyCap USB dongle. <S> The bright portions of the output were saturated white, and there was no option to reduce the brightness on the videorecorder. <S> I split the coaxial cable near the videorecorder, and added a series potentiometer as sketched. <S> 2 kOhm were probably too much, but with a very slight movement, introducing roughly 50 to 100 ohm to the central conductor, the signal was attenuated to ca 50% of original brightness, which was exactly what I needed. <S> The colours were not too much affected; I have read the chrominance is phase-encoded in the signal. <S> (It required some tweaking. <S> With increasing resistance over 200 Ohm, the signal quality deteriorated, becoming blurred, dim and the colours went weird.) <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Everybody would say this is not the correct way to do it. <S> But it was perhaps also the only way, since I found no brightness adjustment in the VCR nor in computer. <S> To conclude, nothing blew up and this utterly nonstandard and amateurish modification has fixed my problem. <S> EDIT: <S> For comparison, I created screenshots of the recorded videos before and after the modification.
As an aside, a composite video signal contains timing information (sync pulses) in addition to video brightness information, so attenuating the composite video signal would also attenuate the sync pulses - which is not desirable.
Arduino won't run well on 9v battery I have an Arduino UNO r3 and powering it up with 9v battery. But arduino run strangely (led 13 won't turn up correctly), how could this be? <Q> Small rectangular 9V batteries are absolutely lousy power sources. <S> They have a very small current load capability. <S> They are specifically designed for low-current long-term draw. <S> For example, here is a link to an Energizer Datasheet: <S> http://data.energizer.com/PDFs/522.pdf <S> Notice on the first page that more than 25mA of load significantly reduces the usable life of the battery. <S> On the second page, graph on the right, you can see that 100mA will drop the life to a couple of hours. <S> Why is this critical? <S> Because an Arduino board by itself, when powered through Vin, draws on the order of 30-40mA. <S> This is before you connect anything else to it. <S> So the battery is barely usable to power just the board. <S> Get a better power source. <A> The current that a 9V battery can supply varies by manufacturer and chemistry, but it's safe to say in all cases the current available from a 9V battery <S> is "not much". <S> This is a consequence of putting so much voltage in such a small package. <S> To know if this is the problem, measure your battery voltage with it unconnected. <S> It should be more than 9V for a fresh battery. <S> Then, connect it to your circuit and measure the voltage while it's connected. <S> If it's significantly less than 9V, you are drawing too much current. <S> The battery voltage sags as a result, and may no longer be sufficient for your circuit to operate correctly. <S> If this is the case, either you have a fault in your circuit and its drawing more current than it should, or your circuit by design requires too much current, and you will have to change the circuit or get your 9V from a source capable of supplying more current, like a bigger battery, or a bench supply. <A> Have you tried running the Arduino by itself, with no external circuitry attached, from the 9V battery? <S> If this doesn't work, then there's something physically wrong with your Arduino. <S> Since you say it runs OK from the USB 5V supply, the on-board regulator may be damaged. <S> When you attach external circuitry to an Arduino, you are potentially putting additional demands on its on-board regulator, and this regulator is very much a weak link in the overall design. <S> It is very easy to drive the regulator into thermal shutdown, because it is very tiny (SOT-223) and has essentially no heatsink — just a little bit of copper in the PCB itself. <S> A fresh alkaline 9V battery can supply up to 1A for short periods of time. <S> However, if you draw 100 mA through the regulator, you're forcing it to dissipate 400 mW, and it can't do that for very long at all. <S> Ed Nisley did an extensive writeup of this in the December 2012 issue of Circuit Cellar, in which he calculated that the regulator was good for no more than about 500 mW, which would be 125 mA from a 9V battery. <S> The Arduino board needs something like 30-40 mA all by itself, so if you're drawing more than 80 mA with your additional circuitry, you're in trouble.
Assuming your battery is not dead or broken, and your arduino isn't broken either, the problem is most likely that your circuit is drawing too much current for a 9V battery.
How does this blinking circuit with op-amp work? Can somebody explain how this circuit works? The OP tries to make the same voltage at the input cables. At first, the LED is on. Therefore we have a low voltage (maybe 1V) on the negative input The positive input also get this voltage (1V) and then?Why the LED turns off? EDIT:This example comes from the German Book: Kosmos eletronic X3000 (page 15).R1 = 15 kOhmR2 = 100 kOhmR3 = 470 OhmC1 = 100 µFU_B = 9V <Q> No, since this circuit is a mess and underterministic. <S> Note the positive input driven only thru a capacitor to ground. <S> What someone was possibly trying to do but seriously messed up, was to present the immediate attenuated output signal on the + input and a low pass filtered version of the output signal on the - input. <S> Such a setup can be made to oscillate with predictable parameters, but that's not how this circuit is wired. <A> Yes - I totally agree with Olin its a messed up circuit - just goes to show you shouldn't believe everything you read. <S> I think the actual circuit should have been - <A> Looks like there needs to be correction in the circuit. <S> I can find a big flaw in the circuit where the non-inverting terminal is simply connected with capacitor without any path for the capacitor and the output can never toggle continuously. <S> I guess you need to connect a register in the negative feedback path. <S> Else there should be a resistor in parallel with capacitor.
Unless this is some special opamp that biases the postive input in some known range (there are actually amps that do that, usually meant for audio applications), the voltage on the positive input is totally dependent on the sign of the leakage current and not a function of the signal.
Why N-channel MOSFETs are better than P-channel MOSFETs? Besides the reason that electron mobility is higher than hole mobility, what are the other reasons of preferring an N-channel over a P-channel MOSFET? <Q> Since you haven't specified I will choose my domain of answer: chip design. <S> The answer really depends ... <S> NMOS is not always better than PMOS in all areas. <S> Carrier mobility: <S> most modern CMOS processes are on <100> crystal orientation wafers. <S> In this system since the transistors are in a common substrate there will be a ~ 2.2X factor in mobility between electrons and holes. <S> however, when they are separate devices like discreets, a different crystal orientation could possibly be used so the mobility argument will be weakened (but electrons will always have better mobility than holes). <S> processes around the 65nm node started using stress/strain to more closely match the mobility between the two type of transistors, mainly for size savings. <S> Intel is a prime example of this approach. <S> Substrate connection: <S> Most CMOS processes are on P-type wafers with dual well implants. <S> That means that NMOS transistors have all of their wells at the ground potential (unless they are triple well processes). <S> That means that the bulk connection for a unity gain follower using a NMOS device will be at ground and the back gate effect will be present that reduces the gain to ~ 0.8. <S> When implemented with PMOS devices with the bulk connection tied to the source, the gain can be 1.0. <S> Noise: PMOS transistors at process nodes above 0.35u were typically buried channel devices (due to process techniques used at those nodes). <S> these devices had much lower noise than NMOS transistors in the same process node. <S> Simply because the channel was kept away form the Si/SiO2 interface states at the Si - Gate Oxide boundary. <S> This is particularly true of flicker noise. <S> PMOS transistors below 0.25u mostly were surface channel devices and as a result they picked up NTBI (Negative Temperature Bias Instability) <S> noise like characteristics. <S> Process variability: because of the larger sizes required to match <S> the \$G_m\$ PMOS devices are larger and therefore are better matched with fewer effects from LER (Line Edge Roughness). <A> Why n-channel MOSFTs are better then p-channel MOSFETs? <S> The only real reason is that electron mobility is higher than hole mobility. <S> All of the physical advantages fall out of that (gate-capacitance, channel resistance, cost, size, thermal rating, etc) <S> Every other difference is just a difference. <S> Let's consider polarity. <S> If you are using the transistor as a switch, p-type is "on" under conditions opposite those of the n-type. <S> This is analogous to a push-button being normally-open (push the button to close the circuit -- typically that means turn something on) and normally-closed (push the button to open the circuit -- typically turn something "off"). <S> Which of these behaviors is better in your application, depends on the application. <A>
N-channel FETs have electrons as their current carriers which have high mobility thus the drain current is comparatively high ; here the input noise is low and the transconductance is large .Whereas for p-channel FETs, they have holes as current carriers which have comparatively less mobility than electrons thus making less drain current to flow ; here in this case the input noise is more and transconductance is small.
Does Solder selection affect signal quality? I've been wanting to design some circuits for audio processing. I am curious if solder plays a part in retaining signal quality. Is an exotic material or high end lead based solder worth it? Does it even make a difference? How would I objectively measure this? <Q> I work in both the Pro-Audio and audiophile industry. <S> As long as the solder is used properly, and makes a solid connection, then the type of solder makes zero impact in audio quality. <S> The flux inside the solder, on the other hand, can make a big impact. <S> But here too, if used properly, it won't matter. <S> Basically, clean off the flux that is supposed to be cleaned off. <S> Some flux is fine if not cleaned up. <S> Rosin and "no clean" flux is fine left on there (mostly). <A> Stick to 60:40 Sn-Pb solder. <S> It is easy to work with, and has the nice property that good joints look shiny. <S> Solder is several times more resistive than copper. <S> However, the distances spanned by solder are very tiny. <S> When soldering, try to ensure contact between the parts being soldered, if possible. <S> Sometimes the contact is poor to nonexistent, like between the terminal of a through-hole device and the PCB copper pad through which it protrudes, particularly if it is one-sided PCB without plated holes. <S> However, the distance is still very close, so the bridge formed by solder is very short. <S> In audio circuits, the impedances tend to be high. <S> Even in a power amplifier output stage where the impedances are a lot smaller, it doesn't matter. <S> Consider that it's common to degenerate the emitter resistors of a complementary pair emitter follower with 0.22 ohm resistors which are effectively in series with the speaker load. <S> Even these small 0.22 ohm resistors will swamp the resistance of their own solder joints. <S> (Some audiophiles will no doubt try to convince you that the junction between solder and copper causes distortion that is audible to one who possesses golden ears.) <A> Lead solder works fine ( <S> though it does eventually crystallize; after around 40 years it's worth reflowing every joint!) <S> but an unqualified recommendation to use it is bad advice. <S> If you are building equipment for your own use, or for sale in those parts of the world where it is still allowed, go ahead. <S> But if you live elsewhere or aspire to selling worldwide (not so ambitious since eBay started!) <S> then look for lead-free alternatives. <S> Some of these contain a small percentage of silver; it may not make any difference to the sound <S> but it it may be worth a minor selling point.
The tiny fraction of an ohm added by a bead of solder to a circuit in which the impedance is 10,000 ohms makes no difference.
How to identify orphaned power cords? We are doing a massive purge of "stuff" from home and storage. I am accumulating a large quantity of random, unmarked power cords. Some will have "Nintendo" or "Norelco" on them - so I know to go confer with my boys about their gaming stuff or check my husbands grooming items, etc. But what I am confounded by is several totally generic type cords - with a specifically shaped female pin end and standard oriented plug end(one prong larger than the other). There are numbers imprinted on both ends as well as printed in white ink along the wire. Lots of numbers. I attempted a google search but the results were equally random. "AC power cord for some electronic device." How can I determine what each cord is for? I don't want to store them all "in case" - but I also don't want to throw them out only to discover they were needed for something we still use (or want to sell, give away, donate). <Q> But what I am confounded by is several totally generic type cords - with a specifically shaped female pin end and standard oriented plug end(one prong larger than the other). <S> There are numbers imprinted on both ends as well as printed in white ink along the wire. <S> Lots of numbers. <S> I attempted a google search but the results were equally random. " <S> AC power cord for some electronic device." <S> Wikipedia has a list and pictures of the IEC 60320 cable connector standard. <S> They are generic for a reason. <S> They are easier to use and replace than molded fixed cables. <S> And they can come with different wall plugs, allowing a manufacturer to use the same connection on the device, but ship with a American plug, or European plug, or japanese wall plug. <S> They are cheaper to buy in bulk than having custom ones made. <S> Because of this, it's also common to find different devices using the same connector. <S> You will find the figure 8 cable (C7) used on playstations and dreamcasts and radios. <S> Dell uses the Mickey Mouse cable (C5) on many of it's laptop power supplies. <S> As for the writing on the cable, that's often the rating for the cable itself. <S> Type, Make, Manufacturer, Size, Temperature Ratings, etc. <S> They are repeated every few feet. <S> This is because the cable is made by one manufacturer, and the connectors are added on by another. <S> The cable itself comes in huge reels, and is cut as needed. <A> Any chance your big box 'o cords contains some "cords" as in cords and some "cords" as in adapters? <S> "Cords" as in cords : <S> These have a plug that goes into the wall and an IEC 60320-compliant plug . <S> With these, it's not critical to use them with the exact same device they came with. <S> Over time, you may end up having lots and lots of them, because many new computers/monitors/whatnots are shipped with one. <S> Keep the nicer dozen of each type, give the rest to a friend hacker of yours or try your community's recycling yard (cable bin for copper recycling!). <S> "Cords" as in adapters : <S> These are sometimes also called wall warts , because the somewhat bigger enclosure (wart) that is plugged into the wall contains a transformer or other type of power supply, and they have a low-voltage output specifically designed for a certain type of equipment. <S> There is no standard to make sure you don't fry a device designed for a 5 V supply with a wrong, higher-voltage adapter, e.g. one that outputs 12 V. Also, even if the voltage is the same between two adapters (say: 5 V DC), the polarity at the small plug to the device may be different... <S> These adapters can only be used interchangeably if all the details match (Voltage, AC vs. DC, polarity, current rating, size of plug - <S> and I may have forgotten something). <S> Sometimes, mostly for laptop adapters, it is even necessary that the laptop receives a datagram from its very own power supply... <S> TLDR <S> : It is wise to have labels on adapters, like some of yours do. <S> No labels: <S> The tiny print or the manuals may provide the information about what matches with what. <S> (C64, vintage musical instruments?) <S> , even if you don't need them any more (-> flea market, online classifieds or auction?). <S> Some more hints on power supplies or adapters of unknown origin or purpose: https://electronics.stackexchange.com/a/34746/930 <A> You may find it helpful to look at A Visual Guide to Computer Cables and Connectors . <S> It certainly helped me to sort through my two huge boxes of orphans.
You can commonly find computer power supply cables used for monitors or tvs as well. The general rule is: If they fit, they're good. Some are probably junk, some may be valuable No tiny print or no manuals: Detective work, and hoping you don't let the magic smoke out if plugging the wrong adapter into a device...
Running 7V motors with 2x 3.7v batteries We're really enthusiastic to build a homemade quad-copter with almost no knowledge about such things. We will probably use Arduino and Bluetooth to control it, but we have a question about the motor power supply. We're planning to use a phone battery to power the motors. Our motors run at 7-12V, but our batteries are 3.7V, 1450mA. The question is will the motors run smoothly if we connect them like this: and theoretically will they be enough to power 4 motors. If they're not, can you suggest any cheap solution. <Q> Battery voltages add in series, so two 3.7V batteries should give you 7.4V, which should work. <S> With them in series, two doesn't change the current they can supply, so you can get 1450mA. <S> You have four motors that will need to share this current, so each motor can have up to 362.5mA, if the batteries are powering only the motors. <S> The control electronics will also require some current, and running your batteries at the maximum current will discharge them quickly. <S> Is this enough? <S> How heavy is your quadcopter? <S> What does the motor datasheet say? <S> The quadcopter you are describing, with an Arduino, and an Android phone, sounds pretty heavy. <S> Without more information it's impossible to know for sure, but I'm guessing you will need bigger batteries. <S> There are plenty of batteries designed for remote control aeroplanes and helicopters. <S> I'd investigate those. <A> If the motors are brushless (common for quad-copters) you should look into using one ESC (electronic speed controller) to control each engine. <S> They will provide all the circuity for using your batteries to control the engines and change the speeds more easily. <S> Electronic speed control is used to control the motor <S> and then you can use PWM ( Pulse width modulation ) to control the speed. <A> There are good resources on how to build a quadcopter and this one is just the tip of an iceberg. <S> I recommend you reading a lot before you even touch the soldering iron. <S> Even if you collect the necessary components and assemble it together, there are still many days of work and debugging before you fly for real (and debugging a flying device means frustration and money). <S> First of all, carrying a phone is not a good idea. <S> It is heavy and expensive. <S> Better buy an IMU breakout board and connect it to Arduino. <S> Then use the extra power to carry a bigger battery and fly longer. <S> I built a quadcopter with Arduino Mini clone and MPU6050 accel+gyro. <S> That makes a good and simple Flight Controller for ~$20. <S> You'll need 4 ESCs, a receiver and transmitter as well.
You are also limited by the current your batteries can supply.
Can I estimate remaining battery life by measuring its voltage with the same MCU that it powers? I'd like to estimate the remaining battery life of a battery that powers a microcontroller. Could I accomplish this by simply leading the battery into the MCU's built-in ADC? My idea is that I could plot the voltage over time to figure out how much battery life remains. But would the change in voltage be noticeable? And would it be a problem that the same battery powers the MCU (and ADC)? <Q> You can do this (assuming voltage is a predictable function of remaining life, but that's another issue) as long as there is a fixed voltage reference available in the system somewhere. <S> If not, you have to supply some external reference. <S> Note that due to power consumption you may want the micro to switch on this reference only for a short time around battery readings, which don't need be very often relative to the time it takes to do a reading. <A> You can measure with a μC the voltage of the battery which directly powers this μC (without a voltage regulator). <S> You need to have a reference voltage, which doesn't change as the battery voltage changes. <S> The idea is either to measure the battery voltage w.r.t voltage reference, or to measure the voltage reference w.r.t battery voltage. <S> Many μCs have a built-in voltage reference, which can be enabled from software. <S> Some μCs can output a reference voltage to a pin. <S> An external voltage reference would work too. <S> To conserve battery charge, you can use the μC pin to turn on the battery voltage measurement circuit only occasionally. <S> Here's one of the variants of the circuit. <S> Which topology to use depends, in part on which type of the μC you're using. <S> (?) <S> You might find that sensing battery voltage is not an accurate enough way of sensing the remaining capacity. <S> In portable equipment (cell phones, laptops), battery capacity is estimated by measuring current in and out of the battery. <S> There are dozens of specialized battery fuel gauge ICs ( bq27200 , for example), which help with this task. <A> Some microcontrollers even have this built in. <S> The MSP430 ADC (regardless of version) section usually has some variation of an internal switch with a resistor voltage dividing Vcc down to a usable sampling voltage. <S> This is then compared to the selected reference voltage so you can measure what Vcc is at. <S> INCHx is the ADC input channel selection register. <S> The switch is closed when INCH is 0b1011, allowing the ADC to measure Vcc through the resistor divider. <S> The thing on the right is the internal temp sensor. <S> Other microcontrollers might have this same feature. <S> You should look through their datasheets to find out.
Some micros have a fixed voltage reference built in, which can usually be read by the internal A/D or applied as the A/D scale.
How to cut interrupt code to minimum? I have some interrupt let's say from UART to make a real example: void USART2_IRQHandler(void){ int i = 0; if(USART_GetITStatus(USART2, USART_IT_RXNE) != RESET) { static uint8_t cnt = 0; char t = USART_ReceiveData(USART2); if((t!='!')&&(cnt < MAX_STRLEN)) { received_string[cnt] = t; cnt++; } else { cnt = 0; if(strncmp(received_string,"connection",10) == 0) { USART2_SendText("connection ok"); } else if(strncmp(received_string,"sine",4) == 0) { DAC_DeInit(); DAC_Ch2SineWaveConfig(); USART2_SendText("generating sine"); } else { USART2_SendText("unknown commmand: "); USART2_SendText(received_string); } for (i = 0; i <= MAX_STRLEN+1; i++) // flush buffer received_string[i] = '\0'; } }} But interrupt code should run as fast as possible. And here we have some time consuming functions inside. The question is: What is the correct way to implement interrupts which call time consuming functions? One of my ideas is to create flags buffer and flags in interrupt. And process flag buffer in main loop calling appropriate functions. Is it correct? <Q> UART is indeed a pretty typical case because many applications require that some processing is done in response to command/date received via the serial port. <S> If the application is architectured around an infinite processing loop, as it is often the case, one good way is to use DMA to transfer received bytes into a small buffer and process this buffer at each loop iteration. <S> The following example code illustrates this: #define BUFFER_SIZE 1000uint8_t <S> inputBuffer[BUFFER_SIZE];uint16_t inputBufferPosition = 0; // <S> setup DMA reception <S> USART2 RX = <S> > <S> DMA1, Stream 6, Channel 4RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA1, ENABLE);DMA_InitTypeDef dmaInit;DMA_StructInit(&dmaInit);dmaInit. <S> DMA_Channel = DMA_Channel_4;dmaInit. <S> DMA_PeripheralBaseAddr = <S> ((uint32_t) <S> USART2 <S> + 0x04);dmaInit. <S> DMA_Memory0BaseAddr = <S> (uint32_t) inputBuffer;dmaInit. <S> DMA_DIR = <S> DMA_DIR_PeripheralToMemory;dmaInit. <S> DMA_BufferSize = BUFFER_SIZE;dmaInit. <S> DMA_PeripheralInc = DMA_PeripheralInc_Disable;dmaInit. <S> DMA_MemoryInc = DMA_MemoryInc_Enable;dmaInit. <S> DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte;dmaInit. <S> DMA_MemoryDataSize <S> = DMA_MemoryDataSize_Byte;dmaInit. <S> DMA_Mode = DMA_Mode_Circular;dmaInit. <S> DMA_Priority = DMA_Priority_Medium;dmaInit. <S> DMA_FIFOMode = <S> DMA_FIFOMode_Disable;dmaInit. <S> DMA_MemoryBurst = DMA_MemoryBurst_Single;dmaInit. <S> DMA_PeripheralBurst = DMA_PeripheralBurst_Single;DMA_Init(DMA1_Stream5, &dmaInit);USART_DMACmd(port, USART_DMAReq_Rx, ENABLE);// loop infinitelywhile(true <S> ){ // read out from the DMA buffer uint16_t dataCounter = DMA_GetCurrDataCounter(DMA1_Stream5); <S> uint16_t bufferPos = <S> BUFFER_SIZE - dataCounter; // if we wrapped, we consume everything to the end of the buffer if (bufferPos < inputBufferPosition) { while (inputBufferPosition < BUFFER_SIZE) processByte(inputBuffer[inputBufferPosition++]); inputBufferPosition = 0; } // <S> consume the beginning of the buffer while (inputBufferPosition < bufferPos) <S> processByte(inputBuffer[inputBufferPosition++]); // do other things...} <S> What this code does it to first setup a DMA channel to read from USART2. <S> The correct DMA controller, stream and channel is dependant on which USART you use (check the STM32 reference manual to figure out which combination is needed for a given USART port). <S> Then the code enters the main infinite loop. <S> At each loop, the code checks whether something has been written (through DMA) in inputBuffer . <S> If so, this data is processed by processByte , which you should implement in a way that is similar to your original IRQ handler. <S> What's nice in this setup is that there is no interrupt code -- everything runs synchronously. <S> Thanks to DMA, received data just "magically" appears in inputBuffer . <S> The size of inputBuffer should be carefully determined though. <S> It should be large enough to contain all the data you can possibly receive during a loop iteration. <S> For example, with a baud rate of 115200 (about 11KB/s) and a maximum loop time of 50 ms, the buffer size should be at least 11KB <S> /s <S> * 50 ms = 550 bytes. <A> It really depends. <S> If it's important that the code inside your handler is processed "immediately" then there's little way around this, other than avoiding costly external function calls (i.e. implement the functionality of the called function inside the handler). <S> If all you're worried about is reading the incoming data from your USART, but the data itself can then be "dealt with" <S> later, you're better off using a very simple ISR, or better yet the DMA, and some external buffer that can temporarily hold the incoming data. <S> ST has a nice application note AN3109 <S> that shows how to do this. <A> The interrupt handler will place received data into the queue and the handler task (running at the "thread" priority to use a Cortex-M term) will receive and process the data in a loop. <S> This avoids flags, locks, semaphores etc. <S> which are a constant source of bugs. <S> This method of course has its disadvantages, for example rather high RAM usage and the need for a RTOS. <S> Still I find it quite justified if the logic to be implemented is complex enough (and available RAM is not too constrained). <S> You can create a fairly generic event handling system this way. <S> A FreeRTOS / Cortex-M skeleton example follows. <S> # <S> define EVENT_QUEUE_SIZE 32 <S> // could be tricky to get rightxQueueHandle event_queue;void Some_IRQHandler(void){ // <S> reset the interrupt pending bit event_t event; <S> event.type = FOO; // if event_t is a tagged union event.foo = ... <S> ; // fill the structure with data from the peripheral // place into t <S> he queue <S> portBASE_TYPE task_woken = pdFALSE; xQueueSendFromISR(event_queue, &event, &task_woken);}void Other_IRQHandler(void){ // <S> same except <S> event.type = BAR;}void handler_task(void *pvParameters){ while(true) { event_t event; if(!xQueueReceive(event_queue, &event, portMAX_DELAY)) continue; // process the event <S> switch(event.type) { case FOO: ... break; ... <S> } }}int main(){ // create the queue <S> event_queue = xQueueCreate(EVENT_QUEUE_SIZE, sizeof(event_t)); // create handler task xTaskCreate(handler_task, ...); // enable interrupts, start the scheduler}
In my experience the most general method available to embedded developers is message queues which are provided by most RTOSes out there.
How can one mount PCB-mounted TO-247 devices to a large plate heatsink? I want to mount multiple PCB-mounted TO-247 devices to a single large heatsink, something comparable to this : My devices may or may not have mounting holes through them, and their tabs may or may not be isolated. Any approach will have to support the use of mounting clamps and isolation pads. I'm using TO-247 devices for cost reasons; the smallest chassis-mount devices I'm aware of are SOT-227, which cost much more than similar parts in TO-247 packages. What approaches to this problem are used? What difficulties are presented by those approaches? <Q> I did this once: - Use a strap of sturdy metal to push the transistors down onto the base of the heatsink. <S> You'll need to drill holes in the sides of the heatsink to hold the strap in place. <S> Legs of transistors point upwards and solder into PCB. <S> Transistors and PCB can be removed from the heatsink by undoing screws holding strap. <A> A few ideas present themselves. <S> Mount the devices perpendicular to the PCB, at the edge of the PCB, and mount the PCB perpendicular to the heatsink. <S> This can pose difficulties in high-vibration environments or shipping, requiring more mechanical stabilization of the PCB itself. <S> It also enforces an effective size limit on the PCB, and puts stricter limits on the layout of the board. <S> Mount the devices parallel to the PCB, with the device tabs hanging off the edge of the board (or a hole therein). <S> This means that either the PCB must be directly in the plane of the top of the sink (not an option in some chassis designs), or there must be a metal block between the devices and the sink proper. <S> This makes assembly more difficult. <S> Holes must be left in the PCB to access mounting clamps. <S> In all cases, isolation pads are needed between the device legs and the sink, to maintain clearances at high voltages. <A> You have to drill and tap holes for screws that fit within maximum hole diameter of 3.91 mm (0.154") <S> Each screw may use a plastic washer to provide more tolerance to excess torque. <S> Each device needs a good thermal conducting electrical insulating pad. <S> Some designs use spring metal clips for ease of installation which are screwed into the heatsink but have the force of a heavy duty paper clip in a small size. <S> Choose devices that limit the heat dissipation is the 1st step by low RdsON or serries drop voltage. <S> Consider CPU heatsinks with custom mounting holes added but in a smaller package with a low RPM fan with edge mount PCB strips on either side using a jig for assembly.
Mount the devices directly to the sink under the PCB, and bend the legs upward to solder into the board.
What is the purpose of an RC branch accros the diode of a rectifer circuit? Recently I was going through the data sheet of the TOP264 TOP Switch IC . In a typical application circuit diagram, at the secondary of the transformer they have used a configuration for the diode as follows instead of using a simple diode for a half wave rectifier. What difference does it actually make in the output? Can anybody explain the advantages of this configuration? <Q> It is a snubber network. <S> Its purpose is to suppress high frequency ringing at the turn-off of the rectifier diode, caused by resonance between the diode capacitance and the flyback transformer leakage inductance. <S> This is necessary not only for EMI purposes but to protect the device from excessive voltage stress. <S> The snubber won't have a meaningful impact on the output, since it's only 'working' on the edge of the pulse train coming in. <S> The values can be estimated by calculation, but the ringing driving sources are parasitic in nature so by and large they're empirically determined (measure ringing frequency, set values, measure, adjust values, measure again, etc.) <S> Here are some app notes that touch on the topic: <S> Fairchild app note AN-6093 <S> Switching Power Magazine article on flyback snubbers <A> Protection of the Schottky diode <S> Here is an interesting article from ST and the relevant points I've copied below. <S> Simply, the article tells you why a snubber is needed even if you are using a normal PN diode. <S> Note figure 9 for schottky and figure 11 for PN. <S> : - <A> I would say it was an RC snubber circuit. <A> This is a RC snubber to protect the diode. <S> RC snubber's acts like a damper and dampens the resonance created because of the parasitic capacitance and inductance.
It is a snubber circuit and it is to protect the schottky diode from reverse voltage breakdown.
Guessing power line voltage from the number of disc insulator Is there a good way to guess the power line voltage based on the number of insulator discs that attach the line to the transmission tower? Wikipedia seems to suggest that there is a "Typical number of disc insulator units for standard line voltages". Is this a good ball park upper bound to the voltage on the power line? Is there a better way of guessing line voltages? Is it possible to further refine this guess based on the type of insulator discs? <Q> In general, probably not. <S> 25KV Low Voltage Silicone Rubber Composite Tension Suspension Electric Insulator for Railway Low Voltage 220kV Polymer Composite Power Line Insulator <S> Images are from http://www.tjskl.org.cn/images/cz154fccb-pz2297256-66kv_polymer_composite_tension_suspension_transmission_line_insulator.html <S> In a specific country, with a single supplier of high-voltage transmission tower systems, for a small group of towers built at similar times, the answer may be yes. <A> Is there a good way to guess the power line voltage based on the number of insulator discs that attach the line to the transmission tower? <S> We usually use as a rule of thumb for determining the number of porcelain/glass suspension disc insulators: 10kV for each disc (standard 5-1/4' x 10"). <S> For typical system voltages in North America, this would be: 69kV: 4-6 discs; 115kV: 7-9 discs; 138kV: 8-10 discs; 230kV: 12 discs; 345kV: 18 discs; 500kV: 24 discs. <S> You may check Electric Power Generation, Transmission & Distribution by Grigsby, et al. <A> See attached Table 4-6 from the USDA-RUS Bulletin 1724e300. <A> Typically these discs are set with the same distance so it CAN be possible but only as some approximation. <S> The purpose of these discs is not however being markings of voltage, but (among others) they function to halt arc on the insulator surface. <S> The insulator length provides more information, but this is only design data. <S> The line which was designed for 400 kV can be used as 110 kV, so it says nothing. <S> The same information might be taken from distance between phase conductors, tower height (the distance between conductor and earth), distance from line to its neighbourhood and so on. <S> Taking a look on the line will not even show you if it is operational. <A> According to My research I have found that yes <S> and no <S> that you can and can’t base the line voltages off of the insulator number of discs. <S> Here is why you could NOT: <S> High voltages act differently in cold, hot, moist, or and dry areas. <S> In Utah there are power lines with 12 ceramic discs on the power poles holding or suspending the power lines. <S> The power lines only have 138 kV flowing through the power lines. <S> But the number of insulating ceramic discs suggests that a little more than 161 kV is flowing through the power lines. <S> The reason why you could: <S> The main and only reason why you could base the voltage flowing through a power line off of the number of insulating discs is if you wanted to be over safe. <S> Or what I call over-protective. <S> Which means basically you are estimating higher than needed to make things even safer.
Usually, it is possible to say what voltage the insulator can withstand, because it is a function of its length. So the answer for this is no, you couldn’t base voltages flowing through power lines on the number of ceramic discs on the power lines.
What actually is the output current of a boost conveter? What I understood at least at a basic level the operation boost converter, the inductor supplies output current when the switch is OFF. When the switch is ON the the load current is taken current by the output capacitor. Update Is the classification of DCM and CCM is based on the nature output current or nature of inductor current ? But during switch ON state, the inductor current has nothing to do on the output current ? or what I understood is wrong? Can anybody please explain this ? <Q> As your current graphs show, the inductor current is not constant, so the concept of 'the inductor current' being a single (time-independent) value is not valid. <S> What is valid though, is that the inductor current has no sudden changes (the first derivative is always finite). <S> This is a fundamental property of an inductor, and it is illustrated in your 3d graph: <S> the inductor current is a sawtooth. <S> When you talk about 'output current' you must be careful what you mean: if you say <S> inductor_current = output_current <S> you mean the current going into the (load + output_capacitor). <S> ================================================ <S> (after question update) CCM means that there is always a current through the inductor. <S> That means that the current fed into the load+capacitor ramps down to a certain value, and then abruptly drops to 0. <S> DCM means that at some point(s) in time there is no current through the inductor. <S> That means that the current fed into the load+capacitor ramps down to 0. <S> Hence DCM/CCM can be observed both at the inductor and at the load+capacitor (and at the input too). <A> What actually is the output current of a boost converter? <S> Hopefully the diagrams below will explain the output current and the difference between continuous and discontinuous operation. <S> Look at the blue traces in both continuous and discontinuous modes - this is the rectifier or diode current (what you refer to as CR1). <S> The diode current is the current into both capacitor and load resistor. <S> When the average current is not constant the output voltage would either collapse to zero or rise until something went "bang". <S> In reality, it is the average current that flows into the load because without a load, a non-zero average current would continue to push the output voltage up and up. <S> Output load resistor current is therefore average diode current <A> When the switch is ON, current ramps up in the inductor and <S> the load is powered by the output capacitor(s) alone. <S> The rectifier diode is reverse biased. <S> When the switch is OFF, the rectifier diode is forward biased and the load (including the output capacitor) is powered by the output inductor. <S> The load current is the arithmetic average of the diode current waveform, thanks to the output capacitors. <S> (You can easily simulate a boost converter with any of the free Spice-based simulators out there and get a feel for all of these things by playing with the frequency, inductor size and load current. <S> I like LTSpice for this sort of task.) <A> I think the key point is that the average current through the load (which is constant, with a small amount of ripple) is equal to the average current through the diode (which is pulsing). <S> In other words, the area under the I CR1 curve for any given interval equals the area under the I <S> O curve for that same interval.
CCM and DCM is based on the behaviour of the inductor current, which is a factor of the load current, the inductor size and the switching frequency.