source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
Building SMPS using L4960: How does the choice of inductor affect circuit operation? I've decided to conquer my fear of switched-mode power supplies and build one. Right now, I have a L4960 regulator. Its datasheet recommends use of a 150 μH inductor rated at 5 A. My problem is that I can't find such an inductor. I can either get inductors with lower current rating (for example 150 μH at 1 A) or inductors with smaller or higher inductance (for example 100 μH at 10 A). So my question is: How is it calculated that 150 μH 5 A inductor is needed? <Q> If you can't find one, it's quite easy to wind your own with a suitable toroidal ferrite core. <S> 150 uH is quite a low value and won't require many turns. <S> You need to ensure that you use a wire gauge that can handle 5A, of course. <S> Suitable cores are available from most component suppliers, and the manufacturer's web site will have design details. <S> I've wound larger inductors using a pot core for an MCU-controlled switching power supply without any problems. <A> I'm not totally clear on the question. <S> If the question is: "Why was 150 µH and 5A chosen? <S> ", it's a matter of preference. <S> The 5A saturation current threshold is most likely to ensure that the regulator itself will go into over-current protection before the inductor saturates out. <S> If the question is: how are the inductance and saturation current properties of an inductor calculated, then it's a matter of physics. <S> The inductance and saturation current of an inductor are primarily properties of numerous characteristics, the most important of which are: the construction geometry (shape, number of turns, etc.) <S> the core material (air, ferrite, etc.) <S> Different numbers of turns will change the inductance for a given core. <S> The core material (and air gap, if applicable) will determine how much DC current the inductor can carry before the permeability rolls off, which is generally what saturates out an inductor in a buck design (it carries more DC than ripple current, generally speaking). <A> The inductance determines how much energy you put in the magnetic field. <S> Lower switching frequencies require larger inductance. <S> The wire diameter is determined by the maximum current the coil will see. <S> Too thin a wire will have a higher resistance and reduce efficiency. <S> edit <S> I don't think the coil's value is found experimentally, but rather that it's a complex calculation that the manufacturer has done for us. <S> Same, by the way, for the other components. <S> Take National's Webench , for instance. <S> You supply the SMPS's black box parameters, and it returns a full schematic including BOM. <S> If you're interested in the details of the calculation, however, have a look at a Linear Technology datasheet. <A> When designing a SMPS, the inductor is the most (like numero uno) import part of the whole circuit. <S> The inductor will decide how nice your output rail is. <S> The actual choice of inductor will change based on application, load, etc. <S> When selecting an inductor, you'll need to make sure your max supported amperage on the SMPS is lower than the inductors inherit saturation current. <S> Check out this tool from Vishay. <S> They have very high quality inductors and are great with their documentation. <S> You'll also want to work with the package size of the inductor, as this will affect its inherit DCR (resistance) as well as its power dissipation capabilities. <S> A larger package will generally have better power dissipation properties although its DCR will be higher as well (which is bad) <S> Many of these things are found through calculations, simulations, and such although a good place to start is: <S> Pick your target output current - based on what it is powering. <S> Find your switching controller IC Calculate your feedback loop (the feedback resistors) <S> Find your mosfets (if they are needed), otherwise skip this Pick your inductor <S> Use the vishay tool to decide certain factors. <S> Play with the parts they offer. <S> You'll want to keep an eye on your core losses and fiddle with the switching frequency. <S> Fiddle with the parts they offer some more. <S> It is a good idea to de-rate <S> the current capabilities in the back of your mind just to give your application some headroom. <S> Pick your output capacitance <S> Your output capacitors will help filter out noise on the output rail. <S> You'll need some low capacitance ones like .1uF to filter out high-frequency noise, as well as some larger bulk capacitors too. <S> Bulk capacitors can be 330uF or 470uF or anything large, but it really depends on your application. <S> Make sure these have a high enough voltage rating to handle your output voltage. <S> And there you have it <S> , that is a really really really general, non-scientific way to make an SMPS.
Generally, the size of the inductor in a buck regulator is chosen to achieve a certain ripple voltage in the output capacitors at a given load, or to set the discontinuous-continuous threshold at a given load.
Should I always have holes in my PCB pads? The drilled holes aren't always perfectly centered. For single sides boards this doesn't make much difference, but for plated through holes having a hole in the pads copper could mean that the pad only partly connects to the through-hole metalization if the drill doesn't match the hole perfectly. Are through-hole pads without hole in the copper allowed? edit About the larger annular ring (re Leon's comment): it's not the outside I'm worried about. I've never had an annular ring so small that the drill comes outside of it. If the drill goes a little bit to the west, then possibly on the east side the copper of my pad doesn't connect to the through-hole metalization. This wouldn't be noticed when the board is tested, since there's still a (partial) connection, but it may have a higher resistance. <Q> The only time I know of when it's useful to have holes in the copper design is when boards are being hand-drilled. <S> In such cases, a much-smaller-than-actual-size hole will help show where the drill should go and keep it centered. <S> Otherwise, it's often nice to have holes shown actual size in paper plots <S> but it's a very bad idea for production. <A> I understand what you want, but it doesn't make sense: the drill diameter is determined by the hole diameter in your pad. <S> No hole in the pad = <S> no hole drilled. <A> If you are getting problems with off-centre holes in your pads, you should change your PCB supplier, or use a larger annular ring. <S> It sounds as though your supplier has problems with his PTH process as the copper is deposited after the holes have been drilled. <S> Holes can be filled, but it's a very expensive process and only used on high-end boards with vias in pads for BGA devices.
You must have holes in your vias, it's the only way to get connectivity through the board.
How to connect uC to PC using RS232 with minimum number of signals? The standard 9 pins RS232 connector has 9 pins. Those are: 1 -- DCD -- Data Carrier Detected 2 -- RxD -- Receive Data 3 -- TxD -- Transmit Data 4 -- DTR -- Data Terminal Ready 5 -- GND -- Signal Ground 6 -- DSR -- Data Set Ready 7 -- RTS -- Request to Send Data 8 -- CTS -- Clear to Send Data 9 -- RI -- Ring Indicator If I need bi-directional communication it is obvious that I should connect RxD and TxD. What should I do with other signals/pins - connect to ground, left open, need to drive them with appropriate signals according to protocol? If I care only about uni-directional connection can I connect only RxD or TxD? What are the consequences of not using/connecting certain signals. What software on PC side expect to have those signals? What functionality will be lost? NOTE 1: I am using here word "connect" in sense of logical connection -> for electrical connection I would require level shifter circuitry such as MAX232) NOTE 2: I am pin limited on uC - I do not mind connecting any signals on the board (like pulling them up/down). <Q> It will depend of the software that you're using. <S> A) <S> In my case, as I develop my own PC software, I've never used other pins, only RxD, TxD and GND. <S> So, in this case you can left other pins open. <S> This is called as null modem without handshaking B) <S> Yes (assuming GND is being considered) C) Again, it will depend of the software on PC side. <S> Some softwares you can configure to not take care of hardware control. <S> Others will require RTS/CTS handshaking, so you can do a null modem with loop back handshaking Source of the pictures: RS232 serial null modem cable wiring <A> You only have to connect RxD and TxD, and Ground, of course. <S> (If you're using unidirectional communication only Ground and RxD or TxD is required.) <S> The other signals are used for communication with a modem. <S> Most UARTs on microcontrollers don't provide these control signals. <S> I do remember I've seen it on 1 or 2 UARTs of a uC with several more UARTs (though I don't remember which uC <S> it was). <S> more on the modem thing (FYI): EIA-232 defines <S> DTE (Data Terminal Equipment, in this case your PC or SBC) and DCE (Data Communication Equipment, often a modem). <S> You have several ways to connect the PCs. <S> You only need those two signals + ground. <S> That's what you use to connect a PC to a SBC. <S> A modem connection uses the extra signals too, the PC and the modem are connected via a straight through cable (pin 1 connected to pin 1, etc.) <S> You can set up a connection between two DTEs as if there are modems present, in that case you use a null-modem to connect control signals between DTEs, like RTS from 1 DTE is connected to CTS on the other. <S> This uses a complete wired crossover cable. <S> A null-modem setup, where the control signals aren't connected between PCs, but you cheat and don't connect RTS to CTS on the other PC, but on your own PC. <S> Other signals are also locally looped back. <S> The result is that like in case 1) only RxD, TxD and Ground are connected between PCs. <A> You must have Tx, Rx, and signal ground at a minimum. <S> While in theory you don't need to Tx if you are only receiving, as a practical matter in many situations, you will need to acknowledge receiving the message. <S> The other pins are used for "hardware handshaking" a permission system where the sending device verifies the receiving device is ready. <S> You can use Xon / Xoff instead (software handshaking). <S> Some devices, serial mice for example, also used the hardware handshaking lines for power. <A> Note that it can be possible to get away without using the 232 chip in certain circumstances. <S> This relies on certain slackness in the protocol and abusing some pins in ways they were not supposed to be. <S> Unfortunately, I don't know the circuit off the top of my head <S> but I have used it. <S> I was searching for it when I came across this question. <S> I wouldn't use it in production <S> and I don't know that it works for all connecting RS232 implementations <S> but it was handy when I used it. <A> For a minimum number of signals it is entirely possibly to make a UART interface using only two wires - a bidirectional signal line, and ground. <S> What is required is that the line drivers on each end be able to be disabled (tri-stated) and that the software implement a take-turns protocol; often the slave device only transmitting to answer a question from the master. <S> In a logic level connection between microcontrollers (no line drivers) <S> the hardware is quite simple, since you can almost always tristate the transmit pin (possibly by switching it back to GPIO mode). <S> While the technique is not very frequently used on nearby peripherals, it is quite common using differential signalling as RS485, and may involve a network of many nodes instead of just two. <S> But software schemes designed for talking on an RS485 bidirectional pair will work just fine between two devices connected with a single ended (non-differential) circuit, provided that the distance/noise level does not require a differential solution. <S> Of course this would not strictly speaking be RS232, but a custom extension thereof.
A direct connection, without the modems, uses a crossover cable (RxD on one side is connected to TxD on the other side, and vice versa).
Will there be any effects on a signal in a long wire? I am going to need a large length of wire from my microcontroller analogue input to a LDR or similar sensor. The length of wire is likely to be about 100m so will it have any affects on the reading the ADC? Is there anyway I can reduce the effects? <Q> Yes, normally you would not put a sensor 100 meters from the ADC. <S> Why? <S> Because that length of wire will experience voltage drop due to the resistance of the copper wire, doing a quick estimate to demonstrate, using 24 AWG ( wire gauge chart ) <S> the resistance would be in about 8 ohms. <S> Using Ohm's Law and say 10mA of current (my guess, small signal level) that would equal about 0.1 volts drop. <S> V = <S> I <S> * Rvoltage drop = <S> 10mA times 8 ohmsV = 0.010 <S> * 8 = <S> 0.08or approximately 0.1 V. <S> If it's a 5V signal that's 2%, enough to lose accuracy. <S> Normally for a signal to be transmitted reliably over a longer distance, and resist interference as well as handle the wire resistance, you can do a few things. <S> The first is to increase the voltage, say use a 24 Volt signal rather than 5V (or 3.3V) or <S> whatever the limit of your ADC input is. <S> This can be useful, and is what RS-232 <S> (EIA-232) serial protocol does to improve communication reliability over a distance. <S> The second is to use a current loop , where the information is encoded as current differences, such that LDR value is encoded near the sensor, and the current loop spans the 100 meter distance. <S> This would require a current loop transceiver at either end of the distance, and at least one end of the loop should have a robust power supply to provide the necessary power for the loop. <S> A third way would be to use a differential signal , where two wires ( balanced transmission lines) span between the LDR sensor and the ADC. <S> The difference between the two values is the actual signal . <S> This has very good common mode interference rejection (filtering). <S> Examples include RS-422 , and most Ethernet modes. <S> There are line-drivers ICs for RS-422, similar to the popular MAX232 transceiver / driver for RS-232 serial communications. <A> It will probably pick up interference. <S> Maybe you can use the same circuit design as a microphone, with the two LDR wires inside a shielded cable and equal loads and a diff amp at the other end. <S> Since you're going to an ADC, I'm guessing your LDR signal changes slowly relative to the time it takes for a signal to travel 100 m (500 ns), so you don't need to worry about transmission line effects . <S> The resistance of the wire probably won't affect it, either, if the sensor's resistance is in the kiloohms. <S> The wire might be 50 ohm <S> or so by itself. <S> Actually, if your LDR signal changes slowly relative to the interference, the diff amp could be overkill and you could just filter the interference out with a low-pass filter. <A> Your 100 m of wire will act as 1 big antenna an pick up all kinds of EMI (ElectroMagnetic Interference). <S> A lower impedance at the end of the wire also reduces EMI, but the lower this impedance, the more the wire's resistor comes into play. <S> You may have to adjust your ADC reading for the loss. <A> This would be an ideal application for an AT-tiny, which is an 8 pin AVR. <S> Flash the Tiny to just loop doing the ADC conversion, and transmit your information over the 100m of wire by bit-banging the digitized signal. <S> Given that the signal will be changing only very slowly, you could send back single bytes, say once per second, at a low baud rate (e.g., 2400bps). <A> If you don't want to program an AVR as per JustJef's suggestion you could try a one-wire analog-to-digital converter like DS2450 from Maxim. <S> This is a quad ADC. <S> It should be able to send data up to 500m if you follow their guidelines. <S> (I was easily able to get a DS18B20 temperature sensor work at 30m on basic alarm cable).
You could use a shielded cable, as endolith suggests, or a decent twisted pair (decent = enough twists per meter). Running the signal back as analog over 100m of wire, you're apt to collect a bunch of unwanted noise, to which a digital signal should be immune.
What are current PCB surface protection techniques? What are the different tinning techniques for PCBs, and what are the advantages of one technique over the other? <Q> The easy answer is that you should look at the options your board house offers and then research that. <S> but it can leave a slightly uneven surface, which might mean something if you are doing BGAs. <S> OSP <S> , Organic Solderability Preservatives: <S> A very thin coating that keeps oxygen away and evaporates when soldering, it looks as though there is just bare copper on the board. <S> This page has a good description of these and other finishings: http://www.multicircuits.com/pcb/tech/surface_finishes.html <A> Immersion silver seems to be getting popular for RoHS boards. <S> It gives a very flat surface, and is fine if boards are soldered quickly. <S> Some companies use immersion gold, even on low-cost boards. <S> Silver can oxidise over time, which apparently can affect solderability, so gold might be better if boards are to be stored. <S> I've had no problems hand-soldering boards finished with both immersion silver and immersion gold (lead solder), and neither has the company I use sometimes for surface-mount board assembly, using lead-free solder paste. <S> Gold plating has been used on connector pins for years, and has never caused soldering problems. <A> Most of the work that I did in recent years have called for ENIG - Electroless nickel immersion gold. <S> The plating comes out nice and flat, which is not the case with HASL. <S> It also looks pretty, but that's a subjective thing. :)
Common options I've seen are: HASL, Hot Air Solder Leveling: They bascially coat the entire board in solder and use a air knife to blow the excess off, it's cheap
Why don't we have wireless charger in every portable device yet? Today I found Texas Instruments announced a circuit for wireless charging - Ti BQ51013 Qi receiver controller - all the materials emphasis how tiny, lightweight, portable, efficient and otherwise cool it is. While I of course like the idea I don't get one thing. What's so hard in implementing such circuit in just all cell phones allready? Every other company introduces so-called "charging mats" that also require en extra gadget attached to the wireless device to make it receive power from the "charging mat" and I guess different systems are incompatible with each other, but there're almost no devices with built-in wireless charging (except maybe shavers and toothbrushes). It's year 2011 and we have microchips with millions of transistors on them - why don't we have such simple thing as wireless charging in every applicable device yet? What's the technical difficulty here? <Q> It is still fairly expensive to add to devices. <S> You have development time and cost since cell phone companies have never added this feature before. <S> I would have to imagine the cost to do this is fairly significant. <S> Cell phone companies will have to do a fair amount of testing to insure that the charging doesn't have any adverse effects on the phone. <S> You can argue that there are already people using these types of chargers on phones, but you have to keep in mind that these systems are still outside of the phone for the most part. <S> When you bring it in to the phone itself there are potentially areas of issue, like inductively coupling to data lines that are already pushing the limits of speed, any extra unwanted noise can be very bad. <S> You have the cost of the IC and board space. <S> The IC is about $3.50 each. <S> And even though the ICs biggest claim is how small it is, you seem to be forgetting that this IC is new so no one has had a chance to use it yet. <S> But even with how small it is, board space is limited. <S> Figuring out how to fit it all in is extra engineering time and the extra component is slightly additional fabrication cost, maybe only less then a cent more, but these companies are already counting every penny. <S> As @stevenvh mentioned, if you have wireless charging you can remove the external power connector which will save lots of space. <S> However, people still want a USB port. <S> It will be a little while before people are "ok" with the idea of just using bluetooth to transfer data between the phone and computer. <S> In fact there are still phones out there now that have their bluetooth so locked down that you just have to use a USB cable in some situations. <S> Public view still is not great. <S> There is a large amount of people who are very much against the idea of wireless power. <S> Reasons behind it range from it being less efficient to it causing cancer. <S> You can try to debate these points all you want, but it isn't going to change the minds of people in the general population. <S> So overall, extra cost that just results in not much gain (at least as of now). <A> Give it some time. <S> There are surely advantages to it (space saving: not needing an external power connector, with all the protection that comes with it), so I expect we'll see this in mobile phones in the near future. <S> edit <S> There's also the issue of electromagnetic pollution. <S> If you want to charge your device in a reasonable time you'll have to generate a rather strong HF EM field. <A> As I said above, heat may be an issue, RF blocking materials could be an issue, EMI as well, charge rate, blah blah blah. <S> Theoretically it works, but practically not yet. <S> TI's chip may be good, but if only TI is making it <S> it's expensive. <S> We need Fairchild, Linear, National and all the others to roll out their own solutions as well before this party gets started. <S> Technology tends to take off when there are large amounts of cheap, effective chips available for a purpose. <S> That's why it took a bit for MP3 to take off after it was created <S> - application-specific integrated circuits that could decode it easily had to license the standard, be created, refined, made smaller, integrate more features (ie, on-chip amplifier, mono/stereo output selection, digital communication bus, etc) and become easier to use before you can have a USB pen that plays MP3s. <S> Wireless charging will come - I've got one of those wireless charging pads for my Wii-motes and it rocks. <S> Of course, the battery and antenna are integrated together, so it acts just as a battery replacement. <S> You may not be able to do such a thing with phones. <S> Just give it some time. <A> It's not just a little chip that gets added to the product, there's also a coil of wire that has to go inside. <S> In a very slim and tightly packed device like a smartphone, there may not be room for it without compromising the design slimness. <S> The TI chip is $3.50 just for the receiver IC, while the transmitter side will cost money too, as well as the wire, any passives like capacitors, etc. <S> As most U.S. phones are subsidized by the plan, that's a $15 loss for the carrier unless they can charge more for that model, or increase their subscriber base by attracting new customers with a cool phone.
Size is an issue - people want phones to be smaller->less antenna area->less coupling->less power transfer->longer charge time. The cost is nontrivial. An attention point may be the size of the antenna. To go from bill of materials cost to retail is usually about 3x, so wireless power could add some $15 to the price of the product.
How does a wireless charger work without a magnetic core passing through both "coils"? Every time I hear the description of a wireless charging system it goes like this: "remember a transformer? It's the same here - one coil is in the base and another is in the device and when you put the device onto the base the transformer gets assembled and starts transmitting power". One problem with this description is there's no magnetic core in the system. AFAIK each transformer has a magnetic core in its design. A magnetic core is a huge set of steel plates that goes though both coils and this set of plates in fact conducts energy - the alternating current in the primary coil induces alternating electromagnetic field in the core and that field induces current in the secondary coil. So looks like the core is a key component and a transformer can't possibly work without a core. Yet I don't see a magnetic core in a wireless charging system. How does it work without a magnetic core? <Q> the alternating current in the primary coil induces alternating electromagnetic field in the core and that field induces current in the secondary coil <S> Yes, but "in the core" is not necessary. <S> A coil creates a magnetic field all around it, whether there's a core there or not. <S> You can also make the transmission more efficient by putting a capacitor in series with both coils so that they resonate at the same frequency: http://en.wikipedia.org/wiki/Resonant_inductive_coupling <A> A good example of electromagnetic induction without a metal core is a passive RFID tag, which has no battery. <S> Instead, its draws power from the reader, which sends out electromagnetic waves that induce a current in the tag's antenna. <S> The distance between the tag and the reader can be several inches. <S> Obviously at this distance, very little power can be transmitted, but it illustrates the principle. <A> A metal core is advisable because it concentrates the magnetic field. <S> This makes magnetic coupling between coils more effective, but you can do it without the core too, especially if both coils are tightly coupled (mechanically close to each other). <S> If you don't have a core and the two coils are some distance apart, part of the generated field will pass outside of the other coil. <S> (In a transformer the outside metal "shortcuts" the field, increasing it. <S> Without this outside metal the field would fill a large volume around the core.) <A> All that's required for a transformer is that the magnetic fields of the two coils are linked. <S> Iron cores make this more effective at power and audio frequencies, but at radio frequencies (more than a few 100kHz) cores actually become a liability.
The core just confines the magnetic field so that less of it "leaks", which makes the transformer more efficient.
Rotary encoders to ensure 2 wheel robot goes straight! I have successfully counted the rotary encoders on the wheel of my robot so this is not a problem. My problem is what to do with this number. Basically, the bigger problem is that I need my robot to go straight and I want to do it using only two encoders (one on every wheel). Even if I send the same amount of power to both motors the robot does not go straight. This is why I decided to use encoders, so no matter the power on the batteries, or the conditions of the motors; the robot will go straight. So, now that I have successfully counted the "clicks" on the encoder I need to know what to do with the number to make sure the tow wheels are synchronized. This is the code I am using (Arduino): digitalWrite(dirMotO, HIGH); digitalWrite(dirMotE, HIGH); //digitalWrite(motO, HIGH); analogWrite(motO, 150); //digitalWrite(motE, HIGH); analogWrite(motE, 150); PololuWheelEncoders::getCountsAndResetM1(); PololuWheelEncoders::getCountsAndResetM2(); while(PololuWheelEncoders::getCountsM1()<clicks && PololuWheelEncoders::getCountsM1()<clicks){ if(PololuWheelEncoders::getCountsM1()>=clicks){ digitalWrite(motO, LOW); } if(PololuWheelEncoders::getCountsM2()>=clicks){ digitalWrite(motE, LOW); } } I thought this code would make sure that if one wheel gets to counts before the other it would stop and wait for the other wheel but the robot does not go straight. I would really appreciate some help on this. Thank you! <Q> Your while loop logic is incompatible with the conditions inside it. <S> Your while loop is saying: as long as BOTH wheel encoders read less than clicks, execute the code inside and your if statements are saying: if any of the wheel encoders is greater or equal to clicks, stop the corresponding motor <S> This is generally false except for the rare condition where one of the encoders happen to increment between the arduino evaluating the while and the if statements. <S> In order words just about never. <S> So the first thing you need to do is fix your logic. <A> I assume clicks is the number of encoder ticks you want to go forward. <S> This answer depends on clicks being slightly large- <S> more then a few multiples of <S> the wheel tick count- below that I'm not sure of the performance of this method. <S> Part of the problem is that you're correcting by completely turning off one motor. <S> That means that those wheels are effectively stuck, and start to act as a pivot. <S> You want to make corrections with both wheels moving. <S> What you need to do is try and keep the difference between ticks of the two motors as small as possible while running. <S> As an example, if you have 16 ticks per rev, and want to go 100 ticks, you want to keep the difference in ticks as near to 0 as possible, by applying more power to the slower motor, and less to the faster one. <S> Code left as an exercise to the reader (it depends on how you want to manage the variability: update the analogWrite's 10 times a second? <S> 20 <S> ? 5?). <S> This probably wont work as well for a small number of ticks (1 rev), and the various laws of accumulating error mean it probably won't be perfectly straight for large numbers of ticks either; <S> but it should give better results <S> then what you have now. <A> Have you considered closing a velocity loop instead of a position loop? <S> Initially, accelerate at a reasonably slow rate <S> so there's less of a chance of the two wheels getting out of sync. <S> If both wheels are moving at the same velocity, then your robot must be moving straight, barring any sort of coupling slippage or slipping between the wheels and the surface your robot is riding on. <A> a simple way i got my robot to go straight was by using three while loops, while one wheel is counting slower, increase the speed on that wheel. <S> one loop is for the left, one for the right and the last just tells the program to write equal speeds if count is equal <S> but you can leave it out. <S> hope this helps. <S> and dont forget to inpu a break; command at the end opf each loop other wise <S> it will stay in the loop even after condition has been met <A> Sorry I'm a bit late to the party, but in case anyone else wants to do something similar, a simplistic approach which may be worth trying is to continuously compute the number of ticks each wheel should have moved, and then within a timer tick do something like: volatile unsigned long expected_left_distance, expected_right_distance;volatile unsigned int left_speed, right_speed;unsigned long left_distance, right_distance;void timer_tick(void) // <S> Run this at a rate faster than once per encoder pulse{ int delta; Add or subtract 65536 from left_distance if encoder has moved +/- <S> a click Add or subtract 65536 from right_distance if encoder has moved +/- <S> a click expected_left_distance += <S> left_speed; expected_right_distance += right_speed; if ((left_distance - expected_left_distance) & 0x80000000) // <S> Assumes long is 32-bit left_motor_on(); else left_motor_off(); if ((right_distance - expected_right_distance) & 0x80000000) right_motor_on(); else right_motor_off();} <S> A speed value of 1 will move the robot at a rate of one encoder pulse every 65536 interrupts; a speed of 64 would move it 64 times as fast (once every 1024 interrupts), etc. <S> Depending upon the design of the motors, the mass of the system, and the encoder count rates, this motion might be adequately smooth, or it might be unacceptably jerky and uneven. <S> It may be worth trying the approach, though, to see if it works.
Then you need to investigate more sophisticated means of keeping the wheels in sync, such as computing an error term from the different in ticks, and employing a PID controller algorithm to adjust the speed of both motors via analogWrite .
Are jumper wires just wires with insulation cut off on both ends? Is there a specific purpose for jumper wires like these where they have female pins at the ends? I'm assuming they are mainly useful when you want to chop a wire into something like a breadboard, but the wire is too thin or flimsy. If the wire is thick enough, I'm assuming a wire with the insulation cut off on both sides is equivalent, right? Seems like a common sense question, but I haven't really seen wires with female pins attached on both sides before.. :) <Q> If you are connecting to actual female pins, it does help to have the right sized male pin crimped onto your jumper wires. <S> But if you're just using them on a breadboard, bare wire ends are fine. <S> Just make sure to cut the wire with diagonal cutters, not scissor-type cutters, so that you get a nice pointy end. <S> The shearing action of scissor type cutters can sometimes roll the wire end enough to make it snag in the breadboard. <A> Only potential reasons for maybe soldering male header pins on the end would be if using stranded core wires or a really small gauge solid core (like 24 or 26 gauge). <S> A lot of in-wall cat5/cat6 cable is going to be 24 gauge solid core which should work as-is in most breadboards. <S> 22 or 20 would give a firmer/more-confident connection though. <A> Looks like you're wondering if having female ended wires available is useful?BTW <S> The ones in the link look like double male ended wires. <S> (which yea generically you could get by with a wire).
As far as female I think a useful aspect would be if you have two sets of components with headers connected, then you can just connect the "male headers" to male headers and you're golden.
IC chips and datasheets I'm still just beginning my adventure into electronics and IC chips and datasheets have me confused so I'm going to ask a series of beginner questions will help me and hopefully others as well. There are many different IC and IC manufactures out there. Specifically for the 74 line, are these chips standard across the different manufacturers? If not, what are generally the differences between them? Will it matter if I mix and match different ICs from different manufactures? Datasheets, for some reason these tend to be horribly thought out and rather difficult for a beginner like me to decipher (I've noticed TI is notorious for this, giving abbreviations to all their pins without any explanation. What the heck is OE?). Is there a company (assuming that all chips are standard between different manufacturers) that provides clear and concise datasheets for all of the 74 IC chip line? <Q> OE is Output Enable. :-) <S> Logic ICs with the same number have the same functionality and pinout across manufacturers. <S> A 74xx32 is always a quad 2-input OR gate. <S> The technology used may be different though; a 74LS32 is low-power Schottky, while a 74HC32 is high speed CMOS. <S> These families have their particular properties, which you'll find in a "Logic Family Guide". <S> Sometimes there are small differences in the details. <S> I remember a Schmitt-Trigger inverter I once use for an oscillator, which generated a complete different frequency when using make Y instead of X. Reason: different trigger levels, these are not standardized. <S> I never realized this before, but you're right: the datasheets have many terms and abbreviations which are not clearly explained. <S> At least not in the datasheet. <S> The datasheet often refers to the Logic Family Guide, which contains information concerning the whole series. <S> That way they avoid datasheets becoming twice as long because they contain all this information time and again. <S> edit I checked with a few datasheets from different manufacturers, and I must say, it might have been worse. <S> For many parameters there are tables with a column "symbol", and next to it a column "parameter", which describes it briefly. <S> The "OE" appears as abbreviation in truth tables, but for what it stands for you'll have to read the ICs description. <S> See also this answer about datasheets. <A> You have to be careful how you define 'type' here though; those letters in the middle (e.g. LS, HCT, and so on) will result in different speeds, current capability, etc. <S> Better data sheets will have a 'pin description' section, which will tell you what things like 'OE' actually do. <S> For example, OE is almost always 'output enable'. <A> Typically, one manufacturer will develop a part and offer it for sale. <S> If that part is successful, other manufacturers will develop substitute parts to match, either because there's a market-wide demand for the product, <S> and/or because the original manufacturer licensed the design to others to assure a second-source supply of the part. <S> In most cases, the secondary producers will use similar technologies to achieve similar performance specs. <S> It's the technology that generally drives the performance of the part. <S> That is why for the smaller IC's (74xx and 40xx), there's a "family" of parts. <S> The 74 series actually have many different families - the original 7400 family, the 74S, 74LS, 74F, 74HC, 74HCT, and so on (look at the Wikipedia entry on the 7400 series ) -- some of the technologies within the overall 7400-series varients are quite different from each other, and the main reason why they're named 74xx is because the naming of the devices are kept the same for the same functionality. <S> So you know that a 74(foo)00 is a quad-NAND, 74(foo)373 is an octal transparent latch, and so on. <S> As stevenvh pointed out, there's usually a "family guide". <S> Actually, there used to be dataBOOKS that had the family technology information in the front, followed by the per-device data. <S> As these big encyclopedic books have fallen out of favor, you now mostly see individual datasheets, and a separate guide to the technology.
Most chips of a certain type will have nearly the same specifications.
Is there an easy way to test if my PS/2 -> USB adapter is passive? I own a couple of PS/2 to USB adaptor/converter connectors that look like the following: Is there anyway to test if these adapters are passive without disassembling them (or risking damage by disassembly)? In all likelihood, they are passive as the active converters usually have a chip of some kind embedded in a cable to actively convert the protocol. <Q> We pulled apart one of those <S> and it's all wire or passive. <S> The mouse that they come with must detect what it's plugged into USB or PS2 and do the right thing. <A> All USB mice are capable of sending to a PS/2 port. <S> This was by design because there are still many people who need to use PS/2 (for KVM's and such), but it is not reasonable for companies to continue to manufacture 2 separate items. <S> Because of this, adapters like those are purely passive as the mouse itself is the one that figures out what it is connected to. <S> However, it doesn't work the other way around since PS/2 devices never had any idea of what USB was. <S> I did come across something interesting though, it looks as though you can plug a flash drive into a USB->PS/2 converter and then plug that into a PS/2->USB converter. <S> Not really sure how that actually works though. <A> You can check this with a regular multimeter on continuity mode. <S> On an active adapter, there will be continuity on the power pins (VBUS and GND) and shielding only.
On a passive adapter, the data pins will also have continuity.
Are there any viable sound IC's in older consumer PC sound cards/modems for diy/circuitbending? I watched some diy synthesizer vids on youtube, mostly APC's, and I thought since most use the 556/555's, what if we used something different. As fun as buying kits are, sometimes, we are broke, but still inspired. So, I went into my closet and found 7+ modems(mostly ISA) and 6 sound cards (all SB; vibra16 ISA, awe64 value, SB16Pro2, Live value, live platinum and audigy 2 platinum). A little research suggested the vibra 16 was the most outdated and pretty much useless, so it's now wearing a red jumper. I couldn't find any schematics for any of the boards or IC's. Am I totally off base thinking I can salvage an IC to use as a simple tone generator like an APC type synthesizer? I included modems in my search because I recall the sounds they made when dialing up, and I thought, hmmm, if that were modulated and probably slowed down it might work as a tone generator. I admit I am new to this, so identifying the correct chip to use and well, which pins do what is a little confusing. Oh, and modems and soundcards are also a good source for jacks (the sbpro2 actually has a volume pot, ha). ps- this all started last wednesday when my Roland D2 arrived from a stint on ebay and the left channel is out, after running it thru test mode, I don't think it's more serious, theoretically than cold spots that will go away after being reflowed, but wanted to warm up to possibly ruining the piece of gear with a distraction. <Q> The modem ICs are rather limited in the sound they can generate. <S> You have FSK (Frequency Shift Keying), which switches between two frequencies depending on the input bit's value. <S> More advanced modulation methods include PM (Phase modulation), but that doesn't add more frequencies. <S> The dialler will be a DTMF (Dual Tone Multiple Frequency) generator, which generates a pair of frequencies from a limited set of eight. <S> So that's out as well. <S> They may be very versatile, but unless you can find a datasheet they're useless. <S> I looked around a bit and found the SSG01 Sound Coprocessor IC , which may also be interesting. <S> (Yes, I know you're broke.) <S> It has a simple interface: it's controlled via EIA232 and outputs a mono audio signal. <S> Unfortunately the link to the datasheet on the page is dead. <A> Nowadays the best bet for DIY sound is probably something like an ARM chip with built-in DACs. <S> I'm not sure they're available in convenient packages for DIY work, but someone may make homebrewing modules with the parts pre-soldered and the DAC output pins exposed on a header. <S> An ARM should be able to do a decent job of generating multi-voice FM or wave-table synthesis, and probably throw in some FIR or IIR filtering as well. <S> FYI, I'm not familiar with the particular "sound coprocessor IC" mentioned, but I strongly suspect it's something like a PIC 18Fxx. <S> An ARM chip would be far more capable than that, probably for comparable cost. <A> While likely inferior to more modern solutions in both cost and ease-of-use, it's entirely possible to interface 8 (or less conveniently) 16-bit ISA cards to embedded projects. <S> However: Parallel interfaces are less convenient for many embedded projects than serial busses such as SPI Drivers and on-board bios extensions would have to be re-written, since they won't work on your embedded processor or its operating system (if any). <S> Cards for which sufficient low-level programming information is available would be a requirement - those with open source drivers would be good examples. <S> you will need 5v tolerant <S> I/ <S> O <S> You will have to supply not only 5v power, but possibly also 12v especially if the board uses that to derive its own cleaner analog supply. <S> they are big and clunky and power hungry by modern standards <S> If you go this route, make sure you have more than one of the board - nothing worse than doing a lot of work around irreplaceable hardware and then accidentally breaking it.
Creative Labs used custom chips on its SoundBlaster boards.
Low current, long life batteries with an extended temperature range? I'm working on a product with a specified -40 to 85 degC temperature range, and I'd like to have a RTC with a coin cell or similar battery backup. Beyond that temperature range, damage to the battery is acceptable... as long as it doesn't explode under 125 degC. I also believe that my initial client's industry has an aversion to the word "lithium", so lithium-anything is potentially problematic. (Unless I can point to something very authoritative saying it's perfectly safe and that it adds no hassles in shipping requirements) It doesn't need to be rechargeable, really. It'd be a bonus, but not a requirement. What reasonably attainable battery fits these criteria? <Q> You'll have to do some searching to find exactly what you want, but it's out there. <S> For example, here's a link to some Panasonic batteries that work from -40 to +125 deg C: <S> http://www.panasonic.com/industrial/batteries-oem/oem/primary-coin-cylindrical/high-operating-temperature.aspx <S> That web page doesn't say it's lithium, but odds are that it is. <S> That might be one thing that your client will just have to deal with. <S> The other option is to do some out of the box thinking. <S> Maybe a small solar cell plus supercap. <A> What kind of battery capacity and RTC duration do you need? <S> That said, double check the regulations on lithium batteries. <S> The rules keep changing around - I don't know the exact state of things today, as I haven't looked at making a new RTC circuit in a few years - but many batteries are sufficiently low-energy that they are allowed for air shipment. <S> Coin batteries, IIRC, are ok. <S> I believe your first step is to e-mail your battery supplier (in my case, it was Panasonic, via Digikey) to ask for their latest document on safety and transportability. <A> Super capacitors will not work because the electrolyte will freeze. <S> Perhaps newer versions don't have this problem. <S> But I haven't seen anything like that yet. <S> The only option is a lithium based battery.
Lithium is no less reliable than other chemistries. That being said, there are other battery chemistries like Silver Oxide, Zinc Air, and Alkaline Manganese that might work for you-- but a quick search of the Duracell web site didn't return any temperature data for those. If your duration is short enough, a super-capacitor might be the better way to go.
Why do speakers sound different when they're not fully plugged in? I've noticed that if there's not a good connection between my jack and the port, like if it's dirty or half plugged in, then the sound is different, but there is still sound, and sometimes twisting it around makes it sound better. Why is that? I was looking at some schematics of a 3.5mm headphone jack, but it doesn't look like there's a "this part of the jack gets the treble" thing going on. You'd think that if there's a signal at all, it doesn't matter which way the jack is twisted since it's a ring inside a ring anyway. <Q> In the case of the actual frequency response: The connector and stuff inside the speaker form an RC filter (a low-pass filter). <S> The connector is the R and the stuff inside the speaker is the C. As R goes up, the cutoff frequency of the low-pass filter goes up. <S> Normally, the R is less than 1 ohm, so the cutoff frequency is very low (less than 5 Hz). <S> But if the connector is bad or dirty then the R could be several hundred ohms, which could increase the cutoff frequency by several hundred times. <S> The net effect is that the bass is all cut out. <S> And for perceived frequency response: <S> Human hearing is very weird. <S> At low volume levels, our ears simply don't pick up some frequencies very well -- usually the low and high frequencies. <S> We're more sensitive to mid frequencies. <S> So, as you reduce the volume level we perceive that the low and high frequencies are being cut out more than the middle frequencies. <S> The "Loudness" button of a stereo attempts to compensate for this by boosting those frequencies and therefore making us hear a more balanced sound at low listening levels. <S> If the connector is bad or dirty, less power will be making it to the speaker and causing a lower volume level. <S> But due to human hearing, we would also hear less low and high frequencies-- making it sound like we're listening through a phone or something. <S> This is an over-simplified answer, but reasonably accurate for your purposes. <A> For the case of it being dirty, turning the jack will many times help get a better connection. <S> The reason it actually sounds poor is that the dirtiness causes noise to be added, signal to be cut, and a filter to be generated. <S> There are different types of filters like low pass, band pass, high pass, etc. <S> Depending on how the poor connection is made it can cause an effective filter. <S> Also depending on how you have the jack turned there will be different characteristics of noise and signal. <S> For the case of it being half plugged in, you end up with things connecting to places they shouldn't be. <S> Many times the Left and Right channel will get shorted together which can cause some phase cancellation, you can also end up with ground shorting the channels, but it can be a light short, which in turn will cause an effective filter as well. <A> The problem is more likely the common for both speakers becoming disconnected, putting both speakers in series across the L & R channel outputs. <S> The sound will be in mono, AND, because the bass is mixed approximately equally between the 2 speakers, the 2 outputs are in phase & equal potential, so there is little or no voltage between them at bass frequency. <S> What you will mainly hear is sounds mixed for the rear speakers on a surround sound system (equal & opposite phase). <S> The tip of the jack is the left channel, then the right, then the common, and, for earphones with extra functions like switches & a mic, the body is used for that. <S> I don't know why the body isn't always the common. <S> My suspicious mind tells me that Apple probably set that standard so you have to have Apple equipment to ensure they connect properly.
The simple answer is: Changes in resistance/impedance at the connector or cable can change the actual or perceived frequency response that you hear from the speaker.
Is it possible to reverse engineer a chip design? Can we make something like chip reader, which can understand chip design and generate blueprint of it? <Q> ChipWorks has an excellent blog about doing exactly this, with lots of great pictures here . <S> FlyLogic also has an excellent blog. <S> It is here . <S> The short answer is it is absolutely possible. <S> IC DIEs are basically really small circuit boards. <S> You can reverse engineer them pretty easily, it just takes a different tool set. <S> I want to particularly call attention to some posts flylogic <S> did on reverse-engineering ICs (how topical!) <S> here <S> and here . <S> Image from flylogic website <A> Yes. <S> There are companies out there that specialize in this. <S> This is done all the time, although it's more of an art than a science. <S> Usually they do some wacky chemical and mechanical etching process to progressively strips off the layers of the chip (like the layers of a PCB)-- taking detailed photos of each layer. <S> Normally, these companies do it to help people like T.I. and Intel figure out why their own chips are failing, but you can bet that there is some illegal uses of this too. <S> Here's an interesting and relevant article that I just ran across: http://www.forbes.com/forbes/2005/0328/068.html <S> And another link: http://www.siliconinvestigations.com/ref/ref.htm <A> Another way to copy a chip design is to emulate its functionality using an FPGA. <S> Many emulations of older chips like the Z80 and 6502 are available. <S> Some students even produced their own version of an ARM device and made it available via the Web, but had to delete it when ARM threatened legal action. <A> For instance, the above picture appears to be an older chipand from the color changes in the background you can see that it has been polished to remove a layer. <S> Typical deprocessing processes involve polishing with specialized polishing/lapping machines or wet chemical etching with more or less dangerous chemicals. <S> However, for more recent chips the process sizes are so small that you will need sophisticated and more expensive equipment such as a plasma etcher, a Scanning Electron Microscope (SEM) or a Focused Ion Beam (FIB).Due to the complexity it is also no longer that easy to extract logic (i.e., the netlist information) from the chip. <S> Today, companies thus use automated tools that typically process the obtained SEM images of chip layers to generate the netlist. <S> The challenge here is deprocess the chip so that deprocessing artifacts are avoided as they would be problematic for any subsequent automated analysis. <S> There are some Youtube videos and conference talks on chip reverse engineering. <S> For instance, in the video here you can see a smaller setup that people could use even at home: https://www.youtube.com/watch?v=r8Vq5NV4Ens <S> On the other hand, there are companies that can do this kind of work with more sophisticated and expensive equipment. <S> In addition to the above mentioned, IOActive has a lab for this kind of work. <S> In the EU there are also companies. <S> For instance on the Trustworks website, you can see a few pictures and some of the necessary lab tools to do this kind of work: https://www.trustworks.at/microchipsecurity .They also appear to have microchip reverse engineering software tools if you specifically look at their "Netlist Extraction and Analysis" section.
While reverse engineering of old microchips is feasible with an optical microscope and manual polishing, the challenge is to cleanly strip off layers.
How would you detect vampire/standby power? Is it possible to detect when a device is consuming power in a stand-by or nominally off state? For example if I leave my charger plugged in, detect that a small amount of current is being drawn and stop the flow. What about turning it back on? For example, plugging in my phone it could detect the demand and turn the flow back on. How could you create a device which could turn an outlet on or off depending on the load? <Q> I think you're laboring under a false assumption. <S> It will always be consuming its 'phantom power'/'vampire power' (cue the Twilight fangirls!). <S> All of the outlets that are slaved to the 'control' outlet will be off until the 'control' outlet has enough current flowing through it to trip the circuit. <S> As others have suggested, this is the only reasonable way to do it - you can't be continually switching something on and off just to test whether it's on. <S> I have such a power strip for my home entertainment system <S> - older solutions were to run power through your receiver via a built-in pass through. <S> When the receiver is off, the passthrough is off, when on, it's on. <S> I can't say for certain whether it's saving me any money <S> but it definitely means fewer absurd 'off' lights on the electronics (seriously, a light that's on when the device is off? <S> Crazy). <S> If you want to measure this 'phantom'/'vampire' power, get a Kill-a-watt . <S> It measures power draw of whatever is plugged into it. <S> I haven't used one yet but many people rave about them, and Lady Ada hacked one to put an Xbee unit in it for datalogging purposes, so they're at least popular. <A> You wouldn't be able to totally isolate the flow, because once you did that, there'd be nothing to detect: plugging something in to an 'off' power bar doesn't lead to any power flow that could be detected. <S> There'd have to be some sort of cycle-on, cycle-off mode of operation - turn the AC on, measure the power, make a decision to stay on or shut off, and repeat. <S> Measurement is tricky as well - you may well need instrumentation-grade current metering to detect the low current flow, which can also withstand the 15A of a usual circuit without frying. <S> Some components may draw larger amounts of initial power to get going, before they settle into a quiescent state. <S> Many components hiccup on and off by themselves. <S> The detector will have to deal with all of these variables as part of its logic. <S> Also, the control circuitry (and AC controls) will themselves consume power. <S> You have to figure if what you can potentially save is worth the power budget needed to save it. <S> Finally, whatever you have plugged into this power bar will need to be able to withstand numerous perpetual turn-on and turn-off cycles. <S> This is quite stressful for power supplies in general (due to inrush current). <A> Use a Kill-a-Watt to measure it.
Where there are power strips that turn outlets off to save power based on a 'control' outlet, the 'control' outlet is always live.
How do they remote control the military drones? I am interested to remote control something (sorry for the vagueness) over a distance of several hundred kilometers to a place where there are no internet cables. Therefore, I am interested to know how the US Military remote controlls their drones. My best guess is via satelite communicatation, but wouldn't there be too much lag to make this a feasible option, at least when considering the speed these drones fly with? I also wonder whether such satelite communication is available for civil purposes at a reasonably affordable price? <Q> Try checking out http://www.diydrones.com/ <S> it may answer a lot of your questions. <S> As for multi-km links RF waves travel at the speed of light which is 299,792,458 meters per second <S> that's more than fast enough for realtime control. <S> The problem with long distance links is that for a frequency high enough to support realtime high-quality video such as microwave frequencies are line of sight for the most part. <S> In order to get past free space attenuation you'll also need some power over FCC legal limits I'd assume, but you can get past that by getting an amateur radio license. <S> There are ways around this, directional antennas <S> but thats a whole story by itself.(I <S> am not a lawyer <S> , I am however an Amateur Radio Operator) <S> Free space attenuation of signals (path loss) can be calculated as follows: <S> Lfs = 32.45 + 20 <S> log d + <S> 20 log f <S> Where Lfs = Free space loss in dB <S> d = distance in km f = frequency in Mhz Hope this helps! <A> Microhard http://www.microhardcorp.com/ make nice tiny, light 900Mhz (ISM band) <S> radio modules that bridge ethernet (and serial and USB) 1.5Mbps over 90-100km without a repeater. <S> Add a repeater every 90-100km, or put the repeater on a tall hill every 300km <S> The export restricted versions do 128 bit encryption as well. <S> We use the unrestricted module on our robots, which are a lot like US military drones. <S> Our old military UAV had an older Microhard radio module (lower bit rates). <S> I'm pretty sure most of the short range ( 1-200km) stuff is using the 900Mhz band. <S> The module the size of a big matchbox and lightweight. <S> Why use the 900Mhz ISM band? <S> Because it works well, even in built up areas. <S> Doesn't need a special radio license to use. <A> I remember reading an article about how the older drones used an unencrypted wireless signal (apparently they've all now been retrofitted with newer hardware that can support real-time encryption of video). <S> Unfortunately, I don't know where I read this article.
My guess is they just use a high powered transmitter to send a signal to a base station that can then relay the data with a more traditional network anywhere they need it.
What is the difference between frequency modulation and phase modulation? What is the difference between frequency modulation and phase modulation? <Q> A signal that is phase-shift modulated with some continuous signal f will have the same waveform as one which is frequency-shift modulated with the derivative of f. <S> Likewise, a signal that is frequency-modulated by some signal f will have the same waveform as one which is phase-modulated by the integral of f. Note that in some cases, it may not be practical to take the integral or derivative of f, so some signals can only be meaningfully represent phase modulation and others may only meaningfully represent frequency modulation. <S> Even though the waveforms of a frequency-modulated signal and phase-shift-modulated signal may look similar, however, there's often another important distinction. <S> Phase-shift modulated signals are often modulated relative to some other reference signal. <S> In some cases, the reference may be a signal sent on another wire. <S> In other cases, the reference may be a signal which was sent at an earlier time on the same wire. <S> In NTSC video, for example, every scan line starts with a few cycles of a 3.579545Mhz reference sine wave. <S> Colors later in the line will be encoded by waves that have a certain phase relationship to that reference wave. <S> Yellow, for example, will be represented by a wave whose phase matches the reference; blue will be represented by a wave 180 degrees out of phase. <S> Red and green are represented by waves +/- <S> 90 degrees out of phase. <S> Note that all solid colors are be represented by the same frequency; the only difference between them is the phase relative to the reference wave. <A> Modulation in radio communication means, changing a parameter of the carrier wave according to the amplitude of the modulating signal. <S> Generally modulating signal (often audio or video) signal is of a lower frequency and known as baseband signal. <S> While a carrier signal (much higher in frequency, able to be transmitted with feasible antenna) is known as passband signal. <S> After this background, lets jump directly into the question. <S> Frequency and phase are two different parameters of carrier signal. <S> if we represent the carrier signal as c(t) = <S> A sin (w(t)t + p(t)), w(t) is the (angular) frequency and p(t) is the phase. <S> Modulation means, we can vary either w or p or both in time according to the amplitude value of the modulating signal. <S> Lets represent modulating signal as m(t). <S> Frequency Modulation c(t) = <S> A sin (w(t)t + p) w(t) = some_function(m(t)) Phase Modulation c(t) = <S> A sin (wt + p(t)) p(t) = some_function(m(t)) <S> So, although the modulated signals resulting from FM and PM look very similar, they are fundamentally different. <A> The binary cases is probably the easiest to understand, in this case Frequency X would correspond to a binary 1 while Frequency Y might correspond to a binary 0. <S> So from a receivers perspective, if you see power at frequency y then you put a 0 down, while if you see power at frequency <S> x then you put a 1 down. <S> More complicated FM modulators can use different frequencies and combinations of frequencies to mean different symbols. <S> For example, you could have it set up such that if you see frequency <S> x but not y then your symbol is 10, if you see y but <S> not x then it is 01, if you see <S> both then it is 11, if you see neither <S> then it is 00. <S> Phase modulation on the other hand uses a fixed frequency. <S> It is then the change of phase that tells the demodulator what data to output. <S> It usually makes most sense to look at what is called a constellation: <S> If you think of this as each point on the circle being a different phase change, you can see how each dot could represent different data.
Frequency modulation is using different frequencies to represent different pieces of data.
Significance of 24 Volts Power Supply I saw quite a few custom computer units and laptops that are powered by adapters/batteries totalling 18 to 24 V. What's the significance of this design choice? <Q> There are a few things that come into consideration with this voltage. <S> One item is the voltage required by LCD backlights. <S> A higher voltage makes it much easier to power them instead of having to go into some variable voltage boosting. <S> I know 6 cell batteries seem to be pretty common in laptops. <S> I believe LiPo's usable voltage range is about 2.7-4.2v per cell. <S> So for a 6 cell battery, you are looking at about 24 V. <S> It makes it easier for equipment designers to have their charger voltages to be about the same as the battery voltage. <A> It's generally much easier and more efficient to do a step-down converter than a step-up converter, so that also drives up the voltage until you can get rid of most of the step-up converters, the backlight converter being the obvious exception. <A> Low enough to make it easy to meet safety requirements (so should be <60 V) <S> High enough to make the current not much, cutting connector size Common parts available.
Absolutely nothing inside the system works directly on the main DC voltage, there is always a DC/DC converter in between, so designers tend to choose the voltage high enough to get the current down to something the connectors and wires will take as long as it's not chosen so high that it becomes a risk and components get more expensive. Another item is the chemical make up of batteries and the number of battery cells inside.
What is the function of a Fourier Series? What is a Fourier Series? What it is used for? <Q> The Fourier series: \$ V_t = <S> \dfrac{a_0}{2} <S> + \displaystyle \sum_{i=1}^{\infty}[a_i sin(i \omega_0 t) <S> + <S> b_i cos(i \omega_0 t) ] <S> \$ <S> The term \$\dfrac{a_0}{2}\$ is a constant, that's the DC level. <S> It could also have been written without dividing by two, but this is the convention. <S> The terms of the infinite sum are the sum of a weighted sine and a weighted cosine with the same frequency. <S> If you would draw these as phasors in the complex Argand plane you'd see that the result is again a sine, but with a different amplitude, and phase shifted. <S> Therefore the equation can also be written as \$ V_t = <S> \dfrac{a_0}{2} <S> + \displaystyle \sum_{i=1}^{\infty}[a_i <S> sin(i \omega_0 t + \phi_i) ] <S> \$ <S> So we have the sum of sines, all multiple frequencies of a fundamental frequency \$\omega_0\$, each of them with its own amplitude and phase. <S> Fourier proved that you can describe every repetitive function this way. <S> Sometimes the series is infinite, sometimes it has a finite number of terms. <S> Sometimes terms are missing, which means their amplitude is zero. <S> One of the best known Fourier series is that of a square wave: \$ <S> V_t = <S> \displaystyle <S> \sum_{i=1}^{\infty}\left[\dfrac{sin((2i - 1) <S> \omega_0 <S> t)}{2i - 1} \right] <S> \$ or <S> , expanded: \$ V_t = sin(\omega_0 t) <S> + \dfrac{1}{3} sin(3 <S> \omega_0 t) <S> + \dfrac{1}{5} sin(5 \omega_0 t) <S> + \dfrac{1}{7} sin(7 \omega_0 t) <S> + ...\$ <S> So this is such a series with missing terms: a square wave has no even harmonics. <S> The following image shows what it looks like in the time domain: The top drawing shows the sum of the first two terms, then a third and at the bottom a fourth term is added. <S> Each added term will bring the waveform closer to a square wave, and you'll need the limit of the series to infinity to get a perfect square wave. <S> Sometimes it's difficult to see the fundamental sine in it. <S> Take for instance the sum of a 3Hz sine and a 4Hz sine. <S> The resulting waveform will repeat once every second, that's 1Hz. <S> The 1Hz is the fundamental, even if its amplitude is zero. <S> The series can be written as \$ V_t = 0 <S> \cdot sin(\omega_0 t) <S> + 0 <S> \cdot sin(2 \omega_0 t) <S> + sin(3 \omega_0 t) <S> + sin(4 \omega_0 t)\$ <S> All the following terms also have zero amplitude. <A> Every realizable analog signal, anything you can think of or draw legitimately on a voltage vs. time <S> graph can be expressed in mathematical terms as the sum of an infinite number of sine waves of different frequencies - something of this form: any_signal(t) = A*sin(f1*t) + B*sin(f2*t) + C*sin(f3*t) .... <S> Different signals are constructed by changing the values of A , B , C etc and f1 , f2 and others. <S> When someone refers to a Fourier series they refer to expressing the waveform as a series of addition operations like above. <S> Realistically every analog signal has SOME content at every frequency - even if the amplitude is .1e-67 <S> it's still there. <S> Ideally this isn't so - if I construct a pure square wave <S> then I know for a fact it consists ONLY of frequencies that are an odd multiple of its period. <S> Thus 1Hz square wave is the sum of a 1Hz sine wave plus a 3Hz sine wave <S> and so on down the line. <S> For other well-known waveforms such as triangle waves, and ramps people have done the calculations as to what frequencies are present and at what content. <A> It is also used to express a signal on a bounded (compact) time interval as the infinite sum of sinusoidal waveforms. <S> Essentially, by establishing the relationship between a signal in the time domain (that is, a signal expressed as a function of time) and an equivalent signal in the frequency domain (that is, the signal expressed as a function of frequency), the Fourier Series enables the harmonic analysis of signals and systems, which is the basis of radio transmission theory, coding theory, control theory, quantum theory and many other very useful areas of engineering. <S> Whilst the Fourier series expression of signals seem more complicated at first, involving complex expressions and 'infinite sums', as a mathematical tool, they enable engineers to solve problems which can not be solved using closed-form expressions. <S> Put <S> simply, it is sometimes useful to express variation in space and/or time as a variation in frequency and phase. <S> Particularly for periodic variations. <S> But even when the variation is not periodic, provided the variation is confined to some interval in space and/or time, it will also be confined to a corresponding interval (bandwidth) in frequency. <S> Application of Fourier Series has been instrumental in understanding channel bandwidth for communications systems, developing image compression algorithms and improving electrical power distribution system reliability. <A> To add some practicality to the above comments, the Fourier time-domain series can be decomposed into it's frequency-domain components via algorithms such as FFT (Fast Fourier Transform) and DFT (Discrete Fourier Transform). <S> One important practical result of being able to apply the algorithms is that in R&D and lab-testing, we often want to measure the spectral purity of signals against a noise floor (e.g. SNR or Spurious Free Dynamic Range) to see how pure or often, undistorted, our signal content is. <S> If we have a time domain output (such as a DA converter would process), we can't ascertain these values by just looking at the time domain response, so often on the simulation side, we will use a DFT module in order to transform the time domain signal into the spectral (frequency) domain. <S> In lab, on an Oscilloscope, we need to have some tool that can look at the spectral properties (typically we use spectrum analyzers). <S> The heart of these tools depends upon Fourier analysis and spectral decomposition methods. <S> So there you have a practical reason about why Fourier analysis is important in EE.
The Fourier Series is a means of expressing a periodic waveform as the (possibly infinite) sum of 'harmonic' sinusoidal waveforms.
Feedback Resistor and Capacitor in amplifier What is a feedback resistor and capacitor? Why are they are used in amplifier circuits? <Q> To understand why they are needed you first need to understand the basics of the opamp. <S> There are a few simplified rules that you can use to help you solve any opamp circuit: <S> The opamp will adjust Vout in attempt to make the + input equal to the - input. <S> So when trying to solve for the voltage out, you should set the voltage at the + terminal equal to the voltage at the minus terminal. <S> You don't actually know what this voltage is, so you just have to assign it a variable. <S> No current flows in or out of the + or - terminals. <S> If you apply these two rules to your circuit you will find that you can use any other standard circuit analysis method to solve your circuits. <S> It turns out that you can get some very basic equations for specific configurations, but they all are derived from circuit analysis combined with the rules I mentioned. <S> If you have a specific configuration that you are having a hard time understanding how it operates, feel free to post a schematic of it and we can help explain it. <A> Feedback can be used in any kind of amplifier circuit, not just in op-amp circuits. <S> Feedback can be achieved by any component or network that will deliver a portion of the output signal back to the input; resistors and capacitors and networks built from them just happen to be common choices. <S> Feedback can be either positive or negative. <S> Positive feedback adds to the input in such a way that an increase in the output signal will reinforce the input signal, producing in turn still more output. <S> Negative feedback has the opposite effect, tending to cancel out the input and reducing the output. <S> Negative feedback decreases the gain of an amplifier, so what good is it? <S> The usual reason for using negative feedback is to improve the frequency response of an amplifier. <S> Suppose that, without the feedback network, the amplifier does a better job at amplifying some frequencies than others. <S> By adding negative feedback, the stronger response to these favored frequencies results in more negative feedback, which reduces the output at those frequencies. <S> The overall gain is lowered, but the payoff is that it essentially levels the amplifier's frequency response over a wide range of frequencies. <S> Positive feedback is less common, but has uses. <S> Positive feedback increases the gain of the amplifier, and an old (early 20th century) radio design employed positive feedback for just that purpose. <S> The problem with positive feedback, however, is that when the gain of the amplifier combined with the loss in the feedback network gives you a 'loop gain' of 1 or more, your amplifier turns into an oscillator. <S> Feedback can exist in an amplifier whether it's intentional or not. <S> Parasitic capacitance can couple outputs back to inputs, as can magnetic coupling. <S> If there happens to be a frequency at which these un-intentional feedback paths can result in a loop gain over 1, a circuit that is intended as an amplifier can quickly turn into an oscillator at that frequency. <S> It's often the case that a feedback network is added to the amplifier just to counteract the effects of parasitic feedback. <A> Most amplifier circuits have large bandwidth capabilities, necessitating external limitation to guarantee a predictable response. <S> Control theory dictates that a closed-loop system (which an amplifier with feedback can be considered to be) needs to have certain gain and phase criteria to be considered unconditionally stable (i.e. never oscillating). <S> Generally, in a negative feedback system, if there is positive gain with no phase shift, you end up with an oscillatory response. <S> This is generally bad news for amplifier circuits. <A> Traditionally in both tube and transistor amplifiers negative feedback is used to prevent the amplifier from oscillating. <S> Similarly an oscillator stage can be built from a basic amplifier circuit by simply adding some positive feedback and having a tuned output circuit.
Resistors and capacitors are used with amplifier circuits to shape the bandwidth of the response to ensure stability.
6 LEDs in parallel with a single resistor to simplify soldering I'm trying to wire up 6 RGB LEDs in parallel, all controlled from a single source (well, three sources, one for each colour). The LEDs came supplied with resistors to limit the current of 270 Ohm for a 5v supply. The problem is, 6 LEDs x 3 colours = 18 resistors, which is a lot, and means I need a much bigger board and a lot more soldering. So, can I instead wire the LEDs in parallel with each other, with a single resistor protecting all six? (3 resistors in total, one for each colour). How do I calculate the value of that resistor? More details: The LEDs are being driven from a ULN2803A to supply a bit of current, which is in turn controlled by a Netduino providing a PWM signal on the three channels. These are the RGB leds in question . If I've correctly understood the data sheet they want 20mA of current, and forward voltages of 2, 3, 3 volts (for R,G and B respectively?). The supplied resistors were all 270 Ohm, so the channels may not be balanced quite right. For extra credit: I'm only using 3 of the transistors in my driver chip, which has 8 in total. could I wire the PWM from the netduino to a second trio of transistors, and split the LEDs into two groups of three? Is it worth the effort? PS I don't have any diagramming tools to hand, but I can provide a diagram (drawn in paint) if it would help clarify my question. (see also this meta question ) <Q> Using only one resistor for 6 LEDs is not a good idea: if there's a slight difference in forward voltage between two LEDs one will light brighter than the other one. <S> edit Splitting the 6 LEDs in two groups of 3 and using additional inputs of the ULN2803A would only help if you would exceed the maximum current for one driver. <S> But each driver of the ULN2803A can sink 500 mA, while 6 LEDs will need only 120 mA. <A> No, you should not put LEDs in parallel. <S> They will not share the current very well, one will dominate so the brightnesses will be different. <A> The forward voltage (Vf) of the LED's is characterized for a given current; but if you look at the datasheets, you'll see that the Vf will increased with current (If). <S> If you wire the LED's in parallel, the two common nodes of the LED's will have to have the same voltage drop. <S> That is, the Vf's of all the LED's will have to match. <S> Consequently, the If's of the LED's will vary until the Vf's are matched amongst the LED's - and hence you will have very different currents in the LED's, and very different brightness as a result. <S> Even when you have "identical" LED's, when you wire them in parallel, the subtle variations between each piece may cause different currents to flow through them. <S> Having an external resistor minimizes the Vf/ <S> If variance. <S> That is why in most simple designs, the LED current is controlled by a resistor. <S> For more sophisticated designs, you control the current with a current source. <A> From the figures you have given, the LED currents will be less than you expect. <S> For the red LED : <S> $$I_F=\dfrac{5.0-2.0}{270\Omega}=11.1\mathrm{mA}$$ <S> For the green & blue LEDs : <S> $$I_F=\dfrac{5.0-3.0}{270\Omega}=7.4\mathrm{mA}$$ ... <S> which seems like they might be rather dim, especially the green & blue <S> - and I haven't even taken into account the voltage drop across the driver (\$V_{CE(sat)}\$) <S> If you have a 12V supply available, you could string the LEDs together in groups of three in series with a single resistor for each group (6 resistors). <S> Assuming the currents are correct, you would need :- \$R_{RED}=\dfrac{12.0-(3 <S> \times 2.0)}{11.1\mathrm{mA}}=541\Omega \, \, \$ (say 470) <S> \$R_{GREEN}=R_{BLUE}=\dfrac{12.0-(3 <S> \times 3.0)}{7.4\mathrm{mA}}=405\Omega \, \, \$ (say 390) <A> Just to elaborate on the other (very fine) answers, using one resistor for limiting current to all resistors splits the current amongst the LED's that are turned on which has the effect of dimming the LED'S should more than one be on at a time. <S> I'm not sure if you've played around with the tinyCylon <S> (schematic here ), but there's a 'random' mode where a LED's light up randomly. <S> When more than one LED lights up in this mode, there is a visible dimming. <S> To understand this, just apply Kirchoff's law which tells you that the sum of the current around any junction must be zero. <S> By using one resistor, you limit the current that comes out of it which then must be split out amongst the different paths that use it (i.e. the 'on' LED's). <S> To get a consistent amount of current going through each LED, you have to use a resistor for each LED. <S> To get around the problem of having hundreds of tiny resistors there is a component that packages a bunch of resistors in one called a bused resistor network . <S> One can find them on Mouser or Digikey <S> (e.g. here ). <S> This is what the <S> SpokePOV <S> uses so that each of it's LED's <S> has a consistent current running through it <S> (resistor networks <S> RN1-RN8 on the SpokePOV page). <S> Just fair warning <S> , I'm a complete electronics newbie, so take everything I say with a grain of salt! <S> Hope that helps! <A> Not good idea. <S> Because resulting assembly will behave chaotically. <S> Even completely identical LEDs will have small differences in temperature and it will cause a runaway oscillations due to thermal feedbacks. <S> Voltage tempco for LEDs is negative. <S> So single LED with resistor will self regulate at some equilibrium point. <S> 2 parallel LEDs will oscillate. <S> 6 LEDs will be a chaotic group of tightly coupled oscillators. <A> Parallel LEDs won't oscillate- <S> they will exhibit thermal runaway. <S> As the temp goes up the resistance (actually the forward drop) goes down. <S> Lower resistance draws more current which increases the temperature more. <S> This increases the current which increases the temperature which increases the current which... <S> This will continue until either the current is limited externally or the LED overheats and burns out.
Only once you have a series resistor or several LEDs in series (from a high enough voltage supply) can you successfully parallel up the strings of LEDs.
Which programming languages are supported to program Arduino? I would like to start to play with Arduino. I've read that C and C++ are the official languages but I've also found other way to communicate using Python or Java for example. Which programming languages are supported to program Arduino? Are there any limitations using Python or Java? <Q> My advice, stick with the C++ derived Arduino language or use raw C/C++. <S> It's ideally suited to microcontrollers. <S> But, if you like esoteric languages: <S> Occam via concurrency.cc <S> BASIC via DK-Basic Java via NanoVM <S> Forth via amforth <A> you can use the language that you feel more confortable, then you can look for a way to compile in arduino code machine. <S> For example I use Go Lang <S> and I use gobot.io to do it working... <S> Exist Cylon.js <S> if you want to program in JavaScript or Artoo for Ruby developers. <S> Actually C is the most common because the IDE of arduino work with it. <A> You are a bit confused. <S> Java, Python, Processing are used on the pc to run communications with the arduino, they are not laguages for the arduino. <S> One limitation for them is that they do not run on the arduino.
I would stick with the c/c++ arduino enviroment for the arduino.
Variable resistor that can handle hundreds of watts? We have some big resistor test loads, like 8 Ω 250 W loads for simulating speakers: Are there also big variable load resistors for testing power supplies? What are they called? If not, what do people use instead? <Q> As MikeJ-UK mentioned, there are rheostats. <S> I personally don't like them for the same reasons what Mike mentions. <S> But there are two more options: Build a a resistor box and use switches to change the load. <S> Or if you're fancy you can use MOSFET's and a MCU to do the job as well. <S> Careful selection of the resistor values could give you a very wide range of resistances with fairly fine control. <S> Buy an "electronic load". <S> Just google the term (in quotes) and you'll come up with a lot of pages. <S> Basically it's the opposite of a benchtop power supply. <S> Most will work in 3 modes: Constant Current, Constant Voltage, and Constant Resistance. <S> My employer has one that's rated for 30 KWatts! <S> Of course they make smaller ones. <A> Large open-frame wirewound potentiometers are called rheostats . <S> You have to be careful when using these to test power supplies as it's too easy to burn them out! <S> A fixed series padding resistor is a good idea. <A> If you are going for cheap, get a large metal bucket and a bag of rock salt. <S> http://en.wikipedia.org/wiki/Liquid_rheostat <A> You close the vise tight to compress the plates and lower the resistance, and see what the power supply does. <S> I use active loads in my day-to-day work, mind you. <A> The limiting factor on any given rheostat is generally RMS current rather than power, though within a family the current limit is usually, up to a certain point, roughly inversely proportional to full-scale resistance; many families have a specified power rating, and the allowable RMS current will be that power divided by full-scale resistance. <S> If you need to generate a continuous range of resistances in the range 50-1000 ohms, you could use a 1,000-ohm rheostat, but you could probably much more cheaply use a 100-ohm rheostat plus fixed 50, 100, 200, 200, and 500-ohm resistors (many other combinations would work). <S> Since you'd be using a 100-ohm rheostat instead of a 1K rheostat, you could use one that was rated for 1/10 the power that you'd otherwise need. <S> Incidentally, before the advent of triac-controlled dimmers, theatrical lighting used to use rheostats. <S> Certainly many of those rheostats have been junked over the years; people who keep them for sale would might charge a fair bit for them, but if you asked at the right places you might be able to get them for practically nothing.
I've used large arrays of parallel carbon plates in a vise-like structure for testing power supply overload.
What is the simplest and cheapest way to interface with USB? If I wanted to make a simple device that communicates with my computer, say maybe a switch that could mute my computer when turned on and off and plug it in via USB, what would be the cheapest and easiest way to accomplish this? <Q> Easiest? <S> Grab an Arduino and write a couple of lines of Python. <S> Arduino's are incredibly easy to program, don't require any additional hardware to work with, and are quite popular . <S> Python has a very straightforward serial library and is a breeze to write in. <S> Example Code <S> Python <S> :Run this script as a service. <S> I'm using Ubuntu, so this script will pop up a notification telling you when a button has been pressed on the Arduino. <S> #! <S> /usr/bin/pythonimport serialimport pynotifyser = serial. <S> Serial('/dev/ttyUSB0', <S> 9600)while <S> True: x = <S> ser.read <S> () if x == 'b': <S> # Show notification <S> n = pynotify. <S> Notification("Arduino", "The button was pressed.") <S> n.show <S> () <S> Arduino: <S> void setup(){ // <S> Assuming button is active low and on pin 4 pinMode(4, INPUT); Serial.begin(9600);}void loop(){ if(digitalRead(4) = <S> = LOW){ Serial.print('b'); }}   <A> Build a USB Human Interface Device Class device. <S> That is the same class used by keyboards, mice, joysticks, game pads, and the like. <S> Your PC already has full device driver support for HID devices, so software access is easy. <S> Lots of pointers and even sample code can be found at Jan Axelson's HID page . <S> Browse around her site for lots of good information related to USB device development. <S> Many of the small microprocessor families can do HIDs. <S> I've even seen it done at USB Low Speed with an ATtiny 8-pin AVR entirely in software. <S> Pick your preferred chip, then search its "usual resources" for HID samples. <S> Several single chip solution from FTDI exist. <S> The FT232R is a popular choice. <S> Drivers are required, but Windows Certified drivers are known to the Found New Hardware wizard so installation isn't hard. <S> Once installed, you have a device that looks like a COM port. <S> Alternate drivers are available that will let you access its GPIO pins and use it in more advanced modes. <S> Update, 2015: <S> This had a link to http://www.lvr.com/hidpage.htm , which seems to have link rotted and the new location discovered thanks to El Marce . <S> Jan's Lakeview Research is still a great source for information about practical use of USB. <A> Here is a very detailed blog post http://msdn.microsoft.com/en-us/devlabs/dd491992 with software to use an under $5 PIC18F4550 to interface via USB as a standard HID device. <S> The software provided can be used to interface to any HID device, so if you want an alternate chip the software will still work. <S> An added plus is that the blog post shows you how to do bi-directional communication so not only <S> can you interface a switch <S> you can turn an LED on and off. <A> Here is a simple project of mine using a PIC18F2455, based on Brad Minch's USB software. <S> PCBs are available from Olimex. <A> If you don't mind Cortex-M3 based microcontroller, take a look at NXP's LPC1343 . <S> It's only $6.30 at Digikey (1 piece). <S> There's one very cool feature - firmware for storage and HID devices in chip's ROM! <S> Compared to a solution with FTDI chip + microcontroller, there's one chip less :)
Another approach is to make a serial communications device.
Blinking an LED using a generator as the source of electricity I made a little windmill which is turning a small generator to light up an LED, but the voltage is too low even with high wind speed for the LED to glow. I thought maybe the electricity could be stored somehow maybe by a capacitor and released when the voltage is high enough, making the LED blink according to the wind speed. I know little about electronics so I'm asking for help.Thank You. Edit:What I want to know is how to make a circuit that charges up electricity from a low power source and discharge when the voltage is high enough. The frequency of discharges should increase when the power (wind speed) is increased.About the generator. It's actually a small electric motor. I tested it with another motor, connected their rotating heads together, applied 5V to one of them and measured about 4V coming from the other, so I thought it's not a bad idea to use it as a generator. This is a really small project and it shouldn't be taken too seriously. <Q> Technical Explanation: <S> The open circuit voltage produced by your generator is too low to drive any current through the LED. <S> Straightforward Explanation: <S> You can measure this with a simple multimeter when spinning the generator. <S> Set the multimeter to 20V AC or DC and see what voltage you measure. <S> To get the LED working you should see at least 1.4 volts for a RED LED, 2.5 volts for blue, or 3 volts for a white LED. <S> Others have suggested a resistor is necessary to prevent damage to the LED. <S> Normally, this would be true, but in this case as the LED starts to light up, it will slow down the wind turbine, protecting itself in all but the strongest winds. <S> Additionally, most generators have the equivalent of a resistor inside them. <S> One suggestion is to use a microcontroller/capacitor. <S> The problem with this solution is you will not be able to get a high enough voltage to power up the microcontroller. <S> My solution: Use a Red rather than white/blue LED.Use <S> no resistor (or if you do, choosesomething below 300 ohms) <S> Spin the generator faster - use gearsto up the speed and lower the torqueif necessary <S> Get a different type of generatordesigned for slow speed use. <S> If you have multiple LED's, connectthem all in parallel (ie. <S> every LEDconnects direct to the generator) <S> Make sure you're spinning thegenerator <S> the right way - testspinning it backwards, or connect theLED the other way round. <S> Note: <S> Human eyes are very sensitive - if the output voltage of the generator is high enough, even a tiny current flow will cause the LED to visibly light up in the dark. <S> Additionally, there are many types of generator, AC/DC, brushed and brushless etc. <S> In this situation, it doesn't really matter which you choose. <A> To store small amounts of generated electrical energy and get it to do something useful <S> you need to use "energy harvesting" (EH) techniques. <S> Suitable hardware is available from several sources and this company's EH300 kit might be suitable for your application. <S> Farnell stocks the EH300; I bought one some time ago but haven't got round to trying it. <S> The EH300 can deliver 25 mA for 68 ms at 1.8V - 3.6V, which is more than enough for an MCU and LED. <S> Here is another company making EH hardware. <S> Their technology is used with wireless transceivers and MCUs, taking a lot more power than an LED, powered by small solar cells. <S> You could power a suitable low-power MCU such as an XLP PIC or an MSP430 from the EH device, measure the voltage provided by the EH unit, and flash the LED at a rate proportional to the wind speed when there was sufficient stored power. <S> The RPM of the windmill could be ascertained by measuring the voltage generated using an ADC input on the ADC. <S> XLP PICs typically take under 20 nA in deep sleep mode, and can operate down to 1.8V. <S> I just tested the EH300 with input from my bench supply, varying it from 1.1V to 2V to represent the varying output from a generator. <S> After a few minutes, it was delivering a stable 1.8V from a 1.1V input, so the EH technique will definitely work. <S> Once the capacitors are charged, it should function indefinitely, provided that there is enough wind to turn the windmill at a reasonable speed from time to time. <A> Without thinking about it much I would have the generator charge a CAP and regulate that voltage to a low-power micro (perhaps a PIC12F615 or similar). <S> The micro would mostly sleep but wake on a edge transition that is created every rotation. <S> I would use the TIMER1 count between rotation interrupts to calculate the speed. <S> I would turn on the LED proportional to the speed and go to SLEEP. <S> The slower the speed the more the uP would be asleep and take less power. <A> Charge an electrolytic capacitor in your generator's output an use <S> a Joule Thief <S> to drive the LED. <S> You can light up any LED as long as the input voltage is at least 0.6 volts I think.
Your problem is probably that there aren't enough volts produced by the generator, even when the LED isn't connected. A battery could also be charged with the EH300 output.
Regulator that can handle voltage on its output I need a voltage regulator for a project which will handle a voltage on its output pin with no input. (The GND pin may still be connected.) Most devices don't seem to be able to handle this. Are there any which can? <Q> You sometimes see a diode connected from the output of a regulator back to the input, such that under normal powered operation, the diode is reverse biased. <S> If you remove the input power, the diode can conduct, and clamps the regulator input voltage to not more than a diode drop below the output voltage. <A> Which regulators have you seen that don't allow that? <S> It's actually a requirement of voltage regulators that they can handle a voltage on the output with no input voltage! <S> Suppose that you have a 12V regulator with a large capacitor on the output, which is generally the case. <S> As soon as the input supply to the regulator is removed, the capacitor on the output will discharge into the regulator output, starting at 12V. <A>
An elegant solution to this problem would be to use a regulator with a shutdown pin, and have some sort of undervoltage limit derived from the input voltage controlling this shutdown pin.
Msp430 Launchpad Using Motor to Control Motor I can blink the led but the time of it's very 1 second or 2 second.I try to increase but it did not.But my question I'm using L293D motor driver to control motors.I want to Dc motors turn when button switched 15 second.This my code but I can't find a solution.I m asking how to increase the time #include "io430.h"void delay(unsigned long int d){ d*=9999999999999999; for(;d>0;d--);}void main(void){ WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timerP1DIR = BIT6 + BIT4 + BIT7 + BIT0; // Toggle P1.0 using exclusive-ORP1DIR &= ~BIT3;if((P1IN&BIT3) == 0){ P1OUT |= BIT6 + BIT4 + BIT7;}else{ P1OUT |= BIT0;delay(9000);}} <Q> You could probably just replace your delay for the built in, to get closer to the results you are looking for. <S> personally I would go about the whole thing using interrupts and timers to pull the whole thing off and use the peripherals that the msp430 has. <S> I would suggest using the WDT as an interval timer, doing this would leave the other timer for your motor control. <S> p1.3 is used as the wake up pin and p1.0 is the led pin. <S> example code <S> volatile int <S> counter;void <S> main(void) <S> { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer <S> P1DIR = 0x01; // <S> P1.0 output, else input <S> P1OUT = <S> BIT3; // <S> P1.3 set, else reset P1REN <S> |= BIT3; // <S> P1.3 pullup <S> P1IE <S> |= BIT3; // <S> P1.3 interrupt enabled <S> P1IES <S> |= <S> BIT3; // P1.3 <S> Hi/lo edge P1IFG & <S> = <S> ~BIT3; // <S> P1.3 IFG cleared _BIS_SR(GIE);}// Port 1 interrupt service routine#pragma vector= <S> PORT1_VECTOR__interrupt void Port_1(void){ WDTCTL = WDT_MDLY_64; //enables intervals of 64mS IE1 |= WDTIE; // set WDT interrupt}#pragma vector= <S> WDT_VECTOR__interrupt void watchdog_timer (void){ ++counter; P1OUT |= BIT0; if (counter == 245) { //245 x <S> 64mS = 15.6 seconds <S> P1OUT &= <S> ~BIT0; WDTCTL = WDTPW + WDTHOLD; }} <S> Not complete nor has this code been tested, but it should turn the led on for 15 seconds every time the P1.3 button is pushed. <A> If you're using the built in oscillator, you don't need to delay that long for 15 seconds. <S> In a tight for loop, I think a 15 second delay is closer to 1500000 loops. <S> Plus, you can't multiply by such a large number. <S> I think the other problem is with your if/else statement. <S> You're using <S> |= in both cases, so when you push the button, you aren't toggling the bits -- BIT0, BIT4, BIT6, and BIT7 eventually will all be high. <S> If you can provide more information about what you're doing with all of the bits, and maybe a circuit diagram, that will help me help you more. <S> EDIT -- <S> To address the delay implementation part of your question, jsolarski certainly has the best solution for the timer. <S> I looked into it some more since I haven't used timers with the MSP430, and ended up with some questions of my own. <S> I'm going to put my findings here just for discussion's sake, and hopefully jsolarski can add comments where appropriate. <S> You've got a several core clock sources, which include LFXT1CLK, XT2CLK, DCOCLK, and VLOCLK. <S> I'm personally going to be using an internal clock source for my application, and am going to try VLOCLK first. <S> Once you have a clock source selected, now you have to determine where three other internally-generated clock sources will originate from. <S> These other three clocks are ACLK, MCLK, and SMCLK. <S> Conveniently enough, VLOCLK is a valid clock source for all three. <S> You can also set a prescaler for these clocks, in case you don't need high-speed timing. <S> You will want to configure the WDT to use interval mode via WDTTMSEL. <S> This also requires you to set WDTIE bit in IE1. <S> You'll also want to set your clock source via WDTSSEL and prescaler via WDTISx. <S> I couldn't figure out what WDT_MDLY_64 equates to, based on his numbers, but that's expected because you haven't specified what clock source you intend to use. <S> Hopefully this edit to my answer has given you some more information on how to set up the WDT for intervals, should you decide to try it. <S> However, I think your problem is more fundamental as my original answer stated, regarding your use of <S> |= , and whether you use a tight for loop or intervals, it just wouldn't work. <A> That "d <S> *= 9999..." looks suspicious. <S> That many nines times 9000 is 0xE100 <S> 3B28 D927 DCD8 hex - 64 bits. <S> I don't know what sizeof(unsigned long int) <S> * CHAR_BIT <S> evaluates to on MSP430 <S> but on most systems it's 32. <S> In other words it would be overflowing the variable. <S> So assuming an unsigned long int is 32 bits, the value your code is using is D927 DCD8. <S> Are you getting a compiler warning about truncation? <S> A good way to experiment with delay loops is with a binary search. <S> Start the value off at 0x1. <S> That won't work (of course), so move to 0x2, 0x4, 0x6 <S> , 0x10... each value double the prior. <S> If it's too slow, back off and start setting lower order bits but from the top down. <S> Once you hit 0x8000 0000 <S> (again assuming a 32-bit long) you only get one more doubling if you set every lower-order bit, so unless you are close you need to think about using two delays (nested loop).
My suggestion would be get rid of the delay function and use the built in if you are using IAR or CCS."__delay_cycles (cycles);" using the built ins, will give you more predicable results and better timing.
SPI and framed SPI What is the difference between SPI and framed SPI? <Q> Here are the details of how normal SPI and framed SPI are implemented on a PIC32. <S> "In Normal mode operation, the SPI Master controls the generation of the serial clock. <S> Thenumber of output clock pulses corresponds to the transfer data width: 8, 16, or 32 bits." <S> "In Framed mode operation, the Frame Master controls the generation of the framesynchronization pulse. <S> The SPI clock is still generated by the SPI Master and is continuously running." <A> and PIC32 I think). <S> Normally the chip select is held low by the master to talk to a slave and the master just sends out however many clock pulses it wants to define the data width (8,16,32bit). <S> When the SPI unit is in framed mode the chip select doesn't do this, rather it can function as an output or an input which either generates or accepts a 1bit pulse called the 'frame sync'. <S> This indicates the beginning of a data 'word'. <S> In this mode the clock is continuously generated by the clock master. <S> This also means the link is now point to point, you can only communicate to one device in this mode. <S> This mostly exists to allow the microcontroller to communicate to low speed audio codecs. <S> You can approximate I2S/TDM communication with this setup (for some devices, not all). <S> Its not really something you would use for high quality or high sampling rate audio as there isn't support for the extra features needed for such operation (real I2S support, deep buffers, robust sampling rate control, etc). <A> I haven't heard the term "framed SPI", but would suggest that there are two says in which I've seen SPI devices handle the chip-select wire. <S> On some devices, any time the CS wire is deasserted and reasserted, the following byte will be interested as the first byte of a command sequence; on some other devices, any byte which is received while CS is asserted will be interpreted identically regardless of whether CS has been deasserted since the previous byte. <S> On some such systems it would be normal practice to deassert CS between bytes. <S> If I had my druthers, the CS wire would be optional and SPI devices would assume the start of a new command if there were two rising edges on the data wire while the clock wire was low (if SPI were unused, it would have to be strapped low). <S> I'm unaware of any SPI devices that actually work that way, though, other than a CPLD I designed myself.
"Framed SPI" is basically just a term microchip made up and is supported on some of their chips (dsPIC
How should I connect batteries in parallel? I have a pair of these Li-ion batteries. I'd like to couple them so that I get double the current. However, I realize that this could be a Bad Idea™, as the charge could flow in a loop through both batteries. What is the best way to prevent this? Should I add diodes in series with each battery? (if so, what type and value?) Should I put a resistor in series with one of the batteries? Or is there a better way? <Q> The resistor solution has the main disadvantage that there can flow a (rather large) current from one battery to the other. <S> This may reduce the life of the battery receiving the current (you're not properly "charging" it). <S> I would go for the diodes. <S> If one battery's voltage is higher than the other this battery will be the only one supplying current, until both voltages are the same. <S> From that moment both batteries will supply current. <A> Two batteries in parallel will work fine if the following are true: <S> the batteries are of identical types <S> the number of cells in each string is low (1 is best, 2-4 OK, I wouldn't do this for >4) <S> the cells are matched (same age, charged + discharged together) the cells are in thermally similar environments -- if they're next to each other but one is next to a heat sink and the other is on top of a hot component, you'll reduce life. <A> If the load power isn't too low, you could connect the batteries in series then use a converter (i.e. a buck) to convert the power to lower voltage / higher current. <S> You'll need to implement some sort of undervoltage protection to shut the converter down if the input voltage gets too low. <S> You'll lose some power in control as well as conversion. <A> Connecting 2 batteries of similar charge in parallel should not be an issue, your charger may struggle though and you may have to charge them seperately. <A> The original post hinted at a problem with parallel charging I experienced. <S> On of the three 12V 100Ah batteries developed a bad cell(s) and essentially dropped to 4V. <S> This caused the other batteries to die trying to equalize the pack. <S> In the end, I lost three pretty expensive batteries. <S> My current solution is to use a smart charger that has the capability of charging many batteries using separate leads to each battery. <S> That avoids the problem of parallel charging by not parallel charging. <S> This is accomplished with a resistor (sized for your project) or a MOSFET (also sized to your project) which is installed in line with the connections between the batteries.
If you are going to parallel charge two or more batteries, you need to install a device that prevents energy from backflowing from one battery to a weaker battery.
Can a generic 2.4 GHz transceiver be used on an 802.11x network? I am prototyping a potential future product, and I am struggling to get my head around the complexities of using Wi-Fi components in it. I understand that Wi-Fi (or 802.11x) is primarily just a 2.4 GHz signal modulated in a specific way, as is Bluetooth and ZigBee . Is it possible therefore to just use a basic 2.4 GHz transceiver in my project and configure it for the 802.11 protocol rather than having to use some expensive branded one that comes pre determined? Or is it not as simple as that? I presume in industry, when doing design for large production runs, something similar takes place? Or do they indeed have to use a transceiver that is preconfigured to be Wi-Fi? All the pre-configured components I have found so far seem quite expensive (even when purchased in volume) to make a commercial design viable. I have looked at devices such as the Lantronix WiPort and the Roving Network WiFly GSX and comparing them to devices such as the Microchip MRF24J40 - is it possible to use a Microchip MRF24J40 and then configure the rest of the hardware and software to enable the device to work on a Wi-Fi network? For further detail, here is what I want to do at the most basic level: Part 1: I want to make a patch that contains a small buzzer, an accelerometer, a PIC and a Wi-Fi transceiver that can be stuck to an object. This patch would be able to communicate with "The Cloud" though the users' home Wi-Fi network. When the accelerometer detects movement, the PIC will send a message, via the Wi-Fi link, to a server in the cloud to register that movement along with a time stamp. Part 2: Through a web interface I want to be able to send a message to the patch setting the buzzer to make a sound next time the accelerometer detects a movement. I have already made a rudimentary version of the system which works over a 433 MHz RF link and a laptop serial port with a local piece of software running on my laptop. I know how to do the web coding ( PHP and MySQL ), but it's the replacing the RF link with the Internet that is causing the issue. <Q> 802.11x is significantly more complicated than Zigbee, and the TCP/IP stack you need to make it work on top of all that is similarly complex. <S> If you purchase something like the Lantronix WiPort or Digi Connect <S> WiMe to make 802.11x networking as easy as communicating over a serial port, you're paying for a lot of stuff <S> (there's a whole ARM based server in those modules!) <S> that you don't need if you're willing to do a lot of RF hardware design and software integration. <S> If you're interested in taking that path, you should get some background understanding of the IEEE 802.11x network architecture. <S> This is one of just a couple IEEE standards available for free through the IEEE-Get program. <S> Once you've got an overview of the networking system, look up the Maxim MAX283X line of transcievers. <S> From the datasheet, The fully integrated transceivers include a receive path, transmit path, voltage-controlled oscillator (VCO), sigma-delta fractional-N synthesizer, crystal oscillator, RSSI, PA power detector (MAX2831), temperature sensor, Rx and Tx I/Q error-detection circuitry, basebandcontrol interface and linear power amplifier (MAX2831). <S> The only additional components required to implement a complete radio <S> front-end solution are a crystal, a pair of baluns, a BPF, a switch, and a small number of passive components (RCs, no inductors required). <S> That's about as close as you'll get to a generic 2.4GHz transceiver that can be sanely integrated into an 802.11x network. <S> They cost about $5 in small quatities at the moment. <S> As you requested, these chips only implement the PHY layer of the protocol. <S> You still need to handle the data link layer (MAC and LLC), network layer, and transport layer on top of that before you can begin communicating at the application layer level. <A> You don't say exactly what you want to do with <S> Wi-Fi. <S> You use the word "transceiver", but I've learned that people use that term somewhat generically. <S> Thus, forgive me if the rest of the answer isn't quite what you were looking for. <S> To directly answer your question (paraphrased), "Can the Microchip MRF24J40 be made to do IEEE 802.11a <S> /b/n? <S> ", the answer is no. <S> It's made to do IEEE 802.15.4, or ZigBee, and cannot be forced through software or hardware to do <S> Wi-Fi. <S> The RF modulation and software protocols alone are quite challenging-- enough for people to make just that into a career. <A> Is it possible therefor to just use a basic 2.4GHz transceiver in my project and configure it for the 802.11 protocol rather than having to use some expensive branded one that comes pre determined? <S> You seem to be basing this on a backwards assumption. <S> There certainly are universal <S> (within some bandwidth) RF devices - that's basically what a software radio is, and they are available in reconfigurable forms. <S> However, they aren't cheap. <S> What is cheap are the highly specialized, huge volume production devices intended for consumer products. <S> These generally have their flexibility limited both by optimization for a given target (frequency, compute power for digital modulations, etc), and manufacturer's desire to not release more programming data than absolutely needed for the intended application. <S> An additional problem to small quantity users is that it can be quite hard to buy chips unless you are purchasing in massive quantities. <S> Probably your little tags won't have USB host capability, so leveraging the lowest prices of generic USB wifi adapters won't be an option <S> , so you'd be in the next class of embedded modules that talk spi or asynchronous serial or similar. <A> found some interesting articles on warpproject.org/trac/wiki/802.11/PHY and www.eirp.org/webtut.pdf based on the '2.4 ghz transceiver' notion we are probably looking for a 802.11 PHY and we try to implement the 802.11 MAC as well as the IP stack in software. <S> i.e. the PHY give us the bits & we deal with the data frames for 802.11 MAC & IP stack - this is pretty complicated in itself <S> the 802.11 PHY is apparently complex to implement (see the 2nd link above)1'd need to cater for FHSS (4GFSK, 2GFSK), DSSS (DBPSK, DQPSK, DQPSK-CCK, DQPSK-PBCC encoding/modulation etc) <S> however, if 1 is keen on on the heroic efforts to do a 'software PHY' as well i.e. decode all that FHSS, DSSS in software, e.g. using FFT <S> , DSP algorithms etc <S> there are some interesting chips deemed as 'RF frontends' e.g. www.maximintegrated.com/en/products/comms/wireless-rf/MAX2830.htmlww1.microchip.com/downloads/en/DeviceDoc/75028A.pdf in theory, <S> if we have 'RF frontends' i.e. all analog signals, we mix them say produce IF may be add some PLL stages <S> etc <S> we can use some superfast ADC and ADC convert them all to digital & we do software DSP, FFT & decoding to convert that into bits (i.e.the job of a PHY), then we take those bits assemble them into frames (the job of a MAC) and we then take the frames and handle them as IP datagrams. <S> i'd guess if that's possible, there might be a possibility to do 2.4ghz anygramit'd <S> seem the first link <S> warpproject.org is trying to do just that - a software radio using FPGA :) <A> I was also looking at something similar. <S> If you want to run 802.11 and 802.15.4 on a single transceiver / chip <S> It would in someways impossible if the chip cannot support DSSS and QPSK. <S> Even if it does you would be looking at rewriting 802.11 stacks to make it work. <S> look at the following product for a better and a easy implementation of two protocols on a single chip GainSpan G2000 SoC
But to address the bigger issue: Unless you're an expert in 802.11 there is little or no chance that you'll be able to use generic chips and make it do 802.11.
Looking for information about how well standard electronic components function when submerged in liquids, especially water Tradition says that electricity and water do not mix well, but sooner or later some electronic components are going to come into contact with water. I noticed that datasheets don't mention anything about that for regular components so I'm looking for a source of information on that. For example I noticed that some resistors with copper tin plated leads will release tin and copper when submerged in water and powered on (looks like electrolysis is taking place). I also noticed that some electric motors work just fine when submerged in water and that for example AA alkaline batteries don't seem to have any problems working under water. I also heard that some types of mineral oils can remove insulation from cables and that some people who used mineral oils to cool computers had problems with that. Books are acceptable, but bonus points if the source if freely available on the Internet. <Q> The easy answer is, things don't work underwater. <S> And water will pick up lots of impurities. <S> Take a container of pure water and just let it sit there, uncovered. <S> Over time it will begin to absorb stuff from the air and its electrical conductivity will go up. <S> To make matters worse, water is a mild solvent so things tend to dissolve in it. <S> And there's your real problem. <S> You cannot predict what will be dissolved in the water. <S> Is the pH acidic, or alkaline? <S> What else is on your PCB that could get dissolved in the water that then effects other things? <S> Maybe the ink on the labels of those caps could turn the pH slightly acidic, causing more corrosion on something else. <S> Since you don't know what's in the water, you can't predict what will happen-- but only bad things can happen. <S> It's unlikely that you'll ever see an electrical component that is spec'd for operation underwater. <S> The only spec that I've ever seen is in the temperature spec of some chips, that's listed as "+120 to -40 <S> deg C, non-condensing". <S> Underwater is considered "condensing", by the way. <S> :) <S> The normal way of protecting electronics from water or high humidity is to use a conformal coating on them. <S> That's basically a way to cover the PCB with a protective coating. <S> There are people who cool PCB's by submerging them in some sort of liquid. <S> Normally mineral oil or some sort of inert chemical <S> (the name escapes me right now). <S> I have only seen anecdotal evidence for this, although maybe the supercomputer guys from 10-20 years ago would have done a study. <S> And somewhat off topic, <S> but... <S> While a standard motor might work underwater, it wouldn't work for long. <S> The water, and motion of the motor, would tend to remove the lubrication. <S> Followed by corrosion. <S> Then the thing would seize up. <A> Unless a part is explicitly designed to work underwater, a manufacturer would just laugh in your face if you asked them about it. <S> Sure, they may work for a time, but you would need to test and certify them yourself. <S> The manufacturer's specifications and guarantees will not apply if you use them outside of their normal conditions, plus the water would give you all sorts of problems with high-speed and/or high-impedance circuits before it's done eating through traces. <S> The only environmental conditions electronic components are expected to survive are temperature swings (and occasionally, radiation ). <S> Water, given enough time, is extremely corrosive and will destroy unprotected, exposed circuitry. <S> It is the job of enclosures and coatings to protect parts and PCBs from moisture and other potentially corrosive chemicals. <S> An enclosure would be best if you want to survive underwater for mechanical reasons, but if you're trying to cut down on space/weight, you may be able to get away with just a conformal coating—essentially a thin layer of potting. <S> A company I used to work for would get warranty returns for vehicle data computers that were half filled with water but still fine electrically as the board was conformal coated with a silicone resin. <A> The prudent answer to insuring that your project will survive in a harsh environment (rain, underwater, whatever) is to properly protect it. <S> You can put it in a waterproof box or potting it in epoxy will do an excellent job of protecting it. <S> Of greater concern perhaps is safety, operating any sort of energized electrical/electronic device in the open (rain or not) where someone could accidentally touch it is not a good idea. <S> Would you want to step into a bathtub that had a live electrical wire in it? <A> As long as the water was pure the insulation was sufficient for the several 10's of kV on the anodes. <S> Interesting if the pipes burst as the anodes would overheat very quickly.
Although technically water is not conductive (a circuit will run fine when submerged in pure water), it's all the impurities in the water that make bad things happen. Large electronic valves used in radio transmitters often had their anodes cooled by direct contact with de-ionised water.
What is the reasoning behind Arduino choosing 9v? I've always was wondering why they chose 9v, well really 9-12v.. Why not 5v or 3.3v or 12v? Surely there was some good thought put into this. Does anyone know or have sources? <Q> You can actually supply 6-20 min-max (they don't recommend it though) and Arduino's recommendation is 7-12v. <S> One reason for this is because with the linear voltage regulator the arduino uses will have a voltage drop of around 2V and since the Arduino has been designed around 5V there is a ~7V minimum. <S> The AVR micro controllers <S> the Arduino uses can go below 5v, but not at the full clock speed. <S> Some Arduino boards are 3.3v boards, and have different minimum and maximum voltages. <S> The reason the max recommended voltage is 12v is probably because any excess voltage will be let off as heat and the voltage regulator can only dissipate so much heat! <S> You can operate the arduino from 5v, but you need to go around the voltage regulator. <S> That's how the arduino is powered from USB, which has a 5v line. <A> A common supply voltage for the AVR chips used in the Arduino boards is 5v. <S> A 9V supply ensures that the regulator will always function properly, and is a very common value for the mains supplies that are available. <A> As the others have said the input voltage to the Arduino needs to be greater than the 5V it runs off of to allow for the regulator to work, so why not 9V to allow it to run off of a 9V battery? <S> And you can still run it off of a 12V battery as well as <S> the others also pointed out. <S> It's kind of a win-win.
The supply needs to be regulated, and regulator chips generally need to be supplied from at least 2V more than the output voltage.
What's the best way to connect a 4-digit 7-Segment LED to Atmega168 I'm working on a device with a 4-digit 7-segment counter and wondering what is the best way to drive all the LEDs. Right now I have a custom PCB that's driving them all from an Atmega168, using most of the I/O pins. The problem is that some of the numbers appear brighter than others. For example, a "1" is brighter than an "8888". Someone suggested that should be using an LED driver such as the TLC5940. Is this necessary? Since it's for a wearable device, I'm trying to keep the size and power to a minimum. The current prototype works well, but I want to make sure the digits are equally bright and as bright as they can safely be, to increase it's visibility. <Q> You can reduce the number of pins you are using on the AVR by multiplexing the displays. <S> This should give you consistent brightness. <S> The software will be more complex, but it's a much better solution. <S> Because the human eye responds to peak brightness, multiplexing can provide more brightness than is possible with non-multiplexed displays, and uses less power, especially if the duty cycle is reduced. <S> You need to ensure that the current limits of the AVR pins aren't exceeded, of course. <S> Driver devices will be needed if greater currents than the 25 mA limit for the AVR pins are required. <S> I use them on a PCB I designed for a similar application. <A> You don't need a LED driver, but it has its advantages. <S> You save a lot on your microcontroller's <S> I/O, you only need a couple of lines for the serial interface (SPI or I2C). <S> It may also save board space, since you don't need a bunch of discrete components for the multiplexing. <S> Personally I like the Maxim MAX6950/51 for five and eight 7-segment digits resp. <S> It comes in a small 16 pin package. <S> It has digital brightness control and hexadecimal-to-7-segment decoder. <S> Interfaces to your uC with 3 lines. <A> You're saying that this is a wearable device. <S> It is possible that the brightness problems you're seeing have nothing to do with the chip(s) involved, but is a result of the internal resistance of the battery, especially if you're using button cells. <S> I.e., when you're trying to turn on all LEDs (in a segment) at once, you hit the limit of how much current the battery can deliver, regardless of the microcontroller's drivers. <A> A viable approach is to use a chain of four 8-bit shift registers (e.g. 74HC595) to drive all the segments, and use the same size current limiting resistor for each segment (important - each segment gets its own resistor). <S> Then just shift in the appropriate 32-bit pattern from the AVR for the value you are trying to depict. <S> That will decouple the power requirements of the LCD from the AVR pin current sourcing constraints. <S> It will also reduce your AVR pin utilization to three pins (data, clock, latch). <S> In terms of software complexity, all you need is a table to map digit values to bit patterns. <S> If you keep the wiring consistent among digits, that's just a 10-entry lookup table (if you are just displaying plain-old base-10 numbers). <S> The shift register communication protocol <S> couldn't really be much simpler - open the latch, clock in the data bits, close the latch, and they are capable of reliable operation at speeds far greater than you can achieve with AVRs, so you can just wiggle the wires as fast as possible in software. <S> If you want to reduce power, you can conceivably achieve PWM by shifting in 0x0000 during the off cycle as well and using timer interrupts to ensure duty cycle consistency for example. <S> Last thing, these things are cheap and come in DIP packages if that is important to you.
Connect all the segments together and connect them to seven output pins via resistors, and connect the four common cathodes to another four output pins.
Is it possible to use multi gigabyte DRAM modules with a microcontroller? I have two leftover 2GB RAM modules that I removed from my MacBook Pro when doing an upgrade. I was just wondering if these were usable with, for example, an Arduino. I'd be too much of a beginner to actually try to do this now anyway, but I'm curious if it is at all possible, or if that's just way too much memory for a microcontroller to address. <Q> I'm going to say no: the most basic incompatibility is that there's way too many pins on those modules even be able to interface it physically to an Arduino. <S> Ditto for similar small microcontrollers. <S> An ARM Cortex M3 is getting closer, but few of those actually have the external bus necessary to interface RAM in such a fashion (I think). <S> But I'll play along an go further. <S> Assuming you could interface the chip to the Arduino somehow another basic electrical compatibility problem is the voltages required. <S> I think these RAM modules use something odd like 2.2V - not present on a vanilla Arduino board or really, any other basic hobbyist microcontroller. <S> Assuming that was taken care of then the chip would pretty much work like any other external memory to the Arduino. <S> This is really done all the time - people add external EEPROM to store important constants or SD/MMC cards for storage of webserver logs and such. <S> Of course, within this context the RAM modules presents no real benefit to the Arduino. <S> Its main feature is speed and the Arduino (and yes, other hobbyist microcontrolers) typically don't break 25MHz in clock speed. <S> They're too slow to care about speed. <S> And storage size isn't a big issue since interfacing to an SD/MMC card is distinctly easier and provides as much space to play with. <S> So even if it were possible it wouldn't really be advisable. <A> I would say no, not without sticking a good sized (pin count) fpga in between, the fpga talks to the memory and the microcontroller talks to the fpga using a paging scheme. <A> You could conceivably use a system of latches to allow something like an arduino to generate 32 bits of address, and you could probably devise some scheme to generate the refresh cycles, but there'd be almost no point in doing so, except as a technical exercise. <S> The interface circuitry would probably be the most complex part of the resulting system, and there'd be little practical value in the result; the arduino would not be able to execute code out of the RAM, the storage would be volatile, and would probably consume more power than the arduino as well. <S> If you want to store data, an SPI EEPROM is probably a much better solution. <A> If you ever look at DRAM chip datasheets there's a minimum clock speed of something like 50MHz+ for DDR2. <A> The short answer is no. <S> The Arduino can't drive the DDR or DDR2 memory interface. <S> You could make a DDR/DDR2 controller with a SPI interface with an FPGA, but that's a significant undertaking. <A> You'd need a low voltage driver (SSTL), and some way to control about 100 channels (each differential, so about 200 pins. <S> Think BGA.) <S> Most DRAM has to be refreshed at at least 1kHz and probably more to have a low bit error rate. <S> This will then form a major background task and use up most of the prcoessing power of the Arduino, if it's even possible to refresh memory at such a rate. <S> What you can look at though is with some microcontrollers, <S> e.g. PIC24F/H/dsPIC33F, they support a parallel master bus interface, which allows some types of parallel SRAM to be accessed. <S> There's even support with C, as this external memory can be mapped onto several in code variables and even blocks which combine both internal and external memories. <S> The external memory requires you to write some PMB code. <S> You'd only be able to address up to about 1 MB with this though. <A> No, not without a paging interface of some kind between the memory and the MCU. <S> Some of the AVR MCUs do in fact have a built-in external-memory interface - Atmega2560, for example (see section 8 of the ATmega640/1280/1281/2560/2561 data sheet). <S> But the address space is measured in Kilobytes, not Gigabytes.
So no, you will not be able to interface with them with a microcontroller (unless it has built-in hardware support).
How to have arduino only turn on when enough power has been collected? There was recently an article in the Christian Science Monitor about the launch of a cracker-size satellite . The article says that the satellite has, "power storage in capacitors, and switching circuitry to turn on the microprocessor when the stored energy is enough to create a single radio-frequency emission — a digital beep." The power is collected from a solar cell. I'm interested in creating an earth-based device which would do just that, collect power from a solar cell and only turn on the device to transmit when it's got enough power. I recently purchased an arduino , but have little experience with this kind of engineering. Any suggestions about how to get started? Thanks! <Q> That satellite will presumably use "energy harvesting" (EH) to store the energy provided by the solar cell in a super capacitor. <S> Both TI and Microchip have just started suppling evaluation kits using EH with a solar cell to power an MCU and a wireless transceiver. <S> Advanced Linear Devices makes the EH300 energy harvesting module , which can charge a pair of super capacitors from a variety of sources, including solar cells. <S> I've been experimenting with one, and it can provide 1.8V - 3.3V from very low voltage sources, and is capable of delivering 25 mA for 68 ms, which is more than enough for an MCU such as an MSP430 or XLP PIC and a low-power transmitter. <S> The EH300 has two super capacitors. <S> They cost about £34, I bought mine from Farnell. <S> The Arduino isn't suitable for this application, as it won't work from such low voltages, and takes too much power. <S> XLP PICs typically use 20 nA in deep sleep mode, and 50 uA <S> / <S> Mhz when active. <A> You will want to look at how to put the avr into sleep mode. <S> When in sleep mode the micro controller will turn off as much as possible to increase power savings. <S> What you can do is hook whatever you are storing the energy from the solar panel in up to one of the ADC pins on the arduino and <S> when that reaches a certain threshold you can wake the micro controller up. <S> There are a few different levels of sleep though, and the more power you want to save the more stuff gets turned off. <S> I think ADC pins are only on with the highest/least power saving level. <S> One last thing is that using an arduino for this may not be the best. <S> Even in the lowest sleep state the arduino will use ~15mA, which an avr chip only uses 0.05mA in this state. <S> The arduino has a linear voltage regulator on it that will always use up about 10mA, plus a few other extra chips. <S> It would probably be worth it to make your own avr setup for this reason. <A> You can try the techniques used by voltage triggered (Type I) <S> BEAM solar engines . <S> Essentially you charge a big capacitor until voltage across it crosses some threshold, and you power your circuit by discharging it. <S> With a big enough capacitors you should be able to power up an arduino cold. <S> But you are going to need some big capacitors to feed it for >1s. <S> These circuits can be quite small. <S> For example this circuit , shown below, uses 2 transistors and a Panasonic 1381x . <S> Solar engines use other techniques, <S> e.g. slope triggering. <S> You can find out more about them here . <A> I'll second the suggestion to look into the concepts behind BEAM robotics and solar engines. <S> I think the solar engine based on the MAX8212 chip (which maxim will give you free samples of) would be the most suitable SE for you as it's the most (easily) configurable. <S> The arduino is a brilliant platform for learning about microcontrollers, but it's a bit power hungry for solar power. <S> once you understand Arduino, start looking into working with at Atmel AVR chips directly. <S> ATtiny45 is a great fun little platform to work with, and can be powered from a solar engine quite well. <S> Check out what I've been doing with them here <A> I have no experience with arduino and it seems from the current crop of answers to be that it draws to much power and probably doesn't have a low enough sleep current draw to make it a viable option. <S> A nanowatt xlp PIC would be the place to start, however you still need to deal with the interface between energy harvester (solar cell in this case) and microchip. <S> The output of the solar cell is low voltage in comparison to other forms of energy harvesters and the requirements of a PIC + circuitry, linear technology do a range of self starting dcdc converters targetted at energy harvesting applications (LTC3105 for instance) which can act as your power converter. <S> From that point you would attach the pic across the capacitor/battery and then run it in sleep mode when the solar cell is charging the battery/capacitor. <S> Make sure that the battery/capacitor has a full charge (or at least isn't empty) <S> when you first run the system as the PIC will have a fairly high cold-start current draw and could stop your stored voltage every reaching beyond 0.7V - you can solve this with a 1.9V low voltage comparator if need be. <S> Although people have stated the arduino is too power hungry for this type of thing you can solve that problem by just using more solar cells until you are able move on to PICs etc which would allow you to make a more sophisticated system.
You could also use the avrs internal comparator, with the capacitor/battery you are storing the energy in and a voltage source for whatever voltage threshold you want.
How can I simplify my DC power requirements? With the amazing amount of devices available to anyone, each one usually comes with it's own power requirements! Right at this moment, on my work table i have these adapters which I have at arms length for various things (and many more which I shall not list): 9v dc 500ma (Arduino) 12v dc 1a 5v dc 700ma 5v dc 2a How can I simplify my DC power requirements? Does a device exist where it's a power supply and can output any combination of voltage and current? And also have flexible adapter plugs? <Q> Get a bench power supply. <S> I use one of these , it won't cost much more than your selection of mains adapters, and is a lot more convenient. <S> I've made up a variety of leads that plug into it for powering various boards. <S> Having voltage and current displayed is very useful, as I can see immediately if there is a short on a prototype. <A> You can get multi-output adapters with a selection of reversible tips. <S> Typically, these provide switchable 3V, 4.5V, 6V, 9V & 12V (No 5V) with half a dozen or so tips (1.6mm, 2.1mm, 2.5mm etc) which can be reversed for centre-negative/centre-positive applications. <S> The only problem is that you have to be very careful to check the voltage & polarity settings before plugging them into your expensive gadgets!. <A> First of all, the current rating on the power supply is a maximum current the psu can deliver, so if you have a 5V / 700mA and a 5V / 2A supply, then a single 5V / 2.7A supply will do the job of both of them. <S> The voltages you need might not even be all the once you have now. <S> Lots of devices will be able to work fine on a much higher voltage than the supplied PSU, I have several network switches that come with 9V supplies, but they are built for and works perfectly on everything from 6V to 24V. That Arduino will be happy with 12V, though the regulator might get a little hot if you are loading it down a lot. <S> The only way to know for sure which voltage a device will work with is to open it up and look at the regulator section of the device. <S> Your 5V devices will probably not be happy with 12V, perhaps a 12V powered USB hub would be a good idea there. <S> All my on-always gear is powered by a single 12V / 5A power brick, which is much more efficient and compact than the 8 separate wallwarts that the devices came with originally. <S> and then I either cut the original power cables and fitted my new DC connectors or I simply made all new power cables for things. <A> Consider an adjustable dual-power supply such as this 3-A one from TI . <S> Its eval board is US$25.
So, what you need to figure out is what voltages you really need and sum up the current for each of them. I made a small box with a load of 5.5mm barrel DC connectors, then I bought a good hand full of DC connectors that fit them
Sensor for hand/foot location in relation to a persons body I would like to track the movement of a persons hands and feet in relation to their waist. I imagine them wearing something around their waist that can measure how far away a sensor attached to each hand and foot is. What kind of sensor would I be looking for to do this? Everything needs to be attached to the person so can't be a done via a stationary camera. I thought IR or some kind of sound sensor but would those work when not in line of sight such as when they are walking/running and their feet are behind the front of their waist? <Q> That's a very interesting problem! <S> An ultrasonic pulse, generated by an MCU, which resets a timer, is transmitted. <S> An MCU with receiving and transmitting transducers, on, say, the right wrist, detects the pulse, and immediately retransmits it. <S> The belt MCU detects the retransmitted pulse, and stops the timer. <S> From the speed of sound, and the time for the outward and return journey, the total distance can be calculated. <S> Halving the distance gives the distance from the wrist to the waist. <S> The distances are relatively small, so enough signal should be present, even if the transmitter and receiver are not line-of-sight. <S> Amplification will be needed for reception. <S> I'll leave you to work out the details for all four wrists and ankles. <S> :) <S> Some form of encoding will be needed so that the four remote units can be distinguished from each other. <S> A Google search for similar techniques turned up this , which uses a passive reflector on the hand, with the transmitter and receiver on a microphone stand. <S> I can't see that simpler technique working for Glen's application. <A> The distance from a person's foot to their waist won't change much while they're walking (as opposed to, say, standing up from sitting). <S> Except when they bend their knee, their foot will always be about a leg's length away from their waist. <S> To look at it another way, the foot behind that you're stepping off of, and the foot ahead that you're stepping on to are about the same distance from your hip. <S> To be totally mobile (without protruding booms to aid distance measurement, f/ex), you'll probably need angle sensors at each joint between your reference point (the person's CofG, f/ex) and the body part you want to locate. <S> Some joints will need 2 angles to describe them; the shoulder and wrist would need 3. <S> You might use more sensors in different combinations to reduce ambiguities or improve accuracy, or to reduce the math if you're tracking the parts in real-time. <S> Eg. <S> , if I reach over my head, the distance from my waist to my hand has most of the position information, but distinguishing between my hand on either shoulder wouldn't be helped at all by its distance from a sensor in front or in back of my waist. <A> Use 3 axis accelerometers. <S> Put two on the torso ( top, <S> bottom)Two on lower leg ( one at knee, one at ankle)Two on forearm ( one at elbow,one at wrist) <S> That gets you quaternions for the ends of the limbs, and it all acts like a Wii controller, only more accurate as the "bar" is longer.
I think it could be done with transmitting and receiving transducers on a belt. If you're using a distance sensor, it will need to be further from the leg's center of rotation (hip).
Easiest way to regulate a 12 V battery to regulated 12 V? What's the easiest way to regulate a 12 V battery to a regulated 12 V power source? Preferably, I'd like a ready-made product so that I could avoid having to show my lack of skill with the soldering iron. :-) More complex answers are fine, too, as long as they are insightful. I'm thinking of powering a 12 V / 600 mA stage piano/synth by replacing its AC/DC converter with a small car battery for portable use. Because the device is not designed for in-car use, I understand that regulation is the safest bet. (Of course, I could buy an inverter, but I'd like to "do it right" and get rid of the DC/AC AC/DC conversion.) <Q> In a case like this, you don't have to worry about the source voltage changing much, so the main advantage of regulation is moot. <S> Often equipment that's designed for low-voltage DC will actually accept a range of voltages. <S> Sometimes it isn't, and really does expect a regulated supply. <S> The problem here is, what's the range that the synth will find acceptable? <S> Admittedly, applying regulation solves that problem by nailing the voltage down to something that's supposed to work, but the thing is, voltage regulation gets complicated when the source and the output voltages are closer than about 2 volts, because regulators need some headroom to work with. <S> Automotive batteries nominally sit around 13.8V; worryingly high if your device wants a regulated 12V input, annoyingly low <S> if you want to regulate it to 12V. If you can measure the voltage from your present AC/DC converter, while it's connected to the synth, with the synth turned on , and that voltage is with say, half a volt of the battery's open-circuit voltage, you would probably be able to directly connect the battery, without a regulator. <A> If you do this with a single battery, you will probably be fine. <S> But if you decide to move it to a car, you must be very careful of load dumps. <S> If you are using your synth in your car and you turn the headlamps off while the alternator is running, the energy in the alternator doesn't go away instantly. <S> Instead, it appears as a high voltage spike - in some cases as high as 60V! <S> I'd highly recommend a TVS and at least an LC filter to get rid of the noise which other systems in the car produce. <S> Also, don't forget an "idiot diode", to stop you reversing the polarity. <S> Many manufacturers omit input polarity protection diodes. <A> Many musical keyboards don't particularly care about exactly what voltage they get, because they have internal regulation. <S> Unfortunately, devices rarely specify the exact range of voltages they'll tolerate, in some measure because few wall bricks specify the exact range of voltages they might put out. <S> A keyboard which nominally accepts 9-12 volts may be perfectly happy with anything from 6 to 15, especially if the voltage only goes up to 15 at times when the synth's current draw happens to be minimal, but if the manufacturer labeled the unit as accepting 6-15, someone might expect it to work with a so-called 15-volt wall brick that actually puts out 18. <S> Many devices with a 12-volt nominal input would be perfectly happy <S> if driven directly by a car battery that was not connected a charger (or worse, something like a starter motor--starting a car can cause its +12 rail to swing up and down by dozens of volts). <A> How about <S> this from PowerStream? <S> It's 12 V to 12 V for a UPS when used with an external battery. <S> 3A, ready-made, rugged. <A> Just use the battery as is. <S> As long as you charge it properly. <S> Maybe what you need is some kind of voltmeter on the battery to check if it's running down, instead of regulating it. <A> I've done it often in the past (and precisely with some synthesizer) without any problem. <S> A fully charged 12V car battery measures about 13V, and with that voltage I've never damaged anything. <S> I've also used 6V Lead batteries to replace 6V supply of my old Atari Lynx <A> I once fried a 12v router with an attached USB air-card while using it on a RV. <S> The router input was marked as 12VDC and the power supply was 120VAC and marked as 12V output as well. <S> So I decided to run the router off my 12V RV house battery when there was no AC to plug in the normal adapter. <S> In my defense, I knew from experience that a cheap 12V adapter might vary from 10v to 16v and that there was some leeway, at least enough I would imagine from the 11.5V to 14.2V range I observed from my RV dash voltmeter. <S> What I hadn't observed was a scope pattern trace that might have shown me voltage that momentarily exceeded the window the device could tollerate, especially with a flakey alternator regulator of which in my old RV, everything is a little flakey. <S> No worries though, I only planned to use it while the vehicle was parked. <S> I used it this way a long time, normally only using it when I was parked <S> but I forgot and left it plugged in once and <S> when I got to my destination, the thing would never work again (all the lights were on and it was frozen). <S> I had to buy a new router <S> so this time I purchased a 12V regulated supply to go on my new router and air-card which has eliminated the problem. <S> 12V Rebulated adapter for router <S> Of course this unit is only 1A (1000ma) output <S> so I would imagine you would need something a lot more powerful if you are running an amp and speakers. <S> Still the issue I would imagine as is my experience is that running in a car would be your main concern with the alternator over voltage spikes as explained above. <S> As the voltage gets too low, you start hearing so much distortion that you usually shut it down when it drops too low because it simply sounds so bad from distortion. <S> Anyway you said you don't like to solder <S> but I found some cheap 12-20V in to 12V output oltage regulator ICs on ebay recently. <S> I'll try to find one and give you the part number after the holidays.
What a regulator actually does is to smooth out variations in voltage to make a source look more like a battery.
When Does Lead-Free Matter? When shopping for components it's common to find a lead-free or RoHS-compliant version of the part along side one that is not. Under what circumstances does it matter that I chose exclusively lead-free or RoHS (or whatever other lead-free designation is out there) parts? What would motivate me to pick a lead-free part over a cheaper non-lead free part? On a side note, some explanation of what all this lead-free business is about would be interesting to me. <Q> Aside from the RoHS stuff mentioned, in our lab we use lead free solder for high temperature circuit work, we tend to operate diodes and JFETs up to around 450degC and we've found leaded solder can't take the heat. <S> Of course without the lead the solder is harder to work with but the result is that we can test circuits at high temperature without having to make mechanical joins between components, which is the alternative. <S> Oh, and although you can't use leaded solder in Europe for commercial products you can in military stuff - I think the theory is that military people don't tend to lick circuit boards but there is always the risk that a toddler will in consumer stuff :-) <A> RoHS (Restriction of Hazardous Substances Directive) covers a number of hazardous substances, not just lead. <S> Google RoHS for a list. <S> You can not sell an electronic product in Europe if it contains any of the listed toxins. <S> It seems likely that other parts of the world will follow suit. <S> Lead-free solder has a higher melting point and is generally a bit more tricky to work with. <S> On the bright side, you are less likely to cause lead poisoning to yourself or anyone else manufacturing or recycling your product :-) <S> EDIT: <S> The general idea is that these toxins tend to concentrate in places like landfills. <S> Sooner or later this stuff returns to bite you through fires, leaks etc. <S> The RoHS directive is not an absolute ban, it specifies the max concentration. <S> You can for example have 0.1% lead in your product. <S> Industrial products may not require RoHS compliance, you can for example use NiCd batteries in medical equipment even if it is banned for consumer use. <S> But the batteries have to be brought in to recycling stations after use. <S> As an individual you are welcome to lick lead all day long or to import non-compliant products for your own use. <S> You can use solder containing lead as long as you don't sell what you make. <A> These are the substances prohibited by the RoHS legislation (copied from the UK Government leaflet): RoHS restricts the use of mercury, lead, hexavalent chromium, cadmium and a range of flame retardants notably polybrominated biphenyls and polybrominated diphenyl ethers. <A> As others have already pointed out, RoHS requirements generally forbids the use of components with hazardous materials (with some exceptions made for batteries and other specialty components where alternatives do not exist). <S> As a manufacturer of your product, you'll need to certify your product is RoHS compliant (amongst many other regulatory and industry requirements like emissions, safety, recyclability) in order to satisfy your customers and (in increasing number of markets) to be legally sold. <S> Because of this, the entire "supply chain" from the components, to the printed circuit board, to the board assembly (i.e. soldering) will need to be documented as being RoHS. <S> Not being "RoHS <S> " doesn't necessarily mean that the item contains a hazardous substance. <S> Sometimes, the products are given the RoHS designation to confirm their process compatibility with no-lead manufacturing. <S> Because lead-free solder has a higher melting point, the components must also withstand higher temperatures during board assembly.
The main challenge with RoHS is that you can not use solder that contains lead.
How to determine appropriate speaker cable gauge? When wiring speakers to a 100W consumer-grade amplifier, how do I select an appropriate gauge cable (for 8-ohm speakers)? Also, if 14 gauge cable is sufficient, what harm is there in using a heavier cable such as 12 or 10 (other than inconvenience and cost)? Related: What's the best cable to transfer audio signal? Semi-related: Any truth behind "multipole" technology in audio signal transmission? <Q> The #1 issue with speaker cables is that they have a fixed resistance, and the speaker has a impedance that varies with frequency. <S> (Note: you can almost use the terms resistance and impedance interchangeably in this context.) <S> When you combine the wires resistance with the speakers impedance you'll get, basically, a voltage divider. <S> The net effect of this is that the resistance of the wire will change the frequency response of the speaker. <S> Here's a graph that shows the speaker impedance and frequency response <S> Source: <S> https://web.archive.org/web/20130228153033/http://www.qscaudio.com/products/speakers/acoustic_design/ad_s52/ads52_freq.htm <S> Notice that the average impedance is 8 ohms, but really varies between 4 and 33 ohms. <S> Now, let's say that your wire has a resistance of 10 ohms (that's super high, but I'm illustrating a point). <S> At 500 Hz the speaker has a 5 ohm impedance. <S> This effectively makes a voltage divider that cuts the power going to the speaker by 5:15, or 1:3. <S> So if the amp is spitting out 100 watts, only 33 watts is making it to the speaker. <S> But at 2 KHz the speaker impedance is about 30 ohms. <S> That means that the voltage divider is more like 30:40, or 75 watts from the 100 watt amp output is making it to the speaker. <S> The end result of this is that the higher the resistance of the cable, the more the frequency response of the cable is going to be affected. <S> When you size the gauge of the cable to minimize this resistance, odds are that the cable is going to work fine for whatever current <S> you actually need to move-- unless you're doing pro-audio and have several kilowatt amps. <S> So for an 8 ohm speaker you'd want less than 0.8 ohms in the cable. <S> Of course, if you want to know for sure then you have to look up the impedance graph on the speaker and start calculating. <S> When this is all distilled down, you'll find that 16 gauge wire works for most home applications unless you have your amp a long way from the speakers (which you shouldn't do anyway). <A> Damping factor is the ratio of the impedance of the speakers over the output impedance of your amplifier, including cabling. <S> For instance, for 8 Ohm speakers and an impedance of 0.1 Ohm you have a damping factor of 80. <S> You want the damping factor as high as possible, and thus the resistance of your cable as low as possible. <S> A bigger cable is better. <S> It also helps to keep its length as short as possible. <A> 14 AWG, 12 AWG, 10 AWG are all fine. <S> Go to Home Depot / Lowes / Menards / Ace Hardware and buy cable off the reel and cut to the length that you need. <S> For mail order, try http://www.monoprice.com <S> Make sure that you get stranded wire instead of one-conductor solid wire <S> - they are more reliable. <S> Don't waste money on over-priced speaker cables!!!
A really rough rule of thumb is that you want the cable resistance to be less than 10% of the nominal speaker impedance. For most people with lower-end audio systems, any 2-conductor 14 AWG or larger diameter wire is fine.
What are some common/popular/go-to switching voltage regulators? So I've used the popular linear regulators (7805, LM317, LD1117, etc), but I'd like to learn more about switching regulators. Are there any "must have" switching regulators out there that are as popular, as ubiquitous as those common linear ones? <Q> so there are several manufacturers and many applications. <S> In the buck configuration it will output up to 700 mA without dissipating very much power. <S> It comes in dip8 and soic8, so it's small enough for many products and still easy to prototype with. <S> You can find lots on ebay for very little money <S> The only disadvantage is that it's an older part with a lower switch frequency than newer parts, so the inductor will have to be a bit larger. <S> For space-critical applications you will probably need a newer part with a higher switching frequency, so the inductor can be smaller, but those parts are quite a bit more expensive. <S> With an external switch transistor you can get higher currents. <S> The MC34063 is so popular there's even a Youtube video about it. <A> The big advantage of switchers is of course their efficiency , and that's only optimal under certain conditions, like input voltage/output voltage ratio , switching frequency and output current . <S> And while most linear regulators use more or less the same working principle,switching regulators exist in different topologies, like buck , boost , buck/boost and flyback . <S> That's why there's such a wide range of switchers available and why leading manufacturers like Linear Technology have parametric search on their webpage to help you find the right part for a specific job. <S> And even then the search may give you more than a dozen hits. <S> If you feel you're losing your way, call your supplier's FAE. <A> There are no "must have" switching regulators, a.la. <S> the 78xx or LM317. <S> For the "electronics hobbyist" I recommend looking at Linear Tech's switching regulators. <S> They are slightly more expensive than others, but that doesn't matter so much when just buying a few. <S> Also, they have an awesome simulator, LTSpice, that makes it much easier to get something up and running on your first try-- <S> and they have an example circuit/simulation for just about every chip they make. <A> Consider the PoL (Point of Load) Alliance parts. <S> Multiple sourced, includes inductors in the part so about as easy to use as a linear regulator. <S> Parts with crosses here from MuRata . <A> Switchers are usually designed for a specific application. <S> National Semiconductor has this on-line software for their Simple Switcher devices that helps one select a suitable device, and designs a supply using it. <S> They also have modules that are very easy to use. <A> The 78SR series is relatively new, but since it's a drop-in replacement for the 78xx series, it's got good potential to become what you're asking about.
For switchers there are no regulators iconic like the LM78xx is for linear. That's easy, MC34063 is a very common part that has been around for quite a while
Is this "lightning storm over a tropical island" a valid electrical symbol? This symbol is stenciled on the circuit board for Compaq PS2021 ATX power supplies. I spent almost half an hour on Google trying to identify it, and I haven't even gotten close. I thought it might be an old company logo, but nothing came up on that search either. Has anyone seen this symbol before? If not, can you hazard a guess as to what it might represent? <Q> Often times PCB designers will add in some of their own artwork. <S> It appears to me that the lightning bolt was there to indicate that there is high voltage present. <S> The clouds and island was some "artistic liberties" the PCB designer took. <S> That kind of thing is not uncommon. <A> It's not a symbol. <S> Looks like the layout person just had fun one night before sending off the PCB production data to the manufacturer. <S> This example seems to have been created just for the purpose of fun. <S> On the boards of an audio power amp I have fixed recently , I found the letters "MORE POWER TO YOU!" <S> printed in the silkscreen layer. <S> This could even have been a requirement by product management to impress reviewers of audio magazines who would test and take apart the amp. <S> Related: <S> chip art and this question . <A> Sometimes the artwork is related to the codename of the project. <S> Like maybe this power supply project was called "pacific storm" or something like that.
It's not an official symbol.
turn on power to physical wire from linux? How can I put power to some wires [possibly connected via Serial Port?], by using a script? I use Ubuntu. I want to schedule a time [using cron] to automate turning on something, say, an LED, a small motor, anything like that. I just need the power to go on when I run the command, and I can use a transistor or whatever for more power. How can I do it? My laptop doesn't have a serial port, but I can get a usb-to-serial adapter. <Q> What is the something that you want to turn on? <S> You said LED in your question, but then said something in the question. <S> :) <S> I only ask because an LED vs. a solenoid can have very different power requirements. <S> Is there a budget in mind? <S> Do you want something turnkey? <S> I was going to recommend trying the TI Launchpad , which gives you a micro with a handful of I/O, plus a built-in USB-to-serial adapter, and is Linux-compatible, for a reasonable $5 . <S> The price is so good, it's unbelievable. <S> And the tools are free. <S> But if you want to make anything that requires more current than an LED turn on with a serial command sent via cron through Linux, then you'll have to wire up additional components to make it work. <S> If you don't have much of a budget, and want something that looks like it would work out of the box, take a look at this module from Phidgets to see if it's easy enough to get working in Linux. <S> They provide plenty of source code, and have Linux drivers available. <S> There is also the obvious other option, Arduino, which from what I've read works on Linux. <S> I'm just not a fan of the tools, nor the price when compared to the Launchpad. <S> EDIT -- a totally unrelated comment that I just had to share <S> -- today I wanted to get more of the female headers for the Launchpad from Digikey. <S> Well, the two headers cost $1 apiece. <S> I ended up buying another Launchpad, because I would get both headers, as well as a USB cable, the dev board, and an extra MSP430G2 for an extra 3 bucks! <S> Seriously, TI? <S> :) <S> EDIT (regarding USB-to-serial adapter) <S> -- I am actually having a hard time getting information that this works on the Launchpad. <S> From this post , it sounds like it's possible, but I'm a little confused because some responses talk about the ez430, instead of the Launchpad. <S> I definitely have the MSP430 application UART appear in my Device Manager, but haven't tried to use it in any way. <S> I'll try to play with this next week to see if it really does work. <A> If you only want to switch a single LED, programming a microcontroller is overkill. <S> Use a USB->serial adapter, and toggle DTR or RTS pin using the serial API of your scripting language. <S> (I recommend Python + pySerial, but every mainstream language will have some way of addressing serial ports.) <S> This will only supply a few mA, probably enough to dimly light an LED. <S> You can get more current by adding a transistor. <S> The details of that are out of scope for this question. <S> edit: <S> For ubuntu <S> , first install pyserial: sudo <S> apt-get install <S> python-serial <S> Then try something like the following: #!/usr/bin/pythonimport serials=serial. <S> Serial('/dev/ttyUSB0')s.setDTR(1) <A> Connect a suitable MCU with USB, such as a PIC18F2455, to the laptop via the USB port. <S> I've done something like it which works with a Windows program, based on Brad Minch's work. <S> Here are details of how to compile the code for the PIC and Windows, and details of the PIC hardware, including where to buy the PCB that I designed. <S> You just need to write some Linux software similar to the Windows code. <S> A lot more can be done with this hardware than simply toggling an LED, of course, as a sizeable prototyping area is provided. <S> The simplest and cheapest way to do it is to emit a tone from the headphone port on the laptop, amplify it (a single transistor) and rectify the amplified signal, and use that to control an LED via another transistor. <S> This should cost under $1 to build. <S> By generating different frequencies and detecting them more complex control is feasible. <A> Is this what you're looking for? <S> Uses handshake line from serial port. <S> Also has code in C for Linux & Windows to control it.
Interface an LED to the PIC, and write some software to control it via a Linux program running on the laptop.
Speed of various prototype systems for digital electronics I would like some advice on what digital signal frequencies I'd be able to work with for hobby projects. I asked this question recently about interfacing to a memory chip from an FPGA as a hobby project. The answers are all very good but have made me realise that I have a little more to learn before attempting some a project. I feel I could probably build the design I want in verilog but I have a lot to learn about physical design first. I realise this question is rather vague, but all I'm looking for is an order of magnitude answer to get some idea what projects might be viable for me. I can buy an FPGA on a breakout board so that I can connect plug in wires to a breadboard for experimenting. I imagine that for flashing an LED there would be no issues with this. I imagine that I could likely get I2C working (as I've done similar things with microcontrollers). I could likely get an interface to a static memory chip working at a MHz or so maybe? I imagine that interfacing to a memory chip at 133 MHz would have zero chance of working. Assuming I take some care with connections, wiring etc, what is the highest frequency that it's even worth my time trying to make work for a hobby project on such a setup? I presume that if I make a home made PCB I could work with somewhat higher frequencies. What sort of frequencies would I likely have to go beyond before I'd really have to know what I'm doing to design high frequency boards? If I got a professionally made board I imagine I could likely get it to work a little faster still, but beyond that I'd need to educate myself a lot more to know how to make it work reliably with high speed signals. Again, I'm not looking for exact figures, just order of magnitude figures to prevent me from wasting my time on something that's never going to work. <Q> Now that question will open a can of worms! <S> Basically, there is no way to accurately answer that question because there are so many factors involved. <S> That being said... <S> The "quick" answer is that I wouldn't be concerned until the signal frequencies get near 1 MHz. <S> Between 1 and 10 MHz <S> I would be extra careful. <S> And above 10 MHz I would have a PCB made. <S> Of course there are exceptions, and this is what I would do, etc. <S> But as a rough order of magnitude place to start, it works. <S> There are many issues involved with this, and I'll try to cover them here... <S> As others have stated, it's not the signal frequency but the rise/fall time of the signal edges. <S> If you can slow down the edges (but not too much) then you'll have an easier time. <S> FPGA's are great for this because you can change the slew rate and drive strength of the I/O Pins. <S> In a synchronous system, this is more important on the clock lines than the data lines (I'm not saying that data isn't important, however.) <S> While doing proper signal termination is important, you can't do signal termination without knowing the characteristic impedance of the wire. <S> And in a breadboard type system you won't know what the impedance is, no matter how hard you try. <S> In this case, you'll simply end up twiddling with it until it just happens to work. <S> Pay attention to the signal return paths and loop currents. <S> This is going to play the biggest part in making the system run fast. <S> Of course, this is damn near impossible to do correctly with a breadboard, but those are the breaks. <S> This is why people use power/gnd planes and 4+ layer <S> PCB's. <S> I've ran PCIe (2.5 GHz) over wire-wrap-wire for about 5 inches. <S> And I've ran PCIe over a "commercially available" wire for 12 inches. <S> So you can get good performance from wire. <S> It's all in how you use it. <S> A good breadboard can probably run faster than a bad 2-layer PCB. <S> Of course, most modern parts are in packages that require a PCB. <A> Okay, Here is how you decide. <S> From a basic level, you just need to determine if you are dealing with Transmission lines . <S> As the article states, as long as the wire is less then 1/10th the wavelength of the signal, you do not have to take into account transmission line affects. <S> The speed of light is \$10^8\$ meters per second. <S> For example, at 100MHz, which roughly equates to a rise time of 1nS, you would have termination to worry about around \$\frac{10^ <S> 8}{(10*10^8)}\$ meters. <S> This means 10 centimeters. <S> Not that far, but far enough. <S> This does not mean you can just treat wires as ideal as long as they are below that point. <S> You still need to determine their inductance and capacitance and determine if they will ring. <S> With a simple LC circuit a resistor in parallel with the capacitor will stop oscillations. <S> This is a lower level theory, but for many also complicated, which is why higher frequency boards become an issue before the lines become transmission lines. <S> When you are ready, read High Speed Digital Design . <S> I do not promise it is an easy read, but it is one of the best books I have ever read. <A> Why don't you try how far you can get as a challenge? <S> I would guess that with careful termination and short twisted pair wires of equal length you could get up to at most about 100MHz, though it won't be easy. <S> A GHz oscilloscope will help to see how the signals are doing (ringing and such). <S> I've not tried this myself on a breadboard, but seen 80MHz signals go over more than half a meter of twisted pair with several connectors in between. <S> It was ugly, but made to work with series resistors to dampen the ringing. <S> A nice project would be a fast JTAG adapter, the faster the better but useful already at lower speeds.
In short, I think you can do 100MHz, use a solid ground plane, try not to embed traces in it and keep the lines short.
Is the damage on this circuit board too much to be fixed? (pics inside!) So a few weeks ago, my boyfriend's 32" flat-screen TV popped like a firecracker while I was watching it (and scared the hell out of me!), followed by a burning smell. This is the third device of his to fail on my watch (the first and second being his hard drive and a lightbulb, which I recovered and replaced respectively)... It's just a string of bad luck, but I couldn't help feeling guilty, even though they failed through sheer coincidence and no fault of my own (honestly!). I unscrewed the back panel and took a look inside. At first, I thought that it was just a popped resistor and some damage to the nearby connector. Upon further inspection, however, I noticed there's another spot on the bottom of the PCB that's popped and burned through. Also note the puffy capacitors, which probably caused the cascade of failures. My primary question to you guys is: Can an average electronics specialist with standard soldering tools fix/replace all of the components that are damaged on this board? Or is it too far gone to attempt a repair without highly specialized equipment? Also, I've heard that some companies can make you a PCB given a schematic diagram... Think I could just ship this to one of them and have them make me a new one? :) If so, my secondary question is: What kind of connector do I need to replace the damaged one? It's a linear 10-pin connector (as you can see in the picture), with a spacing of 2.25mm. Can I use any connector matching the shape and pitch requirements as long as I have a matching socket piece? And what kind of crimping tool do I need for the pins? I'll probably have to cut that whole end off since it's damaged. Forgive my ignorance, as I'm a computer scientist and not an electrical engineer, but I'd just like to know whether it would be worth my time learning how to fix it, or if the whole thing should just be trashed. <Q> First off, I'm going to presume that the TV is out of warranty. <S> If it is still covered, your best bet is to call the warranty line and get it fixed that way. <S> It's hard to tell from your popped resistor photo, but is there a heat sink to the left of it in the image that is black? <S> There might be something under there that blew out too. <S> As for DIYing the repair, you could try swapping out that through hole resistor that blew. <S> However, while it's common for low quality capacitor to give out, resistors don't usually pop unless there is an over current situation, so there might be a larger issue at hand here. <S> It also looks like there are 0 ohm and a 47K <S> (? <S> hard to read) ohm surface mount resistors in the damaged area on the back of the PCB that might need replacing. <S> If it's currently broken, there's no harm in attempting a repair. <S> Find a friend who does electronics to help you source the parts, especially if you think you'll need to replace those surface mount resistors. <S> As for getting a replacement board, rather than having it replicated from scratch, you should be able to get a replacement board. <S> The various boards in TVs are usually modular (power, tuner, etc), and that appears to be the power supply board. <S> I know the Vizio 50" plasmas have a nasty habit of blowing power supplies and thus they're pretty easy to find replacements for online. <S> Good luck and stay away from your boyfriend's books lest they burst into flames. <S> ;) <A> Assuming you can diagnose and fix the underlying fault, the physical damage is entirely repairable - where the PCB has carbonized, you need to dremel off all the black stuff and dig down to clean material. <S> Once fixed, a coat of PCB laquer or conformal coating over the demelled area is a good idea to prevent long-term moisture absorbtion into the rough surface left from the digging. <A> As ducksauz noted if it currently isn't working you are not going to make it any worse. <S> It is very possible that after spending time and money to fix what you see, as soon as power it back up, everything you just replaced will burn up again. <S> If you want to try to fix for the experience of fixing it, go ahead. <S> If you want to get a working TV, you might want to price a new one.
Having said that, while you can find and replace the damaged components, it might be more difficult to find out what caused the damage. Try searching for "TVMAKE TVMODEL Replacement Power Supply Board" and see what comes up.
Receive several fm-radio stations at the same time (~10-20 MHz wide summary at 90MHz radiofrequency) What is a cheap way to receive and record on PC several (tens) of fm-radios (public, e.g. news, music, etc)? Such radios uses frequencies like 90.4 MHz or 102.7 MHz, sends a stereo (sometimes with digital text subchannel). If I want to record tens of radios, I need to cover a spectrum of tens of MHz. The first way is to buy two or three dozen usual radiorecievers and try to connect them all to PC (e.g. with half-dozen of multichannel external usb soundcards). I think, that this is not very cheap. The second way is to build a single radio, which will downsample entire band 88-105 MHz into 3-20 MHz, then feed it into high-speed ADC, and do a software detection of each station. Is the second way possible? cheap? How mush will it cost? What hardware can be used, if I have no skills of making PCBs and using ADCs & FPGAs? <Q> The second technique you mention is the way to do it, using what is called a "Software Defined Radio" or SDR. <S> However, they are using relatively low-frequency signals on the HF amateur radio bands, and the hardware doesn't use any exotic components. <S> Digitising VHF signals as you require and receiving several channels simultaneously is going to be rather expensive, the ADC alone is going to cost about 50 dollars and you will also need an FPGA and a DSP, unless you convert down to baseband and do the DSP on a PC. <S> You will need a lot of high-frequency design experience, be able to develop code for the FPGA, write DSP code and be able to design a high-speed multilayer PCB, so you should start studying. <S> :) <S> As for cost, I'd estimate 500 dollars for the hardware, including the PCB, assuming you designed it yourself. <S> Linear Technology makes suitable ADCs that can downsample at 750 MHz! <S> They were good enough to give me a couple as free samples. <S> I have suitable FPGA and DSP boards, so it's just a question of putting them together. :) <A> Actually, RTL-SDR can solve this in ... <S> several 20 USD dongles, each covering up to 3 MHz of FM spectrum (I achieved clear reception of 4 or 5 FM stations with 0.4 MHz spacing per dongle). <S> As was found by osmocomSDR project, there are lot of Chinese DVB-T USB receivers, built on Realtek RTL2832U chip and some 50MHz - 1+ GHz I/Q radio frontend. <S> This chip has hardware detector and decoder for DVB-T video signals and puts raw MPEG TS to the PC. <S> But there is a feature when chip transfers all I/Q samples to the host. <S> Using USB 2.0 it can transfer to 3.2 or 2.4 MS/s (millions of I/Q samples per second) <S> and there are now several programs to do SDR processing of samples. <S> There is even GNURadio integration. <A> For your first solution you shouldnt need a sound card. <S> They make usb fm receivers. <S> Like this: http://www.amazon.com/ADS-RDX-155-EF-Instant-FM-Music/dp/B000HNHA12/ref=pd_sim_sbs_e1 Buying tens of these for $200 will be cheaper (and far faster) than a custom solution using the aforementioned SDR (software defined radio). <S> Though if your goal is a fun project learning lots about FPGAs, PCBs, schematics, RF, and other miscellaneous electrical engineering <S> the SDR options sounds perfect :). <A> Look into GNU radio. <S> Here's their hardware page to start.
Many radio amateurs are using SDRs, and the simple ones are very cheap, about 30 dollars for a kit that down-converts the input into in-phase and quadrature baseband audio output which is fed into the stereo inputs of a PC sound card for digital signal processing.
Difference between RF splitter and coupler? I am trying to connect three nodes(A,B,C) through RF cables in the following manner :A can communicate with both B and C(and vice versa), but B and C cannot communicate directly. Somebody suggested using a splitter for this work, but when I tested one I found that all three nodes could communicate with each other. Now, somebody is telling me to use a coupler. Can a coupler achieve what I want? What is the difference between splitter and coupler? PS: I am working in the 2.4GHz band(wifi), if that makes a difference. <Q> A splitter definitely won't work. <S> It's a device that accepts an input signal and delivers multiple output signals. <S> I think that you need a directional coupler. <S> It has an input, an output, a coupled port, and a load. <S> It's a device that operates on an input so that two output signals are available, on the output port (larger signal) and the coupled port (smaller signal). <S> However, when the input is applied to the opposite port of a terminated coupler, only one output signal is produced. <S> MCL makes suitable devices. <A> Perhaps something like this circuit might help? <S> As drawn, it provides 300:1 attenuation between the first two or last two cables, or 90,000:1 attenuation between the first and the third. <S> Some experimentation may be required to find out how much attenuation is sufficient to prevent the first and last devices from communicating with each other, without preventing the middle device from communicating with each of them. <S> Click each switch to make it send out a pulse and watch the response. <S> Note that the impedance matching isn't quite perfect, but would likely be good enough for most applications. <A> I don't think that is what you are looking for. <S> Most splitters provide some degree of "isolation" but this isolation is limited, maybe 30dB or so at best (for a high quality splitter with perfect termination). <S> Even a slight impedance mismatch on the common port will lead to dramatically reduced isolation. <S> What you need to do is put attenutators in the lines to B and C to weaken the signals enough that they cannot communicate directly. <S> You may also find that you need to put your devices inside well-screened boxes. <S> PCB traces can easilly act as antennas.
It seems the term "coupler" is usually used for an asymetric splitter that provides low loss on the main line while providing a highly attenuated monitoring port.
How to determine proper stepper polarity? In one of the answers to this question , it is stated that wiring one of the coils on a bipolar stepper backwards can cause the motor to step improperly, or not at all. I've salvaged several steppers from discarded electronics (printers, scanners, typewriters), and I'm curious, is there a better method than trial and error for determining the proper polarity of the coils? If I reverse both coils, does the motor simply run in reverse? <Q> If you think of the phases of the stepper, it would go from [--] to [-+] to [ <S> ++] to [+-], <S> and then repeat. <S> If we label those phases as: [--] <S> J [-+] K <S> [++] <S> L <S> [+-] M <S> Then you go "forward" by stepping JKLMJKLMJKLM... and "backwards" by stepping MLKJMLKJMLKJ... <S> If you flip the bit on both, we now have: <S> [++ <S> ] J' <S> [+-] K' [--] <S> L' [-+ <S> ] M' <S> So when you drive, you get J'K'L'M'J'K'L'M'... <S> But J' is really <S> L, K' is really <S> M, L' is really J and M' <S> is really K on the motor, so you are moving LMJKLMJKLMJK... <S> which is the same sequence of the "forward" stepping, but with the cycle starting half-way in the middle of the original cycle. <S> So, yes, if you reversed the polarity on BOTH coil sets, you would still move in the same direction. <S> However, you will be off by half a stepper revolution. <S> Depending on the gearing, the difference would probably not make a difference. <S> EDIT <S> I updated to indicate polarity as +/- <S> (versus 1/0 in my original posting). <S> This is easier to visualize graphically -- if you treat each winding 1 as the X coordinate, and winding 2 as the Y coordinate, then you are stepping between four quadrants. <S> If you then half- or quarter- step, you are just increasing the number of points that define your loop. <S> Taken to the limit, if you have the X=sin(wt) and Y=cos(wt), you'll have a smooth circle; and if you reverse the sign of one (say X=-sin(wt)), you'll just go through the circle in reverse direction. <A> (this extra information doesn't really answer your question directly - but 'add comment' has broken on my browser since the last big UI change) <S> Here's a trick - <A> What difficulties you face getting an unknown source stepper going will depend on whether it is Unipolar, bipolar, and 4, 6, or 8 wires. <S> If it's a simple bipolar 4 wire, getting one of the phases wrong simply means it steps the other way. <S> This is a great introduction that might help you understand the winding variants available. <S> Personally to identify unknowns I first figure out the winding - wires relationship with a multimeter, then use a drill to turn the stepper motor and an oscilloscope to allow me to mark the polarities of the windings.
if you have a stepper with random colored wires you can easily find the pairs of wires that correspond to each wire - turn the stepper manually, feel how easily it moves, choose any wire, short it to other wires until you find one which makes the stepper harder to turn by hand - those two are wired to the same coil
Charging lead acid batteries in series I recently bought 2 12V lead acid batteries (AGM type) for my mobile music needs where I need 24V, so I discharge them in series. At the moment I charge both batteries separately, which is a bit annoying. So I would like to charge them in series, but I am not yet sure if this is a good idea. When charging them separately I use a bench power supply with current and voltage control set to 14.1V. So, when charging them in series I would set my power supply to 28.2V, but then one of the batteries starts gassing and when measuring the individual batteries I see a voltage difference of about 0.3V. So, am I doing something wrong here, is it just a bad measurement and nothing to worry about or is it generally a bad idea to charge batteries in series? <Q> As they are used, the cell voltages will change, which is why they are not charged in parallel. <S> If they were charged in parallel, the one with the high voltage wouldn't get much current, and the one with the low voltage would get too much current. <S> With the cells in series, they all get the same amount of current, and all get approximately the same amount of charge. <S> Since they will not charge and discharge exactly the same, the battery voltage and level of charge will gradually drift apart. <S> To handle this, it is common to periodically do an "equalization" charge, where you overcharge the string slightly to bring up the charge of the undercharged cells. <S> You do this because lead-acid batteries handle overcharge better than they handle undercharge. <S> You have done that, and at least one of the cells has gassed. <S> Check the fluid level, and next time charge to a slightly lower voltage. <S> Only do equalization every couple of months. <S> If some of the cells fail, it will not be possible to charge the battery fully. <S> When that happens, it is time to throw out the battery. <A> I'll have a crack at answering, but I'm really not a reliable source here. <S> My experience with LiPos in model aircraft says that series charging is fine, as they are usually a number of cells in series. <S> However it is required to keep the cells 'balanced' ie. <S> the same voltage. <S> Balancing is done by charging each cell individually. <S> This is a complex task in a LiPo as each cell remains in series. <S> It should be as simple as charging your batteries individually. <S> Ideally the cells should remain at the same voltage after discharging in parallel, but this really depends on the quality/technology/relative-age of the batteries. <S> The further apart the voltages, the more you have to 'over-charge' one cell to get the other up to voltage. <S> Obviously there is only so far <S> this can go before it starts gassing. <S> It would also be a good idea to use a charger that adjusts voltage to maintain a constant current. <S> Typical lead acid batteries can be charged at 0.1C (a 1Ah cell can be charged at 0.1A). <S> A 'smart' charger will also make balancing the cells much easier. <A> My UPS uses 2 lead-acid sealed batteries in series. <S> It charges them only to 27.4 Volts, and it does that rather slowly (IIRC ~8h charge time), but a charger of this type and voltage can stay connected to the batteries "forever" without damaging them. <S> Once you try to charge them with higher currents the slight difference between the cells will be a problem, since one battery will have higher voltage and thus start gassing out at some point. <S> A really inelligent desgin would measure the middle voltage between the batteries, but I have seen this only on high-power LiPo/Li-Ion chargers. <S> So, the answer is that if you have the time for slow charging, you can leave the batteries in series, but if you want to charge as fast as you can - separate them. <A> Have you considered charging them in parallel at your "normal" 14.1V? <S> Of course, during initial charging your load will be drawing twice the current if your system is capable of delivering it. <A> This is a problem when series-charging lead-acid batteries and <S> it is generally not recommended. <S> The battery's condition is dependant on the specific gravity of the sulphuric acid electrolyte. <S> Of course the 6 individual 2V cells in each battery share the same electrolyte which is why they can be charged in series but separate batteries can't.
It still will be best if the batteries are balanced or nearly so, but the worst case scenario is that each will behave as if you were charging them individually and leaving them connected for an extended period of time. It is normal to charge lead-acid batteries in series.
How do I solder this tiny (0.5mm pitch) MSOP10? I am soldering a 10 lead MSOP (LMH1980) onto a PCB. Or trying to do so. The chip has a pitch of 0.5mm. I find that every time I use the "tack and glob" method I have been taught, I cannot remove the excess solder; it just sticks to the pins. (Tack and glob: pin a few crucial pins down, then glob solder over the pins. Wick away excess solder.) Tack and glob seems to work for a TQFP44 dsPIC and an TSOP16 ADG733 chip, but every time I do tack and glob on the LMH1980 I find that I cannot remove the excess solder, and in the process of trying to do so, I have damaged two PCBs (pulled the pads off) with components already on them. How can I solder this chip? BTW, I have only a basic temperature controlled soldering iron and hot air station (Aoyue 968.) Nothing fancy. <Q> Flux! <S> Solder bridges mean you need more/better/fresh flux. <S> (Either iron or hot air will work fine. <S> Heat is heat. <S> wipe iron on sponge, apply to pins, repeat. <S> The excess solder will stick to the tip.) <A> I've soldered similar devices without any problems. <S> I use a very fine tip and a stereo microscope. <S> I normally use drag-soldering with a mini-hoof cartridge and my Metcal system for fine-pitch devices, but I don't think it's suitable for one like that. <A> Given that you have a hot air station, I think your best bet is to use a very thin layer of solder paste, preheat the board + chip (I used to have a recycled George Foreman grill for this) and then use the hot-air to push the solder past the melting point and allow it to flow. <S> BTW, do you have solder mask on your boards? <S> At finer pitches, the solder mask can make a big difference on your success rate. <S> If you are going to tack-and-glob, make sure your glob is much smaller than usual. <S> -- <S> BTW, for solder already stuck beneath and under pins, sometimes hot air with high air flow can push the solder away from the pins enough to clear the short. <S> If your board is masked, there's a decent chance the resulting glob sitting under the IC will harmlessly stay put.
You might need to work with a much finer solder. You can avoid damaging the PCB when removing parts like that by using Chip Quik . I prefer iron for clearing shorted pins:
Online database of data sheets that isn't horrible? When wanting to look up a datasheet for a random part number I encounter in a circuit, say an AD9862, my first action is just to type it into google. For about half of the parts I encounter, particularly ones made by big respected brand names (like the Analog Devices example I used above) this gives me as a first hit the official manufacturer page and datasheet. Happy. But about half of the time, especially with commodity/generic parts, say a 7812, the top hits are all these garbage sites like alldatasheet, getdatasheet, or datasheetcatalog dot com (I'm not typing out their URLs, since I don't want to further increase the pagerank of these junk websites). These websites are ugly, crammed to the brim with ads, with bad search capabilities, lots of SEO to get them highly ranked by google, but often with very little in the way of useful content. Do you have a favorite way to find datasheets online, that sidesteps these middle-man ad-crammed sites? Is there a nice, user-curated perhaps, clean, low-ad-content database of datasheets out there somewhere? <Q> The others have made great recommendations. <S> I'll add one small google hack that I use a lot: [part number] datasheet filetype:pdf <S> So let's say you're looking for the LM629 datasheet <S> ... you'll google LM629 datasheet filetype:pdf or maybe an 74LS04: 74LS04 datasheet filetype:pdf <S> This has always worked well for me, since I know that the datasheets are going to be in the PDF format. <A> I only get datasheets from the original manufacturer, and avoid all third-party datasheet sites. <S> With the manufacturer, you know that you're getting the latest, most up to date info. <S> I've been doing this long enough where I can locate the original manufacturer within a minute or two. <S> so it's fairly painless. <S> For commodity parts, most of them are from National, TI, or On Semi <S> so even then I can locate the original manufacture quickly. <S> Now that National was bought by TI, this will get even quicker. <S> I also have another rule: <S> Don't use parts that I don't know the manufactures part number for. <S> That's the only way to know for sure what you're buying/using. <S> Anything else is too unreliable of a source to trust building an expensive PCB with. <S> All of this works quite well, unless I'm trying to find a datasheet for an obsolete part or an oddball part. <S> In that case, Google it and search through all the hits. <S> But this only happens when I'm desperate anyway <S> so a little Googling isn't the end of the world. <A> My favorite method is to use supplier catalogues. <S> Granted <S> I'm not working with many old parts so everything I'm interested in is still in their databases. <S> Digikey will link directly to the manufacturers datasheet (PDF) in almost all cases. <S> And their search features are much more useful than pure googling in a specific subject matter. <A> they let you actually download the pdf <S> so you can Spotlight it next time and avoid the web entirely. <S> I think there will never be a great quality site for this because reproducing datasheets is kinda shady. <S> Although most manufacturers don't seem to mind, I believe most of these datasheets are scanned and redistributed in violation of copyright. <S> Although, I guess you could do extremely targeted advertisement. " <S> Looking at voltage regulators? <S> Click for a sample of our new XYZ regulator!"
And places like Digikey will list the manufacturer and mfg part number My favorite is alldatasheet.com because: they don't list parts they don't have datasheets for they don't tease you and then try to charge for access (the expert-sexchange.com business model)
Which synthesis tools support VHDL libraries? On various places across the net, I read that (some) synthesis tools do not respect VHDL libraries. These tools just throw all entities and packages into a single namespace, so that you cannot have mylib.someEntity and yourLib.someEntity in the same project. I know that Altera Quartus used to have that problem last time I checked (but that was a while ago). I'm afraid that some of the info on usenet archives might be outdated, so I'm looking for up-to-date info. I also believe most simulators support libraries today. My question : Which synthesis tools do support VHDL libraries and which don't? If there are any simulators that do not support libraries, I'd also like to hear that. Can you please also mention the version numbers of the tools, for future reference? <Q> Riviera-PRO (from at least version 2006.02 onwards) <S> The only caveat is that the XST tool in the Xilinx toolchain is incapable of performing automatic file ordering on projects where entity names exist in multiple libraries (it ungraciously gets stuck looping forever trying to resolve dependencies). <A> Quartus uses a single library by default, but different libraries can be used if required: <S> http://quartushelp.altera.com/9.1/mergedProjects/hdl/vhdl/vhdl_pro_libraries.htm <S> Two or more entities with the same name cannot be used, however, only packages. <A> Synplify E2010.09-SP1-1 is OK: you can tell it what library to compile each file into in the project file <S> Sample code follows for others to try (not my normal coding style, I'd normally not use positional mapping, but in this simple situation it looked a bit cleaner). <S> The gate-view shows two LUTs one with an AND and one with an XOR. <S> lib1.vhd library ieee;use <S> ieee.std_logic_1164.all;entity test is port (a, b : in std_logic; <S> o : <S> out <S> std_logic);end entity test;architecture a1 of test isbegin o <= a and b;end architecture a1; lib2.vhd library ieee;use <S> ieee.std_logic_1164.all;entity test is port ( c, <S> d : in std_logic; o : out <S> std_logic);end entity test;architecture a1 of test isbegin o <S> <= c xor d;end architecture a1; top.vhd <S> library ieee;use <S> ieee.std_logic_1164.all;library lib1;library lib2;entity top is port ( a, b, c, <S> d : in std_logic; o1, o2 : out std_logic);end entity top;architecture a1 of top isbegin -- architecture a1 <S> test_1: <S> entity lib1.test port map (a, b, o1); test_2: entity lib2.test port map (c, d, o2);end architecture a1;
I use the following tools which all have full library support: Xilinx ISE (from at least version 10 onwards) Quartus (from at least version 10.0 onwards; Two or more entities with the same name cannot be used, however, only packages) Synplify (from at least version 9.0 onwards)
Solar panel and LED I just obtained o solar panel which shows a max output of about 18-19 votlts . I put it in partial shade to get an output of about 2.7 volts and connected it to an LED ensuring the correct positive and negative legs. But the LED failed to light. Other small appliances and toys using 3-6 volts also failed to work. Any suggestions ? <Q> Use a series resistor with the LED to limit the current (220R, say), you could damage it otherwise. <S> You will probably find that it drops well below the 2.7V you were getting with no load. <S> and is too low for it to work. <S> Assuming that the panel has enough output in full sunlight, you will need a suitable regulator to power low voltage items. <S> Switchers are often used, because of their high efficiency. <A> Make sure the panel is supplying enough current. <S> Current is what determines if an LED lights up, not voltage. <S> That is to say, even if you have 1.7V (enough volts) but are only able to supply 0.3mA your LED won't light if it needs 1mA. <A> PV (photovoltaic) or solar panels are close to being constant current devices with current out being close to proportional to light levels. <S> The voltage output of a PV cell is close to constant across its usual working range. <S> This means that if you shade an 18V panel to the extent that it is only providing 2.7V, the illumination level will be exceedingly low, so that the available current will be close to zero. <S> LEDs driven with close to zero current produce close to zero light out :-). <S> In full sunlight the current at 2.7V will be close to the panel's shortcircuit current which is about 10% to 20% higher than the panel's maximum power point current. <S> I max_power = <S> Watts max power / Vmaxpower eg <S> If you have a 1 Watt panel <S> then Imp ~= 1W/18V ~+ 55 mA. <S> So for a say 6W panel Imp = <S> 6W/18V = <S> 330 mA.Your load needs to be able to handle that much current and dissipate the power provide. <S> (Whether an LED or motor or other device).. <S> Power = <S> V <S> x <S> I = <S> 2.7V <S> x <S> Imp x 110% or so in this case. <S> You can get 2V7 zeners diodes BUT a 3V3 would be better - allows most white LEDs to be driven. <S> Or you could use about 5 x silicon diodes in series. <S> 5 <S> x 0.6V = <S> 3V. <S> As current rises Vf_diode rises and depending on diode and current may be between 0.6V <S> amd 1V. <S> (1V unusual). <S> Using a string of eg 1N400x diodes allows you to clamp about 1A of continuous current..
Only by reducing light levels to a very ow percentage of full power can you get the voltage to drop substantially. If you MUST use am 18V panel to drive a 2.7v load, you can load it with a 2.7V voltage clamp (such as a zener diode or a number of silicon diodes in series, so that when the load conducts the voltage is clamped to their forward voltage at the panels operating current. Measure the panel voltage when you have the item connected to it.
Simple \$12V_{AC}\$ to \$12V_{DC}\$ Rectifier I want to convert a \$12V_{AC}\$ power supply output to use \$12V_{DC}\$ to power some outdoor LEDs. The power supply as it stands will light the LEDs (with a slight flicker from the reverse polarity portion of the AC) but I have been told this may reduce the life of the LEDs having them reverse polarity for a long time. So can someone suggest a simple rectifier circuit I could build or point me in the right direction of which one of these Maplin rectifiers is suitable (I'm not sure what the specifications refer to exactly)? <Q> You may want to have a look at the answers to this question . <S> Applying AC to a LED is not a good idea. <S> The flicker is not the main problem (may be hardly visible), but LEDs have a limited reverse voltage, usually about 5V. <S> So the 12V you're using is way too high and may destroy your LED. <S> What you need is a rectifier, followed by a capacitor (to flatten out the rectified voltage). <S> 1A diodes like 1N4001 are standard and will do nicely for a few standard LEDs. <S> For the capacitor I use 2000uF/A as a rule of thumb, so if your LEDs consume 100mA you could use a 220uF/25V electrolytic capacitor. <S> Be sure to place the capacitor correctly; it may explode if you reverse it. <S> The DC voltage will be about 15V (\$12V \times \sqrt{2} - 2V\$ ), so depending on the type of LED you're using it's a good idea to place a number of them in series <S> , otherwise you'll have a big voltage drop over your series resistor = less efficient. <A> You don't need a rectifier. <S> You can drive the LEDs with AC voltage as long as you implement some circuitry to minimize their reverse voltage. <S> This can be done with a single additional diode in one of three ways: <S> Place <S> the diode anti-parallel to the LED, such that it conducts during the negative half cycle. <S> This drops the reverse voltage to 1V or less, which the LED can handle easily. <S> Place a second LED anti-parallel to the first one. <S> This allows the LEDs to conduct alternately on the positive and negative cycles. <S> If efficiency is a concern, this is better than method 1, because power is dissipated as light rather than heat from the standard rectifying diode. <S> The reverse voltage seen by either LED will be equal to the forward voltage. <S> Check the datasheet, this may or may not be OK. <S> The leakage current of the LED under a reverse-biased condition is much greater than that of the rectifying diode, so the voltage across the LED will be low. <S> This saves power by not conducting during the negative half-cycle, but decreases the light output. <S> You may have to increase the current to compensate. <A>
The problem is that the LEDs are exposed to too much reverse voltage, conversion to 12VDC is only one solution. You can use a rectifier like in your Maplin link, or use discrete diodes. A neater solution would be to put a standard rectifier diode (such as the 1N4001 as mentioned) in anti-parallel with the LED, this would conduct in the negative half cycle therefore exposing the LED to only a small reverse bias of about 1 volt. Place a rectifying diode in series with the LED.
How can I design my FPGA power supply if I don't know how it will be used exactly? I'm designing a little dev board for FPGA experimentation using the Cyclone IV EP4CE10 but I am having a bit of trouble estimating the power requirements. I understand this depends almost completely on the usage and configuration of the device but since I'm a bit new to this and really have no idea how and what I'm going to be using it for, (because, you know, it's a dev board) I could use some advice on what would be "enough" for the different power rails. I won't be doing anything extreme, I believe, but I would like to have a bit of headroom for experimentation. <Q> How about using Altera's tools for that? <S> I've no practical experience here <S> (I've some minor experience with Xilinx), but PowerPlay Early Power Estimator seems helpful. <S> You can chose Maximum for the Power Characteristic , if you want some headroom for experiments. <S> If you have a real design for which you want to estimate the power consumption, you can use PowerPlay Power Analyzer, part of the Altera Quartus II system. <S> They claim it has 20% accuracy. <A> Beyond that you could search online for designs/schematics of other similar dev boards to see what they used. <S> For example, I have a mini/barebones FPGA board based on the EP2C5T144 (from eBay); I believe the 3.3V regulator it uses is rated at around 800mA. <S> Compared to the big Altera DE2 board I have which is loaded full of all sorts of I/ <S> O devices, it uses an LM2676 3.3V switching regulator rated at 3A. <S> I'm still pretty new to this too <S> so I don't know all the fancy equations to calculate FPGA power requirements. <S> Also, I believe there's some sort of power estimator tool in Quartus II, but that's proably specific to a specific design/configuration. <S> Hopefully the above gives you some frame of reference. <A> You could use bench supplies for your prototype during development. <S> When you know how much current the various supplies require you can design them for your production board, adding a bit of capacity for future enhancements.
National Semi's SIMPLE SWITCHER online tool ("WEBENCH designer") allows you to design a power supply for a specific FPGA.
Why thermal reliefs on vias? My EDA software (PCAD, but I guess others do this too) adds thermal reliefs on vias in a copper pour. What's the use? Vias aren't soldered. (I know why you use them on regular PTH pads) <Q> What the other guys have said is very true. <S> I'll add that about 10 or 15 years ago I stopped using thermal reliefs. <S> Since that time, maybe 30-50K PCB's have been manufactured and I've never had a problem. <S> In a production environment soldering to pins/pads/vias/holes directly connected to large planes isn't really an issue due to the temperature profile of the ovens, and that the ovens tend to heat the whole board and not just the pads that are being soldered. <S> When hand soldering on a PCB without thermal reliefs there can be an issue, as the others have pointed out, but in my opinion the advantages of no thermal reliefs are far greater than easier hand soldering. <S> Here's some of the advantages of no thermal reliefs: <S> Greater heat transfer to the planes on the PCB. <S> This pad is intended to transfer heat to vias and then to the ground plane. <S> Particularly when putting planes under the BGA. <S> Less chance for the via to get messed up due to plating, or drill accuracy issues, or other PCB manufacturing problems (not a huge benefit, but a benefit none the less). <S> So, in the end, I don't use thermal reliefs <S> and I've had zero problems (other than the occasional hand-solder issue which is easy to overcome). <A> IPC2221 Section 9.1.3 says: 9.1.3 Thermal Relief in Conductor Planes <S> Thermal relief is only required for holes that are subject to soldering in large conductor areas <S> (ground planes, voltage planes, thermal planes, etc.). <S> Relief is required to reduce soldering dwell time by providing thermal resistance during the soldering process <S> I think most of times is not necessary to thermally relive a via. <A> To ensure that the copper pour doesn't conduct the heat away when the board is soldered, which will result in bad solder joints. <S> Vias are sometimes filled with solder, to increase reliability. <S> Thermal reliefs are optional with the software I use; you can probably make them ordinary vias, if you wish. <S> Tent them, if you don't want them soldered. <A> It is impossible to get 50% solder fill (or 47mil, which ever is less) on ground connections without thermal relief, especially on +90mil thick PCBs. <S> There is IPC 2221A section 9.1.3, which has very good recommendation. <S> I have seen best results on two 10mil web spoke designs for +3 ground plane PCBs.
A proper thermal relief on TH connections is a must for Lead free wave soldering. Easier routing and fan-out of BGAs and other dense parts. You see this the most on QFN's and other packages that have a ground pad on the bottom of the part in the center.
Explain what is a transistor in plain English! Can someone care to explain - in plain English - what a transistor is and how it works. I know computers are full of these but don't know much about them. P.S. I know about this site from another one in the family of StackExchange (I have no engineering background) and hoped someone might help me with this. Please don't link to the wiki explanation. I've read that and I'm more confused. I'm looking for a 7 year old explanation. Thank you! <Q> For the moment, I'm going to lump together transistors, FET's (Field Effect Transistors), and relays. <S> There are some other devices that could be lumped in there as well, but... <S> At the most basic level, all of these devices operate as a switch. <S> Do something, and electricity will start or stop flowing. <S> Stop doing something, and the electricity flow will change. <S> A relay is the easiest for beginners to understand. <S> Current flowing through the coil causes an electromagnet to become magnetized. <S> This makes a mechanical switch "flip". <S> Turn off the current in the coil and the switch flips the other way. <S> No current through the base means that there is no current flowing through the other two pins. <S> A FET is similar to a transistor, but instead of a current flowing through the base, it is a voltage on the base. <S> And just to confuse matters the pins are not called Base, Emitter, and Collector. <S> Instead they are called Gate, Source, and Drain. <S> But the operation is very similar. <S> Have the correct voltage on the Gate and electricity will flow through the other two pins. <S> Don't have the correct voltage and the flow will stop. <S> Another important detail is that the transistor or FET doesn't have to be "fully on" or "fully off". <S> If the Base or Gate is somewhere in between fully on & off, then the flow of electricity through the device will be "a little on" or "a little off". <S> This doesn't work for relays. <S> And that's the beginner level explanation. <S> Of course I glossed over a lot of details, but they are not important at this stage. <S> What is important is that you can take Transistors and FET's and combine them in interesting ways to make all the cool electrical devices that we can't live without. <A> At a 7 year old level, a transistor is like a controllable valve or tap (or faucet for our US friends) <S> A small turn of the tap (or small increase in voltage between the base and the emitter) creates a large flow (or large voltage between the collector and emitter) <S> So at a very basic level it acts as an amplifier. <S> However, in a computer it is generally used as a switch. <S> Outside the small region where varying the base voltage drives a larger variation in the collector voltage <S> it is effectively binary, <S> so for allowed input voltages the output is always 0v or Vmax (this value depends on the power supply, type of transistor and circuit etc) <S> A bit more detail, while still not being too technical is on Wikipedia . <S> (and yes, I know I used flow and voltage in the same sentence:-) <A> For a 7 year old: Imagine you have a game controller stick that moves a couple of inches each way. <S> It's connected to a robot arm that moves a couple of feet each way. <S> The movements are just the same, but bigger. <S> Similarly, a transistor maps a lower-voltage current onto a higher-voltage current. <S> So, a small low-current circuit can use a transistor to control a motor or somesuch that requires a much higher current flow. <A> If you imagine a sandwich made of two slices of copper bread separated by a slice of plastic cheese hooked up like this: +-------------+ | | [COPPER] <S> |+ <S> +-------[CHEESE] <S> [BATTERY2] <S> | + [COPPER] | [BATTERY1] | | | <S> | | <S> +----------+-------------+ <S> Then it's easy to see that no charge will leave either battery because the cheese is an insulator. <S> However, if the cheese is magical and becomes more and more copper-like as the voltage of battery1 is increased, more and more charge from battery2 will flow through the sandwich as the cheese becomes more and more conductive. <S> With the battery polarities shown and, in reality, the bread being "N" type silicon and the cheese being "P" type silicon, that's how transistors work. <A> I write this as another answer (instead of a comment) because of the following reason: <S> If I were a newbie/beginner (perhaps somewhat older than 7 years, for example: 15) I would be confused about a specific descreapancy to be observed in some of the answer. <S> Here are some quotes Similarly, a transistor maps a lower-voltage <S> current onto a higher-voltage current. <S> In the case of a transistor, when current flows through one of the pins (called the "base") it causes more current to flow through the other two pins (the pins are called the collector and emitter). <S> A small turn of the tap (or small increase in voltage between the base and the emitter) creates a large flow (or large voltage between the collector and emitter) <S> As a beginner I ask myself (because I want to understand <S> the working principle of the BJT): What is the controlling quantity: <S> Current or voltage? <S> In some answers/comments there is even no clear wording: The output or current flowing through is related through multiplication of the input, back to the faucet or valve or tap, turn it on a little <S> you get a little water <S> If I were a 15 year old beginner I would ask: <S> Guys - what really controls Ic and how? <S> ( I remember that this question, in particular, was already discussed earlier in this and in other forums; therefore, I am surprised that still different opinions do exist in answering this question). <S> LvW
In the case of a transistor, when current flows through one of the pins (called the "base") it causes more current to flow through the other two pins (the pins are called the collector and emitter).
What do you call it when you add energy to an inductor? When you add energy to a capacitor, you say that you are "charging it". (This is kind of a misnomer, since the total amount of charge in the capacitor is the same, but whatever.) But what do you call it when you put current through an inductor, and it ________ es up and forms a magnetic field? Edit : Actually, using "charge" for a capacitor is not a misnomer, as shown below and in 'charge' etymology , though it leads to confusion, with people mistakenly thinking that capacitors store electric charge, when in actuality, the charge of energy just moves the electric charge from one plate to the other. <Q> It is actually used quite often when referring to superconducting magnets, which are nothing but inductors. <S> http://en.wikipedia.org/wiki/Superconducting_magnet#Persistent_mode <A> I am going to take your question literally: " ... <S> what do YOU call it when..." <S> (emphasis supplied). <S> Where I take your 'you' to be me. <S> When I was in college my teachers and fellow students called it charging (and discharging). <S> When I was at work designing electronics, we called it charging (and discharging). <S> The guys who I rubbed elbows with, who wound their own toroids and built power supplies, called it charging (and discharging). <S> I also (infrequently) heard the term "energize/ <S> energizing" used; and (rarely) de-energize. <S> That may not be politically or technically correct; but that's how the guys (and gals) <S> I worked with, who actually made the stuff that actually flew on airplanes and spacecraft (and, indeed, enabled them to fly), talked. <S> Nothing wrong with energize/de-energize; but charging/discharging an inductor is perfectly acceptable vernacular. <S> Think about it from a systems or macro point of view: <S> With a cap you push current into the device to store energy in an electric field. <S> With an inductor you push current into the device to store energy in a magnetic field. <S> With a battery you push current into the device to store energy in the form of a chemical reaction. <S> Discharging extracts energy from whichever field or form is fundamental to the device. <S> The inductor has the neat attribute that you can extract that energy without reversing current flow; but that fact does not demand an alternative word set to "charging/discharging," <A> Putting energy into an inductor is called "energizing", and removing energy from it is "de-energizing". <A> The term "charge" was used to refer to loading things with other things long before anyone knew what an electron was; the term "electric charge" derives from the earlier usage, but hardly renders the earlier usage obsolete. <S> The act of adding compressed gas to a fire extinguisher, for example, is referred to as "charging" it, even though no electrical potential difference is induced. <S> I would thus consider it perfectly proper to use the term "charge" with an inductor. <A> I've heard the term "excitation" with respect to magnetics ... <S> I personally use the term "ramping", as in current ramping up and ramping down. <A> There is energy stored in an inductor, <S> namely \$\frac{1}{2} * L * I^2\$ <S> For instance, it is used as energy storage in switching power supplies. <S> For lack of a better word, I would choose to call it charging. <S> Also, wikipedia does not discern between capacitance and inductance in the article time_constant, which relates to the process of releasing charge. <S> see http://hyperphysics.phy-astr.gsu.edu/hbase/electric/indeng.html <A> At first I was going to suggest 'currenting' since it's somewhat the opposite of 'charging' (current vs. voltage). <S> That doesn't sound right as a verb though. <S> I want to go with 'spin' since it connotes a continuous movement (of current) through the device.
The word is simply energizing . I call it charging (and discharging).
Want to build an ethernet-connected USB or battery powered piezo alarm gizmo -- what's a good kit? The device is supposed to beep loudly if the network is down, a particular port on an Internet host doesn't respond or a socket connection is made on a specific local port.Is an Arduino Ethernet shield enough? I am guessing i will also need an Arduino board and software? Are there non-Arduino solutions that are cheaper or easier to code for? This will never leave the working prototype stage. I am a total newbie when it comes to electronics, so I am looking for a kit that covers all the hardware/software needs, excluding the speaker itself. thanks in advance <Q> The hardware you suggested sounds right for the job, given your skill level as well. <S> Are there non-arduino solutions? <S> Yes. <S> Would they be easier to code on? <S> Probably not. <S> Given that this is your first venture into electronics, I highly recommend the route that you've already suggested. <S> You will need the arduino board as well. <S> That is where your program will go. <S> The ethernet shield is an add on peripheral. <S> The software to write the programs ("sketches") is free as well. <S> Happy hacking! <S> http://www.arduino.cc/en/Reference/Ethernet <A> Once you stack a communications shield on an arduino, you generally lose the cost advantage over a different micro with that peripheral (ethernet, usb, whatever) built in. <S> And you can't quite fully leverage the peripheral since it's comparatively "at arms length" from the processor core. <S> But it obviously does work for many purposes, and lets you stay in the same software environment if you are familiar with that. <A> It comes with an ethernet controller on-board, as well as a bunch of other bells and whistles. <S> It is ARM based, so quite a bit beefier than the AVR on the arduino. <S> You will need to add an RJ45 magjack though. <A> I would hack some USB ready linux router. <S> It has all the hardware you need if you add USB sound card and loud speakers to it. <S> The other way would be to make sirene electronics triggered by some digital output pin from router. <A> This should have been a comment, but I fear it's too big for comment field. <S> A major part of the design can be the speaker, so you should pay considerable attention to that. <S> There are several options you could use and the best depends on the type of sound you want to achieve. <S> I'll first talk about the easiest option to set up. <S> That would be a self-oscillating buzzer. <S> In this question I got some nice answers on how to connect one to an AVR microcontroller (of same family as ones used in Arduino). <S> The downside of this is that the buzzer produces only one frequency and all you can do is turn it on or off. <S> On the other hand for a simple alarm, it should probably be good enough. <S> The plus side is alto that you can only turn it on or off. <S> This makes it very easy to program the microcontroller. <S> The buzzer shouldn't be too expensive. <S> The price will of course depend on the size and power, but for this type of application, 2€ or 3€ would be more than enough for the speaker and the transistor needed to drive it. <S> The second option is to use a piezoelectric sound source. <S> The downside of them is that you must create your own driving circuit for the speaker. <S> You could make an oscillator or you could use the Arduino to create square waves and then using a transistor and a resistor drive the sound source. <S> I don't know how much this would cost. <S> Another option is to use a real speaker. <S> The easiest way to do this is to get a cheap amplifier chip and connect it to the speaker. <S> Another problem is that you'd need to use the Arduino to generate audio signal which will drive the amplifier, making the programming a bit more complicated. <S> A positive side is that you can (with right amplifier choice) easily control volume. <S> expect high price. <S> The speaker could easily cost couple of Euros and so could the amplifier.
You'd also need electronics for the amplifier (but that could be just a couple capacitors for some amplifiers). Another good low-cost option is the mbed .
Common digital "glue" chips used with Arduino/Netduino? I have a Netduino Plus and I am trying to put together a shopping list to one of my usual vendors for digital "glue" parts I can use with it. I am experienced in electronics but I haven't bought IC's (other than regulators) in a while. This is a difficult question, but what digital chips are people using? I'm not referring to specialized chips, such as an RTC (that is on my shopping list for other reasons) but to the glue chips I need to make things work with a microcontroller. (I have several other boards, including some MSP430 boards so my question is applicable to these too.) (I'm not considering analog or RF chips for the moment; I have plenty of 555's and 741's; they're like mice!) As an example, I am looking at an 74LS595 shift register so I can use a few surplus Hitachi-based LCD's I have without the hassle of finding enough pins to directly drive it from the Netduino. Is the 595 tolerant in the modern 3.3V logic environment? I know, too, that I will probably use chips like the 4066 switches, so those are on the list. Another example: What is a good binary/BCD 7-segment driver for use these days? It's been years since anyone could just run down the catalog of Mouser or Digi-Key and get 2 of everything with a 74/74LS or 4000 prefix and I don't expect to be able to do the same. I'd just hate unpacking my order and finding another neat project on the net that I must have but didn't order in the box. <Q> OK, this is what I wound up ordering from two vendors. <S> This isn't a plug; these are just two that I usually order from. <S> From SparkFun: <S> BOB-10402 EM-406 <S> Connector Breakout <S> COM-00312 <S> Darlington Driver 8-Channel <S> ULN2803 <S> DIP DEV-07914 Arduino ProtoShield Kit DEV-10059 Arduino and Breadboard Holder GPS-09123 Interface Cable for EM401 and EM406 PRT-09279 Arduino Stackable Header - 8 <S> Pin <S> PRT-09389 Jumper Wires Premium 12 <S> " F/F Pack of 10 PRT-10158 Break <S> Away Headers <S> - Long From Mouser: <S> DS1822+PAR Board Mount Temperature Sensors 1-Wire <S> Digital Thermometer <S> SA612AD Up-Down Converters DOUBLE BAL MIXER/OSCILLATOR 74HCT4066N <S> Analog Switch ICs QUAD BILATERAL SWITCH <S> MAX232ECNE4 <S> RS-232 <S> Interface IC RS232 Line Driver/Receiver <S> 122-0421-GR BAT HLDR 2XAAA <S> 6 LDS NKL PLTD 6 LDS <S> 26AWG <S> AB38T-32.768KHZ <S> Crystals 32.768KHz Desc. <S> : Board to Board / Mezzanine Connectors <S> HDR VT 1X09P <S> .1 <S> 230/110 30AU <S> SN74LS247N Encoders, Decoders, Multiplexers & Demultiplexers BCD to 7 Segment SN74LS595N <S> Counter Shift Registers Serial-in <S> shift Register DS1307+ <S> Real Time Clock <S> 64x8 <S> Serial I2C RTC <S> The SA612 seems like an odd choice for general tinkering; <S> I'm a ham radio operator, though. <S> I did decide to get the temperature sensor; we have a 600 dollar IT environment monitor at work <S> and it is tempting to replicate that with a 59 dollar dev board for my personal server. <S> The battery holders are related to the RTC I'm planning to use, and I've gotten an assortment of 74LS logic so I can interface an LCD (Hitachi-based) and some seven-segment displays I have. <S> The GPS parts are for the specific module (EM406A) <S> I got from SparkFun. <S> To broaden this for other experimenters, I'd also recommend the following things I have in my parts <S> bins: <S> Small-signal NPN and PNP bipolar transistors--get bunches of each small-signal diodes of the 1N4148 variety for radio experimenting, 1N34 germanium diodes if they even still sell them 1N4001 small switching diodes Zener diodes of 5.1V, 7.1V etc. <S> LM7805, 7812 regulators. <S> LED's (naw really!) <S> breadboards, protoboards and jumper sets <S> The Maker Shed <S> has a nice starter kit for $120 with an option to get it with your choice of Arduino, Netdunio or Netduino Plus, which covers many of the items on my list. <A> If you want to switch power, a few triac optocouplers (like TLP3063, MOC302x). <S> Some Triacs, MOSFETs, transisitor optocouplers. <S> Latches. <S> Various assorted toys: LCD display. <S> Sensors, digital or analog. <S> For temperature DS18B20+, PTC.LDR. <A> It's my understanding that the "74HCxx" (High speed CMOS) series of chips will support Vcc of 3.3V as well as 5.0V, and with a supply voltage of 3.3V these chips will be compatible with most 3.3V devices like the newer Arduino MCU boards. <S> So, instead of a 74LS595, try a 74HC595 chip connected to a 3.3 voltage supply. <S> Seems I tested this a couple years ago using a 74HC04 (hex inverter) to a ESP8266 (a 3.3V MCU) <S> and it worked, so <S> I am assuming it will work for most (all?) <S> other "74HCxx" chips (plus <S> I read somewhere on the Internet that this was so, but I can't remember the source). <A> Sure, you could count on being able to use the USB connection, but I always end up with a situation where I need to talk to another device (e.g. a touchscreen controller like Amulet's) and that device doesn't use TTL serial levels.
One thing I can recommend that I do think a lot of people eventually end up using is a MAX232 or equivalent, so you can talk to a device over RS-232.
Why aren't decoupling caps built into the IC or IC package? The title is probably good enough, but I've always wondered why decoupling caps aren't built into the chip or at least the IC packaging? <Q> The packaging doesn't offer the room neither, the capacitor would be in the way of the bonding. <S> edit IC package miniaturization is driven by the cellphone market (hundreds of megadevices a year, if not a gigadevice). <S> We always want smaller packages, both in area and in height. <S> Just open your cellphone to see what the problem is. <S> (My phone is 1 cm thin, which includes housing top and bottom, a display, a 5 mm thick battery, and between that there's a PCB with components.) <S> You can find BGA packages less than a mm high ( this SRAM package is 0.55 mm(!)). <S> That's less than the height of a 0402 100 nF decoupling capacitor. <S> Also typical of SRAM is that package size isn't standard. <S> You find 8 mm * 6 mm, but also 9 mm <S> * 6 mm. <S> That's because the package fits the die as closely as possible. <S> Just the die plus on each side a fraction of a mm for the bonding. <S> (BTW, BGA dies are bonded on an integrated PCB, which routes the signals from the edges to the ball grid.) <S> This is an extreme example, but other packages like TQFP don't leave much more room. <S> It's also much cheaper to pick and place a capacitor on the PCB; you're doing this anyway for the other components. <A> Oversimplified, one could say: *Capacitor designers don't like to use advanced 45 nm processing, and IC designers have little to no idea about how to get an extremely big \$\epsilon_r\$ out of barium titanate. <S> * <S> The materials used in chips are optimized for semiconductors, not for things needed in capacitors (i.e. extremely high dielectric constants). <S> And even if they were, on-chip capacitors would still use a lot of space, making the chips very expensive. <S> The relatively large area for an on-chip capacitor would have to go through all the tricky process steps needed for the original chip functionality. <S> Therefore, the only capacitors built onto the chip structure are those that can be very small anyway or those that are required to be trimmed very precisely to what the IC is intended to to, e.g. the charge redistribution capacitors of a successive-approximation analog-to-digital converter that must even be trimmed while the chip is still being manufactured. <S> For things like decoupling of the chip's supply rails or buffering its reference node, where the precise value of the capacitor doesn't matter too much but where a high C*V product is needed, it is way better to place some capacitors next to the ICs. <S> These can be made of electrolytic or ceramic material trimmed for much capacitance*voltage in a small volume, and fabricated in a process ideal for these requirements. <S> Then, there are of course some hybrid packaging techniques where ceramic capacitors are placed onto or into the same package with an IC, but these are exceptions where either the length of the connectors from the die through a standard IC package and socket to a cap on the board would already be too long and have too much inductance, or where the IC manufacturer doesn't want to rely on the board designers to actually read their data sheets and application notes about where the caps must be placed so the IC can meet its specifications. <A> There used to be IC sockets with decoupling capacitors built in. <S> Haven't seen them in years, tho <A> If the question is why decoupling cap's aren't encapsulated along with the die in the packaging, I would say that the main reason is economics -- in most cases, there's not much of a performance gain to bring the capacitor on-board (instead of having it on the PCB) - so the extra cost (in process development, testing, and cost of goods) brings no benefit to the consumer and just adds to the cost of the device. <S> The existing packaging processes would have to be modified to accomodate the in-package chip, too. <S> That would add significant amount of costs for new or modification of existing tooling (machines, molds, inspection equipment, and on and on) --- just to add that extra capacitor. <S> As for placing capacitors directly on the die -- that die space is more valuable as transistors than as capacitors. <S> Again, for the capacitance, you're better off with it outside of the core die packaging.
Integrating capacitors on a chip is expensive (they need a lot of space) and not very efficient (you're limited to extremely small capacitors).
Output from a shift register Does a synchronous shift register put out its result at the same time as it gets its input, or does it output it at the next rising edge? <Q> Of course the exact details will depend on exactly what shift register you're trying to use. <A> There are two common shift register designs with regard to the shift inputs and outputs. <S> On some shift registers, the shift-input sampling and shift-output change happen on the same clock edge; on others, they happen on opposite clock edges. <S> Generally, it's better for the sampling and change to happen on opposite clock edges unless it can be guaranteed that the recipient of the data will receive the clock before the sender does (e.g. because the data recipient is generating the clock). <S> From what I can tell, it seems a lot of logic is implemented on the principle that all inputs and outputs change on the same clock edge, though I would tend to think that in many cases it would be better to use opposite clock edges. <S> If everything uses the same clock edge, clock matching is critical, even at clock rates down to DC. <S> By contrast, if outputs change on one edge and inputs are sampled on another, clock rates may not be able to go as fast as when using one edge for everything, but clock skew will merely limit the top usable clock speed, rather than rendering the device unusable at any speed. <A> It depends on the device you are using. <S> However, it will never be "at the same time". <S> Nothing happens in zero amount of time. <S> Your device datasheet will have the information you need. <S> For example... <S> Datasheet: 74HC595: <S> 8-Bit <S> Shift Register w/Output Storage Register (3-State) <S> Sections of interest in the datasheet Function Table <S> Timing Requirements Timing Diagram <S> Switching Waveforms <S> From this data we can determine things like... <S> Data is shifted into the register on a rising edge of the shift clock. <S> The serial input must be present for t su before switch clock goes high (fiq.5). <S> t su is in nanoseconds. <S> t su could be as long as 75ns depending on V cc and temperature. <S> And more... <A> In addition to David Kessner's answer, some serial-in-parallel-out shift registers have an Output Latch Enable. <S> This allows you to shift e.g. 8 bits into the shift register without the inputs "sliding" across the output. <S> Once you get all your bits in, then you assert OLE during a clock edge, and all 8 output bits are updated simultaneously.
Normally the outputs of a Synchronous Shift Register will change in response to a clock edge.
Any programmable devices available for more modern languages? Pardon my naïveté, but it seems like most programmable devices (FPGAs, PLCs, PICs, etc.) are programmable using the C or C++ languages, or a variant of one of these. Are there any devices out there that use something like D, Mozilla Rust, or Google Go? I realize that the latter two, especially, are immature languages; but surely someone, somewhere has released an experimental product. Does anyone have any suggestions? <Q> You don't need different devices to use these languages, you just need the appropriate software system. <S> The main issues why this is not done more often are: <S> These languages typically need more resources (memory, runtime) for the same task. <S> For large volumes the reduced effort in programming would be more than offset by higher hardware costs. <S> Most higher-level languages need dynamic memory allocation with garbage collection, which is hard to do in a real-time setting. <S> It is harder to get embedded developers for these languages. <S> That said, there are such things as Real-Time Java , which are used in real embedded systems . <A> There are open source projects working on such goals. <S> There is a project for Ada on Atmel MCUs (though I couldn't get it to work). <S> One of my coworkers is programming his 68HC11 MCU with a scaled down version of Ruby he has been working on himself. <S> And there is a company, BlueSpec, that has a new HDL for FPGAs/ASICs that is based on Haskell. <S> But it is not a tool that most would have access to. <S> Vendors tend to stick with C because there is a large audience for C and it is widely accepted. <S> Likewise, for FPGAs/PLDs, VHDL/Verilog are widely accepted and proven. <S> Instead of having to support many different languages, most prefer to focus on their chips, trying to improve the performance of their C compilers and offer better tools for configuring and managing resources on their chips. <S> I kind of agree with this approach myself. <S> I much prefer that Texas Instruments improves their tools for configuring advanced peripherals on their chips than implementing advanced template metaprogramming on their minimal C++ compiler. <A> You are pardoned. <S> The reason that C, and less C++, (among other language as VHDL) is used for these kinds of devices is that it is easy to translate from the language constructs to the underlying hardware. <S> C is considered lingua franca, understood by many and to port a new language to the device, especially if reading/writing to registers is awkward, is not worth the effort if the language isn't much better at expressing useful constructs. <S> The examples that you use as newer, shinier languages, D, for example, could be a candidate for a "low-level" language if more programmers use it. <S> D is touted a the modern C++ without all the compromise with C and implemented right from the start. <S> Unfortunately without all the C++ libraries. <S> I think you can call C libs from D. <S> The question isn't if it is newer, the question is if they are better tools. <S> As far as I can see, it isn't the case. <S> edit <S> When I have written embedded code (in C) I have wished for a better macros/templates than C can offer. <S> As it is a compile time construct, it really has nothing to do with the underlying hardware. <S> But much more complicated to implement in a compiler. <A> Devices have been designed to use other languages efficiently, such as LISP/Scheme, Forth and Java. <S> I don't believe that any have been designed for those languages you mentioned, perhaps they are not suitable for embedded systems <S> (apart from D which should run efficiently on anything designed for C/C++). <S> They could, presumably, be implemented on any suitable MCU, if someone wished to do so. <A> There's always netduino , which lets you code in .NET. <A> Take a look at Micro Python <S> http://micropython.org/ <S> The Micro Python board is a small electronic circuit board that runs the Micro Python language. <S> It was successfully funded as a kickstarter project in Dec 2013 and they have a reference board. <A> You are looking for a microprocessor. <S> Intel sells them, so do AMD and ARM. <S> You can use any programming langue on these devices. <S> As for FPGA's: your choice of languages is limited. <S> This is because you need a synthesis tool that will translate your code to a netlist. <S> In addition to VHDL, Verilog and (restricted C), you can go with more modern languages like MyHDL (built on Python) or Bluespec (Haskell-like). <A> Firstly your examples are small devices that has a limited set of resources, then the old languages that is close to hardware like c and vhdl does the job well. <S> The new "cool" languages need more resources to run well, so my guess is that what you are seeking will come quite soon since the MCU is getting more powerful over time. <S> My point is that right most MCU:s is still programmed in C, and the cool guy has just started to play with C++ on those devices. <S> But if you have a look at the 32-bit ARM based MCU that has a lot more resources than the old 8-bit onces you can find crazy project like eLua , that tries to run the script language lua on a Cortex-M3 based mcu... <S> So we will get there, but it is going to take a couple of more years. <S> And I don't think that any of those crazy project is ready for production use (yet), but some of them will be since it is faster do develop in languages with s higher abstraction level. <A> There is a proof-of-concept application running under Rust on STM32F4xx ARM microcontrollers. <S> The surprisingly minor changes necessary to port Rust are available in this Rust fork .
Micro Python is a lean and fast implementation of the Python 3 programming language that is optimised to run on a microcontroller.
Convert 5VDC to 400VDC I'm currently making a geiger-counter and therefore I need to crank my 5VDC up to around 400 VDC, the current is very low, around 0.015-0.02 mA. What would be the best way to generate 400VDC from my 5v source? <Q> Incidentally, one of my current projects is to build a Geiger counter for LEGO Mindstorms NXT with a Soviet SBM-20 tube, which needs 400V and at most 50µA. <S> The power supply is 4.3V at 20mA, and I plan to use a MAX641 with a BSP126 or BSP130. <S> There is also this thread (in german) about circuits for an SBM-20 . <A> Maxim has a design for a G-M tube power supply that takes a 5V input: http://www.maxim-ic.com/app-notes/index.mvp/id/3757 <S> It looks easy to make, and should be quite cheap and very compact. <A> Here are plenty of designs to choose from, with or without microcontrollers, most producing 400V out of 5V or even less: <S> http://www.pocketmagic.net/2012/10/diyhomemade-geiger-counter-2/ <S> And here is a portable dosimeter: <S> http://www.pocketmagic.net/2012/12/diyhomemade-portable-radiation-dosimeter/ And a geiger muller based radiation monitoring station, operating since October 2012 continuously: <S> http://www.pocketmagic.net/2012/10/uradmonitor-online-remote-radiation-monitoring-station/ Simpler , but not so good, a very basic geiger clicker schematics (just for didactic purposes): <S> http://www.pocketmagic.net/2012/01/diyhomemade-geiger-muller-clicker-v2-0/ <S> A few details on the operation: <S> Microcontroller version: <S> The uC generates a PWM signal that is fed to the driver transistor that controls the coil. <S> The output is rectified and then measured via a voltage divider and one of the uC's ADC port. <S> By doing so we can then adapt the PWM for the exact voltage value we are interested to get, in this case 400V. This basic mechanism assures a perfectly regulated supply, while keeping ripple to a minimum. <S> Non-microcontroller versions: An Armstrong oscillator with a blocking transistor that is commanded by a set of zenner diodes, selected to match the desired output voltage. <S> When the voltage exceeds 400v, the blocking transistor kicks in, and the oscillation stops. <S> By doing so, we get a regulated supply, but the ripple voltage is not as good as in the case of the microcontroller version. <S> Nevertheless this is a very simple and easy to build inverted.
A MAX641 with a suitable FET, see for example this circuit of a Geiger counter (p 34/39).
What have countries gained by increasing/decreasing mains voltage by 10V? Reading the list of standard plug and socket types on Wikipedia , I see that countries have made their mains voltage higher or lower. For example, in Mainland Britain (Wales, Scotland, England) the voltage has been lowered to 230V from 240V. On the other hand, in Northern Island it has increased from 220V to 230V. Have they just moved the voltage to informally meet the rest of the world? As the vast majority of countries are either 230V or 120V. Are there any other things that could be gained from this? I understand that lowering the voltage could decrease power dissipation because \$P=VI\$, but increasing the voltage? What is there to gain other than more losses? <Q> It is to standardise everything on a single fixed voltage. <S> But in practice, mains voltage isn't 230V. <S> It is standardised at 230V +10% -6%, or 216V to 253V. <S> Here, mains voltage measures <S> 249V, which is on the high end of the scale - <S> but we're on a small farm road with not many other customers. <S> Away from home I have measured it at 233V, due to resistive losses from greater demand. <S> Countries have not changed the actual voltage - that would require changing all the generators or all the transformers in the country (at a substantial cost), merely, the allowable range has changed. <A> Europe switched from 220V to 230V in the nineties. <S> Advantage: you need less current for the same power, making that you need less copper for distribution, but it's only 5%. <S> And if increasing the voltage offers an advantage it can't be an advantage in the countries where the voltage is decreased. <S> IMO it's been done to have more of a standard. <S> Nowadays you can have universal power supplies which are as happy with 115V as with 230V, but in the past a 220V appliance may have had a switch to select between 220V and 240V. Now that everybody uses the same 230V you don't need that anymore. <S> edit <A> I would prefer AC in the lower specification range for that reason and since the power output from appliances is seldom of concern. <S> The only exception I can think of would be mains powered tools like a chain saw. <A> There's an interesting issue hinted at in this question. <S> P does equal V*I, so for resistive loads, if you up the voltage 5%, you are also raising the current 5%, yielding a 10% increase in power. <S> But for a regulated power supply, the output won't change, and the power consumption won't either. <S> On the input side of that supply, the current will decrease when you raise the voltage. <S> They used to lecture us about appliance motors under brownout conditions, so I have to assume these motors exhibit the same property. <S> If you are the power company, you would have to do some figuring to determine whether your power output would increase or decrease by changing the voltage. <S> While I suspect that light bulbs do not account for the majority of power use, I also suspect they have a bigger headache dealing with reactive power, from those appliance motors and non-power-factor-corrected power supplies out there.
In my experience higher voltage is a disadvantage for the user because light bulbs tend to have shorter life with higher voltage.
Use PSU as replace for broken source +12Vdc 3.33A? I need 12Vdc 3.33A source power for Silicon Graphics 1600sw display, I have two ATX computer power supply . Is it possible to use these PSU as replace for broken 12Vdc 3.33A adapter ? UPDATE: I connected the 12v 35w halogen lamp for provide a small load to +12 VDC(Yellow) and Ground(Black) , then I turn on the PSU by shorting the PS-ON#(Green) and Ground(Black) , DCV show about 11,43 V, so I connected the monitor and it works! <Q> It should be possible and not too complicated. <S> There are many guides explaining the process. <S> Here 's one. <S> UPDATE: <S> The instructable recommends use of $10\mbox{ }\Omega\mbox{, 10 W}$ resistors for $\mbox{+5 V, +12 V}$ and $\mbox{-12 <S> V}$. <S> The $\mbox{12 <S> V}$ resistors are going to be dissipating around $\mbox{14,4 W}$, so my recommendation is to get some bigger resistors, just in case. <S> The other option would be to use resistors with higher resistance for the 12 V lines, for example $22\mbox{ }\Omega$. <S> They'll use less current, but I think that it won't be a major problem because the screen will use considerable amount of power too. <S> This isn't mentioned in the instructable, but I'd put some $10\mbox{ }\Omega$ or $22\mbox{ }\Omega$ resistors on the $\mbox{+3.3 V}$ line too. <S> Another part that has been omitted is how to locate the power supply rails inside the power supply itself. <S> Here you can find the color code for computer supply wires. <S> Just follow the wires inside the case of the supply and see where they end. <S> The wires you're interested in are yellow for $\mbox{+12 V}$, orange for $ <S> \mbox{+3.3 V}$ and red for $\mbox{+5 <S> V}$. <S> Don't forget the LEDs for gray and purple wires. <S> You can use tool like http://ledcalc.com/ to get the correct resistor for the LED. <A> The biggest problem with using the 12v rail on the PSU is that it is designed to pump out a lot of current, and as a result wont provide stable power at lower currents. <S> However, 3.33A is a pretty sizable amount of current and will probably work out just fine. <S> I am not sure about details of the graphics display, but I would recommend you look at the datasheet to see if there are any specifics on the amount of voltage swing <S> it is able to handle. <S> If you want to double check your PSU before you plug it into your display, you could get yourself a high wattage resistor, plug it into the PSU, and then measure the voltage. <S> 12v/3.33a = <S> 3.6 Ohms at 39.96 Watts. <S> On second thought, that is a lot of watts to put in a resistor and you will probably have a hard time easily finding one. <S> You might have better luck finding an 8 Ohm 18+ watt resistor. <S> The other issue at hand is being able to turn on the PSU. <S> PSU's are designed to be turned on by the motherboard, and so you will need to fake the PSU. <S> The way that you do this is by shorting the PS_ON# pin to a COM pin. <S> Usually the PS_ON# wire is green and all of the COM pins are black. <S> It will probably be beneficial to put a switch here instead of a wire so that you can easily switch it on and off. <S> You also mentioned that you have two PSUs. <S> I am not sure if you were thinking about using both together, or just saying you have some extra. <S> Just in case you were thinking about it, I would not try connecting the two together. <S> Depending on the design of the PSUs they can end up fighting each other some, and bad things happen when electronics fight. <A> One other problem I've seen with switching PSUs is subtle high voltage spikes in the output. <S> The quick and easy way to deal with this is a neon lamp across the output. <S> If it lights even dimly, you HAD a problem and are dealing with it. <S> I've seen this on many PSUs. <S> An easy way to test <S> it would be automotive headlights at similar wattage. <S> These are much easier to obtain than power resistors of that size. <S> Get a replacement headlamp for your car that you will eventually use or something like that.
To complement the other answer: Some computer PSUs may already have needed load installed and can provide stable voltages out of the box, but you can't rely on that.
How to build my own 8V 6A PSU using laptop charger I have a 19V 4A laptop charger. I was wondering could I convert this into 8V 6A psu for my LEDs. They're parallel-only colour LEDs hence the high current demand. <Q> It would be harder than starting from scratch. <S> Dropping 19V to 8V is fairly easy. <S> Increasing 4A to 6A is harder. <S> You would need DC to DC conversion circuit. <S> This is not easy and less so at that power level. <S> LEDs don't need real great power regulation. <A> Linear Technology has a broad offer of SMPS controllers. <S> Check this page for a parametric search. <S> One example which fits your requirements is the LTC3611 . <S> It comes in a (for a buck controller) rather unusual QFN64 package, but doesn't require any external active components (MOSFETs). <S> If you don't like soldering QFN packages, Linear has an evaluation kit for this. <S> (Hm, pretty steep price. <S> I never took notice of price before, as Linear was always so generous as to give them to us for free.) <A> Something that works with 'house-hold' components instead of QFN's. <S> Something I've made about ten years ago. <S> The values shown in the schematic will not be correct. <S> You will have to calculate them yourself.
You can probably get by with very little if any filter caps. You can run a transformer with enough current capacity to drive the LEDs and a full wave rectifier.
Connect a 8 V motor to a 16 V battery I am hacking a vacuum cleaner robot by trying to control the motors with an Arduino. I have then two 8V motors , each one needing from 50mA (when the wheel is turning free) to more than 1A (when the wheel is blocked). The robot battery provides 16V (and I know it can provide enough current for the motors because that is the original battery). Now, how can I connect the battery to the motor ? I guess once that is done I can just add a transistor to control it with my Arduino. Thanks <Q> Use PWM to provide 8V to the motors from the 16V supply via suitable drivers. <S> Adafruit supplies <S> this motor control shield kit that you could use, with software that you can adapt. <A> Then use a logic level N-channel MOSFET to drive the motor from the Arduino. <S> This only works for always turning one direction. <S> If you need to reverse the directions of the motors, then you need to look into driving an H-bridge or other method of reversing the motor. <S> The easiest might be to look into the original control circuitry and see if you can tie into it at the logic level. <S> I'm betting they have a simple H-bridge in place to control these (which I assume is a Roomba.) <S> The engineers that designed it probably spent a good bit of time figuring this out, so it is probably a great thing to borrow. <A> What kind of motors are there? <S> If they are using stepper motors (which is extremely common these days, as stepper motors offer superior torque, and are much more reliable), the answer might be surprisingly simple - they could've used 'universal' motors - 6 or 8-lead ones, that can be wired in series to operate directly at 16V.
For that small of a current draw motor, I would think about just using an LM7808 Positive 8V regulator to generate the 8V from the 16V.
What happens to my LED when I supply too much current? I read somewhere that LEDs could self limit current up to a certain point and had a few lying around in my box so I decided to test this statement. Its true for roughly the voltage drop across the LED. But the question comes is what happened when I applied 20V to the LED? It made a loud popping sound. What happened to the internals of the LED? <Q> Increasing heat from power dissipation causes a failure of the LED die. <S> Note that the red LED has a fall in wavelength, but the green one has an increase in wavelength. <S> White LEDs going blue could be explained by the yellow-emitting phosphor in the LED being less effective at high currents. <S> White LEDs are often constructed from a blue LED coated with a special phosphor which emits yellow light when blue light hits it creating a fairly even white light. <S> So perhaps you are seeing more blue than the yellow phosphor can convert. <A> An LED is a Light Emitting Diode. <S> The key part of that name is "Diode." <S> An LED is a diode. <S> Diodes do not limit forward current very well. <S> The extremely steep current/voltage curve (an exponential curve) is probably their second most important functional characteristic which results in sales of diodes. <S> When you put a forward voltage on a diode (an LED, BE junction of a BJT, or whatever), it's current DOUBLES with each incremental 26mV of voltage. <S> So if you applied 0.7V (700mV) and got 50mA, then you should get about 100mA at 726mV, 200mA at 752mV, 400mA at 778mV, and so on. <S> So what would you expect at 20000mV? <S> The theoretical answer is about 7 times 10 to the 222nd power amps. <S> That is a '7' with about 222 zeros after it. <S> But your home's circuit breaker (thankfully) limits current draw to something less than Quadra-Bazillions of times the total of all power plants on planet Earth. <S> Your LED draws maybe 20 amps for a few microseconds, turning a very small volume inside it about as hot as the Sun, and then it is all over. <S> If you do this with larger parts, the shrapnel can kill you. <S> An electrian, at a factory I worked at, had the misfortune of crossing two phases of industrial strength AC with his screwdriver. <S> As far as could be figured out, he was not electricuted: the plastic screwdriver handle protected him from that. <S> However, the short instantly vaporized the metal in the screwdriver. <S> The resulting explosion killed him. <S> So provide external current limiting in line with your LED, or... wear safety goggles. <S> EDIT: <S> I got carried away with the point I was trying to make and erroneously said current doubles with each 25 mV across the diode junction. <S> The actual factor is 'e', where 'e' = <S> the base of the natural logarithm = about 2.7. <S> So the current would increase by a factor of 2.7, not 2, for each 25mV. <S> The damage to the device looks pretty much the same for large voltages, though.... <A> The weakest electrical portion of the LED fused. <S> That part would vary based on LED construction. <S> I've had this happen and blow off the tip of a 3mm LED with surprising energy, when I was young and messing with such questions. <S> It hit the ceiling pretty hard.
The change in colour, e.g. red and green LEDs going yellow at high currents, is probably because the die is actually glowing hot, i.e. near failure.
Is it possible to revive a dead battery by passing a high voltage through it? I have an almost dead laptop battery and read in this forum that "The problem with most of the broken batterys is that they are exhaustive discharged. the trick to solve this is to give them a high voltage electricity source like a laptop charger (20V). I did that to all the 3 lion batteries I found inside the macbook battery but just for a few seconds to reactivate them and now they are working fine" I am curious whether this is theoretically possible if nothing else. <Q> This is a known effect of <S> NiCad/NiMH batteries. <S> Basically, Nickel-metal batteries, when over-discharged, can grow little metal whiskers or "dendrites" between the internal plates, shorting the cell out. <S> Applying a high voltage to the cell causes enough current to flow that the dendrite fuses and melts, and therefore, the cell is not longer internally shorted, and can hold a charge. <S> (This is what the guy in avra's response was doing to the batteries) <S> However, letting a cell go completely flat (0V) is quite bad for it, so the battery will never completely recover. <S> However, it may hold some charge afterwards. <S> Note that what the guy in the quote is doing is not applying a high voltage to the cells, but applying a high charge-current to the cells he is referring to. <S> The laptop charger he describes is likely only good for a few amps, and the output voltage is probably dropping massively when it is connected. <S> The only thing I can think of is that some laptop batteries have a built-in protection system. <S> If the battery is discharged fully, and then let sit and self-discharge for a while, the protection system may not even get enough power to turn itself on, and therefore, the laptop will not realize a battery is even present. <S> When he manually charges the batteries a small amount with his external adapter, by taking the battery apart, it may be just enough to activate the battery protection circuit, so it can charge normally afterwards. <S> Applying a significant over-voltage to ANY cell chemistries for any period of time can be dangerous. <S> On lithium cells, you will get metallic lithium plating out of the electrolyte when the cell voltage is above <S> 4.3V. Metallic lithium can catch on fire when exposed to (the moisture in) <S> the air. <S> In Lead-Acid batteries, you will begin to electrolyze the electrolyte, causing the battery to vent hydrogen and oxygen. <S> This is EXTREMELY EXPLOSIVE. <A> Lithium batteries have around 1/6th the energy in them as TNT. <S> Do not mess around with over powering the battery unless you like fires or explosions. <S> The method was used to clear shorting in NiCd batteries but should never be used for Lithium without understanding all the risks. <S> As with many of the responses, it is possible that it will do what you want. <S> Just understand that there is a possibility of the pack exploding or burning and take precautions for that. <A> Messing with lithium ion (LiIon) and lithium ion polymer (LiPo) batteries is a very dangerous thing to do and will likely result in fire and flames. <S> LiPo and LiIon fires are VERY dangerous. <S> Attempting this will probably result in catastrophe. <S> This guy got lucky. <S> Another guy had his house burn to the ground . <A> I don't know about theory, but in a company I worked for, we used to have hundreds of 3000$ mobile devices in use and every month we had 3-4 with a dead NiMH battery. <S> It was strange since we knew that most batteries were quite new, and it was pretty much expensive to send them for a repair and wait for their return. <S> Luckily we found an electrician who "repaired them" in a day very cheaply, and he mentioned using some short time high voltage shock. <A> If you current limit the high voltage, like a big computer grade capacitor, you can restore some batteries to life. <S> The failure modes in rechargeable batteries are many. <S> ( @fake guy indicated one) <S> It is important to prevent secondary failure while healing with warped plates, thin metal film or foil or melting something other than metallic impurities and insulated crystals inside the plate surfaces. <S> A better way I know that works was patented by a an old friend who made million$ on this technology. <S> You drive the battery, when it has a DC charger on it with low average duty cycle from the battery voltage itself . <S> With a low power but very fast nS rise time <S> >10A current pulses. <S> It may not repair badly warped or corroded lead acid plates, but it will break-down the lead sulphate crystal growth on the plates which does two things. <S> Reduces the specific gravity and lowers the effective series resistance (ESR) significantly. <S> If you want to research it. <S> the old company or his patents before being sold to a major commercial transportation company, was called Solartech. <S> He told me the military tested it on Ni-Cad batteries in the 90's and was found to be very effective. <S> Don't know about LiPo. <S> My theory on how it worked was... <S> the pulses in ultrasonic range. <S> created harmonics up to several hundred MHZ and all it took was a few to push any piezo-effect on the lattice structure in the crystal. <S> He made the Bic lighter version that took a week to work. <S> A couple guys from a Reno Ski lodge flew in their private jet to Winnipeg to meet my friend <S> and I to offer a $1m for the patent. <S> He refused. <S> They had the blow torch method already working on rejuvenating large batteries for remote ski lifts.. <S> ( although they had a design flaw once where all the early model Air bags in the parking lot , false triggered via massive EMI onto the g sensor and opened all the air bags in cars in the parking lot...) <S> ( !! too funny ) <S> guess they should have filtered the cables. <A> A better way to revive a lead-acid battery is to use a desulphator. <S> There is a similar thing i know of for NiCd. <S> I would not use this kind of thing for any other type of battery. <S> I have tried it on several lead acid batteries with success. <S> It does not always work as a cell sometimes is shorted and driving high voltage short pulses can not do anything about that. <S> Especially not for Lithium batteries, as explained above.
Doing it to any other battery risks setting something on fire.
Emulating an electret microphone with a DAC circuit Good day, I'm currently getting into DIY electronics and Netduino programming and there's this one personal project that I want to do but I'm hesitant because of lack of information. Basically this is what I want to do: Use a mobile phone, in my case an Android tablet (Galaxy Tab) and maybe a WP7 handset in the future, to communicate with a Netduino via a makeshift serial connection using the audio (headphone) port and a custom app. I have found a circuit that I could use and modify for my needs so this part can be considered solved... apart from the app, that is, but that's a different story. So with that, I also wish to be able to transmit information to the Galaxy Tab via the tablet's microphone input by designing a DAC circuit to emulate an electret mic. Is this even possible? I am no electrical engineer but I do have electronics know-how (although that's with regards to high-voltages) because of my line of work but I have little experience working with digital/analog conversion circuits. I don't want to fry my Galaxy Tab's innards because of assumptions so I've been searching for information around the net to no avail. I hope someone can point me to the right direction. Will really appreciate it! Thanks a bunch, Dan <Q> I did more research and learned that my original plan was a lot more complicated than it needed to be. <S> I found that I could use frequency shift keying (FSK) like the one I saw here and here <S> which are both for the iPhone and should be usable for other devices with little or no modification. <S> I'm currently researching how to do it directly using C# code on the Netduino which isn't in the scope of this site anymore <S> so I have to find help elsewhere. <S> Anyway, thanks to both Joe and Chris Stratton for providing answers. <S> I'm sorry if I had to unset Joe's answer for my question as it does not apply anymore. <S> Both answers are still very informative on my side though <S> so thanks a lot. <S> I'd probably make use of them in another project. <A> It should be possible, but you need to match the power and impedance expected. <S> An electret mic will have power running to it. <S> You might find it easiest to use a 1:1 audio transformer to isolate each sides and allow the signal to carry the voltage of the electret. <S> You will most likely need to run something to give attenuation. <S> This could be either just a divider or an Op Amp with a gain less than one. <A> I suppose it is possible you might need a resistor between the audio input and ground as well, but my guess is you will not. <S> Start with the potentiometer turned all the way down, and turn it up slowly until you get the cleanest signal (get a spectral fft type of app for your testing, and run your test modulation).
I suppose there is some risk involved, but basically I think you want to wire up an audio-taper potentiometer from the output of the dac to ground, and then tap off the wiper with a series capacitor to inject the signal into the mic input.
Sanity-check on snubber design I keep frying resistors in the following optocoupler and triac snubber circuit, and I'm not sure whether to attribute this to bad design, or to faulty components. There are no observable sparks at turn-on, but the 680-ohm resistor burns out within seconds. I'm using 1/4W through-hole resistors. The power triac gate triggers at <= 35mA. The load is a ~50W fan that runs on mains power. If my understanding is correct, the steady-state (ON) power dissipation of the 680-ohm resistor should be less than 0.1W. If you agree that my design is reasonable, then what component do you suspect is faulty, and why? I also tried the following circuit, but again, the 680-ohm resistor smoked when I put the optocoupler in the ON state: <Q> I suggest you read TI app note SLUP100 <S> , "Snubber Design" by Philip C. Todd for some good background on snubber design. <S> When the triac is on, the dissipation through the snubbers will be low since they are 'shorted' by the triac. <S> When the triac is off, load current is going to try and flow through both of your snubber circuits, and the resistors are going to see power dissipation. <S> Are you absolutely sure that the triac is firing each cycle? <A> The fact that your resistor blew a few seconds (versus milliseconds) after turn on, is a clue that you are exceeding wattage by at least a factor of 2, but probably less than a factor of 10. <S> The path through the triac should not affect the 680 Ohm R. <S> The path through the 0.1uF cap is not nearly high enough current to fry the 680 (assuming 60Hz power and a good cap). <S> If the IC is sinking more than 19 mA through pin 6 at any time (I did not check the specs on this device) then you are exceeding the 1/4 W on your 680. <S> If the chip can sink much more 'I' than 19mA (like the 35 mA you mentioned... <S> is that going through pin 6?) <S> , then I think we found your problem <S> : Pick a resistor with a Power Rating (PR) and value (R) that satisfies PR <S> > <S> Power=(I^2)R. <S> If the triac triggers at 35ma through pin 6, then size R larger than (0.035^2)(680) <S> = <S> 0.833 <S> Watts. <S> I'd select a 680 Ohm, 1W. <A> Put a much higher wattage resistor in that position and measure the current through it. <S> You will find that your calculation is wrong. <S> If you read the data sheet you will see that the resistor in question and the 0.1 uF capacitor aren't necessarily needed (they constitute a snubber for the coupler). <S> Try removing them. <A> Did you check the wiring to the triac? <S> It sounds like you wired it the wrong way. <S> Also, you should use a carbon composite resistor for the the resistor in the snubber across the triac. <S> This type of resistor will be able to handle the voltage surges it will experience.
A wire wound resistor might spark between it's own turns and a metal film resistor will just die over time.
How are interrupt handlers implemented in CMSIS of Cortex M0? I have a LPC1114 kit. Last few days I have been digging up CMSIS implementation of Cortex M0 to find how things are done in it. So far I understood how each registers are mapped and how I can access it. But still I dont know how interrupts are implemented in it. All I know about interrupts in CMSIS is there are some interrupt handler names mentioned in the startup file. And I can write my own handlers by simply writing a C function with the same names mentioned in the startup file. What confuses me is that in the user guide, it is told that all GPIO can be used as external interrupt sources. But there are only 4 PIO interrupts mentioned in the startup file. So tell me: How can I implement external interrupt handlers for other GPIOs? Where is the interrupt table mapped in the CMSIS? What are the major differences between NVIC and the interrupt implementation in AVRs/PICs? (except NVIC can be mapped anywhere in the flash) <Q> The following information is in addition to Igor's excellent answer. <S> From a C programming perspective, the interrupt handlers are defined in the cr_startup_xxx.c file (eg cr_startup_lpc13.c file for LPC1343). <S> All possible interrupt handlers are defined there as a WEAK alias. <S> If you do not define your own XXX_Handler() for an interrupt source, then the default interrupt handler function defined in this file will be used. <S> The linker will sort out which function to include in the final binary along with the interrupt vector table from cr_startup_xxx.c Example of GPIO interrupts from ports are shown in the demo files in gpio.c. <S> There is one interrupt input to the NVIC per GPIO port. <S> Each individual bit in the port can be enabled/disabled to generate an interrupt on that port. <S> If you require interrupts on ports PIO1_4, and PIO1_5 for example, then you would enable the individual PIO1_4 and PIO1_5 interrupt bits in GPIO0IE. <S> When your PIOINT0_Handler() interrupt handler function fires, it's up to you to determine which of PIO1_4 or PIO1_5 (or both) interrupts are pending by reading the GPIO0RIS register and handling the interrupt appropriately. <A> (Please note that points 1 and 2 are implementation details and not architectural limitations.) <S> The rest of GPIOs have to use one common interrupt (EINT3). <S> You can then poll the interrupt status register to see which pins have triggered the interrupt. <S> I'm not very familiar with LPC11xx <S> but it seems that it has one interrupt per GPIO port. <S> You again will have to check the status register to figure out the specific pins. <S> There are also up to 12 pins that can act as wakeup sources. <S> I'm not sure if you can hijack them as general interrupts (i.e. they will probably only be triggered when in sleep state). <S> The default handler table is placed at the address 0 (which is in flash). <S> The first entry is the reset value for the SP register, the second is the reset vector, and the rest are other exceptions and interrupt vectors. <S> A couple of the first ones (such as NMI and HardFault) are fixed by ARM, the rest are chip-specific. <S> If you need to change the vectors at runtime, you can remap it to RAM (you first need to copy the table). <S> In LPC11xx the remapping is fixed to the start of SRAM (0x10000000), other chips can be more flexible. <S> The NVIC is optimized for efficient interrupt handling: programmable priority level of 0-3 for each interrupt. <S> A higher-priority interrupt preempts lower-priority ones (nesting). <S> The execution of the lower priority one resumes when the higher-priority interrupt is finished. <S> automatic stacking of the processor state on interrupt entry; this allows writing interrupt handlers directly in C and removes the need for assembly wrappers. <S> tail-chaining: instead of popping and pushing the state again, the next pending interrupt is handled immediately late-arriving: if a higher-priority interrupt arrives while stacking the processor state, it's executed immediately instead of the previously pending one. <S> Since you're familiar with PICs, have a look at this <S> App Note: <S> Migrating from PIC Microcontrollers to Cortex-M3 <S> It's about M3, but most of the points apply to M0 too. <A> Austin and Igor answers are detailed enough. <S> However, I want to answer it in another way, maybe you find it helpful. <S> The LPC11xx (Cortex-M0) has 4 levels for GPIO pins, all the pins from GPIO0.0 to GPIO0.n share the same interrupt number, and all the pins from GPIO3.0 to GPIO3.m share the same interrupt number. <S> There are six steps to initialize GPIO interrupt in LPC11xx <S> Set up the pin function by modifying Pin Connection Block Registers. <S> Set up the pin direction by modifying GPIO data direction register (default value is input). <S> Setup the interrupt for each individual pin, you have to go to the GPIO interrupt mask register GPIOnIE and set the bit (that corresponds to the pin) logic 1. <S> Set up the interrupt for rising edge or falling edge or both by modifying the GPIO interrupt sense <S> registers GPIOnIBE and GPIOnIS. <S> Enable the interrupt source either PIO_0/PIO_1/PIO_2/PIO_3 in Nested Vectored Interrupt Control using CMSIS functions. <S> Set interrupt priority by using CMSIS functions. <S> Code implementations. <S> You need two functions: one initialize 6 above steps, and the second is the interrupt handler, which is required to be the same name as the handler defined in the start-up codes, startup_LPC11xx.s file. <S> The names are from PIOINT0_IRQHandler to PIOINT3_IRQHandler . <S> If you use different name, you have to change the names in start-up file. <S> /*Init <S> the GPIO pin for interrupt control <S> */void <S> GPIO_Init(){ LPC_IOCON-> =.. <S> //Pin configuration register LPC_GPIO1->FIODIR = ... <S> //GPIO <S> Data direction register LPC_GPIO1->FIOMASK = .. <S> //GPIO <S> Data mask <S> register - choose <S> the right pin LPC_GPIO1->GPIOnIE = .. <S> //Set up falling or rising edge NVIC_EnableIRQ(PIO_1); <S> //Call API to enable interrupt in NVIC NVIC_SetPriority(PriorityN); //Set priority if needed}/*Must have the same name as listed in <S> start-up file startup_LPC11xx.s */void <S> PIOINT1_IRQHandler(void) <S> { //Do something here}
In bigger NXP chips (such as LPC17xx) there are a couple of dedicated interrupt pins (EINTn) which have their own interrupt handler.
When do I use fiducials for individual components on a PCB? Obviously the panel needs fiducials, and I also place three of them on each PCB. Some IC footprints however also show local fiducials. I've seen them for instance for certain TQFP footprints. When are they required? <Q> Fiducials are used by the pick and place machine to provide better accuracy when placing components on the PCB. <S> There is a camera that recognizes the fiducials and uses it as a registration point to calibrate where the machine thinks it is on the PCB. <S> There are two types of fiducials: Global and Local. <S> Normally a PCB will have 3 global fiducials per side (top & bottom), and usually in the corners of the PCB. <S> This is so it can recognize the boards overall orientation and position. <S> Local fiducials are located near some of the critical parts. <S> Usually there are two fiducials for each part, in opposite corners. <S> IF you have several critical parts that are close together then a fiducial can be shared by two or more parts-- reducing the number of fiducials required and the the PCB space taken up by them. <S> Where you need local fiducials really depends on the pick and place machine that will be used, and the placement accuracy required by the component. <S> It's interesting to note that TQFP's need fiducials more than most BGA's. <S> Most TQFP's have a pin pitch of around 0.5mm, while most BGA's are 0.8 to 1.27mm. <S> BGA's also have a cool ability to somewhat self-align due to the surface tension of the melted solder. <S> But I need to stress that this is very component and machine dependent, so check with your assembly shop. <S> Also machine dependent is going to be the construction of the fiducial. <S> Things like how big the pad is, and how much the soldermask is pulled back. <S> Usually the fiducial is round, but sometimes square or bow-tie shaped. <S> Another thing is that some assembly shops will request fiducials to just feel good about things-- but don't really need them. <S> My second to last PCB had had lots of fine pitch BGA's, QFN's, and TQFP's and had no fiducials on it, but there were no issues with parts placement. <S> My current board is nowhere near as difficult <S> but they are requesting fiducials. <S> Go figure. <S> I'll humor them and put the fiducials on it. <A> They are most often used with BGA devices, because the pads can't be seen when the chip is placed in position manually. <S> Most assembly companies insist on them. <S> I don't think I've seen them used with TQFP parts. <A> My experience is that if the pin pitch of the part is larger than .635mm, then the global fiducials are adequate. <S> If the part has a pin pitch .635mm or smaller, then it should have it's own fiducials. <S> I don't differentiate between qfp or bga parts. <S> I use a 1mm smt dot inside a 3mm dia <S> sm clearance for all my fiducials and place them at opposite corners where they will not interfere with pin 1 (A1) markings.
Chips with a finer pin pitch will need fiducials more.
Why do we use dB to represent the difference between two voltages? For example, the passband of a LC resonant circuit is the differences of frequency at +3db and -3db. Why do we prefer dB? <Q> Many processes in nature are either of logarithmic nature (like human senses) or have a great dynamic range. <S> Describing them on a logarithmic scale and expressing differences in dB has several advantages: often the absolute difference doesn't matter, but the ratio (that's what dB is used for) does (e.g. signal-to-noise ratio) <S> smaller numbers can be used <S> there's an approximately linear relation between measurement and perceived sensation chained attenuations or amplifications can be expressed by addition instead of multiplication (easier to calculate in the head) <S> Here's another video about it. <A> In many cases, voltage ratios are expressed in terms of dB rather than absolute numbers because there are many relationships which end up being linear when expressed in terms of dB. <S> It is simpler, for example, to say that an N-stage low-pass filter will attenuate frequencies above the cutoff by <S> \$(6 \times N) \frac{dB}{octave}\$ than it is to say that it will attenuate frequencies above the cutoff by a ratio of \$({\frac{f_c}{f}})^N\$. <A> dB is useful since it is a relative expression. <S> +/-3dB is a doubling or halving of power. <A> Around 3dB gives a sensation of doubling or halving the stimulus, as well as doubling or halving the physical value. <S> That value seems to apply to all human senses, and is one reason why 3dB is so ubiquitous. <S> Psychophysics, a branch of experimental psychology, has a long history of investigating this stuff. <S> The minimal amount of change that can be detected is around 1dB (the Just Noticeable Difference or JND). <S> 0dB is the absolute threshold, below which the stimulus isn't detected.
dB are often used because the human senses have a logarithmic response, to increase the dynamic range.
How do I calculate needed pixel clock frequency? If I want to have a resolution of X * Y pixels, updating in frequency f. How do I calculate the pixel clock speed? Example:1280 x 1024 @ 85Hz usually have a pixel clock of 157.5 MHz, but how do I calculate the needed pixel clock? Need to know to select DAC and DSP. Edit: Usually the Front porch is: 16 pixels 1 line, Synch width: 144 pixels 3 lines. So this is a total of 1688 x 1066 @ 85Hz. But, still the pixel clock formula should be the same regardless of the extra lines and pixels. <Q> There is more pixels in the video signal than just the <S> x * y <S> * refresh_rate would imply. <S> Back in the bad old days of CRT's, it would take time for the electron beam to move from the end of the current line to beginning of the next. <S> Likewise, it would take time for the beam to move from the bottom of th screen to the top for the next frame. <S> The time it took was built into the video signaling standard, and essentially took the form of pixels that are never seen. <S> Without knowing the info on these blank pixels (sometimes called "overscan"), you cannot calculate the pixel clock required. <S> The best way to figure this stuff out is to Google for the approximate video standard you're trying to do, or look at the datasheet for the screen you are trying to drive. <A> This depends also on what kind of display you want to drive. <S> Usually the standard equation for pixel clock is this- <S> Pixel clock = <S> Horizontal_Active_Resolution X Vertical_Active_Resolution <S> X Refresh_Rate X (1+ Blanking Period %) . <S> Horizontal_Active_Resolution X Vertical_Active_Resolution X Refresh_Rate is the display resolution which in your case is 1280 X 1024 <S> X 85. <S> Now since you want to calculate exact pixel clock required for this display, you must know the %blanking period. <S> Usually it lies between 3% to 40% for most of the display. <S> The % blanking period is total time in which there is no active image being presented on the screen as suggested above in these answers also. <S> The image below shows in detail regarding display size and blanking period which consists for both horizontal and vertical fields. <S> In order to calculate the exact pixel clock you must know these details- <S> So effectively your pixel clock in this figure will be (HPW+HBP+HACT+HFP) <S> X <S> (VPW+VBP+VACT+VFP) <S> X Frame Rate. <S> The Blanking period will consist of horizontally as horizontal pulse width (HPW), horizontal back porch (HBP) and horizontal front porch (HFP). <S> It will also consist of vertically as vertical pulse width (VPW), vertical back porch (VBP) and vertical front porch (VFP). <S> All these details can be found in Display Datasheet. <A> If you have a particular display you need to drive, then it is best to look for a spec for that display. <S> Modern displays are reasonably forgiving, however. <S> There are VESA standards for calculating display timings. <S> The more recent standard is the CVT; it was preceded by the GTF. <S> You may be able to get Excel calculators from VESA with a free registration , I haven't tried it though.
If you have access to a machine with X.org, there are command-line utilities to calculate the timings: GTF CVT .
Any issues with changing to lead-free solder? I'm thinking of changing to lead-free solder. I've heard some people prefer a traditional Pb/Sn solder, but haven't heard any specific reasons why. I'm mostly doing through-hole work, and I have a decent temperature-controlled iron. So, are there any issues I might encounter with changing over? And are there any situations where I'd want to use a particular type? <Q> It is often more difficult to visually verify a cold-solder joint by visual inspection, because most Pb-free solder joints 'look' cold if you judge with the same criteria that is normally used to judge conventional solder joints. <S> Also, Pb-free is much more prone to tin whiskers than conventional solder - in fact, way back in the day (decades ago) this was one of the reasons lead was added to solder (it's the most effective whiskering inhibitor known). <S> Tin whisker-induced failures are more common with dense layouts and usually happen months or years after assembly. <A> DO not use lead free unless you really really need to. <S> And even then consider if anyone's going to find out it's not leadfree. <S> Temeratures are higher, so more risk of part & PCB damage, and it doesn't flow as nicely. <S> Desoldering through-holes with leadfree is a bitch, to the extent that it's easier to first flood it with leaded. <S> It also eats through tips way faster than leaded. <S> The flux fumes are also more unpleasant than leaded fluxes. <S> If you really must do leadfree, use the stuff with 2% silver as this has a lower melting point and produces nicer joints. <A> Well... try by yourself and you'll discover the reason why peoples don't use lead free solder unless they're forced to. <S> My supplier, when I go buy solder, always asks me "Do you need lead-free solder or do you want the working one?" :-)
Workmanship is more challening with Pb-free solder, due to degraded wetting and a higher melt point.
How to fuse wires into single solid thread? I'm trying my first real project with an arduino of my own design/idea.I come from a CS background this EE stuff is both exciting and scary. I'm trying to wire up a 3.5mm female audio jack to the Arduino, via my breadboard. I've just finished soldering some wires to the jack (my first time with the solder) but now I have hit an issue I didn't think of: the wire I'm using is made of 10's of little copper wires, this seems normal enough, but I've only ever plugged in larger solid single-thread wires in to my arduino. Do I somehow have to fuse the little ones together to be able to plug this in? Or can I just kinda shove it in? END NOTE: Thanks every one for your suggestions!Thanks guys, and sorry for the lack of proper terminology, as I said, I'm from CS and very new to any thing to do with EE. <Q> You need to remove the insulation from the solid wire, of course. <A> I usually solder the wire to the "short" part of a header strip pin. <A> Heat the stranded wire from the end. <S> In a few seconds, dab at it with a bit of flux-cored solder. <S> You're trying to get a bit of flux to melt into the strands. <S> A couple of seconds later, the wire should be hot enough to melt the solder. <S> Dab it again and let just a tiny solder melt into the strands; it will be enough to bind them. <A> The wire you're using is called "stranded". <S> To use stranded wire in this application, you will need to tin the wire tip. <S> There are several places on the internet that describe how to do it. <S> This one has many pictures: http://www.teamnovak.com/tech_info/how_to/solder/index.html . <S> This one has several good points: http://www.kpsec.freeuk.com/solder.htm . <S> Some key points: cleanliness is key to a good solder joint. <S> Too much solder is just as bad as too little. <S> And be very mindful of the soldering iron tip. <S> I accidentally gave myself a nasty burn on my thumb when I was first learning to solder; it took a month to fully heal. <A> Don't try to shove stranded wire into a breadboard. <S> What I do is simply get a paper clip, solder the stranded wire to the paper clip, and cut the paper clip into the desired length. <S> That way it is a very good thing to put into a breadboard (can't really bend paper clip that short), and the paper clip is a very snug fit into most bread boards. <A> Well, you can actually force a stranded wire into a breadboard or a socket such as the one in Arduino, but it will take some time and effort. <S> If the wire isn't rigid enough to get in the socket, pushing it inside with another solid wire, like one form an end of a resistor helps. <S> One way I found useful was to use 3 $\Omega$ resistors which I had lying around. <S> They are small enough that they won't make a major impact in most circuits. <S> Just plug one side of the resistor into a socket and wrap the wire around the other side. <S> For a better connection, bend the end of the resistor by say 90 degrees or more. <S> This way, the wrapped wire won't just slide off. <S> This method won't actually modify a wire, won't require you to solder it or to try to shape a bit of molten solder, which could sometimes be a problem, and is relatively cheap and very quick. <S> The downside is that you'll need resistors with low enough resistance which won't make a big impact on the circuit.
The best way to use stranded wire with a solderless breadboard is to solder the end to a short length of solid wire (the same stuff that you use for your normal connections), and plug that in.
Isolating motor control signals from microcontroller from high voltage/current lines We need to design an integrated DC motor controller/driver, which will be under microprocessor control. Due to space requirements, either the digital and analog circuitry will be on a single PCB (think of PC104 size), or they will be stacked on top of each other (again, similar to how pc104 boards are stacked). The load requirements are about 10A at 30V. Stall current can go up to 25A. In order to protect the controller from the motor, we want to isolate the control signals. In fact, even the power supply and the grounds for the digital and analog sides are different. (Note that this means the the ground of the analog side can be at an entirely different voltage than the ground of the digital side) My questions are: What is a good way to isolate these two domains (optocouplers, maybe?). The signaling rate between the two domains need to be around 1Mhz. Also, I'm a bit worried about the noise from the motor affecting the digital circuitry, even with proper isolation of the control signal lines. Just being physically close to a motor sometimes even causes problems, let alone being physically connected. I would like to hear about your experiences in building motor controllers/drives to we don't make the same mistakes. <Q> Opto-isolation is the way to go. <S> I've used it for driving a high-voltage ultrasonic amplifier from an MCU waveform generator, and it's often used for motor drivers. <A> Optocouplers can be used in many applications but be aware that the switching speeds are limited. <S> Digital isolators (Analog devices, et al.) <S> using magnetic or capacitive coupling are much faster, but slightly more expensive. <S> We have had good luck with all these approaches. <S> Generally, optocouplers (ordinary with external drivers or drivers like Avego HCPL-3120) will do since the switching speeds are rarely over 100kHz on motors. <S> Use gate drivers that have fast enough and powerful enough outputs to keep switching losses under control. <S> ) LEM's or optoamps (Avego) <S> We will often mace the control circuitry hot and only couple in and out the control information. <S> As far as noise goes, avoid running power through the ground of any control or measurement circuitry. <S> Use ground planed control <S> PCB's with a single connection of their ground to power ground if possible. <S> I have successfully used a small 2 layer SMT (one side grounded) control board on a power system with 83 amps peak at 385 volts and 62.5 kHz and had not even a tiny bit of trouble with noise so far. <S> The SMT is mounted directly on the power devices with short standoffs and gets its control signals through an 8 pin header. <A> You might want to look at common mode chokes and feed-through capacitors in addition to the typical bead inductors where power and control signals enter the digital section. <S> Use a high speed optocoupler <S> (1 MHz is not a problem with the high speed optoisolators - I've seen spec sheets going up to 100 Mbps!) and run a split ground plane under that optocoupler. <S> For "industrial applications, I believe differential current loop interfaces are preferred because they handle voltage drops over long wiring distances and are far more immune to noise.
Filtering the MCU supply and the use of TVSs, such as AVX TransGuards, will avoid other problems arising from the proximity of high voltages and currents, as well as transients on the mains supply. For analog feedback consider isolation amplifiers (TI, Analog Devices
Does direction of current flow affect induced current? I am working on a pcb design. On the board there are two separate areas where I have a constant 5VDC trace running close to and parallel to another trace which has a pulse-width modulated 5V signal going through it. In one of the cases I can see the pulse width modulated signal being induced onto the 5VDC line. With my oscilloscope I measure a peak-to-peak volatge of about 350mV on the signal that should be constant. In the other case I can not detect the pulse-width-modulated signal being induced at all. The only difference between the two areas of the board is that in one case the current in the traces is traveling in the same direction, in the other case the current is traveling in opposite directions. I remember from my Electromagnetics course that the direction of current flow changes the direction of the magnetic field. Is it possible that in one case the magnetic fields are being cancelled out but in the other case they are being added or something? Has anyone see this before? <Q> It may be inductance but things like this are hardly ever that simple. <S> If the spikes you are seeing are at the turn on and turn off edges of the PWM <S> signal <S> my bet is that it DOES have a capacitance coupling component. <S> Just because trace capacitance is small doesn't mean it won't couple. <S> It is the relative capacitance trace to trace and trace to other low impedance (be it ground or a power rail). <S> Ceramic capacitors are usually good for taking care of noise issues like these. <S> The trick is where to put them. <S> Make sure to have some on IC rails and close to switching circuit where high dI/dt signals reside. <S> Also make sure that the scope probe ground you are using is small and very near the signal you are measuring. <S> The signal you are seeing could be radiating into the scope probe and fooling you. <A> But I suspect it's more likely capacitive coupling - try thinking of the wires as a distributed resistance (and inductance) and the capacitive coupling as a bunch of caps - in one case with the sources at the same end and in the other with one at each end (you may need to make the traces thicker to change the resistance) but also try moving your scope ground around to see if what you are seeing on both traces is real <A> The coupling mechanism should only change sign when the direction changes. <S> But the effect may be quite different. <S> If you have the direction of current flow going in different directions, presumably it is being driven by different devices with different driver designs and/or different power supply bypassing characteristics. <S> Also high and low drivers may have different impedance, so the effect on a signal that is high may be different than the effect on one that is low. <S> Also, you don't know that it's the trace coupling. <S> It could be some other means of coupling such as the power supply (especially if the interfering and interfered with signal are driven from the same chip or the same area of the board)
Yes it's possible and your power supply may have a different immpedence above the 5V than below since in one case spikes will go up and the other down (but the falling edge will make a spike the other way)
What options do I have when synthesising control registers? When your design includes control registers that are set/read on a dedicated clock domain (SPI or I2C etc), how do you usually deal with those? For instance: Do you keep them on their own clock domain and false_path them to wherever they go, not worrying too much about metastability? Or maybe take loads of care to make sure there are meta-stable flops on each domain crossing, pushing up area in the case of large reg-maps? And if they span out into multiple clock domains, well, you just hang multiple synchronisers off the control line? Any other suggestions I'm missing? <Q> You have to pay attention <S> EVERY time you cross clock domains. <S> For each signal, you need to analyze it to see if special logic is required or not. <S> If you don't then you will eventually get burned, and probably burned badly. <S> It's possible that much of your logic doesn't need special synchronization, but you can't just assume that nothing is needed. <S> One thing that is super important, but often overlooked by even experts, is that you cannot just double-register (or double clock <S> ) busses (std_logic_vector in VHDL). <S> Doing so would eliminate metastability issues, but not data errors due to skew between bits in the bus. <S> Special logic is required for these cases. <A> The only case where "not worry too much about metastability" is an option is with quasi-static signals — signals that do not change when they are being actively used. <S> Configuration settings that are applied once before starting to use the primary logic function and then left alone usually meet this description. <S> This is a risky design practice. <S> If you do it long enough, you'll eventually get burned, but maybe that's a risk you're willing to take. <S> Also consider that any intentional cross-domain paths you add will make it more difficult to identify unintentional paths if you run an automated cross-domain path checker. <S> If that scares you away from unsynchronized use of the register data, you may want to consider: If most uses of the register bits are on a single, higher speed clock, you can implement the I2C/SPI interface in the fast clock domain. <S> Add the synchronization logic to the register read/ <S> write interface rather than downstream of the individual register bits. <S> For multiple destination clocks, you can implement a one-to-many repeater. <S> I'm not sure how well this approach meshes with the I2C/SPI protocols. <A> Get your I2C and SPI signals into your main clock domain in a very controlled way, worrying all the while about metastability. <S> Nail it down: constrain the tools so that your metastability resolution flipflops don't get placed on opposite sides of the chip, and don't get replicated (it's usually this <S> that gets you when crossing clock domains, rather than metastability as such) <S> Once you've done that, your control and status registers can exist in your main clock domain and you need worry no more!
Immediately synchronize the low-speed inputs to the fast clock.
Why are laptop power supplies marked "IT equipment only"? Laptops are often shipped with switching power supplies that among other have a phrase for use with information equipment only on their body. Why can't I use the same power supply to power a motor or a set of LEDs or a lamp given it's output voltage and its wattage are suitable? I mean it outputs say 36 volts of direct current and can supply say 50 watts - okay, that would do for my motor/LEDs/lamp, why can't I use that supply? What's so special in those power supplies that they bear the "IT equipment only" mark? <Q> When deciding which specifications apply for testing, the product application is taken into account as the way of deciding which spec applies. <S> So if a laptop manufacturer provides an external PSU, they will have it tested to the relevant specs, which includes the product category. <S> There is no guarantee it will be suitable for other applications. <S> For example, if you drive a motor which has accessable metal parts, and that laptop PSU doesn't give you an earth connection back to the socket, unless you make a seperate connection to earth, there isn't naturally one back for you. <A> Separate from the regulatory issue of marking the PSU as for ITE only (Martin's answer), you also have simple performance reasons why you can't just pick a power supply by volts and watts. <S> Driving a large brushed motor, for example, may require a PSU that will not properly handle start/stall conditions where the current draw far exceeds running current, and can withstand/suppress the spikes and electrical noise generated by it. <S> A LED illumination system may need a more stable/repeatable regulation, so that it doesn't dim when the input line voltage fluctuates (old refrigerators in an old house). <S> Or causes visible flicker because the switch regulation frequency leads to beating. <A> Some laptop power supplies need to negotiate with the laptop to deliver full available current. <S> I guess that is done to ensure you buy only their power supplies. <S> Dell uses the DS2501 "unique ware" memory chip in its power supply to report to the laptop that it is an approved supply. <S> However it seems that the Dell supply will still output full power if used for other purposes. <A> Inductive loads, such as motors, generally require a more rugged but not necessarily a very stable power supply. <S> Although laptops and even mobile phones do have light motors in them (CD/DVD drive, vibration alert unit), heavier-duty motors require a different kind of power supply. <S> Emissions conformance is also a major factor in the classification of such power supplies.
Basically, When the powering requirements are "complicated", you need to make sure that the supply can handle that complication. It is part of the safety regulations.
Is there any difference between Electronics book in UK and Europe I want to know if there is any difference between UK and Europe about teaching electronics. e.g. conventional current flow and probably units and stuff? Thanks. <Q> I've worked from a couple of European books and found that the differences are mainly in names of things so it is quite easy to get your head round. <S> In my experience the differences are no more severe than if you were to read a UK or US book written pre 1950 <S> (condenser instead of capacitor and that kind of thing). <S> I may have been lucky in that the books had no fundamental differences in them - to be honest though electronics is a fairly write or wrong topic <S> so it is unlikely things can get too different! <A> We almost never use term "voltage" and I haven't even heard "amperage". <S> Instead we prefer tension and current. <S> Voltage is usually marked with U and potential in reference to ground or infinity is marked with V. Current flow is opposite of electron flow. <S> For consumers, current goes from positive terminal to negative terminal while for voltage generators it is opposite. <S> As far as I've seen, all electrical units are from SI, but conductance seems to be used a bit more in textbooks. <S> I've noticed that curl and divergence operators aren't used (or at least I haven't seen them in any textbooks so far). <S> Nothing else comes to mind at the moment. <S> Still, it wouldn't be surprising to see differences between this and other parts of Europe. <A> In Europe, we have different schematic symbols to the US. <S> Apparently, ANSI/IEEE 315 is the definitive reference, but I can't find a free copy to link to.
I don't know what UK books look like, but here in Serbia I've noticed several differences compared to western sources.
How do digital oscilloscopes achieve such high sample rates? From the perspective of data capture, how is this achieved? If I wanted to implement a home-made digital device to capture high frequency analogue signals, what are my options? So far, I've only come up with some fairly useless ideas for designs! Using a PIC microprocessor, the A/D sample rate on a 18f series I believe works out to be in the order of 1Mhz at 10 bit accuracy if I'm correct (?) And I can't imagine dedicated A/D chips being much better, how do modern scopes achieve frequencies in the GHz? <Q> I presume they use Flash ADCs . <S> These have the advantage that the conversion is immediate, while SA (Successive Approximation) ADCs like used in most microcontrollers perform an algorithm that requires a number of steps. <S> A disadvantage of Flash ADCs is that they are rather heavy on hardware (an 8-bit ADC has 255 comparators), but most scopes don't have very high resolution. <S> (Analog scopes often were 3% accurate, which translates to 5 bit.) <A> The entry level DSO Rigol 1052E (the one I own and 100 MHz capable with software change) uses an Analog Devices AD9288. <S> This is a dual channel ADC with 8 bit parallel outputs and samples at either 40 or 100 million samples per second (depending on speed grad of chip). <S> Although the Rigol is a 1 Gig samples per second, so I'm not sure if they are multiplexing these or what exactly is giving them 10x <S> the samples of the single chip. <S> The AD9288 has bit-per-stage pipeline type converter for the 5 MSB bits and uses a 3-bit flash for the final 3 LSB. <S> This makes sense, as the higher magnitude should be easier to convert fast with pipelines. <S> As your ADC speeds go up, the number of bits sampled via flash conversion will increase, as steven said. <A> Jodes, your comment says you got your answer, but there's much more to the solution than Flash ADCs. <S> Have a look at Agilent's Application Note, " Techniques to Achieve Oscilloscope Bandwidths of Greater Than 16 GHz . <S> " I used to work on that campus (but don't claim to have detailed scope experience). <S> Agilent in Colorado Springs is the global hub of knowledge related to multi-gigahertz signal processing. <S> They worked on a 32GHz solution for years and just started shipping last year. <S> The active probes and microelectronics that do the signal processing are extremely sophisticated. <S> Check out the entire library of documents related to Agilent's Infiniium 90000 X-Series high-performance DSO and DSA oscilloscope. <S> Google it -- the URL is ugly and I'm not sure they offer a permanent link to the library page. <S> You might also want to have a look at the related patents. <A> Oscilloscope manufactures advertise with 'equivalent sampling rate'. <S> This is NOT a live sampling rate. <S> This is a sampling rate done by using samples of multiple periods, and taking samples at different moment of the signal. <S> Combining these, and you get a higher 'equivalent sampling rate'. <S> So if you would have 100MSPS ADCs and do this 10 times (really bad!) , you get 1GSPS. <S> This is bad because it assumes your signal is periodic, which it isn't all the time. <S> What is important of a oscilloscope is the 'single shot' sampling rate. <S> It's also a functionality you are likely to use (capture a step response for example), or have a close look at a non-dancing waveform. <S> It gives an indication what the hardware is capable of, not 'polished' by software. <S> This is also the reason why some scopes will have higher sample rates in single channel mode than in dual channel. <S> Your typical PIC18 series only has 1x ADC converter, but multiple channels (done with an analog MUX). <S> Also, dedicated ADC chips can be much, much <S> faster. <S> 100MSPS isn't too awkward to find. <S> Take a look here, National advertises these as ultra high speed. <S> I don't know how they exactly work <S> , I see the 3GSPS ones use internal interleaving already. <S> http://www.national.com/en/adc/ultra_high_speed_adc.html <A> The Rigol 1052E as mentioned by Joe is a great example of how to do this efficiently and cheaply. <S> It uses a pile of independent ADCs, all of which having a slower sampling rate, and clocks them out of phase with each-other. <S> This way, samples get pulled from each ADC in turn round-robin style. <S> Obviously your timing has to be extraordinarily precise to do it this way, and it appears that the 1025E uses a PLD to do just that - and given that the same board also has an FPGA associated with processing the incoming signal, it appears that the PLD (which is much less powerful but with more predictable internal routing) was added because of its ability to generate and process signals with very precise timing. <A> They interleave the multiple adcs with clocks that are slightly out of phase with one another, getting 5x the sample rate of a single chip. <S> Also, for a periodic signal, there is a trick that a lot of modern scopes use which is to have a sampling clock that is out of phase with the signal being measured, so that on successive samples, a different part of the waveform is being sampled, though in a different cycle of that waveform. <S> Then after enough samples are taken, they can then reconstruct the signal if they can determine the fundamental frequency of the waveform being measured (much easier to do). <S> Make sense?
Hardware can be interleaved, i.e. using multiple high-speed ADCs and time the 'start conversion' signals at the right time.
Source vs Drain polarity for MOSFETS When using MOSTEFS as a switch I always see the drain connected to the higher potential and and the load and the Source is always connected to ground. Can you switch those so that the Source pin connects to the higher potential and the drain is connected to ground? <Q> To clarify a bit what others have already said, a MOSFET has a internal diode that points from source to drain in N channel devices and drain to source in P channel devices. <S> This is not something added deliberately by the manufacturer, but is a byproduct of the way MOSFETs are made. <S> Most of the time this diode would prevent the MOSFET being useful when flipped around. <S> There are some applications you can consider "advanced" where this diode is actually used deliberately. <S> One example is to make a synchronous rectifier. <S> That's basically a diode with a transistor accross it. <S> The transistor is turned on when it is known the diode should be conducting. <S> This lowers the voltage drop accross the diode and is sometimes used in switching power supplies to get a little more efficiency. <S> A MOSFET with its internal diode can be thought of as the diode and transistor all nicely integrated into a single package. <S> Just like there are NPN and PNP bipolar transistors, there are N channel and P channel FETs that are mirror images of each other polarity-wise. <S> A P channel FET would be connected with a positive source and negative drain. <S> In the off state, the gate is held at the source voltage. <S> To turn it on, the gate is lowered by 12-15V with respect to the source for most normal MOSFETs. <A> If you want a ground-referenced load, you can use a P channel MOSFET. <S> This will be a mirror-image of the circuit you describe, ie with the source connected to the higher voltage and the drain connected to 0V via the load. <S> However, your gate drive will need to be reversed and will need to be close to your higher voltage to turn the load off. <A> A mosfet is really a four terminal device. <S> Drain, source, gate and body. <S> For a N channel mosfet the doping arrangements result in diodes that permit current flow from body to drain and from body to source. <S> If you have a mosfet with all four terminals brought out seperately <S> then there is a symetry between drain and source. <S> Provided body is kept at a potential that is less than or equal to both the drain and source voltage the mosfet can be used to switch currents in both directions. <S> However most discrete mosfets have body internally connected to source which effectively places a diode from source to drain. <S> So the mosfet can only block current flow in one direction. <A> The problem is internal diode, which will always conduct in reverse direction with 0.7V drop, so when you will switch MOSFET ON you will lower that drop down to 0V <S> and that's it. <A> You can do it if your application can cope with the reverse body diode - there are a few occasions where this can be useful, for example reverse-polarity protection with low voltage drop.
Your observation of source being negative and drain positive is true for N channel FETs.
What does the "posted" mean in posted PCIE transaction? What is the etymology of the word "posted" in "posted PCIE transaction"? I've worked with PCIE and I understand the difference between "posted" and "non-posted" PCIE transactions , but I don't understand what the word "posted" means. Where does "posted" come from? What does it really mean? <Q> To know about PCIe Posted Transactions, you have to understand what a "posted write" is for legacy PCI, and what a legacy PCI read is. <S> For a legacy PCI read, and indeed reads on most busses, the CPU sends out a read command and the read address then waits for the device to respond with the data and a "Done" signal of some kind. <S> Basically is is a Command and Response type thing. <S> Normal writes on a legacy PCI bus, and many other busses, is similar except that the command is the write signal + address + data and the response <S> is just a "done". <S> The problem with this is that for many systems the "done" is not needed and just takes time. <S> If the peripheral you're writing to can accept writes at full speed then the done is not at all needed. <S> A "posted write" is a write that does not wait for a "done". <S> The CPU assumes that the write cycle will complete with zero wait states, and so doesn't wait for the done. <S> This speeds up writes considerably. <S> For starters, it doesn't have to wait for the done response, but it also allows for better pipelining of the datapath without much performance penalty. <S> In PCIe land all writes are posted. <S> But PCIe calls them "posted transactions" because there are many types of writes (memory writes, I/ <S> O writes, configuration writes, etc.). <S> There are also a couple of other transactions that don't have a response. <S> It is common for a single word read to take several microseconds to complete. <S> So, even though the bus is running at 2.5 gigabits/second you could only get about 4 megabytes/second if doing single word reads. <S> Change that to single word posted writes and the bandwidth will go up to around 60 megabytes/second. <S> Change to multi-word posted writes and <S> you're up to about 250 megabytes/second. <S> There is no such thing as a posted read, on any bus, because all reads require a response (a.k.a. the data you're reading). <A> I know little about PCI, but it looks to me that the main thing about posted transactions is that you don't have control over them once they're initiated. <S> A bit like sending a message by mail ( post !): once the message is in the mailbox it's beyond your control. <S> Other systems also use post , e.g. the Windows messaging system knows posting and sending . <S> When sending a Windows message you're in control until the message has been handled, when posting you place it in the message queue, and that's it. <S> No feedback, no acknowledging. <A> It helps to understand that a PCI bus controller forms an interface between a processor local bus, i.e., the CPU's native bus structure, and the PCI adapter bus. <S> Suppose your CPU wants to write data to a PCI device; there aren't device-selects running directly from your native bus address decoder out to a plugged-in PCI card, so what happens is that the CPU writes to a portion of its local physical address space that is decoded to the PCI bus controller. <S> When the PCI bus master sees the write-cycle, it latches the address and data, at which point the rest of the I/ <S> O transaction is decoupled from the CPU. <S> The CPU is free to go on its way, do the next thing, b/c at this point <S> , the cycle has been 'posted' to the PCI bus controller; the PCI bus controller then manages selecting the correct device and finishing the I/O cycle.
The reason why all writes are posted is because the serial and packet based nature of PCIe makes the "response" super slow.
478 MHz band, allowed for hobbyist use in USA? Somebody advised me to look at this wireless module as a lower-cost alternative to xbee. I noticed that it operates on the 478 MHz band. Is this band permitted for hobbyist use in the United States? <Q> According to the chart here , 478 MHz falls into a band that is allocated to Fixed Land Mobile Broadcasting. <S> The description says, "The federal agencies use this band for land mobile radio communication systems for shared systems and mutual aid responses with public safety agencies (fire fighting, law enforcement, medical, etc.) in local communities." <S> According to the footnotes (which can be found here ), none of these applications includes unlicensed use. <S> 478 MHz is not an allocated amateur band, so even if you had a ham license you could not transmit on that frequency. <S> The Wikipedia page on industrial, scientific and medical (ISM) <S> usage also lists the frequency bands that are allocated for unlicensed use. <S> 478 MHz is not on that list. <S> Based on this evidence it is illegal for you to use a transmitter on 478 MHz in the United States. <A> Executive Summary / tl;dr <S> Frequency ranges of the module <S> According to the manual for the APC220 , it has a working frequency of 431 MHz to 478 MHz, which includes the 433 MHz ISM band, which is usable by hobbyists. <S> The datasheet , hosted on the website of the distributor who wrote the manual in the first link, claims 418MHz to 455MHz performance, but shows a screenshot of the PC configuration software where the user is setting the frequency to 485 MHz (Perhaps that's for the ACP230, based on the title bar?). <S> In the end, if you're extremely worried about regulatory compliance and really want to use this device, I'd suggest trying to find out what the RF IC is. <S> That part should have better documentation and better information on EMC testing and legal operation. <S> The most authoritative source for this module that I could find is this datasheet in Chinese on the manufacturer's website (the home page of which is incredibly spartan). <S> Sugggestion <S> If you're willing to play around with this for a while to save a few bucks, then go for it. <S> No one is likely to show up at your door with a spectrum analyzer before you can figure out how to configure it for 433MHz operation. <S> However, especially since you're a hobbyist, I'd suggest you stay at work for an extra hour or two. <S> Spend the time that you would have been tearing your hair out debugging this thing and digging through Engrish datasheets, make a few bucks, and buy a well-documented, popular, easy to use, guaranteed legal tool. <S> When you're working at low quantities, time is money. <A> According to the FCC web site, 478 MHz is allocated to the Offshore Radiotelephone Service. <S> Using those modules would be illegal in the USA.
No, 478 MHz is not allowed for hobbyist use in the USA, but this can be configured to operate at other legal frequencies like 433 MHz.
What does the Arduino ethernet shield connect to? I am thinking about buying an Aurdino ethernet shield, but I am not sure what it connects to. On the back of my iMac there is a blue plug which goes into the computer, which I think is the ethernet plug. Would I just plug that into the ethernet shield? <Q> Number 2 is the ethernet port. <S> On the left is an Ethernet port and the right a Modem/Telephone port. <S> In order to connect with one wire you need to use a Cross-Over cables and set IP addresses in the same range for both devices! <S> 192.168.x.x; 10.0.0.x .. <S> etc. <S> (or set your mac as a DHCP server) <S> If you don't want to use the cross over system then you will need a router that has a DHCP server and assigns IP's to each device automatically. <S> And then check the Router on its ARP table what the IP of your Arduino Ether shield is for communication. <S> If you have an old airport then you will need to get a switch and remove the Blue cable form your Imac. <S> and plug it into the switch. <S> Then get 2 new cables and connect your iMac to the switch and the Arduino EtherShield to your Switch. <S> Here are some setup examples <A> An ethernet port looks similar to a phone line port. <S> What you're talking about most likely is the ethernet port, however, the shield is to allow your Arduino to send/receive internet communications. <S> You'd be more likely to install the other end of the cable to an open slot on your router or modem. <A> You can do that, provided that the ethernet shield auto-switches. <S> If not, you have to connect your Mac and Arduino to a switch or hub. <S> EDIT -- like ppumkin says, you can also use a crossover cable. <S> I don't know how I forgot about that solution. :)
If you have a newer airport then you can plug the Arduino Ethersield into any one of the free ports on the Right Side
Parasitic power and an LTC490 as DMX (RS485) bus repeater I'm in the process of building a DMX bus repeater for a light control installation using the LTC490 bus driver in this configuration: Now, this works well when using an external power supply (5V DC), but I was thinking if it would be possible to harvest some power using the DMX+ line of the input to power the rest of the device. Two questions: Is this advisable or even possible? How should I do it? <Q> Unlikely to be accepable, DMX permits a total load on the line of 32 unit loads where an RS485 unit is a 15k resistor to -3V or 5V and the LTC490 could draw more current than that, depending on its load. <S> Although the datasheet quotes the supply current as only 500uA max, that is on no load and it could be up to 250mA if driving into a short circuit. <A> So with 2 wires, a parasitically-powered repeater can't ever transmit a stronger continuous signal than simply passing the signal through with wire. <S> You might look at power over ethernet (PoE): <S> Wikipedia: Power over Ethernet and Electronics Stack Exchange: PoE . <S> PoE "DC on Spares (mode B)" and USB and many other protocols send power through the same cable, on a separate pair of wires. <S> PoE "mode A" magically transmits power over the same wires while it simultaneously transmits data, which sounds similar to what you are trying to do.(Is it possible to somehow adapt the trick they use to your system?) <S> I suppose in principle another alternative is to parasitically collect power while the lines are idle. <S> Later transmit that power in a brief burst when the occasional packet comes through. <S> That might work OK squaring up edges that become too rounded off over long distances, as long as you give it time between packets to recharge, like the one-wire bus. <A> I wouldn't recommend even trying as especially on the cheaper DMX kit the standard can be implemented quite loosely, perhaps the way would be to do it the way scrollers do it and put 24v down the unused wires in a dmx installation. <S> Personally though, if the cable is long enough to use a repeater <S> I wouldn't, I would instead carry it across ethernet and/or fibre.
While a device could, in principle, parasitically harvest some power from the input RS-485 signal wires and use it to drive its output RS-485 wires, a device can't ever transmit more power than it received.
howto link an Arduino Light Sensor to a keyboard button I have an Arduino Uno and a light sensor. I would like the light sensor to activate the [H] button on my keyboard. If the light sensor is in the dark (1024 I can see in the monitor) it should have the same effect as holding the [H] button until there is light again. How do I go about this? At this moment The arduino en sensor works, I think I should be able to read out the serialport en then, when the output is near 1024, trigger an event like holding the [H] key. I only have no idea where to look on the web, what words to look for or if this is so basic that there is a piece of coding out there. working on an art-installation, help is very welcome :) <Q> You need to write an Arduino sketch trigger on your sensor and send a message over the serial port to your PC. <S> Then, you need some PC side software to interpret this message and fake a keyboard event. <S> Here's an example: http://www.arkadian.eu/pages/375/arduino-based-keyboard-for-windows <S> This is more complex and may require an AVR ISP programmer. <S> http://hunt.net.nz/users/darran/weblog/faf5e/Arduino_UNO_Keyboard_HID_part_2.html <A> The easiest way You send serial messages and using AAC that reads serial responses it will emulate keypresses or even mouse movements. <S> http://www.aacinstitute.org/Resources/ProductsandServices/AACKeys/AACKeys.html <S> The not so easy way <S> http://www.computer-engineering.org/ps2protocol/ <S> Very good resources <S> The most difficult way <S> The usb way that Joby mentioned <A> The easiest way is to buy a cheapo USB keyboard, break it apart and follow the leads to the H key. <S> Then make a couple wires come out of there and hook your arduino with light sensor up to a reed relay (they have them at RadioShack). <S> Two wires from the relay go to your arduino, and two wires from the relay connect the two wires to the H key. <A> Assuming you have an Arduino UNO or Mega2560, the USB Keyboard HID approach is actually really easy. <S> You don't need an programmer, you can just use DFU mode to load the HID Keyboard firmware onto the UNO's atmega8u2 using either the dfu-programmer application (Linux, OS X), or flip (windows). <S> Take a look at my blog for details: Arduino Hacking Cheers,Darran.
The other method is to reprogram the atmega-u8 coprocessor on your UNO to emulate a USB keyboard directly.
Why are some AC outlets and plugs polarized? This will show my naivety when it comes to alternating current... but why are some plugs and sockets on AC outlets polarized (one prong is taller than the other)? ( See this question on DIY .) ( Or this one. ) My thought is that if the current is alternating that the hot and neutral effectively switch roles every 60th of a second. (50 if you're in Europe!) I can't seem to wrap my head around why any device would care which line is hot or neutral, since the current coming into the device might come from either side. Wouldn't the safest option for implementing an on/off switch be to disconnect both sides for off? Phrased differently, if I connect only neutral to a device, why doesn't it conduct to ground in the same manner as the hot line? <Q> My thought is that if the current is alternating that the hot and neutral effectively switch roles every 60th of a second. <S> The currents through both pins are equal and opposite, but the voltages on each pin are not. <S> The neutral is roughly 0 V relative to the Earth at all times. <S> The hot alternates between positive and negative. <A> It's all to do with how the power is transformed from high tension to normal mains voltages. <S> The power is transmitted across the country in 3 phases. <S> There are two types of 3-phase electricity - star and delta. <S> Delta uses 3 cables, and the power is split between them 120 degrees out of phase. <S> When it comes to your local substation the power is fed through a transformer which switches it to "star" <S> 3-phase. <S> In this arrangement there are 3 live (or hot) wires and 1 neutral. <S> The 3 coils of the transformer are linked together at this neutral connection, and, in relation to the other three lines, it has zero power. <S> It is neutral. <S> Very often this is also linked to earth at this point as well. <S> Star: <S> Delta: <S> As far as plugs go, if the power is being fed into a transformer internally to reduce the voltage, then the connections really don't matter which way around they go. <S> Some systems will employ switches and fuses and such in the input power, and this is best handled by the live connection, not the neutral, so a polarized plug helps ensure this. <S> There are also grounding and 'commoning' issues to be taken into consideration. <A> The neutral and ground lines are tied together in your load center, and both are connected to a big copper stake in the ground. <S> The only difference is that the neutral line is intended to have current flowing through it, while the ground line is not supposed to have current flowing through it. <S> While interrupting a neutral line with current flowing through it would expose you to high voltage, there's little to no potential on a properly functioning neutral line between the wire and the ground, so you can't be shocked. <S> Research <S> GFIC <S> (Ground Fault Interruption Circuit) sockets to learn about how this property has been applied. <A> why would the device care which is neutral and which is ground? <S> well as mentioned above (unless there's a neutral fault) you can't get a shock off of neutral - when you do the physical design of an appliance you have to put a switch somewhere and whatever's being switched somewhere - if you put the hot (active) side on the other side of the switch and the rest of the circuit (fuses, transformers, whatever) on the neutral side of the switch then when things are off there are fewer things that could shock you when the device is off - imagine someone stupidly changes a fuse without unplugging it, or the cheap vacuum cleaner's plastic case is damaged when a kid falls on it <A> As long as there is no fault in the appliance, polarization makes no practical difference. <S> If there is a fault, however, polarization helps to reduce the potential for shocks or fires. <S> A typical appliance gets its electricity through two wires, a “hot” and a “neutral”: one attaches directly to the working parts of the appliance, the other goes through the appliance’s on-off switch. <S> The appliance doesn’t care which. <S> But humans using the appliance do care: <S> polarization makes sure that it is the “hot” wire that goes through the switch of the appliance, so that as long as the switch is off, no electricity is even entering the working parts of the appliance. <S> For example, if a lamp is properly wired with a polarized plug into a polarized outlet, and it is turned off, you could stick your finger in the lamp’s bulb socket without getting a shock. <S> If the lamp is improperly wired, you would get a shock, even though the lamp switch is off. <A> Consequently, many devices are required to ensure that it is not possible to disconnect the neutral wire without simultaneously disconnecting the hot wire. <S> While that could be done via use of interlocked hardware that disconnects both wires without regard for which is hot or neutral, it's generally easier and cheaper to require that a particular wire be hot, and simply disconnect that one. <A> Well as far I have read, its because safety. <S> For EX. <S> light bulb bottom contact is hot and and screw shell is neutral, so to be shocked <S> you must touch bottom while during unscrewing you are safe to touch thread. <S> For time i tought because rotation of motors in some devices that is important but then again 50% of citizens would sweat while 50% would get cooled by fan which ofc is impossible...
If a device has a means of disconnecting power (whether via manual switch, fuse, or automatic safety device), leaving the neutral wire connected while hot is disconnected will be safer than having neutral disconnected while hot is connected.
What is the role of capacitors in DC circuits like motherboard, graphic card etc? I was just reading in Capacitors in DC Circuits that "Capacitors do not play an important role in DC circuits because it is impossible for a steady current to flow across a capacitor". I think it means that a capacitor doesn't allow current to flow when it's charged. What role does it have in circuits like motherboards, graphics cards, soundboards, etc. which works on DC current? <Q> Noise suppression - reduce EMI by filtering it Timing circuits - RC networks for clock signals, etc and many, many more. <A> Decoupling capacitors are like an energy reservoir. <S> The distance from the power supply can be rather long and when a component suddenly needs extra power the inductance of the PCB traces prevent this power to come quickly enough from the power supply. <S> If you don't have decoupling capacitors this may cause a dip in the supply voltage. <S> The nearby decoupling capacitor bridges this dip. <A> That's a very misleading statement, so I suspect that it's context was important. <S> It's only true for DC in the theoretical sense, when there is no change, ever to the voltage or current. <S> All practical circuits are switched on at some point and have pulsed and transient currents. <S> That's when the capacitor acts as local storage to supply current to the ICs quickly, before the power supply can act. <A> The presupposition of your question is incorrect. <S> Motherboards and graphics cards are about as far away from DC as you can get in home electronics (OK, your microwave oven might be a little farther, but not by much). <S> Motherboards and graphics cards generate and use RF energy. <S> That is 'RF' as in "Radio Frequency" AC. <S> Yes, they are supplied by a DC source, but that is about where the DC part ends.
Capacitors in DC circuits have many roles, such as: Decoupling - small reservoirs of power for rapid power responses Most of those caps are there to keep the RF noise that your MOBO or GPU generate from traveling to places it shouldn't and thereby destroying the functionality of the MOBO/GPU.
Calculating size of cap & inductor for buck convertor What is the idea of choosing inductor & capacitor value for buck DCDC convertors (no specific part number, in general)? I've tried random one with low resistance, and it kinda works, but want to know idea behind calculation of optimal value (based on freq, and max current). <Q> This is a basic buck converter: <S> The current trough the inductor is \$I_L\$, the voltage over the inductor is \$V_L\$. <S> The voltage over the load (the resistor) and capacitor is \$V_{out}\$. <S> The upper state is called the on state and the bottom state is called the off state. <S> The switch is controlled by a PWM signal. <S> The relation between \$V_L\$ and \$I_L\$ <S> is:$$V_{L}=L\frac{dI_L}{dt}$$When the converter's switch is closed, \$V_L = V_{in} - V_{out}\$, so the voltage over the inductor is positive. <S> This means the current trough the inductor will increase as described by the relation above. <S> When the switch is closed, \$V_L = - V_{out}\$ (the voltage drop over the diode is neglected here). <S> So the current trough the inductor will decrease. <S> The inductance limits the rate of the increase and decrease of the current. <S> So use a larger inductor for a smaller current ripple. <S> Because a capacitor acts like a voltage buffer here, a larger capacitor will make the voltage ripple smaller. <S> Everything depends of course on the frequency of the PWM signal. <S> The higher the frequency, the smaller the time for the current to increase. <S> So a higher frequency will decrease the current ripple. <S> When you make or purchase an inductor, make sure the current the inductor can handle is larger than the peak current which is the average current + 50% of the current ripple. <S> When you purchase a capacitor, make sure it has low ESR so minimum power losses. <S> Very good explanations on how to calculate the required inductance and capacitance are on this site: <S> http://www.daycounter.com/LabBook/BuckConverter/Buck-Converter-Equations.phtml <S> There is also a calculator which you can use to calculate the required inductance and capacitance. <S> Designing your own buck (or <S> boost) <S> converter is really fun! <S> You have to take in account switching and conductance losses in the switch, conductance and core losses in the inductor, losses in the capacitance and diode. <S> Designing a buck converter is looking for the frequency, C and L combination with the highest efficiency and the lowest cost. <S> (And don't turn your converter into a radio transmitter like I did this morning <S> :-P ) <S> The image is from Wikipedia which has a great article on buck converters . <A> The choice of inductor is critical for numerous reasons: <S> it dictates the ripple current sourced to the capacitors, and therefore, the ripple voltage imposed on their ESRs, which is your output ripple voltage <S> it dictates at which load the converter transitions from discontinuous to continuous mode, which is important to know for feedback loop stability (a discontinuous-mode buck needs only a single-pole compensation network; a continuous-mode buck needs two), power dissipation ( <S> peak and RMS switch power is higher in a discontinuous-mode buck than in a continuous-mode buck at the same power level) and duty cycle (a discontinuous-mode buck has a dead-time component that causes the duty cycle to vary with load; a continuous-mode buck's duty cycle is essentially fixed with respect to load) the current slew rate of the inductor will place an upper boundary on the converter's transient response <S> You must make sure that the inductor will not saturate out under your worst-case condition of overload, as DC current can cause the permeability of the magnetic material to roll off which will send the switching ripple high. <S> If you're not experienced in magnetics design, it's easier to choose an off-the-shelf inductor suited for a buck (i.e. one that specifies how much current it can handle before saturating). <S> [It's fun playing with distributed-gap ferrite material like Sendust and Kool-Mu, which can take a lot of abuse without saturating out and blowing up your switches, but I digress...] <A> Linear has excellent datasheets with much information on selecting components for your SMPS. <S> For instance when I look at the datasheet for the <S> LTC3127 <S> I see sections for Buck-Boost Inductor Selection , Output and Input Capacitor Selection and Capacitor Selection Example . <S> The datasheets have detailed calculations.
In general, it's easier to choose the inductor you want then size the output capacitance in terms of ripple voltage; make sure the combined ESR gives you the ripple you want, and that the caps are rated appropriately for the ripple current and frequency that the inductor will be providing.
Scaling analog signal before ADC: A low cost, low pin and component count solution Extending the question: Scaling Voltage for Arduino Analog In, Beyond Voltage Dividers Making a simple digital thermometer. Ideally, my circuit will only need a 3.3v supply. The sampling will be by a PIC 8 bit ADC. I'm hoping to achieve full scale accuracy by scaling up the output voltage from the thermistor potential divider, using an easily obtainable, cheap op-amps or alternative . Perhaps someone could recommend low voltage single rail op-amps , (not op-amp circuits) or any really clever transistor circuits or similar that only use one or two cheap components to get better accuracy measuring a thermistor in certain ranges than just a potential divider fed straight to the ADC. Thanks Edit: Thanks for the response on the LT1677, however I'm having real trouble finding a retailer for one-offs! It's a little bit on the pricey side as well, so I'm still looking for alternatives. I'm thinking of adding a 5v rail to my scaling circuit, so I can use LM2904N instead and get approx full accuracy, it's a cheap dual with full swing on the lower rail and just 1.5v less than full swing on the upper rail. Not ideal tho. <Q> I used the LT1677 on several projects. <S> I've used it to increase gain from sensors for a PIC ADC input. <S> Its voltage range is 3-18 volts, and has rail to rail I/O. <A> You can make a non-inverting amplifier with for instance a Linear LT1677 , which is a single supply rail-to-rail opamp, operating from 3V. edit National's LPV511 is also low voltage (starts from 2.7V) and rail-to-rail in. <S> Output goes to 100mV from the rails. <S> Also much cheaper than the LT1677. <A> Here are a number of inexpensive op-amps that might work as well. <S> All of them are rail-to-rail output and have an input range including the negative rail. <S> Some of these aren't rail-to-rail in, but with a common-mode range within about 1V of the upper rail, it's fine for an application where you are amplifying the input. <S> LMV822 <S> (RRO) <S> OPA348 <S> (RRIO) <S> OPA336 (RRO, 0.125mV offset, <S> 100kHz GBW which is small but probably fine for thermistors) <S> MCP6001 <S> (RRIO) <S> MCP601 <S> (RRO, 2mV offset, 2.8MHz GBW) <S> edit : <S> p.s. <S> your question had inspired me to write an article about thermistor signal conditioning in general; maybe you'll find it helpful. <A> The best thing to do for accuracy is not use a simple divider followed by an amplifier. <S> Rather, use a wheatstone bridge, assuming this temperature sensor is a thermistor. <S> The benefits you get are that that a wheatstone bridge is good at "canceling out" the non-linearities of thermistors as well as minimizing the loading effects of the measurement circuit. <S> So you end up with a circuit like: R3 is the thermistor. <S> Choice of resistor values will vary with the thermistor and the range that your intending to measure. <S> The op amp in the circuit can be any of those mentioned by other answers. <A> You can use the extra bits so that you still get your desired 8 bits of resolution accross a large dynamic range of signal. <S> These A/Ds are usually available with a simple SPI or IIC interface that is easy to drive from the PIC, even if the PIC doesn't have the SPI or IIC hardware built in. <A> This is going old school, but since it's a thermistor (variable resistance) you could probably try making an integrating A/D converter. <S> You would need a fairly stable capacitor and a precision resistor for calibration (do one calibration cycle for each read). <S> It's more involved than I could explain here, but I've been thinking of doing this for a few thermistors I have. <S> The nice thing is that by extending the integration time you get more resolution. <S> Google single slope integrating ADC for some design ideas.
Instead of amplifying the signal, you could try using a high resolution external A/D. Sigma-delta A/Ds are slow but have many bits, and are not too expensive.
Getting starting designing CMOS ASIC - What is the must have software? What software should I use to design a pipeline of gates? The design will be implemented on TSMC's 350nm process. A list of must-have software to design a basic gate circuit, and ASIC solutions would be nice. <Q> Big names in EDA software are Synopsys , Cadence , Mentor , and Magma . <S> Here is some of the software typically involved in a standard-cell ASIC flow: <S> Wikipedia has a list of Verilog simulators ; the list notes which ones also support VHDL. <S> Synthesis tools read the RTL description and map it onto the cells available in your target library. <S> The cell library is usually described in .db format, and may be provided either by your foundry or by a third-party library provider. <S> The output of the synthesis tool may also be Verilog, but it won't have any high-level constructs, only cell instantiations and wires. <S> This is called a netlist. <S> Wikipedia has a list of tools . <S> Place and route <S> (P&R) tools take the netlist and search for a physical implementation of that netlist. <S> This involves placing all of the cells in two dimensions and figuring out how to route the connections between the cells. <S> As a design goes through P&R there will be additional quality checks including static timing analysis (using e.g. PrimeTime), layout vs. schematic , and DRC . <A> Many people use expensive proprietary tools for VLSI design. <S> Others find free software or freeware adequate and more educational: <S> Magic tutorial .Some <S> nifty patches to Magic . <S> Alliance : <S> A Complete CAD System for VLSI Design, is released under the GNU General Public Licence (GPL). <S> Lots of tools, cell libraries, etc. <S> GNU Electric <S> (thank you, sybreon), released under the GPL LASI <S> (LAyout System for Individuals), closed-source freeware <A> If this is an academic project and if you are not constrained to use TSMC's processes, you may want to consider using a tool like GNU Electric . <S> It is able to handle some basic custom ASIC design. <S> Depending on the complexity of your design, it might be 'good enough' for what you need. <A> In my company, the standard procedure wil be: Specification (Microsoft Visio) <S> Coding text editor (Emacs/Vim) Simulator (VCS synopsys) <S> Synthesize (DC_Compiler synopsys) Timing Optimize (Prime Time Synopsys) <S> Routing (IC_Compiler Synopsys) <S> Post layout checking (Calibre) <S> You can also need Virtuoso (Cadence) if you want to do mixed-signal or ADC,DAC.. Hope that help!
Magic : an interactive editor for VLSI layouts with online DRC, released under the Berkeley open-source license. HDL simulators read an RTL description of the design (typically written in Verilog or VHDL) and mimic the behavior of the hardware described by the RTL. Examples are IC Compiler, Encounter, and Blast Fusion.
How to use a Polyswitch Self Resetting Fuse and light up led when fuse has been disconnected I'm designing a circuit that will be connected to usb of a pc. How can I isolate the supply when a short has been detected on any part of the circuit. An led should light up indicating there's a short somewhere in the circuit. <Q> I would consider putting a PNP transistor accross the polyfuse such that current flows thru the base when there is more than one junction drop accross the fuse. <S> In normal operation the drop accross the polyfuse <S> shouldn't be that high. <S> After all, a polyfuse will have considerable leakage on its own, so leakage really isn't the issue. <S> Connect the emitter of the PNP to the power side of the polyfuse. <S> The base goes to the device side with 10K Ohms in series. <S> The collector will now source some current when the fuse is open and a device is trying to draw current. <S> You could drive a LED and resistor directly from the collector if you only want a few mA. <S> You could also use a additional NPN transistor to amplify the current and drive a LED with a higher current. <A> I think you could do this with an LED across the poly switch in series with a 1k or so resistor. <S> If the output is shorted, the LED conducts and lights up dimly. <S> If the polyfuse is conducting normally, then no light is emitted as the voltage drop will be very small. <S> Make the LED+resistor combo draw no more than a few mA short circuit; that should be fine for a simple indicator. <S> This only works with short circuits though. <A> You could put an LED and resistor in parallel with the polyswitch, but that isn't really doing much to isolate your load if the fuse opens (as current will flow through the LED and resistor). <S> What will you use to power the LED? <S> If you can get the datasheet for the USB hub IC you may find it already has overcurrent outputs that you can make use of.
You can put a large enough resistor in series with the base such that the leakage thru the device is small enough not to matter.
How are low-noise transistors different from other? Yes, I know: they have lower noise levels. What I mean is how is this achieved? And I guess there must be a trade-off as well (otherwise all transistors would be made as low-noise?) <Q> Now that I've read more about this, properties of transistors that affect noise: BJTs Low base spreading resistance r bb (and emitter bulk resistance R ee ?) <S> reduces (Gaussian, white) thermal noise . <S> High transconductance reduces base current, which reduces both (Gaussian, white) shot noise and (pink) flicker noise caused by modulation of base current. <S> JFETs <S> Large transconductance reduces thermal noise caused by the channel resistance <S> Also, you can reduce thermal noise by connecting multiple JFETs in parallel, but when the parallel input capacitance exceeds the source capacitance, it will start degrading again by attenuation. <S> So lower input capacitance helps here. <S> Gate leakage current causes shot noise. <S> This is normally extremely small, but can become noticeable if JFET is hot. <S> Burst or popcorn noise caused by manufacturing defects, but should be minimal in modern devices <S> The other causes of noise are properties of the circuit, not the device. <S> Sources <S> Self, Small Signal Audio Design, Ch. <S> 1 <S> Horowitz & Hill, The Art of Electronics, 7.1 3 Transistor amplifier voltageand <S> current noise <S> Hood, The Art of Linear Electronics, Ch. <S> 16 Noise and Hum <S> These are discouraged for other purposes: <S> Avoid using “low noise” JFETs advertised for audio applications. <S> These devices achieve their low noise performance at the expense of larger input capacitance and leakage current. <S> An experimenters approach to detecting the Schumann Resonances <A> These devices address burst, avalanche, flicker, and thermal noise. <S> Burst noise <S> is the result of inconsistent ion deposition in the semiconductor fabrication process. <S> It is reduced by escalating the selection/rejection criteria stringency, selling chips at different grades (eg: fast, slow); by changes in layout to better account for process variations; and by changes in the fab process itself to improve deposition homogeneity. <S> I think of Avalanche noise as amplified shot noise . <S> Under reverse bias some electrons collide with the lattice in the PN junction depletion region with enough energy to form an electron-hole pair. <S> Depending on the reverse bias voltage and junction characteristics, an avalanche breakdown may propagate, registering as a current spike. <S> It is reduced by manufacturers by design and process changes to both increase the length of the depletion region (reduced field) and increase the energy required to free nearby electron-hole pairs. <S> Flicker noise , also called 1/f and pink noise , comes from "slow fluctuations of properties of ... materials" [1] during operation. <S> As it is a sum of other sources of low frequency noise, it is addressed as these sources are identified. <S> Thermal noise is directly proportional to temperature, so any change that lowers local temperatures improves this figure. <S> For example, changing die package for better dissipation; or layout changes to spread out local current hotspots. <A> Noise is variation due to external conditions. <S> There are many different types of noise. <S> Some can be reduced, some cannot. <S> e.g. Thermal noise cannot be removed but electrostatic noise can be removed/reduced by using different types of material for packaging. <S> This is a very common technique used. <S> Yes, that will definitely affect the performance like reduce the amplification factor if used in an amplifier, etc <S> but it is a compromise worth taking if you can compromise on search factors.
Also, by changing materials and doping, we can bring about reduction in noise.
fastest gate setup to add 7 integer of 32bits I would like to add 7 integer of 32 bit each together, using gates. The naive solution is to add two together, than the sum of these two with the third integer. The the sum of the first three added to the fourth integer... etc. However this is probably the slowest solution. I am looking for a fast way to do it. This is for sha256 algorithm. The main speed bottleneck is caused by a 7 input 32 bit adder. Consider the 32 bit labelled: a, b, c, d, e, f, g. I would like to output a+b+c+d+e+f+g using gates asap. A faster way would be (((a + b) + (c + d)) + ((e + f) + (g))) //This is performed in 3 steps.(((((((a + b) + c) + d) + e) + f) + g) //This is performed in 6 steps. I would like to know if it can be done faster than the 3 steps process, by using special adders that can take multiple inputs. <Q> Your 3-stage adder would likely be the best possible. <S> You need to balance the need for an adder with multiple inputs, and mulitple stages of adding. <S> You could probably end up designing a 7-input adder from scratch, but it would probably be terribly slow due to its complexity. <S> That said, if your goal is to speed up your SHA implementation, you may sometimes need to take a big-picture view on the system. <A> The fastest practical approach is probably to build a circuit which takes three inputs and returns a two-bit count of how many of the inputs are high (look up 'carry-save adder'). <S> If the inputs are A, B, and C, the ouputs are (AB or AC or BC, A xor B xor C). <S> Using 32 of these, one can easily produce a circuit that takes three 32-bit numbers and after two gate delays returns two numbers whose sum is that of the original three. <S> To add seven numbers, take the first six numbers as two groups of three and turn them into four numbers (so a total of five numbers will remain to be added). <S> Repeatedly take three of those numbers and munge them to produce two, until one has only two numbers left. <S> At that point, one may then add the two remaining numbers using a "conventional" adder. <S> Another approach would be to use a 7-to-3 carry-save adder; there are various approaches with different numbers of gate delays and levels of fan-in. <S> Perhaps divide the input into a group of 3 and a group of 4; use two logic stages to develop outputs for at-least-one, at-least-two, at-least-three, or all-four inputs active, and then use another two logic stages to combine these into at-least-one through at-least-seven. <S> Two more logic stages will suffice to produce the three-bit result from the carry-save adder, and two more will turn that into two bits. <S> One probably ends up with more circuitry than would be needed using 3:2 carry-save adders, but a somewhat faster logic path (max gate fan-in would be six). <A> The basic idea is that when you add two numbers ( X1 + X2 ) What you get is a new pair ( S + C ), where S contains the sum outputs of the 32 half-adders, and C the carry outputs (shifted one position to the left so they are in the appropriate place). <S> Hence C[0] is 0. <S> In the next step you add S + C + X3 (using full adders), and you again get an S' + C' pair, in which C'[0 <S> ] = 0. <S> You repeat this for all integers you want to add. <S> The important point is these additions are not slowed down by any form of carry propagation, so they can be fast (and small in gates). <S> As a last step you will need to add the final S + C, using any means available. <S> So your total time is 7 three-way additions without carry propagation, plus one full-side two-way addition with carry. <S> When used for multiplication the situation is even better, because last step is not needed. <A> Carry select adder should be a good choice. <S> It requires a lot of hardware, but is also very efficient.
One approach would be analogous to the carry-save accumulator often used in multipliers.
Negative effects of using underrated chargers I was wondering what the effects of using a lower rating power rated supply for device would be. For example using a 1.52A supply at 19V to power a device where the charger that comes with the device is 4.74A at 19V. Is doing this likely to damage the device or will it just take longer to charge. <Q> You seem to be confusing two things, operating the device and charging a internal battery. <S> However, in either case using a power supply with a order of magnitude less current capability is very unlikely to work. <S> Either way, the output voltage won't be 9V or anything close, so the device won't work. <S> Lower voltage is unlikely to damage most devices even if they don't operate correctly. <S> Obviously the device must be able to deal with brownout for at least some small time since no power supply can go instantly from 0 to full output voltage. <A> Normally the device you are trying to charge will not "know" the charger is underrated. <S> So it will not reduce it's current (ampere) usage. <S> Under high load components in the charger will overheat and fail. <S> All chargers have protection against high loads. <S> There are two kinds of protection: <S> The charger will die permanently because some fuse or component melted safely. <S> Protection will kick in and shut down the charger (temporarily). <S> Without protection the overheating of components could cause a fire or shortcut in the charger. <S> Today there are mobile devices available which communicate (with resistance for example) with the charger. <S> When the data pins of the USB charger are shorted, the device knows it is connected to a special charger and it will draw 1A. <S> Otherwise it will just draw 500mA. <S> Several Android devices and the iPhone use this. <A> It won't damage the device. <S> But it is likely to damage the transformer or SMPS, if it does not have over-current, over-temperature or over-power protection. <S> Sometimes supplies have a thermal fuse which prevents a fire, but when it blows it's not easy to replace it (ever tried to take one of those supplies apart?)
The device will try to draw more than the little current the power supply can produce, which will either collapse its output voltage, cause the supply to go into current limit mode if it has such a thing, or perhaps cause it to actively shut down.