source
stringlengths 620
29.3k
| target
stringlengths 12
1.24k
|
|---|---|
Designing PCBs to handle Mains I have no experience creating PCBS, and I was wondering what design considerations should be made concerning having line voltage (sometimes in the single digit amps) running through one. I'm talking wire sizes, trace widths, etc. I want it to be safe after all! =) <Q> It's not about wire size and trace width. <S> Those are dictated by the current no differently than for low voltage lines. <S> The issues is insulation and spacing. <S> To be safe, leave 5mm creapage distance between anything line-connected and everything else. <S> I can hear Russell already typing in New Zealand warning you in capital letters and italics how dangerous anything connected to the line is. <S> Yeah, <S> yeah <S> , he's right <S> but I'm figuring you know not to stick your finger in a light socket and put the other hand on the kitchen faucet. <S> Besides, if you want to kill yourself that's your business. <S> That's why we keep a supply of Darwin awards around. <S> There's a lot more to this, but I gotta now. <S> Just remember, 5mm and don't touch the kitchen sink. <A> Track widths, spacing and copper thickness need to be chosen to suit the voltages and currents employed. <S> The Pulsonix PCB software I use has calculators which help with such designs. <S> Conformal coating is often used to prevent arcing caused by moisture. <S> Suitable connectors and cables also need to be selected. <A> Why should we be careful and use 5mm instead of <S> 15.75 mils(0.4 mm) <S> for 171-250V, B4 (External Conductors, with permanent polymer coating, any elevation)? <S> Also, B2 (External Conductors, uncoated, sea level to 3050m) gives 1.25mm for the same voltage rating. <S> Are these ratings wrong, or did I misunderstand them? – <S> Creepage and clearance distances are usually larger than minimum thicknesses for solid insulation. <S> Clean dry air is a good insulator <S> but there is no gaurantee that the air will be clean and dry. <S> Contaminants in the air can settle on a surface making a path along the surface that has a lower breakdown voltage than the bulk of the air. <S> We call the distance between two conductors through bulk air "clearance" and the distance along a surface "creepage". <S> You could argue that the soldermask on your PCB was a solid insulator <S> but I would be relucant to do so because it's thin and easilly damaged. <S> So treating the distance between PCB features as "creepage" (or putting slots in the board to make them clearance) is the safe option.
|
According to http://www.smps.us/pcbtracespacing.html the minimum for reinforced insulation (and I would suggest treating barriers between the mains and low voltage side as "reinforced insulation" unless you really know what you are doing) is 6.4mm. There are various standards, but if you can keep to 5mm spacing, you're pretty much covered.
|
Sensing when micro USB power cable is unplugged from a smartphone (or other device) I am looking to create a charging device that can provide 5v power to charge a smartphone (or other consumer electronics device) via micro USB. How would I go about making this charging device "aware" of when it is plugged into the smartphone or not? It would need to be able to detect a simple "unplugging" of its micro USB male end from the smartphones's micro USB female end. It would need to be able to detect the "unplugging event" regardless of whether the smartphone is charging or not (i.e., it should not be affected by whether or not it is charging). <Q> At end of charging it will decrease charge current to essentially zero but is liable to maintain a voltage monitoring presence on the line. <S> It may also maintain a resistive ID on the data lines. <S> But that is less certain. <S> It is extremely unlikely that a phone will draw NO current when connected. <S> Load will be very small when fully charged but is liable to be detectable. <S> [1]. <S> Wikipedia on common universal power supply . <S> [2]. <S> Here is USB.ORG's developers approved class specification documents download page . <S> The documents are longer than the title. <S> Much. <S> For all there is to know about the battery charging interface you could download. <S> Battery Charging v1.2 <S> Spec and Adopters Agreement (.zip <S> format, size 589 KB) <S> The old version is also there as Battery Charging v1.1 <S> Spec and Adopters Agreement (.zip <S> format, size 292 KB) <S> Also see these - with the 2nd possibly most relevant USB 3.0 Connectors and Cable Assemblies Document Rev. 1.02 Cable and Connector Class 2.0 <S> Series 'A' Plug form factor Guideline 1.0 USB Connector for Mezzanine Applications Guidelines Rev. 1.0 Micro-USB Cables and Connectors v1.01 Spec and Adopters Agreement <S> OR <S> (recommended), just try it. <S> Get a microusb cable which you have access to the conductors of. <S> Plug into a socket you can probe or cut the end off a cable or ... . <S> Plug in a phone and measure the voltages bewtween data + and - and power <S> + and -. Repeat with a few phones. <S> A pattern will emerge. <S> Tell us about it. <S> Note that as the spec has evolved so too will the phones, so what phones do now will be subtly (usually) different than a year or few ago. <S> Drwaing current somewhere is liable to be a common thread. <S> I haven't tried this with recent phones but intend to. <S> May not be soon enough for you though. <A> The USB specification requires a device to have between 1 and 10 uF of capacitance across its 5V and GND pins. <S> It requires the hub (i.e. your charger) to have at least 100 uF of capacitance across those same pins. <S> This allows the hub to detect plug/unplug events without depending on the digital protocol, so it doesn't have to be "polling" the digital pins to detect a plug or unplug event. <S> The detection is done by monitoring the current on the 5V line between the 100 uF cap and the A connector: Plugging in a device will cause an outward-going current spike as the 100 uF capacitor quickly charges the device's (<= 10 uF) capacitor, and unplugging will be seen as an (AC) <S> spike in the other direction as the current on the resistor (and hence its voltage drop) drops to 0. <S> (You could cut it down to one comparator if you use a PIO output to change the comparator's threshold as needed.) <A> What if the micro usb had a protruding momentary switch. <S> This would no be closed when unplugged that letting you know item is unplugged.
|
A USB device requiring charging will usually signal its presence either by attempting to negotiate digitally or by placing certain combinations of resistance on the data lines (depending on its sophistication). So all you need is a current-sense resistor in the 5V line, a current sense amplifier, and a couple comparator circuits.
|
Suggestions for small and handy connector for in-circuit programming? I have many PCBs that use an AVR in SMD packaging, and since I frequently change the firmware in prototype boards, I'm trying to come with the best solution to program the AVR quickly and easily. The first approach was to have a standard header (2x5 pins, .1") on the board, but since these are bulky (for the size of the boards I'm dealing with), I started to have just the contact holes without soldering the header, and bent the pins of a header with a plier so I could "snap" it in and out the board. Not an optimal solution, but it worked. The next step was to use gold fingers (i.e. one edge of the board would have some contacts exposed, like those old ISA boards, but with just a few contacts of course). The problem with it is that the board cost increases, and still uses a lot of "real estate". Any suggestion for small+cheap+clean alternatives? Ideally, without having to solder anything on the board (like with the gold fingers). I was thinking about just some small contacts on the board and maybe two aligning holes, if there's a connector that could fit there and by some way stay in place while the programming is done. BTW, although the standard connector has 10 pins, only 6 are required. <Q> Go with a set of test pads, if you're going for a production run. <S> You can easily get at them with pogo pins - you stick them into a breadboard at predefined locations, and just press your board against it. <S> I've been using this approach for Microchip's ICSP quite well - it also allows you to put the contact pads almost anywhere on the PCB - which simplifies routability for dense circuits. <S> Adafruit has a nice pack, but they can be purchased from a warehouse distributor like Digikey(US) or Farnell(EU) as well. <S> http://www.adafruit.com/products/394 <S> Added: <S> My favourite way to use pogo pins: Take 3 PCBs of your target device. <S> PCB <S> #1 is your target PCB - it will be programmed, and you should populate it fully. <S> PCB #2 is the guide PCB - drill holes (large enough for pogo pins' head) through all the test pads - it's easier since you see the location. <S> If necessary (such as no mounting holes to begin with), drill holes for spacers too - you're sacrificing this PCB, if you are concerned with the cost at small volume, copy the design over to a blank plastic board, and use it instead. <S> PCB #3 is the connected PCB - again, drill holes through all the test pads, this time large enough to fit the tail of the pogo pin. <S> Drill holes for spacers - this is also a sacrificial PCB. <S> Solder <S> the pogo pins to PCB#3, at such depth that the heads stick out 5mm above PCB#2, with the spacers you have. <S> Apply eletrical tape or insulating lacquer on PCB2. <S> Screw the spacers in, screw the PCB#2 above. <S> This should look like there are just heads of pogo pins sticking out. <S> Press the target PCB#1 aligning it with PCB#2. <S> Profit :) <A> Take a look at www.tag-connect.com . <S> They supply programming cables that mate to a small board pad layout. <S> Include the layout on your board and your all set. <A> The answer given by @qdot is a good one. <S> I just thought I'd mention that I've seen someone implement an alternative design for a programming header. <S> He used fat pogo pins that seemed to have a slight taper to them. <S> The board under test had large plated through-holes/vias that made a conforming contact with the pogo pins to make the electrical connection. <S> That is, a pogo pin could be inserted into the plated hole and it would provide a sufficient but not over tight fit. <S> Several pogo pins were soldered into a PCB such that that they would align with the vias on the test board and connect with it. <S> In this way he made his own pogo pin connector to mate with the test board. <S> I beleive he made this work with plated through holes where you would put a standard 0.1" pitch ISCP header. <S> Instead of soldering in the header, he just mated his pogo-pin connector with it and could program the micro through it. <S> It seemed really convenient to me. <S> I tried to find a picture of this but it seems to be a relatively unique approach to this problem. <S> The pins looked something like in this picture, but, they had a taper on the springy pin part that made it <S> so they made a tight fit with the through hole on the test PCB: <S> http://search.digikey.com/ca/en/products/0906-4-15-20-75-14-11-0/ED8184-ND/1147052 <S> This is as close as I can find a picture illustrating this idea: <S> https://www.mill-max.com/new_products/detail/22 <S> I thought this was interesting because in this arrangement the pogo pins held the test board in place in addition to providing the electrical connection. <S> With the method I suggest you don't have to make a test fixture. <A> While looking for a solution to the same problem, I came across the Pogo-Key , an open source board for creating a pogo-pin based programming key. <A> See http://daniel-spilker.com/blog/2011/04/25/isptouch-for-avr-microcontrollers/ for details. <S> I also created an Eagle library since the adapter requires a custom footprint. <A> For tight boards, I use a set of pads sized for a 1.27mm pitch pin-header strip, with holes just big enough for the pins. <S> For handheld connection, use fairly long pins (8-10mm), and you just insert the pins, and hold them with pressure applied parallel to the PCB, so the springiness of each pin provides a good contact against the sides of the plated holes. <A> Go with fingers without the gold plating. <S> Why do you need the high reliability of gold fingers when the board connector will be handled in real time? <S> Use a board edge connector to make the contact. <A> You do not actually need 6 pins for ISP, especially if you can re-use the board's power connections. <S> In addition to the ground reference, you need reset, clock, and two directions of data, for a total of 4 or 5. <S> At that point, you can use a single row header, un-soldered, and hold the header pins at an angle to the board to insure contact. <S> The advantage of this over pogo pins is that header pins are more durable, cheaper to replace (use a socket on your cable and a replaceable loose strip of pins in between), and available in higher pitch density. <S> Pogo pins do make sense when you have a lot of connections to pick up, need to clamp the connection for operations lasting beyond a few seconds, or when they are scattered around the board rather than in a conveniently short row. <S> But they require you to design something of a fixture.
|
If you use pogo pins that press against pads, you also have to find a way to constrain the board so that the only degree of freedom is in the pogo pin actuation direction and you must provide continuously light pressure. That is you have to make a test fixture. I build a small adapter PCB using the Staggered SOLO Stacker from AVX for programming AVRs. Solder all the required cables. Similar to the Tag Connect ones mentioned earlier, that you can build yourself, but without the registration pins or legs that clip it in to your board.
|
Why are audio transformers required? I was looking at simple AM radio schematics and came across this one: As you can see it has an audio transformer. I'm still attempting to grasp the concept of impedance and such, so can someone explain why this is necessary? And how would such a transformer even work to change the impedance? What would be the difference if you didn't use an audio transformer? <Q> This is a bit of a tricky circuit. <S> Normally, a transformer produces a voltage ratio matching its turns ratio, a current ratio that is the inverse of its turns ratio, and therefore an impedance ratio that is the square of its turns ratio. <S> Now in this circuit, we have a mystery box which is most likely a square wave clock oscillator. <S> By appearance, the transformer secondary is being used to couple the audio as an A/C "ripple" on top of it's power supply, in the hopes that this will produce some AM modulation of the output. <S> It's not entirely clear that the transformer is being correctly applied; without knowing the output impedance of what the jack is plugged into or the beyond-data-sheet properties of the oscillator, we can really only speculate if the transfer is best the way shown, turned around the other way, substituted with a 1:1, etc. <S> Likely this is a "pragmatic" circuit as much as a "calculated optimal" one. <S> It's possible that the use of a transformer at all may be primarily to provide isolation between the circuits. <S> Powering through a small series resistor with a capacitor to couple in the audio could be another option, though perhaps less efficient. <S> There are two additional problems which merit some thought before building this: 1) <S> The oscillator probably isn't rated for a 9v supply. <S> Most want 5v, or 3.3 or perhaps today something even lower. <S> It's not clear that the DC resistance of the secondary will drop the supply voltage enough under this small load to be within the limits. <S> 2) <S> The oscillator is going to output a square wave, which is rich in harmonics. <S> Without a low pass filter to round the square wave to a perfect sine wave, this will not only transmit at 1 MHz as intended, but also at 3, 5, 7, 9, 11, etc MHz, potentially up into places where such spurious emission produces harmful interference (for example, 7 MHz + the audio frequency would land in the morse code allocation of the 40m ham band, where trying to receive extremely weak signals is common and interference detested) . <S> Needless to say, there are regulation about spectral purity for various transmitter power levels. <A> From the very limited schematic you show, it looks like the transformer is being used to add the audio signal to the 9V supply. <S> There are other ways that could have been done, but a transformer is one way. <S> It also looks like they wanted to low impedance signal from a much higher impedance "line level" signal. <S> However, it is wrong to infer that audio transformers are always required just because this circuit used one. <S> In some cases audio transformers are used to get immunity from common mode noise, but there are other ways to couple audio signals too. <S> As should be expected, there are various tradeoffs. <A> If you try to interpret the circuit as a very simple AM transmitter, then the transformer is acting as a 'modulation transformer'. <S> Essentially, without it, the supply to the oscillator is steady DC, so the amplitude of the RF out of the oscillator is constant. <S> Now push an audio signal into that transformer, and the supply that the oscillator sees goes up and down with the audio, and so the amplitude of the output goes up and down as well. <S> Instant AM modulation. <S> Fwiw, transformers change impedance because they change voltage and current ratios. <S> If the secondary has higher voltage than the primary, then it will also have lower current, and the ratio of voltage to current in the secondary (i.e., the impedance) will be higher than the equivalent ratio in the primary. <S> In a transformer with a 1:1 turns ratio, the voltages and currents are all the same, so in that situation, impedance isn't changed at all. <S> So as far as that goes, in this circuit, I don't believe it matters a whole lot about impedance matching, as all the transformer is doing <S> is allowing the audio signal to be imposed on the power input to the oscillator, while isolating the audio source from the battery voltage. <S> I would bet the circuit isn't too picky about the particular turns ratio. <S> As a matter of fact, the percentage modulation would depend on the turns ratio, so you might experiment with different transformers if the signal seems weak. <A> (3-12 V) <S> But audio output of any non-amplified sound player is nearly 1 volt. <S> You can't run a oscillator with 1 volt. <S> Audio transformers are power supplies of AM radio transmitters. <S> If you can't find a transformer you can use an amplifier, too. <S> I tried to connect a PC fan to an amplified sound source. <S> Those fans need at least 5 volts to work. <S> And my fan worked! <A> By running the Vss supply through the secondary coil of a transformer whose primary coil is connected to an audio input source such as a microphone, the actual voltage supplied to the oscillator will fluctuate based on the variations in the input signal. <S> Because crystal oscillators are very stable, these voltage variations won’t affect the frequency generated by the oscillator, but they will affect the voltage of the oscillator output. <S> Thus, the audio input signal will be reflected as voltage changes in the oscillator’s output signal.
|
You need a transformer because oscillators use audio jack's power and they need at least 3 volts to work.
|
Can I wire the two sides of a L293D Dual H-Bridge together if I only need one H-Bridge? Background: I'm using an L293D dual H-Bridge to drive a DC motor, but only one motor, and the package contains two complete H-Bridges. This is all being soldered onto Veroboard (stripboard). Question: Is it possible to use the two sides of the chip sort of "dual wired" in parallel? Arguably to supply more current (not strictly necessary) but really so I don't have to cut as many strips on the stripboard. Here's my reasoning...Apart from Vin and 'enable', the two sides of the chip are mirror images, in other words, it seems to me that I could leave the stripboard intact across the chip for The inputs, outputs and ground pins. I would use output 1 and 4 together for one terminal of my motor, and Output 2 and 3 for the other. I'd then also have Input 1 joined to 4 and Input 2 joined to 3. (The input signals are coming from a Netduino) I was already planning on having all the GND connected, as they're also used by the chip for heat sinking. Here's a badly drawn pinout of the chip. Edit: Datasheet here: http://oomlout.com/L293/IC-L293D-DATA.pdf 2nd Edit: Having read the datasheet in reference to Olin's answer I Can't find any reference to whether they use FETs or not, (in fact the word "transistor" only appears once in reference to a possible load). I have found reference to people stacking or Piggybacking these chips on top of one another (to provide more current). If that's possible then I'm guessing wiring across should work. I will give it a try and report back. <Q> I made a few stepper drivers based on L293D with parallel outputs and had no problems. <S> As this application note from ST Microelectronics ( APPLICATIONS OF MONOLITHIC BRIDGE DRIVERS ) <S> states: <S> Higher output currents can be obtained by paralleling the outputs of both bridges. <S> For example, the outputs of an L298N can be connected in parallel to make a single 3.5 A bridge. <S> To ensure that the current is fairly divided between the bridges they must be connected as shown in figure 2. <S> In other words, channel one should be paralleled with channel four and channel two paralleled with channel three. <S> Apart from this rule the connection is very straightforward - the inputs, enables, outputs and emitters are simply connected together. <S> The outputs of an L293 or L293E can also be paralleled - in this case too, channel 1 must be paralleled with channel 4 and channel 2 with channel 3. <S> But you should be aware that the total current capability of the parallel outputs would be less than the sum of the two channels (< 1200 mA). <S> EDIT: <S> The only differences between the L293/L293E and the L293D are that: the L239D has internal clamp diodes included <S> the L293/L293E has higher output current capabilities. <A> You'd have to look in the datasheet and see how exactly the H bridges are implemented. <S> If they are implemented with FETs, then they should be able to load share reasonably well. <S> The other thing to watch out for is the exact break before make behaviour. <S> Check the absolute timing, not just the relative timing within one H bridge. <S> Chances are that's fine though. <S> If you don't plan to exceed the current rating of one H bridge, then even load sharing is not a issue. <S> So the answer is most likely it's OK, but of course without checking the datasheet this is just a guess. <A> If you look at the datasheet on p. 3, some of the specs are V CE(sat) -- the C and E stand for collector and emitter of PNP/NPN (bipolar) transistors, which don't current share directly : if two NPN or PNP transistors are hooked up with all 3 terminals in parallel, when one gets hotter than the other, its V CE decreases, causing it to shoulder more of the current, which causes it to heat up more, and you get a positive feedback effect. <S> However, the internal circuit may have been designed to allow paralleling H-bridges -- but it doesn't seem to say anything about this though.
|
Yes , you can definitely parallel the two outputs of an L293D.
|
Maximum attainable delay with Micro controller I am designing a microcontroller based delay circuit to implement delays of 2 hours, 1 hour, 45 minutes, and 30 minutes. The circuit will automatically turn on off a relay after this time period has elapsed. I am stuck with a narrow selection of microcontrollers available locally in market: 89C51 89C52 89S51 89S52 89C2051 PIC 16C71 PIC 16F84 I have checked the datasheets of these microcontrollers but there is no information about the maximum delay they can produce. What is the maximum delay that can be produced with these microcontrollers? <Q> It is not specified because any normal micro-controller can by means of software create an essentially unlimited delay - ie, of a far longer time than there's any reason to expect the circuit to still be operational or anyone to care about the result. <S> Each byte of available register or ram storage for the count value would increase your available delay by a factor of 256. <S> With as little as 64 bytes of RAM (most micros have several times that), you'd be able to create delays where the age of the earth pales by comparison. <A> The delay can be as long as you want. <S> If a timer won't give you the delay you need, simply increment a register, or several registers, each time it overflows. <S> Here is a simple program using Timer0 that illustrates the technique: <S> #include <S> "P16F88.INC"#define LED 0 errorlevel -302 ;suppress "not in bank 0" <S> message#define <S> RB0 0#define INIT_COUNT 0 <S> ;gives (255 - 199) * <S> 17.36 = 972 us between interrupts cblock <S> 0x20 <S> tick_counter temp endc ;reset vector org 0 nop goto main ;interrupt vector org 4 banksel INTCON bcf INTCON,TMR0IF ;clear Timer0 interrupt flag movlw 0x00 ;re-initialise count movwf TMR0 decf tick_counter,f retfiemain: banksel OPTION_REG <S> movlw b'00000111' ;prescaler 1/128 movwf <S> OPTION_REG ;giving 7.3728 Mz/128 = <S> 57600 Hz (period = 17.36 us) <S> banksel TMR0 movlw 0x00 ;initialise timer count value movwf <S> TMR0 <S> bsf <S> INTCON,GIE ;enable global interrupt bsf INTCON, <S> TMR0IE <S> ;enable Timer0 interrupt banksel TRISB bcf TRISB,LED <S> ;RB0 is LED output banksel 0mainloop: <S> goto mainloop <S> bsf <S> PORTB,LED call dly <S> bcf PORTB <S> ,LED call dly <S> goto <S> mainloopdly: <S> movlw 20 movwf tick_counterdly1: movf tick_counter, <S> f skpz goto dly1 return end <A> The maximum attainable delay is based on a combination of the system clock, and available RAM. <S> Basically, you can create large variables (e.g. 32 bit ints, 64 bit ints) on an 8-bit MCU by spreading the int over multiple 8-bit ram segments. <S> It takes multiple operations to perform addition or multiplication of such numbers (as you have to iterate over the individual bytes), but speed is not exactly critical here, so this is ok. <S> So, assuming a 20 Mhz clock, how large of a variable do you need? <S> I'm making a lot of asusmptions here. <S> First, I'm assuming a clock-instruction parity. <S> Many MCUs require several clock-cycles to execute a single instruction, which would reduce the effective clock-rate. <S> Second, I;m assuming your base counter is incrementing at the same rate as the system clock. <S> This is generally only true for hardware counters. <S> Third, the numbers I am using for things (the length of a year, etc...) are rounded versions of the real numbers. <S> Lastly, this whole exercise is rather silly. <S> \$20 <S> Mhz = <S> 20\times 10^{6} = <S> 20,000,000\$ <S> Well, \$ \frac{log(20,000,000)}{log(2)} = <S> 24.2534966642115\$ <S> , so you need ~24.25 bits to delay for one second. <S> 2 Hours = <S> \$2*60 <S> *60 <S> = 7200~\$ seconds, so you need \$ <S> \frac{log(20,000,000 <S> *7,200)}{log(2)} = <S> 37.0672778554286\$ <S> , so you need 37.06 (or basically 38 bits) bits of ram to represent a 2 hour delay. <S> So.... <S> Assuming your microcontroller has at least 5 bytes of RAM, all of the listed devices will work. <S> For fun, let's look at how long a 64 bit long long <S> would last: \$2^{64} = <S> 18,446,744,073,709,551,616 \$ \$ <S> 18,446,744,073,709,551,616 / 20,000,000 <S> = <S> ~ <S> \approx922337203685.478 ~~ <S> \$ <S> Seconds \$ <S> \frac{922337203685}{60 <S> *60 <S> *24 <S> *365} = <S> ~\approx29247.120~~\$ <S> years <S> So with only 8 bytes of memory, it looks like you're good for at least the next 30 thousand years. <A> Others already explained that there's not really a limit to what you can do, and <S> Fake Name juggled a bit with large numbers to show that 5 bytes would be sufficient on any controller. <S> Such a waste! :-) <S> By carefully choosing a microcontroller you can use your timer to up to 9h delays with just 1 byte of RAM. <S> First thing to do is clock your microcontroller as slowly as possible. <S> The MSP430 can run off a 32.768kHz crystal, which is the slowest you can go if you want some accuracy. <S> (Slower clocks won't use a crystal.) <S> Next use prescalers. <S> The MSP430 can prescale the crystal frequency \$\div\$8 to create an auxiliary clock \$ACLK\$. \$ACLK\$ will then be 4096Hz. <S> You can use \$ACLK\$ to clock a 16-bit timer, but also here you have a \$\div\$8 prescaler option. <S> Using that means the 16-bit timer gets clocked at 512Hz. <S> \$\dfrac{2^{16}}{512 Hz}\$ = 128s. <S> So using a low-frequency crystal and two prescalers the timer will overflow every 128s. <S> Using an 8-bit counter to count the number of timer overflows allows you to count 256 \$\times\$ 128s = 32768s, or more than 9 hours, with just a single byte.
|
Essentially, you find some means of generating a short delay, such as having the processor execute a few instructions, or using a hardware timer, and then you use a counter to do that however many times is necessary to make up the period of time delay you desire.
|
What's the automatic equivalent of a variable resistor? I have a circuit which controls the volume on a speaker by a wheel which is attached to a variable resistor - I want to reproduce this but instead of using a manually operated variable resistor, I want to use ...something else instead - Ideally something where you can apply a voltage to change the resistance from low to high. I've done a little research but I think I'm being stumped by not knowing what I'm actually looking for. <Q> You can use a transistor to do this. <S> Although less common that the other types, a JFET works much like a voltage controlled variable resistance. <S> You'd have to apply an analog voltage to the gate to get a specific resistance. <S> You'd have to be careful about the range of this voltage. <S> The Drain and Source would act as the effective two terminal resistor. <S> Even a mosfet has a linear resistive region so this is not your only option. <S> There are many other options as well which I'm sure will be mentioned. <A> There are a few ways to do this, each with their own issues. <S> There are such things as "digital potentiometers". <S> These act like pots with a large number of fixed set points, and the particular set point to use is controlled by sending digital commands, like over SPI or IIC. <S> These are fairly common and available. <S> Why do you think you want to control the volume from a voltage instead of from a microcontroller? <S> Where will the desired volume information ultimately originate from? <S> One issue with digital pots is that they are linear, and volume controls need to be logarithmic to get apparent constant volume change. <S> This can be emulated by using a pot with a large number of taps and converting to log digitally. <S> In that case you would have a micro with a A/D <S> receive the desired volume voltage signal, convert that to a logarithmic scale, then send the resulting value to a digi-pot. <S> A long time ago before microcontrollers were accessible, I did a voltage controlled volume once by having the voltage control two LEDs oppositely. <S> Each LED was optically connected to a CdS photoresistor. <S> The two photoresistors were used as a light-variable voltage divider. <S> Of course the result is quite non-linear in rather unpredictable ways. <S> I was using it in a feedback loop to adjust the signal size of a oscillator, which otherwise inherently depended on frequency. <S> With the feedback, it became largely independent of frequency. <S> This was the same purpose Bill Hewlett used a light bulb for in his famous oscillator design. <A> There are a number of approaches. <S> Note that many digital pots have fairly high wiper resistance, and fairly crummy resistance tolerance, but pretty good resistance matching; they are often used in cases where they are driven by low-impedance sources, and they are used to feed high-impedance inputs, so the exact resistance characteristics don't matter. <S> A scaling DAC behaves something like a digital pot which has one end tied to physical or virtual ground. <S> The fact that one end is "tied to ground" may simplify the circuitry compared to a digital pot. <S> Use an analog-to-digital converter to convert all incoming signals to digital form, then process them digitally (doing things like scaling them up and down by multiplying the numbers), and then output them all using a digital-to-analog converter. <S> If the signal originates in digital form (as with a CD player), do processing including the volume adjustment digitally, as in #3 above, but skip the ADC since the signal starts in the digital domain anyhow. <S> All four approaches are used in various devices. <S> Which is best for your application may depend upon many factors. <S> Addendum <S> Another approach which may sometimes be useful is to filter the signal to be output to ensure it has no components above a certain frequency <S> , pulse-width modulate it at a frequency at least twice as high as the highest frequency passed by the filter, and then filter it again to remove the PWM artifacts. <S> The requirement for double filtering may limit the audio fidelity that may be achieved via this method, but it can be pretty simple to implement crudely. <A> If the frequencies you'll be using are relatively low, you can use an operational transconductance amplifier like the LM13700 as a current controlled resistor - see the applications section of the datasheet . <S> It's then straightforward to build a linear voltage controlled current source, and the combination will give you your voltage controlled resistor. <S> It's also possible to construct current sources that are exponential in their response to applied voltages, which can be useful if the application is going to be for an audio volume control.
|
Use a scaling digital-to-analog converter which can accept the analog signal as its reference. The three workable approaches would be: Use a device called a "digital pot"; these behave electrically much like real pots, provided that all three terminals remain between the voltage rails.
|
Calculate the value of an inductor using an RL or LC circuit Given an inductor of an unknown (though magnitude-estimatable) value, and a resistor of precisely known resistance, how can one calculate the inductance of the inductor? Tools I have at my disposal: Oscilloscope (both digital and analogue) Signal generator (can make any waveform up to around 20KHz) DMM Some things I have noticed during my experimentations: If I apply a sine wave I see a phase shift. If I vary the frequency I see different levels of attenuation. If I apply a square wave I see sharp peaks at the rising edge and sharp troughs at the falling edge. Ultimately I'd like something I can sample in some way with a microcontroller - be that with analogue inputs, the use of timers / input capture / output compare, etc, or whatever other means, to then calculate the inductance in use. I know how to do phase measurement of digital signals, but can this be adapted to measuring the phase of a sine wave? Alternatively, could I use an LC circuit and use the resonant frequency of that combination in some way? <Q> We've actually thought about how to do this from a microcontroller to make a cheap L/C/R meter. <S> It needs to be cheap and small because we plan to make a business card that has a useful circuit on it. <S> Anyway, the answer is probably different from doing this manually with a signal generator and scope or automatically with a microcontroller. <S> Manually, you can set up a L-R low pass filter. <S> That means input signal to one side of L, R to ground and output other side of L. By feeding in a square wave and looking at the result on a scope you can measure the exponential time constant. <S> The time constant is T = <S> L/R. <S> When L is in Henrys, R in Ohms, then T is in seconds. <S> This will be the time a step gets to 1 - 1/e of its final value, or about 63%. <S> It may be easier to measure the 1/2 decay time, which occurs in .693 time constants. <S> From that you can find the time constant, and from the equation above the inductance by knowing the resistance. <S> The automated way we will probably use is to measure the magnitude of a known AC signal fed thru the same filter. <S> Higher frequencies will be attenuated more. <S> If you feed in a square wave instead of a single pure frequency (sine wave), then you'll have to do a little more math. <S> But the inductance can be calculated if you know exactly what you stuck in, the value of the resistance, and the magnitude of the outcoming AC signal. <A> One option would be to form a series RL circuit and apply a sinusoidal voltage, \$v_i\$, of a given frequency, \$f\$. Then measure the phase difference between the input and output voltage. <S> From the voltage divider equation \$\frac{v_{o}}{v_{i}}=\frac{j\omega L}{R+j\omega L}\$ the phase difference is equal to \$90^{\circ}-\arctan(\frac{\omega <S> L}{R})\$. <S> Thus you can solve for L. <S> You can make this even simpler by varying the resistance and/or frequency of the sinusoidal source until the phase shift between input and output voltages is exactly \$45^{\circ}\$. <S> At this point, the reactance of the inductor is equal to the resistance and the inductance is given by \$L = R/(2\pi f)\$. <A> I think you're going to have to end up using a few more analog components. <S> One thing you could do with the inductor is use <S> it use it like the dual of a capacitor. <S> How do you measure the size of a capacitor? <S> You can easily do the same thing with an RL circuit and measuring the rise time of the current flowing through the inductor. <S> Note that you have to measure the current flowing through it, not the voltage. <S> Now, you can get more complicated and measure the complex impedance of an RL circuit as well, but that will require a good sinewave source and two ADCs looking at the voltage and the current, plus some DSP to calculate the impedance. <S> It can be done, but it will probaly be more complex. <A> This seems to work out for me. <S> Process: Calculating L in RL Circuit <S> Determine peak circuit current from known resistor. <S> Determine Overall circuit Impedance from supply voltage and circuit current <S> Determine Inductor Reactance 'XL' using Pythagoras <S> Given 'XL', Determine 'L' from XL = 2.Pi.f. <S> L <S> Given: <S> Vs = Peak V from Signal supply <S> Vr = <S> Peak V across Resistor <S> Zt = Total Impedance <S> Zl <S> = Impedance of Inductor <S> Xl = <S> Reactance of Inductor R = <S> Resistance of Resistor <S> I <S> = circuit current. <S> Then: I = <S> Vr / R <S> Zt = Zl + Zr, also given by: Zt = <S> Vs <S> / <S> I = <S> Vs. <S> R/Vr <S> Xl = Sqrt(Zt^2 - R^2) <S> L = <S> Xl / 2.Pi.f (using XL=2.Pi.f. <S> L) <S> = Sqrt(Zt^2 - R^2 <S> ) / 2.Pi.f <S> Therefore (putting it all together): <S> L = Sqrt([Vs. <S> R/ <S> Vr]^2 - R^2 <S> ) / 2.Pi.f <S> Example: <S> 2.5mH coil in series with 1K Resistor, 20KHz sinewave, 5V supply. <S> Measure with oscilloscope Vr (peak voltage across R) <S> Vr <S> = 4.77V (measured with Oscilloscope)L = <S> Sqrt([5 <S> *1K/4.77]^2 - 1K^2) <S> / <S> 2.Pi.20 <S> K = <S> 2.5mH <S> See this link for: Simulation of example <S> Maybe someone else can improve the textual layout here. <S> Let me know if I missed something.
|
Apply a voltage step function of well known amplitude to an RC circuit and measure the rise time.
|
How to supply a negative voltage from a simple battery or psu? I am using an op amp (741). I need to supply its pin 4 with -5 volts using a power supply unit from a computer or from a simple battery. How am I going to do that? <Q> The best thing to do with an LM741 in most cases is to replace it with a more modern single supply opamp. <S> An LM358 dual or LM324 quad is about as good, usually cheap and available. <S> This page from a project by some one at the CIT in CEBU suggests 100 PHP each which is far too dear. <S> Digikey has them for about 20 PHP in 1's prices here and about 13 PHP each in 25's - and you get 4 amplifiers per package. <S> datasheet here for LM324. <S> Single supply from as little as 3V <S> (5V ir more is a lot better). <S> BUT If you want to use an LM741 you can use a negative voltage that is greater (more negative) than -5V without affecting the results in almost all cases. <S> To start, obtain a 9V transistor battery or a 4 or more cell AA alkaline battery pack or other source of 5V or more. <S> Or a mains "plugpack" power supply of 5V or more. <S> Connect the +ve terminal of the supply or battery to ground and <S> the -ve terminal will be at -V. eg <S> a 9V battery will give -9V etc. <A> First you should be asking yourself if you really need a negative voltage. <S> Most things you can do with a 741 can be done using a virtual ground - a voltage divider between Vcc and ground to give a voltage at 50% of Vcc - this is then used as the ground reference, Vcc becomes Vcc/2 and ground becomes -Vcc/2. <S> Failing that, with batteries you can just have a chain of batteries in series, and take a mid-point tap to be your ground. <S> For a more complex and high-tech solution you could use a Charge-Pump Voltage Inverter. <S> These are available in chip form, and most will give the input voltage out in negative form (so feed in +5v <S> and you get -5v out). <S> One good example is the MAX764/5/6 chips. <S> They take a minimum of external components (1 inductor, 2 capacitors and a diode) to give enough power to run an op-amp. <A> In one episode of EEVblog, Dave tells 3 options and compares them for a spesific application. <S> Here is the episode where Dave designs a negative voltage referance generator for uCurrent project <S> EEVblog <S> #72 - Let's Design a Product @ 21:27 <A> You can get -12VDC from an ATX computer power supply. <S> It is the blue wire from pin 14 of the main motherboard 20/24 pin connector. <S> Most op amps can handle -12 Volts with no problem. <A> Here's another solution like Mr. Majenko. <S> He suggested to use two same valued resistors for this purpose. <S> But if we use a transformer then rectify it and then filter to get dc. <S> If you use such process to get dc from main household ac supply, here's a problem. <S> Very often the voltage supplied by main can get down or high and hence the dc will also get down or high. <S> thus you may not get exact valued Vcc and -Vcc. <S> To avoid this problem you can use two zener diodes instead of the resistors. <S> The zener should be valued compatible to your need and voltage u supplied. <S> To understand it first check out the solution given by Manjeko atop my answer.
|
First, you should have a voltage suitable with your batteries set up, as Russell said, then, there are several ways to obtain negative voltage referance for your OP-AMP.
|
Direct Connect Solar Panels to 12v Chargers (for misc electronics) Can I safely connect 12V solar panels directly to electronics that have a 12V auto charger? The "Car charger" essentially contains the electronics necessary to regulate the voltage from the solar panel down to that required voltage for a given electronic device. And the electronic device controls the charging... my only downside is that the charging will be sporadic and might turn on and off with passing clouds. I'm thinking of doing this for cell phones, MP3 players, GPS navigation units, etc.. I don't like the solar chargers as most require the use of batteries in the "middle" that you first charge and then discharge to charge your device although they all have switches in them that need to be manually activated. Thanks! <Q> The car charger is most likely a small switched mode power supply. <S> This should be fine running from any voltage (assuming a 5v output) of say 7v up to 50v+ (check the chip to be sure of the upper limit). <S> I am currently working with the MAX5035 family of chips which run from 7.5VDC (or 15VDC for the 12V version) up to 74VDC to give 3.3V, 5V or 12V. <A> What you plan to do will probably work. <S> If the solar cells have enough light to maintain 12V, then a car charger should work well enough since it's designed to run on that. <S> The problem is what happens when the solar cells can't keep up with the power demand. <S> In that case the output voltage will collapse. <S> What exactly the car charger and the battery charger in each unit does in this case is not certain, but should not cause harm if the circuits were designed even marginally competently. <A> What you propose will work in practice in many cases but has some potential problems for some situations. <S> NimH charging relies in approximate order of use one or more of the following for end of charge detection: negative delta V delta temperature absolute temperature terminal voltage timer <S> All of these may be defeated to a greater or lesser extent in systems that have power turned on or off during the charge cycle. <S> Degree of effect depends on equipment, position in charge cycle, ambient temperature and more. <S> YMMV and probably will. <S> NimH "like" to be charged at about 1C rate to get a clear negative delta signal. <S> Lower rates tend to mask this signal as it gets smaller or vanishes. <S> Turning charging on an off around EOC is liable to make this unreliable. <S> Delta temperature MAY be useless if the device is charged intermittently. <S> Absolute temperature likewise. <S> Terminal voltage "settles down" given rest periods. <S> It will come back to "correct state" fairly rapidly but few chargers probably use it. <S> If a timer rests repeatedly it too fails. <S> So. <S> it seems likely taht a NimH charger may have "a hard time" depending in which combination of EOC techniques are used. <S> Lithium Ion will be well behaved in most cases. <S> NiCd has similar problems to NimH <S> Lead acid should be OK for main charge aspects but topping cycles and the like would get greatly messed up. <S> Targets have to be able to withstand peak voltage - easily established bt fatal in some cases if you get it wrong. <S> If load Watts of all attached devices approach panel Watts in high sun, multiple clients may oscillate / interact over seconds to munutes in low sun as appliances come on line, start charging, load drops voltage and som devices drop out rater than throttle back. <S> Many LiIon chargers want the energy source to be able to meet their current demands. <S> If the source sags under the demand they will stop completely rather than backing off. <S> eg a laptop that wants 3.5A will usually not charge at all if only 2A is available.
|
The chance of damage are low enough that it's probably worth a try.
|
Are there reasons *not* to have a copper-pour ground plane on a PCB? I am taking a first stab at designing a PCB from scratch. I am considering using a CNC mill fabrication process, and it seems like with this process I would want to remove as little copper as possible. A copper-pour-style ground plane would seem to be a good way to address this constraint. But I have noticed that relatively few PCB designs have a ground plane, and even those that do often have them only in specific areas of the board. Why is that? Are there reasons not to have a copper-pour ground plane that covers most of a PCB? In case it's relevant, the circuit I am designing is a 6-bit D/A converter plug. A first cut at my PCB layout (which does not include a ground plane) is shown below. <Q> A typical board like you have here would have 1 layer dedicated to be a ground pour only with no traces running on it. <S> However, it sounds like you are wanting to make your top layer have a ground pour so that you don't have to remove all of that extra copper. <S> Doing a ground pour on a layer with a lot of traces is not really a ground plane at all, rather you can think of it as a ground trace with varying sizes running all around your board. <S> It is hard to say if it will actually hurt the signal integrity of the design, but I can say for certain that it will not provide the same benefit that a ground plane will. <S> Typically when I see milled boards like this, the copper will be left unconnected on the unused areas of board. <S> This provides a benefit of knowing that if you accidentally short one line to the unused copper, you don't get a hard short to ground that can kill some ICs. <S> This can also be a negative though as accidentally shorting to a large unused piece of copper can turn into a nice antenna and pick up noise that you may have a hard time hunting the source of. <S> I realize my answer may not be a direct answer to what you are wanting to know, but it is very difficult to predict what configuration will be best for you. <S> But, if it were my design, I would go ahead and just leave the extra copper on the board, but leave it disconnected from everything. <A> I've had to deal with this in a poor design made by a contractor <S> and it was not fun. <A> As Kellenjb said, ground planes and ground pours are almost always a good thing. <S> So far, I've only encountered two situations to avoid putting a ground pour or a ground plane on a PCB (neither one of which apply to D/A converters): <S> RF transmitters, in particular: no ground plane near the "PCB antennas" often used for RFID. <S> a b c CCFL lamps: <S> "the ground plane should not be placed under or near the high voltage floating side" ( IRS2552D ); "ground ... planes should be relieved by at least 1/4" in the high voltage area" -- Jim Williams, LTS AN65 (I imagine this is true for other high-frequency, high-voltage systems such as other kinds of fluorescent lamps and Tesla coils) <S> A possible third case is capacitive touch sensors (CapTouch, CapSense, etc).Some people put ground planes under the sensors, others cut out the ground plane under the sensors. <S> It's not clear to me which way is better overall. <A> Ground plane needs to be cleared out for high voltages eg. <S> mains to meet the creepage and clearance rules for safety. <S> Continuous plane on one side which is not matched by a similar size area on the other side leads to the board warping because of the tension provided by the copper. <S> Unconnected bits of copper act as antennas and can increase noise in your circuit. <S> You are usually better off eliminating them if you can't connect them to ground.
|
Ground planes in general are almost always a good thing, but if used incorrectly can actually hurt the quality of your board. Air-core inductors should not be used with their flux passing through a ground plane; otherwise the ground plane acts like a parasitic transformer with a shorted turn.
|
Automatic RTS control for RS-232 to RS-485 converters I got my prototype RS-485 circuit working. Now, I've connected it to my PC through RS-232 as I want to make the PC as the master. However, when I connect to the circuit using Hyperterminal, the RTS line, connected to RE and DE, always goes high. The PC can send data to the circuit but not receive, since the RTS never goes low. Changing the handshaking from none to hardware didn't help. I later made mods to the circuit, so that, on the PIC side, the pin that drives the SN75176's RE and DE high when transmitting data will also drive the SN75176's RE and DE on the PC side low to enable receiving. This in effect turns the line from two to three. It's wrong, but I'm just doing it to see how it'll really work if the RTS pin is working properly. How do I go on making the RTS pin working correctly? I know I can just create an app using Visual Studio to connect to the line and have RTS toggled manually, but doing so is too troublesome and I'd rather have a hardware solution if possible. <Q> This man RS485 <S> to RS232 <S> converter - seems to be doing what you are doing and achieving success. <S> It sounds like Hyperterminal should be capable of proper RTS control. <A> FTDI USB to serial converters such as FT232R, FT2232R, FT2232H etc. <S> when operated in a UART mode have a direction pin which goes high while the chip is transmitting. <S> Now that's not what you probably want to hear <S> but it's probably the easiest, most reliable method. <S> As far as RS-232 to RS-485 is concerned, I remember reading about using a monostable to provide the direction signal for the RS-485 driver IC. <A> On my Orange Pi Zero I ended up controlling the RTS via GPIO... <S> I use python, so defintely not very accurate, but, for a 19200 UART - RS485 connection to my ABB inverter <S> it's accurate enough. <S> Snippet: <S> ser = serial. <S> Serial('/dev/ttyS1', 19200)gpio.output(led, 1)data = <S> "\001\002\003\004"ser.write(data)print len(data)sleep(len(data)*8.0/19200)gpio.output(led,0)sleep(0.1)ser.close() <S> Result:
|
I've implemented a USB/RS-485 converter board using a FTDI IC, and it works without problems.
|
Level Shifting 1.8V to 5V with N-channel FET I am using BeagleBoard-xM GPIO outputs to drive some DC motors with the help of L293D IC. The problem is that there is a difference between voltage levels. The GPIO outputs only supply 1.8V while L293D needs at least 4.5V for logic high. So I need a unidirectional voltage level shifting. I have BS170 N-channel FETs for this purpose. However I am not good at semiconductors. What is the proper configuration for the transistor? Do I have to use any additional components? <Q> I used following circuit successfully as logic level shifter 1.8 V -- <S> > <S> 5Vfor frequencies up to some MHz. <S> The FET I used was a BSN10A. <A> The BS170 will not work very well here as it's threshold voltage (i.e <S> when it starts to turn on) is typically 2.1V, which is higher than 1.8V. <S> So you could use a FET with a lower threshold voltage, but I'd probably just use an NPN for this. <S> Something like this should do <S> okay: <S> Be aware that the schematic above will invert the logic levels <S> e.t. *0*V@PIN <S> -> +V at the collector. <S> If you can source a better FET then you can use the above circuit but swap the NPN for the N-Channel FET. <S> In this case the base/gate resistor is not necessary, but it won't do any harm providing you don't need to switch at very high speeds (this particular solution is for lowish speeds) <S> Resistor values are not too critical, the R3 is to limit current flow into the base of the transistor, and R2 sets the current through the transistor. <S> If we assume the gain of the transistor is ~100, then if you wanted to reduce current drawn from the pin (e.g. battery powered device that needs to be power conscious) you could go a lot higher than 1k with R3 (probably up to around a maximum of 15k), as the base needs a minimum of only 5mA / 100 = 50uA to work (the 5mA comes from 5V / 1k (R2) ) <S> Here is a Maxim page that mentions a few high speed level shift ICs. <A> I'd vote for a bus switch. <S> It's like using the circuit in Curd's answer, but with small MOSFETs optimized for this purpose (low Vds breakdown, low parasitic capacitance, low gate resistance). <S> We've used Fairchild NC7SZ384 for this purpose; other manufacturers make them also.
|
If higher speed switching is needed you are probably best off with a level shift IC.
|
Converting old organ keyboard to MIDI I have a very old keyboard, a CASIO MA-100 that I want to convert to a MIDI keyboard: Being a programmer and a digital electronics enthusiast, I know how to do it, but I could use some help to save time. I guess the biggest issue is choosing a µC. Something with a USB interface* would be great, something that can also be powered by USB, even better. Then there's the issue of talking MIDI or MIDI-over-USB. I don't know how hard they would be, but I could probably do with some already written code there, too. (Unless they're very simple and don't need much testing.) I looked around some electronics project sites this morning, trying to find some open source MIDI or MIDI-over-USB controller firmware, but couldn't. I did find some Arduino projects, but a prototyping board seems a bit overkill for such a simple project. The key matrix is 10x8 (10 select in * 8 data out), simple boolean logic, no velocity data. (Though two select lines are easily expendable.) So I guess my simplest option would be a ~1 MHz µC with 8 input, 8 output pins and a serial buffer (+I/O pins) for MIDI. My best would be a project called "USB MIDI device firmware for Make SeriesXX microcontrollers." Any ideas? *: An easy USB interface, i.e. not PIC18. (Edit: This was a simple prejudice arising from the state of the organisation and documentation of the PIC USB framework a few years back. I guess it's time to break it.) <Q> If easy is what you're after then <S> I would seriously recommend the Arduino UNO and an ICSP programmer. <S> The Atmel 8U2 chip that powers the USB can be re-flashed with a firmware that emulates a MIDI device (available here ). <S> The number of IO lines can be expanded using any number of methods including simple shift registers, or SPI solutions like the Microchip 23S17 16-port IO chip, or things like 4-to-16 decoders (ideal for "scanning" matrix lines). <A> The latter I've tried myself in a few simple projects (using ATMega chips, e.g. ObDev's Metaboard and a few custom devices). <S> It is fairly simple to use V-USB if emulating USB HIDs, like mice and keyboards. <S> The former, however, I haven't tried personally yet. <S> I do have a broken synth keyboard lying around, so it'd be swell if you posted the results, independent of your final choice. :) <A> Sounds like a PIC 18F2550 is just the thing, or maybe a 18F4550 if the extra <S> I/O lines are needed. <S> I don't know why you say a PIC 18 is not easy. <S> You say you are a programmer, so I don't see what you're afraid of. <S> Perhaps nobody has done a MIDI USB interface ready for you to add the keyboard scanning code to, but certainly there are various examples of the basic USB driver out there. <S> Microchip has some code, and so do I. <S> My 18F USB firmware is available from the downloads page , and fits into our PIC development environment . <S> I've never done a MIDI device, but <S> I sortof vaguely remember there is a USB class standard for that. <S> If so, then it's really easy since you don't have to write a host driver <S> and it will work with any OS that implements that USB class. <S> All you have to do is look at the class definition, fill in the right enumeration data in the include file for that purpose, then send/receive data over the appropriate endpoints according to the standard. <S> Any other microcontroller will require something similar. <S> Again, short of finding free USB MIDI firmware out there (which you say you can't find), you need to do pretty much what I said above regardless of what flavor microcontroller you use. <S> USB is USB, so all the USB device peripherals in microcontrollers do pretty much the same thing with only a few details different. <A> If your idea of an "easy USB interface" excludes the 18F PICs, then a 'ready made' USB chip (something like an FT232RL) seems the only solution. <S> Add a microcontroller of your taste and start programming. <S> 1 MHz is peanuts for all modern microcontrollers, and USB provides 5V to run your uC (unless you want a 3V3 chip, in that case add an MCP1702 or the like).
|
There is a project called V-USB-MIDI , based on Atmel AVR ATMega16 and Objective Development's software-only USB firmware .
|
DC adapter not supplying current I'm trying to get .5 A of current from a mobile phone's DC adapter, which is within its rated specifications. I am able to detect a voltage of ~5 V DC between the power and ground wires, so it seems like the adapter's working. However, when I apply a load between the two wires, I can't detect any current flowing with my multimeter (it's set to mA, and the terminals are in the correct sockets). I've tried putting a rheostat in between (from 0-1 megaohms) the two wires, as well as a very fine nichrome (resistance) wire - no current flows in either case. Am I doing something wrong, or does the cell phone charger have some sort of safety mechanism built in that prevents it from supplying current to only the phone? thanks <Q> As others suggest, you may have done violence to your metre fuse. <S> MOST meters will blow their mA range fuse if shorted across a power supply. <S> Connect, say, 47R across 5V supply. <S> Measure the voltage. <S> If the voltage is still about 5V, the supply is just about OK. <S> I = <S> V/R <S> I = <S> 5/47 ~= <S> 106 mA. Enough for a test. <S> Power = <S> V 2 /R = 5 <S> x 5 / 47 -~~ 0.5 wATTS. <S> Use 1W Or use a smaller still resistor to get larger test currents - but 47R should be enough to check. <A> A load resistance of 10Ω should draw 0.5A of current from the supply. <S> That would dissipate 2.5W of power, so a nice big power resistor would be required. <S> When measuring the current you want to measure the current through the resistor, not the voltage across the resistor. <S> Make sure your ammeter is in series with the resistor (and connected the right way round): <S> (+)----(A)---/\/\/\---, 10Ω |(-)-------------------' <A> Forget the meter. <S> At 5V and 500mA max, a 10 Ω resistor is the smallest load resistance within the supply's rating according to what you have said. <S> That will dissipate (V^^2)/R = 25/R = 2.5W. 2.5W will be very obvious. <S> Anything short of a 6 inch long wire wound resistor will heat up easily. <S> 2.5W is enough to blow up a common 1/4W leaded resistor, or at least make it snap, crackle, and pop, and emit noxious fumes. <S> A 2W resistor will get too hot to hold in a couple of seconds. <S> You don't need exactly 10Ω for this trick. <S> That is the minimum resistance and therefore the maximum power. <S> Just 1/4W thru a 1/4W resistor will make it quite toasty, probably too hot to hold after a few seconds. <S> 100mW thru a small resistor will heat it noticeably. <S> To get 1/4W you need a 25 / (1/4) = <S> 100Ω resistor, and 250Ω will dissipate 100mW.
|
You may have blown its fuse as others have said, and it's also not clear how you were connecting it.
|
How to produce digital pulses using 555 timer IC for stepper motor? I need to run bipolar stepper motor with 555 timer IC. Is there any simple circuit to produce the pulses to rotate the stepper motor clockwise, anti-clockwise with the desired speed? If there are lots of 555 IC models please mention the type or model number also.. And I also eager to know what is inside the IC and its workings. Can I use the above circuit? <Q> There is a lot more to controlling a stepper motor than simply producing the phase pulses. <S> You have to consider accelleration, decelleration, maximum speed, and producing the proper overlapping coil phases for the direction you want to go. <S> Once you have the pulses, these still need to be amplified to drive the actual coils. <S> Controlling a stepper motor is a great job for a microcontroller. <S> This can perform all the logic described above, plus can interface with the rest of the system to be told what the stepper motor is supposed to do. <S> Since the micro will only put out digital logic signals, no different from the 555 timer, you will need power electronics to drive the coils. <S> Depending on how the coils are wired, this can be a set of low side drivers or possibly H bridges. <S> Low side drivers can be done with discrete transistors pretty easily, especially at low voltage. <A> The TE555-1 is not the analog timer chip that everyone is familiar with; it's actually a preprogrammed 8-pin MCU from Talking Electronics <S> The confusion appears to be at least somewhat intentional on the part of Colin Michell, the owner of the website. <A> You should be able to use a 555 in combination with an L297 and an L298 to drive small (floppy-drive-sized and a bit larger) stepper motors. <S> While Olin is right about acceleration in medium to high performance cases, for comparably slow speeds and light loads you can just start issuing step pulses with the 555. <S> Microcontrollor sequencer solutions do have a lot of advantages, in cost, board space, movement profiling, and flexibility however some of the IC circuits can be advantageous for their ability to modularize potentially tricky parts of the problem such as PWM (chopping) <S> current regulation - something that can be done in software, but may add a lot of complication to a learning project. <S> Topics like the pulse sequence for a stepper motor <S> , internal workings of the 555, etc are covered in numerous references which any search engine will locate. <S> The question & answers format is better for the problems that remain after doing some research.
|
There are H bridge driver chips available that take digital logic control inputs and drive the coil lines accordingly.
|
How to Calculate the time of Charging and Discharging of battery? How do I calculate the approximated time for the Charging and Discharging of the battery? Is there any equation available for the purpose? If yes, then please provide me. <Q> Discharge time is basically the Ah or mAh rating divided by the current. <S> So for a 2200mAh battery with a load that draws 300mA you have: \$\frac{2.2}{0.3 <S> } = 7.3 <S> hours\$ <S> * <S> For NiMh, for example, this would typically be 10% of the Ah rating for 10 hours. <S> Other chemistries, such as Li-Ion, will be different. <S> *2200mAh is the same as 2.2Ah. <S> 300mA is the same as 0.3A <A> Charging of battery: Example: Take 100 AH battery. <S> If the applied Current is 10 Amperes, then it would be 100Ah/10A= 10 hrs approximately. <S> It is an usual calculation. <S> Discharging: <S> Example: Battery AH <S> X Battery Volt / <S> Applied load. <S> Say, 100 AH X 12V/ <S> 100 Watts = 12 hrs (with 40% loss at the max = <S> 12 <S> x 40 /100 = <S> 4.8 hrs) <S> For sure, the backup will lasts up to 4.8 hrs. <A> Discharge rates are well enough covered here. <S> LiIon / LiPo have almost 100 current charge efficiency but energy charge efficiency depends on charge rate. <S> H= <S> Higher charge rates have lower energy efficiencies as resistive losses increase towards the end of charging. <S> Below LiIon and LiPo are interchangeable in this context. <S> The main reason to adding an answer to a 3+ year old question is to note that: LiIon / LiPo should not be charged at above manufacturers spec. <S> This is usually C/1, sometimes C/2 and <S> very occasionally 2C. Usually C/1 is safe. <S> LiIon's are charged at CC = <S> constant current <S> = <= <S> max allowed current from 'empty' until charge voltage reaches 4.2V. <S> They are then charged at CV = constant voltage = 4.2V and the current falls under battery chemistry control. <S> Charge endpoint is reached when I_charge in CV mode falls to some preset % of Imax - typically 25%. <S> Higher % termination current = longer cycle life, lower charge time and slightly less capacity for the following discharge cycle. <S> The CV stage typically takes 1.5 to 2 hours (depending on termination current% and other factors) so total charge time is <S> about 40m +1.5 hours to 50 minutes <S> +2 hours or typically 2+ to 3 hours overall. <S> But, a very useful % of total charge is reached in 1 hour. <A> Peukert's Law gives you the capacity of the battery in terms of the discharge rate. <S> Lower the discharge rate higher the capacity. <S> As the discharge rate ( Load) increases the battery capacity decereases. <S> This is to say if you dischage in low current the battery will give you more capacity or longer discharge . <S> The result is the total <S> Ah you will feed in to fully recharge. <A> In the ideal/theoretical case, the time would be t = capacity/current. <S> If the capacity is given in amp-hours and current in amps, time will be in hours (charging or discharging). <S> For example, 100 Ah battery delivering 1A, would last 100 hours. <S> Or if delivering 100A, it would last 1 hour. <S> In other words, you can have "any time" <S> as long as when you multiply it by the current, you get 100 (the battery capacity). <S> However, in the real/practical world, you have to take into consideration the heat generated in each process, the efficiency, the type of battery, the operating range, and other variables. <S> This is where "rules of thumb" come in. <S> If you want a the battery to last a "long" time and no overheating, then the charging or discharging current must be kept at not more than 1/10 of the rated capacity. <S> You also need to keep in mind that a battery is not supposed to be "fully" discharged. <S> Typically, a battery is considered "discharged" when it looses 1/3 of its capacity, therefore it only needs 1/3 of its capacity to be fully charged (range of operation). <S> With these constraints and the above values, one gets only one answer, t = 33Ah/10A = 3.3hr. <A> Rules of thumb given in other answers are often good enough but if you can find the datasheet of the battery it's best to check the relevant graph. <S> As an example here's the datasheet of a low cost 12V battery. <S> In the datasheet you'll find this graph: <S> Let's say that this is a battery with 7Ahr capacity and that you want to draw 14A. <S> You'll have to observe the 2C curve (2C means to discharge at 7Ahr*2/h=14A). <S> You'll note that this battery will drop to 9.5V-10V after about 15mins. <S> Of-course this is only true for a fresh from the shelf battery kept at 25 deg. <S> Celsius. <S> Temperature, age and usage negatively affect the performance.
|
The charge time depends on the battery chemistry and the charge current. For charging calculate the Ah discharged plus 20% of the Ah discharged if its a gel battery. When charged from "empty" at C/1 a LiIon cell achieves about 70% - 80% of full charge in 0.6 to 0.7 hours ~= 40 to 50 minutes.
|
How do i test capacitors? I've just gotten through replacing capacitors on a trio of dead LCD screens (nothing's blown up yet, so far) - they either had one or two capacitors on their inverter circuit SLIGHTLY bloated, and not quite leaky. I ended up replacing all capacitors of the same brand/'colour', even the ones that looked fine, in case. Now, checking a bad resistor is simple - i can use a standard multimeter to test it, and i tend to check my solders with the continuity testing option of the multimeter. How would i test a capacitor ? Is there some standard, common way to test one? <Q> Charge thru a resistor to the working voltage. <S> Choose a resistor so RC (where R is the resistance, C is the capacitance, and RC is the time constant) is workably large. <S> The final voltage should equal the applied voltage - IR, where I is the leakage current. <S> The rate of charge will give you C ( if I is large you will need to correct for that ) <S> This ignores the burden of the meter which is probably above 1 meg and for a supply cap probably does not matter. <A> Use a DMM with capacitance measuring. <S> If you don't have one, try charging and discharging the cap through a resistor and measuring the voltage curve. <A> Even though this is a very old question, I feel like I have something useful to add here, so I will answer it anyway. <S> This is a device similar in appearance and usage to your standard multimeter, but which measures inductance, capacitance, and resistance (hence "LCR"). <S> LCR meters measure more figures of merit as well, however; you can use one to measure the equivalent series resistance of your capacitors, which is very important for power supply filter caps, and a better indicator of a failing electrolytic capacitor than capacitance alone. <S> Some, though I don't think all, LCR meters will even tell you the equivalent series inductance of your capacitor, self-resonant frequencies, and all sorts of other useful and useless data. <S> Unfortunately, good LCR meters don't come cheap. <S> Low-end LCR meters (from reputable brands) are generally more expensive than equally low-end multimeters. <S> A quick google search shows <S> the Agilent/Keysight U1733C priced around $600, and even the cheap Extech brand one is over $200.
|
The standard, common way to test a capacitor is to use an instrument called an LCR meter.
|
Touch detection on big LED screen I have a big LED screen covered by plastic surface (removable). I want to change image on that screen when someone touches it. Could you give me advise how to do it or some sensor names for further research? <Q> One common way is to have a grid of infra-red emitters and receivers around the edge of the screen pointing at each other (say all emitters at left and top, and all receivers at right and bottom). <S> A touch to the screen interrupts the beams, and the intersection of two interrupted beams gives the location of the touch. <A> If you want it to be able to sense a touch anywhere on the screen you will need something like this : <S> At £22 this seems a bit overkill to me just to change a picture, but I'm not aware of anything else out there that would do. <S> If you can make it so the user touches somewhere just off-screen it would be easier. <S> For this you could use capacitive or resistive touch sensing and design as you like. <S> Another option that might work <S> okay if the screen is set into a casing of some sort, is to have a pressure sensor/switch underneath the screen. <S> EDIT - 2x2 metres! <S> Hmmm, I don't think you're going to find anything commercially available at that size, and if you could I wouldn't like to imagine the price... <S> You could maybe "roll your own <S> " - grab some electrostatic film and use this to make a large/transparent capacitive touch sensor. <S> Or conductive film and make a resistive touch sensor (probably easier) <S> The site at the above link has conductive coatings and fine wire meshes that may be usable also, depending on the goals of your project. <A> There is a nice Wii remote project which will allow you to track IR objects on big white boards. <S> It doesn't matter if it is a whiteboard, projected screen, or a big 2x2m LED display. <S> It requests an IR emiter source, which is solved in the project by having a button that switches on an battery powered IR led inside a custom made pen. <S> With a little mechanical design changes, you can make a pen that will automatically switch on a LED when pen is pressed on the surface. <S> That will simulate touch on a LED screen that you want, but a user will need to have a pen. <S> If that is not an option then you might consider putting a lot of horizontal direction IR emitters on left and IR receivers on right (very close to the surface). <S> When user interrupts IR beams you have a touch. <S> http://johnnylee.net/projects/wii <A> http://www.youtube.com/watch?v=MJ2v4-QvGuU <S> This assumes of course that the screen's LED driver circuitry is accessible and the firmware is available for modification.
|
Depending on how the screen is built, you might look into using the LEDs themselves as touch sensors.
|
Approaches to a few thousand individually addressable widely dispersed LEDs I'm trying to come up with the best design for a project requiring between 1000 and 5000 individually-addressable LEDs, not in a strip, grid, ribbon, pegboard, etc. configuration. There is a lot of information about LED strips and arrays, but those don't seem directly applicable to my project. What I want to do is similar to a "pick to light" system seen in warehouses, if you're familiar with that. I will have a room with many storage locations (various sizes) in it. I will have software that keeps track of what is in those locations, and when a user searches for one (either to remove or add one), the LED above the bin will light. I need to support having an arbitrary set of the LEDs on at any given time -- it's not just one at a time (though realistically I'd expect well under 1/4 would ever be on at once). The bins will range from 3 inches to several feet apart, and the room will be on the order of 15 feet square, with storage locations spread throughout. Reliability, a nice clean installation and ease of setup are more important than cost. Of course, all things being equal, lower cost is better -- it's just not the top priority. <Q> This sounds like it might be a good application for a 1-Wire® bus, using something like a DS2413 to control every LED or two, at least if those parts were a bit cheaper. <S> Otherwise, your best bet may be to attach each LED to a small microcontroller, and use a simple unidirectional communications scheme to send data to all the controllers. <S> Each microcontroller could use a small amount of flash or EEPROM to hold an address, so all devices could be individually addressed independently. <S> The biggest difficulty might be configuring the network; that might be best facilitated by having each controller include a command to output its address by modulating its light output. <S> An optical receiver attached to a portable computer could be used to visit each node, read its light pattern, and make note of its physical location. <A> If the cost of a 'standard' communication bus (Can, LIN, RS845-proprietary) and a uC at each location is no problem I would go for that. <S> You'd probably need a two-stage bus, I can't think of any bus that supports 1k nodes, but 64 x 64 should be doable. <S> For wiring I would select something that is available pre-assembled, ethernet patch cable might be a good choice. <S> A low-cost RF unit would be another option ( <S> RFM70? <S> I just finished my C/C++ library), maybe with battery power (no cables!), the master could periodically scan all units and those who do not respond or detect a low battery are singled out for replacement. <S> Or saturate the room with a broadcasted IR signal. <S> In the spring I will do a course on system architecture, this is a nice problem to illustrate the consequences of various approaches! <A> You could think of the whole room as one big 3d matrix of LEDs. <S> There is nothing to say that the LED has to be within a few inches of the chip driving it. <S> I assume you will be having, for example, a room with many racks. <S> Each rack having many shelves. <S> Each shelf having many bins. <S> You could have a controller per shelf - be that a microcontroller, or a shift register, or whatever, connected to the LEDs above each bin. <S> Those controllers/shift registers could be grouped into a per-rack controller. <S> Finally, the per-rack controllers are grouped into the master room controller. <S> The room controller picks the rack and tells it the shelf and bin. <S> The rack then tells the shelf which bin. <S> The shelf lights the LED. <S> This could scale to multiple rooms by adding another layer to group the rooms together. <S> As an afterthought, you could have a button next to each LED which the operator presses when he has picked the item, thus turning off the LED and informing the stock management system that the item has been picked.
|
Using a unidirectional scheme would facilitate the construction of very simple repeaters (simple non-inverting buffers would probably suffice).
|
Initial or undefined value of flip flop I am modeling Digital Circuits using ICs in a software. I have worked with flip flops and counters, but I don't remember it well.How do I model undefined or initial value of flip flop (SR or JK etc.)?I have three options '0' state for all uninitialized nodes assign random value '0' or '1' to the new node generate error message, & ask user to clear or preset the flip flop Also consider a JK flip flop, if the user input is '0' & '0', the output is 'Q' & 'Q bar'. What value do I assign in this case? '0' & '1'? This is the initial case, i.e the circuit has been made & the console just powered up. Please share your experience. <Q> There are generally two approaches simulators can use for something like this: <S> 1) Assign, or assist on the assignment of an initial state 2) Simulate with 3 (or more) state logic, one of which is "undefined" - and have the undefined input propagate through all dependent logic producing undefined outputs. <S> This is a quite common approach - build a state machine in Verilog, put in a statement to have the simulator print the state variable, and see that it displays " <S> x" until everything that factors into that value is defined. <S> (In the case of your Q and /Q, both would be undefined) <A> I would go with the raise an error and refuse to simulate. <S> Having a floating input is never a good idea. <A> In some types of simulation, the more states the merrier. <S> For example, if one has a circuit in which both J and K inputs are tied to the AND of the output and a RESET signal, one should apply output := <S> (J & ! <S> output) <S> | <S> (! <S> K & output) , so that the former term will cancel out, leaving output := ! <S> RESET & output , whose value would be well-defined if reset is high, even if output is undefined. <S> If you are trying to do a continuous-time simulation, many more states become necessary, including 'rising', 'falling', 'stable unknown', 'unstable unknown', etc. <S> with some complicated truth tables which depend upon the previous states of inputs as well as the current states (e.g. 'rising:high & rising: <S> high == rising', but 'rising:high & high:falling' <S> == 'unstable unknown'), since the first signal might or might not have gotten high soon enough to generate a high pulse on the output.
|
If you are doing only single-clock synchronous logic, I would suggest three states (high/low/undefined), but expand out the JK flip flop's logic so as to include the full computation of the next value.
|
SPDT switch controllable by GPIB I am looking for a fast SPDT switch that is controllable using GPIB (IEEE-488). The maximum voltage applied across the switch would be something like 10V (and in practice more than around 5V). I'm quite new to electronics and am having trouble working out how various switches are controlled, and what to look for in switch specifications. Are there some general guidelines to identify a suitable switch for a particular application, and in particular what to look for in a switch controllable by GPIB? <Q> Since you're talking about GPIB, I'll assume you are interested in test automation. <S> Key parameters to look at when evaluating a switch in a test automation application: Number of channels - GPIB-controlled switch cards are available with up to 300 switches per card, and multi-card controller mainframes are available that can contain 1000's of switches. <S> Switches are available for "low frequencies" (maybe 10 or 100 MHz) and for RF (3, 6, 18, 26, or higher GHz). <S> Current handling - if you are switching power lines carrying more than say 1 A, be sure the switch can handle the current. <S> Cycle lifetime - A mechanical switch can only be switched so many times before it wears out (typically defined by on resistance increasing above the spec level). <S> This could be on the order of 1 to 5 million cycles for good quality switches, but its still a number you could exceed within a year if you are switching multiple times for each device tested. <S> Price - if you haven't bought GPIB or RF gear before, be prepared for sticker shock. <S> Agilent and National Instruments are the top-tier vendors for this kind of equipment, and each offers many types of switch. <S> You mentioned you want a "fast" switch. <S> If you are talking about the signal frequency, you can probably find a switch capable of microwave frequencies and a (separate) GPIB interface to control it. <S> If you are talking about the switching time, I've rarely found that the switching time of the switch itself is significant compared to the time required for GPIB communication. <S> However if you are doing, say 6-1/2 digit voltage measurements on the switch output, you will need to be concerned about the settling time after switching -- in that case consider using one of the switch control units with a built in multimeter and look carefully at the settling time of the switches you choose. <S> Also, consider alternative interfaces. <S> It's very likely that if you need less than 10 low-frequency switch channels, you could find a lower cost solution using USB control instead of GPIB. <S> You might find an integrated USB-controlled switch or you might need to use a USB digital I/ <S> O device to control a simpler switch device. <A> The usual IC-level way to implement a GPIB device (non-controller) is with the TNT488 chip from National Instruments. <S> It's rather expensive and the programming manual will likely require a number of readings before an appropriate software architecture to interface with it is realized. <S> Having successfully implemented one, it's not a path I would recommend except where it is necessary to interface with a large investment in legacy systems. <S> With an embedded controller capable of running Linux, it might be possible to do something with the source of the driver intended for ISA cards with the controller-capable version of the chip, which is likely a superset of the device-only version. <S> It is also possible to build a GPIB with discrete logic, or in an FPGA, though it is a 5v bus which would require level translation to use with most modern FPGAs. <S> There are some projects on the net doing this for capturing plotter output from older but still valuable RF test equipment. <S> Several others have commented on various types of electronic switch devices for various purposes. <A> This simplest in terms of putting together a system would be a GPIB relay board. <S> I don't know if such a thing exists, but if it does it's probably made by National Instruments or possibly Agilent. <S> Next would be a general purpose digital I/O board where you use a digital output to drive a relay. <S> Again, I don't know if such a thing exists. <S> In general, GPIB is built into devices that need to be controlled, and the third party boards out there are for the control side. <S> If you're clever with microcontrollers and are willing to dig thru the GPIB spec, you should be able to make your own GPIB interface. <S> One feature of GPIB is that the three-wire handshake causes the bus to slow to the speed of the slowest device, so the micro isn't stuck having to pass data at the rate the host can. <S> Why does it need to be GPIB? <S> That's really old fashioned in today's world. <S> Parallel busses like that with big fat stiff cables are so 1980s. <S> Step back two levels and tell us what you are really trying to accomplish.
|
Frequency band - can the switch pass all the frequencies in the signal you are switching.
|
Principles of DC/DC converter w/ jumper-selectable outputs? I have an application where the load is a user-selectable component (an electric door strike) that comes in many flavors, with each flavor requiring a specific DC voltage, most commonly either 12V or 24V. I would prefer not to have separate parts for the different voltages, and so I would like to have a jumper-selectable 12V or 24V DC/DC converter on my board. I have played around with TI's WBENCH Designer and it seems like getting an efficient DC/DC converter for a single voltage is a piece of cake, but how do I go about adapting one to produce different outputs depending on the jumper configuration? My first thought was simply to use WBENCH Designer to produce two different designs based on the same TI chip and then "meld" them into a single circuit with some creative hackery. I'm reasonably confident this could be made to work, but I'm also pretty sure there would be some redundant components from going this route (particularly the large and relatively expensive inductors) and naturally I'd prefer to avoid that. Oh and obviously I'm ignoring the possibility of using a voltage divider or simple dissipating regulator because I'd prefer not to waste power, but should I be? Is there a way to use one that isn't wasteful? <Q> There's a number of ways you can go about it: <S> Use an "adjustable" buck regulator and switch the adjustment resistors for different values through jumpers. <S> Use multiple buck regulators in a "tree" formation - one which for example goes from input voltage to say 24v, then one which takes the 24v to (for example) 18v, then another which takes the 18v to say 12v - or whatever voltage combinations you want. <S> Option 1 is probably the cheapest as you only need 1 regulator - picking your feedback resistors can be tricky though if you want precise voltages. <S> Option 2 is probably the most efficient if you want multiple voltages to be available at the same time. <S> Option 3 is most commonly used for a combination of buck and linear regulators - buck it down to a lower voltage then linear it down lower still to give a good clean output. <S> Oh, and by the very nature of the linear regulators there is no way to use them that isn't wasteful. <S> They do have their place though as mentioned in option 3 (no switching ripple). <A> Across a limited voltagerange (more than the 2:1 you'd need for 24V & 12V output) almost all that is required with many IC's is to change the output divider that feeds the "ref" or similar in. <S> eg <S> if Ref requires a 1.25V input when the IC is "in regulation" then for 12V <S> you need a 12/1.25 divider = <S> 8.6:1 <S> so the resistors need to be in the ratio 7.6:1. <S> for 24V <S> you need a 24/1.25 divider <S> = <S> 19.4:1 <S> so the resistors need to be in the ratio 18.4:1. <S> The circuit below is for a venerable MC34063 <S> but the principle is much the same for many ICs. <S> Here the divider I mentioned above is formed by R2 and R1. <S> Vout = <S> 1.25V <S> x (R2/R1 + 1) <S> While a circuit may be less efficient when used across a range of output voltages rather than a single fixed one, it can be designed to be "acceptably efficient in most cases. <A> The most flexible solution is to use a suitable MCU that senses the supply voltage or a jumper setting, and generates the correct output automatically, using a similar output stage to those used by switching PS devices. <S> Microchip is one company that makes devices intended for such intelligent power supplies. <S> You still need an inductor and MOSFET, or a couple of them, and some software has to be written, but it might be cost-effective. <S> Microchip has several relevant application notes, and free design assistance is available.
|
Use multiple buck regulators to go from your input voltage to all the output voltages in one go (all running in parallel - only one of them active at a time)
|
Can an LED achieve full brightness in 40 µs? How fast can an LED achieve it's full brightness at it's rated voltage and current? I need to do multiplexing of LEDs to make a matrix display and I've calculated that each LED can only stay on for 40µs. I don't know if that is enough time for the LED light to be seen however. <Q> (1) LED on times for phosphor LEDs are in the 100'2 of nanoseond range <S> (2) Turn on times for non-phosphor LEDs are typically in 10's of nanosecond range if driven correctly. <S> Average current = <S> Peak_Current <S> x time_on <S> / <S> ( time_on <S> + time_off ) <S> Peak current is assumed to be "steady". <S> (3) Brightness when mutiplexed = <S> B_DC <S> x time_on <S> / <S> ( time_on <S> + time_off ) <S> x k <S> Where B_DC is the brightness when the LED is operated at this PEAK current when DC is used and k = <S> a factor relating to loss of efficiency with current, change of efficincy with die temperature etc. <S> Initially k=1 is close enough. <S> or Brightness using average current = <S> = B_100 <S> % <S> x <S> k at average current (4) Modern phosphor LEDs have an allowable peak current 20% to 100% higher than the rated DC current. <S> ie you cannot usefully multiplex modern phosphor LEDs directly. <S> (5) <S> SOME modern LEDs MAY allow higher peak/rated current ratios <S> but you should check the data sheet in EVERY case. <S> (6) <S> There is a way to multiplex LEDs to allow high peak multiplex currents when the actual LEDS have low allowable peak/rated current ratios. <S> It takes more circuitry and/or design effort. <S> Few people do this AFAIK <S> There are various possible implementations but the basic method is to multiplex power (LED drive) to an energy store and then drive the LED from the energy store in such a way that LED current is about constant. <S> An "energy store" can be a capacitor or an inductor, plus supporting circuitry. <S> (a) Multiplex into capacitor across LED directly. <S> Input desired average current. <S> LED will stabilise at appropriate voltage for the average current. <S> Energy is lost in the driver due to unavoidable I^R loss. <S> Capacitor must be large enough to prevent LED current rising above rated value during recharge pulses. <S> The capacitor increases the turn off time to at least a few multiplex cycle periods and probably 5 to 10 multiplex cycle periods, and maybe much longer at very high multiplex ratios. <S> Turn on time is under the control of the designed but will also usually be slowed to several mutiplex cycle times. <S> (b) Multiplex into eg inductor in series with LED to ground. <S> Reverse diode from input to ground. <S> This is effectively a buck converter. <A> It does not matter only how long you switch LED on but what is the duty cycle ie. <S> how long it is switched on compared on how long it is switched off. <S> Exact LED response time depends on LED type (color) but these are usually in tens or hundreds of nanoseconds. <S> Your 40µs is more than enough to fully lit it but the average visible light depends on how long it is switched off after that. <A> The LED risetime is insignificant compared to delays in drivers and effects of inductance (either actual risetime or the need to actively limit risetime to avoid ringing) on long wires/traces in larger arrays. <A> The visibility will be a function of what percentage of the time is the led lit. <S> If I understand correctly, the LED will light essentially instantaneously as current is supplied, so the time to light it is the rising edge time of whatever you are using to drive it. <S> As you get around 100Hz or so per led it looks pretty much solid. <S> Some people will say that more or less is necessary, so try it for yourself. <A> Yes. <S> Most LED's can achieve full brightness in less than 40 uS. <A> Bare LEDs will reach the brightness for its current much faster than 40 µs. <S> Even LEDs that re-emit light thru phosphors can handle that, like white LEDs. <S> Bare LEDs can be eaily used for digital communcation exceeding a MHz (much more in some cases), so this is not pushing it. <S> However, you have a different problem. <S> Let's say the LED is rated for 20mA, and that's the effective brightness you want it to have. <S> You can pulse the LED on for 40 µs at 40 mA and then off for 40 µs to get close to the same brightness, but you can't keep using more current and shorter time. <S> Each LED will also have a maximum instantaneous current spec, not just a average current spec. <S> For some IR LEDs that are generally meant to be pulsed as part of a digital communication scheme, <S> the steady to maximum current ratio can be as high as 10. <S> For most ordinary LEDs its less than that. <S> For high power lighting LEDs its only a little above 1. <S> Let's say that your LED has a maximum to average current ratio of 10. <S> That means you need to figure out a multiplexing scheme so that the LED is on for at least 1/10 the time else you won't be able to run it at full brightness. <S> In fact, the brightness as a function of current falls off a bit at high currents, so if you're pushing the limits pulsing will always be a little less than steady at the maximum current.
|
As far as brightness and visibility go, it really depends on how many 40µs bursts each led is getting in a second.
|
How to connect 2mm surface mount component to 2.54mm breadboard I have an RF link module with surface mount connectors 2mm apart. This is the datasheet . How would I connect this to a breadboard with 2.54mm spacing? <Q> That said, think about what you're connecting: <S> An RF module! <S> The datasheet reads: <S> It needs only an MCU, crystal, decoupling capacitor and antenna to build a high reliability FSK transmitter. <S> The MCU will communicate over SPI with the module, and there are also interrupt, valid data, and reset pins. <S> Those are reasonably low-speed, strongly-driven logic pins, and are probably fine on a breadboard. <S> However, you still need to provide the module with some heavier decoupling than the 0402 caps on the module (which are probably only 10 or 47 nF), and with an ANTENNA. <S> I'd suggest a breakout board (toner transfer or professional, you decide) with a low-impedance 0.1 uF ceramic cap as well as a larger 10, 22, or 47 uF tantalum or ceramic tank capacitor as near the module as you can get it. <S> Running the single Positive Power Supply pin through a breakout board or wire, into a header pin, down to the breadboard (shudder), to some through-hole electrolytic, and thence through more breadboard connections and a long wire into a lab power supply simply won't give this module the clean power it needs. <S> Put decoupling on the breakout board, and you'll be much better off. <S> Probably most importantly, you need an antenna. <S> Don't even think about trying to connect the antenna through the breadboard, that's just silly. <S> Put an SMA connector, chip antenna, or PCB antenna on your breakout board. <S> Finally, break out the module pins that are going to the breadboard (you'll need 9 to connect all the pins, or a minimum of 5) to a 0.1" header. <S> You can either use through-hole headers in a DIP format (which will provide some necessary sturdiness if you use an SMA antenna) or solder the header to the edge (which will place a PCB strip antenna vertically, which is probably a good thing). <A> I'd considering making a toner-transfer PC board with pads for a single row of 2.54mm headers overhanging one edge, which I would solder to the surface of the board (ie, surface mount a straight header as a substitute for a through hole right angle one). <S> This has so few non-ground connections and is an RF device <S> so another good option could be to just perch it atop a piece of unetched PCB stock and proceed as in "dead bug" construction where IC's are placed <S> upside down and discrete wires soldered to the required connections. <S> High value resistors can be used as standoffs, and you can put supply decoupling capacitors right at the pins. <S> You could either place the resulting construction beside the breadboard and connect it with wires, or you could do the single row header idea <S> - you can isolate a few pads at one end for your SPI signals by careful use of a hacksaw or razor saw to cut through the copper on the PCB stock. <S> With some trickery <S> (pins underneath?) <S> Professional produced this would be stronger, but it would be more work to make such a PCB by hand. <A> I have soldered pins to a very similar RFM12 and bent them to get the 2.54mm spacing. <S> In your case you only need to connect four pins on each side to the breadboard, so this is easily possible. <A> You can use 2mm pins to connect the device to 2.54mm breadboard , not all pins are in total of 16 pins 3 are out <S> but they not needed for my purpose(link to product in comment) :
|
I'd probably make the connections up to the module by soldering bent wires to the surface of the PCB rather than drilling holes, but that's just me. you might be able to just get a double inline module on a breadboard. You'd need to build a board which breaks out these pins to 0.1" pitch headers.
|
Cost effective way to convert 12v DC to 7.6v DC @2A I'm working on a hobby project that involves continuously powering a 5 watt handheld radio for long periods of time off a 12v automotive electrical system (in reality the input will be more like 13-14v). The battery that comes with the radio is 7.6v and the radio draws ~2 amps during transmission. The radio is designed to be charged while the battery is attached, however the final solution does not need to include the battery at all. I plan to connect the output of whatever circuitry I build/buy directly to the contacts on the radio where the battery would normally interface. What would be the best way to build a voltage regulator for this application relatively cheaply? I'm not against buying something off the shelf, but I've found very little that is rated above 1000 ma. EDIT: The original body of this question said the radio drew 7.6 amps. This was a typo, the peak current draw is ~2 amps. Sorry for the confusion. <Q> At your power levels (60W), you really want to be looking at a switcher. <S> Maybe you can find a off the shelf Dc-DC converter for your voltages and power, but probably not. <S> That leaves making one yourself. <S> Since this is a one-off a few extra dollars for the chip doesn't matter. <S> Linear Technology, National (now part of TI), and TI have a decent assortment of buck regulator chips. <S> For simplicity, go to the Linear Tech site and look around. <S> At 8A, you will need a chip that drives a external switch as apposed to one with the switch built in, but there are plenty of those. <S> If I remember right, Linear also has a decent set of app notes. <A> If you want a polished solution, as Olin says, you are likely going to have to roll your own switching DC/DC converter circuit. <S> If you go this route be sure to check out TI's WBENCH designer... <S> You basically put in your power requirements (input voltage range, desired output voltage and amperage, etc.) <S> and the tool will offer you a list of options using TI's regulator chips. <S> You get a schematic and a BOM! <S> It's damn sweet. <S> The downside is the BOM will assume you want surface-mount chips. <S> If you're like most hobbyists, that's an added challenge. :-) <S> This is a horrible idea for a finished project, as you will be lucky to get a fraction of the battery life a switching converter would offer... <S> But it would let you get the meat of your project done more quickly. <A> Yoo hoo! <S> * <S> * Buy this <S> ** and configure it. <S> It does exactly what you want. <S> Hello ? <S> Hmmm. <S> Nobody listening. <S> Must be Christmas-New Year break. <S> Ah well. <S> Walks wasy... <S> NOTE: <S> The device below is a compleat solution - not just an IC. <S> That said - as the IC uses synchronous rectification and internal switches, the only external components are the inductor and glue <S> RC's. <S> User has to supply 3 x R and 4 x C. <S> TI <S> LMZ14203 3A out buck converter module. <S> SIMPLE SWITCHER® <S> Power Modules <S> [Not separate ICs but the whole works] Complete buck regulator waiting for you to set the voltages. <S> SIMPLE SWITCHER® <S> DC/DC ConvertersAward-winning SIMPLE SWITCHER DC/DC converters deliver robust power supplies with the minimum set of external components. <S> All SIMPLE SWITCHER products work with the enhanced WEBENCH Power Designer end-to-end design and prototyping tools. <S> This looks about right LMZ14201H/02H/03H 1/2/3A out. <S> Vin 6V - 42V.Vout 5V <S> upNo derating u <S> to 60C ambient <S> I'd guestimate 90%+ efficiency at 2A out and 85%+ at 3A out based on datasheet. <S> Datasheet are application note quality. <S> LMZ14203H datasheet <S> LMZ14203 <S> datasheet H has higher Vout max. <S> Design page for the 3A out version <S> $19.55/1 from Digikey, in stock <S> - Dear - BUT <S> it is the complete unit, barring some "glue" parts. <S> "News release" - NatSemi power modules http://www.national.com/pf/LM/LMZ14203H.html#Overview 1/2/3 6 to 42 5 to 30 97 -40 to 125 EN, SS — TO-PMOD-
|
If you really just want to get something working before you undertake this level of challenge, you could consider using an off-the-shelf inverter to get AC power and then use an off-the-shelf brick to get your required DC voltage.
|
FT232R eeprom problem .. how to make PC recognize it it's my first time to use FT232R ..when i connected it to the USB for the first time .. my Windows recognized it well, and its drivers were successfully installed ..and even after programming it once or twice more .. it was O.K. i tried to program it another time .. but after this time it was unfortunately unrecognized .. and the windows keeps seeing it as "unknown device" :( i tried some possible solutions .. as if i programmed something wrongly .. like connecting an external crystal, and resoldering wires to go to self-powered configuration ..but it was useless ......i hope somebody help me .. i think i need to recover its original eeprom .. but it's not recognized, so the programmer can't reprogram it sorry for explaining too much <Q> Is enumeration failing, or is just recognizing an device it doesn't has drivers for? <S> (Unknown device) <S> If enumeration is failing, something in the hardware is broken. <S> This could be a damaged chip (make sure you always power the chip completely , so don't let VCCIO be unpowered if you power VCC). <S> If you're recognizing a device that's unkwown, it may be that Windows can't match a driver. <S> In the EEPROM settings there is a VID and PID. <S> These are manufacturer and product ID's, which are specific for each chip and corresponding drivers. <S> The driver you downloaded match those. <S> There is an option to change these so you take the drivers of FTDI but change the .inf files to your own brand name. <S> This means you could rename 'FTDI Virtual Serial Port' to something else. <S> Windows doesn't figure out by himself that the drivers for the original FTDI VID/PID's are good. <S> I suspect that this is happening. <S> You could: <S> Desolder EEPROM and fit a new one ( <S> but if that's the RL edition, it's internal so not possible) <S> Try to see if FTPROG or the other EEPROM program utilities of FTDI still recognize it. <S> If so, try to erase the configuration, don't touch the VID/PID settings :-) <S> Look up the VID/PID in Device Manager and make your own driver for it. <S> It's in the details tab, and search for a property that clearly contains a value with 'VID' and 'PID'. <S> Typically, Hardware Ids. <S> The original FTDI settings shows me:USB\VID_0403&PID_6001&REV_0600 (taken from a Arduino FT232RL) <S> Take the different VID and PID (stock is VID=0403, PID=6001) and adjust the .inf files correspondingly. <S> There are some tutorials on the FTDI website and around the web on how to do that (I have done it once by paper, and forgotten what was exactly required). <S> Appoint Windows to use this driver <S> and it should be recognized again. <S> Try FTPROG again. <S> If that doesn't work, I think your chip may be dead. <S> (oh by the way, short explanations only make guessing and answering harder) <A> You need to connect the TEST pin to ground. <A> FTDI new driver from last Windows update deliberately resets the device PID to 0000 if the chip is a fake one. <S> This is the reason Windows cannot associate the FTDI driver with your USB device.
|
If you don't have appointed him a driver, Windows doesn't know what to do with the device.
|
How to make my own volume control for headphones? I have headphones that don't have volume control built in on the cable, so I thought why wouldn't I try to make one? However, I don't know where to start. Is it enough to just use a logarithmic potentiometer, or do I need something more? If just a potentiometer is enough, what should be its ohmage?I also use FIIO E3 headphones amplifier. Is it better if I put volume control before or after the amplifier? At what should I pay attention to avoid creating hum or other unwanted noises? My headphones are: http://www.sennheiser.co.uk/uk/home_en.nsf/root/private_headphones_dj-headphones_500156 <Q> The writeup you linked to doesn't say much useful, but it appears these are bare speaker-type headphones (guessing from the size and shape). <S> That means they are probably small speakers with 4 or 8 Ohms impedance. <S> You don't want to put a pot in line with speakers. <S> That wastes power, doesn't present the right load to the amplifier, and probably messes up the frequency response due to the impedance change. <S> This means put it at the input of the amplifier that drives the headphones. <S> Whatever is driving the amplifier input is probably a "line" output. <S> These usually have a few 100 Ohms impedance with a nominal 1V signal. <S> A 1 kΩ logarithmic taper pot would be about right. <S> Nowadays logarithmic tapers are harder to find because old fashioned analog pot volume controls aren't used that much. <S> Nowadays the signal is handled digitally somewhere anyway <S> , so the volume control is done by a digital multiply. <S> A linear taper will have a lot of change at the low volume end and not much at the high volume end, but <S> for just setting a comfortable headphone volume it's probably good enough. <S> You can make a linear pot non-linear by putting another resistor accross the output. <S> This doesn't make it logarithmic, but should spread the volume range out a little. <S> Personally I wouldn't bother with this unless you've tried it directly and really didn't like the result. <S> As for avoiding hum and noise in audio, make sure everything is shielded. <S> If necessary, mount the pot in a small metal box with the box grounded to the bottom lead of the pot, which should also be the ground for the input and output cables. <A> I know you said you wanted to make your own, but FYI RadioShack makes a Volume Control Cable for Stereo Headphones , and there are probably others out there as well. <S> It would probably work best placed before your FIIO E3 amp. <A> Keep in mind there are two ways of connecting the terminals of a wiper pot. <S> Method #1 puts the resistance in line with the ground while the second method puts it in parallel, dumping the extra unused power back to the ground. <S> This is called wiring it in a voltage-divider mode and is the correct method of doing things for an audio dial. <S> Refer to the following schematic <S> to get briefly acquainted with the idea on how this works: <S> Moving the wiper as close to the ground as possible gives minimum resistance and thus maximum signal. <S> While in case 1, having the ground at the end means you're adjusting the signal by just adding inline resistance, this is terrible and creates distortion by selectively modifying the output signal. <S> As shown in this online calculator. <S> It also requires huge potentiometers values to bring the signal's volume down below audible ranges. <S> Method 2#: <S> Connecting it in voltage-divider mode solves all of these problems and can work just as well with a lower value pot, meaning minimal added distortion to the signal path, with most of the driving potential going towards moving the diaphragm membrane on your headphones/speakers. <S> Also, there is another thing to consider in Audio which is that you need the difference between the amplification's circuit internal resistance (which should ideally be as low as possible) and that of the headphones as high as possible in order to avoid distortion . <S> This becomes tricky with speakers as they usually have impedances of around 4 or 8.For this reason, many prefer huge value pots for speaker amplifiers, to try and offset this effect, but as I hope I've demonstrated, this is the wrong approach to take.
|
If you can't find a logarithmic taper pot, it's not that big a deal. The best place to put a volume control is in the signal path, not the power path.
|
Why old PMOS/NMOS logic needed multiple voltages? Why does old PMOS/NMOS logic needed multiple voltages like +5, -5, and +12 volts?For example, old Intel 8080 processors, old DRAMs, e.t.c... I'm interested in the causes on the physical/layout level. What was the purpose of these additional voltages? Yes, this question is about stuff which was used 35 years ago. <Q> Here's an example of a "depletion-mode" NMOS NAND gate circuit I found on (German) Wikipedia: The upper transistor is used in depletion mode to provide a load approximating a current source and balancing the rise and fall times. <S> Due to the higher threshold voltages of early MOS technology, a 12 V supply may have been needed to provide a proper bias for the gate of the load resistor. <S> The -5 V supply might have been used to bias the back-gates (or substrate nodes) of all the FETs in order to get them in the desired operating regime. <S> I'm making this a Wiki answer because some of what I've said is speculation rather than hard facts <S> and I'm sure someone here can improve or correct me. <A> The 8080 used nMOS-only technology (no CMOS = pMOS and nNMOS). <S> When you use <S> nMOS (or pMOS) <S> devices only, you have a couple of choices to build a logic inverter cell (see chapter 6.6 in this document , my answer borrows heavily on this source): nMOS <S> transistor and pull-up resistor. <S> Simple, but not good on an IC because the resistor would take up a lot of space on the silicon. <S> nMOS transistor and a second, saturated nMOS transistor in place of the pull-up resistor. <S> Not bad, but the high-level output voltage will stay one threshold voltage V GS,th below the supply voltage. <S> (Note: V GS,th is the voltage between a FET's gate and source that will just turn on the FET.) <S> nMOS transistor and a second, non-saturated (= linear) transistor in place of the pull-up resistor. <S> High-level output voltage will swing all the way to V DD , but this comes at the extra cost of an additional voltage V GG with V GG > V DD + V GS,th . <S> This is the reason for the +12 V rail. <S> nMOS transistor with a second, depletion-mode n type transistor in place of the load resistor. <S> No additional supply rail needed, but the technology is more sophisticated because two differetly doped transistors need to be made on the same chip. <S> It seems that the 8080 uses option number 3. <S> This would increase switching speed at the cost of an additional supply rail. <S> I can only guess here because I have not found any sources telling me that the 8080 really uses cascode-connected stages. <S> Covering the cascode would be another story; this configuration is used for linear amplifiers, logic switches, level-translators or power switches . <A> I designed for 12 volt NMOS technology some years ago. <S> It uses saturated n-channel transistors for the pull-ups. <S> As described by a previous contributor (List item #2 in this answer ), this limits the output voltage to one Vt lower than VDD. <S> The 5 volt supply is used for interfacing with TTL. <S> The -5V supply is used to bias the substrate and bring the Vt to a useful value. <S> Without the bias voltage the Vt is about 0V. <A> My gut feeling is that the design calls for interfacing with 5v TTL, but the device itself wont function at this voltage, exactly how it does function requires a suitable example to study. <S> This is easier said than done, as I can find very few details on the web. <S> What I did find was a wealth of info about the 8008, which predates the 8080 by a couple of years, this information includes ... <S> a partial schematic, which you can find here. <S> http://www.8008chron.com/Intel_MSC-8_April_1975.pdf <S> Take a look round about page 29 and 30 (these are the page numbers of the pdf, not the hand scanned manual) and even page 5 if you want to see how it is physically constructed. <S> You can find more info here. <S> http://www.8008chron.com/intellecMDS_schematic.pdf <S> I don't expect any bounty for this, as I haven't directly answered the question, but I hope it points you down the correct path.
|
The reason for the negative rail (-5 V) could be the bias needed for a cascode configuration. The short answer is, you need to study the circuit layout of a suitable device to see the design, and from this you can possibly work out why.
|
Programmable point to point connections I have an idea for a programmable breadboard, but I am not sure of the feasability of it. My thought is to connect each strip of a breadboard to some type of circuit that can make arbitrary connections in software. This would eliminate a lot of the tedious wiring associated with quick prototyping. I have a few ideas, all of which seem prohibitively cost or wiring heavy. For a breadboard with N strips I could: Use an array of analog switches for each possible combination of wires. This is not quite N^2, but its not far off. A lot of switches may get expensive fast. Make M connections possible with 2M N:1 analog muxes. Not sure how feasable this is. Set up a bunch of rows of parallel headers and use little jumpers to form connections. Probably cheaper than 1 or 2, but not programmable. I started thinking if maybe there was a way to use an CPLD or FPGA to do something like this. At the very least if I had one with enough IO I could do some input->output following design that could get pretty close for slow digital circuits, but wouldn't handle analog very well. What I really want is a chip that can take a large number of IO and let me program in arbitrary connections between them. Does something like this exist? Preferably easy to program, even from a pic or something. The board I am looking at now has 3 rows on each side and two power rails so that's 64 distinct connection points, or 2016 analog switches. <Q> This has been done, years ago, and not since. <S> The reason was simple: <S> It's easier, cheaper, faster, and more powerful to just use an FPGA for both the programmable interconnect as well as the programmable logic. <S> Of course, FPGA's are only good for digital logic. <S> On the surface your approach seems to work for analog circuits, this isn't always the case. <S> Analog switches/muxes/etc all have a non-zero resistance, not-insignificant noise, and limited current handling capability. <S> This limits their usefulness to basic circuits only. <S> For these circuits, it is much better to just wire it up directly. <S> In short, only people new to electronics would use such a device and they might outgrow it rather quickly. <S> And it would be expensive. <A> You are unlikely to be able to implement something that is both useful and electrically fast. <S> If breadboards are considered potentially bad then this would be potentially horrendous :-). <S> Using an FPGA to build your actual circuit to some extent achieves the same aim. <S> Short of using an N x M metallic crosspoint switch the closest that come to mind is a multiplexed array of pairs of back to back MOSFETS in series. <S> Each MOSFET pair gives you an ohmic connection when on. <S> With due care skill and luck you could probably manage very cheap sample and holds using gate capacitance only so you may need little more than two MOSFETS per node plus a way of addressing the floating gate pair. <S> If you want M connections between A inputs and B outputs you can use A x M + M x B switches = <S> M <S> x (A+B). <S> Or if Ax B is square = <S> N <S> x <S> N = 2MN as opposed to N^2 for full access. <S> The ratio is N^2/2MN = <S> N/2M which can be a considerable saving over N^2 if you only nee M at a time and M < <S> The robot could be extremely dedicated and it may think that it is an X-Y mechanism with a plug inserter or two servos to make an R, theta polar plug placer or ... <S> A robot could place wires in a standard plug in breadboard. <A> I designed something similar to this for an interactive exhibit. <S> To keep the cost down, it is centered around a set of parts similar to what is found in a RS Science Fair kit. <S> Any of the circuits can be made with the push of a button. <S> New circuits can also be entered through the simple interface. <S> Right now, it is set to hold only 48 circuits. <S> The simple device morphs into 48 circuits. <S> (radio,logic,oscillators,amplifiers,etc). <S> Using cheap parts from China, it did not cost more than $200 including the wood display case. <A> I had this same idea and still think it would be useful for analog circuits. <S> The impedance of properly sized mosfet switches should not be worse than that of wires stuck into spring clips. <S> FPGAs are great, but (1) they don't handle analog and <S> (2) you still have to breadboard if you want to use ASICs. <S> While it's true that most companies just have a circuit board printed, there are still lots of hobbyists and students that would benefit from a programmable breadboard.
|
A serious but unusual suggestion is to consider the use of an N x M plugboard and a "robot" to insert jumpers or plugs. Capacitance of connections is likely to be an issue for anything large.
|
Any way to identify "directionality" of electret microphones? Picked up a handful of electret microphones from a local component store, and store owner claims them to be generic. He calls all components generic for which there is no data-sheet or specific part number. Wondering, if there is any way to determine if these are uni-directional mics, or omni-directional ones ? Doing some search to see if there are any distinguishing physical characteristics, I came across pictures almost the same, just that few seem to have 3 leads, and most have 2 leads. Edit:This is an alternate approach I am trying, by replacing the electret microphone that came with an el-cheapo baby-monitor, which is definitely omni-directional, and currently results in pretty terrible howling, when the 2-way talk feature is activated. The other approach is in-discussion (as some might have seen/noticed) in this question . <Q> Normally this would be done in an anechoic chamber, but you might be able to accomplish something by supporting the microphone on a post well off the ground in the center of a large carpeted room and walking around it with the source, or outside on a calm day. <S> You could tie a string to the post to measure a consistent radial test distance. <S> Directionality will probably be somewhat different at extremes of frequency. <S> Since your source probably wouldn't be omni-directional, try to be consistent for example always aiming it at the microphone. <A> Look at the back side. <S> A cardioid microphone has holes in the back of it. <S> Cardioid: <S> An omnidirectional mic doesn't have holes. <S> Omnidirectional: <S> The cardioid might have just one hole instead of several. <S> The little dimples on the omindirectional mic don't go into the microphone, they are vias connecting the top and bottom of the circuit board. <A> There is no such thing as a "generic" electret mic. <S> The store owner is just being lazy or got a box of parts that fell off a truck and doesn't know the model. <S> While there is some commonality between electret mics, the voltage and impedance they want for best operation varies. <S> The allowable range and recommended values are of couse in the datasheet. <S> Electrets are cheap and available from many sources with the right documentation, so I would leave these on the shelf. <S> Since you've already bought them, you'll have to experiment. <S> Start out with 10 kΩ to 3V and see what happens. <S> This is unlikely to damage anything. <S> If that drops more than a volt, use a lower resistor. <S> I've seen some specified for 2 kΩ recommended operation. <S> 10 kΩ is actually high, but it makes sense to start with conservative values and work your way down. <S> Higher values may give you a bit more voltage out but also cut off high frequencies more. <S> Continuing: <S> My internet connection went down while typing this answer. <S> When the submit seemed to hang I managed to copy the text in the edit window before it went away altogether. <S> When things came back up, it appeared to have saved what I typed, so I just re-submitted it. <S> I see now that the last two paragraphs didn't make it. <S> Fortunately those were included in my manual save: <S> As for directionality, there is no way to know. <S> Just try it. <S> A basic electret is a two-leaded device. <S> Some have a FET or somethingelse built in, so have a power, ground, and output lead. <S> Those can varyconsiderably in how you are supposed to handle them. <S> If you have 3 leadedversions I would go back to the store and rerturn them unless the ownercan supply the proper datasheet. <S> It sounds shady and a bad place to buyparts anyway.
|
It is relatively easy to tell if an electret mic is a cardioid (directional) or omnidirectional. In terms of actual directionality, you'll probably just have to test them by measuring the response to a source at different angles.
|
Why there is only 4.5V at the 5V output of my arduino board? I have an Arduino Uno R3. At the 5V output port of the board with nothing connected and blinky running while powered through USB, I can measure only 4.5V. Is this normal? Or is there anything wrong with my board? <Q> Now that you've posted the schematic, a straight answer is possible. <S> That schematic is a sloppy mess, but <S> I know that's not your fault. <S> It doesn't say much about the folks that designed your arduino board though. <S> Yucc. <S> It makes you wonder what else they didn't pay much attention to. <S> The board can be powered from USB or a external supply. <S> The USB supply voltage is nominal 5V, but can be lower than what you actually measured in some cases. <S> What you measured is about expected with 5V from the USB then with a diode drop in series. <S> It looks like there is at least a reverse blocking diode (D1) at the external DC power input. <S> That means if you hook up the external supply backwards the board won't run but nothing will be damaged. <S> You therefore didn't break anything, at least due to providing the wrong external supply polarity. <A> Olin is wrong, there is no diode between USB input and 5V(i <S> suppose he's talking about the internal diode of the T1 mosfet) . <S> when there is voltage from the USB port, <S> the MOSFET will be turned on by the op amp (U5A) and this will bypass the internal diode of the mosfet. <S> depending on the Rds(on) of the mosfet, there will be a series resistance between USBVCC and +5V and that is approxim. <S> 70mOHM <S> according to the mosfet datasheet <A> That'll be because your USB is only providing 4.5v. <S> That is perfectly normal and within tolerance. <S> In fact, the microcontroller will run happily from 3.3v should you wish it to. <A> I had same issue, dead MOSFET was the reason. <S> I just removed it and solder wire there. <S> Actually it's not good way to fix, but it works, but you should not use external DC in with that fix. <S> It's just video to show problem (USB 5v in and 4.5 after MOSFET) http://youtu.be/g3qYECB3tc8
|
When from USB only, there is a diode from the USB power to the "5V" supply.
|
What does the third wire on this speaker do? I salvaged two large speakers from an old iPod player/alarm clock device. Each of the speakers have three wires tied to it. There is a positive and negative and a third which I assume is ground since it is tied to the thick metal casing. I understand how a two-wire speaker works and is used but I haven't encountered a three-wire speaker before. I don't see the point to the third wire besides it being a ground. <Q> This takes the form of a braided wrap on the two speaker wires, and prevents the speaker from receiving interference, for instance from 60Hz mains wiring or transformers in the iPod player device. <S> Current goes in one end, and out the other, and that's about it. <S> This coil should be isolated from the speaker casing. <S> The speaker is driven with AC, and probably capacitively isolated from ground. <S> Shorting to ground could damage the amplifier, depending on the configuration, so shielding is not generally used on speaker wire. <S> However, in an alarm clock (plugged into mains), which is also used to play audio and charge iPod batteries (which are significant power draws), there's probably a sizeable transformer in the enclosure, which is probably pretty close to this speaker and the speaker wire. <S> This could produce a hum, so the designers of the device decided that the speaker needed to be shielded. <S> The risk of the speaker wire shorting out and damaging the amplifier is minimal, because the speaker wire never needs to flex within the alarm clock. <S> If you do connect these speakers to something else, you can probably ignore the third connection. <S> If you reuse the cable, simply leave the shield at the other end floating. <A> Ha ha ha! <S> That is so funny! <S> The speaker is a standard speaker. <S> Nothing special. <S> What is funny is that someone soldered a wire to the rivet that holds the speaker terminals to the frame! <S> I'm an EE in the pro-audio industry <S> and I've never seen this done. <S> The only conceivable use for that third wire is as a shield-- although I doubt that it is very effective at that. <A> It is likely for shielding purposes. <S> Speaker leads in genernal are notorious for picking up RF, including being an antenna from which it can couple back into the driving amplifier. <S> You mentioned that this was out of something intended for use with an ipod; if it is also intended to work with an iphone GSM radios tend to be very good at causing <S> thumping/pulsing sounds in cheap amplified speakers during certain network operations. <S> With my previous phone, I'd hear this unintended "notification" of an incoming call in my PC's speakers as the nearby phone acknowledged itself to the network, a second or two before the actual ringtone began. <S> Note also that the speakers are magnetically shielded, probably to limit scan distortion if they are placed near a CRT monitor - wonder how long they will continue bothering with that!
|
The speaker itself is basically an electromagnet, or, more simply, a coil of wire. The size difference and rough casing on the center wire indicate that it's probably shielded cable. You could certainly disconnect or ignore that wire with no bad effects.
|
Embedded linux on FPGA I have very limited experience with FPGAs (Altera - used only the visual design tools). I am planning for a new project in which I need FPGA and I could benefit a lot from an actual linux running on the same board (mostly for TCP communication as well as some DSP). My question is, is there a recommended FPGA that has a supported embedded linux prepared for it? no fancy drivers (just ethernet, wifi could be a plus, ...). I imagine there would be a micro controller built into the FPGA (this means it would eat up lots of the FPGA and I would need a larger FPGA). <Q> A textbook 32-bit RISC processor core capable of running the no-mmu version of linux doesn't actually need to be that large - the real resource you need is far more RAM (10s of megabytes) than available in any FPGA, <S> so you'll probably want SDRAM on the board and a controller for that in the FPGA. <S> That said, if you want anything more than a trivial level of performance, you probably want a core with some optimizations (pipelining, etc), and that starts to increase the size somewhat. <S> Adding a full mmu will make memory (re-)allocation more efficient and enable the usual copy-on-write fork() behavior. <S> You should probably read their docs for specific platform recommendations as it is of course a target that moves with time. <S> A third party core design might be somewhat larger for similar performance, if it is written in a more portable way and not as specifically optimized for a given FPGA family. <S> Historically there have been chips available combining both a hard processor core (often powerpc) with a region of configurable FPGA fabric. <S> A lot of the decision will depend on how tightly you need to couple the processor and FPGA. <S> If you can reduce the problem to configuration registers and a stream of data, it could be as modular as hanging an FPGA board with a fast USB chip off the USB host port of an embedded linux board like a BeagleBoard or RasberryPi. <S> For tighter integration, you may want the FPGA on the same board and sitting on the processor's external bus. <S> Or for low data rates, it's trivial to put an SPI register interface in an FPGA, and UART interfaces are entirely do-able though a bit trickier. <S> Finally, there is the question if you actually need a full operating system such as linux, or if a more "micro-controller sized" embedded TCP stack would solve your problem while requiring less memory. <A> Xilinx's Microblaze runs Linux just fine, assuming it's fast enough for your purposes - it'll only do some high 10s of MIPS in cheaper devices, 100-200 MIPS in the expensive families. <S> Xilinx have a git repo , or there are a few Xilinx specific distributions. <S> FPGA flexibility can be a bit of a pain as well as a boon, as your memory map and IRQ mappings, or even what perpiherals are available can change during the project development. <S> Petalinux has scripts to manage this sort of thing and update the bits of the kernel config that matter based on your latest and greatest system design. <A> Xilinx's Virtex line has FPGA versions with hard-core PowerPCs. <S> It is fairly easy to get Linux running on the PowerPC, my students have done it for many senior design projects. <S> They still have plenty of configurable fabric for your hardware design to fill. <S> The Virtex2 Pro evaluation board was very common in educational and academic research projects. <S> As Xilinx has dropped support for this version chip in their recent tools, you can pick one up fairly cheaply. <S> I believe that it was supported up to the 9.x version or so. <S> Hmm. <S> That's several years ago, so maybe I'm being a bit nostalgic. <S> At any rate, I'm still passing these boards out to interested students to let them do just about anything they want with them. <A> Actel's SmartFusion integrates an FPGA with a hard-IP ARM Cortex-M3 core and an advanced analog engine in a single chip device. <S> uClinux runs quite well on the Cortex-M3 core of SmartFusion. <S> Check this site for further details. <A> Depending on your timeframe, you might also look into Xilinx's new Zynq-7000 line, which combine an ARM processor with an Artix-7 or Kintex-7. <S> Xilinx claims they'll be shipping production quantities in the second half of 2012. <S> Other vendors may have similar products. <S> I don't know if or when Xilinx will bring Zynq support to the free ISE WebPack; right now, they claim you need ISE Embedded Edition.
|
Both major FPGA vendors have soft processor cores with available linux ports - Microblaze for Xilinx, Nios II for Altera. Another option to look at would be a separate processor (likely ARM) on the same board as an FPGA.
|
Measuring low current at very high speed I have a circuit with a very-low-power Jennic JN5148 module with microcontroller and 2.4 GHz radio, and some low-power sensors. I have to measure the supply current of all these components, in an interval of around a second and with a resolution of about 100 uA. These currents may have a maximum value of about 30 mA for the Jennic module, and slightly under 1 mA for the other components. I should measure these currents simultaneously and at a frequency of about 10 ksample/s, and i need at least 4 channels. The other requirements are to use as more as possible instruments over building amplifiers and so, and to perturb at least as possible the supply of components. Actually, the requirement is NO COMPONENTS and ONLY INSTRUMENTS. Does anybody has an idea about the best fitting solution?(i think that i've explained all but tell me if it lacks something) EDIT: Found this that could be a solution, but can you help me understanding what is the perturbation that it adds to the circuit? <Q> So you need to measure supply current at 10 ksamp/s from 100µA to 30mA, which is 300:1 range. <S> That by itself sounds doable enough. <S> Even a 10 bit A <S> /D built into a microcontroller is enough resolution if the signal is amplified properly. <S> 10 kHz sample rate is also quite doable. <S> In fact, I'd want to sample faster than that and do a little low pass filtering and decimation in the micro. <S> 100 kHz sample rate isn't even pushing it for something like a PIC 24H. <S> At 40 MIPS that would leave 400 instructions/sample. <S> That is much more than needed for a little low pass filtering and background bookeeping, so that checks out fine too. <S> The real question is what does the power feed look like and to what extent can you break into it. <S> Are the units under test powered with LDOs? <S> That would be useful, since a small current sense resitor before the LDO wouldn't effect the unit under test power voltage at all. <S> You'd have to subtract off the LDO current, but that is doable. <S> By putting the current sense before the LDO, you can afford to have it drop a little more voltage since the LDO will make sure the UUT still sees the same supply voltage. <S> This of course assumes there is enough input voltage headroom to play with. <S> If you have to put the current sense directly in line with the UUT, then you have to carefully consider voltage drop versus sensitivity and therefore ultimately signal to noise ratio. <S> Maybe 1Ω is reasonable. <S> That would only drop 30mV max, which wouldn't effect most devices much at all. <S> You'd need a differential amplifier and a overall gain of 100 <S> so that 0-30mA results in 0-3.0V, which is just about the right target for a processor running at 3.3V. <S> Various folks make such diff amps or specifically high side current sense amps. <S> If this is a one off, I'd start with Analog Devices . <S> A 10x diff amp with 1 MHz gain-bandwidth shouldn't be hard to find. <S> That would need to be follwed by a ordinary 10x amp before the micro, again with 1 MHz gain-bandwidth being adequate. <S> You could try doing the whole thing with a single 100x diff amp, but the gain-bandwidth product should be at least 10 MHz so the choices will be more limited. <A> Here's a circuit that I used in a test fixture to measure current. <S> The current comes in at V3 and leaves for the target at VTG. <S> The sense resistor is one ohm, which doesn't drop much voltage, but the transresistance of the circuit is 100 ohms. <S> (R1*R24/R23) <S> It is important to use a good autozeroing op-amp for U4, because any offset voltage will cause huge errors in the output. <S> With a good op-amp, errors are mostly resistor matching and Q1's alpha. <S> I used an OPA2333. <S> R23, Q1, and U4a could probably be replaced with a ZXCT1009 . <S> The circuit has two outputs: VCR is the unfiltered current signal. <S> Because most low-power systems achieve their low currents by duty-cycling higher-current outputs, monitoring VCR on an oscilloscope will give you a good snapshot of the health and operation of the system. <S> And it's easy to visually integrate under the current peaks to get an quick idea of the power budget. <S> Here's an example of a system with a 2.4GHz radio module (I've notated the different power-using parts of the system): Because of the duty-cycling, it is hard to get a good average current reading with a DMM that samples several times/second. <S> The VC output provides a low-pass filtered view of the current signal. <S> (The capacitor shows a + symbol, but don't use an electrolytic with its high leakage current.) <A> This is not a low-cost solution, but it might actually do what you're asking for. <S> Keithley and other vendors are likely to have comparable models available. <S> The Agilent meter can measure 10k samples per second (50k/s for 34411A) at 5-1/2 digit resolution, and has an external trigger which would enable you to syncronize measurements between 4 meters. <S> Readings can be logged to internal memory or streamed out via USB, GPIB, or LAN to your PC. <S> The downside is a list price of $1300 per channel. <A> Just for information, we found this DC power analyzer with this Supply Measurement Unit (SMU) to be the best solution for our purpose. <S> It's a veeeery nice toy, even if we have only two of these modules. <S> It has a huge amount of features, like an auto-ranging functions that allows to measure up to 3A and down to about 10 nA automatically. <S> It can log at up to 5 us/sample and for up to 999 hours. <S> Ah, it has also USB port with dedicated PC interface. <S> Definitely, more than we need, except for the number of channels, but we made it to be enough :). <S> The price is not the lowest, but we (in another lab, of course) already had one, so...
|
Consider a high-end benchtop multimeter like Agilent's 34410A or 34411A . If you can afford it it's definitely worth!
|
What would be the difference in a coil of wire and just a cylinder of solid copper? Ok so I am learning about induction and I always see coils of wire with no insulator. So I was wondering, What is the significance of it being a coil of wire rather than just a solid cylinder since there are already many points of contact between each "wrap" of the coil? <Q> The part you are missing is that what looks like uninsulated wire actually isn't. <S> A lot of enamel coated or "magnet wire" can look like bare copper at first glance, but the wire is actually coated with a thin semi-transparent insulation layer. <S> Electrically, a coil of wire is quite different from a cylinder. <S> To make a magnetic field, you need current flowing around where you want the field. <S> Think of a cylinder of current surrounding the area. <S> The magnetic field is proportional to the total current in the cylinder. <S> A coil is sortof a cheat on that. <S> The same current is re-used each turn to add to the apparent cylinder current. <S> Let's say you have a coil with 100 turns. <S> If you run 1 A thru it, each of those turns contributes 1 A to the overall cylinder current. <S> You get the same magnetic field as if it were a solid cylinder with 100 A running around it. <A> Wire used in coils usually has an insulating coating - enamel or similar. <S> As long as that is intact, the coil does not approximate a solid conducting cylinder (which would be a single "turn" of very thick wire), but instead a multi-turn coil where the magnetic field sees the current multiplied by the number of turns and the inductance varies as the square of the number of turns. <A> The difference is that electrons follow the path of least resistance. <S> For a solid cylindrical conductor that would be "straight through." For a coil of wire the current must flow "round and round" in space. <S> The importance of this is related to what's going on physically here (ala Maxwell's Equations). <S> Current flowing through a conductor induces a magnetic vector field that "wraps around" the direction the current is flowing in. <S> The topology of a coil is such that these magnetic fields are superimposed so as to create a net magnetic field that has a kind of "flows out" of one end of the coil and "wraps around" back into the other end. <S> Without going into a whole lot of math, it's this composite magnetic field that I believe gives an inductor the properties we are used to thinking about in circuits (i.e. resistance to changes in current). <S> It's also this net magnetic field where the energy is effectively "stored" in an inductor. <S> Re-reading your question, it is essential that the windings of a coil not "touch" electrically or you will not get the effects I described above. <S> They may in fact only "look" like they are not insulated, but in fact they have to be, as Chris pointed out.
|
The reason for using thin insulation is so that lots of turns of the coil can fit into the tightest possible space.
|
Is there any way to send serial data over physical ethernet layer with no encapsulation? I wonder if I can use the physical ethernet layer like a serial port. Is it possible? The case would be reading signals with an electronic device without dealing with networking headers. <Q> Yes, absolutely you can ditch the network protocol layers and send data "directly". <S> But, you probably don't want to. <S> What you do is use standard Ethernet Phy's, magnetics, and connectors. <S> But instead of using an Ethernet MAC (media access controller) you use an FPGA to send/receive data without the network overhead. <S> This has been done for several "not quite Ethernet compatible" interfaces like Ethersound , and other industrial protocols. <S> One thing that you can't ditch is the packet nature. <S> You must still transmit data in packets of 64 to about 1500 bytes (some Phy's allow packets up to 8192 bytes). <S> You can't transmit packets smaller than 64 bytes, or larger than 1500. <S> And you must allow for the proper "gap" between packets. <S> But you have complete control over what is in the packets, and any header (if any). <S> I am glossing over lots of details, however. <S> In some cases there are signal encoding issues to deal with. <S> I would advise that you not do this to Ethernet. <S> It requires a large amount of skill to design the FPGA logic-- skill that most people do not have. <S> And the benefits of doing this are minimal. <S> It's much easier to simply use the standard Ethernet controllers and the associated protocol stacks than to dream up your own thing. <A> Routers and similar devices sometimes have serial "console" ports with 8P8C modular sockets (RJ45 jacks). <S> However if you want to send serial data through an Ethernet NIC without actual Ethernet packets appearing on the wire, you are out of luck. <S> On the other hand, many manufacturers sell serial-to-ethernet converters which can be used in pairs to transparently connect serial devices using Ethernet infrastructure. <S> Search for "Ethernet Serial" <S> Sometimes these come with "ComPort Redirector Software" that create a Virtual Com port on a computer. <S> These probably work with most applications that expect a real serial port. <S> They may not work if you are doing low-level bit twiddling. <A> Based on your question I think I know what you want, but I want to clear some things up first. <S> Ethernet (or as the standard is called IEEE 802.3 ) is on layer 2 ( data link layer ) of the OSI model . <S> The wire (the cat5/6 cable and RJ45 connectors) are actually defined in Layer 1 ( Physical Layer ), You may have heard of the term 100BASE-T before, that is defining the physical layer. <S> Ethernet does not have to run over 100BASE-T, and 100BASE-T does not need to carry Ethernet <S> Now on to your question: You can buy devices that will carry serial over 100BASE-T but will not do any encapsulation. <S> These devices will not work with your home network as your switch/hub/router is expecting IEEE 802.3 packets to be coming down the wire and not Serial packets. <S> You can also get devices that will do serial over IP <S> but it does not have to use 100BASE-T cable (or Ethernet). <A> Yes and no; copper is <S> copper and RJ45 copper works great for serial connections, but don't confuse it for Ethernet unless it's talking the Ethernet protocol - switches and other ethernet devices won't approve. <S> Cisco certainly likes this idea, for instance; the standard Cisco serial console cable is RJ45 copper on the device end. <A> No, not with what is usually understood as the "physical layer" of ethernet. <S> This includes the cable, magnetics, and the PHY (stands for "physical"). <S> Even at the physical layer, you're not just sending arbitrary 0 and 1 levels to the other end. <S> There are also multiple things called "ethernet" that are different at the physical layer. <S> There is the original, 10base-2, 10base-T, 100base-T, etc. <S> The older slower ones used manchester encoding if I remember right. <S> At 100 Mbit/s things were changed to achieve the higher speed. <S> Even if you restricted yourself to the old 10 Mbit/s manchester encoded versions the answer would still be no. <S> Data is inherently sent in packets. <S> These have a preamble private to the phy layer which is used in part for collision detection (in some variants), clock synchronization, and start of packet identification. <S> Then there is some out of packet signalling, like link pulses, which is handle in the physical layer. <S> Since ethernet is transformer coupled, everything has to happen at some minimum frequency since the DC level is lost from one end to the other. <S> This is one reason for manchester encoding. <S> You could set up a private ethernet with just a phy at each end and send individual packets. <S> Technically you don't need a MAC layer if you just want to get packets of raw bits from one end to the other. <S> In practise, it is probably easier to use a MAC layer at each end too, even if you just want packets of bits from one end to the other. <S> Phy chips are usually designed to be driven only by specific MAC chips, or sometimes you get the PHY and MAC all integrated into one chip, called a MAC/PHY. <S> You can still send packets of raw data at the MAC level by ignoring some of of the wrapper stuff. <A> To do that, you'd need to take the physical layer <S> PHYceiver <S> from an Ethernet card and connect it to a serial port rather than an Ethernet controller. <S> Note that you could only use this point-to-point. <S> You could not use hubs or switches. <S> Some hubs might work by luck, but switches definitely won't. <S> What's the outer problem? <S> There are likely much better ways to get the job done.
|
You can indeed run RS232 over Cat5 ethernet cable. It's actually not all that easy, and the requirements are different depending on which Ethernet standard you want to use (10/100/1000 mbps).
|
Free circuit simulator for educational purposes I am looking for a free circuit simulator for educational purposes. My requirements are: Visual ("draw a circuit diagram, click simulate") It should contain light bulbs as circuit components such that 2.1. They become (visually) brighter if you apply more power 2.2. You can change the manufacturer specs for example "3.5V,0,2A" It should contain swiches, npn-transistors, diodes and LEDs as well (the LEDs should react to interactive changes in the simulation) Any recommodations for this? It would be nice if the simulator runs under Linux, but that's not a strict requirement. <Q> I often use the falstad simulator: <S> http://www.falstad.com/circuit <S> It's a Java applet, so will work on pretty much any operating system. <S> The interface does take a bit of getting used to, and there are problems saving in Linux <S> (it gives you a link to copy and paste, and copy and paste in Java doesn't work too well in Linux). <S> Other than that it ticks all your boxes. <S> It also has some good sample circuits. <S> A Windows version (circuitmod) is based on this. <A> CircuitLab is a beautiful in-browser circuit simulator that was launched a few days ago by a pair of MIT students. <S> I think electronics. <S> SE is going to love it! <S> It does full mixed-signal analysis and appears quite capable. <S> I look forward to seeing where it goes! <S> Here's a screenshot: <S> You can share circuits via convenient short URL's. <S> For instance, here is the circuit shown in the schematic: http://circuitlab.com/circuit/fq7c97 <A> I like LTSpice <S> you can find it here: <S> http://www.linear.com/designtools/software/ <S> It does jsut about everything. <A> It includes a full SPICE simulation engine, web-based schematic capture tool, and a graphical waveform viewer. <S> It also includes an integrated Bill-Of-Materials manager that lets you assignDigi-Key Part Numbers to your models. <S> To test it, visit http://partsim.com/ <A> I tried www.DoCircuits.com and found it quite easy to use, machine independent - works on the cloud, has real looking components and devices and is free :-) <S> However, its an early version so I think many more features will get added - but I guess the direction is interesting. <A> I cannot vouch for its complexity, accuracy, or capability, but "EveryCircuit" for Android is free (for very small simulations; $10 for full version) and does change the intensity of brightness for light emitting diodes. <S> It's kind of a fun mobile app. <A> Take a look at both Qucs (slightly harder to use) and LTSpice. <S> Both satisfy 1, 2.2, and 3. <S> Qucs is linux, LTSpice is under windows. <S> Neither satisfy requirement 2.1, unless you are okay with looking at graphs as analogs of brightness. <S> Edit: I've been using Multisim lately, and it is far superior to Qucs and LTSpice in terms of ease of use. <S> Its pricey, though. <A> I downloaded Yenka few days ago. <S> Didn't get the chance to really try it out, but from the looks of it, it seems quite easy to learn and use. <S> It is also free for none commercial use. <S> This is from their website: <S> "Yenka Electronics lets you design and simulate circuits using over 150 types of component, testing and refining your design as you work." <S> Check it out here: http://www.yenka.com/en/Yenka_Electronics/ <A> Try Autodesk 123D <S> Circuits - kind of Fritzing-like user interface with simulation. <A> Another options would be ngspice <S> it is an opensource program for circuit simulation. <S> It looks fairly new, and I can't tell you how well it works. <S> People are updating the software, so future improvements I imagine are expected. <A> SystemVision just launched online. <S> It's free and supports modeling in VHDL-AMS , so it's a little different from the SPICE simulators. <S> It has also has Datasheet Modeling Tools.
|
PartSim is a free and easy to use circuit simulator that runs in your web browser.
|
What does E mean in this instance? On all about circuits I keep seeing E in tables like this: In the table I and R make sense with the units. But the E doesn't. So where does it come from? I was looking at this article on superposition theorem. . <Q> "E" stands for "Electromotive force", which is essentially just voltage. <S> We just have come used to using "V" instead of "E" It would be the same as asking why Current is "I" even though it is measured as Amps. <S> Likewise it would also be the same as asking why Resistance is "R" even though it is measured in ohms. <S> This might also help you understand the saying " Eli the Ice Man " where the E stands for voltage. <A> <A> I like to think of the E of voltage as energy even though I know the E stands for 'electromotive force'. <S> 1 volt = 1 joule of energy per coulomb of electrons <S> (coulomb = aprox. <S> 6.25 billion x billion electrons) <S> ie. 110v is equivalent to each coulomb being given 110 joules of energy to go out and spend. <S> Similarly 1 amp = <S> a current of 1 coulomb moving through a circuit every second, ie. <S> 10amps = 10 coulombs per second.
|
The E is just a variable chosen by the author's preference of conventions, but it most likely derives from "Electro Motive Force" which is essentially synonymous with voltage.
|
Get 17V from PC PSU How can I get 17V from old PC PSU? I have +12V and +5V output, can I get them to one +17V output? <Q> Perhaps. <S> Many PC power supplies have both 12 V and -12 V outputs. <S> It is also true that most power supplies will share a common ground, and if yours is such a PSU then it is not possible to add together two positive outputs (+5 V & +15V). <S> It should be possible to add together a positive and a negative output however, in fact they are already connected via the ground. <S> To find out if this works for you try measuring the voltage between the -12 V wire and the +5 V wire. <S> With luck it will measure approx. <S> 17 V. <S> In fact you can use your meter to measure the voltage between any negative output and any positive output to find one that works for you. <A> No. <S> They share a common ground. <A> The +12V and +5V outputs are from the same power supply, so no. <S> Both voltages were generated referencing the same ground. <S> WARNING! <S> This is very important! <S> Do not do this if you cannot guarantee that the DC side is isolated from the AC side! <S> This is because the two supplies still share the same ground, which is from the AC input. <S> That means the current can flow into one of the inputs, possibly damaging the supply and things around it! <S> @russ_hensel has some experience with this problem ( https://electronics.stackexchange.com/a/7659/6331 ). <S> Could you elaborate russ_hensel? <S> One example is connecting the ground of the second to the 5V of the first. <S> Then voltages using the ground of the first and <S> the 12V of the second would produce 17V. 5V+12V=17V.
|
With two power supplies, if the outputs are galvanically isolated from the inputs, it can be possible to connect them in series to stack a 12V from one and a 5V from a second. This would be done by connecting the ground of one supply to the voltage of the other supply, i.e. connecting the supplies series.
|
CPU in circuit emulator Idea: Run a 68000 emulator on a PC, and connect the PC to an existing 68000 system, replacing the CPU with a ribbon cable going to the PC. I realize the emulation would not be cycle exact, but that is not the goal. Question: how much would it take in terms of glue logic between the systems, minimum? I have some crazy ideas:IDE port on PC is 5 volts. IDE is basically a 16 bit parallel port.The 68000 has 16 bits data bus. Maybe some latch to keep the 20 bit memory address? Reset flanks could be stored in and read out by emulator? <Q> Implement your control system in the FPGA, and write software to tell it what to do. <S> That's basically making your own ICE kit. <S> If the commercial ICE kits are horrendously expensive (check and find out if they are, I don't know), then this could potentially come in cheaper, and give you control over how it works. <S> Check out Raggedstone, Broaddown or <S> Mini-Can <S> FPGA boards, they are relatively inexpensive boards, but not sure if it has enough accessible IO pins for what you need. <S> Then check OpenCores for open-sourced PCI blocks and other things that may be useful. <S> You may also need to add some level shifting stuff on a small PCB addon to these boards. <S> Look up Xilinx/Altera white papers on using Quickswitches between 3.3V FPGA and 5V PCI, hooking the other connections to a 5V 68000 socket would be essentially the same process. <S> As I remember, the DIP 68000 is 68 pins, and some of those are not used in some systems, such as Amiga does not recommend using some of the 6800 style peripheral pins, and they become disconnected in later Amiga systems. <A> I would imagine this would be nigh on impossible to do. <S> Firstly, timing is critical in a CPU. <S> The CPU, while the master "device" in the system, is not the absolute master of all. <S> It is slave to the system clock. <S> Your PC <S> and it's interface, and the emulator, would all be required to be slave to this master clock. <S> The IDE interface certainly couldn't do that. <S> You would need a specifically built interface which would do all the emulating of all the signals and control lines (which are all timing critical), as well as provide all the data and address lines (and there's a lot of them). <S> With that it might be possible to do it, but it would be hard and expensive. <S> Better to just emulate the whole system in total or use a real 68000 chip. <A> Depending on the system, you might or might not be able to fool the target hardware into 'thinking' <S> it had a 68K present. <S> In some (most) systems, as Majenko said, you'd need to respond to certain signals in real time, which would be a pain. <S> However, if the target hardware doesn't have multiple bus masters, you might be able get away with it. <S> You'd have to really investigate the timing requirements of the system in question. <S> If it can handle being run at extremely low clock rates, or allows the clock to be suspended and restarted, the outlook is more hopeful. <S> But there are two other problems here. <S> One is, you don't want to connect the target hardware's data bus directly to your PC's IDE bus. <S> The target should only drive data onto the PC's data bus when the PC wants it to, so you'd need a bidirectional buffer, decoded to respond to a suitable address in the PC's memory map. <S> You correctly intuited that you'd need a buffer to capture data from the PC for the target address bus. <S> The other, and probably bigger pain, would be configuring the PC software to support this. <S> You'd have to allocate at least a couple of addresses in the PC memory or <S> I/O maps to access this target system adapter, and with modern operating systems, this doesn't happen without a device driver. <S> So if you want to pursue this, you either need to know how to do that, or be prepared to learn it. <A> For most popular chips like the 68000 you will find generally you can buy an ICE like <S> this one for the 68000. <S> Since an ICE needs a way to interact with the user in addition to the target circuit board, a PC is often used for that purpose. <S> One cable from the ICE will plug into the circuit board in lieu of the CPU chip and another will connect to the PC. <S> While perhaps going beyond the scope of your question, it is interesting to note that when a new CPU chip is being designed it will generally be simulated in software on some other existing computer first and then an ICE will be built with actual chip production being the last step. <S> This is because it is much cheaper to make an ICE than to produce a complicated CPU chip the first time.
|
Get a PCI style FPGA board that you can use generic IOs for the target 68000 connection. Actually what you are describing is quite close to an in-circuit emulator (ICE).
|
Why are batteries measured in ampere-hours but electricity usage measured in kilowatt-hours? I was reading about energy usage in batteries and don't quite understand why it is measured in different units than home electrical usage. An ampere-hour does not include a measure of volts. But my understanding though is that a battery has a constant voltage (1.5V, 9V, ...) just as much as home electrical usage (120V, 220V, ...). So I don't see why they have different units by which they are measured. <Q> \$kW \cdot <S> h\$ are a measure of energy, for which grid customers are billed and usually shows up on your invoice in easily understood numbers (0-1000, not 0-1 or very large numbers; ranges which, unfortunately, confuse many people). <S> \$A <S> \cdot <S> h\$ are a measure of electrical charge. <S> A battery (or capacitor) can store more or less a certain amount of charge regardless of its operating conditions, whereas its output energy can change. <S> If the voltage curve for a battery in certain operating conditions are known (circuit, temperature, lifetime), then its output energy is also known, but not otherwise, though you can come up with some pretty good estimates. <S> To convert from \$A <S> \cdot h\$ to \$kW <S> \cdot h\$ for a constant voltage source, multiply by that voltage <S> ; for a changing voltage and/or current source, integrate over time: $$ \frac{1 kW\cdot <S> h}{1000 W\cdot h}\int_{t_1}^{t_2} \! <S> I(t)E(t)dt ~;~~E~[V],~I~[A],~{t_{1,2}}~[h]$$ <A> A note about battery voltage: <S> Rated battery voltage is "nominal". <S> A fully charged 12 volt lead acid battery actually starts out around ~14.4 volts and drops off as you draw energy from it. <S> The actual battery voltage depends on a number of factors not limited to state of charge, battery age, load profile, chemistry, etc,... For instance, A lithium ion battery of 3.7V (nominal) may start out at 4.15 volts and diminish to ~2.7 volts before requiring recharge. <S> Watt-Hours (or kW-H) is an indicator of the energy storage capacity of the battery, whereas amp-hours would refer to how many amps minimum you can draw from a battery at full charge for an hour before it was no longer capable of providing that level of flow (perhaps at or above the rated voltage?). <S> They are closely related, but not equivalent. <S> Some batteries are designed more for high current draw devices, whereas others are designed to last a long time for lower current draw devices. <S> Appended <S> :Now that I look at my cell phone battery, I notice that it has all three ratings printed on it. <S> It is a Lithium-Ion battery whose nominal voltage rating is 3.7V. <S> It's energy capacity is marked as 4.81 Watt-Hours. <S> It's <S> electric charge rating is 1300 milliAmp-Hours. <S> This seems to indicate that Energy = <S> Voltage <S> * Electric Charge (at least in terms of the battery ratings), though I think that this equation is hiding the fact that there is an integration of P=VI going on and that V is more like an average value than a constant, which probably gives a pretty good approximation. <A> The way a battery works, the total coulombs it can push around falls out more directly than the total energy it can store. <S> The voltage is not constant. <S> It varies by state of charge for one, and the relationship between the two can be quite different between battery chemistries. <S> All this is to say that A-h is more relevant to battery manufacturers than W-h or Joules. <S> Joules can of course be relevant to circuit design, so this information is available, just not included in the 2 second sound bite called the Amp-hour rating. <S> Battery datasheets can get quite complex. <S> As with most things, there are a host of tradeoffs and thorough information is more than a single number. <S> If you do have to pick just two numbers to quickly characterize a battery, Volts and Amp-hours are as good as any, and are what the industry has converged on. <A> A batteries voltage changes over its lifetime. <S> The current is set by the circuit it is connected to. <S> Your electricity supply is a constant voltage and can be predicted. <A> One factor not yet mentioned is that because batteries have a certain amount of internal resistance, drawing more current will cause the voltage to sag. <S> Suppose, hypothetically, that a particular battery that's been discharged a certain amount will supply 12 volts when supplying 10mA, or 10 volts when supplying 100mA. <S> Drawing 10mA from the battery for 10 hours will discharge it about as much as drawing 100mA for an hour, but in the former scenario the battery would have supplied 20% more "useful" energy. <S> Key point: a larger fraction of the energy in a battery will be lost when trying to drain it quickly than when trying to drain it slowly. <S> Power lines also have a certain level of resistance, and similar factors may apply, but the line voltage reaching a residental customer's meter is generally not appreciably affected by that customer's usage. <S> A power company could supply one amp at 105 volts using 20% less energy (per unit time) than would be required to supply one amp at 126 volts. <S> If customers were billed per amp-hour, the power companies would have an incentive to supply their energy at the lowest possible voltage. <S> Billing per kWh means the customer's billable usage will be proportional to the amount of energy the power company has to generate to supply it. <S> Incidentally, some devices (e.g. induction motors) will often draw less current at higher voltages (while doing the same amount of work), while other devices like incandescent lamps and heaters will draw more current at higher voltages (while producing substantially more light and heat). <A> Simply an "Amp. <S> Hour" is not a scientific unit or SI unit. <S> Amp.hr is a rating that battery manufacturers use but because one ampre = one Coulomb per second, when multiplied by one hour the two time factors cancel out and the result is simply 1 Amp. <S> Hr = <S> 3600 Coulombs of charge, no time factor involved. <S> So a bit of smoke and mirrors from the battery manufacturers. <S> If you want to really know how your battery is going to perform you will have to look a little deeper than taking the word of the sales people ... !
|
As the current is a constant known value and can be predicted, and the voltage cannot, the units are in the value that can be predicted.
|
Connecting copper wire to a nine volt battery I don't have a cap for a nine volt battery so I am connecting to it with copper wire. Which connector is positive? Have I wired these up correctly? <Q> Look at the body of the battery - it will tell you. <S> The round one is positive, the crown shaped one is negative. <A> You have them reversed. <S> Making your own conector: <S> Find a dead 9 volt battery. <S> Tear its head off - aka, remove the terminals. <S> This will push onto another battery and provide you with terminals. <S> On the connector the round pole is negative (unlike on the battery). <S> This polarity for battery connector only: Tools: <S> You need a basic multimeter. <S> In Cleveland you should be able to find one for $1 or so in a yard sale / garage sale ... or free. <S> If you can't find one and can't afford one email me and tell me why I should ask somebody to give you one. <S> Good enough story <S> and I'll arrange for someone to do so. <S> ((I'm in NZ :-) ). <S> You need a soldering iron. <S> Ideally temperature controlled but anything no too large is a start. <S> Smallish tip. <S> What are you powering with your battery? <S> Who is Grandawn? <A> You should never solder batteries unless they have soldering tabs. <S> 9V battery snap connectors cost next to nothing, <S> and you'll avoid mistakes if you would get batteries like the one on the left: <S> The full size image seems to be inaccessible, but if you have a good look you'll see that the "+" marking on the left battery is on the wrong side. <S> (I've been assured that it isn't photoshop'd.)
|
Note that on the connector which you are making the terminals are reversed . The smaller round "male" one is positive. =============================
|
What is the correct name for the ACTION you do when installing a jumper? While writing an instruction document for configuring an evaluation board's firmware, involving the repeated installation and removal of jumpers, I used the terms "install", "connect" and "reconnect" to describe putting a jumper in place. I used the term "remove" for taking it out. One of the reviewers thinks that "connect" is a wrong term, as it may confuse the user, as in "connect to what?". So I was wondering, are there correct terms to describe these two actions? <Q> If I were writing formally, I would probably speak of "installing a jumper". <S> If I were speaking informally, I'd probably talk about "strapping" or "jumpering" something. <A> Install or insert are good. <S> Connect is poor unless you specify pins as @AnrejaKo said. <A> I'm assuming we're talking about sliding on the little black shorting blocks over two pins spaced .1 <S> " apart, right? <S> I don't like "insert" as much because you're not really putting the shorting block into something as much as on to someting. <S> I agree with your reviewer in not liking "connect". <S> Presumably these are instructions for non-technical users. <S> You shouldn't assume they know that the little black thingy makes a connection when installed, and that is a irrelevant implementation detail at the user interface level anyway. <S> Sometimes boards are designed so the same number of jumpers is always present. <S> This can be useful since non-electrical user won't have access to new jumpers when they need to add some. <S> In that case, jumpers are "moved" to one of the allowable positions: <S> Move the jumper at J1 to the A position . <S> Or if you want to make it sound like a Japanese product so people won't even think of calling a support line: Please to move jumper J1 honerable position A onto <A> I'd use "please set jumper XY", but be warned as English isn't my native language. <S> On Jumper (computing) <S> I found Informally, technicians often call setting jumpers "strapping". <S> To adjust the SCSI ID jumpers on a hard drive, for example, is to "strap it up".
|
I have usually seen "install" and "remove", and I think those are fine.
|
How to mend a broken coil in a DC motor? I'm trying to repair a bread making machine (A Tefal/Moulinex OW500530). At the start of the program (kneading), it drives the brushed DC motor (ZYT4245-23) in short pulses every second. Now and then, the motor won't start. It will start again when I help it a bit, though. A bit further into the program, the kneading is constant (no longer in pulses), and once the motor is spinning, it seems to be working fine. I've opened up the motor and found out that the coils between two pairs of neighboring commutator plates seem to be broken; I measure about 50 Ohm between the other pairs of neighboring commutator plates, but between these, there is a very large resistance. There are about 20 commutator plates in total. Could I get the motor running again by simply short-circuiting those two pairs of commutator plates (soldering)? Is it safe? <Q> If I understand you correctly, I think shorting the commutator plates for the dead pole to the adjacent working one (either side should work I guess) may actually be worth trying. <S> With more than e.g. 3 poles it should be okay as you won't short across the input as the brushes touch both poles. <S> Since your motor appears to have a lot of poles it may still work <S> okay if one pole has to cope with twice the angle. <S> At least there will still be field as opposed to it dropping out completely. <S> Take advice with caution (i.e whatever you try, make sure you do it as safely as possible) as it's hard to be sure of anything in situations like this when you have no datasheet available with relevant info like winding connections. <S> Before you apply any power, turn through all poles and test to make sure there are no obvious shorts where there shouldn't be (e.g. across the power input) and resistance doesn't change much from the 50 ohms you measured across the working coils. <S> Of course, the sensible option is just to buy a new one (for actual serviceable use) as Olin says, but even then I'd probably still hack this one just out of curiosity <S> ;-) <A> If the coil between two connectors has broken (the wire has melted and become open circuit) you will need to remove all the copper wire from that coil and re-wind a new coil. <S> Not a simple job for the beginner <S> - you will need to get the right grade of copper wire and wind the right number of turns. <A> It's not clear what exactly you have measured. <S> It seems like maybe one of the windings has opened? <S> If so, opening the motor and replacing the wire is not a reasonable option. <S> You'll never get it sitting just right into the same space at the same weight. <S> I saw this happen once in a cheap 12V siren motor. <S> The wires were poorly soldered down, and about half of them had come loose. <S> It was tricky getting the soldering iron into the tight space, but soldering the ends of the wires back down fixed the motor. <S> You also should consider how much a new bread machine costs and what your time is worth. <S> If you're doing this as a challenge or to learn, fine. <S> For other reasons it probably doesn't make any sense. <S> Just get a new bread machine. <A> The motor's own brushes will short adjacent commutator segments in the normal course of operation; every time a commutator gap moves under a brush, there's such a short. <S> So it seems like it ought to be safe enough to try. <S> Do try to make the connection mechanically very sound, as centrifugal forces will be significant. <S> Loose bits of metal inside a spinning motor are decidedly not safe. <S> Whether or not the motor will be cured of its no-torque spots is a mystery, but since the unit is already effectively broken, it seems worth a try, as a science experiment. <S> If you want peace of mind, you're better off replacing the motor, or perhaps the entire machine. <A> Original answer withdrawn for revision as it had a multi-phase mindset. <S> Note that shorting adjacent commutator segments <S> * may * be a bad idea. <S> The short that occurs when brushes straddle the commutator gap means that a configuration which is becoming less useful due to rotation and a configuration that is becoming more useful are temporarily placed in parallel. <S> This is acceptable. <S> But, by hard connecting adjacent commutator segments you may be creating connections which did not exist when the brushes are "far away". <S> Whether this happens depends on how the motor is wound. <S> Better in some cases is to short out comm segment to the one N segments away where this winding is terminated. <S> Whether that is OK depends on how many pole pairs there are. <S> For few pole pairs this will increases the current in that set of coils substantially. <S> Connecting a Polyfuse across the whole open circuit winding may give the best of all worlds. <S> The winding string will still get some current at startup but not draw excess current. <S> Polyfuse will need to be rated to be "overcurrent" at winding operating current and will need to be epoxied securely in place and balanced with an opposing mass. <A> I had exactly the same problem (2 adjacent pairs were open-cicuit) and glued only one of the pairs. <S> When measuring again, the second pair was not open-circuited any more. <S> I assambled the motor, put some grese on the driving wheels and the bread machine works perfectly. <S> However, the bread machine was practically new, so such a defect should not appear in a quality product of this brand...
|
About the only thing you can hope for that you have half a chance of fixing yourself is if a wire disconnected from one of the commutators.
|
Will a 3 phase induction generator fight its own rotation? So in a 3 phase induction generator with coils for the stator and magnets for on the rotor, I am wondering if the the current induced in the coils would create a magnetic field that would oppose the rotation of the magnets on the rotor? <Q> Yes, any generator will be subject to this effect. <S> You can't get something for nothing, so the more current drawn from the coils, the larger the (opposing) magnetic field (counter mmf) and the harder the rotor will be to turn. <S> If this didn't happen then the amount of energy required to turn the rotor would not change according to the load on the output, which would break the laws of physics. <A> Think about it. <S> This comes from basic physics without having to know anything about how a generator works. <S> If there were no back force, there would be no power going into the generator from turning its shaft, which means no power could be coming out. <A> if you follow Lenz's law.... effect opposes its cause.... <S> in induction generator, the cause of current in coil is relative movement of magnetic field produced by rotor magnets. <S> now by lenz's law, the current in stator will produce the magnetic field which opposes the cause "THE MOVEMENT", so it will try to stop the rotor... and the till the rotor is rotating, the current will flow in stator. <S> also, the force is dependent on load also... <S> greater the load, greater the current is drawn from stator, the greater will be the field created by stator, but to feed the greater load, the greater energy input from rotor side is also required to maintain the system at rated operation. <S> thats how it works!!!
|
All generators work such that the output current produces a force that opposes the rotation.
|
Implementing guard trace/ring in PCB design I have read here and there some articles about pcb guard trace/ring. But none of them discussed how to correctly implent it. What I could find were some pictures and comparison that cant help me at the moment! What I would like to know is how can I make the following circuit more current-leakage proof (In design case - I know that PCB material and SIR plays a big rule). The circuit will supply up to 30V through resistors and each resistor is connected to capacitor. Each Capacitor is then connected to a switch matrix and finally single output from switch matrix is connected to a picoammeter to measure the leakage current of the capacitors. I am wondering if I should care about leakage current in the circuit or not! If so, how can I improve it? This is my test circuit: I am thinking of connecting the capacitors just by wire into the circuit, that is one pin of capacitor soldered to by a wire in the little circuit I designed, and the other pin also with a wire soldered to BNC shield that goes to picoammeter and is in common with voltage source (SMU) <Q> A guard ring is traditionally used to protect high impedance nodes in a circuit from surface leakage currents. <S> The guard ring is a ring of copper driven by a low-impedance source to the same voltage as the high impedance node. <S> This would typically be the input pin of an op-amp. <S> Here's an example of a classic guard ring layout for a metal can op-amp from National Semi's AN-241 <S> : <S> And here's an example of how it would be connected, from Analog's Analog Dialogue magazine : <S> The key feature is that the guard ring is connected to a node that will be driven to the same voltage as the high impedance node being protected, but with a much lower source impedance. <S> Note that not all vendor websites are created equal. <S> Microchip's AN1258 recommends using the high-impedance net to create a guard ring around the low impedance nets --- don't do this. <S> Now to your specific case. <S> While the undriven side of your capacitor is not strictly a low-impedance node, since the ammeter itself should provide a fairly low impedance path to ground when you're measuring, it's still going to cause measurement errors if any current should try to reach ground through that node instead of by another path. <S> It wouldn't hurt to add a ring around the node like this: <S> Unlike in another answer, I wouldn't include the driven side of the capacitor within the ring, since that's a low impedance node, being driven to a fairly high voltage. <S> However, you've indicated the net in question isn't even physically located on the PCB, so this advice is largely moot. <S> Being as the high impedance net is basically floating in air, it should be well-protected from leakages in any case. <A> Your power supply is DC. <S> You wrote that you'll be measuring the output with a picoammeter. <S> That implies that your current is in pA range. <S> Guard ring protecting high impedance circuit is not a bad idea idea. <S> So, what is high impedance in your schematic and what isn't? <S> Picoammeter input, certainly is high impedance. <S> 12V power supply, certainly isn't. <S> Here's how I would do it. <S> Notice that the ring runs between the pins of R1, between the pins of S2, between the pins of the picoammeter: What to connect the ring to? <S> The guard ring has to have low impedance path to ground. <S> That way, the leakage between the signal and the ring will be small, because the voltage difference between them is small. <S> Sometimes, connecting the ring to GND works. <S> Sometimes, you need a guard amplifier (look it up). <S> -Nick <S> P.S. Methods for reducing DC leakage are different from those for combating conducted or radiated EMI. <A> Please use the following link for this purpose: CHAPTER 12: PRINTED CIRCUITBOARD (PCB) <S> DESIGN ISSUES <S> This will be very useful for you. <A> The guard ring is (somewhat) not needed. <S> For EMI reasons you don't want to run signals or power close to the edge of the ground plane. <S> If the signal was routed (on a different layer) up to the edge of the ground plane then there is the possibility of EMI squirting out the side. <S> By simply not routing that signal all the way to the edge you can dramatically reduce the EMI that's spitted out. <S> I forget the exact distance from signal to ground plane edge, but it is somewhere in the neighborhood of 0.050 inches. <S> Of course, this makes one wonder what to do with that 0.050 inches with nothing in it. <S> What some PCB designers do, including me, is to put a ground trace around the perimeter of the ground plane and then tie that trace to the plane using vias approximately every 0.25". <S> I don't honestly think this improves things over just having that gap, but it seems good in theory, doesn't hurt things, and at least provides a good reminder to not route signals there. <S> Power layers should be done similarly, in that they should be pulled back from the edge of the ground plane. <S> Like with the signal layers, it provides a good way to "automagically" pull the power plane back. <S> This method does not apply to PCB's that don't have a ground plane. <S> Putting a ground ring around such a PCB might make things worse, not better, if that ring ends up carrying any current. <S> I don't believe that this will do anything for leakage, although EMI works both ways. <S> Any circuit that radiates EMI can also receive EMI. <S> So from this perspective it might make your design more tolerant of external EMI interference.
|
The best approach is to have the guard ring at approximately the same voltage as the signal, which the ring is protecting. I just go ahead and put a ground ring on the power plane layer, and tie it to ground like before.
|
What is the best website to place orders for electronics components online in the USA? I need to start ordering electronics components and I am trying to figure out who to use. I want to pick one website to use for all my needs, so they need to have a diverse selection of components, competitive pricing, and relatively quick shipping. I don't want to shop around to find the lowest cost parts, I just want a reliable company that I can rely on so I don't have to shop around each time I want to go online to order components. <Q> very good <S> www.digikey.com. <S> They have a vast catalog range, much is in stock, prices are usually in the very good to acceptable range. <S> Delivery is rapid and they tend to pick and dispatch same day in almost all cases. <S> Do not be put off by where their HQ is :-). <S> RS are the masters of a vast stock and usually premium prices, Farnell are a successful RS wannabee. <S> , ... <S> Findchips supplies information for these suppliers: <A> Your geographical location might be relevant, and the general type of components you expect to buy. <S> Personally I like Mouser (minor hassle: filling in the Credit Crad details every time) and Reichelt (but <S> frequently the have no stock for something, then they just delay the order untill they have it all - no partial shipments). <S> I displike DigiKey because (for me, I am in the Netherlands) <S> they want to know what I am going to use certain components for (which I don't want to tell), but they don't tell you up front for which ones! <A> You generally won't find a single site for everything. <S> I would agree with the sites others mentioned (Digikey,Mouser, etc.). <S> Of course, it all depends on what you are looking for... <S> some specialty shops may be more in tune with your specific needs. <S> In addition, I was surprised at what I could find on Amazon... and how much of it is stocked in-house with free super-saver shipping for orders over $25. <S> Picked up some Arduinos, soldering equipment, passives (resistors and such), tools, etc. <S> for very good prices.
|
Look also at Mouser, JameCo, Amazon, ebay !!! There are many good companies and you will grow a favorites list with time, but I (in New Zealand) find Digikey BUT look at Findchips which will give you some good ideas.
|
USB B, mini B, or micro B for product design I'm trying to decide which connector I should use for a USB peripheral I'm designing. Is there a guide for choosing one? The device is a portable electronic scoreboard that's 16"x10"x1". It will be outside, possibly in wet conditions. It will not draw power from the USB. The only thing the USB will be used for is slow terminal serial data back and forth. <Q> Full-Size USB B Full-Size USB B Full-Size USB B Full-Size USB B Full-Size USB B Full-Size USB B Full-Size USB B Full-Size USB B Full-Size USB B <S> The full-sized USB B connector is far more reliable then mini or micro B connectors. <S> It's also much more mechanically robust. <S> Really, the only valid reasons for using the Mini or Micro connectors are space-related. <S> If you have the space for a full-sized conector, use it! <S> If your device is going to be used in really wet environments, Bulgin makes some very nice IP68 rated (hermetic) USB connectors. <S> Datasheet , product page . <S> Digikey carries them , which is nice. <S> They're slightly expensive (well, about $25 for a mating pair), but very well made. <A> Mini-USB is a disaster waiting to happen (in my opinion and experience). <S> Insertion-removal lifetime is low - one of the major factors addressed with micro-USB was an increase in cycle life. <S> If I was doing what you describe I would choose USB-B (ie full size) as the working choice for development and only change it if there were major reasons to. <S> I had just this choice a few years ago and went with USB-B. <S> The product didn't eventuate but <S> I anticipate using it in a similar role in future. <S> Micro-USB is superior to Mini in many aspects. <S> Current capacity is down in most cases but some manufacturers make (or claim) higher current versions. <S> Micro-USB is THE new international cellphone charging standard connector. <S> Doesn't affect you application directly but does mean that NOT being Micro-USB compatible will prevent a few random plugins. <S> Regardless of what you choose, if it can get wet it should be capped in a manner that effectively gives it a formal IPxx rating that suits your need. <S> Mechanically, USB-B is very robust and resistant to everyday use. <S> I have not yet seen a damaged Micro-USB connector, but they fail the-soldier proof test and probably also the hurried person in the dark test. <S> Even USB-B would benefit from a connection guide that increases the do-it-in-the-dark connection success rate. <A> I'd like to point out one thing that was overlooked in other answers and that is the target audience. <S> We already know that mini and micro B plugs are small and therefore in some situations they are also more difficult to connect. <S> For example if the device is going to be put in a corner somewhere and not be moved much, full size B would be easier to connect blind, that is to say without moving the device so that the receptacle can be seen (as is the case with printers for example). <S> Some people also may have problems using smaller USB plugs. <S> I know lots of people who can plug a full size USB cable without even looking but must get their glasses to use mini or micro sized connector. <S> If you don't need the space, why risk having your user curse you for putting a smaller connector in place of larger? <S> Another point of interest would be the design of common cables too. <S> Full size B cables are often easier to obtain in greater length than mini or micro cables and since device is going to be outside, that could be a bonus point. <S> Another point that needs to be considered for a device is the flexibility of the cable itself and the mass of the device. <S> In some cases, if the mass of the device is such that a rigid cable may move the device, it may be a good idea to use smaller connector because they often use less rigid cables. <A> This is much up to what you want your product to be like. <S> All of them will be able to pass your data equally fine, but as you know there are mechanical differences. <S> USB B is going to provide the strongest connection for you as far as it is difficult to accidentally pull out. <S> However, this might also be an issue for you as someone tripping over a cable might pull the whole thing down instead of just having the cable pull out. <A> USB B. You aren't pressed for space. <S> Mini B isn't used much; micro B is much more common of the two smaller versions. <A> Even better, you could do away with the USB connection all together and use something like a Bluetooth Serial Modem or an XBee. <S> This has the added benefit of not needing to be in super close proximity, and there is no USB port to make waterproof.
|
Mini B generally is able to hold in place better then micro B, but this depends a lot of the actual cable and plug being used.
|
tiny RC receiver for bristlebot? I made a small bristlebot . my version can turn left and right using two vibrators and is controlled by an ATTiny uC. I would like to add remote control functionality so i'm asking what's the simplest and smallest component(s) I can add to my bristlebot to make it remote controllable? (the size of the actual remote control device doesn't matter, just the components on the bristlebot).i want to use radio control, not IR.I have to say, comming from the digital side, I have no experience with analog circuits and RC sender/receivers so far. thanks for the hints <Q> I recently finished my library for the RFM70 radio module, check <S> http://www.voti.nl/rfm70 <S> I have tested it (ao.) with an arduino. <S> That module is cheap, and has a digital interface. <S> Negative points might be short range, and 3V3 operation. <S> But why do you rule out IR? <A> Something along the lines of a couple of Alpha-TRX433S would probably do. <S> They are simple transceivers with an SPI interface. <S> If you want cheaper eBay is your friend - this RF-2400P <S> looks to do the same thing as the above, but won't come with a nicely written datasheet. <S> EDIT <S> - It turns out this one <S> does have <S> one - User834 has kindly provided a link to the R4-2400P Datasheet . <S> Anyway, the reason for the initial assumption was that often the minor electronic products sold on eBay don't come with anything much in the way of documentation, which is something to weigh up when choosing where to buy from (plus waiting times, customer support, etc) EDIT 2 <S> - Along with the datasheet, on their site they have some other RF-2400P documents/code examples (see pages 2 and 3) which may be of interest. <S> You haven't mentioned exactly how the bot is controlled at the moment though. <S> I am assumimg you can interface with the ATtiny's SPI. <S> If not let us know what you have available on the bot to interface with. <A> Smallest & simplest would be infrared, not RF. <S> Look at Vishay's range of IR receivers
|
You could use a existing TV remote, saves you half the effort.
|
Car subwoofer powered by mains voltage I have a car active subwoofer, 550w RMS, 1600w peak, which I would like to use in my home, and power it from 220v mains. ~133A is a fairly large ask from a transformer, I think, and even 46A seems quite high. I have a couple of computer PSUs knocking about, and I was wondering would it be possible to use a pair of these to supply the power required? Would it be as simple as connecting the transformers in parallel, to supply the subwoofer, or do I require something more complex? Edit: Ok, when I say power, I'm talking about the feed used to operate the sub/amp. The +12v terminal on the unit. I'm not talking about the signal input. The two wattage values, are whats printed on the underside of the sub. (as well as 4Ω impedance & 12v DC input) The figures I was pulling out, in regards to current draw, were 1600w/12v = 133A and 550w/12v = 45A , perhaps I'm well wrong with these though? Added: As people seem to be having trouble understanding this material. and as it's not clear why they are, here is a summary. A piece of equipment is usually operated in a car and powered from the car's 12V battery supply. The equipments purpose is to deliver audio energy into a load - usually the very low frequency end of 'music'. (It's a powered amplifier and is usually called a "subwoofer" but that tends to confuse people - think of it as equipment that needs 12V power. The equipment's rating plate says that it's maximum power output level is 550 Watt RMS and that peak power output is 1600 Watt. The Watts is expressed in RMS power as it's an amplifier but we can think of this as DC load with fair chance of approximate correctness. Music ratings being what they are the true power MAY be lower or far lower, but start at the stated levels initially. As M. Ohm says that I = Power/Volts, this suggests that at 550 W the current is P/V = 550/12 = 45.8A = 46A and at 1600 W the current is P/V = 1600/12 = 133A The questioner wants to know how to power this equipment directly from an AC mains powered supply. <Q> From an electrical and practical point of view, it's silly. <S> Assuming you want to save money then the best way would be to use a car battery plus battery charger. <S> The battery provides energy storage for the peaks but the charger keeps it going. <S> There are lots of things wrong with this approach. <S> The most important one is dealing with the potential for the battery to vent corrosive gases. <S> But it will provide 1600 Watts for short times. <S> Another issue is the cost of a battery and charger could cost as much as the correct solution-- unless you have it already. <S> The correct solution is to buy a real amp that runs off of the AC mains. <S> It will be plenty powerful, have better audio quality, and be more reliable. <S> Something like the QSC G5 or G7 amp. <S> (Disclaimer : I work for QSC, so I'm biased!) <A> Sounds like you need a 12V supply that can source at least 46A continuously (for the 550W), with capability to give out 133A for brief periods of time (for the 1600W). <S> That's a lot of juice at <S> 12V. Computer power supplies are what's known as 'switching' regulated power supplies. <S> They are a fair bit more complicated than transformers, which are relatively simple devices. <S> You can't just parallel computer PSUs, because tiny differences in their regulators' voltages will cause them to battle each other. <S> If you can't find a commercial 220V to 12V supply that has the necessary current rating, you could always keep a car battery topped up with an automotive battery charger, and just drive the unit from the battery. <S> After all, it was designed to run from a 12V battery. <A> Affordable (30 dollar Chinese) switching-type power supply unit will deliver 12 volts DC up to 20 amps - then the fuse blows. <S> That current represents 240 watts, which will translate to about 220 watts maximum audio with an efficient amplifier (rms watts not the meaningless peak value). <S> On a big speaker chassis with good magnet <S> that's pretty loud in the home. <S> I use such a rig for organ, down to 16Hz where of course human ears are relatively deaf. <S> Not safe to parallel switching power units, as already said here, <S> but you might parallel several identical 12 volt traditional lighting transformers (scrap heap stuff) to get the amperage. <S> Very big and heavy. <S> Of course, you'd need a rectifier to convert AC to DC (cheap 60 amp bridge is good) and chunky smoothing capacitors. <S> I have not actually tried multiple trannies - and having written all this, probably won't!
|
There is only one good reason to power a 500+ Watt car amp from AC mains: to save money by using what you have.
|
How can I tell if a chip has ESD damage? I have a several chips (microcontroller, PIC16F1939) some of which have weird behavior (random resets, some pins pulled high some of the time). All of them are running the same software. I suspect that those chips have ESD damage (or some other internal damage). How can I be sure? X-ray? Any other method available? <Q> The only reliable method I am aware of is decapping the IC (i.e. etching away the plastic housing) and using a microscope. <S> It comes down to looking for visual clues and typical patterns: Overcurrent burns look different than ESD zaps on the integrated structures. <S> The trouble with ESD damage is that it can be very subtle. <S> You can get anything between a slightly unusual behaviour (e.g. a small change in a MOSFET's gate threshold voltage) and a complete failure of the entire device. <A> They include X-ray, Microscopy, IR Thermal Analysis, Curve tracer, TDR, etc. <S> This sample report of failure analysis is quite informative, detailing several different methods used to (eventually) find a fault. <S> However, I would check the code carefully to make sure there isn't an intermittent bug responsible for what you are seeing, or a problem with your circuit (e.g. EMI, power supply problems, etc) <S> Maybe try a few simple test programs which replicates various parts of the full firmware and see if the problem is specific to one part (or is present all the time) <S> Also check on Microchips site for any known silicon issues, I have been caught by this a couple of times in the past. <A> Does not need to be ESD damage, could for instance be mechanical or caused by a >> 5V power. <S> Sometimes damage might be easy to prove (like a pin refuses to driver high), but in general it is very very difficult to prove or disprove the correct function of a complex chip. <S> If your time is worth anything: throw away any suspect chips (or at least mark them and set them aside for very low priority work). <S> PS are you very sure you are not bitten by the read-modify-write bug/feature/pitfall?
|
If you are 100% sure you run the chips in the same circuit and conditions then the chip is the most likely culprit. I don't know of an "easy" way to confirm ESD damage - there appear to be quite a few methods used to detect failure in ICs, all of them pretty expensive.
|
Differences between thermistors and thermocouples As I understand it, both thermistors and thermocouples are temperature sensors. So what are the advantages/disadvantages of using one over the other to measure the temperature?What are the specific applications for either of the sensors? <Q> Thermocouples: <S> wide range of temperature sensing <S> (Type T = -200-350°C; Type J = 95-760°C; Type K = 95-1260°C; other types go to even higher temperatures) <S> can be very accurate sensing parameter = <S> voltage generated by junctions at different temperatures <S> thermocouple voltage is relatively low (4.3mV for Type T thermocouple with one end at 0 C, other at 100 C, so that's 43uV/C tempco) mostly linear Thermistors: <S> more narrow range of sensing <S> ( Quality Z thermistors <S> spec'd at -55 to +150 C) sensing parameter = <S> resistance <S> usually very nonlinear NTC thermistors have a roughly exponential decrease in resistance with increasing temperature good for sensing small changes in temperature (unless you are careful in your signal conditioning, it's hard to use a thermistor accurately and with high resolution over more than a 50 C range). <S> sensing circuit doesn't need amplification & is <S> very simple (voltage divider with reference resistor tied to reference voltage usually is sufficient) – see my blog for more information about signal conditioning . <S> accuracy is usually hard to get better than 1°C without calibration <A> Thermocouples can work at much higher temperatures than thermistors. <S> They are commonly used for temperature control in heating systems. <A> Different PrinciplesA thermistor is an electrical resistance, made of semiconducting material, that can be wired into a circuit. <S> The semiconducting material is usually made of manganese oxides and nickel oxides. <S> The thermistor works based on the principle that the electrical resistance of this material changes with temperature. <S> A thermocouple, on the other hand, is made of two wires of different metals, such as copper and iron. <S> The equal length wires are connected electrically together at one end and open at the other end. <S> The principle is that if the open ends of the wires are at a fixed temperature and you change the temperature at the connected end, this generates a voltage between the two wires at the open end of the thermocouple. <S> Measuring TemperatureWith <S> a thermistor, you could use an instrument that measures electrical resistance and connect it across the thermistor. <S> You will measure a resistance change with a change in temperature. <S> If you then refer to a table that lists temperature change versus resistance, you can find out the temperature from this table. <S> In the case of a thermocouple, you will use an electrical circuit to measure the difference in voltage between the two wires at the open end and use this to measure the temperature difference between the two ends of the wires. <S> Thermistor or Thermocouple?In general, thermocouple readings are more precise than thermistor readings. <S> However, they react more slowly to changes in temperature. <S> Thermistors are also more expensive generally than thermocouples, due to the need for an external power source and the device's circuitry. <S> The decision to use one or the other will depend on your specific needs. <A> The resistance of a thermistor varies with temperature. <S> putting it in series with a resistor to form a voltage divider and you can measure temperature with a voltmeter. <S> For even more accurate measurements it can be part of a Wheatstone bridge. <S> They are often used as an over temperature sensor. <S> A thermocouple is a pair of dissimilar wires connected together. <S> When heat is applied a small current is generated. <S> The amount of current is roughly proportional to temperature. <S> They work at higher temperatures than thermistors. <S> A common use for a thermocouple is a detector on a gas pilot light. <S> If the pilot light goes out, the thermocouple cools down and the gas supply is turned off.
|
A thermistor is a temperature-sensitive resistor, whilst a thermocouple generates a voltage proportional to the temperature.
|
What type of glue would you use on set potentiometer screws on a PCB? I want to set my potentiometer screws and then glue them in place so they will not be readjusted by the end user and I have seen green adhesive on them before? Any suggestions as to what is best to use on this type of application? Thank you. <Q> Loctite is often used. <S> However there are many types. <S> In general you hear people talk about blue, green and red (242, 290, and 271). <S> Blue prevents inadvertent movement due to vibration and such. <S> With moderate force the pot could be turned. <S> Green is stronger, usually you need to apply a little heat before it can be turned. <S> Red requires a lot of heat and would probably destroy the pot. <A> You can get inexpensive guns like this one at any hardware store. <A> On trimpots I use automotive touch-up paint, available inexpensively in a variety of colors, and it comes with an appropriate applicator brush. <S> I'm really not worried about the pot moving by itself in most cases, I'm more concerned with detecting some dufus fiddling with the calibration settings (often to make up for something external that is wrong, such as a bad sensor or improper compensation). <S> In the instrument business we refer to such a change in calibration as " screwdriver drift ". <S> Have a unique color helps ensure that the fiddling can be reliably detected. <A> If you want something temporary, hot glue is fine. <S> If you want something permanent, the canonical brand name for threadlocking compounds is Loctite. <S> Not sure which Loctite compound to recommend -- they're usually not cheap ($40-$50 per 50ml bottle), but they're designed to retain mechanical screws despite vibration & temperature cycling. <S> For a potentiometer, you could probably get away with general-purpose cyanoacrylate (aka Superglue sold in most stores). <S> Something to be aware of though: Whatever you use, make sure it's not corrosive. <S> From Murata's website : <S> Can the rotor and adjustment shaft be thread-locked after adjustment? <S> The only products which can be thread-locked are hermetically sealed products whose wiper and resistive element are not exposed. <S> Use thread-locking adhesive which does not contain substances that can corrode metals, such as chlorine and sulfur. <S> When using thread-locking adhesive, carefully evaluate its performance on an actual potentiometer. <A> Don't use loctite! <S> I purchased an amplifier with red loctite on a tiny pot with no sealing. <S> This pot was to adjust bias, so I needed to move it when I changed power tubes. <S> I managed to get the pot moving without breaking it by securing the body with pliers while I turned the moving part. <S> Unfortunately, that loctite went right into the pot conductive area, and screwed up the pot completely over one half of its range. <S> I can no longer use that range on the pot. <S> This is just one example, but there is more information available from the manufacturers of potentiometers and adhesives. <S> One solution is a good quality pot that does not turn easily by itself. <S> Or you can use a pot with a smaller range in series with a fixed resistor, if you are worried about users choosing a bad range. <S> Another option is to use a sealant specifically designed for potentiometers. <S> "Red" Locktite, and other commonly available sealants known by the name "Locktite", is for wicking into mechanical threads. <S> However, the name "Locktite" is a brand name and not a specific product. <S> The same company produces many types of adhesives, some of which are appropriate. <S> A thicker product probably has less potential for damage. <S> According to Murata, a trimmer potentiometer manufacturer, " The only products which can be thread-locked are hermetically sealed products whose wiper and resistive element are not exposed. ."
|
Hot glue might be your best bet, since it can be removed if one ever has to readjust the setting for some reason. According to the manufacturer, the product Locktite 425 is appropriate for sealing potentiometers.
|
Changing a Signal's DC Offset I have a square wave being generated from a waveform generator oscillating between 0 V and 5 V. The generator does not support negative DC offsets. I need to shift this signal down to be centered about the 0 V value, i.e. oscillating between -2.5 V and 2.5 V (AC Coupled?). What are ways of doing this? (Forgive me if I mess up any terminology I'm a software engineer by trade.) <Q> Capacitive coupling has been suggested, but this has two big disadvantages: <S> Your signal is no longer a square wave <S> It will only center your signal around 0V if the duty cycle is 50%; you'll see the signal go up and down if you play with the duty cycle <S> A good function generator will have a potmeter to set an offset to the signal. <S> Connect signal and offset voltage each via a resistor to an adding point. <S> Very simple, but this will change the signal's output impedance. <S> A better way is to do this actively: Here signal and offset each see only the input resistance to the virtual ground, so that their resp. <S> levels don't influence each other. <S> The opamp will give it a low output impedance. <S> You may want a fast opamp (high Gain Bandwidth Product, GBP or GBW) depending on the square wave's frequency. <S> Also keep in mind that this inverts your signal. <A> What you need to do is simply remove the DC <S> offset all together, not supply a negative one. <S> This is known as AC coupling. <S> If you run the output of your square wave generator through series capacitor, it should do what you need. <S> This will however be at the expense of making the square wave less square. <S> An example circuit is shown below for you: <S> And the output would look like this (Green Trace = <S> Generator Output, Blue Trace = <S> Voltage Across Resistor): <S> You will probably get a little voltage loss (meaning your peaks will be a little less that <S> +/- <S> 2.5V) since no capacitor is ideal, <S> but you can get a pretty good square wave output if you get the right value capacitor. <S> You'll have to experiment and see. <S> Usually, the larger capacitor value you choose, the closer your output waveform will be to the original for any frequency a benchtop <S> square wave generator is outputting. <A> You can couple it with a capacitor to the load, but depending upon the load impedance and the capacitance it will roll off the edges of the squate wave. <S> If that is a problem you can add a buffer amp stage to match the impedance. <S> The capacitor will give you the expected AC couple your looking for. <S> This is an easy circuit to simulate in a spice program such as LT Spice (free) . <S> You can see what effects frequency, capacitance and load impedance has on the circuit with the built in oscilloscope.
|
One way to do this yourself is to make a resistive voltage adder.
|
Soldering an AC power cable Not sure if this should go here or in Super User, but I'm primarily concerned with how safely I can solder an AC power connection with little/no experience. So what exactly am I doing and why? I am looking to make some minor modifications to a home-theatre PC, one of which is relocating the power supply to inside the chassis. In doing so I would like to create a false PSU "plate" that I can screw into the back of the chassis to make it look as stock as possible and maintain an external AC power connection. I've already cut out the back of a cheap power supply and all I need to do now is cut an AC power cable and solder it to the female plug so I can connect that to the power supply inside my chassis. But are there wattage/safety limitations with different types of solder? Are their certain types of solder that are better than others for handling AC current or just power in general? I have not purchased a soldering iron/gun or solder or anything yet, so if one thing works better than something else I'd rather know before I spend my money. I'm not worried about how good/bad the actual soldering work looks once I'm done since it will be inside the case, but should I "finish" it in some way to make it safer/insulated? Like wrap it in electrical tape? Or if that's a stupid idea, heat-shrink tubing or glue or something else? Any insight/suggestions would be appreciated! EDIT: One of my concerns is that I would like to be able to draw a few hundred watts over this connection in case a turn this into a little living-room gaming rig in the near future. Not sure if/how that would affect anything. <Q> Are you going to have the AC jack (power entry module) on your new back plate? <S> If so, what kind of terminals does it have on the inner side? <S> A photo or a pencil sketch of your new back plate could help us visualize the problem. <S> Without knowing anything else, I would recommend splicing the wires with a crimped butt terminal ( like this one or this one ). <S> It's a thin-wall metal tube inside of an insulating plastic tube. <S> Each end of the tube can be crimped onto a wire. <S> Here in the US, you can get them in any hardware store. <S> Crimped connections are less brittle, compared to soldering. <S> Heat shrink is a more reliable insulation than tape. <A> It should not be a problem soldering that. <S> I think that heat-shrink tubing is the right way, maybe with glue on the board <S> but i suggest avoiding glue if you want to be able to do some maintenance. <A> My understanding is you never solder an AC cable, a failure of the end device drawing too much current can melt and arc the solder
|
Splicing plus soldering works too.
|
If I'm going to use a potentiometer as an adjustable voltage divider, does the tolerance or resistance matter? Here's what I working with. I'm researching some three terminal potentiometers for use as adjustable voltage dividers. The outer terminals are connected to 0V and 5V respectably, so as I turn the knob, the wiper voltage sweeps from 0 to 5V. My question: Does the tolerance of the potentiometer (5%, 10%, etc.), or the resistance matter for this application. I'm not sure about the tolerance, but I'm pretty certain that the resistance will only affect the size of the load that the wiper can drive (impedance and what-not). <Q> If you are just taking the voltage into a high-impedance load, then the value of the pot doesn't matter at all. <S> 1k and 10k pots will both give 2.5V at 50% rotation. <S> It is a common pattern in electronics to make things ratiometric so exact values don't matter. <S> In this case, the tolerance and temperature coefficient of the pot is completely canceled. <A> The tolerance is a plus/minus percent rating of the total resistance. <S> I.E. <S> A 100 Ohm pot with a rating of 10% could actually be a 90 Ohm pot or a 110 Ohm pot. <S> Figure out what your current needs are and pick your pot based on that. <A> The tolerance of your divider will be driven by how accurately you adjust the potentiometer (by hand). <S> Without knowing anything else, 10% tolerance in the total resistance of the potentiometer shouldn't make difference. <A> If you want your pot to translate angles into resistance ratios, you don't need to worry about the first spec at all, but the second may be very important. <S> Many pots are used in situations where such accuracy is not really important because a human being will simply turn the knob until a desired brightness, sound level, or other adjustment is achieved. <S> On the other hand, if you are using your pot for positional feedback in a situation where accurate absolute positioning is required, a pot where a ten-degree rotation in one area will affect the pot's ratio by 3 percentage points but a similar rotation in another will affect it by 5 percentage points, could yield inaccurate positioning behavior. <A> You did not ask, so I hope you know that the load on a voltage divider is very important. <S> If you do not understand it, then work on getting informed. <S> The important spec. <S> I think you need is the taper of the pot. <S> You probably want a linear taper and these are usually specified as a percentage. <S> 10 turn pots are more finely adjustable, bu may not be more linear.
|
As you are using a pot to give your voltage divider fine tuning ability, you won't need to care if you are a little short/long on the top end. Some pots have a tolerance value for overall resistance, as well as tolerance values for angular/ratiometric accuracy.
|
Question about the output voltage of an op-amp. (ua741) When i hook up my opamp to a 9 volt battery (like in the image below), i get 8 volts from the output pin. It gives the same reading when i attach both the inverting and non-inverting pins to the 9 volt rail.Shouldn't it be closer to 0 volts or few milli volts? Why is the opamp behaving like this? Is it broken? Thanks in Advance. <Q> As Oli said, in the first case you are operating it out of spec since the input common mode range does not extend to the positive supply. <S> In the second case the inputs are just floating <S> so you don't know what voltage they end up at. <S> However, even if you were to short the two inputs together and hold them somewhere within the valid range, like 4.5V, you would still likely not get 0V out. <S> This is essentially a small error voltage added to one of the inputs. <S> Let's say for example this opamp this day at this temperature at this input voltage has 2 mV input offset. <S> When you tie the two inputs together, the opamp will see this 2 mV input instead of the real 0V input. <S> That apparent input will be multiplied by the opamp's open loop gain, which is probably at least 100k or so. <S> 2mV <S> * 100k = <S> 200V. <S> Obviously this amp can't produce 200V, so it will drive it's output as far as it can towards the positive supply rail. <S> Note that the input offset could just as well have been -2mV, in which case the output would drive as far as it can towards the negative supply rail. <S> Input offset voltage is a reality of opamps, and is one of the issues that need to be considered in designing a circuit with them. <A> In both cases the output will be undefined since you are operating it out of spec. <S> For it to operate correctly as an amplifier you need to provide negative feedback . <S> As you have it it will operate as a comparator (a valid configuration) but you still need to keep within the common mode input range. <S> As far as I know the 741 is not rail to rail input so setting both inputs at one rail (e.g. 9V) will produce undefined results. <S> Leaving the inputs floating as in the second diagram will also produce undefined results since there will be slight offset between them which will cause the output to saturate (in either direction, which one is unpredictable) <S> So in either case since there is no negative feedback to control the huge gain of the opamp, it will saturate. <S> In your case it is saturating at the positive rail (or just under since it's not rail to rail output) <S> To check the specs for yourself here is the 741 datasheet . <S> You will need to learn about what each parameter means to use opamps successfully. <S> It may seem a little daunting at first <S> but you quickly pick up which ones are important for different circuit requirements. <S> I suggest you pick up a good book on opamps and study the common configurations and how they work. <S> All about circuits has a good section on opamps for starters. <A> Oli and Olin have explained well the fact that your output is influenced by the offset voltage; the reason because your Opamp saturates at 8V instead of 9, is that it's an old opamp, not designed for low voltage, is not a rail-to-rail opamp. <S> More in detail, it means that the inner circuit has an output stage (transistor Q14, Q15, Q20 in the figure) with resistors that offer an output protection from short circuiting. <S> Basically the current on R6 determines the voltage between base and emitter of Q15, that drains current from the base of Q14 so basically limiting the output current to avoid burning components. <S> But that also means that the maximum output voltage achievable is + <S> V - Vcesat - Vbe that is about <S> +V - 1V <S> The same applies for low voltage, and that means that it's not rail-to-rail.
|
This is because the opamp is not perfect and has some input offset voltage .
|
Is there any difference between "induction" and "resonant" wireless energy transfer? This article compares two systems for wireless energy transfer - one is by WiTricity and another is Bombardier PRIMOVE. I've read their descriptions thoroughly - to me they both look like resonant inductive coupling systems. Yet the article says that WiTricity system uses resonance rather than electromagnetic induction and is more efficient because of that. Is such comparison valid? Are there indeed "induction" and "resonance" wireless transfer systems or is it just the same thing being marketed differently? <Q> In my opinion, for the last thirty years, nearly all magnetic induction energy transfer systems place a capacitor to put the secondary coil in resonance. <S> This achieves better power transfer efficiency and everybody knows this. <S> We have been doing this in the medical device industry for [at least] the last two decades. <S> This is just obvious. <S> Witricity and others have invented this term magnetic resonance to make it sound like they are doing something nobody else has. <S> Don't believe them. <S> You also hear A4WP using this term to differentiate themselves from Qi. <S> The fact is that Qi standard allows the designer to use either resonant circuits or not. <S> So plenty of Qi systems will use what Witricity and others call "magnetic resonance" to provide more efficiency transfer. <S> Some will opt for a cheaper design that gives shorter range. <S> In conclusion, Witricity didn't invent anything. <A> I think we can classify two kinds of wireless power transfer system using magnetic field: Using non-resonant inductive coupling, like the principle of electric transformers. <S> Using resonant inductive coupling, like what Witricity did. <S> They both used a magnetic field for power exchange, based on induction principle. <S> The difference is resonance and non-resonance. <S> The terms "induction WPT" and "Resonance WPT" look not clear to differentiate them. <A> I didn't follow the links, but inductive power transfer systems work like transformers. <S> However, since the sender and receiver usually need to able to be disconnected by end users, serious compromises were made in the magnetic coupling. <S> This means the transformer needs to be considerably larger than a dedicated fixed transformer where both sides can be wound around the same core of some convenient material. <S> As a result, these inductive power coupling system genrally use high frequencies. <S> Another trick they can use is to resonance. <S> If the whole system resonates at a particular frequency and it is driven at that frequency, it is possible that the power can be tranferred a bit more efficiently. <S> Resonance by itself does not guarantee higher efficiency, but if exploited properly I can imagine that it could.
|
Using resonant circuits in magnetic induction is well known and is used all the time.
|
Drive LEDs from USB What do i need to make a USB device that has 4 LEDS that I can control from a PC software that I will build. I just need to make a software with 4 buttons (on/off) each button to control a single LED. Any links for how to build this simple USB circuit would be nice. I have done such a project before for the old LPT port, I had no need for any circuit, but this USB thing has only 4 wires, 2 data and 2 power I guess. <Q> <A> There are various ways to do this. <S> FTDI makes chips that connect to the USB on one side and various things on the other side. <S> I haven't looked, but it's quite possible that they make a chip that has a few <S> I/O lines you can wiggle. <S> For a more general purpose solution, you can use a microcontroller with a USB peripheral built in. <S> That will allow you to eventually do more complicated things than simply drive 4 digital outputs. <S> Our ReadyBoard-02 might be useful to you. <S> It comes with a PIC 18F2550 and all the circuitry around it to make it work just from a USB connection. <S> The example firmware and host test program available via free download can drive 8 output lines from a command line on the host right out of the box. <S> The firmware and application software are open, so you can use them as starting points for your own when you want to make it do unique things later. <A> The most easy solution would be FT232 GPIO pins. <S> Exactly 4 afaik :) <A> Here is a little board I designed which will do what you want, with a few changes to the software. <S> A PICkit or some other PIC programmer will be required.
|
It could be done with any microcontroller with USB capability, but your best bet if you are not too familiar with such stuff is probably to use something like the FT245 , which is an easy to use USB to parallel IC.
|
Is full wave rectifier better than half wave one? I am curious if there are practical differences between a DC power supply based on a half wave rectifier or a full wave rectifier. I mean I have a few small DC power supply units which should give 12V 0.1A each. They all have a transformer 240V->18V, then 1 diode or 4 diodes, then 78L12 (0.1A regulator) and one or two capacitors (typically 220uF or 470uF). My question is if the power supply can give a good quality DC voltage with just a half wave rectifier (a single diode) when a 470uF capacitor and 78L12 is added, or if bridge rectifier (4 diodes) is better. I also have one old 12V 0.2A power supply based on a Zener diode instead of 7812 regulator. It also has 18V going to just a single diode, then 33R resistor which limits current to 0.2 Amp, then Zener diode parallel with a 1000uF capacitor. Again: Would it be better to have 4 diodes there, or is the half wave rectification good enough here thanks to the 1000uF capacitor? (All my power supplies work well, I am just curious "why" and "how" these things work.) Update: I found two more interesting information: Capacitor should be approximately 500 uF for each .1 Amper of output (or more). This applies to full wave rectifier. Since I saw the same values in half wave rectifiers, it isn't enough and they are bad design. 4-diode rectification cannot be used when we want to have a combined 5V/12V output (or any other two voltages) with a simple transformer, because it can't provide a common ground for two different circuits. (A more complicated real example: I have got a power supply with four output wires from transformer -7/0/+7/+18 Volt. Then it uses 2-diode rectification to get full wave 7V output, and 1-diode rectification to get half wave 18V output. The 18V line can't be "upgraded" to 4-diode rectification here.) <Q> Either can work correctly if designed properly. <S> If you have a dumb rectifier supply feeding a 7805, then all the rectifier part needs to do is guarantee the minimum input voltage to the 7805 is met. <S> The problem is that such a power supply only charges up the input cap at the line cycle peaks, then the 7805 will drain it between the peaks. <S> This means the cap needs to be big enough to still supply the minimum 7805 input voltage at the worst case current drain for the maximum time between the peaks. <S> The advantage of a full wave rectifier is that both the positive and negative peaks are used. <S> This means the cap is charged up twice as often. <S> Since the maximum time since the last peak is less, the cap can be less to support the same maximum current draw. <S> The downside of a full wave rectifier is that it takes 4 diodes instead of 1, and one more diode drop of voltage is lost. <S> Diodes are cheap and small, so most of the time a full wave rectifier makes more sense. <S> Another way to make a full wave rectifier is with a center tapped transformer secondary. <S> The center is connected to ground and there is one diode from each end to the raw positive supply. <S> This full wave rectifies with only one diode drop in the path, but requires a heavier and more expensive transformer. <S> A advantage of a half wave rectifier is that one side of the AC input can be directly connected to the same ground as the DC output. <S> That doesn't matter when the AC input is a transformer secondary, but it can be a issue if the AC is already ground-referenced. <A> Simplified explanation: <S> An ideal half-wave rectifier only "uses" half of the AC waveform (hence the name half-wave). <S> An ideal full-wave bridge rectifier will use the entire AC waveform. <S> An ideal full-wave rectifier (with a center-tapped transformer) will also use the entire AC waveform. <S> You can see that that for the half-wave rectifier, every second AC cycle is skipped leaving a gap in the output waveform. <S> For the full-wave rectifier, since the whole waveform is used, the gap is gone (the effective output frequency is doubled). <S> If these waveforms are applied to a capacitor, you can see pretty clearly that for the half-wave rectifier, in order to maintain clean DC, the capacitor would need to be large enough to hold up the voltage during that big gap. <S> For the full-wave rectifier, since there are more 'peaks', the capacitor can be smaller than for a half-wave rectifier at the same power level. <S> There's no need to 'upgrade' the circuit with a bridge. <A> Just to clarify, the transformer doing the voltage stepdown works only on AC. <S> The rectifier converts the AC to DC, which isn't to say that the voltage isn't varying, it's just that the current isn't going both ways. <S> Full wave rectifiers are definitely more awesome than half wave rectifiers because they give you power during both halves of the cycle. <S> They can even correct DC polarity reversal! <A> The rule of thumb I learned in the late '70s was 2000 uF per amp at 60 Hz. <S> That instructor also explained that historically, with the cost being based on using vacuum tube-mercury rectifiers, and with transformer components of copper and steel being cheap, it was an economic decision whether to engineer one or two rectifiers. <S> And time can change the economic basis for engineering decisions. <A> There are a couple of advantages to bridge rectification. <S> One as other answers have already pointed out is that you can get away with smaller smoothing capacitors. <S> Another is that if you look at the input current waveform of a half wave rectifier it has a DC component. <S> This DC component contributes to transformer saturation issues.
|
To your question, a properly-designed half-wave rectifier should have a sufficiently-large capacitor to maintain regulation despite only using half of the AC waveform, so the regulation should be just fine.
|
How to measure the capacity of the battery Instantly? How to measure the capacity of various types of batteries instantly? What kind of measuring device should I use to do so? <Q> It is not possible to measure or guess the capacity of a battery with a single set of instantaneous measurements, like voltage, current, and temperature. <S> At best you can tell how much current is going into or out of the battery a what voltage. <S> However, there is no way to infer capacity from that. <S> If you can control the load, you can get some idea of the internal resistance, but even that would take at least two measurements separated in time and therefore can not be done instantly. <S> And, battery voltage and internal resistance does not tell you capacity. <A> For lead-acid batteries, you can (in theory) measure the density of the electrolyte while it's discharging. <S> Unfortunately there aren't really any practical sensors to do that automatically. <S> (If you have a large battery, you could use a hydrometer.) <S> Also, it doesn't appear to work accurately during charging (at least according to the link above). <A> Lithium Polymer batteries <S> These batteries, which are now used in almost all consumer mobile applications, have a discharge curve like this: (Image taken from http://www.powerstream.com/lithuim-ion-charge-voltage.htm ) <S> So, to a certain point, it's possible to determine the charge level of the battery just measuring the voltage; since the relationship is not linear, a look-up table or something similar is used to determine the charge from the voltage measure. <S> The problem is that with aging, the curve changes, as the battery life vbecome shorter; if the values in the look-up table are not updated with a calibration, they will start to give wrong values. <S> As an example, it might have happened to you that your old cellphone says that the battery is half charge and after a few hours you find it almost completely empty. <A> It is not at all a perfect way to measure but it gives a good hint about the "life-force" of the battery. <S> You could do this to other types of batteries as well <S> but some batteries like LI-ion will die and might explore if you discharge them at a too large current <S> so DO NOT try this with random battery types.
|
The best way to do this for at least lead-acid batteries is to load it at 100A for about 10 s to see what the voltage will sag to.
|
Why are capacitors sold with imbalanced tolerances? Short version: Some capacitors (and presumably some other components) are sold with imbalanced/asymmetrical tolerances. Why? Explanation: Many ceramic capacitors are marked with, for example, +80% -20% tolerance or something similarly imbalanced. For example, let's say that I have a capacitor with the (admittedly contrived) value of 17pF and a tolerance of +80%, -20%. (Please ignore abuse of significant figures.) Maximum value: 17pF * (1 + 80%) = 17pF * 1.8 ≈ 30.6pF Minimum value: 17pF * (1 - 20%) = 17pF * 0.8 ≈ 13.6pF Mean value: (30.6pF + 13.6pF) / 2 ≈ 22.1pF Tolerance above mean: (30.6pF - 22.1pF)/22.1pF ≈ +38.5% Tolerance below mean: (13.6pF - 22.1pF)/22.1pF ≈ -38.5% It would be fair to say that this supposedly "17pF" capacitor is virtually identical to a 22pF capacitor with ±40% tolerance. By a similar process, a 10000pF +80% -20% capacitor (a real value from a catalog, not contrived) should be the same as a 13000pF around ±40%. So, if I say I want a component of a given value, why am I being sold something that's quite a bit more likely to overshoot than undershoot this value? Is this imbalance useful to anyone? <Q> Unlike resistors, whose price is essentially independent of resistance except at extreme values which represent less than 0.01% of the market, most types of capacitors have a cost which is tied strongly to capacitance--it costs more to make a large cap than a small one. <S> Further, capacitors are often used in circumstances were a cap which is larger than specified might work better than the specified one, up to a certain limit, but the bigger cap might not be worth a higher price. <S> Suppose a designer determines that a device needs a minimum of 8uF to work correctly in a particular situation, but anything up to 20uF would work just as well. <S> Some manufacturers can produce devices within +/-20 <S> % of their target; other manufacturers are capable of <S> + <S> /-33% of their target. <S> If published tolerances were symmetrical, one would have to specify that the part could be either a 10uF+/-20% or a 12uF+/-33%--a bit awkward. <S> If, however, manufacturers by convention use -20% for the lower tolerance and adjust the upper tolerance as needed, then it's possible to directly compare and substitute parts with different tolerances without affecting circuit operation. <A> You mostly see the -20% +80% tolerance for ceramics with Y in their name. <S> These ceramics have a good energy density, but are "sloppy" in that the final capacitance varies with temperature, applied voltage, and have significant manufacturing variations. <S> Their main use is for bypass caps and secondary filtering on power supplies. <S> In these applications the circuit may rely on some minimum capacitance, but lots more causes no trouble. <S> Manufacturers know this and therefore spec these capacitors more for their guaranteed minimum value as apposed to the most likely center value. <S> Unless you have a high volume application where the small extra savings for the Y type ceramics makes a difference, I would just stay away from them. <A> For tolerance, the rating is the allowed variation from the nominal value. <S> As Supercat points out, this is typically more useful if it doesn't vary so much on the negative side, since for many applications (e.g. bulk capacitance) you usually don't mind if the capacitance increases significantly, but significant reduction could cause problems. <S> To contrast the tolerance to temp coefficient, note that a EIA tolerance rating of Z is -20%, +80%. <S> This is the opposite asymmetry to a V temp coefficient rating of +22%, -82%. <S> For temp coefficient: <S> I think the figure -20%, +80% given for tolerance means the maximum change of capacitance in the rated temperature range. <S> If we look at a typical Y5V dielectric (from one of Vishays datasheets) you can see the curve is not symmetrical around 25 dec C (which is usually where the marked value comes from) <S> This would be rated something like +20,-70. <S> Here's another graph for an aluminium electrolytic, with a different (but still asymmetrical curve - Probably rated +10, -20): <S> It seems the tolerance codes are whatever the actual tolerance tested will "fit into" (i.e. the maximum allowable change) <S> so for example the +20 <S> , -70 would probably be given the V code (+22, -82) as it is guaranteed to be inside this rating (hence Y5V)
|
These types of capacitors makes sense in high volume applications since they are a bit cheaper to manufacture than those with other ceramics and tighter tolerances.
|
Switching 3 different voltages with one input I have a VU meter project I am working on using an LM3916 chip and a series of 4 RGB LED's. Each set of colors is varied in intensity by varying the voltage from ~0-15V. Each set of colors draws about 30mA so when all are fully illuminated it exceeds the maximum rating for the LM3916. So I need to come up with a "relay" of some sort that can be triggered by 12 or 15 volts (preferably) and light up all three colors of LED's each with their independent voltages. For instance R=3.5V G=12V B=15v - but they should all come on at the same time when the "relay" is triggered. The easy solution is 3 solid state relays - one for each color - but as there are 10 segments of 3 LED's I would need 30 SSRs which is just too expensive (not to mention needing a second 30 for stereo). My second thought was transistors but I'm not sure how to get them to work correctly - especially with varying voltages. What I'd like is a SSR with one input but three isolated outputs but such a thing seems not to exist. Ideally I could find a single chip with 10 inputs and 30 outputs but again I can't find anything. Thoughts? Thanks! <Q> The way to increase the LM3916's output current is to drive a PNP transistor with it: That will work as a switch which switches the LEDs on and off. <S> R1 prevents the transistor from conducting through the LM3916's leakage current. <S> You can use a 10k\$\Omega\$ here. <S> If you want to control the brightness with your 0-15V you'll need to convert that voltage to a current; LEDs are current controlled devices. <S> Place the following circuit between the LEDs and ground: The LED's current will be \$\dfrac{V_{IN}}{R_{SENSE}}\$ <A> The description of your problem is not consistent with your diagram, and that's why nobody is answering you I believe. <S> Each output of the LM3916 should go to exactly one led (the other end of which goes to power or gnd depending on how that particular chip works) in a typical scenario. <S> Your diagram has all of the led's in series. <A> According to your diagram it seems you want to drive 3 rows of 4 LEDs in series from each output of the LM3916. <S> One way to do this might be to use a current mirror like this: I1 represents the open drain output of your LM3916 set to 30mA. Q2 forms the reference for Q1, Q3 and Q4 (all bases tied together) so the same current that flows through Q2 will also flow through Q1, Q3, Q4. <S> So you can say Q2s collector-emitter current "sets" the current for the rest of the transistors. <S> 30mA will flow through each series chain of LEDs, as long as the supply voltage is high enough for the diode drops + a bit for transistor (say at least 0.5V) <S> Note that the transistor shown is not a "recommendation", rather the first I clicked on in LTSPICE - any typical small PNP should be suitable though. <S> Same with the LEDs. <S> Also note that you cannot vary the current linearly by altering supply voltage as it's a constant current setup. <S> To do this you would need to vary the LM3916 current setting.
|
I believe you mean for each output of the LM3916 to go to either one of 3 led's, in which case you will need a type of analog multiplexor...or a system of switches.
|
Why do batteries recover after a load is removed? I carry a small 2-AA flashlight, and a few times, I have accidentally left it on in my holder. Each time it dies completely, so that no light is emitted, but if I turn it back off and wait for a few minutes, the light works weakly again. The longer I leave it off, the longer the dead battery lasts. I've noticed similar patterns in my mobile phone battery. Why does this happen? <Q> The actual process is dependent on the type of battery we are talking about. <S> In a lead acid battery, The cell voltage will rise somewhat every time the discharge is stopped. <S> This is due to the diffusion of the acid from the main body of electrolyte into the plates, resulting in an increased concentration in the plates. <S> If the discharge has been continuous, especially if at a high rate, this rise in voltage will bring the cell up to its normal voltage very quickly on account of the more rapid diffusion of acid which will then take place. <S> from here . <S> In general, you can think of it as a normalizing of the chemicals involved. <S> There isn't any more "life" in the battery, the life remaining is just in the correct place to give you a little use. <S> Also, read this answer for basic battery info <A> Imagine that you have a large metal bar which is heated to some high temperature (say, 1000C), and you dunk one end of the bar in a bucket of cool water. <S> Even if you have left the end of the bar in the water long enough that its temperature fell below 100C (evidenced by the water stopping boiliung), the rest of the bar would still be at a much higher temperature. <S> If you remove the end of the bar that was in the water, it would receive some heat from the rest of the bar, and its temperature would increase. <S> Not to the original 1000C, but to something well over 100C. <S> If the end of the bar was again put in water, more of the water would boil. <S> The longer the end of the bar is left in the water, the cooler the rest of the bar will get. <S> Conversely, the more time the end of the bar is left out of the water, the closer its temperature will become to that of the rest of the bar. <S> Batteries (and large electrolytic capacitors) exhibit somewhat similar behavior. <S> They can be thought of holding a mixture of current-storing stuff and current-carrying stuff. <S> Only the current stored in the stuff <S> nearest the terminals can be output quickly. <S> Only when the voltage potential in the current-storing stuff nearest the terminals starts to fall can the current-storing stuff further away start supplying current to it; its ability to do so effectively is limited by the amount of current-carying stuff. <S> Given time, all of the current-storing stuff would tend toward the same potential, just as the entire metal bar would tend toward the same temperature, but when a battery is discharged quickly much of the current-holding stuff won't have had a chance to supply its energy. <S> BTW, in battery construction there is a trade-off between current-holding stuff and current-carrying stuff. <S> A battery which can release 90% of its stored energy in 5 minutes will generally not be able to hold as much energy as a battery of the same size, weight, and chemistry which would take 5 hours to supply 90% of its energy. <A> Especially flooded batteries like lead-acid ones are prone to stratification, which means that the concentration of the acid differs inside the battery <S> They phenomenon you are speaking about is a completely different type of battery, for that type of battery it is probably due to surface charges.
|
In some more odd cases it can be because of the battery temperature.
|
Calculating resistor value and power rating for LED driving I have seen many resistances with difference Wattage i.e 1/4W, 1/2 W, 1 W, 2 W ,3W etc.If I have 3 W Load which is an (large 3W) LED in my case, which Resistance should I use? Also The LED I am using needs 3.5V DC and 0.8 A current. I have a Battery which outputs 8V. How can I calculate the Value of the resistance which can drop 8V to 6V? <Q> This is a basic electronics calculation, do it a hundred times before you move on. <S> It's Ohm's Law: <S> \$ <S> V = <S> I \times R \$ or, put differently: \$ <S> R <S> = \dfrac{V}{I} \$ <S> The voltage is the remainder after the 3.5V drop caused by the LED, so that's <S> 8V - 3.5V = <S> 4.5V. <S> The current seems to be 800mA (though I see also 350mA here and there). <S> \$ <S> R = \dfrac{4.5V}{0.8A} = 5.6\Omega <S> \$ <S> Don't just pick a common 1/4W resistor. <S> You should always, but especially with high currents like this, check what power it will consume. <S> \$ P = <S> V <S> \times <S> I = 4.5V <S> \times 0.8A = <S> 3.6W \$ <S> So the answer is a 5.6\$\Omega\$/5W resistor. <S> That's much of a waste however. <S> And the efficiency is 3.5V/8V = 44%, excluding the LED's own efficiency. <S> A linear voltage regulator to bring down the 8V is no solution; it will dissipate the 3.6W just the same as the resistor. <S> A switching regulator would help, but you'll have to keep its output pretty close to the LED's 3.5V to be maximum efficient. <S> There are switchers which output a current instead of a voltage however, and they're made for the job. <S> The LT3474 needs only a couple of external components, can drive 1A and can handle input voltages up to 36V. Efficiency for 1 LED at 800mA <S> is slightly above 80% (for two LEDs it achieves near 90%). <A> The Watts dissipated in a resistor is the current flowing through it times the voltage dropped across it. <S> The variable missing in your question is the current (which you have added now) the LED needs to operate at. <S> It will depend on your LED and there will be a range which is ok, more current for brighter and less for dimmer. <S> Resistance = <S> (Power supply voltage - LED voltage drop)/led current. <S> Once you know those values you can see how many watts your resistor will dissipate. <S> Check out wikipedia on leds R=(8-3.5)/.8=5.625 <S> ohms <S> P <S> =IV=.8*4.5=3.6 <S> Watts <S> It is possible I am misunderstanding your specs, or that they are wrong. <S> But if they are correct, you need an LED driver instead. <A> First thing: 350 mA at 3,5 V gives about 1,2 W, so are you sure about your specs? <S> EDIT: <S> OK, now we have the right current. <S> Second: in my opinion driving a 3,5 V LED with a 8V source and only a resistance is a waste of power, because you will dissipate more power on the resistance than on the LED, so you will need at least a 4.5*0.8 > 3,6W resistance. <S> One way could be using two LEDs in series, or use a voltage regulator; but if you are sure that you want to use this configuration, i whink that you need at least a 4W resistor with value of 4,5/0.8 <S> = 5,6 Ohm circa (To remain in the E12 series standard values). <S> Maybe a better solution would be a PWM regulation with a capacitor, but you would need a wave generator...
|
Both LED and resistor see the same current, then their power ratio is the same as their voltage ratio.
|
Do electret condenser microphones require phantom power? I was under the assumption that electret microphone capsules do not require any phantom power an can be connected in the same way dynamic microphone capsules can be, due to the fact that they contain a small permanent static charge built in. I am trying to build a really simple mic to hook up to my computer via the 3.5mm mic jack, and after wiring everything up, it doesn't seem to be working. Is this because there is in fact supposed to be some sort of phantom power circuit, or should I just double and triple check my wiring again? <Q> This can of course be derived from a phantom power source if necessary. <S> Here is a typical electret circuit: <S> The value of the resistor is usually between 2k and 10k <S> (cap say 10uF or higher) <S> The datasheet for your capsule will probably give recommended operating conditions. <S> Here's a good link on simple electret circuits . <S> Another page with some more advanced ideas. <A> They need a supply as they have a built-in FET buffer. <A> "Phantom power" is not the same thing as "DC bias" for a condenser mic. <S> The former is like power over ethernet, or USB, it's riding on the data or analog lines for the purpose of operating circuits, like an LED or a circuit to power a USB extender, or to power a preamplifier for a 'condenser mic', for example. <S> DC bias for a bare condenser mic is a completely different thing, as the capsule has a capacitor with a moving plate and some of that DC voltage <S> (note I did NOT mention 'power', because it's a voltage device, not a current device) <S> is there to keep a charge on the capacitor, so when the moving plate vibrates, electrons are forced off the plate or more must be added to keep the physics of the static charge and the distance solved. <S> That's how the mic creates the voltage signal. <S> The capsule also has a FET buffer, and it converts the high impedance capacitor to a low impedance output across the FET terminals (Drain and Source). <S> Phantom power is anything but "phantom", as it's generally 40+ volts and has considerable current capacity to drive circuits and amplifiers. <S> Whereas, DC bias is generally under 10V, mostly around 2.5-3.0 VDC, has little or no current capacity. <A> I have done my final year project using this electret condenser mic. <S> The gain of the output voltage <S> the mic is so low <S> and so the output is only around 5mV. <S> So you need to implement a mic pre-amp circuit. <S> The pre-amp circuit should raise the value of the voltage to a certain level such as between 2.7V and 5V. <S> The range of the voltage that you have to set for pre-amp circuit depends on the voltage range of the ADC of the computer. <A> Check your (PC's) <S> mic jack is rigged to bias an electret's internal FET by exposing its conductors (eg. <S> 3.5mm extension cable) and holding any skuzy old red LED against them (LED cathode [usually large part of the light element] to ground obviously). <S> If it glows steadily it can only indicate bias power: no standard high impedance capacitative <S> ac amp' input could do that. <S> (Luv+hugs, mc) <A> Check the electret is wired correctly in terms of polarity +/- <S> if it's the type that has a built in preamp in the module. <S> This is usually indicate by the colour of the lead,red to +ve/tip, black to -ve/earth. <S> If it isn't one with a built in preamp then you need to connect the connection that is also connected to the case to earth. <S> You can check which it is by using a test meter from the case to the two connections in turn. <S> The one that give 0ohms is the one to connect to earth.
|
Electrets don't need phantom power for the diaphragm, but the small capsules usually have a FET buffer inside which needs bias voltage.
|
How fair is comparing a pair of long wires with a capacitor? Long ago I was reading an explanation why twisted pair is batter than just a pair of wires. That text was discussing long distances - miles or dozens of miles. It said that two wires in parallel acted like a capacitor, so whenever the sender wanted to send a pulse and raised the voltage that long "capacitor" would take some time to charge and so the receiver would see slowly rising voltage instead of a pulse and when the pulse ended at the sender side by quickly lowering voltage the "capacitor" would continue discharging and so the receiver would see slow decrease in voltage. So transmitting short pulses was just impossible - pulses had so be impractically long. How fair is such explanation and comparing a long pair of wires with a capacitor? <Q> Summarised Solution: <S> Your text has some correctness to what it says but is misleading. <S> Both a spaced pair of wires and a twisted pair will round pulses. <S> It is likely that a spaced pair of parallel wires will allow faster pulse transmission easier <S> BUT the reason for twisting pairs is largely unrelated to data speed. <S> Wires are twisted to reduce interference. <S> In a twisted pair the distance to a radiating noise source is equal for both wires - there is no net coupling area to couple to the noise source and any induced noise signals cancel. <S> [Simplified answer]. <S> But A pair of wires looks like a capacitor. <S> The effect of the capacitance (and other factors) is to limit the "sharpness" of the pulse which can be transmitted <S> Because (at least) A capacitor CANNOT have its voltage instantaneously changed. <S> Plus A pair of wires has inductance and resistance as well. <S> But In many practical cases, while the shape of the pulse is affected by the wire characteristics, you can still get some very fast very square looking pulses transmitted using adequate technical magic. <S> 1 gigabit per second LANs are a good existence proof of fast pulse transmission. <S> A circuit that severely rounds a 1 GB/s pulse stream will pass a squarish looking 100 mbps pulse stream and a VERY square looking 10 mbps pulse stream. <S> A pair of wire acts as a capacitor (capacitance C), plus has an inductance L and a resistance R: thus it is an RCL circuit. <S> These properties (C, R, L) are all "distributed". <S> Effectively a pair of wires may be modelled as an infinite series of "sections" with each section comprising a series inductor and a series resistor in each "leg" plus a capacitor between the two "legs". <S> When a pair of wires is used to transmit signals in an environment where the pair's RCL characteristics have a significant effect <S> o <S> the signal it is known as a "transmission line". <S> If you just "lump" all the inductance and all the resistance and all the capacitance together <S> the results differs from when they are distributed. <S> A transmission line will tend to have increasing attenuation with frequency. <S> This means that pulse edges tend to get rounded as the squareness of the edges depends on high frequency components. <A> What you are missing is that a long pair of wires (doesn't matter if they are twisted or not for this purpose) is not just a distributed capacitor, but also a distributed inductor and resistor. <S> These together make what is called a transmission line . <S> I'm not going to get into the considerable theory and math behind transmission lines, but as quick overview a transmission line has several important characteristics: <S> It acts as a delay as apposed to a capacitor that has to charge up. <S> Usually has a fairly sharp upper frequency cutoff. <S> Has a characteristic impedance . <S> This may seem unintuitive at first, but if you had a long transmission line with everything starting out in steady state at 0V <S> and you put a fixed voltage step at one end, the line would draw a fixed current at that end for at least as long as it takes the signal to propagate to the end of the transmission line and back. <S> Since a fixed voltage is applied and that causes the line to draw a fixed current, the line looks like a resistor, at least until the signal propagates to the other end and back. <S> This is called the characteristic impedance of the line, and will be listed for any cable intended to be used this way. <S> Common twisted pair may be around 120 Ω or so. <S> Coax cables are commonly available in 50 Ω and 75 Ω varieties. <S> Now imagine the same long transmission line we put a voltage step in at one end, but this time a resistor matching the characteristic impedance was connected to the other end. <S> To the transmission line, the terminating resistor looks just like a infinitely long piece of more transmission line. <S> Back at the driving end, the transmission line looks like it has the characteristic impedance forever, since there is no difference between a resistor at the other end and more of the same transmission line. <S> So up to some upper frequency limit, the transmission line acts more like a delay line. <S> When you put a voltage step in one end, it will propagate relatively unchanged to the other end. <S> The speed of propagation is slower than the speed of light in vaccuum, and is related to the characteritic impedance, but like I said, I'm not getting into the details and the math. <A> At the end of the day a capacitor is merely two metal plates separated from each other by some insulating layer. <S> A pair of wires, side by side, is simply two very very long, very very thin, plates, separated by an insulating layer. <S> A capacitor. <S> The wire itself has a resistance too. <S> Resistance in series, and capacitance to ground, that's your basic passive low-pass filter. <S> Induced noise is induced pretty much identically in each wire of the twist, and then canceled out by subtracting the two polarity signals at the receiver.
|
The main benefit from twisted-pair is when you have a differential signal - one polarity in each wire of the pair.
|
How do network devices detect whether an ethernet cable is connected? I have a bit of kit with an FPGA on it which includes an ethernet adapter. I'm trying to diagnose why it's not working and while I do that I've noticed that with an ethernet cable connected to my laptop, I see the network coming up and then dropping out again. How does the hardware detect that the cable is plugged in? Is it watching for a clock sig <Q> These are generated and detected in the phy layer. <S> Ethernet interfaces often have a "link" LED near the connector. <S> These are driven by the phy hardware when it detects link pulses from the other end. <A> For distance and to avoid noise, also because the data is transmitted without a clock, the data is encoded, for example 8b/10b for every 8 bits of real data 10 bits go on the wire. <S> If you sent many zeros in a row without something like this or one of the other schemes, you might just have no signal, this is bad. <S> So even if you have a lot of zeros or a lot of ones the signal on the wire, pair of wires (differential) is constantly changing. <S> As a result of the signal constantly changing you can easily detect on a receiver if something is there, and get link state and what speed the link is for 10/100/1000 interfaces for example. <S> This is independent of whether or not a higher protocol level is working. <S> Basically you have a link between the phys on the network cards <S> but then you go to the mac layer and try to talk, then on up through the rest of the network layers. <S> If the phys are not linked though then nothing will happen. <A> "an ethernet cable connected to my laptop" Well, I think you need crossover cable to connect them in order for them to talk. <S> If you are using a straight cable, the TX is talking to TX. <S> It won't work. <S> Consider hooking your device through a router? <S> It should/might work.
|
Point to point ethernet (not the old bus types) send link pulses to let the other end know something is connected.
|
How to connect multiple i2c-interface devices into a single pin A4 (SDA) and A5 (SCL) on Arduino? I want to add a real time clock module into my little project. I want to display both time and date on my existing i2c 2x16 LCD module. Both i2c-interface real time clock module and 2x16 LCD module use the same pin A4 (SDA) and A5 (SCL) on Arduino Uno. After hours of searching on the net the i2c bus can actually take many serial devices. This is possible because each device has its own unique address. My question is how to physically wire the two i2c-interface devices into a single A4 and A5? Thanks. <Q> Some folks are having a hard time visualizing things connected together, so here's a picture: (Serving suggestion) simulate this circuit – Schematic created using CircuitLab I2C is a bus, so like-named signals are connected together. <S> The addressing scheme allows the microcontroller to select which device it's talking to. <S> On the Arduino the 10k pull-up resistors goto "VDD", which is the 5V or 3.3V pins. <A> It's as simple as that. <S> Naturally, you should also include pull-up resistors on both lines, as required for I2C. How to choose the resistor values has been discussed here before . <A> Connect two pins A4-sda to A5-scl(on both board uno-uno) and connect resistor from 5v from each corresponding sda-scl lines. <A> Also you should check the pull up resistors. <S> If you use already made boards, not only the chip, that boards usually have pull up resistors on board between buss and vcc. <S> So when you connect every thing in parallel, the resistors are also in parallel, so total resistor value drop and your communication may fail. <A> I2C is a data transfer protocol developed by Philips. <S> Also known as two-wire interface since it uses two wires for communication. <S> SCL-Serial Clock Line. <S> SDL-Serial Data Line. <S> So you need to connect corresponding pins of the i2c devices <S> be it an eeprom or lcd to SCL and SDL pins of micro controller you are using with a pullup resistor to VDD. <S> Since it is an addresses protocol having 7-bit address for each device connected <S> you can address upto 2^7 different devices. <S> But normally I2C address of a slave device is predefined with some bits to be hardwired by the developer. <S> This helps in connecting same type of devices with different hardwired address part on the same bus.
|
For I2C, if all the slave devices have different device addresses, all of the SDA pins should be connected together, and all of the SCL pins should be connected together.
|
Will a 0402 0.01 µF ceramic capacitor next to a 0402 0.1 µF ceramic capacitor have any power decoupling benefits? I always understood that the point of using smaller capacitors in parallel was to provide low impedance at higher frequencies than the bigger capacitors, because the higher capacitance capacitors 'usually' had larger packages, so the parasitic inductance negated their capacitance from a certain frequency and up. However, if both caps have the same packaging ( 0402 in this case), is there any benefit at all? <Q> This is a bit of a controversial subject. <S> Some people seem to feel that a capacitor beyond resonance has no benefit for bypassing. <S> Others point out that even past resonance the part is basically just a very small inductor short-circuited to ground and it still has fairly low impedance. <S> This plot from Murata shows the (magnitude of the) impedance vs. frequency for three different capacitor values in the same package (0402): <S> This shows that after a high value part (like 0.1 uF) passes resonance, a lower-value part (like 0.01 uF) just barely achieve a lower impedance before it too hits resonance and its behavior becomes dominated by its inductive parasitic, which is basically the same as in the high-value part. <S> That said, as others have pointed out, the more capacitors you can put in parallel, the more you reduce the series resistance and inductance of the ensemble of parts; so adding more parts is going to help at least a little bit. <S> Edit: <S> I should also point out that if you start considering larger values in larger pacakges, say 1 uF in 0805 and 10 uF <S> in an electrolytic A-size package, you can definitely improve the impedance at lower frequencies (below 10 MHz). <A> Assuming the inductance is essentially fixed for a given package size, the lower value capacitance will have a higher SRF, around which it will decouple more effectively. <S> More than one of each value reduces inductance/ESR to lower impedance around this frequency. <S> Sets of different values provides a low impedance over the entire range needed. <S> This Xilinx document <S> (xapp623) goes into great detail on the ins and out of decoupling and why different values are used. <S> To quote a relevant part - they say: Capacitor Effective Frequency <S> Every capacitor has a narrow frequency band where it is most effective as a decoupling capacitor. <S> Outside this band, it does have some contribution to the PDS but in general it is much smaller. <S> The frequency bands of some capacitors are wider than others. <S> The ESR of the capacitor determines the quality factor (Q) of the capacitor, which determines the width of the effective frequency band. <S> Tantalum capacitors generally have a very wide effective band, while X7R and X5R chip capacitors, with their lower ESR, generally have a very narrow effective band. <S> The effective frequency band corresponds to the capacitor's resonant frequency. <S> While an ideal capacitor only has a capacitive characteristic, real non-ideal capacitors also have a parasitic inductance ESL and a parasitic resistance ESR. <S> These parasitics act in series to form an RLC circuit (Figure 3). <S> The resonant frequency associated with that RLC circuit is the resonant frequency of the capacitor. <A> You are correct: the benefit isn't due to the different values, but in the fact that they are in parallel, effectively halving the lumped ESR and high frequency inductance. <S> As Mr. Johnson [8.2.4] put it: <S> Different ESR values matter for signals or noise above 10MHz; above 100MHz, only package (lead) inductance matters. <S> This reminds me of another quote, however, repeated by Donald Knuth: <S> Premature optimization is the root of all evil. <A> Paralleling capacitors can have an undesirable effect due to resonance between the adjacent capacitors. <S> For instance, using the data shown in the comment above, the equivalent inductance in the 0402 case size is approximately 0.4nH. With a spice simulation of a parallel 0.1uF and a 0.01uF capacitor with 0.4nH in series with each capacitor, the two 0402 capacitor packages become parallel resonant at about 60 MHz, with a following series resonance at about 80 MHz. <S> With RF bypassing this may become critical.
|
The best way to get very low inductance is to parallel a lot of small capacitors.
|
What is the cheapest way to email someone whenever a button is pressed or a switch is closed? I would like to be notified somewhere else on the internet every time my door opens at home. If I do this with a magnetic switch, I realize that this is an event that would probably stay under 0.3 Hz. What is the best way to do this? I was thinking arduino with an ethernet shield is a little overkill. And is there a way to make it wireless? Say with a "wireless doorbell" type circuit? <Q> The rest is 'free' programming. <S> 20m of wire and a decent momentary push-button switch cost about $5 in Canada. <A> The cheapest wireless way would be to use some kind of 433MHz board and a TI Launchpad. <S> A 433MHz transceiver cost about 5€ (you need 2), and the launchpad costs exactly 4.30$. <S> You need to program the Launchpad in C <S> , doesn't know if that will be a problem for you. <S> Another thing you could try is to connect a GSM modem to your Launchpad and let it send you an SMS <S> /Giving you a call every time the door get opened, but this wouldn't be that cheap since you would have to pay for the texts or calls. <S> Old GSM modems are around 10-15€ on ebay if you are lucky. <A> You don't need an Arduino with an Ethernet Shield, but you do need a controller with an Ethernet connectivity if you don't want to delegate any of the "heavy lifting" to a PC. <S> You can get the same level of functionality and Arduino compatibility from a Nanode - which incorporates a Microchip ENC28J60 ethernet controller and an ATMega328 onto a single board for just under $40 USD. <S> Disclaimer: I sell the Nanode, so I am not totally unbiased in this regard, but I think this is your cheapest route that doesn't require a PC in the loop.
|
The cheapest way is to wire a switch on your door directly to your PC, shorting a key on the keyboard.
|
What do the PCB markings mean? On a printed circuit board, I see lots of tiny letters and numbers. Is there some kind of standard that dictates what letter indicates what type of component? <Q> Take a look at this wikipedia page for a quick overview. <S> http://en.wikipedia.org/wiki/Electronic_symbol <S> http://blogs.mentor.com/tom-hausherr/blog/tag/reference-designator/ <S> For schematic components, most EDA tools start off with one or few alphabets and then a sequential number. <S> For example, R1 for the first resistor, C1 for the first capacitor, IC1 for the first IC and so on. <S> You can download a free EDA tool such as Eagle to play around. <S> Also, see the wikipedia page for a few more examples. <S> For PCB footprints, different vendors do make naming convention suggestions. <S> See Altium's suggestions here , for example. <S> Edit: <S> I do <S> NOT <S> know anyone personally that refers to this as a strict standard or a standard at all. <A> The standard which I think is most commonly used for symbols/reference designators is ANSI/IEEE Std 315 (1975) . <S> It has been revised a couple of times since but the basics have remained pretty much the same. <S> You need to be a subscriber to download it. <S> I have a copy here on my machine, here is an example of the first few letters: A*†(see <S> also U and 22.2.4)electronic dividerelectronic function generator (other than rotating)electronic multiplierfacsimile set field-polarization amplitude modulatorfield-polarization rotatorgeneral circuit elementgyroscopeintegratorpositional servomechanismsensor ( <S> transducer to electric power)separable assembly‡separable subassemblytelephone settelephone stationteleprinter teletypewriter AR amplifier ( <S> other than rotating) <S> repeaterAT bolometercapacitive terminationfixed attenuator inductive terminationisolator (nonreciprocal device)padresistive terminationBblowermotor synchro BT barrier photocellbattery battery cellblocking layer cellphotovoltaic transducersolar cellC capacitor bushingcapacitor <A> In addition to that, you will also find other markings on the PCB. <S> These are done by the fab house and are used to show UL certification numbers, UL standards that the PCB conforms to, sometimes showing RoHS compliance, and sometimes even a logo of the fab house. <S> These can be done in silkscreening process, or anti-soldermask processes. <S> You can look up UL cert numbers here: <S> http://database.ul.com/cgi-bin/XYV/template/LISEXT/1FRAME/index.htm <S> Fill in the UL file number with the ~7 digit number on the PCB to find who actually fabricated it. <A> Yes, there is, but its not really a standard, everybody simply does it more or less the same way. <S> IC? <S> stands for an IC R? <S> stands for a resistor C? <S> stands for a capacitor <S> these are the "names" of the component. <S> the boardmaker then has a kind of list where is written what name stands for what component, e.g. R1 - Resistor, 100Ohms here is a more complete list: http://www.electro-tech-online.com/circuit-simulation-pcb-design/112835-component-designators-pcb-design.html
|
The technical term for the markings is "reference designators" (aka "refdes") and there are a few standards can define them. It's mostly what you are used to and familiar with.
|
Can a trace connect to a pad on the top layer? I'm making my first two layer PCB and have am unsure of whether it's ok to connect a trace to a pad on the top layer (if the pad is on the bottom layer, that is). Here's a picture to show what I'm talking about: Is the method shown on the right allowed? <Q> Yes, that is fine. <S> As long as its a plated through-hole (PTH), copper touches both top and bottom layers. <A> It's fine, and it's also a good practice because you save an useless vias, so pads and holes that in addition would have to be made conductive, with a wire or with a metal fill. <S> So when you design your circuit, besides trying to use in the wisest way your two layers, try to use as much as possible the holes for the pins of the components, to pass traces from one layer to the other. <S> Plus, if the design is complicated, you can get a hint from the Manhattan tecnique <S> , that is trying to split the traces in vertical and horizontal, and use one layer for one type and the other for the other one, as much as possible... <S> so you have the less chance to have crossing lines in one layer. <S> The counterpart is that in that case you have to solder also the upper pad of the board; if you pay attention, there's no problem but you have to be more careful to avoid damaging the component. <S> And also, if you find a mistake, the desoldering process becomes more complicated too. <A> If it's a through hole pad (which it looks like) <S> then it's on all layers , so top/bottom/middle are all acceptable. <S> If it were a surface mount pad on the top layer then you obviously can't connect a trace running on the bottom layer directly to it, you would need a via to switch layers. <S> Just in case you are planning to etch your own board, you need to remember that your pads will not be PTH (plated through hole) <S> so although you will have an annular ring on both top and bottom layers, they will not be electrically connected. <S> In these cases people often use the lead of whatever part goes ito the pad, and solder it both on the bottom and the top to connect the two. <A> Others already have indicated that for through hole pads the pad is on both top and bottom layer, so you can connect the trace on any layer you like. <S> On some components like PTH electrolytic capacitors you can't solder on the top side, and if the holes aren't PTH (Plated Through Hole, like on a DIY board) <S> I make the connection on the bottom. <S> Just in case the solder won't flow along the wire and to the top pad. <S> By default all pads on the different layers will have the same shape and size, but your EDA software should allow you to use different pads for different layers. <S> Typically I would use smaller pads for inner layers, as they don't have to be soldered and smaller pads make routing easier. <A> I think it depends. <S> If you component is going to be on the top layer, and you have no pad on the bottom layer, then you may not be able to solder the component on, at least if the component is seated close to the board (in the usual way), as in below, where an electrolytic cap is supposed to be soldered to the pad. <S> Also if the component is seated on the bottom side, then top pads are not a problem, and even good: since placing components on the bottom side with bottom pads creates the same kind of problems as soldering components on the top side to top pads.
|
Obviously, if that is a surface mount pad you can only connect it to the same side as the pad itself. If the component is small, or needs to have long leads then this isn't a problem.
|
For remoting 1000Base-T ethernet connector, is it better to remote PHY from magnetics or magnetics from connector? I'm in need of remoting the gigabit ethernet connector from the main board to a back end board that has all the other connectors. I plan on doing this with a high speed board to board connector (Samtec QRF8-026-05.0-L-D-A-GP which has a ground plane and using extra pins to separate the differential pairs), but I don't know if it is less damaging to signal integrity to remote the PHY from the magnetics and have the magnetics in the same board as the connector (built-in magnetics are not an option), or have the magnetics on the main board and remote the connector alone. This is under 1.5 inches of remoting overall. One restriction is that the board area in the connector board is very limited. I know that ideally they should all be on the same board but remoting the connector will help a lot in the overall design of the product. EDIT: If at all possible, please explain your answer in terms of the physics involved. <Q> Put the magnetics close to the phy. <S> Put the phy close to the mac. <S> Run the "connector side" of the magnetics a long distance-- after all, isn't that what it's designed for, running long distances? <S> Running the RGMII or GMII signals a long distance, and board to board, is not impossible but far from ideal or easy. <S> I do recommend shielding the cable/connections from the magnetics to the connector if you're running them any reasonable distance. <S> This is so you don't pick up too much emi from inside the chassis, or taking emi from outside the chassis and bring it inside. <S> I should also say that I've done this successfully, several times, for several different products that are in volume production. <A> If at all possible, reconsider the design. <S> The currents and frequencies (125Mhz symbol rate) traveling from the PHY to the jack are very high. <S> You will have major EMI considerations with running this though an inter-board connection (you may fail FCCp15). <S> Your EMI issue will be MUCH greater than the average chip to chip signal traveling through the same connector due to the increased currents. <S> That said, the magnetics need to be as close to the connector as possible, no question there. <S> Your going to have to be very careful of impedance matching the PHY <-> Magnetics link with proper termination going through that connector. <S> You may also need plenty of ground connections in the connector. <A> While this doesn't change the physics, it makes passing UL easier since you don't have external signals that could be 100 V+ in a hi-pot test going all over.
|
Put the magnetics to connector close, remoting the PHY.
|
How could I get something to oscillate at 2295 Hz? I am curious on making things oscillate. I would love to do this with one chip, but if there was a chip that oscillated at 2295 Hz, I have no idea where it is. So the question is, how could I use an LC or RLC circuit to oscillate ate 2295 Hz? I have looked at the formulas and looked for calculators and can't see a way to go backwards like I'd like easily. Or is there any other circuit that can be used to oscillate at this frequency? <Q> You need to tell us what you are trying to do and why. <S> BIG picture. <S> What you ask for is very easy BUT may not be what you really want. <S> The "best" way may be to use a microcontroller with an inbuilt timer / counter unit (or even one without one). <S> If a square wave is wanted then this allows easy rapid and accurate alteration of frequency once established and a single IC solution. <S> A very easy way & low cost way is to use any hex Schmitt inverter, or in fact and inverting Schmitt gate configured as an inverter. <S> The IC can be 74C14, 74HC14, 74...14, CD40106, ... <S> t ~= <S> R x C Fosc ~= <S> 1/(R x C) <S> ( From here Following all from here Using an op amp <S> RC Phase Shift: or Wien bridge: or <S> Schmitt: or <S> Using 2 transistors or using 1 MOSFET transistor <S> Usually used at higher frequencies. <S> A zillion leads - each image is live. <A> The LTC 6990 is a clever solution, it has an oscillator set by DC input or via a resistor, then that output is divided by one of 8 division ratios due to a second resistor set input. <S> Brilliant! <S> See sheet 6 of the data sheet to see the details. <A> The big question is what accuracy do you need? <S> You asked for a very specific frequency. <S> That normally implies you want a high accuracy. <S> 5Hz is about 0.17% of 3KHz, so lets assume you want a 0.1% accuracy. <S> That is a tough deal for RC based oscilators. <S> Capacitors have a tolerance of about 2% at best so the only way you could get that kind of accuracy with a RC system would be to tune individual devices using variable resistors or capacitors. <S> Doable for a one-off but a PITA for anything you want to put into production. <S> I would also question the log term stability. <S> You can get dedicated clock generator chips that are designed to drive a crystal and then multiply and divide it <S> but they tend to come in packages that are distinctly unfriendly to beginners and they tend to be designed for higher frequencies. <S> A suspect a microcontroller is probablly the easiest soloution to driving a crystal and then dividing the output down to product a frequency in the range you want.
|
Depending on required accuracy and stabiity this could be controlled by a crystal or a ceramic resonator or use an internal oscillator.
|
Can I use a potentiometer to reduce sound level in a speaker? I want to reduce the level of sound in a speaker (i think 6Ω 30w rms). I wonder if it is that simple to put a potentiometer in one of the cables. If this can do the trick, how do I calculate the resistance needed? <Q> That's a way, but it's better suited for eadphones, as the resistance will consume a power comparable to the speaker, so you need a fairly high power resistor. <S> The alternative is to use a power transistor, and then you would need only a circuit to bias it, and that can be generated also with a voltage divider, with the potentiometer. <S> The problem is, as Russel said, that the loudness is logarithmic with the power delivered, so you would need an exponential output from the transistor. <S> I think that for achieving that you can use a MOSFET, that gives you an exponential transconductance (that is, for a linear increase of the input voltage, the current scales exponentially) <S> but that's theory. <A> We really need more information about what your trying to achieve and especially what amplifier your using. <S> While the math @Russel McMahon provided is correct it doesn't consider the nature of the amplifier your using. <S> For instance grounding the speaker negative would short out the amplifier if it were a class D with an H-bridge output (very common today), it would also short out a 'bridged' class AB amp. <S> Also the type of signal is very important. <S> If your using this to blast test tones into something then the RMS power numbers provided are something to look at. <S> If your playing dynamic music, the average power levels will be drastically lower and your concern is more with short peaks of power usage. <S> Your amplifier may also run into impedance issues. <S> One of the examples shows an impedance of 4.4 ohm. <S> This is just an average. <S> Depending on the speaker, the impedance at its resonance point may be much lower, maybe under 2 ohms. <S> Not many amplifiers can handles that cleanly without distortion or complete shutdown. <S> There are also issues with signal quality from tossing a resistor (and especially a pot) in the signal path, not sure how much of a concern this is for you. <S> You can get pot's with what is usually called an 'audio taper' which really means log taper. <S> 'Audio taper' generally tells you two things. <S> One that the resistance changes logarithmically when rotated making audio output change more linearly with respect to rotation of the knob. <S> Second that the pot was designed with audio in mind, that it can pass a signal at least reasonably cleanly. <S> There are several ways to build a pot, the best for audio are made with a conductive plastic while the worst are made with a carbon/graphite deposit. <S> Generally audio taper pots will at least be decent for audio use while a pot not labeled as such could be anything from terrible to good. <S> Ultimately the right solution (or at least how its normally done) is an autoformer. <S> Most commercial wall mount volume controls are made this way and run about $25 USD for 100W stereo models. <S> If you want to make one yourself all you need is 1 autoformer per channel with multiple taps on the secondary at your desired level step-down points and a rotary switch. <S> When shopping for parts just beware of the 'audiophiles' crazies selling $500 autoformers. <A> You can use pure resistance to reduce sound level to a speaker. <S> But the power levels you suggest are significant and would require somewhat expensive components if implememted with passive resistance. <S> It will help the specification a lot if you can precisely specifiy what you need. <S> What is the maximum RMS Wattage that you wish to deal with? <S> What is the speaker impedance? <S> A potentiometer to ground with the top fed by the input and the speaker fed from the "wiper" would work better by results in extra signal loss at full volume. <S> Assuming your values are correct (which seems somewhat unlikely) <S> the following gives an example of what could be achieved. <S> Assume speaker is a pure resistive load (it's not)(Close enough for this purpose). <S> E&OE. <S> 30 Watt RMS max, 6 ohm speaker, 16 ohm pot. <S> Pot top to Vin, Pot bottom to ground. <S> pot wiper to speaker, speaker bottom to ground. <S> Pot at 100%.Pspeaker 30 W. Ppot = <S> 6/16 <S> x 30 =~11 <S> Watt extra on top of 30W in speaker. <S> Impedance seen by amplifer = <S> 6//16 = <S> ~ 4.4 ohm Pot at 75%.Amplifier sees 8 ohms. <S> Amp power = <S> 6/8 <S> x 30 ~=22 <S> Watts. <S> Powr in speaker = <S> 7.5 Watts. <S> Pot at 50%.Amplifier sees ~= <S> 11.5 ohmsPower amp = <S> 6/11.5 <S> x 30 =~ <S> 15 Watt. <S> Power speaker = <S> ~ <S> 3 Watts etc <S> Pot worst case dissipation ~= <S> 12 Watt. <S> Amplifier extra power = <S> ~ <S> same 12 Watts. <S> Outtput falls non linearly with pot rotation. <S> Workable but not nice.
|
Simply adding series resistance will work but the amplifier may not be happy to see increasing resistance.
|
Blind/buried vs. through hole vias? I'm trying to learn PCB design and, from what I've read and seen, there appear to be three different types of vias: Through hole - goes all the way through the board Blind - goes from the top or bottom layer to some layer in between the top and bottom, but not all the way through Buried - is between the top and bottom layers It seems like most semi-complex boards I've had the opportunity to look at are 4-layer boards, and that usually one layer is dedicated to GND, another to VCC, and then the other two have traces. My question is what kind of via is most appropriate when trying to connect a pad or trace from one layer to the GND or VCC layers? I ask because I would have thought that a blind or buried via should be used, but it seems like most boards I've looked at use through hole vias and that there's just a stop around the via on the layers it's not supposed to be connected to. Is there a reason to use that method instead of using a blind or buried via? <Q> The increase in cost is because the layers have to be drilled separately, assembled, and then the holes are plated. <S> Blind vias are sometimes back-drilled (the unwanted plating is removed with a slightly larger drill from the back) which reduces the cost, as the layers are stacked before drilling. <A> Cost.. <S> Here is a small example, I hired an inexperienced guy, he made a 4 layer PCB design, 30x50mm board. <S> I sent to get a quote, I get a quote for 2K USD for 20 pieces, I naturally objected. <S> They have said, this has buried vias. <S> Later, I changed the design sent the gerbers back, price was 150$ in 5 working days. <S> Unless you have BGA package, don't use any via other than through hole. <A> Do not use Blind/Buried vias. <S> You'll always find a cheaper way to finish your board without using them. <S> That's what I used to do.
|
Blind and buried vias add a lot to the cost of a multi-layer board, and are only used on high-density, high-performance systems.
|
How does AC travel through wires? How is that A.C can travel miles and miles while D.C can't? Since, from Ohm's law, So, I think the resistance would be the factor in case of D.C but how does A.C overcomes it? <Q> "How does A.C travels through wires?" <S> Almost exactly like DC, except that it goes back and forth. <S> "How is that A.C can travel miles and miles while D.C can't?" <S> Your assumption is wrong. <S> For lines that are short compared to the AC wavelength both AC and DC are equally limited by Ohm's law and its consequences. <S> For lines that are not short compared to the AC wavelength AC incures extra losses. <S> Hence for trasnport ofver very long distances AC is sometimes converted to DC at the source, and converted back to AC at the destination. <S> AC is (otherwise) preferred because it is far easier to convert to a different voltage using a transformer. <A> The reason why AC is primarily used for long distance transmission is due to the fact that it is very easy to increase the voltage of AC with a transformer. <S> Transformers are very easy to build and design, and they are also very efficient. <S> In order to transfer large quantities of power over large distances, the power is ideally high voltage and low current. <S> Here is the basic premise of high voltage transmission: If you need to transfer 1 MW of power (MegaWatt) over a large distance, then your transmission lines will have some appreciable loss. <S> Consider two options: using 500kV and 500V. <S> If our line has a resistance of 0.1 \$\Omega\$, then we can calculate our transmission losses. <S> At 500V, 1MW would be roughly 2,000 Amps. <S> Ohms law shows that the voltage drop across the transmission line is \$2,000A\times 0.1\Omega=200V \$. <S> This means that 40% of our power is lost in the process of sending it, and our voltage at the other side is a lousy 300V. <S> At 500kV, our current is only 2 Amps. <S> At this point, our voltage drop is only 0.2V, and our lost power is \$ I^2R=2^2\times 0.1\Omega=0.4\$ <S> Watts. <S> High voltage AC lines are used throughout the world for power grids for this reason. <S> High voltage DC is also used, but less frequently due to the additional cost of the sending and receiving stations. <S> Nothing makes long distance DC power impossible, but long distance power needs to be high voltage. <A> The reason for using AC in long distance lines is mostly a pragmatic one. <S> Long distance lines use very high voltages. <S> This is for a several reasons: <S> Reduces the size needed for the wires. <S> Too much current going through a wire will cause a wire to heat-up and eventually melt it. <S> Increases <S> the the amount of watts that can go through a given transmission line. <S> Higher volts means lower current. <S> Reduces the voltage drop over a long distance. <S> voltage drop = <S> resistance <S> * current Notice that none of things listed above require AC. <S> Back when electricity was first being used, they had to figure out some way of transmitting power over large distances. <S> Which requires either very large wires, or very high voltages. <S> The best/cheapest choice was high voltage. <S> They then had to figure out a way to convert those voltages down to a safer voltage. <S> This is where AC shines. <S> To convert high voltage AC to a lower voltage requires a very simple device, a transformer . <S> To reduce the voltage of DC, is quite a bit more difficult . <S> There are only a few ways to do this. <S> The most efficient is to convert it to AC in some way. <S> Even switching power supplies have a PWM <S> controlled alternating voltage. <S> It is also a lot harder to convert high voltage DC than a lower voltage. <S> There are actually high voltage DC transmission lines . <S> They are almost always used to isolate separate AC networks. <S> Most of them are used to connect different frequencies of AC. <S> Others are used to isolate networks which may be out of phase with each-other. <S> They can also be used to simplify the connection of remote generators. <A> DC lines can carry more power ( actually power lines do not carry power at all it is carried in the space around the wire as electromagenitic fields ) because a major limit of lines is the peak voltage they can carry before break down. <S> AC spends a lot of time "off peak" but DC is always at its peak. <S> AC is/was used for the ease in voltage conversion.
|
Using a higher voltage makes the system significantly more efficient.
|
Confusion with calculation of Voltage? I know voltage is electrical potential difference between two points. So, I think must be calculated: Voltage = Electrical Potential at A - Electrical Potential at B Can someone explain where does the ohms law relation: V = IR comes from in this?Is it possible to calculate voltage with electrical potentials given? <Q> Voltage is "potential difference", so, yes, if you know that point A is at +5V <S> and point B is at +20V , then the voltage between them is -15V <S> (the sign just says which point has the higher potential). <S> If you know the current trough <S> a resistor is 2A and the resistance is <S> 10Ohm <S> then the voltage is 20V . <S> This is the potential difference. <S> If you say that one wire of the resistor is grounded (potential 0V ) then the other wire will be at +20V or -20V . <S> Or, you can say that one wire of the resistor is at +100V <S> then the other wire will be at +120V or at 80V , depending on which wire ("upstream" or "downstream" you chose as reference). <S> Potentials are always referenced to some "zero" point - usually the ground. <S> Practical example - a PC power supply provides (among others) +5V and +12V. <S> Between those wires is 7V potential difference and it is sometimes used to power fans if they are too loud at 12V but too slow at 5V. <A> Voltage Voltage is always a relative measure, never absolute. <S> That is <S> if you only consider a singular point there is no concept of Voltage. <S> In electronics, there is almost always an implicit reference which is generally referred to as 'ground' and, as the reference, is arbitrarily chosen to be 0 Volts. <S> When someone talks about a voltage at a single point, it is generally assumed to be referenced to the circuit ground (whatever that may be). <S> Ground may be a "Real Ground" that is tied to the Earth, hence the name or it <S> may be a "Virtual Ground" meaning that it is only the reference locally to the circuit. <S> An example would be a battery powered device. <S> Generally the negative terminal of the battery is chosen as ground, 0 volts, and used as the reference for all other voltages in the circuit. <S> However, if you were to measure the voltage between the negative terminal of the battery (a virtual ground) and a true Earth ground, you'll probably find it isn't zero. <S> Ohm's law wasn't actually based on mathematical analysis, it was found experimentally (which is generally true of all 'laws' in science). <S> Its actually only applicable in a fairly narrow set of situations. <S> Specifically 'ohmic conductors' sometimes called 'linear devices' in electronics, things like resistors. <S> 'Non-ohmic conductors' sometimes called 'non-linear devices' do not obey Ohm's law, things like transistor and diodes. <S> Technically Ohm's law never really applies outside idealized components, that is no real component <S> actually obeys Ohm's law exactly <S> , it is however a reasonable estimate in many applications. <S> If you want a more technical derivation you can get Ohm's law to drop out of the Drude model pretty easily <S> and they made us do this in one of my college classes. <A> Electric potential at a point has little meaning as it needs a reference <S> and so is always a potential difference. <S> We sometimes use the term with this understand and sometimes ( esp in Physics ) use the term to represent the scalar potential which defines the field ( ignoring any component that should be represented as a curl, which is always 0 in the steady state ( i think ) )
|
Ohm's Law V = IR is a formulation of Ohm's Law doesn't doesn't derive directly from the concept of voltage although voltage is certainly a part of it, along with the concepts of resistivity and current.
|
How does electrical devices consume power? I'm curious to know how does an electrical device can consume any amount of power it is required? Suppose the voltage here is 220V. How can you get any amount of electrical power say. 1000 watts out of it? Please tell me what I'm misunderstanding. <Q> The power line may be supplying a fixed voltage, like 220V, but how much current the device draws is up to the device. <S> Power is voltage times current, so you can see how the device determines the power by determining the current. <S> For exmaple, in order to take 1 kW from a 220V line, a device would have to draw 1kW <S> / 220V = 4.5A. <S> If this were purely a resistor, it would be 220V / 4.5A = <S> 48Ω. <S> A 24 Ω resistor would take twice that power (2 kW), and a 96 Ω resistor half that (500 W). <S> All these can be connected at the same time to the same 220 V line and each will still take the power calculated above. <S> At some upper limit, the 220 V line can't supply more current. <S> At that point something has to give, like the voltage sag. <S> In houses, a fuse will blow or a breaker pop before there is any significant sag. <A> It's a quite general question, that can have many answers, and also can be intended in many ways. <S> The power is the amount of energy consumed/supplied (in fact it's an abstraction because the energy is conserved for the physical principle - but focus on the electric side) over a time unit (second). <S> In electricity, this happens to be V(t)*I(t), and the reason comes from Ohm's law for the electric field. <S> But the point is that this power, when absorbed by a device, does not always do that for the same principle, as the device can use it for many tasks: think to a motor, or a lightbulb. <S> So you have always a part of the power (can be all or a negligible part) that goes into heat (see Joule's effect) and the rest depends from the device. <S> But if you want a direct answer to how to get the amount, as I said it's V*I, and to get I from V you have to know Z <S> that is the impedance of the device, and is defined by V(t)/I(t). <S> Note that these values are time dependent, as the device can (and often does) change its characteristics with time. <S> The impedance, as the formula says, defines the amount of current that the device absorbs given that it's supplied with a certain voltage. <S> I'll save you the part about alternate voltage because it's going to complicate things too much. <A> So if the device is allowing 4.5 Amps at 220 V to pass <S> throught it, then it is consuming 1kW. <S> The resistance that the device gives at that voltage would be (whatever) <S> Ωs. <S> Note resistors are rated typically at 1/4 watt or 1/2 watt. <S> That rating is the amount of power it can dissapate as heat (resistance generates heat). <S> 1kW of dissapation through a 1/4 watt resistor will cause a fire, as the resistor cannot dissapate that much heat.
|
A device's resistance to a voltage determines what current it allows to pass through it.
|
Are there any Analog FPGAs? As I understand it FPGAs are flexible "digital" circuits, that let you design and build and rebuild a digital circuit. It might sound naive or silly but I was wondering if there are FPGAs or other "flexible" technologies that also make analog components available to the designer, like amplifiers, or A/D or D/A or transceivers or even more simple components? <Q> I've used a product line called the Electronically Programmable Analog Circuit (EPAC), probably more than ten years ago by now, which claimed to be the analog equivalent of an FPGA, and Cypress has for years produced a line called the PSoC (Programmable System On Chip) which incorporates a switchable arrays of both analog and digital circuitry. <S> Note that in both cases the devices have a moderately small number of functional blocks (3 to 24 or so in the case of the PSoC) with somewhat limited routing options, rather than providing hundreds or thousands of blocks with enough interconnects to allow essentially arbitrary routing. <S> One reason that analog FPGA's don't offer anywhere near the design flexibility of digital devices is that even if one passes a digital signal through dozens or hundreds of levels of routing and logic circuitry, each of which has a 10dB signal-to-noise ratio (SNR), meaning there's 1/3 as much noise as signal, the resulting signal can be clean. <S> By contrast, getting a clean signal from an analog device requires that every stage the signal goes through must be clean. <S> The more complex the routing, the more difficult it is to avoid picking up stray signals. <S> In applications that aren't too demanding, having a small amount of analog circuitry combined into a chip can be useful. <S> For example, I've designed a music box which uses a PSoC to drive a piezo speaker directly; the PSoC includes a DAC, a fourth-order low-pass filter, and output amplifier. <S> It wouldn't have been hard to use a separate chip to do the filtering and amplification, but using the PSoC avoided the need for an extra chip. <A> This is the first shot from Google; seems to be a very new technology, and only a few manufacturers are producing them. <S> I don't know if the analog part is flexible as the FPGA block, but for sure it combines the features. <S> UPDATE: In the Actel there is only an integrated ADC (ASIC) and a fixed number of analog inputs, depending on the model. <A> Years ago, Lattice had a series called ispPAC with different configurations of in-system-programmable analog blocks. <S> More CPLD-level complexity than FPGA-level. <S> These are all now obsolete. <S> I suspect there is simply too much variation in requirements across different analog applications to allow one chip to "do it all". <S> For example, in one design you might need a ADC input buffer with 16-bit accuracy; in another you might need only want 8-bit accuracy and want to keep the cost as low as possible. <S> There's no way a general-purpose programmable block could simultaneously suit both of those applications. <A> These VCAs are single-mask configurable and not field programmable. <S> This does mean that there is a mask charge and processing time associated with a VCA. <S> VCA fabrication costs are significantly lower than a traditional full-custom mixed-signal ASIC.VCA fabrication, package and test can be as short as four weeks compared to 4-6 months for traditional ASICs. <S> Field Programmable Analog suffers from serious noise and performance issues because the routing fabric contains a large number of transistors. <S> Via Configurable Analog uses vias as the interconnect resource. <S> These vias are a standard part of a full-custom design but in a via-configurable analog array only the vias change to configure a design onto a given VCA. <S> Vias are very high-performance, low resistance and low-noise. <S> Via configured arrays have full-custom mixed-signal IC performance with much lower development costs and fabrication times. <S> I posted an article on Why Field Programmable Analog is a Little Too Programmable on PlanetAnalog.com. <A> Your microcontroller may have some analog components. <S> For example, the STM32F303x(A|C) <S> has 4 opamps (§3.15) and 7 comparators (§3.16). <S> There's a very limited amount of customizablity--for example, the opamps' outputs can be connected to the microcontroller's ADC, but they can't be connected to an output pin or to the input of an internal comparator. <S> However, the comparators's outputs can be connected to an output pin . <S> The full interconnect matrix can be found in §3.8. <S> I'm also sure that microcontrollers by other vendors have a similar set of configurable peripherals--but I've been working with the STM32 series recently, so I'm familiar with their design. <A> You may check out Microsemi SmartFusion at; http://www.microsemi.com/products/fpga-soc/soc-fpga/smartfusion <S> These have FPGA, uP, and programmable analog all on one chip. <S> I used these in a school project and utilized all those parts sucessfully. <A> Anadigm makes a FPAA or field programmable analog array. <S> http://www.anadigm.com/fpaa.asp <S> Their designer software makes it trivial to set up a filter or many other analog functions. <S> Servenger makes a low cost <400USD development board that supports the Anadigm designer software. <S> PAM 5002R http://www.servenger.com/
|
Triad Semiconductor, www.TriadSemi.com , makes via configurable analog and mixed signal arrays (known as VCAs).
|
Where can I get a small cheap linear actuator? First, I should clarify: I am not looking for much power or much precision. I am looking for the cheapest thing I can plug into an arduino. I am just looking for stuff I can use for prototyping/proof-of-concepts. I was taking apart an old CD drive when I noticed there was a linear actuator being used for controlling the head. It seemed perfect for my purposes. When I came across this article I realized that this thing was actually quite precise. This raised a lot of questions, but the most important one to me is: Do I have to buy a CD player every time I need a linear actuator? Where do I get those particular linear actuators found inside a CD player? I assume they are cheaper than the CD player itself. <Q> I don't know what is in your CD player, but it sounds like you are asking in general how to create linear mechanical motion that is electrically controlled. <S> The most obvious answer is a solenoid . <S> Look around and you will see many different types. <S> These are basically a magnetic plunger moved by the magnetism of a coil. <S> They are called voice coils because this is the mechanism used to make loud speaker cones move. <S> There are also such things as linear motors . <S> These are like rotary motors with the magnetic poles sortof unwrapped in a line. <S> Of course rotary motion, such as produced by a electric motor, can be turned into linear motion mechanically. <S> A rack and pinion arrangement is one way. <S> There can also be lever-arm driven mechanisms, which are in turn driven by geared down motors. <S> Getting accuracy is a separate issue. <S> A basic solenoid is generally intended to be on or off. <S> Voice coils can position quite accurately as a function of current when working against a known mechanical spring force. <S> If a stepper motor is used, then the rotary motion is known open loop, and this can be turned into known linear movement. <S> Otherwise, you will need some kind of mechanical position sensing and closed loop feedback to control the actuator. <S> There are again many types of that, but that's getting too far afield of your question. <S> Added: Whoever downvoted this answer, please explain what you think is wrong. <S> Phantom downvotes don't benefit anyone since nobody knows what you object to. <S> It also doesn't give anyone a chance to decide whether you might be wrong. <A> If you need the high precision of the screw drive found in CD players, you'll need to duplicate that mechanism with a leadscrew. <S> Threaded rod isn't really suited for this purpose, but leadscrews are. <S> Leadscrews have dozens of types of nuts available for all kinds of applications. <S> The Allegro 4988 breakout boards will make driving the motor very easy. <S> This is a common setup on 3D printers, that use a pair of NEMA17 steppers to push a movable gantry upwards a couple hundred microns at a time. <S> 5-to-8mm flexible aluminum couplers are available for a dollar each at everyone's favorite auction site, and 8mm leadscrews are available from several online retailers. <S> The A4988 is the chip used to drive the NEMA17s, and they are actually driven by an Arduino on the RepRaps. <A> I came across this recently which is great if you're willing to spend some time and DIY: <S> http://www.youtube.com/watch?v=sI8tvjdhYxw <S> Basically he takes a glue stick, attaches a regular servo to the bottom of it and replaces the internal pot with a linear one attached to the gluestick
|
There are also devices known as voice coils , which are the same concept as a solenoid except that the coil is intended to move. Look for a NEMA14 or NEMA17 bipolar stepper motor (depending on how much torque you need), attach a shaft coupler to it, and add an ACME-threaded leadscrew.
|
How to use external power supply for Arduino Uno? Can I use an AC power adapter that can be connected through USB port? My board is Arduino Uno and usually connect to my computer through the USB cable. AC power adapter <-> USB port <-(USB cable)-> Arduino USB port What kinds of components can be used as external power supply for Arduino board? It's really nice if you have some images or names about them. <Q> I would not recommend using a 9V battery, because its voltage will drop quickly, but in a pinch this can be used. <S> ref: http://arduino.cc/en/Main/ArduinoBoardUno <A> The answer is 6-20V (7-16V recommended). <S> http://arduino.cc/en/Main/arduinoBoardUno <A> Yes, you could use a USB battery device or USB charger or a 9V battery clip with a 2.1mm DC power plug. <A> Can i use 12V-1500MA adapter? <S> Since no-one mentioned this: I believe the arduino uses a linear regulator. <S> This converts the input voltage down to 5V by burning the excess power as heat. <S> For example, if you supply it with 12V and the arduino draws 100mA on the 5V supply, then the regulator will have 12-5=7V dropout, and it will dissipate 7V*0.1A = <S> 0.7W. <S> Since it is usually a small SMD device, not fitted with a heat sink, it can't dissipate a lot of power. <S> It will overheat very easily if you draw high current. <S> Thus if you feed it with 12V the limit will not be the supply current (unless your supply is really wimpy) but the onboard regulator dissipation. <S> This does not apply if you use a 5V supply, like a 2A cellphone charger, although some components on the board, like the ferrite beads on the +5V line, may object to such high currents. <S> Anyway, if you want to do high current stuff like servos, motors, long LED strips and the like, power them separately from the supply, and definitely not from the arduino itself. <S> The arduino should control your stuff, light a few LEDs for indication, total maybe 100mA, but it is not designed for power.
|
An Arduino Uno can be powered by a stable (regulated) 5V DC, which you can either supply via the USB power lines, or via the shield connectors, or an unregulated 6-20 V DC (7-12V recommended), which you can supply via the 2.1 mm centre-positive barrel plug connector.
|
How long can a capacitor stay charged? If I fully charge a 1.5V capacitor from 1.5V battery, how long can it keep the charge? If I connect it to 1.5V bulb would it lose that charge instantly? If yes why? Where would it go? <Q> In case of discharge through a resistance, there is an exponential law:$$ V = V_{0} <S> \cdot {e^{-t \over RC}} $$but <S> to get the time you need R and C: you have provided only V. <S> This figure shows it in a graphical way (for V=1V and RC~=1): <S> In your case, it will lose the charge creating a current over the lightbulb which will consume power (equal to VxI) to produce light for your eyes :) (and heat). <S> The lower the bulb resistance, the greater the current supplied, and the shorter discharge time. <S> Note that the current will have the same curve of the voltage, as their ratio is given by the resistance. <S> This case is appliable also without load, if you know the equivalent resistance between the two plates (equivalent leakage resistance). <S> And this is only the basic transient, with R fixed. <S> If you have a constant current, so it becomes a linear discharge with law:$$ V={Q \over C} = <S> {Q_0 - t <S> \cdot <S> I \over C} <S> $$ <A> It won't happen "instantly", but depending upon the size of the capacitor and the amount of current drawn by the device, it may happen in less than a millisecond. <S> Note that because most devices will draw less current as the voltage falls, the rate at which the capacitor discharges will fall as well. <S> When connected to a purely resistive device, the capacitor voltage will fall by a factor of e (about 2.71828) <S> every RC seconds, where R is measured in ohms and C in farads (or megs and microfarads). <S> If there is no load on a cap, in the absence of chemical breakdowns or other such factors, it will only lose current through internal leakage. <S> While some caps have sufficient leakage that they will lose much of their charge in a matter of hours, a good quality cap may be able to maintain 90% or more of its charge for a period of years. <S> The biggest difficulty keeping a cap charged that long is avoiding leakage; 4.5 megs of leakage resistance would drain a one-farad cap about halfway in a year. <A> A capacitor can keep its charge indefinitely (in theory). <S> That's why with large capacitors it is dangerous to open high voltage equipment even years after they have been disconnected. <S> What you are probably asking is the time the capacitor needs to discharge . <S> It will discarge according to an exponential law. <S> In the case you described (a capacitor feeding a bulb), you will have an RC circuit .
|
If you connect a charged capacitor to a light bulb or other device that consumes current, the charge will flow through the device.
|
Why won't my MOSFET work? I am having trouble getting my N-channel MOSFET to work. I am using the MOSFET to control a DC motor. I have the the positive end of 5V power supply going to my motor and from the motor to the drain. I then have the drain grounded to the negative end of the 5V power supply. I believe that this part is set up correctly. I'm really confused about how to get the gate to complete the circuit between the drain and source. I tried just touching the positive end of a 3V power supply to the gate and sometimes the motor turns on and sometimes it doesn't. When it does turn on, it seems to stay on... I'm not sure that I'm even using the gate correctly because I'm not grounding it in any way. To apply a voltage to the gate do I have to have a ground involved? Also, sometimes, when the motor does turn on, the speed of the motor varies quite a bit. It goes fast and then slows down and then goes fast again. What is happening? <Q> You want the negative end of the 5V supply (let's call it ground) connected to your MOSFET source , not the drain. <S> To turn on, you need to apply a voltage between gate and ground, 3V should work okay for most small MOSFETS. <S> Alternatively you can just apply 5V to the gate (the same 5V used to drive the motor) <S> Also, if you are just touching the voltage to the gate (i.e. not driving with uC or something) then you will need a pulldown resistor between gate and ground to make sure it turns off when power is removed. <S> Something like 10k will do (if you don't have that value, try anything between say, 1k and 100k) As Faken mentions, a reverse biased diode across the motor is needed to prevent the voltage spike on switch off destroying the transistor. <S> Connect e.g. a 1N4002, cathode to V+, anode to MOSFET drain. <S> For clarity, here is an example circuit: <S> Your motor is driven from 5V, so you just put your supply where the 9V supply is. <S> To drive you apply a voltage (above MOSFET turn on) to the gate (FROM MCU) <S> Check your datasheet for the turn on voltage, but 3V or 5V should probably work fine (note with part number shown more than 3V will be needed for reasonable turn on) Under electrical characteristics in the datasheet, you are looking for a graph like the one shown below. <S> Along the bottom is the drain-source voltage, along the vertical axis is the drain-source current, and each line is a different gate voltage. <S> Your drain source voltage is 5V. <S> We can see if we apply 3V to the gate we will only get around 30mA, as the MOSFET is not turned on fully. <S> Raising the gate voltage to 4V we will get around 400mA, which should be enough to drive a small motor. <S> Note that the maximum drain source current is only 200mA for this part, so you need to make sure your motors current rating is less than this. <S> If you need more than this then the part shown is no good. <S> If you give details on the MOSFET and motor used (part numbers, datasheets) <S> more detail can be given. <A> Make sure you use a logic level MOSFET that can accept the gate drive voltage you have available (5V or 3V or whatever). <S> If you use "regular" MOSFETs, they are typically spec'd at 10V between gate and source; if you apply less than that, you won't get much current flowing. <S> I wrote a blog entry a while back about driving inductive loads from a microcontroller with a MOSFET <S> -- it might be helpful reading for you; in addition to the MOSFET you should have a freewheeling diode and a couple of resistors to ensure proper gate drive. <A> You need to have a pull down resistor on the gate. <S> When there is no power, it still thinks it is on when you turn it off because it is in a "floating state". <S> Put a resistor from pin 1 of the MOSFET to ground, and this should work. <S> I would suggest 10 k ohm resistor to ground, but any above 1 k should work.
|
You would need to connect the negative side of your 3V to ground (i.e both 3V and 5V negatives tied together) and positive to the MOSFET gate.
|
Why does an inductor behave as a capacitor at high frequencies? In truth, I've only been told this anecdotally by an instructor, but can someone explain the physics at play? I have been told that if an inductor is driven at a high enough frequency, it will begin to behave as an capacitor, but I cannot figure out why. <Q> An ideal inductor would not behave like a capacitor, but in the real world there are no ideal components. <S> Now, where does the parasitic capacitance come from? <S> an inductor is made out of a coil of insulated wire, so there are tiny capacitors between the windings (since there are two sections of wire separated by an insulator). <S> Each section of windings is at a slightly different potential (because of wire inductance and resistance). <S> As the frequency increases, the impedance of the inductor increases while the impedance of the parasitic capacitor decreases, so at some high frequency the impedance of the capacitor is much lower than the impedance of the inductor, which means that your inductor behaves like a capacitor. <S> The inductor also has its own resonance frequency. <S> This is why some high frequency inductors have their windings far apart - to reduce the capacitance. <A> What Pentium100 said. <S> I can only add an illustration. <S> Please excuse my hand drawing skills. <A> Capacitors have two conductive plates separate by an insulator. <S> The turns of wire in a coil can also create a capacitor because between each turn of wire there are two conductors separated by an insulator, which can be air, enamel, ceramic, etc. <S> When the right frequency is applied to the inductor, the inter-turn capacitance can create a resonant circuit. <S> This inter-turn capacitance only happens with AC and not DC because inductors are a short with DC.
|
Basically, any real inductor can be though of an ideal inductor that has a resistor in series with it (wire resistance) and a capacitor in parallel with it (parasitic capacitance).
|
Critical sections on Cortex-M3 I'm wondering a bit about implementing critical code sections on a Cortex-M3 where exceptions are not allowed due to timing constraints or concurrency issues. In my case, I'm running an LPC1758 and I have a TI CC2500 transceiver on board. The CC2500 has pins which can be used as interrupt lines for data in the RX buffer and free space in the TX buffer. As an example, I want to have a TX buffer in SRAM of my MCU and when there is free space in the TX buffer of the transceiver, I want to write this data in there. But the routine which puts data in SRAM buffer obviously cannot be interrupted by the free-space-in-TX interrupt. So what I want to do is to temporarily disable interrupts while doing this procedure of filling this buffer but have any interrupts occurring during this procedure execute after it finishes. How is this done best on Cortex-M3? <Q> The Cortex M3 supports a useful pair of operations of operations (common in many other machines as well) called "Load-Exclusive" (LDREX) and "Store-Exclusive" (STREX). <S> Conceptually, the LDREX operation performs a load, also sets some special hardware to observe whether the location that got loaded might be written by something else. <S> Performing a STREX to the address used by the last LDREX will cause that address to be written only if nothing else wrote it first . <S> The STREX instruction will load a register with 0 if the store took place, or 1 if it was aborted. <S> Note that STREX is often pessimistic. <S> There are a variety of situations where it might decide not to perform the store even if the location in question had not in fact been touched. <S> For example, an interrupt between an LDREX and STREX will cause the STREX to assume the location being watched might have been hit. <S> For this reason, it's usually a good idea to minimize the amount of code between the LDREX and STREX. <S> For example, consider something like the following: <S> inline void <S> safe_increment(uint32_t *addr){ uint32_t new_value; <S> do { new_value = <S> __ldrex(addr) <S> + 1; } while(__strex(new_value, addr));} which compiles to something like: ; Assume R0 holds the address in question; r1 trashedlp: ldrex r1,[r0] <S> add <S> r1,r1,#1 strex r1,r1,[r0] <S> cmp <S> r1,#0 <S> ; Test if non-zero bne <S> lp <S> .. code continues The vast majority of the time the code executes, nothing will happen between the LDREX and STREX to "disturb" them, so the STREX will succeed without further ado. <S> If, however, an interrupt happens to occur immediately following the LDREX or ADD instruction, the STREX will not perform the store, but instead the code will go back to read the (possibly updated) value of [r0] and compute a new incremented value based upon that. <S> Using LDREX/STREX to form operations like safe_increment makes it possible to not only manage critical sectionsm, but also in many cases to avoid the need for them. <A> It sounds like you need some circular buffers or FIFOs in your MCU software. <S> By tracking two indices or pointers into the array for read and write, you can have both foreground and background accessing the same buffer without interference. <S> The foreground code is free to write to the circular buffer at any time. <S> It inserts data at the write pointer, then increments the write pointer. <S> The background (interrupt handling) code consumes data from the read pointer and increments the read pointer. <S> When the read and write pointers are equal, the buffer is empty and the background process sends no data. <S> When the buffer is full, the foreground process refuses to write any more (or can overwrite old data, depending on your needs). <A> I cannot remember exact location but in the libraries that comes from ARM ( <S> Not TI, ARM, it should be under CMSIS or something like that, I use ST <S> but I remember reading somewhere that this file came from ARM <S> so you should have it as well) <S> there is a global interrupt disable option. <S> It is a function call. <S> (I am not at work <S> but I will look up tomorrow the exact function). <S> I would wrap that up with a nice name in your system and disable the interrupts, do your thing and enable again. <S> Having said that, the better option would be implementing a semaphore or a queue structure instead of global interrupt disable.
|
Using circular buffers to decouple readers and writers should remove the need to disable interrupts.
|
Could audio line-out (from a PC) be used to flash an Atmel or PIC? First question is probably how much power can standard PC line-out provide? Unfortunately I can't seem to find it easily via Google yet, or how to calculate it and from what. Otherwise, are there any more or less obvious arguments against, that I don't realize being an electronics newbie? Thanks for any help. <Q> Actually I like your question, and I bet if one is allowed to use some simple external parts (like a diode for example) this might well be possible. <S> Of course one might have to spend hundreds of hours to get a working prototype. <S> As others have indicated, if it is just for your personal use then you are much better off just spending a few bucks and buying a programmer. <S> If on the other hand you are looking to make a contribution to the open hardware movement a solution like this could potentially save thousands of people from having to buy a programmer. <S> Possibly this would justify spending hundreds of hours of your time. <A> And by far the easiest way to provide that processing would be in a (programmed!) microcontroller. <S> I guess you would still need some power source, as the amount of power that can reliably be obtained from the audio output is rather small and the voltage is likely to be inconveniently low. <S> And it would be a one-way communication, so no way for the programmer to let you know whether the programming process was succesfull (unless you want to use the microphone input als a back channel). <S> So if your aim is to provide a low-hassle way to program an AVR <S> I guess the answer is simply NO. <S> Better find a PC with a serial or parallel port. <A> It won't work. <S> You need at least data and a clock (2 signals) to program a part.
|
Conceptually it can be done, but you would need a fair amount of processing between the oaudio out and the pins of the microcontroller. Line out is a single signal.
|
What PIC microcontroller can interface with an ADXRS800 gyroscope with SPI output? Straight to the point... I planning to use an ADXRS800 gyroscope and its output is a 32bit SPI message, does this mean that it can only be interfaced with a 32bit PIC microcontroller, or could i use my 8 bit microcontroller. <Q> Of course you can use any 8-bit <S> µC. Messages longer than a byte you can handle in multiple single byte pieces. <S> Take a look at some example code. <S> E.g. here you can find several examples for interfacing a PIC to various peripherals. <A> The SPI hardware in PICs is limited to transferring whole chunks of 8 bits. <S> Since you need to transfer a integer multiple of that, you can use the hardware directly. <S> You just do four 8-bit transfers consecutively. <S> The 16 bit PICs also have a 16 bit SPI mode where it transfers whole chunks of 16 bits at a time. <S> That would work for you too, since 32 is a integer multiple of 16. <S> SPI is a very simple protocol for the master to implement. <S> Since the master owns the clock, SPI can be easily implemented in firmware. <S> I've done that a few times, sometimes just to use different pins than the dedicated SPI peripheral. <S> Of course with a firmware implementation, you can transfer how ever many bits you want in one message. <S> The native word size of the processor has nothing whatesoever to do with your problem. <S> That only tells you what size chunk of bits it can operate on at a time. <S> You can eventually operate on any size number with any processor, just that it will take a bunch of instructions to manipulate words wider than the processor's data paths. <A> The amount of bits a microcontroller has is the amount of bits it can natively do calculations on. <S> A 8-bit micro can typically multiply, sum, subtract 2 8-bits (byte) in 1 instruction. <S> If the micro has to do 16-bit or 32-bit calculations, it will compile extra instructions to make that happen. <S> It will make the calculation significantly slower, however, if that would be taking ~400 instructions at 4MIPS (=16MHz PIC16/18), you still be able to process (theoretically) <S> 10KSPS. <S> You probably can always tweak calculations to run faster on your system, so unless you want to do multiple kalman filters, angle sine() calculations you don't really need a really big processor. <S> (oh btw, couldn't find a datasheet of the sensor, only a summary saying that it outputs 16-bit data words). <A> Check out the product selector tool to help narrow down your search: <S> http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=1005 . <S> Like those before have already said, many options will work, but this tool helps you think about other constraints (like cost, package, speed, size, etc).
|
As Curd said, you can use any microcontroller as long as it has three digital output lines and one digital input line.
|
Long three cables connection: can I use an audio stereo cable? I'm building small project where I need to connect a few sonar sensors to an Arduino.Each of these sensors are connected via 3 wires to the arduino. My problems is that I need to place these sensors quite far from the main box, and since they need to moved easily I would like to use a pre-made 3 wires cable with plug and sockets. I'm was wondering if I could use a standard stereo audio cable for that, and then on the sensor's side solder the wires from the 3 sonars's pins to an audio socket, and the same on the arduino's side, and then connect the two with a standard audio cable. They should have 3 wires, right? Ground, left and right signal. I need to transfer ground, 5V and analog signal. The sensor I'm using is a Maxbotix MB1000 LV-MaxSonar-EZ0 If audio cable is not a good solution, what should I use? Thank you and sorry if this might be a stupid question, but I'm just a programmer starting to explore the microcontrollers' world, and quite newbie for all things electrical. Simone <Q> You can probably use a stereo cable. <S> Make sure you use the external shielding for ground, the analog signal as oe of the shielded lines, and power for the other line. <S> You probably need to add some decoupling capacitor close to your sensor. <S> If the output impedance of your sensor is high and/or the analog value fluctuates quickly the cable will act as a low-pass filter. <S> You did not provide enough information to guess whether this could be a problem. <A> The analog line is the one which needs special attention. <S> Depending on the signal level and frequency the following trick may be useful. <S> Apply the analog signal to the central (shielded) wire. <S> Also apply it to the input of an opamp used as a buffer (voltage follower). <S> Put the output signal of the opamp to the shielding of your analog signal wire. <S> Since the signal on the shielding is the same as on the central wire there's no capacitance between the two (since they're the same potential), and the physical properties of the wire are not that important. <S> But, while you keep the impedance of the signal's input, the impedance of the shielding is very low (it's the output of the opamp), and thus very well suited for dissipating external noise. <S> So you get high noise immunity together with non-critical wiring and your input may be high impedance. <A> Sounds like it might work, but: What does the analog signal look like? <S> Audio cables are designed for the audible range (< 20 kHz). <S> You can get specifications for the capacitance per meter that let you guess how the low-pass filter built with the driver's impedance and the cable's capacitance will act together. <S> If you have high requirements for the signal frequency or if you need to detect sharp edges (sonar?) <S> , then good coax cables like RG58 might be a better choice. <S> With such cables, you can build good transmission lines, where all the impedances match well and fast signals will travel nicely. <S> If you could provide oscilloscope screenshots, data sheets of your sensors or a schematic, I am happy to edit this answer to your needs. <S> BTW: No stupid question at all. <S> You'd be surprised how much trouble would be saved if all the 'pro' engineers in industrial automation would ask questions like this beforehand... <A> I see you have already gotten some good answers, so I am just going to add one point that was left out. <S> Presumably the three lines are Power, ground, and signal. <S> However, this means there can be significant capacitive coupling between the power line and the signal line. <S> To avoid problems from this, make sure the power is well filtered before driving the cable at the base station. <S> As long as the power line is a nice clean DC level, it contains no frequencies that can couple to the signal line accross the inevitable capacitance between the two over the long cable run. <S> Hopefully you have a reasonably well regulated supply already at the base station, and I'll assume your remote sensor draws relatively little current (a mA, maybe even a few 10s of mA, but not 100s of mA). <S> In that case I'd probably use a couple of ferrite "chip inductors" in series with the supply, each followed by the largest reasonable ceramic cap to ground you can find. <S> For example, if the sensor needs 5V power, then you can can easily get two 20 µF ceramic caps. <S> If the sensor needs more significant power, then it would be better to send a bit higher voltage and then linearly regulate it down at the sensor. <S> In either case, you still filter whatever goes onto the power wire as described above.
|
As Wouter said, tie the audio cable shield to the ground and use the two inner wires for power and signal.
|
Voltage Divider vs. Resistor in Series What is the difference between having a voltage divider vs just using a resistor in series. So for example, I have an input voltage with 12V, and two resistors in a voltage divider, R1=10k, and R2=10k, so my voltage is evenly split to 6V. How is this different from having one resistor (R=6k, I=1mA) in series? <Q> If you draw 1mA from the resistor divider circuit you mentioned, it will output one volt (the upper resistor will have 1.1mA flowing through it, thus dropping 11 volts; of that 1.1mA, 0.1mA will go through the bottom resistor while the remaining 1mA will go into your load). <S> The 6K resistor would drop 6 volts, thus feeding 6 volts into a 100mA load. <S> If either the load current or the load resistance is a known constant value, one can calculate a series resistance which will convert a known input voltage into any desired known, lower, load voltage. <S> If the load current or resistance isn't known precisely, however, deviations from the ideal will cause the load voltage to vary from what is intended. <S> The greater the difference between the input voltage and the load voltage, the greater the variation in load voltage. <S> Adding a load resistor will effectively add a known fixed load in addition to the potentially-variable one. <S> Suppose one had a 12-volt source and the intended load were 10uA <S> +/- <S> 5uA at 6 volts. <S> If one just used a series resistor sized for the 10uA case (600K), it would drop only 3V at 5uA (feeding 9 volts to the load) and 9V at 15uA (feeding 3 volts to the load). <S> Adding a 6.06K resistor in parallel with the load would cause the total current draw to be about 1.000mA+/-0.005mA, requiring the upper resistor be changed to 6K; since changes in the load current would only affect the total current by about 0.5%, they would only affect the voltage drop of the upper resistor by about 0.5%. <S> If the source voltage is stable, and the output current is small, a voltage divider may be a practical means of generating a stable voltage. <S> Unfortunately, for the voltage divider to generate a stable voltage, the amount of current fed through the lower resistor (and thus wasted) must be large relative to the possible absolute variation in load current. <S> This is usually no problem when the output current is on the order of picoamps, is sometimes acceptable when the output current is on the order of microamps, and generally becomes unacceptable when the output current is on the order of amps. <A> The single resistor doesn't divide the voltage. <S> For an ideal 12V source with 6k\$\Omega\$ in series, you get 12V with 6k (output) impedance. <S> The centre of two 10k resistors in series across the same source would provide 6V with an impedance of 5k\$\Omega\$. <S> So there is no difference between this and a 6V source with 5k in series. <A> If you really have the 1mA then the single resistor will do. <S> The 1mA will flow into the input of the circuit following the resistor and this will therefore have an input resistance of 6k\$\Omega\$ (6V / 1mA). <S> So you end up with two resistors after all: the one you placed and the input impedance. <S> In case you're building the divider with the two 10k\$\Omega\$ resistors keep in mind that the input impedance of the following circuit is parallel to the lower resistor. <S> Anything but a high-impedance input (like the input of an opamp) will decrease the 6V at the node. <A> How is this different from "Different from" in what way? <S> Two obvious differences are in the output equivalent circuit (assuming you mean that the center node of the voltage divider is the output), and in the load presented to the input voltage. <S> The output of the voltage divider has a Thevenin equivalent of 6V with 5K output impedance. <S> The output of the resistor + a 1mA current source load = <S> 6V with 6K output impedance. <S> The load on the supply for the voltage divider is 0.6mA via 20K load; the load on the supply for the resistor + current source is a current source load (constant current). <A> Some confusion here I think, and also some good thinking. <S> The difference for the question asked is maybe none, if you are just looking to drop 6 volts down from the 12 volts. <S> It will depend on the application. <S> Either might be successful in the right situation. <S> In the divider case, the center point will be 6 volts if the load on the center point takes no current, and in the single resistor with 1 mA, the output will be 6 volts if the load takes exactly 1 mA. <S> But they are 2 different applications and neither will be exact if the load is not infinite impedance in the first case or 6k Ohms to the 12 V return (or 1 mA current sink) in the second case. <S> and if you can treat any termination as an ideal current or voltage source (allowing you to ignore its impedance). <S> Assuming that the divider in the initial problem is between a 12 volt source and its return and the voltage source is low enough impedance to ignore, then the answer to the question depends on what the impedance of the output point is to either the 12 volt source or the 12 volt return. <S> To see the voltage at the divider output point, you need to consider the load impedances in parallel to the resistive divider legs and do the calculation for the divider to see the output voltage and the current flowing into or out from the load. <S> If the load impedances are several orders of magnitude greater than 6K then in most cases you can ignore them. <S> simulate this circuit – <S> Schematic created using CircuitLab
|
If you are going to use a voltage divider to create one voltage level from another, then you can do that with a voltage divider, but you need to know what the impedance of the termination points are, so that so that you can calculate the complete circuit voltages and current flows
|
How can I measure the conductivity of a copper rod? I would like to perform an experiment to measure the conductivity of a copper rod. What device can I use to perform that experiment? Is there such a thing as a conductivity meter? All I found was an apparatus to measure the conductivity of solutions. Please note that I need to get results as accurate as possible. <Q> Very low resistance resistors need to be measured differently from how most ohmmeters work. <S> This is because the resistance of the meter leads would be significant compared to the measured resistance. <S> The solution is "4 wire" measurement. <S> Two wires are connected to the ends of the rod and are used to run a known current thru it. <S> This may be a few Amps. <S> Then make two more connections near the ends of the rod and measure the voltage accross them. <S> The resistance of these wires won't matter since they have very little current thru them. <S> The first set of wires may have more resistance than the copper rod. <S> This means they drop more voltage than the rod, but that doesn't matter since you are measuring the voltage only accross the rod . <S> Any extra voltage the power supply sees due to <S> the connection wires is irrelevant as long as the total is low enough for the power supply to reliably supply the known current. <S> Given the current thru the copper rod and the voltage accross it, you can compute its resistance from Ohm's law. <A> Apart from the well known 4-wire measurement method there is another interesting method of measuring conductivity, especially useful for larger samples: you could call it a "0-wire" measurement beause it works without even touching the material: <S> Eddy current testing : A coil is used to create an alternating magnetic field, that induces alternating eddy currents in the material (proportional to its conductivity). <S> Those currents in turn create another alternating magnetic field that affects the impedance of the coil. <S> See e.g. this link or this pdf . <A> There is an instrument that will read the low resistance of copper. <S> It is often used in the power industry for measuring copper bus bar, permanent and portable grounds. <S> It's called a "Ductor" . <A> To measure resistance accurately, you must use the 4-wires method (with the 2 added wires you can sense accurately the voltage across the rod, as they are not carrying current), to have the real voltage over the rod; a more sophisticated way, that works better if you have more than one rod, is creating a wheatstone bridge, that allows very accurate measurements. <S> But you need very accurate resistances of nearly the same value. <S> Moreover, good ohmmeters already embed a bridge circuits for measuring resistances. <S> Copper conductivity [S*m/mm²]: 58.5 <S> That means that a wire 1 meter long and with a 1 mm² section, you can expect a resistance of $$ {1 \over 58.5} = 0.017 <S> \Omega <S> $$ <S> Now, if your rod is larger and thicker it will be worse <S> ...take this into account. <A> That's really complicated... <S> An ohmmeter clearly won't do. <S> The copper rod is a very good conductor, and as pointed out earlier, its resistance will be out of the range of the meter. <S> I'd suggest using a Wheatstone bridge , or better even a Kelvin bridge .
|
Not directly the conductivity, but with a multimeter you can measure the resistance of the rod (but probably it will be very low) and calculating the average section and length you can obtain the resistivity, that is the inverse of the conductivity.
|
Is soldering SMD capacitors directly to TO-220 regulator pins a good idea? A while ago I read here that it's a good idea to have ceramic capacitors on the input and output pins of 78xx regulators and to put \$10 \mbox{ } \mu F\$ on the input and \$1 \mbox{ } \mu F\$ on the output. I can easily obtain such capacitors only in SMD format and that gave me the idea of soldering them directly to the pins of the regulator. This would give me more or less self-contained units which could be easily used on the dreaded breadboards or anywhere else I may need to use a 78xx or 79xx regulator (Assuming I manage to solder them without losing the capacitors, but that's another topic). So my question is: Is there any reason not to solder the capacitors directly to the pins of the regulators? I'll most likely be using 1206 components. <Q> For one-off bread-boarding this actually sounds like a good idea. <S> Since the center lead is ground, you can put the capacitors between that lead and each outer lead. <S> If you do this high enough up on the TO-220 part, then you still have the lower lengths of the leads free to plug into the breadboard or connect otherwise. <S> One thing I would do though is still add a capacitor to the output bus on the breadboard separately. <S> It can't hurt to have a little distributed capacitance there. <S> This would help counter some of the inherent resistance of the connection, which can be higher than it should be due to dirt or worn contacts. <A> It shouldn't pose a problem for testing, especially not for ceramic capacitors. <S> As Al Kepp allready said - this components prefer room temperature - and those 78xx regulators are linears = <S> they generate a lot of heat. <A> I foresee two problems. <S> First is hand soldering SMT ceramic capacitors. <S> The thermal shock can crack the package. <S> Applying the iron tip to pad (or lead in your situation) is the recommended procedure (see the capacitor datasheet, or soldering application note). <S> Second is mechanical stress. <S> SMT ceramic capacitors are fragile. <S> I have two recommendations. <S> First, find a supplier for leaded components, possibly plan ahead so you can take advantage of worldwide distributors. <S> Second, include capacitor selection as part of the design. <S> It's not a 1 size fits all. <S> Some designs require several capacitors at each IC, while a few require no bypassing (or that provided by a bread board with back plane). <A> This is a major issue for manufacturability. <S> Automated pick-and-place machines cannot put two parts on top of one another (manufacturers all have different minimum clearance specs for their equipment). <S> Basically what you are proposing is point-to-point soldering. <S> For prototypes, one-off designs, and rev 1.0 corrections this is often used, but it is important to understand that it is really bad design.
|
Inserting parts into a bread board and bumping the parts while working with the circuit causes significant movement of the leads than can break any capacitors soldered across them. But it's not so good an idea to do it for a long term with tantalum or electrolitic elements.
|
Can you stack SMD resistors in parallel to reduce power dissipation per resistor? I sent my PCB a couple of days ago for fabrication but just realized a terrible error:I need to send 70mA to an IR LED with a 5V supply so I would need a resistor of about 70ohm, which means the resistor would be dissipating 350mW of power. The SMD resistor package is 0805. THE PROBLEM is that I can only get one that dissipates max 125mW in this package : 70ohm 125mW from digikey So can I get 3 220ohm versions of this resistor and literally stack them in parallel? Has anyone tried this? What can I do in this situation? <Q> I've seen stacked SMT resistors as a method for correcting resistor value. <S> But I haven't yet seen it as a method for increasing power rating. <S> But the convective heat transfer from the bottom resistor will be hindered by the upper resistor, so the power rating of the stack would be less than 2x individual \$P_{stack of 2} < 2P_{individual}\$ . <S> Your desired power rating is 350mW. <S> Nominally, you would need 3x 125mW resistors. <S> You may have to use a larger number of resistors. <S> Is this a one-off or production? <S> If it's production, consider changing the board. <A> Two in series, stood vertically: <S> If you have vertical room you can place two resistors in series by standing them on the pads tombstone style and joining across the tops. <S> It's likely that this will have similar wattage rating to two of the originals and possibly more as the resistors are further clear of the board surface. <S> Working against this is that there is less cooling per resistor by conduction to the board copper, which is a significant cooling path. <S> If you stand the two resistors clear of each other with a wire bridge between them each could have substantially more access to cooling air than they have when lying flat. <S> Add a heatsink: <S> I've done similar to this on occasions with through hole components, with good results. <S> I've never seen it done with SMD resistors, but it would be easy to add an "ad hoc" heatsink by soldering copper wire of shim to the ends. <S> I'd expect this to add significantly to the power ratings. <S> Use a 0.5 Watt SFR16 through hole resistor with formed leads. <S> The 0.5 Watt rated SFR16 through-hole metal film resistors have a 3.2 mm long <S> x 1.9 mm wide body length and the wires can be formed back under the body so it produces contacts which fit 0805 pads correctly with the resistor aligned in any of a number of ways to suit the mechanical situation. <S> eg <S> the resistor can be stood vertically so it has about 3.5mm height or fitted over the pad horizontally or out to one side. <S> SFR16 <S> ~= <S> "1308" compared to the original 0805 <S> but the leads allow forming to fit any of a wide range of pad sizes and body irientations. <S> An 0805 = 0.080 " x 0.050" = <S> ~ <S> 2mm x 1.25 <S> mm <S> An SFR16 ~= 0.14 <S> x 0.08 = <S> 3.4 x 1.9 mm <S> The (originally Philips made) <S> SFR16 resistor is about the same physical size as a 1/8th Watt typical through hole part but which is rated at 0.5 Watt dissipation. <S> SFR16 datasheet here - 3.2 mm body length <S> The diagram below demonstrates that for the SFR16, radiation and convection from the body and leads forms a significant part of the heat dissipation system. <S> The PCB mounting point temperature decreases with increasing lead length <A> The amount of stationary power a resistor can dissipate is determined by its maximum temperature and the amount of heat it can get rid of. <S> Stacking two resistors on top of each other hardly increases the total area, so it won't help much. <S> If you can place the two next to each other (so both are flat against the PCB) <S> they can each dissipate (almost) their full rated power. <S> But do you really need the 70 mA, and do you need it 100% of the time? <S> If this is for IR communication, the duty cycle for 'signal on' is likely to be 50% or even lower, and the signal-on to signal-off ratio is likely well below 50% too. <S> If this is the case, check the maximum peak power and you might be in the clear. <S> If you end up using less than 70 mA: assuming the IR output is linear with the current (check your datasheet, it might be not), the distance at which you get the same amount of IR light on a surface is linear with the square root of the current, so reducing your 70 mA to let's say 20 mA reduces you reach by only sqrt( 20/70 ) = <S> 0.53 <S> But: 0.07 A * 5 V = 0.350 <S> W, which that assumes no power is dissipated in the IR LED. <S> Check your datasheet, but let's <S> I assume the IR LED drops ~ <S> 2V, that leaves 0.07 <S> A x 3 V = 0.210 W for the resistor. <S> (And there is probably some drop in the switching element, a FET? <S> bipolar transistor? <S> don't try to let your microcontroller sink 70mA!) <S> Also: 5 / 70 = 0.070 <S> , but that again assumes all voltage is dropped by the resistor. <S> Back to the drawing table, Shubham! <A> This may work. <S> The dissipated heat is drained to the environment via convection through the air surrounding the resistor and via conduction through the solder connection to the PCB's copper. <S> Stacking resistors will compromise the convection, but we don't have to worry about this too much since there's a lot more heat drain through the conduction path. <S> So make sure you apply enough solder to the terminals and you'll be fine. <S> Of course this solution is a manual fix only and can't be used in production.
|
Two (2) stacked resistors could indeed dissipate more heat than just one (1).
|
Dual-SIM phone, do they use 2 GSM modules ? Anyone has high level schematic? As an slight extension of my project, I am trying to see if I can improve connectivity resilence by using a dual-SIM approach. Dual-SIM phones (or Tri-SIM, quad-SIM phones) are quite popular in many developing countries, and AFAIK, most are based on Mediatek chipsets. However, I am wondering if these use a single GSM module (RF baseband + controller), multiplexed for use by multiple SIM's, or they actually have as many GSM modules as the number of SIM cards. If it is multiple modules, then I think I know already what is needed, but if it is a single module multiplexed with multiple SIMs, then I'd like to understand how this works. If someone has a high-level schematic of how this works, would be great to be able to take a look. Edit (Feb 1, 2012): Call me crazy, but I went ahead and purchased an el-cheapo dual-SIM phone to pry it open and see inside, although thanks to the very high integration and density I wasn't hopeful of figuring out much. Sure enough, there are obviously 2 SIM's and the traces seem to lead into what is probably the module that is put under a metallic EMI shield box, without any markings. Can't see an obvious way to remove the EMI shield box, as it is not clear how it is stuck to the board. So, cannot tell for sure, but given the size of the shielding probably a single module. Another reason why multi-SIM's might be using a single GSM RF module is because I found some phones claiming to have 4 SIMs !! Huh. Edit (Feb 15, 2012): After quite a bit of reading around, I've come to believe that the way to use a single module with 2 (or more) SIM's is to modify the standard single-SIM firmware on the GSM module itself. This might be difficult to achieve, purely via the firmware on the application-processor (or uC in my case). The firmware on the module, exposes few different types of API's s.a. Hayes AT-command set, or native API that uses some kind of message-passing, and only provides somewhat higher-level control than what is required to deal with multiple SIMs. This means that, implementing dual (or more) SIM for my projects, using off-the-shelf GSM modules like the ones from Telit, Siemen/Benq, SimCom etc., isn't going to be easy (or possible). Will keep looking, and if someone has credible knowledge to challenge this finding, I shall be more than happy to learn about it. Edit (Jul 25, 2012): I have come across 2 different handsets (el-cheapo bottom-bracket shenzhen Android phones), and a key difference in the technical specification of the 2 phones caught my attention. One said that while the handset supported 2 SIM cards, but only one of them could be active at a time, I believe it is the single module, dual-SIM approach. For the other handset, it said that for the 2 SIM cards supported, both could be used simultaneously, s.a. one being used for a phone call, and other being used to maintain a 3G data-connection. I see no way of being able to do it, without using 2 GSM RF modules. Of course, the second handset is more expensive -- by about $25, which can be explained by the presence of a better ARM11 processor (800MHz instead of 650MHz) and the extra GSM module, plug a slightly larger battery (just 200mAh extra). Of course, this hasn't been validated by ripping the phones apart, or any kind of schematic study. Edit (Feb 12, 2013): Just to confirm, that on el-cheapo Android phones, which claim to be dual-SIM, there is quite certainly only 1 GSM module, because the behavior is that if you have data-session established, all call to the other SIM (incoming calls), fail, with the network operator playing the announcement that the number is not reachable. Effectively, it means that while the 2nd mobile number is "registered" to the network (in GSM sense), it is not reachable, because the handset (with the SIM corresponding to the mobile number), did not respond to network's "paging request". That happened because the only GSM module is already busy serving data-connection to the first SIM. Edit (Sep 15, 2015): Much water has flown under the bridge since my last post. I have found documentation that indicates that both variants seem to thrive, though the former is lot more popular for low-end devices, due to reasons of overall device cost (including that of the battery), i.e. single radio, multi-SIM dual radio (yet to find multi radio > 2, for GSM), multi-SIM In the telephone handset industry, the former seems to be called 'dual standby' and latter is called 'dual active'. Some interesting links relevant in this context: http://www.simore.com/en/ http://www.gsmarena.com/dual_sim-review-154.php However, more interestingly, here is the application note on using Quectel GSM module supporting dual-SIM. <Q> As far as I know from my brother who uses dual sim phone, both SIMs are active at once. <S> It means you can receive calls on both SIMs without any special switching. <S> Also you can receive or send messages on both SIMS. <S> But the phone has only one GSM hardware. <S> Only one antenna, only one transmitter etc. <S> that would make the phone a lot heavier than normally. <S> (Nobody would want a lot heavier phone.) <S> Most of the time the transmitter/receiver is turned off to save valuable power. <S> In the past I also saw a phone which needed to be turned off and on to switch the sims. <S> It automatically switched the SIMs on every turn-off turn-on cycle. <S> That was easy to use but quite inconvenient. <A> No, they don't have multiple GSM modules. <S> That would drive up cost, size, weight. <S> Since the user is only on one call or the other, there isn't a need for more than on GSM module. <S> EDIT Jan 31 '12. <S> Wikipedia says there are phones that can use both at once. <S> But I still believe there is only on GSM module. <A> If you have one GSM modem, you can, in theory add many SIM cards ad-infinitum. <S> The trick is to use multiplexers to select between the SIM card receptacles, i.e. routing the SIM interface signals to the appropriate SIM card, and to exploit the SIM_PRESENCE signal. <S> This is frequently used in devices such as trackers, that have to cross borders, and it becomes important to avoid situations where roaming is required (data on roaming is extremely expensive)
|
GSM use time divided modulation so you can run two SIMs without having two pieces of everything -
|
How to filter noise from ground? I have an audio application scenario here. The Idea is to power a device (that later produces sound) with USB. Unfortunately, I have massive static and what sounds like pink (Brownian) noise on GND. I also have a lot of static and other artifacts on the +5V lead, but I figured I can use a low-dropout voltage regulator to get a nice, smooth +3V out of it. But how do I filter out GND? Right now, I was experimenting with all sorts of low-pass and high-pass filters, constructed from caps and resistors. The caps, however, introduce artifacts themselves, it it's like two steps ahead, one step back. <Q> You don't filter ground. <S> "Ground" is the reference voltage all other voltages are measured to, so it has no noise by definition. <S> (There are cases in distributed systems where what exactly "ground" is is not clear, but that's another issue) USB power can certainly be noisy. <S> You would definitely want to filter it before it powers audio circuitry, since audio generally requires high signal to noise ratio. <S> Just a LDO to make 3V is probably not good enough. <S> The LDO will reduce some of the noise, but some will be too high frequency for its active circuits to deal with properly. <S> You need to put some low pass filtering before the LDO. <S> This filter needs to eliminate the frequencies the LDO can't handle properly. <S> I would start with two ferrite chip inductors in series and a 20 µF cap to ground after each. <S> Then connect the input of the LDO to that, and the output should be pretty clean. <S> A typical audio "line" out level is around 1 V, but you need headroom for higher peaks. <S> Even a 5V supply doesn't leave much headroom. <A> Ground can't have noise, it's clean by definition, like Olin says. <S> Suppose you wanted to filter its "noise" with a capacitor, what other node would you connect the capacitor to? <S> Vcc? <S> Then you're filtering Vcc's noise, not ground's. <A> The noise from USB power comes mainly from cheap powerstation which powers your motherboard. <S> There is many ways to clip that noize by: <S> (1) Checking that your powerstation has ground wire, checking that your ground in house is real ground, checking that your powerstation has connected middle point into ground. <S> (2) <S> Next, could be good idea to swap your cheap powerstation with real powerstation made from voltage transformer. <S> Our modern day chineese trash powerstations are made from ferrit-type conversions to high frequencies, so even by using such powering you are basically loosing all opportunities to power audio production - all microphones will catch that high frequency trash. <S> First, need to use lowering transformers to obtain proper +12, +5, 0 and so on to power your motherboard. <S> Our modern day powerstations cheat with that to save a dollar, they all have trash outputs which will cost you hundreds of dollars next.
|
You can also just low pass filter the 5V and use it dircectly to power the audio circuit.
|
Technology for precise distance measure? I want to create a system that's able to scan the environment around him and create a depth image of what's around it, like this image , where the color lightness is inversly proportional to the object distance, in this case cans. I saw some infrared modules that will do the trick, but the distance it's too low for what I want (100cm top), and I prefer something that will have a range of 1m-10m. Is there any kind of technology that will do the trick? The final goal it's to detect objects that could be far, so I need some precision both on short and long range. <Q> There are two ways to determine the distance of an object: <S> TRIANGULATION: <S> You measure the angle that the point you are measuring with two or more sensors; this is what Russell told you, and used with compass for example; <S> TRILATERATION: <S> You measure the distance from the point to two or more sensors, without knowing the direction; this is the case of GPS tracking or ultrasonic sensors. <S> I think it depends by the properties of the objects you're measuring and also other things like precision, size and others. <S> If it can help I've seen that self-driving veichles like the ones that participate to DARPA Grand Challenge often use cameras, and since the distance is similar probably that's the best choice. <S> Using computer vision, a common approach is to project on the objects a pattern (there are studies about which is better for a specific task) and using disparity maps to find the differences between images (obviously you need stereo vision). <S> This last method is really powerful, and probably the image you posted comes from that ( <S> even though I cannot understand why the can seems flat; probably it's been flattened later). <S> There is a Matlab toolbox and for sure there are functions ni the OpenCV library for C, C++, Python and Java. <S> Probably the first is the best for embedded implementation. <A> There are many possibilities, each with their problems and advantages. <S> Here is one general method. <S> This is the ages old range finder technique extended from a point to an area. <S> From two locations on a baseline determine the angle to a grid of points in the target area. <S> Determine the angle to each point from the two baseline positions. <S> Use basic trigonometry to establish distance based on the angles and baseline separation. <S> There are a number of ways of doing this.eg (1) Shine a spot (eg LASER) onto target area and detect spot location using a sensor. <S> LASER could be X/ <S> Y tracked and sensor could be <S> X/Y tracked or line scanned in X and then Y directions or ... . <S> Using 3 or more basline points with a bas-area rather athn a base-line would help . <S> (2) Use two cameras (USB web cam on up) to create images from the two baseline locations and then locate equivalent points in each image by whatever means. <S> If the image was flat the two pictures could be correlated simply by sliding sideways. <S> For items with depth range infOrmation is provided by the subtended angles to each point. <S> On both examples above, some points will be hidden from some of the sensors. <S> Multiple "cameras" of viewers will help but nothing can make the rear of 3D object visible. <S> ========= <S> If this is for pigs and you use these ideas I want 10% :-) <A> If you can do some intensive signal processing, then phased-array sonar, using an array of microphones, might be one potential solution. <S> A scanning laser in conjunction with multiple cameras is reported to be a common robotic vehicle solution.
|
So basically, you can use lasers (or lights in general, that involves also image detection) with cameras to do triangulation, or range sensors like ultrasonic sensors (used in robotics too) and use trilateration.
|
How do utility companies treat voltage deviations in distribution networks? I live in a region where nominal mains voltage is 220 volts and state standards permit deviations within 5 percent continuously and within 10 percent for short periods. So if I measure the voltage in a wall outlet in my apartment and see it is 180 volts or anything else out of range I can file a complain with the utility company and the company is expected to somehow treat that voltage anomaly. My question is - how do companies actually treat voltage deviations? What equipment do they have on the distribution grid that can be adjusted so that the voltage in my wall outlet gets back to permitted range? <Q> From this wiki page : Electric utilities traditionally maintain distribution system voltage within the acceptable range using transformers with moveable taps that permit voltage adjustments under load. <S> These transformers are equipped with a voltage regulating controller that determines whether to raise or lower the transformer tap settings or leave the tap setting unchanged based on “local” voltage and load measurements. <S> See also this website primer from UST Power <S> that explains a lot of different techniques for automatic voltage regulation. <A> It can depend on where you are. <S> I work at a University, and we've got lots of high drawing things on circuits causing voltage sag. <S> This can really have an effect on certain types equipment that need stability, sometimes to the point that they will just not work. <S> Our solution has been to use a UPS or a line conditioner that will step the voltage back up. <S> Our electrician guys have been out multiple times and just sort of shrug their shoulders, which doesn't really fix anything. <S> They can cost quite a bit. <S> Unless you are having fuses blown, or things exploding, I generally wouldn't worry about it. <S> Most things have enough tolerance in their supplies to not care. <A> Many pieces of equipment have a voltage selector switch. <S> Internally (at least for a linear power supply) <S> the voltage selector just changes taps on the power transformer. <S> Power distribution utilities have transformers too. <S> These transformers can have several closely-spaced taps at different voltages. <S> If your voltage is too high compared to the rest of the grid, the utility can connect you to the next lower tap.
|
Voltage regulators located in substations and out on the lines and substation transformers with Tap Changing Under Load are commonly used for voltage control purposes (Load Tap Changer or LTC).
|
LM317-based adj power supply output takes a while to stablize I recently built-up a quick little LM317-based adjustable power supply schematic: However I've noticed the output can take several seconds (on the order of 10 or so) to "settle down" after turning the trimmer to desired output voltage. What happens is if I set it to 5.000V (as an example), my DMM will show the output slowly tick down in 1mV increments or so until the voltage finally settles; sometimes as much as 100mV lower than what I initially set. Doesn't seem to matter if I turn the trimmer fast or slow. Once I let go, my DMM will show the voltage slowly "tick down" until it finally stabilizes. The same issue occurs with or without load. To provide stable load for testing (100mA or so) I'm using a constant current dummy load similar to the EEVblog one . Also, originally I didn't have the 10uF adj cap, but adding it doesn't seem to make a difference. Any idea why this is happening or is this just normal? Seems like I have enough smoothing capacitance so I don't think it's a ripple issue. Could it be too much capacitance on the output? I've seen other people demo their LM317 circuits on youtube and their DMM doesn't seem to "tick down" after setting the output voltage like mine does. Maybe my DMMs are just too accurate, heh. =) EDIT: I tried replacing the 'dummy load' with a simple 1k resistor (also tried a 100-ohm). Didn't really seem to make a difference. Also, seems like after I set the voltage my meter 'ticks down' pretty fast at first then slower and slower. "Feels" almost logarithmic: I just remembered my agilent meter does data logging (duh). Here's graph of ~90 data points showing the voltage drop (after setting to around 5.25V or so) over ~90 seconds: Here's another over 5 minutes (I was trying to dial-in 15V): UPDATE: Replaced the 5K pot (which was a crappy single-turn rated at 50mW) with a 5K 10-turn precision pot (rated at 2W). Now I can crank it up to, say 5V or 12V or whatever and my DMM shows a stable reading right away. <Q> The time constant of your drift is in the range of some 10 seconds to some minutes, which is quite common for thermal settling of small-ish parts. <S> You say that in your first tests, your load takes something like 0.1 A, and the difference between input and output is approximately 20 V - 5 V = 15 V. <S> This means your LM317 is dissipating apporximately 1.5 W - enough to give it a noticeable temperature rise, depending on the heatsink. <S> When you set the output to a higher voltage, and assuming the current stays the same, you reduce the power dissipation (heating action), which would explain why the drift takes longer with a higher output voltage. <S> (Edit: Slightly different numbers would apply for your experiments with a 1k load resistor, of course.) <S> If the LM317's internal reference drifts to a slightly lower voltage with rising temperature, the output will drift as well. <S> If you start at 5.27 V at room temperature and get 0.1 V less with a hot LM317, this is something like a drift of 2 %. <S> Not exactly good, but also not unheard of for a standard integrated voltage regulator... <S> You can test this theory by using cooling spray (or just by blowing cold air along the part) or a hot air gun (or a soldering iron) and monitoring the regulated output voltage with your precision DMM. <S> Your particular regulator seems to have a negative temperature coefficient, so cooling it should make the output voltage higher and heating it should make it lower. <S> TI's LM317 data sheet looks like their version of the regulator IC even has a negative tempco, so it should do what your IC does. <S> Other manufacturers' parts may have a positive tempco, however. <S> Cf. <S> top left of pages 4 and 5. <A> As in all such circumstances, even a very low spec oscilloscope is of great value. <S> An oscilloscope extends your eye-brain capabilities into the time domain for periods much shorter than it is otherise capable of :-). <S> They are an essential tool in all serious electronic development situations. <S> You can probably find an old tired one for less than the cost of the parts in this supply and it will provide you with insights otherwise impossible to obtain. <S> Oscillation? <S> : <S> This sort of result is often due to oscillation BUT your circuit looks reasonably OK. <S> Some regulators require output caps within a Goldilocks range (not too high and not too low) AND ESR also with a range, but LM317 is not as finnicky, but check datasheet to be certain that caps used do meet range requirement.s Caps mounted near regulator is a very good idea. <S> Load/Supply interaction? <S> : <S> Try with a sinple resistor load to start say 100 ohms to 1000 ohms. <S> Could be an interaction between load and supply. <S> With circuits of this sort (which are an excellent idea in principle and often excellent in practice) <S> you are at the mercy of the algorithm implemented inside the load controller. <S> If it needs to iterate the loading to meet the constant current spec this may cause unexpected results, and potentially it too may oscillate as it seeks the desired operating point. <S> but there's no certainty that there will be no interaction. <A> I think that you are dissipating too much power into the potentiometer. <S> My calculation works out to 161mW when the total resistance is used. <S> If it is a low power 200mW version, it might be too much. <S> Swap R5 for a 1K or 910 ohm and do the experiment with the 5V again and see how it varies. <A> My firts guess was that you have an abnormally large value for C7, but you say that the effect also occurs without C7, so that can be ruled out. <S> A you sure you didn't set your DMM to some weird setting, like average-peak or AC? <S> Can you measure the output with some other instrument (oscillsocope, old-fashioned analog multimeter, or even a LED+resistor to get a rough idea)?
|
Given the information provided by your data logger's diagrams, I am fairly sure you are looking at thermal drift . The LM317 SHOULD be voltage stable under varying load within its load range
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.