source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
What is the physical significance of the unit ampere/meter in magnetics? I'm having a hard time understanding what is the stuff this unit measures. I understand ampere , and I understand meter , and I understand per , but since ampere is a measure of current, I'm having difficulty understanding how this relates to magnetics. I understand a current is associated with a magnetic field. What I don't understand is how these all fit together to make ampere/meter . What is an ampere/meter and what is the thing that it measures? How can I construct a thing that makes an ampere/meter ? As I vary the parameters of this thing (whatever parameters it has: length, turns, current...), how does the amperage per meterage change? <Q> In a capacitor it is easy to see that the electric field strength (E) has an obvious "per metre" part - it relates to the distance between the plates in a capacitor. <S> In an inductor it's harder to see - the "per metre" part of magnetic field strength (H) relates to the nominal length of the path of the magnetic lines of flux. <S> In a closed ferrite inductor such as a toroid <S> the "per metre" part is the nominal length around the toroid - fairly easy to visualize. <S> In a more complex transformer (such as an EI core) the "per metre" part shown as below in red: - <S> H, being defined as ampere-turns per metre, reduces if the length of the path of the lines of flux are longer and, the resultant flux density for a given magnetic material would be less. <S> This naturally means that larger ferrites can "hold" more energy before saturating. <S> A toroid or any closed magnetic material with decent permeability can be assumed to contain all the magnetic flux within the material. <S> If the length of the toroid were 10cm <S> and you passed 1 amp through ten turns, H would equal 100. <S> It would also equal 100 if there were one turn and 10 amps. <S> Edit about reluctance and flux density <S> Reluctance (\$R_M\$ or S) is like circuit resistance - it indicates how much magnetic flux (\$\Phi\$) the ferrite will produce for a given magneto-motive-force (MMF or \$F_M\$). <S> The MMF is easy - it's ampere-turns (as opposed to H which is ampere-turns per metre). <S> Relationships: - Reluctance of a magnetic circuit (\$R_M\$) is \$\dfrac{l_e}{\mu\cdot A_e}\$ <S> Where \$l_e\$ is "effective" length around magnetic circuit and \$A_e\$ is the "effective" cross sectional area of the magnetic material. <S> The MMF divided by the reluctance equals Magnetic Flux, \$\Phi\$: - \$\Phi = <S> \dfrac{MMF}{R_M}\$ <S> and therefore \$\Phi = <S> \dfrac{MMF\cdot \mu\cdot <S> A_e}{l_e}\$ <S> This means that if the cross sectional area (\$A_e\$) of a ferrite doubles, Magnetic flux also doubles. <S> The impact of this is that magnetic flux density, B (flux per sq metre) remains the same and the core would saturate at the same current because saturation is related only to flux density. <S> Also the above formula can be rearranged like <S> so <S> : - \$\dfrac{\Phi}{A_e} = \dfrac{MMF\cdot \mu}{l_e}\$ or <S> \$B = H\cdot \mu\$ which is how magnetic permeability is defined <A> What is an ampere/meter and what is the thing that it measures? <S> The magnetic field intensity \$\vec H\$ is measured in amperes per meter . <S> This is dual to the electric field intensity \$\vec E\$ which is measured in volts per meter . <S> In the case of the electric field \$\vec E\$, the closed contour integral of the electric field intensity gives the electromotive force (emf) which will then have units of volts : $$\mathcal{E} = <S> \oint_C <S> \vec E \cdot d\vec <S> l$$ Similarly, for the magnetic field \$\vec H\$, the closed contour integral of the magnetic field intensity gives the magnetomotive force (mmf) which will have units of amperes <S> (or ampere-turns ): <S> $$\mathcal{F} = <S> \oint_C <S> \vec H <S> \cdot d\vec <S> l$$ <S> What is the physical significance of the unit ampere/meter in magnetics? <S> For additional insight, take the duality further and consider the magnetic field due to a hypothetical magnetic charge (monopole). <S> Magnetic charge has units of webers and the associated scalar magnetic potential has units of joules per weber otherwise known as the ampere. <S> This is of course the dual of the scalar electric potential measured in joules per coulomb otherwise known as the volt. <S> More, a current of magnetic charge has units of webers per second otherwise known as the volt. <S> Thus, the insight here is that we can understand the unit amperes per meter , via duality , in the same way that we understand the unit volts per meter . <A> Old books are usefull because theories are on the very beggining, and effects of magnetic field discovered by the compass needle. <S> From "The Electromagnt" by R.C Underhill (New York 1903): "When a wire carriers <S> 10 Ampere, at one cm from the center of the wire there are two lines of force (Webers) per sq cm for each cm length of the wire <S> -that is 2 Gausses. <S> Two cm from the center of the wire is but one line of force per sq cm <S> -that is there is but 1 Gause. <S> Hence the following law: <S> the intensity in Gause in air is equal to the two-thenths times the current in Amperes flowing through the wire, divided by the distance from the center of the wire in cm "
| Just as the volt per meter is a unit for the strength of the electric field, the ampere per meter is a unit for the strength of the magnetic field.
|
Where to get/How to make a potentiometer with "clicking" steps? Maybe you remember that very old (and sturdy!!!) electrical panels/machines had those big knobs that you could turn to fixed positions (steps) with a very unique clicking sound. I need to make one or get something similar so the potentiometer in my design stays on one of the 10 predefined positions. Could you point me in the right direction? Maybe those kind of knobs have a specific name? Maybe even the pots themselves are special... <Q> To search for the described part, use the keywords potentiometer with detents . <S> The specifics mentioned would suggest a potentiometer with 10 detents, such as this one on Amazon , or another on Jameco . <S> The detents can be low torque (a gentle click at each transition) or high torque (a firm click). <S> The common / inexpensive ones are low-torque, but they seem to survive longer than a few high-torque pots with detents I have used. <S> More expensive such potentiometers allow individual mechanically adjustable detent torque, even to the extent of mixing high and low torque detents within a single pot ( example ). <S> At the high end of the spectrum, some manufacturers offer programmable detent torque: <S> Internally these are essentially like stepper motors integrated with the potentiometer shaft, with the externally controlled coil current determining the holding torque at each detent position. <S> I haven't seen this type available in retail, only through OEM sales by quotation. <A> Maybe this will help (10 positions, 4 resistors). <A> If you want it to actually increment the resistance in steps, you don't use a pot at all. <S> Instead, you use a rotary switch and resistors. <S> I am writing this on my iPod <S> so I don't have access to the schematic editor, but I will edit as soon as possible. <S> EDIT: <S> Here is a diagram (I had to improvise, no symbol for a rotary switch): simulate this circuit – <S> Schematic created using CircuitLab <S> These knobs have a little ratchet-type sweeper in them that means it can only stop at certain points. <S> They are a little hard to find these days, but you could probably make one yourself with a bit of effort. <S> You would want to attach a sweeper to the shaft and have that sweeper click past little posts or notches. <S> If you have some experience making small mechanical parts, or could get the help of someone who does, that would help a lot.
| If, on the other hand, you just want the physical clicking effect, you can get special knobs.
|
How the Current Flows in a Car? My BIG question is : why does positive battery cable in a car is directly connected to the starter to crank the engine and does that mean the current actually flows from positive battery post to starter and then comes to negative post through a frame? Many car books usually state that it is the positive wire that gives power to the starter and not vice versa? Where is the flaw in this reasoning - it is certainly how electricity used in cars today practically, not theoretically? I started reading about Ben Franklin and then "real" flow of electrons and really got lost because i understand that usually it does not matter in simple circuits which way it goes to make it work but I still wanna get a little bit closer to my understanding: does this dc current (force, what ever you wanna call it) works in a car - a. travels from positive to negative b. from negative through a frame, starter and into positive c. people don't really know at this time so don't bother :) UPDATE: Thank you for the answers and adding to this discussion - Franklin was probably wrong but car manufacturers of 21st century certainly have all the knowledge they need yet the THICK positive cable connects to the starter but probably thick cable connects from starter to frame as well and frame is pretty thick itself :) - it is just interesting to know that there are several circuits using the frame as the path, possibly at the same time - I'll have to read more on that : as far as "electron flow" i read that it may take 1 electron from negative post 4 HOURS to reach positive post so I'm not sure what kind of "flow" we are talking about and if the power that makes gadgets work is indeed the "flow" rather than some "force" or "field" that is instantly present once you close the circuit. I also read that change of frame polarity (positive or negative cable to the car frame) which happened sometime in the 1950s was to better deal with higher voltage systems (change from 6v to 12v) and rusting of car frame and bodies due to electrical current running through the frame. How did switch from positive wire to frame to negative wire to frame help with rusting ? - I still have to do more research to see if it was indeed one of the reasons to switch frame wires and whether it did any good but it seems that manufacturers' thoughts about the way current traveled through the frame certainly shaped their decision to make the change <Q> When the battery is supplying power (discharging) to, e.g., the starter motor, the direction of the electric current is out of the positive terminal through the load and into the negative terminal. <S> Within the wire and frame, the electric current is due to electron current which is in the opposite direction of the electric current. <S> Within the (lead-acid) battery, the electric current is primarily due to proton (hydrogen ion) <S> current which is in the same direction as the electric current. <S> So, there are at least three currents to consider: the abstract electric current (flow of electric charge ), the electron current (flow of electrons, a carrier of negative electric charge), and the proton current (flow of protons, a carrier of positive electric charge). <A> I can't say much about how the electrical system in a car works (as far as what does where), but in any electrical system you will have real electron flow from negative to positive potential (for equilibrium). <S> However, as you have stated, there is what has become known as 'conventional' current flow which is exactly opposite. <S> This discrepancy between conventional and actual current flow was a result of early electrical engineers guessing which atomic element was moving in electrical systems; as you may have guessed, they got it wrong. <S> I have not read of any design in which it was necessary to consider the real direction of current flow, but I am sure there are some really low-level problems that require it. <A> There is as far as I know no real technical reason to prefer one over the other. <S> HOWEVER, COMMA, it is FAR safer for everyone involved if ALL vehicles do it the SAME way. <S> It makes it easier for people hooking up battery chargers and jumper cables to do it right and safely. <S> Today, the standard is 12 volts, negative ground. <S> That wasn't always the standard. <S> One of the cars my parents owned, a long time ago, had a 6 volt system. <S> At one point, I owned a motorcycle with a 6 volt battery. <S> I don't remember what the ground polarity was on either of them.
| Note that when the battery is charging , the electric current is into the positive terminal and out of the negative terminal.
|
When do we need an Operating System in Embedded System Design? I have written plenty of bare metal code for PIC and x86 processors. Can someone tell me how and when should I need an operating system? Conversely, what application or situation can be dealt with or without an operating system as well? <Q> My rule of thumb is that you should consider an operating system if the product requires one or more of the following: a TCP/IP stack (or other complex networking stack), a complex GUI (perhaps one with GUI objects such as windows and events), or a file system. <S> If you've done some bare metal coding then you're probably familiar with the super-loop program architecture. <S> If the product's firmware requirements are simple enough to be implemented with a super-loop that is maintainable (and hopefully somewhat extensible) then you probably don't need an operating system. <S> As the software requirements increase, the super-loop gets more complex. <S> When the software requirements are so many that the super-loop becomes too complex or cannot fulfill the real-time requirements of the system <S> then it is time to consider another architecture. <S> A RTOS architecture allows you to divide the software requirements into tasks. <S> If done properly, this simplifies the implementation of each task. <S> And with task prioritization an RTOS can make it easier to fulfill real-time requirements. <S> An RTOS is not a panacea, however. <S> An RTOS increases the overall system complexity and opens you up to new types of bugs (such as deadlocks). <S> As an alternative to the RTOS you might consider and event-based state machine architecture (such as QP ). <S> Full featured operating systems will include drivers for the low-level details and allow you to focus on your application. <A> It really depends on your definition of an 'embedded system'. <S> There may be some who would claim that if it isn't bare-metal programming, it's not embedded (which precludes your question), but I would disagree with that - I would argue that any system which is designed to perform only one function, i.e., to only run one specific 'application', could be called an embedded system. <S> That said, it should be fairly easy to imagine situations that would benefit from the services of a full blown OS. <S> For instance, where I work it is quite common to find people building test equipment on top of an instrumentation design suite that runs on top of windows. <S> These systems are configured to boot into the test station configuration and lock out general usage (to prevent corruption of the station) and are arguably therefore embedded systems. <S> However, just buying off-the-shelf <S> I/O modules, plugging them into a rack mount PC, and whipping up a configuration in a GUI may fail to qualify as embedded system design to some. <S> For a little less off-the-shelf situation, consider a custom process controller with an FPGA, for which you want to do some fancy data logging. <S> You might embed a soft-core processor system (with an existing BSP) and run a realtime linux in order to run a network stack (for your logging and NTP etc) and do everything else in logic. <A> My (very vague) rule of thumb is if you need more than one thread of control (say at least one device that involves a protocol or a state machine plus something else to do) then some for of OSish software will make your life easier <A> An old question <S> but I'll comment anyways. <S> Even if you don't have network stacks or similar, at the point where you need a task scheduler as you have enough processes in your embedded application, you might consider a RTOS. <S> Writing a simple timer-based cooperative multitasking scheduler isn't that hard but making sure a stuck process won't block the rest of the application and such can take a while to get right. <S> You need to implement a priority system with some kind of provision to bump processes down in the queue if they have not completed. <S> RTOS also gives you things like memory protection and the like which makes it much easier to track some common gaffes in C code but <S> simple microcontrollers simply may not be able to handle complex memory protection. <S> E.g. MSP430 allows you to separate code and data in high level <S> but there's no fine grained memory access control. <A> An operating system actually bridges the gap between hardware and application software (through device driver). <S> In other words, it provides relatively high-level platform for the programmer which ultimately reduces the code complexity. <S> And further, the operating system provides strong and flexible platform for the execution of application.
| If your product has networking, a complex GUI, and a file-system then you might be at the point where you should consider full featured operating systems such as VxWorks, Windows, or Linux.
|
Is this a valid sinusoid? The given image is from first edition of this book To me the first sinusoid seems valid, in sense that values can be computed at different points.However, in the case of second sinusoid I fail so see a logic for computing the various values given.The question is Is the second figure valid? If yes, how ? Update It seems I have created much confusion/ambiguity, and I just realized that I didn't use the 'radian' in my calculation for the points of sinusoid( I'm so pathetically used to the 'degree' unit) What I wished to say was that for the first sampled sinusoid i.e. cosine(pi*n/6) I can, very easily, compute it for n= 1,2,3... and its period, T = 12 For the second case, cosine(n/2), I couldn't compute its values at various 'n' (for the sake of it I didn't/couldn't put in there the 'radian'). Sorry fellows! <Q> The 2nd graph is not exactly periodic. <S> In the second graph, magnitude of X[-5] <S> must = x[7] <S> (this is because the change of n from the local minima is similar), however doesn't. <S> Similarly X[-7] <S> must = <S> X[5] <S> if their distance from the local minima is equivalent. <S> The only time this second graph may be valid is if there's a function that is modulating the amplitude based on the input <S> n <S> like f(n)cos(n), however here there's only frequency modulation cos(\$\alpha\$ n) <S> Correction Second graph is actually valid <S> Although it doesn't seem periodic due to limited samples. <S> It is symmetric from the origin, and if you calculate it out, the period is at 12.5, which is why there's a X[12] <S> is = x[13 <S> ] = 1 (roughly). <A> The sampled sinusoid may look very irregular. <S> Below example is generated witch Octave: octave:15 <S> > x=-13:16;octave:16 <S> > stem(x,cos(x/1.7)) <S> The picture will be even more complex, if we add the phase shift: octave:15 <S> > x=-13:16;octave:16 <S> > stem(x,cos(x/1.7-0.5)) <S> However both figures show true sampled sinusoidal signals... <A> "Valid" has very little meaning, and is not worth debating about unless you further define it. <S> The first signal is periodic, the second is not. <S> If you wish to define a valid sinusoid as being periodic, then the second signal fails that test. <S> You could resample it such that it will be periodic.
| Yes, both are sinusoids, or at least discrete samples of sinusoids.
|
Max switching frequency of GPIO pins of modern cheap FPGA How can we estimate maximum switching frequency of GPIO FPGA pins? What is maximum data rate achievable when connecting two FPGAs together without using of integrated high-speed transceivers? Or when we are bitbanging GPIO to VGA , what is maximum pixel clock? I'm interested in modern cheap Altera devices, like Cyclone IV, Cyclone V (E version, not GT), and Xilinx devices like Spartan 6. There are some figures in datasheets saying 300-400 MHz for GPIO pins, but are they real? How can we drive pin at 300-400 MHz when maximum core clock is only 100-150 MHz? <Q> Short answer: <S> yes, you can achieve 400MHz IO on the general user IO on the Cyclone V depending on your speed grade. <S> For example the hard memory controller can run at a 400MHz . <S> Note also that the fastest speed-grade parts can support an internal global clock of 550MHz . <S> I'm not sure where your 100-150MHz value comes from <S> but that's not a device limitation ;) <S> In practice the top-end of the device capabilities will be very difficult to achieve but you should be able to get close. <S> If you are trying to maximise bandwidth between FPGAs the number of IOs will be limited by your package choice, however there are a number of other factors to consider when estimating bandwidth: Layout and signal integrity. <S> To achieve the memory interface speeds you need to have well matched, relatively short traces. <S> If you are unable to match the traces and keep them short then you may experience signal integrity issues that reduce the frequency below what the device can actually support. <S> If you must use long traces you might consider sacrificing IOs for integrity by using LVDS rather than SSTL or similar. <S> Bus skew. <S> If you're trying to maximise bandwidth by bundling lots of IO onto a wide parallel bus you may have difficulty keeping all the bits synchronous and without some form of calibration this will drastically reduce the frequency. <S> External memory interface have a calibration phase that dynamically adjusts the delay on each bit of the data bus to compensate for skew between bits, you will likely need to do something similar. <S> For example on Cyclone V you can adjust the output delay from 0 to 150ps in 50ps increments but be aware that these values aren't always changeable at run-time so check the datasheet carefully. <S> Clocking. <S> You'll almost certainly want to use a source synchronous clocking architecture rather than sharing an external clock. <S> This will affect your choice of pins. <S> Another gotcha when using wide interfaces is the mismatch in internal routing delays to get to the pins - even if your traces are perfectly length matched the internal delays may skew the bus more than you can compensate for on the receiver so always run your design through the tools and feed this information into your board design. <S> Sometimes it's better to have deliberately mismatched PCB trace lengths to compensate for delays in the device! <A> The speed of the GPIO can be 2-4 times the speed grade of the FPGA itself. <S> This is because many of these IOs are created to support high speed IOs such as PCIe, USB 3 or even 3 and RapidIO just to mention a few. <S> Even if your FPGA's maximum clock is 400MHz, you can access IOs at twice that speed using the DDR blocks of the IO or even 4 times that using a QDR block. <S> It is also possible to serialize and de-serialize the data to/from the IOs, which makes it possible for a low cost FPGA to access high speed interfaces. <S> For example Altera Stratix II has the following IO blocks: <S> I am sure you can find similar description from other FPGA companies as well. <S> You can take a look at this PDF file from xilinx regarding high speed serial IO capabilities of their FPGAs. <S> http://www.xilinx.com/publications/archives/books/serialio.pdf <S> For example, in my last project, we managed to connect and FPGA to PCIe Gen 3 at 8Gb/s even thought the maximum achievable internal speed for the FPGA was about 250MHz. <S> In that project, we used a special PCM module, you can read more about PCIe access support of Xilinx FPGAs at: http://www.xilinx.com/technology/protocols/pciexpress.htm <A> Source synchronous outputs from GPIO can go much faster than the internal logic of the FPGA. <S> As FarhadA stated this is due to all of the high speed IO interfacing requirements even low end FPGAs have to meet today (DDR2/3/4 memory, cameralink, mipi, high speed ADCs, etc). <S> For example the Spartan 6 can do up to 1050Mb <S> /s <S> http://www.xilinx.com/support/documentation/application_notes/xapp1064.pdf See also page 18 of the Spartan 6 datasheet http://www.xilinx.com/support/documentation/data_sheets/ds162.pdf <S> To achieve these rates the outputs are serialized and internal processing is done at a slower wider signal. <S> Specifically the ISERDES and OSERDES blocks are hard ip blocks in the IO tiles of the Spartan 6 FPGA. <S> Xapp1064 will reference much of the appropriate documentation.
| The IO blocks of the FPGA, are designed to support higher speed than the FPGA can support.
|
Why do measurements displayed in multimeter inconsistently vary by factors of 1000 depending on range? For my science fair project, I am measuring the resistance of a 100 foot piece of 32 gauge Nichrome wire. Using a Innova 3300 digital multimeter, I get the following results for each resistance range value: 200 ohms: 1 (to far left, indicating over range) 2000 ohms: 1025-1030 20k ohms: 1.02-1.03 200k ohms: 01.0 20M ohms: 0.00 I understand that precision varies based on the range value, so the right-most digits makes sense to me. However, I don't understand the scale of the left-most digits? Why aren't they all in the 1000 range if actual resistance doesn't change. I have read the manual several times but it just says: Plug the RED test lead into the "Ω" jack of the multimeter; plug the BLACK test lead into the "COM" jack. Set the meter’s Function/Range Selector Switch to the OHM "Ω" range function. Place the RED test lead onto one side of the item being tested and the BLACK test lead onto the other side of the item. (Polarity does not matter when checking resistance). Read the results on the display There is no mention of what the results mean. After thinking about this with my dad and searching the internet, I think I have an answer: The units of the display value are in the units of the range. For example, 200 and 2000 are in ohms, 20k and 200k are in kilo-ohms, and 20M is in mega-ohms. Is my hypothesis correct? And what about the leading zero in the 200k range? <Q> The relevant part in the manual is 200 Ohm range can show <S> 000.0 - 199.9 <S> Ohms <S> 2K Ohm range can show 0000 - 1999 <S> Ohms <S> 20K Ohm range can show 00.00 <S> - 19.99K Ohms <S> 200K Ohm range can show 000.0 - 199.9K Ohms 20M Ohm range can show <S> 00.00 - 19.99M Ohms <S> Regarding your results, they should be interpreted as: 2000 ohms: 1025-1030 Ohm 20k ohms: <S> 01.02K - 01.03K Ohm 200k ohms: <S> 001.0K Ohm 20M ohms: 00.00M Ohm <A> Your meter has a 3 1/2 digit display, which means that the maximum reading it can display is 1999 (with a decimal inserted as needed). <S> The range switch sets where the decimal place is located on the display. <S> On the 200 ohm range, full scale will be 199.9 ohms. <S> On the 2K scale, it is 1999 ohms. <S> For 20K, 19.99 K, and 20 Meg, 19.99 meg. <S> It appears that the actual resistance of your wire is 1025 - 1030 ohms (perhaps poor contact on your probes accounts for the variation). <S> This will display most accurately on the 2K range. <S> On the 20 K range, the last digit falls off the end of the display, so you see 1.02 or 1.03 <S> K. <S> On the 200K range, two digits fall off the end, so you only see 1.0 K, and on the 20 Meg range, four digits fall off the end, so you see 0. <A> Is my hypothesis correct? <S> The reason for this is simply practical. <S> On a 3½ digit display you can't cover the range and precision needed without changing units. <S> Some multi-meters have little letters on the display to indicate the current units. <S> And what about the leading zero in the 200k range? <S> It is easier to display a digit in that position for all valid measurements than to suppress it in cases where it is not needed.
| Yes, it is normal for the units to change on a multimeter as you move up through the ranges.
|
How to float the output of an optocoupler when needed? I want to have an opto-isolated output which can be driven high, low or left floating. I thought of the following circuit but I'm quite new to electronics so I don't know whether it makes sense. Do you think something like this could work? When EN from the input side is high, IC2 is supposed to drive the output high or low. When EN is low, IC2's output should be floating. As I understand it, when the transistor in IC2 is conducting, the OUT pin goes low. When it's not conducting, it floats. So, by itself, the optocoupler can drive the output only to ground or leave it floating. I want to drive it high also, am I understanding something terribly wrong? Edit: Sorry my original question wasn't so clear about what I want to do with this circuit. I want to have multiple copies of the input/output circuit, preferably controlled with just one enable/disable circuit. Also, I'd like to use a high speed device since one of the outputs will be a serial link and I don't know how to find a fast standard-type optocoupler. <Q> You could connect a buffer like SN74LVC1G240 instead of the transistor to control the output of IC2. <S> The output of IC1 goes to the Output Enable input of the buffer. <S> The output of IC2 goes to the A input of the buffer. <S> When the EN is high, the output of IC1 is low, enabling the buffer output. <S> When the EN is low, the output of IC1 is high, disabing the buffer output (floating). <S> I think this should work, but please double-check before ordering parts ;-) <A> One opto input can be the inverse of the other and when you want to tri-state the output, disable the drive to both input LEDs. <S> You'll get a superior switching characteristic too because the rise time for the opto's output is typically 50ns whereas the fall time is typically 12ns. <A> I think a circuit like this would work <S> IN1 controls the pullup resistor and IN2 controls the low side switch that grounds the output. <S> IN1= <S> ON , IN2 = <S> ON output LOW IN1=OFF , IN2 = <S> ON output LOW IN1= <S> ON , IN2 = <S> OFF <S> output HIGH <S> IN1= <S> OFF , IN2 = <S> OFF <S> output FLOAT
| Why not connect the outputs to form a push-pull driver (then there is no need for a load resistor).
|
Is there any disadvantage to running an op-amp off asymmetrical voltage rails? On a PCB I'm working with, I have analog feedbacks running through op-amps into a 3.3V microcontroller. Thus, signals outside 0-3.3V are useless, and potentially dangerous to the microcontroller. The op amps have +-15V rails, because those rails were available and convenient. However, that means it's possible for my op amp to destroy my microcontroller by railing out positive. In perfect operation this should never happen, but I'm considering edge cases. To improve reliability, I'm considering connecting my op amps to +3.3V and -15V. Is there any reason I should not run an op amp off asymmetrical voltage rails? Obviously, railing out negative could also destroy the processor. I'm only considering the positive-rail case at the moment. <Q> As long as the input pins or the output pin(s) of a typical rail-to-rail op amp are between the rail voltages, the "ground" reference is not actually locked to midway between the rails. <S> (n.b. <S> IIRC <S> there are some op-amps which actually have a separate ground pin) <S> To illustrate, let us consider a rail-to-rail input/output (RRIO) <S> op-amp in a voltage follower configuration: <S> We supply the op-amp rails with +/- <S> 9.15 Volts, and inject an AC signal with a DC bias of 7.5 Volts and a peak-to-peak AC amplitude of 3.3 Volts. <S> The output would traverse between +9.15 Volts and +5.85 Volts, which is within the operating range of this hypothetical op-amp. <S> The rest of the operating range, from -9.15 Volts through to +5.85 Volts would be unused so long as the signal stayed within parameters. <S> The mid value, 7.5 Volts, can thus be treated as the "ground" for this signal. <S> In other words, the op-amp doesn't care about the symmetry of the rails, it doesn't know where "ground" is. <S> So, this needs to be accounted for in the strategy laid out in the question. <S> In addition, the MCU pins may not take kindly to a traversal below the MCU ground rail. <A> Should be no problem. <S> A dual-rail Op-Amp has no clue where GND is so running it from +/- <S> In effect this is similar to the case of single-rail Op-Amps that must run from 0V to 3.3V and be biased around Vcc/2. <S> One caveat to mention is that using asymetrical voltages you may run into asymetrical clipping of your signal on the output. <S> A rail to rail swing due to saturation (3.3V to -15V) will probably not clip the positive rail (as 3.3V is far away from 15V) but may clip on the -15V. <S> If this is something you don't care about then go for it. <S> This is an uncommon use of an Op-Amp. <S> I am curious if your MCU can only take 0 - 3.3V why not simply use a rail-to-rail single supply OpAmp such as OP340 ( datasheet ) <A> Overvoltage clamping diodes is a common way of dealing with the risk that an analog section with large supply rails can overvoltage the A/D with logic supply rails. <S> Here’s an example. <S> Suppose that you have a small differential signal, which rides on a common mode, and the latter can vary in a wide range. <S> You need wide power supply rails to accommodate the common mode. <S> Then there’s a concern that the output of the analog stage can overvoltage the A/D. D11 or D12 will clamp, while R7 will limit the current. <S> In this example, the absolute max voltage range for the input is -0.3V to (VDD+ 0.3V). <S> This is just one type of clamp. <S> It’s also possible to clamp with a Zener.
| For a real op-amp rather than an ideal one, there may be some minimum headroom for the output swing, from a few millivolts to a couple of Volts. Hence, a clipping diode to the ground rail, on the input side, would be a good idea. 15V or 3.3V/-15V simply provides a smaller output range.
|
How can I indicate pin 1 on a SMT package footprint without silkscreen Sometimes when I order PCBs from a board house, I omit the bottom silkscreen for budgetary reasons. When I place surface-mount chips on the bottom of the board, I then end up with a footprint that doesn't indicate the chip orientation. This is annoying because it means that I need to verify the component placement and orientation during assembly, and this allows for errors when placing the parts. How can I clearly indicate pin 1 with the remaining layers in a way that will be clear but not significantly impact the PCB size or cause issues when soldering? I'm assuming that I always have access to a solder mask layer and a copper layer. <Q> Have a differently shaped solder mask on pin 1. <A> I add a small dot in the copper layer near pin 1 but if the routing is too dense it may not be possible <A> Unless there are tight tolerances for the pad layout use a different shape pad for pin 1. <S> i.e. oval instead of square. <S> Edit: the difference between this answer and previous answers is the difference between a solder pad and solder mask. <A> I agree with the previous suggestions for altering the pin 1 shape, whether that be in soldermask only, or the pin as a whole (Soldermask & Copper). <S> However, for aiding with the always inevitable debugging and troubleshooting later-on, pin shape & component pin 1 markings may be difficult to identify. <S> It may be preferable to use a small "fiducial-like" marking on the board to emulate silkscreen. <S> This will simply be a small copper marking (dot or line) with a soldermask opening over it. <S> Another idea may be to align all your components to have their Pin #1 in a specific orientation (usually handy for polarized 2-pin SMT devices, diodes, caps etc.)
| For surface mount processors, you could have the pin 1 pad be noticably longer than the others.
|
Single transistor instead of RGB screen In today's screens, each individual pixel is created by the combination of three transistor as Red Green Blue. But, colours are already just different frequency waves. Why aren't pixels made by just one single component to create different colour values? Is it cost or capability of electronic components? -- MORE EXPLANATION -- For each pixel, manufacturers are putting three different colour generating transistors/materials, and by the combination of those colours, we can have millions of different colours. My thought was that if colour is a wave as a photon, and colour of photon changes according to the frequency of it, we could use just one transistor/material for each pixel and change its frequency to have any colour we want. But as explained in comments, colours are very high frequency waves (3-digit Terahertz values), and technologically we are not able to generate those frequencies yet, which explains why it is not done in that way. <Q> I'm taking a guess about what you are misunderstanding, but here goes... <S> colours are already just different frequency waves. <S> This is true, but the frequencies involved are very very high. <S> \$f <S> = <S> \frac{c}{\lambda}\$. <S> So for a wavelength of 640 nm (red), you're looking at a frequency of about 470 THz. <S> That's 470 <S> x 10 12 Hz. <S> We don't have any technology that can route signals at these frequencies over wires, or emit them using the kind of antennas used for RF. <S> Instead we rely on the natural resonances of certain materials (the bandgaps of different compound semiconductors or transition energies of phosphors) to generate these frequencies. <S> And different wavelengths require different materials, which is why pixels in a display require 3 separate LEDs or 3 separate phosphors, for example. <A> The answer is that the LEDs have fixed materials and construction for each color. <S> The thickness of layers of material and exotic materials determining the energy needed for electrons to move from one layer to another. <S> In an LED, when these electron go from higher voltage to lower they emit light and the light matches the energy lost in the movement. <S> For example, you can look at the light from a red LED with a spectroscope to find its wavelength. <S> The wavelength has an energy associated with it. <S> If you calculate the energy in electron volts, it will match the voltage drop in volts. <S> The voltage drop on a typical red LED is about 1.8 volts. <S> And 1.8 electron volts (eV) is equal to the energy of light with wavelength 700nm, which is a very red red. <S> There are also displays that use micro emitters to excite phosphors to glow. <S> These also have fixed colors based on the mix of phosphorescent materials. <S> The calculation for wavelength from voltage drop in an LED is L = <S> hc/E with h= Plank's constant <S> , c is the speed of light, and E is energy in eV. <S> The result L is in nm. <S> The "exotic materials" are gallium arsenide, gallium nitride, and even YAG which was previously found in the highest power research lasers and now is on many green laser pointers. <A> Current technology uses red, green and blue sources of light whether or not it is the old tv tube or LEDs. <S> If you wanted a particular shade of yellow you'd set the intensity of RGB to produce that hue. <S> If you wanted it to be darker or lighter <S> you'd increase or decrease the RGB signals appropriately. <S> How could you do this with a single element picsel - it's not only the colour that is needed but the luminance too. <A> This is a question about transducers. <S> So up to now we can modulate electric and magnetic energy and then to trigger a chemical compound to produce a disired visible light. <S> Same analogy with amplitude modulated electrical signal and to trigger a moving coil acting as a piston to produce air presure in different frequencies. <S> That you want I think. <S> But eye respods to higher frequencies than ear, and up to now there is not a single compound able to change its emission wavelegth so rapidly to produce all visible spectrum without afterglow acceptable by human eyes.
| LED colors come from a combination of their physical construction and the materials used.
|
What tool can make a nice 3D image of a via? I found this graphic somewhere on the web, but now I need to create a similar illustration for some training, but with a 16 layer board having traces coming in on other layers etc. What is the easiest/fastest/cheapest tool to do this? What tool was used for this graphic? <Q> You can zoom into your board in the 3D view in Altium: <S> I changed the view settings to scale up the board thickness <S> (otherwise you can't get a good look inside) and to color the structures by layer. <S> To remove copper from un-used layers like so: <S> In 2D layout mode, open the via properties and select "Full-Stack" in the Diameters panel: Set the diameter to 0 for desired layer: <A> Mechanical 3D CAD tool, such as SolidWorks or AutoDesk Inventor can create an image like that. <S> The image below was done in SolidWorks (by me). <S> An artistic 3D animation package should be able to create an image like that too. <A> I recently found "ZofzPCB" ( https://www.zofzpcb.com/ ). <S> It seems to do a fairly stellar job of making a PCB look absolutely beautiful and geometrically accurate. <S> I've been using it at work to sanity-check Gerber files (it's natively supported format) before manufacture. <S> In particular it does a good job of showing layer connectivity for vias, and PTH features. <S> Thermal reliefs of all kinds are nicely displayed. <S> One of my favourite features is the "Spread" layers view, where it explodes the PCB and elongates all the vias to reveal all net / layer / plane connections. <S> FD: (I'm not affiliated in any way with ZofsPCB software)
| High end EDA tools, such as Altium, have 3D visualization (nowadays).
|
5V and 3.3V power supply I too want both supplies (3.3v and 5v) in my circuit and made these schematics: On 5v supply typical load current is ~8mA. On 3.3v it is ~30mA. Regulators are lm1117 in both cases,sot-23 packages and no timing issuesWhich one is better? <Q> Depending on your input voltage, but at that low current, it makes no real difference. <S> You would simply be changing which one gets the bigger energy wastage (in watts). <S> The LM1117 shown in your picture has a 5mA quiescent current, a minimum load current of 1.7mA, and typically up to 800mA regardless of the package. <S> 15v <S> Max input. <S> You are using 9v, through a diode. <S> This is simple Ohm's Law calculations for Power <S> (P = I * V) Since they are Linear regulators, Current in is Current Out. <S> For the first schematic, that means 9v - 0.7v (Diode Drop), <S> 8.3v - 5v = 3.3v voltage drop at the 5v regulator. <S> Then 5v - 3.3v = 1.7v voltage drop at the 3.3v regulator. <S> Then we can calculate heat dissipation. <S> 1.7v <S> * (30mA Load + 5mA Quiescent) = <S> 0.06W for the 3.3v reg. <S> For the 5v reg, we have to add the 3.3v's current load to the calculation. <S> 3.3v <S> * (8mA Load + 35mA <S> 3.3v's Reg + 5mA Quiescent) = 0.159W . <S> Grand total wasted power of 0.219W, with 75% of it on the 5v regulator. <S> For the second schematic, its almost the same. <S> 3.3v drop for the 5v regulator, but 8.3v - 3.3v = 5v drop for the 3.3v regulator. <S> Since the 5v regulator doesn't carry the 3.3v's load, it's just 3.3v <S> * (8mA Load + 5mA Quiescent) = 0.043W . <S> The 3.3v regulator though, 5v <S> * (30mA Load + 5mA Quiescent) = 0.175W . <S> Added together <S> , it's 0.218W, with 75% on the 3.3v regulator . <S> In any case, the 0.218W in heat is nothing to be concern about. <S> The regulators won't even get warm, let alone hot enough for a heatsink. <A> The first circuit requires the 5 V regulator to dissipate more power than the second does, because its current load is much higher. <S> If you can replace one of your regulators with a smaller/cheaper part by using one or the other version, that should drive your decision. <S> For example, in the second circuit you might be able to use a tiny SOT-23 regulator for the 5 V. Or in the first circuit you might be able to use a smaller package or avoid using a heat sink on the 3.3 V regulator. <A> Which is better? <S> is a too broad question. <S> Better in what sense? <S> Current source capability? <S> Voltage drop? <S> You need to provide the judgement factor. <S> The second one has follow advantages over first: <S> Immunity wrt fault in 5volt regulator. <S> If 5v regulator goes off for any reason then input to 3.3volt regulator might cut-off. <S> Better current branching. <S> In the first design the current supplied to the 3.3 regulator is coming from 5v regulator. <S> In certain cases the 5v regulator may bottleneck(limit) <S> the 3.3volt regulator's current output. <A> The specified LM1117 "dropout voltage" is 1.2V max at low current so the 3V3 regulator with 5-3.3 = 1.7V "headroom" will be OK. <S> The 1st circuit does not allow 3V3 out with 5V off. <S> This may or may not matter in your case. <S> The 1st circuit has potentially better power input noise rejection due to having two regulators in series BUT construction has to be done with due care to achieve this in reality. <S> At the power levels mentioned max dissipations are small and either arrangement is OK heat wise in almost any situation. <S> At higher power levels the 1st circuit limits the amount of power you can get at 3V3 due to heating of the 5V regulator by the 3V3 current. <S> Not an issue here.
| The second circuit requires the 3.3 V regulator to dissipate more power than the first does, because its voltage drop is much higher.
|
What can the dsPIC do which the humble PIC microcontroller cannot do? I have not used a DSP chip as of yet. All I know is that their architecture is such that they can carry out calculations quite fast, usually within a clock cycle, they have multiply-accumulate instructions in their instruction set and they have DMAs so the CPU does not have to waste precious time moving data around. I think there is more to it, but these are a few basic points. I can see that Microchip has dsPIC which is their DSP chip line. Can't we just use a PIC18 or PIC32 which also has built in multipliers to do DSP as well? How is the dsPIC different from the normal PIC? My main question is this, Why do we need to have something seperate and distinct called DSP chip and not integrate high precision floating point unit calculation capability on all the microcontrollers? Surely with the process technologies we have now, this should not take a lot of space. Also, how do I know that I need to use a DSP chip in my project rather than a normal microcontroller> <Q> Some of the advantages of a dsPIC over earlier-architecture PICs, like the PIC 16 and 18 families: 16 bit wide data paths and ALU, as apposed to 8. <S> Ability to directly address (later versions of both architectures extended this in various kludgy ways) <S> more data memory. <S> A basic PIC 16 can address 128 bytes directly, 512 with banking. <S> The newer PIC 16F1xxx have extended banking to allow addressing more data memory. <S> The PIC 18 architecture is limited to 4k bytes. <S> The dsPIC architecture can address 64k bytes or 32k 16-bit words directly, although for various reasons only half of that is available for RAM in the basic architecture. <S> A banking scheme in some of the later models has extended that. <S> Faster. <S> The original 30F could run at 30 MIPs, with 40 MIPs parts the norm now. <S> The new E series can run up to 70 MIPs, although there are more reasons it might stall waiting on something than the earlier slower models. <S> They are still significantly faster on average. <S> DSP capability. <S> The DSP engine has two 40-bit accumulators and the usual hardware to perform a sequence of MAC operations on arrays one MAC per instruction cycle (see Dave Tweed's answer). <S> The MAC and related instructions overlap array indexing and loop termination with the actual multiply-accumulate. <S> 15 software-usable 16-bit "working registers" instead of the single 8-bit W register of the 8 bit PIC architectures. <S> Barrel shifter. <S> Single-cycle 16x16 --> 32 bit multiply. <S> Hardware divide. <S> A 32 div 16 -- <S> > 16 bit operation takes 18 cycles. <S> Lots of 3-operand instructions. <S> For example, you can add the contents of two working registers and put the result into a third, all in a single cycle. <S> This applies to most math, logic, and shift operations. <S> Overall more regular and symmetric instruction set. <S> Vectored interrupts. <S> The PIC 16 has a single interrupt vector, and the PIC 18 has two. <S> On the 16 bit parts (PIC 24, dsPIC 30 and 33), each interrupt source has its own vector. <S> This reduces latency in the interrupt routine because it doesn't have to spend cycles figuring out which interrupt to service. <S> This also allows for better software architecture. <S> The interrupt routine for a particular peripheral can be in the same module as the other code handling that peripheral, instead of having to have one global interrupt routine. <S> Various other advantages that fall out from the wider architecture. <A> One of the most basic operations in many key DSP algorithms is the MAC (multiply-accumulate) operation, which is the fundamental step used in matrix dot and cross products, FIR and IIR filters as well as FFTs. <S> A DSP will typically have a register and/or memory organization and a data path that allows it to do at least 64 MAC operations on unique data pairs in a row without any clocks wasted on loop overhead or data movement. <S> General-purpose CPUs do not generally have enough registers to accomplish this without using additional instructions to move data between registers and memory. <A> Generally "DSP..." means 'more relevant horsepower and/or more relevant hardware at the time the product was introduced .' <S> Generalised processors tend to catch up with olde specialist devices. <S> DSPIC is p[robably 10+ years old - Olin will know. <S> [Items in brackets relate to some DSPIC examples - not exhaustive]. <S> In DSP products expect some mix of: Expect things like barrel shifters, wide fast pipelines and fast single cycle execution times, wide single cycle instructions, DMA [6 or 8 channels, dual port RAM buffers]large linear memory addressing ranges [4 Mword program, <S> 64 kB data]specialist arithmetic oriented features <S> Maybe: specialist peripherals such as motor control, hardware for several different coms standards [CAN, IIC, UART, IIS, AC97, ...] <S> deeper than usual coms buffers <S> [4 bytes]faster and/or wider than usual ADCs <S> [2 Msps, 10 or 12 bit] <S> You'll find most of these in the DSPIC family - and increasingly so in gp processor families. <S> In extreme cases you get user microcoding and more.
| Usually, the key distinguishing feature of a DSP when compared with a general-purpose CPU is that the DSP can execute certain signal-processing operations with few, if any, CPU cycles wasted on instructions that do not compute results.
|
Why does my switch need to be wired in this fashion? Today was my first foray into electronics since high school, in the form of some simple Raspberry Pi experiments. I managed to get a circuit working where a switch controlled an LED with a potentiometer to control the brightness of the LED. However, I am confused by the wiring of the switch. Firstly, here's a photo of my amazing work: NOTE: the black lead on the potentiometer is not connected to anything (hard to tell in the photo). Also, I realised afterwards that I could have just inserted the potentiometer into the breadboard rather than soldering wires to it. Noob mistake (one of many). Here's an attempt at a schematic (also probably wrong because I don't know what I'm doing): simulate this circuit – Schematic created using CircuitLab As you can see, I used a PiFace , which comes with the four switches located at the left and towards the bottom of the photo. It is the wiring of this switch that befuddles me. Since each switch has two terminals, I was expecting one terminal to act as an input and the other as an output. That is, I just feed my circuit through those two terminals and job done. But that didn't work. I managed to find this image online: This is what prompted me to guess the configuration below, which works. However, I don't understand why it works. Nor do I understand why there are two terminals for each switch if only one seems to be used. I suspect the clue is embedded within the text in the above image: The four switches, numbered S1 to S4 are connected in parallel to the first four (0-3) inputs However, I do not understand what this means. Perhaps a practical example of how I would use each terminal and an explanation of why the grounding is necessary would help my understanding. <Q> For the grounding it's easy. <S> Basically a switch can have not 2 but 3 state. <S> Basically High <S> when pressed Undefined when unpressed and not grounded Low when unpressed and ground <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Grounding it will allow you to make sure the output low, without that it's a short circuit. <S> So basically you'll use a pull-up or pull-down resistor for that. <S> They are connected in parallel means they are not connected one after each other but side to side. <S> Example simulate this circuit <S> If pressed, it's like all the switch are pressed. <S> But hard to tell without precise schematics. <A> From PiFace.GitHub.io via PiFace.org.uk <S> The eight input pins detect a connection to ground (provided as the ninth pin). <S> The four switches are connected in parallel to the first four input pins. <S> The inputs are pulled up to 5V. <S> This can be turned off so that the inputs float. <S> From this I surmise the following simulate this circuit – Schematic created using CircuitLab <A> Read the data sheet before you start connecting to something. <S> Your assumption that because there are nine terminals and four switches that 'each switch has two terminals' is unfounded.
| So from what I read in your question, the switch sound like a "master switch" who can act on both of the 3 other switch. The 9 terminals are 8 input channels and ground. As the text you quoted says, the switches are connected between the first four channels and ground, so the connection in your photo agrees with the schematic.
|
Why does ADC conversion time vary? I'm using TI Tiva C TM4C123GH6PM on a Launchpad combined with an AD 9850 DDS to create frequency modulator. Currently I have an extremely simple program which basically sets up microcontroller's peripherals and the AD9850 and then goes into a loop in which it samples audio signal coming to the microcontroller's ADC and based on the results adjusts the output frequency of the DDS. My problem is that the loop's execution time is not constant. The loop is divided into three basic parts: In the first part, I get a sample from the ADC, in the second part, the required settings for the AD9850 are calculated and in the third part those settings are sent to the AD9850. After doing some cycle counting, it turns out that the second and third part always last for 2670 clock cycles. This leaves me with the only suspect being the first part. After measuring the execution time of the first part just by itself, I've noticed that it varies from as low as 100 cycles to as much as 8000 cycles. Here's a nice graph I got from the debugger showing how the number of cycles changes with time: I did look into the datasheet of the part and into the Tivaware Peripheral Driver Library User's guide and I couldn't find a reason why the sampling would have such drastic jitter. The ADC sampling plus conversion time is listed as 1 microsecond, which is around 80 processor cycles, since I'm running at 80 MHz clock frequency. This makes the loop duration in the area of around 100 to 200 cycles look OK, but I have absolutely no idea what's happening in the case when the time is in the thousands of cycles. I have also read the errata for the ADC and as far as I can see, none of the numerous problems apply to my case. Also the part I have is an actual TM4 part, not an experimental XM4 part. Here's the problematic part of the code: c_start = HWREG(DWT_BASE + DWT_O_CYCCNT); // starts cycle countingROM_ADCIntClear(ADC0_BASE, 3);//clears interrupt flagADCProcessorTrigger(ADC0_BASE, 1);//Triggering sequence 1while(!ROM_ADCIntStatus(ADC0_BASE, 3, false))//Waits for ADC to finish converting{//Busy wait to be replaced with an ISR at some point}ROM_ADCSequenceDataGet(ADC0_BASE, 3, adcData);//adcData pointer to memory location //used to store resultsc_stop = HWREG(DWT_BASE + DWT_O_CYCCNT); // Ends cycle countc_dur=c_stop-c_start;//Provides number of cycles, refresh breakpoint goes here Here's the ADC setup code: ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);//Pin is PD1=>channel AIN6ROM_ADCHardwareOversampleConfigure(ADC0_BASE, 64);//Averages 64 samples and stores them in one FIFO slot,//has apparently no effect on the conversion time, same results when disabledHWREG(ADC0_BASE+ 0x038) = 0x40;//This enables hardware ditheringADCSequenceConfigure(ADC0_BASE,3,ADC_TRIGGER_PROCESSOR,0);//Uses ADC0, sequence 3=>FIFO with length of one, highest priorotyADCSequenceStepConfigure(ADC0_BASE,3,0,ADC_CTL_CH6|ADC_CTL_IE|ADC_CTL_END);//First and last step, selects ADC0, sequence 3, step zero, channel 6,// enables interrupt and ends sequenceADCSequenceEnable(ADC0_BASE,3);//Enables sequence UPDATE: I went ahead and did the test with pin wiggling and I got relatively similar results. On this image, a pin goes high and then immediately low as soon as ADC is done. This is taken with dithering and hardware oversampling disabled, with sample rate of 1 MSa/s and FIFO buffer depth of 1. <Q> While there are reasons described by others concerning where your jitter may be coming from, being dependent upon things like conversion time (or even hidden branches in function libraries where each branch takes different times) is just poor practice for real time systems. <S> If you need low jitter loop time, you need to MAKE IT by creating a timer interrupt to give it to you. <S> If you need speed, the timer should be set at your maximum time through your loops, plus a bit of head room. <S> On a timer interrupt you should service everything that needs to be done based on your last ADC read, then do the next ADC read. <A> When this happens, the microcontroller does not reset itself. <S> If it did, I would see that in the debugger. <S> I suspect that you are always running this under the debugger and you have set a watch on adcData because it's interesting data. <S> The IDE is helpfully preserving that between runs. <S> I will further guess that the TI processor supports hardware watchpoints on memory writes, and the debugger is using those to catch updates to adcData . <S> Each time through your loop the debugger hits the watchpoint and stops for as long as it takes for the external debugger to read out the data and resume the chip. <S> If you kept the bit wiggling and ran without the debugger you could test this theory. <A> As a sidenote, the ADC acquisition time is supposed to be finite, but I have seen some variance in characterizing components. <S> The datasheet likely gives a typical or a "guaranteed by design". <S> Also, the validity of each aquisition isn't guaranteed due to noise, either from layout or otherwise. <A> You don't mention interrupts, but I see that you're clearing an interrupt flag in the code. <S> If you haven't yet, try disabling interrupts globally. <S> If any other interrupts are going off, they may be causing this jitter. <S> With a software-based loop, there are lots of things that can cause irregular execution. <S> The most reliable way to get precisely sampled data is to trigger the ADC using a reliable source like a timer (which I believe you can do with no external hardware on this device). <S> The same timer signal could trigger an ISR, where you can collect and use the result at greater leisure, or it could trigger DMA to copy samples into a buffer of some sort. <S> I suggest caution with libraries like TivaWare. <S> They are usually written for convenience, not high efficiency. <S> If you can track down the source code, you will probably find that they are doing a remarkable amount of housekeeping in those routines. <S> Very often you will get much better performance by hitting the registers directly. <A> There are 3 most used types of analog to digital converters. <S> Counter type ADC. <S> Successive approximation type ADC. <S> Flash type ADC. <S> Counter type ADC: <S> In this type the input is compared with a reference voltage digitally generated.the reference voltage is increased step by step til <S> the reference voltage is greater than input voltage. <S> Successive approximation type ADC: <S> In this type the same principle is used but in a smart manner. <S> first input voltage is compared with Va/2 (where Va is the upper limit of input voltage) to find in which half it lies . <S> if it is greater than Va/2 <S> its is compared with <S> 3Va/4 else it is compared with Va/4 to find in which quarter it lies. <S> Something like a binary search in computer programs. <S> Flash type ADC: <S> In this type the input voltage is compared with all the voltage levels at the same time and corresponding output is given . <S> The time taken in this type of conversion is constant and does not depend upon the input voltage. <S> For more info on ADC read pdf: <S> http://www.physics.arizona.edu/~haar/ADV_LAB/ADC.pdf <S> I suggest a Flash ADC would be best for your circuit. <S> If you want work on the same hardware there are two thing you could do. <S> find the maximum time (Ta) <S> the ADC takes for conversion . <S> Set a timer interrupt to any value more than Ta. <S> Each time you request a conversion start the timer, and execute the rest of the code only after the interrupt has occurred . <S> this is not the best way but you will get ADC conversion in a constant time.code structure will look something like this: (part 1): Request for conversion. <S> Set up timer interrupt. <S> i=0; while (i==0) <S> {} //no need of polling store data from ADC execute part 2 and part 3 same as before Interrupt service routine for timer interrupt <S> {i=1;} Note:set up timer interrupt <S> means set the timer to 0 and enable interrupts. <S> OR use the ADC in free running mode (ADC keeps converting no matter a conversion is requested or not). <S> Each time you want to take a sample ,just load it without requesting for ADC conversion . <S> no need of while loop. <S> (But for this method to be used your ADC must support free running mode)
| So for different input voltages the time take for conversion is different.
|
What is the purpose of inserting resistors (diodes?) directly on the path of the VCC and GND lines powering a PCB? I am trying to learn electronics by looking at simple circuits and see how engineers get the job done. Looking at a PCB featuring only one Texas Instruments ADS1115 ADC, I see that: They bridge VCC and GND with a capacitor as close as possible to the power lines arriving at the PCB. I guess it's 100µF (shown in the picture). They do the same on the VCC and GND as close as possible to the chip (not shown in the picture). They have pull-up 10K resistors on the SDA, SCL and ADDRESS lines. I guess it's because they wish those to be high when not driven (not shown in the picture). However, I do not understand why they have two parts (black 0805) inserted in the VCC and GND lines arriving on the board (shown at the top of the picture). Are these resistors ? What would their purpose be ? The board can be powered from 1.8 to 5 V. Maybe they are only diodes? In that case, the polarity should be marked. And there would be a voltage drop across. I am also puzzled, because these parts are across the VCC as well as the GND. In my mind, there is never any part splitting the GND line. <Q> I think they may be inductors - a series inductor and a parallel capacitor across the target chip's power and ground line offer greater power supply rejection (in a lot of cases) compared to just a capacitor and no series component. <S> Care has to be taken though; the series L and parallel capacitor can form a resonant tuned circuit and exaggerate certain frequencies of noise coming from the digital supplies. <S> Given that this is an TI chip, there may be a kit you can buy from them that uses this part <S> - try looking up the details of the kit to see if you can track down whether these parts are inductors or not. <A> "I am trying to learn electronics by looking at simple circuits and see how engineers get the job done." <S> Bad idea unless you know for sure it's a good design. <S> There is a lot of crap published out there. <S> In fact, bad designs are more likely to be published than good ones. <S> Professionals that create good designs are usually too busy to write up a web page <S> , don't think their design is a big enough deal to bother writing up, and often can't disclose their schematics anyway due to confidentiality issues. <S> It's the hobbyist who can barely spell "EE" and just spent a week getting a arduino to blink a LED that will proudly publish the results of his herculian effort for all to see. <S> I don't see any picture of a 100 µF capacitor. <S> You also have't shown the schematic, so I can only answer in general. <S> It is usually a good idea to put a reasonable energy storage cap, like 100 µF, at the power supply input of a board. <S> The local capacitor will supply medium-time current surges required by the board before the current can build up in the possibly long wire back to the power supply. <S> The power supply may also take some time to react. <S> This is called a bypass cap . <S> It's the same concept but even more local and for higher frequencies. <S> I go into more detail here . <S> IIC bus lines are specified to float high and be actively pulled low. <S> The 10 kΩ pullups provide the floating high part. <S> Basic IIC is limited to 3 mA source current when held low. <S> Note that when pulled up to 5 V, a 10 kΩ only provides 500 µA. <S> That's OK, but the pullup therefore could be lower, which would allow the bus to run at higher speed. <A> These are MMZ2012Y152B ferrite filters and your 3rd guess about I2C pullups is correct. <S> The schema including components names is on the manufacturer Github .
| This is so that you can tolerate some impedance in the power supply feed.
|
sharing one 110VAC circuit with two high amperage devices I have a fairly simple need and there may be a commercially available device that does this, but I have not found it. I need to buy/make a 110VAC device that will automatically switch between two devices plugged into it. It would have one plug and two (or more) receptacles. Receptacle "A" would be by default "on". Receptacle "B" would only turn on by demand by the device that is plugged into it switching on which would automatically switch off receptacle "A" before switching "B" on. This is to prevent overloading a single circuit and tripping a breaker or over loading the wiring. Is there a name for this type of device? I have searched Google without success. Are there commercial sources for it already built? Is there a way to build one otherwise? Thanks! <Q> You didn't give much detail, so this is only a high level knee jerk reaction. <S> Get a relay appropriate for switching the two AC feeds. <S> Either make sure this is a break before make relay, or you can use two separate relays that you manage yourself. <S> The unenergized state routes the power to outlet A, with the energized state routing it to B. <S> That was the easy part. <S> The hard part is detecting which state the relay should be in. <S> One way or another you'll have to measure current on B to decide when to switch it off. <S> This is probably best done with a current transformer. <S> This can also be used to detect current draw on B when it is switched off. <S> Instead of switching off B completely, there is a resistor providing a little bleed current, like a few mA. <S> The relay for B shorts accross this resistor to turn on B. <S> The current transformer output is conditioned and presented to the A/D input of a micro, which then looks at the magnitude of current and decides what to do. <S> It can also do a few useful things you didn't mention, <S> like wait a second or two to switch either direction so as to not respond to short glitches. <A> As a student I lived for a short time in a caravan. <S> I used a circuit like you described, but with more outlets, to switch the available current (10A at 220V) between the various heat-generating devices: cooking was highest priority, air heating next, a water-filled radiator lowest. <S> (There might have been more.) <S> I simply detected the current by a few turns (20 or so) of the current-conducting wire round a reed switch. <S> When energized, it cut of the power to 'lower priority' devices by activating a relay. <S> A problem was that the cooking gear could draw either half or full power, and the reed switch had to engage reliably at half power. <S> I recall a lot of buzzing from this 'switchbox', but it worked reliably for the ~ 6 months I lived there. <A> For current sensing I'm thinking of a solution using a Hall-Effect-Based Linear Current Sensor such as ACS712 . <S> It can be directly connected to AC loads(supports up to 30 amps), has a very low resistance, the output is isolated from the input and most importantly the output is a DC voltage proportional to the input current <S> so there is no need for any conversions of AC to DC. <S> The output selection mechanism can be based on a couple of comparators driving solid state relays or use a microcontroller to do more complex calculations if needed.
| When device on B tries to draw current, it will get just enough to detect via the current transformer. It can also easily manage two relays to perform break before make.
|
Arduino as ISP: IC swapping I usually use my Arduino as an ISP programmer. Let's say I want to program the blink LED code to my ATmega328 with the bootloader already in it. Can I just program it in the classical way and pull out the chip from the Arduino? Is there any problem doing like this? It sounds easier and quicker. (I'm talking only about ATmega328 with the bootloader already in it, not ATtiny or other ATmega chips.) <Q> Short answer: <S> Yes you can. <S> Longer answer, mostly stating the obvious for those who might need it: <S> Evidently one would need an Arduino with a DIP socket and DIP ATmega microcontrollers - while the classic Uno and several other Arduino boards have this, some of the newer ones are SMD-only. <S> This won't work with a fresh ATmega MCU, i.e. one without the bootloader - this is of course already addressed in the question <S> The microcontroller ICs can be sensitive - both to manhandling while pulling the IC out (pins break), and possible ESD damage if the pins are not handled with care. <S> The ATmega family is pretty hardy though, so ESD is not as big a risk <S> If this method of programming is to be done for a bunch of MCUs, it would be better to use a breadboard or ZIF socket, rather than the socket on the Arduino <A> Can I just program it in the classical way and pull out the chip from the arduino ? <S> and then you can pull it out and place it on a breadboard (connecting the supplies and crystal) <S> and it will work fine. <S> To put it another way, you can get any empty chip like mega88/168, place it on a breadboard, program it once with the arduino bootloader (using an ISP serial programmer) and after that you can use the bootloaded functionality to program the chip on the breadboard. <A> Apart from wearing out the socket, there is no "problem" with using that tactic. <S> In fact, there are several "roll-your-own" Arduino projects which utilizes other ATMega chips besides those commonly used in commercially available Arduino boards. <S> Build Your Own Arduino Compatible Board How to roll your own programmable Arduino/AVR board Building an Arduino on a Breadboard <A> You can also use an FTDI cable or FTDI breakout board (2 examples linked) so you can program your chip right on the breadboard or in-circuit. <S> Including four more header pins (for Vcc, Gnd, RxD, TxD) on your board makes it quick to connect the FTDI cable.
| Sure you can, you place the chip (that already has a bootloader) to the arduino board, program it
|
Designing ammeter for an external ATX power supply adapter I'm trying to design and build an external ATX power supply adapter, much like this one . I want to use it as a benchtop power supply.I wanted my adapter to have one more feature: I wanted it to have a voltmeter and an ammeter at each positive rail (+12V and +5V). I'm planning on having an ATmega328P do the voltage readings and display them in a common 16x2 LCD. Here's where my problems begin. I'm having trouble designing the ammeters . My first attempt at it was the schematics below. The idea behind the schematics is that I'll read voltages in ports A0 and A2 to determine voltages of +12V and +5V rails, respectively, using ATmega328P ADC. There I would have my voltmeters, no problem. The voltage dividers in each circuit are there to bring voltages to the ADC's 5V limit. To determine currents for the +12V and +5V rails, I would calculate the differences A1 - A0 and A3 - A2 , assuming I'll be using 0R1 (0.1 ohm) 5W shunt resistors . The shunts I'm planning to use yield 100mV/A. I plan on making readings well below 7A to respect the 5W spec on the resistors. The problem is that I'm not comfortable having to make two readings to get the currents. I would much rather have the shunt connected to ground and then make a single voltage reading at its other end using the ATmega's 1.1V internal analog reference. That would give me the accuracy I want, all the way to about 6A. But then I don't know how to design such circuit so that all current that goes to each rail gets measured. So, my question is: Is this design going to work? I'm afraid I won't have enough accuracy, especially because I'm depending on two readings to calculate current. Will the stacked up errors be too much? Another related question: is there a better way to measure the current of each rail? <Q> You could use an ACS712 Hall-effect sensor - the sensor output is electrically isolated from the circuit being measured. <S> Available from Sparkfun, mounted on a small PC board. <A> Note that the resistance of the voltage divider in your schematic is too high for the AVR ADC input. <S> The recommended output impedance of the divider should be 10K or lower so that the internal sample & hold circuitry of the ADC operates properly and gives correct results. <A> A single-ended reading from the perspective of your micro is the way to go. <S> Use an accurate analog circuit to compute the difference and quantize that difference with a single ADC channel to get your reading. <S> I suggest using a smaller shunt (something that will produce 10mV at your maximum load) and a part from the INA210 family - <S> these parts are highly accurate and work in both the high-side and low-side. <S> If you don't end up with the exact gain you want, you can simply voltage-divide the output of the INA21x and feed that into your ADC input.
| Apart from the suggested solution of the previous answer you can also use INA138 Or a chip that doesn't need external supply like ZDS1009 (uses a current mirror)
|
How does the phone detect if 3.5 mm jack circuit is closed? I have an android phone to which i have plugged an earphones. So at the top of the phone, I get the headphone symbol which indicates that the earphone is connected (In other words, the circuit at the 3.5 mm jack is closed). Then I cut the two earphones (transducers) from it, and still the headphone symbol shows . When I later cut this cable, below where it branches out, even then it shows circuit completion. So my question is this: How does the phone detect circuit completion at the 3.5 mm jack and thus trigger all sound and music to be directed through the 3.5mm jack? <Q> Headphone jacks have extra contacts inside, which act as switches. <S> The the drawing below, pins 4 and 5 are intended for sensing that the plug was inserted. <S> They are not intended for audio signal. <S> When the plug is not present, the switche, which are formed by 2 & 4 and 3 & 5, are closed. <S> When the plug is inserted, these switches are open. <S> The plug flexes 2 and 3 slightly, and they break contact with 4 and 5. <S> You could insert a 3.5mm plastic rod [a dummy] into the jack, which will open the contacts, and the phone might think that earphones are plugged in. <A> On Android phones, on iOS devices, and on HD Audio PCs, no mechanical switches in the socket are used. <S> Instead, the headphone socket has 4 contacts instead of 3, and accepts both 4-contact headsets and 3-contact headphones. <S> The sleeve of the 3-contact headphone audio jack connects two of the socket contacts together. <S> One of the contacts is responsible for microphone and usually feeds 1.5-3.3v of voltage through a current limiting resistor (2-10 kOhm), which is necessary to bias a JFET transistor in the microphone capsule of a headset. <S> DC resistance measurement between the microphone pin and the ground pin of the socket can be used to detect the kind of device plugged in - it will be 0 Ohm for a headphone, infinitely high for no device connected, and about 2 kOhm thereabouts for a headset with microphone. <S> The bias current limiting resistor forms a part of voltage divider network, with the other part being the above mentioned DC resistance. <S> Voltage measurement on the microphone pin is taken to both determine the sound pressure on the microphone (through a 100hz high pass filter thereabouts) and the kind of jack or device inserted (through a low pass filter or noise rejection logic), allowing this design to be implemented without extra parts, if the filters are implemented digitally. <S> Corresponding to the above DC resistances, you will measure about 0V on the microphone pin if headphone is connected, the full mic bias voltage in case nothing is connected, and something in between in case a headset is connected. <S> Switches in the audio jack like in the answer above were common in older electronics, but are incompatible with headsets and are just too bulky for a high-tech handset. <A> There have been quite a few answers on this, but still some additional clarifications may be helpful: <S> when the insertion is detected by some means, the headphone amplifier may enter a detection mode (see e.g. WO 2006045617 A3 patent application) where the host device detects what is connected (stereo headphones, mono headset with mic, stereo headset with mic, video connector, etc.) <S> and in which order the ground and microphone wires are. <S> This is included in the latest revision of the OMTP headset standard. <S> This kind of detection wouldn't be fooled by a non-connected plug in the original question. <S> Apple 3.5 mm jacks employ a proprietary device identification chip connected across the microphone line. <S> This performs a handshake when the accessory is inserted and headset controls use this for controls. <S> If an Apple device doesn't find this chip in a headphone it assumes that it is a basic stereo headphone without a microphone or any controls. <A> There is definitely an additional contact (and in some jacks, two !) <S> that is connected to ground when the jack is empty, and is mechanically lifted from ground as soon as a plug of the proper diameter is inserted. <S> This extra, non-audio circuit is opened as soon as the tip of the plug acts on the contact mechanism, and remains actuated until the plug is completely removed. <S> What I just described is called a "normally closed" switch. <S> Some jacks contain a "normally open" switch instead, which is the opposite of what I just described, as it connects to ground only when a plug is in the jack. <S> In either case, the additional mechanical switch has nothing to do with the audio signals, and does not make any contact with the wiring connected to the plug. <S> This additional mechanical switch is very well-insulated from all the wires and contacts that are connected to the audio circuitry, as it could really mess things up if it wasn't! <S> This additional mechanical switch simply provides a signal to the equipment to allow it to sense when something has been inserted into the jack, and then act accordingly. <S> It's a relatively recent development, say no more than 20 years ago. <S> The "inserted" signal pretty much needs to be acted upon by digital circuits like computers and sound cards, so it's not very effective in an old-school, pure- analog device. <S> Back in the pre-computer/smartphone days, some jacks included mechanical switching to disconnect the signal flow from it's normal destination and instead direct it to whatever was plugged in. <S> This usually served to disconnect the speakers when headphones were plugged in, but with modern, high power amps, it is more than a little dangerous to do that, as it could blow up headphones, amps and eardrums. <S> A previous comment included a schematic diagram of that kind of jack. <A> Most jack sockets include a switch that is opened when a jack is inserted.
| yes, quite a few headset jacks include still an insert detect switch, which may also be a signal switch for simple (mono) headsets. Source: datasheet for a typical stereo jack.
|
Is therea mcu/cpu with an isolated stack (via hardware or compiler)? There's the harvard architecture, which isolated the data and code buses. Is there an architecture which also isolated the stack bus in hardware ? or at least some compiler that implements a dual stack - one for return addresses and registers and one for local variables ? <Q> While most processors have hardware designed to make implementing and using a typical C style stack easy, typically the stack is compiler defined using built in compiler code. <S> You could implement your own compiler that creates and uses a different style of stack. <S> In your case you'd be looking to implement two separate stacks, one with input, local, and return variables,and one with call/return locations. <S> You could implement both stacks in a section of memory that can't be executed, nor referred to by pointers in the rest of the code <S> so it can't be altered except by compiler defined function calls and returns. <S> By locating the local variables apart from the call/return stack you'll prevent some types of buffer overflow attacks. <S> Section 10 of Basics of Compiler Design (Free, PDF, 1.6MB) explains function calls and the call stack. <S> If you review that section you'll find that the design of the stack that includes both calls and local variables is very convenient for a number of reasons. <S> Splitting them up might increase security, but you're slowing the processor and program down by dealing with two stacks. <S> However there are a large number of research processors with various methods of preventing buffer overflow attacks , some of which include concepts similar to yours. <S> However, even in those processors, it's the compiler's job to deal with the stack. <S> The processor architecture merely provides additional tools to make protecting the software from attack easier. <S> You could instead use a language and compiler that is designed in a way that buffer overflow attacks are not possible. <S> Many high level languages today perform array bounds checking on each array access, preventing buffer overflow attacks. <S> This is, largely, a solved problem for many languages and their compilers. <A> Some PIC processors have a hardware stack, which consists of 8 fixed registers and could be considered "isolated" from the data bus. <S> Edit: apparently it's all of them ( <S> http://embeddedgurus.com/stack-overflow/2009/04/pic-stack-overflow/ ). <S> However, you've now added something else to your question: the purpose of preventing buffer overflows. <S> This has different implications. <S> Usually buffer overflows rely on (1) inserting code to be run into a buffer in data memory and (2) overwriting the return address to cause that code to be executed. <S> (1) can be defeated by "no-execute" bits present in some MMUs (this has been available on Intel for a long time but only recently given OS support). <S> On some platforms attacks can be built entirely by changing the stack without adding any code, using "return orientated programming" . <S> Having a distinct stack prevents this from being done, but it does not prevent other forms of data corruption by exceeding a buffer and overwriting some other data memory. <S> It's concievable that you could achieve a useful exploit by changing a bit even if the control flow is not changed. <A> " Is there an architecture which also isolated the stack bus in hardware ? <S> " I have never head of an architecture that has a separate stack bus . <S> It is, however, quite common to have separate stack pointers (and stacks) for different purposes, e.g. a supervisor stack and a user stack. <S> An (old) example: MC68020 User's Manual (pdf) "... <S> or at least some compiler that implements a dual stack" <S> : There is the concept of not using the stack for local variables at all, but allocating local variables in overlayed memory areas. <S> Of course this is only possible if the call hierarchy is static (i.e. no recursion and run time dependency of the call hierarchy). <S> Example: C51 Keil C-Compiler .
| Except for small special purpose processors, such as the PIC microcontroller, there are no common architectures that implement the concept you're asking about.
|
SDRAM problem with LPC1788 This is my PCB layout: My problem is: When i tried to Access SDRam with my example code (Memory test Code) everything seems ok. All the SDRam Data changes what i need. But when i tried to Access bunch of a place on SDRam, Data corrupts. Code is OK, i have tried the code on my eval. board and no problem ocurred. I could understand that if all the data corrupts on my every try. Here are the codes with problem and without problem: I will Show how memory has been effected. First Photo Shows Successfull Read Write: Second photo shows Faulty Datas: And interesting one is Third Photo. I have changed nothing. just scroll up and down. And faulty data changes and move to the other places. if there is a read problem exist why doesnt it occurs when i use scroll, on memory window with successfull code tray. I hope photos can be helpfull. This is my ground : here is my working code simply. with no fault. Every time it Works perfectly. SDRAMInit();wr_ptr = (uint32_t *)SDRAM_BASE_ADDR;char_wr_ptr = (uint8_t *)wr_ptr;/* Clear content before 8 bit access test */_DBG_("Clear content of SDRAM...");for ( i= 0; i < SDRAM_SIZE/4; i++ ){ *wr_ptr++ = 0x00;}/* 8 bit write */_DBG_("Writing in 8 bits format...");for (i=0; i<SDRAM_SIZE/4; i++){ *char_wr_ptr++ = 0x11; *char_wr_ptr++ = 0x22; *char_wr_ptr++ = 0x33; *char_wr_ptr++ = 0x44;}/* verifying */_DBG_("Verifying data...");wr_ptr = (uint32_t *)SDRAM_BASE_ADDR;for ( i= 0; i < SDRAM_SIZE/8; i++ ){ if ( *wr_ptr != 0x44332211 ) /* be aware of endianess */ { /* byte comparison failure */ _DBG_("Verifying fail, testing terminated!"); while ( 1 ); /* fatal error */ } wr_ptr++;}/* byte comparison succeed. */_DBG_("Continue writing in 16 bits format...");wr_ptr = (uint32_t *)SDRAM_BASE_ADDR;short_wr_ptr = (uint16_t *)wr_ptr;/* Clear content before 16 bit access test */_DBG_("Clear content of SRAM...");for ( i= 0; i < SDRAM_SIZE/4; i++ ){ *wr_ptr++ = 0;}/* 16 bit write */_DBG_("Writing in 16 bits format...");for (i=0; i<(SDRAM_SIZE/4); i++){ *short_wr_ptr++ = 0x5AA5; *short_wr_ptr++ = 0xAA55;}/* Verifying */wr_ptr = (uint32_t *)SDRAM_BASE_ADDR;//wr_ptr -= SDRAM_BASE_ADDR/4;for ( i= 0; i < SDRAM_SIZE/4; i++ ){ if ( *wr_ptr != 0xAA555AA5 ) /* be aware of endianess */ { /* 16-bit half word failure */ _DBG_("Verifying fail, testing termintated!"); while ( 1 ); /* fatal error */ } wr_ptr++;}/* 16-bit half word comparison succeed. */_DBG_("Verifying complete, testing terminated!"); while(1); <Q> This is not an answer but more a long comment. <S> I think you may have some signal integrity and layout problems as some people noticed in comments: <S> First of all : you don't have a continuous GND plane under your SDRAM lines. <S> To do this we usually put a GND plane under traces and adjust the vertical distance to have the right impedance. <S> When you have a GND "hole", you are making an impedance change and your signal will be altered. <S> Also having via makes some impedance changes. <S> Here is your PCB layout with most impedance change highlighted, on some lines there is way to much impedance changes. <S> Second thing: it seems you haven't balanced the length of your traces. <S> Some are shorter than others. <S> SDRAM specs should specified an authorized skew or length difference between traces. <S> And maybe a logic analyzer to check the validity of your timings. <A> About: "...just scroll up and down. <S> And faulty data changes and move to the other places. <S> if there is a read problem exist why doesnt it occurs when i use scroll, on memory window with successfull code tray. <S> " <S> The EMC of the LPC1788 has 4 small buffers for read/write (each buffer has 16 DWORDs). <S> These buffers work as "cache" and can hide SDRAM access errors (if you would write and read back a small data block, you read from one of the buffers, without real SDRAM access). <S> Another effect you should be aware of: after writing to SDRAM over debugger you need to make 1-2 steps ("Step Into" in LPCXpresso) to see the SDRAM fault in memory browser. <A> You must place the SDRAM under the lpc1788 on the bottom layer and you must be carefull about GND on the bottom layer near the SDRAM. <S> If you do this your tracks will be shortened and your PCB will work ok. <A> Check Your All Errors and write all errors Address, Source Data, Error Data in binary format. <S> check which bit have error. <S> is error in data bus or in address bus. <S> then Fix that net (the filter of that net in Altium Designer is good technique). <S> Excuse for my bad english
| Your SDRAM lines need to have a controlled impedance. As some people suggested, you should look at your signals with an oscilloscope.
|
Using NPN transistor as switch Before I ask my question, I should say that I am very new to working with electronics and I may not quite know how to describe my problem. I am trying to use a pin on my msp430 microcontroller I have as a replacement for a pushbutton on a device. The msp430 is 3.3v and the device I am switching is 5 volts. I was under the impression I could use a 2n3904 transistor in place of the button by applying current by turning on the pin on the msp430 which would let current go from the collector to the emmiter, and hopefully "push" the button. This is my current setup However, turning the pin on does not activate the circuit. When I connect the jumper for the onboard LED, I can verify the pin is working. also, when I connect the 5v from the collector to the base using a wire, I can activate the transistor. What other information am I missing to solve this?Thanks in advance EDIT: After reading the comments, adding a 4.6k resistor between the base and IO pin and connecting my 3v ground and 5v ground allowed me to control the transistor without any noticeable problems. Thank you! <Q> It looks like you need a current limiting resistor between your output pin and the transistor base (assuming you didn't omit it on purpose, for brevity). <S> Without the resistor, when you set the output pin to HIGH, you are causing a short-circuit to ground. <S> That may damage the pin, if it hasn't done so already. <S> I would guess that a 10K resistor would do it. <S> That's what I use with my ATmegas and ATminis. <S> But check your MCU datasheet for appropriate values. <S> It's quite a common mistake to think that the base-emitter junction already has some sort of current limiting property, but it doesn't. <S> It has very low impedance. <S> I usually think of it as a plain wire. <S> That helps me avoid these kinds of mistakes. <S> Same applies to collector-emitter junction. <S> By the way, your collector-emitter path has no current limiting resistor or load. <S> Watch out! <A> Your circuit will only work as a low side switch, meaning that it should be connected to the ground side of the load like If I understand correct you want to make a high side switch (connected to the Vcc side of the load). <S> In that case you'll need a PNP used as (I made the schematic for a similar question so don't mind the 9V supply, it's the same for 5V) <S> Please read my reply to Arduino, NPN and common cathode RGBs . <A> In addition to a current limiting resistor mentioned by Ricardo, you'll also want to make sure that both the 3.3v MSP430 and the 5V device have their grounds connected. <S> This will make 0V for the MSP430 be the same potential as 0V for the 5V device. <S> I just finished a project this weekend where I used an MSP430 G2553 to control the power and function buttons of a cheap camera with transistors, and had this exact same problem. <S> Before I added the resistors, it seemed like my power button <S> /transistor was working, but really I had been shorting through the transistor and the camera was reading the high on the MSP430's pin directly. <S> For reference, my question from a few days ago.
| I had to add current-limiting resistors, and I have to make sure the emitters and collectors of the transistors were wired up to the buttons correctly.
|
What's the dual of Faraday's law of induction? Faraday's law of induction tells us that if we subject a coil to a changing magnetic field, a voltage will be found across the coil. Duality suggests something similar should exist for capacitors: if they are subjected to a changing electric field, a current will be found. Does this phenomenon exist? What's it called? Is there a simple experimental apparatus one might construct to observe it? <Q> The dual of Faraday's Law is Ampere's Law but, while Faraday's Law is fundamental to the physics of an inductor, Ampere's Law is not fundamental to the physics of a capacitor. <S> Now, it is true that, in circuit theory , the capacitor and inductor are duals: $$ <S> i_C = C\frac{dv_C}{dt} <S> \leftrightarrow <S> v_L = <S> L <S> \frac{di_L}{dt}$$ <S> However, we have to be more careful outside the context of circuit theory. <S> In physics, the fundamental relationship $$Q = CV$$ clearly requires the existence of electric charge and an electric scalar potential due to a conservative electric field. <S> This equation relates electric charge and electric scalar potential. <S> The closest we can get to a dual of this is $$ <S> \Phi = LI $$ which relates magnetic flux and electric current. <S> But magnetic flux is not the dual of electric charge . <S> The missing ingredient here is the hypothetical magnetic charge (magnetic monopole) which is the dual of electric charge. <S> * Were magnetic charge \$Q_m\$ (measured in webers) to exist, it would be a source or sink of a conservative magnetic field (measured in amperes per meter) and there would be an associated scalar magnetic potential (measured in amperes). <S> We could thus relate magnetic charge and magnetic scalar potential with a magnetic "capacitance" measured in henrys. <S> Further, we could relate electric flux to magnetic current (measured in volts) with an electric "inductance" measured in farads. <S> Indeed, it is the electric field itself, not the electric flux, that is fundamental. <S> * <S> Assuming magnetic charge exists, Maxwell's equations become <S> $$ <S> \nabla <S> \cdot \vec D = <S> \rho_e$$ <S> $$ <S> \nabla \cdot <S> \vec B = \rho_m$$ <S> $$ <S> \nabla \times \vec E = - <S> (\vec J_m + <S> \frac{\partial \vec B}{\partial t})$$ <S> $$\nabla \times \vec H = <S> \vec J_e + <S> \frac{\partial \vec D}{\partial t}$$ <A> Yes its called displacement current and its the correction added by Maxwell to Ampere's Law. <A> I'm not 100% sure about this <S> but I'm prepared to have a shot at it <S> so be kind with your ability to down vote. <S> If I've got it wrong <S> I'll remove it. <S> Imagine two plates of a (bigger) capacitor with an alternating voltage across them. <S> There will be an alternating electric field between the plates and if you placed a smaller capacitor within that field there will be a voltage developed across its terminals. <S> It's self evident, given that the electric field has X volts per metre - the smaller capacitor will succumb to being "charged" to a voltage equivalent to the main electric field <S> x the gap between the plates of the smaller capacitor. <S> But, because of "duality" I believe the smaller capacitor plates have to be shorted out - does that short now carry an alternating current that reflects the increase in electric field in the vicinity of its plates. <S> I think it will and possibly that is the duality with an alternating magnetic field inducing <S> voltage in an open circuit coil. <A> Fundamental to a capacitor is the electric field between its electrodes. <S> When current/charges flow into or out of the capacitor the field strength changes. <S> The opposite is also true: If the electric field inside the capacitor changes, charges will be forced out of or into the capacitor, resulting in current flow. <S> A simple experiment seems not too easy to be actually performed. <S> However, the concept is trivial <S> : Take a capacitor* and place it into a strong, external electric field. <S> Voltage (and current) on the capacitor's connections will result until the electric field inside the capacitor fully compensates the externally applied field, which is when current stops until the external field changes again in strength or direction. <S> *) <S> A capacitor with a known direction of its electrical field will of course be required, and it will have to have the external field applied in just this direction. <S> I mention this because electrolytic capacitors commonly available as electronic parts are usually rolled up inside to save space and their electrical field is therefore basically zero to/from the outside. <S> Besides, those physically small capacitors with relatively high capacity compared to simple parallel-plate capacitors used for experimentation have extremely high field strengths (Megavolts per Meter) and the external field would have to match that order of magnitude to achieve measurable results.
| To summarize, while electric flux and magnetic flux are duals, and changing magnetic flux is fundamental to the physics of an inductor, changing electric flux is not fundamental to the physics of a capacitor.
|
Can you bridge or parallel the outputs of the PAM8403 amplifier? The PAM8403 is a dual channel amplifier, but I only need one channel. I want to utilise both channels as one, in order to get a single channel with higher output power. I have been reading through the PAM8403 datasheet , but can't find any hints on whether this was recommended or not. <Q> here's the response I got after emailing Diodes: <S> We would advise NOT to connect the two outputs of PAM8403 in parallel. <S> We recommend two ways to get higher power : <S> a ) increasing the supply voltage, from 5V to 9V for example--- <S> PAM8320 <S> working at 4.5V to 15V is a good candidate for this solution. <S> b) reduce the loading impedance, from 4Ohm to 3Ohm for example---PAM8406 can drive as low as 2.5Ohm <S> /Ch that make PAM8406 is a good choice. <S> Conclusion: <A> Is it worth it <S> I ask? <S> Even if you could easily and efficiently bridge the two outputs you only (at best) get double the power - that's a 3dB increase in power and ditto for sound pressure level - equivalent to about a 30% increase in loudness. <S> So, is it worth it? <S> You could use two 1:1 transformers - primary_one connects to +OUT_R and -OUT_R and primary_two connects in the same way to the left channel. <S> Then you wire the two secondaries (anti-phase) in series and connect the ends to the speaker. <S> You'll get twice the voltage out <S> but you'll need to use an 8 ohm speaker to prevent overloading the chip. <S> This means power doubles. <S> You could argue that the transformers are small and could be useful components in the EMC filter (needed for class D) <S> but I don't think it's worth it. <A> the outputs are 250KHz pulse modulated square waves, if these signals were put through inductors on each pin, the +R and <S> +L could be commoned and ditto the -R and -L as long as the left and right inputs are also commoned. <S> I have not tried this yet. <S> Ferrite beads may be enough. <S> At the worst it will overheat or blow up.
| You cannot bridge the PAM8403 (as you can't bridge two pairs of differential outputs), and Diodes have recommended against using the two outputs in parallel.
|
How does a servo hold its position without drawing too much current? In a standard DC motor if you supply a voltage and stop it from rotating i.e. applying a heavy load, it will draw a lot of current. How is this not the case with a Servo? How does it hold its position and resist changes in its position without drawing a lot of current? <Q> Your assumption isn't true. <A> Largely, what they said - BUT: Note that systems with strong "saliency" (ie magnetic force changes greatly as rotor poles pass stator poles) in the motor proper may have strong hold in force per current compared to the rotational force provided when moving. <S> A classic stepper motor is such a system - when the stepper motor is at rest the "iron" core pieces (poles) are at point of closest approach and so provide maximum force per current. <S> Some systems provide a certain holding current and a greater or much greater drive or stepping current. <S> Note that "Servo" can mean a hobby device that has a geared motor and a pot for position feed back OR denote a "servomotor" which is usually a precision & high performance control system motor drive with position and/or velocity and/or rate feedback which may or may not be geared. <S> I assume you mean geared motor the hobby device. <S> In a geared system the torque required to turn the drive motor by moving the output shaft depends greatly on the mechanical design. <S> Non-overhauling gearboxes are not common, apart from worm-drive systems, but are possible: If you have a worm drive system where a N tooth gear drives a worm screw which is effectively a 1 tooth gear (for a single start worm) <S> then it is often (by design) <S> IMPOSSIBLE to turn the drive motor by attempting to move the output shaft. <S> Such a system will main the output position against any load (that does not destroy it) with no input power to the motor. <S> In a gearbox system with a "cascade" of gears it may or may not be possible to turn the motor by turning the output shaft. <S> The ability to do so is known as "overhauling" and depends on certain mechanical arrangements being met. <S> These are a function of tooth angle, pitch, friction and more. <S> The worm drive is essentially the limiting case of a system that does not allow overhauling. <S> It is possible to design a system that will necessarily "lock up" rather than 'overhaul'. <S> This allows position to be held with no input power - apart from motion due to backlash in the gears or other mechanical non idealities. <S> A true "servomotor" system could use a non overhauling gearbox system so that the load could be held in position with zero input. <A> The torque/force exerted my a servo motor is directly proportional to the current. <S> If a servo is told to hold position and a force is applied to the load, the servo will need to apply an equal and opposite force to hold position. <S> The higher the force the more current will be required. <S> So, as already stated, your assumption is incorrect. <S> Most notably, holding a heavy vertical load in position can take considerable current/power, sometimes alleviated with the use of a brake.
| If there's a force trying to move the servo from the setpoint, it will draw considerable current, like any other motor.
|
What is the difference between SIM300, SIM900 and SIM900A I have came across these SIM modules on an online electronic shop. My primary target is just to receive short text messages from other subscribers. But then this question about these three (if there is anything apart from these, those too) modules. What are the primary differences between these GSM modules? <Q> Basically, SIM900 is global functioning quad-mode module, while 900A is cheaper dual-mode and works only in India. <A> SIM900 is a quad band modem being able to operate in 850,900,1800,1900 MHz bands and offers improved GPRS functionalities useful in web enabled applications. <S> SIM300 is a triband GSM modem being able to operate only in 900,1800,1900MHz band. <S> SIM900 and the SIM300 modem operate from 3.4V to 4.5V supply range. <S> Same AT commands used for call/sms in SIM300 can be used with the SIM900 modem. <A> This makes difference in their operating frequencies. <S> The more the frequency of operation is, the better the functionalities are. <S> If you need it just for SMS, then I feel SIM300 is a good option and is comparatively cheaper also. <S> It does not make much difference if you will buy SIM300 or SIM900, if you are considering it to be used for SMS services across the world. <S> SIM900A is a good option for use in Asia only.
| SIM900 is quad band,SIM300 is triband and SIM900A is dual band GSM modem.
|
conversion of single ended audio input to differential I am working on a bluetooth module for streaming audio signals. Audio signals coming from audio jacks are single ended,but datasheet of module has mentioned that differential audio signals are recommended.is there any way to convert single ended audio signal to differential one.Through internet search, I found this schematic: Is this method valid for conversion? <Q> It is possible that I have misunderstood the requirement - but if not... <S> The vintage way of getting differential audio signals from a single-ended input consisted of merely using an audio frequency transformer, usually a 2 pin input 3 pin output little thing, with a 1:1 turns ratio. <S> The single-ended signal feeds the transformer input, and the output side is a differential signal pair you can bias to wherever you need it to be - connect the middle pin of the output to ground, and the differential signal is ground-referenced. <S> In addition, a turns ratio <S> other than 1:1 allows impedance matching / voltage gain if desired. <A> Use an op-amp configured as a unity gain inverter. <S> Feed its input from the audio jack. <S> The output from the op-amp is an inverted version of the signal from the audio jack and suitable for devices requiring differential inputs. <S> +input = <S> audio jack signal, <S> -input is o/p from op-amp inverter. <S> In all likelihood, you'll probably find that the Bluetooth module works just fine with a single-ended input. <S> Here is a diagram from the design of high-performance balanced audio interfaces by Bill Whitlock & Rod Elliott - it shows several methods: <S> Note the top left circuit. <S> What I'm proposing is a cut-down version of this. <S> The non-inverting stage I'm proposing can be removed leaving only the inverting op-amp stage. <S> The diagram does show RS1 and RS2 for when impedance balancing is required <S> and I'm not saying you don't need these components <S> but in many circumstances they are not needed, particularly in the application in the question. <A> This is an extended comment to address what I believe is an important distinction to make - the distinction between a balanced output and a differential output. <S> According to the link provided by Phil Frost, we have: <S> A good, accurate definition is "A balanced circuit is a two-conductor circuit in which both conductors and all circuits connected to them have the same impedance with respect to ground and to all other conductors... <S> Thus, this would be an example of a balanced output: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Though the output is balanced according to the above definition, it is not differential . <S> For the output to be differential , we must have \$V^+_{out} = <S> -V^-_{out}\$ <S> But, for the circuit above, we have (for open circuit condition) <S> \$V^+_{out} = V_{oc} \$ , and \$V^-_{out} = 0\$ <S> This is an example of a differential output: <S> simulate this circuit Note that this is not a balanced output since the impedance to ground for the positive output node <S> is \$600\Omega\$ <S> while the impedance to ground for the negative output node is \$0\Omega\$ . <S> However, for both circuits, the open circuit output voltage is \$V^+_{out} - V^-_{out} <S> = <S> V_{oc}\$ and the output impedance <S> is \$600\Omega\$ . <S> Finally, an example of a balanced and differential output: simulate this circuit <S> As to the OP's question: is there any way to convert single ended audio signal to differential one <S> both a <S> balanced and differential output as well as isolation <S> which may or may not be useful. <S> As other answers have pointed out, you can can also convert to differential only or balanced only. <S> Whether you actually need <S> both, one or the other, or neither is a matter for experiment to decide.
| The answer is yes, of course there is and certainly, as Anido Ghosh answers, a 1:1 audio transformer will give you
|
How do I increase the output voltage of a simple electro magnet generator I think I know the answer to this already but I can't seem to find this on Google. The keywords are all far too ambiguous apparently. I want to create a electrical flow with a magnet passing through a cylinder wrapped with copper wire. Pretty basic. I want to increase the voltage output. My theory is that if I wound the copper tighter, decreased the width between them and increase the copper on the cylinder that I will get a higher voltage. I haven't tried it yet because I haven't bought the equipment. I am trying to plan it all out before I purchase anything. Is my assumption correct? <Q> By Faraday's Law the voltage is proportional to the number of windings and the rate of the change in the magnetic field. <S> So you can add windings, as you mentioned, move the magnet faster or use a stronger magnet at the same rate to increase the voltage. <S> I would look at http://hyperphysics.phy-astr.gsu.edu/hbase/electric/farlaw.html <S> and http://www.electronics-tutorials.ws/electromagnetism/electromagnetic-induction.html for an explanation of Faraday's Law. <S> From wikipedia: <A> Not only will it step up the voltage to something you need, it will also smooth out the varying voltages from the generator. <S> http://en.wikipedia.org/wiki/Boost_converter https://www.sparkfun.com/products/10968 <A> One additional thing I want to add to the seleted answer is the following paragraphs taken from this site <S> A Simple Generator would consist of a U-shaped magnet and a single loop of wire. <S> The area around a magnet where its force can be felt is called a magnetic field. <S> To help describe a magnetic field, we think of lines of force going out from the north pole of a magnet and returning into the magnet at its south pole. <S> The stronger the magnet, the greater the number of lines of force. <S> If you rotate the loop of wire between the poles of the magnet, the two sides of the loop "cut" the lines of force. <S> This induces (generates) electricity in the loop. <S> In the first half of the turn, one side of the loop of wire cuts up through the lines of force. <S> The other side cuts down. <S> This makes the electricity flow in one direction through the loop. <S> Halfway through the turn, the loop moves parallel to the lines of force. <S> No lines of force are cut and no electricity is generated. <S> In the second half of the turn, the side of the loop that was cutting upward cuts downward through the lines of force. <S> The other side of the loop cuts upward. <S> This makes the electricity induced in the loop flow in a direction opposite to the first half of the turn. <S> At the bottom of the turn, the loop again moves parallel to the lines of force and no electricity is generated. <S> For every complete turn, the voltage and current that are generated travel in one direction half the time, and in the opposite direction the other half of the time. <S> Twice during each turn no current flows. <S> The voltage and current are known as an alternating voltage and an alternating current. <S> The voltage that a generator produces can be increased by increasing: (1) the strength of the magnetic field (number of lines of force), (2) the speed at which the loop rotates, or (3) <S> the number of loops of wire that cut the magnetic field. <A> but if number of turns is increased resistance will be more and less induced emf is produced . <S> we know L= Kn*nAl which means self inductance of coil is directly propotional to square of n ;area of cross section A ;length of coil <S> l <S> in order to have greater output EITHER ' <S> A' CAN BE INCREASED <S> ORMORE POWERFUL <S> CAN BE USED .IF <S> V BE THE VELOCITY OF MAGNET IN THE COIL <S> THEN INDUCED EMF PRODUCED IN THE COIL <S> IS e=-BIV <A> Rotating the magnet (where the poles 'pass through?') <S> Or sliding a magnet-rod through a cylinder-coil? <S> #1 is to add more turns. <S> #2 is to add more turns of fine wire, so the added turns aren't lifted far from the magnet. <S> Also, for linear-moving magnet (not rotation,) note that a long coil and short stubby magnet won't work very well. <S> If both magnet poles are inside the coil at the same time, then their effects cancel. <S> Even if both poles are close together while the coil diameter is wider ...same problem. <S> To get maximum output volts, just one pole should pass through the coil, followed by just the other pole. <S> The cylinder-coil needs to be the same length as the magnet, or shorter. <S> Are you forcing the magnet to move, or instead just letting it slide under its own weight+inertia? <S> If forcing the magnet via attached shaft, then you can make the fields much stronger by adding iron parts as a stator, a flux-concentrator. <S> But this also increases the required force applied to the sliding magnet. <S> Iron parts will hang up a freely-sliding magnet. <S> But for a "pushed piston" setup, the piston force can be huge; much larger than the "cogging" or "sticking" effect on the magnet caused by nearby iron.
| I want to add that if you are using off the shelf components and they are not generating the voltage you need, a simple boost converter can be used.
|
Can I drive a low voltage stepper motor with an A4988 driver? I have this stepper motor with the following specs: Model: 17HS4417 Rated voltage: 2.55V Rated current: 1.7A Phase resistance: 1.5 ohms Phase inductance: 2.8Mh Holding torque (min): 40N-cm. Detent torque (max): 2.2N-cm. I want to know if an A4988 stepper motor driver would be appropriate for this motor. I suspect not because the driver specifies an 8-35V rating, while the load is rated for 2.55V. If not, should I look for a driver with a lower voltage rating? <Q> That driver will work fine, provided you use a proper power supply. <S> The allegro stepper-drivers are current-limited chopper stepper drivers. <S> As such, you only have to ensure the power-supply voltage for the driver is > then the rated voltage on the stepper, and you have set the current limit properly. <S> Basically, chopper-stepper-drivers actually modulate ("chop") the drive voltage to the stepper in real-time to maintain a fixed coil current. <S> The ratings for your motor are steady state . <S> Basically, it says that if you apply 2.55V DC , 1.7A of current will flow though the motor coil. <S> However, the Allegro drivers don't apply DC, they apply a duty-cycle modulated square wave, which limits the overall power delivered to the motor. <S> Functionally, the driver will vary the applied voltage to the stepper to maintain a fixed current (it's not quite that simple, motor inductance is involved, but it's a reasonable simplification). <S> As such, as long as you're not applying more then 1.7A of current to the motor, it will work fine. <S> Basically, the simple version is the motor ratings are basically constrained by the thermal behaviour of the motor. <S> If you apply too much power, it'll get hot enough to damage the motor. <S> With the A4988 driver board you link, you can vary the motor current by adjusting the tiny pot, which allows you to adjust the motor power to whatever you'd like. <S> If you run the driver off input DC within it's operating range, you will be fine. <A> The driver will work fine, you just need to set the current limit to an appropriate level for your motor. <S> The voltage rating of the motor is just specified based on the resistance and the given current. <S> In this case 2.55v/1.5 Ohm = 1.7A <S> Stepper motors like this are intended for constant current operation rather than constant voltage so the voltage range of the power supply for A4988 is not a limiting factor and it doesn't prevent the use of the particular motor. <S> On the contrary driving the motor with higher voltage increases the torque of the motor as the speed increases. <S> Running a motor at higher voltages leads to a faster rise in the current through the windings when they are turned on, and this, in turn, leads to a higher cutoff speed for the motor and higher torques at speeds above the cutoff. <S> Please read more http://homepage.cs.uiowa.edu/~jones/step/current.html <A> But there are limits to this. <S> The load presented by the stepper coils is inductive. <S> If you drive these with steep high voltage steps, the magnetic flow can become unpredictable. <S> The higher the voltage, the higher the change in flow, the higher the induced eddy currents in the materials. <S> Using an A4988 and <S> 12V on a Nema8 Motor (3.9V), I had the little motor jump up to 1/8 rotation at times. <S> To avoid this, I had to reduce the current limit so low there was next to no holding torque left: less than 10% of the rated torque. <A> Edit : The load supply voltage need not be the same as the stepper's rated voltage, it can be 8 Volts or more. <S> This invalidates the "won't work" part of this answer. <S> The Allegro A4988 will not work at 2.55 Volts load voltage. <S> The datasheet states: <S> Load Supply Voltage Range VBB <S> Operating 8 – <S> 35 V <S> Also, VDD Undervoltage Lockout VDDUVLO VDD rising 2.7 2.8 2.9 V <S> This means the device will simply go into under-voltage lockout if the Vdd pin is supplied by 2.55 Volts. <S> So yes, look for a stepper motor driver designed for lower load voltages. <S> Alternatively, if microstepping and other enhancements of the driver are not important, roll your own driver using discrete MOSFETs or BJTs for the output stage.
| Yes, you can drive a stepper with a low voltage rating using a higher voltage and any current limiting driver, provided you set the current limiter according to the motor´s rating.
|
Use AC-DC adapter instead of AC-AC adapter I'm building an O2 amp , which according to the designer requires an AC-AC adapter (Triad WAU 12-200) to convert regular wall power to 12VAC. By looking at the schematic for the amp however, it seems that I might be able to use a regular AC-DC converter (also 12V) instead. According to this site , an AC-DC adapter uses a transformer to stop down the voltage, rectifier diodes to make the current DC, and caps/regulators to smoothen it. Now, the datasheet for the WAU 12-200 shows the following as the adapter's schematic: (Credit: Triad) It would seem that the WAU 12-200 merely acts as a simple transformer. Meanwhile, the following equipment is present inside the O2 amp: (Credit: NwAvGuy) After entering the O2, the AC power goes through a set of diodes and caps/regulators just like what would happen in a AC-DC adapter. Not that I don't plan to use batteries in the amp at all (strictly wall powered) so the "battery power" section of the amp in the schematic should be omitted. I've got a 12V AC-DC adapter that delivers 200mA (same as the WAU 12-200). Is it possible for me to omit the diodes and caps on the O2 board and feed it 12VDC power instead? <Q> First of all the 7812 (positive voltage) and 7912 (negative voltage) <S> regulators need about 2v higher input than the output in order to operate properly (that is at least 14v for the 12v regulator and -14v for the -12v regulator) . <S> The AC voltage in the input is rectified by two diodes to generate a symmetric unregulated supply (that is a positive and a negative voltage with reference to the ground) which feeds the regulators inputs and you get +12v and -12v regulated rails at the output. <S> If you feed the input with 12v DC there is no way for the circuit to generate the negative rail voltage <S> so this can't work. <S> Here is a link that explains the operation of the diodes in the circuit you show http://metroamp.com/wiki/index.php/Half_Wave_Voltage_Doubler <S> I've got a 12V AC-DC adapter that delivers 200mA <S> If it is the classic transformer type rather than a switching type (you can easily judge it by size and weight) then you can omit the output circuitry (you'll need to open the adapter case to do that) and connect the AC output of the transformer to the AC input of the O2 power supply circuit. <A> I've got a 12V AC-DC adapter that delivers 200mA (same as the WAU 12-200). <S> Is it possible for me to omit the diodes and caps on the O2 board and feed it 12VDC power instead? <S> No. <S> Not without adding some stuff in return. <S> Not knowing how much current your circuit actually draws, or the type of regulation it requires, it's hard to even make a suggestion. <S> The use of a AC-AC adaptor, with two linear regulators (one positive one inverted) results in a very quiet supply, which is what you want for Audio devices. <S> Prevents noise. <S> Using a random AC-DC adaptor will inject an unknown amount of switching noise. <S> If we ignore the noise and extra regulation, you still only have a positive supply. <S> You would need a voltage inverter, which would add multiple parts, a design change, and inject even more noise (as another switching regulator). <S> The nice part is that as the battery section and post regulation diodes show, the Amp can work with 8.4v - 0.7v (Diode drop) = <S> 7.7v Battery power (Positive and Negative). <S> Even less when the NiMH batteries start going low (Probably down to ~7 Volts). <S> You could replace the 7812 and 7912 with 7810 and 7910 for +-10V, which would smooth out some of the noise from the inverter, and work with 12v input. <A> Using a DC supply is equivalent to using batteries. <S> Your schematic already includes circuitry to operate for batteries, and designates the part of the circuit that are not required if battery-only operation is desired. <S> You could simply build as if for battery-only operation, but use an equivalent DC supply in place of the batteries. <A> In this circuit the diodes on the input are not connected as a simple rectifier, they are connected as a Delon (bridge) type voltage doubler. <S> A voltage doubler is fed with AC voltage. <S> The doubling effect of the circuit is how it is able to supply the higher voltage needed by the voltage regulators. <S> It will not function properly with a DC input, in fact only one of the regulators would get any input voltage as the other would be blocked by one of the diodes.
| Depending on the internal implementation of the AC-DC adapter it may be possible to use it.
|
Conditions for page write in EEPROM I have learned about page write operations from App notes and data sheets of EEPROM chips.But i want to clear certain doubts.I have an EEPROM chip which got 32KB and 64B Page Size. 1.Can i Write less than 64 Bytes? Say n Bytes If yes then What happens to the remaining locations(64-n) in case of Page write?(Will it Stay OxFF or turns 0). This is the EEPROM chip 24LC256. <Q> Typically an EEPROM erases to 1 bits and you can change any 1 to a 0 <S> but you must erase again to go back to 1 . <S> You may need to write the whole page (depending on your interface) <S> but if you write all 0xff <S> you can almost certainly go back and write other values later. <S> If you write all 0x00 <S> you will have to erase to change the data. <S> You can overwrite the beginning with its existing data if you have to write in blocks. <A> I'm not sure you realize what are the implications of an eeprom page. <S> Here is the 24LC256 datasheet <S> One option to fill it is to write individual bytes. <S> Using that mode you send the eeprom byte address for each byte you want to write so the page location poses no limit. <S> An alternative option is to write a block. <S> The size of the block for the particular device is 64 bytes so the pages boundaries are 0-6364-127128-191.... <S> When you write a block you only send the memory address once and then send the bytes to be stored. <S> The address increments internally for each new byte. <S> The page writes can only be used inside the boundaries of a page, what you reach the page boundaries you have to stop and start a new write sending the address again. <S> If you start a block write from an address that is near the end of the block then you can only write a few bytes until the end of the page rather than 64 bytes. <S> For example If you start a block write from eeprom address 126 <S> then you can only write two bytes, in locations 126 and 127. <S> If you keep writing bytes then the address rolls over and overwrites the start of the block (in this case 64, 65..) <S> In any case values of any eeprom location where a write or erase action hasn't been performed maintain the existing value. <S> So for your question <S> Can I Write less than 64 Bytes? <S> If yes then What happens to that locations?(Will <S> it Stay OxFF or turns 0). <S> Is I explained earlier values in location where a write or erase cycle hasn't been performs maintain their existing value. <S> Usually unwritten eeprom have 0xff written to all byte locations so this will be maintained. <A> 1) <S> Yes you can write less than 64 bytes. <S> You can read/write EEPROM on a byte-per-byte basis if you wish. <S> This can be slower for large data operations though. <S> 2) <S> Once you erase a page (turn all to 0xFF), if you then write to only some byte locations, the rest will stay at 0xFF until you do something to them.
| Sure you can either with individual byte writes or with page write but withing the page boundaries which will be (0-63, 64-127...)
|
What exactly gets "worn out" and damaged by heat? It's quite common knowledge that heat is bad for electronics. That constantly high temperature decreases the expected lifetime of computer parts even if they are not overheating per se. If, for example, there's dust insulating a component in a PC, "cutting it off" from the usual airflow. What is it that experiences higher "wear" on higher temperatures? I've seen liquid capacitors mentioned as parts failing faster the higher their operating temperture is, because of pressure building and resulting leaking. Is that correct? But surely, there are many things else? Could you name some? <Q> There are really two different types of temperature stress, cyclying and sustained heat. <S> Just about any part is susceptible to failure from large number of temperature cycles. <S> Each different type of material in a part expands and contracts at different rates. <S> Of course packages are designed to accomodate this, and materials are chosen or specifically formulated for common thermal expansion responses, but stresses occur nonetheless. <S> Eventually those stresses being applied back and forth enough times will break something. <S> Sustained heat is different. <S> Silicon stops being a semiconductor, and silicon transistors therefore stop working, at around 150°C. <S> Heating a IC to that temperature won't directly hurt it, other than it won't work as intended. <S> However, that "not working as intended" could include excessive currents, which then cause more heat. <S> Eventually something melts and the part is irreversibly damaged. <S> Some chips, like modern processors, have such high density that failing to get rid of the heat for even a few seconds from the die can cause something to melt. <S> Consider the size of a high end processor die compared to the end of a soldering iron, and then consider that there can be 10s of Watts dumped into the die, and that the soldering iron gets to solder-melting temperatures at that same power level. <S> Getting rid of heat is a major issue with such chips. <S> That is why they come with integrated heat sinks and fans nowadays. <S> Take off the heat sink and fan, and your processor is toast in short order. <S> Or, it shuts itself down to protect itself. <S> Either way, your PC isn't going to run. <S> Heat accelerates this. <S> Running a electrolytic cap at 100 <S> °C, even without cycling, will degrade it much more rapidly than at 50°C. <A> No one has mentioned electromigration so let me add that. <S> Failure of integrated circuit wiring due to electromigration is accelerated by temperature, and is independent of on/off cycles. <A> If a transistor operates at the same continual temperature, it actually will run reliably for many years. <S> Continual heating and cooling of parts causes micro cracks due to uneven thermal expansion of different materials within the device. <S> This is why tube televisions had evolved to have a constant grid heater at low wattage even when the TV is off. <S> Hot to cold, cold to hot several times a day, 10,000 cycles in a few years....that's what caused TV's to fail. <S> This fact is not to diss the famous Arrhenius equation though (higher failure rate function of temperature). <S> Most physical parts, like the capacitor you mentioned, obey the Arrhenius equation. <S> It is necessary to point out that, for some devices, cycling is a cause of failure more than temperature. <S> My only concern, please someone tell this fact to the MTBF guys at Lockheed. <S> Reliability equations there have no number-of-cycles factor so they just "wonder" why some satellites fail and some don't. <A> I can think of a few examples where heat plays a role in the degradation of parts: 1) Electrolytic capacitors, as you eluded to. <S> The electrolyte slowly evaporates over time, and this evaporation is accelerated by the temperature of the part (both environmental and self-generated from ESR losses). <S> 2) Optocouplers suffer from CTR (current transfer ratio) degradation as they age; this can be reasonably controlled by driving them as weakly as the design will allow and having overhead in the design for loss of CTR. <S> 3) Class-II ceramic capacitors suffer dielectric aging, losing capacitance over time. <S> This can be 'fixed' by heating the parts past their Curie point for a few hours, but this isn't something you can do when the part is in-circuit. <S> (Johansen Dielectrics claims temperature plays a role in this aging, but doesn't provide any hard data)
| Electrolytic capacitors are different from most other electronic components in that they inherently go bad over time.
|
Detecting a low pulse from an electromagnet induction I am designing something similar to a coil gun. So what I have is a magnet passing through/adjacent to a coil. Due to the electromagnetic induction, I do get a pulse(triangular) across the coil. However, the amplitude of this pulse is very low to detect, as its around 60mV peak. I tried using a comparator(LM311) for detecting that low voltage, but noise disrupted the operation, as the noise level was also high.Is there something I can do to detect that pulse? Things I thought about : 1. Increasing windings on the coil2. Using a stronger magnetbut apart from these, is there something that can help me achieve the same? Currently the coil used is a small sized with about 30 turns of around 23-25 gauge magnet wire UPDATE: I tried increasing the resistance by adding a 1Kohm-100Kohm in series to the coil, but it did not increase the voltage much. I also tried winding a coil with more turns but still the max voltage was around 40mv. Also, here is a video: http://www.youtube.com/watch?v=hajIIGHPeuU I came across. The current generated in this case is 20uA, which for a resistance of 1Kohm, should give a Voltage of 0.02V. Any other way, I can increase the voltage level. Would having a core help in anyway? <Q> I think amplifying the 60mV pulse right away from the coil output by a good and well designed amplifier which also should be low noise one , this will help the 60mV pulse signal to be strongly above any kind of noise and so will be easily detected. <A> A current is induced in a wire moving relative to a magnetic field. <S> At the moment you're measuring the voltage generated by that current across the impedance of your coil. <A> The antediluvian and inexpensive LM311 is perhaps not ideal for this application, but it should work, given a reasonable circuit and pulses that are in the microsecond range or longer. <S> First, make sure that one end of the coil is solidly grounded so that any common-mode noise that may be capacitively coupled is conducted directly to ground. <S> Try connecting it to the inverting input directly. <S> Try a reference of about 30mV with perhaps 5mV of hysteresis (feedback from output to the non inverting input and a divider from the supply, so three resistors- for example 100 ohms to ground, 16K to +5 and 100K to the output (output high has a 4K7 pullup, say, to +5), assuming +/-5V supplies. <S> Ground the output common. <S> It should give clean output pulses. <S> Use positive and negative supplies (say +/-5V <S> to +/-15V) to ensure that you're inside the common-mode range of the LM311 <S> (or it won't work properly at all). <S> It can be adapted for a single supply later, but first get it working. <S> If that does not give a clean pulse out, post an oscilloscope shot of the voltage on the coil with one end grounded to your circuit. <S> If the pulse is not fairly clean at that point, then you've got a different problem. <A> A coil gun isn't much more than a special case of a linear motor, which is just a special case of a brushless DC motor. <S> In high performance motor applications, or ones where you must know where the magnetic field is at in order to drive it most efficiently, hall effect detectors are used. <S> I suggest that while you can use the coils for both feedback and driving, you might save time and frustration by simply adding hall effect sensors to the assembly. <A> There is a little amplifier <S> I am very fond of which I have used with dynamic mics. <S> Since your coil situation is much like the one faced by someone trying to amplify a dynamic mic, I encourage you to try this circuit and see if produces a usable signal. <S> Just replace the "microphone" (speaker) with your coil. <S> http://electrosuite.com/audio/bc547-dynamic-microphone-amplifier.html <S> The lower transistor acts as a common base amplifier, which is fairly unusual. <S> It has a current gain of less than 1, but it does provide significant voltage gain. <S> The upper transistor is in a common collector configuration, so it has essentially unity voltage gain, but the current gain is good. <S> In short, this first amplifies the voltage, then the current, to give you a strong output signal. <S> Although you will likely need a second stage after this, that should be much easier. <S> EDIT: <S> Concerning your noise issue, do you know where the noise is coming from? <S> Sometimes I just have a power supply that's super noisy and ruining everything. <S> I like low budget solutions, because of, well, my budget, <S> so I usually test this by running the circuit on batteries. <S> If things start magically working, then it's time to work on the power supply.
| If you add a resistor in series with the coil, and measure the voltage differential across the resistor using an instrumentation amp (which is not a regular op-amp or comparator), you may find both noise rejection and signal intelligibility improve considerably. You can test this with a function generator (say a 1kHz 60mV sine wave).
|
What Regulatory Requirements are Really Necessary for Sale in the USA? I understand that unless you fall into some specific product categories that are exempt from FCC regulations, electronic products sold in the US are legally required to meet FCC EMC limits. However, there has been a lot of debate recently with some colleagues about what, if any, testing at a NRTL to safety standards is required for the US. My understanding is that safety requirements are driven by OSHA in the US. However, my understanding is that they really only have the power to "recommend" and not really any legal authority. I've also heard it be said that local counties / cities / states may require adherence to safety standards, but I've never heard of this before other than standard electric code type stuff. Having recently received proposals from various regulatory agencies for European approval of a product, all of which suggested different standards to test to, sometimes not even having internal agreement about what we should test to, I'm thoroughly convinced that for anything but very established product categories no one has any clue about this stuff. If you have a novel product, forget about it... And now that functional safety seems to be becoming a bigger concern things seem to be getting even worse. I'll try to stop myself from going off on a rant about how overambitious governments and regulatory agencies are destroying innovation and causing massive inefficiency in product development, but do any safety / legal experts here know if, for the USA, there is any "legal" requirement to worry about anything other FCC for consumer electronic products (e.g. not medical or anything special like that). Does OSHA have any legal authority? <Q> To answer your question vaguely: no, there is no one set of golden rules which the U.S. follows as a whole when it comes to electrical matters. <S> It's the National Electrical Code which makes mention of 'listed' or 'labelled' devices, which is where the NRTLs come into play (UL, CSA, etc.). <S> OSHA approves the NRTLs. <S> Here's a map of the USA showing which states have adopted which versions of the NEC: <S> There are a few states which haven't adopted any version of the NEC, but have local jurisdictions (counties or cities) which have either adopted the NEC or some 'equivalent' laws. <S> That being said, I don't agree with your bashing of safety certifications. <S> I personally will never plug an unlisted device into any outlet in my home. <S> I've disassembled some of these 'cheap' gadgets with only China Export marks (meant to look like the European CE mark) or with counterfeit UL marks, and am stunned by just how unsafe these things can be. <S> No creepage/clearance, insufficient wire gauge, damaged wire insulation, improper/no earthing, unconnected earth wires, inadequate fuses, the list goes on and on. <A> I found a really good thread on LinkedIn that answers this, including responses from an OSHA employee, as well as UL and Intertek employees. <S> http://www.linkedin.com/groups/Mandatory-NRTL-approval-in-US-1899348.S.195516492 <S> Apparently, OSHA mandates pretty much <S> every electric product used in the workplace be tested and listed by a NRTL. <S> However, the legal burden is on the purchaser (workplace) not on the manufacturer. <S> So... technically, you can legally build products in this case, but no one can buy it for workplace environments... <S> See comments byKevin RobinsonElectrical Engineer/Auditor OSHA <S> On the consumer (not workplace) side, there are some local (state, county, city) <S> electrical code requirements for all electrical devices to be tested and listed by a NRTL. <S> See the list in the thread by Jeffrey FecteauSenior Regulatory Engineer at Underwriters Laboratories <A> None. <S> But a good idea to get some if you have a product that someone could hurt themselves with, swallow, or start a fire, etc. <S> As mentioned by @madmanguruman there is a lot of stuff out there with the China Export that is meant to look like CE. <S> I had a couple hundred 5V PSU's help by US customs 3 years ago when we had a substitution for t wall wart. <S> They had all the logos and didn't even have a fuse inside. <S> But for the U.S., UL is a private lab and entirely optional. <S> FCC applies to the finished product. <S> If you are selling a component, like a processor board, that is intended to be inside something else, then not your problem (though your customers will appreciate easy passing). <S> RoHS is not required in most places - yet. <S> And some categories are exempt. <S> If it plugs into the wall (mains) directly or controls mains power, there are electrical codes for connectors and wiring that are basically the same as an outlet box or extension cord. <S> Anything from places like Sparkfun and Adafruit have no requirements with the exception perhaps of the soldering stations they sell. <S> However they are wide open to attack by any ambulance chaser who hears of a child swallowing a tiny PCB with a coin cell on it. <S> If you want to sell low voltage devices internationally, get an RoHS certification. <S> If you want to sell consumer products that use household or industrial power, go the full route plus, like people making anything these days, incorporate and get liability insurance.
| The requirements will vary a bit from state to state depending on which code (if any) has been adopted.
|
Giving shocks to students My son's science teacher had 15 fifth grade students stand in a semicircle holding hands. The student at each end held an electrode connected to some kind of variable contoller. The teacher increased the voltage until they could "feel" the electricity. He also had one student in the middle let go to demonstrate a "complete circuit"Is this dangerous? <Q> These sorts of experiments are safe so long as the teacher takes care to follow standard guidance such as Van der Graaf Generator Safety which goes into some detail. <S> The electrostatic energy stored by the sphere should not exceed 0.5 J. ... <S> and so on. <A> From memory, I believe a current value of 65mA passing through the human heart has the potential to kill. <S> According to Hyperphysics, 1 mA is the Threshold of feeling, 10-20mA causes a "can't let go response" where the muscles contract, and 100-300 mA can cause Ventricular fibrillation, and can be fatal. <S> The linked pdf stats that 6mA for a woman is enought to cause a painful shock. <S> For the sake of safety, let's say we do not want to go beyond 3 mA. <S> A typical resistance between two body parts is 1500Ohms <S> Hyperphysics claims 100kOhms for the human body. <S> Ohm's law dictates that if I held a potential difference of 300V across my hands, that the current could be dangerous. <S> The class was standing in series, so it would take 15 <S> *300V = 4500V <S> to kill pose risk to the students. <S> I would hope the teacher wasn't using a source anywhere near that value, which is not exactly the most accessible either. <S> From Wikipedia, it is said that 5mA is enough to feel, as opposed to 1mA. <S> Also the above values that I explained should not be interpreted to find absolutely safe zones when dealing with current. <S> [1] http://hyperphysics.phy-astr.gsu.edu/hbase/electric/shock.html <S> [2] http://www.hubbellpowersystems.com/literature/encyclopedia-grounding/pdfs/07-0801-02.pdf <A> The plural of anecdote isn't data. <S> Just because 100 of us answering the questions have done similar experiments doesn't mean that it's safe or recommended. <S> I've personally received shocks in the hundreds of thousands of volts range (at very low current) and have been set on my ass from much lower voltage but higher current shocks and survived. <S> It doesn't mean that what I survived was therefore safe or recommended. <S> It means I was lucky, if anything. <S> Now that I'm older and wiser <S> I don't go out of my way to experience shocks, even if I'm sure they're safe. <S> (The only thing <S> I do still do is briefly tap a 9V battery to my tongue to see if it's got any juice left in it, but I've found that 9V batteries will "bubble out" on the bottom when they're dead and tend to trust that instead.) <S> In fact, I'd be very concerned about having students stand in a circle conducting enough current that they feel a (mild) shock. <S> You never know if one of those students has an undiagnosed heart condition. <S> If the teacher wants to demonstrate the concept of a circuit he can do so with a moderately high frequency, low voltage AC signal and a sensitive detector which lights an LED. <S> It'd be way safer than anything that you might actually feel and get the point across just as easily.
| In short, I'm sure the experiment was safe, but extreme caution should always be exercised in regards to electricity. An enquiry to CLEAPSS has revealed no recorded incident of direct injury caused by shocks from the correct use of school Van de Graaff generators. Sometimes the damage caused by electric shock can take several hours to manifest, and it's doubtful that the people taking the victim to the hospital would connect the dots in such a case.
|
Design practice crossing clock domains and async signals I have been designing a few projects on different FPGA's in VHDL, and it seems my most common source of "hard to find errors" is when I forget to synchronize an async signal, or forgets to resync a signal crossing clock domains. My best weapon so far, has been to draw block schematic of the components. So my questions is, what is the best design practice to prevent these errors? <Q> Today even FPGA designs can have extremely complex clocking architectures and many async inputs, resulting in many potential CDC issues. <S> I'd say that the following points constitute a minimal set of "rules of thumb" for avoiding CDC bugs: <S> Keep track of all signals which cross clock domains (diagrams, lists, spreadsheets - whatever you find more convenient). <S> Async input signals should be included too. <S> All signals from the above list must be synchronized, unless there is a clear reason why not. <S> Never ever synchronize multi-bit signals bit-by-bit! <S> Use special synchronization schemes for buses instead (sync FIFO, two way handshake, etc.). <S> If there is an async reset in the system, and this reset does not apply to all the flip-flops - all the signals originating in this reset domain and passed to non-reset logic should be treated as async (and included in the list from #1) <S> I'm sure that the above list of practices is incomplete, and can be easily extended. <S> I also suggest considering CDC verification tools (like Questa CDC from Mentor) - these tools use formal techniques to automatically detect CDC issues in your design. <A> Some naming practises can be handy: <S> Any signal which crosses a clock domain should have the domain it is synchronised to appended to it. <S> So if you have count in the clock domain driven by signal clk (and it needs to go to another clock domain driven by other_clk ), call it count_clk and count_other_clk . <S> Maybe encapsulate it, depending on how much there is. <S> Put clear comments around it <S> (eg. <S> above here is clk , <S> this is the domain crossing from clk to other_clk , below here is other_clk ) <S> Truly asynchronous signals can have _async <S> appended to the end. <S> This at least makes code-review a little easier to deal with, but if you have many domains and many crossings, it will benefit you to invest in some tools to help (like Spyglass for example - which does vastly more than just checking clock domains) <A> In addition to the previous answers: Report Timing Use your timing analysis tool in your FPGA toolchain to find any signals you've forgotten to handle correctly. <S> You can easily generate a list of unconstrained clock transfers, all of which should be synchronised and an appropriate false-path added. <S> Ideally embed this into your build system so that it fails with an error if there are any unconstrained clock transfers, then you can't forget about them! <S> Re-use code Have a single entity/module for doing your single bit synchronisation, use a generic/parameter to control the number of registers in the resync chain. <S> You might want a separate synchroniser for resets. <S> Embed constraints <S> The advantage of re-using code - embed the false path constraints in the RTL. <S> That way you don't have to remember to add timing constraints for every signal. <S> A note about placement Registers in synchroniser chains need to be placed close together to ensure maximum timing window is provided. <S> Altera claim to automatically detect synchroniser chains so they shouldn't need placement constraints. <S> If you're paranoid on Xilinx you can use RLOC constraints to ensure your synchroniser registers are placed close together (unfortunately Altera don't support relative location constraints).
| Keep all the synchronisation code from one clock domain to another in one place.
|
What does overlaping indicate in i2c timing diagram I am studying how i2c devices works...and I have downloaded a power point presentation from Google, I have understood almost every basic concept, like, how the start and end of the transfer occur, what is SDA and SCL and what is master/slave. but in this timing diagram,SDA supposed to show the transmission of data bits, i do not understand how the two lines of transmission are displaying in the SDA here which are over each other. shouldn't it be a single line for SDA too ?also, what does the dashed line indicating here ? <Q> Where the SDA line is shown with a line at the high and low level at the same time, it means the data could be either high or low (but must remain at that level) during that time period. <S> Whether it's high or low depends on what data you are transferring, and will change from message to message. <S> Where the lines are shown dashed, it means there are bits of the message that aren't shown because they are similar to the ones that are shown. <S> In this diagram, bits 3, 4, 5, and 6 of the message are skipped over with dashed lines to allow two bytes of message to be shown clearly in the diagram. <A> A symbol would be either logical one or logical zero . <S> The dashed line represents a continuity/stream of symbols which will, of-course, vary from application to application( Ex. <S> a 1 byte transfer would involve 8 symbols ). <A> Not sure if I understand your question <S> but... <S> The dashed lines in your diagram means, more of the same for some time.. <S> like the gap in SCL between 2 and 7 is dashed to mean there are bits 3, 4, 5, and 6 which repeat the same pattern as 1, and 2. <S> The reason for double lines.. the upper line is for a 1 and the lower is 0 <S> , they both are shown as either is valid. <S> For example when SCL transitions at bit 7 in the diagram SDA could be either a 1 or a 0 depending on what you are sending. <S> But.. it must be either a 1 or a 0. <S> Elsewhere where you see the lines crossing, that indicates the signals can be undefined, the state is not determined. <S> This allows time for I/O lines to change. <S> note that SDA is the data, which is clocked into the part using SCL. <S> SDA must be at 0 or 1 state some time before the clock transition, this is called the setup time. <S> It should also remain in that state for some time after the SCL transition, called the hold time.
| Those overlapping lines are for 'visual convenience', the Line(SDA) could either be low or high and together they help to represent the symbol length.
|
Difference between a bus and a wire I have been studying buses used in communication systems. From what I read at Wikipedia, "In computer architecture, a bus (from the Latin omnibus, meaning "for all") is a communication system that transfers data between components inside a computer, or between computers. This expression covers all related hardware components (wire, optical fiber, etc.) and software, including communication protocol." Does that mean both a wire and a bus is the same thing? What feature makes the bus totally different from a normal wire in the first place? <Q> A wire can be a bus if it is a serial link carrying many individual pieces of information. <S> More usually, a bus is regarded as a collection of wires that transport digital information from A to B. 64 bit processors (PCs etc.) <S> have a 64 bit-wide bus between the CPU and their memory chips and possibly to other devices. <S> It doesn't have to be inside a computer of course <S> - anything that is transmitting information from A to B will use some form of wire or collection of wires for achieving those aims. <S> What differentiates a wire as not being a bus is that it only carries one coherent "entity" such as power or a microphone signal or is connected to an on/off switch or a guitar or a speaker. <S> A bus is usually digital. <A> I usually consider a bus a union of many wires. <S> Imagine an address data bus with A15..A0 .. 16 wires, 1 bus. <S> This is valid for very low level hardware. <S> Once you think about protocols, a bus is usually more a description of a topology type. <A> A device on a bus not only receives information; it can also reply. <S> If it replies over some different wire(s) than the one(s) where it receives, then both (sets of) wires make up the bus. <S> If the information comes from a single source, and all the other devices are simply passive listeners with no way to reply, that's not a bus. <A> A bus is a group of signals that is shared between multiple nodes. <S> The key word here is "shared". <S> For example, when computers are connected using an Ethernet Hub, Ethernet is used in bus mode. <S> But when computers are connected using a Ethernet Switch, Ethernet is not operating as a bus. <S> An implication of this is that, when one node transmits data on the bus, usually all the nodes will be able receive the data, but only the node for which the data is addressed to, will actually consume the data. <S> A bus will also have a sane mechanism in-place to handle multiple nodes driving the bus simultaneously. <S> To add more examples, I2C, SPI, 1-Wire are all buses, but USB is not a bus.
| One differentiating feature of a bus is that more than one device on a bus can send information.
|
Diode rating for a UPS project with extra battery I am planning to add an additional 12volt deep cycle battery to my APC UPS but I dont want to use the charging circuit built into the UPS. I think that if I throw in a Diode between the external battery and the UPS system it would accomplish my goal (and add an external charger). My question is about the rating of the diode that I should purchase. I am thinking that during a power failure, the load will be about 600watts. Would a 50V 5Amp diode be appropriate? What could I use that would be good for this applications?Thanks in advance for your replies, thoughts and suggestions. <Q> I doubt this will work as I'd expect the inverter circuit expects the battery to be a very low impedance in both directions. <S> To size the diode you might take the output power that your UPS can provide and refactor that to the 12V battery. <S> Assume <S> some loss in transform, say 50%. <S> If your UPS is rated for 100 watts, then your battery will need to supply 150 watts, <S> about 13A. <S> If your idea would work, the diode needs to be about 20A for a 100W output. <S> The diode will likely need a heat sink as it would be dissipating about 10 watts. <A> A diode will drop voltage causing the UPS to shut down sooner ( <S> IIRC APC Smart-UPS <S> I have shuts down when the voltage drops to 10.5V under load). <S> 600W/10.5V would be ~57A. <S> Read the datasheet of the diode and find one that can sustain 60A or higher current and has the lowest voltage drop at that current. <S> For example, 400CNQ (2x400A) with both sides connected in parallel would drop about 0.25V (at 150C) to 0.4V (at 25C) and would dissipate about 57A*0.4V=22.8W, so it would need a big heatsink or a heatsink with a fan. <A> I_diode mex <S> >= <S> Power_UPS / V_UPS <S> >= <S> 50A <S> An ultra-low Rdson MOSFET used as a diode gives the best results. <S> A MOSFET can provide Rson of < 1 milliOhm at 50A. V drop < 0.05V. MOSFET loss < 2.5W at 50A. As others have noted, I diode operating ~=Power_ups <S> / <S> I operating diodes ~= <S> 600 <S> W <S> / 12V- <S> >= 50A. <S> Even the best diodes are liable to have a voltage drop of tenths of a volt and <S> probably > 0.5V at these currents at < 100C. And <S> diode cost will probably be $50+ <S> MOSFETs with maximum Rdson at these currents of < 1 milliOhm max are available for under $10 each. <S> A circuit is required to allow these to turn on and off as required <S> but this is trivially simple. <S> Datasheet Infineon IPB009N03L {preliminary} 30V, 180A, < milliOhm Rdson. <S> Wow! <S> IR AUIRFS8409-7P - even better
| You would need a diode rated for at least 60A, but probably should use a bigger one so that it drops less voltage.
|
How to program ATmega 328P - PU I want to upload lines of code (with c files, not sketches). But sadly I don't own any programmers and only possess the Arduino UNO board. Since I want to program in c code, I can't make use of the Arduino IDE. Is there any way can code can be uploaded to the ATmega IC without using any programmer? <Q> You can use Arduino as ISP programmer. <S> Check the Arduino IDE \$\Rightarrow\$ File \$\Rightarrow\$ Examples \$\Rightarrow\$ ArduinoISP and refer to ArduinoISP documentation . <S> I personally use Linux and a Makefile to run all the required commands. <S> In short these are the commands required (Linux, but Windows is pretty similar when the toolchain is installed [and it is if you have the ArduinoIDE on the system]) <S> # <S> edit# use your favorite text editor to author the source file, then save as `project.cpp`#variablessrc= <S> projectprogrammerType=arduinoprogrammerDevice=/dev/....... <S> fill.this.in.... <S> avrFreq=16000000avrType= <S> attiny45baudrate=19200cflags="-g -DF_CPU=$(avrFreq) <S> -Wall <S> -Os <S> -Werror -Wextra <S> -ffunction-sections -fdata-sections"#compile to objectavr-gcc $cflags <S> -mmcu=$avrType <S> -Wa,-ahlmns=${src)}.lst <S> -c -o <S> $ <S> {src}.o ${src}.cpp#compile to elfavr-gcc $cflags -mmcu=$avrType -o <S> ${src}.elf ${src}.o#encode binary file to intelHexavr-objcopy -j <S> .text <S> -j <S> .data <S> -O <S> ihex <S> ${src}.elf <S> ${src}.flash.hex#flash the controlleravrdude <S> -p$avrType <S> -c$programmerType -P$programmerDev <S> $ <S> (baud) <S> -v -U flash:w:${src}.flash.hex <S> Seeing the complexity to remember these commands, it really pays off to figure out how to use the linked above makefile on your system: make helpmake editmake flash <A> If you want to save yourself a lot of time that you might waste on needlessly complicated solution just buy an AVR Dragon for $49. <S> Don't be tempted to buy $10 kits or some weird programmer from eBay. <S> Trust me I'm working with AVRs for the last 5 years and seen it all and tried a big part of it, nothing beats AVR Studio + original JTAG. <A> <A> Atmel Studio and a Make files are great ways to go. <S> Where nice and established, middle ground is to use WinAVR . <S> It predates the Arduino, it will install the tool chain and interfaces to compile and upload firmware. <S> There are several tutorials out there. <S> here is one .
| Use Atmel studio to compile the code and then use http://xloader.russemotto.com/ to take advantage of the chip bootloader and upload your compiled file.
|
When to use film capacitor I've bought a bunch of film type capacitor as they were pretty cheap and I thought it was a good idea to get some and test them. ( set here ) So I'm trying to figure out what's the specific application for these but for now I've only found them more usefull than other types when working with high frequency. So, can I just use them as replacement for ceramic/electrolytic capacitors ? For example as decoupling capacitor for IC or on voltage regulators ? (I'll confess that I really love their looks so as I'm just a hobbyist and most of the time space is not a problem, if I can use these cool looking little parts :) ) <Q> All capacitors have their benefits/drawbacks depending on the application. <S> Ceramics are also good for this, however NP0 capacitors with nF ranges in suitable voltages are expensive. <S> Metalised polyester caps are widley used in the AC/Mains arena due to those factors. <S> Electrolytics and Tantalums are great for high buffering storage requirements such as switchmode power supplies while augmented with some ceramics for nice current ripple performance. <S> Some age faster than others. <S> They all have their application specific pros/cons. <A> The question doesn't usually arise. <S> Generally you use ceramics in the picofarad range, film in the nanofarad range, and electrolytic in the microfarad range. <S> You would use film rather than the other types in marginal overlap cases when audio is being passed or filtered if you can tolerate the extra size of film caps. <A> Though it depends on your specific caps, all the very low leakage caps I have bought for precision low drift integrators (time constants of 1 second or more) were metal polyester film. <S> They were also very stable over temperature compared to ceramic disk, which often stated +80 -20% over the commercial temperature range. <S> They are good for high frequency as well and the ones you show are quite high manufacturing quality. <S> Just don't use the physically big ones to bypass. <S> The leads will be too long or the distance from the part will defeat the purpose. <A> Film capacitors do not suffer from piezoelectric effect compared to some ceramic dielectrics (X5R and X7R for example but not C0G), making them suitable for applications with high vibrations. <A> Film capacitors have much better linearity than most other capacitor types. <S> They also can have relatively tight tolerances (I'm using some 2% ones) and don't suffer from significant microphonic affects. <S> Overall they are a good choice for precision analog work. <S> The price you pay is they are relatively bulky and expensive.
| I've used Metalised polyester caps for high voltage/current resonant circuits for induction heating due to their low thermal drift coefficient and inherently high voltage rating.
|
Is it possible to create an HDMI input adapter for android? Would it be possible to stream a video signal into an android device? I understand that the HDMI port it's self is not designed to take input, so I was thinking that the data could be streamed via the USB port. I know that the Apple hardware prohibits this (apple made this decision for some reason) but would it be feasible on android? <Q> You can get USB capture devices that will take HDMI video in and encode it to e.g. H264. <S> So then it's a matter of drivers. <S> It looks like it's doable if you can choose the device and supply your own kernel: https://stackoverflow.com/questions/12334612/analog-video-capture-to-android-phone <A> This would rather be solved using any normal network streaming sending in the video signal via wlan. <S> So the solution would be to either use media server that gives this video stream or service that takes any HDMI input and sends it as a H264 compress network stream. <A> It is possible. <S> DJI makes a device for streaming 1080p from a quadcopter called LIGHTBRIDGE. <S> On the receiver they have a plug that goes HDMI to USB to display video feed on an Android phone or tablet. <S> I don't know the protocol they use.
| You can get Android devices that can USB master.
|
Sensors for detecting heavy metals in indoor dust Does anyone know about a kind of sensors (or how to construct) that could be used together with ex an Arduino or other microprocessor to measure the amount of heavy metals (like lead for example) in indoor dust particles. The goal of the project is to create a device capable of detecting and logging data about harmful heavy metals in indoor environments. <Q> Small physics departments have been getting rid of their neutron howitzers. <S> They have a bit of plutonium and beryllium in a stainless steel slug in a big tub of paraffin. <S> There are ports filled with stacks of acrylic and that is where you put your filter. <S> Thermal neutrons radio-activate whatever you have and you quickly, <S> because some of the half-lives are very short, stick it in a gamma ray spectrometer with multi-channel scaler (they are throwing those out as well - scored one a while back). <S> Maybe you can snag a setup. <S> Baseless radiation paranoia makes the howitzer hard to get, and keep. <S> However, there are direction on making your own proton accelerator in "The Scientific American Book of Projects for the Amateur Scientist" from 1960 ( the things we used to do in our basements!). <S> On a more practical level, I would bet the least expensive route is a chemical dip and color test, with filters for specific reaction colors or a simple spectrophotometer. <S> There are filter papers made with the same refractive index as some solvents, so that it vanishes when immersed. <A> Laser-induced breakdown spectroscopy sounds more portable than the old atomic absorption or X-ray fluorescence methods, but you're still going to have to collect dust samples on filters, and subject those to the care of an expensive, and likely quite large, machine. <S> See for example TSI or <S> Applied Spectra .NASA's <S> Curiosity Rover's chem-cam laser system will probably pick up lead, and is likely small enough to be easily portable, but you'll still need to build a sample filter unit for the thing unless you're willing to burn holes in the floor underneath dust-bunnies. <S> Still, the cost of such a unit will make an Arduino nothing more than a cheap dongle hanging off to the side. <A> It could be realized e.g. by bubbeling a known volume of air through a H 2 S solution <S> (attention: poisonous and very bad smelling) and then measuring how much light of an appropriate light source (LED) is absorbed by the solution. <S> See this for (somewhat simplistic) example . <S> This method is sensitive enough e.g. to measure quantitatively the amount of lead in human hair picked up from the environment (air). <A> A common way to measure concentrations of heavy metals is with xray spectroscopy. <S> This is not something appropriate for a typical hobbyist, but I'm mentioning it here for completeness and because there are portable commercial units that do exactly what you are asking for based on this principle. <S> Basically, if you crash enough high-energy photons into them, atoms will re-emit this energy as light of specific wavelengths. <S> The emissions of different elements are unique, like a fingerprint. <S> There are off the shelf hand-held instruments that do exactly this. <S> One <S> I am familiar with is made by Thermo Fisher, but I think there are others making them too. <S> The one from Thermo Fisher that I've seen is gun-shaped. <S> You point the gun at the sample you want to analyze and pull the trigger. <S> It shoots out xrays at various known wavelengths and strengths, and analyzes the return emissions. <S> Software then figures out the concentration of various elements in the sample. <S> It also contains a library of common alloys and can tell you directly what kind of stainless steel you have, for example. <S> These things do cost 1000s of dollars, so this isn't something you want to get for the fun of it. <S> Making miniature xray tubes is also not something the average hobbyist can or should attempt. <S> Designing these things is 60% science and 50% dark magic.
| If it is mainly Lead (or Mercury) you are looking for: Lead can be detected quantitatively in very low concentrations as PbS by photometry, i.e. by measuring the absorption of light of a certain wavelength in a solution.
|
Best way to detect when I'm home I'm working on a home automation setup and I'm trying to find the best way for the system to know when I'm home. A motion sensor won't work because my wife or my dogs may be home when I'm not. The two things I almost always carry with me are my keys and my cell phone and I liked this solution which pings the phone to see if it has joined the home wifi network. The only problem is that my phone goes to sleep very quickly when not used. This would make it good at detecting when I get home (if I just wake the phone for a few seconds on entering), but not when I leave. My other thought would be a bluetooth tag on my keys with a reader near the door, but how could it tell arriving from leaving? Anyone have any suggestions? <Q> Why don't you just hang your keys on a hook connected to a microswitch? <S> There are some problems that do not require a smart phone or RF communications. <A> A keyfob(-sized) device, based on an RF transceiver (Zigbee, perhaps) that spends 99% of its time asleep, periodically waking up and listening for "query" messages from one or more corresponding base stations located around your home. <S> On receipt of a "query" the keyfob responds with an "acknowledge" message. <S> A useful extension to the concept is to have the keyfob report its battery status in the "acknowledge" messages, and have the base stations tell you when to replace the battery. <A> How about an RFID tag or smallest RFID object embedded in your FLESH! :) <S> But the problem to differentiate between leaving and coming back will be there. <S> Maybe 2 of those,so if one is activated, and the other is activated as well after a small time, then the order could help the system figure out if you are leaving or are back. <S> I think, using your phone would be the best option <S> , dont they have the option to still check if the phone goes to the sleep mode? <S> Another stupid way would be to have a system says Hi, when someone steps in, and as you reply, it does voice pitch detection to figure out who it is. <A> BLE is a good option or regular bluetooth.
| JK,You could use an RFID based system, more like a tag. If there is an extended period (say, 5 minutes) during which no base station receives an "acknowledge" message then you can assume that your keyfob is not at home. Another expensive option would be to use an Image detection system. I plan on using the wifi method you mentioned but thought about a BLE option too.
|
OR-ing power supplies (diode or mosfet) I have got two power supply options on my board: USB 5.0V DC Power Jack of 5.0V My intention is to design a or-ing power supply option, as either of them will be used at a time. Possible solutions are shown below: Using oring diodes or using two p-mos Possible issues observed with the above options: Using diode is cheap and good option but an ordinary diode gives adrop of 0.7V and a schottky diode will give a drop of 0.16 to 0.20volts, which is also not acceptable because my processor IMX.28 recommended operating power supply is 5.0V and minimum supply voltageis 4.75. With a 0.2V with schottky diode the 5.0V comes down to 4.80Vand the space between recommended and supply fed is very less. Then I thought to use p-mosfets which serves the purpose of oringalong with reverse polarity protection, but assume a case when both the supplies are fed together by mistake and there is minor difference between USB supply and DC jack say 4.9V for USBand 5.10V for DC Jack. Then, the DC jack supply may pump the current inUSB Jack, which may damage USB. Is there any other better and cheap option I should use for or-ing supply, or is there something wrong with my analysis? <Q> There are ICs available to do the whole thing, including the switching MOSFETs, full isolation between inputs, etc. <S> For example, the PS2115A from TI can autoswitch between two inputs, handle 2A, and is currently available for US$2.15 from DigiKey. <S> Take a look at figure 14 for what you want. <A> I know this is a few months old, but just for posterity: Using two PMOS as the OP suggests will NOT work as he intends. <S> It's a mistake I've made in the past. <S> The FETs will effectively do nothing to prevent one power source from back-feeding into another, as the intrinsic body diode will conduct from the drain to the source when under a reverse bias. <S> See this posting to learn more about the body diode and how/why it is formed. <S> There are solutions with discretes (which invloves using mosfets with a 4th body terminal), but go ahead and trust me <S> , they aren't very simple, and requires some consideration with circuit layout. <S> Edit: With the 4 terminal FETs you remove the body diode, so you only need one. <S> See this anwser and this app note . <S> Google "fet common source switch" for more info. <S> The alternative is to use a PMIC (power management IC) as others have advised. <S> They sell PMICs that have the functionality of an ideal diode (no voltage drop), and others that are more application specific. <S> It really will simplify your life. <S> They'll abstract away some of the device physics complexities, and handle them much more effectively than could be done using discretes. <S> Checkout the TPS2114 as an example. <A> If you want to do it with discretes, you can augment the functionality of your FET arrangement as so: <S> This will turn on the appropriate FET when the appropriate source is connected. <S> I imagine that it would be favourable to prioritise the USB source for communications functionality so it takes precedence if both sources are connected by switching the Plug pack source off. <A> You might try "ideal diodes" such as https://www.digikey.com/product-detail/en/maxim-integrated/MAX40200AUK-T/MAX40200AUK-TCT-ND/7599791 -- for an ORing input solution, where you don't need a cut-over, it just might do the trick.
| I should mention that there is a solution using 3 terminal FETs by using two pmos in series, with their sources tied together.
|
Dosage control through flow meter and valve I am trying to make a drinks machine that when a button is pressed, a predetermined amount of liquid (not determined by time) is allowed through a solenoid or other valve, and measured by a flow meter. Ideally the flow meter could be digitally linked but not essential. I have been trawling the internet for days but I can't seem to find anything that determines by quantity of liquid, and not time dispensed. I would be enormously grateful for any suggestions. <Q> Why not simply weight the glass with the drink while mixing it. <S> The change of weight while pouring in an ingredient should be sufficient to determine the amount filled in. <A> The application being described corresponds to a dosing pump , such as used in pharmaceutical and other chemical industries, and of course in pubs and bars. <S> The dosing pump is volumetric in operation, in order to ensure precision in liquid delivery volume despite (reasonable) differences in viscosity, inclination or in differential pressure between holding reservoir and receiver. <S> Those are the key factors that cause flow rate to differ for the simpler time-based fluid metering pumps that the question refers to. <S> For instance, this is an example of a long-lasting, precision dosing pump. <S> For added precision, dual-chamber dosing pumps operate in a two-step way: The first impeller fills a precisely dimensioned reserve chamber, from which the second impeller forces the fluid out to the receiver. <S> An enhancement sometimes used for hazardous fluids is to automatically prevent the second impeller from engaging unless the reserve chamber is full. <A> You could certainly use a turbine or paddle-wheel type flowmeter. <S> Some relatively inexpensive models are made by GEMS sensors such as their model <S> FT-330 . <S> It has a pulse (Hall effect) output. <S> You will need to integrate (simply count the pulses) to measure the total amount of liquid to determine your shut-off point. <S> This particular product is designed for your type of application. <S> Since it is for human consumption, NSF (National Sanitary Foundation) approved materials and products should be used. <S> Be sure to also consider how the sensor will be cleaned. <S> Here's a link to the datasheet: <S> FT-330 Datasheet <A> Would it be possible to re-purpose a "tipping bucket rain gauge" sensor to measure the amount of liquid? <S> The actual mechanism within an off-the-shelf rain gauge sensor is actually quite small.
| For high-viscosity fluids, such dosing pumps also have a drawback action at completion of metered fluid delivery, to prevent dosage variations due to dripping.
|
Are devices damaged by high current, or high temperature? I'm wondering if electrical devices are damaged by the current or by the temperature. Imagine we have a little device with a maximum input current of 500mA. I'm sure that if we subject it to 1A or 4A it will become very hot and probably explode. The question I'm asking is whether the high temperature induced by the current is the principal cause or it's the high amount of current that is the cause. I'm wondering if we cooled the device at -230 Celsius (we're accepting that it's still working) and then we applied that high amount of current would it survive? <Q> First, many devices specify a maximum input current as a characteristic, rather than an operating requrement. <S> For example, if a digital logic IC specifies its maximum input current is 5 mA (for example), that usually means that as long as you provide an appropriate power supply voltage, the device will not draw more than 5 mA --- <S> that is, it is the device's promise not to take more than 5 mA, not a requirement to the user not to provide more than 5 mA. <S> However, other devices do specify a current limit as a user requirement. <S> Common examples are resistors, inductors, linear regulators. <S> For resistors or linear regulators, the reason for this limit is usually to limit self-heating that would cause thermal damage to the part. <S> For inductors, the limit is more often related to saturation of the core material, although thermal limts can also come into play. <S> In these cases, providing better cooling (say by heatsinking) can allow operating with higher currents, or be required to avoid de-rating the max current specs. <S> I'm wondering if we cooled the device at -230 Celsius (we're accepting that it's still working) <S> and then we applied that high amount of current would it survive? <S> It depends on the type of part. <S> For some parts, it might allow you to operate with higher-than-rated currents. <S> In other parts it might cause thermal stresses (due to thermal gradients and or CTE mismatch between different materials within the part) that damage the part even when operated below the nominal rating. <A> As a gross oversimplification, two things kill electronics: overvoltage, and overtemperature. <S> So yes, some (not all!) <S> devices could be run beyond their nominal rated currents if they were appropriately cooled. <S> Typically, these devices would state a rated current at some temperature . <S> But the details will vary greatly from device to device, and you really need to understand more about the device you're working on and what you're trying to do with it before actually proceeding with a design based around supercooling the device. <S> Also, it's worth pointing out that all devices have a minimum operational temperature (whether stated or not), meaning there's a limit to how hard you can chill them before you risk something else going wrong. <S> And even if you could keep the case of a device near absolute zero by sinking it to a giant fractal superconductor in interstellar space, there's still the thermal drop between the innards and the case to contend with. <S> There are hard limits to what can be achieved by chilling a given device, and the cost of a larger device is typically far less than the cost of refrigeration. <A> Devices are damaged by the first thing that kills them. <S> Given a sufficiently extreme over-parameter event, all devices will die. <S> Typically the parameters that occur around a device will be coupled by the type of the device, such that one parameter is always going to cause its demise. <S> For instance, take a resistor, where a voltage is applied at ambient temperature, and a current flows, heating it up. <S> With a very low value resistor, the voltage and hence power will be low, so it may be electromigration in the conductor that eventually causes its failure. <S> With a very high value resistor, the current and hence power will be low, and so arcing across the resistive element might be the cause of death. <S> With a middling value, neither voltage nor current failure may occur before the resistor overheats. <S> Obviously gross overheating takes time, whereas an arc-over can happen almost instantaneously, so time to failure is important as well. <S> And that's just a simple resistor. <S> When the device is more complex, with bond wires to a semiconductor die that may fuse under pulse conditions, or thin oxide layers that may punch through with single-digit volts applied across them, or an array of small FET dice directly paralleled into a large FET whose ability to share current stably depends on the length of the heating pulse, then you have a significant job to understand the detail of all possible failure mechanisms, and which will trash the device first.
| Overcurrent can lead to either, depending on the device and the situation.
|
How do I size fuses to handle sudden changes in AC line voltage into a capacitive load? Suppose I have a rectifier on the AC line, followed by some caps and a load. simulate this circuit – Schematic created using CircuitLab If the AC line is suddenly increased, there's a current surge into the capacitor. This can happen when power is applied, during a line surge, or when recovering from a line dip. A precharge circuit can help with power application, but it's less helpful after a dip. The only things limiting this current surge are the impedance of the circuit components and lanes, ESR of the cap, and inductance of the AC line. The line inductance looks like it should dominate. So there's an LDC circuit between the line inductance and the cap. It's like a tank circuit, except it looks like you'll only get one pulse out of it instead of a decaying ring wave. But there, I'm stuck. How do I compute the peak and width of the current pulse into the caps, so as to size my fuses appropriately? <Q> The usual solution to this is to use a slow-blow fuse. <S> These blow only if excess current is maintained for a relatively long time. <S> The datasheet will provide more quantitative descriptions of "excess current" and "long time". <S> As far as computing the peak current of the inrush current, it's probably easiest to measure. <S> Connecting an ideal voltage source to an ideal capacitor results in an infinite current. <S> In reality, neither the voltage source (the device's power supply) or the capacitors or the wires connecting them are ideal, so the inrush current is determined by the non-ideal inductance and resistance of all these components. <S> The duration of the inrush period can be calculated if you've measured the resistance, and know the capacitance. <S> Multiply the resistance and the capacitance together, and this is the time it will take to charge the capacitor about 63% of the way to its final value. <S> Research RC time constant for more detail. <S> Another option is to deliberately introduce a series component to limit inrush current. <S> This can be a resistor at simplest, but a more sophisticated and efficient device is a NTC thermistor. <S> By deliberately selecting your current limiting device (rather than relying on wire resistance and such), calculating the inrush current, and thus sizing the fuses, is much easier. <S> Wikipedia has more detail under inrush current limiter . <A> The next step is to ensure that it is sized to protect against fire / explosion if there's a hard abnormal in the circuit. <S> For example, a safety test for your product would be to short out the capacitor after the bridge and apply the maximum specified AC input. <S> The fuse should blow without the diodes burning / rupturing / emitting smoke or debris. <S> Once your fuse is appropriate from these perspectives, you can do your line drop tests and see how well the fuse performs. <S> If you find nuisance blows, bear in mind that if you increase the rating or decrease the response time (go from fast to slow-blow, for instance) <S> you'll need to repeat your safety test to make sure it's still appropriate from a safety perspective, and may need to beef up other components in the circuit to make sure the fuse blows first. <A> Not only fuse should be rate, but switch as well.a) <S> Fuse rating <S> where you need just one slo-blo fuse at maximum voltage 230V (RMS) <S> b) Switch at maximum voltage 2x230V (RMS) or more FL: <S> Fool loadNL: <S> No Load
| The first approximation for the fuse size is to make sure the steady-state current draw is not greater than the maximum no-blow current for the fuse.
|
What is the difference between a transformer and a coupled inductor? Transformers and coupled inductors seem very similar. Is there a difference in construction? Or only in use? This question asks something similar, but the answers don't address my question: Coupled inductor vs an actual transformer? <Q> The two are basically the same class of device, although each will have parameters optimized differently. <S> The two names are to explain the different intended usage, which also gives you a quick guess of how some of the parameters may differ. <S> Of course only the datasheets would tell you what the parameters are for sure. <S> A transformer is specifically intended for transferring power from one winding to another. <S> You want the coupling between windings to be as good as possible, the leakage inductance zero, and the absolute inductance of each winding with the other open is often not a large concern. <S> With coupled inductors, each winding is still used for its inductance alone, although of course some coupling is being utilized else there would be two separate inductors. <S> Generally leakage inductance is less of a issue. <S> In fact, it can be useful to have some minimum guaranteed individual (non-coupled, or leakage ) inductance for each winding. <S> The absolute inductance of each winding with the other open is also a important parameter that will be well specified. <A> Technically they are the same thing it depends on its usage. <S> We typically think of an inductor as storing and releasing energy so for example in a typical switch mode fly-back type power supply we might call it a "fly-back transformer" or "coupled inductor" rather than a transformer. <S> Another example is the output inductor on a multi-output buck converter. <S> If we decide to wind the inductors for different outputs on the same core we would call it a coupled inductor. <S> Whereas normally for a transformer we apply an ac voltage to the primary to generate one across the secondary and power transfer is instantaneous. <S> Any energy it stores is usually considered a bad thing (causing losses) while inductors (coupled or otherwise) are intended to store and later release energy. <A> A coupled inductor stores energy. <S> They typically have a gap, where the energy is stored in the magnetic field. <S> Other than that, they do look very similar to transformers. <S> A coupled inductor would be used, for example, in a flyback converter, where it stores energy while the switch is on, then dumps the energy to the output when the switch is off. <S> Most transformers (other than coupled inductors) are wound on low reluctance cores. <S> They do have magnetizing and leakage inductances, but these are more like parasitic effects. <S> An ideal transformer does not have these characteristics. <S> An ideal transformer does not store energy. <S> On the other hand, a coupled inductor is an inductor , and is designed to store a significant amount of energy in the core flux. <S> Because of this, the core has a gap, either a discrete gap or a distributed one, like in a powdered iron core. <S> Energy is stored mostly in the gap. <A> Two coupled inductors can be defined as any two inductors that share a part of their flux lines. <S> Because of this coupling, voltages are induced in the other winding (=mutual coupling). <S> No more or less. <S> A transformer is a device that makes use of two coupled inductors to increase or decrease the voltage level. <S> The linking is done via magnetic iron, ferrite ... <S> However, also an induction motor and transmission lines are usually modelled as coupled inductors. <S> The coupling can be seen from the fact that a current in one phase (or coil) contributes to the voltage in another phase (or coil). <S> Because of this, we become a set of three coupled differential equations. <S> Since this is rather difficult to work with, a symmetrical components transformation (Fortescue transformation) is usually applied to obtain a system of three uncoupled equations. <S> Other transformations such as Clarke or Park can also be used when an induction or synchronous motor is considered.
| I think most of us would regard a coupled inductor as a special type of transformer.
|
Powering an AMC1200 Isolation Amp I need to measure a very small current at the high-side of a circuit. The high side is at 3000VDC. The measurement needs to ultimately be in the form of a signal with a peak of no more than 5V, so some isolation is required. I am tinkering with a TI AMC1200, which is an isolation amplifier. The data sheet for the device is here http://www.ti.com/lit/ds/symlink/amc1200.pdf My question is with regards to powering the amplifier. The data sheet specifies that the high and low side should be powered up to around 5v. So, can I just use 2 different 5V power supplies? I am confused, because the signal being measured will be across a sense resistor, so it will be floating up around 3000v. Perhaps a diagram is in order...this is what I am trying to explain... I have built a little test circuit, with 20V on the high side, and 2 separate power supplies as suggested above, but it doesn't do anything. I know this is probably stupid, but I'm pretty new to this stuff. Any help would be appreciated. Thanks so much. <Q> I'd consider using a contactless dc current mechanism like a hall effect sensor: - This is the first one I found on the web <S> and I can't vouch for it still being available <S> but I'm sure there are others. <S> Data sheet here . <A> Isolated DC/DC converters are commonly used for powering the "hot" side of the isolation amplifier. <S> Here's an example of such power supply. <S> The output (secondary) is floating with respect to input (secondary). <S> The secondary side ground could be at 2995V and the secondary side output can be at 3000V. <S> It's also possible to roll your own isolated power supply like that. <S> The only trick is finding or making a transformer for it. <S> There may be other ways of achieving this. <S> Zener <S> I've heard about floating linear regulators, which generate small supply voltages near the high voltage rail. <S> May be somebody can chime in on this. <A> The particular one I used was "three port" - the power input was isolated from both the analog input and the analog output. <S> I believe they also had two-port amplifiers, where the power supply was common to the input, or to the output. <S> It may be easier to use something like this, rather than having to make your own isolated power supply. <A> This will not work, period. <S> The common mode operating range for this amp is between -160mV and Vdd1, from the Electrical Characteristics table on page 4 of your data sheet. <S> Unfortunately, you've also exceeded the Absolute Maximum Vin (which is Vdd1+0.5V), and maybe the Absolute Maximum Vdd1 (If you powered w/ 20V -- I don't quite understand your post. <S> You're OK there if you used 5V) and so your chip may not be functional any more.
| Unless you can power the chip at 3000V, you need to use a low side current sense, or an even more dramatic approach, like a linear analog optical isolator on the high side followed by a regular amp. I have used an isolation amplifier from Analog Devices (can't remember the number) that included isolated power supplies.
|
What is more accurate definition of Ohm's law? What is more accurate definition of Ohm's law and resistance?is it $$R=\frac {V}{I}$$ or $$R=\frac{dV}{dI}$$ This is doubt that developed in my mind during a class where professor derived power equation where he used second one for resistance in the derivation. I checked Wikipedia. They showed the first relation as accurate. Of course if the first relation is correct and resistance \$R\$ is constant, then we can use second relation. But what if resistance is not constant? For a practical problem, suppose my voltage source is current dependent and is given by $$V=I^2+2I$$ Then how will you find resistance of given circuit at a given value of current \$I\$? <Q> If a circuit element is Ohmic , then the voltage across and current through are proportional $$V \propto I $$ and the constant of proportionality is the resistance <S> \$R\$ <S> $$V = <S> R <S> \cdot <S> I$$ <S> This relationship, Ohm's Law, is obviously a linear relationship and thus the slope of the associated VI curve is just the constant of proportionality <S> \$R\$ <S> $$\frac{dV}{dI} = \frac{V}{I} = <S> R $$ <S> However, for a non-linear circuit element, e.g., \$V = R \cdot <S> (I + \epsilon I^3)\$, the voltage across is not proportional to the current through and thus $$\frac{V}{I} \ne \frac{dV}{dI}$$ <S> Now we can define the terms <S> static resistance and dynamic (or differential) resistance : $$R_{static} = \frac{V}{I} $$ $$r_d = <S> \frac{dV}{dI} $$ <S> The static resistance is useful for DC analysis while the dynamic resistance is useful for small-signal analysis (where we linearize the circuit element about the DC operating point). <S> For more, see the Wikipedia article section static and differential resistance . <A> This answer is probably inherently displeasing to the feeling of natural order for some :-) <S> : <S> A law of nature is simply a statement of observed results under defined conditions. <S> It is arguably saying the opposite of what it may seem - ie not so much "R is the ratio between ... <S> " but it is more "if the ratio between V & I is constant <S> then we call this constant resistance" and " <S> this approximates typical behaviour of a significant proportion of real world products". <S> At any given moment R IS the ratio between V and I. <S> If this ratio has changed then R has changed. <S> So V <S> /I never changes for specific values of V & I with all other conditions held constant, whereas dV/dI typically does change in the real world. <S> So R = <S> V <S> /I is an accurate statement R = <S> dV <S> /dI is usually an approximation and where it all falls apart <S> it just means that the observation does not apply under thos e conditions. <S> That's woolier than I'd like but seems to convey what I'm trying to say. <S> I hope :-). <A> You're entering the field of superposition and small signal analysis with \$\frac{dV}{dI}\$. <S> It simplifies a complex model in such a way that you can work reasonably accurate with it and with reasonably simple equations. <A> Start with \$v=ir\$, and differentiate with respect to \$i\$. $$ \frac{\mathrm{d}v}{\mathrm{d}i}= <S> i \frac{\mathrm{d}r}{\mathrm{d}i} + r \frac{\mathrm{d}i}{\mathrm{d}i}= r <S> + i \frac{\mathrm{d}r}{\mathrm{d}i} $$ <S> If \$r\$ is constant with respect to \$i\$, you get your equation. <S> If not, you need to include the extra term. <S> Calc is your friend! <A> I think the important bit you are missing is that when we use the variable \$V\$ for voltage we are already talking about a voltage difference , not an absolute value. <S> It is implied here that we are talking about the difference between the voltage at some point and the voltage at ground (0V by definition). <S> So, Ohm's law is already in the form $$ R = <S> \frac{dV}{dI}$$ and <S> the two forms are equivalent. <S> If you start talking about how real resistors or nonlinear elements behave then you need to stop talking about Ohm's law. <S> Ohm's law applies to ideal resistances only.
| Ohms law is essentially a statement that the ratio of the two two variables V & I is typically observed to remain approximately constant as the variables vary.
|
Why does the voltage of a zener diode match the voltage at Vout? In this circuit, if: Vin = 9V Vz = 5V I understand that Vout will be 5V. Does that have to do with Kirchhoff's Voltage Law? How does the zener diode, if it drops 5V to ground, cause Vout to also be 5V? <Q> Does that have to do with Kirchhoff's Voltage Law? <S> Yes, by KVL, \$V_{out} = <S> V_z\$. <S> How does the zener diode, if it drops 5V to ground, cause Vout to also be 5V? <S> Another way to 'see' this is the load (not shown) is in parallel with the zener diode and, as you know, and by KVL, parallel connected circuit elements have identical voltages . <S> The circuit with load: simulate this circuit – Schematic created using CircuitLab <S> See that the zener diode and load are parallel connected and <S> thus, the voltage across the load and voltage across the zener diode are identical: $$V_{out} = V_z $$ <A> Zener diode passes a lot of current (has low resistance) if the voltage is above Vz. <S> So, connected in a circuit like in the question: <S> If the voltage at the output was lower than Vz, the diode would not conduct and (if there was o other load, the voltage would rise. <S> If the voltage at the output was higher than Vz, the diode would have low resistance and short out the output, which means that the voltage would drop (because of the resistor in series). <S> So, the circuit reaches an equilibrium of Vout= <S> Vz. <S> If the voltage tries to go lower (a load is connected), the diode conducts less and the voltage rises back up to Vz. <S> If the voltage tries to go higher (aload was disconnected) then the diode would conduct more and drop the voltage down to Vz. <A> Rhetorical question: <S> What's the current through the zener? <S> This might help: As you can see, once the voltage hits the zener voltage (-17.1V in this case), the zener starts conducting a lot of current, really fast. <S> Now what's the voltage across the resistor? <S> We know from Ohm's law that the voltage across the resistor will be <S> \$E = <S> IR\$. <S> So as the zener starts conducting a lot of current, the current through the resistor will go up also, and by Ohm's law, so will the voltage across the resistor. <S> When the voltage across the resistor increases, the voltage across the zener must decrease (that's Kirchoff's voltage law). <S> If it were to decrease too much, the zener would stop conducting, and then there would be no current, so the resistor voltage would fall to zero, and the zener would again see \$V_{in}\$ and conduct. <S> Thus an equilibrium is reached: the zener conducts just enough current to make the voltage drop across the resistor equal to \$V_{in} - V_z\$. <S> A zener regulator such as this has two problems. <S> Firstly, quite a lot of current can flow in the resistor and the zener, even when no load is connected. <S> This is inefficient. <S> Secondly, as the load draws more current, the zener has to conduct less current, because the current through the resistor (which determines the output voltage) is the sum of the zener current and the load current. <S> At some point, the load draws enough current on its own such that the zener doesn't have to conduct any. <S> If the load current is further increased, the voltage drop across the resistor will be too much, and since the zener can't source current (only sink it), \$V_{out}\$ becomes less than \$V_z\$. <A> When doing circuit analysis you can treat the zener diode as an ideal voltage source at the zener voltage. <S> It's important to remember that an ideal voltage source constrains <S> the voltage between two points in a circuit, without necessarily supplying power to the circuit. <S> When the zener is conducting under reverse bias we know that the voltage across the zener doesn't change very much over a fairly wide range of current values passing through the zener. <S> So, over a limited current range the zener diode behaves kinda sorta like an ideal voltage source. <S> It's close enough for a first-order d.c. analysis. <A> Zener diode is a non-linear component. <S> The voltage drop of the current-limiting resistor will always be Vin - Vz, which in your circuit will be always 9V - 5V = <S> 4V. <S> The 4V voltage drop of the resistor is independent of its resistance value. <S> The size of the resistor only determine the amount of current flowing through the zener diode. <S> For example, if the zener is rated 1W, then maximum current that can safely flow through the zener is 1 / 5 <S> = 200mA. <S> So the value of the resistor will be (9 - 5) / 0.2 = <S> 20Ω. <S> In case the zener used is rated 1/2W, it can safely pass through 100mA current, the value of the resistor will be (9 - 5) / 0.1 = <S> 40Ω. Using V = IR, the voltage drop of the resitsor remains at 4V irrelevant of its size. <S> Kirchoff's voltage law is always in play. <S> When no load is connected, all the current will be consumed by the zener diode. <S> Suppose a resistive load of 100Ω is connected, the load will consume 50mA current, the surplus will pass through the zener. <S> The current consumed by the zener will be (200 - 50)mA = 150mA and ((100 - 50)mA = 50mA respectively in the example. <S> If the resistive load is 25Ω, 200mA current will pass through it. <S> No current will pass through the zener, and the zener is no longer conductive. <S> With a resistive load less than 25Ω, the zener will not conduct, and circuit current will increase, and Vin = <S> Vr + Vload = 9V always. <S> The circuit still follows Kirchoff's voltage law.
| When Vin>Vz, and there is a current following through the zener, the voltage drop of the zener will be always Vz.
|
Any tricks to attaching a wire or pin to a testpoint? More and more often, I find myself needing to tear apart a device to seek out and connect to serial pads. These pads typically give me access to the underlying operating system for research or tinkering, of which I'm perfectly comfortable with. What I'm not comfortable with, though, is making the necessary hardware connections. That is, while I own soldering tools, I'm deathly afraid of using them. As a software guy, I really just want to get in, look at some bits, and get out, without any lasting damage . Are there some tricks of the trade to attaching pins/wires to a testpoint or non-throughole pad without solder for short-term use? Perhaps a wire with a flat conductive circular tip that would yield nicely to, say, tape or hot glue? Example pad site: <Q> <A> The best trick is not a trick at all. <S> It's using a thin solder and flux. <S> Once you've identified the pins you need to use, that is. <S> After all, these are fairly small (area wise) isolated pins. <S> These things are made to be soldered. <S> Surface mounted parts go through 270°C degree solder profiles! <S> Aside from that, Pogo pins are a good choice, but there are some more creative options. <S> Since there is no scale to the picture to say how big the pins are, it's hard to suggest a size of wire to use. <S> Let's use 24awg. <S> Since one point (TP12) is tied to ground, you can grab that anywhere on the board. <S> The other (TP11) looks to be a Vcc type, so you can grab that from anywhere that voltage is at, or don't use it if not needed. <S> So the two important ones are TP9 and TP10. <S> In either case, you strip the wire a few MMs, then you hammer the ends flat, to give them a bigger surface area. <S> Since they are near the edge, a nice flat clamp will hold them in place. <S> ( or plastic covered paperclip, or a clothspin, depending on how much space you have to work with ) <S> You want the pressure to be on the wire, not the coating, other wise the wire will lift up and you will not have solid contact. <S> Imagine this but <S> with wires: <S> Another option is blu tack, fun tack (A reusable gum... putty thing. <S> Just check the stationary aisle or an office store, there is different colors and names <S> but it all works the same). <S> Again, flatten the wire points, then use a big thing of blutack to hold them in place. <S> I suggest taping the wire down an inch away just to take some pressure off though. <S> Non-conductive <S> (I can't say that all kinds are) and doesn't really burn. <S> It's great to hold things in place for soldering too. <A> A wild thought: attach wires to small steel nails with decent size heads, put a strong magnet on the other side of the board and just place the nailheads against the pads. <S> If the magnet is strong enough, the connection will be reliable. <S> However I have no idea how well the board will operate in the resulting magnetic field. <A> With properly-sized alligator clips, if the pads are near the edge, you could use them. <S> Another option is to attach wire leads to the pads with electrical tape. <S> In any case, you will want the board + wires to remain perfectly still once they're set up. <S> If you're trying to work on many copies of the same board, you could rig up some sort of clip that presses leads onto pads in the same place, and connect your wires to those removable leads. <A> [This started as a "don't be a yellowbelly afraid to solder" comment. <S> But, I've run out of room.] <S> Note that the TP9 through TP12 are test pads, and there are no components on them. <S> This means that you are very unlikely to burn a component, while you try to solder to these test pads. <S> The only tangible failure can occur if you overheat the pad to the point where the adhesive, which holds the copper to fiberglass, fails. <S> Even then, you would probably only lose the pad, while the device under test (DUT) remains operational. <S> Use leaded solder. <S> Leaded solder melts at a lower temperature than lead-free solder. <S> Modern (last 3 years or so) circuit board materials boards are designed to withstand higher lead-free temperatures. <S> If you use leaded solder, this will give you additional margin for avoiding overheat. <S> Have solder wick, so that you can break solder bridges, if you hake them. <A> Few links I found helpful. <S> How to solder. <S> http://www.talkingelectronics.com/projects/Solder%20-%20How%20to/HowToSolder.html <S> Well explained the common mistakes and how to avoid parts damage. <S> soldering in SMD circuits. <S> http://www.instructables.com/id/How-to-Solder-SMD-ICs-the-easy-way/ <S> Besides them, Some- other suggestions: <S> Could use a PCB-holder or PCB-cradle, that allows using both hands. <S> That could enhance both accuracy and speed. <S> The second hand could be used to hold the parts on proper place. <S> Could use a Magnifying screen . <S> fresnel-lens magnifiers are now very popular. <S> Could use good quality tweezers, such as Watchmakers forceps or Jewelers forceps . <S> Pointed-tip for soldering iron sold separately. <S> A pointed tip, matching with the iron, could be bought. <S> Soldering and desoldering really needs fine manual-skill , calmness and concentration. <S> Lot of practice on scrap boards required.
| The main problem you'll have is maintaining electrical connectivity with all the pads, which can easily be messed up by bad placement or even the slightest bump to you connecting wires/clips. I would say pogo pins attached to a small peg that can "bite" the pcb, similar to the following but using smaller pegs with one pin in the tip of each one. If heat is a concern, use a low wattage soldering iron.
|
How to program Arduino Nano / Pro-Mini / Pro-Micro clone that has no usb port? I was looking for a cheapest possible option to get arduino and wireless comms for a dimmable light and come across this ebay item when searching for Arduino Nano clone. It has no usb port so how can it be programmed? Edit: I have discovered that there is a new device called "Arduino Pro Micro" which is similar to Pro Mini and Nano but have usb port in-built. The best thing is you can buy Pro Micro for under 4 euros! Excellent for a dimmable LED light... <Q> It's similar to an arduino but with the USB to UART converter chip removed to be cheaper. <S> In order to program it you have to use an external converter and connect it to the Rx/Tx pins. <S> Please note that these boards don't use a crystal as a clock source but a 16MHz resonator which has higher tolerance (0.5%) <S> You'll need to get an external USB to serial board (or cable), like Note that there are two "versions" of USB to serial boards. <S> One version outputs Tx pin to Tx header and Rx <S> pin to Rx header and the other version outputs Tx pin to Rx header and <S> Rx pin to Tx header. <S> If your board outputs Tx pin to Rx header and Rx pin to Tx header (the signals are already crossed) then you should connect Rx of the USB board to Rx of Arduino, and Tx of the USB board to Tx of Arduino (like shown below) <S> If your board outputs Tx pin to Tx header and Rx <S> pin to <S> Rx header <S> then you should connect Rx of the USB board to Tx of Arduino, and Tx of the USB board to Tx of Arduino (cross connect like shown below) <A> Nano vs Pro-Mini <S> What you have looks more like a Pro-mini than a Nano Note the MOSI, MISO and SCK annotations in pale blue on pins 11,12,13. <S> ICSP. <S> /ATmega328 using ICSP. <S> You need a programmer but you can use another Arduino for this (using the Arduino as ISP sketch), a bus-pirate or other devices. <S> Arduino pins 11,12 & 13 are MOSI, MISO and SCK. <S> You also connect reset ("RST"), VCC and GND. <S> Typical AVR ICSP connector <S> The Arduino IDE can be, relatively easily, made to recognise "Arduino as ISP" and "buspirate" as options for the "programmer" menu. <S> The IDE uses avrdude to upload sketches, current versions of avrdude (as included in the current IDE) <S> know all about the bus-pirate and several other devices that can be used as programmers. <A> The Pro Mini comes in two flavors: 3.3V (running at 8MHz) and 5V (running at 16MHz)As far as I know there are no obvious markings to distinguish the two. <S> alexan_e 's answer above works for the 5V model. <S> If you buy the 3.3V model (which is nice for interfacing other low voltage chips) then the wiring needs some adjustments. <S> The USB interface boards provide a 5V out pin, and the Pro Mini has a RAW input pin. <S> Those two need to be connected and you then get regulated 3.3V out on the Pro Mini's VCC pin.
| As well as using the serial-port (via an off-board USB to serial adapter) to program the Arduino-Nano, you can also program the on-board Atmega168
|
Is voltage divider output affected by load resistance? Very basic question. Assume a voltage divider where both divider resistors are equal value, i.e. 100K. If 48v is the applied voltage, it's easy to see that we'll measure 24v across the "load resistor". However, when we add a load in parallel with the load resistor, doesn't this parallel circuit reduce the total resistance across the load resistor causing the output voltage to be less than the desired 24v? Thanks for enlightening a non-engineer! <Q> Did anything lead you to believe it would be otherwise? <S> Let's say your load resistor is 100K too. <S> It is in parallel with the 100K resistor of the divider, so together they are effectively a 50K resistor. <S> The total circuit now consist of a 100K resistor and a 50K resistor, so the output voltage will be 1/3 of the input. <A> doesn't this parallel circuit reduce the total resistance across the load resistor causing the output voltage to be less than the desired 24v? <S> Indeed it does. <S> Perhaps the most illuminating way to see this is to form the Thevenin equivalent of the voltage divider (without the added parallel load). <S> The actual circuit: simulate this circuit – Schematic created using CircuitLab <S> The Thevenin equivalent circuit is simulate this circuit By Thevenin's Theorem, the voltage across an added load resistor will be identical for both circuits. <S> It's easy to see in the equivalent circuit that an added load \$R_L\$ forms a voltage divider with the equivalent resistance <S> and so, the voltage across \$R_L\$ must be less than 24V : $$V_L = <S> 24V \frac{R_L}{50k\Omega + <S> R_L} \lt 24V $$ <A> Yes, loading the output of a voltage divider will lower the output voltage. <S> One way to look at this is to characterize the voltage source produced by the voltage divider. <S> It so happens that any ideal voltage source with some resistive network after it can be modeled as a single voltage source with a single resistor in series. <S> This is called the Thevenin equivalent . <S> It is often useful to simplify more complicated voltage sources into their Thevenin equivalent. <S> In your case, you have: Which as you say will produce 24 V when left open. <S> The Thevenin equivalent of what you have is: <S> Note that from the point of view of any circuit connected to Vout, these two sources can't be distinguised. <S> That's what Thevenin equivalence is all about. <S> Now it should be obvious what happens as the source is loaded. <S> It will be 24 V with 0 current. <S> Any current drawn will also flow thru R1, which causes a voltage drop accross R1, which subtracts from the 24 V source voltage as seen by the output. <S> This relationship is linear. <S> We already have the point with 0 current. <S> Another point that gives us some intuition is the 0 voltage case. <S> If you short Vout, all the voltage will be accross R1. <S> By Ohms law, the current thru R1 is 24 V / 50 <S> kΩ = <S> 480 <S> µA. <S> Therefore as the current drawn from Vout varies from 0 to 480 µA, the Vout voltage vary linearly from 24 V to 0. <S> As one more example, if you draw 100 µA from Vout, then R1 will drop 50 kΩ x 100 µA = 5 V, so Vout will be 24 V - 5 V = 19 V in that case.
| If you put a load (= a resistor) in parallel with the 'lower' resistor of your voltage divider the output voltage will indeed be lower.
|
Why need the capacitors be as close as possible to the device? Just a simple question: what exactly stands behind the need for placing the capacitors as close as possible to the current consuming device's pins? Is that the inductance, resistance or maybe impedance of the PCB track or wire that affects the electric charge? <Q> Is that the inductance, Yes resistance <S> Yes or maybe impedance of the PCB track <S> Yes or wire <S> Yes that affects the electric charge? <S> hmm .. it affects the electric current, not so much the charge. <S> The current from capacitor to decoupled device must meet as little "obstruction" as possible. <S> The decoupling cap is there to prevent this situation. <S> By keeping the loop small, low inductance, low resistance, the capacitor can isolate the inrush current from the actual power supply which has much longer traces/leads and with that higher impedance. <A> This is a BS specification (assuming you are talking about bypass caps for a modern digital IC). <S> "As close as possible" is simply nonsense. <S> Who defines "possible"? <S> We should all protest when we see stuff like that in a datasheet. <S> What we need to see is actual requirements. <S> Like max impedance from DC to a max frequency - or something like that <S> (I wrote about that here ). <S> Assuming you are using two closely coupled solid power planes (which by far is the easiest way to do decent power distribution on a PCB for modern digital parts), the distance does not really matter in the typical case. <S> Surprised? <S> This is actually old news. <S> Well documented 20 years ago or so. <S> Look at the closely coupled power plane pair as a very wide transmission line (very low impedance). <S> Remember a discrete capacitor has a resonance frequency around 100MHz or less. <S> If you recall the formula for going from bandwidth to rise-time: BW = 0.35/t_r <S> it is obvious that a discrete capacitor will have a "rise-time" in the order of 3.5ns or more. <S> That corresponds to more than 50cm on a board. <S> Most boards are about that size or smaller, so pretty much anywhere on the board will be okay. <S> Inductance of the planes are virtually zero compared to the inductance of the capacitor and its mounting. <S> Resistance of a solid Cu plane is also very low, but something you have to consider not only for bypass, but at DC as well if you use very low voltage parts (1.2V as an example) with very high power consumption (10A as an example). <S> Feel free to detail your question, if you don't feel I covered the answer you were looking for? <S> I can talk about this for hours. <A> It's worth mentioning that on some occasions, the current taken down a relatively long PCB track can cause "other" chips to receive interference i.e. the main chip that takes the big surges might still be OK with a cap at some distance <S> but, other (possibly more sensitive) circuitry on the same power lines may not be. <S> Radiated and conducted emissions can also be a problem when a capacitor is not placed as close as possible to the device that is taking the current surges. <S> There is also a small/rarer down-side and that occurs (as an example), on voltage regulators when "copper" feeding the chip has quite significant inductance. <S> On power-up situations, the line inductance and very-local capacitor can formed a resonant tuned circuit and, the voltage across the capacitor may, for a short instant in time, rise well-above the maximum voltage rating of the device (despite the normal feeding voltage levels being perfectly acceptable). <S> This can somewhat be alleviated by not having the capacitor so close or having a distributed capacitance that is able to befuddle the main peak of resonance. <S> It's rare like I said.
| Devices can have huge inrush currents when switching and without decoupling this inrush current, together with resistance/inductance of the wiring can cause the power supply voltage to drop below the minimum operational power supply voltage. But the bottom line is: Distance does NOT matter in the typical case.
|
Using Lithium-ion batteries in series I am trying to build a robot with the minimal components and an Arduino UNO. It needs 7V to 12V input or 5V. So I thought as a replacement of using 6AA, I'd use 2 li-ion of 3.7V in series. My question is, is it safe to place them in series and use them without any other components controlling it? <Q> If you put two unprotected cells together by yourself, be sure to balance them first. <S> So you don't risk overdischarging or overcharging one of the cells. <S> Don't know about DS cells <S> but they don't seem to have protection circuits <S> :Check this out, he added a protection circuit: http://www.instructables.com/id/Solar-DS-quotLightquot-Redone-and-Greatly-Impr/ Regarding cell phone batteries, I know that at least one large manufacturer used to have most of their battery protection circuits in the phone, not the battery. <S> So be careful. <S> Basically you need to protect your cells from: over voltage, under voltage, over current and very high temperatures (and maybe charging during very low temp). <A> Yes. <S> Fast-charging them may need a special charger, but you can get ~7.5V packs of 2 cells in series (example) <A> I did a project involving a robot that was a mini segway <S> http://www.youtube.com/watch?v=zOFlJJj8pPA <S> (demonstrations start at 5:12 ) <S> And we tried the same thing. <S> It worked fine, HOWEVER: <S> The batteries we bought had built-in current limiting circuits. <S> Because it was 3 cells in series to get ~11.1V <S> nominal, the current output through them during peak loads of our rather large motors was too much - especially with a PID controller with high P gain to overcome the unstable system. <S> In hindsight, what I learned from that project was better battery selection in the future, and try to get a larger 3-cell pack without current limit protection (we had a really good charger unit that could handle any kind of Li-Po setup, so charging was not an issue for us). <S> It was disheartening to see our robot be ALMOST perfect, standing up straight when going backwards, but as it goes forwards it slowly falls over because if I made the gain too high it would over-draw one of the 3-cell series setup and thus cut the entire power system off. <S> I hope you can learn from this story lol. <S> edit:I will add that if the batteries were placed in parallel, maybe with a 2-series-2-parallel style set up, the current draw would be shared between them better and I most likely would not have experienced these issues. <S> This would have better matched my voltage needs, and provided better current ouput without tripping the protection circuits.
| Charging a fully depleted Lithium cell can get you in trouble...
|
Parallel LCD screen to serial? (1 dedicated microcontroller?) I'm a newb with electronics and was wondering if there's an IC or PCB that could convert a parallel LCD connection to Serial so I can use 2 wires to communicate with the screen using an arduino and still have open pins on the arduino to use for something else. If this isn't the case, then do people usually have a dedicated microcontroller for the LCD screens or do they handle this a different way entirely? EDIT: For example, this LCD screen requires approximately 11 pins which is a lot to use on an arduino. <Q> Well, here's the pin out: - <S> And, the pins that need control are DB0 to DB7, RS, R/W and E. <S> You can use a serial in parallel out shift register (such as 74xx595 ) <S> - this means you load the data word (DB0-7) using one pin for data and another pin acting as a clock for the serial register. <S> The other three pins are probably best left as dedicated IO pins so, in total you can get away with 5. <S> That's a lot better than 11. <A> Yes, there are a number of serial-to-LCD solutions for character LCDs. <S> Adafruit sells one based on a Microchip I/O expander rather than a microcontroller to talk in two-wire I2C. <S> You can also purchase serial-input displays from, for example, Newhaven (available through distributors), which have additional features such as serially adjustable backlight brightness and display contrast. <A> For example, this LCD screen requires approximately 11 pins which is a lot to use on an arduino. <S> Actually there are two modes you can use to drive an LCD, the 8bit mode that uses 11 lines and the 4bit mode that used 7 lines (or six if you use write only mode) <S> If seven lines is still too much then you can use just three pins with a serial shift register that receives the data serially and outputs them in the parallel outputs. <S> And if you want even lower then you can use just a single pin , but in this case the code will be more complicated due to the strict timing that has to be followed
| There are add-on boards using a processor, which can communicate in asynchronous serial at commonly used baud rates.
|
What are the consequences of oversizing resistors? When building a circuit to power an LED, we use Ohms law to calculate the required resistance, then to calculate the required wattage of the resistor. Suppose this formula dictates a 1/8 W resistor, and I instead use a 1W or a 100W resistor of the correct resistance. What will happen? <Q> In your example, you've paid too much money and the part is huge (especially the 100W part). <S> If the LED current is an AC signal (PWM or whatever) <S> the 100W resistor may have a lot of inductance, which will change the way the circuit behaves. <S> On the other hand, the ratings of resistors are conditional on a bunch of things, such as mounting, surrounding PCB patterns (especially SMT resistors) and, of course, ambient temperature. <S> The number in the part description is just sort of a rough guide, you really have to drill down using datasheets and part series manuals and other manufacturer's data to get the details. <S> You should also consider odd conditions such as extremes of input voltage, what happens if an LED shorts out, and so on. <S> It is also not a good idea to get too close to the maximum ratings if you want long life. <S> Using a 1/4W part for 1/8W actual dissipation is not a bad idea. <S> Using a 1W part might make sense if it's a high-reliability design or you have a bunch of them on hand. <S> Using a 100W part is silly. <A> This often means they also function very effectively as power inductors. <S> Internally, many power resistors are resistance wire wound around a ceramic form, which means they're basically an air-core inductor. <S> If you are using such a resistor in a current-sensing application in a switch-mode circuit, you will get spurious readings or inaccurate behaviour. <S> While not all power resistors, or even all ceramic power resistors are highly inductive (see Ayrton-Perry windings ), some are very inductive, and it's something you need to be careful of. <A> For a simple LED circuit there are no bad consequences of using a resistor of higher power. <S> On the other hand, some type of high speed communication system may not like the increased capacitance to ground of a large resistor or, the increased series inductance. <A> Using higher power resistors than necessary is not a problem, other than the additional size and expense. <S> I see you are considering getting a selection of 1 watt resistors to have on hand. <S> May I suggest 1/4 watt instead? <S> 1 watt resistors have heavy leads that won't fit in the popular plastic breadboards, while 1/4 watt leads will fit easily. <S> In my experience, 1/4 watt resistors are fine for 99% of applications, and can be connected in series and/or parallel if somewhat higher power is needed.
| One major issue, aside from the minor increase in capacitance concomitant with the larger size is that many large power resistors are wire wound .
|
When do we use all pins in RS-232 cable? I think the minimum for simplex communication are TX so we can transmit and the power supply pins +Vcc and GND. That is all we need. When do we need to use all 9 pins of RS-232? I think that the reciever can decipher when data has started coming in and if it knows the baud rate already, it also knows when the latch the incoming bits. Therefore, I don't see the purpose of all the remaining pins on the RS-232 cable besides TX, RX, +Vcc and GND. Do we still need them? The problem is that I wish to connect a PC to a waveform generator through RS-232 cable. I have the software for this installed on the PC but no RS-232 cable. If I do make my own using RS-232 connectors (which is what I intend) with my own wires soldered to it, how do I know if I just need TX, RX, +Vcc and GND or if I need all the other pins as well? Soldering all the pins is not such a hard thing to do anyway, but I am just curious. <Q> The RS-232 standard was originally specified to support connections between Data Terminal Equipment (DTE) such as computers, teletypes and video display terminals and Data Communications Equipment (DCE) such as modems and Automatic Calling Units (ACUs). <S> At the time, DCE did not have any internal intelligence, so dedicated signals were designed into the RS-232 specification to manage specific features that were common to such equipment, such as flow control, on-hook/off-hook status and call progress. <S> Nowadays, modems have their own microprocessors, so it's actually easier (and cheaper) to ignore the dedicated signals in the RS-232 connector and do everything over the serial data lines, using the ubiquitous "AT" protocol. <A> The RS-232 (DB9) pinout specifies only the TX and RX pins necessary for communication. <S> In no particular order these are RTS (Request to Send), CTS (Clear to Send), DTR (Data Terminal Ready) and couple others. <S> You can get the details here . <S> If your intended hardware doesn't use any form of hardware handshaking (most trivial applications don't; you'd need to check yours, however) you can get away with using the two data pins along with GND. <S> HTH. <A> The answer to your question is in the spec for the waveform generator: what does it say about the protocol or flow control that it requires? <S> The other approach to this is to just wire tx, rx and ground and see if it works, if not then figure out what else. <S> Takes about as much time to research, google, asks questions on stackexchange, and wait for answers as it would to just build a full cable.
| The rest of the pins are necessary only if you implement some form of hardware flow control.
|
I need a reasonability check for the safety of a home-hacked power supply I am in the process of building myself a fancy schmancy Raspberry Pi "laptop", and am trying to power it with a single cord/power supply. My strategy is to put together a small project box with 120VAC inputs, and the innards from a couple wall warts to provide 5VDC and 12VDC power. Before I start wiring crap together, I wanted to run my idea past some more experienced electri-gurus to make sure I'm not missing anything safety-wise. It seems like its the perfect solution in my mind, but want to make sure I'm not missing anything that I'd be expected to know if I wasn't self-taught. My parts: I have an old laptop power supply that I've gutted. It's basically the cord and an empty plastic shell (2" x 3" x 5"-ish) with the male end for the plug, and the wires that were clipped from the PCB from the male cord receptacle. I've gutted 12VDC/2A and 5VDC/10A wall warts; I'm left with PCBs that have wires leading to the board, and barrel connectors coming off the board. If I connect the three hots, the three neutrals and the three grounds from the PCB and power supply inputs, this will leave me with 120VAC feeding the box and getting shared by 2 PCBs that, upon testing SHOULD be putting out 12VDC, 2A and 5VDC, 10A. Am I thinking about that right? In my mind, it's like I've got two wall warts in a power strip, minus the power strip. Here's my power needs: The Raspberry Pi: 5V, 700-1000mA A powered USB hub: 5V, 1A (based on the 5V, 1000mA PS that came with it) A powered USB WiFi interface: 5V, .5A ('cause it's USB...amperage is a TOTAL guess based on no information whatsoever). A portable USB keyboard: 5V, .5A ('cause it's USB...amperage is a TOTAL guess based on no information whatsoever). A 4" LCD monitor, 12V, 0.53W (which, by my math is way under 2A). The 12VDC barrel fits the 12V monitor, so that's set. The 5VDC output needs to have the barrel connector replaced, and as long as I'n stripping wires, I'll be adding 3 USB ports to the power supply for device charging, and plan to split the 5VDC output between the individual USBs and the cable that will supply power to the hub--the hub will supply power to all the Raspberry Pi devices, 3A. With 10A supplied, those 3 extra charging ports won't be an issue unless my phone decides to draw 7A+ for charging. Am I good with that concept as well? Please let me know if I'm missing any fundamental safety concepts for putting this thing together, and if appropriate, an appropriate link for where I can research & read about these concepts. <Q> I think this is not a good idea. <S> , in turn connected to the right 5V/12V AC to DC converter rated for the currents you're interested in. <S> Alternatively, just use a 12V wall wart with a high enough current rating and appropriate DC to DC converters or voltage regulators (linear or switching), with the whole deal fused. <A> Areas of concern: <S> The mains connections between the wall-wart PCBs and the mains wires going to the cord. <S> Ideally these need to be tied together in a mechanically secure manner - soldered and taped would be fine, as would bringing them to a terminal block with ring terminals. <S> The mechanical security of the wall-wart PCBs. <S> They cannot flop around inside the case - there must be minimum creepage and clearance between primary and secondary which cannot be guaranteed if they can bounce about freely inside the box. <S> Any secondary circuit is not allow to approach any primary circuit else there's a shock hazard. <S> The environmental security of the new case. <S> Wall-warts are fairly impenetrable. <S> By cracking them open and stuffing them into another shell that was well-sealed, they're not so impenetrable now. <S> What happens if you inadvertently spill water on the case? <S> Lack of safety approval. <S> Should the unlikely happen and your improvised brick goes up in flames, good luck collecting any insurance money. <A> Using hacked together power supplies can be dangerous if you aren't sure what you are doing. <S> Luckily there are tons of off the shelf power supplies thay already do exactly what you want - 5v and 12v in one supply. <S> You will find them for many external hard drives with a 3 (5v, 12v and gnd) or sometimes 4 pin (seperate grounds) cable. <S> I would simply take the connector off an old external hard drive enclosure and use its power adapter <S> as is - its already been tested by the appropriate regulatoey agencies to not be likely to burn your house down.
| You should use a 120V power cord attached to a fused power entry module http://www.digikey.com/product-search/en/connectors-interconnects/power-entry-connectors-inlets-outlets-modules/1442743 Any safety approvals on those little wall-warts are null and void as soon as you crack them open and start attaching wires to them.
|
Finalize project: How to go from breadboard to a semi-permanent circuit I'm tinkering with Raspberry Pi, and envision a few small applications that will require external circuits. I find the breadboard setup to be a bit too fragile for long-term use, but I'm not sure how to make it more permanent without making a custom PCB, which seems like overkill. Here's a crude breadboard to connect an I2C temperature sensor -- which can be redone as a cable and some heat-shrink tubing, but my next project will have a few more components. One option seems like a few drops of glue in strategic places on the breadboard, but this seems a bit clunky. Is there an option between breadboard and PCB? <Q> Yes, in fact there are some viable prototyping methods between breadboard and custom PCB. <S> I think you're looking for a STRIPBOARD , which is a board with holes every 0.1", and copper patterns that tie some of the holes together in patterns that accommodate solder connections while allowing DIP chips to be placed without shorting. <S> From the wikipedia entry on stripboards: This shows the back side of a stripboard, where all the soldering is going on. <S> Many people advise to skip the breadboard stage and move right to these methods, as they're more reliable. <S> Lastly, don't rule out PCB's -- they can be done at about $5 per square inch in prototyping quantities if you have two or three weeks. <A> Veroboard is always an option. <S> It's got strips of copper, plenty of holes and the copper strips are easy to cut and solder. <S> It's all on 0.1" spacing so connectors are easy to fit if in inches and tenths. <A> Turn ICs over and solder wire directly to the pins. <S> It is faster than waiting for prototypes, and epoxy can often be applied to increase the rigidity of the circuit. <A> You can find breadboards with pinouts like breadboards: one example . <S> Also, Scott Seidman pointed out that it's relatively cheap to get real pcb's made. <S> Some resources for custom-made PCB's in low quantities: <S> OSH Park iMall <S> PCB <S> Prototyping <S> The benefit of getting custom PCB's made is that you can easily incorporate surface mount components into your design, opening up what parts are available for your prototyping purposes (larger surface mount resistors/capacitors, TQFP packages are relatively easy to solder with a standard soldering iron). <S> This also frees up the layout of components to fit was works best instead of where you can find a pin. <S> On the downside, it's more difficult to fix even simple mistakes you make in the design, and you do have to design a PCB (a bit of a learning curve).
| Point-to-point construction can have its place, especially for components with a small number of connections.
|
Why must flash memory be written/erased in pages/blocks? Title says it all. I'm trying to understand the workings of flash memory technologies, at the transistor level. After quite some research, I got good intuitions about floating-gate transistors, and how one injects electrons or remove them from the cell. I'm from a CS background, so my understanding of physical phenomena like tunneling or hot electron injection are probably quite shaky, but still I'm comfortable with it. I also got myself an idea about how one reads from either NOR or NAND memory layouts. But I read everywhere that flash memory can only be erased in blocks units, and can only be written to in page units. However, I found no justification for this limitation, and I'm trying to get an intuition about why it is so. <Q> It's by definition. <S> A flash memory that allows writing individual bits is called EEPROM . <S> Flash differs from EEPROM in that erasures are done in blocks, rather than individual bits. <S> Erasing in blocks also allows simplifications to the IC, reducing cost. <S> Economies of scale further reduce cost of flash over EEPROM, as flash is used in great quantities these days for solid state disk drives, while EEPROM is used in much smaller quantities. <A> You are right in the fact that there's no physical justification for having to erase in block units. <S> Programming a cell is done by creating an electric field between the bulk and the control gate like shown in fig1, and the same idea is valid for erasing the cell, an electric field in the opposite direction would do the job as shown in fig2. <S> However, for constructive reasons, it's relatively complex to generate and use the negative voltage, so the strategy used is the one shown in fig3, by setting a high voltage at the bulk (which is the logic ground reference in the sector). <S> Selection transistors can't be used anymore, only the control gates can be driven low, and this forces a full sector erase. <A> The best answer I've found to your question is covered at <S> How Flash Memory Works where it says: The electrons in the cells of a flash-memory chip can be returned to normal ("1") by the application of an electric field, a higher-voltage charge. <S> Flash memory uses in-circuit wiring to apply the electric field either to the entire chip or to predetermined sections known as blocks. <S> This erases the targeted area of the chip, which can then be rewritten. <S> Flash memory works much faster than traditional EEPROMs because instead of erasing one byte at a time, it erases a block or the entire chip, and then rewrites it. <S> I don't understand why the "in-circuit wiring" allow for bit level programming (switching from 1 to 0) <S> but it might be related to the different way the transitions 1 to 0 is performed (programming via hot injection) compared to 0 to 1 transition (erasing via Fowler-Nordheim tunnelling).
| Because erasing is a relatively slow operation, and must be done before writing, performing the erase in a large block makes large write operations faster, by virtue of erasing a large number of bits in parallel.
|
NMOS FET with a negative drain I'm trying to create a switch between a -15V and +15V supply using a gate signal of 0V to +3V. With the positive-going Gate voltage, I tried an NMOS FET. This works as expected with a drain of +10V but with a drain of -10V the FET just acts like a diode, dropping only 0.6V across itself or nothing. Is there any transistor suitable for this application or must Vg always lie between Vd and Vs? Also, I'm also trying to keep the circuitry as minimal as possible. Edit: To further explain my problem: I need to discharge a capacitor at a specific time (when an IC turns off) clamping it to ground, otherwise other voltage lines held up by capacitors begin to leak into it causing havoc (specifically the negative voltage line). Obviously this shouldn't be allowed to happen however the leakage problem is currently out of my control hence why I'm trying to come up with a fix just in case I'm stuck with it. Also, the level of the GPIO control signal can be active-high or active-low. I've had some joy by using a single JFET but it's not as good as a MOSFET as the JFET conducts more than a MOSFET when it's "off". I'll take a look at level-shifting. simulate this circuit – Schematic created using CircuitLab The line I'm trying to deal with "VCOM" actually travels between -15V and +15V during it's normal operation and ends at 0V. However, as I explained above, it won't stay at 0V after it's operation which is why I'm trying to crowbar it to ground on demand. <Q> All MOSFETs inherently have a body diode between source and drain. <S> This diode is reversed biased under normal usage, but if you put the drain at a lower potential than the source on an N-channel FET, you will, as you have discovered, forward-bias this diode. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> More on the body diode: <S> MOSFET: <S> Why the drain and source are different? <S> Or, you can use a P-channel MOSFET, where the drain must be at a lower potential than the source. <S> Either way, you will likely need some sort of level-shifting circuit to translate your 0V-3V logic input to whatever levels are required by the MOSFET arrangement you select. <S> This can be as simple as another transistor (usually a cheap BJT) and a resistor, or a complicated arrangement designed to switch the MOSFET at very high speeds which might include dozens of components and maybe even additional voltage supplies. <S> It all depends on your application. <A> A level translator between the N-mosfet and the control voltage would help Another option is a similar design as the above but with an optocoupler pulling the gate up (to the ground) <A> In theory you could do what you are asking with a depletion-mode p-channel MOSFET, but they are not very common at all. <S> It's easy to do this with two P-channel enhancement mode MOSFETs and a resistor if your switching speed requirement is not high. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> To use this simple circuit, <S> the power MOSFET Q2 <S> must have a gate rated to be reliable with 10V drive. <S> The small signal level shifting MOSFET Q1 must be a type that will be sufficiently turned on with -3V \$V_{gs}\$ <S> It will switch "on" in a fairly sluggish manner if it's a big MOSFET, but that could be solved easily with additional drive circuitry (as can the \$V_{gs(max)}\$ > |+/- 10V| requirement). <S> One attractive idea (if it fits your load requirements) might be to use a dual p-channel MOSFET , so you only require a resistor or two (one in series with the input might be advisable, depending on what is driving it) and a single ~2mm square package.
| You will have to find a way to place the MOSFET in your circuit such that the drain is at a higher potential than the source.
|
What is meant by logic high or low In a circuit involving integrated circuits, the documentation for the ic often states that if a pin is in logic 1 or high the circuit will behave in one way, and if the circuit is in logic 0 or low the circuit will behave in another way. One example i found was experimenting with the 4029 CMOS Counter ic http://www.intersil.com/content/dam/Intersil/documents/fn33/fn3304.pdf on the up/down and dec/bin pins. What i don't understand, is what the pin that is set either high or low should be connected to i would assume it would be the positive supply voltage, the negative supply voltage, or neither, but i can't seem to figure out which one. <Q> Depending on the logic family you use there are different thresholds for high/low states <S> Here is a table that shows these different levels ( image source ) <S> You should check the threshold levels in the datasheet of your device for the intended power supply level. <S> In any family, connecting an input pin to ground will definitely set it to LOW and connecting an input pin to Vcc will definitely set it to HIGH. <A> The bottom of page 7-799 of the linked datasheet gives the thresholds for low and high input voltages given a couple of different supply voltages. <A> If an input pin should be high (1) for the chip to do what you want, connect the pin to +5V (or whatever your positive supply is). <S> If the pin should be low (0), connect it to ground. <S> CMOS input pins should never be left unconnected.
| As long as the voltage on the input is at most/least that value when referenced to ground the input is considered low/high regardless of what you tie it to.
|
Retrieving RSSI value from XBee How do you make XBee send its RSSI value to another XBee?I am working on a project which involves sending the RSSI value of one XBee to another XBee which sends that data to an Arduino. The Arduino processes the RSSI values received from three XBee modules to track its position. I don't know how to make the XBee send the RSSI value to another XBee. Also, is there a way to send data from XBee without using Arduino or other low cost microcontrollers? Thank you. <Q> You will need a micro controller of some sort to accomplish this task. <S> (My favorite microcontroller when interfacing Arduino with XBee is the Arduino FIO or OSEPP Fio ) <S> You can accomplish this task one of two ways: Method 1, <S> Read the XBee <S> RSSI pin using Arduino pulseIn <S> () <S> On XBee and XBee-PRO modules, pin 6 is <S> PWM0 / RSSI Output PWM Output 0 / RX Signal Strength Indicator . <S> When AT Command, P0 on the XBee module is set to 1 (default), pin 6 outputs the RSSI value as timed electrical pulses (PWM, pulse width modulation.) <S> You can read those pulses using an Arduino's pulseIn function . <S> Those pulses will equate to a number in hex. <S> That hex number can then be translated to decibels (dB) which is the unit of measure for our RSSI value. <S> Method 2, Read the RSSI value in XBee API mode <S> XBee can be put into API mode, that is Application Programming Interface mode. <S> In this mode, the Arduino can access to a wider range of XBee data than in AT mode. <S> (There is an Arduino library available to assist with API mode.) <S> The Arduino would send an api packet to the XBee requesting that packet type, and the XBee would gather the data and respond to the Arduino with the data packet. <S> The Arduino would then parse the packet, and give you the frame ID containing the RSSI value. <S> You could then do whatever processing you want to do with the RSSI value. <S> You can learn more about using the API mode in the XBee manual , and more about the specific API frames using Digi's api frame utility . <A> Send the XBee of interest a DB command using the remote-command API function. <S> Doing so will likely cause it to return the RSSI value of the packet which contained the command. <S> Such an approach may not be 100% reliable, but is probably better than anything else. <S> Since the reported RSSI value will get updated every time the module hears a packet from anyone, the only way to know what the RSSI value was for a particular packet is to query the value between the receipt of the packet in question and the receipt of the next one (from any source). <A> The RSSI pin is designed in a wired way. <S> Per xbee manual, it is the number of waves RSSI pin output in 200 micro seconds that is proportional to the signal strength. <S> The carrier frequency is 12MHz. <S> So solution is to feed RSSI pin as clock input for timer 1, then use timer 2 to setup a gating period like 200microseconds, then read the counts of timer 1. <S> @Grimtech : Could you explain your function a little bit? <S> I was searching for a way of reading RSSI the other day, your function came out on the top of the list. <S> But I had a hard time to understand how it works. <S> Thanks.
| In API mode, there is a specific packet type that the XBee can send to the Arduino which contains the RSSI value.
|
What kind of motor would I need to turn this central heating valve? I often forget to turn my central heating down when I leave the house, so I thought it would be cool to make a device that could do it for me and to have a website where I can check and change the heating. I was thinking about using the Arduino with an Ethernet shield for this. Programming won't really be a problem. I am however totally new to motors, and I have no clue as to which kind of motor would be suitable for this. This is the knob: The idea is to have a motor sit next to it and attach four arms to it that fit in the corners of the knob. I'll also add a potentiometer to be able to control it when I'm home. So, is this possible? Thanks! Edit: So I understand this is not the best solution and that it would be better to hack a thermostat or use an electric valve, but unfortunately both of those things are not an option for me. I have just one radiator (this one) and that's it. So I'd still like to know what kind of motor would be suitable for this. I was thinking a servo would be good but that limits me to 180 degrees of rotation, and I need a little bit less than 360. There are ways to get more than 180 degrees, but that would remove the position feedback thingy. Do I even need that? <Q> I once visited a hackerspace that was trying to make a light bulb throb between bright and dim for a replica TARDIS . <S> Their solution was to get an ordinary dimmer, such as you'd mount in your wall, then mechanically link this to an RC hobby servo controlled by an Arduino. <S> It worked, for a few hours. <S> Then something would break, every time. <S> Then, I showed them how to put a triac on an ATtiny. <S> Not only was this solution about three orders of magnitude cheaper, it never broke. <S> Here's the lesson: <S> just because you do something with your hands doesn't mean a machine should. <S> This is why industrial automation robots look like this: and not like this: <S> There are machines designed to control the flow of heated water to your radiator, and they don't look like hands to grab the knob that's already there. <S> By searching for "electric radiator valve", I found this, available from decorisland.com : <S> It looks like the interface is two wires, and you apply a voltage to open the valve. <S> This should be pretty easy to interface with an Arduino. <S> But, it's also probably compatible with a standard wall-mount thermostat. <A> While it may seem unlikely that your landlord will care much, most are at least somewhat approachable. <S> If you offer to pay the building superintendent fit a wireless smart digital thermostat and are prepared to leave it in place or remove it again at your cost when you leave there should be relatively little resistance. <S> This picture search should give you ideas. <S> PS. <S> trying to roll your own for a one off will be educational but will not likely save you any time or money. <S> EDIT: <S> The building may already have some in use and can recommend a compatible type. <S> The new digital smart units can usually be programmed to do time slots even when in standalone operation. <A> The device in your photo is a thermostatic radiator valve (TRV). <S> Usually the standard screw valve is replaced with a push-valve which is shut off by pushing a pin. <S> An actuator head is screwed onto the valve to drive the pin. <S> Figure 1. <S> A mechanical TRV. <S> A thermal element (often a plug of wax-like material) expands with temperature and pushes the pin and valve disk down to shut off the water. <S> Setpoint is adjusted by rotating the knob and moving the actuator closer or further from the pin. <S> A wide range of programmable heads are available to easily replace the actuator provided the push-valve is already there. <S> Figure 2. <S> Electronic TRVs are available in standalone and networked versions. <S> The heads can be retro-fitted onto existing TRVs. <S> Further reading: http://openhab.org . http://opentrv.org .
| You could even get one of the many internet enabled thermostats on the market (such as by Honeywell or Nest ) and skip the Arduino, avoiding this problem:
|
What are the effective power limitations of the flyback converter topology, and why? Looking at several different isolated converter topologies, flyback looks like it's the simplest at first glance. There's only one switch, so there's only one driver, which (all other things being equal) should reduce the cost. However, at high power levels (5kW+) flyback seems to generally not be considered practical. I asked why early in my career, and the answers I got were vague. I met one person who was commonly winding his own flyback transformers; he said he got 500W out of one once, but just barely, and with lots of rewinding to optimize the transformer. The commercial manufacturers I talked to went silent, or asked what insane thing I was doing to want a flyback transformer that big. An old book I came across said that flyback transformers need to be operated at high frequencies, and the available switches couldn't survive the stresses of a flyback converter at those power levels. However, it wasn't clear on why those stresses were worse than other single-switch topologies, like boost converters. Nor was it clear on why the frequencies needed to be so high. I suspect it's because exceptionally tight coupling is needed across the transformer/coupled inductor, which limits the choice of core materials and sizes, dictating frequency choice, further dictating switch selection. But that's just a guess. So what's the real deal? What's the effective power limit of the flyback topology, and why? <Q> There is no hard limit to the output power from a flyback topology. <S> It's a matter of which is best for a given situation. <S> This is a business where they have blood-on-the-carpet meetings over 3-cent diodes and recognize that it is cheaper to hire another full-time engineer than to put an extra few pennies of cost into their product- <S> so not picking the best topology for the requirements could foreshorten one's career. <S> The flyback converter uses the core less efficiently (means more money, size and weight for a core, which matters more as power levels go up). <S> As Russell points out, the flyback stores the transferred energy in the inductor, and releases it to the output, as opposed to most other types that transfer energy when the switch is on. <S> That means necessarily the current stress must be higher, since all the energy is being transferred by a single switch, and it can only be on a part of the time. <S> (Keep in mind that some losses are proportional to the square of the current, so 10A for 33% of the time vs. 3A for 100% of the time represent the same load power, but the resistive losses in the low duty cycle switch are 3.7 times higher. <S> The voltage stress on the switch in a flyback is far higher (double input voltage) compared to a two-switch forward converter (just the input voltage). <S> This makes the switch more expensive, especially for MOSFETs, where chip size (and therefore cost) rapidly rises with voltage rating, all other things being equal. <S> Switches that are less sensitive to voltage (in cost) tend to be rather slow (BJTs and IGBTs), so again less suitable for flyback converters because they would require a bigger core. <S> Flyback converters have a number of advantages (potential simplicity because of the single switch, no output inductors required because the leakage inductance works for you, wide input voltage range), but those advantages mostly dominate at lower power levels. <S> That's why you'll almost always see flyback converters used in AC adapters, and you'll never see it in a 250W+ PC power <S> supply-- <S> both applications where any excess cost that is safe to squeeze out has been squeezed out (sometimes more that that!). <A> Past bedtime - so short answer. <S> All are happy :-). <S> You differentiate 'flyback' and boost' - which can mean the same thing, but may not. <S> Flyback's most unique feature is that the energy to be transferred is stored entirely in the inductor when the switch is on, and transferred to the output by the collapsing magnetic field when the switch is off. <S> Some thought will reveal that in an air-gapped core (or one in which air gaps are distributed throughout the inductor) <S> the energy is in fact stored mainly in the 'air' in the gap - a statement that will attract 'robust contrary comment'. <S> Regardless of the exact storage location, energy is stored in the magnetic field, and increased power requires an increased core size. <S> Converters which transfer power during the switch's on state do not rely principally on core and field for storage of energy. <S> For a fully 'discharged' inductor: <S> \$E\$ <S> = <S> Energy stored in inductor = <S> \$\frac{1}{2}LI^2\$ Power = Energy transfer rate per second <S> = \$f\cdot\frac{1}{2}LI^2\$ <S> Where: <S> \$f\$ = cycles of discharge per second \$I\$ = <S> peak current \$L\$ = <S> inductance <S> For a given system voltage, to get more power in a given available inductor charge time you must DECREASE \$L\$, as \$I = <S> V\cdot t <S> /L\$, and \$t\$ and \$V\$ are fixed. <S> Because energy transfer = \$f\cdot\frac{1}{2}LI^2\$, doubling \$I\$ in isolation would increase energy transfer rate by a factor of 4, BUT as \$L\$ must decrease to do this, in fact \$E\$ rises approximately linearly with increasing current. <S> The only remaining "free" variable is frequency. <S> \$t_{charge}\$ needs to be \$<\$ to \$<<\$ <S> \$1/f\$, but as charge and discharge times are inversely proportional to voltage, <S> as output rises, \$t_{off}\$ falls leaving more time for \$t_{on}\$ and inductor charging. <S> Early MOSFETs were extremely limited in cutoff frequency. <S> Modern FETs are far more capable BUT for high speed high voltage switching IGBTs are often advantageous. <S> So ... you are unlikely to see flyback converters at more than a few hundred Watts, and usually less. <S> More later maybe. <A> Energy is lost in each closure of switch capacitance. <S> This makes ever increasing frequency an impracticalanswer to a flycore with greater energy storage gapat the cost of lower inductance. <S> You can have a big core with lots of turns, but thenyou are losing more in copper. <S> SIC, GAN, and Silicon Superjunction mosfets all havemuch less capacitance than the best devices a decadeago. <S> Higher power hard switching flybacks are possible. <S> The best techniques use resonance to remove some or allof the charge stored on the switch before turning it on. <A> Switch peak currents and peak voltages limit practical power outputs, BUT the Semiconductors are getting much better. <S> For example a SiC 1200 Volt 100m ohm Mosfet could turn off 30 amps peak . <S> Hence one could think about 1Kw off line . <S> Although these modern switches have low switching losses there is the energy trapped in the transformer leakage inductance that doesn't get to the load which when you use orthodox transformer technology you will find is worse than any prospective switching losses when running at normal frequencies . <S> SO active clamp or anything that addresses leakage is the passport to high power with low losses.
| To transfer more power in a flyback system you must increase the energy transferred per cycle and/or the number of cycles per second. One could create a 1kW flyback, but it would not likely be economical.
|
I need a basic primer on interpreting vacuum tube datasheets I am building a prop for a film that needs to have a bunch of glowing vacuum tubes on it. Unfortunately, beyond basic "valve theory", I'm not finding a lot of information about how to interpret the datasheets. Very simply, what I need to figure out is how to safely make a bunch of tubes glow. I don't have the tubes I've not designed the circuit because I'm mystified by the datasheets. Whether I make a circuit and fit tubes to IT, or whether I buy tubes and design a circuit around THEM is irrelevant at this time. Until I can interpret the datasheets, either option is impossible. Consider: this ECC81 tube datasheet . Heating voltage is 6.3V, current is 300mA and under the "Typical Operating Characteristics", the anode voltage is 100V at 3mA. Looking at the pin configuration and notes (on this particular datasheet at least), I can't make heads or tails of how to read it. It looks to me, for instance, like pins 4 & 5 get the heater current (f), but then what the heck is pin 9 (fc) ? Further, it looks like pin 6 is the anode input (a), but what's pin 1, designated by a'? With my limited knowledge, I'd send 6.3V to pins 4 & 5 and watch the healthy glow. MMy gut-level reaction though, is that's only half a circuit. So what's the other half? I would think I'd need to somehow draw off of the cathode and dissipate that power somehow...but when all I want is the glow, where does the back half of the circuit lead to? Am I making any sense here? Part of this is that I'm not quite sure I'm asking the right questions. Help! <Q> As Dave said, you don't have to actually run the tube in a real circuit to get the visual effect. <S> All you have to do is power up the heaters. <S> Your particular tube actually is two tubes in one package and has two heaters. <S> Each heater is 6.3 V. <S> You can put 12.6 V accross pins 4 and 5, or 6.3 V accross both pins 9-4 and 9-5. <S> In the latter case, you connect one side of the 6.3 V supply to pin 9, and both pins 4 and 5 to the other side. <S> Don't worry about the exact voltage that much. <S> These things were intended to be run directly from a 6.3 V output winding of a power transformer. <S> It will be OK with variations of this 6.3 V due to input line voltage variations. <S> You do have to make sure the transformer is rated for the total current of all the heaters together. <S> For example, if you are powering 5 heaters that all take 6.3 V at 300 mA, then the tranformer output must be rated for at least 1.5 A. <A> If all you're after is the visual effect, the only thing you need to do is apply power to the heaters. <S> Ignore everything else. <S> Get a hefty 6.3VAC transformer and wire all of the heaters in parallel, making sure the total current doesn't exceed the transformer's rating. <S> All of the other terminals of the tube don't need to be connected to anything at all. <A> Rather than using a transformer, which will be expensive and heavy, you could as easily use DC from a 12V (2 filaments in series) or 19V laptop adapter (3 filaments in series). <S> An impressive manly vacuum tube such as an 807 beam <S> tetrode will have about a 1A filament, so <S> an ordinary laptop adapter should be able to power at least 9 tubes (check the nameplate rating and the tube datasheets and add maybe 30% margin). <S> Your diminutive tube requires only 300mA, so many more could be powered. <S> Most tube datasheets have been scanned and are available on the net. <S> Only connect the filaments of tubes of the exact same type in series with this arrangement (you can have different groups in parallel, but each type in series should match its neighbor(s)). <S> If you do use something like a beam tetrode with a cap on top, please attach a fake connector with a fake wire to it, nothing blows the suspended disbelief like seeing obvious misteaks(sic). <S> American tube types usually have the filament voltage as the first digit(s) of the part number, so a 12AX7 requires 12.6V <S> (or 6.3 if you use the center tap) on the heater, whereas a 6L6G (shown below) requires 6.3V RMS.
| Get a "6.3 V" transformer intended to run from whatever power you have in your location and the tube will be fine.
|
Does an ATX PSU's PS_ON Signal Require Resistance As the title suggests; when connecting the PS_On signal directly to ground in order to switch on an ATX PSU, is there a required amount of resistance? - To try to clarify my particular problem; I have a fully modular ATX PSU (a Seasonic Platinum Series) but am not using it to connect a motherboard, so have no need of the bulky motherboard cable. I decided to order a custom-made cable compatible with the modular connectors on the PSU itself, with a wire connecting PS_On to ground (via a 2-pin header so I can connect a suitable switch or LED if I want). However, when I connect the pin directly, although the PSU switches on, it almost immediately switches off again. The PSU is not at fault, as connecting the regular motherboard cable using the paper-clip trick works just fine and the PSU starts providing power normally. The only difference I can see between the working and non-working cables is that the non-working cable uses much shorter wires and of a finer gauge (AWG22 at about 5-6cm as opposed to AWG18 at around 60cm). So I'm wondering; is my cable failing to work because of a lack of resistance? If so, I'd appreciate anyone that can also clarify how I would work out what type of resistor I would need to add to correctly complete the circuit. <Q> PS_ON# is an active-low, TTL-compatible signal that allows a motherboard to remotely control the power supply in conjunction with features such as soft on/off, Wake on LAN <S> *, or wake-on-modem. <S> When PS_ON# is pulled to TTL low, the power supply should turn on the four main DC output rails: +12VDC, +5VDC, +3.3VDC and -12VDC. <S> When <S> PS_ON# is pulled to TTL high or open-circuited, the DC output rails should not deliver current and should be held at zero potential with respect to ground. <S> PS_ON# has no effect on the +5VSB output, which is always enabled whenever the AC power is present. <S> Table <S> 14 lists PS_ON# signal characteristics. <S> The power supply shall provide an internal pull-up to TTL high. <S> The power supply shall also provide de-bounce circuitry on PS_ON# to prevent it from oscillating on/ <S> off at startup <S> when activated by a mechanical switch. <S> The DC output enable circuitry must be SELV- compliant. <S> The power supply shall not latch into a shutdown state when PS_ON# is driven active by pulses between 10ms to 100ms during the decay of the power rails. <A> I suspect your problem is lack of connection for the sense lines. <S> If you take a normal power supply, with just separate insulated wires in a bundle, and look at the motherboard connector, you will notice that several pins have two wires crimped together. <S> The larger gauge wire is the actual power wire and the smaller gauge wire is the sense wire. <S> The purpose of the sense wire is to overcome voltage loss due to resistance in the wire harness: the power supply increases the 3.3V (for example) so that at the other end of the wires, you get true 3.3V. <S> These may also be a sense wire on ground. <S> If the sense wire is not connected, the power supply detects a fault and shuts down. <S> If you cannot tell which wires are sense in your original harness, you will need to connect together ALL +5V wires, connect together ALL +3.3V wires, connect together ALL +12V wires, and connect together all ground wires. <S> Additional edit: <S> the answer to the OP's specific question is no, no resistor is required, as shown by the fact that the power supply works with its original cable harness. <A> The PS_ON is a signal line. <S> Does not carry/need much current to work as intended. <S> Technically, no, it might not need a resistor, but small resistors are cheaper than dirt, good practice would dictate one be used, in case you short it to the wrong thing. <S> But it's not working <S> because ATX supplies are complicated, potentially dangerous devices meant for non-technical consumer use. <S> They have protection circuits intended to safeguard you, the pc, and itself, while maintaining it voltage output within spec. <S> The most common version of this is a open line detection. <S> No load on the supply, it shuts down. <S> Remember, these are designed to only run when connected to a matching AT speced motherboard, not by themselves. <S> Connect a low value, high wattage power resistor to one or multiple rails. <S> 5v, 12v, 3.3v, try experimenting. <S> Keep in mind it will get hot, so use Ohm's law to make sure the resistor will survive. <S> I = <S> V/R, P = I * V. <S> Attach it to the PSU's cage as a heatsink. <A> Despite all the ATX rules that say it isn't necessary, a few ATX PSUs do require a load on the 5V line. <S> From Dangerous Prototypes <S> I found a Dell ATX supply where my multimeter showed roughly 12V, 5V at the outputs even without the PS_ON line grounded, however a LED on the the PWR_OK line was flickering/blinking very intermittently. <S> Using a load resistor persuaded it to work more correctly. <S> The voltages on the 12V and 5V lines were then closer to the spec. <A> I am working with a PSU and I had to put a load on it to make it work. <S> I added a 10 ohms 25W to the 12V output of the ATX connector.
| There is no need for a resistor. Any voltage <0.8 (or ground connection) will enable the psu Refer to ATX12V Power Supply Design Guide section 3.3.2 Edit: I just checked the ATX specification and it appears that there is probably only a sense line on the +3.3V. Try just connecting together all of the +3.3V (orange) wires.
|
Why superposition theorem fails here? I have a simple circuit consisting of 2 ideal voltages sources (each 5V) parallel to a resistor of 5 ohms. The current along the resistor is 1A, right? But by applying the superposition principle (i.e. considering individual sources), I am not getting this result. Am I doing some blunder? <Q> Ideal circuits with two voltage sources in parallel lead to contradiction, unless they are equal and can be simply replaced with a single one. <S> Note that potentials \$ \varphi_1 \$ and \$ \varphi_2 \$ in your circuit must be equal, since there is no impedance of any kind between them, nor do ideal voltage sources have any internal resistance: <S> In your case, luckily, these sources produce the same voltage, so the simplest thing to do is to simply remove one of them from the circuit. <S> If you had two ideal sources of a different voltage in parallel, that would lead to contradiction. <S> In a real circuit, connecting two sources in parallel would lead to a circuit with a very small, but still non-zero resistance between them, which would result in one of the sources (the one with a slightly lower voltage) actually sinking current, but the current through the 5 ohm resistor would only depend on the voltage of the right source. <S> If you want to put some actual numbers, you can try something like this: <S> Note that if the sources are again ideal and have completely equal voltages, there will still be no current flowing through the tiny resistance between them, but you should be able to apply the superposition principle. <S> For a circuit like this, the mesh current method should provide the simplest solution and show that the current through the resistor only depends on the right source. <A> Why superposition theorem fails here? <S> This isn't the case here. <S> If you zero either voltage source, KVL gives: $$5V <S> = 0V $$ <S> which is a contradiction. <S> But, it is also important to realize that, no matter how many additional sources and circuit elements are attached in parallel with the resistor terminals, as long as the circuit is consistent , the resistor only 'sees' a 5V voltage source; the voltage source fixes the voltage across the resistor (and thus the current through it). <S> The point being that the left-most source can be removed from the circuit and, from the perspective of the resistor, there is no change. <A> You must solve this using non-ideal voltage sources. <S> Here is the generalized solution to the problem using two non-ideal voltage sources of the same voltage <S> V and with internal resistances r 1 and r 2 in parallel across a load <S> R <S> (see image <S> (a) below). <S> We solve for the partial current from the first voltage source, <S> I 1R <S> (see image (b) ), and for the partial current from the second voltage source, <S> I 2R <S> (see image (c) ), and add the partial currents together to get the total current, I R , through the the load. <S> Note that, as Alfred Centauri pointed out, this works because this method does not violate KVL. <S> Let's take a closer look at the solution we arrived at. <S> We calculated that <S> Now, since r 1 and r 2 are positive, and noting that parallel resistance goes to zero as each of the resistors go to zero <S> we can conclude that the current through the resistor approaches as the voltage sources approach being ideal. <A> In this circuit you can't apply superposition theorem. <S> The voltage across resistor terminals is just 5V only, though you've connected 2 or n number of supplies of same 5V potential. <S> Also, the circuit consisting of two or more ideal sources(i.e. <S> with zero internal resistance) in parallel with each other is unstable; since the voltage between two terminals must be the same. <S> The superposition isn't the ultimate theorem to calculate the current through circuit. <S> It is just a standard procedure which follows the basic logic to find the response.
| To properly apply superposition, the circuit with all but one source zeroed must be consistent, i.e., a solution must exist.
|
Why can't this circuit work for an inductive load? I am using a similar circuit to speed control a 60 W AC fan using phase control. Unlike a TRIAC , supply to fan is given at the start of the cycle. I thought it would minimize the switching noise usually heard in TRIAC controls. PWM is from 0 to 10 milliseconds. In low PWM, the MOSFET heats a lot with an inductive load, but not with a resistive load . A snubber using a 0.1 µF capacitor and 100 or 39 ohm resistors is connected across the MOSFET's source and ground pins. What should I do? <Q> See this AC PWM Dimmer for Arduino article on instructables,which says: problems start, because he is feeding the gate from the MOSFET, with a voltage that is shorted by that same MOSFET. <S> In other words, if the MOSFET is fully opened the DC voltage coming from the rectifier is completely shorted. <S> Therefore there will be no voltage anymore to put on the gate and the MOSFET will block again. <S> This effect might not be so outspoken by a low dutycycle (= lamp on a low intensity), because of the presence of C1, that will retain its charge for a while and will be receiving new charge thanks to the low dutycycle, but at 25-80% dutycycle the voltage on C1 just cannot be sustained anymore and the lamp may start to flicker. <S> What's worse is that at moments that the voltage on the gate drops, for a while the MOSFET will be still conducting, but not be fully saturized: it will slowly go from its nominal 0.04 Ohm resistance to infinite resistance and the slower this goes, the higher the power that needs to be dissipated in the MOSFET. <S> That means a lot of heat. <S> MOSFETS are good switches but bad resistors. <S> They need to be switched ON and OFF fast. <S> Currently the circuit heavily relies on D1 to keep the voltage on the gate of T1 at acceptable limits while the voltage is swinging between 0 Volt and Full peak <S> At peak the rectified voltage is 230x1.4=330V <S> The average rectified voltage is 230x0.9=207V <S> If we forget about the smoothing effect of the capacitor for a while and presume the optocoupler to be fully open the average voltage on the capacitor would be 22/88 * 207 =52 Volts and in peak 22/88 <S> * 330= 83 Volts. <S> That it is not is because of D1 and the fact that the MOSFET will short the Voltage. <S> If the optocoupler is not in saturation and its impedance therefore infinite, the capacitor C1 would charge up to full rectified voltage if not for D1. <S> On average 3mA will flow through R3,R4 and R5 (207-10)/66k which equals a power consumption of 0.6 Watt in the resistors R3,R4, R5 <A> T1 is switched asynchronously with the mains frequency and this can cause DC current to flow. <S> The reason that you can see this effect in low PWM is that the voltage across D1 remains the same (10 V) to about 90% of the duty cycle span. <S> So T1 conducts a little longer than you would expect from PWM. <S> At a higher duty cycle the voltage drops and T1 starts to conduct sufficiently. <S> In addition, the snubber dissipates power as heat. <S> The snubber will have a different effectiveness at different frequencies. <S> You need to choose the values for R and C to suit the frequencies you want to work with. <A> <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> Schematic stripped down to essential current path with MOSFET represented by a switch and re-organised for clarity. <S> Figure 1 may help to understand the problem. <S> T1 is represented by SW1. <S> When L is positive and T1 on current flows through D3 and D4 to the lamp. <S> (Figure 1b.) <S> When L is negative and T1 on current flows through D2 and D5 from the lamp. <S> (Figure 1c.) <S> In a DC circuit Figure 1b would have a snubbing diode wired in parallel with LAMP2 and pointing upwards (anode to N). <S> Figure 1c would have it pointing downwards (cathode to N). <S> It should be clear that we can't have the diode pointing both ways and <S> so we can't use a snubbing diode for an inductive load. <S> Your options would be to use an RC snubber <S> but we don't have enough information to help you with that. <A> If you use this to drive an inductive load, you're very likely to fry T1. <S> When the PWM signal goes low, T1 will attempt to interrupt the current while the load tries to maintain it. <S> Result: <S> high voltage will be induced till something breaks. <S> You could use a big ass zener (avalanche diode actually) across the transistor as a snubber. <S> This will limit the back-EMF voltage from the load to safe levels. <S> Having some capacitance in parallel with the inductive load would be nice too.
| For inductors, $$V = L \frac{di}{dt}$$ PWM is an on-off style switch and cutting the supply current from the inductor instantaneously will generate a tremendous reverse voltage that will most likely break your MOSFET. First of all, this circuit cannot be used to control inductive loads.
|
How to measure high power LED temperature? I have a 100W LED module that I believe is overheating due to the heatsink being too small. I use a piece of anodised aluminium from an old fanless PSU. It's only 300g so far too small for 100W led so I added 120mm fan. I still feel it gets far too hot. I have an IR thermometer and it shows temperatures over 120C after a few minutes when measuring the led itself and 40C for the metal part of the led. Thermal grease in between but the led is not firmly fixed to the heatsink. I am planning on using arduino with a basic temperature sensor to control cooling fan based on temperature and dim the led if it overheats. What is the correct way of measuring the temperature of the led and at what part of the led? Here's the LED: <Q> Secure the thermocouple using some type of thermally conductive epoxy/glue. <S> Light up the LED and wait... <S> Read <S> this and <S> this for more information. <A> There is only one temperature that matters, and that is the junction temperature . <S> You could use a small thermocouple and try to put it under the base, perhaps by drilling a small blind hole into the heatsink under the LED base. <S> (from the other side). <S> Lots of inexpensive multimeters have type-K ( <S> Chromel-Alumel) thermocouple inputs that are probably good enough for your purposes provided you check that they're reading correct room temperature when cold. <S> Another method would be to pass a small constant current such as 1mA through the LED junction and vary the temperature in an oven from room temperature up to, say, 100°C.Plot <S> that graph, fit a curve to it, or whatever, so you can find the inverse (temperature from voltage at 1mA). <S> Now if you run the lamp at a known ambient temperature, allow it to stabilize and then very quickly switch from the "on" current of 600mA or whatever to the 1mA current you can get a true reading of the actual junction temperature before it cools too much. <S> The above method is similar to the standard method of checking temperature rise in transformers- using coil resistance (though we can skip the oven step because we know pretty much how the copper wire will behave with temperature, we just need one resistance reading at one known temperature). <S> As an approximation, with your IR thermometer, you could paint the back of the heatsink black (if it isn't already) to make the emissivity closer to 1, measure the temperature and add a fudge factor such such as 3-3.5 <S> °C/watt of dissipation to account for the junction-package and package-heatsink thermal resistance (use the actual number for the junction-to-case \$R_{\theta JA}\$ if you have a datasheet for the LED module. <S> There will be a bit of gradient through the thickness of the heatsink but if you can get right under it with just some copper or aluminum between, the number should be close enough. <S> Current LEDs are good enough that it's a bit pessimistic to assume that all the electrical power that goes in is converted to heat- a significant amount is emitted as light, so does not contribute to heating of the LED. <A> The module should specify a maximum temperature, and these are usually either specified at a specific location (they have to tell you where) <S> or it's the "hotspot" temperature, which means exactly what it sounds like - the hottest spot you can find on the module. <S> Without more info on the tolerances of the part I don't think you're going to be able to collect meaningful information or know how close to spec you are. <S> ;(
| Best way of measuring the junction temperature of an LED is by placing a thermocouple at the heat pad (or if the LED doesn't have a heat pad pin, get as close as you can to the anode pin).
|
bright LED on IO-Pin without additional transistor (PIC 12F) I want to drive an 40 mA LED on a single I/O-Port: I've forgot to draw the LED in the right version but i hope you get the idea. So my actual question:Since my PIC 12F isn't able to drive currents above 20 mA I may use the right circuit for supplying that current. But by using voltage/current directly from my source it may also be possible to achive the same with fewer parts - at least i think it is... So what's my error in reasoning? is it possible to use the left circuit without problems? Thanks in advance. EDIT:Additional (maybe dumb) Question - what's wrong about the following: I could manage to make a second port available... 2nd and Last Edit: It's possible as mentioned here (german) - since I/O Ports are rare i may try using a FET anyway, thanks for all the answers <Q> The issue with using a microcontroller's GPIO pin directly, to operate an LED brightly , is that the current that passes through the LED to light it up, also has to pass through the GPIO pin and out through the microcontroller's ground pin, for the circuit to be completed. <S> This is called sinking of current. <S> While many microcontrollers are rated for sinking 20 mA or more through an individual GPIO pin, some are not. <S> More of concern, when one has multiple such current sinking connections, these currents add up at the MCU's ground pin - which itself has a limit, differs from MCU to MCU. <S> Solution <S> : Drive your LED with very low current if you absolutely must save on the transistor. <S> A typical indicator LED will light up pretty brightly even with 3 or 5 mA of current - try it for yourself. <A> End of story. <S> Full stop. <S> Using a FET instead of a BJT would mean one fewer parts (base current limiter not needed). <A> The left circuit has a single port pin sinking current. <S> The absolute maximum sink current on any port pin is 25mA for (say) a PIC12F1501. <S> Something like 20mA would be a reasonable limit, since you never want to get close to the absolute maximum. <S> A good solution for this sort of thing (if you really need 40mA) is to use a pre-biased transistor or a MOSFET with a logic level gate. <A> When driving the LED from 5V and you want to use a BJT, you can save the base resistor when using a emitter follower configuration. <S> The emitter resistor together with the LED will double as base resistor. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Where \$R_1 = \dfrac{V_{PIC,OUT} - V_{Q1,BE} - V_{D1,forward}}{I_{D1}} \approx \dfrac{4.7 - 0.7 - 2}{0.04} = 50 \Omega\$
| There's no error in your logic, you can't safely supply a directly attached LED with more current than the IO pin can safely sink or source. It may be different for the one you're using.
|
Need to close or open a circuit (and keep it that way) with magnet I need to build a circuit that closes when it detects the passing of a magnetic card.It should open again when the card passes again. So I need a simple magnetic reed (like this one ). And some kind of switch component that closes when it detects a current pulse from the magnetic reed (right?). Can someone tell me what kind of component I should use? <Q> You could use reed switch output to toggle a flip-flop such as a 74LV74 . <S> Simply connect the /Q output to the D input and the clock input to the debounce circuit output. <S> /CLR <S> and /PRE must be tied high (along with any other unused inputs from the other half of the chip). <S> The Q output will go high and low alternately each time the switch opens. <S> It will not start up in any particular state, to do that requires a bit more circuitry and the use of the /CLR <S> or the /PRE input. <S> Do not substitute a flip-flop that does not have a schmitt trigger clock input or you may get false operation. <A> If you are expecting the magnetic field from the stripe on a credit card (or similar card) to operate a reed switch, I think you are going to be sadly disappointed. <S> Tape head amplifiers are quite similar to microphone amplifiers in ther needs for high gain and low noise. <S> If you use a microcontroller with an ADC to detect the audio level, it can control the opening and closing of the output circuit, and maybe provide some validation that the correct card is used. <S> If you must use a reed switch as you suggest, you will need to embed a much more powerful magnet in the card (perhaps where the chip would be?) <S> and then it poses a serious danger of erasing the stripes on any other cards in your pocket! <A> Instead of the reed switch, consider a Hall-effect switch (or Hall-effect sensor, but the switch is more appropriate for your task). <S> They're far more sensitive, much smaller, consume much less power and (in switch form) typically integrate debounce filtering as well.
| You need something like the tape head from an audio cassette deck, a sensitive audio amplifier with gain of 40 to 60dB, an audio level detector of some kind (to distinguish between random noise or interference) and a switch (relay or MOSFET) to close the output circuit.
|
Switching 60V with 3.3V microcontroller at 50kHz - 1MHz I'm playing around with some switching mode power supply things. For this reason, I'd like to switch the input voltage with a microcontroller, from the PWM output or other output pins. The specifics: Input voltage: 4V - 60V Switching input signal: 3.3V (LVTTL) Maximum switching speed: 50kHz - 1MHz (as high as I can easily get it) Required current tolerance: 1.5A or 15W There is no supply voltage besides the 3.3V signal. I am looking for suitable components to do this as simply as possible. For me, simple means as few components as possible, and as few requirements on both the inputs and outputs of the components - I do not wish to impose any driving requirements to the microcontroller, or restrictions on how the switch can be used, or similar things. But I'd want the components to be suitable for a high efficiency switching mode power supply. I know it can be done with a combination of n-MOSFET and a p-MOSFET and a couple resistors. I know it can also be done with a gate driver IC and a n-MOSFET, although I have been unable to locate one that would only require 3.3V supply voltage (and a boost pin?). I know I do not want a solution that would force some minimum off-time rate on the MOSFET to charge a capacitor, but I might be convinced otherwise. In theory, the most direct solution would be a 3.3V compatible solid state relay or analog switch, but the actual solid state relays available do not seem very suitable. But, primarily I am just interested in learning more about the problem space here and the possible solutions. Clarifying schematic stolen from another question: Vin = 4V - 60V Controller = 3.3V signal, toggling at, for example, 250 kHz Q1 = the component, or the set of components I wish to find So, strictly, the question is simply: what do I need in place of Q1? (Note that this is just an example schematic, not exactly the sort of circuit that I wish to build.) <Q> The 2N6782 N-channel FET is rated at 100v drain to source at a maximum 3.5A and 15W max power. <S> I picked a through-hole part because the surface-mount part would be difficult to solder by hand. <S> To drive the FET, you can use the LT4440-5 , which takes a logic level in and can drive an N-channel MOSFET switching up to 60 or 80V depending on the version. <S> The supply current is negligible, only a few µA. <S> The driver only comes in a surface mount part (SOT 23-6 or MSOP). <S> The only drawback is it requires a supply voltage (VCC) between 5 and 15V <S> (thanks to the OP for pointing out this variant of the LTC4440 with a lower minimum supply voltage). <S> Since you have only a 3.3v supply, you could use either a voltage doubler or a simple boost converter (such as the MIC2141 ) to supply the VCC voltage. <S> Both the driver and voltage doubler/boost converter should only require a few ma (if that) from your 3.3v rail. <S> The FET and driver should work up to 1 MHz, maybe a little higher. <A> Do you plan to sample the output and do the feedback loop in software, or will you have an compensated error amplifier implemented in hardware and sample the error voltage only? <S> This will dictate how much CPU horsepower you'll need, and if you'll benefit from DSP-like instructions (multiply-accumulate) and DSP-like features (like DMA). <S> One consideration is the precision of the duty cycle register. <S> A coarse duty cycle adjustment capability can worsen limit cycle oscillation, where the output goes above and below the desired setpoint because the exact duty cycle needed isn't achievable (not an issue with analog PWM). <S> Another area you need to pay careful attention to is the maximum useful switching frequency your microcontroller will be able to generate. <S> This will be dictated by several key constraints: <S> the PWM duty cycle register resolution (the minimum period must be a small fraction of the desired switching frequency) the ADC sampling rate of your microcontroller whether or not you're doing a full-fleshed controller in software <S> Why are these important? <S> Your switching frequency will need to be a fraction of the ADC sampling rate to avoid aliasing issues. <S> You need at least one sample per period (more is better). <S> If you plan to compute a compensated loop in software (PID or other scheme) you'll need enough microcontroller horsepower to do the sampling and calculations each and every switching cycle, plus have leftover cycles for whatever else you need to do. <S> If you plan to sample the output of a hardware error amplifier and do some simple computation to program the duty cycle, you'll take a lot of burden off the microcontroller. <A> If I were you I would not bother using your own micro as there are so many products around that are able to do this for you. <S> Saying that Your design is missing all kinds of things like sense resistors for feedback of what the output voltage is to reduce error. <S> After all this I would recommend using the LT3724 from Linear Technologies. <S> It has a switching frequency of 200kHz. <S> They also give you full example schematics to use their IC which you could in theory swap out for your own micro controller. <S> However I do not see why you would as it is so much easier to use their solution. <S> I would recommend performing the simulation of it in SPICE to check that it meets your requirements. <S> Here is a link to the development board that has full schematics and BOM. <S> http://cds.linear.com/docs/en/demo-board-manual/dc736af.pdf
| What you're describing is digital control by the sounds of it - the micro is going to control the buck FET duty cycle to control the output, so it's going to require some sort of external sensing of the condition of the output as well as (possibly) computation and (definitely) programming of the duty cycle.
|
Track 3D Position with an Accelerometer I'm trying to build a piece of hardware with an accelerometer that could track the approximate 3D position of an object. The accelerometer would not be rotating, so a gyroscope shouldn't need to be accounted for. I would like to know if anyone has any suggestions for a specific accelerometer. Does anybody have suggestions for a quality accelerometer? Also, does the project sound doable? Could an accelerometer accurately detect the position of an object? This would all be on a small scale; specifically the tracking of one's finger. A GPS wouldn't work in this situation, as the movement would only be moved about in around a 2'x2'x2' field. Thanks. <Q> To get a position from pure accelerometer data, you need to integrate it twice over time. <S> First integral gives you velocity, second gives you position. <S> The problem you run into is called integration error. <S> This error gets larger and larger over time. <S> And it gets much worse when you're integrating twice. <S> And what's more, for integration, you need input conditions, <S> that is - you need to know position and velocity of the object at the moment you start the measurement. <S> So in the end, you may be able to track the direction of movement, you could measure the position during the first second of time or so. <S> But it will be far from accurate, and you will need to assume you're starting from a stand still. <S> I suggest looking at positional measurement, rather than acceleration. <S> Such as optical, magnetic, sound, etc. <A> To measure changes in position in general you need three gyroscopes and three accelerometers (6 DOF). <S> If you can fuse data from other sources (compass, GPS, triangulation) you can get low drift and fast response. <S> The optimal way to fuse such data is usually a Kalman filter. <S> In your case, maybe triangulation would be practical, augmented by MEMS accelerometers and perhaps gyros. <S> Anything suitable for a tactical or navigation grade Inertial Measurement Unit (IMU) will be many thousands of dollars (and usually export-controlled, which causes all sorts of headaches). <A> With some math (Forward and Inverse kinematics) and more than one accelerometer (preferably one for each joint of the finger), you can track a finger. <S> you will have to translate the acceleration data into orientation relative to earth's center, then translate that into relative angles (finger relative to the hand), and calibrate for the user's hand size. <S> You will be able to track only the finger, not the entire hand.
| Really good accelerometers (low bias drift, linear over a wide range, low temperature drift) are very expensive and somewhat bulky.
|
DC-DC Step-Down (buck) converter 5V 10A 50watt, not understand how to size the supply I have a 5V 10A 50WATT DC step-down converter: http://www.powerstream.com/dc-24V-5V.htm I'm just not understanding how to size the power supply needed to drive this converter at max power. I have an iGo 15-24V 6.5A 100W Max (130W peak) powersupply. Is that going to be sufficient to drive the step-down converter when it's under max load itself? Am I understanding correctly, that if I have a 50WATT load, it is always going to need a minimum of 50WATT of power regardless of what voltage is driving it? I understand there will be a loss of efficiency in the step-down, so what's a rule of thumb (10%-100%) for gauging the necessary capacity on the supply. Or am I missing something fundamental? <Q> Is that going to be sufficient to drive the step-down converter when it's under max load itself? <S> According to your DC step-down converter the specified efficiency is 84% at 9-10 amps output . <S> So if its output is 50W and at a 84% efficiency $$\eta = Efficiency$$ <S> $$\eta <S> = \frac{Power\ Output}{Power\ <S> Input}$$ <S> $$Power\ input = <S> \frac{Power\ output}{\eta}$$ $$~59,52 = <S> \frac{50}{0.84}$$ <S> So it probably satisfies the needs with 100W continuous power. <S> At 18V input it should be able to supply a current of 60 / 18 <S> = 3.33A. <S> Well within your supply capabilities. <S> Be in mind <S> that's simple calcs based on resistive loads and does not take into account a bunch of factors that can change power requirements a lot. <S> Efficiency formulas from http://formulas.tutorvista.com/physics/efficiency-formula.html <A> Essentially Power <S> In * Efficiency <S> = Power Out Since we know Power Out (50W) and Efficiency ( <S> ~84% in decimal 0.84), we can rearrange this. <S> Power Out / Efficiency = Power <S> In 50W <S> / .84 = Power <S> In 50W / <S> .84 = 59.53W <S> So if Efficiency and Power Out are fixed, you only need 59.53 Watts in. <S> In a perfect circuit. <S> At 18v minimum, that is 3.33 Amps, and all three (Power, Voltage, Current) are well within the provided iGo's supply specs. <S> Hope you have a 18v~24v tip for the iGo, unless you have one with a voltage selection switch. <A> It sounds like your supply is sufficient for the converter. <S> I am guessing the specs are calculated including efficiency, although you need to check the datasheet/manual to confirm this. <S> Either way, 18V * 6.5A = 117W, so it would need to be less than 50% efficient to be a problem. <S> A rule of thumb is around 80% efficient for switching supplies. <S> As long as you don't over volt with your supply (which it sounds like you cannot) then you should be okay to give it a try.
| So your requirement for the power supply, with the converter operating at the full load is ~60W.
|
How do I find a short in an unpopulated 4-layer PCB? I have a 4-layer PCB, designed in Eagle CAD 6.5. The stack-up is: Signal GND (ground) DVDD (digital power) Signal GND and DVDD are solid planes, with vias connecting them to layers 1 and 4. I have 4 PCBs. Three PCBs are bare - unpopulated, fresh from the fabricator. In the bare boards (and the assembled one) there is a short between GND and DVDD. It could be a manufacturing defect, but since all 4 boards are bad, it's more likely it is a design problem. I've manually examined the gerbers in gerbv to see if there are vias that connect to both GND and DVDD, but did not see any. But there are a lot of vias, so I could have missed one. I've done an Electrical Rule Check (ERC) and Design Rule Check (DRC) - to look for problems. I get no unapproved errors. I've examined all the approved errors to look for problems - there are no overlaps. How do I find the source of the short circuit? <Q> Try the poor man's IR camera: <S> Spray the board with cooling spray <S> so you have the whole thing covered with tiny white ice crystals. <S> Then run a high current through the short (plane to plane). <S> Often you can see a spot melting where the short is - assuming the short has higher resistance than the planes (very likely). <S> Higher resistance = <S> > more heat (P = U*I = R*I^2). <S> No cooling spray in the lab? <S> Turn the air spray can upside down - what comes out is also very cold. <A> Use a good volt-meter and a power supply that supports current-limiting. <S> Drive a decent current between DVDD and GND, ideally 100mA + up to an amp or two if the traces are decently sized. <S> Your short will be close to that point. <S> Alternatively, drive several amps or more through the short, and look at the board with a thermal camera. <S> Lastly, audit your gerbers (not the board file, the exported gerbers) in a separate piece of software. <S> There may be a problem during the gerber export. <S> Note that all of the above (except checking the gerber files) are techniques to locate a manufacturing defect, such as layer misregistration or similar. <S> If you have a design error, I don't know what to tell you, aside from the fact that if the DRC isn't catching it, and the schematic is correct, you're probably doing something wrong. <A> Do you have any unplated holes or slots in the PCB's? <S> I've previously specified some unplated holes on a similar layer stack, and found that the supposedly unplated holes were in fact plated and the plating was creating a short between the power and ground planes. <S> A round file and a few minutes work quickly sorted the problem out. <A> At my first job out of school at HP in New Jersey, my tech had a standard solution for this. <S> Another part of this division of HP made power supplies, including 5 V 200 A supplies for electroplating. <S> The tech would connect the two shorted parts of the board to one of these supplies. <S> The resulting smoking hole gave you a real good idea what was shorted. <S> It's a good idea to put on goggles before trying this. <S> You also usually want to solder decent size wires to the two nets on the board that are shorted. <S> That makes it easier to connect the high-current supply. <S> This may sound like a flippant answer, but this was back in the days of manual board layouts, and we got some useful information like this a couple of times. <S> Sure, the board you run the test on is toast, but then again it wasn't of any use in the first place. <S> You are getting use out of it, which it to tell you where the defect is. <S> If the defect was in manufacturing the board, then the connection is usually a thin bit of copper, and this method will actually fix it. <S> If it's a design error, the connection will be more solid and you get the smoking hole. <A> Use a Groan-ohm (sorry, Tone-ohm ) if you have access to one. <S> The newer ones are very fancy and unbelievably expensive but with luck and persistence <S> you can find an older one like the 700 dirt cheap on eBay. <S> They sometimes go cheap because they look like a simple continuity tester so the unwary don't notice them - and they are continuity testers - but with the twist that the probes are Kelvin connections and the pitch of the "beep" varies with impedance. <S> Unbelievably intuitive to use, but annoying as hell to anyone else in the lab! <S> If it's on an inner layer you then have an interesting drilling or machining job ahead of you, but that's another story. <A> How big are the boards? <S> First I would file the edges to make sure there is not a short from the milling or scoring in the wrong place. <S> Then solder ohm-meter leads to the shorted layers and start drilling out vias and other thru-hole patterns till you jump from 0 ohm to near-infinity. <A> My method for finding shorts (which is similar to but not the same as some of those already mentioned). <S> Get a bench supply. <S> Set it for a voltage less than or equal to the normal operating voltage of the circuit, a current limit of 1A and hook it up to power the board. <S> Also get a decent multimeter and get the PCB design up on your computer so you can refer to it as you work. <S> Now set your multimeter to voltage and put one probe on the point where you are supplying power. <S> Put the other probe on nearby pads/vias on the power net. <S> Look for the biggest voltage difference, this will indicate the approximate direction the current is flowing in. <S> You can then move the probe further out looking for even higher voltages. <S> Note: if you have a mostly solid power plane then you will be working with general directions. <S> OTOH if you are using tracks (or a plane so cut up it's effectively tracks) for your power net you will want to follow along the tracks and remember that two pads that are close physically may not be close electrically.
| Assuming the short isn't of another sort, like overlapping pads, you should find the offending spot. Then, using the voltmeter, measure between closely spaced points on the DVDD and GND net, until you find the smallest delta. Your ears are amazingly sensitive to pitch changes so you can resolve milliohm changes easily; simply move the probes around listening for the highest pitch.
|
Connecting two capacitors in parallel Two capacitors are parallel connected with an open switch. Both have a different capacity in which: $$c_1>c_2$$and both charged with a different voltage $$v_1\neq v_2$$and now we close the switch. What will the voltage be on the capacitors and will it hold Tellegen's theorem ? I believe it won't, but I couldn't write a proper proof or to find the common voltage. <Q> The problem here is that connecting two capacitors with different charges will result in an infinite amount of current and this is the basic problem in analysing the circuit. <S> But energy will be lost in the resistor so, using the formula you can assume R gets progressively smaller and smaller and for each reduction in R you will find that the initial current gets bigger and bigger and you should be able to notice that the \$i^2\$R.t loss does not actually get any smaller - it approaches a constant value and the smaller R gets you'll find that the energy loss remains the same. <S> This indicates the final energy loss. <S> Please consider that you can't short the two capacitors together and hope to get sensible results by just assuming that the initial individual energies stored in each capacitor will equal the final energy once they are in parallel. <S> This doesn't happen in the real world and it won't happen in the theoretical world either. <A> Consider this circuit: <S> simulate this circuit – <S> Schematic created using <S> CircuitLab <S> I know you didn't specify a resistor in the circuit. <S> Its purpose will become clear later. <S> Let's say that initially \$V_{C1} <S> = <S> 1V\$ and \$V_{C2} <S> = <S> 0V\$. <S> The charge in C1 is: $$ Q_{C1} = <S> CV = 1F \cdot <S> 1V = <S> 1C $$ <S> The total energy in the circuit is the same as the energy in C1, because there is no other stored energy elsewhere in the circuit: $$ E_{C1} = \frac{Q^2}{2C} <S> = \frac{(1C)^2}{2F} = <S> 0.5J <S> $$ <S> When the switch is closed, some current flows. <S> The total charge in the circuit must remain the same, and we can see that the voltage across the capacitors must be equal once the circuit reaches equilibrium. <S> $$ Q_{C1} = Q_{C2} = 0.5C $$ <S> $$ <S> V_{C1} = V_{C2} = \frac{Q}{C} = \frac{0.5C}{1F} = 0.5V $$ <S> The energy in the capacitors is: $$ <S> E_{C1} = E_{C2} = \frac{(0.5C)^2}{2F} = 0.125J <S> $$ <S> We have two of these capacitors so the total energy is twice that, 0.25J. <S> Initially we had 0.5J. <S> Where did we lose half the energy? <S> Consider that in the instant the switch was closed, there is 1V across R. <S> The current is thus 1V/R. <S> The power is thus: $$ P = <S> EI <S> = 1V \cdot \frac{1V}{R} <S> = \frac{(1V)^2}{R} <S> $$ <S> As you decrease R, the power goes up, approaching infinity: $$ \lim_{R \searrow 0} \frac{(1V)^2}{R} = <S> \infty <S> $$ <S> Thus, the lost energy was lost as heat in R. <S> The energy lost is the same for any value of R. R can't be made equal to 0Ω without resulting in infinite power, which is impossible. <S> Incidentally, this is why charge pumps can't be 100% efficient . <A> What has been forgotten is that as the resistance R decreases the effect of the inductance L of the circuit becomes more significant - you have a loop of wire. <S> So in fact you have a series LCR circuit with the condition for critical damping <S> $$R^2 = <S> \dfrac{4L}{C}$$ <S> When you do your analysis of a CR circuit you are in fact analysing an LCR circuit but with the assumption that the resistance of the circuit is much greater than that for critical damping and so the circuit is over-damped <S> and you get nice exponential curves. <S> If the resistance is very low then the circuit is under-damped and the charges/currents/voltages undergo damped simple harmonic motion. <S> Under such conditions the accelerating charges because they are unbound (free electrons in a conductor) emit electromagnetic radiation which is the basis of a radio transmitter. <S> So some of the energy dissipated in the circuit ends up as heat (ohmic heating) and some as electromagnetic radiation and at no time does the power dissipated become infinite.
| If you introduced a small resistor (call it the switch contact resistance), you can derive a formula that predicts the final voltage across the capacitors.
|
What exactly fries the chip when you invert power supply? From my own experience, burning microcontrollers is quite easy. Put the 5V at ground, GND at V CC and in an instant your chip is burned. What exactly goes on internally that causes it to stop functioning entirely? For instance, if I were magically able to open a chip and rearrange all its semiconductor connections and fix it, where exactly would I need to look, and what would I need to do? If this is chip-specific, please choose any that could answer my question or give me an idea at least. <Q> Most commercial IC circuits are isolated from the substrate material by a reverse-biased P-N junction (including CMOS parts). <S> The substrate is usually tied to the voltage expected to be most negative. <S> If it isn't, then that junction becomes forward biased and can conduct a great deal of current, melting metal or heating the junction to the point where it no longer acts as a diode. <S> That is typically at a voltage of about 0.6V, but the IC makers play it safe usually by telling you not to go lower than -0.3V. (referring to the below diagram, but not shown, the substrate would be tied to pin 5) <S> Most CMOS parts have another twist that if part of the chip has a normal Vdd and another part sees a big negative current it will trigger a big parasitic SCR that is a side effect of the structure, then the device's power supply draws a large current which causes overheating, melting etc. <S> if the current is not externally limited. <S> That is called latch-up. <A> What releases the magic blue smoke when you exceed working voltages or reverse the supply voltage? <S> Applied to any 'chip' <S> Excessive current producing excessive power dissipation (\$I^2 R\$) <S> and/or excess voltage causing insulation breakdown due to high internal field strengths coupled with the lack of thermal conduction from the devices inside the chip. <S> Consider the non-linear, asymmetric (polarity sensitive), physically small nature of the internal devices and their small heat conduction paths. <S> Couple this with low voltage destruction of very fine insulating layers (high field V/m) producing bi-directional low resistance conduction pathways. <S> The internal individual device temperature rises very quickly and destroys its semiconductor/insulating properties. <S> Once destroyed this produces other low resistance pathways causing multiple cascading failures across other devices on the chip. <S> All this happens very quickly and its very much a one way event . <S> ( Think Humpty Dumpty - Putting all the pieces back together won't get you back to where you started from - Humpty has left the building) <S> How could you repair it? <S> Basically you can't cause magic doesn't exist. <S> There would be so many interacting faults in the circuit that it would be nigh impossible to localize any fault. <S> (Remember even in a 'simple' IC you are dealing with hundreds of thousands of devices.) <S> All faulty devices would have to be identified and replaced at the same time (assuming you had the ability to reconstruct all faulty devices at an atomic level) <S> - miss only one and you have to start again when you power up. <S> Simple solution (and most cost effective in time and money) throw the dead bug away,learn by the experience, replace it with a brand new full spec chip and next time be more careful with the power supply. <A> What exactly goes on internally that causes it to stop functioning? <S> Heat is generated, junctions burn as well as other overheated elements. <S> If I were magically able to open a chip and rearrange all its semiconductor connections and fix it... <S> You cannot fix it (in practical) because many junctions are now broken/evaporated, as well as their immediate environment. <S> Protection against polarity inversion is quite easy (a diode), however it generates a voltage drop and additional heat, the manufacturer doesn't embed it on the chip, the IC user may add an external diode if necessary. <A> A late answer, I came here via another question but noticed that actually none of these answers address the real reason why almost any IC / Chip can be fried by applying a reversed supply voltage. <S> The real reason is that all chips need to have ESD protection on all pins that are not supply pins with a circuit like this: <S> So almost every pin has this ! <S> That is a lot of diodes in parallel. <S> You can easily destroy all these diodes by reversing the supply. <S> And that actually destroys your chip. <S> Latch-up as mentioned above is an effect that occurs when the supply has the correct polarity but a current is sinked or sourced on an input or output causing a malfunction as explained above. <S> It has nothing to do with reversing the supply ! <S> If you think I'm talking nonsense then please look up how a Latch-up test is performed. <S> There is specialized measurement equipment to do such test. <S> Please read this excellent article explaining latchup and note that the supply is "normal" so not reversed ! <S> When still in doubt read the EIA/JEDEC STANDARD IC Latch-Up Test EIA/JESD78. <A> As the semiconductor structures are very small, it's indeed quite an easy task to burn them down. <S> Clearance distance - if you apply a large enough electric field between two conductors, there will be a breakdown. <S> This, being on a chip, causes terminal malfunction. <S> This mainly occurs on the Gate of a FET structure. <S> Semiconductors in principle are non-linear, polarity-sensitive devices. <S> This in turn renders the entire device very non-linear and polarity-sensitive. <S> Million other reasons that I can't think of right now...
| An excess of current, junctions can resist current only in one direction, when polarity is inversed they become short-circuits.
|
How to get a steady(ish) 12v output from a varying input voltage At present, my little atom PC is being powered by an 240V AC to 12V DC PSU which connects to a 12V DC-DC pico PSU. Our home is off grid, so all of our power comes from 12V lead acid batteries. I've tried connecting the 12V batteries directly to the pico PSU to improve efficiency and it works as long as the voltage from the batteries is no greater than 13.5V or so. Unfortunately, while they are being charged, the voltage from the batteries can initially be anything up to 14.5V. Is there a simple way to 'cap' the voltage from the batteries at 12V? <Q> Why don't you use one of these? <A> Yes, you could make your own low dropout regulator to feed this "pico PSU" (whatever that really is). <S> However, the better solution would be to get or make a proper power supply that can handle the variation in voltage on your battery bus. <S> That really isn't hard. <S> There are plenty of buck switcher chips that can easily to this with a minimum of external parts. <A> If you are up for some DIY then you can make the following LDO circuit <S> It uses an opamp, a P-mosfer, a zener diode and a few resistors. <S> The zener provides a reference voltage, in this case about 6.4v. <S> R2,R3 and trimmer RV1 form a voltage divider, the divider output (in the middle) <S> is about half of the mosfet output voltage. <S> The trimmer adds the ability to set the output voltage from about 11.5v to 13.5v. <S> The opamp (triangle) compares the reference voltage with the output voltage and drives the mosfet so that it keeps the output level constant (assuming the input is higher than the output voltage). <S> The excess voltage times the output current will be dissipated as heat on the mosfet <S> so you'll need a small heat-sink. <S> As an example for 4A and input voltage 14.5v and ouput 12.8v the power dissipation will be (14.5v-12.8v) <S> * 3A = <S> 5.1W. <S> When the input voltage matches the set voltage or is lower, the dissipated power will be negligible.
| There are wide input range picoPSUs available, e.g. the picoPSU-120-WI-25 supports up to 25V input voltage. Note that you should choose a low ON resistance mosfet so that it drops only a few mV when it's fully on.
|
help for identifying an unknown chip I've found a burned chip (due to DC power overload) inside the sound card Roland UA-25EX .This is a picture of the part: Can someone give me a hint?I'm not an expert, I want only to find the spare part. <Q> The part is a bog-standard Texas Instruments TPS62007DGS 3.3V buck regulator. <S> They're about three bucks each in singles. <S> Why not buy a couple, swap it out and see what happens? <A> That is probably a switching power supply chip. <S> That is a guess because of the inductor right next to it <S> that is connected to one of the pins. <S> Unfortunately, "88TI" is likely to be a package code as apposed to a true part number. <S> On physically small packages, there isn't room for the full part number. <S> Instead, manufacturers put a short code there that is unique accross their product line. <S> Sometimes these package codes are listed in the datasheet, but rarely is there a reverse reference that gives you the part number from the short code. <S> If you can guess the part, then you might get lucky if the datasheet shows the short code and it happens to match your chip. <S> Basically, this board is now junk. <S> Toss it and move on. <S> If the power supply went, there is likely other damage somewhere else. <S> A short somewhere else could have blown up the power supply chip, or the power supply chip passing the full input voltage to the rest of the parts could have caused all kinds of damage. <S> There is a reasonable chance that just replacing the one <S> obviously blown chip won't fix the card. <A> From the nearby inductor (L35), electrolytic capacitor (bottom center), possible power transistor (lower left), possible power resistor (R248), I'd guess this is a switching voltage regulator controller chip. <S> Perhaps you put too high a voltage at its input and fried it?
| Something that handles power is also more likely to be blown out with obvious damage as this chip.
|
reason(s) to use a 10-bit ADC instead of a 12-bit ADC? I think this question almost answers itself, but I've learned that's not always the case. It appears from my somewhat brief googling and catalog-trawling that Microchip sells the 3008 and 3208 ADCs. Other than the resolution itself, are there any meaningful differences in these two parts? The price difference is $1 (in quantity) so I realize that if you're building something (or hundreds of them, really) where you only NEED 10-bits it might be worth saving a buck, but for general purpose / hobbyist type applications is there any reason NOT to just go with the 12-bit version? I assume that the interfacing code is all the same across these? <Q> Cost is one factor, as you note. <S> $1 is a big difference in price for a lot of people. <S> Also consider the complexity in interfacing with the ADC. <S> If it has a serial interface, then you don't need extra pins, but you need extra time to transfer two more bits 1 . <S> This is all assuming that everything else is equal. <S> In reality, that's probably not true. <S> A careful reading of the datasheets is necessary to understand all the differences. <S> 1: <S> assuming, as The Photon points out, that the serial protocol used by the ADC doesn't transmit the measurements in octet chunks, in which case either 10 bits or 12 bits requires two octects, or 16 bits. <A> For example, successive approximation ADC's will need more iterations to yield more bits. <S> This can decrease your effective sampling rate, even for a device with parallel communication. <S> Similar with a delta-sigma, where more bits can mean slower rates. <S> Probably not so with a dual-slope. <A> Looks like the 10 bit throughput <S> is twice the 12 bit throughput; 200 vs 100 ksps. <S> 12 bit conversion also takes two more clock cycles than 10 bit conversion. <S> What's the more important aspect of your analog signal, precise amplitude, or precise frequency? <S> Would aliasing be a problem for you at maximum throughput?
| If the serial interface is slower than the ADC, this limits the sample rate, since you can't start reading a new sample until you are done reading the previous. If it has a parallel interface, you need two extra pins for the 12-bit ADC versus the 10-bit. In addition to Phil's excellent observations, more bits may also mean more iterations of the algorithm underlying the sampling.
|
What happens when you increase current to a DC motor? Increasing voltage increases the RPM of the motor, but what does increasing current do? I can't seem to get a straight answer. Some googling has led me to believe that torque increases while rpm stays the same. I currently have two 24V batteries wired in parallel, and they are connected to a DC motor through a speed controller. I understand that the speed controller works by turning the circuit on and off very quickly to vary the speed of the motor. I just bought a third 24V battery that I plan to connect in parallel to the other two, and was wondering what I should expect when I hook it up. <Q> By adding a battery in parallel, you do not increase the current. <S> You increase the maximum current that the motor can take. <S> Nothing will happen if you add another battery in parallel and the motor isn't suffering from shortage of current. <S> Keep in mind that than in Ohm's law, you have 3 variables: <S> \$V <S> = <S> RI\$. <S> In this equation, you can affect one variable by changing the other two. <S> For a given motor, R is constant, so that means that one of two possible variables you can change is out. <S> You can either set the voltage to some level, which you seem to be doing by using the speed controller, and let the current come from the equation or you can use a different type of speed controller which sets the current and lets the voltage come out as a result of the equation. <S> So how is torque related to this? <S> Well motor has what's called back electromotive force and the equation for the Ohm's law <S> is actually a bit different:$$I=\frac{V_{battery}-V_{back <S> -EMF}}{R}$$The greater the torque provided by the motor, the lower is the \$V_{back-EMF}\$, resulting in greater current through the motor. <S> When current is supplied by a battery, the battery's voltage usually drops. <S> The drop depends on the type of battery and the current. <S> If the current is above what battery is expected to provide, you can expect the battery to have lower voltage than expected, to overheat, maybe even explode. <S> If the current provided by the battery is sufficient, the voltage drop isn't going to be as big. <S> So it's as I said in the first paragraph: If the batteries can provide sufficient current to the motor (and you test this by checking the current when motor should be providing maximum torque), then adding another battery won't affect the current or the torque. <A> Increasing voltage increases the RPM of the motor, but what does increasing current do? <S> Increasing Voltage, Increases the Current Pulled, which Increases the Strength of the coil, which increases the RPM AND Torque of the motor. <S> They are all connected. <S> I currently have two 24V batteries wired in parallel, and they are connected to a DC motor through a speed controller. <S> I understand that the speed controller works by turning the circuit on and off very quickly to vary the speed of the motor. <S> This is called PWM. <S> By turning the circuit on and off rapidly in a given period (ex: 25% on time 75% off time every 10 milliseconds) will average out the voltage to that amount (25%). <S> The motor sees about 25% the voltage, so it draws about 25% the current, the torque is decreased, the rpms are decreased, etc. <S> As a basic comparison, a motor is simply a resistor. <S> Ohm's law applies to it. <S> I = <S> V/R. Current and Voltage are related, especially with a fix Resistance like the motor. <S> Except that the motor is only a fixed resistance depending on it's load. <S> A motor with no load has lower resistance than a motor with a load, and a motor that is overloaded will stall out, having the highest resistance, drawing a stall current that (rule of thumb) is between 2 and 2.5 times the no-load current. <A> Adding the third battery will give you a 50% longer run time before the batteries need recharging, but shouldn't change the motor's performance. <S> Adding more batteries in parallel won't cause the motor to draw more current because the voltage remains the same as before. <A> Adding another battery in parallel would allow the resulting battery to provide more current as the load increases. <S> It can allow the motor to produce a higher torque if the engine's winding resistance is much lower than the internal resistance of the battery set. <S> It also has been mentioned that adding a battery will allow a longer run without battery replacement under the same load.
| If there isn't enough current and you add a battery, you can expect increase in torque because the voltage supplied by the batteries will be higher.
|
How to place a 7805 voltage regulator on a breadboard? I have this breadboard and I have started experimenting with pic micros. In doing so I have needed a 5 volt power supply. I have seen several tutorials for wiring up 5 volt regulator circuits on a breadboard, however when I try to hook up the 7805 on the breadboard, the 7805 will not fit on the breadboard. With extra force I can force it on the breadboard, but I assumed this would damage the breadboard. What is a common solution to this problem? <Q> If you look carefully at the data sheet drawings, some have wider leads than others. <S> TI LM341/78M05 <S> Fairchild LM78M05 <S> A typical maximum diameter for a solderless breadboard is 0.91mm (AWG 19),so the Fairchild part will be too big, whereas the TI part will probably fit fine. <A> You could solder #22 or #24 wire to the 7805 leads, then poke those wires into thte breadboard. <A> You could try using a blank piece of protoboard or perfboard like Peter suggested, and solder up some standard spaced headers ( https://www.sparkfun.com/products/116 ) to the regulator, then use that on the breadboard. <S> Those headers should easily fit into the breadboard. <A> I wouldn't put them directly on a breadboard since it might be damaged due to the too thick pins of most TO-220 components. <S> Instead, use a male-female pin header. <S> You can easily stuck a 3 pin 7805 in a pin header (with a bit of force) and place it easily in a breadboard. <S> This way the breadboard does not get broken and a pin header is very cheap in case you damage one. <S> You can buy them even in 3 or 5 holes width so they fit perfectly. <S> I also tried a 5 pin LM2576 HVT and after bending the pins and checking the conductivity with a digital multi meter I can confirm it works fine too. <A> Just twist the three legs of the regulator (90 degrees) using pliers. <A> I just plug them in. <S> Here is a photo of a 7809 taking in 12V with a .1 uF electrolytic on the input, <S> then a non-electrolytic .33 uF <S> across gnd and Vin of an Arduino Nano. <S> Due to the pinouts of the 7809 the closest yellow wire bridges the gnd between the 7809 and the Nano gnd pin, and the cap is right at the Nano itself. <S> Nice, stable circuit that doesn't have any trouble with doing analog readings. <S> (I measure the voltage on Vref for the equations)
| Alternatively, build the voltage regulator on some perfboard (or just solder things together in mid-air), rather than trying to put the 7805 on the plastic breadboard.
|
How to tell the lumen output of these LED's I'm trying to build a light fixture for my aquarium, but I'm having difficulty understanding the various way manufacturers represent light output. I'm trying to compare the output of CREEXPE-ROY-3 and CREEXTE-ROY-3 and I am just completely lost. How can I figure out the lumen output of these LEDs? Assume they are both driven at 350mA (per LED). <Q> Luminous Flux is the measurement you're looking for, and is measured in lumens. <S> Looking at the pages you've linked: <S> The XP-E shows a luminous flux of only 425, while the XT-E has a luminous flux of 550. <S> Luminous Flux is measured using an integrating sphere, so it is the actual total light output of the device under test. <S> So to answer your question specifically, the XT-E is capable of more light output than the XP-E. <S> This also matches well with current consumption, where the XT-E consumes 1.5A at its rated output, while the XP-E consumes 1A at its rated output. <S> I expect that both would have similar brightness at the same current, so if you were to feed them 350mA(ie, about 116mA per discrete LED in the module) then you can probably expect to see very similar light output between the two modules. <S> If you're going to run them under current though, I'd suggest simply buying lower light output LEDs - they'll be much less expensive. <S> If you can explain what you're trying to optimize - be it brightness, efficiency, cost, etc then we might be able to provide better guidance. <A> Between 62lm and 114lm per led. <S> I could not find numbers for this array module. <S> Source: page 3 of the datasheet <S> The max efficacy of that series is 148lm/W at 85 degrees C. <S> If you put in 1 watt, you should get 148 lumens out. <S> Half a watt? <S> Half the lumen output. <S> This is dependent on at least temperature and chromaticity. <A> A Luminosity Function [1] is used to convert from radiant flux to luminous flux for a given wavelength. <S> You can convert a spectrum diagram from radiant flux to luminosity, incrementally taking points on the curve, multiplying each point with the corresponding value from the luminosity function and integrating the interpolated data over the wavelengths. <S> The Luminosity Function has its peak in the green band, because that appears brightest to the human eye, so a blue LED has much less lumen than a green one of the same radiant flux. <S> Depending on your goal, lumen is not an appropriate measure for the light. <S> As noted in a comment, lumen is an indicator for perceived brightness, not actual brightness (radiation power). <S> The meassure used in Biology is Photoactive Radiation (PAR) and only found in datasheets for lights advertised specifically for horticulture. <S> Plants don't care for green, they cannot absorb it. <S> That's why they appear green. <S> Blue LEDs still seems to be easier to manufacture, because generally LEDs with blue or white with high blue output are the best in comparison for efficiency and cost.a white led has less peak radiant flux per wavelength than a single color of the same wattage, less dramatic difference in overall efficiency. <S> thats just something to keep in mind when mixing white and color LEDs. <S> Interesting enough, white LEDs are far from useless for plant growth. <S> a "white" LED emits a discontinuous spectrum that is mostly red and blue, more so if the Color Rendering Index is low. <S> [1] https://en.wikipedia.org/wiki/Luminosity_function <A> Answering only part of the question, and 6 months after it was asked, as the answer was not clear overall. <S> Reading the answers and comments the information is provided but is easily missed. <S> Higher power LEDs at the blue (short wavelength) <S> end of the visible spectrum are not rated in lumens per Watt (or in lumens) but are instead rated in mW (milliWatts) of light output. <S> This is because lumens are weighted according to the sensitivity of the average human eye, and eye sensitivity is very low towards the blue end of the spectrum. <S> While results in lumen could be provided they are so low that two LEDs with significant differences in output may have ratings different only by a few lumens. <S> As people are used to lumen differences for LEDs with lumen outputs of around 50-150 lumens/ <S> Watt, the very low absolute lumen figures would produce comparative results which SEEMED incorrect. <S> So, the various comments talking about typical lumen/Watt figures for the LEDs concerned do not apply at the blue end of the spectrum.
| A given light, of course, may appear brighter than another with higher flux depending on optics and observer location, but as far as measuring the total light output, luminous flux is the measurement to use.
|
Why a Transistor is considered to be an active device? How it a Transistor an active device? Because it it not producing energy. We just feed it with energy and it amplifies it and that too not on his own but using a bias battery. So how it is considered to be an active device? Please can anyone provide full explanation? <Q> There are three(*) <S> common ideal passive devices: resistors, inductors, and capacitors; the behavior of each establishes a precise ratio between voltage and either instantaneous current, the derivative of current with respect to time, and the integral of current over time. <S> The behavior of a typical real-world resistor, inductor, or capacitor may be very accurately modeled as a combination of resistors, inductors, and capacitors wired together in some fashion. <S> (*) <S> Some people argue for the existence of a fourth type of passive component, a "memrister", whose behavior would establish a ratio between the integral of voltage over time and the integral of current over time, but unlike the other ideal passive components which are well-approximated by real-world counterparts that don't require an outside power source, no memrister has been constructed that can come close to achieving that. <S> As for why transistors are considered active, it's because they're not resistors, inductors, or capacitors, and they do not establish a ratio among voltage and current, its derivative, or its integral <A> Active component doesn't mean it can produce energy. <S> It means the device needs energy to work <S> and it can manipulate the given energy to the output. <A> That does not matter if it uses biasing to amplify input or not, the main thing here is that i can amplify the input. <S> see you cannot carry such operation with resister or inductors <A> Thus, transistor is an active device. <S> Note that active device doesn't mean it just produces energy. <S> All active devices control the flow of electrons through them. <S> Some active devices allow a voltage to control this current while other active devices allow another current to do the job. <S> Devices utilizing a static voltage as the controlling signal are called voltage-controlled devices. <S> Devices working on the principle of one current controlling another current are known as current-controlled devices. <S> BJT is current controlled, while FET is voltage controlled active device. <A> In my understanding, MOSFETs or other active devices are called active because there are "sources" in their calculation models, a VCCS in small signal analysis for instance. <S> Passive devices, however,do not incorporate any source.
| Basically, An active device is any type of circuit component with the ability to electrically control electron flow (electricity controlling electricity).
|
Permanently dimming an incandescent light bulb I have purchased a nice light bulb with long visible wires/resistors and plugged it in, on the ceiling. It burns too bright without a dimmer and does not look as intended (also the lifespan decreases). I would like to permanently dim it . However the light switch does not have enough space inside it for a full dimmer, though I can fit something smaller. I was thinking of connecting a big resistor serially to the bulb. Is that a good idea? I was thinking around 2 KOhm, as I figured that is the typical lightbulb resistance and therefore it would halve current. What is the difference with the 0.1W and the 50W ones? Can either take the 220V we have over here? Would it overheat closed inside the switch hole? Am I talking nonsense and should I go back to reading my uni books again? <Q> I am going to assume it's an incandescent bulb of the "artistic" type with interesting filament structure. <S> If it's an LED or CFL bulb, the below comments do not apply. <S> The behavior is not linear because the light bulb proportionally sucks more juice (technically speaking) when the tungsten filament is not running at full temperature. <S> There's no way to adjust the brightness, so it's either acceptable to you or not. <S> The diode part number would be different depending on the bulb wattage, but a 1N4007 should work for anything up to 100W or so, and a 1N5407 for about any bulb you'd be likely to use. <S> Be prepared to occasionally replace the diode after the bulb blows- <S> the symptom would probably be the new bulb operating at full brightness. <S> There's less chance of that happening with the 1N5407. <S> They're less than 50 cents each. <S> If you have a bunch of them, you could install them in random orientation (which end of the diode goes to which side of the power) to be nice to the power company. <S> Note <S> : I have no opinion on whether this is acceptable to fire, insurance or other codes and regulations in whatever 240V country you're in. <S> Electronically it will work. <A> Well, a light bulb is a purely resistive device and if you think a series 2 kohms would fit the bill for reducing its brightness to the right level then it's worth considering using a capacitor instead. <S> To get the same reduction in current you'll probably need between 2 kohms and 3 kohms and the capacitor value would be: - C = <S> \$\dfrac{1}{2\pi <S> f <S> \cdot <S> 2500}\$ <S> Where f is 50 Hz and 2500 is the nominal impedance. <S> This works out at about 1.3uF. <S> So, try a 1uF capacitor rated at 250VAC <S> (if that's your AC voltage) and see if it works. <S> Using a capacitor means it won't generate hardly any self-heat at all. <A> My application requires reducing the lumens of a 7.5 watt, 120 volt, 60 hertz incandescent indicator bulb to a low and a very low level of illumination. <S> One 3.5 uF polypropylene capacitor (250 VAC) in series with the light bulb reduces its brightness to a low level. <S> Two 3.5 uF polypropylene capacitors in a series reduce the lumens to a very low level. <S> Placing a good ampacity SPST switch across the terminals of one capacitor <S> allows me to toggle the night light indicator bulb between the two low illumination levels. <S> This has become a very satisfactory and inexpensive solution for part of my product line. <S> [For safety's sake, do not use a cheap switch which will arc excessively due to the capacitors stored energy.] <S> J. David Carls
| It's possible to connect a silicon diode in series with the bulb to permanently dim it. Also remember to take care when making this modification as it is dangerous.
|
Is there any disadvantage to changing trace width in the middle of a trace? Say I have a trace running across a board. It's 50 mils the majority of its length, but in one short place it narrows to 25 mils to make it through a tight area. As best I can tell, this will be preferable to a 25 mil trace the same length, and only slightly inferior to a 50 mil trace without the few percent of its length narrowed to 25 mils. Is there any disadvantage to the narrowing? Odd high-frequency effects? EMI? Obviously traces have many possible uses, including delivering power, carrying signals of different frequencies, grounding... so under what circumstances will this matter? <Q> Yes, but these disadvantages may be negligible. <S> Disadvantage 1: High frequency signals encounter a discontinuity. <S> I would start worrying at a few hundred megahertz because the change in trace width changes the characteristic impedance (not just dc resistance) of that line. <S> Disadvantage 2: Voltage drop (and increased power dissipation) due to higher trace resistance. <S> If the decreased-width percent of the trace is less than 10%, I wouldn't worry. <S> All of these effects can be calculated for your potential design, however. <S> Here's an online tool that helps estimate trace resistance <S> Here's a downloadable tool that has a lot of built-in equations <A> For one thing, many PCB layout programs will allow, or automatically incorporate, "necking" of traces due to unconnected pads or keep-out areas. <S> This is a reduction of trace width for a portion of the trace. <S> There are some concerns with such trace width reduction: <S> If the reduced trace width is over an extended distance, then the increased resistance of the narrower trace will give rise to more heat, and will dissipate generated heat less easily, than the wider trace. <S> For brief neck sections, this is not so much of a concern, as the heat gets conducted out to the wider traces on both sides of the neck. <S> The narrowest trace width is the one determining how much current can be borne by the trace. <S> If the narrow trace is still wide enough, then for moderate signal frequencies it isn't a major problem to have the trace equally narrow throughout, instead of having wider sections at all. <S> Signal impedance and signal reflection issues as pointed out in comments and other answers - specifically for higher frequency signals. <A> If your are dealing with high frequencies ( around 100 MHz and above ), it will definitely matter. <S> The change in trace width will be seen as a discontinuity, causing mismatch and ultimately resulting in unwanted reflections. <S> You will see its effect on the timing edges and hence the digital I/O levels. <S> EMI would depend upon the layout routing and the isolation ( or rather lack of adequate isolation ) between adjacent traces. <S> Stripline Vs Microstrip. <S> For low frequency operations, the major factor to take cognizance is the amount of current carried by the trace and heat. <S> From the data you provided, using 50 mils trace...it seems like you are planning for a high current application. <S> For a standard FR4 1 oz copper, 20 mils is good for 1A ... <S> stripline routing . <S> Others sometimes use thick traces for robustness in production.
| The safe current carrying capacity of the trace is determined by the narrowest section of the trace. The discontinuity changes scattering parameters, creates harmonics, reflections, and other headache-inducing problems.
|
How to modify DS1307 RTC to use 3.3V for Raspberry Pi? I bought DS1307 RTC but it is 5V so it can't be connected to the Pi. I know it can be modified to use 3.3V by removing 2 resistors. This sensor is different than the adafruit kit so I am not sure which resistors to remove. It also has 2 sets of pins. What are the extra pins for and which should I use and which pins do I remove? Here is the image of the RTC: Here's the datasheet for the DS1307 RTC . <Q> In order to make it work with 3.3v lines you have to remove the two pull-up resistors connected between SCL->5v <S> and SDA->5v and then use 3.3v pull-up resistors on the MCU side (unless they are already integrated). <S> Your RTC connection pins are on the right side (P1 header) <S> I finally managed to find a schematic here <S> The pull-ups for the RTC I2C lines are R2 and R3 <S> According to the schematic and the comments in the reference site, the SCL and SDA lines of both headers are interconnected. <S> There is also a DS pin (one in each side, interconnected), it is currently unused but is intended for the 1wire signal of a DS18B20 temperature sensor which can be added on the board in the three pads located in the left top side. <A> short pins where r6 were placed solder the crystal to the pad below it <S> (optionally) remove the 24C32 I2C memory chip (the one one the right) <S> connect SDA/SCL/GND to the RPi corresponding pins, connect the Vcc pin to the 5V on the RPi. <S> Here's the pinout of RPi . <A> Alexan_e 's accepted answer is not a good solution. <S> Having 3.3V I2C lines on the 5V DS1307 makes it operate out-of-spec. <S> (Powering the DS1307 from a 3.3V source is even worse.) <S> A better solution is to swap the DS1307 for the pin-compatible NXP PCF85263A. <S> The latter can operate from 1.8V, is superior to the DS1307 in every aspect, and costs less than a dollar (less than a third the DS1307's price). <S> You can find a comparison between the two here . <S> Note: the RTCs are hardware compatible, but you'll have to modify your software. <A> I have the exact same module and it works just fine with the 5 Volt pins on the Banana Pro which is pin-compatible with the Raspberry Pi. <S> Pins 2 and 4 are 5 Volt.
| In order to make these modules to work good with Raspberry Pi and CR2032 (non-chargable) battery, you need to: remove diode and ALL resistors In the board I see four 332 (3k3) resistors which are definitely the pull-ups, just locate which two connect to the relevant I2C pads, it shouldn't be difficult with an ohmmeter.
|
Is there such thing as a PWM Transistor? I have a 7-channel RC receiver that outputs PWM at 5V. One of the channels is controlled by a simple switch (on/off) on the transmitter. I'd like to use this switch to control a 24V device. The problem is that this device only accepts binary input (no PWM). Even when the PWM is considered "off", there is still that little spike on the oscilloscope, and "on" just has a wider spike (which, as far as I know, is how PWM is designed). Is there such thing as a transistor or transistor-like device that can interpret a PWM signal and open/close a "collector" and "emitter" based on the width of the pulse in a PWM signal? Disclaimer: I am not a professional electrical engineer. There may be a simple answer in front of me that I'm not aware of. If I'm not providing enough information, let me know. <Q> A PWM with 0% period should be completely off, no spikes. <S> A simple ADC could help with PWM to Digital. <S> The problem is that while your RC receiver says it's just PWM, it is not. <S> It's a specific protocol that works slightly different. <S> Essentially, it is a PWM signal with 1ms to 2ms pulses at 50hz. <S> A centered pulse is neutral. <S> Even with a push button and not an analog stick, the protocol stays the same. <S> I highly doubt there is a transistor that does what you want <S> , you would need a custom design or a microcontroller to do what you want. <S> Simple enough to do, read an analog input, determine what the pulse length is, and output to a digital pin the state. <S> This question is about reverse engineering a product that does just that: Nano Electric Receiver Switch - Circuit Components <S> You may want to read it hint hint <A> Here's my understanding of the question and the requirements: <S> This could be because: The "PWM signal" output is set to, or only provides, a hobby servo control signal, as described in the answer by Passerby <S> The PWM signal does provide a full range PWM duty cycle, or can be configured to do so, i.e. a DC motor speed control output mode, which many RC ESCs support, however the lowest duty cycle value is not true zero, but a brief spike. <S> The requirement appears to be either: <S> The 24 Volt device is desired to come on whenever the PWM duty cycle is non-zero <S> The 24 Volt device should turn on when the PWM duty cycle passes a preset value, say around 50% duty cycle, with the exact threshold being non-critical. <S> First step: <S> Examine whether the RC receiver supports different output modes for servo control and DC motor speed control - possibly on different pins. <S> If yes, switch to the motor speed control mode. <S> If not, consider getting a different receiver that does. <S> Second step: <S> Once DC motor speed control is enabled, use an RC filter at the input to simply filter out any spikes smaller than the desired "Switch it on" duty cycle. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The above circuit has the added advantage of allowing the target load to be switched even if the ESC concerned only supports servo control: One would have to tweak the potentiometer and capacitor values to achieve triggering at a suitable servo threshold. <S> No simple formula can be determined, as RC servo signals can vary widely in their clock speed, since the RC servo is concerned only with the pulse on duration, between 1 and 2 ms, typically. <S> Clock speeds can vary from as low as 10 Hz (newer digital RC servos) to 100 Hz or higher. <A> The reply by Anindo is great, and this circuit works except one small change. <S> I added a low-drop diode to the input, as my receiver was setting line to 0 and thus discharging the capacitor through relatively low input resistor. <S> The non-zero-wide pulse is not a glitch <S> , that's by design of r/c protocol (there are 8 slots within 20ms interval, each pulse is from 1 to 2 ms (from 0 to 100% respectively) wide and there are 0.25 ms gaps between pulses. <S> Longer gap denotes next sequence. <S> The receiver basically splits this PPM signal with a counter IC into 8 channels.
| There is an RC receiver that outputs a PWM signal, but apparently not a perfect one, as it generates a brief pulse even for a zero PWM value. This is not how PWM is designed, it is probably a glitch.
|
How to make a voltage multiplier of 1.075 I have an 80v power supply that's rated to put out 18 amps, and I'm planning on using it to charge an 80v battery pack. Unfortunately the pack's charge voltage is 86v, so what I'm wandering about is how to make a voltage multiplier that can multiply the 80v by 1.075, I was looking at making a Charge Pump but I don't know how to make anything other than a doubler, http://en.m.wikipedia.org/wiki/Charge_pump any advise welcome. Thanks <Q> You already have an 80V power pack and all you need is another 6V at approaching 18A. <S> This 6V could be produced by an isolating flyback or forward converter powered from the 80V supply. <S> Because the output will be isolated, it can be wired in series with the 80V to make 86V. <S> So, 80V feeds an isolating forward/flyback converter that generates 6V dc. <S> This output is then wired in series with the 80V to make 86V to feed your battery pack. <S> The problem has simplified to trying to find a 6V near-18A isolating converter. <S> You could of course buy a 6Vdc power supply that is fed from AC - providing <S> this has an isolated output, it can also wire in series with the current 80Vdc output. <S> I had a quick look in Farnell and they have a small 6V 20A isolated brick <S> but it runs from 36V to 75V <S> so it's a few volts short but maybe use a buck converter feeding it that lowers the 80V to nominally 48V: - <A> It is not mentioned in your question any awareness of the safety issues associated with charging batteries. <S> You might be able to get away with "brute force" 86V for a lead-acid battery. <S> However, if it's NiMH, LiIon or other more sophisticated battery technology you must be very careful to follow the required charging profile and monitor temperature, voltage and current. <S> An 80V battery pack is going to have many cells in series, and that adds another level of risk if you're not monitoring each individual cell temperature and/or voltage. <S> If you've already taken that into consideration, that's great. <S> Otherwise, there is a non-trivial risk of burning down the lab... <S> If nothing else think what that would do to your project schedule. <S> It is conceivable that you could use the external reference to increase the output voltage. <S> It depends on the capability (absolute maximum rating) of the supply. <S> But you cannot simply set a lower voltage on the feedback -- think of how an op-amp behaves open-loop <S> -- so you will need to design and tune a control loop. <S> There may not be enough detailed information about the power supply to do this except by trial and error -- and there again is the risk of letting the smoke out. <S> If you have the experience to know what you're doing, I wish you the best of success. <S> Otherwise, please reconsider, or at least find some local hands-on help from someone who does have the experience. <S> Good luck! <A> It is often easier than crafting converters, though it voids warranty. <S> Normally, there is some tolerance in ratings of the components in power supply units. <S> The tolerance is about 10-20%, however it might be zero or negative for cheap PSUs <S> :)). <S> 8% should be okay for a good PSU. <S> Check the ratings and do it on your own risk, though. <S> Just use thick enough wire (>2 mm2 in your case) and make sure it is connected to the right winding. <S> The polarity matters, wrong polarity would decrease the voltage. <S> If it is a switching power supply, you can try adjust the voltage. <S> Normally it has a voltage divider that is used for a feedback loop. <S> The voltage that comes from the divider is then compared to a reference (normally few volts) and used to adjust the power delivered to the transformer. <S> If you increase the resistor in the high part of the splitter by 8-10 %, the output voltage will be about needed 86V. <S> In switching PSUs there might be a potentiometer used for final tuning of the PSU at production. <S> In this case, the adjustment can be made with a screw driver. <S> If you have no clue about transformers, voltage dividers etc, then the safest way would be to get a proper PSU. <S> Your 1.5kW PSU can be quite dangerous if you do something wrong with it... <S> UPD. <S> With external voltage feedback, i guess, one could do the trick. <S> 6v Zener diode inserted into the feedback line would increase the voltage. <S> Of course careful testing is required. <S> PS I fully agree that if you are not 100% sure what you are doing, it is better to get a proper PSU.. <S> Fireworks for 4k$ might be too expensive...
| You can try to tweak the PSU to get needed voltage. If it is a transformer power supply you can try adding few more turns to the secondary winding of the transformer and connect them in a series with the existing one.
|
Control the hardware of an old phone using a Raspberry PI I have a very old phone (60 years old) and I want to control its part using a Raspberry PI: Microphone & speaker from the head set The bell The dial wheel I have the electric circuit but don't recognise all of the parts. My question is now how I can achieve the following using the Raspberry PI: Detect the signal from the dial wheel Ring the bell Use the microphone and the speakerphone from the headset Detect when the headset was liftet from the hook Additionally I don't understand all parts in the circuit: e.g. what is this Pulse Icon is with the caption of 100 between 2 and 6 Update I tried to decipher the circuit in order to be able to use the hardware of this phone. I used blue for the German color codes of my cables and green for the connectors: simulate this circuit – Schematic created using CircuitLab On the phone I have the following connectors: M1 : Microphone (red) M2 : Microphone (pink) T1 : Speaker (dark green) T2 : Speaker (light green) a : Phone line? b : Phone line? E : Phone line? W1 + W2 (bridged) W3/1 : green cable connected n times with red through J when dialled 2 : red 3 : blue 4 : yellow 5 : white Update 2 : It sais 300 Ohm - 7000 W - 0.13 Ku Em on the two coils, which are used for the bells. This is the acutal phone on the inside. <Q> Take a look at this: https://www.sparkfun.com/tutorials/51 . <S> They reverse engineered a rotary phone similar to yours. <S> If you want some more detailed answers, you're going to have to explain exactly what you don't understand about the schematic. <A> In order to control a telephone set like this you will probably need to "deconstruct" it down to its essential functional components. <S> Each of these components will then be easier to deal with than trying to use the set as a whole in the original way it was meant to be connected to the two-conductor telephone system. <S> "Deconstruct" means unwire the whole thing and just use the earpiece on its own, the dial one its own, the mic on it's own, etc. <S> The dial is simply a cam driven switch. <S> Put an ohm meter across its wires and you will be able to see it operate. <S> You dial a "1" <S> you get one pulse (switch contacts open and close), you dial a "2" <S> you get 2 pulses. <S> The "0" gives you ten pulses. <S> The headphone is usually a magnetic coil arrangement with an impedance of 300-600 ohms. <S> You can drive this from a simple sub-1-watt audio amplifier. <S> Don't worry about the impedance mismatch, these things were poor audio quality! <S> The microphone is a carbon mic and requires that you pass a DC current thru it to get an AC voice signal out of it. <S> If you hook up a AA battery and a 470 Ohm resistor in series with it and connect an O-scope between the resistor and mic you will see the voice signal. <S> The bell is probably the biggest challenge you will face. <S> It takes a lot of voltage at a certain frequency to get it to ring properly. <S> The bell coil assembly is mechanically resonant at a certain frequency. <S> So you need to drive it at that frequency (usually around 30 Hz) to get it to sound properly. <S> Originally, the telephone systems ran on 48 VDC, so that's what the bell was designed for. <S> You may get away with a lesser voltage if you get the drive frequency correct. <S> You'll have to experiment a bit with a signal generator and a beefy audio amplifier to determine the correct frequency to use. <S> There were a number of standard frequencies, but they were all between 20 & 50 Hz. <S> You want to find the frequency at which the bell sounds the loudest. <S> Because that is the resonant frequency of the coil mechanism, that will also be the frequency which requires the least energy ( volts and amps) to drive it. <S> Good Luck! <A> For generating the ring, there are special high-voltage ICs designed just for this task. <S> One example is the Supertex HV430 . <A> Personally, I'm horrified by the amount of suggestions to break the excellent piece of phone classic. <S> People pay good money for this things. <S> :) <S> One more constructive approach is to hook up the phone in question with a special adapter, like those listed here: http://www.voip-info.org/wiki/view/Dial+Pulse+to+Touchtone+DTMF+Converters <S> (VoIP adapters that can run pulse dialing phones directly, also exist: http://www.oldphoneworks.com/xlink-cellular-bluetooth-gateway-bttn-version.html ) <S> The resulting DTMF-compatible line can then be hooked to a small and cheap VoIP box (plenty of those around); in turn, VoIP box can be trivially controlled over the network by any sort of scriptable SIP server (including recording and remote control purposes, not necessary telephony). <S> One popular and very scriptable option is good old Asterisk: http://www.raspberry-asterisk.org/ <A> Your best bet is to modify the phone itself into component parts, and attach each element to an appropriate circuit driven by the Raspberry PI. <S> The bell will need about 90VAC 20Hz to ring. <S> The microphone and speaker should be obvious. <S> The dialer and hook can be left together and connected to another input which you'll have to monitor for dialing pulses and hook events. <S> If you cannot modify the phone, what you need to do is build an FXO (foreign exchange office) interface. <S> It will probably be easier than building an entire interface yourself. <S> A compromise between completely modifying the phone and using an existing external interface would be to disconnect the dialer from the circuit, and add a pulse to tone conversion circuit inside the phone. <S> This would not only enable you to use an off the shelf FXO to USB interface, but it would also allow you to connect the phone, as-is, to any modern telephony network. <S> Building the entire interface yourself isn't that hard, though. <S> It's just that the phone combines 5 functions on two wires, and you're essentially building 5 different circuits to handle each function. <S> It would be best if you broke this question up into several more questions for each function (perhaps combine the speaker and mic into one question).
| You could add a small circuit in parallel with the phone to monitor the line and catch the dialing separate from the FXO interface. There are several existing FXO<-->USB adaptors on the market, most fairly inexpensive, which will do everything you need except the dialing.
|
Where do I adjust forward voltage on LED I am learning basic electronics with iCircuit. I have build a very simple circuit with just a 5V battery and a LED connected in series, as seen in the image attached. There is an option called "Fwd Voltage @ 1A" which I do not understand. The normal forward voltage drop for LED is 1.7V - then what does it mean if I enter "1.7V" in this field? Do I automatically add enough resistance in the circuit to limit the voltage across the LED to be 1.7V? How do I adjust the "Fwd Voltage @ 1A" in real circuitry, or is that something rated/fixed on the LED? <Q> Like any diode, the relationship between current and voltage in an LED is not linear, then it is common that the manufacturer specifies a certain voltage at a certain current, in tabular form, or by means of a graph. <S> In the real circuit, the design parameter is the required brightness . <S> With this value, the current required is determined. <S> For an ordinary LED, 10 mA is a normal operating current. <A> The forward voltage is a a characteristic of the LED - not something you can change. <S> The forward voltage depends mostly on the colour of the LED. <S> To calculate the current-limiting resistor, you subtract the forward voltage from the supply voltage, and use the resulting voltage in Ohm's Law to calculate the resistance. <A> For an actual diode, you would look up the forward voltage drop on its data sheet, like this one , for example. <S> The value is given in the table of electrical characteristics; also provided is a graph showing how the forward drop varies with the forward current. <S> Given the desired brightness, you would determine (Figure 3) <S> the corresponding forward current, and look up (Figure 2) <S> the forward voltage drop at this level. <S> Knowing the supply voltage, you can select a series resistor that will provide the required forward current.
| The voltage drop over the diode is set based on the current level.
|
Violation of conservation of energy? Say I have a parallel plate capacitor that has a vacuum between the plates and has electric energy U. If I then add in a dielectric between the plates while the capacitor is charged, the electric energy increases since the dielectric constant increases. But where does the additional energy come from? Doesn't that violate conservation of energy? I understand that the energy is increased because the permittivity of the dielectric increases, but doesn't it still violate conservation of energy? <Q> We're assuming the charge \$Q\$ is constant (the capacitor is not connected to anything). <S> The energy is less with the dielectric inserted, by a factor of 1/\$\epsilon_R\$, since \$U = <S> \$ <S> \$Q^2 \over <S> {2\cdot C}\$ and \$ <S> C = <S> \$ \$ <S> C_0 <S> \cdot <S> \epsilon_R\$ <S> It does not go into dielectric absorption, the energy decreases even with a perfect dielectric. <A> Firstly, you have your conclusion backwards regarding how the energy changes when you increase the dielectric constant, AKA permittivity . <S> For an ideal parallel-plate capacitor the capacitance is: $$ C = <S> \frac{\varepsilon <S> A}{d} $$ <S> If you insert a material between the plates with a higher permittivity (\$\varepsilon\$), then capacitance goes up . <S> The energy stored in the capacitor (\$W\$) is: $$ W = {Q^2 \over C} <S> $$ <S> If we are assuming charge (\$Q\$) is constant because the capacitor isn't connected to anything, then as capacitance goes up, stored energy does down . <S> $ <S> $ W = \frac{Q^2}{\frac{\varepsilon <S> A}{d}} = <S> \frac{Q^2d}{\varepsilon <S> A} \\\lim_{\varepsilon \to <S> \infty} <S> \frac{Q^2d}{\varepsilon A} = <S> 0$$ <S> So let's just reverse your question: what if the capacitor has some relatively high permittivity dielectric in it, then you remove it? <S> Now the energy stored in the capacitor increases. <S> Where's this extra energy come from? <S> The answer is simple: from the work you do removing the dielectric. <S> If the dielectric is a sheet of something that you could pull out from between the capacitor plates, you would find that it's attracted to the plates, like a magnet. <S> Of course it's not magnetic forces causing this attraction, but electric forces. <S> If you don't lose energy to anything like friction, all the work you did removing the dielectric from the capacitor <S> remains available as the attraction of the dielectric back towards the space between the capacitor plates. <S> That is, if you let it go, it will be sucked back into place, and everything will be as it was before you started. <S> This attraction of the dielectric to the capacitor is a potential energy . <S> It might help to realize that as you remove the dielectric, the capacitance decreases, and the voltage must then increase. <S> Since the charge is held constant, but this same charge now has a higher potential difference (voltage), there's more energy in the capacitor. <S> The quantity of charge is the same, but by decreasing the permittivity you have separated the charge more. <S> This takes work, like stretching a rubber band. <S> It might also help to think of this system in terms of something more familiar, like magnets. <S> Say you have a horseshoe magnet, with an iron bar across the poles. <S> When you pull the iron bar away, the energy stored in the magnet's field increases, and you put the energy there by pulling the bar. <A> The energy decreases. <S> If K is the dielectric constant and U_0 is the original stored energy then <S> after insertion the energy is U = <S> U_0 <S> /K. <S> Assuming K > 1, the energy has decreased. <S> The energy is lost to rotating and separating the molecular dipoles in the dielectric material so that they line up with the electric field. <S> Heat energy will dissipate from this aligning process depending on how strongly the molecules interact.
| You can extract mechanical energy from the dielectric insertion operation (it's pulled into the gap), and that is where the energy goes.
|
How to drop 6 volts to 5 volts I am designing a robot using the PIC16F877A microcontroller that will avoid walls and obstacles. I plan to have it run off of 4 AA batteries. I was wondering how i would convert the 6 volt input voltage to the 5 volts that the pic needs. I need to use 6 volts because the h bridge circuit/the motors that I am using require it. I also need exactly 5 volts, because i need a 5 volt reference voltage for my ADC and to run my sensor off of. Using two batteries is an option, but I would hope to avoid at all costs. Finally SMD products won't work, because I would like to build this on a breadboard. I did ask a similar question here How to get input voltage of 5 and 6 volts but my needs have changed since then and the answers wont fit my problem. How would a normal project overcomethis problem. <Q> The actual voltage available from 4 x AA alkaline cells would vary widely, between 6 Volts for fresh batteries with no load, to as little as 0.7 <S> x 4 = 2.8 Volts under load or as the batteries deplete. <S> The voltage could fall further, but it is convenient to select 3 Volts as a lower operating limit. <S> Most SEPIC converters these days appear to be available solely as SMD parts, which the question precludes. <S> Therefore, an alternative solution is to use a pre-built SEPIC module that can be plugged into a breadboard. <S> For example, this module on eBay (US $6.85 with free shipping) offers to 0.5-30 Volt adjustable output, from a 3-15 Volt input supply: Searching your preferred vendor site <S> would yield many other such options. <S> Note , though, that realistically the battery voltage will drop significantly the moment the motors are turned on: AA cells have a significant internal resistance, which causes this voltage drop. <S> The options are to use a LiPo / LiFePo4 battery instead, or use lithium non-rechargeable (primary) high current cells. <S> The SEPIC module above will work with those as well. <S> It is also worth verifying whether the H-bridge / motor actually requires 6 Volts to operate: If this is a hard limit, then 4 x AA will not be viable anyway, so see the above alternatives. <A> There is a nice solution that requires a slightly larger battery holder. <S> There are 4 cell holders on eBay for Ultra Fire Li-ion 18650 type batteries. <S> These are 3.7V each and <S> 5000 mAh - the Ah rating is a little ambitious but they come close on applications that do not draw high current. <S> 4 cells will give about 14.5 volts freshly charged and 11 when nearing exhaustion. <S> What so much? <S> Use a high efficiency DC/DC converter to get your 5V. <S> I use these from MuRata http://www.digikey.com/product-detail/en/OKI-78SR-5%2F1.5-W36-C/811-2196-5-ND/2259781 7V to 36V input and 5V 1A output. <S> Very cool device fits TO-220 footprint. <S> Will your motor driver really suffer from running at 5V? <S> You could tap the first 2 cells for 6 to 7.5 volts for the motor. <S> I don't see a way to use the 4 cell holder you have with typical batteries (without a DC/DC up converter). <S> They will drop too low in voltage. <A> you may try. <S> connect the 6V output to series with zener 5.6V and resistane (resistance power calculate) <S> connect your output(between zener diode) to feedback of ADC Ref terminal.(ADC <S> won't need exact 5V , you need some changes in programming)The resistor will dissipate excess voltage. <S> Connection diagram like this:- <S> (6V positive)--- <S> > resistance<--->zener5.6V>--- (6v negative) <S> | | output + -Zener diode direction is most important.
| For a requirement such as described, one solution is a SEPIC converter that will produce the nominal 5 Volts desired, despite the supply voltage changing from greater than 5 Volts to less.
|
Building a hobbyist oscilloscope I have a project that I've been thinking about for a little while, and I've come to the realization that at some point during its development, I'm going to need an oscilloscope. Okay, not a problem. Instead of purchasing an oscilloscope, I've decided that I'd like to -- at the very least -- design my own, and hopefully build the result. To make things simpler, I'm thinking about using a Raspberry Pi to do all the fun calculations and visualizations (I don't feel like implementing the FFT on an AVR, thank you very much). The more I read about oscilloscopes, the more confused I am, to be honest. Why isn't an oscilloscope just an ADC? If I were to hook up something like this (with appropriate over-voltage protection and pre-amplification) to a circuit on one end, and an appropriately-programmed CPU on the other, wouldn't that be an oscilloscope? [In the past I've only worked with simple digital circuits -- I'm mainly a theoretical computer scientist! -- and so I'm trying to wrap my head around analog electronics right now. As such, I apologize if the answer to this is extremely obvious...] <Q> At it's heart, a (digital) oscilloscope <S> is just an ADC, along with some memory to hold the samples. <S> The samples are then read out of the memory and displayed. <S> The practical implementation issues make commercial oscilloscopes complicated. <S> The input signal needs to be scaled appropriately for the range of the ADC, which means that you need to have attenuators and/or amplifiers that have very precise gain values that are very flat across a huge range of frequencies (DC to 10s or 100s of MHz at a minimum) in order to measure waveforms with minimal distortion. <S> Also, depending on the application, the sample rate of the ADC needs to be adjusted (very precisely) over a wide dynamic range — 1 ns/sample to 1 s/sample ( <S> 9 orders of magnitude) would be typical. <S> Then there's the question of knowing when to start — or more importantly, stop — sampling; this is known as triggering. <S> Different applications have different needs for triggering, and commercial 'scopes have a wide selection to accomodate them. <A> It's important to distinguish a hobby project from equipment that's ready to use, and to make the right choice for you. <S> This doesn't have to be the right choice for others. <S> If what you want is equipment to use for another project THIS year, I'd buy one. <S> Could be new or used based on your requirements and budget. <S> I wish you a fun and educational experience. <S> You'll learn a lot. <S> Likely you will encounter nay-sayers; tell them that they can save a lot of time and money on their next vacation by e.g. not going to Europe and buying a picture-book instead. <S> They are missing the point! <S> A (basic) digital oscilloscope is indeed composed of a front-end (including an ADC and perhaps trigger circuitry), an embedded computer, a display and software. <S> I will suggest that the following issues are likely to come up: Time. <S> This project will take you a while, depending on desired performance, your experience, etc. <S> Cost. <S> It'll cost more than buying one of equal performance. <S> Performance. <S> What kind of performance are you looking for? <S> Including input ranges, time resolution, how much voltage must the front end withstand. <S> Testing. <S> How will you debug it? <S> How will you check that it works correctly? <S> Safety. <S> What happens if you probe 120VAC or hit higher voltage? <A> I think you can get a few ideas from AVR 10MHz 50MS/s Digital Storage Oscilloscope . <S> It includes full schematics and source code. <S> It uses a small CPLD that reads the ADC results and fills a RAM, then it uses an AVR mcu to read the RAM data and send it to a PC <S> You may also find useful: <S> The Bitscope schematics <S> The dsonano including full schematics and source code Several DSO related projects using FPGA or mcu listed here <S> There is a block diagram in openDSO project page which should be useful to visualize the sections used in a DSO. <A> JYE Tech has a $49 oscilloscope kit : with the following features: 5M samples/second8 bit <S> resolution256 sample memory depth1MHz analog <S> bandwidth100mV/ <S> Div-5V/Div sensitivity1MΩ impedance50Vpeak-to-peak max input voltageDC/AC couplingSave and display up to 6 captures to memoryTransfer screen capture to PC as a bitmap file (serial adapter not <S> included)Backlit LCD displayFFT function available Sparkfun also carries it but for $10 more. <S> All of the surface mount components are already soldered. <S> It uses an ATmega 64. <S> They provide the schematic and parts list on their website if you want to use them an a guide to rolling your own, but I doubt if you could do that for anywhere near $49. <S> The firmware source code is also available. <S> For just $30 more ($79.50) they have an assembled unit with a 5 MHz analog bandwidth.
| If what you want is to build an oscilloscope as a hobby or educational project then by all means go ahead!
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.