source
stringlengths
620
29.3k
target
stringlengths
12
1.24k
How to choose an ARM Cortex M3 microcontroller? Based on my rough requirements of being in the 36 to 72 MHz range, having 16kb+ SRAM, 128kb+ flash, being programmable in C, I have decided that for my application I want to use an ARM Cortex M3 MCU. The question is, what criteria do people use to pick which M3 version to use? There are many possible vendors such as TI, ST, NXP, Freescale, etc, etc. A main differentiator from my standpoint would be ease of programming. Ideally I test it out on a breakout/development board, followed by implementation in my own PCB. <Q> I think @markt is certainly in the right place: Toolchain, peripherals, packages, devkits. <S> I'll add a few, and maybe take off a few. <S> Toolchain is certainly important, but FREE may or may not be. <S> Sometimes, working without real support can be more expensive than you think it is, and using a reasonable commercial package <S> may well be worth it for a given situation. <S> Sometimes, being able to pass a thorough license audit is important as well, and using a free tool with a restrictive license can bite you later. <S> A good CMSIS library to support the microcontroller is a must for me. <S> CMSIS -- Cortex Microcontroller Software Interface Standard -- arm.com/products/processors/cortex-m/… -- is a hardware abstraction layer for Cortex-M series microcontrollers. <S> In theory, if a library is CMSIS compliant, it's vendor-independent, and its easier to swap different families, and you don't have to relearn an environment from the ground up to be able to use the library. <S> One of the attractive aspects of the ARM Cortex environment is the ability to change platforms without a whole bunch of sweat. <S> If you pick a platform that doesn't buy into the CMSIS structure, you may not be able to move around as conveniently. <S> (I think the STM32 series has amazing devboards). <S> If the family has very convenient and cheap dev boards, then you're more likely to find help from a larger userbase if you need it. <S> Also, these chips tend to be in SMT packages. <S> When you inevitably blow up a chip, or a port on a chip, or a bit on a port on a chip, replacing the chip is a PITA involving SMD rework. <S> If you can purchase two or three boards at $10-$15 each, and replace them as you bust them, you won't even THINK about doing that SMD rework! <S> Think "Extras". <S> You may need something above and beyond what is considered a "peripheral". <S> For example, maybe you have heavy bluetooth needs, and you might choose to go with Nordic Semiconductor for that kind of support. <S> You might consider some other things, like how easy is bootloading, etc. <S> Think Documentation. <S> I've been a bit less than impressed with how hard it can be to wade through some of the STM documentation. <A> Look for free toolchain, RTOS and low-cost JTAG/SWD support. <S> if DIP is a must, rule out silicon vendors that don't offer DIP packages. <S> Look at what peripherals are on offer, and what you're likely to want/need. <S> Look for bang-for-buck - use one or more of the big electronics vendors websites to compare apples with apples. <S> Given your desire for dev boards, consider what's available there. <S> If you're coming over from another platform (PIC, Atmel, etc) accept that there will be a fair learning curve in many areas in the move to ARM, but it's well and truly worth it. <A> If you don't have a strong preference (e.g. price, size, power, plus what others listed), then I would consider who supports you. <S> If the manufacturer doesn't reply to your questions, that could be an issue. <S> Or do they have a local distributor with a FAE (Field Applciation Engineer) <S> you can ask? <S> That's particularly important for small companies and hobbists. <S> Some parts may not be available in small quantities. <S> For example, those that have DRAM in the same package are aimed at big buyers (> 10 k units). <A> Probably STM32L151VBT6 suits your requirement. <S> Even we used it in our company it's having moderated cost and good in terms of the power consumption. <S> also you will get most of the design resources on http://www.st.com . <S> Key Features of STM32L151VB <S> MCU are : Ultra-low-power platform1.65 V to 3.6 V power supply -40 <S> °C to 85 <S> °C/105°C temperature range 0.3 <S> μA Standby mode (3 wakeup pins) 0.9 <S> μA <S> Standby mode + RTC <S> 0.57 <S> μA <S> Stop mode (16 wakeup lines) <S> 1.2 <S> μA <S> Stop mode + RTC <S> 9 <S> μA <S> Low-power <S> Run mode <S> 214 μA/MHz Run mode <S> 10 nA ultra-low <S> I/O leakage <S> < 8 μs wakeup time <S> Core: ARM®Cortex™-M3 32-bit CPU From 32 kHz <S> up to 32 MHz <S> max <S> 33.3 DMIPS peak (Dhrystone 2.1) Memory protection unit Reset and supply management Ultra-safe, low-power BOR (brownout reset) with 5 selectable thresholds Ultra-low-power POR/PDR Programmable voltage detector (PVD) <S> Clock sources 1 to 24 MHz crystal oscillator 32 kHz oscillator for RTC with calibration <S> High Speed Internal 16 MHz factory-trimmed RC ( <S> +/- <S> 1%) <S> Internal Low Power 37 kHz RC <S> Internal multispeed low power 65 kHz to 4.2 MHz PLL for CPU clock and USB (48 MHz) <S> Pre-programmed bootloader <S> USART supported Development support <S> Serial wire debug supported JTAG and trace supported Up to 83 fast I/ <S> Os (73 <S> I/Os 5V tolerant), all mappable on 16 external interrupt vectors Memories: Up to 128 KB Flash with ECC <S> Up to 16 <S> KB RAM <S> Up to 4 KB of true EEPROM with ECC 80 Byte Backup Register LCD Driver for up to 8x40 segments <S> Support contrast adjustment Support blinking mode Step-up converter on board Rich analog peripherals ( <S> down to 1.8 V) <S> 12-bit ADC 1 Msps up to 24 channels <S> 12-bit DAC 2 channels with output buffers 2x Ultra-low-power-comparators(window mode and wake up capability) <S> DMA controller 7x channels <S> 8x peripherals communication interface 1x USB 2.0 (internal 48 MHz PLL) <S> 3x USART (ISO 7816, IrDA) <S> 2x SPI 16 Mbits <S> /s <S> 2x I2C (SMBus/PMBus) <S> 10x timers: <S> 6x 16-bit with up to 4 IC/OC/PWM channels, 2x 16-bit basic timer, 2x watchdog timers (independent and window) Up to 20 capacitive sensing channels supporting touchkey, linear and rotary touch sensorsCRC calculation unit, 96-bit unique ID
For me, cheap and convenient dev boards is a must, but this may or may not be as important as some other things Consider what packages you're able/willing to work with -
Karnaugh Maps - What is the purpose of a "don't care" condition? I've got a problem and was stuck for whole day.. I'm designing an octal to 7 segment common cathode decoder which only octal digits 2 to 7 are applied to the inputs of the decoder so combination for digits 0 and 1 are never applied. I understand that X don't care conditions can be 1 or 0 For my input A But When i tried to set input A, it lights up when 1 is switched on? I just wanted it to show 2,3,4,5,6,7 digits only What's the purpose don't care conditions? <Q> Whenever input A is set to 1 you want output A to light as shown in the diagram below. <S> There's nothing wrong with output A lighting because the diagram shows that's exactly what you want. <S> The reason output A is a don't care for 001 <S> is because you stated you will never have 001 as an input. <S> In your testing, you see that output A is lit when input A is set to 1 because that's exactly the functionality you're after. <S> The purpose of the don't care is to simplify the amount of logic you need. <S> Which it has done here. <S> You don't have to special case output A to worry about whether B and C are set when A is set. <S> For input A, output A only cares about what input A is. <S> If you cared about 001, then your output logic for output A would be: <S> A = B + CA <S> Rather than: <S> A = B + <S> A <S> You would need an extra AND gate for C*A. <S> Having <S> that don't care reduces the amount of gates you need to get your output properly. <S> Lastly, it would be a bit less confusing if you used a different naming convention between input and output. <S> Something like input = XYZ and output = ABCDEFG or input = <S> ABC and output = abcdefg. <A> "Don't Care" conditions still exist in your design, you are just saying that you don't care what happens when this input set occurs. <S> When you map the resulting truth table and perform appropriate grouping (either 1s or 0s), you effectively establish what the don't care outputs will be. <S> Namely, if you group a don't care condition with 1s (minterms), it becomes a 1. <S> This of course is also true for don't care conditions and grouping with 0s (max terms). <S> For example, your input C'B'A is now a 1 since you have grouped it as such. <S> The point of this is to relax restrictions on the output for states that don't really matter to you so that you have increased freedom when mapping. <S> You must either establish what happens when this undesirable input occurs (i.e. turn the segment off by driving all LEDs off), or ensure that such input combinations never occur in your product as it will elicit undefined behavior. <A> If you unnecessarily constrained them to be either 1 or 0 you would not have that flexibility.
By marking don't care terms in your Karnaugh map you can decide, when using the map to simplify you logic, to either have them as 1 or 0 - whichever would produce the simpler logic expression.
Why do electronic circuits need their power supply to be DC, or rectified AC? I'm pretty sure the answer to this should be obvious - even to me ... It's been a while I've been reading and attempting to construct simple electronic circuits. The supply almost always is either through a battery/cell, or AC duly rectified to DC. I have the impression electronic circuits rarely ever work off an AC supply. Is this impression correct? If yes, why is an electronic circuit rarely (if ever) powered/biased using straight AC? <Q> Your impression is correct . <S> AC flips polarity very often. <S> Most semiconductor devices have been designed with very particular polarity conditions in mind. <S> If one were to reverse the polarity between two inputs on many different components, you would get magic smoke coming out of it. <S> For example take mosfet operation. <S> An NMOS is expected to block current from drain to source until the gate is activated. <S> If you have AC across drain to source, then it allows current to flow backwards (losing gate control). <S> It's not impossible to design an electronic circuit with active devices around AC, but it makes it much more challenging. <S> I should also qualify this statement: many electronics circuits do have signals with AC components to them, but they usually have a DC offset to them to prevent the polarity switching. <S> That would be something like 5VppAC with a 2.5V DC offset would be an AC signal from 0-5 V. <S> That remains the same polarity at all times even though it's passing an AC signal. <A> A keyword - in context with the question - is LINEARITY. <S> Let us take the simple example of an electronic circuit, which is widely used: Transistor-based "linear" amplifiers (lumped circuits or integrated). <S> Transistors are highly non-linear devices. <S> In order to produce sinusoidal output signals exhibiting low signal distortion it is necessary to use only a certain part of the input-output charcteristic. <S> Hence, we use a dc voltage/dc current to BIAS the device at a suitable operating point (within a limited quasi-linear part of the input-output function). <S> Then, the input signal causes a swing around this operating point resulting in an acceptable output quality. <A> You are right, circuit are seldom powered with AC. <S> Some analog circuit may work on AC, but digital doesn't. <S> This is due to the very nature of how it has been design and how it has proven to be efficient and easy to implement. <S> An example would be old casino slot machines which used an analog signal to make the reels turn and the coin dispenser drop coins one by one. <S> Also, some mechanical counters used AC signal toggling to count. <S> Transistors as they are now are designed to be efficient with DC signals (if you consider digital data as DC, since some purist would say it actually is offset AC). <S> It is what is the most power efficient and space-wise efficient in integrated circuits. <S> Also, encoding data on AC signal (while possible) is much more complex than with DC signal, since you can use a simple edge detection mechanism. <S> In order to do so with AC, you need to use peek detectors or circuits like that, which is not practical. <S> Now if you want to understand why technology moved toward DC, consider this: imagine you are trying to turn on/off complex circuits with DC, it is easy, because your signal has only two states: full on and full off. <S> With AC, you would have (as a guess): an AC signal or no signal. <S> Relays could be compatible with your AC signal, but they work simply because of magnetic field. <S> In order for your relay to remain firmly on, you would need to rectify your signal (so it doesn't swing) thus yielding rectified AC... <S> In short, it is both due to historical and technological reasons. <A> First electron tube was the diode and the main property is to produce DC voltage from AC (one way). <S> Triode tube is based on diode (DC) and was the first device with stable amplifyication or switching properties. <S> This was realized controlling the electron flow from a negative cathode to a positive anode via a grid. <S> So the weak grid voltage modulates a DC voltage (dc swing) <S> and those an amplifier is made. <S> This device needed mainly by Telegraphy and early Radios area . <S> To use an AC power makes the amplification extremily coplex and finaly useless. <S> After that a lot of applications with electron tubes introduced in the market and industry around the globe. <S> Transistor invented as a direct replacement of triode tubes, based exactly at the same concept, and today IC <S> ’s consists of million transistors that needs a DC power. <S> However there is a semiconductor device like Thiristor or Triac that can be powered with AC power, but in most cases needs a zero-crossing circuit with a proper input signal that should be related somehow with the frequency of the AC power and so on <A> Most interesting circuits maintain some internal state, that means: they store information. <S> In order to do this, the circuits needs electrical energy. <S> Pure AC (current and voltage in phase) by its nature regularly goes through a period in which no energy is supplied. <S> This makes it difficult to make a circuit that can store state: it is as if the circuit has to start anew every AC period. <S> You can circumvent this problem by storing energy in some other form (magnetic, mechanic, in a capacitor, etc) <S> but why bother? <S> DC can supply energy all the time, so most circuits work with DC. <S> The above is mostly about digital circuits. <S> An analog circuit could be AC powered, but then the AC component would be present in the output, which in most cases would present a problem (especially when the output is fed into a human ear).
There are system which uses AC signal to encode data on some very old systems, but it requires lots of high power components, which is not practical with current technology.
How to troubleshoot soldering issue? I have circuit working perfectly on a breadboard - motors are spinning as expected.But same circuit with same components is not working when I soldered it - motors barely can spin (you hear buzz instead of spinning). Spent few days trying to figure it out - checked all connections - looks fine. What it can be? How to troubleshoot such situation? p.s. Let me know if it worth recording a video of the behavior.p.p.s. I'm a complete newbie in all that - so probably missing something obvious. Breadboard connections: Soldered board back side NOTE: Ground sometimes connected using very tiny wire . Soldered board connections Upd 6/24/2014: Inverted soldered board picture horizontally to match schematics. <Q> Looking at your soldering job, some of the joints look messy and crowded. <S> I would assume that since it's working on the breadboard, the problem is with the actual solder connections. <S> Use flux before applying solder as it looks like your solder is not sticking properly to the metal. <S> It works magic. <S> Make sure your iron is hot enough. <S> Make sure to apply the soldering iron to the component and not try to bring solder from the iron to the joint. <S> This will cause a cold solder joint <S> and that's kind of what some of those joints look like. <S> Solder joints should look smooth and shiny. <S> Silly, but try jiggling the joints to see if there's a micro-fissure in any of the joints, which will cause intermittent connections. <S> I hope that helps you track down your issue! <A> The easiest way is to take an oscilloscope and look at the signals. <S> If you can't do this, I recommend building your next version sort of step-wise from the working breadboard version, testing as you go along. <S> First hard wire <S> the motor connections, and jumper back to the breadboard. <S> Make sure everything works. <S> Then hard wire <S> the DIP breakout, and jumper that back to the breadboard. <S> Retest. <S> Keep going until the breadboard is empty. <S> Also, just get in there with a multimeter and start checking continuity between points that shouldn't have any. <S> May have to remove you motor from the circuit first, as its low impedance and will confuse you. <A> Sometimes (if the voltage level is 3v-5v) <S> I'll use a led with soldered cables and use it to validate that ground and places that are supposed to have voltage <S> are ok <S> , I find this a little easier for a first validation, if something looks amiss then the multimeter, or the oscilloscope are the next step.
Use the continuity feature on your multimeter and see if any solder joints are touching other connections they're not suppose to.
Using single microcontroller PWM output for 2 h-bridges I am using ATMega16L and I'm using two DC motors to build an autonomous robot. I want to use an h-bridge to control the two motors. Can I use a single PWM output from say Timer1 on the microcontroller to control two h-briges so that the motors can go forward at the same speed, go reverse at the same speed and change direction by making one motor go forward and the other in reverse? Can I connect OC1A PWM output from the microcontroller to be an input to 'IN1' pin on both h-bridges while 'IN2' is low so that robot goes forward and vice-versa to make the robot go backwards. I am not sure how to connect the circuit to share OC1A output to control these h-bridges. <Q> If you are happy with the specified H bridge only being able to supply 0.5 amps absolute maximum whilst "dropping" about 1 volt with the high-ish on-resistance of the MOSFETs in the package, it can be made to work. <S> The data sheet showed an application where it runs from a 3V supply - it's a feeble little device and there are significantly better devices available. <S> See also my post on this subject. <S> Really this device is intended for an analogue control of the motors. <S> Note the diagram below: - If you read the spec you'll see that the rise time and fall times are about 1 to 2 us <S> so your PWM control needs to be limited to maybe about 50 kHz - you'll also need to setup the control voltage <S> Vc - see the feedback resistors and op-amps - they ultimately control the voltage that the motor sees <S> so PWM will work but <S> you may be better just using a filter from the PWM signal to create an analogue voltage and feed this into Vc. <S> At 90mA and 3 volts, the power is 270mW and this is acceptably inside the absolute max rating of 700mW but the device will get warm and "lose" battery energy. <A> Sure you can do that without any problemsJust make sure <S> all the grounds (gnd's) are connected together.but <S> do you mean IN1 = <S> IN2or <S> IN1 = inverse <S> IN2for the last case you need to put an invertor behind it <S> If you have any more questions feel free to ask simulate this circuit – Schematic created using CircuitLab <A> Parallax make a h bridge. <S> Hb50. <S> You can link 2 together off the 1 input and control them separately.
That way you can have 2 motors working independently of each other but sharing 1 pin on the microcontroller
Suggestions for Ternary Computer Parts I am thinking of creating a ternary computer from scratch, mostly as a hobby project, are there any parts out there that I could use? Or would I have to create them from scratch? If so, what would be a good method? I was thinking of a balanced Ternary system, much like Nikolay Brusentsov's Setun. I am familiar with VHDL and I am quite familiar with Binary logic. I was hoping to avoid using digital components, such as FPGAs and make a purely ternary computer, so I was thinking more of what to use a logic units, in lieu of transistors. <Q> A PMOS over a NMOS would work as a ternary inverter if the supply voltage is low (slightly above the threshold voltage): <S> simulate this circuit – <S> Schematic created using CircuitLab <S> At -0.5V input, the output will be raised by M2 to 0.5V. <S> At 0V input, both transistors will be "Off" and the resistors will pull the output back to 0V. <S> At 0.5V input, M2 will shut off and M1 will turn on pulling output to -0.5V. <S> A Ternary <S> NOR could be this: <S> simulate this circuit Truth Table: 00 <S> 0 <S> 0 <S> + - 0- <S> + <S> +- 0 <S> ++ <S> - -- + A Ternary NAND could be this: simulate this circuit Truth Table: 00 0 0 <S> + 0 <S> 0- <S> 0 <S> +- 0 -- <S> + <S> + <S> + - I would assume more complicated ternary gates could be made based on similar principles. <S> It's interesting to note that a major disadvantage of this topology is the loss of speed due to RC settling times where the C is inherent capacitance of the transistors. <S> One possible advantage of this may be the required low-voltage and therefore low power draw of the circuits. <A> You're not going to find any logic ready-made. <S> I'd try mapping 2 binary bits to a single ternary bit by mapping 11 to 1, 10 or 01 to unknown, and 00 to 0. <S> Then you would define your ternary logic operations on sets of these two bits. <S> Likewise, for instance, you could then use existing memory at half data width, that is an 8-bit-wide RAM would be used as a 4-bit-wide ternary RAM, etc. <S> You'll need to become proficient with VHDL for the design process, or if you like you can get a schematic entry option for FPGA design. <A> I'm dredging up a really old post here, but my answer was voltage comparators (not binary comparators). <S> My project thus far is documented at https://hackaday.io/project/6284-tern-physical-implementations-of-ternary-logic
However, you can build up your own logic using an FPGA.
Is there an IC with a series of 2-input switches that can have all elements switch with one signal? I want to select either input A's 4 signals, or input B's 4 signals.So I'm more interested in using 3-pin like switch, that can short circuit from the either A or B (not open or close one input) Is there such IC that holds a series of 2-inputs switches, that can change the state of all at once, or should I just stick to a mux or program a CPLD? <Q> You can solve this with 2 SPST switches and tie the outputs together, or just use a DPDT analog mux like the Maxim 14689. <S> Picture snip below from Maxim datasheet. <A> There are many such devices available, so I recommend a Google search to find the right one for you. <S> An example is 74LVC157A : <A> If you know you want exactly 4 inputs then there is definitely dedicated ICs you can by <S> that serves the function you want <S> but if you plan on modifying or scaling up your design at all you may want to consider building your own circuit using some basic tri-state buffers and OR gates. <S> I made this one in about 5 minutes and you can just copy it for however many inputs you have. <S> Just set whichever select input you want to '1' to have that output or both 0 for hi-Z. <S> Simple schematic:
If you are looking to switch digital logic, you are looking for a "quad 2-input multiplexer".
Noise control in op-amp circuit design by using low spec op amps I have a rather strange problem. I have a breadboard circuit on a double sided PCB with plenty of ground plane and a good well decoupled power supply. I am amplifying a small medium frequency signal (mV, hundreds of kHz) and bandpass filtering the region of interest. Initially, I thought to use the AD829 - very low noise, plenty of bandwidth. The problem appears to be the it is too good! I was getting lots of noise especially at high frequencies leaking through. So, changed the AD829s with the cheap TL051 (10x worse noise spec, 30x lower bandwidth). Problem solved - noise gone! Now obviously the problem has disappeared because the TL051 cannot handle much in the way of high frequency, which is fine. What worries me is two things. First, how legitimate is it to use low spec components to "hide" a problem like this. And second, do manufacturers ever "upgrade" the spec of their amplifiers? One day, will I put in a TL051 that has been improved and discover the product now longer works? This is the bandpass section which really looks bad with AD829s <Q> The question is "is the extra noise you saw relevant to what you are trying to achieve"? <S> In other words is the noise in the bandwidth of interest of your signal? <S> If it isn't, can it still cause you problems? <S> Also, are you sacrificing anything by using the TL051 - if not then use it <S> but there are other considerations. <S> Op-amps may specify so many nano volts per root hertz <S> but, there is also the L.F. noise (usually specified as so many micro-volts peak-to-peak between 0.1Hz and 10Hz). <S> Was the "so-called" good device actually worse than the TL051 in this area. <S> BTW I haven't looked so I don't know <S> but you shouldn't make assumptions. <S> The other equally important noise source is due to input bias currents and these are usually in the pico-amps per root hertz range. <S> If you are using large input/feedback resistors this noise can dominate and, you might find that the TL051 is significantly better than the AD829 in this area. <S> Again, I haven't looked but it's always best not to make assumptions. <S> EDIT - <S> the TL051 is 150x better than the AD829 for input current noise. <S> TL051 is 0.01pA per sqrt(Hz) whilst the AD829 is 1.5pA per sqrt(Hz). <S> This will make a significant difference if the size of resistors on inputs and feedback are 1kohm or above. <S> At 1kohm, the AD829's input current noise becomes about the same level as its input voltage noise and at 10kohm it becomes comparable with the TL051's voltage noise. <S> Power supply rejection ratio is another thing to consider - if there is noise on the power supply (as there inevitably is), which device is better at rejecting it? <S> Common mode rejection - if the amp configuration is differential, you would naturally assume common-mode noise would be always near zero - not so, check the data sheets and you will see that C.M.R. ratio gets far worse at higher frequencies. <S> I'm just trying to say that it's always a more complex picture!!! <A> From your schematic, it looks like you're not using the compensation pin for the AD829. <S> The datasheet recommends using up to as much as 68pF on this guy when running with low gain. <S> Since this chip is so fast, you can often have unintended positive feedback at high frequencies due to the layout. <S> I would recommend examining whether or not you should be using the pin 5 compensation in this application. <A> You can generally count on the "typical" parameters not varying too much from the published specifications, but that might be 3:1, so it's unwise to depend on them too much. <S> If that sounds vague, it is. <S> They're not going to make a 3MHz amplifier like the TL051 work at 100MHz, otherwise many applications would experience undesirable behavior such as (unwanted) oscillation. <S> Unity gain bandwidth is probably one of the better controlled, yet unspecified, characteristics- I would expect maybe <S> +/-30% to 3 sigmas <S> but that's just a guess, and worth no more than what you paid for it. <S> It typically varies 10% with temperature on top of unit-to-unit variations. <S> Comparing noise from a bipolar video amplifier with a JFET audio amplifier is going to depend a lot on your circuit. <S> One pet peeve of mine is that they often don't state the 1/f corner frequency for current noise, which means that you can't really predict how much the total RMS noise will be if it's less than the stated test frequency, They also often truncate the noise voltage curve to below the frequencies where multistage amplifiers have an enormous hump in the noise. <S> For example, the excellent LT1028 has noise about 7:1 higher at 300kHz than at lower frequencies in the white noise region. <S> Another gotcha is nonlinear behavior in the presence of strong noise- bipolar amplifiers tend to be worse than JFET amplifiers.
It sounds like there is noise that is either self-generated by other parts of the circuit (maybe switchmode power supply) or external sources that are making it through your bandpass filter, rather than intrinsic amplifier noise.
4 layer PCBs with Fritzing Can you use Fritzing to create a 4 layer pcb? Also, in real life, what is the maximum limit of layers we can use to create pcbs? is it 4 layers? <Q> If you want to make 4 layer boards, use a real tool, not a toy. <S> Design Spark <S> PCB is easy to learn. <S> KICAD is a bit more difficult. <S> Both are free, and support unlimited layers and pins. <S> As has already been said PCBs come in lots of layer counts. <S> The same can be said for soldermask color, material, thickness, copper weight, and finish. <A> Fritzing only supports two copper layers, you can see an example at the Fritzing's View options tutorial and it only has the copper 0 and copper 1 layers available for display. <S> As for the maximum numbers of layers a PCB can have I'm not sure, but a local company I've used in the past (but not for this many layers) <S> Entech Electronics advertise up to 26 layers. <S> As others have mentioned Fritzing is not a very serious tool and you would be better to have a look around at other solutions most of which are better and faster to use once you get used to them. <S> Another one worth a look at is Eagle that is free for limited non-commercial use and fairly affordable for commercial use. <A> I don't know what you can do in Fritzing - no one in their right mind uses it for anything more than creating little doodles for people that don't know how to read a proper schematic (i.e., children). <A> In fact, I've designed a fair few one-sided boards, back when it was more cost effective to etch my own. <S> Four layers are plenty for hobbyist use and even a lot of professional products. <S> My company makes products comparable in size and density to a motherboard, and I believe we typically use between 10-14 copper layers. <S> Mostly you need that many layers when working with chips with a lot of I <S> /O, like processors or FPGAs. <S> You just plain need the layers in order to get everything where it needs to go without using tons of space. <S> Also, when you make complex boards with signals at gigabit speeds, there are a lot of layout restrictions that are necessary to avoid crosstalk, meet regulatory emission requirements, dissipate heat properly, etc. <S> It's a difficult enough problem that we employ people who specialize in just layout and routing. <S> PeterJ pointed out a manufacturer that will go up to 26 layers. <S> You might be able to do 4-5 more than that, but you're starting to hit practical physical limits with warping and such. <S> I don't know any low-cost prototype board houses who will do more than 4 layers, though. <S> If you want more layers, you have to be prepared to spend a lot and/or order in high volumes.
Fritzing only supports two layers, which is sufficient for most hobby uses, the target audience for the tool. 2, 4 and 16 layers are common, though even higher are possible. PCBs can be made in many many layers.
Purpose of pullup resistor in BJT LED driver circuit One answer to this question suggests the following circuit to drive a LED from an open collector output of a 74LS47: simulate this circuit – Schematic created using CircuitLab What is the purpose of the R1 resistor? What would happen if R1 would be missing? I did a simulation, but could not find a different behavior regardless whether or not R1 was present. (I could have added this question in the original question as a comment to the answer, but I did not want to make the already excessively long list of comments even longer. Therefore I created a separate question. I hope that is OK.) <Q> That open collector output ... when off, it will have some leakage (possibly microamps) depending on temperature. <S> That can supply enough base current to turn Q2 on, at least partially. <S> The simulation might not model that leakage accurately. <S> R1 pulls Q2 base to 5V against that leakage, ensuring Q2 is fully off. <A> If R1 were missing, the base of the transistor would float when the OC output were off. <S> With the resistor, the base is at 5Volts when the output is off, and very near 5V*1k/11k when the output is on (voltage divider between 5 volts and near ground). <A> If the LED is just for humans to look at it wouldn't be necessary, but if the LED is for communication purposes then it will increase the maximum rate of signalling. <A> The base-emitter junction of Q2 has a finite capacitance. <S> When you turn off the gate (collector current stops), then that capacitance needs to discharge before the BJT turns off. <S> This process will happen much faster when there is a leakage path through the resistor R1. <S> In fact - if the "off" gate is not <S> quite off, then the transistor Q2 would act as an amplifier of the leakage - with a beta of at least 100, you get a 100x multiplier of the leakage current. <S> But when you have the pull-up resistor, it will ensure that the leakage current does not turn on the transistor, and all is well. <S> So - the pullup ensures a shorter, sharper turn-off.
Besides Brian's answer another reason for a pullup resistor is to increase the speed of turnoff.
Olimex/ATMega328 Reading from UART and sending to USB I'm getting frustrated with my electronic knowledge, because I want to do this simple thing: Olimex 328/ATMega328 reads data from UART (Olimex MOD-PULSE or whatever) and forwards it to the USB Port (my computer). I don't understand how I can do this. I wrote following program: void setup() // run once, when the sketch starts{ Serial.begin(9600); Serial1.begin(9600);}void loop() // run over and over again{ Serial.println(Serial1.read()); // prints hello with ending line break } But it doesn't work, since Serial1 does not exist. Could you give me a hint? I can't find anything that I can understand on the Internet. <Q> Apparently the site didn't like my attempt to complete my sign-up. <S> So further to your comment on my previous answer(as user46333): On the Uno (the board I am using for development), it is possible to communicate with the board using the UART in two ways. <S> There is the USB connection, and there are the Rx <S> /Tx pins (2 and 3, respectively). <S> When the USB is connected to the computer, it communicates on the same lines, indirectly, by going through the ATmega16U2. <S> The two connect to the ATmega328 via the same pins, as demonstrated by the RED lines in the picture below (schematic from Arduino Uno documentation): <S> So to answer your question <S> do they read/write on the same cable? <S> They read/write on the same pins. <S> Also, to correct my code, and simplify it: void setup() { Serial.begin(9600);}void loop() { <S> if (Serial.available() > 0) <S> { Serial.println(Serial.readString); } else {Serial.println("HELLO");} delay(2000);} This will receive any data sent to the controller on the Rx pin, and then immediately print it to the Tx pin. <A> ATMega328 has only one hardware serial port, i.e. using Serial1 makes no sense. <S> How do you suppose you transfer it to USB CDC device? <S> You need serial2USB bridge (prabably via second UART) or chip supporting USB (e.g. ATMEGA1286/7). <A> On the Arduino Uno (example that uses the ATmega328), data can be sent to and from the device via the UART. <S> Example code: void setup() { Serial.begin(9600);}void loop() { <S> if (Serial.available() <S> > 0) { String getString = <S> Serial.readString(); Serial.println(getString); } else {Serial.println("HELLO");} delay(2000);} Will look for incoming serial data, and print it back to the serial connection, otherwise printing simply hello. <S> This code can be modified to accept different variable types, and still print them out to the serial connection. <S> Also, it is possible to use other I <S> /O ports to simulate a UART connection, using compiled code libraries ( one exists on Arduino's site ), which should be more than adequate with a low baud rate.
It is possible to connect a device (ie RS232->TTL connection) to the Rx and Tx pins to communicate serially with the controller.
Human Powered Bicycle Lighting System: Is this feasible for an enthusiast? So, I was doing some reviewing over on bicycles stack exchange, and I realized the Cygolite Metro line of reusable chargers would fit my budget - AND be USB rechargeable! Alas, I've been told constant charging is bad. The idea was to hook a dynamo up to a battery and have the battery in turn charge it... I guess I can just plug unplug it manually. I was gonna waterproof the battery, probably with some kind of project enclosure. I suppose I could use something like this to save me some build time. I expect my load to be 7 to 10 watts. Does any one have a sense of how much resistance that would add to my ride? (Hypothetically, let's say I build my own.) Also, I do giant hills. If I do roll my own system, what can I do to make sure I don't surge too much power into the battery coasting down a hill? Will generators generally make fixed volatages with varying amperages, usually? (Ie, is that how power fluctuates?) I survived the first half of Engineering Circuits one (drop related drop.) I'm a bicycle commuter. <Q> A voltage regulator (like the 7805) will make sure there will be a defined voltage on the output. <S> R1 can be left out. <A> The idea was to hook a dynamo up to a battery <S> I'm assuming you're talking about a hub dynamo here. <S> Most hub dynamos (Shimano, SRAM, SP) are 6V, 3W, so you can estimate a best case charging time, and compare that with your commute time. <S> I'm a bicycle commuter. <S> You will need to look at how much (continuous) charging current the light will draw <S> - chances are, the dynamo will not be able to provide it as your speed varies. <S> You will need to effectively limit the power drawn from the dyno and feed a "cache battery", which will in turn charge your light. <A> In regards to resistance: <S> A SON28 GenHub has almost no appreciable resistance while riding. <S> If you pick up the front wheel and turn it slowly you can feel the bump.bump.bump of the windings and magnets, if you put the bike down and roll it forward slowly you can't. <S> So adding your body weight to it and pedling you won't notice it. <S> In regards to the concept and idea: What you are planning is completely doable. <S> I use a SON28 front hub connected to a home made rectifier/regulator circuit (I joined here today specifically to try and refine it for this season). <S> That in turn provides USB power to a buffer battery , a cheap Amazon unit with (2)18650 Chinese LiPos in it, then to my tablet or anything else I have to charge. <S> Yes constant charging is bad, but after 15,000 mi in 2 years it still works. <S> If I have to change it that infrequently , that's an acceptable cost/benefit for me to abuse it and replace it. <S> I did a youtube video explaning the entire charging system here <S> ( I hope posting youtube links is OK here, I am new here so not sure what's kosher or not yet).
However, given the inefficiencies involved you will be better off just charging the light before you start riding, or you could get a light that runs directly off the dynamo (like the IQ-Fly or Lumotec-Lyt).
Batteries have zero voltage According to Ohm's law V=IR. This means that if the current is zero there is no voltage. Does this mean also that an unplugged battery has zero voltage? Then why does it say otherwise in the package. In other words: What does it mean that a battery is 1.5 Volts if, after all, it depends on the resistance? What does a voltmeter measure if the voltage depends on resistance. I'm sorry if this looks like a silly question. I'm not from electrical background. <Q> Does this mean also that an unplugged battery has zero voltage? <S> No, Ohm's law is not universal; Ohm's law defines the ideal resistor circuit element. <S> But not all circuit elements are resistors and thus, not all circuit elements obey Ohm's law . <S> A battery is an approximate voltage source , not a resistor and thus does not obey Ohm's law. <S> For an ideal voltage source, the voltage across is independent of the current through; the voltage across is what it is regardless of the value of the current through. <S> Thus, if we connect an ideal voltage source and resistor together to form a circuit, the voltage across the resistor is fixed by the voltage source. <S> Since the voltage is fixed, the series current through the resistor and battery is determined by the resistance \$R\$ of the resistor : $$I = \frac{1.5V}{R}$$ <S> If we disconnect the battery, we have effectively made the resistance infinite and we get $$ <S> I = \frac{1.5V}{\infty} = <S> 0A$$ <S> Physical voltage sources, such as a 1.5V battery, cannot supply unlimited current and, in fact, produce a finite current when short-circuited. <S> So, we typically model a physical battery by placing a resistor in series with the voltage source. <S> But this is the topic of another question. <A> You are talking about a "singularity" here ... <S> Like the other answers state, this formula isn't applicable for an infinite value of R. <S> In practice, you will always have some "leakage" current in the range of nano- to micro-Ampere, because the resistance isn't really infinite. <S> But this is hard to measure... <S> The voltage isn't "dependent" on resistance like you state. <S> The formula U= <S> I*R just gives the relationship between voltage, current and resistance. <S> There is a good analogy for this: Water in a hose with a valve somewhere in this hose. <S> Voltage is the water pressure. <S> Current is the flow in the hose. <S> Resistance is the position of the valve. <S> If the valve is closed, there is not flow. <S> But there is still pressure in the hose. <S> The voltmeter measure the voltage. <S> In fact, it has a finite internal resistance, letting a small current pass through the voltmeter. <A> The battery voltage is defined by its chemistry. <S> It is usually a redox reaction whose voltage can be determined by looking at electronegativity values of the used metals. <S> Why the Ohm law still apply? <S> Ohm law is a law that works given a certain model of the physical thing. <S> Using that model, a battery is modeled as shown in this figure: <S> If there is no current flowing out of the battery, ohm law says that there is no voltage drop in R1. <S> Thus the output voltage of the battery is V0: the nominal voltage of your battery. <A> As has been mentioned, the battery has the same voltage (difference in electrical potential) regardless of what is connected to it. <S> A battery is a voltage source and will attempt to give the same voltage across different loads (by varying the current). <S> By having nothing connected to the battery, you have an infinite resistance. <S> Thus, I = V/R => <S> That I = 0 <S> as any V divided by an infinite resistance will approach 0. <S> Though, keep in mind that chemical and other types of batteries generally have an internal resistance that is built in due to the resistance the chemical elements themselves present. <S> You can think of a battery as an ideal voltage source with a resistor in series. <A> I = <S> V/R. <S> You have zero current because you have infinite resistance. <S> V can be anything. <A> Unplugging a battery is same as connecting an infinite resistor (the air between the batter terminals) across it. <S> The Ohm's Law still applies. <S> \$R=\infty\$, so \$I=0\$ <S> regardless of the nominal battery voltage. <S> What does it mean that a battery is 1.5 Volts if, after all, it depends on the resistance? <S> 1.5V is the open circuit voltage of the battery. <S> It is not the voltage level under load. <S> If the internal resistance of the battery is \$R_{int}\$ and the load resistance is \$R_{L}\$, the voltage on the load will be $$ V_L = <S> 1.5V <S> \times \dfrac{R_L}{R_{int} + R_{L}}. <S> $$ <S> What does a voltmeter measure if the voltage depends on resistance. <S> The voltage on the battery can be found by the formula above. <S> If there is no load resistor (i.e.; \$R_L=\infty\$), then according to the formula, the voltmeter will measure 1.5V. For measuring the internal resistance of the battery, make \$R_L=0\$ (for a very short time!), and measure the current through the battery \$I_{sc}\$. <S> You can find the internal resistance \$R_{int} = \dfrac{1.5V}{I_{sc}}\$ <A> Voltage in real life terms, is called 'potential'. <S> A bucket of water has potential energy waiting to burst out of a leak. <S> (Voltage) <S> The bucket material has the property to hold the water in the bucket. <S> (Resistance) <S> Water flows out of a leaky bucket. <S> (Current) <S> Bigger <S> the leak (Lower the resistance) -> <S> Stronger the flow ( <S> higher the current) <S> When there is no water leaking, the bucket of water still has its 'potential'. <S> (1.5v)
When you are measuring the actual voltage of the battery with say a voltmeter, it is actually running the current through a large value resistance (theoretically it would be infinite) and just calculating the voltage from the measured current through the resistor. To answer your questions in detail: It does have 1.5 Volts.
Transistor working with unusual biasing What would happen to a BJT if both junctions of the transistor are forward biased? Is there any literature on this? By literature I mean characteristics/equations. Any links would help. I have also drawn circuit diagrams to make my point clear. simulate this circuit – Schematic created using CircuitLab Where I was taught in college, we worked on active region (BE-forward biased, CB-reverse biased) cutoff region (BE-reverse biased, CB-reverse biased) saturation region (BE-forward biased, CB-on the verge of a reverse bias) What happens if CB and BE are both forward biased? Is there any literature or quantitative analysis method for that? What happens if BE is reverse biased and BC is forward biased? Is there any literature or operation zone defined for that. The reason I want to inquire is because I was recently working on an Op-amp circuit attached to a BJT and there was a case where both the junctions were forward biased and I could not fathom how to analyze it because of basic complexity, in fact I did not even consider the case that both the junctions could be simultaneously forward biased and I only came to that conclusion when I simulated my circuit, hence I want to know how the regions operate so that in future I would not face problems with my circuits. <Q> That appears to be just an extension of the saturation region if CB and BE are both forward biased: http://en.wikipedia.org/wiki/Bipolar_junction_transistor#Regions_of_operation <S> It looks like your definition of saturation region is overly narrow. <S> If BE is reverse biased and BC is forward biased, then it still acts like a transistor, but because of the physical way bjt's are setup, you have much less gain than forward active. <A> What would happen to a BJT if both junctions of the transistor are forward biased? <S> Without reverse bias across base-collector region, the device no-longer behaves like a transistor and the two PN junctions act as forward biased diodes. <S> A bit boring really. <A> simulate this circuit – Schematic created using CircuitLab <S> The transistors will behave as a pair of diodes with a common anode (NPN) or common cathode (PNP). <A> The main purpose of a transistor in electronics is to give output based on the base current.
But, if both sides are forward biased, we will receive output and if both are reverse biased, we won't receive output, irrespective of base current.
"Not mounted" - Meaning on a schematic I was looking at the schematic of the LPCXPRESSO LPC1769 board from NXP and I couldn't figure out what they meant by "not mounted" which appears on the left corner of the following picture. Here's a link to the full pdf document (page 3): http://www.lpcware.com/system/files/LPCXpressoLPC1769revB.pdf <Q> Neither the bypass capacitor C34 nor the SPI flash chip U3 has been populated on the board (since they're both inside the dashed box). <S> The footprints for both are there, and you could add them yourself (look for the designators C34 and U3). <S> Be sure to add the bypass capacitor C34, if it's not already there, should you decide to add the flash chip. <A> That's how I read it anyway. <A> "Not mounted" mean that components are expected on board but are not populated on sales board. <S> Developer usually add "not mounted " (or NM) component on sales board because it is very helpfull. <S> For example, flash component is helpfull for testing or reparing step, but not needed for sale version of board. <S> just think to different version of same product (for example same pc, one with wi-fi module and one without).Manufacture just produce only one pcb (decrease cost!) and then assembly only required part on different version
It means that if you bought the board from NXP, the SPI flash chip would not be soldered to the board but there would be PCB provision for it to be fitted should you wish to buy it and fit it yourself.
How can a faulty USB charger kill you? This question relates to this incident here , where a women in Australia died from a faulty USB charger that allowed the full 240V mains voltage through the USB cable. Now from my understanding you would have to be connected to the mains ground or the earth's ground in order to get an electrical shock. Otherwise there wouldn't be a potential that would allow the current to flow through her. Now according to the article which cites the police she received the shock because she was touching her phone which was connected to the charger and her laptop which was also connected to a charger, as well as her EARPHONES which bothers me the most, apparently she had burn marks on her chest where the laptop was and in her ears.Unfortunately there are no details about the devices that were used. So I'm just assuming below. Here the picture shown in the article explaining the connection: Now how would this be possible? The phone must have a metal body which is also somehow connected to the power of the phone. The only phone where I can imagine that being the case are the recent iPhone models where the outer aluminum ring on the side is apparently also acting as the antenna ( here and here ), maybe other aluminum unibody phones as well.Still, is that even a feasible theory? Wouldn't a metal casing be connected to ground instead? How would a ground in a DC circuit act when suddenly the circuit "becomes" AC? Then her laptop must have had an aluminum body as well which again must be connected to the ground. Again the only case where I heard about the laptop body be somewhat connected to the circuit is unibody MacBooks where users sometimes feel a tingle when touching the laptop while it is connected to the charger but is that even the case? Again it sounds weird that the laptop's body would be grounded: there is a low DC voltage coming in from the external charger so why would that be needed? And wouldn't the laptop charger not be faulty as well then? How would it allow the current from the phone charger to flow back into the outlet and complete the circuit? Shouldn't the laptop charger isolate the mains from the DC output circuit? Then the headphones: WHY would the outer casing of a pair of earphones be connected to the ground in any way and how would electricity even flow through the two sides of the earphones (THROUGH her head to the other side), that sounds like a really unnecessary detour for the current. If this indeed possible like described by the police would this also be possible by a phone and laptop with plastic bodies? I would love to see a detailed answer: I'm not that well educated when it comes to mains AC power and safety measures taken to avoid shocks. <Q> This was one of those crap Chinese-made Mains-to-USB chargers that can be purchased for as little as US$1.50. <S> I've taken them apart, and they are bad, criminally bad. <S> The isolation from mains to output is not taken seriously- not enough creepage distance, and in one of the samples I examined, there was debris inside that could cause a direct short if you shook the charger just right. <S> She could have been touching the earphone plug while unplugging or plugging the earphones into the phone, and perhaps a grounded Ethernet port on an otherwise plastic computer. <S> Once you're connected to the mains, any grounded bit of metal can be lethal. <S> Perhaps the computer was metal and grounded.. <S> most laptops these days have a grounded chassis so either the metal, trim, an exposed screw or anything like that would suffice. <S> Whatever the current path, the muscle contractions probably caused her to grip the conductive bits more tightly rather than flinging them away, and sealed her fate. <A> Since the laptop was aluminum and grounded, she completed a circuit by touching her phone and laptop simultaneously. <S> Cheapo adapters often forego safety certifications that require certain clearances between main and neutral and ground lines so that they do not contact. <S> A component failure in one of these products could easily bridge a hot line. <S> Seriously some of these things are scary. <A> Most of the answers here (while correctly lambasting the low-quality phone charger that energized its output cable to live/phase level) elided this (crucial) part of the question: <S> And wouldn't the Laptop charger not be faulty aswell then? <S> How would it allow the current from the phone charger to flow back into the outlet and complete the circuit? <S> Shouldn't the Laptop charger isolate the mains from the DC output circuit? <S> Actually, the laptop charger sometimes has ground-earth connection by design. <S> On one of mine (HP-branded so carrying umpteen world-wide approval seals), it explicitly says "connect only to grounded outlet". <S> Now this particular charger (model PA-1650-02H) does not have a IEC60950-1 class II mark (square on square) on it. <S> That strongly suggests its output ground is connected to earth ground (in order to comply with the safety regs for class I devices). <S> And measuring with an ohm-meter the resistance between its output ground/negative pin and its input earth prong, I get a value close to 0 ohms (within the error margin for my meter). <S> So, yeah, there are laptop adapters and laptops that have their DC supply (negative pole) earthed by design. <S> And the DC supply's negative pole is connected to the laptop's ground plane. <S> Even on a plastic-case laptop (like mine), the headphone and mic jacks for example have enough exposed outer metal ring to make a connection with the hand/finger possible. <A> ANYTHING that allows AC mains to connect to your body puts you at risk of death. <S> The diagram and method proposed may be correct as earth paths can exist in some equipment - either intentional or via components not able to withstand mains voltage or even via noise suppression capacitors. <S> If the path is to neutral (which it should not be <S> but I have seen appliances connected in that manner) <S> an RCD will not trip. <S> I would NEVER depend on an RCD being in place to working. <S> Contacting mains AC (especially 230 VAC) is an invitation to death. <A> The manner of death was not described, but both brain, nervous system, and heart are in the current path. <S> Ear buds may be considered a lower impedance path than laptop on chest, and so the minimum safe current is lower. <S> It may have been lower than that required to trigger an RCD "safety switch". <S> Assuming no body contact with building earth, and <S> no earth pins on either plug, an RCD would not have tripped. <S> In the diagram supplied, a fault in a USB charger may raise the phone to 240V AC potential, and the return path requires no fault in a laptop power supply for current to flow. <S> The coroner is responsible for any finding on this case, it would be unwise to speculate (as I have) before that investigation has completed. <S> The coroner does not investigate every death. <S> The case is not listed for the following week, we may have to wait a bit: <S> http://www.coroners.lawlink.nsw.gov.au/coroners/index.html Reaction by the New South Wales Department of Fair Trading includes their press release here: http://www.fairtrading.nsw.gov.au/ftw/About_us/News_and_events/Media_releases/2014_media_releases/20140626_safety_alert_usb_style.page <A> There are several potential points of failure: <S> Bad insulation between primary and secondary of the main transformer in the power supply. <S> For instance, no double insulated construction. <S> EMI suppression capacitors not safety rated. <S> Insufficient "creepage distance" between primary and secondary. <S> Feedback components between primary and secondary not sufficiently insulated, for instance a defective/counterfeit optocoupler. <S> Then of course there is the possibility the "manufacturer" made the "charger" as cheap as possible and just forego isolation entirely, thus passing deadly AC voltage unhindered to the USB cable. <A> In my opinion this case happen because of a touching between the 240 volts main supply and the ground of the USB cable. <S> Thus the current from the supply directly pass through the USB cable. <S> About the earphone, some earphone have an aluminium speakers housing which allowed the current flow through it. <S> Then the ground of the laptop charger was connected to the earth pin, which connected to the earth wire. <S> When she touch her phone, the current flow through her hand then through her ear then through the earphone than to the ground of the laptop that connected to the laptop charger.
What likely happened was that the adapter failed such that the USB ground became hot, which, since it is tied to the phone's chassis ground, made the chassis also mains potential. I would consider failure of the primary advice and placing 230 VAC on the user as an entirely adequate explanation of probable cause of death.
Duplicate pins on an IC I've realised that several ICs with simple components, such as the FDS6690, provide duplicate pins in order to comply with a standard IC package (e.g. SOT23).My question is - are these pins connected internally or one should do it on the PCB? Can I just use one of the Drain and Source pins? <Q> They are commonly used to remove heat as well as increase conductivity <S> so my advice is read the data sheet pertaining to the device in question: <S> - The picture above is recommending that all pins be used and, in order to improve the thermal dissipation of the device, various copper areas are suggested. <A> Here is a representation of a part packaging similar to your FDS6690- <S> If you don't connect all the pins on the top together (and thence to a big pad of copper or stitched to a ground plane), the heat flow out of the package will be significantly compromised. <S> This could be enough to cause failure. <S> If you don't connect all the source pins together, some of the wire bonds may carry more current than necessary, and the Rds(on) will be a bit higher, also heat flow out of the package will be somewhat reduced. <A> You don't have to connect both pins to the board if you don't have a need for higher current capability. <S> If they're labeled as being the same pin, then they are connected internally. <S> Some pins sometimes are no connects. <S> If that's the case, you'll usually want them connected to ground just so you don't have a floating voltage in the chip. <A> Other people have covered off the main reasons: <S> Current handling increase, Heat conduction increase, Reduced inductance To complete the list: Some military requirements require that there are redundancy in bond wires (and indeed bond wire strength is tested), there may not be sufficient space on the lead frame so another pin is used, There may not be space on die to run the signal across the die or doing so <S> may incur too much delay/distortion (these by necessity would not be side-by-side), but sometimes there is local congestion so it is easier just to connect on the outside, <S> In some designs this is done to provide backward compatibility to a previous suboptimal pin placement,
In some designs in which the chips are designed to be used in a grid, the same signal is provided on different pins to provide easier routing on the PCB, and sometimes it is to provide wiring options (usually in the case when the package has too many pins).
Multiple voltages off a single source I'm building a controller for project that has hobby servos. These typically need ~5V to run. The controller will be an ATmega 2560, running at 3.3V / 8MHz. Looking at the reference design for the Arduino board that uses the same ATmega chip, they're using a 1 amp LDO to regulate input voltage down to what they need. The question has two parts: If I need both voltages available to me, I assume I should just use two voltage regulators, set for their respective output voltages. Is there a reason to daisy-chain them (feeding the 3.3V one from the 5.0 one?) or should I have them both pull from the battery (12V)? Given that I'll be running this off a battery source that'll be somewhere between 9 and 12.4 volts (a 3-cell LiPo battery), should I use an LDO, or a buck regulator (I'm a bit out of my depth when it comes to power management). For some reason I'm thinking that an LDO will not be as efficient as a buck regulator at what seems like a substantial voltage difference. <Q> You would only need to daisy-chain them if the 5V regulator had a minimum load that could be met if followed by the 3.3V regulator. <S> But keep in mind that the earlier regulators will need to supply both the current required for their rail as well as the current required for the later regulators. <S> Since the voltage drop is so large, using a switching regulator is recommended. <S> The 80% or so (minimum, usually) efficiency from the switcher is much higher than what you can get from the linear. <S> OTOH, if you were only dropping a single Li-ion cell to 3.3V-3.6V then a linear LDO regulator would be the way to go. <A> However one of the problems with using switching regulators for the hobbyist is that almost all of them come in surface mount packages -- of the 20,592 switching regulators currently listed on Digi-Key <S> , just 128 come in DIP packages. <S> If you can get by with a maximum current draw of 1.5A on either the 5v or 3.3v rails, then I recommend the MC34063 , which comes in an 8-pin DIP and costs just 62 cents from Digi-Key . <S> (Or use a switcher for the 5.0v rail, and a LDO for the 3.3v.) <S> One of the drawbacks of using switching regulators is that you do have to surround it with a number of components, some of which set the voltage and current for adjustable regulators like this one. <S> But all of these components can be easily found as through-hole parts. <S> Here is a configuration for a 25v to 5v 1/2A step-down converter. <S> If you have surface mount capabilities, then I suggest using a dual regulator like the TPS54295 in your case. <S> It has a capacity of 2A for each rail, and comes in a fairly friendly 16-TSSOP package. <S> It is available from Digi-Key for $2.58. <S> The extra components needed are similar to the schematic shown above, times 2. <A> First, I think you should have a quick read of some general overview on battery voltage selection for your projects, and in general the power stage selection is important. <S> I have written up an informative power point presentation that I delivered to the members of my university's robotics club. <S> You can see it here link to PDF document about power systems for robots <S> The basic answer to your Q1. <S> is given the requirement of both power rails <S> , I suggest you use a buck converter with 1-2 amp output at 5V for the servos, and <S> 'daisy chain' a 3.3V linear (LDO) regulator off the 5V rail for your digital systems. <S> Use lots of capacitors to prevent brown-outs and other issues that can occur if your servos pull the 5V rail too low (if they get jammed, or you are abusing their range of movement too much). <S> This method is better if you are stuck with just a few adjustable linear regulators - and safer by having the supplies independent of each other to avoid brown-outs due to the servo stalling. <S> If you were to daisy chain the regulators, you may still have the drop-out issue, but mostly you should avoid pulling any more current than necessary from the 12V -> 5V regulator, for heat reasons. <S> The low current 12->3.3V LDO should be fine by itself, but it's constant draw if daisy chained to the 12->5V LDO <S> may be detrimental. <S> To answer Q2. <S> I suggest you try to use some pre-made (cheap, from lots of places online) <S> buck regulators to get your 5V and 3.3V supplies each connected to the battery. <S> If you can only get one buck regulator, get it for the 5V rail and use an LDO for the 3.3V supply. <S> Again, big fat capacitors to help under pulsed loads, such as a servo moving back and forth quickly! <S> I hope that helps. <S> Please check out that PDF document I made, it may help you understand why, and it gives you some example scenarios for what to choose and when.
It's much better to use switching regulators than LDOs, especially with a in-out voltage difference that you will have, because of the heat dissipation. You'll want to get an inductor with twice the current rating as your output. For heat dissipation purposes, you could also put an LDO (5V, 1A) on the 12V rail for the servo, and have an independent supply for the 12V -> 3.3V of your digital system on another regulator IC.
Why is IR Transceiver transmitting/receiving rubbish? I am trying to interface two microcontrollers wirelessly using IR transceivers. The microcontroller I'm using is ATMega164PA running on a 3.3V supply at 8MHz and the transceiver is TFDU4101-TR3 . I am using serial communication for both. When I try to send a character 10 times from one transceiver to another, I get a range of numbers between 255 and 193. Is there something that I'm doing wrong? Even if I send any other character I get the same rubbish. Also, can I write my own protocol to establish communication between the two devices? A schematic of my setup is shown below: <Q> Sounds like either a baud rate mismatch or a start bit detection problem. <S> Characters between 255 and 193 mean bits 7 and 6 are always set (0b11000000==192), as well as some lower bit (which are earlier in the serial sequence). <S> Remarkably the receiver idles with RXD high while the transmitter should be inactive with TXD low; this combination could cause unexpected behaviour of the start bit, as the AVR transmitter will idle high. <S> Not being familiar with the IrDA signaling standards, I would probably take an oscilloscope to the signal to examine if RXD is simply inverted from TXD. <S> If we do have inverted polarity behaviour, we expect a transmission like ...1111110dddddddd111111... to turn into ... <S> 111111xx0DDDDD00... <S> 0001111..., with the first 0 lost as no transmission, the 0 detected as start bit matching the least significant 1 of the transmitted byte, but the stop bit 1 would be inverted marking the framing error. <S> At a later point, the 0 would be detected as a start bit, and eventually the transmitter times out, causing the appearance of a byte with a pattern 11...00 which does not have the frame error detected. <S> The xes represent transmitted 0s which go undetected as the transmitter switches from not sending due to too long pulse to not sending because the value is 0. <S> If this is the behaviour, a logic inverter on TXD should solve it. <S> Atmel's application note AVR1303 , Use and configuration of IRcommunication module, covers a peripheral meant to talk to this type of transceiver. <S> It should show what sort of signaling is normally used. <S> By the looks of it, the format used is one pulse per 0 bit only, so direct connection to the USART is not the way to go. <A> These IrDA transceivers are designed to work within the confines of the IrDA standard, where a typical UART's output is modulated into a 3/16ths-of-a-1-bit encoding scheme (or at some baud rates, simply a cap on the maximum IR illumination time, about 1.6uS <S> i think). <S> You need an IrDA 'endec' chip (e.g. Microchip MCP2120 & others in this family) at each side of the transmission between the MCUs, or some MCUs have 'IrDA endecs' that can be enabled. <A> The waveform used for IRDA is very different from the usual UART waveform. <S> The UARTs built into many MCUs have an IRDA mode, but it isn't clear whether the ATmega16L does; it isn't mentioned in the summary datasheet .
All the data bits that are received are inverted and in the wrong position.
What happens when current sourced from a switching regulator goes too low On the recommendation of an SO-er, I'm looking at using a TPS54295 to power a controller that uses an ATMega 2560. The regulator will be powered by a 3-cell LiPo battery, implying input voltages between 9 and 12.4V. The controller will be in standby mode for a few minutes at a time, waking up periodically to check sensor states and perform various tasks. I expect the controller part of the circuit to draw 15-20mA when active, and 15-20uA when sleeping. Looking at the data sheet for the regulator, I'm seeing two things that concern me: First off, there seems to be some amount of instability in the regulated voltage when the current draw goes below a hundred mAs or so: Does this mean I need to consider a different regulator, does it not matter, or is this something that I need to rectify with additional passive components? The second part is this section of the efficiency curve: this tells me that when in standby, efficiency will drop into the low 20s or even 10s of %. Again - is this standard for this type of regulator (meaning I don't need to worry about it), or does this mean that I'll be burning it up at those levels? <Q> You have to look at the efficiency from the standpoint of actual power in versus power out. <S> When you have a very light load the regulator circuit itself may very well consume more power than what is delivered to the load (i.e. efficiency < 50%). <S> If the standby / no load power consumption of your regulator is higher that you would like then you may very well want to look for a regulator solution that is more efficient than this particular part. <S> Since you are looking at such a low current draw at the load the use of a 2A capable regulator may be overkill. <S> Look for a uPower regulator designed for less current rating of say 100-300 mA for example. <S> It may also be helpful to look at alternate topologies. <S> If your unit spends almost all of its time in the idle state it may be that a uPower linear regulator may actually give you better overall power savings off your battery as it's standby current at low load <S> could very well be less than the idle power of the switcher. <A> First question- the variation in output voltage at relatively low current is probably due to transfer to a different mode of operation to increase efficiency (cycle skipping). <S> Second question- <S> the efficiency curves indicate a small quiescent dissipation, which is normal. <S> However, the regulator will be burning up most of the battery energy if your circuit is only drawing a couple hundred uA average at 3.3V. <S> It seems rather silly to be using a 2A regulator if your circuit only draws 20mA maximum. <S> Even a linear regulator will do better (and it will be a heck of a lot cheaper and simpler). <S> They are available with quiescent current in the 10uA range or below. <S> For example, a Seiko S-812C33AUA-C2NT2G would consume only about 1uA when your circuit is drawing 20uA (efficiency of 26% at 12V in/3.3V out), and 27.5% efficiency with 20mA out. <S> The TI switcher will draw more like 1mA quiescent so the efficiency at 20uA out will be 0.5%, and at 20mA out about 80%. <S> So the linear regulator beats this particular switcher by maybe 4:1 <S> assuming ~1% duty cycle, at 1/3 the price. <S> Suggest you look at linears or more suitable switching regulators. <S> It's also possible to run part of the circuit on standby and fire up a big regulator when you need it, but that's probably not indicated with only 20mA draw. <A> Nothing to be concerned about, really. <S> Your cpu doesn't care if it gets 3.3V vs. 3.27V. <S> Also, any regulator circuit will look bad from an efficiency standpoint at very light loads.
If the circuit you have is tolerant to small changes in supply voltage, there should be no problem, if it isn't then you would have to adapt it or the regulator.
Shift Register turning on Transistor for LED Cluster I have a question concerning using 74HC595 with two transistors to power a LED matrix. My goal is to make an 48 x 8 LED matrix using a cluster of 5 LEDS per unit (as opposed to only using one led as shown in Ref 1). I am having trouble making Ref 2 work with the shift registers and I can't figure out why (I suspect that the shift registers are not supplying enough voltage to switch the transistors. I've attached a simplified schematic. Please let me know what I am doing wrong, thanks! Parts:NPN = 2n4401 w/ 1k resistor Ref 1)My template for constructing the matrix http://www.instructables.com/id/48x8-SCROLLING-MATRIX-LED-DISPLAY-USING-ARDUINO-CO/?ALLSTEPS Ref 2)My reference for using two transistors Using an NPN vs a PNP transistor <Q> Look up the voltage drop accros one of your LEDs at reasonable current, then multiply that by 5. <S> That's the voltage that will be accross the string of LEDs when lit. <S> I don't know what kind of LEDs you are using, but 5 of them is going to require more voltage than the 5 V logic output of the top shift register. <S> Since the top transistor is a emitter follower, you need about 700 mV more. <S> Then figure 200 mV for Q2 in saturation and 2 V accross the resistor (assuming 20 mA desired LED current). <S> Overall you need about 3 V more than the LED string when on. <S> For example, let's say these are typical green LEDs with a forward drop of 2.1 V at 20 mA. <S> That means there will be 10.5 V accross just the LEDs. <S> From above, that means you'd need about 13.5 V into the base of Q1 to light the string of LEDs. <A> For an NPN transistor to turn ON, the voltage at base should be greater than (by 0.7V for silicon transistor) <S> the voltage at emitter. <S> The voltage at base of Q1 should be grater than drop across LEDs + voltage across Q2 (0.2V) + drop across 100\$\Omega\$ resistance. <S> So if the drop across your LED is about 1V (a few volts a usually), then 5V is not sufficient for turning the transistor ON. <S> I think that is what happening in your case. <A> As others have pointed out, the problem is that your top driver is a source follower and therefore cannot output more than about 4.3V (5V minus one \$V_{BE}\$ drop). <S> The easiest solution is to hang an 8-channel source driver on your top HC595. <S> Unfortunately, the old ones are now pretty much obsolescent, especially in DIP package, but they can be found . <S> If you're making a board with SMT parts, another solution is a dual PNP/NPN pre-biased transistor in an SOT-23-6 that will act as 1/8 of a UDN2981- <S> all you need are eight of them, no additional parts required.
The simplest solution is to make the high side switch a PNP and use another transistor to drive that from the logic signal.
Severe ringing when high side MOSFET in half bridge circuit switches on I have designed a PCB (intended as a prototyping building block) that has a IR2113 high and low side gate driver driving two IRF3205 (55V, 8mΩ, 110A) power MOSFETs in half-bridge configuration: Picture of the physical setup Upon testing the circuit with a load I found out that while the low side switches quite cleanly there is a lot of ringing at the output of the half-bridge (X1-2) every time the high side switches on. Playing around with the input waveform dead time setting and even removing the load (an inductor with a power resistor in series simulating a synchronous buck converter connected from X1-2 to X1-3) did not reduce this ringing. The measurements below were taken with no load connected (nothing at X1-2 except for the oscilloscope probe). Apparently the parasitic inductances and capacitances are enough to cause that, but I cannot figure out why the low side works as well as it does. To me both gate drive waveforms look clean enough, with the voltages transitioning the treshold voltage of the MOSFETs reasonably fast. No shoot trough is present when switching. What are the possible causes of the problem, and what measures can I take to reduce the symptoms? I am aware that there are many very similar questions here and on other sites, but I found the posted answers unhelpful for my particular problem. Edit While there was a 2200uF electrolytic capacitor at the input (X1-1 to X1-3) to supress transients and noise, it clearly failed to supress any high frequencies. Adding a 100nF capacitor (as suggested in the answer by Andy aka) in parallel with the electrolytic one reduced the ringing at the output (X1-2 to ground) by half and ringing at the supply (X1-1 to ground) by a factor of 10. <Q> Try probing on the power supply rail. <S> I bet you see those spikes on there. <S> Clearly you won't see it on the lower FET side because your scope is referenced to that rail but, if you probed back at the power supply I bet you would. <S> Try a 1uF or 10uF ceramic across the power rails close the MOSFETs. <A> Assuming that you have dealt to the supply rail bypassing like Andy said and you have slowed up the gate by increasing R1 R7 and doing something to make turn off faster than turn on . <S> If it still rings then there are still two things to try;You <S> can place shottky diodes 60V across DS of the fets and you can place RC snubbers across DS of each FET . <A> I think Andy aka got the answer on this one, but I wanted to clarify that the ringing is caused by the inductance of the wires leading to the FETS and the gate capacitance of the FETs. <S> This creates an LC circuit which resonates at a frequency based on the inductance and capacitance in your circuit. <S> Usually the effect is reduced by using damping resistors and by reducing the lead length as much as possible. <A>
Reduce the high side resistor to 22E this will most likely fix the Problem,this is often Caused from Switching the Mosfets To HARD , i had to learn the hard way It'll be due to the lead length between your bench supply and the MOSFETs.
How can I tell that USBasp is working? I have the USBasp programer and I'm trying to burn bootloader on Atmega328 so that it can be used as a replacement chip in Arduino board (replacement chips with the bootloader installed are quite expensive). I have installed the USBasp drivers - the installation is quite straightforward thanks to the guide. The device was recognized and is working properly - according to windows. I have then connected the pins according to the datasheet. After that, I started Arduino IDE and I selected USBasp as a programer: I have noticed that whenever I hover over Tools the arduino IDE lags for a while. But that might simple be an unrelated software bug. After I selected the correct programmer I have clicked Burn bootloader and I got this error: avrdude: warning: cannot set sck period. please check for usbasp firmware update.avrdude: error: programm enable: target doesn't answer. 1 avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. I have already been trying to program this chip using Raspberry PI - and I've failed as well . And I still can't find out where the error is. Except the possibility that I bought 2 void chips. My question is how can I test all fragments of my system and check which one is broken. AvrDude's errors are useless. Here's an image of my connections when trying the same (and with the same result) with AtTiny: <Q> Either you have got the connections wrong, or the programmer is sending the commands too quickly (programming frequency too high). <S> New AVR chips come configured to use the chip's internal oscillator as a clock source, with the CLOCKDIV8 ("divide clock frequency by 8") fuse set. <S> This means that they run at 1MHz. <S> The maximum programming frequency the chip supports is clock speed / 4, i.e. 250kHz. <S> The USBASP defaults to 375kHz, which is too fast, so you need to slow it down. <S> You do this either by setting the "slow SCK" jumper of your USBASP, if it has one, or by using the avrdude -B option: <S> avrdude -c <S> usbasp -p <S> m328p -B 5 -U <S> flash: <S> w <S> :bootloader.hex:i <S> The number after the -B option selects the programming speed (specifically, the clock period, the inverse of the frequency, so higher numbers mean slower frequencies). <S> If -B 5 doesn't work, try a higher number, like -B12 or even -B60. <S> Update: this line in the avrdude output suggests that your USBASP firmware version doesn't support the -B option, so you will need to use the jumper: avrdude: <S> warning: cannot set sck period. <S> please check for usbasp firmware update. <A> Recently, I was trying to make a little project using my atmega8, but I faced with this problem. <S> I thought that the chip had flaws because of its using time, but I remembered that the last time I write code inside it, I programed the fuses to make it work with its internal oscillator! <S> And I tried to program it (again) <S> but this time with a crystal and…. <S> Ta <S> ta taaaa… that was! <A> I had created the Standalone Arduino , but when trying to program it with a USBasp, I received the OP's error. <S> After following cyberx86 clue about reverifying the pins, I found that MOSI, from the AVR Programming adapter , was shown incorrectly wired up in the photo although, the written description of the pin out was correct: Be sure to refer to the Arduino pin mapping for help wiring this up. <S> The MISO pin of your adapter will go to pin 18 or Arduino digital pin 12 of your Atmega chip. <S> The SCK pin of your adapter will go to pin 19 or Arduino digital pin 13 of your Atmega chip. <S> The RESET pin of your adapter will go to pin 1 of your Atmega chip. <S> The MOSI pin of your adapter will go to pin 17 or Arduino digital pin 11 of your Atmega chip. <S> In the photo the (dark green) wire that should go to MOSI, pin 17, actually goes to pin 16! <S> After I had corrected this issue, and connected the MOSI from the AVR Programming adapter to pin 17 on the ATMega, then the error went away. <A> In my case of ATMega32A it was the programmer writing too fast to microcontroller and -B option given to avrdude <S> set SCK period (and therefore frequency as well) to rate that enabled proper communication. <S> I spent too much time making this setup work, I thought microcotroller is dead at some point. <S> -B <S> Specify JTAG/STK500v2 bit clock period (us). <S> with error: <S> me@comp:~$ sudo avrdude -c usbasp <S> -p <S> m32avrdude: <S> error: <S> programm enable: target doesn't answer. <S> 1 avrdude: <S> initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. <S> OK: me@comp:~$ <S> sudo avrdude -c <S> usbasp <S> -p <S> m32 -B <S> 5 <S> // <S> you may increase this value // to set even lower frequencyavrdude: set SCK frequency to 187500 Hzavrdude: <S> AVR device initialized and ready to accept instructionsReading | ################################################## | 100% 0.00savrdude <S> : Device signature = 0x1e9502avrdude <S> : safemode: <S> Fuses OK (E:FF, H:99, L: <S> E1)avrdude done. <S> Thank you.
The error message you are seeing means that the chip is not responding to the "enable programming mode" command that the programmer is sending.
More Energy Efficient 1 or 0 Is it more energy efficient to have active high or active low pins (I'm thinking shutdown, reset, active type of pins)? Pins that one would not expect to change very often so they will be in one state for a while before transition. I'm looking at this from a hardware perspective, does a 1 or a 0 cause a greater voltage drop (ie less efficient). I would think this depends on if the underlaying hardware was implemented as a P (PNP, PMOS) or N (NPN, NMOS) based device. After reading this post , it seems that if the hardware is PMOS it is better to have it be active low because when it is in a low voltage state the current flows therefore creating a voltage drop. And for NMOS circuits it would be better for it is be active high because that is when current would flow. Is this a correct analysis? <Q> It's completely symmetric and thus, in the terms your looking at it, irrelevant. <S> Note that I wrote the long post you refer to above. <S> If you have negative logic then a wired Nand approach with an internal pull up and no external logic makes sense. <S> Other elements that come into play are power rail ramp up, boot up of the chip and indeterminate states of the chip <S> whist <S> the power is ramping. <S> And this is really about the configuration of the logic, threshold values and switch points. <S> I tend to design systems that always come up in a reset state even before the rest of the circuit can possibly come alive, and only when the rest of the chip has come alive <S> do I allow the reset to be deserted. <S> But not everyone does this and you might see chatter and activity before a forced reset and then clean boot up. <S> Which might be fine. <S> Clarifying my symmetric comment. <S> I wouldn't read too much into the advantages of PMOS vis-a-vis NMOS with this regard as the drain of the NMOS can leak towards the upper rails just as easily as the drain of the PMOS can leak towards the negative rail. <S> You really need to look at individual designs, processes and details . <S> A generalized statement doesn't work and more over is not useful. <S> If you are concerned about efficiency then you'd be best at controlling the edges (or rather the number of edges), that's when CMOS burns energy. <A> Back in the stony ages, (I know - I was there) <S> when vacuum tubes were used to build digital circuits, their input structures (control grids) were pulled low quiescently in order to keep the first stage cut off and conserve power, so in order to effect control of the circuits the inputs were implemented as positive true logic. <S> Later on, when Texas Instruments first introduced their hugely successful 7400 series of TTL digital logic, the inputs were the emitters of NPN transistors whose bases were connected to the positive supply rail through about 4 kohm resistors, the main reason being that, doing it that way, many emitters could easily be pulled low through the NPN common-emitter part of an output's totem-pole, and in the bargain, get better noise immunity than if the input were a base pulled to either rail through a resistor. <S> The result of all that was that TI's control inputs became negative true and defaulted to unasserted with those inputs floating or connected to Vcc. <S> Then, when RCA came out with their CD4000 line of CMOS logic, the inputs were floating gates so there was no particular advantage to having either low or high true inputs. <S> Philosophically, though, RCA was an old, established tube maker, and their conventions made it over into their CMOS line, with the result that most of their 4000 CMOS came out with positive true inputs. <S> Fast forward to today, and we now have the CD4000 family logic functions implemented in 74HC as well as in the traditional higher-voltage line <S> , so we get to pick and choose between high-true and low-true, pretty much as we see fit. <A> placeholder answer is great, I'd just add my idea about why you usually find enables, chip selects and such all active low . <S> We understood that internal circuitry is CMOS so power consumption does not really have a role around here, then why is that? <S> There's two reasons in my opinion: <S> Power on: when you turn on a device the ground reference is likely to stand still\$^1\$ while power busses would ramp up. <S> That might lead to glitches in the logic value of the inputs, while during power on keeping thinks still is a good idea Routing easiness: on a two layer or single layer <S> PCB you are more likely <S> yo have a ground plane lying around, connecting a pin to ground would then be much simpler, through a pull down or directly.
The polarity of control signals are more about how much external logic is needed to enable them.
What are logic gates? So from what I understand transistors are one of the most important electronic elements for computers because of TTL (Transistors-Transistors Logic). Is this true? If so, how exactly does this work? I have heard the terms "logic gate" and "logic block" tossed around. <Q> Trying to define what is the "most important" element of a circuit is pointless. <S> As for what a logic gate is, it's a circuit that operates on signals with discrete states. <S> Overwhelmingly, this is done using two states only, high and low. <S> There are good electrical reasons for why two states is much easier to deal with and operate on than multiple states in a single signal. <S> There is more detail on that here . <S> Therefore, in practise, "logic gate" refers to something that manipulates binary signals. <S> Since the two states can be thought of as representing true and false, the world of Boolean logic theory can be applied to these systems. <S> The simplest logic gate of all is the inverter, which performs the boolean NOT function. <S> The next more complicated are the 2-input 1-output logic gates. <S> These have function like AND, NAND, OR, NOR, and XOR. <S> In theory (going back to boolean logic), you can build up any more complex function from only NAND or NOR gates, although making those complex function more explicitly from a bunch of transistors is often more efficient. <S> From the basic building blocks above, it is possible to construct flip-flop, counters, adders, etc, etc, etc. <S> A whole processor will contain many of these things, which all eventually decompose down to transistors. <S> Nowadays we have high level logic design tools so that humans specify the high level logic to perform, and the tools automatically generate the sea of transistors required to realize it. <A> Transistors are the foundation blocks of computers and embedded systems. <S> TTL is used to refer usually to an electronic circuit that uses transistors for both the logic function (whether to be on or off) and the amplifying function (usable currents and voltages), or more colloquially to binary voltage levels of 0V-5V (because this range is what TTL dedicated chips use, as well as many other electronic devices). <S> A logic gate is an arrangement of transistors that decide an output based on the values of the inputs. <S> Typical logic gates include AND, OR, NOT, NAND, NOR, XOR. <S> Example of a logic gate: AND Basic definition: when all inputs are high (5V), the output will be high (5V), otherwise the output will be low (0V). <S> Therefore: when Input A and Input B are LOW, Output Y will be low. <S> When Input A is LOW and Input B is HIGH, Output Y will be low. <S> When Input A is HIGH and Input B is LOW, Output Y will be LOW. <S> When Input A is HIGH and Input B is HIGH, Output Y will be HIGH. <A> Logic "'gates" are called that because they open and allow something to pass through only when they're opened according to certain rules. <S> For instance, consider a bull in a pen with a gate which will open - and let the bull out - only if two people open the gate together. <S> That's called an AND gate because it'll only open if person "A" AND person "B" open the gate together. <S> On the other hand, if either of two people could open the gate it would be called an OR gate since person "A" OR person "B" (or both) could open it. <A> The idea of Boolean functions is old and George Boole wrote his famous "Mathematical Analysis of Logic" before 1900. <S> It wasn't until Claude Shannon wrote his Masters degree Thesis, "A Symbolic Analysis of Relay and Switching Circuits" in 1938 that the connection between logical functions and implementation using switching devices was made. <S> The definition is broad and hints you could implement logic gates (functions) in many ways. <S> You could go extreme and implement functions using mechanical switches or even balls and levers (I've seen it done!). <S> TTL is one of the implementation methods for logic functions. <S> It uses BJT transistors and resistors as construction elements. <S> TTL got huge early on and set standards to other implementations that followed in later years. <S> An example of the logic function AND implemented in TTL: Please note that output of this implementation is open collector so you would wire the output to VCC via a resistor. <S> If you analyze the circuit you will see that the relations between inputs and output are expressed by the truth table of the AND function. <S> I like this circuit because you can see how a NAND function is implemented and how a NOT function is implemented as well (like having 3 in 1). <S> The transistors are of course working either in cut-off or saturation <S> so the output is either high voltage or low voltage which corresponds to the 1 and 0 states in Boolean algebra.
A logic gate is a device that implements a Boolean function ( = logical function) such as AND, OR, NAND, XOR and others...
Can I obtain a new voltage source from outputs of two cascaded linear voltage regulators in practice? I have a device which works with 7V. I have a 7812 and 7805 already running in the circuit. Can I use the outputs of this voltage regulators to feed the 7V device? I know this is possible in theory. But most practical voltage sources can supply current in only one direction. In other words, the device will drain arbitrary amounts of current (\$I_D\$) from the 12V grid, and give it back to the 5V grid. What will happen if the other circuit elements which are connected to the 5V grid drain current less than \$I_D\$? Will it cause the voltage on the 5V grid to rise up and the voltage on the device drop down? Is this configuration OK in practice? <Q> NO you cannot! <S> The 78XX series can only supply <S> current. <S> In the topology you are suggesting the lower 7805 must be able to sink current into it's output. <S> What will happen is that once you device starts to pull current the 7805 will see it's output pulled high, it will attempt to control this condition by reducing the control signal on it's pass transistor, shutting it down a little bit, this shows less of a load on the bottom side so the voltage bumps up more etc. <S> etc. <S> until the 7805 output is at the 12 V rail and your 7V device is shut off. <S> You have to have a power supply that can both source and sink current into it <S> 's out put. <S> So a Op-amp style with a complementary output structure. <S> Another alternative is to use a 7905 with it's bottom rail being your implied ground (18 V negative ). <S> 7905's are design to sink current into a negative rail. <A> Your concern is justified. <S> If the current drawn from the 5V line is less than the 7V device is drawing (even momentarily) <S> the 5V line will rise above 5V and possibly damage whatever is connected to the 5V power. <S> Most regulators cannot sink current, only source it. <S> You could add a dummy load to the 5V supply (but if your 7V device has a capacitor inside then it could cause a transient that would damage things connected to the 5V supply). <S> It's much better to add a 7V regulator to the 12V supply (or the 18V supply). <S> An LM317 with a couple of resistors will do it, or if you're not too fussy about the exact voltage, a 7805 with a red LED in the GND pin will get you close. <A> So if your 7v device is rated at 750mA peak current, then using an 800mA load on the five volt output would allow the regulators to function correctly. <S> However, this is pretty inefficient anyway. <S> If this is all you have available, then you can make it work with a load, but you are essentially using 18v to power a 7v device, so you're dropping 11v, and losing a lot of power in these linear regulators. <S> You would be better off with an appropriate 7v switching regulator. <S> As currently designed with no 5v load, though, it will fail.
If you add a load from 5V to ground that always consumes more current than the 7v device, then this will work. What most people don't appreciate, apparently even some people with a lot of experience is that a voltage regulator is not the same as an ideal voltage source.
Make 5kV, 0.001A (5W) step-up from 12V? I have faced that problem:9-15V Vin (12V accu) and 5kV, 0.001A out (5W)and dont know how to solve that, i tried to use push-pull SG3525 but efficiency is very poor, about 20-30%. Can someone suggest me what IC/topology to use? I even tried capacitor charger but with no luck too:(What i did more was sepic step-up with voltage multiplier (mc34063 :) ) but Ton/Toff is too big i think and i can reach only 1.6kV...Please give me, if you can, any piece of advice... best regards <Q> At that high of a step-up ratio, I'd look into a transformer doing most of the work. <S> With the right windings, you can drive the primary from a H bridge straight from the 9-15 V DC. <S> Another option at such low input voltage is a center tapped primary. <S> The center tap is connected to the DC input power, and each end has a low side switch, which alternately pull low. <S> With a few 100 kHz square wave on the input, it wouldn't require a very large transformer at all to push 5 W out. <S> The whole circuit with transformer should be able to fit easily in the palm or your hand. <S> The way you do regulation is by making sure that the minimum voltage square wave (when your input is on 9 V) can cause the 5 kV at 1 mA out. <S> On the output side you put something that measures whatever quantity you want to regulate, and drives a opto-isolator when it is over the limit. <S> On the input side, you simply kill the oscillation whenever the opto is active. <S> From what you say, you don't seem to actually need isolation, but at 5 kV that is a good idea for safety. <S> You could get the same power out with a auto-transformer, but then the output wouldn't be isolated. <S> Unless this is going into a very controlled situation or a totally sealed box, I'd consider the extra safety from full isolation to be a good tradeoff. <A> 5W at high voltage is prime territory for a flyback topology converter. <S> The LT3751 can be used as a controller, for example. <S> The flyback magnetics looks like a transformer, but it's actually used as a multi-winding inductor. <S> Here is a useful article on designing flyback transformers (Billings' book has a lot more information). <S> You'll need a gapped core for a flyback. <A> This is the way the output of the high voltage is controlled. <S> Linear Technology produce a very usable PWM chip that is voltage in and duty cycle out <S> - this can feed two FETs wired synchronously. <S> (Circa 95% efficiency at approximately 100 kHz is quite achievable) <S> The above voltage is fed to the centre tap of the primary winding of a transformer <S> The primary winding outers are grounded by low on resistance MOSFETs alternatively at (say) <S> 50 kHz. <S> Sufficient care to ensure that the two on states do not overlap - a little bit of logic and <S> an RC filter can easily ensure this. <S> The secondary side HAS to be wound to avoid significant resonance at 50 kHz or there will be a few scorched parts. <S> This is the tricky bit <S> and I'd aim for a voltage of around 2 to 3kV peak. <S> Then I'd use a cockcroft walton diode multiplier <S> The same idea as above I used to generate 50 kV for an X-ray tube power supply. <S> Use a simulator to death for this - wind a typical secondary - measure <S> its resonant frequency - plug the numbers into the simulator and maybe rejig the final stage operating frequency to make it a bit lower. <S> Read up on low self capacitance transformer windings and get a reel of that yellow tape for separating the layers of the secondary but, the main thing is TAKE DAMN CARE because this output can be lethal.
In the past I've done this: - Designed a simple buck regulator that can be controlled to produce an output voltage in the range of under 1 volts to nearly 12 volts.
Is the slide-lock on an SD card optional? When enabling the write lock on the side of an SD card, is the write protection a physical limit on the SD card, or a flag sent to the reader or OS telling it to please not write? <Q> Citing from Wikipedia (emphasis mine): <S> Write-protect notch <S> (The miniSD and microSD formats do not support a write protection notch.) <S> [...] <S> The presence of a notch, and the presence and position of a tab, have no effect on the SD card's operation. <S> A host device that supports write protection should refuse to write to an SD card that is designated read-only in this way. <S> Some host devices do not support write protection, which is an optional feature of the SD specification. <S> Drivers and devices that do obey a read-only indication may give the user a way to override it. <S> Cards sold with content which must not be altered are permanently marked read-only by having a notch and no sliding tab. <S> Moreover, the SD card simplified specifications (physical layer) <S> read: 4.3.6 <S> Write Protect Management <S> Three write protect methods are supported in the SD Memory Card as follows: <S> Mechanical write protect switch (Host responsibility only) <S> Card internal write protect (Card's responsibility) Password protection card lock operation. <S> • <S> Mechanical Write Protect Switch <S> A mechanical sliding tablet on the side of the card (refer to the Part 1 Standard Size SD Card Mechanical Addendum) will be used by the user to indicate that a given card is write protected or not. <S> If the sliding tablet is positioned in such a way that the window is open it means that the card is write protected. <S> If the window is close the card is not write-protected. <S> A proper, matched, switch on the socket side will indicate to the host that the card is write-protected or not. <S> It is the responsibility of the host to protect the card. <S> The position of the write protect switch is unknown to the internal circuitry of the card. <A> The sliding plastic part activates a switch in the SD card socket when the card is inserted. <S> The OS will read the switch's state. <S> It would be possible to create a card without the dent so it is always writeable, or without the sliding part so the card is always read only; similarly cut or bridge the switch's output to force all cards inserted into the socket to be either writeable or read-only. <A> It's a switch in the slot that is no longer depressed, whose status can be detected from the WP pin that not all breakout boards provide access to. <S> It is up to the card controller to detect it and signal up the chain appropriately.
The user can designate most full-size SD cards as read-only by use of a sliding tab that covers a notch in the card.
Light activated switch - avoid flicker when turning on I have a small light bulb (3W LED, E27/110V) that I am controlling using based on ambient brightness (it comes on when it is dark, and goes off when it is light). The circuit uses a BT136 triac, a MOC3041 optoisolator, and an IR phototransistor (I don't have a part number for it - 2 pins, black cap, looks like an LED). simulate this circuit – Schematic created using CircuitLab As built, it mostly works - it comes on when it is supposed to, and goes off when it is supposed to. D2 is included just as an indicator LED, SW1 is included so that the light can be turned on manually (bypassing the light activated circuit) if needed. However, I have one issue with it: The circuit is currently located fairly close to the light (around 1.5m under it - but the light faces upwards). When it gets dark enough, the light turns on and the light it produces turns off the phototransistor causing the light to flash. The light continues flashing for around 5 minutes (at varying frequencies), before it remains on. This implies that it doesn't take much additional darkness to offset the added light from the LED bulb. I chose the value for R1 that would let the light turn on at the appropriate time, and R2 is currently set around 50kohm (altering R2, changes the on time, but doesn't appear to help the flicker). My indicator LED (D1), transitions to on when current through Q1 drops below 1.6uA to 1.3uA. (I am not confident enough in my meters to fully trust that number, but hopefully it provides an idea of the magnitude). In full direct sunlight the current through Q1 is up to 40mA. Ideally, I would like to resolve this as simply as possible (e.g. with a minimum of ICs), however, my knowledge of electronic circuit design isn't yet where I want it to be in order to know the best course of action from here. I could resolve this with a microcontroller fairly easily, but this seems like an inelegant solution. I have considered implementing a circuit similar to one used to debounce a switch, but the time scale on those is normally on the order of milliseconds - whereas I need something over several minutes. I have seen some designs which use two phototransistors pointed in different directions but would like to have a design where positioning isn't critical. I have considered a soft-latching design, but am unsure how exactly to implement this.I was hoping for something which slightly changes the required input current once the light turns on - so that the added current flowing through the phototransistor when the light comes on, isn't enough to turn it off. I believe this would entail a feedback resistor, but unfortunately, am not sure how to implement this. What would be the best way to resolve the flicker that occurs at dusk when the light turns on? <Q> You want hysteresis . <S> Hysteresis is the same thing that keeps your thermostat from switching on and off every few seconds when the ambient temperature is very near the setpoint. <S> Hysteresis can be implemented many ways. <S> You could introduce a delay after a state change. <S> That is, when you change states, inhibit further changes for some time. <S> This will at least limit the rate of the flashing. <S> You might implement this with a microcontroller or some sort of discrete logic and a timer like the 555 . <S> For example, say the light is currently off, and the sensed brightness must go below "10" (some arbitrary unit) to trigger the light to turn on. <S> When the light is on, the brightness must now increase to "15" before the light goes back off. <S> So perhaps the brightness decreased to 10, the light turned on, and now the sensed brightness is 12, but this is less than the new threshold of 15. <S> The Schmitt trigger is a kind of comparator with hysteresis. <A> You need to introduce some hysteresis (positive feedback) into the circuit. <S> This is done, below, by connecting the collector of Q2 to the base of Q1 through the network R1 R2 R3. <S> You'll probably have to fiddle with the resistor values in order to make it work with your phototransistor. <S> I simulated it with LTspice, and if you want to play with it, the circuit list is here . <S> ALTERNATIVE: <S> U1 is an opamp functioning as a comparator with PT1 and R1 used to set the voltage on U1- to half of the supply when PT1 is illuminated enough to make its resistance equal to 1.2 megohms. <S> R3 R4 and R5 are used to set PT1's low illumination trip level, with R3 and R5 limiting R4's range from about 2 to 3 volts, and R7 is used to provide hysteresis around the comparator and set the low and high switch points for the illumination incident on PT1. <S> The circuit has been simulated, appears to work nicely, and the LTspice circuit list is here . <A> Place a resistor from D2 anode to base of Q2. <S> Without knowing the specifications of your photo sensor (Q1), I cannot say what value of resistor. <S> Perhaps 100K to 3 M-ohm. <S> This will be positive feedback, which gives you the Hysteresis as mentioned by Phil Frost. <S> Alternatively you could place the resistor from collector of Q3 to base of Q2.
Alternately, you can introduce a degree of positive feedback such that the threshold brightness depends on if the light is currently on or off.
What makes an incandescent light bulb run out? What is or are, the most likely and common ways - the weak links in the chain (including I assume poor electricity wiring / configured housing) - that cause a traditional incandescent light bulb to blow? And how much does manufacturing / materials quality of the bulb make a difference in any of those factors? (In other words, should an expensively, state-of-the-art constructed bulb in terms of materials purity and construction robustness, generally last a lot longer than the average bulb on the market?) I understand it is a fairly simple lighting technology, so what complications cause them to not last longer than they generally do? Is 'blowing' the only way that an incandescent can ever expire? <Q> I'd say that an incandescent bulb is quite forgiving about power quality. <S> So what really comes into play is the filament manufacturing, how it's held in place, if its thickness is regular or not, if the tungsten is pure enough, and so on. <S> A filament breaks because it eventually becomes a little thinner at a point. <S> That point heats more, causing more tungsten to evaporate, making it even thinner... <S> That's good old nasty positive reaction. <S> Thermal shock can do the job too, that's why you tell your children to stop disco-switching the lights. <S> Interestingly enough since the filament usually just breaks in one point <S> , it's possible to try to give a broken lamp some afterlife time. <S> If you have the broken bulb plugged in\$^1\$ and shake it, it's possible for the two filament ends to touch: the point heats a lot and the filament might weld itself and give you ten or so more hours of life. <S> \$^{(1)}\$ <S> Please, just don't try that if you are not sure it's safe. <A> Most light bulbs have a number of service hours designed in. <S> This is achieved fairly accurately and on purpose during manufacturing. <S> Consumer grade light bulbs burn out faster and the awful truth is that in that way the manufacturer ensures it can keep producing the light bulbs and make money. <S> The main cause is the tungsten filament slowly evaporating until it gets too thin to carry the current. <S> The trick during manufacturing is to etch the filament to a carefully designed thickness so the lifetime is reduced programmed. <S> The origins of programmed life light bulbs began with the Phoebus Cartel in 1924. <S> There are also light bulbs with a special stronger filament (basically they skip the 'etch-cycle'), these are for use in high reliable applications and last longer. <S> They are commonly used in places that are hard to reach and are more expensive. <S> Not sure about the proper name of these light bulbs. <S> Because of the extended life time these bulbs are more expensive as a manufacturer has only limited room for producing spares. <S> (What need is there for spares if the bulb doesn't fail?) <S> Where Australia and EU banned the consumer grade bulbs, the strengthened filament is not banned because of its specialized application. <S> The latter type is just not available in your regular shop around the corner. <A> Most of the above data is incorrect. <S> Tungsten was tested as a lamp filament about 1900 and found to be useless due to sag, a coiled filament was impossible. <S> In about 1915, GE found by adding some other materials, they could produce NON SAG Tungsten which is still in use. <S> However, non sag tungsten is subject to DC etching such that the development of surface roughness changes the emissivity such that after 1000 hours operation, the lumens have decreased 30 percent. <S> The filament is cooler and lamp life increases. <S> The DC etching continues but much slower. <S> Most people do not realize their headlamps are below legal limits. <S> Another incandescent lamp problem that is not what people think, is halogen lamps. <S> Halogen does nothing for an incandescent lamp except allow the use of a smaller bulb by keeping the bulb free of condensed tungsten, which in turn allows a higher fill gas pressure. <S> Double the fill pressure, lamp live doubles. <S> Result, higher lumens per watt with the same lamp life.
They generally blow up because tungsten , that is, the material the filament is made of, slowly evaporates until the filament breaks. There is no cure, the only solution in the case of automobile headlamps is to replace the bulbs.
How is Ground in a Power Supply made? I've been using different power supplies for 6 years. But, I'm unable to understand how we make ground in a Power supply? Or from where does this ground come? Or from where does this reference ground come? Is it reference to earth or what? <Q> Back in the stony ages when relays were first used for telegraphy, it was found that instead of making a circuit by running two copper lines from station to station, in some locations a long rod could be driven into the earth at each station and the earth between the rods used as one of the conductors, eliminating the cost of one copper wire. <S> Then, because Benjamin Franklin told everybody that electricity moved out from the arbitrarily named "positive" terminal of a battery and returned to the negative terminal, the batteries used to run the relays at telegraph stations were connected with the battery's switched positive terminal connected to the long copper lines stretched between stations, and the return connected to the ground terminal. <S> The term stuck, and as time went by and circuits got more complicated, all of the components returning current directly to the battery's negative terminal were said to be connected to "ground", or "grounded". <S> Thus, "ground" became a reference against which voltages in the circuit were measured and, today, has come to mean the common point which all galvanically interconnected equipment shares, whether or not a direct connection to the Earth is made. <A> From Ground (electricity) Wikipedia : <S> Earth serves as a (reasonably) constant potential reference against which other potentials can be measured. <S> The use of the term ground (or earth) is so common in electrical and electronics applications that circuits in portable electronic devices such as cell phones and media players as well as circuits in vehicles may be spoken of as having a "ground" connection without any actual connection to the Earth. <S> This is usually a large conductor attached to one side of the power supply (such as the "ground plane" on a printed circuit board) which serves as the common return path for current from many different components in the circuit. <A> Furthermore, in an isolated electrical system, such as a battery powered circuit, one might tie the positive terminal to "ground" and then all voltages measured against "ground" will be negative. <S> Ground is simply a reference, nothing more.
As was clearly stated by EM Fields, "ground" is the reference against which voltages are measured against.
How to get 12v 5amps battery setup for LED strip I'm building an LED lightbox but I really want to avoid using a power supply/cable so I'm trying to figure out a way to do it with batteries. The strip I'm using is http://www.amazon.ca/dp/B00D76XBU0/ref=pe_386430_30332290_TE_3p_dp_1 I'll be using about half the strip. I've got it setup using 2 9v batteries in series with a switch but I'm sure I need a resistor I just don't know how to figure out which to use! Also does this look right? + 9v - + 9v - | |-| | (res?) |______ - | STRIP (switch)____________ + <Q> As Vladimir has stated, you'll definitely want much more power than a 9V battery can supply. <S> You'll also want to ensure you don't waste lots of your energy through a resistor due to your supply voltage being much higher than your load voltage. <S> If you want a mobile light box, either find yourself a lead acid or lithium ion battery pack that will supply the amount of current <S> you're after for extended periods of time. <S> Your circuit itself isn't wrong besides the use of an 18V power supply to power a 12V load. <S> At best, you'd have 66% efficiency (12/18). <S> AT 5 amps, you're going to need a heavy duty resistor. <S> An ideal led supply would give it constant current, but that's likely too sophisticated for what you want to do. <S> Given that these are power LEDs, their voltage-current curve isn't terribly steep and will likely be able to handle a bit more power so long as the power supply is relatively close to 12V. If it goes above 12.5-13 V on your supply. <S> I would expect you to start decreasing the lifetime of the LEDs significantly. <S> If you measure your supply (batteries) and it's below that range, then you would likely be able to eliminate the use of your resistor entirely. <S> If your supply is above that range, then you'll want to determine how much you need to drop the voltage. <S> Basically, you want it to drop 5 Amps down to 12 Volts. <S> For example: lets say your power supply gives 14 volts rather than 12 V. Go ahead and add a resistor that drops it to 12V. (14V-12V)/5A= 0.4 Ohms. <S> That is the application of Ohm's Law. <S> If you don't know or understand it, wikipedia is a great place to start. <A> Used/scrap ones that can't crank a car engine will usually still have more than enough capacity to source 5-10A and are available for scrap prices. <S> Chargers are cheap & widely available, and in-car cellphone chargers etc. <S> offer cheap & easy sources of regulated 5v (for example) for powering other circuits. <A> Wise ones use a cheap silicone diode (rectifier) <S> You can get one from Goodwill. <S> By a used stereo for 5 bucks and open it up. <S> Lots of diodes and transistors there for parts. <S> Don't get a schotkey diode since they only drop the voltage like 0.4 volts and you need more of them to get the voltage down, but they can be used. <S> Silicon is cheapest anyway. <S> , just an old fashioned cheap silicon Diode. <S> Just put it in line in Series on the positive lead so you don't float the whole LED strip. <S> this will drop the voltage 1.2 volts so that you can run them off a car battery without all these gimmickry voltage regulators and such. <S> Batteries are only able to make a maximum voltage so they are the best way to protect projects from high votages. <S> They are self voltage limiting free of charge. <S> they are the best voltage regulators. <S> Get a cheap JUNK BATTERY worth nothing, and put a 2 or 5 amp trickle charger, and your LED will be powered cheap. <S> Those little tiny 12 volt motorcycle batteries are the best. <S> The batteries don't even have to work, they just buffer the voltage, but they should have water in them or they wont work.so a car battery, a diode or two or three or four or five or six or seven, in series, and a LED strip <S> and you are good to gocostabout 20 cents. <S> Get one that handles about 20 amps. <A> For a quick solution you have to put a 1 ohm resistor. <S> To be exact 1.2 ohm for safety. <S> Or, you can use two silicon diodes in series as their individual voltage drop is 0.7 volts.
Cheap & easy portable 12v supply = car or motorbike battery.
Why are MOSFETs used for VLSI IC fabrication instead of JFETs? Why are MOSFETs used for VLSI IC fabrication instead of JFETs? What are some reasons the use of JFETs is not common? <Q> The N channel JFET needs a negative voltage on its gate with respect to source <S> therefore this complicates the power supply regime by requiring the addition of a negative rail. <S> Similarly, for a P channel device its gate would have to rise above Vcc to be able to control it. <S> Here's an n channel JFET pictorially: - As you can see, the voltage on the gate has to be negative to the source in order to control it. <S> Images taken from here <A> The key determining factor is manufacturability. <S> To make an IC you must be able to produce transistors reliably and a key component of this <S> is the ability to make transistors with the same characteristics across the whole wafer. <S> This called "matching". <S> The JFET Pinch-off voltage is notoriously poorly matched and highly variable so much so that in CMOS processes if we put in a few JFet's they are used in only very particular locations and then a lot of circuitry is put around them to correct for them. <S> Other issues:JFets are not easily scalable to lower dimensions. <S> In CMOS the key size parameter(gate length) is easily defined with lithography and etching. <S> Also as we shrink sizes the gate dielectric material changes, in a JFet you're stuck with Si <S> so you have little process control over your gate drive. <S> The nice things about JFets: <S> They are lower noise than CMOS, since they are a bulk device (i.e. current runs under the surface). <S> CMOS processes below 0.5 um are surface devices and <S> the channels interacts with the Si/SiO2 interface in the channel under the gate. <A> JFETs can only be operated in the depletion mode whereas MOSFETs can be operated in either depletion or in enhancement mode. <S> In a JFET, if the gate is forward biased, excess- carrier injunction occurs and the gate current is substantial. <S> Thus channel conductance is enhanced to some degree due to excess carriers but the device is never operated with gate forward biased because gate current is undesirable. <S> MOSFETs have input impedance much higher than that of JFETs. <S> MOSFET has low leakage current and better thermal stability than JFET. <S> MOSFET technology is easily scalable and easier to manufacture.
MOSFETs are also used for high power applications but JFETs are used for low power applications. In a JFet the key dimension is a diffusion which is harder to control dimensionally.
Extract 5W low voltage power from 3000W high voltage source I have a solarpanel array that generates 600V, 5A (3kW). I want to create a small electronic unit to measure the DC current and voltage and transmit this wireless. For this I have an electronic board with ADC's and transmitter. This board uses a maximum of 3.3V and 100mA. I want to use part of the power generated by the panels for this board. I found some components like the LR8 from Supertex, but this is not supplying enough current and has a max of 400V. It seems like whatever I do to convert this voltage down to 3.3V, I loose a lot by heating of powertransistors or mosfets. As the board might be floating I wonder if there are more smart methods to power this board? Any ideas would be very much appriciated! <Q> There are parts that will easily withstand a 600VDC input. <S> TI has a reference design of a converter that will handle 800V input and produce a 25V/0.25A (6W) output that could easily be used to create your 3.3V required power. <S> I do suggest that you consider shopping for such a converter on the market though- <S> making the transformer will require some technique for safety as well as functionality and will not be very cost-effective for a one-off (sourcing custom magnetics in small quantity seldom is). <S> Note that the ratio of 600V:3.3V or even 24V is way beyond what you can reasonably expect to achieve without a transformer or tapped inductor (about 10:1 as a rule of thumb), and that probably means you need a custom magnetic component unless you want to do it in a bunch of stages. <A> Super wide-range buck converter based on the VIPer16 ST <S> AN2872 <S> - 500 VAC / 700 VDC input <S> Low−Cost 100 mA High−Voltage Buck and Buck−Boost <S> Using <S> NCP1052 ONSEMI NCP1052 - AN8098D <S> <= <S> 700 V in <S> Pushing the limit - 600 <S> V ratedNXP <S> AN11136SSL2109T/ <S> AT/SSL2129AT controller for SSL applications <S> Related Design Considerations for High Step-Down ratio Buck Regulators <S> You will have some voltage drop between the panel low voltage end and the battery or load. <S> An energy harvesting IC or a custom boost converter running from a fraction of a volt would be able to provide the energy you need. <S> To produce 3v3 @ <S> 100 mW = <S> 330 mW assume you need 500 mW in. <S> At 5A, to produce 500 mW you need a potential of 0.5 W/5A = <S> 0.1 V. <S> That would be with all the drop being used by the converter. <S> If you had 0.5V drop available <S> you need 1A. <S> The first essentially requires interrupting the feed cable and the second is still a substantial proportion of the 5A load current. <S> If you introduced a point voltage drop across eg a MOSFET it would be more controllable. <S> Say 0.5V at up to 5A available = 2.5W. Series MOSFET, regulate to 0.5V drop. <S> Efficiency loss = 0.5V/600V = <S> 0.08% <S> BUT <S> You say ... <S> I want to use part of the power generated by the panels for this board. <S> ... <S> but I do not have the option to use a single panel for this. <S> ... <S> As the board might be floating but you do not say why these conditions apply. <S> Giving a fuller definition of your problem would help. <S> You say that your target load is 3V3 x 100 mA = 330 mW. <S> Presumably there is a converter supplying mains and or battery. <S> Presumably using these is not acceptable. <S> Saying why may help. <A> I would use 2 power diodes in series , generating 1.2V, enough to run a small boost converter chip to say 3.3V to power the rest. <S> max dissipation in the diodes is 5x1.2V=6W <S> but that is nothing compared to the 3kW. <S> this may work as soon as you draw more than 100mA off the solar array (60W) <A> For powering your circuit you may look into the possibility to tap into the series-connected array. <S> Usually individual panels have voltages much below the final system voltage, e.g. 12 or 36V. <S> If you connect your circuit to only one panel you may have the power supply problem solved: simulate this circuit – Schematic created using CircuitLab <S> Where "CIRCUIT" would be your circuit/power supply while the dashed box represents the whole array of panels (four in this case). <S> Measuring 5A should not be hard to do either, but someone else will have to hint you at viable solutions to safely measure those 600V. Disclaimer: Your project is potentially dangerous to you or your environment. <S> What I said above is my personal opinion and may be completely wrong. <S> Proceed at your own risk, but do so very carefully. <A> What you want is a buck converter . <S> That is a type of switching power supply that makes a lower voltage out than in. <S> Since you only want to drive a microcontroller and a little electronics around it, you don't need super high effeciency. <S> 100 mA at 3.3 V (330 mW) would be a lot for your circuit. <S> Even if this overall draws 1 W from the solar panel, that shouldn't cause any trouble. <S> I'd keep this power supply simple, probably a pule on demand system. <S> The tricky part will be controlling <S> the high side switch accross 600 V. <S> The high voltage will also greatly restrict the parts available for that switch. <S> Arranging for something that produces a 500 ns pulse, for example, whenever the low side power voltage is below a threshold would be good enough. <S> I wouldn't try to regulat the 3.3 V directly. <S> Make something like 4 V minimum, then have a linear regulator make 3.3 V. <S> That 4 V minimum might go up to 6 V at its peak right after a pulse, but again, your power levels are so low that efficiency really isn't a big issue here. <S> A 100 mΩ sense resistor can be used to measure the current, and a voltage divider to measure the voltage. <S> The output of these would be measured by the micro, which would send on the information digitally, perhaps over a opto-isolator. <A> Would it be possible to generate 5W through induction off the main feedline? <S> Otherwise, why not go the simpler approach and add a separate, smaller panel, to generate the 5W needed for the electronics?
Adding a small PV panel to power your system would be trivial.
How do I figure out the exact voltage and current needed for a part? Whenever I look for parts in my local electronics store, I come across parts(e.g a speaker), that have just a power rating stated(e.g 2W). While I know how to calculate power,voltage, resistance etc, how exactly do I figure out the exact current and voltage for the given part? For example, if the part has a power rating of 2W, and power is calculated via P = V * I ,the part may be 2V running on 1A, or 4V with a current draw of 0.5A, etc etc. Is there a way I can find out the exact needed voltage required and current draw if all I'm given is the power rating? <Q> If you have only the power rating, you are stuck. <S> If you have the resistance in ohms as well, you have enough information via either of the equations: $$P = <S> \frac{V^2}{R}$$ or $$P = <S> I^2 <S> R$$ <S> So given a 2 Watt 8 ohm speaker, $$V^2 = P \cdot R = <S> 16$$ <S> so V=4 volts, and I = <S> V/R = <S> 0.5 amps <S> Now for a speaker you also need to know if that was the peak power rating or the RMS (roughly speaking, average) power. <S> If it is 2W "rms" that means 4 volts rms, or 2.8 <S> *4 = 11.2 volts peak-peak, which suggests an amplifier running off 12V DC. <A> If it's a speaker, and for some reason the ohms are not marked on it, check it with an ohmmeter (bring your own or borrow one from the sales dudes). <S> Generally the DC resistance will be a bit less than 4 ohms or 8 ohms, so if it measures around 6-7 ohms it's probably an "8\$\Omega\$" speaker. <S> If it's a random component and it's not marked with a part number in some way, there's no way to know exactly what (say) <S> voltage <S> it is rated for or even the power. <S> You can guess from the physical size (though some 1/2W resistors are no bigger than 1/4W resistors- <S> they just run really hot) and voltage from similar items in manufacturer's data, and guess on the conservative side. <S> For real engineering as opposed to hacking around, you should buy part numbers from manufacturer that publish real data sheets with real specifications (and perhaps applications data supplementary to the datasheets). <S> Miscellaneous overruns and stuff from a retail store without proper data are just going to be trouble. <A> Solve simultaneous equations. <S> For a speaker you usually know two things <S> Maximum power in Watts Impedance in Ohms <S> You also know two equations V = <S> I R <S> P = <S> V <S> I <S> So you can solve these to calculate V and I at maximum power. <A> That being said, you should not try to run 1000V at 4mA through a resistor that just says "4W". <S> (Note though, that speaker wattage is a special case, since they are not made to handle DC currents. <S> There you're looking at RMS power of the sound energy being delivered.) <A> If it's a speaker you're concerned about, then you need to look at how much power your amplifier is going to put out. <S> If you exceed the power rating on a speaker by a little bit, you'll usually notice first that it will sound "crackly". <S> If you drive it that way for a long time, you may break down the surround. <S> If you REALLY overpower it, you may damage the voice coil very quickly. <S> You can always turn the volume down on your amplifier to prevent these effects. <S> So the question to you is: how loud do you want the speaker to be and still sound good? <S> Also, keep in mind that when buying speakers, you should also check that the impedance is compatible with your amplifier. <S> Check the specifications on both to find this out. <S> As for other passive circuit components (resistors, capacitors, etc.) <S> you would need to look at your circuit and decide what's the worst-case voltage, current, power, and temperature that the component will be exposed to. <S> Where I work, we call this worst-case analysis. <S> You would then compare this to datasheet specifications and make sure that the component will meet your needs. <A> This is the max rating you read on the components <S> but you do not need to reach the max power in order to not fry the part! <S> plus use reasonable values plus there is an RMS value you need to read about <S> so I find it very hard for somewone to design without proper background! <S> I mean you need to go by the RMS valuesThe RMS <S> means the avarage power values you need to predict them first and this needs lots of approximations <S> so you need some knowlege!
Everything has absolute limits, you just have to find them in the product documentation or datasheet. In general, if something has a power rating and not a current or voltage specification, then it's the power that is the limiting factor for the component.
How do phones charge their battery at seemingly any rate with no issues? 500mA or 1A or 1.2A depending on the charger? If most use some sort of li-ion battery, and those batteries like to be charged in CCCV format how can my phone charge just fine at 5V, 500mA or 5V, 1A or 5V, 1.2A just fine (actual current delivered, not power supply capabilities)? It seems the current is not constant. If I made a 5V, 1A battery charger it is recommended to not use a 5V, 0.5A supply since the charger was designed for 1A. Do phones just have really complicated charging circuitry that differs from the standard li-ion charging ICs? Everyone can either charge their phone with USB at 500mA or use a wall adaptor for a faster rate. <Q> 'constant current' just means the charger will act like a current source and provide the cell with a specific amount of current, at whatever voltage the cell wants to sit at. <S> The current doesn't have to be 1A or 2A or whatever, the charger will use the largest current that it can get away with drawing from the source that the phone is connected to. <S> I would imagine the charger has a configurable current limit, and the phone's CPU will adjust this depending on how much power it can request from the source. <A> Some of the charger chips can be programmed to produce 50mA to 1.2A. <S> Some appear to have enumeration built-in. <S> Some detect BC standard identification resistors. <S> Others depend more on another MCU to do the smarts. <S> The charger (including the external MCU if that's involved) will determine the maximum current available by resistors attached to the USB data lines (BCv1.2 or whatever for dumb supplies), or by enumerating over the USB bus, asking for current and taking what is offered (or perhaps something different for non-compliant chargers). <S> It then uses <S> the maximum available safe current that it can (it may not be capable of dealing with all possibilities optimally) for the battery, adjusting the parameters of the algorithm correspondingly. <S> Of course it takes longer to charge at 500mA than at 1.2A. <A> Do phones just have really complicated charging circuitry that differs from the standard li-ion charging ICs? <S> Yes, phones do have a really complicated charging circuitry. <S> The circuitry group is called "Power Management". <S> It could be a single PMIC (power management IC), or can be a set of ICs under control of a microprocessor (usually embedded into main phone SoC). <S> The standard Li-Ion charger is only a part of it, which manages the output to battery cell. <S> The other part is a smart switch that balances battery charging with power delivery to phone's main CPU/SoC. <S> When there is enough input power, the PMIC can do both functions - charge the battery, and feed the CPU. <S> If not, phones might have different policies of how to handle weak battery. <S> Yet the other (and very important) part of phone's PMIC system is to identify capabilities of external power source, and manage its input consumption in accord with source limitations. <S> A Phone usually identifies the source capability by reading its "charger signature" and/or engaging into some handshake protocol.
So yes, phones do have a really complicated charging circuitry.
Separating Digital GND from Analog GND I'm connecting CdS photoresitor and ADC (MCP3204) to the RPi. And MCP has DGND and AGND. I am about to connect both GNDs to the GND on RPi's GPIO, naively. Is that problematic if I want to read the value from ADC at maximum rate? Say... 100kSps. MUST I use separate GND for each of them? If it can't be, putting capacitor, or diode can mitigate some potential risks? <Q> There has to be a current path from GND on the converter to GND on the controller. <S> However, the AGND and DGND pins on the converter must be connected to each other (see http://www.analog.com/en/content/raq_groundingadcs/fca.html ). <S> If noise may be an issue, then you could put a ferrite bead or LC filter in. <S> Definitely do not use a diode. <A> Usually ICs recommend using seperate GNDs for analog and digital because of ground loops mostly caused by high frequency transients. <S> When digital signals switch from a 0 to 1, there is a current spike as the power supply reacts to this greater current demand. <S> (+0.5V is still a digital 0 for example). <S> But for analog devices it is a significant problems, especially with an ADC where +0.5V difference in an analog signal is HUGE. <S> What is then recommending is to use 'Star Grounding'. <S> This is a pretty good article explaining star grounding. <S> Essentially, you connect all your grounds at 1 centrallized location. <S> And This is a good article about grounding in general, which also touches on star grounding. <S> Just connect the two separate ground pins (AGND and DGND) at a single point, like the analog ground pin on the GPIO of the RPi. <S> The document linked by Alex Forencich, states that if doing star grounding, make it as close to the supplies as possible to improve noise performance on the analog side. <S> A capacitor will only limit DC but the noise from the digital side will be high frequency. <S> If needed you can throw on a ferrite bead, but make sure you know the affects first. <S> I think I have referred to this document a few times. <A> I think there is no definitive answer here <S> and you should consider every one and pick the best of all. <S> Why? <S> This is common, when one talks about ground loops, return currents, or just proper grounding to get tons of replies that come up with completely different conclusions. <S> They all have good technical arguments. <S> All will explain that they have done so or so thousands of time and that it solved the problem all the time... <S> Well, probably they are right and this is true. <S> BUT Proper grounding is dependent of the application. <S> Good practices in analog design are disastrous in high speed digital. <S> RF grounind has nothing to do with high power DC grounding. <S> Then comes the argument of safety ground (Earth) and ESD/EMC/EMI issues. <S> For instance, there is a good book about the subject "Electromagnetic Compatibility Engineering" by Henry Ott, which is very good. <S> But good at what? <S> The book is oriented towards EMC/EMI. <S> It doesn't address (or at least not thoroughly) <S> proper grounding for audio for instance. <S> This doesn't answer your problem alone, but combined with the other answer <S> you will get, it may help a little bit. <S> In order to contribute more to the final answer I would say that: What defines if your solution is correct or not? <S> In your case it's if the amount of noise you get at the input of your ADC, relative to AGND at the ADC pin , is lower than the resolution of that ADC. <S> Thus we need to know the amplitude of your input signal and the requirement in term of noise.
This isn't too big a problem for digital circuits because the logic levels for digit signals have a large tolerance built in
Convert 0 to -150V DC to 0 to 3.3V I have a signal that gives spikes up to negative 150V. I need to be able to determine these spikes using MCU that can sens 0 to 3.3V.How can i adjust a signal so that it doesnt fry my MCU. It should be a power friendly method. Thanks! <Q> Something like this should work if the source of your pulse has a reasonablylow impedance. <S> The MCU input would preferably have a Schmitt trigger input type, or add a ST buffer before the input. <S> If the load on your 3.3V supply is at least 1.5mA it will be able to handle +150V/-500V transients (limited in the negative direction by the resistor surge rating and voltage rating). <S> Transition (1.65V) is at about -33V, so the pulse at the MCU should be around 150usec. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> 1: Use an optocoupler. <S> The series resistor for the optocoupler diode should be 150/Ion. <S> Ion is the turn-on current of the optocoupler. <S> Make sure that the optocoupler can handle higher current if the spike hits an absolute voltage higher than 150V. <S> Otherwise, go for higher resistance and take the highest spike level. <S> Watch out for the polarity <S> ; -150V goes to the cathode of the optocoupler diode and GND goes to the anode with resistance in series. <S> Make sure that there is no +ve peak. <S> Otherwise, you need to protect the optocoupler's diode from reverse voltage with a simple diode in series with breakdown voltage higher than experienced in the worst case. <S> On the transistor side of the optocoupler, connect the collector to GND and emitter to the GPIO of the MCU. <S> Enable the GPIO's pull-up if possible. <S> Otherwise, you need an external pull-up resistor (1k to 10k). <S> Make sure that the GPIO is always input. <S> To be safe, place a resistor between emitter and the GPIO. <S> DO NOT connect the GND of high voltage side to the GND of MCU. <S> You need isolation and that is why optocoupler is there. <S> 2: Use a voltage divider but you will not get any isolation. <A> That looks like a very fast rise pulse.
I would recommend just AC coupling it with a series capacitor, perhaps 0.1 uF, a pull-up resistor since you're interested in the falling edge, and a pair of clamp diodes to +3.3v and GND.
Anyone have specific examples of how IEEE 1588 is most commonly used in industry? I've run into the concept of IEEE 1588 synchronization over Ethernet several times, and am curious what its most common uses are and the details of why it is required. For example, I read that cell phone towers require time synchronization on order of microseconds, but I am not sure exactly why that is the case. Judging by the amount of support for it, clearly, IEEE 1588 is an important and widely utilized standard. I can think of some relatively obscure cases where I would want microsecond time sync between devices miles apart, but I am not sure what exactly industry does with it. If anyone has had any experience with it, please share an example or two, or generally talk about what you think are the most important/common applications of it. PS. Someone please re-tag this appropriately, I don't have enough rep to add tags, and apparently this has been an obscure topic around here. <Q> The individual nodes will each have a clock, but there will be an unknown offset and a slight drift between clocks. <S> Of course there are proprietary or ad hoc methods that achieve the same ends, but standards help ensure interoperability and may allow COTS boxes to be combined with bespoke ones. <A> Regarding cellular towers: CDMA require synchronization for the code generation and recovery, also, it helps reception on cell edges, as the signals from adjacent towers do not interfere much with each other. <S> TDMA needs tight synchronization for time slot assignment and guard intervals. <S> In both cases, a loose time base will result in lower usable bandwidth. <S> Cell towers often use GPS receivers with OCXO for their timing source. <A> Electrical power substations are perhaps one of the biggest applications. <S> Phase measurements of voltage and current need to be taken more or less at the same instant (microsecond precision) over spatially varied locations within the substation. <S> Since substations are poor GPS environments, precise time is distributed via IEE1588 - which can also go over fibre if necessary too. <S> A "grandmaster" clock for the network is usually a GPS-synchronised clock in a location with good sky visibility - perhaps on the edge of the facility.
Synchronizing time stamping of data acquisition over an Ethernet network is an example. If you don't care within milliseconds about synchronization then it's not necessary but many applications are not that sloppy and need microseconds or better sync to achieve control or compensation.
Why is my analog temp sensor's signal so unstable? I have an analog temperature sensor (TMP36 - datasheet - product page ) and it is properly connected to an analog pin for reading its output. The Arduino sketch (firmware) works just fine. Everything actually works fine except for two things: If I plug more components in the circuit, like for example connecting an LED in parallel, temp readings go up for 1 degree (Celsius). From time to time the readings go crazy (like 80°C or 100°C), although it's never that hot in here. The connection is like this: from the Arduino's 5V pin to the sensor positive lead. Then, from the sensor's negative lead to the GND pin in Arduino. And finally, from the middle lead to the A1 analog reading pin. Why are situations 1 and 2 happening? Is this normal? <Q> The most common error people make with the Arduino vis analog reading is assuming the Vref is exactly 5V. <S> This is seldom the case, especially if you using the USB port to power the board. <S> USB is a relatively high impedance power source and doesn't take too kindly to changes in load (such as flashing an LED) and the voltage can fluctuate quite a lot. <S> You should adjust any calculations to do to use the real Vref (Vcc) voltage and not assume it's exactly 5V. <S> The simplest way is to measure the voltage with a DMM when you have all your components connected up. <S> A better way would be to use a precision voltage reference chip to provide a stable reference voltage to the Vref pin of the Arduino. <S> Also: have you decoupled the power to the sensor? <S> I.e., placed a capacitor across the \$V_{CC}\$ and \$GND\$ pins (100nF for the device, and maybe 2.2µF - 10µF for the remote connection to the power). <A> The LM135 sensor needs a resistor (something like 2K) in series with the + pin, otherwise you'll likely damage the sensor. <A> In your comment to Spehro's reply you mention that you use a TMP36 sensor, not an LM335A. Shouldn't you update your question accordingly for new readers?? <S> Majenko's remark about the stability of the USB voltage might be your main problem. <S> But from the TMP36's datahseet I get the idea (but it is not stated clearly) that the sensor has a quite high source impedance: <S> 50uA source capability means ~ 100kOhm, and I did not find a mentioning of the sink capability, and the circuit diagram suggests a emitter follower output. <S> My suggestion would be to add a 100k resistor from the sensor's output to ground, with a parallel 1nF capacitor.
It is a shunt device, like a zener diode (as its symbol indicates).
5 Band resistors and correct orientation few days ago i bought few (about 500) resistors and i noticed that they have 5 color bands instead of 4. My question is how do i count them (which color is the tollerence) and how should i put them? Do they have a good or bad orientation like + or - ?I tried to use an online calculator but i dont know the first and the last band. <Q> There are only two possible ways to read the resistor's color rings right to left or left to right. <S> One of the two outer rings is the tolerance ring, the other rings indicate value. <S> As others have stated, there is often a subtle difference in (location of) <S> the tolerance ring, but not always too clear. <S> https://en.wikipedia.org/wiki/Electronic_color_code#Resistor_color-coding <S> For cheap and easy to find resistors, the tolerance ring is often gold (5%, 4 band, E12) or red (2%, 5 band, E96) <S> If you have no clue about value nor tolerance you can decode both possibilities and then check them against the E96 preferred numbers. <S> http://logwell.com/tech/components/resistor_values.html <S> Of course you may want to verify the found value with your multimeter. <A> In general the tolerance band is separated from the rest of the bands by a very slightly larger gap. <S> It can be hard to tell sometimes. <A> Normally the band that's over the end cap is the right-hand one, but that top row looks pretty ambiguous. <S> The bottom ones are 220 ohms 1%, the top ones look like 220K 1%. <S> Measure them with an ohmmeter then check with what it should be- <S> there's only two combinations, and not many values have brown as the left band (the most common -1%- tolerance band for 5-band through-hole resistors). <A> It seems the 220R 1% is wrong... <S> the top (red) band is farther from the other 4 than the bottom band (brown) that is closer to the other 4 bands, <S> so, red will be the tolerance (2%). <S> Looking at the photo I could almost say it is not 220R but 10kR 2%. <S> The top resistor is very difficult to know what side band is the tolerance. <S> The only great tip for 5 bands resistors, is that Black, Orange, Yellow and White are not tolerance, so in case of all bands being spaced equally and one of those colors being at the side band, it is the first digit of the value. <A> If these are 1 percent tolerance resistors, which they probably are, the tolerance band will be brown. <S> The tolerance band is the 5th band on one end of the resistor. <S> Deductive logic: <S> If there is a brown band on one end, and a different color band on the other end, the brown band is the tolerance band and the other band is the first number of the value. <S> Now, the value is a three digit number. <S> The 4th band is a multiplier and the 5th band is the tolerance. <S> The problem is a LOT of values start with “1” (100, 15, 150, 18, 18000, et cetera) which is a brown band. <S> So you will have a brown band on each end. <S> Grrrr. <S> Keep your multimeter handy. <S> For example, it looks like some of your resistors in the picture are marked as follows: red-red-black-orange-brown. <S> If these are 1 percent resistors, the brown band, per the deductive logic, is the 5th, tolerance band. <S> The first three numbers are the three digut value: 220 (red-red-black). <S> The 4th band is a multiplier: X1000 (orange). <S> So these are 220 x 1000 resistors: 220,000 ohms. <S> 220K ohms. <S> As some other persons said in their answers, a resistor is not a polarized device. <S> There is no "+" or "-" orientation. <S> You can insert a resistor into a circuit without worrying about which end of the resistor is which.
The one that matches E96 is the correct value.
How to panelize Gerber files using Proteus ARES? Suppose I have a few different sets of Gerber files (generated from an external software package, say, EagleCAD) corresponding to different boards. How do I go about panelizing them on Proteus (i.e., in this case, merging the multiple different designs) onto one panel prior to production? I'm wondering if it's possible to also merge externally generated Gerbers in this way, as opposed to just Proteus's project files. <Q> There is a nice Python script called gerbmerge that does this with the raw gerber files. <S> See <S> https://pypi.python.org/pypi/gerbmerge/ . <A> Unfortunately Proteus doesn't properly manage the apertures. <S> If you have two designs, each one may have a different aperture with the same number, e.g. design A uses aperture 01 for 35 thou circle, but design B uses its 01 for a rectangular 30 x 50 pad. <S> The Proteus panelizing tool seems to be meant to array a single design. <A> There are special CAM programms used by PCB manufacturers for panelizing one or more designs. <S> You may load the gerber files and drill files of the designs into such a programm, do some design rule tests, arrange the designs to a panel, use step and repeat, add some text, galvanic bars, registration drills and panel numbers. <S> Finaly you can export the gerber files, drill files and route files for that panel. <S> Of course each design may use different aperture tables and tool sizes for drilling. <S> A common aperture table is generated for the panel and used for the export of gerber files. <S> http://www.graphicode.com/ is one provider of such CAM programms for panelizing.
I use Graphicode GC-PreviewPlus, but it might be out of your price range.
Running brushed universal motor at different frequency than designed First, the end goal is to run a power tool (namely a Dewalt DW734 thickness planer) designed for 110V at 60Hz at a country where the power is 220V at 50Hz. The motor is a brushed universal motor, constant speed (i.e. not variable speed, but also doesn't seem to be electronically controlled). I've read a lot on the Internet about running motors (universal and induction) at different frequencies (50 and 60 Hz, which are the common frequencies around the world), but there are conflicting opinions. Naturally I will use a step-down transformer to get the voltage to 110V. The question is how will the frequency change affect the motor? Some sources claim that a universal motor doesn't care about the frequency at all (and can run on DC as well), while others claim that the motor will run at 50/60=83% speed (but this might be the case only for induction motors, not universal brushed motors). Other places claim an issue not directly with frequency, but with the voltage-frequency ratio (110/60 vs. 110/50) causing the motor to draw more current and over-heat. Another issue comes from electronic speed control and variable speed control (the DW734 doesn't have them, but other power tools do). Will these require the correct frequency, or do they operate on DC anyway and the line frequency is not important? There are power supplies that convert the frequency as well (VFD invertrs), but they are more expensive than regular step-down transformers and not all of them produce a perfect sine wave (which is another question - how important is a perfect sine wave vs. a PWM signal?). <Q> Brushed universal motors are largely independent of AC frequency, and as you have heard, will also run on DC. <S> Their maximum speed is normally way above any synchronous speed referenced to line frequency. <S> In their construction, the phase angle between the rotor and stator fields is set by geometry, not line phase. <S> This is also why they run at high speeds - they just don't care about the line frequency. <S> This is ideal for appliances such as vacuum cleaners and tools such as routers and planers, which don't need to maintain constant speed under varying loads. <S> On the down side, they are typically not very efficient at low speeds, but for an application where they can run fast, that's not a problem. <S> As long as you get the voltage right, you'll be fine. <A> The variable speed module that keeps the speed of a universal motor constant whilst under load is called "variable speed with electronic feedback". <S> This type of variable speed control module is a transistor based circuit and 'senses' the load on the motor and automatically adjusts the amps and voltage supplied to the motor within a typical 10% preset tolerance to accommodate the load placed on the universal motor in order to maintain the set speed of whatever speed the universal motor is set at. <S> A typical example is an old Black & Decker BD533E Corded Electric jigsaw pictured below, this is a common Black & Decker domestic power tool (manufactured from the late 1980's to mid 1990's) <S> - I have this saw, it is 230 volts ac 350 watts and 50hz, the variable speed module in this saw does a pretty good job at keeping the motor speed constant at low speeds, even when the saw is under heavy load! <A> Nothing significantly changes 50 or 60 Hz for universal motors. <S> Just adjust voltage 110 to 220V. Reminding:a 110V rated universal motor may run in 220V buta 220V rated universal motor should not be runned in 110V since probably wire gauge will not be sufficent for almost double current.
Variable speed controllers will also work well.
Where on a cellphone does the electromagnetic radiation(radio frequencies) come from? the antennae or the transmitter? I'm an electrosensitive (someone who is sensitive to electromagnetic fields such as radio frequencies). I'm trying to figure out a way in which I can use a cellphone without it's radiation affecting me. What I want to know is if the radiation comes from the antennae because I'm planning on purchasing an external antennae that I will connect to a Samsung Galaxy S3 that has a FME connector.During my research they stated that once an external antennae is connected the internal one will be disabled so I would just place the antennae at a far distance and use an amplifier to boost the signal to the cellphone. Can this idea work? <Q> The majority comes from the antenna. <S> However, no system is 100% perfect, and there will always be some leakage from other portions of the circuit. <S> Also, the rest of the phone will be generating high frequency (RF) EMI fields. <S> The CPU in the phone typically runs at 1GHz or so, and the various peripherals all use clocked (serial or parallel) <S> high frequency (MHz) signals, all of which radiate RF EM fields. <S> Yes, the phone has to be designed to limit the amount radiated to pass its certifications, but that doesn't cut out 100% of all EMI. <A> Any electrical signal through a conductor generates an EM field, depending on the physical parameters of the conductor and the frequency. <S> An antenna can be considered as a conductor with a very high gain in terms of radiations for a given frequency range. <S> A transmitter is basically in its simplest form a (modulator and a) driver for the antenna, which means it is also dealing with the same signals at the same levels of (electrical) power, but the transmitter is not designed to radiate so its effective emitted power will be neglectable compared to the antenna's. <S> The FME connector seems shielded too, so that should work, though that depends on your sensitivity <S> (radiated power decreases in distance²). <A> I have discussed this with mobile phone antenna designers and seen the measurement results from a whole mobile phone. <S> The placing of hot spots depends on impedance at the signal frequency, geometrics, etc. <S> I do not remember having seen measurements with an external antenna, definitely the radiation from the phone will be lower since external antenna has the lowest impedance path for RF power. <S> A modern mobile phone might have seven antennas inside, of course the gsm having the most powerful transmitter and for example GPS antenna is receiving only.
The whole phone radiates the signal, although there are hot spots and those are not necessarily at the antenna.
What is an easy way to program an ATtiny microcontroller in C without an ISP? I understand the "most raw" method to program an AVR microcontroller is probably with an ISP such as the AVRISP mkII. However, I'm after a method that doesn't involve me having to purchase a $40 tool for a one-off project. I have at my disposal a computer, an Arduino Uno, and a Raspberry Pi. I'm not really interested in using the Arduino IDE and writing sketches. I want to get down into the low level code which is possible in C, preferably using an IDE such as Atmel Studio. As I understand the Arduino Uno has an ATmega16U2 which connects to a computer via USB, which is used to program the ATmega328P. Is the ATmega16U2 acting as a ISP here? If so, can I use it to program the ATtiny? I've gone through the schematic, and it shows the mega16u2 has an ICSP header, but it's connected to the mega328 via TX/RX lines. <Q> Both Arduino and the Raspberry Pi can be wired up as an ISP programmer with AVRDUDE . <A> Is the ATmega16U2 acting as a ISP here? <S> No, that chip is acting as a USB -> RS232 TTL adapter. <S> The 328P chip has a serial bootloader installed on it which accepts commands through RS232 to program the chip. <S> There are many tutorials and examples on the Arduino forums and playground. <A> You can use a 5x2 10 pin header and wire up your own programmer, such as this: <S> That was taken from Sparkfun's tutorial on microcontroller programming . <S> The entire tutorial is about getting code onto a Microcontroller. <S> The microcontroller used is an AVRMega, but the same will hold true for a Tiny. <S> Use the Serial port programmer , with supporting hardware it should be far less than $40. <S> This programmer will be specific to AVRs, so that 'one off project' thing isn't entirely true for this piece of hardware. <S> That's how you physically get the code onto the board. <S> There are several ways to compile and upload the code as well, using any of your favorite editors, makefiles, and the like.
You can install the ArduinoISP sketch on the Arduino (included with the Arduino IDE), which then turns the Arduino into an ISP that can be controlled via AvrDude (command line program) to program the ATTiny through ISP.
LVDS vs MIPI, what's the difference? What are the practical differences between LVDS and MIPI? A little background information: I am attempting to build my own projector on the cheap and want to use a nexus 10 LCD panel (2560 X 1600 resolution) but I have been reading mixed information on its interface, some say it is LVDS and others say it is MIPI. <Q> MIPI and LVDS panels are quite different. <S> They are different ways of sending a RGB, DE, Hsync, VSync signal to a panel. <S> Older (lower res) panels would accept these digital signals directly <S> so RGB24 would have 27 signals, and they would toggle at the pixel rate. <S> LVDS is quite straight forward, and is just parallel data serialised 7:1. <S> The RGB, DE, and syncs go in defined places. <S> It is normally a clock pair, and 3 LVDS pairs for 18bpp, or 4 LVDS pairs for 24bpp, or 5 LVDS pairs for 30bpp. <S> The LVDS clock tends to be ~75MHz max, and data lines tend to top out at 525MHz (7x75M). <S> Because of this some larger res displays use even and odd groups. <S> So a 24bpp 1080P display would likely have 2 clock pairs, and 8 data pairs - so 20 signal lines. <S> Not a great saving over parallel RGB, but better signal integrity and lower emissions <S> MIPI on the other hand is a lot more complex. <S> It is typlically <S> a clock and 3 data pairs. <S> The data pairs operate at ~1GHz. <S> It has high voltage and low voltage signalling to conserve power. <S> It has a messaging protocol in addition to raw video. <S> This allows the controller to read data from the display (such as what it is). <S> It allows the controller to control things like the gamma curve, colour calibration, adaptive brightness, etc if the panel supports it. <S> It can be more painful getting a MIPI display to go if you don't know the settings to send it <S> (And these are often poorly documented). <A> LVDS -> <S> Low Voltage Differential Signalling is the actual voltage and impedances on the physical wires. <S> There are different voltage levels even within the MIPI standard, so pay attention to those. <S> MIPI is the format of the how the various bits are located relative to other bits and signalling and start and stop sequences inside the data stream. <S> In some parts of the Mipi standard there is description tables for register locations (if my memory serves me). <S> So Mipi is a stream of formatted bits, and LVDS is the signals that push those bits in the real world. <A> Thus, they are the same in that one utilizes the other in it's main specification. <S> You can think of DSI as the protocol and it uses LVDS as the transmission method. <S> In terms of building your own projector. <S> I would say that using an LCD screen that large is going to result in chromatic aberrations as well as uneven light distribution. <A> I'd like to clarify some things: LVDS standard describes a way to transmit 0s and 1s serially as voltage differences. <S> FPD-Link (and OpenLDI) standard describe a way to use LVDS to transmit video data. <S> Becaue FPD-Link is so tightly coupled with LVDS they are used synonymously. <S> So when someone says LVDS they usually mean FPD-Link (even data sheets do this!) <S> MIPI-DSI is another standard, which competes with FPD-Link, but uses a different physical layer, different from LVDS but still differential in nature. <S> Now you can read Russel Hocken's answer which is actually the correct answer.
I believe MIPI's DSI (Digital Serial Interface) specifications utilize LVDS (Low Voltage Differential Signaling).
What's the maximum number of outputs you can control from a microcontroller with n outputs? Been pondering this for a while, and I think it's \$2^{(n-1)}\$ outputs. If I have 5 outputs, I'll use 1 as the signal, and the other 4 as control lines to cascaded decoders, which gets me 16 outputs. This grows exponentially, so it's fine with microcontrollers with more than say 4 outputs. But what about microcontrollers with limited outputs (eg. 4). Are you limited to only 8 outputs here? Edit: The project is to drive a variable brightness (PWM controlled) LED array of 32 x 4 from a single microcontroller with a limited number of outputs (4). I am wondering whether the complexity involved in this is not worth the effort, and whether to instead use a microcontroller with more outputs. <Q> It depends on what you mean by "control". <S> Are you confining yourself to simple combinatorial logic, or are serial protocols allowed? <S> In theory, you could control an arbitrary number of outputs from a single pin by using something like the Dallas/Maxim 1-wire (serial) protocol to drive a set of I/O expander chips. <S> Similar approaches can be used with I 2 C, SPI, or simple shift registers, each of which would require a minimum of 2 pins. <A> If you can easily use a microcontroller with more outputs - and it should be fairly easy, unless you've already got a lot of other outputs committed to another purpose - then do so. <S> If you can't, then you can usually economise by using shift registers : <S> http://wiringpi.com/extensions/shift-register-74x595/ <S> You could have five 8-bit shift registers, four across the 32 bit width and one for the 4 bit height. <S> Use your four pins as data, clock, latch, and chip select. <A> That depends on how fast you need to control them. <S> If you need high speed then your equation holds. <S> If you can stand a bit of delay then you can use either I 2 C expanders (2 GPIOs) or '595s (3 outputs), hubbed or cascaded as required. <A> You could use one bit plus a shift bit to control an arbitrary number using daisychained serial shift registers, and your output could be ANY number, not just a 1-of-16 pattern or something like that. <A> If you just want to control LED's you can also use CharliePlexing. <S> Using this method, n outputs can drive (n^2 - n) segments or LEDs. <S> http://en.wikipedia.org/wiki/Charlieplexing <A> With regard to your specific requirements, you don't specify the number of brightness levels you require, but you could probably achieve a reasonable number of brightness levels if you have the shift registers' "register latch" pin tied to an output-enable. <S> Assume <S> you want 128 brightness levels at a 60Hz or better refresh rate, and it takes 100us to clock out the bits to select and load a row. <S> Clock out bit 0 of the brightness for each light in row 0, then pulse the latch/output enable for 20us. <S> Then clock out bit 1 the brightness for each light in row 0 and pulse the latch/output enable for 40us. <S> Then bit 2 and pulse for 80us. <S> For bits 3-6, the pulse lengths will keep doubling but you'll be able to clock in the next bit of data during the "on" part of the cycle (since you'll want the enable to be active for longer than it takes to shift through the bits). <S> The first three bits will take about 100+20+100+40+100+80 microseconds (440us in total). <S> The next four bits will take about 160+320+640+1280 (2400us), for a total of about 2840us. <S> Doing that for all four rows will take under 12ms, so an 60Hz refresh rate should be no problem. <S> One slight limitation with this approach is that you should make sure that you don't try to change the brightness of the lights on a row while that row is being processed. <S> Otherwise, if e.g. a light's brightness changes from 63 to 64 between the times bits 5 and 6 are output, the light may be turned on during the first 6 bit times (since bits 0-5 are all set, even though bit 6 is clear), and then on for the last bit time (since bit 6 will be set, even though bits 0-5 are clear), thus causing it to appear briefly at full brightness. <S> If you latch the brightness for the lights in a row before scanning that row, however, such difficulties should be avoided.
As noted, by using shift registers, it's possible to control any number of outputs using a small number of CPU pins.
Is there any way to use industrial sized IC's package in home project? All actuals DSP or MCUs comes in BGA-like packages with numerous pins and very small size that make them hard to integrate in home project. Does anyone has knowledge of revolutionary breadboards, cheaps sockets or just expansible developement boards that would make this task easier ? Just for notice, I take my interest in audio systems. This far I never put feet on hardware ground (just sofware) despite old theoretical knowledge bundled with my university graduation. <Q> BGA is mighty hard, even for non-home operations. <S> I can't think of any way you'd solder them without a reflow process, and without good equipment and a way to inspect them, you'd probably just destroy a lot of parts. <S> There are some sockets available , but they aren't particularly economical. <S> However, other surface mount components are feasible. <S> Adapters for various *QFP and <S> *SOP flavors can be found which adapt the package to some .100" headers which will stick in a breadboard. <S> It's also not impossible, with the right tools and a steady hand, to solder directly to the leads. <S> For the more expensive components, microcontrollers, DSPs, FPGAs and whatnot, there are most usually development or evaluation kits available which include the component in question, attached (with a socket, where feasible) to a development board with plenty of .100" headers or other accessible connectors. <S> Just to pick an example from Mouser's front page, see this TI MSP430FR5969 LaunchPad Evaluation Kit . <S> Of course, these are also somewhat expensive, and highly specific to a particular device. <A> While BGA is often considered hard for hobbyist level development, many of those devices also come in QFP style packages with pins around the outside. <S> While they are tiny and difficult to solder, they can be soldered by hand with some practice. <S> Lastly, there are services which will do the difficult parts of assembly for you if you cannot adapt your design away from parts you can't handle yourself. <S> Let them install the few difficult components, then assemble the rest yourself. <S> You might be surprised at how affordable this is. <S> There is no need to let difficult parts prevent you from building your project. <A> Soldering of most of those packages can be dealt with using a fairly modest investment in reflow equipment. <S> It's not really necessary to inspect BGA soldering- <S> if the process is controlled the yield is quite high and plenty of people do hand rework on BGA packaged parts without X-ray machines or fiber microscopes. <S> QFNs and various chips-scale packages are also a PITA. <S> J-lead SMT packages can be soldered with nothing more sophisticated than fine solder/tip and some solder wick (and preferably a microscope unless your eyes are very good). <S> The big thing pushing you toward eval boards for BGA packages will probably be the high cost of bespoke multilayer boards in small quantities, and the tedium of installing huge numbers of microscopic 0402 and 0201 bypass capacitors. <S> If you can get a relatively compact eval board for a part such as a high-pin-count micro you perhaps can mount it on your own design of carrier board. <S> If you want stuff that's physically, as well as functionally, similar to commercial stuff, you really have to pay to play, to some extent. <A> Inexpensive breakouts for surface mount packages can be found quite cheaply and soldered via a hot plate. <S> http://notanumber.net/archives/142/simple-reusable-zif-socket-smd-parts
If you don't want to risk damaging the chip or use up an expensive one on an adapter, there is always the magnet method If you have a part in BGA, look for that same or similar part in an easier to deal with package, or change your design to use easy-to-prototype parts.
Why do some people use resistors to create a HIGH connection on a chip? This is a follow-up question to my previous one, What does Low/High mean on the connections of a chip? . To create a HIGH connection, you often just connect the pin to VDD, which is often above VIH (and therefore sets it to HIGH). However, some people choose to add resistors to those pins, as shown below: Credit: Wolfson In this case, DVDD is 3.3V and the VIH is 0.7×DVDD. Looking at that, it seems that the resistors aren't necessary. What are these resistors for, and do I even need them? <Q> These are called pull up resistors . <S> These are used to ensure that inputs to logic systems settle at expected logic levels if external devices are disconnected or high-impedance is introduced. <S> Usually used with open-collector or open drain outputs. <A> If you are positive you will never connect the input to anything but "high" and if the input can only be an input, there is little need for them on modern chips (antediluvian logic sometimes recommended a pullup rather than direct connection, but that's history). <S> If the chip can make it input an output under some conditions then having the resistor there limits the current that the chip will have to sink, and could save it from overheating or damage. <A> In the schematic you show, the connection isn't just to the pin, but also off-page to some other circuitry. <S> (look where NON_AUDIO, <S> TRANS_ERR etc. <S> end up). <S> So the pin isn't meant to be high all the time, but U1 sometimes pulls those outputs low. <S> RESETB is an input to U1, so it might be driven by an external signal. <S> It's fairly common to leave reset lines unconnected, in which case the resistor pulls the chip out of reset. <S> Often there will be a capacitor to ground, to allow the supply to settle a bit before the chip comes out of reset. <A> It is not clear what you want to do with the resistors. <S> If you remove them and make direct connections with DVDD, you have just shorted all outputs and input! <S> If you just remove them, the outputs and input will "float" (can't rely on what state they will be in). <S> Without a pull up resistor, the input and output lines will experience either a 0 (ground), or ? <S> (float), instead of either a 0 (ground) or 1 (> 2.5v). <S> In addition, "floating" lines are more susceptible to "electrical noise. <S> " Your circuit could experience "random" resets.
If you might want to probe around and change the logic state, having the resistor rather than a copper trace that you'd have to cut makes sense. The resistors are there because U1 has open-collector outputs, or floating outputs while in reset, or something similar.
Using an SSR photoelectric sensor with Arduino I'm wondering if I can use this photoelectric sensor with an Arduino. I don't have much experience with these sensors or with relays, and I'm sometimes confused by output switch ratings, so I can use the help. Here's my understanding. Two of the sensor's cables are for power supply. The other two are listed as "isolated AC/DC outputs" and I want to connect those to an Arduino to detect the sensor's state change. The data sheet says "Output Load:  300mA @ 240 VAC/VDC." I think that means the maximum rating. My question is, if an Arduino only sources 40mA at 5V, do I need to figure out if there is a minimum requirement for sensor's outputs? And if so, how do I do that? <Q> Thanks for the responses to my question. <S> I'm answering my own question because I was able to do some further research into this specific unit. <S> Instead of getting limited answers through the vendor's tech support, I eventually found Eaton , the company that produces this item, and spoke to their extremely helpful sensor tech support person. <S> So the basic answer is yes, powered separately, <S> the unit can be used with an Arduino. <S> I should've clarified better that I was mainly concerned about using an Arduino with the unit's outputs. <S> He confirmed that the unit's outputs are isolated from the power supply and can work with either AC or DC, so no conversion to DC is necessary. <S> That said, tech support did still recommend the mechanical relay version as another user pointed out. <S> Despite isolation on the outputs, there could be some current leakage with an SSR, whereas there shouldn't be any with the mechanical relay version, and my application is not a super-high-processing environment where a mechanical version would soon fail from wear and tear on the physical contacts (using the example he gave, not a UPS shipping facility where they would need a much longer-lasting SSR-version sensor to count tens of thousands of packages a shift). <A> Short answer is anything will work with anything if you try hard enough. <S> This SSR is just too industrial and is not designed in the slightest to be put together with the Arduino. <S> There are simply no areas that allow you to easily sense the status of the relay. <S> If you are insistent on making this work with the Arduino, you'll need to: <S> First, supply the SSR with a 12v power source Second, convert the AC output of the relay to DC Lastly, buck the DC voltage down to 5V <S> Once you have that, you can effectively sense the output of the SSR. <S> In all seriousness though, I would advise looking for a much more application-fit relay if you have to use an Arduino. <S> I would suspect there are some sort of PLCs for use with industrial relays such as this. <A> I wouldn't trust an SSR designed to work with 120 - 240 AC/DC to work reliably with the 5 volt inputs on an Arduino. <A> If your goal is a just a photoelectric sensor that triggers a logic signal on an Arduino, you can do this with a few dollars worth of parts, fed from the 5V regulated power supply out of the Arduino. <S> You'd use an IR LED as the light source. <S> Then you'd use an IR phototransistor as the sensor. <S> Feed that into the gate of an NPN transistor. <S> Then you'd feed the output of that to the Arduino. <S> The total list of parts: <S> A high output IR LED. <S> An IR Phototransistor. <S> A general purpose low-power NPN transistor. <S> 2 or 3 resistors. <S> Plus a reflector or some reflective tape if want the sensor to be all together in a box. <S> Plus a breadboard or prototype board, some jumper wires, and a project box. <S> The company HiViz.com sells kits and assembled circuits designed to trigger cameras and flashes, but it would be trivial to adapt it to control a logic input on an Arduino. <S> (The camera and flash circuits use an opto isolator to isolate potentially high voltage flashes from the other electronics, but if this is purely powered by the Arduino, you won't need that.) <S> I just built a prototype circuit like the one I described using just an NPN transistor, a photogate, some resistors, and a breadboard. <S> If you're interested let me know <S> and I can figure out how to create and upload a schematic. <S> (I haven't tried using the web-based schematic editor before, but I can probably figure it out.)
The outputs function as a switch contact whose state the Arduino could read directly. This product with JUST the Arduino will NOT work. I would prefer the -6514 version, with "real" relay contacts as outputs.
In a NOT gate circuit, does charge not flow through both the transistor and output line when the transistor is "on"? I've tried to recreate a circuit from what I think would be a NOT gate, based on some other schematics and breadboard examples that I've seen. simulate this circuit – Schematic created using CircuitLab For this to be practical, I think SW1 would go away, and instead be substituted for some other voltage source as an input, but I've inserted SW1 and attached it to the same voltage source as everything else just to simplify the diagram... Anyway, my assumption is that when there is charge going into the base of the transistor, the charge flows through the collector, out the emitter, and straight to ground (the negative end of the voltage source). So, in this case, does the charge not flow through R2 and through the LED, somehow? It seems to me that this conclusion must be correct, or else the LED would light up, right? But apparently, electricity does not take the "path of least resistance" , so to speak. Conversely, if the base of the transistor does not have any current, I assume the current stops at the collector of the transistor, but since the circuit must be complete, pressure moves the charge through R2 and the LED, then to ground. I feel that I am missing some fundamental principle involved in this. Any thoughts? <Q> You are correct for the most part, but what you have here is essentially two switches that are working in inverted states. <S> If you drive the base of the transistor then you will draw about 29mA collector current from V1 and force, assuming saturation, the collector to be about 200mV (Vce sat). <S> Current would flow through the diode if the voltage at that node was sufficient to forward <S> bias the PN junction of the device, but that is not the case. <S> So, what happens here is that when the transistor is ON, the diode switch is reverse biased (off), and when the transistor is OFF, it provides a high-resistance path (an open) and current will flow through the two series resistances and drive the diode. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> It is conventional to draw circuits <S> so signals flow from left to right, like <S> so: simulate this circuit – <S> Schematic created using CircuitLab <S> (You need a base resistor, R3, to limit base current, and a resistor from base to ground to ensure that the transistor does turn off when the switch is open) With the switch open, the base will be held at ground by R4, so no current will flow through the transistor, so the collector will rise to a voltage determined by R1, R2, and the 2 volts or so voltage drop in the LED - this will allow current to flow through the LED and light it. <S> With the switch closed, the base will be pulled up, allowing current to flow through the transistor. <S> If the resistors are selected correctly the transistor will be saturated, pulling the collector down to about 0.2 volts. <S> As the LED requires about 2 volts across it, it will not pass any current. <S> I really dislike the sentence <S> "Current always takes the path of least resistance", as many beginners seem to read it as "Current takes only the path of least resistance". <S> In face, an electric current takes all possible paths, withthe lower resistance paths passing higher currents than the higher resistance paths. <A> It's simple, really. <S> When the transistor conducts, the current has to choose between going through the collector of Q1 to the emitter and then ground, or going through R2 and D1. <S> The diode only allows current to flow when biased, which in practice (for the range of currents in which the LED is simultaneously visible yet not damaged) means a constant voltage drop in the LED, perhaps 1.5V to 2.5V depending on LED color and other properties. <S> There's also an IR voltage drop in R2; say you must apply at least 1 mA for the LED to be visible, then you're looking at a 0.3 V voltage drop in R2 (\$300 \Omega \times 1 \textrm{mA}\$). <S> So, unless you apply somewhere between 1.8 V and 2.8 V in the branch of the circuit containing the LED, it'll basically look like an open circuit (very high resistance). <S> Now the transistor conducts current much more easily, clamping the voltage at a Vce(sat) = <S> 200 mV as mentioned by the other answer. <S> At that voltage, the LED is not biased at all, so it does look like an open circuit, while the transistor looks almost like a perfect short circuit (save for the voltage drop of 200 mV). <S> So indeed the current chooses the past of least resistance, which is the transistor in this case. <S> On the other hand, when applying 1.8 to 2.8 V to the branch containing the LED, it will bias the LED and let current through. <S> So again the path of least resistance is being chosen: the resistance through a transistor with no current flowing into the base is effectively infinite.
When the transistor is not conducting, then no amount of voltage applied to the collector will allow current to pass.
Holding components without bending leads when soldering upside down? I am gaining experience in soldering components onto PCBs. I'm working through some one sided through hole PCBs and one thing that I'm having trouble with is holding components once I flip the board. I generally tend to not like bending the leads when I flip the board. There are two reasons -- one being that they still don't seem to fit tightly, not to mention you can't bend the leads of some components (e.g. short lead capacitors) and the second being that they don't solder on nicely. With bent leads, they can even sometimes be touching other soldering points in some cases (after cutting excess off). The only thing stopping me from attaching all the components and then flipping it and soldering all the leads is that as soon as I flip it components fall out the components which are taller than others (e.g. electrolytics) dictate the other components to fall to that height. The components falling out when I flip the board I can overcome by using a bit of card to hold them while I flip it. I experimented with some sponge to hold the components in their respective heights when I solder but not much success. The best I can come up with is soldering in 'layers' with the shortest components first (resistors etc) and slowly building up until reaching the layer of electrolytic capacitors.But again, ideally I would like all the components on the board together and then just solder them all in one swipe. Any better ways of doing this? Any pointers? <Q> Blu-Tack/Fun-Tak works. <S> It's a removable adhesive putty. <S> Think post-it note glue. <S> Sticks well but easily removed. <S> Can easily hold things in place upside down. <A> It isn't a solution to all through hole components, but for devices with more than two pins I've taken to designing my landing pads with hand assembly in mind. <S> For instance, with header, the pins can be slightly offset so the pins fit snuggly in the PCB, like this: <S> Each through hole has an alternating plus or minus 0.05 mm offset from the center <S> (it's a 1.27 mm pitch header, or 0.05", <S> half the normal 0.1" pitch that's so common). <S> I've produced at least four boards with this augmentation and it works well for holding the header flush while I get it soldered. <S> It even makes routing easier in some cases, like a 45° route from a pad where the adjacent pad is recessed will more easily meet clearance rules. <S> I haven't used any DIP parts recently, but if I did I would likely use a similar method to make hand assembly less of a chore. <S> For components with only two leads it's easy enough to tin the corner of one of the through hole pads and hold the component in place with one hand while the other wicks that bit of solder to lightly hold a lead of the component in place. <S> Solder the other lead and then finish up the lightly soldered one. <A> On a board of any size, I don't try to install all parts at once - I might stuff and solder all the diodes, then the resistors, then bypass capacitors... etc. <A> The way you're doing it is fine and will ensure that the low height parts are properly seated. <S> That's particularly important on single-sided boards because pressing down (towards the board) on a part that is not properly seated will directly put the adhesive holding the copper to the board in tension (its weakest direction). <S> If it's properly seated, the force you can exert accidentally is relatively limited for most parts. <S> Some people use fixtures with foam to push the parts into place. <S> See this answer here for a photo. <S> I can't vouch for the efficacy of this approach. <S> On certain parts where location and proper seating is vital, you may even wish to solder a single pin or two pins and inspect and adjust the part until it is perfect before soldering all the rest of the pins. <S> For more of a small-scale production situation, if you have access to the appropriate tools you can make jigs to hold things like displays and LEDs in position while they are soldered.. it's way better than spacers to have a machined aluminum pocket holding the bit while it is soldered exactly in position.
I use a piece of soft foam, possibly with another board to hold the foam flat against the board as I flip the whole assembly so the parts don't fall out, and do the parts in "layers" as you suggest - most parts are no taller than DIP ICs, so this usually just leaves a few large parts to install individually at the end.
74154 4 to 16 decoder logic diagram Will someone please explain the purpose of inverting the outputs (0 through 15) as well as the use the NAND gates here? 2nd, less important question: why are there two input G1 and G2 if the technical specs for this DIP states that all inputs (a,b,c,d) are only considered when both G1 and G2 are low, and than when either (or both) G1 and G2 are high, all inputs are "don't care" ? My first question is more important... 2nd is just my observation that I wonder about. <Q> First, the inversion of the outputs simply means that the output is active low. <S> That is, for an input of 0000, the 0 output is selected, and it is driven low. <S> All the other ouputs stay high. <S> The NAND gates are used because, given that the active lines on the 74154 are low, DeMorgan's Theorem allows NAND gates to function as OR gates. <S> That is, if the 74154 outputs were active high, OR gates would perform the synthesis desired. <S> Since the ouputs are active low, NAND gates do the job. <S> The active-low enable inputs allow cascading of demultiplexers over many bits. <S> And why are there 2 of them, you ask? <S> It's because with a 24-pin package, 2 power pins + 4 address pins + 16 output pins = 22. <S> Rather than providing only a single enable, both pins are used. <S> This allows more flexibility in the logic functions available. <A> Many TTL parts and older memory chips have active low enable inputs, so the active low outputs of this part can be connected directly to those inputs. <A> As for the NAND gates, there is a function being implemented in which the gates are there to realize it. <S> For instance, f1 , will be LOW (because all non-selected outputs are HIGH) unless the decoder selects output 2, 4, 10, 11, 12, or 13 which will cause the output to drive HIGH. <S> If you want to know exactly what is going on then draw out the truth table, but it is unlikely their function will make much sense to you.
The active-low output is just how the design for that specific decoder was carried out - there is also active-high varieties. If you wanted to generate a 1 of 256 demultiplexer, you could use 16 74154s looking at the 4 least significant bits, while a single 74154 would look at the 4 most significant bits, with one ouput going to each of the other 16 74154s. There are probably two enable inputs because otherwise there would be two unused pins on the 24 pin package (I don't recall seeing 22 pin DIP packages).
Is it possible to run PIC16F88 at 3V? I have notice that PICs have the 16F88 and 16LF88 version, after some researching i tought the LF is for chips that work at 3.3V, in other places it says i can still use the 16F88 at 3.3V, the datasheet clearly says : Wide operating voltage range: 2.0V to 5.5V Can i power my 16F88 with CR32-3V battery and will the I/Os work at the supplied 3V voltage ? <Q> You are justified in distrusting broad claims in the text part of the datasheet, especially those on the first page. <S> For the 16(L)F88 the operating conditions clearly state the allowed power supply voltages and clock frequency combinations. <S> As you can see, the non-L version is NOT guarateed to operate below 4.0 V. <S> The L version is, but not up to the full 20 MHz that the non-L version can run. <S> The 'sales speak summary' of this <S> is that the 16F88/LF88 can run up to 20 MHz and can run on voltages 2.0 - 5.5V. <S> Yeah, <S> but that does not refer to the same part, and certainly not at the same time . <S> That said, when you grab a 16F88 or 16LF88 you can probably operate it (in your 20C lab environment) according to either graph, and maybe even run it at 20 MHz at 2.0V. <S> Remember that there is never a guarantee that a part won't operate outside its documented normal operating conditions. <S> But you do so at your own risk. <A> (As an extended comment rather than an answer, but I'd like to share) <S> Wouter is absolutely correct here. <S> Microchip have many PIC microcontrollers and variations within each family. <S> So when one datasheet covers a few variations, especially LF vs F, you will see a summary covering all variations on the front page. <S> "Wide operating voltage range: 2.0 - 5.5V". <S> "ECIO up to 20MHz". <S> As Wouter says this does not refer to the same part at the same time! <S> Unsuspecting newcomers might not be aware of this. <S> This isn't unique to microcontrollers. <S> Mosfet datasheets do it all the time with the front page saying "threshold voltage only 1.1V!". <S> Yes, but at what current? <S> Scan down the page, look at the graphs, ah ha! 1.1V at 250uA! <S> That may not be a useful current for your application! <S> Part of being a professional engineer is asking these questions: <S> What is my variation (temperature, voltage, current, frequency) <S> Do all the specific parts I've chosen operate within these parameters <S> If the specific ones do but the general ones don't, note that on the schematic and BOM . <S> This is more obvious for components such as capacitors, where a 4V part in a 12V circuit will result in smoke (and litigation) but other components are more subtle. <S> Always, always specify. <S> I made this mistake 2 months ago in an end of year consortium product demo with senior execs. <S> I knew the operating parameters of the PIC16(L)F88, I had referred to the graphs, I was operating at 3.3V <S> but I didn't note it on the schematic <S> and I put an L88 in the socket in the last few test days before the demo. <S> It programmed and verified fine and tested fine and worked fine <S> but I went slightly pale later when I realised what happened. <S> If I had been running at more than 4MHz and less than 3.5V, and less than 20 degrees, it might have failed. <S> But, then as Wouter says, it might never have failed: "you do so at your own risk". <S> At least I didn't ship 10 million of them. <S> Then you get fired :-) <A> If the datasheet says 2.0-5.5V then you are near the middle of the range with 3.0V <S> you should be fine. <S> Best way to know, build one and see. <A> Yes, it should work, however, look in the datasheet for the maximum safe operating speed for the micro-controller running at 3.0V.
As others have stated, the datasheet is indeed the LAW, but only the part that show the operating conditions . It is normal for datasheets to show the broadest ranges on the first page. Usually the case is that the maximum safe operating speed decreases as you lower the voltage powering the device.
How to set up an experiement to measure SNR for an EEG amplifier? I have built an EEG amplifier with gain of 2000 and bandwith at 1~40Hz. I use an Instrument Amplifier for pre-Amp and a non-inverting opamp as post-amp and finally bandlimit at 40Hz using a 4th-order LPF. I would like to measure the SNR for my EEG amplifier but I do not know the proper set up and therefore I come out with the following experiment steps and please verify for me am I doing the right thing. How I record the measurement: I connect the analog output to the SADC pin of ARM MCU. The ADC sampling rate is 7000 samples per second My input: A differential Sine wave from function generator @ 10Hz My output: An amplified Sine wave @ 10Hz @ gain = 2000 1. Measure the Vrms for noise 1.1 Let input of INA to open and then power on the amplifier. 1.2 Measure the output and record the ADC data 1.3 I record the output for ~5 seconds which give me ~50,000 data 1.4 I select a portion of 10,000 continuous data sample, which is 1-10001 data samples 1.5 Calculate the Vrsm using similar equation provided here 1.5.1 Calculate the power of 2 for each of the 10, 000 data1.5.2 Calculate the average result of the total data (which is divided by 10000)1.5.3 Vrms = Square root the result of average of 10, 000 data 2. Measure the Vrms for signal 2.1 Let the input connect to a differential Sine wave generator Repeat 1.2, 1.3, 1.4. 1.5 to calculate the Vrms of signal. 3. Calculate the SNR (db) SNR(db) = 20 log (Vrms, signal / Vrms, noise); My question: Am I doing the right thing for the SNR measurement? Edit : Update question Now I am confused. The MCU is powered at 5V from an eval board whereas my system is a 3.3V powered. The MCU SADC is taking the voltage measurement at pin SADC with reference to 0V (GND). However, my system AGND is at 1.65V. Therefore, how should I connect the output of my system to the eval board? I try the following scenarios: 1. Connect the SADC pin to my EEG amplifier output and connect the MCU GND to my EEG AVGND It will measure the noise like this, which is a sharp peaks: 2. Connect the SADC pin to my EEG amplifier output and connect the MCU GND to my EEG 0V ground It will measure the noise like this, which is looks like a power noise: Which is the correct one? or both wrong? <Q> Yes, that's a reasonable approach, except that you'll also want to calculate the mean (DC bias) of your 10000 samples, and subtract that from the individual samples before you square them for the RMS calculation. <S> This is equivalent to using a high-pass filter to block DC. <A> I think you have a pretty good test setup. <S> When making your noise measurement in step 1, I would recommend connecting the two differential inputs of your amplifier using an impedance that matches the output impedance of your detector. <S> Also, I agree that you should subtract the DC-offset before computing Vrms as the other user recommended. <S> You can also simultaneously test for distortion (SINAD) as follows. <S> (note, your current test will give you signal+distortion to noise ratio instead): <S> Take data is in your step 2. <S> Compute the FFT of the the data taken. <S> Block off the smallest possible window around the peak created by your sine wave in the FFT. <S> Compute the signal power from within your block then compute the noise and distortion power as everything else in the FFT. <S> I would recommend using a tool like National Instruments' wavevision software, which will do this and more for you. <S> Regarding grounding, it looks like in #1 your signal is out of range of your ADC (it appears to rail out at 0). <S> Given the two options, I would go with #2 but there may be an even better alternative. <S> You might consider opening this up as a separate question so you can go into more detail about what voltage supplies you are using and get more focused feedback on that aspect. <A> I would take a different approach <S> SNR is a simple measurement setup, you need to have the ff:1.) <S> noise source of known power(voltage)2.) <S> signal source (function gen in your case)3.) <S> A combiner( usually passive)4.) <S> A means of qualifying detection in your case an ADC Setup:1.) make sure Noise power and and function gen power can be set to the same level (power or voltage) <S> (resolve impedance issues)2.) <S> Make sure function gen power can reach at least 12dB-20dB over noise power.3.) <S> make sure you can make 1-2dB step in voltage over the noise <S> power.4.) <S> calibrate everything in dB and dBm in your case <S> I will settle with 600ohms(balanced or unbalanced) in dBm and dB. Test:1. <S> combine noise and function gen and load them ac coupled to EEG amp <S> (dc voltage will not be an issue)2. <S> Set Noise power and signal power as equal(starting voltage need not to be very low)3. <S> Sample output (across fixed time will be ok across fixed n samples will be better)4. <S> step up signal power another 1-2dB <S> (resolve the step you wanna use)5. <S> then undertake step 3 until you have stepped up to 20dB above starting point. <S> Determination of SNR threshold:1. <S> You can either do this subjectively by looking at the signal waveform where noise rejection is at best. <S> or2. <S> calculate the least distorted sinewave from your samples <S> or3. <S> use your intended detection device to subjectively 4. <S> Or use complex methods by comparing input signal against output signal and calculate standard deviation. <S> Good SNR is 3 sigma excellent SNR is around 6 sigma. <S> It even has a noise gen, function gen and fft. <S> I used one a long time ago (9 years ago) to calibrate a moving coil pre amplifier and it worked well but forgot the software package name (it was freeware) <S> try these <S> maybe they are workable: <S> http://www.satsignal.eu/software/audio.html http://www.esseraudio.com/
If I am not mistaken there are software tools used to calibrate audio amplifiers that uses your PC/laptop audio functions to measure SNR.
How to turn on ATmega every 6 hours? The board which is made with Atmega operates on battery, it should turn on every 6 hours and log some data, then go back to deep sleep to save battery consumption. Atmega32 is used and not Atiny because of complexity of tasks and sensors connected to the circuit. What I have found so far, is that I can keep track of time using an RTC IC. I've read datasheets of some RTC IC's but they don't provide any such capability as generating a signal for Atmega's external interrupt at specific intervals, so it can wake up from deep sleep. (Something similar to cron-task in *nix systems is needed, if you are familiar with it.) And of course search terms like "Atmega scheduled task" and alike did not bring up anything. How can I efficiently (in terms of power consumption) wake Atmega up from deep sleep periodically? <Q> You can use the Watchdog timer to issue an interrupt instead of reseting the chip. <S> The chip will wake up even from the deepest sleep mode on the watchdog interrupt. <S> You will want to set the biggest prescaler for the Watchdog timer (8 seconds) and count interrupts. <S> If the counter has not yet reached the predefined amount, immediately go back to sleep, otherwise, execute logging code. <A> I am working on a very similar project, that operates once every hour for about 15 seconds, and sleeps for the rest of the time. <S> In an effort to conserve battery power (the device is deployed in the field for an average of 6 months at a time), using WDT interrupts was impractical because constantly counting interrupts was a huge battery draw. <S> My system uses a Microchip MCP7940M RTC , which has a multifunction pin, that allows you to directly connect to the hardware interrupt. <S> The chip communicates with the processor using I2C. <S> The only issue is that the Alarm output, which would trigger the interrupt, can only be set for minutely, hourly, daily, weekly, monthly or yearly. <S> To get to every six hours you would still have to count interrupts, but the power draw would be significantly less because you can put the device to sleep in between interrupts. <A> Some RTCs have this function and some don't. <S> The popular DS1307 doesn't while the slightly more expensive DS3234 does.
The DS3234 has "two programmable time-of-day alarms" that can be wired to the Arduino interrupt pins to wake up your uController.
How to find the dynamic range of ADC? I bought a Analog to Digital Converter but did not gave much attention to Dynamic range. The resolution is 12 Bit. Minimum input voltage is 0V and maximum is 5V. The problem is I don't have the datasheet and want to know how can I find the Dynamic range of this ADC? Additional info: It says it has 10Megasample per sec of sample-rate. <Q> The maximum voltage is 5 volts. <S> Since it is a 12 bit converter, it has a resolution of 2 12 - 1 or 4095. <S> Thus the minimum voltage, for which the ADC would have only the least significant bit set, is 1.22 millivolts. <S> So the dynamic range of your ADC is 5/.00122 = <S> 4095 = <S> 72.2 dB. <S> In general, the dynamic range is only a function of the number of bits, not the maximum input voltage. <S> But I calculated using voltage just to show you the details. <A> The dynamic range is the ratio (usually expressed in dB) between the noise floor of the ADC and the maximum input. <S> As Brian says in his comment, the quantization noise sets a lower limit on the noise floor at the actual sample rate, however the noise of a real ADC will be higher than the quantization noise. <S> Also, if you take your 10Msps ADC and band-limit and decimate the output to a lower sample rate the dynamic range can be increased, by as much as 10dB for a decade of down-sampling. <A> THE dynamic range of your ADC is calculated as DR= 6.021*N <S> + 1.763 dBwhere N= is the number of bits <S> i.e 12 bitDR= 74dB.
The dynamic range is the ratio of the maximum voltage to the minimum voltage that the ADC can convert.
User safety for battery powerd device against misuse of power supply I want to design a safety circuit for a battery powered device which measures human body impedance. It is intended to be powered only by an external battery pack (5V) via a USB cable. But I want to make sure that even if device is connected to wrong power supply by mistake (e.g. a faulty USB charger leaking 230V), the user is safe. I am also limited in PCB size. What kind of circuit or IC should I look for this purpose? I couldn't find any regulators that can tolerate such high input voltage. <Q> You need to study isolation. <S> If you put a USB connector on the device, you'll need two means of patient protection, 5kV of isolation, and 250V working voltage to be medically safe. <S> There are isolated DC-DC modules available. <S> All of this is contained in IEC-60601. <S> Study it. <S> People are killed by designers that don't follow the rules. <A> To make this stand up to mains voltage on Vcc seems a bit misguided (as opposed to making sure it's never plugged into mains), but here's how I would approach it-- as @BrianDrummond suggests. <S> If that's not realistic for your case, I recommend completely isolating the stimulus and receiver by using transformers, and diode or zener-clamping <S> both the inputs and outputs to the transformers. <S> The concern is that if you have 230V AC on these diodes, they'll fry up and stop doing their job. <S> I'd try to look for diodes that can hold up to that, but I'm not sure you'll have luck. <S> Thus, to be double safe <S> I'd probably use an isolated DC-DC converter to generate Vcc, paying attention to the likely failure modes of the device you use. <S> Mains would be unlikely to punch through. <S> Hopefully, there'd be no way for the 230V AC to find its way to the isolated side, but the research on that would be up to you. <S> Even if the mains can poke through for a little while, the idea is to have the diodes last long enough for the converter to fail. <S> Frankly, the easier way to do this is to just use an IEC 60601 compliant power supply or just build in a battery holder <S> so there's no other way to plug in the wrong supply. <A> One approach against casual mis-connection is to eliminate the USB cable, and to use some other connector style as the connection from battery pack to equipment. <S> You can use a separate USB connector on the battery pack for recharging purposes, and a 2-pole mechanical "break before make" switch set to "charge" or "use" connecting the battery to either charging circuit or output. <S> Then isolation can be guaranteed up to the voltage rating of the switch. <S> There are other approaches, but this has the benefits of simplicity and obviousness in its operation, which will help if you must make a safety case for it. <A> Also put an electrical interlock in there so even if a determined user defeats the mechanical interlock it can't be used while it is charging. <S> And read the standards, make sure you're 100% compliant with safety standards and current best practices, and maybe then talk to a lawyer about product liability. <S> I would definitely treat the USB cable as a mains connection if it has any kind of connection to a human being that is different from casual contact, and especially if it's a medical-ish device. <A> This is a place where you could very very easily kill a patient. <S> Install a battery holder, use the lowest-voltage battery that can possibly satisfy the circuit, build for the highest input impedance you can tolerate, and DO NOT provide any means of connecting the device directly to USB. <S> If data transfer via USB is a requirement, use optoisolators.
I think I would consider a lithium battery power supply and designing a mechanical interlock of some kind so that the unit cannot possibly be used while attached to the charger (perhaps the connectors for the probes physically cover a micro-USB port).
What is this AC source? Below is a part of a schematic and I would like to understand each part of it. What I think is happening: This is being fed a 48V AC source These leads are a source and a ground? I'm not sure what that is Two alternating currents on the input Not sure what this is.. a diode? An op-amp? Showing which terminal output is positive and which is negative. These are my best "educated" guesses. I know I'm way off, so I was hoping the community could help me understand. This is part of a schematic from steminc to drive a piezo transducer. <Q> Yes. <S> No, they're just wires going to the source. <S> Markings on the symbol for the AC input of a bridge rectifier. <S> A bridge rectifier (four diodes). <S> More markings on the symbol for the DC output of the bridge rectifier. <A> I wouldn't assume the power in is "source" and "ground" <S> - it's more likely to be a floating (groundless) output from a transformer secondary. <A> 1.This is being fed a 48V AC source <S> Right on. <S> 2.These leads are a source and a ground? <S> Not quite. <S> There is no specific source/ground attribution. <S> 3.I'm not sure what that is <S> That is some sort of input spike limiter, such as a transzorb. <S> 4.Two alternating currents on the input <S> Yup <S> 5.Not sure what this is.. a diode? <S> An op-amp? <S> 6.Showing which terminal output is positive and which is negative. <S> simulate this circuit – <S> Schematic created using CircuitLab
It's a MOV (Metal Oxide Varistor) to absorb surges (through-hole types look like ceramic disk capacitors). It's a bridge rectifier - it consists of 4 diodes and always does its best to route the most positive part of the AC power input to the + output and likewise on the negative side. Unless the source they get connected to is shown as grounded, they can be assumed to be floating.
preventing blown fuses in simple circuit I am trying to prevent blowing fuses in a simple circuit: that consists of a battery(12V), fuse, and 2 lights(50W). There are no switches; the lights are connected and disconnected from the live wire each time... (its just a simple circuit for outdoor use, so I kept it simple). However, at least 1-2 month, on connecting, there is a small spark between connectors (random, rain, etc.), and the fuse blows. The fuse is only really on there for recharging; whats the simplest solution for daily use. thanks --editlamps are 40W combined paralleli dont recall the wire/fuse rating(guessing 21G and 10amps). did switch to a slow fuse(no luck), whats the upper range I can safely go up to with the fuse? ok, interesting about the garden lamps, cold-resistance spiking the amperage... Does that mean grounding the wire/ shoddy soldering (had been a long time) are not possible solutions/culprits? When a spark flies, does that spike the amps? thanks again! <Q> Fuses don't protect light bulbs or lamps - they can do this themselves by burning out <S> and then you replace them. <S> So, rate your fuse accordingly to protect the wire. <S> If your wire is rated continuously for 10 amps then use a 10 A fuse and it doesn't need to be a quick blow either - anything a little bit over 10 amps might take several minutes to blow <S> but the wire won't have got that hot in that time. <S> 20 amps would probably take the fuse out in about 1 second. <S> Here's an example of a 30 amp fuse: - <S> And here's another guide that shows the process of selecting the right size cable and providing an adequate fuse (taken from this very good page): - <A> The practical solution is a switch. <S> Like radioshack or autozone for 4 bucks. <S> Other solutions include using dialectic grease to prevent moisture from getting into the connecter, shrouded connectors, resetable fuses, or a single ended connector (with ground wired to a common tie point on the frame). <S> Make sure your fuse isn't undersized. <S> It should be round 10~20% greater than the average load, and the cable should be able to handle it too (12V/50W means ~4.2A, off the top of my head <S> I think that mean 17AWG or greater) <A> With a 12V source, a little rain or some sparks made when connecting/disconnecting the lamps won't cause a fuse to blow. <S> However... <S> The cold resistance of an incandescent lamp is about 10% of its hot resistance, so a 12 volt 50 watt lamp will initially draw about 40 amperes from the battery. <S> If you have two lamps wired in parallel and you connect them both to the battery simultaneously, that'll be about 80 amperes for a little while, so it's likely that the fuse is giving up the ghost on one of those times. <S> The simplest solution for daily use, if you're using the fuse to protect something while the battery is charging, is to disconnect the fuse while you're running the lamps and re-connect it while you're charging the battery.
In the main, a fuse is there to prevent a fire and this means it protects the wiring from over-heating and melting the insulation and thus causing a fire.
How to drop 240V DC to 5V DC? I would like to drop a 240V DC voltage to a 5V DC voltage. The 5V stage needs less than 5mA in current. The solutions I looked at are: Resistor Divider (Not really interesting because of the power to dissipate) Voltage Regulator (240V to 5V is hard to find, if it actually exists) Buck Converter (I don't know well enough those parts to use them in a design) DC-DC Switching (a bit expensive) Ideally, I would like something not too expensive. It could be something to build by myself. Personally, I thought about mixing solutions 1 and 2: dividing the voltage from 240V to 30V with a resistor divider then regulating the 30V to 5V with a voltage regulator What are you guys thinking about it? Do you have others solutions? Do you know parts that could help me? Is the solution really different if the 5V stage draws 50mA instead of 5mA? DC voltage as high as 240V is dangerous, I use it carefully. <Q> I would actually use a AC/DC wall-wart that I know uses a SMPS inside (most devices nowadays do). <S> It will try to rectify the input voltage (which is already rectified) and after that it's the normal DC-DC conversion it usually does. <S> A surprising amount of electrical products for AC mains actually work on DC, as this guy demonstrates. <A> A modified version of 1 and 2: use a Zener diode in place of one of the resistors to limit the voltage for the regulator and reduce the power consumption under load. <S> The 50 mA solutions would be the same, except you'd be wasting (and dissipating) <S> about 12 Watts. <S> Another solution would be to find or build a switch-mode power supply, of course. <A> You coule use an 0A2 and an 0G3 glow tube in series wih an appropriate current limiting resistor. <S> They're readily available from various suppliers online, and with regulated voltages of 150 and 85 volts respectively, would give you an approximately 5 volt output immediately. <S> Edit: You may need to ad striking resistors to get them to tuen on: http://ultra-fi.blogspot.com/2011/09/get-string-of-vr-tubes-to-go-pop.html <A> You can make this very simple with a simple series transistor and a zener diode. <S> The major drawback is that it wastes energy. <S> Dropping 235 volts at 5 mA is around 1 Watts. <S> What you can do to reduce this waste is drop to a voltage until you can get cheap buck converters. <S> Works great if you can do something with the heat. <S> Also described here. <A> You should able to find a "wall wart" for under 10 USD that will do this. <S> Consider that 9/10 of the world uses 230VAC and also wants to charge USB devices that take 5V DC. <S> A basic wall transformer that converts 240V AC to 5V DC is more common than ( you fill in the blank ). <A> They are designed for AC but the vast majority of these just rectify the incoming voltage and have universal input voltage to cover mains from anywhere in the world so they will cope with 240VDC. <S> Actually anywhere between 127V to 360V DC ( <S> 90V to 254V AC). <S> The actual converter is usually a flyback type switch-mode power supply. <S> This also provides isolation if required though may be less important as your input is DC. <S> Note 240V DC can still kill you so isolation is not a bad thing.
I'd use a cheep USB wall-wort. A better solution would be to use a resistor and a low-power Zener diode co create a 5.7 V reference and an emitter follower with a high-voltage BJT, which are not hard to find.
How to correctly connect audio plug to LM386? I'm working on my first circuit which includes LM386 chip and some music. Since I don't have a lot of experience with electronics I need a little help with audio plug. It's the same as that : I know that number 1 on the audio plug is GND. The biggest problem I have is that I don't know how to correctly connect other four pins to my input on LM386. As I read, this audio jack is stereo, but LM386 is mono. I followed this tutorial and I would like to somehow connect this audio jack to 10K potentiometer. Here's schematics of my current circuit: What should I do now - how to connect this audio jack to my LM386's input? <Q> Two resistors (around 10KΩ) connected to the left and right inputs (pins 2 and 5), then joined together, will make a simple mixer. <S> Then you link that to the LM386's IN + through a capacitor (around 10µF is usually OK). <S> Pin 1 links direct to the IN - <S> You ignore pins 3 and 4 - they are used to pass the audio through to another destination (internal speakers) when there is no plug in the socket. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Usually the tip is the right channel, the ring is the left channel, and the sleeve is ground. <S> Therefore on your diagram, 1 is the (-) input, 2 is <S> the (+) if you want to use the left channel, 5 is <S> the (+) if you want to use the right channel. <S> Pins 3 and 4 are connected to 2 and 5 when there is nothing connected and disconnected when something is plugged in, which can be used for example to detect whether something has been plugged in or not. <S> Of course you have to decide which channel of the original source to use, since as you said, the LM386 is mono. <A> This will minimize "pops" on plug-in, and will keep the amp quiet when nothing's plugged into it:
If you want both the left and right channels to provide audio you need to make a little mixer.
High speed memory interface between 2 FPGAs (Virtex 6) I have a board with 2 Virtex 6 FPGAs, which are connected to each other through 64 parallel IO lines that can operate up to 400 MHz. One FPGA, let's call it B, also has 2 GB of DDR3 memory connected to it. I also need high speed access to this memory on FPGA A (which doesn't have any DDR3 connected to it). Eventually, the plan is to cache stuff in BRAM on FPGA B and transfer it over to FPGA A. So, I'm trying to design a high speed interface between the two FPGAs to do just this, but I don't know where to start. I am thinking of FIFOs to buffer the address and data request. Do you know of any interfaces/protocols that would fit my application? If you can direct me to any papers, that would be great as well. <Q> Implement a DDR controller on FPGA B. Attach the DDR controller to a shared memory interface controller. <S> Attach shared memory interface bus A to FPGA B internals. <S> Attach shared memory interface bus B to FPGA <S> B <S> I/ <S> O pins. <S> You may need to make some compromises, of course - 32 bits for data, 31 bits for address, 1 control line probably isn't going to work; you really need more like 70 I/O. <S> If you can live with 16-bit data then happy days. <A> It will handle all the lane matching and channel bonding and save you from the pain of trying to route (another) high-speed parallel bus between the FPGAs. <A> Physical layer Are the 64 GPIOs <S> all you have or do you have any other connections between the FPGAs? <S> As indicated by Martin Thompson, for bandwidth you'd be better off using high speed serial connections if available. <S> Assuming your original post contains all the relevant data and you only have 64 GPIOs then you'll need to think about how you're going to achieve the stated 400MHz target frequency. <S> Even though that might be the datasheet value there are many things that can prevent you achieving <S> this frequency - see this related answer: Max switching frequency of GPIO pins of modern cheap FPGA <S> You also have to decide whether you want to potentially lose cycles by turning the bus around (i.e. having a bi-directional data bus) or waste pins/bandwidth by separating out the bus in each direction. <S> Clearly it's going to be simpler to implement if pins are either dedicated inputs or outputs so if you can satisfy your bandwidth requirements in this way it will be much quicker to implement. <S> Protocol Layer <S> One option would be to emulate an SRAM or QDR device, however you'd need to add something to compensate for the variable latency. <S> I expect the best option would be a simplistic memory mapped interface - <S> either AXI-4 lite, Avalon or Wishbone, take your pick. <S> You can then use standard components for buffering requests and responses. <A> If you cannot connect the FPGA A to its own bank of memory, then I would venture to say that the 400 MHz GPIO lines between the two are your best bet. <S> Using them in basic SPI configuration or something. <S> If the board is routed properly, you could attempt to do some sort of PCIe communication between the two <S> but that is very circumstantial. <S> You could venture into trying to do high-speed USB between the two <S> but that would require implementing an OTG stack on both of them. <A> You can also try using the linkport communication between the two (You might have to manually right the code for this). <S> I implemented a 4 bit linkport comm and ran it at the rates of 1Gbps.
As it's Xilinx, you could look at using Aurora to interface between the FPGAs - you'd have to implement your own memory access protocol over the top of it, but it allows you to easily get very high bandwidth between chips using the inbuilt SerDes (GTP) pins.
Question about resistors and LEDs How can I find the right resistor to make 50% brightness in an led? I know how to find the right resistor to get the brightest but I'm wanting to find the perfect middle. <Q> Chances are that for an perceived "half as bright" LED you'll need to increase the resistor by around (5:1), which will yield around 20% of the lumens. <S> Compare the popular North American auto tail light bulb the 1157, which has two filaments- brake and running light. <S> The filaments are about 28W and about 8W, but the lumens are about 10:1 (402 vs. 38 lumens). <S> Yet the brake lights are not perceived as ten times brighter- <S> maybe 3 times. <S> This is because your eye has approximately a logarithmic response over some range, so in fact a difference of 20% or 25% in lumens is barely perceived. <A> You will never be able to get 50%... <S> the properties of resistors and other semiconductors might change with temperature and every resistor has a tolerance of how much not exact is it's resistance. <S> Good LEDs have in their datasheet a drop like graph that shows the spread of light, so the brightness also depends on the angle that you look at it. <S> In any case, the datasheet should show you the relationship between lumens and current <S> and you can get some estimative about it: <S> Get the maximum current the LED can handle and with it you get the maximum lumen, than you can calculate easily the resistor, assuming half this maximum current, using V = <S> R*I. <S> Remember the relationship will not be that much linear, and only a good LED <S> will give you all the parameters to calculate half the brightness, but in practice, assuming half the brightness for half the maximum current is usually a good approximation. <S> Also get in mind that the human eye doesn't respond to all colors in the same way, some colors will appear brighter than others for the same lumens, that's why there are several color correction curves and calibrations for light related equipments. <A> <A> Most LED's will have a datasheet showing you two important graphs: the forward current vs luminous intensity. <S> Plus another graph showing the forward voltage veruss forward current. <S> An example is this datasheet: http://www.farnell.com/datasheets/1626761.pdf at the bottom of page 2. <S> You can see that 100% intensity is at 30mA, and 50% at 15mA. <S> Then looking at the other graph, 15mA responds to 1.8V as opposed to 30mA which is around 1.9V. <S> Knowing the forward voltage voltage and current, you can now easily calculate the resistor required. <S> In this example at 5V supply, 100% intensity is: (5-1.9)/0.030 <S> = 103 ohms, and for 50% intensity: (5-1.8)/0.015 = 213.33ohm. <S> Generally speaking the relativionship between luminous intensity and current is always linear. <S> While the effect of forward voltage on current is little. <S> So a general rule of thumb is you just half the current to half the luminous intensity. <S> Using that rule of the thumb you would have calculated half brightness requiring: 5-1.9/0.015 = 206.66 ohm. <S> Of course brightness is a subjective property. <S> 50% luminus intensity may not appear 'half as bright' to an eye. <A> How about hooking it up to a variable resistor (pot) and playing with it until you get the desired brightness? <S> Then you could measure the pot's resistance and get/build a 1% or 5% resistor (even 10% might do) to replicate that resistance. <S> If it's going to be a fixed resistance, play with it under various ambient lighting conditions to make sure a given brightness is adequate under all conditions.
If you want 50% brightness, you will probably find it easier to use PWM, with a 50% duty cycle.
With a transformer center tap, why are the two resulting circuits out of phase by 180*? I'm trying to understand how the power in my home works, and the part I'm having trouble with specifically is why in the step-down service transformer, the resulting out-of-phase 120V "hot" lines are out of phase by exactly 180*. I understand in a step-down transformer a center tap halfway in the middle would result in half the voltage because there are fewer coils, but why would each of these circuits be out of phase by 180*? What about if there is more than one "center tap?" Perhaps 3 instead of one? Would the resulting circuits be out of phase by 90*? <Q> If you had two 9 volt batteries wired in series to produce 18 volts you could connect the lower battery negative to ground and you would have ground aka 0V and +18 volts. <S> If, instead, you connected the centre tap of the two batteries to ground you'd have -9 volts, 0V and +9 <S> volts - the +9 volts is, in effect, <S> 180 degrees different to the -9 volts. <S> So, a centre tap on a transformer does the same - if you reference all voltages to the centre tap (let's call it 0V) <S> then one end of the winding would reach maximum positive when the other end of the winding was reaching maximum negative. <A> 180 degrees means 'exactly the opposite'. <S> Seen from the center, the direction of the windings of the two coil parts is opposite, <S> hence the same magnetic flux change through both coils results in opposite voltages ate the end of the coils, hence the two hot connections are 180 out of phase (when one is positive the other is negative, etc). <A> The opposite polarities are obtained because the center tap is used as the reference. <S> If you use one end or he other of the secondary winding, then all the voltages relative to that on any other taps, and on the opposite end, have the same polarity. <S> Look, the Earth spins in one direction, yet we have time zones like +800 and -700. <S> Why is that?
Because they are referenced to UTC, and UTC is somewhere in the middle; it is not the most Eastern nor the most Western time zone.
How to blow a 0.6 ampere fuse I am trying to do a simple project in which I am trying to show that when a high voltage battery is connected in a circuit then the fuse will blow and protect other appliances. In detail, I have four 3 V bulbs which I want to connect parallel to each other, a 0.6 ampere fuse, a fuse holder, and three batteries which are of voltage 1.5 V, 6 V, and 9 V, respectively. How can I blow the fuse? <Q> To get useful data points it's helpful to look at what the fuse will likely do from a datasheet : <S> At the standard temperature (usually 25°C) and 1A, a 600mA-rated fuse will typically blow in about 15 seconds. <S> The time will be less if the ambient temperature is higher, and greater if the temperature is cooler than 25°C, but even a +/-10°C ambient change will only change the effective current rating by about -/+5% (see below ). <S> You can measure the current through the light bulbs without the fuse and see if you can get current values that make sense from the perspective of the fuse characteristics. <S> Putting an overvoltage on an incandescent lamp reduces its life by something like the 13th power of the voltage.. <S> so you may burn out the lamps (keep in mind that the fuse element is thicker and will respond more quickly than the fuse) but you may be able to get useful results. <S> Even if the life of a 1000 hour bulb is reduced 10,000:1 it will still operate for a number of minutes. <S> Complicating factors: Currents in the 1A range are more than what a PP3 9V alkaline batterymay be able to supply, and it may significantly reduce the outputvoltage of even a fresh high-quality AA alkaline cell. <S> The lamp filaments will increase in resistance when they get hotter,so with over-voltage they won't give you as much current as you mightexpect. <S> If you want to do a useful experiment, you should monitor the current (for sure) and also the voltage. <A> You can blow the fuse by allowing more than 0.6A to flow through the circuit. <S> The voltage doesn't blow the fuse, but the current. <S> To be able to predict the current for a specific voltage you need to know the resistance of your bulbs, then calculate the total resistance of the bulbs in parallel, then apply Ohm's Law to calculate the current. <S> You're far more likely to blow the bulbs by applying > 3V to them than to blow the fuse. <A> You might want to consider a crowbar circuit. <S> http://en.wikipedia.org/wiki/Crowbar_(circuit) <A> You did not state the current of the bulbs, so we can't predict whether they (alone or collectively) will blow the fuse. <S> Hence the only sure way left to blow the fuse is to connect it directly (no lamps) to one of the batteries (assuming they can deliver enough current, which might no be the case, especially for the 9V battery). <S> Note that a 0.6A fuse means that 0.6A will not blow the fuse, you will need more current. <S> How much more depends ons on tempertaure, duration, the nature of the fuse, etc.
As mentioned, you are more than likely going to damage the bulb before enough current will flow to blow the fuse.
transformer 3 taps in the primary This is a transformer that puts out 13vdc.It has a built in bridge. There are three taps on the primary, which ones connect to a/c? this is going to power a dc motor. Thanks for your help <Q> Assuming that this is a step down transformer with turns ratio (N:1); Try randomly applying low voltage (e.g.; 10mV at appropriate frequency) <S> AC and measure signals at other pins by using an oscilloscope. <S> When you see N times amplified version of your input signal (i.e.; 10NmV), the pins you see the amplified AC are the primary windings. <S> Now, apply a higher test voltage (e.g.; 10V) to the primary windings. <S> The other pins are from secondary winding; observe the voltage levels on them to find out the tapping scheme. <A> It's likely that the primary is tapped for different input voltages, and you would use one tap to connect to a given voltage AC source, like 120VAC <S> like we have here in the States. <S> Maybe another tap for 100VAC in Japan, and the whole winding to connect to a higher voltage AC source like 240VAC in Europe. <S> (For example.) <S> You can use an ohmmeter to get an idea of how the taps are configured, but the datasheet is really the key here. <A> As others have stated, you need the data sheet. <S> If you're really desperate, though, and are willing to risk fireworks, I suggest you take an ohmmeter to those 4 pins. <S> I suspect that you will find that you don't have a single winding with 3 taps. <S> You probably have 2 independent windings with identical resistances. <S> Generally, these allow operation at 110 or 120. <S> For 110, you connect the two windings in parallel. <S> For 220, connect them in series.
If you have a datasheet or part number for the transformer it should specify how to connect the primary.
Where is the C API reference for the MSP430? CCS version I see a lot of sample code and tutorials, but where is it documented that symbols (defines) such as P1OUT and P1DIR are available and what are their semantics? I see a list with one-phrase comments in the header files, but that's the same as browsing through source code. I am looking for a technical document: an API reference or at least a Programmer's Guide. <Q> These are defined in the includes. <S> For CCS, the default is the TI created msp430.h, which then attempts to include the specific file for your target device through if defines. <S> That file (i.e. msp4430g2553.h) is which houses the specific references like P1OUT or P1DIR matching to the specific register address as defined in your Target Device's Datasheet and Family guide. <S> For the most part, the names should match the Family Guide, and are very consistent between devices. <S> From the CCS User Guide: <S> Use .h files to simplify code development. <S> CCS is supplied with files for each device that define the device registers and the bit names. <S> Using these files is recommended and can greatly simplify the task of developing a program. <S> To include the .h file corresponding to the target device, add the line #include for C and .cdecls C,LIST,"msp430xyyy" for assembly code, where xyyy specifies the MSP430 part number. <S> Here is an online copy of the msp430g2553.h from CCS. <S> Very well commented and easy to read. <S> IAR, as well as having the msp430.h versions, also includes io430.h, which is created by IAR and has a few differences or additional features. <S> It also acts the same way of including the specific target device's header. <A> The names of these defines match the names of the registers. <S> For instance, in case of MSP430FR5739 (1) <S> the P1OUT and <S> P1DIR are described section 8.4 of its family user guide (slau272b) . <S> (1) Nothing special about it. <S> Just the closest one to me at the moment of writing. <S> (2) <S> P1OUT and <S> P1DIR are just register names. <S> Nobody calls them API in the [under]world of low level programming. <S> Also, find the place where they are defined in the source code. <S> There may be comments. <S> The datasheet and the family user guide (when there is one) are required reading . <S> You have to read them, or at least skim through them. <S> There is no excuse for not reading them. <A> Yes, an API does exist. <S> They are referred to as driverlib. <S> Download code composer studio, then install MSP430ware, and you can look into details of the driver library.
The registers can be looked up in the datasheet for you model of MSP430 or in the family user guide.
Can PWM be used for PID controlling... I am was wondering if an IC like the PCA9685( Datasheet ) that generates PWM signals can be used in a PID controller for controlling a heated bed on a 3D printer. My understanding of PWM is that it will be to fast for a normal relay but that it might work with a Solid State relay. Even if it can bring down the number of times I have to check the Temperature it would be useful. <Q> Your understanding is wrong. <S> PWM (called time proportioning in the industry) is actually commonly used with mechanical relays. <S> Naturally the period would be closer to a minute than the few seconds that is possible with a SSR or less than the milliseconds equivalent speed of a phase control. <S> How often you have to sample the temperature error is (almost) unrelated. <S> What matters with sample rate and output timing is the characteristics of the system you're trying to control and how far from optimal control you're willing to live with. <S> If the system does not change "too much" in temperature in 30 seconds you can use a 30 second PWM period. <S> Your sample time and PWM output period (roughly speaking) act as dead times in the feedback control. <S> Dead time can be nasty for good control but not a problem if it is much less than the slowest lag in the system. <S> Some systems are happy with time proportioning control (your home thermostat works like that), some require faster period, some require phase control, and some require more like a servo DC output (even for temperature control). <S> Horses for courses. <S> Even if the system responds relative quickly, it's possible to sample more slowly by detuning the system (making the controller the slowest lag in the system) but of course the output cycling itself must not cause excessive errors in the controlled variable. <A> The "numerical system" that your PID controller uses can be analogue or digital (or if you want a bit of both like PWM). <S> Whatever method is used is up to you <S> but it certainly won't allow you to take fewer samples. <S> PWM can be slow enough for a relay or at the other end of the scale too fast for a solid state relay - it is how you decide it to be - PWM speed is defined by you to suit the application and the driving method. <A> The function of PWM in the circuit is to convert the control signal from the PID (for example) into a switching signal. <S> PWM is constant frequency variable duty-cycle. <S> You have several choices other than PWM for converting the control signal to a switching signal e.g Constant On-Time (Variable switching frequency, fixed on-time), Constant Off-time etc.. <S> You also have several control strategies other than PID, e.g. i <S> ) threshold : <S> error pos/neg triggers a COT pulse <S> ; ii) <S> Hysteretic : <S> Switches ON below lower setpoint threshold and turns OFF above upper threshold etc.. <S> etc.. <S> The type of IC you selected seems like overkill for the application. <S> Switching converters are more suitable for your application I'd say, and can be bought in IC form, designed with op-amps/comparators (see below) or a Micro-controller with PWM capabilities + associated MOSFETs and MOSFET drivers.
PWM can and is used for PWM controlling, especially in Switched Mode Power Converters where the switches are usually MOSFETs which makes conductive losses in the switches very low.
Why delays cannot be synthesized in Verilog? I have always read that delays declared in RTL code can never be synthesized. They are meant only for simulation purpose and modern synthesis tools will just ignore delays declarations in the code. For example: x = #10 y; will be considered as x = y; by the synthesis tool. What are the reasons delay declarations in any hardware description language (for example, VHDL, Verilog or Sytem-Verilog) cannot be synthesized? <Q> Synthesizing means somehow converting what you have described (in Verilog here) into real hardware . <S> Now in your Verilog you say that you have a 50ns delay. <S> Ok, but now, in term of hardware, how would you convert this into actual hardware? <S> If you are using an FPGA, how would you actually build your 50ns delay using the available FPGA resources (LUT, Registers, Ram element, ...)? <S> By adding additional routing delays? <S> imagine that you specify 1s delay! <S> Impossible without using ALL the routing capability of your chip (maybe not enough). <S> Your design can't be fitted. <S> Same for an ASIC. <S> You would use 80% of the silicon surface to add a delay to ONE line. <S> The way is it supposed to work <S> is that you use synchronous design and you implement the delay by yourself using counters or other techniques. <S> But delays have to be multiples of the clock of that element. <S> Usually you find things such as "after 10 ns <S> " theses are propagation delays. <S> When doing an ideal simulation on a Verilog simulator, outputs happen exactly when the inputs change. <S> This is not realistic and does not describe the way real hardware work. <S> To account for that you can specify after how much time your output will be changed: using the delay declaration. <A> Porting my answer from SO . <S> Which focuses on why it is impractical to synthesise absolute delays When synthesising clock trees the synthesis tool balances these by adding delays so that all nodes receive the clock at the same time, so it would seem that the synthesis tool does have the ability to add delays. <S> However when ASICs are manufactured there is a variance in speed, at a high level this can be viewed as Slow, Typical and Fast. <S> In practice there are hundreds of variations of these corners where certain types of device in the silicon run fast and others slow. <S> These corners of the silicon also have a temperature rating, worst case may be +140C Fast silicon and -40C Slow silicon. <S> The variation of the delay through a buffer in this case could be from 1ns to say 30ns. <S> To bring this back to Verilog if #10 was synthesisable <S> you would actually get 155 <S> +-145 <S> ie 10ns to 300ns, <S> if you have also designed something with #20 to be part of the same interface or control structure it is going to have a range of 20ns to 600ns. <S> Therefore the whole thing is not really valid against your design. <S> You do not get the exact #10 and #20 that were specified. <S> The clock trees are designed in a way to cap the max and min delays and so that all nodes on the clock tree will scale relative to each other. <S> They are never given such a strict rule that it must be #10ns as this is physically impossible to guarantee in a combinatorial circuit. <A> The only absolute unit of time would be from an external clock. <S> Where would the arbitrary delay come from - what sort of discrete digital logic equivalent would produce it from the clock?
If you want a synthesisable delay then you will need to use the external clock input and an appropriate state machine/counter that will count for specific number of clock cycles.
Why doesn't linear resistance scale proportionally with the square of length? I have an in depth question about basic proportionality of resistance. Why doesn't it scale with the square of length? I ask this because what is causing the potential difference on two leads is charged electric fields at each lead, which decrease with the square of distance. <Q> You are confusing several basic concepts. <S> The E field of two point charges in a 3 dimensional space follows a \$ \frac{1}{r^2}\$ relationship. <S> If instead to two point charges, you use two infinitely long wires running parallel to each other the field is proportional to \$\frac{1}{r}\$. <S> So the dimensionality really matters. <S> In a resistor there is one path, if you double the length of the path it will take twice as long. <S> The electric field is confined to the interior of the resistor. <A> Your initial premise is incorrect. <S> This is what the electric field lines between two oppositely charged points in free space looks like: <S> In the case of a resistive material that is much higher in conductivity than the surrounding air or whatever, the equipotential surfaces will be equally-spaced planes passing through the block of material perpendicular to the direction of current flow, so the field is uniform volts-per-m from one end to the other. <A> The electric field in a wire is substantially confined to the wire, and so the 'surface area' of the field does not increase as the square of distance.
I am not a physicist, but an intuitive explanation might be: The electric field in free space (or in homogeneous media) decreases with the square of distance, as it spreads out over concentric spherical areas.
Driving 60 signals one at a time, in constant sequence I have an application where I need to turn on/off one of 60 signals one after another in a constant order, ever repeating. (1, 2, 3, ... 59, 60, 1, 2, ...) Only one signal is on at any given time. The load sinks up to 500 mA each. I'm looking for ideas on how to achieve this in the simplest (not necessarily cheapest) way. Obviously, a large microcontroller or FPGA could do it, but that would be way overkill as the logic for the circuit is very simple. <Q> Probably the simplest method is a bank of shift registers with ULN2803s attached to them. <S> Clock a 1 into the first bit, then clock all 0s into the rest and (if you use a non-latching shift register or a latching one with the latch permanatly in the open state), watch that 1 walk its way up through all your outputs in turn. <A> The problem with the HC595 answer is that it takes no account of the power-on behavior of the shift registers, and there is no guarantee that only one output will be active until either you issue 60 shift commands or you provide another MCU pin to drive all the MR lines. <S> Another approach, which will take 1 more IC and 3 more MCU lines is to create a 6 to 64 demultiplexer, using something like 74HC138s. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> This setup will provide up to 64 output lines, with the selected line low and the others high. <S> If you need active high, use 74HC238s for the right-hand units, but not for the left-hand one. <S> As shown, I've only shown 24 output lines, but you should be able to fill in the intermediate stages. <S> This takes a couple more control lines from the MCU and an extra 16-pin DIP, but it has a couple of advantages: 1) <S> You can address the desired line directly if you ever need to produce an output sequence that is not strictly 0,1,2, etc 2) <S> There is no need to perform an initialization pulse or set of 60 shifts 3) <S> There is no chance for noise on the shift clock line to produce an inadvertent output. <A> The 74HC595 is a serial-in parallel-out shift register, that being you shift in the data, enable a latch, and then the values are set on the output pins all at once. <S> This could be done with a very simple microcontroller. <S> With each shift register, you get 8 parallel-out pins. <S> The control scheme is described by this picture. <S> You connect the clock and latch lines to each shift register and then the data line is pushed through the Q7' pin: <S> To get your 500ma drive capacity though, you may need to combine this with a current source such as a M54564P or ULN2803 , or any other darlington transistor array that is capable of supplying 500mA
You could do this easily with the 74HC595 daisychained to eachother.
Darn you V=IR, you are wrong (does V really equal IR?) Here is my simple reasoning. We apply a potential difference across a resistor. All the electrons begin responding. Since it takes time for electrons to respond, our current is not yet fully established. In fact, immediately after we apply the voltage, the current is zero! And yet we have a non-zero V and R. So am I wrong here, or does V sometimes not equal IR? EDIT:I'm having a bit of an issue here. People want to say that an inductance of zero will allow for instantaneous current initiation, but I wonder. Is it ever possible to accelerate an object with mass infinitely quickly with nothing but an electric field? Sounds impossible more than likely. I feel that an instantaneous acceleration can only be caused by an infinite amount of energy given. <Q> The only reason the current would be zero is if you have a non-zero inductance (which all circuits do). <S> Once you factor in the inductance, you'll be able to calculate the rise time of the current after you apply a voltage. <S> Only in the ideal world where there's no inductance or capacitance, will V=IR be true at all times over a resistor. <A> V=IR is only valid at steady state. <S> You are trying to apply it outside of that condition, so it doesn't always work. <S> Transient Responses are not modeled at all in a 1st order system. <A> You are assuming that voltage can be applied instantaneously (zero capacitance) but that current cannot rise instantaneously (non-zero inductance). <S> You are also assuming a theoretically perfect resistor that always applies precisely the same resistance. <S> These seem like an unreasonable set of assumptions. <S> As far as the resistor goes, isn't it true that resistance can be calculated directly from resistivity at a given temperature? <S> Steady-state, theoretical resistance can. <S> But the actual resistance displayed at a particular instant in time cannot. <S> If you don't see why, imagine if we're sending electrons through one at a time. <A> Some of the other answers mention that there are AC effects and things like inductance and capacitance. <S> But there is a bit more than that. <S> The thing is, you can't apply the voltage instantly anyway across all parts of the circuit, because you are limited by the speed of light. <S> Assuming a perfect circuit, the moment the voltage is applied you have an electromagnetic wave propagating down the wire at near the speed of light. <S> The actual movement of the electrons is much slower and doesn't come into play here, <S> the energy (and voltage) is propogated in the EM wave. <S> So V=IR isn't being violated at all, because your current is propagating near light speed with the voltage. <A> @AndresSalasIts all in the definition. <S> An ohm is equivalent to a volt per ampere. <S> http://en.wikipedia.org/wiki/Resistor <S> All this applies to DC (direct current) circuits, <S> using AC or changing voltage/current will have additional effects like impedance and capacitance. <S> If you are doing this quickly (your instantaneous voltage) <S> then you no longer have pure DC characteristics and have to factor in impedance and capacitance to the equation for how it will behave. <S> Electrical Impedance seems more appropriate to what you are trying to do. <S> http://en.wikipedia.org/wiki/Electrical_impedance See if that doesn't help answer your thoughts.
In our non-ideal world, you're right that V=IR only applies at steady state after the influence from capacitance and inductance fall away.
Why are resistor values constant in the face of changing voltage and current? Small question, I see that resistors are labeled in certain increments (e.g 5, 10 50 Ohms), although a resistor outside of a circuit is completely without voltage and therefore current. Does this just mean the resistor has a certain value when placed in an average circuit? Also, I thought that, according to Ohm's Law, resistance was a variable along with current and voltage. Is this not true? I mean, if I speed up electrons through an ioninc matrix, through an increased voltage and current, shouldn't the matrix push back harder as well making more resistance? I'm thinking of an ice cube falling through molasses. If the ice cube speeds up (due to increased push i.e voltage) shouldn't the molasses push back more as well? And yet it seems that resistors have a constant value, what the heck. <Q> Common resistive materials (such as metals, carbon, etc.) are reasonably linear to a first order approximation. <S> There is no physical mechanism that strongly causes them to "push back more" when a greater voltage is applied. <S> If you look more carefully, you will usually find that as you increase the current through a real resistor it heats itself up, and this does cause the resistance to change. <S> However we try to choose materials for our resistors where this effect is small. <S> TCR (temperature coefficient of resistance) <S> values on the order of 100 or 200 ppm/C are easily available. <S> A diode (in a dc circuit) is an example of what we call a nonlinear resistor. <S> A resistor whose resistance depends on the current through it. <S> However, these tend to resist less, the more current they are passing. <A> A resistor retains it's value outside of what you might call a regular circuit. <S> It can sit on a shelf with no perceivable external influences and still be characteristically a resistor of the same value. <S> It can even theoretically be proven that this is the case by a little thought experiment <S> but you'd have to understand the physics to a much deeper level. <S> For instance, if you had a sensitive voltage measuring device, you would be able to measure the noise voltage that the resistor creates and, if you had an accurate measurement of temperature you could precisely say what the resistance was. <S> Other than that ohms law defines three variables but, for a perfect resistor, voltage is perfectly proportional to current. <A> Ohm's law is an equation on three variables: (\$R=\frac{V}{I}\$). <S> This means that for given values of two of the variables, you can solve for the third. <S> Or if you set one variable and vary a second, you can see the change in the third. <S> For example: <S> Constant resistance, varying the voltage, see the current vary. <S> This is the case where you have a variable voltage source into a fixed resistor. <S> The current through the resistor will vary proportionally to the voltage. <S> Constant resistance, varying the current, see the voltage vary. <S> This is the case where you have a variable current source into a fixed resistor. <S> The voltage across the resistor will vary proportionally to the current. <S> Constant voltage, varying the resistance, see see the current vary. <S> This is the case where you have a constant voltage source connected to a potentiometer (between the wiper and one end). <S> As you vary the resistance, the current will change as the inverse. <S> Does this help? <A> How can a resistor not be constant? <S> If you have a power source that is both a constant current \$I\$ and a constant voltage \$V\$, then surely that current must flow between the two terminals of the power source, and the voltage across that power source must always equal \$V\$. <S> So, say we have a 1A constant current and a 1V constant voltage, but <S> nothing connected to it, then that 1A must be flowing through what - open space? <S> For that to be the case the resistance of open space must equal 1Ω (\$R=\frac{V}{I}\$). <S> If that were the case, then every battery in the world would pretty much be instantly flat as it is discharged by a 1Ω resistor. <S> All the power lines would explode and melt down, and we would never have got out of the stone age. <S> So clearly air cannot be 1Ω, which means that logically a constant current and constant voltage together do not make any sense. <S> The only way you could get 1V at 1A is by using a 1Ω resistor to complete the circuit. <S> Any other value resistor just wouldn't work and something would have to give, usually with the release of the Magic Smoke™. <S> although a resistor outside of a circuit is completely without voltage and therefore current <S> So, a battery with nothing attached has no resistance and no current, so the potential difference between its terminals is 0V? <S> But the potential difference is not 0V, it's the voltage of the battery. <A> If a resistor obeys Ohm's law the resistance is constant (i.e. independent of voltage and current) by definition. <S> Ohm's law is an idealisation that is a more or less good approximation of reality depending on the particular case. <S> The most important reason why a device doesn't obey Ohm's law is because its resitance depends on temperature, which in turn is affected by the current flowing through the device. <S> E.g. <S> Ohm's law <S> it is a good approximation if the resistor is a wire of Constantan <S> .It is a bad approximation if the resistor is a light bulb (has low resistance at low temperature/current, has high resistance at high temperature/current; That's why it can be used as a simple current stabilizing element). <S> A physical model that explains linearity between current density and electrical field (i.e. constant resistivity) is the Drude model . <A> Ohm's law is only valid in steady conditions and the variable parts of the equation are V and I. R is a constant. <S> Resistor values are constant because it's a physical property due to the way they are made.
When the resistance value is constant (doesn't depend on I or V), we call that a linear resistor.
How to put a 74HC165 on an SPI bus? If I want to read a (bunch of) 74HC165 chip(s) over an SPI port on a microcontroller, this is simple enough. Connect them through Q7 to DS on each, apply the final Q7 to MISO, notCE to SS and CP to SCK. This works fine. But now how do I share the SPI bus with other devices that I want to read? The 165's Q7 output is never hi-Z, so I can't share the MISO pin with other devices. I'd need some way to "detach" it - a buffer of some kind. I know there are 74-series chips that have various buffers that can be made hi-Z (such as a 74HS240) but that's a whole additional chip just to be able to share the shift register. Perhaps some cunning way to put a transistor between the final Q7 and the microcontroller's MISO, controlled by the SS line? Edit: Alternatively, can someone suggest some other parallel-in serial-out shift register that does have a tristate serial output line, and therefore suitable to use on an SPI bus? <Q> can someone suggest some other parallel-in serial-out shift register that does have a tristate serial output line, and therefore suitable to use on an SPI bus? <S> Mouser, Newark, and a few other distributors and suppliers have a selection filter that helps when I'm looking for "something like a 74HC165, but with tristate serial output": 74HC589: 8-bit serial or parallel input; serial output; <S> shift register with 3-state output. <S> " <S> The HC589A directly interfaces with the SPI serial data port onCMOS MPUs and MCUs." -- <S> On Semiconductor datasheet ;Fairchild datasheet (So it meets the "must have a second source" criteria that some projects have, as mentioned by Jason S). <A> As you noted, the 165 is not a 'full' SPI device because it doesn't tri-state its output. <S> If you have a single 165 on your SPI bus and speed is not a big issue you could place a resistor (10k?) <S> between the 165 output and the uC MISO pin. <S> Other SPI chips (that do tri-state their output) will override the weak drive through the resistor, but without other chips active the weak drive will prevail, but you might need to slow the clock down (for the 165 only). <S> This costs extra select lines for the mux chip, but you can share the 165's notCE lines (which otherwise would have been separate), and use one of the inputs for the 'real' SPI chips. <A> The 74xx125 and '126 are quad buffers with tri-state outputs, individually controlled - you could use one package to buffer four 165s... <A> You described how you can cascade a bunch of 74HC165 chips into a long chain. <S> A bunch of the 74HC595 chips also can be cascaded together into a similar daisy-chain. <S> One way to "share the SPI bus with other devices" is to chain all your chips into one long SPI daisy chain <S> .It's been a while since I did it, but I seem to remember that I could put 74HC165 chips, 74HC595 chips, and similar chips into one long loop. <S> No matter how many chips were in the daisy chain loop, or what order they were in, I only required 4 pins on the microcontroller. <S> The microprocessor MOSI pin drives the MOSI pin of the first chip in the chain, each chip is cascaded so its serial output drives the serial input of the next chip in the chain, and the MISO pin of the last chip in the chain drives the MISO pin of the microprocessor. <S> The microprocessor clocks in / clocks out a full loop's worth of data every time it want to change any output or read any input. <S> That's how JTAG works, right? <S> Such a long daisy-chain loop is slower, but requires fewer pins on the microcontroller than the "Independent slave SPI configuration". <S> Unfortunately, some chips that claim to support SPI cannot be daisy-chained. <S> The whole reason you are even considering SPI is because you are running out of pins on the microcontroller and you are connected to something that doesn't need high speeds, right?
If you have multiple 165's you could use a multiplexer chip (151).
pic16f628a successfully programmed but not working I want to blink led with pic16f628a using pickit2I generated the hex file and successfully write it,according to code, RB are input, but when I put led between RB0,1,2,3.. and ground it turn on. all the pin turn on the led, I'm using 5 volt output code : #include<htc.h>// Config word__CONFIG(FOSC_HS & WDTE_OFF & PWRTE_ON & CP_OFF);// Define LED pin#define LED RA1#define _XTAL_FREQ 8000000void main(){ TRISA1 = 0; // Make RA1 pin output TRISB = 1; LED = 0; // Make RA1 low while(1) { __delay_ms(500); // Half sec delay LED = 0; // LED off __delay_ms(500); // Half sec delay LED = 1; // LED on }} scheme : <Q> You're setting A0 to be an output, then you're blinking A1. <S> Which is it? <S> A0 or A1? <S> Make your mind up, and then make them both the same. <S> Another thing I notice on your schematic. <S> You're setting the oscillator to be HS, yet I'm not seeing ant crystal or loading caps on your schematic. <S> Did you just omit them from that drawing, or do they truly not exist? <S> The same goes for the (missing) obligatory decoupling capacitor on the power pin. <A> Note that "#define _XTAL_FREQ" does not actually define the oscillator speed of the microcontroller. <S> It is simply a constant value the delay functions use to calculate delay times. <S> You must either add a crystal or just use the internal oscillator (much simpler). <S> If you don't know how to do that, just ask. <S> You must put a pull-up resistor to VDD on the MCLR pin. <S> A 10k resistor is typical. <S> If you leave MCLR floating, the chip will either never run or it will randomly reset. <S> You can avoid the pull-up resistor if you clear the MCLRE bit in the configuration settings, but I wouldn't necessarily recommend that right now. <A> If this is one of your first projects with 16f628a always turn off comparator(CMCON =0x07) <S> and/or use PortB first. <S> That way you can learn on what you should pay attention in the future. <S> You dont need to be worried about MCLR just use configuration word that turns it off <S> and you will be fine. <S> I never used any resistor on that pin ever and never had problems. <S> I just noticed in your picture of the pickit2 programmer that it wrote successfully, but I think something is wrong with your hex code <S> — it seems to have data only in the first location. <S> Make sure you check that as well.
As Majenko pointed out, you set up the configuration bits to use a high-speed crystal (FOSC_HS), yet you did not add a crystal to your schematic. Also attach few leds on different pins and change values on whole port like PortB =0x00 and PortB=0xFF that way even if there is some conflict you didnt know about some pin will flash some led.
Given a known power supply, what are safe ranges for the volts/amps/ohms of connected components? I'm new to hardware and am coming from a software background. I have an SoC that will be powered by a supply generating 5V and 1A. I'm trying to figure out what are the safe ranges of volts/amps/ohms that I can use for various components that I'll be connecting to this SoC. For instance, say I want to add a transceiver to the SoC so that it can communicate with some other device: Does the transceiver need to be rated above or below or exactly at 5V? Does the transceiver need to be rated above or below or exactly at 1A? Any resistance/ohm regulations/ranges that I need to consider? I guess I'm trying to learn how to make a decision like the following: My power supply is 5V and 1A. I see that Transceiver A is rated for 3V and 500mA. Perhaps its fine that its only rated for 500mA and that it will be receiving 1A, but perhaps it's not fine that its only rated for 3V but it will be receiving 5V. Hence, I would not want to use this particular transceiver. Even if the logic in the blurb above is wrong (from an electrical standpoint), it underscores what I'm trying to understand here: given a known power supply, how do component ratings (for volts, amps, ohms) affect my decision of whether to use them or not? <Q> If a device is rated to operate from a 5 volt power supply, you need a 5 volt (+/-10% or so) power supply to operate it. <S> The current rating of the supply must be at least as much as the total current rating of all loads. <S> The loads will only draw the current they require, so there is no problem connecting a load wanting 500 mA to a supply capable of delivering 2 amps. <S> LEDs are a special case, and do require a current-limiting resistor. <S> Unlike most devices, the voltage across an operating LED is determined primarily by its chemistry and colour, and varies only slightly with applied voltage. <A> The sum total of all of the current that all of your 5V components consume must not exceed 1A. <S> Let's say SOC uses 0.5 Amps at max. <S> You now have 0.5 amps left over to use on other components. <S> If another component can use 0.7 Amps, then the two together need 1.2 Amps and you'll get a brownout or voltage droop occurring when they need power most. <S> This will cause everything to malfunction. <S> If you have a 3.3 or 3V rated component and you try and run it off of 5V, you'll end up with magic smoke rising from the 3V rated component. <S> You don't want to do that. <S> If you have 5 V and you need to run a 3V rated component <S> you'll either want a 3V linear regulator (less efficient, but not noisy) or a 3V switching regulator (efficient but noisy). <S> Some of the current will be consumed by the regulator if you need to use one. <S> Lastly, the interface between your SOC and your tranceiver needs to be at the same level or at least compatible. <S> If the tranceiver input output pins only take 3.3 volts. <S> Then you'll need to make sure your SOC can output 3.3 Volts. <S> Anything above that will burn it out. <S> Some I/ <S> O pins on some parts can take 3.3 or 5V. Review the datasheets to know for sure. <A> If it is BELOW the voltage <S> you have you can use a voltage regulator to drop the voltage to the right level. <S> The sum of the currents of ALL the components must equal LESS THAN the current of the power supply. <S> Resistors will have their places in specific parts of your circuit, but have little or no bearing on the power supply (except for calculating things like resistors for LEDs where you need to know the incoming voltage). <A> It sounds like the power supply in question is a constant voltage supply. <S> This means it attempts to keep the same voltage by varying the current. <S> In which case, as long as you are feeding your components the voltages they were designed for, you should be fine. <S> In a constant voltage power supply, the amperage rating refers to the maximum current it can supply. <S> Thus, you just need to avoid drawing too much current in aggregate. <S> Usually, you should design to have about 20% headroom for periodic spikes, it is not a good idea to operate at 100% rated draw continuously. <S> You will want to make sure that you do supply the voltage each component is designed for. <S> For this you may have to boost the voltage or drop it using a voltage regulator (aka, a buck-boost converter). <A> Many devices are designed to be used at a particular supply voltage. <S> Common supply voltages for low-voltage components are 1.8, 2.5, 3.3, and 5. <S> All components, however, will have a range of voltages that are acceptable and sometimes that range will include multiple of those "common" voltages. <S> For example, it is common for a component to work with a supply voltage anywhere from 2.0 to 3.6V. <S> You will have to check the "electrical specifications" section of the datasheet for the component in question (also check "absolute maximum ratings" section). <S> For the vast majority of components, this section will tell you several important things related to your question: The supply voltage that it needs. <S> Make sure the range includes 5V. The supply current that it will use under various operating conditions. <S> Make sure that the sum of all the supply currents for the components connected to this supply is less than the 1A that your supply is capable of. <S> The voltage & current that each I/ <S> O pin is capable of sourcing/sinking. <S> Make sure that this is compatible with whatever devices you have connected on each <S> I/O <S> (refer to #1 and #2 here as needed). <S> Note: <S> I am assuming based on your wording that your designing a low-voltage digital and/or analog system with constant-voltage supplies. <A> The above answers are pretty spot on with component voltage tolerance levels. <S> As a word of advice, everytime I get a new power supply I always plug it in and use my multimeter on the plug that goes into your component to see that actual output regulated voltage. <S> This is a good practice because if you buy cheap power supplies the ripple voltage can be very high. <S> I've even seen 8-10 volt output on a 5-volt regulated supply! <S> This can definetely fry microcontroller type components. <S> So be very careful!!
The voltages have to be rated AT the voltage that is powering them. If you have a 5V supply at 1A then you can only run 5V compatible components.
Solder blobs on PCB traces and vias On several PC motherboards, I've noticed some solder blobs on traces and vias. What's the deal with that? Are they some kind of test points? If so, how are they used? <Q> This is a kind of defect called solder attachments (or solder balling), and is mostly a problem when using wave soldering. <S> Because of that, you should be very careful to avoid touching them, as you might break the track. <S> You can see a few more examples of this happening here <A> They are testpoints for bed of nails testing. <S> See wikipedia article: http://en.wikipedia.org/wiki/Bead_probe_technology <A> Motherboards have many, many through-hole solder joints (mostly connectors for I/O and memory). <S> Those joints are made by wave soldering , whereas the majority of the components are surface-mounted and reflow soldered by conventional means. <S> What you are seeing are vias that were incompletely tented in the solder mask application and the wave solder wetted the inside of the via and reached the top from the pressure and capillary action. <S> The plot thickens somewhat because you can find small groupings of SMT parts on the bottom of motherboards, bereft of adhesive and spaced too closely to allow them to immersed in a solder wave without risk of solder shorts. <S> I believe the sequence is probably to populate and reflow solder <S> the SMT parts on the top of the board, populate and wave solder the through-hole parts on the top of the board, with the bottom SMT areas masked, then to peel the masks, populate and reflow solder <S> the bottom SMT parts.
They are basically a failure of the solder mask, and are directly attached to the underlying traces.
Controlling a Stepper-Motor with 2 H-bridges I think that I may have come up with a possible way to control a bipolar stepper motor using 2 simple H-bridges. The idea is to control the direction and the steps of the motor by switching the direction of the current flow using the H-bridges. Unfortunately, I am running into a few annoying issues. I am using a ROB-09238 bipolar, 1.8 degree step value stepper motor. I have an external voltage source of 12volts@5amps. For one, the rated current of the stepper motor is 0.33 amps, does this mean at max that the stepper motor will use is only 0.33 amps, or is this the average amperage? I am using a Raspberry Pi to output 3.3V and control the base of the transistors. The goal is to create an NPN transistor H-bridge using regular 2N2222 transistors. Will these transistors do the job? What is the required resistance value on each of the transistors to do the job efficiently without blowing the transistors? No matter what I do to calculate the resistance value for the base of the transistors, I either make them get really hot, or can't even get enough current through the H-bridge to properly light an LED. I don't think that I am wiring it wrong because in my circuit simulation program, I get the same results. I have messed around with the resistance values within the program and still can't appear to get what I am looking for. simulate this circuit – Schematic created using CircuitLab <Q> Keep in mind that when you use NPN transistors on the "high side" of the H-bridge, you need to drive their bases to +12V, since they're functioning as emitter-followers. <S> The emitters can't go any higher than one diode drop below the base voltage. <S> The better approach is to use PNP transistors on the high side, so that they can be put into saturation for minimal voltage drop and power dissipation. <A> If you want to use BJTs, the following ought to work: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> You will, of course, need to do this 4 times. <S> ETA: I got the labeling wrong on the drive levels. <S> Tip of the hat to Dave Tweed. <S> Q1 and Q3 take your 3-volt signals and use them to drive the bases of Q2 and Q4. <S> The TIP series transistors are cheap and readily available (you can probably find them at Radio Shack). <S> The 330 ohm base resistors will provide ~ 30 mA base drive to the power transistors, which will be enough for them to turn fully on when driving 300 mA to the steppers. <S> If you use much less base current (larger base resistors), the power transistors will start getting hot, and the steppers won't get their rated current. <S> And yet another <S> ETA: <S> the 330 ohm resistors should be at least 1/2 watt, and 1 watt is better. <S> Nominal power is .4 watts when conducting. <S> ETA <S> : If you want to use a transistor as a switch, you want it to be fully on. <S> This is characterized by an emitter-collector voltage of (about) .5 <S> volts or less, and is referred to as saturation. <S> To ensure that a transistor is in saturation, the rule of thumb is to provide base drive at 1/10 the desired collector current. <S> This is not valid in some cases (particularly very high currents), but should work fine in this case. <S> If you want to really do this right, add 1K to 10K resistors from emitter to base on Q2 and Q4. <A> Opto isolators are one way to accomplish a work-around for level shifting from your 3.3 volts to the necessary control voltage for the upper transistors of the H-bridge. <S> However if you go to IGBT's rather than junction transistors you can radically improve the efficiency and get higher operating voltages. <S> For stepper pulse rates both opto-isolators and IGBT devices are fast enough to give well shaped pulses.. <S> IGBTs include back voltage protection from inductive devices like stepper motors. <S> (Stepper motors make neat generators of voltage spikes. <S> Extra voltage ratings are a good insurance.)
You can use NPN transistors driven by the 3.3V outputs of your controller to switch the PNPs on and off.
Measuring the Internal Resistance of a Brushed DC Motor for Use in Speed Control (IR Compensation) Is measuring the internal resistance of a brushed DC motor with a multimeter the correct way of doing it? The resistance seems to vary while the motor is being turned by hand; however, the resistance will somehow settle within some (reasonable) range eventually. Is this the same resistance in IR compensation of speed control? I am controlling the speed of a DC motor without a speed sensor. I measured the resistance of 30 brushed DC motors of the same model from the same manufacturer with a multimeter. However, the reading ranges from 3.x ohms to 6.x ohms and one of them even goes up to 12.x ohms. The inductance reading by an LCR meter reports 10.x mH to 12.x mH. Is this normal or more of a problem with the manufacturer? I previously assume that the characteristics of the same model should somehow fall in the same ball park. Thanks in advance. Brian <Q> Measuring with a multimeter is OK, but what you need to do is stop turning the motor. <S> When you do, the motor acts as a generator and the result (it's called back-EMF) messes up the multimeter ohms circuit. <S> Even better, fix the shaft in place and put a few volts (say, 10% of normal operating voltage) and measure the current. <S> Then compute R = V / I. You would expect fairly consistent R and L values from the same model motor, but, as indicated above, turning the shaft while you take the reading will give you false results. <A> You'll be seeing some small variation due to commutator resistance, and which varies as the brushes travel over the commutator, plus (and more importantly) the shorting of segments of the wining as the brushes cross sectors. <S> The variation should be \$K\cdot \frac{N}{4}\$ to \$K\cdot\frac{N-2}{4} \$ where N is the number of poles. <S> In other words if there are 12 poles, the resistance will vary by about +/-9% as the shaft rotates. <S> See the diagram from this web page here . <S> In theory this (I think the average would be what you want) <S> would be the resistance used in \$I\cdot R\$ compensation, but it might in reality be a bit different because other things are folded into it such as resistance of wiring to the motor. <A> You mention that you are measuring "internal resistance" which is often exclusive of the lead wires and brushes <S> (i.e., it is measured from bar to bar on the armature). <S> There are 2 ways to measure terminal resistance. <S> First, you can lock the rotor of the motor and apply voltage to the terminals. <S> You increase the voltage until the current is at 25% of the rated full load current. <S> Using that voltage and current, determine resistance using Ohm's Law. <S> Repeat this <S> a number of times at different locked rotor positions and then take the average resistance. <S> The second method requires only 2 measurements but it is a little more complicated test setup. <S> This method requires you to back drive your test motor at a slow speed. <S> Typical speeds are 30 to 100 RPM. <S> While the motor is being back-driven, apply a voltage to the terminals (again, until the current reads 25% of rated full load current). <S> Use Ohm's Law to calculate resistance. <S> Repeat this test by either switching the lead wires or switching the direction of rotation of the back-driven motor. <S> Then average the 2 measurements. <S> The locked rotor method is probably easier to setup but the dynamic test will give you better repeatability.
You should be measuring terminal resistance (resistance from one lead wire to the other lead wire) for IR compensation.
Best way of confirming system clock of controller I would like to know the tricks or hints which could be used to find the system clock of 8 bit micro controllers.What are the cool ways in which we could find the system clock and can be verified with documents. I have heard of toggling a pin continuously but i don't know the specifics.It would be helpful if you could share your way of doing things to find system clock. It would be helpful if you could list the common tricks to verify the clock other than reading data sheet.If i could determine that by toggling an i/o pin continuously.What data is obtained from the observed frequency?.It would vary depending up on asm or c compiler i trust. Please do enlighten me Im using pic18f26j50 Regards <Q> You don't specify a family as such, but you have tagged it "PIC". <A> Toggling an i/o pin won't give you what you need if the toggling happens using a loop. <S> A jump operation takes time and, depending on the architecture, it may or may not drop the execution of one or two ASM commands following the jump command. <S> It is better if the code is inlined. <S> Only use ASM since you don't know what the assembler might do. <S> The following is valid for an ATMEL AT8515 <S> but you should be able to translate it to any architecture. <S> .INCLUDE "8515def.inc". <S> ORG 0X0000RJMP <S> RESETRESET: <S> LDI R16, HIGH(RAMEND) ; Stack initOUT SPH, R16LDI R16, LOW(RAMEND)OUT SPH, R16LDI R16,0XFF ;PORTB for outputOUT DDRB, R16OUT PORTB, R16LDI R21, <S> 0X01 <S> ; bit 0 is highLDI R20, 0X00 ; <S> bit 0 is low ; copy paste the following two lines as many times as desiredOUT PORTB, <S> R21 ; set PORTB, bit 0 <S> highOUT PORTB, R20 ; set PORTB, bit 0 lowOUT PORTB, R21OUT PORTB, R20OUT PORTB, R21OUT PORTB, R20 <S> Don't forget to check how many clock cycles it takes for the OUT command to execute and the new value to appear at the output. <S> However, you are better off using a PWM or counter peripheral of the μC and configure it <S> so it counts up to 1 and then resets. <A> You can generate a periodic interrupt and use that for system timing- <S> for example you might generate an interrupt every 1ms. <S> If you count that down by 500 and toggle a pin every 500ms <S> you'll get a 1Hz "heartbeat" indication that a human (or dog, for that matter) can see by looking at an LED. <S> There will typically be a bit of jitter in it due to latency of the ISR etc, but some micros support a pin change on interrupt <S> so you can preset it (at 499 interrupts from the last toggle) to toggle the pin exactly on the next interrupt <S> so there is nanosecond-level jitter even in a 500ms pulse width. <A> Next you would have to know how many clock cycles each one of those instructions take. <S> After converting the instructions to the number of clock cycles, look at the scope and get the half period of the square wave. <S> This will correspond to one loop (the whole period involves two loops). <S> When you divide half period by the number of clock cycles required to perform one loop, you fill find the period of a single cycle. <S> The inverse of it will be your frequency.
The PIC microcontrollers all have the ability, when using either an external clock module or the internal oscillator, to feed the clock signal to a specific pin (OSC2), both for confirming the clock, and for driving external devices. Using the pin toggling method you would look at the compiler output to see exactly which instructions are being used for the while(1) loop which is doing the pin toggling.
What is this electronics component? What is the yellow component shown here? This is off a Outlet USB phone charger. <Q> That is a transformer , used to convert one voltage to another. <A> As others have remarked, the component is a transformer. <S> As a first-order approximation the amount of power that a transformer can transfer per cycle is determined by the magnetic flux that its metal core can contain. <S> Hence the same transformer can transfer much more energy when used at 50 KHz than when used at 50/60 Hz. <S> This could explain why such a small transformer can transfer an amount of energy that would require a much bigger transformer when used at 50/60 Hz. <S> But again, this is my guess based on almost no information ;) <A> It is a step down transformer to reduce the AC outlet voltage to a lower level before rectifying it. <S> This is done so the rectifier can be made with more reasonable parts (smaller diodes etc). <S> Using a 10:1 transformer means you're now dealing with 12Vrms versus 120Vrms! <S> In a high quality phone charger the output will then be fed into some sort of regulator to ensure the output stays constant regardless of AC mains spikes. <A> its a transformer, it converts AC voltages, it either steps it up or down, on a USB charger its a step down. <S> It steps down 110VAC or/to 220VAC to a voltage level the other power conversion components can safely handle.
I see capacitors on both sides of the transfer, so my first guess is that this circuit rectifies the AC input, followed by an SMPS which uses the transformer to crate the lower voltage.
Storing batteries in a refrigerator The electro-chemical reaction is more favorable at higher temperatures. Consequently, when it is warmer, the batteries will perform better. This is also evident from practice: old batteries do not start the car when it's cold. Now, about storing batteries. I heard some people store their batteries in the refrigerator. How, if at all, is it beneficial, as opposed to storing at room temperature? If it is not beneficial, what are the souses of such misconception? <Q> Storing batteries/cells in a refrigerator slows down their rate of self-discharge, which is a good thing. <S> See below some graphs of self-discharge rates as function of temperature for different battery chemistries. <S> For SLA: <S> For alkalines: <S> (source: digikey.com ) <S> And here's some information for Lithium Ion . <A> It's beneficial to store them at lower temperatures. <S> The benefit depends on the chemistry. <S> See here for more info. <S> As long as you don't introduce condensation and you don't have an electrolyte that freezes at whatever temperature you bring them down to, the colder, the better. <A> Storing alkaline batteries in the refrigerator is not recommended. <S> Manufacturers recommend storing batteries in a cool , dry location, and perhaps some people have taken that to mean "the colder, the better" — but that's a myth. <S> Energizer, for example, has this excerpt on <S> their do's and don'ts of battery care : <S> DO practice proper battery storage by keeping batteries in a cool, dry place at normal room temperature. <S> It is not necessary to store batteries in a refrigerator. <S> For more detail, see the Energizer FAQ on non-rechargeable batteries . <S> Is it a good idea to store batteries in a refrigerator or freezer? <S> No, storage in a refrigerator or freezer is not required or recommended for batteries produced today. <S> Cold temperature storage can in fact harm batteries if condensation results in corroded contacts or label or seal damage due to extreme temperature storage. <S> To maximize performance and shelf life, store batteries at normal room temperatures (68°F to 78°F or 20°C to 25°C) with moderated humidity levels (35 to 65% RH). <A> As JYelton said I'd say that storing batteries in a refrigerator may damage them because of condensation, but I'd add that sometimes refrigerating batteries might be a good idea. <S> LiPo batteries for RC models are high power, high capacity light cells capable of delivering some 2kW of power (small ones). <S> Sometimes they go "puffy", i.e. one of the cells inflates, usually because of over discharge. <S> If the cell is only slightly inflated you can try to save the pack by putting it in the freezer . <S> I've tried it a couple of times, with the battery sealed in a plastic bag to avoid humidity, and the bulge does go actually away, but it has always returned.
So storing battery in the fridge is probably a bad idea, while some cold in some occasions might help a bit.
SCR in this circuit exploded - why? Some of our boards have a damaged SCR. I just witnessed one in person today.The SCR actually exploded upon power-on. A part of its packaging material just flew off along with an exploding sound. The resulting dead body of the SCR is shown here: I have a few questions about the circuit: Q1 ( S6020L ) is the SCR in question. It is rated 600V, 20A. AC input is 220V. What I did is: Remove AC/Power off. Discharge C5 Power on. At the very same moment, Q1 exploded in pieces. If the SCR is turned on when the rectified AC signal is right near its peak and the voltage at C5 is close to zero, I would imagine there is a huge inrush current to charge up the big capacitor. The questions I am having are: How do I calculate the magnitude and duration of this inrush current. Does this inrush current exceed the specification of this particular SCR? The rectifying bridge, GBJ2006 , is not damaged in this case. We have produced and sold a few hundred boards. There have been some occurrences of this problem. I am wondering if we should somehow change the design (I am not a hardware guy). The SCR in question is not really from Littelfuse, but it matches S6020L in specification, as I heard from our hardware designer. I have no idea what manufacturer it is from and trying to determine if it is a design issue or a part quality problem. The MCU (not in the schematics attached) sees the SYNC signal and triggers the SCR at appropriate times to ramp up the voltage at C5. This way the inrush current would be reduced considerably.The problem is that before my software takes charge, there may a glitch that triggers MOC3052M upon power-on. This is a one time thing and after that the software takes full control. I am having the doubt about the quality of the SCR part because this inrush current is not repetitive. The moment I witnessed the SCR explosion is without any load and right at the switch-on of the power switch. I know the obvious solution is to get rid of the glitch; however, I just want to know if this part is faulty. HV_Bus (C5) is connected to a 1.25-HP motor, whose other terminal is connected to a MOSFET. MCU will turn on and off the MOSFET with a PWM signal and C5 gets discharged with this load. When the PWM signal is active, MCU triggers the SCR with a 2kHz frequency and keeps C5 charged. AC mains hazards: <Q> The only sure limitation of the current is your common-mode choke and your internal wiring. <S> The S6020L (if your SCR really matches the specifications ) is capable of a one-time pulse of 0.01second and 255A at room temperature. <S> So if your wiring + CM choke is less than around an ohm (and it will not be), there is no guarantee you won't exceed the maximum specifications (and it should be noted that you really should stay reasonably far away from these one-time pulse at room temperature limits- <S> it may be hotter than room temperature and repetitive surges may kill the SCR eventually). <S> Since you have a sync signal, and presumably a processor reading <S> that, I think the best solution might be a firmware change that triggers the SCR only at the zero crossing. <S> The current would then be limited by the dv/dt of the mains line at the zero crossing. <S> At 220V RMS, and \$\omega\$ <S> = 2\$\pi\$50 = <S> about 0.1V/usec, so the current will be limited to 56A, well within specifications. <S> Failing that, perhaps you could change the opto-triac for one that has built-in zero crossing detection (eg. MOC3063 ), but I have not looked carefully to see if that will work with your diode setup- <S> you may need to put a resistor across C1, for example. <A> You probably need a zero-crossing trigger for the SCR <S> Do so near cycle peak with a discharged cap <S> and you expect to get what you are getting. <S> You can get zero crossing isolators in the same series that are a drop in replacement for the MOC3052. <S> eg <S> The MOC3063 seems more than adequate - 600V Vmax (same as MOC3052) and 5 mA maq trigger current against 10 mA. <S> A closer match will be able to be found if desired. <S> If you trigger the SCR at zero crossing the SCR will forward conduct when V_DC_Rectified exceeds V_C5 and have zero initial inrush current. <S> D1 is probably not needed. <S> IF I was actually implementing this I'd pore over the relevant data sheets to ensure that all polarities and voltages were OK at all times <S> BUT it seems OK at a glance. <A> It sounds like you've analyzed the problem well. <S> You've got a device that's pretty clearly failing due to being overheated, and the only obvious path for current to flow through the SCR is from the rectifier into C5. <S> You've got a couple options. <S> One is to use a bigger SCR, like you suggest. <S> Unfortunately, the current through in the SCR in that case is going to be difficult to predict, because you don't know the impedance of your source. <S> As a deeper question, though, I'm not sure what that SCR is doing in this circuit. <S> It looks like it might be intended as a precharge, but there's no actual precharge path. <S> A better option may be to put a resistor around that SCR, and delay firing it for some period after start-up. <S> You just need to delay by maybe three time constants (R of your new resistor times 560 uF), so if you know what the firing delay of your existing circuit is, you can pick R appropriately. <A> Most likely it's the motor that is not isolated, the hot and neutral reversed, etc. <A> The problem is C1, when the system is turned on, C1 gives "+" voltage to the gate for a while, when the anode is tied to V CC and C5 is initially short circuited, the cathode is grounded, so that´s <S> why the SCR explodes, I suggest to eliminate C1.
I believe that the problem is that you are applying a "non-isolated" ground to the bottom lead of the SCR, applying the full voltage across the SCR, causing a huge current to flow through it, causing it to overheat and explode! The MOC3052 is non zero crossing and you can trigger it anywhere in the mains cycle.
Controlling a 1000W radiant heating element with dimmers First I would like to mention that I am a stranger to electrical components and I come from a mechanical engineering background so please keep that in mind when answering my question. I am trying to use 1000W ceramic radiant heaters to heat up an enclosed container and I would need to adjust the heat emitted by the heater frequently. In the future I would like to implement a closed-loop and use a PID but for now, I just need to be able to do the "controlling" part manually. I found that TRIAC dimmers and typical light dimmers (with suitable wattage) could be considered for my application but I am not sure how to implement these dimmers in a circuit. I could use some help to make the circuit! Also, please suggest other types of dimmers if you think the ones I mentioned will not be suitable. <Q> You can certainly use a light dimmer for this application. <S> Caveats- <S> consumer products may not be conservatively rated, so pick something industrial or over-rate it significantly. <S> Consumer light dimmers do not go (smoothly) all the way down to zero- <S> they typically "snap on" to a fraction of full power. <S> If your IR elements are not grossly over-rated that should not be a problem. <S> I recently did this for heating a cryogenic apparatus using a router speed control- we had to open the control and adjust the minimum power level trimpot. <S> The control allowed manual adjustment of the power going to a bunch of industrial heaters. <S> If you want a measure of the power going to the heaters, it would be best to use a "true RMS" voltmeter. <A> It seems obvious, but can be something subtle: For example, halogen low voltage lamps require the use of step-down transformer. <S> Thus, for the method of Phase Control will be considered as an inductive load (if you do not have access to the entire box set). <S> Also, for the temperature control of resistive heater element based on thyristors, consider the method of Integral Cycle Control instead of Phase Control (no lamp - no light flickering, and due to a sufficient high thermal constant, low flutuactions on temperature). <S> Note that this designation has nothing to do with PID control at this moment - research the subject on net. <S> That would be simpler by not requiring the detection of mains zero crossing. <S> I can suspect that your application can be drying wood or even a greenhouse for conformance testing. <S> But it can be anything else. <S> A friend of mine builds a sophisticated ink dryer for the furniture industry based on UV lamps. <S> In these cases, the controller can become very complex. <A> This amounts to a thermostat. <S> Unless your box has a strong and varying cooling source, or unless you have an unusually tight temperature spec, this will work well enough. <S> This open loop approach (control with no sensing) could be implemented using a simple timer. <S> Typically, this would be a 555, but of course, a microcontroller is the next choice and it's where you are going once you implement feedback control. <S> Triac dimmers work by switching on at some appropriate point in the AC cycle. <S> This means that (1) the control is never faster than 1/120 of a second, and (2) there will be noise spikes generated whether you use a relay or a triac.
Check if your heating element has no significant inductance. Heating elements (and their applications) generally react so slowly (thermal mass), that you could just switch the power on and off using a relay.
Is it reasonable to use a current limiting diode in place of a fuse? I'm trying to source some fast-blow 5mA or 10mA fuses but Littelfuse has discontinued the only reasonably affordable ones I have found . My circuit when operating properly will not output more than 2mA, however I'd like to ensure if it fails nothing will go over 5mA or 10mA. Could I substitute something like this current limiting diode instead? This is the circuit <Q> Sure, if you have DC, can live with the 100V rating, and don't mind losing a few volts across the "fuse". <A> If your power supply is (say) <S> 30V (maybe an op-amp supply) <S> and you use a current limiting diode of 10mA, if the circuit you wish to protect went short circuit, the power dissipation in the diode would be 300 mW and might exceed limits for the device. <S> The other problem is that a current limiting diode will "lose" a volt or two in normal operation so you will inevitably reduce your power rail by this amount in normal operation: - <A> Yes you can, but you'll need to change your design. <S> The problem is that, while a fuse typically has a resistance of a few ohms or less, CLDs have significantly larger equivalent resistances. <S> In the case of the 4 mA CLD you refer to, at lower currents it behaves pretty much like a 1k resistor. <S> For a "normal" output of 2 mA, this obviously means that you will lose about 2 volts. <S> You can get around this easily enough by incorporating the CLD inside a feedback loop, such as simulate this circuit – Schematic created using CircuitLab <S> but you do have to do it. <S> And if you're using 3.3 volt supplies and a 0 - 2 volt output swing <S> you're just entirely out of luck (SOOL, as we used to say). <A> You could use a PNP BJT current source, If you design it to limit at 10mA, R_sense would be about 70 Ohms (assuming 0.7V drop in the P-N junction). <S> This arraignment under your normal operation would drop your rail voltage by 140mV plus the emitter-collector voltage about ~200mV <S> so a total around 350mV, The question is if this voltage drop would be acceptable for your system. <S> For 3.3V you could possible replace Q1, with a P Channel MOSFET with Vgs(threshold) of a 1V or 2V and low Rds(on) <S> in order to avoid the extra voltage drop cause by the saturation of the BJT
If you're trying to protect something exquisitely sensitive keep in mind that any kind of significant capacitance after the 'fuse' can produce a lot of fault current irrespective of any supply limits.
Difference of amplitude and frequency modulation of lasers I found some interesting applications for modulation for lasers. They always talk about some sort of frequency modulation (ex. FMCW) AFAIK the frequency of a laser is pretty much stable (for all affordable lasers). So the only way to modulatate the laser would be changing the current wich results in a amplitude modulation of the emitted light. Right? Knowing from RF one would normally use FM to always stay on 100% of power emission. So to clear up the confusion, how can you run a laser diode in AM and FM mode? <Q> You are confusing wavelength modulation with frequency modulation. <S> The FM that you are referring to is the signal frequency, the distance between the peaks of the signal that you are modulating. <S> There are small effects of wavelength shift that is due to driving level that ultimately limit the power/distance and frequency of transmission as this wavelength shift causes symbol confusion. <S> Think of wavelength as a color. <S> You can have a red laser blink fast or slow (FM) or bright and dim (AM) or any combination between and more. <S> And the same thing can happen for a Blue laser. <S> In actual fact telecommunication lasers are typically in the Near- Infrared and the wavelength separation is much tighter. <S> And it's not correct to refer to colors. <A> Not the only way - you could use a Pockels or acousto-optical Bragg cell modulator to phase modulate the light from a laser. <S> Phase modulation is FM using the time derivative of the signal. <S> Some types of laser diodes are more frequency variable with current than others- eg. <S> VCEL types. <A> This falls into the realm of coherent optical communications. <S> Coherent systems were widely studied in the 1980's because they have an inherent sensitivity advantage over incoherent (amplitude-modulated) systems, but only found limited use for economic reasons. <S> Recently, coherent communications is re-emerging as the fiber optics industry develops systems for 40 Gb/s and higher data rates. <S> For long-distance systems, even amplitude modulation is done with an external Mach-Zehnder interferometer . <S> The reason is that directly modulating the laser current causes an unwanted frequency modulation as well (also known as "chirp"). <S> This unwanted frequency modulation is much larger than what would be used for deliberate phase modulation and it interacts with the dispersion properties of the optical fiber to limit the achievable transmission distance (for a given baud rate).
Optical phase modulation is generally done with an external device using the electro-optic effect , rather than by manipulating the laser itself.
What's the advantage of 'electrical tape' over 'regular' adhesive tape? For covering copper wire and the like (whether it is carrying current or not), what's the advantage of applying electrical tape as opposed to 'normal' consumer adhesive tape (of similar thickness? How much of an improvement in insulation or other important factors does it offer? <Q> 3 replies and no-one's stated the blindingly obvious idea that insulating tape is (or should be) specifically designed with electrical insulation properties, and exposure to voltage in mind. <S> Other tapes may or may not behave nicely in that application - some materials (both tapes & adhesives) can become conductive or worse over time. <S> I would also like to add that it seems a lot of people believe electrical tape is a suitable long-term / permanent solution in various applications. <S> As far as I'm concerned it's not, ever. <S> Heat-shrink sleeving, spiral wrap, flexible conduit, self-amalgamating tape, rubber sleeves, junction boxes, table ties/clips, grommets, cable markers, etc. are all better solutions for almost any given use of electrical tape other than to temporarily hold, bundle, insulate, or mark a cable. <S> I've not seen it specified as a permanent or proper solution to anything in the commercial/industrial/telecomms/electrical world. <S> From personal experience, tape WILL go brittle, shift, fall off, fail to hold and/or leave a nasty sticky residue all over whatever you stuck it to after a while. <S> Edit to add: The case for "proper" electrical tape is similar to "proper" VDE rated insulated tools, most screwdrivers you buy will have a plastic handle that insulates you from voltage but only VDE rated ones come with an actual guarantee of safety with a rated voltage (1000v usually). <A> This allows the tape to wrap around a wire junction and still grab the insulation to either side. <S> This helps keep the tape in place. <S> Regular tape is likely to get stiff, lose adhesion, and slide away from the joint, leaving it exposed. <A> Other factors is that the material choice also minimizes pinholes and in some cases the tape is tested to be be pinhole free. <S> Kinda important not to find a pinhole when you are expecting to be dealing with an insulator.
The big difference between electrical tape and "regular" adhesive tape is that electrical tape is stretchy.
Voltage decreases on higher current I have a circuit composed of Arduino Mini Pro 3.3V and GY-GPS6MV2 (GPS Ublox NEO-6M). I have tried to power it with 3 different sources: 3xAA NiMH in serie connected to RAW pin of Arduino and using its VCC pin to power GPS DC/DC Step-up power converter powered by 2x2 serial-parallel NiMH AA connected to VCC of the Arduino (high current) USB via FT232RL FTDI 3.3V If GPS module is not attached then measured VCC is in all three cases almost 3.3V but once I attach the module then it drops again in all cases to around 3.0V (it varies a bit depending on how much current does GPS module just need). If I was powering it with USB then in some cases GPS module was restarting repeately because it had not enough voltage. I've fixed this by bypassing built-in voltage reglator of the GPS module. Input current of the GPS module is measured max 70mA which I think is not that much. Input current of the whole circuit is then around 100mA (so it is 30mA for Arduino + some other parts). Why is there that big voltage drop and why I observe it in all three cases? I don't think that 100mA is that big current for any of the three powering solutions. <Q> Have you considered the peak current taken by the GPS module - it will take short pulses of current in the order of a couple of amps. <S> Average is one thing but <S> peak requirements (even though very short in duration) can cause your regulator circuit to get out of shape. <S> Try putting a big decoupling capacitor (maybe 1000uF) on the power terminals to the GPS. <A> Looks like the internal regulator of Arduino cannot handle more current. <S> If the GPS module runs on 3.3V, its own regulators needs something more than 3.3V at the input due to dropout. <S> Thus, power the GPS module from the power source (voltage > 3.3V) <S> directly while keeping its regulator enabled. <S> It is good to give the schematic of Arduino a look to see if there is something else (e.g. protection resistor or fuse) that might be causing the drop. <A> Here is a brief explanation on why none of your solutions will work. <S> 1) <S> While 3 <S> well charged batteries might provide enough voltage to have the arduino linear regulator work it cannot provide enough current (read the spec), and the GPS regulator should be bypassed anyway, and to me it does not seem that you did so for option one. <S> 2) <S> Your DC-DC regulator is rated for low output currents when powered with voltages lower than 2.5V (read the spec). <S> Also if two batteries should provide something around 2.5V the current drawn at 100mA@3V3=300mW might be quite high. <S> If the DC DC has unit efficiency you are asking for something like 120-150mA@2.5-2.0V <S> if you are lucky, that might well be too much for commercial NiMh batteries. <S> 3) <S> The FTDI board can provide a maximum of 50mA that is not enough for your needs (read the spec). <S> Since you say you want to use option two in your product <S> I suggest you to use the four batteries in series instead of a 2s2p configuration, or even better just use the four batteries in series, power the arduino via the RAW pin and power the GPS through its own linear regulator. <S> The last one is the low cost, low part count solution but it might not work due to the current request of your system, that might be too high. <A> My circuit is built on breadboard. <S> I have found out that breadboard itself has pretty high contact resistance and this is one of the main reasons of the voltage dropout when supplying power by DC/DC regulator (2).
Alternatively, replace the internal regulator of Arduino with a one that can handle higher current draw, bypass the internal regulator of GPS module and let it draw power from the new regulator. I suspect the input voltage is falling quite low, thus limiting the DC-DC output current.
Protecting Solid State Relays from Short Circuits I have 4 SSRs on my board with a steady state current rating of 2A and a peak current rating of 9A (Relays are CPC1976). This product is meant to be a commercial one and the relays will be powering bulbs (CFLs, Incandescent etc) upto 100W @ 240VAC My main concern is short-circuits. A lot of CFLs that I've used in my house short circuit for a small time when they fuse. The short circuit is serious enough that the circuit breaker trips. This will obviously fry my relays. I can easily include a fast-acting fuse but that will be have to be replaced everytime the lights fuse! I could consider a resettable fuse but most of them seem to be too slow to act to save a semiconductor device. What are my options here to have a resettable solution yet save my relays from damage? One idea I had was to do away with the relays and use opto-coupler + triacs instead. Triacs are cheap and I can easily find some that can handle large amounts of current (obviously a short circuit will be more than they can handle). These may survive such short circuits with the addition of a resettable fuse? <Q> You need to monitor the current using a low resistance in series with the load (bulb). <S> Or possibly, the drop across the relay can be used to calculate the amount of current taken by the load. <S> Once the drop exceeds a threshold, the relay should be turned off. <S> Otherwise, go for a fast blowing fuse in a holder; solid state stuff has low thermal mass. <S> Replace the fuse while replacing the bulb. <A> Normal relays are pretty good at surviving considerable current overloads providing the contact has already settled into its closed position. <S> It's the closing and opening that is the killer for a lot of standard relays. <S> I'm not saying all relays are the same <S> so do read the data sheets and see what is said <S> but, given you aren't using PWM via the SSR's normal relays should fit the bill. <A> I did a DC current limit, current flows through a FET, and then a series resistor, which can turn on the ~0.6V Vbe of a bipolar transistor, which in turn switches off the FET. <S> (there are some resistors involved too.) <S> It's kinda a weird circuit, if you care about the off state.(since the bipolar needs to be on to shut the fet off.) <S> If you can take the voltage drop, I think you could do something similar in AC... <S> though again the off state might be turning on again off again each cycle. <S> I'm not an AC/power guy. <S> This solution looks like it'd have to be another SSR in series that would turn off at over current. <S> I'm thinking you might be able to turn off your existing SSR's with the same trick. <S> Can you post a schematic of the circuit? <S> (or maybe just the SSR piece of it.)
Make sure that the detection mechanism and relay is fast enough to allow for abrupt termination.
What is the audio voltage of an android phone? For a project I am currently working on, I need to use the audio output of an android device. Is there a standard max voltage? <Q> The closest thing is the -10dBV (.9VPP) consumer line level output, but I doubt most phones have the actual output level calibrated to that standard. <S> It's more than likely that they tested it by plugging the phone into a couple of AV receivers and found that it got "loud enough" with some volume adjustments. <S> In any case, the headphone amplifier's job is to push current through a load which might have a wide range of impedances. <S> This means that the maximum output voltage into a high-Z load isn't that important for the intended application, and is sometimes omitted from the datasheet. <S> Your best bet is to take apart or look at disassembled photos of various phones, figure out what headphone amp they are using, and go from there. <S> For example, the TI TPA6166A2 quotes: VOUT,Max Max line output voltage RL = <S> 10 <S> kΩ 1 <S> VRMS <S> But many other devices omit this spec. <S> You can probably estimate it from looking at the power output and using the average power equation with the quoted load. <A> I've looked into this before, and it seems that voltage outputs from audio devices can vary wildly, and no real standard exists for consumer devices. <S> I've also read about Automatic Gain Control (AGC), and you might look into that, since it appears to amplify a signal to a set maximum gain, so you know the output voltage maximum. <S> See this datasheet for an example of one such chip. <A> This seems to be standardized across headsets for Android. <S> There's a 150mV peak drive at 32ohms. <S> https://source.android.com/devices/accessories/headset/specification.html
There isn't really a standard, it depends on exactly what headphone amplifier the phone uses.
Will a dual car charger that shows a maximum output of 2000mA produce a 2.1A current? I have a dual car charger that states input is 12-24VDC and Output is maximum of 2000mA, but it is supposed to have one port charge at 1A and other port charge at 2.1A. Is the 2.1A output possible with 2000mA or does it have to be 2100mA to produce and output of 2.1A? <Q> 2000mA is 2A. <S> And you can't get 1A and 2A from it either, as that would require 3A total. <A> If I understand you correctly, there are two outputs. <S> One is rated for 12-24VDC and 1A, the other is 12-24VDC and 2.1A. <S> If one port can supply 2.1A, then you can get 2A from it without any problems (you can get anything from 0 to 2.1A from it). <S> If, however, the second port is rated for 2A (which is more likely, and I think what you meant), then no, it will not provide 2.1A. <S> It will provide the specified voltage, and supply 2A to your device, but current and voltage will both be limited to the specified ranges. <A> These two port chargers are common. <S> The way they work is this. <S> A common switching IC takes 12V auto power input (12~14V nominal, or 24~28V nominal for 24V cars or RVs), and outputs it to a common rail. <S> The usb ports conform to the USB Battery Charging Standard OR the Apple iPhone/iPad Standard, with resistors used to signal what kind of port each should be. <S> The phone or tablet or other device connected then knows how much current it should be allowed to pull. <S> That being 1.0A iPhone ports or 2.1A iPad ports. <S> But like I said, the charger has a single common output rail. <S> And the signaling resistors, are just that, SIGNALING resistors. <S> There is no current limiting in the charger . <S> Connecting a 5V 2A load to either usb port's power pins and it can pull 2A without problem. <S> Connect a 5V 3+ Amp load, and your going to overdraw the Switching IC, or Inductor, or Diode, or Wiring. <S> Ideally, the charger should have parts that cover the full draw plus some. <S> That being 3.1A for a 2.1A + 1A charger, 4.2A for 2x 2.1A chargers, etc. <S> But most don't. <S> Common 1A chargers often have a MC34063, which can only do 750mA output with <S> it's internal mosfet. <S> So they lie about the current sourcing capacity. <S> To answer your direct question, if your charger says max output 2000mA, that means that it most likely can only output 2A max. <S> That's only -5% less than 2.1A <S> , you won't see much of a difference. <S> You could charge two 1A devices, or a single 2.1A device.
There is no way to get 2.1A from it at the rated specs.
STM32F1 Can't I use the internal voltage reference as the ADC reference? There seems to be a badgap voltage reference built-in in the STM32F1 microcontrollers (on ADCx_IN17). Coming from AVRs it seems to me very strange that it's not possible to use this reference as the ADC VREF, at least I think it's impossible. Am I right ? Why is it there than ? <Q> I also find it annoying that I cannot use the internal reference for VREF+. <S> It is extra annoying on smaller pin packages that DO NOT have an external VREF+ input pin. <S> You have to use the MCU's VDD input voltage as your reference. <S> VDD is generally not a very precision voltage <S> so do not expect the best accuracy without a CAL routine. <S> I have also done battery operated systems where VDD comes straight from the battery <S> so that makes using it a real pain. <S> Hopefully ST will add this feature soon. <A> It is possible to use the internal reference, albeit indirectly. <S> You measure it using the Vdd, and then measure the external voltage you are interested in, using the same Vdd as ADC reference. <S> You can then calculate what the supply must be, knowing Vref and the counts it gave. <S> Then you know more accurately what the ADC is using, and can calculate the external channel voltage you want. <S> The assumption here is that Vdd does not move much between the two readings. <S> If this is a concern, measure Vref before and after measuring the channel with your data on, and use an average. <S> For battery operated systems, this gives you the battery voltage as well, which is probably of interest. <S> This is not as accurate as an external precision reference, but is cheaper, uses less power and does not tie up extra pins... <A> from figure 22, page 216 Shows that it isn't connected. <S> My educated guess here is that while they may have a band-gap they don't have a precision regulated power supply. <S> They are very different things, with the power supply requiring a precision reference (like a band-gap). <S> You have to supply a low impedance, low noise, high PSRR block that burns power. <S> Also band-gaps are lower voltage devices, this power supply is close to the rails. <S> It's safer to put the pins on the outside. <S> And it would probably be lower noise on chip. <S> What you do, is you provide a stable clean external power on those pins <S> and you use the internal Vref to calibrate your ADC for manufacturing tolerances.
Microchip PIC's do allow you to use the internal reference for the ADC and some even allow you to divide it by 2 or 4, so it certainly can be done.
Spikes in Inductor Current : Buck Converter What could be the reason of such spikes in inductor current at each Switch ON-OFF. ?? This spikes are also getting affected in load current. Please help me to reduce / remove this spikes. ( waveform of inductor current with spike are shown in image file ) <Q> Unless you have an (expensive) current probe, it's pretty hard to make accurate measurements of inductor current. <S> I'll assume you have a small resistor in series with the Vout end of the inductor. <S> It's also not apparent what the switching frequency or ringing frequency is. <S> If it's real, it could be ringing of the inductor at its self-resonant frequency (SRF). <S> One way to deal with that is to use an inductor with a higher SRF (at least 10-20x the switching frequency. <S> Another is to slow down the switching edges so that the energy content at the inductor SRF is low. <S> It reduces efficiency, but it can be a good trade-off to reduce EMI. <S> A series gate resistor is commonly used. <S> Even if the noise in your output is due to other reasons, slowing the switching transitions should reduce it. <A> At which end of the inductor are you measuring the current? <S> If you have put the CT at the Q1 end of the inductor there is a possibility you will couple the fast transitions into the measurement signal. <S> To minimize this put the CT on the Iout end of the inductor. <S> To ensure this does not pass through to the load <S> it is vital that the output capacitor has an extremely low parasitic inductance and that the circuit layout is well organized. <S> To deal with the 8.5A ripple <S> the output capacitor should probably be composed of multiple ceramic capacitors in parallel to get the lowest series inductance. <S> kevin <A> Check the voltage waveform at the VIN side of the inductor. <S> If VIN is not sufficiently bypassed, it could ring when the converter switches. <S> This would show up on the IL waveform as well.
The parasitic capacitance of the inductor could also be causing the problem.
Could somebody tell me which resistor to use with this LED I went to my local electronics store and asked for a powerful LED because I wanna make a small flashlight. They gave me this thing, but the problem is that the stores in my area don't have any datasheets or anything of the like. When I asked about the current or forward voltage they just told me they don't know and that I should try several resistors and stick to the one that doesn't burn the LED... (basically trial and error because they don't bother with that datasheet stuff...). So... perhaps could somebody here give me an idea as to what kind of resistor I should use with this thing? I am using 2 3-volt lithium batteries (CR2016) to provide 6 volts. The guys at the store know that the maximum voltage that the LED can withstand is 3V because they burned 2 LEDs in front of me when I asked about the voltage... Here are the front and back views of this thing. The metal thingy is supposed to be a dissipator: <Q> I would say you want to get a handful of the LEDs and test them to destruction. <S> You will need to get or build a variable constant current source. <S> This can be made with an LM317 or similar adjustable regulator - google for LM317 constant current. <S> The current resistor should be a wire wound low ohmage rheostat ideally to take the current, plus a tiny (though high wattage) <S> zero-stop resistor. <S> Power the LED with the constant current source set to its minimum and monitor the current value with a DMM. <S> Slowly increase the current until the LED starts to illuminate. <S> Measure the voltage across the LED for your \$V_F\$. <S> Slowly increase the current more and more, noting down the current value with each adjustment. <S> When the LED burns out the last current reading you took will be the absolute maximum current for the LED. <S> Do not <S> , I repeat <S> do not run the LED at that current, as you are right on the cusp of burning it out. <S> Get a second LED and replace the blown one. <S> Now adjust the current to just below where it burned out before, and this time slowly reduce the current down until you see the LED visibly reduce in brightness. <S> This is the current that you don't really want to drop below as the LED won't be properly bright. <S> Now pick a value roughly half way between the two and calculate a resistor (or better yet a constant current source or sink) accordingly. <A> Your LED looks like it is just a simple 1W LEDThese are fairly common and require about 3.3V and can sink, at most, 350mA For any resistor, you'll need a pretty hefty one since it'll have to be able to handle the amount of power you're shoving through it. <S> Each answer is good for the specified current that the LED will consume. <S> The size resistor you need depends on your voltage source but since you say you are using a 6V source, you should use around a 10 ohm reistor, but it needs to have a power rating of at least 2W to be able to dissipate the power, <S> see calculation: <S> These LEDs can be bought cheaply and they are already mounted on its proper circuit board. <A> Without a datasheet answering your question is not difficult, but impossible. <S> Forward voltage may well be in the 3V range, forward current may be about anything between 50mA and 1A (not much more than 1A I guess). <S> To avoid burning your LED you should use a bench power supply, regulate it on about 5V and limit the current to 10mA or so, connect the LED and, measuring the voltage , slowly tune up the current. <S> When voltage starts to rise slowly, well that's where your led should work (a little less maybe). <S> Assuming you don't have a bench supply you should assume 3V of forward voltage drop, then use the formula:$$R_{LED}=\frac{V_{CC}-V_{LED}}{I_{LED}}$$where: <S> \$V_{CC}\$ is your source voltage, <S> i.e. 6V <S> \$V_{LED}=3\$V \$I_{LED}\$ should start from some 50mA and increase to a maximum that you must discover <S> For example, for \$I_{LED}=50\$mA you should grab a \$60\Omega\$ resistor (it does not exist actually), make your circuit and monitor the LED. <S> If it does not get much hot and you want to increase luminositi, go for a higher current changing the resistor. <S> Please note that the resistor might dissipate quite a lot of power, the formula is the old \$P <S> = <S> RI^2\$ so <S> in our case \$P=150mW\$, that's not much. <S> If you go for a current of \$200\$mA (that might be too low) <S> you get R\$=15\Omega\$ and \$P=600\$mW, that's too much for an ordinary \$\frac{1}{4}\$W resistor. <A> From the data sheet it appears that CR2016's are rated for 90 mAh with a 30k ohm load, and their internal resistance is high enough that you won't have to worry about burning out the LED, no matter what. <S> On the down side, the battery's life will be very short. <S> Assuming a drop of about 3.5 volts for the LED with the cells sourcing 3 volts each and an internal resistance of about 40 ohms for both of them means that the current into the LED will be: $$I_{LED}=\frac{V_{BAT}-V_{LED}}{R_{BAT}} = <S> \frac{6\ V-3.5V}{40\Omega\ } = <S> 62.5\ <S> mA <S> $$ <S> For a capacity of 90 mAh, that means a life of about an hour and a half, best case. <S> It'll be worse than that, though, because the cells are rated at 90 mAH with a 100 microampere - not a 63 milliampere - load. <A> You should check if that back pad is connected to either of the diode leads. <S> If it is you'll need to be aware of the heat sink voltage. <S> (if not things are easier. <S> I'm assuming you'll use a heat sink.) <S> Other's have given you lots of information on how the calculate the current. <S> If you're not sure, start with 1k ohm and work down from there. <S> I'm <S> don't know what's a reasonable max. temperature, but ~60C should be OK. <S> (Warm to the touch, but it doesn't burn you.)
The maximum current will depend on how well you can get heat out of the package.(Heat dissipated = diode voltage * current)
Drop 12v supply to 6v to power a water pump I have a submersible water pump that requires 2.5-6V. I want to power it from a 2A, 12V supply. I assume that's powerful enough, but the pump doesn't specify its current. How can I determine the current required, in order to find the right resistor to drop 6V? <Q> You don't. <S> Resistors cannot be used like that <S> The voltage drop across a resistor is proportional to the current through it. <S> The current drawn by a pump depends on many factors and varies during its normal operation. <S> The device you are looking for is called a Voltage Regulator <A> That would have to be like a weapons grade quality resistor that would cost almost as much as the weapon itself probably. <S> You need a voltage regulator. <S> While you could use a simple buck low dropout regulator (LDO), for an application that pulls 2A from a 12V supply, I would suggest going with a switching mode power supply. <S> They are much more efficient. <A> If you have a meter that can measure current, you should connect the meter in series with the pump when it is operating with a normal load, and on a suitable power supply. <A> As others said, resistor is bad idea to do that. <S> You could use voltage regulator (like LM7805) but you will loose a lot of power on it. <S> Better way would be switching regulator, but it complicates everything. <S> I think best way to do this would be just changing your power supply to another that provices 6V.
You should really get a supply whose voltage matches the pump's requirements - trying to use a resistor to drop the voltage definitely won't work. There are many ready made regulators on eBay if you are unwilling to create it yourself, which is not to be ashamed of as switching mode power supplies are not for the faint of heart.
is it true that a computer will slow down after it is used for a long time? Intel claims that a computer will become slower after it is used for a long time while the power consumption remains almost the same according to some media source. At first I thought this was just marketing, but then some friend confirmed this is truly the case. I can understand when bicycle is used for a long time the friction increases within the component, but that can be fixed anyways. What about the chips? Is the capacitor that takes longer to charge? is this really the case or it is just marketing ? source media material if you can read Chinese source transistor aging thanks to @sergio clarification I am definitely not talking about software related stuff, otherwise wont post here. <Q> Well let's just ignore the software bloat aspect of computer slow down and look at things on a piece by piece basis. <S> CPU, MoBo, Memory like caches and DRAM: <S> NO, these are clocked systems and the clock is designed to drive the system just fast enough to make sure that the device finishes one task before starting the next (in simplistic terms). <S> These clocks do drift and age a little, but that is measured in PPM (parts per million) if the part slows down enough that it can't keep up to the clock, then it starts to have major problems. <S> Like most things digital, it runs until it , .... <S> well doesn't. <S> That really just leaves the HDD: <S> It is POSSIBLE that this will slow your machine down. <S> We do know that there can be corruption in the stored bits (bit rot) and the operating system can mostly correct these. <S> But in reality these tend to cascade and then go south very quickly or else <S> they happen at a consistent background rate (which wouldn't affect this premise). <S> I would say that there would be some machines that slow down rapidly and spiral out. <S> Otherwise the effect will probably not be noticeable. <S> On the whole, I'd say nonsense. <A> There are lots of things that can cause a Windows computer to become slower as you use it, but they're all software-related or related to the interaction of software and hardware. <S> Additional programs get installed which consume resources (even when they're uninstalled they may leave crap in the registry). <S> Many programs install processes that run at startup and do things like listening on a port or checking for updates. <S> Disk drives can become fragmented, slowing retrieval. <S> Even single programs that use RAM can require garbage collection and such like as the RAM gets filled and recycled in various sized blocks. <S> Some people (not me) swear by completely wiping and re-installing Windows and most-used programs from scratch on a clean disk drive. <S> You will definitely see a speed improvement if you've been using the same computer for years without re-installing from scratch. <A> This discussion became a bit fragmented, I'll try to offer an alternative answer to this. <S> Please, note that the original question mention the chips itself, so abtracting ourselves from all peripherals/sowftware inherited problems <S> , I would say the answer is YES <S> , computers could get slowly and/or present faulty behavour over time due to sillicon aging. <S> As the silicon will loose it's properties over time, due to many factors as heat, the properties of the "internal components" of the processors and othes silicon based chips will gradually decay. <S> As you can see here , there are many articles studying this phenomenon. <S> I hope this helps as another piece for this puzzled matter! :) <A> Anindo Ghosh's discussion of temperature has been rubbished in the comments, but it's definitely a potential issue with computers. <S> Modern systems will have "thermal throttling", which will reduce the clock speed when the die temperature of the CPU is above a limit. <S> The ability of the system to keep cool diminishes with time; thermal paste dries out, dust accumulates on heatsinks, and thermal cycling of the heatsink mounting may worsen the thermal contact. <S> Most systems will benefit from dusting with compressed air every few months, and I've personally had good results from replacing heatsink thermal paste on overheating systems, especially laptops. <A> No, it is not true for computers that have the typical, clocked architectures. <S> An asynchronous CPUs real performance would be tied closely to the performance of the silicon and would scale with temperature, logic supply voltage(s) and aging. <S> It's a rather nice question, in fact: an accurate answer can be one sentence long :) <S> I stress that <S> the transistor aging will <S> not cause the computer to "slow down". <S> It must be noted that similar to overclocking, a CPU with aged transistors will not fail outright. <S> It will simply operate at a progressively higher error rate, eventually becoming unusable. <S> So, my first paragraph stands true whether the CPU exhibits transistor-age-related performance degradation or not. <S> If your question was about whether the transistors will slow down - please reword it so! <S> You're asking about a computer as a whole, not about what the CPU's transistors might be doing. <S> The transistors may be slowing down, but the computer will operate at its rated clock speeds (thermal and power throttling notwithstanding), with ever rising error rates, until it becomes useless. <S> At that point a user might manually reduce clock multipliers in the BIOS to underclock the core and restore the functionality. <S> I assume here that the highest-clocked circuitry is most prone to the effects of this aging. <S> Only this manual control process will lead from transistor slow-down to a computer slow-down . <S> Absent the control process, no slowing down can be observed by definition. <S> You won't observe a slow down, but you will observe eventually unacceptable error rates - leading to data corruption on writable storage.
A slowing down would imply that there is a control mechanism that measures CPU performance and slows down the clock sources so as to maintain acceptable performance of the CPU.
Why Atmega328P has no PortA This is a general question regarding Atmega328P. While I was reading the datasheet of Atmega328P, I see that it has Ports B, C, and D. So, I'm surprised to see that there is no PortA. Is there a specific reason for it? Datasheet for Atmega328P: http://www.atmel.com/Images/doc8161.pdf <Q> When a chip manufacturer designs a family of chips they will often start with an all singing, all dancing design with all the bells and whistles. <S> They will then create cut-down versions of the chip by removing portions of the design, or sometimes just not connecting pins up. <S> The internals of the 328P will be based on a larger chip which does have a port A (as well as other ports). <S> The removal of port A as opposed to another port would have had two considerations: <S> What functions are shared with which port, and which can we do away with <S> How easy would it be to move any extra functions to other pins <S> How easy would it be to remove the port from the design <S> And yes, the port A reference in the ADC section should read port C. <A> It does, but isn't clearly mentioned in the datasheet. <S> Port A is the ADC 'port'. <S> It shares most of the pins of Port C (some packages have two extra ADC pins though). <S> I agree it is confusing. <S> From page 251 of the datasheet:"The ADC is connected to an 8-channel Analog Multiplexer which allows eight single-ended voltage inputs constructed from the pins of Port A." <S> As such, my guess is that Port A represents the internal 8 connections to the ADC. <S> I just had a look at the Atmega16 Datasheet ( http://www.atmel.com/Images/doc2466.pdf ). <S> This does have Port A dedicated to the ADC. <S> As such, I think the CPU core is similar but the external pins are multiplexed. <S> I guess for the Atmega8 series they should have dropped the Port A moniker completely to avoid confusion, or maybe they did and the ADC chapter in the datasheet is a typo as you mentioned in the comments. <A> Always download the most recent version of the datasheet from the vendor's website. <S> On the Atmel website <S> you'll find: <S> ATmega48A/PA/88A/ <S> PA/168A/PA/328/P Complete <S> ( file size: 35MB , 660 pages , revision G , updated: <S> 02/2013 ) <S> ^ ^^^^^^^ <S> where there is no reference to Port A made anywhere.
I would surmise that port A had few extra functions shared with its pins, and the port was simple to remove from the design and leave the chip suitable for use in a low pin count package. I think Atmel uses the Port C moniker for the 'digital' inputs on those pins, and Port A for the analog input.
3 Watt LEDs in Series - Using constant voltage source I have 20 x 3 Watt LEDs and have a 80W constant voltage (not constant current supply). I originally wired this up with 5 sets of series string of 4 LEDs from my 12V supply, however I have been told that I need to limit the current. I don't really want to change the supply and wondered if I could add a very low Ohm resistor to each string to regulate the current? This is a schematic as it now is? If I added say a \$1\Omega\$ resistor before each of these LED strings would this do a good job in regulating the current? Alternatively could I maybe use one of these on each string http://www.ebay.co.uk/itm/DC-Buck-Step-Down-Converter-DC-5A-Regulator-Voltage-Current-Adjustable-DE-/321439418999?pt=UK_BOI_Electrical_Test_Measurement_Equipment_ET&hash=item4ad7484a77 <Q> Yes and no. <S> NOTE: <S> CALCULATE THE REQUIRED POWER FOR THE RESISTOR <S> - you don't want to set fire to the resistor...! <S> BUT A resistor is not recommended for high wattage LEDs as the resistance changes with heat, and at that wattage there will be a lot of heat about. <S> You really should consider either creating a constant current source, or using constant current sinks (note: for the latter you can keep your existing supply, just add the components to each chain to limit the sink current). <S> For example, a couple of circuits I found on another question on this site: <A> There is more than one correct answer to the stated requirements. <S> Solution 1 : <S> Current limiting resistors, as answered by EM Fields Solution 2 : BJT based constant current source or sink, as answered by Makenko Solution 3 : Current-limited switching regulators as proposed in the question ("how-to" follows) <S> Solution 4 : Simple-to-use 2-terminal constant-current linear LED driver ICs Solution 5 : Switch-mode constant current LED drivers Solution 3 <S> how-to: <S> Choose a current-adjustable boost regulator, not a buck regulator. <S> The module listed by OP will support just 2 LEDs per string ( 4.5 x 2 = 9 Volts ), with the specified 12 Volt main supply, as its maximum output voltage is a couple of volts below supply provided to it. <S> Use something like this one <S> instead (35 Volt maximum output <S> , CC adjustable) Choose an LED string length for maximum total forward voltage a couple of volts lower than maximum output of module: for the suggested module, (35-2)/4.5 = 7.33 , so 7 LEDs per string. <S> 3 modules would be needed, one per string of 7, 7 and 6 LEDs each. <S> Set CC adjustment to the low side of the appropriate preset, say 10 mA, and hook up 6 or 7 LEDs in series with an ammeter, across the module output. <S> CC indicator LED should light up. <S> Adjust CC preset till desired current is achieved - EM Fields makes a good case for using 400 mA per string. <S> That's that. <S> Solution 4 : <S> Use parallelled sets of constant current 2-terminal linear current regulators such as the SuperTex (now MicroChip) <S> CL6 IC. <S> For 400 mA per string, 4 CL6 ICs would be used in parallel for each string. <S> Use heat sinks for the ICs. <S> Being 2-terminal devices, these current regulators can be used on either the high or low side of the LED string, just like a resistor. <S> The key advantage of these devices over resistors is that the current regulation is pretty much independent of the supply voltage within the specified operating voltage limits. <S> This is specially useful if a high voltage supply (up to 90 Volts) is available instead of the stated 12 Volt one. <S> Solution 5 : <S> Design a circuit based on a switch mode step-up, preferably multi-channel, constant current LED driver IC, with one string of LEDs per channel. <S> This is probably maximum overkill for the purpose specified. <A> The data sheet states that with the LED dissipating 2.63 watts, its forward voltage, Vf, will be 3.5 V, which corresponds to a forward current, If, of 751 mA. With the LED dissipating 3.38 watts, its Vf will be 4.5V and its If also 751 mA. <S> That says that with 751 mA through the LED its Vf can lie anywhere between 3.5 and 4.5 volts, a caveat being that the LED's absolute maximum If is 750 mA. <S> Since the LEDs are going to be used as aquarium lights, there's probably no reason to blind the fish and run the LEDs on the hairy edge of their own demise. <S> The If VS Vf graph on Ebay, for the LED, shows that with an If of about 400 mA, Vf will be about 3.5 V, allowing the LEDs to dissipate a much more comfortable 1.4 watts each. <S> Going that way means that you can wire three LEDs in series for a total of 10.5 volts across the string, and drop the remaining 1.5 volts from the 12 volt supply with a 3.75 ohm resistor in series with the string. <S> The resistor will dissipate 0.6 watts, so a 1 or two watt resistor would be a good choice. <S> So, since you can't get 4 LEDs in series to be properly driven by 12 volts, the array changes from 4 X 5 to 3 X 6 with two LEDs left over. <S> If the 3 X 6 array would work for you, then the supply would have to put out 2.4 amps at 12 volts, which is about 29 watts, well within its capabilities. <S> If you absolutely have to use all 20 LEDs, then you could connect the last two in series with a 12.5 ohm 3 watt resistor and wire that string in parallel with all the others, increasing the load on your supply to about 34 watts.
Yes, you can add a suitable resistor, calculated the same as for a single LED, just sum the forward voltages. A nice metal oxide 3.6 ohm 2 watt unit is readily available, and would up the current through the LEDs a little, but would be fine for the application.
Is it possible to measure the distance of a WiFi access point from the receiver? I have signal strength in dBm and frequency in MHz is is possible to find the distance?? Any idea about how to do it? <Q> I've read it - among others - on Radio Link Quality Estimation in Wireless Sensor Networks: a Survey by Baccour. <S> Now, I don't think this is true - there <S> must be a correlation, otherwise you could in principle receive wifi signals from across the world. <S> But it is demonstrated that this dependency is overwhelmed by other factors, such as the non-uniform radiation pattern of the antenna, multi-path propagation (highly significant due to the short wavelength), scattering and path loss due to obstacles. <A> All other things being equal (and that is a lot to ask!) <S> there is indeed a relation between transmitter signal strength, distance, frequency, and receiver signal strength. <S> Are you trying to determine your location from WiFi signal strength? <S> There is lots of info about this on the web. <A> Of course there is a correlation between signal strength and distance! <S> As you can see from this discussion over on Physics there is no fixed equation to tell you distance from signal strength, as you don't know output power, antenna length/ field pattern/geometry, propagation paths, etc, and in fact even things like the weather can change how well the signal propagates. <S> So what tools like kismet do (extensively used in wifi site surveys and security tests) is to plot signal strength along with location and use triangulation. <S> Broadly speaking, excluding external factors, two points that have the same signal strength are likely to be equidistant from the wireless access point. <S> Using many samples helps pin down locations pretty accurately.
There are several research papers claiming that there is no correlation between signal strength and distance.