source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
What decides the range of FM band? I read that the frequencies over which FM signals can be transmitted is limited between 88 MHz and 108 MHz. Why is it confined to a particular range and why specifically to this (88 MHz to 108 MHz) range? Besides FM, other communication techniques have their own band of frequencies. What decides their band of frequencies. <Q> In North America, 88 - 108 MHz is the FM broadcast band. <S> The use of frequency modulation for other purposes is not restricted to that band, however. <S> I think, as far as physics is concerned, that FM can be used on any frequency, but for practical purposes is rarely used below 50 MHz or so, as FM normally requires a much larger channel width than AM or SSB. <S> FM is widely used for two-way communications between 144 and 174 MHz (Amateur, land mobile (police, taxi, and simliar service) and marine), and on higher bands. <A> The government decides the frequencies. <S> In the United States, it's decided by the FCC in coordination with the ITU , which is the international governing body (since radio waves don't magically stop at the borders of countries). <S> There's nothing particular about FM that makes it more suited to those frequencies compared to others. <S> In fact, ham radio operators and others use FM on many different frequency bands. <S> Probably when FM broadcasting needed some spectrum, the 88 - 108 MHz was the most convenient at the time, for technological or political reasons. <A> Usually they coordinate somewhat so the same band has the same use in different countries. <A> The frequency allocations are indeed determined by a regulatory agency like the FCC or the ITU. <S> An important factor in this process is the propagation characteristics of the band. <S> 100 - 150 MHz are popular and used for all kinds of public services because they have a high bandwidth, but still retain the ability to 'bend' around obstacles, greatly increasing their coverage in broadcast situations with a single transmitter serving hundreds ( thousands ) of square miles. <S> Cellular companies were granted 800 MHz bands because they have , again , high bandwidth, but are extremely limited to line-of-site and therefore are less desirable. <S> Cellular companies used these frequencies in a cellular pattern, with each cell covering much less ( say 25 - 50 ) <S> square miles. <A> Frankly, the range is/was Arbitrary decided.
| The simple answer is the legal regulatory system; frequencies are allocated by the FCC in the US and local agencies in other countries. There is no specific reason that FM radio is only 88 to 108 instead of 100 to 120, except that we needed a block of frequencies for purpose A, while another block for purpose B, C, D, etc.
|
Is it good to ground the polygon plane on the routing layer? For my final project I have to measure multiple signals up to 10MHz with a TMS320F2809 processor which is clocked at 100MHz. I have the following layer stackup: Top Signal Ground Signal Signal Source Bottom Signal On the signal layers do I have to put a polygon plane? Is it a good idea to connect to the ground? Will it act as a capacitor between the trace and the ground polygon? According the following description on the top and bottom layer should be routed only low frequency. Which range is low frequency)(1Hz up to ?)? I tried to follow that description, but when two IC was within 1cm range I routed on the layer where the ICs are. <Q> It is not necessary to put polygon pours on your signal layers. <S> However, there are a few advantages to adding ground pours. <S> Ground pours on layers adjacent to the power plane will help with power plane decoupling for high frequency signals >500MHz. <S> Henry Ott does a good job of explaining this. <S> http://www.hottconsultants.com/techtips/decoupling.html Ground pours can be used as part of an impedance controlled transmission line called a Coplanar Waveguide. <S> here is a link to some good information about this <S> http://www.multi-circuit-boards.eu/en/pcb-design-aid/copper-balance.html <S> Polygon pours on outer layers can be used for thermal dissipation. <A> Adding a ground pour on the top and bottom can help to reduce EMI. <S> They're also required for some impedance controlled traces. <S> If you do add ground pours, make sure that they are via <S> stitched to the main ground plane (in your case, layer 2). <S> Do not have any islands of copper that aren't attached to anything. <S> Most of the advanced EDA tools like Altium allow you to control this with design rules. <A> Adding ground pours in the signal layers will help to maintaing copper balance, which is important in multilayer boards. <S> These ground pours should be stitched to ground power planes with multiple vias.
| Adding polygon pours can help balance the copper distribution on multilayer boards and will prevent bowing and twisting of the PCB during manufacturing.
|
How is 'specific' data found and taken from a Semiconductor Memory Source? In a semiconductor memory chip, each bit of binary data is stored in a tiny circuit called a memory cell consisting of one to several transistors. Volatile type. Suppose an application stored its data in a particular segment on the computers RAM. How would the CPU know what data to extract and how would it sort through the other data to get to it. If everything in its core level is 0 or 1 its hard to distinguish what purpose 'x' memory has. <Q> Typically, a memory is controlled by several address inputs, as well as a read/write control signal and some inputs that control when the read or write operation should occur. <S> Given n address inputs, <S> 2 n locations in the memory can be distinguished. <S> These are the "specific" locations that the computer is able to access. <S> Usually each location contains more than one bit. <S> It could be a byte (8 bits, or memory cells), or a multi-byte word, which could be 16, 32, or 64 bits wide . <S> If you have a megabyte of memory, with single-byte access, you will need 20 address bits (individual input signals) to control it. <S> For a gigabyte of memory, you would need 30 address bits. <S> How would the CPU know what data to extract and how would it sort through the other data to get to it? <S> Generally it's up to the programmer (if using assembly language) or the compiler (when using a higher-level language) to keep track of what data is stored at what address. <S> For example, if you write a C program with a global variable x , then the compiler will decide what location to store it at, and take care of generating instructions that access that location whenever your program needs to use <S> x . <S> If you create a local variable <S> y <S> within a function, the compiler will actually keep track of that variable relative to the value held in a special register called the stack pointer (SP). <S> Each time the function is called, SP might hold a different value. <S> But y will be created anew with each call and stored at the same offset from SP (which is kept track of by the compiler and generally not seen by the programmer). <S> A third possibility is heap allocation. <S> Meaning the storage space is allocated from a "heap" of available memory. <S> In some languages (Java, for example) the compiler might do most of the work of tracking heap memory. <S> In C, the programmer is responsible for keeping track of heap memory. <S> This is done with pointer variables, which basically encode the address where the program should access to get that particular data. <A> Unlike humans, computers have no problem with lots of 1's and 0's. <S> They do not 'think' or 'know' anything (yet). <A> You are right, it is exceedingly difficult because in general computers the memory locations have no meaning. <S> The series of bytes etc. <S> at a location can be part of a picture, to an email address, to a recipe for taco's. <S> Every thing is in context. <S> SO the program has to remember where it put specific things and what format was used. <S> If anything is even the slightest bit off there is a good chance that it will fail to complete. <S> In fact in certain computers there is no real difference in storage between code and data. <S> There is only one thing for certain in a micro-processor and that is, on start up, the processor expects that at a reserved address that there will be a code word that is an instruction. <S> Everything else is built up on top of that. <S> That is why the process of starting up is called boot strapping - it literally means, grabbing on to your boot straps and lifting yourself off the ground.
| The CPU (originally designed by humans) just follows the program instructions (written by humans) and goes to a particular address in its memory and fetches the binary data then does something with it (depending on the program instruction).
|
Why did the designer use this motor? I was taking apart this thing that I bought from the dollar store, its this glass block with an encased sculpture that sits on a revolving deck. (see photo below) The deck powers 4 LEDS with batteries, however it must be plugged in to turn. I found that the motor that was used was a AC 6V Synchronous Motor (see photo below). I have no idea why a simple DC motor could not have been used, eliminating the expense of using this motor and allowing the deck to turn on battery power. The block is not heavy, only around 480 grams. Can anyone shed some light on why this motor was used? I'm curious. Thanks! <Q> I'd say this was purely to reduce cost. <S> With an AC motor, the device can use a transformer to step down the voltage (probably a cheap wall-wart), but skip having a bridge rectifier to convert it to DC. <S> Further, AC gear motors are cheaper: <S> DC motors, on the other hand, are generally considered better for variable speed operations. <S> ( From Sinotech.com ) <S> Since this device doesn't require variable speed, the AC gear motor choice seems obvious. <S> It must have been less expensive to provide a battery clip for the LEDs than a few diodes for DC conversion. <S> (Or maybe lighting it was an afterthought.) <S> As to why the motor isn't DC and runs off batteries, I expect this is something you'd leave on for a while, and small (presumably AA cells?) <S> would not run a motor continuously for very long. <A> Without something to close a control loop, a DC motor would run at variable speed during the life of the batteries, from too fast to too slow to not at all. <S> But the synchronous AC motor runs at the desired speed ( <S> modulo being moved between 60Hz and 50 Hz countries) because it is functionally quite similar to a stepper motor driven by, and locked to, the AC line frequency. <S> I wouldn't be surprised if the batteries are in the rotating portion? <S> If so that saves the need of slip rings or inductive coupling. <A> Motors consume a lot of power. <S> Your batteries can run the LEDs a long time for the amount of energy a small motor uses in a few minutes. <S> AC motors are much more reliable than DC motors because DC motors require brushes and commutators to transfer power to the turning armature. <S> AC motors can be made to turn locked to a low fixed fraction of the power line frequency. <S> Low motor speed comes out to a lot less turns of the bearings, and therefor longer life. <S> AC motors are cheaper than DC motors for slow speeds. <S> Such synchronous motors are cheaply available as clock drives with reduction gearboxes attached. <S> Reduction gearboxes on DC motors are custom products for niche markets and are very expensive.
| AC motors are generally smaller, less expensive, lighter and more rugged than DC motors.
|
How diodes protect H-bridge DC motor driver? I don't really understand how these diodes in this circuit and similar circuits (like driving a relay circuit) protects the controller circuit from the energy stored by the inductance of the coil.I really appreciate if someone could graphically explain it. ( I mean how the the diodes block the current and etc) the second question about this circuit is the capacitor. what happens if it isn't there? <Q> The diodes in this application are not there to block current, but to allow a low-impedance path for the coils to discharge themselves through. <S> If such a path is not provided, then when the coil's supply is stopped at each cycle, the stored magnetic energy must find a path for discharge. <S> This results in the coil expressing an arbitrarily high reverse voltage across its ends till the energy finds a way to get out. <S> Result: This high voltage shows up across the MOSFETs, which die a miserable death. <S> The diodes thus provide a short-circuit discharge path, dissipating this energy as heat within the diode. <S> The capacitor's function is to act as a local energy store, to provide some of the energy required by the motor during the initial spike of each turn-on, and storing back some of the energy that kicks back onto the power rail at each turn-off. <S> Without the capacitor, the current spikes at each edge would completely need to be served by the supply rail. <S> As any supply connection will have some resistance, these current spikes thus result in voltage dips on the supply rail. <A> To supplement Anindo's fine answer, specifically, the voltage across the inductor (i.e., in this case the motor) is $$ L \frac{di}{dt} $$ <S> Thus, when current is cut off suddenly (exactly what an h-bridge wants to do, especially when controlled as a PWM), \$\frac{di}{dt}\$ gets extremely large and there is an associated very large spike in voltage. <S> The diodes protect the MOSFETs from these spikes. <A> The capacitor is there to absorb noise coming from the motor, which otherwise would mess with your power supply. <S> 100nF is a very low value, however. <S> Depending on the motor's power I would use 10uF to 100uF, but also leave the 100nF in. <A> some of the above is correct but the diodes and capacitor are there so that the back emf/inductive energy stored in the motor is sent back to the cap as a storage reservoir, the energy isn't dissipated in the diodes, without the cap there the circuit would probably destroy itself as the energy would have nowhere to go until the voltage reached a point where a discharge path was created.
| In simple terms, the capacitor smooths out the spikes due to temporary power demand and temporary power surplus, as the coils are energized and de-energized.
|
How do I protect my circuit from getting more than 3.9V from a CR123 battery? How do I protect my circuit from getting more than 3.9V from a CR123 battery? With minimum components and minimum consumption during normal operation. <Q> A CR123 is invariably a Lithium / Lithium Ion chemistry battery, which means nominal voltages of 3 Volts for the non-rechargeable Lithium cell, or 3.6 Volts for the rechargeable Li-Ion. <S> Thus, greater than 3.9 Volts is not going to happen unless the battery is a dangerously overcharged LI-Ion cell, and even then I'm not sure it is possible. <S> simulate this circuit – <S> Schematic created using CircuitLab R1 must be sized so as to not limit the current needed by the operating device - this can go to as little as 10 Ohms, since CR123A batteries from major manufacturers can typically handle quite a massive current draw anyway. <S> Even if the battery were to have been overcharged, the Zener diode's current draw will quickly bring the voltage down to nominal by discharging the battery down to Zener voltage. <A> One way is to use a battery that inherently puts out only 3.9 V or less. <S> Some common coin cells are limited to about 3.3 V, so that might be what you want. <S> If the voltage is higher and you can't do anything about that, then a LDO (Low Dropout Regulator) is probably what you want. <S> However, that will have a little drop across it, even when the input voltage is below 3.9 V. A better answer requires a better question. <A> CR123 is a lithium battery which is rated at 3V. A new battery with a light load may give 3.6V, very rarely 4V. <S> You can limit the voltage to your circuit by using an LDO regulator. <S> For 3.9V you'll have to pick an adjustable type since it's not a standard voltage. <S> If the input voltage is greater than 3.9V it will regulate to 3.9V, if the voltage is lower, the output will be near the input voltage.
| Given the above voltage limits, if one must be doubly sure and cover the unlikely case of an overcharged Li-Ion, a 3.6 to 3.7 Volt zener diode would work well as a shunt regulator to limit the voltage to within said nominal voltage:
|
Why were coax cables used for networking? Often, if older standards become obsolete, it's because they are superseded by newer technologies. In the past networking was done using coax, instead of the twisted pair used today. Why did they use the more expensive coax? It doesn't look like the twisted pair technology didn't exist back then, so technological advances don't seem to be the reason. <Q> Sure, twisted-pair wiring has existed for a very long time, mostly used to carry audio frequencies in telephone wiring. <S> That isn't where the technical advancement was required. <S> In order to compensate for twisted-pair's lossiness and impedance issues, major technological improvements in the electronics used to interface to it (such as high-speed adaptive equalizers) were required in order to make it more cost-effective than coax. <A> Unshielded twisted pair (CAT1 and CAT2 Phone cables) at the time (early '80) did not have enough performance, and coax (10Base2, 10Base5) did not require hubs (which were quite expensive then).When <S> 10BaseT was ratified (CAT3), the price of hubs (and switches afterwards) went down due to mass production. <A> The problem is not with the cabling. <S> The problem is with the relative cost of electronics versus cabling. <S> Twisted pair existed at that time, as it had been used for phone lines for a long time. <S> However, the idea of having a separate piece of hardware doing switching in the middle, using the star topology used today for twisted pair, would add cost and complexity to a technology that was already pretty complex. <S> Running a coax cable to each of the machines, and treating it like a true medium, meant you only needed to install a single network interface in each computer. <A> Unshielded Twisted Pair has existed for as long as phone lines have existed, but it was originally designed to reject noise at audio frequencies. <S> It was not designed with the correct number of twists to reject noise at the high speed digital frequencies of Ethernet. <S> Coaxial cable, however, had long been in use for various RF applications, and its properties of noise rejection at those frequencies were well understood. <S> Furthermore, existing coax could allow for interconnect distances from 0.2 km up to 0.5 km. <S> The ability to transmit over long distances without requiring an expensive repeater are crucial when wiring a large building or campus, which were their original design targets. <S> The first engineers who invented Ethernet technology simply turned to a cabling product that they knew could reliably do the job. <S> Make it work first, then worry about making it better later. <A> Twisted pair didn't exist in 'the beginning'. <S> There was thick coax ( 10base5 ) <S> later thin coax ( 10base2 ) and even later UTP/FTP/STP (unshielded, foiled, shielded twisted pair) <S> ( 10baseT, 100BaseT, 1000BaseT, 10GBaseT, ... ). <S> Twisted pair is much cheaper than coax and it allowed for a star architecture rather than a bus architecture. <S> The advantage for a star architecture is that if a cable fails (or a terminator), only one single device is impacted and the rest will keep working. <S> And administration is much simpler. <S> The installed base for UTP (structured) cabling is huge and installing cables in buildings is often a major part of the cost of the network. <S> So companies demand network vendors to keep developing equipment that can be used with the (structured) UTP cabling that is already available. <S> Today you see a move from wired network to wireless networks (WiFi), many new office buildings only have very limited datacom cabling installed, often only to central locations from where the WiFi access points (and a lost telephone) is fed. <S> Unsure <S> if the original ICS cabling for Token Ring was an early variant of twisted pair (probably was), but it was certainly thicker and had fewer leads than what we know as UTP. <A> From The History of Ethernet <S> And so on May 22, 1973 Ethernet was born. <S> After months of effort built on Metcalfe’s ideas and Boggs’ help in designing and debugging the necessary network hardware, the first working Ethernet prototype, a 2.94 Mbps CSMA/CD system connecting more than 100 workstations on a 1 Km cable, went live on November 11, 1973. <S> Based on its demonstrated success, Xerox would go on to patent Ethernet in 1975. <S> In 1973, dial up modems, using twisted pair, were 0.0012 Mbps or 0.0003 Mbps, and 2400 ( <S> 0.0024 Mbps) was the expected maximum achievable. <S> Each twisted pair supported only 2 workstations, one at each end. <S> An advantage was that at those speeds distances much longer than 1 Km were achievable over the dial-up network <S> So while it is true that "twisted pair technology existed back then", it is misleading to compare it to early Ethernet. <A> Another important development that allowed UTP to be used for low voltage signals is the cost of transformers versus IC's used for differential balancing thereby significantly reducing the shielding and isolation requirements. <S> All of that iron and copper was expensive to acquire as raw material and ship as finished product.
| At a time when ICs and transistors and PCBs were relatively speaking more expensive than cabling, not using a central hub/switch saved cost. Coax was used for its controlled impedance, its bandwidth and its self-shielding properties.
|
Can i send a reset signal through the serial port? I want to send a signal through the serial port to restart a modem, enfora gsm1218(see datasheet http://www.testech-elect.com/enfora/pdf/GSM1218HR.pdf ) is it possible? I know that an AT command like AT$RESET exists to reset the software configuration, but I would like to hardware reset the modem itself as opposed to a software reset. <Q> I have implemented this kind of thing using the modem control signals. <S> You can wire DTR or RTS to a circuit that drives the RESET line of the system. <S> Naturally you have to make sure your serial communications software isn't going to use those signals, or rather is prevented from controlling those signals until you want the desired reset to occur. <A> If the command set does not specify such a command: No; AT$RESET is a normal command like any other. <S> In most cases you will tie the hardware reset or some similar pin to a GPIO of your controller and use this to fully reset the device. <A> Your host's serial driver should include an API for controlling that signal. <S> If supported, the modem will essentially go offline unless you're asserting DTR. <S> When you want to reset, just deassert DTR longer than minimum time required by the modem, and then reassert it.
| You need to get the full modem documentation, and look for whether it's possible to configure the modem to reset whenever you deassert the DTR (data terminal ready) signal.
|
How does electricity produce heat, and where do the electrons go? When electrons flow through a conductor it is subject to resistive loss, which has the unfortunate capability of producing heat from this current, leaving us with less current in the other end of the conductor opposite to the power source. When current is lost due to heat, what happens to the electron? I mean, what is left of it? I guess heat is caused by friction, but that doesn't mean that the electron is not able to travel all the way through to the load of the conductor, or what? <Q> No, current is not lost due to heat. <S> The same current flows in one end of a wire that flows out the other end, regardless of how much heat is dissipated in the wire (or any other resistor). <S> Energy is conserved because the resistance times the current causes a voltage drop. <S> This voltage times current is power, which is taken from the circuit and heats the resistor. <S> The voltage drop in the resistor means there is less voltage available to the rest of the circuit, but the current thru the whole loop is the same. <S> This is similar to a turbine being driven by high pressure water. <S> The same amount of water comes out of the turbine as goes in, but there is a pressure difference between the input flow and the output flow. <S> It is that pressure difference (analgous to voltage) times the water flow (analogous to current) that represents work done, which goes to spinning the turbine. <A> But the electrons gain energy through the application of an electric field, and they can lose that energy through inelastic interactions with the other particles (nuclei) in the conductor. <S> The energy lost is in the form of randomized vibratory motion, which is just another way of saying "heat". <S> If you want a more detailed answer, you should ask on the Physics SE . <A> Electrons are particles with very special nature. <S> They behave as a matter with mass and speed and when collide with other particles they produce heat. <S> Another nature of electrons is the magnetic field that accompanies the electrons when they change their direction. <S> This unique nature that is not found in any other particles rather than electrons do the real magic. <S> So electrons don't vanish after being used <S> but rather they return back to their original sender after doing the required work. <S> They are like labors with special skills when their manager sends them for a special task by giving them some incentives and they return back again to the same manager after they finish their assigned task when he can send them back to another task with the appropriate incentives. <S> For example if we need a motor to rotate, the power supply (The manager) asks the motor (the client) about how much labor it needs to rotate for a second. <S> The motor calculates this through measuring how much rotating force it needs to overcome the mechanical resistance of the rotating parts and then rotate them with the needed speed. <S> Knowing that moving electrons in a magnetic field yields a rotating force what now is needed is sending the correct amount of electrons (labors) for this second that are capable of producing the needed rotating force when they cut the internal magnetic field of the motor. <S> This amount of electrons in one second is the current intensity and to continue for more seconds <S> the power supply (the manager) should have the power to send the same amount every second so it should have the needed incentives to force (persuade) <S> the required amount of electrons to go to the client and do the required job. <S> The incentives can be also another magnetic field but this time applied at the electrons in the power supply (the manager puts their labor in a very tense situation that forces them to go forward) this magnetic field is applied on the electrons while they are rotating using another form of energy like water falls or pressured water-vapour. <S> To continue sending the electrons (the labors) the manager must continue paying the incentives (Boiling water for example to produce water vapour). <S> That is why we need to consume some type of energy to produce electrical energy. <A> In modern understanding and most simplified terms, resistance of a conductor is caused by colliding of electrons with collective oscillations of atom lattice of metals, called "phonons". <S> Oscillations of lattice can be considered as a "gas of phonons", which actually determines/defines the temperature of a conductor, and all classic thermodynamics therefore apply. <S> In process of collisions the drifting electrons lose their energy, so an external electric field is needed to maintain their flow. <S> See more explanations in this nice Wikipedia article, " Electrical resistivity and conductivity ".
| The electrons don't "go" anywhere, and current (the net flow of electrons) is not "lost" to heat.
|
32kHz crystal does not oscillate I'm trying to run an ATtiny2313 on this 32KHz crystal . The load capacitors I've used are 22pF. The crystal does not oscillate unless I touch capacitors with a finger or just touch one of the capacitors with isolated tweezers. What could be a problem? <Q> The oscillator of the ATTINY2313 has a minimum crystal frequency of about 400 kHz. <S> Your 32 kHz crystal is far off and thus unlikely to work. <A> The load capacitance stated on the "brochure" is 12.5pF. <S> I didn't mean to add this as answer but as a comment. <S> Show us your circuit for minimal confusion please. <S> Once you have "touched" the crystal, does it carry on oscillating? <S> If so then maybe your attiny213 isn't "equipped" to handle this type of crystal <S> i.e. its circuit doesn't provide enough gain during power-up to get it to begin running? <S> What does the attiny2313 info state about this sort of situation? <A> Conditions for oscillation only require gain>1 at resonance and can occur with any low frequency as the inverter gain is at least 10 down to DC. <S> The input and output must be at Vcc/2 dc, if it is not oscillating. <S> Touching adds hum which satisfied the initial condition to make oscillations. <S> The tuning fork is a high Q band pass filter that should filter the noise to a 32kHz sine wave on one side with a square wave from the output on the other. <S> The tweezer with hand would be much larger than 20 pF <S> so the other side cap in series limits the load capacitance across the resonator. <S> Try placing a new part on top of the old one and hold in place with a toothpick. <S> It could be cracked but not visible. <S> By design, the two 20pF caps act as two series caps with an equivalent 10pF load across the resonator. <S> Chip input and board capacitance adds a few more pF. <S> The cause could be but unlikely that both caps are damaged from excess solder heat. <S> Check the DC voltage, & inspect the caps. <S> Check also by raising the supply voltage 10% to see if there is any clues, there to trigger oscillation such as low gain in the chip. <S> The resonator is spec'd at 65k series impedance, but if defective will be much higher. <S> Make sure there is a supply decoupling cap nearby. <S> How is the chip powered and what is the supply voltage? <S> 2.7V? <S> 3.3? <S> 5V? <S> ESD can damage the chip input as it is high impedance on one side with a 1M feedback or so.
| The datasheet is a bit misleading: You can operate the 2313 with 32 kHz, but you'd need an activly driven clock signal (external oscillator) and not a simple passive crystal. If hand soldered and they sweat, this a bad sign they have been overheated and may crack. If using SMD, look for wet looking ceramic between the end conductors.
|
Determine Polaritry of Aluminum Electrolytic Capacitor I have an NIC aluminum electrylytic capacitor and am trying to figure out which wire is positive and which is negative. Forgive me if this is a stupid question since I'm a total noob at this. This is what's on the datasheet (Source: NIC Components) The actual cap has the same polarity marking (a rectangle) on its casing. Does it mean that the wire with the marking is negative and that the other one is positive? <Q> The "rectangle" is actually a minus sign; this marking indicates the negative lead. <A> Generally (not always, due to manufacturing defects) the short lead is the cathode, negative; while the long lead is the anode, positive. <S> On SMD aluminum cap cans, the topside marking usually denotes cathode as well. <S> SMD tantalum caps, the line usually marks the anode side. <S> The absolute best way to tell, is to look at the datasheet and see how they call it out, though the above can be used as a guideline. <A> Yes. <S> You don't believe the manufacturer's datasheet? <S> Normally, the negative terminal of and aluminum electrolytic capacitor is "marked". <S> The "rectangles" shown on the datasheet can be considered as minus signs.
| When looking at the can, the lead that matches up with the rectangles which are negative signs, is the cathode side.
|
Replacing resistors with equivalent resistor This is somewhat a homework assignment, but please bear with me. Given the following schematic, I want to know the overall resistance when measured from node A to node B. simulate this circuit – Schematic created using CircuitLab First of all, I'm not sure whether the order of calculations is important. Here's what I did: R3 and R4 are in series, so they add up to 500 Ohm. R2 is in parallel to those two, so (1/500+1/500)^-1 = 250 Ohm. Now I add R1 and my previous result because they are in series and thus get 1250 Ohm. Is this way of calculating correct? If I, for example, first calculate R2 and R3 in parallel, and then in series with R4, I get a completely different result, which confuses me a lot. <Q> The second method of trying to combine R3 and R2 in parallel results in an incorrect answer because they are not in parallel. <S> Devices are in parallel if they have the same voltage across them. <S> The voltage across R2 is split between R4 and R3, thus the voltage across R2 and R3 is not the same, which means they are not parallel. <A> Your first calculation is right. <S> The second calculation is wrong because that R3 is NOT in parallel with R2. <S> A component is considered to be in parallel with another component only if you can say that different currents flows through them. <S> (Not necessarily a different value, both currents may have the same exact value, but you define it as a different current because that it's in a different branch.) <A> R2 and R3 are not in parallel. <S> Two resistors are in parallel only if they connect to the same two nodes. <S> Similarly, two resistors are in series only if they are the only two elements connecting to a single central node. <S> The initial calculation steps you described are correct. <A> Hint: <S> You need to do this in stages R3 and R4 are in series so you can replace them <S> one resistor R5 <S> $$R5 = <S> R3 + R4 = <S> 500 <S> \Omega$$ <S> Now: R2 and the new R5 are in parallel <S> so you replace them with R6 <S> $$R6 = <S> \frac{R2 <S> \times <S> R5}{R2 + R5} = <S> 250 \Omega$$ <S> There is one more step to get the final answer is R1 and the new R6 a series or parallel circuit? <S> It may help to redraw the circuit at each stage until you get used to simplifying this type of circuit in your head.
| The first calculation you did is correct, R3 and R4 are in series, the combination is in parallel with R2 and when combined it is in series with R1.
|
Can I safely enclose battery-powered electronics in an antistatic bag to protect it from static electricity? I am building an enclosure for a Beaglebone and external circuit that I want to be able to wear, and therefore want to be lightweight and somewhat comfortable. I power the Beaglebone using a battery pack that's about 5 volts. Right now, I enclosed the Beaglebone and the external circuit within an antistatic bag. This is the first layer of protection. I enclosed the antistatic bag with a jersey fabric material. The jersey fabric material has Velcro attached to it and is attached to a Velcro belt. Is the powered Beaglebone circuit safe within the antistatic bag? Antistatic bags are slightly conductive according to the Wikipedia article, so I am unsure if this a safe solution. If not, what is a good insulating material? Rubber? <Q> If the Beaglebone and other circuit are completely enclosed in a sealed antistatic bag, with no holes in the bag, no switches or LEDs poking out of the bag, no cables going through the bag, then the Beaglebone is safe from static. <S> If that's not the case then you need to supply much more information about the electrical and physical arrangement of your circuits. <S> Of course, any electronic device operated inside a sealed plastic bag will get hotter than if it had air convection to cool it, so the Beaglebone might not work very well. <A> Keep in mind that what is generally considered "anti-static" doesn't mean ESD safe. <S> What is typically considered "anti-static" are those pink/lightly colored bags which prevent buildup of charge. <S> These aren't really conductive at all, maybe the ever so slightest bit of conductivity <S> and I doubt your board will run into any issues with shorts and such (keep in mind Joe's comments). <S> However, these bags do not prevent an external ESD source (say, your charged finger tips) from zapping a chip on the board. <S> I took my multimeter (datasheet claims max range of 40 Meg Ohms) and tried to measure the resistivity and couldn't get any readings on a spare ESD bag I had until the probes physically touched each other. <S> Your mileage may vary, but it will most likely be ok from a conductivity/electrical point of view. <S> Again, keep Joe's comments in mind about other factors which may matter. <S> As an aside, you might be able to get away without using ESD shielding bags/anti-static bags at all depending on what other packaging you have. <A> Remember that modern circuits all have discharge diodes that discharge pins to the supply lines. <S> This makes all circuits static resistant to some extent as soon as they are connected to the supply lines. <S> Manufacturers also use conformal coating to prevent damp corrosion and other problems. <S> Epoxy coating the completed board will make it very safe to wear but difficult to repair or test.
| ESD bags or static-shielded bags (silvery colored) are designed to be fully ESD safe, though as you've noted they do have the caveat of being slightly conductive.
|
Extract information from video through HDMI input processing I need to develop a prototype of a device that does the following: Take an HDMI input For each frame extract a small region of the screen. It's a small bar indicating some changing value. Convert this bar length into an int value, say 0-256.This can be done in linux once the region is extracted Pass through the HDMI onto the display Could you please suggest which processor/development board/capture card or any other device that can accomplish this task. I was looking at DaVinci processors and they look like they are capable of this. <Q> This is not a trivial exercise, but would be feasible with modern components. <S> I am not sure what you eventual project goals are, but you could bring up a prototype using an FPGA. <S> The Xilinx Spartan-6 family, for example, has HDMI input and output capabilities. <S> The Digilent Atlys Development Board seems like it could support your requirements. <S> The board has the HDMI input and output connectors. <S> A few caveats: If the HDMI signal is encrypted (HDCP), the task becomes harder. <S> If your eventual goal is a low cost consumer solution, using an HDMI capable FPGA may be cost prohibitive. <S> An alternative would be to use a dedicated HDMI transmitter and receiver chips and a uC/DSP processor. <A> Get a BlackMagic PCI Express HDMI video capture and pass-through card. <S> As long as the source is not HDCP encrypted, this would be pretty simple, assuming you're OK with Windows as the host (I don't know of Linux drivers.) <S> There are other video capture/edit suites that can do it as well, but generally more expensive (Matrox has some low-end ones for example.) <A> In the United States, this might be a DMCA violation. <S> (Yes, the laws can be silly.) <S> I'm pretty ignorant of all things HDMI, but you might want to start by reading up on Bunnie's NeTV ("any TV") open source project at http://www.kosagi.com/blog/ . <S> That might lead you to the information you need to solve your problems.
| As far as processing, I believe that the Xilinx MicroBlaze core (which would run on the FPGA) can support Linux, if you feel an OS is necessary.
|
What size capacitor to protect equipment from temporary voltage drop? Or maybe a different way of doing it? Problem:Electrical circuit (12vDC) on my boat is supplied from the battery but on engine start there is a brief voltage drop. This doesnt affect any equipment other than the chartplotter (marine satnav) which shuts down. When re-started it takes a minute to boot up and find itself which can be a touch nervewracking at times! Some boats deal with this by having the instrumentation powered by a separate battery to the one that is used exclusively for starting the battery, but that isn't really economically viable to retrofit A friend has suggested that a capacitor and diode will provide adequate temporary power to maintain the voltage until the engine start is finished. The plotter draws maximum 13 watts at minimum operating volatge of 10.8 V. Is this viable - and if so, what size Cap? I am not too worried about load dump as there is little else to shed! Alternatively (it has been suggested) a circuit with a small lead acid gel 12v battery that will cut in when the voltage drops and otherwise charge up when the main circuit voltage is at normal 13+V with engine running etc. <Q> The voltage on a one farad cap will drop one volt per second given a uniform current draw of one ampere. <S> Given three of the four values (capacitance C, acceptable voltage drop V, required hold time T, and current I) <S> one can determine the value of the fourth using the equation CV=IT. <S> With regard to the capacitor and diode idea, you need to be aware that if one connects a large high-quality initially-discharged capacitor to an "already-on" power supply such as a battery, the cap will try to draw as much current as the supply will put out. <S> It's conceivable a diode alone may work, but it would more likely turn into a "fryode" when the battery is connected; such a direct connection may also seriously damage the battery or the capacitor. <S> Thus, rather than simply using a diode, you should use some kind of circuit which can safely handle that condition (charging a 1 farad cap to 12 volts will require 1200 amps for 10ms, 120 amps for 0.1 second, 12 amps for one second, or 1 amp for twelve seconds). <S> From an efficiency standpoint, you may be best off using a pair of switching-power-supply circuits, one of which would step your capacitor voltage up to some higher voltage, and one of which would step that higher voltage down to whatever your device needs. <S> If your cap is charged to 12 volts, and your circuit will fail when it drops to 10, you'll only be able to use about 30% of your caps energy storage ability (the circuit will fail when the cap still has has about 70% of the energy that was put in). <S> By contrast, if you were to charge a cap up to 35 volts and could operate down to 11 volts, and if you used a switching supply to extract energy from the cap, you could probably utilize more than 80% of the cap's energy storage capability. <S> Given that large caps are expensive, the reduction in cap size may more than make up for the cost of the electronics. <A> The easiest solution may to be to install a product intended for car audio near your sensitive equipment. <S> Here is a link to a commercial high-value capacitor rated for 12V systems: 4 Farad BOSS Capacitor <S> I recommend looking at reviews before deciding on a particular product. <A> I'd just try the 1F cap and diode. <S> Most double layer capacitors have enough ESR that real world inrush current will be nothing close to what calculations for an ideal capacitor would yield. <S> Most power diodes have a short term current surge rating far in excess of their continuous rating, a three or five amp diode would probably hold up. <S> Diodes are cheap, nothing else at risk. <A> Off the shelf it's about $140.xx <S> [ https://www.gigaparts.com/west-mountain-pg40s.html?gclid=CjwKEAjw3drIBRCOwfC-_qqyjQ8SJADvoWQpctYxpANF374cu4gVI3oIsr2Vc1k9ZNxoTBK-xU1-1BoCyw_w_wcB ] or you could build your own, if you are into that. <S> I'd be happy to send you the specs on the DIY build if you want. <S> But basically you don't need to smoke any Caps - just buy a small gel-cel or Lead-acid battery <S> and it's pretty much <S> "Plug & Play". <S> I use the DIY version for my Ham Radio station in my Winnebago and the lights don't even flicker! <S> :-D <S> { <S> z m r o t <S> u @ <S> m a c . <S> c o <S> m } <S> Good luck!
| Perhaps you could set up a back up battery and use a "PWR-Gate" circuit that can be purchased off the shelf @ Ham Radio Outlet.. or built using a Schottky Diode, a heat sink and a resistor (to keep the small gel cell battery charged while not being used for back up).
|
Do I need MAX232 when using USB-to-Serial cable? I am willing to build an AVR JTAG debugger (I grabbed from here: http://aquaticus.info/jtag ) but the circuit uses COM port and it has MAX232 transceiver. My Laptop does not have COM port, so I need a USB-to-Serial cable.My question is, do I have to add the MAX232 circuit if I'm going to use USB-to-Serial cable? I have done some search and found that some cables are implemented with RS232 transceiver, on the box of my cable they say it supports the RS232 interface... is it the same? ( http://www.unitek-products.com/en/product_detail.php?id=12 ) If I didn't have to add the MAX232, is it necessary to invert the signals going to MCU? If it is, why? I am sorry for the long questions, but it is my first time to deal with the RS232. Thank you very much in advance. <Q> FTDI is the best-known manufacturer for USB-to-UART bridges. " <S> UART" means that the signals are at microcontroller level, i.e. 3.3V or 5V. <S> You can connect such a bridge directly to a microcontroller. <S> When we talk about USB-to-RS232 converters, those are USB-to-UART bridges with a MAX232 level converter built-in. <S> They will terminate in a DB9 connector, which is almost always a sign that it uses RS232 levels. <A> The asynchronous serial protocol can use different voltage levels and polarities. <S> RS232 refers to a specific set of voltage levels, inverted polarity, and (nowadays) a DB9 connector. <S> A USB-to-serial chip (like the FT232) outputs asynchronous serial at 3V or 5V level, not inverted. <S> A MAX232 or similar chip is used to convert this to RS232 level. <S> The serial pins of a microcontroller use asynchronous serial at the 3V or 5V level. <S> A max232 chip can be added to bring the signals to RS232 level. <S> Most USB-to-serial cables (including the on you refer to) include both the usb-to-serial chip AND the max232, with no possibility to access the in-between level. <S> So, for a successful asynchronous serial PC-to-microcontroller connection there are two possibilities(FT232 <S> can be swapped for an equivalent chip from another vendor): <S> PC-FT232-microcontroller: this is the easy way, often used for a PCB with the microcontroller and the FT232 chip. <S> PC-usb_to_serial_cable-max232-microcontroller: this might seem a bit convoluted, because the signals are first converted from 3V or 5V to RS232 (inside the usb_to_serial cable), and then converted back by the max232 to the level that the microntroller can handle. <S> But usb_to_serial cables are so common and check that this is often the aeasy option. <S> (A third option is to use a microcontroller that is itself USB-capable.) <S> Your debug board has a max232 and a DB9 connector, so you should use an off-the-shelve usb_to_serial converter cable, like the one you link to. <A> There are USB to UART chips from FTDI, TI, Maxim and others. <S> check one which has the same supply and IO voltage as the debugger's chip. <A> My experience is that MOST motherboards, at least in the last 10 years or so, do just fine with TTL levels, but you need to invert the UART. <S> Your mileage may vary.
| If you want to connect to another computer via a DB9 connector you'll have to add the MAX232, since that connector expects RS232 voltage levels (+12V and -12V).
|
Once a week pulse out of small circuit for slow clock? I have a clock (a regular quartz clock), that I want to go very slowly. I want it to tick 60 times a year. I disconnected the internal chip and hooked up an arduino to do the counting, and every 525948.76 seconds it tells the clock to tick. This works fine, but using an arduino is overkill. How cheap and simple could I make this "pulse every 525948.76 seconds"-device that would replace the arduino? It would not need to be as precise a timekeeper as an arduino. (this person did the same thing and explained how to http://www.cibomahto.com/2008/03/controlling-a-clock-with-an-arduino/ ) <Q> For a high precision timing function, consider using a real time clock with an integrated Temperature Compensated Crystal Oscillator (TCXO). <S> An example is the Maxim DS3231 RTC with TCXO, available from eBay for under $3 a pair including international shipping. <S> This gives you some advantages over the crystal oscillators used on Arduino boards: Accuracy of 3.5 parts per million, i.e. 110.45 seconds of drift per year. <S> Simplicity of counting time - you can set up the part to output a 1024 Hz square wave, for 0.977 millisecond precision for your clock ticks - or a once-per-second interrupt if you do not need the second decimal precision of ticking mentioned in the question The inbuilt calendar allows a recalibration of start time every year, including leap years To interface with such an RTC, you can use a very minimal microcontroller with an inbuilt RC oscillator, such as the ATtiny family. <S> The device thus would need merely the battery, the minimal microcontroller, the RTC chip, a few resistors and some decoupling capacitors, not much else I can think of - making it both inexpensive, and really simple to build. <S> On a home-etched PCB, the entire device could be built in under an inch square, for perhaps $6 or so in singles, will run from a single button cell battery for years, and deliver an accuracy far beyond what any Arduino can do out of the box. <S> A TCXO by itself would cost as much or more in single units. <S> If you chose to build a few dozen of these, cost could be dropped down to well under $3 apiece including professionally etched PCBs with pretty silkscreen and resist layer. <S> Code : <S> The microcontroller uses I2C to set up the RTC for either 1 Hz or 1024 Hz output <S> An interrupt enabled pin on the MCU is triggered at each pulse set above, and counts duration - the microcontroller is set to low power sleep mode the rest of the time. <S> On achieving a count of 525948.76 seconds, or 525949 seconds if you are not fussy, the microcontroller pulses your external quartz clock. <S> Once a a month, or annually, the microcontroller retrieves the actual date and time from the RTC, and corrects for any drift due to the 525949 second rounding off <A> For long-term frequency stability, the electrical power grid is pretty good. <S> It provides a 60Hz timebase that is still used for many clocks. <S> This Wikipedia link discusses how the powerline frequency is adjusted to maintain a constant 50/60Hz. <S> The main problem is power outages, but at least in US metropolitan areas, these are rare. <S> If you are willing to accept the small possibility that power may go out at some point, then a 120V/5V transformer, a rectifier and some counter chips will probably suffice. <S> The transformer and rectifier will provide a 60Hz pulse around 5 volts. <S> Instead of counter chips, I'd probably opt for a small microcontroller to take those pulses and do the math to pulse once a week. <S> However, this can also be done with discrete logic. <A> Most of them allow you to program an alarm. <S> So set the alarm for 525948.76 seconds into the future, and put the processor core to sleep. <S> When the RTC time matches the alarm time, the RTC will generate an interrupt and wake up the processor. <S> At that point, your code runs again. <S> Advance the clock hands, set the RTC alarm to 525948.76 seconds into the future, and put the processor to sleep again. <S> (Or, calculate what 525948.76 seconds from midnight Jan. 1 is, and reset the clock/calendar to midnight Jan. 1 every time and use the same alarm time.) <S> Many many many micros have hardware RTC peripherals. <S> Unfortunately, the parametric search on Microchip's website doesn't seem to allow me to filter by the presence of an RTC. <S> (My gut suspicion is that Microchip is likely to have the cheapest part with a hardware RTC. <S> Microchip also has an application note on how to do the same thing using Timer1 on chips that don't have an RTC module: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011057 . <S> That's probably as "cheap and simple" as you're likely to find. <S> Spend a few more pennies on a crystal with as much accuracy as you can find. <S> +/- <S> 10 ppm is 315 seconds/year, I believe, or a little more than 5 minutes. <S> If you keep your clock at room temperature you're quite likely to see better performance than that.
| You can get a small microcontroller with a hardware rel-time clock (RTC).
|
Water detector for heating element? I want to run a 300W heating element in a water bath, but I'd like to make sure that it isn't turned on by mistake when it's out of water, so I thought of connecting it to a controller and a sensor, though I'm not quite sure about the best way to sense this. I thought of two options: Detect water with an open circuit - I'm a bit worried about electrolytic corrosion though. Is this actually an issue? Detect the temperature with a thermocouple attached to the heating element. This has the difficulty of attaching a thermistor without it melting. What would you suggest? <Q> Water will diminish transmitted infrared light very well, by altering the lens characteristics and thus dispersion (diffusion, refraction), as well as by absorption. <S> See <S> this answer for the absorption graph: <S> The red end of the visible spectrum (and more so the Infrared) is absorbed by water about 100 times as strongly as violet/blue: <S> (source: SparkFun ) <S> These devices work by emitting infrared light from an IR LED on one side and sensing at the other side. <S> The gap for this particular device is 10 mm, which should be plenty for the purpose. <S> Adjust the IR LED's current to where the output just barely but reliably switches on in air. <S> When the device is immersed in water, the increased attenuation of IR by water will cause the output to go low. <S> For production volumes, you may be able to find assemblers who can do the epoxy coating and insulation immersion test for you in bulk. <S> In any case, the voltages involved are so low that there is no electrocution or catastrophic current flow risk if the insulation fails. <S> You might also consider an installation design such that only the extremities holding the IR LED and sensor would be immersed in water, the contacts would be above water level. <S> Insulation is still required to survive splashes, but the criticality reduces. <A> I'd suggest looking at what's done in commercial / industrial products as this is not a new or rare problem to solve. <S> Kettles, steamers, washing machines, dishwashers, cookers, irons, steam cleaners, slow cookers, fryers, etc. <S> all have excellent mechanisms for handling this which are cheap, reliable, and by law must be incredibly idiot-proof. <S> Your options are many, off the top of my head and by no means exhaustive: <S> A PTC element that can't burn itself out / overheat if there's not water present <S> Thermal cutoff switch or thermally coupled switch <S> Float switch Pressure switch (as used in washing machines to detect water level, hence common, robust, reliable) Optical switch (which would require a driver/control circuit) Capacitive or ultrasonic transducers (require even more control circuitry) <S> Old-fashioned and almost-never-used-in-real-products conduction type sensor <S> you mention <A> If your goal is to maintain a particular water temperature, I'd suggest having a temperature sensor a small distance from the heater (perhaps more than one), and watch it/them to ensure that their behavior is in line with what should be expected in the presence of water. <S> One should have a fail-safe to ensure that no hazardous condition will occur if the CPU turns the heater full-on when it's dry, but it should be pretty easy for the CPU to identify such conditions.
| Note that if you use two sensors you may be able to achieve much better regulation than when using one (use a sensor located away from the heater to determine a target temperature for water near the heater). Hence, a low tech approach would be to use an infrared interruptor switch, such as the GP1A57HRJ00F : To make the assembly waterproof, coat the pins, soldered connecting wires and any other exposed metal with some suitable high temperature, waterproof epoxy. Everything from £5 kettles to multi-million pound industrial process machines tackle this issue in a variety of ways.
|
Voltage Regulator: how to compensate for voltage drop in cable? USB devices reduce their current consumption with decreasing voltage. This is because the maximum current ability of a dumb USB charger is unknown to the device and the charger signals reaching the current limit by lowering the voltage. As a side effect the current consumption of the device (and therefore the charge speed) also decreases with increasing cable length. This is the problem I'd like to solve. Since the USB cable has 4 wires it would be easy to modify it, so that I can sense the voltage at the end of the cable, just a few mm before the connector. Searching for a solution I found LDOs (example: LP3856) that have an additional sense pin. Q1: Would such an LDO solve my problem? I guess that it would only compensate 50% of the voltage drop since half of the drop happens on the GND wire? (Q2) Q3: Most adjustable linear regulators have an V_adj input. Could I "misuse" that input as sense pin simply by connecting one end of the voltage divider to my sense wire? Q4: Many boost/buck converters also have some external circutry for feedback. Would the trick from Q3 work there also? Q5: Any other suggestions to solve my problem? <Q> Modifying any cable isn't usually contingent on the number of cores it already has - the modification would need to increase the cores from 4 to possibly 5 or 6 (at the risk of upsetting the balanced data on two of the existing 4 cores). <S> Assuming you can adequately modify the cable you'll need what is known as "sense" feedback. <S> I'm sure there are chips that can help with this and work with the 0V connection too. <S> For a regulator that is of the adjustable type there is usually a feedback pin that is able to be used for "sense" type applications but, in probably all the common chips, this would not work effectively because the feedback system may end up oscillating thus, you need an adjustable regulator that can cope (harder to find) or you inject, to the feedback pin, a "slugged" signal that won't upset the chip's usually very fast response time to transient loads. <S> Do-able but maybe a little tricky. <A> Q5: <S> Any other suggestions to solve my problem? <S> You can daisy chain up to 5 hubs. <S> The root hub inside your computer count as one. <S> But if you need to control USB devices from such a distance, use a cheap networked computer as a relay or one of those USB servers, that would be much reliable. <A> What I would most likely do is just put a powered hub as near to the load as possible. <S> Or if it's just for a charger, and you want a low voltage run for some reason, run a 12V cable(Use some speaker wire or something reasonably thick like that), put a car cigarette plug on the end, and put a car charger in that. <S> If you do it right, the voltage sense compensation trick will cancel out drops on the 5V line, but unless you also sense the voltage drop on the ground line, you are correct that you can only compensate half the drop. <S> You might have trouble with noise getting in your feedback line too.
| This can be done with an op-amp that monitors the end points of the cable and, in turn, fractionally and carefully, raises or lowers the feedback pin without upsetting the usually fragile control system that exists within the chip. Yes: insert a powered USB hub every 5 meters.
|
What is the difference in this specific breadboard wiring? As an absolute layperson in electronics I just found out that an LED only lights up when connected like in figure 1 but not when connected like in figure 2. And I just don't get why? I know an LED is a diode and current can only move through it in one direction, but that's the case in both constructions. I don't see a difference in both constructions. So why does it obviously make a difference? figure 1 (battery not depicted): figure 2 (battery not depicted): <Q> In the second arrangement, both legs of the LED are on the same horizontal row - In breadboards, each set of 5 holes on either side of the board is shorted together. <S> In other words, your LED's legs are shorted together, no current will flow through it. <S> See this image of how a breadboard's holes are typically connected internally: <S> ( source ) <S> The red thin lines indicate internal connections between the respective holes. <S> For a more detailed discussion on breadboards see this answer . <S> Specific to the Fritzing software <S> the images in the question seem to be made in: Note that as soon as any lead of a component is inserted into a hole in the on-screen breadboard, all the holes that are internally connected get a green indication - <S> That shows that those holes are essentially electrically connected to the occupied hole. <A> It's somehow clear in the second case that the LED is in parallel with a wire so the current prefers to move throgh the wire instead of the LED. <S> In fact, the wire removes the LED. <A> What you have to understand is that horizontally placed objects on a breadboard <S> does not mean you're connecting them in series. <S> Rows on a breadboard implies that that's the direction of current. <S> Therefore, positioning LED's vertically on a breadboard removes this short. <S> TL;DR : always place electrical units in vertical progressions unless you want to simulate a parallel circuit.
| Placing an LED horizontally on a bread board is like connecting a wire from the positive to negative legs of an LED, it will short it out.
|
How to keep led in "ON" state using 555 IC? I have made dark detector using this following circuit diagram: Whenever the LDR is closed with finger,the LED would glow. Now all I want is to keep that LED in ON state for a while or alternatively stay ON until the reset button is pressed (if possible), so that it can be used as laser burglar alarm (but with LED instead of buzzer). How can it be done using a 555 IC? <Q> A 555 isn't really required for a simple task like this. <S> You can make the LED latch with another transistor and a few extra components: <S> When the voltage at the junction of the photoresistor and R4 rises high enough, Q1 turns on, turning on the LED. <S> Q1 pulling low also turns on Q2, which charges C1 and latches Q1 in its ON state. <S> Discharging C1 with the switch turns the LED off, and assuming it is sufficiently light (the resistance of the photoresistor has decreased), Q1 and the LED will remain off. <A> From: http://www.instructables.com/id/quotDark-Detectorquot-using-a-555-timer-IC/ <S> You can use this circuit but replacing the buzzer with a LED. <S> Be careful that the 555IC drives out the same voltage output as you have as voltage supply (9v in this example, the IC allows 4.5 to 15 V). <A> Its set when triggered by the LDR, the output stay in high level for 11seconds, or you can reset by the switch SW1. <S> You can adjust the sensibilty of the LDR by the R1. <S> The time you can control by R3 and C2. <S> R4 will vary depending from the voltage that you will apply in the source. <S> You need guarantee the correct current to the LED depending the source voltage that you will apply. <S> simulate this circuit – <S> Schematic created using CircuitLab
| You can use this circuit.
|
Looking for simple Ethernet (RJ-45) controlled on/off switch for low-voltage DC line I need to replace a mechanical toggle on/off switch with one that can be controlled with a flavor of Ethernet (e.g. 10Base-T, 100Base-T, or 1000Base-T) using standard RJ-45 port. The line in/out is just a low-voltage DC line controlling a fan. I want my software to turn the fan on/off, and the software commands are sent out over Cat5e cable to an RJ-45 port. I'm having trouble with search terms for Google. Something like: on/off switch with ethernet port , just returns a lot of ethernet switches of various port sizes. Or, I find lots of sites promoting how to add a mechanical toggle switch to an RJ-45 cable, which is opposite of what I'm trying to do. Looking for a simple solution, and wonder if anyone has come across such a thing for their hobby projects. <Q> Good search terms would be "Ethernet Relay" or "Ethernet I/O". <S> A quick search turned up several possibilities. <S> An interesting on was from www.relaypros.com , look in the "Wired Relay" -> "Ethernet Interface" category. <S> I am sure there are other possibilities; this approach would be a little less work than creating your own with a microcontroller based board. <A> what you want is called "ethernet to GPIO" and it is a side function of many ethernet<->serial converter. <S> For example, Lantronix XPORT is a nice, cheap ethernet-serial module. <S> It has a serial port (which you can ignore) and 3 "software selectable PIO pins" which is just what you need. <S> Each of these pins can be set to low or high voltage under ethernet control. <S> Those pins are 3.3v output only, but with "3.3v relay board" (google it!) <S> you can easily control larger loads. <A>
| Easiest solution (in terms of time/money/complexity) would be a Raspberry Pi with an IO board.
|
Charging 12v batteries with direct connection to 20v solar panels I want to charge a 12v Sealed Lead Acid car battery off of a solar panel (20v) and then draw about 10-20W of power from it via an inverter (the load). I'm wondering if its okay to connect it together like this: And what downsides, if any, are there and can I avoid them? Is it a problem hooking up the battery to solar panel without a load? Thanks! <Q> Yes, it's okay, on condition that you never let the battery voltage exceed a maximum. <S> The maximum is typically around 14.4V to 14.8V at 21C temperature. <S> If the maximum is exceeded for minutes to hours, the battery will be permanently damaged. <S> The damage occurs around the same time that flammable gas is generated and vented, so there is a risk of gas explosion near the battery. <S> Your setup would require constant monitoring, especially if the load is disconnected or turned off. <S> Check the voltage every hour, and disconnect the solar panel as the voltage approaches the maximum. <S> To find the maximum voltage, check the manufacturer's label or datasheet for the battery. <S> You can make your setup safer by adding a charge controller to protect the battery (so you don't have to monitor), by ensuring there is air flow, by removing any sources of ignition for the gas, and by keeping the battery away from things it might damage as a result of an explosion. <A> Add a blocking diode on the positive rail between the battery and the panel, or, as previously suggested (and the best solution IMHO) use a small solar charge controller. <S> Charge controllers are less than $15 USD on eBay or elsewhere on the Web. <A> I think no. <S> At least put diode from + solar to possitive battery then tap a limiter zener diode 12v to the battery + to red and black to -
| If you keep the panel connected as shown in your diagram, it will absorb some power when it is not getting sunlight.
|
What is a cheap technology to allow multiple devices to know each other when close in proximity? I want to make some objects that will know when they are, let's say, 3 feet(or less) from each other. They need to also know the identification of the objects close to them. For example. If object Ball is in presence of a Cube, they would both be 'unhappy'. But if a Ball is in the presence of another Ball. They would both be 'happy'. Summing up...I'm looking for cheap ways to have objects:(1) know when others are around(2) know their unique ID (which would probably require some sort of broadcasting of IDs by each device) <Q> A cheap old fashioned way is by audio. <S> Simply have a small speaker and microphone on each device. <S> Different frequency for each ID, or use one frequency and have each device transmit an ID continuously after a pause of random length. <S> Tiny millisecond long clicks at >20kHz will easily be enough and won't be audiable to humans. <S> You could even use volume to guestimate distance between them. <A> I particularly like SparkFun's Nike iPod dissection post! <S> I'm so out of touch <S> I wasn't even aware such a thing existed. <S> Definitely look around in the arduino and robotics circles; those folks are all about cheap & easy wirelessness. <A> You will need that all objects send and receive data identification about who is who. <S> But you will have some problem, considering that you want to produce a cheap large scale product. <S> The cheaper to send and receiver is infrared, but you can´t have anything between the sender and receiver, and the distance you can try to calibrate <S> but the distance will chance if change the light of environment, if two send their ID at same time will understand. <S> With radio this will be more expensive to project, can pass through somethings, but will have the same problem of who can talk now, that can be solve with a master that reach all objects and manage who can talk. <A> Most logical solution is RFID, but it's certainly not cheap and their sensitivity range is pretty limited. <S> Choose transmitter with widest angle you can get — at least 120° — and put several parallel-tied transmitters and receivers on object's surface <S> (make sure there's no blind spot). <S> Assign each object a unique ID. <S> You can use encoder/decoder IC (such PT2262 / PT2272 pair) to simplify the identification process. <S> You can also give each object different broadcast interval to minimize interference.
| There are countless cheap ways devices can wirelessly communicate ! Cheapest method I can think of perhaps by using pair of infrared transmitter and receiver.
|
What is a product ID in USB and do I need to buy it for my project? I am trying to develop a portable device that will allow me to transfer data from one USB storage device to another without a using PC/Laptop.I was reading the developers guide by Jan Axelson where I came across a section that said that one must buy a USB vendor ID/product ID in order to make any USB device. I read the same on the USB Implementers Forum.I am unsure of the importance of this product ID in my project. Is it something like a MAC address for computers/laptops and will Ineed it? Is it something required only for developing peripheral devices andnot devices like what I wish to implement(which I guess is more likea host)? <Q> I am not sure what exactly you want to make, but if it is a host device you indeed don't need an USB VID/PID. <S> The USB VID/PID of a slave device is used by the host to identify the driver(s) to be used for the slave device. <S> A host device does not need to identify itself to the slave, hence it does not need a VID/PID. <A> Only devices need a VID and PID not hosts. <S> If you want to make USB device (and fully play by the rules) <S> the VID identifies your organisation. <S> The Product ID or PID is also a 16-bit number but is under your control. <S> When you purchase a VID you have the right to use that with every possible PID so this gives you 65536 possible VID:PID combinations. <S> The intention is that a VID:PID combination should uniquely identify a particular poduct globally. <S> This guarantees that no PC can ever see two different devices with the same VID and PID as the PC uses these to identify the device <S> otherwise a conflict could occur. <S> Note: Unlike a MAC-ID the purpose of a VID:PID combination is to uniquely identify a device type to the extent that the operating system knows what drivers to use it's not always necessary to be able to distinguish between two identical devices. <S> For example two USB memory sticks has the computer not only knows what the device is it knows which port its plugged into. <S> When you plug a USB device in the OS asks the device for its VID and PID and gives the device an address which it will continue to use until the device is removed (or the computer switched off). <S> Once the PC knows the VID and PID it checks to see if it knows these already. <S> If it does it loads the correct drivers for it; if not you are given the opportunity to install any relevant drivers. <S> This process is called enumeration. <S> On the other hand a MAC-ID does not in its self provide any information about what a device is (computer, printer, router, etc.) <S> but does uniquely identify a device: two identical PCs will have different MAC-IDs as if they both get plugged into the same Ethernet network it wont work correctly. <S> Two identical USB memory sticks however will have identical VID and PID. <S> If I want to make and sell 1 million identical USB devices I only need to buy one VID. <S> If I want to make and sell 1 million Ethernet devices I have to buy 1 million MAC-IDs <A> Note that some hardware vendors, such as Microchip , as willing to sublicense their own Vendor ID to theirs customers, for free.
| The Vendor ID or VID is a 16-bit number which you have to buy from the USB Foundation.
|
Voltage drop measurement result doesn't match my theoretical calculation I have a \$1.5\Omega\$ resistor and \$8.84V\$ battery. My multimeter tip's resistance is \$0.3\Omega\$. I've tried to compare the calculated voltage drop (which is \$8.84V\$) with the measured value. What I've tried I've connected the resistor to the battery and then connected the tips to the battery terminal to measure the voltage between terminal. (The time was short. About 3 seconds) The value should be \$0V\$ but it was \$0.34V\$ (means the voltage drop is \$8.5\$). Why is there a difference? <Q> I don't quite understand why the calculated voltage drop is 8.84V - every battery has nonzero internal resistance, so it looks like what you measured was the voltage drop on this internal resistance. <S> EDIT (09/01/2013): Your schematics seems to confirm that you measured the voltage drop on the internal resistance of your battery. <S> I also suspect that your "multimeter tip's resistance" of 0.3Ω is rather irrelevant, as a decent voltmeter itself should have a much greater resistance. <S> However, your voltage drop of 0.34V seems very low, as the internal resistance of the battery should be about 1.7Ω <S> ( http://www.alliedelec.com/images/products/datasheets/bm/DURACELL/70149225.pdf ), so the current in the circuit should be greater than, say, 2.5A, and the voltage drop on the battery should be at least 4V. <S> Maybe I am missing something? <A> you are measuring the EMF of the battery less the voltage drop across the battery's internal resistance, OR the voltage drop across the 1.5ohm, which will not be equal to battery EMF because of said internal resistance. <S> i.e. +0.34= +8.84 - (+Vir), as diagram below. <S> your result shows that the internal resistance of the battery is 8.5/0.34*1.5=37.5ohm. <S> which is much higher than one would expect. <S> it is usually 1-2ohm. <S> either the battery is much less than +8.84V or the load resistor is more than 1.5ohm <A> If you are measuring just 0.34V, the battery is probably exhausted and can only supply a relatively small current: \$I_R = \dfrac{0.34V}{1.5\Omega} = <S> 227mA\$ <S> Now, if the battery, resistor, and voltmeter are connected in series , you should read the open circuit battery voltage of 8.84V since there should be essentially zero current (remember, an ideal voltmeter is an open circuit). <S> It would be helpful if you added a circuit diagram so that we can see exactly what you are trying to measure. <S> From the schematic, you should read the battery open circuit voltage when the switch is open. <S> A fresh battery should read about 9.35V. Since you're reading 8.84V, the battery is at or near discharge. <S> With the switch closed, a fresh battery will drive a significant current, several amps, through the external resistance as it rather rapidly discharges. <S> Since your battery is supply much less than that, it is already discharged. <S> Here is a link to an experiment to determine the short circuit current of a 9V battery that I think you may find informative: http://friedrichengineering.com/web_documents/9volt%20Battery.pdf
| If the battery, resistor, and voltmeter are connected in parallel , you should read the only voltage present in the circuit (remember, parallel connected circuit elements share the same voltage.)
|
Delay function in ARM programming I have just started programming on ARM, I had some experience on AVR but not that much. The question is probably too trivial but the material about ARM is too little on the net... sorry anyways. I know for implementing delays in ARM we can use timers or busy-loops. I tried those methods out. But one of my friends suggests there is a "delay.h" headerfile for arm that contains all the necessary delay functions just like avr, delay_ms and ... . First of all, as stupid as this question may sound, is there really a built-in delay function in ARM programming. Is it in delay.h? If so, why is the use of timers for implementing delays so popular? Why don't they just use the built-in function? I'm studying LPC17xx series. <Q> Many compilers and libraries support the ARM family. <S> I wouldnt waste time searching for a single solution defined in a single filename. <S> That is most certainly not "the" solution for "ARM". <S> As with AVR and most other processors, certainly microcontrollers, you have the choice of blocking in a foreground loop either using a calibrated loop, or polling a timer. <S> It depends on what you are needing to perform a delay for and what else might be going on during that delay. <S> Depending on the specific chip and amount of time you want to delay you might be able to put the chip asleep for that period of time. <S> If you are using a library for other things like SPI, I2C, etc for the target processor and toolchain then you likely have timer routines as well and can just use those. <S> If you are rolling your own (most portable but also the most work) then look at the timers, in the long run it will be easier to maintain code that is based on a timer rather than based on a calibrated (count to N) loop. <S> There are a number of toolchains and libraries tailored to the NXP LPC family in particular if that is the path you wish to take. <S> In no way, shape, or form. <S> Is there a single solution that you should limit yourself to. <S> Not for ARM not for AVR, not for any of them. <A> Sometimes code will be run in a context where nothing else is going on. <S> If the processor sets an I/O bit, then runs a bunch of instructions that take a total of 1ms to execute, and then clears the I/ <S> O bit, then the wire controlled by that bit will pulse high for 1ms. <S> Simple delay methods can be useful in such contexts. <S> They are far less useful, however, in contexts where other things may be going on. <S> If while the aforementioned delay was running, an interrupt occurred that required 100us to service, the pin would be pulsed high for 1.1ms rather than 1ms. <S> Worse, if one tries to use such a delay within an interrupt service routine, the main-line code and all lower-priority interrupts will be suspended until such delay is complete. <S> Generally, the aforementioned approach to implementing is appropriate when either (1) one is writing something like a boot-loader that should be able to operate without interrupts, and nothing else will be going on while it's running; (2) one needs a delay which is sufficiently short <S> there's not much point trying to find something else to do. <S> For example, if one is using a 32MHz processor to communicate with a device that requires 1.6us of idle time between data bytes, inserting code that spends 52 cycles doing nothing would mean the ARM could be well-positioned to send the next byte about 1.6us later. <S> By contrast, if the ARM tries to find something else to do, it would likely be busy doing that at the end of the 1.6us, and wouldn't send the next byte until some time later. <A> Think of an ARM CPU as a full-blown CPU that you might use for an operating system such as Linux. <S> Now imagine what would happen if you blocked execution on the entire chip whenever you wanted time delay functionality. <S> The whole thing would lock up during the delay, leading to a completely unusable experience for any kind of user-interactive system. <S> That's why timers are preferred. <S> Timers are useful because they avoid the blocking situation. <S> The CPU continues executing code, and jumps back to a handler routine once the timer elapses. <S> This offers a form of asynchronous operation that allows for much more flexible code. <S> In architectures that don't directly support internal timers, but do support external interrupts, an external timing device can be used. <S> The timer is programmed with a time offset (usually a scalar and multiplier) and an interrupt number. <S> When the external timer triggers the interrupt, the CPU reads an interrupt table to find the interrupt vector , which is a linear address to which execution is transferred in order to handle the timer event. <A> It is of course possible to use an ARM processor to do a simple delay. <S> See my code below. <S> Depending on what else you need your processor to do it may not be the best solution however. <S> This code runs on an LPC2000 series processor from NXP. <S> /**********************************************************************// <S> * Timer.c <S> *// <S> * Implements a delay : <S> *// <S> * <S> TMR0 is a mcrosecond timer capable of timing events of upto <S> *// <S> * 4294.967295 seconds (1 hour 11 min 36.967295 sec) <S> *// <S> * includes both delay and stop watch functions <S> *// <S> * void Delay(unsigned int delay); delay in microseconds <S> *// <S> * Does not use interupts. <S> Note timer may rollover during delay <S> *// <S> * <S> so code checks for this <S> *// <S> * Note: <S> delay is minimum delay as interupts can slow it down <S> *//**********************************************************************// <S> * <S> * Note: <S> Assumes TMR0 is already setup with 1 microsecond tick <S> */#include <S> <LPC2103.h>#include "Timer.h"void Delay(unsigned int delay){ unsigned int start; unsigned int stop; unsigned int now; <S> start = T0TC; <S> stop = <S> start + delay + 1 <S> ; <S> /* +1 <S> because call could arrive just before TOTC changes <S> */ if (stop > start){ /* usually is */ do{ now = T0TC; }while (now < stop && now >= start) <S> ; / <S> * Catch timer roll-over as done */ }else{ / <S> * Need timer to roll over */ do{ now = T0TC; }while (now < stop || now >= start); }} <S> Even if you are happy to just sit in a loop waiting for a delay a timer may better as its more difficult to estimate delay times with a simple loop such as for(i=1000; i >0; i--){ ;} Because a good optimising compiler may just optimise this out. <S> Even it it does not get optimised its difficult to know exactly how long this delay will take because the NXP LPC series processors have memory accelerators and the processor has pipe lining.
| You can also use a timer based interrupt if need be.
|
Is this an SMC connector? Can anyone identify this tiny connector? The tape measure is in inches. The connector has threads on the outside and a pin inside. The diameter is about 1/16th of an inch. I think it might be an SMC connector but I am not an expert in this stuff. This connector is on an accelerometer. I will need to get a custom cable to connect to the accelerometer; the other end will be a BNC connector. Does anyone know what type of cable I would want to use for this? My lab mainly uses BNC cables, and they're all RG58, which is way too big for this tiny accelerometer. <Q> I'll add this as a new answer. <S> Mark & Chris are correct - it is NOT a SSMA connector. <S> This answer is based on an extension of what they discovered The cable designed for use with the accelerometer is shown here PCB Piezotronics - Model: 030A10 <S> Miniature, low-noise, blue coaxial cable, 10-ft, 3-56 plug to 10-32 plug <S> If you want the "EK" connector only it is here (as Chris advised): <S> female Size - OD <S> 0.12 in / 3.0 mm Size - Length 0.29 in / 7.4 mm <S> With the above information an excessively enthused technician could construct a workable plug OR ... <S> PCB Piezotronics contact page: <A> Even if this involved bonding (eg soldering) your unit to a cut down plug it would work if done well. <S> SSMA is a (even more) miniature version of SMA. <S> RP or reverse polarity is when the plug centre is a male pin rather than a socket and the outer is a male thread, as shown in your picture. <S> This image from Wikipedia - SMA Connector shows an RP connector (as yours is) <S> but this is an SMA. <S> One MAY match yours. <S> May not have RP. <S> 2.92 mm, 2.40 mm, 1.85 mm versions !!! <S> 1.85mm - 67 GHz !! <S> ! <S> - not RP as shown here Dimension chart below from here <S> RELATED: <S> PCI Notionally reverse SSMA images - MAY be of some use - note that many are not RP SSMA. <S> Future <S> RP SMA - MAY know of SSMA Aliexpress and similar can be a source of specialist parts - these are not exactly what you want but show that small volume sellers of semi-specialist parts can be found. <S> Also hgere <S> RF Globalnet SSMA Microwave 101 connector page <S> SMS <S> Smaller ... <S> Amphenol may save you - or not Southwest microwave catalog pages ... beyond the catalog. <A> No. <S> This is not an RF/microwave connector, but a special "3-56 coaxial" or "EK" accelerometer/instrumentation connector. <S> markrages found mention of it at: http://www.pcb.com/spec_sheet.asp?model=EK <S> I also find it mentioned at: http://www.synotech.de/uploads/tx_ttproducts/datasheet/PCB_102_352A71.pdf <S> Which has pictures and specs of units of the same sort you have, though on further reading it appears they are just a distributor and point back to PCB as the manufacturer. <S> Contacting one or both companies would probably be the best way to track down a source for a cable or connector, which may be part 030A10.
| That appears to be an "RP SSMA" or "Reverse Polarity SSMA" connector IF you find an SSMA (or other connector of the same size but it is not an RP version as your is, you could make an adequately workable one off by machining down a plug (whose centre will fit your plug) and then ensuring that adequate outer contact is made. Amphenol SSMA with catalog - may not have RP Southwest Microwave - have SSMA PLUS smaller, still smaller and still still smaller versions. EK connector - Coupling Thread 3-56
|
Atmel Studio 6 Simulator Not Showing Up I was looking to run the simulator for an AVR controller, but when I went to set my debugging tools as outlined in this video- http://www.youtube.com/watch?v=9QlDSNeuAdY I do not have anything show up under the drop down both on my PC and Mac running windows in Parallels. Below is a screenshot. Are there any suggestions to resolve the issue? <Q> Be sure atfw.exe runs without problems (found in C:\Program Files (x86)\Atmel\Atmel Studio 6.2\atbackend). <S> I found atfw.exe was missing wdapi1010.dll. <S> Copy wdapi1010.dll from C:\Program Files <S> (x86)\Atmel\Atmel USB Drivers\Jungo\usb64 to the atfw.exe directory. <S> Now simulator and programmer are avail in Atmel Studio 6.2. <A> The following page shows simulator support for each device family: Atmel Studio Supported Devices <A> I had the same problem and it is an elaborate Atmel Studio bug. <S> Here is the description of my problem and the way I solved it: <S> There was a file "fuses.c" included in the project. <S> It was created long time ago in a different version of Atmel Studio (4). <S> I always thought that it doesn't compile to anything during debugging and is probably supposed to be used by programmer. <S> The Atmel Studio Bug is, that if a fuses.c file with the wrong fuse values included in the project, then the simulator glitches, stops working and disappears from the tools list! <S> And it doesn't show up in any other project, unless you restart Atmel Studio IDE. <S> So, generally, removing fuses.c from the project resolved the problem. <S> Hope this helps. <A> I had the same problem and I fixed it with an old patch. <S> It works for me with Windows 8.1 and Atmel Studio 6.2. <S> My problem was the Jungo driver that was not properly installed. <S> http://avr-jungo-usb.software.informer.com/download/
| Not all AVR devices are supported by the simulator and in that case you'll get the empty list when you don't have a compatible programmer / debugger connected either.
|
Is it OK to solder a power cord? A few people have advised me to never solder a power cord directly to a PCB, but they couldn't explain why not. Why can/can't I solder it directly? <Q> The insulation on the cable may not be specified for the soldering temperature, and may be damaged. <S> The insulation is selected for electrical isolation, flexibility and thermal properties. <S> These properties may change if the insulation is taken beyond the storage temperature limits. <S> Damaged insulation may be considered to be non-existent insulation. <S> The restraint of the cable inside the equipment is typically redundant; a cable gland or clamp, followed by a screw terminal clamp on the copper end. <S> The restraint design depends on the strength of the cable. <S> The strength of a copper conductor, stranded or solid, is reduced by soldering, as some of the diameter of the copper changes from copper to a copper tin alloy. <S> The current rating is also affected. <S> The gasses released by the insulation during soldering may be harmful to the person doing the work. <S> My opinion is that it is fine to solder directly, as long as the additional risks are compensated for in some way; derating, additional insulation, additional anchoring, and good airflow during soldering. <A> No great reason not to if you do it properly, lots of kit has power cables soldered to the PCB, both mains & low-voltage. <S> Even stuff that has an IEC socket or similar on the back will have jumper wires to bring the mains to the board. <S> Several important factors are mentioned in James Cameron's answer, cable strain relief being a major one IMHO. <S> Many of the rest are a bit pedantic as most cables will be fine with being soldered to something - admittedly if you were producing a million mains-powered widgets that had to pass safety certification you'd probably need to demonstrate a bit more care, but in reality for the odd project it'll be fine. <A> no , solder is soft metal in fault conditions, all wires need mechanical fastning ie so solder to pcb needs wire lugs (which has crimp and solder cup), and stranded wire lose <S> mechanical propertiesall industry standards dont allow it. <S> and if it was LV circuit you might see manslaughter charges up to 25 year in prisonif causing death?
| The flexibility of the cable will be affected by the soldering, as solder typically wicks some distance up the copper.
|
Selecting a MOSFET for DC use I have a general question regarding MOSFET Selection. I am trying to select a MOSFET for DC use. I am looking to replace a 5A 24V Relay with a N Type MOSFET. The MOSFET would be driven from a micro so I would need a logic level gate. The micro is 5v Logic. I am going to be mass producing these so cost is my main driver. Most of the MOSFETs that I have come across do not have a DC area called out in the SOA curves. For instance the one I was potentially looking at was the IRLR3105PBF. Datasheet here Here are the params I looked at: VDSS Max = 55V which is >> than my 24Vdc Bus so that is fine. Power Calc - 5A*5A*0.37mOhm = .925W (High but I think a DPAK can handle that) FIGURE 1 & 2 -VGS @ 5V -> VDS = 0.3V @ 25C (but the graph 20uS Pulse I want this to be DC?)VGS @ 5V -> VDS = 0.5V @ 175C (again I want this to be DC?) FIGURE 8 -Looking at VDS - 0.5V (Worst case) it only shows 1V. 1V can go up to 20A way more than I need for a 10mSec pulse. (I am actually confused on this should I just assume that I will have VDS of 1V looking at this?) But then comes my main question I want DC where do I look for that? Is this just a bad choice? (I get the feeling it is because no where in the data sheet does it talk about DC) What should I look for when searching Digikey? TLDR How should I select FETs for DC use? <Q> If you need DC operation, you should really use a MOSFET that has a DC rating in its Safe Operating Area. <S> Internal, local hotspots may occur and the MOSFETs may fail ("Spirito Effect"). <S> The reason is a falling gate-to-source threshold voltage for a rising temperature, usually at low gate-to-source voltages. <S> The details of this issue are usually not specified in the data sheets, so the only indicator is often the SOA diagram that has or doesn't have a DC curve. <S> Fig. <S> 3 in your MOSFET's data sheet looks like the point of thermal V GS crossover is a bit below 4 V. <S> In my opinion, you are on the risky side when you use this particular MOSFET with a driver that can supply 5 V only. <S> For a worst-case scenario, consider your supply to be on the low end (4.5 V), and allow some voltage drop for the driving stage. <S> Sooner than you might like, you end up somewhere around 3.5 V. Note that the absolute maximum ratings (25 or 18 A at 25 or 100 °C, respectively) are specified at a gate-to-source voltage of 10 V , when your MOSFET is fully on . <S> They do not apply at lower gate-to-source voltages. <S> More about the background here: https://electronics.stackexchange.com/a/36625/930 <A> Have a look at products from Solid State Optronics. <S> http://www.ssousa.com/home.asp <S> The ones we're using (SDM4101, SDM4102) have an optoisolator built in but they're only 3.4A.I'm about to start testing a configuration with 2 in parallel for greater curreent capacity. <S> The thermal characteristics of Mosfets means resistance increases with temp <S> so if one starts to draw more current it will heat up, increase resistance and more current will flow through its twin. <S> Or so the theory goes! <A> They mention the maximum drain current to be 18A continuous at 100 degrees C. <S> If your original relay never saw more than 5A continuous, you will be fine. <S> To answer your question: look at the continuous rating. <S> It is at the top of the first page and also listed as one of the first electrical characteristics as an absolute maximum. <S> Later on, it is in the source-drain characteristics table on the end of page 2. <S> It is important to do what you did and evaluate the power dissipation (RDSon * I^2) <S> This looks like a reasonable FET. <S> In a DPAK I imagine you will be soldering it to a PCB for heatsinking. <A> The figures on the Absolute Maximum section cover DC continuous operation. <S> The SOA curves show you can exceed these ratings for short durations <S> but you can have <S> 18 amp continuous provided you keep the case below 100C. <S> Just estimate the power from I^2 Rds_on. <S> But remember Rds_on increases with temperature I usually allow for a 50% increase in Rds_on.
| MOSFETs that don't have the DC curve may suffer from thermal runaway when used in DC applications and are intended or specified for switching applications only.
|
What's the best method to responsibly dispose of used alkaline batteries? Years ago, I would have typically tossed typical, Alkaline batteries in the trash. I have been reading more and more on this topic, and while I see that rechargeable batteries should be recycled, I'm finding conflicting evidence on how best to dispose of Alkaline batteries. For example, Duracell claims that since they removed the mercury from batteries, they're safe for disposal. But others claim (see Disqus comments at the bottom) that since all batteries contain various kinds of heavy heavy metals and should thus be recycled. <Q> In the UK (and most, if not all, of the EU): some supermarkets have recycling bins for small batteries. <S> Every community has a household waste recycling centre with containers for old batteries (including both lead-acid car batteries and small appliance batteries like AA batteries). <S> EU Directive 206/66 <S> /EC says <S> In order to protect the environment, waste batteries and accumulators should be collected. <S> For portable batteries and accumulators, collection schemes achieving a high collection rate should be established. <S> This means setting up collection schemes so that end-users can discard all waste portable batteries and accumulators conveniently and free of charge <A> Even though heavy metals are not much of a concern anymore with any batteries (even the more exotic rechargeable chemistries don't contain toxic heavy metals anymore), a big concern for waste disposal and the environment is the use of strong acids in these batteries. <S> Even a single battery can contain enough acid to throw the pH of hundreds of liters of ground water out of whack so as to kill most of the ground life. <S> When the waste is burned instead of dumped, the acids and other electrolyte components cause relatively high amounts of harmful emissions (like sulphur dioxide) to be produced in the process - although modern plants filter this out pretty effectively. <S> It is generally better for the environment to collect batteries separately for these reasons, even if the economics are not necessarily that good for recouping the materials out of these batteries. <A> In my community, I collect my old batteries and they're disposed of at the hazardous waste depot. <A> It depends on what recycling and disposal services are available to you, and at what price. <S> People or governments running a recycling or disposal business will tend to recommend their services, in order to make more money. <S> Some governments have more impartial advice. <S> So it is hard to find the best action to take. <S> No batteries are designed for eating, drinking, or growing plants from. <S> I'm certainly not surprised if there are elements newly found in them that are toxic, but it is a matter of the dose. <S> A waste stream concentrates the dose. <S> Mercury was present once upon a time, but it became such a problem that it was removed. <S> From all but mercury batteries. <S> ;-) <S> Rechargeable batteries such as NiCd ought to avoid ground disposal for reasons of the Cd, and the risk of it leaching into water table. <S> But ground disposal can be designed to reduce this risk. <S> Rechargeable batteries such as NiMH can probably be recycled for their nickel, but the economics will depend on the nickel price. <S> Rechargeable batteries such as lead acid ought to be recycled, as the lead fetches a good price. <S> The lead is also toxic at the right dose. <S> I've heard Lithium based batteries are interesting to some because of the Lithium. <S> I'm in a rural area, so my options are quite limited.
| I send lead acid batteries for recycling, and dispose of alkaline, NiCd, NiMH, and lithium in the common waste stream run by the local government, because that stream is designed for those goods.
|
Are different houses out of phase? It's hard to see but on the overhead power lines, houses seem to only be grabbing one phase of the 3-wire transmission line. If each house is using a separate phase, what makes the 3-phase system an advantage if each house still has the 0-voltage point of the sine wave? <Q> While 30 or 40 years ago it was common to get 3-phase power in many European countries, today as a rule you get one phase. <S> If you get the R phase, your next door neighbor will get the S phase, and the person in the house next to that will get the T phase. <S> Over hundreds of houses this more or less balances the three phases. <S> 3-phase power is still available at an extra cost, but households hardly ever need it anymore. <S> (I remember my mother had a Miele washing machine which ran on 3-phase power.) <S> Industrial customers often will have 3-phase power, either because they need lots of power, or they use machines which run on 3-phase power, like synchronous motors. <S> Overall the three phases coming from a 10kV transformer station will be fairly balanced, with only a small residual current through the neutral. <A> Generally (in the US, anyway), several houses in a neighborhood will all be supplied by a common pole transformer, which will be attached to a single phase of the medium voltage (several to tens of kV) distribution network. <S> Each house is connected to the center-tapped ("split phase") <S> secondary, giving 120V-0-120V, or 240V across the ends, at anywhere from 100 to 200 amps max. <S> In either case, the three-phase load that the power company sees balances out statistically, rather than rigorously. <A> Different houses will connect to different phases so that they hopefully load them equally. <S> Of course that's not possible at all times but even in the worst case scenario when all the consumers are on the same phase the current in the neutral will be equal to that in the used phase. <S> So the system still allows you to use four wires instead of six and that's significant saving of wires.
| It's possible that all three phases of the medium voltage network are wired along the street, and the pole transformers will alternate among the phases, but I've seen quite a few areas in which all the pole transformers on an entire street or neighborhood are all on the same phase, and different streets are on different phases.
|
Why does water damage low-voltage microelectronics so easily? Everybody has had the time where water gets all over their electronics, and the whole thing gets ruined, like cell phones. At that low of a voltage (3-5 volts), I don't understand why it is such a short-term harm (long term makes sense - corrosion, etc.) If an LED was in parallel with water, maybe a bit more current would be drawn, but it doesn't seem to be enough at all to short out the system, and the LED would still shine. So what is it that permanently damages some electronics and what is the cause? <Q> Pure water is actually not bad for electronics. <S> Pure water does not conduct electricity. <S> I've seen whole PCBs submerged in pure water and they run just fine. <S> It will quickly dissolve/ <S> absorb various contaminants from the environment, and those contaminants will cause the now not pure water to conduct electricity. <S> These contaminants come from the environment-- including the air. <S> So dust, dirt, and even CO2 will cause the water to conduct. <S> Tap water has lots of minerals and salts in it that will also conduct. <S> But normal water (not pure water) won't destroy most electronics when the circuit is off. <S> I frequently rinse off PCB's in the sink, or even a normal dishwasher, to clean it. <S> I just have to make sure that the water completely dries and doesn't leave a residue before turning it on. <S> But the reason why normal circuits, submerged in normal water, doesn't work is because normal water is conductive. <S> It isn't a perfect conductor, but it is enough of a conductor. <S> If you get enough electricity flowing in/through places that it wasn't intended to then that's bad. <S> If you're lucky it will just make the circuit temporarily misbehave. <S> If you're not lucky then you'll have permanent damage. <S> Simple circuits, like an LED+Resistor+Battery will likely work just fine when submerged. <S> The LED might not stay lit, and the battery might be completely discharged. <S> But dry it off and replace the battery and it should work fine. <S> But some circuits are more sensitive. <S> Think of a MOSFET that is switching hundreds of amps/volts. <S> It takes only a little bit of electricity to turn the MOSFET on, and the water is just conductive enough to cause it to turn on. <S> But now you have huge amounts of power turned on when it shouldn't be-- <S> so it is no surprise that something can be damaged. <S> Or think about the resistive voltage divider on the feedback of a DC/DC converter. <S> That is what sets the output voltage. <S> Add some water and the output voltage could be forced too high. <S> It wouldn't take much for water to mess up that divider. <S> Now, instead of outputting 3.3v it is spitting out 9v. <S> Of course, any chip that is being powered from 9v instead of 3.3v is probably dead. <S> So, non-pure water is bad. <S> It kills things. <A> Although I have never heard of this happening, it is also possible that powering-up a water soaked device containing a cheap SRBP board could be a fire risk. <S> As a reckless teenager I used to take delight in wiring 12V dc across a pair of adjacent tracks on a piece of cheap stripboard, then placing a drop of tap water across the tracks. <S> At first, all you get is a load of hydrogen & oxygen but eventually the heated water partly evaporates and partly soaks into the cheap SRBP base material. <S> Eventually, the board gets so hot it starts to carbonize, then sparks appear between the tracks and ultimately the board catches fire! <S> I don't know what the minimum voltage would be for this to occur (I haven't tried recently!) <S> but 12V at a few hundred milliamps will do it with 0.1" pitch Veroboard. <S> I have a disused in-car mobile phone charger which would be an ideal candidate for an experiment later ... <A> Low-voltage microelectronics often have low tolerances to higher currents and voltages. <S> It's the nature of improved micronization and energy efficiency. <S> By adding water, you are adding electrical paths for various parts that were not meant to be there. <S> Things get shorted out, protection parts get skipped, parts can receive higher voltages than they can tolerate. <S> A given device might be powered by a 3.7 V battery or 5 V USB connection, but there could be step-up regulators for certain subsections of its electronics. <S> You might have a device with a step-up to 18 V. Add water to create an unwanted electrical path, and that 18 V subsection just shorted out to a 5 V-only section, killing every chip on there. <S> An IC could only support sinking or sourcing 10 mA. Add water and a short to ground or V cc would cause a lot more than 10 mA to be pulled, frying that IC's pin, if not the entire chip. <S> Poof, there goes the LCD on your phone. <S> To compare, your car can sit in the rain without water getting in (if it's well designed and maintained, naturally). <S> Drive it into a river (or <S> the river comes to you), and water will destroy the inside of the cab and engine. <S> That's what you are doing when you introduce water to electronics.
| The problem is that pure water does not stay pure for long. The main reason this happens is because it is not individual, unpowered parts, but an entire board of possibly thousand parts, all with various maximum voltage and current thresholds that are carefully laid out in a manner where electrical paths are carefully controlled.
|
What is Switching Threshold? I know that the inverter switches when it crosses switching threshold,but I have doubt that inverter switching should be considered when it is in Vil region or vih region. for example ,suppose Vm=0.45Vil=0.35vih=0.55 so when v input changes above vih or below vil then only switching should be considered and not when it crosses Vm...Is this thought process right?if yes then what is true meaning of Vm. <Q> In this mode of operation, it's best to think of an inverter as being a very high gain inverting amplifier. <S> A slight movement around the Vm point will be amplified on the output. <S> Indeed that is one application of inverters as analog amplifiers around a limited input range. <S> Whether or not it get's inverted is determined by whether or not teh follow on logic reads the input as having met their threshold. <S> So it's inaccurate to say it's indeterminate, perhaps transitioning is the better way of looking at it. <S> Here is a link to an old fairchild datasheet (warning *.pdf) <S> that shows the curve. <A> Reading across the lines, I assume that Vm is the switching threshold, and the voltages are given as a fraction of the supply voltage (Vcc). <S> These specifications say that any voltage below Vil will be considered as a Low, while voltages above Vih will be considered as High - the device will not switch while the input voltage is above Vih or below Vil. <S> If the input voltage is between Vil and Vih, the input state is indeterminate - the device may consider it as either High or Low. <S> The Vm spec indicates that input voltages between Vil and Vm will probably be considered as Low, and voltages between Vm and Vih will probably be considered as High. <S> I'd expect Vm to be stated as a typical (not guaranteed) value which may vary between devices. <S> I hope this answers your question <S> - it would have helped if you had provided a pointer to a datasheet or whatever caused you to ask the question. <A> The V il and V ih specs are promises about every part you buy with that part number. <S> The switching threshold is a characteristic of each individual part at a particular operating condition. <S> It's even possible for the switching threshold to be different for low-to-high transitions than for high-to-low transitions. <S> Schmitt trigger devices are deliberately designed this way. <S> In simulation, the model will generally have a "typical" switching threshold, somewhere between V il and V ih , without variation between instances. <S> This is one of the ways that simulations don't exactly reflect reality.
| The switching threshold is promised to be above V il and below V ih , but it is likely to vary from part to part, at different temperatures, or if V dd changes.
|
Why do we connect a resistor before a Zener diode? Why do we need a resistor in a Zener diode circuit, like in the diagram below? I understand it is to limit the current but how so, and why do we need it for a Zener diode? Does selecting different values of resistors affect the circuit performance? So when we are selecting a Zener diode we look in the specifications at different reverse currents that can flow through them. But if those can be changed through resistors, can we select any Zener diaode at a voltage, without looking at the maximum current? <Q> Rather than going to 'no resistor' consider what happens if we just use resistors of different (lower) values and look at the pattern. <S> As we reduce the resistor value the current through the zener will rise. <S> Even if the voltage source is not perfect the power dissipated by the zener will cause it to fail due to overheating. <A> The current through the resistor is, by KVL and Ohm's law: \$\dfrac{V_{IN} - V_Z}{R_S}\$ <S> This is the maximum current through the zener diode and <S> so, \$R_S\$ is chosen to limit the current through the diode to some value such that the maximum power dissipated by the diode is below the maximum power rating. <S> For example, if the Zener is 12V, 1W device, we would want the maximum zener current to be less than \$\dfrac{1}{12}A \$. <S> From a comment to another answer: <S> can we select any zener at a voltage, without looking at the maximum current? <S> The point of Jim's answer, and mine, is to emphasize the power dissipation associated with the zener diode. <S> Since our answers are evidently not sufficient in this regard, consider the following excerpt from a zener diode data sheet: <S> Note <S> the first entry is the absolute maximum power dissipation . <S> In this case, \$P_D = 500mW\$. <S> So, if you pick a zener diode from this family with a zener voltage of \$V_Z \$, you must pick a resistor to limit the maximum current to be (perhaps considerably) less than : \$I_{Z_{max}} < \dfrac{P_D}{V_Z}\$ <S> For example, if you pick the 1N5231B with a nominal \$V_Z = 5.1V\$, you must choose a resistor such that \$I_{Z_{max}} < \dfrac{0.5W}{5.1V} = <S> 98 <S> mA \$ <A> Neither a power supply nor a Zener diode is ideal. <S> Without a series resistor this means: <S> The Zener diode current will be very high <S> The voltage across the Zener diode will be higher than specified due to its internal resistance Due to the large current that may flow the power dissipation, (\$P_{dissipated}=V_{zener}×I_{zener}\$), will be huge. <S> Your average Zener diode will have a 400 mW or 500 mW power rating. <A> What is the purpose for using a zener? <S> Short answer: To provide a voltage Vz <S> that is not very sensible to load changes (low dynamical output resistance) - and which can be derived from another voltage source <S> Vo which either is larger and/or does vary too much over time. <S> Remembering KVL, we need a part which can produce the difference Vo-Vz . <S> A resistor in series with the Zener diode serves this purpose
| A power supply has a very low output impedance and a Zener diode has a non-zero impedance.
|
Can I connect TTL gates directly to the address bus of a Z80 CPU? I need to know when the 14 MSB bits from the address bus of a z80 CPU are high. To do so my first idea is to use 4 74LS08 ICs (TTL AND gates) reading those lines but I don't know the maximum amount of current that can be drained from the CPU. The 74LS08 has a maximum input current is of 0.1mA hence 1.4mA from the z80 but I cannot find the maximum z80 ratings on the zilog datasheet. The z80 datasheet mentions a TTL chip select decoder connected to the address bus but no mention of the IC ratings are given. so, can I connect 14 TTL inputs to the z80 address bus without overloading the z80 outputs? z80 datasheet 74LS08 datasheet Clarification One TTL input per address line, not 14 TTL inputs per address line. <Q> When the Z80 was young, 74LS was the commonly-used logic family. <S> You should be able to connect a few 74LS inputs (say 3 or 4) to each Z80 address line without problems. <S> If you really need to drive 14 74LS inputs from one Z80 output, you should probably add a buffer between the Z80 and your 14 inputs, so the Z80 only sees a single load on that output. <A> The Thomas Scherrer Z80-Family Official Support Page has a file called Z80 CPU DATASHEET (ZIP'ed PDF file) that contains some additional information on the DC characteristics of the Z80A. <S> While it doesn't specifically mention a maximum that I can see at 250uA the minimum output high voltage is listed as 2.4V. <S> That should be a a good consertaive value as a few 74LS devices I checked listed 2V as the minimum input high voltage. <S> Certainly if connecting 14 device inputs to a single output <S> I think you'd need a buffer, however in this case when you have 14 different outputs going to 14 different inputs that won't be necessary. <A> http://www.fairchildsemi.com/ds/DM/DM74ALS138.pdf <S> (An ALS variant, but this is close enough). <A> One or two TTL loads per pin is entirely acceptable for a Z80. <S> More than that, read up in more detail... <S> I would use a pair of 74LS30s (8-input NAND) and a single NOR gate to combine their outputs, rather than a complex array of AND gates but they should work..
| A few 74LS138 (3 to 8 decoder) would be a better and easier solution than many 74LS08s.
|
Powering 800mA router for approximately 1 min I need a cheap way of powering my internet modem (rated at 0.8A, 12V) for approximately 1 minute in case of power failure (which happens every hour or two) till my secondary power takes over. I am thinking capacitors but i am not sure if they will be able to power for 1 minute. Edit: If i connect a 12 v battery in parallel and update the power adopter to 14V to charge the battery, would this kind of setup damage my modem? <Q> One problem with capacitors for power backup applications is not so much if they can be used, it's also a matter of cost. <S> Just using an on-line supercap discharge calculator as an example and plugging in a few numbers assuming a 12 -> 9V drop would still keep it running OK <S> I came up with a 20F capacitor for a bit over a minute. <S> Although a bit larger than required on Digikey at the moment the cheapest part that I found that met or exceeded those requirements was a 58F 16V Capacitor at a bit over $US140. <S> That's not too over the top <S> but if you were trying to connect across a normal modem power supply you'd also need to consider the inrush current as the capacitor charges so it might not be as simple as just placing one across the supply. <S> While SLA batteries do degrade over time I'd expect a small UPS to be able to provide that small amount of backup time for quite a long period, maybe say five years until the batteries needed replacing. <S> As an addendum to your updated question when connecting an SLA battery in parallel you may experience similar problems with an inrush current. <S> While I wouldn't expect the battery to draw much current after a few minutes of discharge (if fully charged at the start) for safety you should also consider what would happen if power was out for hours and the battery discharged completely. <A> You have two options here. <S> 1) Use a UPS supply that is ready to go. <S> This will cost a couple hundred dollars. <S> 2) You can create a custom board which can detect 12V primary failure and generate 12V. <S> You can use one Lithium Ion/Poly battery along with a DC/DC converter to raise the 3.7V nominal to 12V. Taking into account that you're multiplying the input voltage by 3.25 <S> you will need an input current of 2594mA. <S> This is the ideal situation. <S> In reality, taking into account DC/DC inefficiency, lets say 20%, so you'll actually need a battery which can sustain 3200mA. Several batteries such as 10Ah batteries can support this for one minute. <S> Of course this method is a bit more complicated, and a UPS might be the easy way. <S> For battery charging, TI provides several devices that can support charging the battery. <A> I have attached an old (probably expired) 12v car battery with the modem in parallel, and it works perfectly, i am able to run the modem on battery power for hours, and it didn't even cost me a penny <S> but i may need to periodically charge the batteries.
| I'd expect that for that voltage / current assuming that the modem is normally powered from mains that a small UPS using an SLA battery would be a cheaper and better solution.
|
Arduino Mega 2560 not detected when connected to USB port I've just received Funduino Mega 2560 . This is a Chinese product and should be the exact copy of Arduino. I am having problems connecting it to my computer and have spent several hours trying to figure it out to no avail. My operating system is Windows 7 x64 and here are the steps that I tried: Restarting Windows. Pressing Reset button on the device. Switching to other USB ports on my computer. Using different cables (including the one that works with my printer). None of this helps. The device is not listed in Device Manager and Windows does not produce the sound when connecting plug-and-play device. Because of this, I am unable to get to the point to install the drivers for it. I have also tried to put the device in DFU mode by shortening RESET and GND next to Mega8U2 chip in order to try to upload a new firmware. The device is not responding. Here's the video footage when the device is plugged in. Power LED is constantly on and L LED is flashing in a specific pattern. Can anybody help me on how to get this thing detected by my computer? <Q> I could not get it to respond in any way <S> and I ended up using my AVRISP mkII programmer and ISP interface to program Mega2560, while using TX0/RX0 pins for serial communication. <A> There are many things that could cause the issue. <S> Some of the things to look for are: 1) <S> Some cables have caused USB issues. <S> 2) <S> Some Arduino boards need a solder in the back. <S> There are two pads that should be shorted together. <S> Try to short them and see. <S> These connect GND I believe <A> Here are some suggestions for you to test it.1.The USB cables you used may be damaged. <S> Please test the cables to see whether the cables work.2.Change other USB ports to have a try. <S> Sometimes, the problem is caused by the power supply which is not enough. <S> Pls make sure the input voltage is 5V if it is connected with USB port. <S> If it is connected with power supply directly, it is necessary to provide 9V input voltage. <S> Hope it will be helpful.
| Try to use a good cable. After many hours of trying to find a solution, I've concluded that Mega8U2 chip serving as USB to serial converter is dead.
|
What language do microcontrollers use apart from C? I want to start making devices and I read about microcontrollers and other stuff on the Internet. I wonder if there are other languages to program microcontrollers with in addition to C. <Q> Chips do not directly use C at all. <S> They have instruction sets that vary greatly between different architectures. <S> As a very low level abstraction of these instruction sets, most manufacturers provide an assembler, through which you can translate programs written in the relevant assembly language (which is roughly a more human-readable form of the machine instructions) into binary form that you can upload to your chip. <S> At the next higher level, there are languages like C. C is by far the most dominant language for microcontroller programming at this level. <S> In theory, the only thing that you need to use a given language on a given architecture is a suitable compiler (although some, like Java, C#, etc usually depend on runtime environments, and these are prohibitively resource-hungry for most uCs). <S> In practice, there aren't that many compilers available. <A> As us2012 said, a µc does not actually run the C language at all. <S> It instead runs machine language which is a binary representation of the instruction set of the µc, with fields for an opcode (what to do), and either register specifiers and/or addresses (where the data is fetched from and/or stored.) <S> Assembly language is a symbolic representation of this binary machine language. <S> In the case of the C language, these machine instructions are generated by a C compiler, which almost always runs on a computer separate from the µc (an exception is embedded Linux, which includes the gcc compiler, running on a µc with sufficient resources to run a compiler). <S> When the compiler is run on a PC, this is known as cross-compiling. <S> Each separate source file containing the C language statements is compiled separately, and the output of each is combined into a single downloadable file by linker program. <S> This downloadable file contains the machine language instructions mentioned above, and can be directly run on the µc. <S> If you want to run a different language on the µc, you would need a different compiler for that language. <S> However there are a number of languages that are not compiled to machine code, but instead are compiled to bytecodes; these cannot be directly executed by the µc but instead have to be executed by an interpreter running on the µc (a variation is to compile the bytecodes into machine language the first time they are executed by the interpreter). <A> Another candidate language for programming microcontrollers is Ada. <S> It offers very good facilities for low level programming, as well as better detection of certain types of error before you get to the stage of running the program, which I find helps me develop considerably faster than in C. <S> The resultant executable can be just as small as C, not so surprising when you realise that most of the Gnat Ada compiler is the same optimiser and code generator as the commonest C compiler (gcc). <S> Another benefit is that the code can be much more readable than C; another way to make problems easier to eliminate. <S> Beyond the smallest microcontrollers, it also offers good.object oriented and multitasking facilities; the equivalent of an RTOS is built into the language. <S> Two downsides: <S> Ada has an undeservedly poor reputation inherited from a 30 year old version that you are unlikely to encounter nowadays - you may hear quite emotional reactions against it. <S> Ada-2005 is a very different language... <S> And not every microcontroller has an Ada compiler and toolchain. <S> Two popular ones that do, are the Atmel AVR (so you can program your Arduino boards in Ada) and the Texas Instruments MSP430 series. <S> There are also Gnat builds available for many varieties of the ARM processor, including the Raspberry Pi Debian distribution. <S> Any other GCC target can potentially support Ada, though building GCC is not usually a trivial project... <A> As the other answers say, most uC's come with toolchains that support C and some other similar languages, because larger languages, especially those with garbage collection, are very resource hungry. <S> But, in the spirit of Atwood's Law : "Everything will eventually be ported to Javascript", I give you the Espruino , "The world's first JavaScript microcontroller for beginners or experts.": <A> As one of the other users commented below your question, Arduino is very popular and versatile in terms of projects and uses. <S> It has its own language that is very similar to C... <S> for example declaring libraries, variables, and making function calls. <S> However, it has some of its own inherent functions that you will have to learn the syntax for.
| For some architectures, you will also find the odd Pascal, BASIC or maybe Fortran compiler.
|
Why is the output volume lower on a 1 transistor preamp I built the simple common emitter 1 transistor preamp with a 2n3904 from hackaweek ( http://hackaweek.com/hacks/?p=327 ) and hooked it up to my iPod as a test. When I had the small earbuds on my iPods output, the volume was louder than the preamps output. Why is this and why is it called an amp if it attenuates? <Q> The schematic shows that this is a voltage amplification stage with poor current sourcing ability (that is, not a power amplifier by any stretch). <S> Its output impedance is essentially that of the load resistor R3, and that is 10K. <S> (That is a property of common-emitter amplifier circuits: the load resistor determines the output impedance.) <S> So it is not going to work well into loads whose impedance is a three digit figure, <S> let alone two digit or single. <S> The author of the circuit knows this, which is why he calls it a preamp . <S> If you hook it up to headphones, it will not compete with the amplifier in your portable device, which is properly designed to drive their low (typically 32 ohm) impedance. <S> The earbuds may be "small", but they are hard to drive due to their low impedance: as a load, they are "big". <S> When an amplifier that has a high output impedance is asked to drive a low impedance load, then most of the signal voltage is dropped across its own output impedance, and only a small part of the voltage is bridged to the load. <S> The output and input impedance essentially form a voltage divider. <S> Explore using different loads with this circuit. <S> For instance compare the iPod going directly into a PC's audio input, versus through this circuit. <A> Simplistic explanation: - <S> It's a bit more complex than this but think about the output being from a potentiometer. <S> The junction of collector and 10k resistor is the wiper; the 10k being the upper part of the pot and the transistor being the lower half of the pot. <S> To potentially get a large signal out, you want the no-signal mid point of the junction of collector and 10k resistor to be at mid-rail i.e. half Vcc. <S> This is achieved by the transistor acting also like a 10k resistor. <S> Now, when you apply an input signal, only the transistor can "modify" its resistance - it can go to almost zero resistance and the voltage out <S> will be close to 0V; or it can go to very high resistance (like maybe 1Mohm) and the voltage will rise close to Vcc. <S> But, on average your transistor will "behave" like a 10k resistor with fluctuations up and fluctuations down as the input signal falls and rises. <S> If you wired your input signal across a 20k potentiometer, set the pot wiper half way and, connected your headphones to the wiper, how much signal would you get into your headphones? <S> Well, you would get nearly 50% signal if your pot were (say) 5ohms and your headphones were (say) 100ohms. <S> But they aren't. <S> Does this make sense? <A> why is it called an amp if it attenuates? <S> This requires a response even if it is only indirectly related to your question. <S> This is a good question and goes to the heart of the notion of "amplifier". <S> From wiki : <S> An electronic amplifier, amplifier, or (informally) <S> amp is an electronic device that increases the power of a signal. <S> Note that is the power of a signal that is increased. <S> But power is the product of voltage and current. <S> Thus, it is entirely possible to have an amplifier that has, for example, a voltage gain less than 1 (the output voltage is less than the input voltage) but a power gain greater than 1. <S> An example is the c ommon collector ( drain , anode , ...) amplifier, also known as an emitter (source, cathode...) follower. <S> The voltage gain of this amplifier is 1 than one but <S> the current gain can be much greater than 1 <S> so the power gain is greater than 1. <S> As a contrast, consider the ideal transformer . <S> We wouldn't think of calling an ideal transformer an amplifier but, in fact, a transformer can provide voltage gain or current gain. <S> But, it cannot provide both . <S> In fact, for an ideal transformer, the input power and output power are equal; the power is neither increased or decreased; it is neither an amplifier or an attenuator.
| An amplifier can, in fact, attenuate voltage.
|
What was used to detect light before the invention of photodiodes/phototransistors? Were there technologies before photodiodes/phototransistors or similar semiconductors, which could be used to start or stop machinery based on the amount (or presence/absence) of light falling on them? <Q> Photoresistors were the predecessors of photodiodes. <S> Instead of acting as current source they were light dependent resistors (LDRs). <S> Their main disadvantage is that they react very slowly to light changes. <A> Not really used in a similar way for stopping machines like in your question, but before there were phototransistors/diodes we had photomultiplier tubes . <S> Under influence of a high voltage a single photon that collides with the light sensitive cathode will release several electrons. <S> Then these electrons are attracted to the anode, on their way there collide couple times again, releasing even more electrons. <S> Anyways, the wiki article linked is much better in explaining the mechanics. <A> They are still used in some applications and as per a photodiode comparison with photomultipliers looking at the some disadvantages of a photodiode some areas where a photomultiplier has advantages: <S> Larger detection area Has internal gain <S> Much higher sensitivity <S> Photon counting possible without special cooling and interfacing electronics <S> Response time faster for many designs <S> While no longer typically used for that purpose the articles states them as being the first electric eye devices, being used to measure interruptions in beams of light. <S> Here's an image from the above Wikipedia article of what one looks like: <A> Simpler than the photomultiplier tube is the basic vacuum tube photodiode: <S> The curved plate is the photocathode, and the wire post in the center is the anode. <S> Photons knock electrons free from the surfaces of both elements, but since the area of the cathode is so much larger than the anode, there's a net flow of them from the cathode to the anode — which can also be thought of as a "positive current" from anode to cathode. <S> Albert Einstein got his Nobel Prize (1921) for explaining how this works (paper published in 1905). <A> The first electrical light sensors were selenium cells. <S> Selenium was used for resistances at the receiving station on the transatlantic telegraph cable in the 1860s, and it was noticed that it gave erratic results in daylight. <S> and (I think) "Magic Eye" demonstrations at the London Science Museum... <A> It was in <S> 1873 Willoughby Smith discovered that the electrical resistance of grey selenium was dependent on the ambient light. <S> The first commercial products were developed by Werner Siemens in the mid-1870s. <A> The very first image sensors were vidicon tubes, which are a vacuum tube technology. <S> These are made from low work function metals in a photocathode. <S> These devices are still indirectly referenced in modern sensor designs. <S> When someone says they have 1/2" sensor (or 1/3" or 1/3.4 <S> " etc) they are comparing the image diagonal to a vidicon tube diameter which for a 1" external diameter was roughly a 16 mm imaging area. <S> But that isn't a "standard" either.
| A photomultiplier tube is one such device. Selenium can generate a small photovoltaic current so it was used in pre-war lightmeters
|
What FPGAs support USB 3.0 super speed OOB signals? I would like to build a USB 3.0 PHY with FPGA. I have heard that some FPGAs transcievers should support OOB that is used in USB SuperSpeed differential lines. I am also wondering if such devices exist in ball-less package (I would like my device to use 2 layer PCB). I am aware of FX3 devices from Cypress and PHY from Texas Instruments but they are both BGA devices. <Q> and they dropped that path completely. <S> Recently there are new IPs on the market that uses the GTX transceivers on the high end FPGAs such as the V7 and some V6 and Zynq devices to interface with the electrical requirements of the USB 3.0. <S> I am not sure if it is safe to design a PCB for 5Gb/s data rate of the USB 3.0 with only 2 layers. <S> Here you have a link to the IP company that Xilinx works with: USB 3.0 Device (USB3_DEV) <A> To answer my own question. <S> There are few options: Actel: ProAsic2, IGLOO2 <S> Xilinx GTX capable devices: <S> ex. <S> Spartan 6, Kintetix 7, Virtex 7, Zynq Altera: <S> Starix IV, Arria II <S> Those compatible devices are available in BGA packages only. <S> It makes little sense to put a few Gbps transciever in small FPGA. <S> From what I see now (September 2013) it is the best to use Cypress FX3 + FPGA. <A> These days there's another solution: TUSB1310A from TI . <S> You could interface it even with a rather low-end FPGA, but it is a BGA product, and you will need ideally a 6 layer board to use it. <S> Unless your product will sell in 10's of thousands, you're really valuing your time very low if you think that a 2-layer design will be cheaper. <S> Just to rent the tools to validate the design is thousands of Euros, and if your design has issues, you'll be paying that over and over again until it passes.
| Earlier in 2012, Xilinx had some support for US 3.0 PHY in their devices, but it didn't work out
|
Why DC voltages in series do sum (or subtract, according to polarity)? This is a newbie question. It is clear that if you put two (or more) DC voltage sources in series like this: simulate this circuit – Schematic created using CircuitLab And you measure total voltage between A and D you get the sum of the two voltages.I also realized that if you flip one of the sources, its voltage is to be subtracted from the total. So if I flip V1, I get a total voltage of 7,5 from A to D. The point is, in short, is that I cannot understand why. Voltage is the potential difference between two points. As far as I have understood; when you take a single cell into account, that voltage is given by the fact that there is a difference in charge between one pole and the other of the cell.So, when you close a circuit between A and B (or A and C whatsoever being nothing in the way from B and C), then electrical charge searching for its balance finds a way to, and it start flowing from one point to the other, according to the resistance it may encounter.Same goes for Battery #2 of course, between C (or B) and D. But when you put the batteries in series, what is going on between B and C if you close the circuit between A and D (with eventually any resistance in the middle)? Why is the overall potential difference increased (or decreased, according to the polarity?). How are electrons flowing between all the points? Why? <Q> It's not really a difference in charge, it's a difference in the energy of the charge. <S> As an electron moves through a battery from the - terminal to the + terminal, a chemical reaction in the battery adds energy to the electrons. <S> For some batteries, you can make electrons flow into <S> the + terminal and exit at the - terminal. <S> In that case, the electrons lose energy when they cause a chemical reaction that recharges the battery. <S> Note that the electrons will try to move to a place where they have lower energy, so current always flows through a resistor from the terminal with high voltage toward the terminal with low voltage and the energy of the electrons is always expended as heat. <S> You ask "what is going on between B and C?". <S> Nothing. <S> They are electrically the same point in the circuit, and they have the same voltage by definition. <S> Also, just to be pedantic, there are no electrons flowing in the circuit you drew because there does not exist a complete path for their flow. <S> Although no current is flowing, the charge at different points has different levels of energy. <A> For this case you can visualize Voltage not as the amount of electrons flowing but the pressure behind them. <S> In this analogy the electrons are like air, pumped around by the batteries. <S> Note that in this case the batteries are constant-pressure-adding pumps, not constant-flow pumps. <S> In your case battery 1 pumps electrons from D to C, adding a pressure of 9V. <S> If you wire a lamp from C to D, the battery will force electrons through the lamp with a pressure of 9V. battery 2 will pump electrons from B to A, adding a pressure (at B) of 9V (relative to A). <S> When we regards things relative to D, the electrons at C and D already had a pressure of 9V, so at A they will have a pressure of 18V (relative to D). <S> Note that we don't care what the absolute pressure at D (or any other point) is. <S> Electrical Voltage is always relative to some assumed 0 point. <S> If you wire a lamp between A and D electrons will circle round the loop, from A through the lamp to D, pumped to C, through the wire to B, pumped to A, and back into the lamp. <S> I talked about electrons here to simplify things, the more accurate term is charge. <S> Charge can also be conveyed by ions, and an electron that flows into a wire might is not likely to be the electron that goes out at the other end. <A> This is because you are referencing a potential difference. <S> A battery will have a given potential difference. <S> Assuming we are dealing with small potentials, you will not change the potential difference from one side of a battery to another. <S> If you place the positive side of a battery (anode) at some positive potential the other side of the battery will be the battery's potential difference lower in voltage. <S> It will appear as a voltage drop
| An increase in voltage between two points means that the charge (electrons, usually) at the point of higher voltage have more energy than those at a lower voltage.
|
High Voltage input and output microcontroller I am new to this, but I am looking to regulate a few ballast controlled fluorescent lamps with a micro-controller. Everything I look at has a low operating voltage and below 10 volt input/output voltage. I want to have a/c hookup to the microcontroller with full power output to the ballast (when told to do so by the program on the chip). Am I misinterpreting what the input/output and operating voltages mean, or are high voltage applications of microcontrollers not too common? I was looking at some arduino products or something similar. Any direction or clarification is much appreciated. <Q> I think all microcontrollers operate on 5 volts or less, and all inputs/outputs are also 5 volts or less. <S> It is very common to have level translators between the microcontroller and whatever it is controlling. <S> To control 120 volt (or 230 volt) <S> AC devices, you could use a mechanical or solid state relay that could be driven by the microcontroller.. <A> Usually you do not switch something directly with a microcontroller. <S> You switch something that swithes something other. <S> In this case you will probably have to switch a transistor that will switch a relay that will switch AC to your load. <S> Something like this: simulate this circuit – Schematic created using CircuitLab <A> I'm not sure if there are microcontrollers which can handle more than 5 volts and PLCs <S> are the ones used by industry for such a situations. <S> But as was pointed out by others, whenever we need to control voltages higher than 5V we use switches as interface. <S> basically we control a switch which has a bas voltage of 5V and it controls the higher power line, <S> what ever bigger than 5V. MOSFETs and BJTs are two good examples of such a transistor switches. <S> they basically have three pins. <S> one 5V input and two xV input/outputs where x>5. <S> By switching the 5V pin one can open or close the xV connection.
| You might find a low switching voltage and low current relay that could be driven directly from a microcontroller pin, but this way I've shown you can use almost any relay.
|
How to add a controlled amount of jitter to a signal Background I am developing a digital clock and data recovery circuit and am now getting into the evaluation phase, focusing on testing the limits of the design and finding potential strengths and weaknesses. An important metric of this particular design is the tolerance to jitter in the asynchronous input signal. To evaluate this metric, I have a test setup in mind as below. simulate this circuit – Schematic created using CircuitLab Problem To ensure the results of the testing are meaningful, it is desirable that the jitter have these characteristics: Random or pseudo random Gaussian distribution Standard deviation of noise is parameterized and can be swept (JITTER CONTROL above) This doesn't seem like an easy thing to accomplish. Is there relatively simple way to inject a controlled amount of jitter into a test setup? What I have so far I've given it some thought and research and I have two potential ways to implement this in hardware. If the test circuit transmission clock is significantly higher than the DUT, then the output can be oversampled. Then, extra samples can be added or removed from the output to inject a discrete amount of jitter. This jitter won't be perfectly gaussian due to the quantization noise. But if the test circuit's oversampling rate of the transmission data is high enough, this concern can be mitigated. The test setup by Kubicek et al. (below) uses an optical transmission with a variable attenuator to achieve the desired effect. Its not at all obvious to me why this would achieve the above, but a spectrum analyzer should be able to determine if it works as intended. I understand my question omits many details about the design and test setup. This is intentional as I want to keep this as conceptual and general as possible. I want to avoid this becoming a design-specific post in favor of creating a post of permanent reference value. <Q> Keep in mind that this noise signal will represent an instantaneous frequency error, rather than the phase error that you normally associate with jitter, so integrate/differentiate appropriately. <S> You show a separate circuit adding jitter to a clean signal coming from a test generator. <S> The VCO could be part of a PLL in that separate circuit. <S> The PLL will keep the average output frequency the same as the input frequency, but will have minimal effect on the added jitter as long as its feedback loop has minimal gain at the jitter frequency. <S> If you intend to generate more than a fraction of a unit interval of peak-to-peak jitter, you'll need an elastic store (FIFO) of some sort to hold the test data. <S> It might be easier to just use the jittered clock to generate the data in the first place. <A> The test setup by Kubicek et al. uses an optical transmission with a variable attenuator to achieve the desired effect. <S> Its not at all obvious to me why this would achieve the above <S> Your implied question is, "what is going on in Fig 5 to create controlled random jitter?". <S> First, realize that every optical receiver introduces noise to the received signal. <S> This noise is quite accurately modeled as gaussian random current noise. <S> The receiver's trans-impedance amplifier ( <S> TIA) stage naturally converts current noise to voltage noise. <S> The photodiode/TIA output is an analog signal proportional to the optical input signal, plus the added noise we just talked about. <S> What's hidden in the drawing is a limitting amplifier to obtain digital logic levels from the TIA output. <S> I guess this is happening in the fan-out buffer in the as-drawn circuit. <S> When you apply a limitting amplifier to a noisy input, the noise will be converted to jitter, as there's variation in what time the rising and falling edges cross the decision threshold. <S> This timing variation is jitter, and it's proportioanl to the noise at the input and inversely proportional to the slope of the edges (dV/dt). <S> As you increase the optical attenuation, you reduce dV/dt, but you don't reduce the noise, so you increase the jitter. <S> About the VCO solution FM'ing your timing source (as suggested by Dave's answer) is not likely to produce gaussian random noise as you requested in your question. <S> Certainly not random noise that's uncorrelated from edge to edge (random jitter or "RJ") which seems to be what you are after, and what you will get from the Kubicek circuit. <S> This is a good method to obtain frequency-swept sinusoidal jitter (SJ) which is another spec you need to worry about when characterizing a CDR. <S> In fact it's much more common in my experience to spec CDR's by their tolerance for single-frequency sinusoidal jitter than for their tolerance to uncorrelated gaussian random jitter. <A> One thing you can do is to implement a version of the delay circuit that is used in DLL's. <S> This is typically a current starved inverter chain. <S> You need to degenerate the current supply from the rails into the device and the current supply out of the device (for symmetry of rise/fall) and have a reconstruction inverter (w/o the current starving ) on the output. <S> This would also emulate the most common source of Jitter in sources (partial rail collapse and the being modulated onto the output through the G_m of transistors. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The voltage controlled current sources can simply be PMOS and NMOS transistors but on a board you have other options. <S> You can change the number of stages to increase the control of the delay voltage. <S> To contradict myself, you can also just control the upper supply as long as you keep the number of delay stages to an even number (being inverters they alternately will delay the the rising and then the falling edge). <S> You would then need to have two reconstruction inverters on the output. <S> simulate this circuit <S> However, there is an even simpler way, if you just want to inject noise on the edges. <S> simulate this circuit
| One obvious answer is to use a digital signal generator to add a controlled amount of noise to the control input of a VCO.
|
How to remove solder mask? I'd like to reuse a PCB in non-intended way and I have to remove the green solder mask to expose the copper traces in 1 x 3 cm area. Is there any safe method to do it without damaging the traces? I've tried acetone first, then a bunch of other household chemicals, but it is resistant. <Q> Google "fiberglass brush pencil", once you try that you won't want anything else. <A> Usually a little wet/dry abrasive paper does the trick, use it dry first then damp it a little. <S> That's how I did it when I got a faulty batch which did not have enough mask clearance. <A> I've used an electric eraser equipped with an eraser stick that was the firm pink colored one that had some bite to it. <S> This would be similar to the eraser on a #2 pencil. <S> These have a certain amount of fine grit in them that will remove the solder mask and shine up the underlying copper. <S> (Of course if you grind away at it long enough it would also remove the copper too). <A> I find that a razor knife is too sharp and will easily dig into the copper. <S> What works better for me is a cheapo jeweler's screwdriver. <S> The smaller sizes of straight ends are ground and just sharp enough to scrape off solder mask without digging into the copper. <S> And the shape is easier to control than a knife or sandpaper. <A> Fiberglass brush pencil is good but the ultimate tool for solder mask removal is a "micro sandblaster". <S> These used to be very expensive <S> but there are now some nice units on eBay that are not too expensive. <S> I load mine with baking soda <S> and it gently takes away even the toughest solder mask with little to no damage to the underlying copper. <S> The only drawback is that it makes static electricity <S> so there is some potential to damage boards <S> but I have never had any problem with damaged boards. <A> I had boards manufactured and all of them showed up with soldermask coating the exposed pads on the bottom fo the PCB. <S> The solution that worked best for me was to use a motorized 'manicure pedicure set'- <S> https://www.lidl.de/de/sanitas-manikuere-pedikuere-set-sma-35/p241592?gclid=EAIaIQobChMIyKeC6Piy1QIVbTPTCh2_JA4MEAQYAiABEgIG6PD_BwE <S> The motorized sanding surface was perfect to easily remove the soldermask. <S> Just wanted to post this affordable solution here incase someone came here looking for a quick easy solution to their problem.
| You may get the same results with fine sandpaper, but I think wet/dry is better as it has a finer grain, which is less likely to damage copper traces (especially thin or shallow ones).
|
PWM duty cycle vs candelas for LEDs What is the functional relation between PWM duty cycle for LED and its luminous intensity (candelas)? Linear or not? <Q> You can assume that duty cycle and amount of light emitted are linearly dependent. <S> Usually the rise/fall times of the PWM signal and the LED's brightness are very small compared to the "on" and "off" times so that one may approximate them with an ideal rectangular wave form. <S> As John U said, however, in reality this may depend on the quality of your PWM signal, the impedances of power lines, etc. <S> Besides, one may note that many LEDs can be driven at a higher-than-normal current when used in pulsed operation. <S> This can be used to get, for instance, 10% of the light output with 5% duty cycle. <S> (Which then again may seem like 20% of the brightness to the human eye.) <S> The limits for this kind of pulsed operation are usually specified in the datasheet of the LED. <A> Unknown until you measure it for your circuit. <S> LED's are non-linear, and quite variable. <S> If you're lucky there will be some curves / data in the datasheet for your LED, which will be 50% marketing lies, but may give some approximate idea. <S> Second part: Your PWM / driver circuit may not be entirely linear in power delivered, even if the duty cycle of the micro pin changes perfectly (and there are micros / programming traps that can cause small unintended non-linearities in these things). <A> And as the circuits get more complicated, It gets harder and harder to determine exactly how the d.c would affect the intensity. <S> In most cases you can only determine which d.c gives you higher light intensity. <S> But to find a relation between PWM d.c and candelas is not easy nor precise and varies from one circuit to another.
| In theory, and looking at systems as lumped matters, one should be able to predict the intensity of the light based on the specific PWM.In other words ratio between on-state and off-state defines resulting intensity of the LED.And that is only a relative idea.
|
How to build a timed audio switch? I want to build a simple device with 2 inputs and 1 output, all TRS 1/8" audio jacks. The device picks one of the inputs to pass through to the output depending on the time of day (at night, it chooses B, but for the rest of the day it chooses A). How would I go about doing this? For completeness, it's for a stereo that is inaccessible almost all the time. By default it plays (through speakers) from the radio. I want to attach this device between the stereo and the speakers, and plug in a simple FM receiver (configured to some unused frequency), so that at night I can transmit over FM to control the speakers. If there's an easier way, please do tell, but consider the stereo+speakers locked away after I install the device, so I need to be able to transmit audio wirelessly to the speakers while falling back on the stereo's output. <Q> on a MCU could do it: <S> Set the date and time in the MCU's RTCC peripheral. <S> Make sure it is hooked up to a relatively accurate e.g. 32kHz crystal (if you can't get at it, the clock will drift). <S> Have it wake every 12 hours, switch off one channel's relays <S> using a driver that can handle the current, and then switch on the relays for the other channel. <S> Make sure not to have both relays connected at the same time; I'd use a 100ms delay between turning one off and turning one on, YMMV. <S> A single relay that could do the whole trick, or two double pull single throw relays like in my schematic would work best, but I included the link to the Hamlin relay because I have used it <S> and I am familiar with it. <S> RTCC's are cool because you can use real times and dates, so the programming is pretty intuitive, and you can get fancy and have it change switching times throughout the year (to match sunset times for example) <S> and you can have it correct for daylight savings. <S> Just make sure to mind your power usage if you are only using batteries, and you should have it hooked up to a backup battery if you are powering off the AC, or you will lose the time when the power goes out, which is a bummer. <S> Please note that the 1k resistors were picked to demonstrate that a limiting resistor will probably be needed, and not to say that is the correct value or resistor. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> but you said you have no electronics background <S> so you need to combine an A/V switch and some programmable timer like the ones used for outdoor lights. <A> I would use a commercially available mains timer (either the mechanical type that rotate or a digital one - they're all dirt cheap these days) and wire it to the switching part, which can be any number of designs. <S> A low-volt wall-wart (old phone charger etc.) plugged into the timer powering a small signal relay or whatever would be slightly nicer and avoid bringing high voltage near the audio signal. <S> If you use an Arduino for this, the ghost of Bob Pease will hunt you down and stab you with a Tektronix scope probe. <A> I might have an "out of the box" solution which involves no electronic skills, but require internet connectivity and minimal php programming skills. <S> You could use a YoctoHub-Ethernet and a YoctoRelay http://www.yoctopuce.com/EN/products/usb-actuators/yocto-relay+Ethernet <S> The YoctoHub-Ethernet is able to contact a php server and launch a script which will take control of the relay. <S> From there you can do anything you want, time-based control, direct control from a web page, etc...
| You could go really basic / dumb and use relay(s) with mains-voltage coil, or build some more elegant circuit / device to switch the source using solid-state components. You need to split your problem in 2 parts, one that will determine the time to switch inputs and the actual switch, i would do it with a programmable microcontroller A set of relay switches hooked up to a real time clock and calendar (RTCC)
|
12V MUX with single output I have a VBus of 12VDC. I would like to take 14 discrete inputs and Light a single LED for each input that is active. I was planning on just doing a simple current limiting resistor and having a common anode and allowing the inputs to switch ground. A new requirement was added: If any of the inputs are active they want to switch on a 500mA load on. (ie a buzzer or light). I would most likely do this with a NFET. I would like to try and do this as cheaply as possible. If i use a micro then I need to generate 5v. I could probably do a micro / powersupply / and either optos or resistor divider for the inputs this would cost around $8.00 per board. Can anyone suggest any easier / cheaper way to mux the LED inputs together? <Q> If I understand correctly you're still using each of the signals to drive the LEDs and need to combine them to turn on a single buzzer or light. <S> You can do this with buffers (or inverters for active low signals, not shown). <S> Simply pass each signal through a buffer and combine the outputs to drive the single load device. <S> A discrete component view might look something like this: simulate this circuit – <S> Schematic created using CircuitLab <S> You can use three CD4050Bs (HEX buffers). <S> This will provide easy expansion for up to 18 inputs (I would put them all on the PCB and, for now, only populate the 14 that will be needed). <A> I am assuming (a bit difficulty understanding) that you want 14 LEDs, one for each input? <S> You could use something like this: http://www.intersil.com/content/dam/Intersil/documents/fn72/fn7288.pdf <S> Just use 4 of them, they're cheap and reliable. <S> Mouser has some that run 6 drivers off of 12V, but I would go with the 7457 as I have had a lot of success with it. <S> edit: Because you want one for one, you really don't need a MUX. <A> If I understand you correctly you have 14 switches, one side to ground, the other side to a resistor, then a LED, <S> then 12V. <S> So when you push a switch, the corresponding LED lights up. <S> Now you want to add a buzzer that buzzes when ANY switch is pressed? <S> Just connect 14 diodes, each diode connects to a switch and (all together) to the buzzer, other buzzer wire goes to 12V.
| If your signals are active low, use three CD4049UBs (HEX inverters) instead and hook up the LEDs as you've drawn them in your schematic.
|
What's the name of this component? What's the name of the thing that creates electricity if you add hot things to one side and cool to the other? <Q> It's called a thermoelectric generator (TEG). <S> The Peltier cell is the result of the Seebeck-Peltier Effect, and is the most common TEG. <S> The Peltier cell has two behaviours. <S> First is as a generator: a temperature difference in its sides allows for voltage-current generation. <S> Second is as a cooler or heater: applying voltage and current to the cell through its terminals allow for a temperature difference in the cell's sides, giving rise to a cold side and a warm side. <A> Actually, it's not called a Peltier generator. <S> The Peltier effect is the creation of a temperature differential when providing electricity. <S> The Seebeck effect is the opposite, electricity from providing the temperature differential. <S> The devices are mostly the same, and either will work in both directions, which is why most people incorrectly refer to both as the more common Peltier device (they're inside those little travel refrigerators for your car or CPU coolers). <S> However, there are certain tweaks made to achieve one end goal or the other. <S> For instance, a TEG (thermoelectric generator) would have lower maximum power than a Peltier device, but could harvest smaller differentials more efficiently. <S> I've done some work with this company . <S> They produce TEGs for body heat harvesting, among other applications. <S> They also have these evil looking TEGs for industrial applications: <A> <A> <A> You might be referring to a Thermocouple <S> The voltage output is correlated to the temperature gradient <A> Also known as a "Peltier" generator. <S> Note that the efficiency is low, but increases with the temperature difference across it. <S> Obviously you need to keep supplying heat to the hot side and removing heat from the cold side, or it will equilibriate and stop producing energy. <S> An example item. <A> You are probably thinking of a Peltier Device. <S> These devices are typically used as a cooling device through the consumption of electrical energy. <S> However if the device is placed into a thermal gradient (one side cold and the other side hot) they will become a thermal electric generator. <S> You can read all about it on the Wiki Page .
| There are several "things" that satisfy your description: thermo couple Peltier Element thermionic converter combined heat and power plant Probably a Peltier device sometimes (erroneously) referred to as a Peltier diode because it uses P and N type semiconductor blocks.
|
Safe Discharge Rate of Alkaline Batteries I am working on a portable project. I need to pull 3,500mA average with 10,500mA peak at 3.6v-4.5v. I see that "D" Alkaline Batteries are rated for 1.2-1.5v and 12,000mAh. So I am looking at using a 3 "D" Alkaline Battery Pack to achieve the 3.6v-4.5v supply. Question:12,000mAh / 3,500mA = 3.43 hours is a reasonable amount for this project. But, I have not been able to find anything on the maximum safe discharge rate of Alkaline Batteries. Is it possible and safe to pull 3,500mA average (and possibly 10,500mA at peak) from Alkaline Batteries? If not, can I solve the problem by putting multiple battery packs in parallel? <Q> Getting detailed data on capacity, safe discharge rates, life span and voltage discharge characteristics for most batteries from data sheets is nearly impossible. <S> It seems as all the main stream alkaline battery manufacturers data sheets are little more than glossy marketing brochures with pretty colored pictures with extremely little hard data. <S> One wonders if they do this intentionally to keep customers from gaining expectations over battery performance that cannot be consistently met by the products. <S> Note that it has been my experience that you can get better data if you work directly with the manufacturer. <S> I had previous experience with designing an NiMH battery pack with AAA cells. <S> The industrial division of Panasonic was very helpful at the time of providing test data on their cells. <A> Somewhat related (though answer pertains to AA batteries, not D): <S> Short Circuit Alkaline Batteries <S> It looks like 3.5A might be safe for continuous draw and <S> 10A is just about do-able during peaks, though I might be a bit worried that the internal resistance of the battery will prevent you from reaching the peak currents required, especially when the batteries are nearly dead. <S> It will also vary from manufacturer to manufacturer, and possibly even battery to battery. <S> You can employ a similar solution to those used by camera flashes and other systems which have large surge currents: use capacitors. <S> The lab down the hall from where I work uses them to discharge many MA (yes, mega amps) for extremely short time periods to provide high power bursts. <S> Your low current supply can be used to slowly charge the capacitors up to the correct voltage, then when demand requires capacitors can be discharged extremely quickly because they have very low internal impedance. <S> You'll need to size the capacitance as needed for however large the spikes will be. <S> Keep in mind that some electrolytic capacitors have quite high ESR (an equivalent concept to internal resistance), and may have lower current ratings than what you'll require. <S> Checking the specs/datasheets is always a good idea. <A> I note that battery makers <S> e.g. Rayovac don't mention anythuing above 800 mA in their application notes. <S> I'd take that as an indication the battery is unlikely to perform well for 10,500 mA peaks or 3,500 mA average continuous. <S> Some NiCd D-Cell batteries can be discharged at up to 5000 mA <S> High Rate Discharge(1C <S> ) minute ≥54 <S> Standard Charge, l hour rest <S> Before discharge by 5000mA <S> (1C)to 1.0V/cell <S> up to 3 cycles are allowed If you are considering packs of D-cells (e.g. three sets of three) then you are into the same size and weight as a small SLA. <S> They can easily handle higher currents - I'd consider using one of those instead. <A> Take a look at LiSOCl D batteries. <S> You will need only 1 cell to reach 3.6V. for the current capacity, you might need 2 or 3 cells in parallel.
| Putting a current limiter between the battery and capacitors also wouldn't be a bad idea since shorting the battery to the capacitor is close to just as bad as shorting the battery itself (especially for larger capacitances).
|
Transformer blows fuse at no load I'm building a multi channel power amp and I am having trouble with the power supply. I'm in Europe, so I've got 230V mains and I'm running into a transformer which brings it down to 60V. The problem is that at no load, the fuses blows. As I've installed the circuit breaker, it gets tripped. Am I screwing something up? Is it a problem of having no load? Transformer datasheet (pdf) <Q> Inrush current is greatest when operating no-load on secondary <S> Is it a problem of having no load? <S> Yes, it might be significant. <S> Most likely the problem is "inrush current" and this is due to saturation of the transformer core. <S> At this point some folk may be shaking their heads and not believing this and they may point out that "surely the current will be greater when the transformer secondary is fully loaded and surely this will produce more saturation in the core?" <S> The magnetization of the transformer core is due to the inductance \$X_M\$shown below (with a blue box around it: - This is the equivalent circuit of a transformer and shows other stuff like iron loss and copper losses. <S> When the transformer secondary is open circuit, the copper losses are extremely small and can be ignored; the upshot is that \$X_M\$ receives the full supply voltage because there is minimal volts dropped across the copper loss components and leakage inductance. <S> This means that the magnetization of the transformer is at its highest because when secondary current flows (due to load), the volts on \$X_M\$ reduce slightly due to \$R_P\$ and \$X_P\$. <S> But why should the core saturate? <S> Here's what the magnetic field looks like when power is applied when \$V_P\$ is at the top of its voltage cycle: <S> - The voltage waveform is in black and the magnetic flux (or current) is in red. <S> Forgive my drawing ability. <S> Two scenarios and one produces normal peaks of current (as if the supply had been connected forever) and the other scenario causes the current to hit a big high-spot then settles down. <S> There's nothing mystical about this - this is what would happen in an inductor if you simulated it (look at the current). <S> If the magnetizing current peak is bigger, then so is the driving force of the magnetic field. <S> If you looked at what the flux density is like when the ampere-turns are bigger you are likely to see the flux reach saturation and, when this happens you also draw a lot more current which in turn makes the problem bigger. <S> This settles down after a few cycles of the power waveform of course. <S> What you will probably find is that sometimes the current limit trips and sometimes it doesn't - it's all down to where on the voltage cycle <S> you applied power to the transformer. <A> This is a guess, but you probably have the two primaries connected out of phase instead of in phase. <S> Flip the connections of <S> one of the primaries and see if that fixes the problem. <A> I'm wondering what type of transformer you are using.
| If you are using a toroidal type, on an earthed chassis & have also earthed the securing screw with a separate wire, you will get a short, which will blow the input fuse, with or without a load on the secondary.
|
What are the odds of a miscalculation in an Arduino? I am running an experiment using an Arduino that requires several million calculations per second to be performed by an Arduino. I was wondering the odds (if any) that one of these calculations is wrong, and how I could prevent such an error? <Q> I don't know the odds for this to occur, and I suspect them to be incredibly low. <S> However, if you're really serious about trying to detect such errors, here's one simple way you could <S> : Perform the exact same calculation twice storing the results independently. <S> If all has gone well, both results will be identical. <S> So if you compare them and they differ, you know something went wrong, and you could repeat the calculations until the results match. <S> While it's theoretically still possible that you miss errors, the odds have now been reduced even further. <S> The downside is of course that you at least double the number of calculations and you have to do additional comparisons, both of which take up further CPU cycles. <S> There are certainly other more elegant solutions. <A> Miscalculation? <S> Practically none. <S> That does depend on three things though. <S> Accurate Code. <S> If your code is bugged, your results will be useless. <S> Not the Arduino's fault. <S> Also code that doesn't get weirdly optimized by the compiler. <S> A good understanding of the hidden Arduino Libraries you use would also be important. <S> Efficient Code. <S> At the Arduino's stated max, 16mhz, that leaves only 16 ticks of the clock to do a single calculation. <S> You need fast, accurate code that fits in those 16 calculations. <S> Probably not possible in Arduino code with all its overhead. <S> Maybe not even possible in pure C depending on what kind of calculations you need. <S> Get ready to learn assembly. <S> Type of calculations. <S> The ATMega328 on an Arduino Uno (the ""Standard"" Arduino) has no Floating Point Unit. <S> Any math that requires fractions or decimal results, will be code heavy, and not precise. <S> You will loose/gain some fraction of a digit on every floating point operation. <S> Stick to fixed point and you will have almost no chance of miscalculations. <A> I am running an experiment using an Arduino that requires several million calculations per second to be performed by an Arduino. <S> I was wondering the odds (if any) that one of these calculations is wrong, and how I could prevent such an error? <S> A very bad question in it's nature... <S> If your understanding of 'wrong' calculation is the one, in which the arduino, for example, insted of performing '+' perfroms a '-' operation, then there is no chance that it will ever occur. <S> The operations to be perform are 'nested' in the opcode of each instruction, i.e. you have to have a faulty chip (very unlikely). <S> The calculations themselves can also vary in terms of complexity. <S> However, as mentioned by other users above, arduino takes the levels of programming a few steps higher, by allowing you to directly use floating point operations, or operations such as multiplication/division/power of/ etc. <S> These functions are not implemented in hardware, but are rather performed by many, less complex functions. <S> For example, multiplication of A * B is the same as A + A + <S> A... <S> B times... <S> These complex functions are generally iterative (performed in numbered iterations) and take much longer to execute. <S> Another thing is the precision of floating point units. <S> It depends of the orgarnization of bits (width) or whether you are using exponential for of representation and so on. <S> So to make my point clear: The arduino can't go nuts, unless you tell it to do so. <S> It will not use multiplication instead of division, or perform the correct operation on wrong numbers, unless you program it to do so. <S> And performing millions of calculations per second is a tough business even for much faster and more powerful chips.
| For example a simple addition/substraction (+/-) or bitwise functions (and, nor, xor...) are performed in hardware, meaning the chance of error inside these calculations is very small (nearly impossible).
|
In Eagle PCB, how can I reuse devices from existing schematics? I'm making an Eagle PCB schematic design, a break-out board for the TI cc2540. I have a reference Eagle design with a PCB antenna , and I would like to use that antenna. Looking at the element "info" for this printed antenna, it appears to be in library antennas , but I can't find this library in the default Eagle libraries, nor can I find it using Google. So my question is, where can I get this library for my BLTE chip to use a printed antenna? Edit 1: If this component is not available through a public library, can I select the element and "export" it so I can use in my own library? <Q> The basic organization of Eagle files is that all libraries used end up in the final .brd <S> and .sch file. <S> There exists a User Language Program (ULP) that can export all the parts contained in a schematic, including the package footprint called exp-project-lbr.ulp . <S> This file should be included with your Eagle installation. <S> (thanks to <S> this YouTube video for the general information) <S> The steps are: Open the schematic and board Click the ULP button, or File->Run... <S> Find and run <S> exp-project-lbr.ulp . <S> You will be provided the dialogue below. <S> The selected settings worked for me. <S> Click the Collect data button. <S> You will be given another dialogue shown below. <S> Click Yes . <S> The library containing all the parts in the schematic will be created and opened. <S> The .lbr <S> file will be stored in the working directory and you should be able to add it without too much difficulty to your new project. <S> The antenna part is ANTENNAS_TI_2.4GHZ_MIFA , but even with the layout you need to be careful that you follow the layout given, including the ground connections for it to work properly. <A> There is no definitive "eagle library". <S> Generally, everyone has their own library, with the parts they have drawn up. <S> You need to ask the people who provided the eagle files in the first place. <S> If they don't release the library, you'll have to draw up your own PCB trace antenna. <S> It shouldn't be too much work, considering you have the board file, and TI has an app note specifically about that antenna . <S> See @W5VO's answer. <S> FWIW, this looks to be a project of a random hobbyist, not an official TI design: <S> Please note that this is not an official reference design from Texas Instruments. <S> The board has been assembled and the functionality has been confirmed, but it has not been through RF characterization or any other forms of rigorous testing. <S> Care should be taken when using liion batteries as these can be unstable if used improperly. <S> Using liion cells with built-in protective circuits is highly recommended. <S> It looks like the wiki page for that breakout board was created by User: <S> Kervel , who has no contact info. <A> Starting with v6, Eagle supports true copy&paste. <S> This means that you can copy any part from one design to the windows clipboard and just paste it into another! <S> You can even copy/paste groups of parts, and between two different eagle instances (this wasn't possible before either). <S> This is a MAJOR improvement from earlier eagle versions (where the cut/copy/paste was totally counter-intuitive/horrible) and reason enough to upgrade. <S> Note that you have to use group select + copy even for a single party to make it work. <S> The just paste it in any other schematic. <S> This way you only "import" the parts into the schematic and don't have to worry about from which library it comes or <S> where it should go at all (assuming this is not a requirement).
| Alternatively, it seems like it's possible to extract the parts from the eagle board file.
|
Detecting an open circuit by sensing current flow using a shunt and comparator I need to detect if a load resistor is taken out of circuit. The load resistor is a photoresistor and can vary from 50k\$\Omega\$ up to 2M\$\Omega\$ and is driven by +5V to ground. The approach I thought of was to put a small sense resistor between +5V and the load, and use a comparator to detect the voltage drop across the sense resistor. When current is flowing, there will be a drop across the sense resistor, one comparator input will be higher than the other and so the comparator output will go to (say) +5V. When the load is disconnected, there is no drop across the resistor, and so the comparator inputs are (very close to) equal. However, I can't be sure if the output will switch to ground, since the output state of the comparator is undefined when the inputs are equal. Is there a simple way to add a tiny offset so that the comparator switches at (say) \$ V_+ > V_- + offset \$? That would allow me to guarantee the comparator output when the inputs are equal. I don't want hysteresis here but just an offset to the point where the transition happens. Alternatively, is there some other way to solve this problem? Basically, I want to detect the difference between even a small current flowing and no current flowing. Edit: Especially to those who suggested the wheatstone bridge, what if the photoresistor varies from 50k\$\Omega\$ to 50M\$\Omega\$? At the higher end of that range, the two inputs to the comparator become very close to being equal again... If I use a gigantic (i.e ~50M) resistor (R3 in @markt's diagram) in the static arm of the bridge to compensate for the larger load range, then V- is going to be very, very close to rail; when the load is disconnected, the two comparator inputs are again very close to being equal to each other. <Q> A good cookbook for op-amp designs (Application Note 31 - Op Amp Circuit Collection) can be found here from the former National Semiconductors (now part of Texas Instruments). <S> On the lower part of page 26, you can find a current monitor circuit. <S> It uses a small value sense resistor in series with the load, like your idea, to measure the current flowing through the voltage being dropped across the sense resistor. <A> simulate this circuit – Schematic created using CircuitLab <S> Try this. <A> You probably need to use what is called a bridge circuit. <S> This uses two limbs of resistors. <S> Here's a picture I just found that is similar to what you probably need: - The comparator inputs connect to the mid points of the 2 limbs. <S> It's called a wheatstone bridge if you want to look it up. <S> Here is a link where I took the picture from. <S> This needn't run from +/-15V <S> supplies providing you choose the right comparator or op-amp BUT watch out for leakage currents into the op-amp/comparator inputs if you are using large values of resistance. <A> With a 50 MΩ (presumably) dark resistance it will be very hard to differentiate between sensor present and an open circuit. <S> If there is light on the sensor already the resistance will be low so it won't be necessary to blink the LED. <S> This solution requires at least one extra wire to drive the LED and due to the switching and checking it probably suits a micro-based project rather than a continuous analog-only circuit. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> You should probably check for short-circuits too while you're at it.
| One option that might be worth considering is to mount an LED beside the sensor and pulse the LED periodically while simultaneously checking for a drop in resistance.
|
Is it safe to have 4V continuously supplied to a lithium battery? I have a compact digital photo camera that will be on for very long periods(for a time-lapse video). It is powered by a Lithium-Ion 3,7V, 720mAh battery I want to supply 4V to the battery terminals, while the battery is in the digital camera. This will power the camera and occasionally charge the battery.When the power drops, the camera will still be powered by the battery. Is it safe to have 4V supplied to the battery for long periods(months, years)? I'm thinking that at 4V the battery will be kept at around 80% charge(since a fully charged battery reaches 4,2V).The 4V will be supplied by a LM317 regulator. <Q> I am interested in the answer to this question and, while I have read much on LiIon batteries, I have not seen it answered with certainty anywhere or addressed directly. <S> I agree with the intuitive logic of Ignacio's answer, but I think that he is probably incorrect in practice. <S> Practical information supplied to me by an experienced manufacturer of battery powered products <S> is that the general experience of Chinese manufacturers of LiFePO4 based products is that LiFePO4 cells, which are similar but not identical in general chemistry to Lion, will degrade and die if constant float voltage is applied to them. <S> LiFePO4 cells would if anything be expected to be more robust and resistant to adverse treatment than LiIon (due to the Olivine internal matrix which resists the mechanical degradation mechanisms which LiIon suffers from.) <S> However, ALL LiIon charging algorithms and chargers that I have seen terminate the charge cycle at some point and remove the charge voltage. <S> ie they never "float" the battery. <S> Less aggressive chargers terminate charging when Ichg is say 50% or 25% of Imax, and more aggressive chargers charge until Ichg dropsto say Imzx/10, but none ever let Ichg trickle off to zero. <S> As allowing Ichg to drop to some very low value would maximise capacity and simplify charging it would seem logical that manufacturers would do this if it was acceptable. <S> None do, that I have ever seen. <S> LiIon battery manufacturers all advise a minimum end of charge current. <S> Charger IC manufacturers typically offer several end of charge currents but none ever offer "float" as an option. <S> So, it seems highly likely based on the above, that floating a LiIon battery will cause premature degradation. <A> Yes, since the Li-Ion battery will only absorb as much current as required from the supply. <S> Note that this assumes that the battery isn't "smart" in that it requires signaling from the device in order to begin charging. <S> Also note that this is not true of NiCad or NiMH unless the current is throttled to very low values (0.04C or lower). <A> The alternative is to take the battery out and connect a 3.7V supply instead for this application. <S> The maximum current needed may need to be measured unless there is some documentation saying what the peak current is.
| It is generally advised that use of a lower terminal constant voltage will increase LiIon cycle life at the expense of lower absolute capacity per charge-discharge cycle.
|
How to reduce motor electrical noise? I have made RC car using using ht12e and ht12d , two geared DC motors, RF module. Now my problem is that when motor starts rotating, it is generating some kind of RF signals which are interfering with my RF receiver signals and it cannot receiver further signals from the transmitter unless I reset power to it. I read about low pass filter over net but couldn't understand well. I tried shielding motors using aluminium foil which helped to some extent but not completely. How can I eliminate this problem using simple components? This is my circuit: I have used 433 MHz ASK module. <Q> Firstly look how I've modified the power and ground leads below (in red): - It's important to star-point different circuit blocks back to their respective batteries in order to minimize loop current emissions. <S> The important one is the 12V local to the L293D chip. <S> Talkingof which, be sure to use the version with a "D" on the end because that has internal flyback diodes and without these you'll be producing voltage spikes that could interfere with tesla coils (that was a joke that last bit). <S> Next are decoupling capacitors across each motor - If you are using PWM control you need to be a bit cautious with high values as these will suck energy from the pulse width modulation. <S> Try 10nF across each motor and if necessary try a 10uH inductor in series with each motor with a bigger cap (like 100nF) still directly across the motor. <S> The problem could be also solved by making the whole of the 0V system a local earth plane - there may still be currents flowing in your current set-up that cause the HT12D to glitch and lose control. <S> Make sure you have all the major electronic components decoupled with caps too. <S> Maybe 10uF and 10nF across the HT12 and L293D and receiver. <S> HT12 and receiver should be close together and have as a minimum a shared local earth plane. <A> Measure with oscilloscope the VCC of the module, and VDD of the HT12D, and check for any electrical noise. <S> If so, you may need to add decoupling capacitors ( <S> e.g. 0.1uF) to the 5V near these devices. <S> While still measuring, try various low value capacitors placed across the motor terminals. <S> Start with a few picofarad and double each time. <A> The answer of @JamesCameron is good, but I'd separate the power path to the RF parts and the motor parts as much as possible with LC filtering: <S> kickbacks from the power lines. <S> after the choke, add smoothing electrolytic capacitors in parallel with the circuits (220uF will most likely do, or might even be overkill.) <S> also, immediately at the power, and "non-RF" pins of the sensitive device add very small (~0.1pF) capacitors to reduce RF noise picked up through those pins. <A> You should look into replacing the RF module. <S> I say this because ASK is particularly vulnerable to noise because noise is very additive and can quickly degrade amplitude modulation schemes. <S> Its the reason why AM radios can hear lightning and other things that are going on. <S> Using FSK or similar will help increase your noise immunity. <S> I say this because reducing motor noise comes down to isolating from it. <S> Take a look at XBee or similar simple to use modules. <S> If they use FSK or DSSS you will save yourself a lot of headache.
| there should be a clear point, where the power goes off to the RF receiver and the motor driver from that point, add chokes (actually even ferrite beads might help) in series of both circuits - reducing the high freq. I'd also shield the whole motor driver board in small metal box, and put it as far as it is possible away from the receiver.
|
Decade resistance box with BCD-type rotary switches I'm looking at building my own decade resistance box, but the typical rotary switches are... quite expensive. They seem to be the most expensive part of the entire project. Whether I choose a real rotary switch or a DIP switch or even a thumbwheel switch , the standard decade resistance box uses an SP10T switch that is either expensive or limited in selection. I've seen a lot more switches that use a BCD output code, or a BCD complement code (example: page six of this datasheet, specifically switch functions 1 and 2 . But I'm having a tough time wrapping my head around the connections. In an SP10T switch, you connect the 0 terminal to the "input", and the common terminal is the "output" (or vice versa), as seen here: (source: EEVblog #212) But a BCD switch makes multiple connections depending on the desired code. For example, if I set the switch to 3, then the common terminal will be shorted to positions 1 and 2. In a BCD-complement switch, if I set the switch to 3, then the common terminal is shorted to positions 4 and 8. Either way, I can't come up with an arrangement of resistors that would yield a resistance of 3ohms (or 30, or 300, etc).This is the switch function diagram for the switches I have in mind, which might be a clearer explanation of the behavior I'm describing: Sorry if this question is kind of confusing, I'm having a hard time explaining it myself! To summarize, does anyone have a connection diagram for a decade resistance box using BCD switches? <Q> For a BCD switch, connect resitors wil values of 1, 2, 4, and 8 ohms (or decade multiples thereof) in series, with a switch in parallel with each resistor - the switches short the unwanted resistor. <S> Like <S> so: simulate this circuit – <S> Schematic created using CircuitLab Beware! <S> this will let you set resistances up to 1500 ohms for this decade. <A> This might help I know, they're in Australia, but it's not like Jaycar make them; one of the big international vendors like Digikey, Mouser, RS, Farnell, etc. will sell similar, if not identical, switches. <A> Original quote - "For a BCD switch, connect resitors wil values of 1, 2, 4, and 8 ohms (or decade multiples thereof) in series, with a switch in parallel with each resistor - the switches short the unwanted resistor." <S> CAUTION: <S> Most BCD thumbwheel switches do not work this way. <S> They connect from common to 1 - 4 terminals based on the code. <S> That is, if switch is set at 1, then common is connected to switch terminal 1. <S> If 2, then common is connected to terminal 2. <S> The challenge is for numbers such as 3, where terminal 1 and 2 are connected to common, that is 1 and 2 are in parallel. <S> There is no way to create a decade resistance box with standard BCD rotary switches! <S> They are great for capacitance decades though, as capacitors in parallel add up. <S> So 1, 2, 4, 8 xF capacitors will create a 1-9 xF plus decade (x - any unit, pF, nF, uF). <A> Please watch following video on You: https://www.youtube.com/watch?v=W5kov-MQceY
| Instead of using BCD Thumb / Push wheel switch one can use DecimalThumb / Push wheel switch with extended PCB at back end where 10 equal resistors can be connected in series.
|
Why are circuitboards traditionally green? Green is the most common circuit-board color because it has become an industry standard. What I'm interested in is How the traditional "PCB Green" become a standard in the first place? Were there any interesting historical reasons for the initial choice, or was it just a product of what one particularly successful company was doing that became the de-facto standard? <Q> This is what I have found on the topic so far. <S> There are <S> a few competing theories for why the solder mask of PCB is commonly green. <S> Possible explanations: <S> The US military required PCBs to be green <S> When mixing the base resin and the hardener together, they turn green <S> It is an ergonomic choice due to the human eyes ability to detect green, and the contrast of green with white text <S> Some combination of the above Source: <S> Thefreelibrary Source: <S> Quora Digging deeper... <S> It seems that modern, green colored PCBs emerged with this technology, and the technology seems to trace back to this patent from 1980. <S> Consequently, endeavours have been made to produce improved processes for producing a mask image of relatively high resolution for the small-conductor art. <S> It was therefore a relatively obvious step to use photo processes in association with UV (ultra-violet) sensitive photopolymers. <S> So basically, UV sensitive photopolymers were available and were the first to be used for LPISM. <S> The polymer solution they used in the patent included 3g of dye, but did not describe the color of the dye or why they used it. <S> When developing an invention for the first time, it seems highly unlikely they would choose the dye or photopolymers because of the military's request or for ergonimic considerations, so we can rule those out. <S> The most plausible explanation is that it was the most accessible, inexpensive and effective materials to be used in fabrication. <S> For whatever reason, the UV sensitive photopolymers that were effective for this invention happened to be green at the time, and this material's proliferation is most likely due to its low cost. <S> Alternatives do exist these days, and PCBs can be virtually any color. <S> I know this is all speculation, and I wish I could give a more definitive answer. <S> I've read through patents and papers and Electronic Materials and Processes Handbook , but still haven't nailed it down yet. <S> Maybe a PCB process engineer or researcher can help us here. <A> The following article Soldermask: <S> It’s NOT JUST GREEN <S> Anymore <S> by Jody Williams <S> that I've seen referenced in a few places lists some possible reasons, here's a summary: <S> Based on old military requirements. <S> The most popular resin and hardener at the time came out that colour and the laminates at the time were green as well making it easy to accept. <S> One of those mentions a study by the US military <S> but I haven't been able to find a definitive reference to the study. <S> However the article states it's based on theories from forum posts and none are proven to be correct. <S> It seems mostly speculative but certainly a few and maybe all would make some sense. <A> From "The Printed Circuit Board" on W5TXR.net which contains an interesting history of the PCB, the green boards were a result of experimentation with various pigments to yield an acceptable color from the brownish colors obtained from the resin and hardener used in the original mask: <S> The original masks used a base resin that was a "brownish yellow" and a hardener that was a deeper muddy brown. <S> When they were mixed together they created a honey brown color that apparently not very appetizing. <S> They tried adding red pigments but it became a rusty adobe color and using blue simply made it a darker brown. <S> None of them were very appealing colors. <S> Since the laminate materials at the time had a green hue <S> they tried adding more yellow and some blue and ended up with an acceptable green color. <S> It became the standard color we are still using today. <S> The article may have originated with Advanced Circuits <S> HERE <S> As a side note, our company like so many others always ordered green solder-mask on PCBs. <S> When the RoHS directive came along, we began ordering our boards for our RoHS compliant products in blue so that they could be easily identified. <S> It's a little ironic that the "lead-free" boards are the ones that are not "green" :)
| Green has the highest human eye response so gives the best contrast. Liquid Photo Imageable Solder Mask (LPISM) technology was developed in the late 1970s and early 1980s to to meet the new application demands placed upon solder masks by the rise in surface mount technology.
|
How do I safely connect a 74HC00 series circuit to microcontroller? I built and simulated a circuit out of 74HC00 series ICs and want to connect it to a microcontroller (ATmega 16). The development board I use (Atmel STK500) supplies 4.93 V (GND to VTG and GND to output pin). Can I safely connect the 74HC00 series circuit to power supply of the development board without any current limiting resistor or something similar? Can I safely connect the output of the 74HC00 series circuit to pins of the microcontroller as input and outputs of the circuit without any current limiting resistor? It seems that directly connecting an output to an input pin of microcontroller will create a short circuit. Do 74HC00 series ICs limit current? <Q> You can check the datasheet but generally the components you are working with are all TTL compatible. <S> TTL compatible means that they use standard voltage levels. <S> See also this WikiPedia article on TTL . <A> The IC will only take as much current as it needs from the voltage source, if the voltage is within its operational parameters. <S> There is no need to worry too much about that! <S> Whole situation is nicely explained in this question. <S> Next, when you're trying to connect the 74HC00 (or whatever you have, it's mostly the same for digital input), the input pin of the microcontroller will be in high impedance state. <S> It will not act as a short circuit to ground and very little current will flow. <S> Most microcontrollers start with their port pins in high impedance state and need to be configured as outputs before being able to source of sink current. <S> So in normal operation there is no need to have any current limiting at all. <S> This leaves us with abnormal operation. <S> It can happen due to malfunction of an IC or due to your own carelessness. <S> For example if you have a pin of 74HC00 connected to a pin of the microcontroller, configure that pin as output and set it to low, it will start draining current from the 74HC00 <S> and that can be a dangerous situation. <S> For that reason, I agree with MiljanNC and believe that you should place resistors in series with the lines. <S> Next, we have the actual value of the resistor. <S> Truth is that 74HC00 can't source much current and that on the other hand ATmega can't really sink that much current. <S> If you want in-depth analyses, you can look up pin schematics in their datasheets and see why. <S> If you absolutely want to be 100% safe, you can imagine the source pin to be an ideal voltage generator and the sink pin to be ideal round and then calculate resistor size using Ohm's law, but in my opinion that would be too conservative value. <S> The value of 40 mA per pin and 200 mA in total is absolute maximum rating, that is to say the value at which you can expect the chip to malfunction. <S> For normal operation, I would make sure that current isn't above the tested value of 20 mA. <A> This will provide you some benefits:- save your uC ports from burning out if you accidentally make a wrong connection to power rails- save your uC ports from accidental error in port config (out instead of in)- <S> provide you some level of signal integrity with serial termination <S> I'm used to put 33R <S> where ever I find a signal source on schematic :) <S> This way, at least patching of the circuit is easier :)
| Also do pay attention to what datasheets say! In general, there is no need to have any current limiting for integrated digital circuits unless it's explicitly stated that it's needed in the datasheet. Using a series resistor to perform interconnection between IC-s is a good practice.
|
Differentiation between passive and active components While I (most of the time) know from experience what components are generally considered active or passive, I have yet to come across a satisfying definition. Why do we divide electrical components into those two main categories at all? Some examples: From http://www.electricaltechnology.org/2013/06/the-main-difference-between-active-and.html Active: Those devices or components which produce energy in the form of Voltage or Current are called as Active Components Passive: Those devices or components which store or maintain Energy in the form of Voltage or Current are known as Passive Components How does a Diode "produce" energy? From http://www.differencebetween.com/difference-between-active-and-vs-passive-components/ What is the difference between active and passive components? 1. Active devices inject power to the circuit, whereas passive devices are incapable of supplying any energy 2. Active devices are capable of providing power gain, and passive devices are incapable of providing power gain. 3. Active devices can control the current (energy) flow within the circuit, whereas passive devices cannot control it. What exactly means "can control current flow"? Isn't a (passive) capacitor able to control or at least influence current flow as well? Some people argue, that it depends on the context in which the component is used to be able to consider it active or passive. This doesn't make things easier. Especially for diodes there are so many conflicting/different arguments: "In most cases (rectifier, Zener, etc.) a diode is, no doubt, a PASSIVE device. Only in some special cases like with a tunnel diode, when its negative resistance region is used, it can be considered as an ACTIVE device." "it is an active device.since its impedence is positive,or v-i chara lies in 1&2 quadrants." "Yes it is an active device since it requires an external power source, to operate it in forward or reverse bias." "Diode is an active device, since it can be used as an waveform generator (half wave rectifier, for ex)." "If the i-v characterisitics of the diode are in region I and III, then it is a passive device (always dissipating power). I think most diodes fall into this category." I am pretty sure that there is no "one rule" and you always have to ask several questions about a component that must be satisfied to classify it. But what are those criteria exactly? <Q> There is a clear definition: Passive elements have no function of gain, or control over voltage or current: their controlling function is linear -> I/V = R in the case of a resistor. <S> There are exactly four kinds of passive elements: Resistors, Capacitors, Inductors and Memristors. <S> All other components are active. <S> Source http://de.wikipedia.org/wiki/Elektrisches_Bauelement <S> Active Elements have a function of gain or control, meaning the connection of the controlling parameters nonlinear. <S> Diodes control current, transistors amplify current, etc. <S> The reason for the distinction is mathematical: You can use certain mathematical approaches to solve the equations of a device that contains only passive elements, while the same approaches would not work with active elements. <S> If you have active elements, you may have to first approximate a passive network at the working conditions before you calculate. <S> This does not mean you cannot build advanced devices out of passive Elements. <S> Analog filters are often made from passive elements and can be quite complicated. <A> Personally, I have always gone with definition 3 "3. <S> Active devices can control the current (energy) flow within the circuit, whereas passive devices cannot control it." <S> Hence it is of my opinion that a diode is a passive component. <A> <=2 Legs = <S> Passive <S> > <S> =3 Legs = <S> Active <S> OK, it's stupid, but it's a start :D <S> Edit: <S> OK, I really can't believe anyone is taking this post seriously enough to downvote it, but since it keeps happening I'll point out that this post was meant as a light-hearted joke and not to be taken seriously. <A> I think that passive components are those whose only purpose is to do some sort of energy transformation (for example electrical energy to thermal, or magnetic).
| Essentially I think that a passive component can change the current flow in a constant way, whereas active components change the current flow dependant on the current flow in other parts of the component.
|
How do I add a circuit to disable this system during the night? Key bits of circuit illustrated below: buzzer (J1) activates at interval, triggered internally by IC pin 4 when solar panel low (not making 1.6v) triggers IC pin 7 via Q2, which triggers IC pin 2/3 High (3v) and light led buzzer can be plugged in & out, when plugged in it activates the timed buzz intervals from the IC via Q3 and IC pin 8 I want to mod it so when at night the buzzer doesnt run I want to use the solar circuit to trigger 'darkness' <Q> Since Q2 has been changed into a NPN, I am less confident about this, but theoretically this should work. <S> simulate this circuit – <S> Schematic created using CircuitLab NPN Q1 should, when Pin 2/3 are high and the led is lit (Meaning Pin 7 is high/floating and the Solar Cell is not producing voltage), be turned on, creating a small short circuit (limited by R6). <S> This should bring Q1's collector and Q2's base close to ground potential, which should deprive Q2 of current, preventing it from turning on. <A> The control should go between pin 4 and R1. <S> The link is for a "darkness detector" (turns on in the dark) but swapping the placement of the resistor and phototransistor should do it: when the phototransistor is in the light, it will connect the AND gate input to V+, and when it's dark, the 1k resistor holds the input to ground, blocking the signal from pin 4 of the IC. <S> Sorry about the photodiode: they don't have an element for a phototransistor. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Tie the wire coming out of J1 that leads to nothing to the solar collector's positive terminal. <S> When it's dark, there will be no power source for the speaker, and it is effectively turned off. <A> You can control the sensibility of light by the R7 that could be a 100k trimpot. <S> The rest of the circuit I doesn't change anything, just add the control to the buzzer. <S> simulate this circuit – <S> Schematic created using CircuitLab
| I would use a simple AND gate that has pin 4 of the IC as an input, and use a photo-sensitive circuit to control the other input of the AND gate. We don't know the voltage of the collector; if it's a higher voltage than what J1 is rated for, increase the serial resistance accordingly. To control the buzzer you can add a LDR to only disable to be triggered when its darkness.
|
How to secure jumper wire connections Connecting 2 terminals (like Arduino's) via jumper wires does not secure the wires properly. What do you use to ensure the wires do not come loose? Connecting Arduino to the pins at the bottom right of: <Q> The daughterboard† itself won't fall off easily because it has a large number of pins in the arduino header sockets. <S> There are many designs, pick one that suits your project best. <S> Using an ordinary prototyping daughterboard† you can solder wires on the shield, later you can remove the daughterboard† and re-use the Arduino for another project without needing to remove any solder. <S> If you are using something other than an Arduino you can almost certainly either buy something similar or make one for yourself. <S> † "shield" / "wing" / "cape" are cute ecosystem-specific names for what is generically called a daughterboard. <A> The header connectors arn't designed for using jumper wires. <S> I made my own jumper wires with a pin header pin on one end when I need a more secure connection. <A> Arduino in its basic form is meant to be used for prototyping. <S> The shield does not have to be a fancy PCB designed at a European board house. <S> A simple shield can be made from a perf board and some header pins. <S> See here for an example: http://www.instructables.com/id/Design-a-simple-arduino-shield/ <A> I usually have a small piece of wood or something that can be screwed in and out. <S> then i make a bend in the jumper, stick it into the socket, and hold it down on the wood while putting some hot glue on the wire at the wood part. <S> that is a cheap way to keep the tension on something.dont't hot glue over the socket, just a half inch down, after the bend in the wire. <S> then you can just rip the hot glue off later, and if gets too messy with glue, you can get another piece of wood and unscrew the old one. <S> that kind of thing. <S> hot glue is your friend. <S> cheap. <S> extremely quick curing. <S> otherwise, there is a whole field of connector science, vibration resistant, locking, blah blah.
| Using a prototyping daughterboard†, you use screw connectors to hold jump-wires firmly in place. You will need to design a shield for a permanent and reversible solution.
|
Finding current using Kirchoff Law, but getting unsolvable system Hello, the original circuit above is where I am trying to find I1 , and I simplify it the figure below and assuming the following current directions. Using Kirchoff current and voltage laws I end up with However, plugging in the equations into my calculator it says there is no solution. Is it with my kirchoff current equations (first 4 equations) because if I add up all current law equations I end up with 0 = 0 . Can anyone tell me what I am doing wrong? Thanks for any help. EDIT : As other mentioned I need more KVL equations. But I also need my KVL to be independent loops, so I need at least 3 independent KVL equations. <Q> simulate this circuit – Schematic created using CircuitLab <S> First, convince yourself that the above re-drawn schematic is the same as your problem original. <S> I may have the numbering off (actually, I certainly do have the numbering off), but it is the approach which is important. <S> So: We can make a quick substitution by combining R4 to R6 as R9=12 <S> ohms because they're in series. <S> I probably could also reduce R9 and R3 in parallel, but I'll leave them as-is for now. <S> Next, write out KCL and Ohm's law (assume currents are flowing "down" through resistors, up through V0 ): <S> \begin{equation}I_0 <S> - I_1 - I_2 <S> = 0\\I_1 - I_3 - I_8 - I_9 = 0\\I_2 <S> - I_3 - I_7 - I_9 = <S> 0\\\end{equation}\begin{equation}I_1 <S> = <S> \frac{V_a - <S> V_b}{R_1}\\I_2 = <S> \frac{V_a - V_c}{R_2}\\I_3 <S> = \frac{V_b - V_c}{R_3}\\I_7 = \frac{V_c}{R_7}\\I_8 = \frac{V_b}{R_8}\\I_9 = \frac{V_b - V_c}{R_9}\\V_a = V_0\end{equation} Substituting back in: \begin{equation}I_0 - \frac{V_a <S> - V_b}{R_1} - \frac{V_a - V_c}{R_2} = 0\\\frac{V_a <S> - V_b}{R_1} - \frac{V_b - V_c}{R_3} - \frac{V_b}{R_8 <S> } - \frac{V_b - V_c}{R_9} = 0\\\frac{V_a - V_c}{R_2} - \frac{V_b - V_c}{R_3} - \frac{V_c}{R_7} - \frac{V_b - V_c}{R_9} = 0\\V_a = V_0\end{equation} A little bit of re-writing <S> (Gn = 1/Rn): <S> \begin{equation}I_0 + <S> G_1 V_b <S> + G_2 V_c = <S> (G_1 + G_2) <S> V_0\\(G_1 <S> + G_3 + G_8 + G_9) <S> V_b - (G_3 + G_9) <S> V_c = G_1 V_0\\(G_3 + G_9) <S> V_b - (G_3 - G_2 - G_7 + G_9) <S> V_c = <S> G_2 V_0\end{equation} <S> We have three equations with three unknowns: I0, Vb, and Vc. <S> Once you've solved for these you can calculate I1 easily using R1, Va, and Vb. <S> I'll stop short of just posting the number solution. <S> Incidentally, this approach is known as Modified Nodal Analysis and is used in SPICE circuit simulation software. <S> It basically adds an extra unknown current for each voltage source, and then adds an extra equation for the difference between the nodal voltages. <S> I simply did some extra "inline plugging in" of the source voltage equation to reduce the set of equations/unknowns to 3. <S> Yes, this approach might look like extra work because you are solving for voltages first, but it is a much more systematic approach, quite robust, and in the long run I find it faster to actually do. <A> If you use KVL in the other loop (36v i5 and i2) then use that, the other kvl equations and two of the kcl equations it should work. <S> Adding all the kcl equations should give 0=0. <S> They don't include the voltage so they can't actually solve for anything here. <S> Using star-delta transforms and mesh analysis can make it a bit easier to solve (transform the delta that doesn't have I1 in it to a star/wye). <A> Here is an easy way simulate this circuit – <S> Schematic created using CircuitLab <S> This is an unbalanced Wheatstone bridge <S> Here is a clever way to findCurrent in each Branch simulate this circuit <S> Now I am going to Write A KCL equation for node C and D <S> I will use the potentials marked in the schematic <S> So for C Sum of current converging on a point = 0 <S> $$\frac { X-36 }{ 2 } \quad <S> +\quad \frac { X-0 }{ 12 } \quad <S> + <S> \quad \frac { X-Y }{ 6\quad <S> } \quad = <S> \quad 0$$ <S> Likewise for D <S> $$ <S> \frac { Y-36 } <S> { 9 } \quad <S> +\quad \frac { Y-0 }{ 18 } \quad <S> + <S> \quad <S> \frac { Y-X }{ 6\quad } \quad = <S> \quad 0$$ <S> Solve these 2 equations <S> You get X = <S> 30 <S> Y = 27 <S> Now we can get our answers <S> $${ I }_{ 1 } <S> \quad = <S> \quad <S> \frac { { V }_{ A }\quad -{ V }_{ C } }{ R } \quad =\quad \frac { 36-X }{ 2 } <S> =\frac { 36-X }{ 2 } = <S> \quad <S> 6(0.5)\quad =\quad 3\quad <S> A$$ <S> So you now can find every current
| And yes, this is a solvable system.
|
Removing rosin flux residue from PCB I have a nice looking purple PCB from Laen's batch service, which I have assembled using rosin flux. I have cleaned the board as best I can with isopropyl alcohol, which gets rid of the tackiness of the rosin, and also improves the dielectric behavior. However, as you can see in the pictures, it leaves a white powdery flux residue which looks unprofessional. I tried 1631-16S flux remover, as well as just blasting it with compressed air, but it doesn't seem to get rid of the residue. How do professionally assembled boards manage to look so clean? <Q> I bought some boards from these guys a while back and had similar issues (you just really want to show off the pretty boards). <S> I very successfully cleaned them by first using a lot of isopropyl alcohol with a trimmed down paint brush (so it's more firm for scrubbing). <S> Then before it evaporates, and I know this sounds crazy, rinse it really well with deionized (DI) water. <S> You've probably noticed that when you clean with isopropyl alcohol they look great until they dry. <S> The water flushes all that away <S> and it drys clean. <S> Give it a good amount of time to dry and blow out the underside of the ICs with compressed air. <S> I had quite a few ICs, LEDs, FETs, other discretes, and even an LCD on that board and all three boards that I put together worked perfectly and looked fantastic. <A> At the hobbyist level, a high concentration rubbing alcohol (the stuff I use is 92% and can be acquired at Walmart) and an acid brush will suffice. <S> If you're really frugal, an old toothbrush will work if you clean it first. <S> Mass produced boards typically use a reflow soldering process. <S> The amount of solder paste is carefully controlled and consistent from board to board. <S> If the board comes out very clean and pretty, the paste used was most likely a variety that contains no clean flux, as opposted to rosin core flux. <A> Dedicated flux removing chemicals are mostly ethanol and just make the flux disappear. <S> All you have to do is look at the composition of a bottle of flux... <S> the solvent used is ethanol. <S> Mechanical action is only really required to disperse the dissolved flux, not to scrub through solidified flux. <S> If I just soldered the board, I literally just have to dunk it in an ethanol bath <S> gently swish the PCB around to agitate things a bit, and tip it as I take it out. <S> If I leave it for a week after soldering so the flux thickens, then I just have to leave it submerged for longer and maybe lightly brush it a bit before removing it from the bath. <S> They are also $60+ a jug, I assume because it's mostly ethanol which is drinkable.
| Isopropyl alcohol works, but what REALLY works is ethanol.
|
Calculator Printer Control (how to drive Epson dot matrix printer) I have small dot matrix printing device that I'm trying to control (i.e. print to) with a Parallax Propeller board. (See images below.) It's the printer from this: http://shop.usa.canon.com/shop/en/catalog/calculators/palm-printing-calculators/p23-dhv Is anyone familiar with how one of these things works? I don't see any chips or other electronics on it, so I assume it's just stepping motor control. It seems like I can get specs on the large silver motor from here: http://www.standardmotor.net/sc_webcat/ecat/product_browse_list.php?lang=1&cat=205 but don't know on the rest. It would be great if there were some sort of "driver" for this for use from Propeller Spin code, but I realize that most likely doesn't exist. If I could at least find some specifications that would describe what I need to send to it, I'd be happy. (Trying to guess what I need to send to each individual motor to get the right output sounds like a rather difficult way of approaching the problem, was hoping there was some sort of documentation or standardized "protocol" that might exist for the overall unit. Definitely have googled a lot to no avail.) Just looking for some help to point me in the right direction here. I am familiar with the Propeller chip, software development (my main gig), and basic electronics concepts. Never tried to do motor control before. <Q> I haven't used anything similar but these are my observations based on the photo: <S> It appears to be a standard DC motor not a stepper motor. <S> So to get it to move left <S> and right you'd need to reverse power to the motor. <S> On the first photo I'm guessing the wires going to the left <S> are to indicate the end of travel on that end, although the mechanism isn't clear from the photo. <S> The right hand side appears to be for the print head. <S> It's hard to make out when assembled what contacts would touch each other on the last photo, but I guess the two inner pins make continual contact with the inner PCB trace, and the right-most make continual contact with the outer trace so that would be power for the print head. <S> The left-most pin appears in the same area appears to be for position feedback by making contact with the 'spokes' on the PCB as it turns around. <S> For the print head you could do the same until it appeared to be leaving a solid line as the motor moves. <S> I'm not sure how much effort you're prepared to put into it <S> but the other steps I can think of <S> you'd need to perform are: Design an H bridge to allow the motor to be moved in each direction. <S> Use a FET to drive the print head. <S> Connect the two position feedback lines to inputs. <S> Write software to keep track of where everything is and get the timing right. <S> Find or make font tables to be able to print text using the device. <S> Make a suitable paper feeder as this doesn't appear to have one. <A> Here's my suggested course of action <S> Check the number and type of battery in the calculator. <S> Work out it's max operating voltage. <S> e.g. 4 <S> x AA = <S> 6V. <S> In the top photo assume connections are 1&2 shorted when rotor at 0-5 degrees position <S> 3&4 shorted when rotor at 360/14 degree positions (next line print position?) <S> 5&6 motor drive +/- <S> <= <S> 6V <S> 7&8 shorted when print head hits left end. <S> I'd use a multimeter to test these assumptions. <A> So, I started playing around with one of these. <S> It is not a dot matrix printer and it only has 14 glyphs because it comes from a calculator (0-9, some other characters). <S> Controlling it is fairly straightforward: there's a clutch and a motor. <S> If you watch the output from the index wheel, you can see when to activate the clutch to stamp the characters to the page <S> Another answer here links to a German page, but it contains everything you'll need to control the printer including circuit diagrams and AVR assembly program so you can send the text to print over serial. <S> Throw this into a translator and it will give you everything: <S> http://elektronik-kompendium.de/public/arnerossius/bastel/m31a.htm
| You'd need to determine the voltage everything requires, for the motor you could just turn up the voltage until it appeared to be moving at a reasonable rate.
|
Power MOSFET overheating at 1A I am building an arduino controlled RGB LED driver by using WS2803 constant current LED driver, TLP250 MOSFET drivers and IRF540N MOSFETs. This is how it looks like: The picture got scaled down so it is harder to see, R3, R7 and R11 are 1k resistors. This circuit is driving 5m RGB LED strip (100 segments) and should consume max 2A/channel. So each MOSFET should need to handle 2A at 13V max. IRF540N is rated at 100V/33A. RDSon should be 44mOhm. Thus I thought there would be no need for a heatsink. I obviously want to PWM this things (WS2803 PWMs at 2.5kHz) but let's focus on full ON state. The problem I have is that the MOSFETS are seriously overheating in full ON state (no switching going on). You can see the values I measured in full ON state on the picture. TLP250 seems to drive the MOSFETs correctly (VGS=10.6V) but I do not understand why I get so high VDS (like 0.6V on red LEDs). Those MOSFETs should have RDSon 44mOhm so when 1.4A is flowing through it, it should create a voltage drop of less than 0.1V. The things I tried: removed TLP250 and applied 13V straight on to gate - was thinking that the MOSFET are not fully open but it did not help at all, VDS was still at 0.6V removed LED strip and used a car bulb 12V/55W on red channel. There was 3.5A flowing, VDS was at 2V and rising as the MOSFET was heating up So my questions are: why is VDS so high and why is MOSFET overheating? even with VDS at 0.6V and ID at 1.4A the power is 0.84W which I assume should be fine without a heatsink? would I be better off with a less powerful MOSFET, something like 20V/5A? Or use logic level MOSFETs and drive it directly from WS2803 (though I like the optical isolation of TLP250). Few notes: I have this circuit only on a breadboard at the moment and the wires that connect MOSFET's source to GND get really hot too. I know that this is normal as there is a relatively high current flowing through them but I thought I just mention it I bought the MOSFETs in bulk from China, can it be that those are not really IRF540Ns and have quite lower specs? EDIT:One more thing. I have created this controller based on the MOSFET driver from here . The guy is using separate power sources for TLP250 and for the load (Vsupply, VMOS). I used the same source for both. Not sure if that matters. And my power supply is 12V 10A regulated so I do not think that the power supply is the problem. Thanks. <Q> After receiving IRF540N from a reputable seller I can definitely confirm that the ones I was originally using are counterfeits. <S> After replacing fake one with a genuine one I got Vds=85mV on the red channel. <S> What I was not expecting though is that the genuine FET got hot after a minute or so. <S> And then I realized that those FETs are not generating much heat themselves but rather get heated up (and quite a lot) from the breadboard and the wires <S> (Connor Wolf mentioned it). <S> Short wires connecting FET's source to GND are screaming hot when this is in full ON state. <S> Moving FETs off the breadboard confirmed that the source of the heat was the breadboard/wires. <S> Fake one was getting hot <S> but I could actually cool it down just by touching it. <S> Genuine one was somewhere between the room temperature and luke warm. <S> Btw. <S> measuring Vds directly on FET pins vs measuring it 1cm away on the breadboard made around 200mV difference (85mV on pins, 300mV on breadboard). <S> Here are some pictures, fake on the left, genuine on the right and manufacturer's part marking on the bottom: <S> Although there are more IRF package markings possible as shown in this document <S> I could not find any similar to the fake one (which only supports that this is a counterfeit). <S> Also the cutouts on the top of the back plate are rectangular vs round on the genuine and in the spec. <S> Thank you guys for all your comments! <S> The circuit now works as expected (PWM included). <A> According to your measurements, the topmost transistor's on resistance is: $$R_{ON}=\frac{V_{DS}}{I_{D}}=428m\Omega$$ <S> From transistor's datasheet (normalized to \$44m\Omega\$): Although the above graph was obtained at \$I_D=33A\$, my guess is that this high on resistances as you see should not be observed in this transistor at all. <S> Even taking leads' and contacts' resistance into account. <S> Also, as Madmanguruman stated in his answer, taking into account the worst case scenario of Junction-to-Ambient thermal resistance, you should observe a reasonable increase in transistor's temperature. <S> Conclusion: the data you provided is not consistent. <S> Possible sources for the error: <S> The transistors you're using are not IRF540N <S> Your measurement equipment is not accurate <S> Your comments show that you do take them properly though. <S> I'm mistaken <S> The first two are the most probable sources of the error in my opinion. <S> As for the second part of your question, you can surely be better off with some lower voltage transistor. <S> Low on resistance requires as short channels as possible, while high breakdown voltage is difficult to achieve with short channels. <S> In this case, where you do not expect to see this high drain-to-source voltages, you can "trade" some voltage rating for lower on resistance. <A> I think "overheating" is a bit of an exaggeration. <S> Hot, yes, but overheating, no. <S> The non-heatsink junction-to-ambient thermal resistance for the IR part is: \$R_{\Theta_{JA}} = <S> 62° <S> C/W \$ <S> At 0.84W, that's at 52° <S> C temperature rise over ambient, which will make the device too hot to touch. <S> The part is rated for 175°C operation <S> but it's rarely a good idea to have parts on there that can burn an operator. <S> You'd be best off choosing a lower \$R_{DS(on)}\$ part. <S> You don't need 100V for this application, and will find much better performing parts in the 40V to 60V range - for example, Infineon OptiMOS <S> parts can be as good as \$1.5m\Omega\$ at 40V and are available in TO-220 <S> (just swap them in).
| You don't take the measurements correctly.
|
How to reset a 4026 counter IC when it reaches 6 for electronic dice I'm trying to build a circuit to simulate a dice roll using a 555 in astable as it's heart. The output pulses are counted by a 4026 and then fed into a 4511 BCD to 7 segment decoder. It works perfectly and counts from 0-9, but I cannot get it to reset at 6 and start from 1. I have tried to take jam input 1 high and then take the preset enable pin high when the counter hits 7, but nothing happens. I did this by using a quad input AND gate. Inputs 1, 2 and 3 were the binary code for 7 (1110) and input 4 was the clock signal inverted, so it would only work when the clock was off. This did not work and it just got stuck on the number 7 without resetting. Have any of you had experience with this type of circuit? What can I do? <Q> The counter, i.e. 4026, that you specify is a device already containing the 7-segment decoder. <S> Plus this counter is not really suitable to the application where you want it to count from 1 through 6. <S> Instead look at using a counter such as a 74HC161. <S> This can be hooked up as shown below to make it count from 1 through 6. <S> This circuit will count from up to 6 (i.e. the state where QB and QC both come to 1's in the output count. <S> The 74HC00 NAND gate will detect this condition and force the synchronous LOAD input active low. <S> On the next clock pulse from the 555 chip the counter will reload to a value of 1 (Inputs D C B A in the 0001 binary state) as opposed to advancing to a count of 7. <S> Subsequent clocks will then count 1->2, 2->3, 3->4, 4->5, and 5->6 where the reload cycle will repeat itself. <S> Note that at initial power up this circuit may have an initial value in QD QC QB and QA that is outside of the range of 1->6. <S> If this happens it is just necessary to let the clock run till the counter advances to a state where QB and QC are both 1's. <S> If this behaviour is unacceptable then is is necessary to design in an additional signal that low ORs in with the output of the NAND gate to initially force the counter LOAD Input low for one or more clocks from the 555. <A> You can use a three input AND gate .Connect the A1 with a , B1 with b and C1 with c. <S> Then connect the output with reset pin of 4026 <A> One important thing that should be noted: you DO NOT need the 4511 IC due to the built in decoder in the 4026 counter. <S> The answer goes as follows: <S> Make the typical connections for the 4026 IC, like Vcc, ground and 7 segment display pins connections. <S> Invert the output of PIN 9 ( d ) <S> using a NOT gate. <S> The output of the inverter goes to a 2-input AND gate. <S> The second input for the AND gate is from PIN 10 ( a ) without any inversion ( direct connection ). <S> The output of the AND gate is then connected to PIN 15 ( reset ) through a 4.7k ohm resistor to prevent any false triggering ( I have spent hours to figure the false triggering issue out) <S> Explination: <S> I have selected ( a ) and ( d ) to trigger the RESET to high when the counter reaches 7. <S> Thus, the IC be will reseted after completing 6. <S> This specific combination ( a and d ) will only be triggered HIGH at 7. <S> Any combination can be selected if it satisfies this condition. <A> Old question but the CD4017 could also be used to trigger the CD4026 reset at 7.
| I have successfully managed to reset the 4026 when it reaches 6.
|
How do I easily power a "mashed-up" project? I'm working on a hobby project that involves a Raspberry Pi (with a powered USB hub for reliable wireless), an Arduino (driving a hobby servo, controlling some LEDs, etc.), and an audio amplifier (not rolling my own - using a torn down set of powered computer speakers). So basically, I have five things that normally would each have a separate power supply. I'm mostly a programmer with a little electronics knowledge, mostly digital with just enough knowledge to interface with sensors and things. I'd love for this project to have one wall plug, not be powered by four or five wall warts. I also don't want to have to implement a dedicated power supply. I know the Raspberry Pi is a little picky on its power consumption (I'm using a 1A supply for it currently). I thought about using an old laptop power supply with 18v and (I think) 2A. Could I just do that and use a few power regulators to provide the necessary voltages to the other pieces? If I do, what should I be aware of and watch out for? I also considered an old PC power supply, but it's much too large for the enclosure that I have in mind. <Q> You could indeed! <S> But first things first: determine each device's power consumption and sum them all up <S> make sure your laptop PSU can supply at least this much Things to watch out for: Even though they may run on the same voltage, the Rpi and Arduino might not get along. <S> Noise and ripple from one device will be superimposed on its supply lines, so to save you the hours of debugging I would STRONGLY suggest separate supplies for anything with a clock. <S> Inrush currents may be several times greater than average currents (big current spikes are common when charging up lots of parallel capacitors on each board at initial power-on) <S> so if you don't have the inrush current spec available from the device's datasheet, just double (or triple) <S> the average/rated current to be conservative. <S> If you use linear regulators, you won't have any extra clock frequencies to worry about, but you will have lots of heat. <S> Try to find a regulator such as the 7805 which has its tab connected to ground. <S> That will make it much easier to sink heat to a metal enclosure, if you end up putting the completed project in one. <S> This might be the negative return on the laptop supply. <S> Your audio amp very likely used bipolar supply voltages. <S> If you don't have a true negative supply available this could be a problem. <S> It might be simpler to find an audio chipamp such as an LM386 that runs off a single supply than to generate a negative supply locally. <A> The easiest thing: Use linear voltage regulators for each of your required voltage rails. <S> Things to watch out for: Take note of your current requirements on each voltage rail - you don't want to draw more than the regulator can supply. <S> Also, watch out for the efficiency of the regulator - remember that nothing is 100% efficient and you will lose some power in the regulator, so your main power supply should be able to source your required current + take account of regulator inefficiencies. <S> Check the datasheet. <S> Linear regulators produce heat, and depending on the current draw, will most likely need a heatsink to prevent damage. <S> You can search around here to learn how to size the heatsink , or you can just slap a huge one on there and hope for the best. <A> There is an instructable about this very thing. <S> The supply is a bit noisy, but regulators can clean up signals depending on how clean you need your power. <S> If you're running LED lights and a digital system, you can probably get away with the noisy supply. <S> The noise should be high frequency enough that you can't hear it in the speakers. <S> And they usually have over-current protection, <S> so they'll self-protect and shut off if you mess up your project and short something.
| Aim for "star" grounding such that all your individual device grounds come to a common point which is as close as possible to the lowest-impedance ground reference. I am a big fan of using old desktop power supplies: you can usually find one for free if you are at a company big enough to have even a small IT team or if there's a school nearby, they generally give you many options for voltages, and they can supply a good amount of power.
|
Is 3k ohm too high impedance to an op amp differential amplifier? I have a pressure sensor, MPX2100 and I need to read its output with an Arduino. To do so I want to use a differential amplifier with a gain of 40 times (3k and 120k resistors). The impedance of the sensor's output is 3k. So is this input impedance too high that I will get non-linearities in the output? The amp op that I am going to use is LM258 . My schematic: Even though a In-amp is better I assembled the circuit above just to test my sensor while I wait my AD623 to arrive, however the gain is about 3 times! When my sensor's output is 50mV the output of the amplifier is about 170mV! Another odd thing that is happening is that when I connect the sensor to the op-amp the voltage at the sensor's output changes to -4mV.I am not sure whether my sensor is not working properly or the amplifier circuit is messing everything up. <Q> I'll assume you're using the common op-amp differential amplifier like this: with R1 = 3 kOhm and R2 = <S> 120 kOhm. <S> The input impedance of this circuit is approximately 2xR1, or 6 kOhm in your case. <S> This won't necessarily cause nonlinearities but it will cause you to lose about 33% of your signal to the the voltage divider formed by the sensor's output impedance and the amplifier's input impedance. <S> If you are not tightly cost-constrained, consider using an instrumentation amplifier instead of an op-amp. <S> TI has in-amps in their catalog with budgetary pricing in the $0.50 to $0.60 range, which probably means $1 - $2 in onesy-twosy quantities. <A> The standard instrumentation amplifier topology was created for just this purpose. <S> It uses two op amps as infinite-impedance buffers and a third op amp as a fully-differential gain stage. <S> You can buy this configuration, prepackaged, off the shelf, for not much more than you're paying for your LM258. <A> Whatever amplifier configuration you choose, the specification for the pressure sensor recommends a typical operating voltage of 10V and this usually means that the standing offsets on each output are at the 5V level. <S> This should tell you that your "front-end-amplifier" needs to run from the same supplies as your sensor. <S> This makes life easier because then you are almost guaranteed not to approach input common mode range end-stops <S> no matter what the differential output voltage is of the device. <S> It also tends to influence your decision as to which route to take. <S> Because of the standing 5V (half supply voltage) on each output a designer would tend to choose an instrumentation-amp (IA) because it fully "cancels" this voltage and it does not appear at the output pin PLUS <S> , you get an offset pin on an IA which allows you to offset the output to (say) <S> 2.5v making it convenient for whatever ADC you might be using.
| In-amps are generally optimized for differential amplification with high accuracy at dc and high input impedance.
|
Is an omnidirectional antenna a must for a cell phone? I have read somewhere (but unfortunately I am not able to remember where) that cell phones do need an omnidirectional antenna. If it is so, what are the reasons for that? Why a normal directional loop antenna could not be (efficiently) used ? <Q> This is partially not entirely true anymore. <S> With increasing bandwidth requirements and as we are getting really close to the theoretical limit of omnidirectional picojoules/bit, in order to increase bandwidth in cell phones it will definitely be necessary to go back to directional antennas again. <S> The way this is solved in the next generation of radios (and I believe the current generation of Qualcomm 2x2 LTE radios) is that they employ a phased array antenna using the 2 send and receive antennas. <S> g-sensor data is used to 'point' the phased array in the right direction in the short term, and receive antenna tuning is used to lock the phased array in the long term. <S> As we go towards 2020, phased arrays and possibly eventually focused array will become commonplace and necessary in handsets to achieve next-generation data rates. <S> addendum: this method of using multiple antennas as a phased array is called beamforming. <A> There are no antennas that are truly omnidirectional without a lot of complication especially for a cell-phone. <S> However, if you think about it, you do want to be able to hold your handset and turn in any direction to face north, south, east or west and expect it to work. <S> A directional loop antenna defeats the objective of being able to face any direction and still work. <S> You could argue that laying flat on the ground (whilst on the phone) is "not a requirement" and therefore you shouldn't expect this to work in all directions. <S> However, the reception and transmission of radio waves is quite complex to understand (and a bit unpredictable) and these can make the "normal" expectations better or worse. <S> Here's what a dipole's field looks like: - You can see that it extends in all directions horizontally the same but in the vertical direction there is no field (receiving or transmitting). <S> The design of the "system" also provides different frequencies for any particular handset to operate on and sometimes when reception might be poor at one frequency, moving to an adjacent frequency might make a significant improvement. <S> Ditto for transmission. <A> An omnidirectional aerial is simply a convenience. <S> If you are prepared to locate the direction of the nearest/strongest cell site and point a directional aerial at it, it will work just fine. <S> I used to do just that. <S> As Andy says, needing to do this is generally unacceptable to typical users. <S> In niche cases it can be extremely useful, and these prove the "not necessary, but nice" aspect of omni directional antennas. <S> In my case we are served by a GSM system and in the past coverage around my home was poor as we are in a hill shadow relative to the local cell site and tend to get strong reflections on several paths, which leads to unstable areas of high and low signal across distances of feet and seconds. <S> A phone may work almost perfectly one day and be almost unusable the next. <S> This has now been fixed (extra cellsite presumably) <S> but prior to that I used to make extended cellular free toll calls as part of my calling plan. <S> I had line of site access to another cellsite but the range was excessive. <S> SO I set up a UHF satellite dish (about 1 metre) pointed at the cellsite and with the phone simply placed on the LNA support arm with the LNA removed and the phone on 'loudspeaking. <S> No electrical (wired) connection twixt phone and dish. <S> Worked a charm. <S> [Set up on my back porch next to an old armchair. <S> Coffee, papers, cellphone, satellite dish - go. <S> Unrelated Bonus: <S> Genuine story! <S> For experimental purposes I silvered the dish with aluminised mylar film. <S> It mad a proficient solar heater. <S> My wife was concerned that the dish may set things on fire unattended. <S> I pointed out the unlikely circumstances required to align sun, dish and a target as configured. <S> One night I left the dish on a stool next to the armchair and next morning about 10am sun and dish angle and chair location conspired to set the chair alight!!!. <S> It could have spread to the house :-(. <S> But didn't. <S> , A lesson or few learned. <S> Don't try this at home if you want to still have one. <S> Chair frame is <S> solid pine - burning is more substantial than is obvious. <S> ("Open image in new tab" gives much larger image on this and many other images.) <A> it's not only that you want to be able to 'spin around' <S> while talking, it is that the fixed base station may be behind you while at mile 5 on a road, and the base station maybe directly to the side of you while 10 miles up the same road. <S> Any kind of mobile communications system is going to have omni for convenience in use. <S> in the case of a two fixed bases it is much more allowable to have to tune a directionala Yagi or reflector dish for maximum signal and bolt it down. <S> but never with a mobile application, really, unless you are willing to stop the hike, bike, or car or boat, and retune a directional every time you want to talk.
| The main reason for having an omnidirectional antenna is that the relative postition of the fixed base station and the mobile handset can be constantly changing while the user is moving.
|
PIC warning 364 related to initialization of const There are no answers to this on the internet that I could find, and I've looked twice over the last 4 months. In MPLab v8.88 using the Hi-Tech ANSI C Compiler, I have this line of code: const uint8 SUM_THRESHOLD_MIN = 15; /* comment edited out */ and I get the warning: Warning [364] C:\*directory edited out* \ *filename_edited_out*.c; 273.35 attempt to modify object qualifed const (excuse the edits, but I felt I should edit out personal yet superfluous details). It is not my code, and I'd just use a #define , but others want to use a const (for those that don't know: using a const guarantees a proper typecast of a value, and can save you from some weird issues related to typecasting and data types; it's not my favorite way of doing it, but it's not a bad idea either). There are several const initializations happening in the same block of code, and they all give me this warning. They are in a .c file, in a void function. I have other files with void functions where I initialize const uint8's and there are no warnings in those files. I searched globally, and found no other instance of the variable except where it gets used in the void function (so there aren't any issues with redefining or anything like that). To be clear, these const's are not part of any structure or anything strange, they are just declared in the void function in the .c file. I have uint8 properly typedef'd, and not #define'd (see comments). Can someone help me get rid of this warning? EDIT:If I paste one of the const uint8's into another .c file directly after a const uint16 that doesn't throw the error, like this: const uint16 rate_bias_time_constant[NUM_RATE_CHANNELS][RATE_BIAS_STEP_MAX] = {30,120,480,960, 300,120,180,240, 300,120,180,240 }; // comment edited outconst uint8 SUM_THRESHOLD_MIN = 15; /* comment edited out */ I get warning 364 in this file for this const uint8 but not for the const uint16. If I change SUM_THRESHOLD_MIN from a uint8 to a uint16, I still get the warning. For completeness, if I change it from all uppercase to all lower case, I still get the warning.If I change the line to, e.g.: const uint8 SUM_THRESHOLD_MIN[2] = {15,2}; /* comment edited out */ There is no warning. <Q> I got it, and thanks so much for everyone's help! <S> The declarations that are not throwing warnings are either arrays, or they are declared static const uint8/16's. <S> For some reason, the Hi-Tech C compiler is fine with const int/char's, const uint8/16's that are arrays, but not const <S> uint8/16's unless declared as static const uint8/16. <A> You should appreciate that due to the odd architecture of the PIC16/18, a "const" qualifier is an instruction to place that variable in Flash instead of RAM, not an instruction to tell the compiler that it's not allowed to be changed. <S> If you're trying to initialise the value of an auto variable that's local to a function <S> then you ARE trying to change it at run-time because it's going to try to write that initialisation value to the variable (which is stored in Flash and is therefore not (easily) writable) every time the function executes. <S> The reason it works when the variable is declared static is because static variables that are local to functions are only ever initialised once, so there is no logical inconsistency for the compiler to whine about. <S> My guess is that the const arrays are being treated in the same way. <A> I think the root problem is your expectation of how CONST works with this compiler on this processor. <S> These things are not variables as you seem to be expecting from your description. <S> They are very likely implemented as constants in program memory, which is essentially read-only. <S> These things can't be changed at run time.
| The error you are getting is probably related to runtime code attempting to write to the CONST, not the definition of the CONST.
|
Why isn't this single pushbutton on/off circuit working? I built this about four times, replacing the transistors every time, carefully measuring all resistors and capacitors and putting a .1uf cap from the output to the positive. The LED light goes from the output to a 470 resistor, and to positive like the circuit called for. When I power it on, the LED just stays on, and if I press the button, nothing happens whatsoever. The LED is just ON. Just two notes so as to not get confused with the picture: the 2 10k resistor wires aren't touching and the 470 ohm that may look like its grounded is to the positive. Also, the middle is the BC557, and the two outers are the 547' Edit: When the button is pressed, the voltage across the LED drops for 2.5Ms from 2.4 to 2.0 volts <Q> Sometimes, after you've carefully checked everything, it turns out to be someone else's fault. <S> In this case I think the original design is bad. <S> I've tried it in Circuitlab (should be here) <S> and I've tried it in Falstad: <S> 1 5.0E-6 85.40587625261516 60 5.0 50r 128 112 <S> 128 208 0 470000.0r 128 208 128 288 0 <S> 470000.0r 400 96 400 192 0 1000000.0r 400 192 400 272 0 <S> 100000.0r 272 208 208 208 0 <S> 10000.0r <S> 272 <S> 224 <S> 272 288 0 <S> 10000.0r <S> 272 288 <S> 272 368 0 470000.0r 272 288 336 288 0 <S> 1000.0t <S> 336 288 400 288 0 1 0.5854708958314027 0.587099911972777 <S> 100.0t 208 208 176 208 0 1 0.587957264003006 0.588497761400722 <S> 100.0w 272 224 272 208 0w 400 304 400 368 0c 128 288 128 336 0 1.0E-6 0.02827590396558895w 176 192 128 208 0w 176 224 176 368 0w 128 336 128 368 0t 304 192 272 192 0 -1 -0.5251112318758011 -0.5895458111379241 <S> 100.0w 400 <S> 192 304 192 0w 272 176 272 112 0w 128 96 128 112 0w 272 96 <S> 272 112 0w 400 96 272 96 0w 272 96 128 96 0w 128 368 176 368 0w 176 368 272 368 0w 272 368 400 368 0s 208 288 240 288 0 1 truew 272 288 <S> 240 288 0w 128 288 208 288 0v 528 160 528 96 0 0 40.0 9.0 0.0 <S> 0.0 0.5w 528 96 400 96 0w 528 160 528 368 0w 528 368 <S> 400 368 0w 400 272 464 272 0o 33 64 0 35 0.009765625 9.765625E-5 0 -1o 28 64 0 35 0.3125 9.765625E-5 <S> 1 -1 <S> In both cases it doesn't respond to button presses (this is rather hard to simulate in circuitlab) <S> Without any more "theory of operation" info (no I'm not going to bother watching the video), I would say there is a design problem. <S> A more conventional "bistable multivibrator" might work better. <A> Troubleshooting 101: if the LED is on, according to the schematic and assuming the circuit matches the schematic, all three transistors are "on" which implies that the voltage on C1 is about 0V. <S> When the switch is momentarily closed, the base of Q3 is connected to the capacitor and thus, 0V. <S> Thus, Q3 should turn off, extinguishing the LED and turning off the other transistors. <A> I've simulated that circuit in LTspice XVII <S> and it did not work. <S> Then I found another design (that uses 5 V input) <S> and it did work as intended. <S> The following figure shows the simulation in LTspice XVII. <S> I used a voltage controlled switch. <S> V(vsw) makes the switch close while it is 1 V. V(out) shows the output; notice that it toggles each time the switch closes.
| So, my recommendation is that you start troubleshooting by putting a 'scope on the base of Q3 and see what is happening when you press the switch. As such, I would say it truly is a design flaw.
|
Insulating a via during reflow? I have a PCB that I'm sending off for assembly, which includes going through a reflow oven. The last batch had a problem because the solder mask on some PCBs does not completely insulate a via that is underneath a metal connector, resulting in a short. What can I safely use (that will withstand reflow temperatures) to paint or insulate the via to prevent the short? <Q> You want to "tent" your vias. <S> This means changing your DRC such that vias under a certain drill size will have solder mask extend over them. <S> If you are using Eagle, this is accomplished by changing the "Limit" value on the Masks tab of the DRC. <S> The limit specifies what size drill hit that the solder mask should cover up to. <S> Check out the tutorial from Sparkfun on better PCB's. <A> I went ahead and used Kapton tape for this batch. <S> I also found that the industrial Sharpie pro permanent marker is rated to 500°F, so I might experiment with that later. <A> There's a solder mask repair pen made by CircuitWorks , but as pointed out in a technical bulletin : ... <S> CW3300G is a green-tinted acrylic conformal coating. <S> Acrylic conformal coating is applied to the finished circuit board to protect board components from moisture and provide electrical insulation between circuit traces. <S> CW3300G is not an epoxy resist material and does not have the same properties of durability and permanence as a permanent solder resist. <S> It will decompose at temperatures above 270 °F, and therefore should only be applied to the board after all soldering has been done. <S> Therefore, it should not be used to cover the via prior to wave soldering. <S> But this does provide a clue: epoxy. <S> The solder mask is an epoxy or epoxy-acrylate coating, so it might be possible to find a similar coating available as an epoxy dispenser of some sort, though I have not seen (and was unable to find) something that I would use on PCBs. <S> Usually vias under a metal pad on an IC are there to provide additional grounding or heatsinking to the copper. <S> If you've got a via that should not connect to the component above it, I would recommend relocating it (instead of just tenting) because the tenting method does not guarantee that all boards will be electrically isolated. <S> You might get a small hole in the mask which still allows an electrical connection with the component above.
| If you already have PCBs made without the benefit of a tented via, as you've indicated in comments, the only option that comes to mind is a wave solder masking tape ( such as this one made by 3M ).
|
Will the short circuit damage electronic components or just the supply? This I have thought about. We know that shorting the supply creates zero resistance path between the vdd and gnd. We also know that current will pass through the least resistance path and since there is a zero resistance path, all current will pass through that path based on Ohm's Law. It follows then (if I am not mistaken), all connections to the supply will be considered as open circuit since no current will flow through them (because all current flows through the zero resistance path) and only the supply should be harmed? <Q> Many power supply have built in short circuit protection, therefore it is not always the case that shorting the output of the power supply will harm it. <S> Though it is not advisable to do this even when the short circuit protection is in place. <S> Your conclusion about the current being steered into the zero resistance path is correct, but you should not conclude that all other connections are open circuits, or that this can't harm devices connected in parallel to short. <S> Simple example: simulate this circuit – <S> Schematic created using CircuitLab <S> We are charging some very big capacitor with a power supply having \$50 \Omega\$ internal output impedance. <S> This impedance limits the current which can be supplied to the cap and the charging process completed fine. <S> Now you are closing the switch, shorting both the power supply and the capacitor. <S> Lets assume that the supply is fine - <S> it has SC protection in place. <S> However, due to very low resistance of the switch, the discharge current of our big capacitor is huge. <S> The capacitor has some low Equivalent Series Resistance and gets very hot due to high discharge current. <S> This heat causes the capacitor to be destroyed. <S> A single capacitor is the simplest example I could think of, but there are many more. <S> Summary: <S> Shorting the output of power supply to the ground can damage both the supply and the equipment connected in parallel to the short. <S> The potential damage to other equipment depends on the equipment's internal implementation. <A> Unfortunately things are not simple as that. <S> Below are a few scenarios that components alsoget damaged. <S> Assuming that your power supply is a SMPS supply, then its driver will try to increase its power output and compensate voltage. <S> However with time [milliseconds here] <S> the short circuit will melt and be an open circuit. <S> A transient high voltage spike would transfer to your components (the current should find a path to flow). <S> This is true with high response time SMPS. <S> But no designer could consider on all the parameters. <S> Short circuit will lead power MOSFET/Transistor to thermally run away from its operating point and suddenly breakdown. <S> Such a situation will generate reverse spikes (Don't know why, but I read this somewhere.) <S> Such a reverse spike is bad for LED's and this is a known issue with LED drivers. <S> Common with the SMPS designs without a transformer. <A> Not true. <S> First, it is never Zero Ohms. <S> That is only in perfect conditions. <S> Every piece of copper adds a little resistance. <S> If it was Zero Ohms, no energy would be wasted into heat. <S> Some electrical components are very sensitive to both current and heat. <S> Essentially, most components can be compared to fuses. <S> They can handle only a certain amount of current going through them before they pop. <S> The tiny wires and circuit paths inside an IC, depending on the IC, might only handle a few tens or hundreds of mA. Digital Potentiometers often have maximum wiper current in the 5mA or less range. <S> Spot Welding is essentially a high current short circuit created on purpose. <S> Now imagine that happening inside an IC you just short circuited. <S> But, shorting to ground might not cause the Power Supply to die, if the power supply has protection, or if the part where the short occurred dies first. <S> A short circuit in a microcontroller with a max current of 200mA and a power supply of 10A could easily blow the microcontroller away fast enough that the power supply would never exceed a few Amps. <A> You need to consider the whole current loop. <S> The short circuit is just across the output terminals <S> but there are other SERIES circuit elements (most at risk from damage) connected in the circuit path such as resistances, transistors, diodes etc. <S> These will produce voltage drops within the loop and so it would not be true to say that the rest of the circuit can be just "considered as an open circuit".
| Short circuits will take take higher inrush current, that would generate EMI that would harm nearby components. As will LEDs, transistors, or even wires and pcb traces.
|
How can the number of clock cycles required to complete an instruction in a pipelined processor less than pipeline latency? I am not new to computer architecture but I have only academic experience with micro-architecture implementation. I have heard and read this many times but never really bothered to understand the statement: Some instructions complete in 1 or 2 clock cycles while more complex instructions say integer or floating point complete in 2, 4, 6 clock cycles etc or load/store in 80-100 clock cycles because of slow memory. Now I am sure most processors be it embedded or desktop have few stages of pipelines say from 5 stages upto 30 stages. So the latency for each instruction should be equal to pipeline depth or number of pipeline stages. Also, throughput of a single pipeline scalar processor can be maximum 1 IPC (Instructions per cycle). But how can some instructions finish in 1,2 or 4 clock cycles for a processor with 10 stage or 12 stage pipeline ? Can someone explain me that ? PS: Only thing I can understand is that maybe some stages are marked as a Multi-Cycle stage as is usually done during STA and timing closure. And that they are trying to say that execution of instruction takes 1cc, 2cc, 4cc etc. in that particular Multi-cycle stage ? <Q> Generally, instruction execution time is measured not from when it enters the pipeline to when it leaves, but rather from the time it passes some arbitrary point in the pipeline to the time the next instruction passes that point. <S> If no instruction takes more than e.g. 20 cycles to make its way through the pipeline, measuring the time for a sequence of instructions to pass through some arbitrary state will yield a result that's within 20 cycles of the actual time required to execute the whole sequence from start to finish. <S> Since programmers are generally far less interested in the time to execute a single instruction, than in the time required to execute sequences containing many instructions (often thousands, if not more), they generally will only care about pipelining in cases where it can add a non-constant cost to the overall execution time (e.g. if repeated execution of an instruction sequence will add a pipeline stall each time). <A> Length of pipeline is just the delay between the input and the output. <S> Cycles for completion is the amount of time it needs per operation. <S> This is not the same, one is "delay" the other is "speed". <S> So it is perfectly possible to have pipeline and multiple cycles per instruction at any ratio. <S> Suppose you have a 5 stage pipeline and need 3 cycles per instruction. <S> This means that the next two cycles after you apply an input the unit is not ready to accept new input. <S> In addition to that, there is an delay of 5 cycles because of the pipeline. <S> Hence it takes 8 cycles from applying the input until the result is available. <S> But regarding throughput only 3 cycles per operation are needed. <S> I.e. although the first result is not fully completed, in the 3rd cycle new input can be accepted and the computation is started (and the results is obtained 8 cycles later). <S> With a pipeline you are doing things in parallel (at the cost of delay), which you otherwise had to to serially (more cycles per operation). <A> Having an instruction which can proceed through all the pipeline stages (Fetch -> <S> Decode -> ...) <S> in one or two clock cycles seems impossible to me. <S> The "execution time" as you cited it is, probably, some kind of slang. <S> The best guess I can make without being able to see the whole context of the statement which puzzles you, is that these numbers represent the "stalling" of the pipeline when the instruction of some kind is executed. <S> The other way to say it is that this number represents the theoretical throughput of the pipeline if just the instructions of this kind would be executed. <S> For example: If the only instructions which is supplied to the pipeline could be Move Between Registers, the throughput of the pipeline would be equal to 1 - on each clock cycle one instruction gets completed. <S> If the only instruction which is supplied to the pipeline could be Load From Memory, the throughput of the pipeline would be equal to \$\frac{1}{100}\$ (assuming this instruction stalls the pipeline for 100 clock cycles). <S> In modern multi-pipeline CPUs there is no much use to the raw "instruction execution time" alone. <S> The employment of multi-level caching, out-of-order execution, predictive branching and many more, complicates the analysis and mitigate the penalty of stalling a single pipeline. <S> Sometimes this penalty can be reduced to zero. <S> However, the use of "multi-cycle" in this context is not always the same as the use of "multi-cycle" in context of STA tools. <S> The pipeline multi-cycle stage can be a combinatorial stage which takes few clock cycles (in which case it should also be defined as multi-cycle for STA tools), or it can be a sequential stage which requires more than a single clock cycle to complete (in which case it still needs to meet timing as a single cycle stage).
| Yes, the source of this stalling of the pipeline is the fact that some instructions can have "multi-cycle" stages.
|
Is the energy flow due to a an alternating current constant or cyclic I understand that the Poynting vector shows us that energy flows in the region outside, or between, conductors, but the maths gets too deep for me to discover, when the current is alternating, whether the flow is constant, or varies cyclically with the varying electric and magnetic fields. Can anyone please resolve this for me? <Q> Is the energy flow due to a an alternating current constant or cyclic <S> Consider the case of an AC current source driving a resistor. <S> The power delivered to the resistor is: $$p_R(t) = <S> i^2(t)R = <S> I^2_{max}\cos^2(\omega t) R = \dfrac{I^2_{max}R}{2}[1 + \cos(2\omega <S> t)]$$ <S> So, for a purely resistive load, the power cycles between $$0 \leq p(t) \leq <S> I^2_{max}R $$ <S> Now, consider replacing the resistor with with a purely reactive load, e.g., an inductor. <S> Then: $$p_L(t) = <S> v_L(t) i(t) = <S> L \dfrac{di(t)}{dt}i(t) = <S> -\omega L <S> \sin(\omega t) <S> cos (\omega t) = <S> -\dfrac{\omega <S> L I^2_{max}}{2}\sin(2 \omega t) <S> $$ Note <S> that the power associated with the inductor alternates between positive and negative, i.e., the inductor alternately absorbs and delivers power. <S> For a purely reactive load, energy "sloshes" back and forth between the source and load. <S> For a complex load, there is a combination of the above; a non-zero net power delivered to the resistive part and an alternating component associated with the reactive part. <S> The above can analyzed in the phasor domain too <S> but, I think, it is especially transparent in the time domain. <A> Yes, the power in Single-phase AC systems is cyclic. <S> For some values of the phase difference between current and voltage, it can even become negative (i.e. the flow goes in reverse) during a fraction of the whole period. <S> On the contrary, for three phases systems, with balanced loads, the power is constant. <S> It can be seen of one of the main advantages of three-phase systems. <A> Electrical energy flows from energy source to load between the conductors via electromagnetic radiation, which has both wave-like and particle-like properties. <S> Energy only flows in one direction - from energy source to energy sink. <S> It isn't cyclic in the sense of moving back and forth between, say, a generator and a light bulb. <S> It only flows from generator to light bulb. <S> Whether the amount of energy being transmitted varies depends on the load.
| In the time domain, it is certainly not constant, it is cyclic and, if the load is reactive, alternating.
|
New to microcontrollers...options for getting up and going cheaply I've never designed a microcontroller circuit before, but have programmed them on dev boards. I've Googled around for a while, but haven't found a definitive answer. Maybe I'm missing something. I would like to use a microprocessor to buffer the output of an ADC, and get the results back to my Raspberry Pi via SPI. However when it comes to programming the actual micro controller I don't really want to spend a lot of money on a programmer. Surely there must be open source tools which i can use for this? If so, which chip manufacturer has the best open source support on the web? <Q> AVR is one of the big ones these days, especially with the popularity of the Arduino platform. <S> The IDE itself is free, and ISP programmers can be had for as cheap as $2 (if you're willing to wait a bit). <A> Valueline MSP430 Launchpad . <S> 10 bucks for two microcontrollers, dev board, and programmer. <S> Multiple free programming software (GCC, CCS, IAR, Energia[Arduino Clone]) <A> ... buffer the output of an ADC, and get the results back to my Raspberry Pi via SPI. <S> Why do you think that needs a microcontroller?Have <S> you considered maybe instead using an ADC with a direct SPI interface?For example, the ADS1294, ADS1271, ADS1278, LTC2440, MAX1416, MCP3208, MCP3301, MAX1464, ZSSC3026CI4R, or any one of dozens of other SPI-interface ADC chips are available from several manufacturers via your favorite suppliers . <S> (There are situations where a microcontroller between an ADC and a Linux box is a great idea. <S> But there are many other situations where a microcontroller adds unnecessary complexity). <A> I like to use AVR chips with their Atmel studio. <S> Their website has good documentation and because it's the platform the Arduino is based on, you'll have a lot of good example cases. <S> The usb programmers are something like 30 dollars. <S> Or, you could just buy yourself a smaller arduino, unless that's not "low level" enough for you. <A> I have experience programming for chips from Microchip, Atmel, and ST. <S> In general, you will end up getting a lot of people hating on one manufacturer and loving another. <S> Most of the time, you end up liking the series of chips with which you are the most familiar. <S> I will give you advice below, but please don't spend too much time worrying about making the best solution and dive in. <S> All 3 of these choices provide: Free IDE to develop and debug your code. <S> - PIC AVR ST Support forums online PIC AVR ST Example code to download PIC <S> AVR ST Cheap <S> ($30ish) programmer/debuggers <S> PIC <S> AVR <S> ST <S> Differences: <S> Microchip: They provide the cheapest chips, but you do get what you pay for. <S> IMO, they are fine parts for hobbyist work. <S> I learned to program micros on a PIC24 using the Learn to Fly book . <S> I found it really useful. <S> Atmel: They have, hands down, the best and most widely used forum in the industry. <S> Their MEGA series have been made quite popular by the Arduino platform, so you would find a lot of people who run into your problems. <S> ST: I use the high end ARM core processors professionally and really like them. <S> They have a really good forum page, which will typically get you an answer in less than 2 hours. <S> They also have large online example libraries, for every peripheral. <S> I haven't used the lower end chips that you would probably be wanting, so I would suggest some more research before choosing them. <S> All in all, I would go with an AVR (Atmel) chip. <S> Hope this helps <A> use ponyprog which is so cheap (isp programmer) <S> but first see ponyprog.com site to see whether it supports the microcontroller you need or not it coast just 100RS in india
| You can either use a full Arduino (or compatible) board, or you can use bare AVR ICs on a breadboard, either with one of the Arduino bootloaders (for direct programming) if it's large enough, or one of the aforementioned programmers.
|
Advice... Shift registers, multiplexing, or both I'm doing a project that has a lot of displays, in the form of single leds or 7-segment displays. So the question is in the title. Using 8 bit registers, if I used them for all the leds, it would take around 60 registers, which is not a money problem given that they are like 20 cents each, but I don't know if it's absurd to do it. The other option is to multiplex, specially with the 7 segment displays. There are like 55 of those displays, but I'm going to use an Arduino board and I doubt the processing speed will be enough to multiplex them all without blinking. The other logical option is to use a combination of both, which I wouldn't know how to combine properly, maybe have little groups of up to 6 multiplexed displays, using the registers to control them all. By the way, I have deduced that with pulse of around 10 microseconds of the clock for the registers, and 8 bit each register, it gives around 80 microsecond per register: 4800 microsecond totally, so about 5 milliseconds to work all of them. I don't know if this will be enough for a proper display of them all, although I could cut back the pulse to 2 or 4 microsecond and see if the registers still work properly. So that's it, I'm asking for advicen before starting to design the circuit boards and buying registers, if anybody has experience on this things, I would appreciate it. The board is also supposed to run more things than the displays, a bunch of servo motors, some steppers, and some inputs too (like another 60 inputs), so that will obviously affect time too. I could use a max of two microcontrollers if needed. If I could do it with one, perfect, if not, two at most. I could also change to Arduino DUE, which has a better processor, if that makes any difference. Thanks in advance. <Q> I would suggest that if you consider multiplexing with a ratio such that one can achieve acceptable brightness without needing the the instantaneous drive current to exceed the maximum allowable continuous operating current. <S> If you don't, then you'll either have to add circuitry to ensure that the display shuts down when the multiplexing isn't happening properly, or else risk damaging the LEDs if a row or column gets stuck "on". <S> Given that constraint, depending upon how much brightness you need, you may find that somewhere between 2:1 and 8:1 is adequate. <S> Suppose you decide on 4:1. <S> In that case, I would suggest taking digits in groups of eight, and having each group of eight digits use one 16-bit shift register with current-controlled outputs for the display segments (eight to the segment and decimal wires of the first four displays, and eight to the other four) and an 8-bit shift register to select one of four common wires to drive. <S> The spare outputs of the latter shifter could be used to do something like set the amount of current for the segment outputs [allowing for fading or flashing effects]. <S> If you e.g. want some digits to show up as 25% brightness and the rest to repeatedly fade between 25% and full brightness, then for 1/4 of your multiplex cycles you should set the controller for full current and output the data for all the digits. <S> For the other 3/4 of the cycles, you should set the controller for a variable amount of current, but blank all digits except those that should be fading. <S> This approach has some limitations, but is often much easier than fancier PWM techniques. <A> You will be well advised to break up the display problem into multiple sub-units. <S> Wiring from those displays can be fairly short back to the sub-unit and then a narrow serial bus of a few wires can be used as a communications channel back to your main processor. <S> It would only need to send the data to be displayed at the times that it changes or say once per second to keep it updated. <A> I've built a 4-digit multiplexing system with an Arduino. <S> Driving 55 displays is probably within the capabilities of the Arduino - you'd need to update at something like 10 KHz to avoid a flicker - but they would be driven at a duty cycle of 1/55, or about 2%. <S> Even if you push the displays to their maximum pulsed voltage, this probably isn't going to be bright enough for your needs. <S> Maxim makes a lot of multiplexing chips that will simplify your life. <S> A chip like the 7219 will drive 8 digits by itself, and you can cascade them together to drive more. <S> Look at the datasheet for more info on how to do this. <S> They are not particularly cheap at $11, but they will save you a lot of hassle. <S> You communicate with them over SPI.
| Design a simple MCU solution that can run from 4 to 8 of the seven segment displays in a multiplex manner.
|
Need help calculating resistance for transistor base I have 3 12VDC/40A automotive relays ( datasheet ) that I want to use with my Arduino.Based on the tutorial I am following ( link ) I need transistor, resistor, and diode. I am not an electrical engineer therefore I am unsure about the parts and calculations I made. For the start, relay coil resistance is 90+-10% Ohm per datasheet. So I proceed by calculating the current flow. Voltage=Resistance*Current Current=Voltage/Resistance Current=12V/90 Ohm Current = 133mA For the transistor I can get 2N3904 or 2N4401. At this point I have to calculate resistance for the base of transistor. In tutorial its as following hfe = Ic / Ib Ib = Ic / hfe Ib = 0.03 A / 75 Ib = 0.0004 A => 0.4 mA R1 = U / Ib R1 = 5V / 0.0004 A R1 = 12500 Ohm 2N3904 datasheet states the H(fe) is 30-300 when lc = 100mA (mine is 130mA) and Vce = 1V. At this point I have no clue what is going on, thus I need help. Edit:Here is what I ended up with. RLY1 in the picture is 12VDC/40A ( link ) <Q> Let's design for worst case, that is a good practice. <S> \$Ic <S> = 133\text{mA}\$ \$h_{FE} = 30\$ <S> # according to the datasheet minimum 30, typically much better; @Ic=100mA <S> You can calculate Ib now: \$I_b = \dfrac{I_c}{h_{FE}} = <S> \dfrac{133\text{mA}}{30} = <S> 4.43\text{mA}\$ <S> \$V_{BE,SAT} = 0.95\$ <S> # datasheet, nearest match is 50mA. Maximum value, practical value is probably much lower (0.65V) <S> Now let's calculate the base series resistance. <S> This is equal to the voltage across the resistor, divided by the current through it. <S> The current through the resistor is the same as the base current. <S> The voltage across it is the rail voltage (5V) decreased by the base-to-emitter voltage of the transistor V(CE,sat). <S> \$R_B = \dfrac{U_{R_b}}{I_b <S> } = \dfrac{V_{CC} - V_{BE}}{I_B} = <S> \dfrac{5 - 0.95}{4.43/1000} = <S> 913\Omega\$ <S> With all the worst case engineering up to here, for once let's just round it up to the nearest E12 resistor value of 1kΩ (or 820Ω for worst case engineering, it will work with either). <A> You are right in that the relay coil seems to need 133 mA nominal. <S> However, that's not worst case, and that assumes 12 V is applied accross the coil. <S> Nevertheless, that's a good place to start, then we'll throw in a factor of 2 margin later anyway. <S> Let's say the minimum guaranteed gain of the transistor you will use is 50. <S> That means the base current needs to be at least 133 mA / 50 = 2.7 <S> mA. <S> If your digital output is 5 V, then there will be about 4.3 V accross the base resistor after accounting for the B-E drop of the transistor. <S> 4.3 V / 2.7 mA = <S> 1.6 <S> kΩ. <S> To leave some margin, use about half that. <S> Now check back to see what the digital output must supply. <S> 4.3 V / 820 <S> Ω = 5.2 <S> mA. <S> Many digital outputs can source that, but you need to check that yours can. <S> If it can't, you need a different topology. <A> Since you are using the transistor in a saturated switching configuration it is OK if you pump more base current into the part than actually required for the amount of collector current that you intend to sink through the device from the relay coil. <S> That is a practical limit to the maximum base current that you can inject in the case of the 2N3904 / 2N4401. <S> That limit is not always explicitly stated in the data sheets for the parts <S> but I can tell you from experience it is in the 5->6 mA range. <S> For a switching design you may want to plan for the minimum guaranteed Hfe plus a margin. <S> So lets say you pick 25 as the worst case working Hfe. <S> With a needed collector current of 133mA and a Hfe of 25 will result in a working base current of 5.32mA. <S> This seems to be in the OK area for these transistor types. <S> It appears that you intend to drive the base from a 5V signal. <S> With a nominal Vbe of 0.7V that leaves you with a 4.3V drop across the base resistor. <S> Resistance to limit current to 5.32mA at 4.3V is approximately 800 ohms. <S> Use an 820 ohm standard value base resistor. <S> Final note. <S> If you are driving this direct from an MCU output pin the MCU may not be able to source 5.32mA at 5V output level. <S> As such the MCU output will drop down some from 5V. <S> This will reduce the base current some <S> but since we calculated using worst case Hfe the relay drive will still work for most transistors that you will pickup out of the bag. <A> You can certainly put more current into the base of a transistor than that implied by collector current requirements and \$h_{fe}\$. <S> In fact you usually need to - this ensures that under all normal operating conditions the circuit will continue to work as expected. <S> There are limits though - the data sheet for the transistor might tell you that absolute maximum base current is (say) <S> 50 <S> mA - you don't really want to go that high if collector current requirements and \$h_{fe}\$ imply 50 <S> \$\mu A\$. So choose 500 \$\mu A\$. <S> This will likely cover all eventualities. <S> However you need to work out if the circuit driving the base can continuously supply the current you decide upon. <S> Again, the data sheet will inform you and you don't want to sail too close to this number either else you might be reducing the chips reliability. <S> There's another consideration too. <S> A lot of CMOS devices will state that there maximum output current is (say) <S> 20 mA <S> BUT they'll also state a maximum power current of (say) <S> 100 mA. <S> This is fine if the chip is driving 3 outputs but what if the chip is an octal buffer. <S> Realistically check the current output per pin AND double check on the power supply current - there may be a limit on this that prevents all o/p pins pushing out 20 mA. <A> Ib = <S> Ic / hfe (Fine) <S> Ib = <S> 0.03 <S> A / 75 <S> Ib = <S> 0.0004 <S> A => 0.4 mA Hmmm! <S> Ic = .13 <S> A not 0.03 <S> and I would take hfe to be about 50, rather than 75. <S> (generally the small signal transistors have at least this gain)This gives Ib = <S> 0.0026 <S> or 2.6mA <S> For a 5V input the voltage drop across the input resistor will be 5 - 0.6V = <S> 4.4V (remember the base-emitter drop needs about 0.6V before the transistor is turned on.) <S> This gives; <S> Rb = 4.4/0.0026 = <S> 1k7 <S> Now this is really <S> a maximum value for the base resistor so chose a standard value resistance below this say 1k5 or even 1k0. <A> I would like to share this link, it has good information on using microcontrollers to interface with real world electronics. <S> Look at Part 7 of Microcontroller Interfacing Table of Contents
| The common value of 820 Ω should be good.
|
How to display images in ultraviolet? The purpose of this is to show images to mice, which have one UV shifted cone relative to humans. An ideal solution would be a monitor that had 3 wavelengths : 365nm, 410nm, and 500nm. But, the 410nm wavelength is optional and a projector would be usable in a limited context. The easiest way I can think of is swapping the blue LED on a DLP projector with a similar LED one. I would be replacing the projecting lens with a UV compatible alternative set of optics - but I'm unclear on whether there would be other optical issues that would interfere with this. Is there any way to do this with a non-projecting display (crt or LCD)? Are there other things I should consider? <Q> I think you're on the right path with DLP idea. <S> There are DLP sets that use HID or High pressure discharge lamps that are broad spectrum, but also have UV content. <S> There will be UV cut filters in the optical path to prevent premature aging of components, organic die based filters and the polymer based back illuminated screens (if a rear projection unit). <S> Also the UV filter is in there to protect human eyes. <S> It will be a simple matter of removing the UV cut filter, although I recommend you wear UV protection goggles until you can measure the spectral content. <S> It might be possible to just replace that single element to provide wavelengths you need (rather than removing it wholesale). <S> Do note that the index of refraction might be quite different in the optical path so the UV image will be out of focus relative to the visible range. <S> I am assuming of course that these mice are NOT highly trained so they won't be able to provide relative IQ (Image Quality) metrics. <S> So perhaps you should wait until this training happens. <S> Or perhaps I should say possibly as these particulars will be dependent upon each units optics design, the glass used and lamp used. <S> Also be aware of flicker issues, with the mice. <S> I presume that their response time is much faster than ours so they may find a DLP as being too flickery. <S> The DLP flicker is noticeable peripherally in some humans <S> so I assume that mice may avoid this - i.e. movement based triggers and alert in the visual cortex. <S> evoking Run away! <S> or Freeze! <S> might mess up your experiments. <S> As an aside we used to take the UV filter out of our test setups (LC based systems) to accumulate total UV dose on the LC system to be able to study long term degradation and to predict MTBF and lifetime and we used similar lamps to these DLP units. <S> Make sure the little guys have good sun screen. <A> Interesting application. <S> I think your idea might be the easiest. <S> But I would swap the red led with a UV 365 nm LED. <S> then you would have UV, blue (405 nm) and green (550 nm) which is close to what you want. <S> Alternatively you could find a filter wheel based projector and try to replace the filters for your three colors. <S> Even standard BK7 glass is transparent down to 350 nm <S> so lenses should work. <S> Probably no replacements of optics are necessary. <A> Why not use a slide projector type arrangement? <S> Make a slide (or a mask on a UV transmissive substrate) and reimage to project onto a screen. <S> You might need two projectors to make a colour image. <S> This way you can make a image without any flicker which might influence your results - (murine rods and cones seems to have a frequency response of < 30 Hz https://doi.org/10.1523/JNEUROSCI.3551-07.2008 )
| If the lens turns out to be not transparent, UV grade glass could be used (these are standard components in optics).
|
A good circuit for a large number of push button inputs? I'm planning to build a kid-friendly "universal remote" so the kids can turn on and off a myriad of IR-controlled devices with one or two easy presses... The remote is going to have maybe 20 big chunky buttons which, when pressed, with send the multiple IR signals to all the necessary devices to, say, turn on kids channel, set up the Wii, etc, etc... Most of the buttons will be laid out in a grid pattern, but some might be used for up/down/left/right, enter, etc.... I'll use an Arduino Pro Mini or Uno as the uC. Are there any clever ways to wire up these buttons? A grid-type circuit? Analog inputs with different resistors between each button? An IC that'll make the job easy? <Q> You basically listed them all. <S> A Matrix of x rows and y columns. <S> You need x+y pins. <S> Digital GPIO Expander IC, preferably with interrupt. <S> I2C, SPI, even Serial are available. <S> This approach is mainly used if you need a lot more GPIO than you have available on the main microcontroller. <S> At that point, you are basically still using options 1, 3, and 4, or the direct one button per pin. <S> Resistor Ladder. <S> You need an ADC, and constant polling. <S> Charlieplexing . <S> Like a multiplexed matrix (#1), but with \$N \times (N – 1)\$ where \$N\$ is the number of pins used. <S> Requires as many diodes as buttons, so you are changing pin count for diodes. <S> You could use LEDs though. <S> For the most part, #1 is the most common method. <S> Every keyboard or touch tone phone you have ever used, 1000 to 1, would have used it. <S> Hell, even cell phones use it (specifically, the Nokia 5110 <S> I know uses it.) <S> For 20 buttons, a 4x5 matrix will only take 9 pins, more than enough. <A> Texas Instruments makes an i2C keypad encoder . <S> Surface mount. <S> It doesn't get much simpler than that. <A> An IC that'll make the job easy? <S> Definitely. <S> The LM8330 I/O - Expander and Keypad Controller is a dedicated device designed to unburden a host processor from scanning a matrix-addressed keypad and to provide flexible and general purpose, host programmable input/output functions. <S> Three independent Pulse Width Modulation (PWM) timer outputs are provided for dynamic LED brightness modulation. <S> It communicates with a host processor through an I 2 C-compatible ACCESS.bus serial interface. <S> It can communicate in Standard (100 kHz) and Fast-Mode (400 kHz) in slave Mode only. <S> With this you can probably get away with using a ATtinyX5 instead of a ATmega.
| Interrupt pins allow you to read on interrupt instead of polling. You need to have hardware I2C/SPI/UART, or add software code. Better to break up into a few similar groups on multiple ADC channels, but you can make a large 20 button one if you really need to.
|
Multiplexing I2C devices with MOSFETs Ok, I understand similar questions have been asked in the past, please bear with me. Here is my problem, I have 2 I2C devices to be connected to a single I2C bus. They happen to be the same component and have the same hardware address. The address cannot be changed. My application requires the minimum possible latency. My plan is to use MOSFETs on the SDA line so that I can control when each of those devices is active. For each device there will be a MOSFET and by switching that on and off, I should be able to enable and disable them. Would this work? If not, what would? UPDATE: Ok, so I got my hands on MOSFETs (IRF520). I hooked up a digital pin on my arduino to the gate and the SDA lines to the source and drain (Arduino end to drain and device end to source). The thing didnt seem to be working, it gave me wrong values and would just stop entirely on bigger values. So I decreased the I2C frequency to 100kHz from 400kHz and it worked. I know the problem is in the FET because it works fine at 400kHz when the sensor is connected directly. Trouble is, I need it to work at 400kHz. What causes this issue and how can I rectify it? I was considering switching to the IRL540, would this help? My messy diagram is as follows (I plan to repeat it for each sensor): <Q> They are more reliable for I2C switching, and have lower parasitic capacitance than a discrete MOSFET, and not that much more expensive. <A> Okay, I have solved my problem. <S> Thank you all for your help! <S> My solution is as follows. <S> I went down to Farnell and picked up some 2N7000 and some BS170 MOSFETs. <S> I then replaced the IRF520 in my circuit (diagram in question) with the new MOSFETs and lo and behold, I was getting fabulous results with both of them at 400kHz I2C. <S> So that settles, it, thank you all once again! <A> Here is possibly why it did not work for you initially, and why folks should be careful using MOSFETs for this type of application (I2C and anything capacitance / rise-time sensitive): <S> Recall that MOSFET output capacitance is Cgd + Cds. <S> That 250pF is extremely high considering <S> the I2C specification limits you to 400pF overall on the bus, lower to meet certain rise-time requirements. <S> To be fair, this is more of a killer when you've got the MOSFET hooked up as a level shifter, but could still be an issue here. <S> Alternately (as mentioned below), there's a body diode to consider. <S> For the IRF part, it has a maximum forward voltage of 2.5V. <S> Your BS170 is better: Couldn't find a body diode voltage spec, but it might be different enough that here's the reason you're working. <S> Using a MOSFET here, remember your circuit actually looks like: <S> The device will still see SDA through that body diode, and remembering that I2C is open-collector, if it decides to pull-low, it will sink current through that diode. <S> The sensor will turn on its internal N-channel driver, pull SDA low, and now current can flow through the body diode (assuming a 3.3V bus or something above <S> it's drop) and into the part, wrecking your bus. <S> I'm glad it's working for you right now, but in the future, you may want to consider not using MOSFETs, as described in this answer here. <S> An analog switch IC or and I2C multiplexer device would be the "clean", but admittedly pricier way of doing this (in the case of the mux, anyway). <S> With the analog switch, I would consider placing a very weak PU resistor (maybe 100K) on the SDA on the IC, as I have seen parts where floating I2C inputs are more likely to oscillate and burn current. <A> They make i2C bus repeater ICs for just this purpose.
| Use a "bus switch" (i.e. NC7SZ384 ).
|
Which has better efficiency: step-up or step-down switching voltage regulator? I have a Lithium battery pack circuit that converts 4.2V (two 4.2V cells in parallel) to 5V.Another option is to use a step-down converter from 8.4V (two 4.2V cells in series) to 5V.Considering both cited circuits are well implemented, which choice would be more efficient in terms of power dissipation? I am looking for some general rule as "step-down is always preferable than step-up" or "the absolute voltage difference matters" etc. <Q> Boost converters are typically less efficient than Buck converters, but not by much. <S> The fundamental reason has to do with the inductor current flowing directly to ground during the on-time, instead of through the load, like it does on Buck converters. <S> There is an EE-Times article that mentions this: Unscrambling the power losses in switching boost converters <S> Generally, however, since inductor current flows to ground during the on time, only a fraction (off time to period ratio) flows to the output, as illustrated by the pulsing currents in Figure 2 <S> (this is the reason why boost converters are generally less power efficient than buck converters) <S> Cost Size Cells in series will be limited by their weakest cell. <S> Cells in parallel tend to charge one another, and there is an efficiency hit due to the chemical process. <S> Losses due to higher input current with lower voltages (parallel cells). <A> Batteries are often not terribly fond of being wired directly in parallel, since any mismatch in the open-circuit voltage will result in the higher-voltage battery feeding current into the weaker one. <S> If one is using rechargeable batteries and the charge states are sufficiently close, this may simply result in the batteries trying to equalize each other. <S> When using primary-cell batteries, however, or if the charge states are not particularly close, this current flow may be detrimental to both batteries. <S> Wiring batteries in series is often safer, provided that current shuts off before any battery's voltage drops below its minimum safe level. <S> For primary-cell batteries, the minimum safe level is roughly zero volts (the concern not being "damage" to a dead and useless battery, but rather the possibility that a back-driving primary cell battery may dump harmful chemicals on nearby circuitry). <S> For rechargeable-cell batteries, the minimum safe voltage is much higher (draining batteries below that point may greatly accelerate wear). <S> Any differences in the efficiencies of step-up versus step-down conversion are apt to be minor compared with issues resulting from series or parallel battery connections. <A> Step up and step down idealized converters are exactly the same thing. <S> The circuit is as in the image and instead of putting diodes an ideal 2 positions switch is used that is equivalent in scope. <S> That circuit is equivalent to both a buck and a boost converter. <S> That circuit works in both ways from left to right as a buck converter and from right to left as a boost converter. <S> I suppose thus that there should not be any difference in efficiency between them, but more expert audience may have a different opinion based on other considerations.
| Since the efficiency differences are not significant, you are probably better served deciding on additional criteria instead of regulator efficiency alone, including: Charger complexity (single cell is simpler).
|
Direction of Current Flow in the circuit? I'm a little bit confused with the current flow in the given power supply circuit. Does D3 conduct when D1 conducts in the positive half cycle? Could someone explain direction of current flow through the diodes and regulators in each half cycle? <Q> Yes, D1 and D3 conduct at the same time, as do D4 and D2. <S> This configuration of diodes is so common it has a name, which is full wave bridge . <S> You often see it drawn in a diamond shape as in your schematic, but I like to draw it differently to avoid exactly the confusion you are having. <S> Here is a better way to visualize a full wave bridge: <S> Imagine these are perfect diodes for now. <S> Hopefully you can see how this effectively takes the absolute value of that AC input voltage. <S> Real diodes have forward voltage drops. <S> If we figure 700 mV for these ordinary silicon diodes, then the AC signal has to have a magnitude of 1.4 V before anything conducts to the output. <A> This is a bridge rectifier. <S> D1 and D3 conduct together, and D2 and D4 conduct together. <S> The capacitors smooth out the ripples in the waveforms. <A> This type of power supply does tend to benefit from a balanced load on positive and negative outputs. <S> If this is the case then D3 conducts when D1 conducts (one half cycle) and D4 conducts when D2 conducts (on the other half cycle). <S> If the load is imbalanced then things are similar. <S> Let's say there is no load on the negative regulator and <S> if this is the case the conduction of the diodes is still the same BUT the centre-tap of the transformer acts as the return path for currents. <S> With a balanced load there is no current in or out of the centre-tap. <S> Generally with these types of regulators, current flows from left to right on the 7805 and right to left on the 7905. <S> The ground connections are needed for correct operation and they take a few milli-amps irrespective of load. <S> Also note that I think you may have a pin number discrepancy on your regulators - they both cannot be numbered the same.
| Basically, for both the positive and negative parts of the sinusoid waveform, the current will always flow through the load in the same direction. Regardless of the polarity of the AC signal, the more positive AC line will make one of the top diodes conduct, and the more negative one of the bottom.
|
Locking ribbon-cable in place There is ribbon cable which is connected with a locking mechanism as in the picture below. The brown plastic locker is not locking properly, is there a way to get another locker and lock it in place with something else, for example glue? <Q> That's a "flat flex" cable (not a ribbon cable), and the connectors are not really intended to be repairable. <S> The proper fix would be to replace the connector with a new one, but this requires a person with fairly good SMT skills and equipment. <S> If you do try glue (e.g., "Superglue", or cyanoacrylate), be extremely careful to keep it away from the actual electrical contacts. <S> I would recommend staying away from the runniest formulations; use one that has a bit of thickener it it. <A> As @DaveTweed mentioned, your picture is not of ribbon cable, but of FFC (Flat Flexible Cable; while not completely equivalent, the term is sometimes used interchangeably with Flexible Printed Circuit, or FPC). <S> If you're brave enough to try to replace the connector, you'll want to use FFC as your search term on your favorite distributor's website. <S> There are a couple of other options for fixing the connection--one is lower risk, the other is more durable. <S> The lower risk option is to attach a piece of tape with a very strong adhesive to the cable, leaving enough of the end of the cable free that it can properly insert into the connector. <S> Then attach the other end of the tape to the connector itself. <S> The more durable option is to partially pot <S> that section of the circuit board with RTV or epoxy. <S> This is more risky because of the danger of getting your potting material between the cable and the connector contacts, but it will provide great durability. <S> To keep the contacts clean, you could try to insert something between the non-conductive side of the FFC and the connector to ensure a tight fit. <S> A thin piece of plastic would work well--just make sure it's non-conductive. <A> This video gives a really neat, cheap and easy fix that might work before you start gluing or replacing the connector: Easy Ribbon Cable Connector Fix, Repair: https://www.youtube.com/watch?v=bhaeKdUltz8 <A> This makes the cable slightly thicker and increases the clamp pressure. <S> It worked for me fixing a loose touchpad FFC. <A> I thick you could use some kind of RTV gluesI recommended this part number"Kafuter RTV 704" very good for fastening connectors and big parts like large capacitor. <S> It's a bit soft but you can not tear it; it is possible to remove it but hardly.
| If your connector's locking clamp is merely loose, rather than straight-up broken, you may be able to tighten the connection by cutting a piece of electrical tape to the size of the cable head and applying it to the back (non-contact) side of the cable.
|
Detect presence of solid object I have a microcontroller-based project (using an Atmega328) that needs to detect the presence of a solid object placed on the project box. What would be the best way to achieve this? I've thought about using a photosensitive resistor in a voltage divider configuration, but the issue I have with this is that if the project box is in a dark room it may not detect any light when the object is removed. Any and all input on this would be appreciated as I'm not sure how reliable my voltage divider solution is. The objects placed on the project box will be solid and made of glass or plastic. And the only output needed from whatever sensor I use is a logical zero or one to signify if an object is there or not there. Note the objects may have concave bottoms, so the sensor would need to be able to identify it even if it's up to 1-2 cm away from the sensor. <Q> Plastic has a relative permittivity which is about 2.0 or greater and glass is greater than 4.0. <S> So both should be easily distinguishable from air which is essentially 1.0. <S> The Arduino CapSense library uses a very simple GPIO pin based method for measuring capacitance. <S> You could easily do this on your project. <S> The most interesting part would be designing the sensor layout to maximize the reliability of detecting the object of interest without false readings e.g. when someone's hand is near the surface. <S> The sensor would work by the glass or plastic object causing the fringing field capacitance between the two sensor electrodes to increase when the object is present, compared to the capacitance when only air is present above the sensor surface. <S> One electrode would be connected to ground and the other electrode to the MCU "receive pin" as in the following diagram: <S> Now I expect you'd want to use two electrodes and use the fringing field capacitance to do the sensing, rather than the "one-electrode" model used in the above figure, since the plastic or glass object won't be well coupled to ground. <S> You could use a spot sensor, like a circular sensor and a surrounding ground plane, or you could implement a wider-area sensor using interdigitated coplanar electrodes. <A> A couple options come to mind. <S> or, if you think the object would be opaque enough, an infrared proximity sensor . <S> Put the sensor in the top of the box, pointing up and out of a hole you've cut there and poll it occasionally. <S> When the measured distance decreases rapidly, and as a method of noise filtering stays low for a set number of samples, you've got an object in the way. <S> Properly placed load sensor <S> Another way is to put the load sensors on the bottom of the box. <S> Assuming the object is actually placed on the box, the detected load will increase and can signify the presence of an object. <S> Strain gauge Make the top of the box springy, that is, it's lifted slightly from a solid resting point. <S> Now place a strain gauge in the gap. <S> When an object is placed on the top it is depressed and bends the strain gauge. <S> This signifies the presence of an object. <S> The above options don't necessarily give you a logical one/zero for presence, but neither would a optical sensor. <S> Momentary push buttons <S> If you're mechanically savvy, you could even use one or more push button switches. <S> For instance, on the lid of your project box place three/four push button switches and attach (glue) <S> a platform for the object on top of them. <S> This method might not be terribly reliable though. <S> I'd try to avoid too many moving parts. <S> Personally, I'd go with the optical range/proximity sensor. <A> If the object contains any material metallic a very simple (and cheap) option is to use inductive sensing. <S> You can make a coil of wire with a few loops and use this as an inductor in a LC oscillator. <S> It's pretty straight forward to use an arduino (or any other controller de jour) to stimulate and measure the resonance frequency of the oscillator. <S> When an object (in particular a metallic object) comes near or in the loop the inductance of the loop changes as does the oscillation frequency. <S> Thus you can detect the presence of the object by observing oscillation frequency. <S> This technique works well depending on your material. <S> Theoretically almost any core material will change the inductors value, but the SNR might be questionable. <S> I hacked up a sensor similar to this in about 30 mins a few months back in order to try to detect non-metallic materials. <S> Though the frequency changes <S> the SNR is low so you might need more complicated signal processing to differentiate the object. <S> At that point you'd probably want to consider other sensors (ultrasonic, IR, load cell, etc) since the nice thing about this option is the simplicity/cost. <S> Incidentally this is the way that stop lights <S> detect the presence of cars. <S> If you've ever seen a loop cut into the pavement at a light this is actually where they embed coils of wire to make the L in the LC oscillator. <A> You could try a variation on a 'magic-eye' detector (beam interrupt). <S> With no object to block the beam the output from the phototransistor would be LOW. <S> With an object in the way the output would go HIGH.
| You could implement a capacitive sensor on the top of the box. Range finder Use an ultrasonic range finder
|
What is the simplest and cheapest way to convert 11.1VDC battery pack to regulated 9VDC? I have a portable multitrack digital recorder which I'd like to use where there's no power available for longer periods of time than regular alkaline dry cells allow. I'd like to use this 11.1 volts 4400 mAh battery pack salvaged from an old laptop. The current draw of the recorder is 200 mA. <Q> <A> I think the simplest and cheapest way is you use 3 diodes like below. <S> 11.1V <S> - 0.7V - 0.7V - 0.7V = 9V simulate this circuit – <S> Schematic created using CircuitLab <A> I'd consider using a 9.1 volt zener diode and dropper resistor of 10 ohms. <S> At 200mA, 10 ohms will drop 11.1V to 9.1V and the zener diode would just be at the edge of conduction. <S> If the digital recorder were not drawing 200mA (let's say 1mA instead), the current into the zener would now be about 200mA. <S> I don't think 9.1v or probably even 9.5V would be a problem for the digital recorder <S> but if it might be then consider using an 8.2V zener instead. <S> Power ratings: <S> - the 10 ohm resistor is dropping 2V and this means its power is 400mW. <S> The zener when conducting 200mA will be dissipating a little under 2W so choose a 3W device or greater. <S> It might also be worth putting a 500mA fuse in series with the series dropper resistor. <S> EDITED to make things a little clearer about its limitations: <S> - This circuit is simple and would work better than a standard linear regulator (given what volt-drop it would produce) but be aware that leaving the resistor and zener connected to the battery will drain the battery just as much when the digital recorder is connected. <S> In other words, when not using the digital recorder, disconnect the battery to sustain its charge. <S> Also note that it is not an efficient type of regulator like a switching regulator <S> - it dissipates power in the series resistor because, like a linear regulator, there is a voltage across input to output with the same current passing. <A> While a 7809 is a commonly available 9v regulator, most versions have a high drop-out voltage of a few volts. <S> A drop-out is the minimum voltage between VIN and VOUT that the regulator needs to ensure that VOUT is what it should be. <S> In this case, 11.1v battery, would not be ideal with a 7809. <S> A LDO like the NTE1957 would be better. <S> At 0.5v drop-out at 1A, or 0.1v drop-out at 100mA, it would be ideal, but give 81% efficiency. <S> You are losing 20% of power in heat. <S> A better solution would a switching regulator. <S> The mc34063 is a common single chip switching regulator, that does Step Up, Step Down, and inverting. <S> It's found in basically 80% of the usb car chargers you can buy, with all the extra parts you need (you can get them for a buck on ebay or 5 dollars retail). <S> A simple change of a resistor or two can change the output from 5v to 9v. <S> Typically, a R2 of 3.6k and a R1 of 1.2k are present. <S> Replace R2 with a 7.5k resistor. <S> Formula is Vout = 1.25 <S> (1 <S> + (r2/r1))
| To convert 11.1 V to 9V you can simply use the 7809 regulator IC.
|
How can I make a durable connection between a PCB and outside of case? How would one go about connecting an LED or a sensor to a printed circuit board? You could use a male header pin and a dupont cable, but that seems like it would easily be able to slip out. Is there any standard solution to this problem? Soldering is out of the question because anyone should be able to connect the wire without having to have any special skill. <Q> Well, you could buy an LED like <S> this with wires attached, and attach a lockable connector to the wires for the end user to connect. <S> Or you could use a board mounted LED and then use a light pipe to get the light out of the case. <A> Unless the device is subjected to excessive amounts of shock, dupont cable on a 5.88mm male header pin is very reliable. <S> If even higher reliability is required, adding more connections than strictly required will increase the extraction force proportionally. <A> There are lots of existing solutions. <S> A latching connector for instance. <S> If you're trying to keep it really cheap you can just add two mounting holes near the cable attachment, this way you can zip-tie the cable to the board.
| Note that the cable should be secured against either the board or the chassis in order to prevent any slack from swinging around regardless.
|
555 Timer Triggering Too Easily I've got a 555 timer being powered by a 5v rail that is isolated from the 3v rail running a motor driver, which runs a motor. The 555 is only supposed to fire when it gets the signal from a 38khz infrared detector but it seems to trigger everytime I plug a wire into the 3v rail, or sometimes for no apparent reason at all. What is going on? Can I give it some buffer room somehow? Extra info: when the 555 is triggered by the 38khz infrared receiver, it is supposed to tell the driver to spin the motor forward for about 6 seconds. However, the 555 also triggers an infrared LED to try and trigger a photoresistor, and if the light isn't blocked, then the phototransistor is supposed to disable pin 2 of the driver and enable pin 7, thereby reversing the direction the motor will spin for the 6 seconds indicated by the 555. this is so that the device can tell whether to run the motor forward or backwards based on the phototransistor's ability to see light. a busy cat http://jackvero.com/pictures/schematic.png <Q> The 5V bus needs capacitors across it, near the regulator, near the TSOP4838, and another one near the 555. <S> Without it, there is ripple on the bus. <S> The TSOP4838 will false trigger with more than 100mV ripple. <S> This false trigger will trigger the 555. <S> Switching the load on the 3V bus will cause sag in the 9V bus, which will be passed to the 5V bus via the regulator, before it can compensate. <S> You should prove this by measuring the ripple before you add capacitors. <A> Also, regardless of your triggering issues, you have the 555 wired incorrectly. <S> You have a timing capacitor (no reference designator) connected directly to pin 7 and through R1 to pin 6. <S> In this configuration, you are relying on leakage current through pin 6 to charge your capacitor once the 555 is triggered, which is going to give you very unreliable results. <S> The correct way to do this would be to tie the capacitor directly to both pins 6 and 7, and connect a timing resistor from that junction to the +5V rail. <A> My guess would be that the output of the 38kHz detector is actually an open drain or open collector, which would leave the trigger pin as high impedance and therefore its voltage level undefined. <S> Finally you could also look into adding a small RC filter on the trigger pin such as that the time constant will not noticeably affect the response of the circuit.
| This can be address by adding a pull-up resistor on the trigger pin plus adding decoupling capacitor as previously mentioned would also help.
|
What is a good way to solder small transistor to wire? I have a really small transistor with very little space between its pins. I want to solder resistor to base and wires to collector&emitter. So I am worried about transistor pins come in contact by accident. The wire is about three times as thick as transistor pin, which doesn't help either. Edit: Here is small schematic of the things that I need to solder. Wires that connect to relay will be soldered to connector instead of wiring directly to relay. <Q> Soldering wires to TO92 packages may be a bit fiddly but it is well within the capabilities of an amateur hobbyist. <S> When I have trouble, I use a magnifier and some "helping hands" <S> If I wanted to hand soldering SOT23 to wires, that would be much more of a challenge! <A> I solder a lot of 2n3904's (working to drive relays the same as your circuit). <S> I'll ignore the obvious suggestion of soldering it to a circuit board as you sound like you want to solder wires directly to the device. <S> One method is to bend the legs out a bit in different directions, that gives you a lot more space to solder. <A> If space is an issue, you can always cut a pcb to 3 ports/pins, and insert the transistor and solder it. <S> Soldering wires should not be a problem, if you have had soldering experience before. <S> You can also use a vice to make it easy for you. <A> I would use a wire about as thick as the transistor pins. <S> Use heat shrink tube for insulation. <S> You can also use electrical tape, but that is messier and less convenient.
| Put a little solder on the wire and the pin (just a little coating, not big blobs), then solder them together. If you need to package it up small once soldered, put some heat-shrink sleeving over the wires/legs so they can't make contact.
|
Looking to build signal level converter to reduce 20V input to 3.3v out. Am I on the right track? I'm working on a small pet project with my RaspberryPi and I'm looking hook it up to some sensors. The output from the sensors is normally at 0v but when the sensor is triggered, goes high to 20v. The RaspberryPi's gpio ports will only accept a maximum voltage of 3.3v, so I've been researching how best to drop the input voltage from 20v to 3.3v, so it won't fry my Pi's gpio ports. The Pi doesn't need to send anything back, it's strictly one-way into the Pi, and the line will only go to 20v when the sensor is triggered. In my research, I read about a circuit comprising of an LM317 Variable Regulator, and 2 resistors, which could give me the 20v to 3.3v that I need. However, I'm worried about the kind of heat that could be given off with such a large difference in voltage. I've tried to be as clear as possible, and have also included a handy dandy schematic of what I mean. simulate this circuit – Schematic created using CircuitLab To add to things, I'm likely to be adding more 20v connections to other io ports on the Pi, probably up to 15, so I'm also considering what the combined heat could be like... Am I on the right track, and is the heat just something that I'm going to have to work with? Or is there a better solution out there? <Q> If they are signals to the pi then use a resistor potential divider . <S> A 1k ohm across the input and 0v of the pi and a 9k resistor from the pi input to a high voltage logic signal will reduce that voltage by ten to one. <S> Can you work this bit out yourself? <S> See the link. <A> The two solutions posted so far ignore one factor - isolation. <S> It may or may not matter, but I would use an opto-isolator (EG a 4n25) just for peace of mind <S> (and they're dirt cheap). <S> The LED side can be driven from the 20v signal with an appropriate resistor. <S> The sensor side just needs a pullup or down (depending how you wire it) to the pin of the Pi. <S> In fact, you might get away without a pullup resistor if the Pi's CPU has internal pullups, but I suspect they'd be very weak <S> and it's not good to rely on these things. <S> This way, if your input signal accidentally becomes 25v, or 50v, or 500v, or -5v, your Pi does not go "bang". <S> To add an example circuit, substitute 5v for your 3v3 supply. <S> D1 is optional, but it's nice to leave it in to protect against reverse-voltages: <A> While the optocoupler might be the best choice if you need isolation, other options are available. <S> Unlike a voltage divider, who's output depends on the ratio between resistors and input voltage (At 20v, a 10:1 divider is 2v out, but if 20v becomes 30v, it's 3v. <S> This can be a problem with voltage spikes), a zener diode should always clamp a higher voltage down. <S> R1 should be about 10k or higher. <S> This should limit current to 2mA or less. <A> I do this fairly regularly in the products I design. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> For your application, you'll want to use a Schottky diode to guarantee you get the logic low. <S> If you want to be really safe, add a pair of clamping diodes. <A> For converting signal levels from 20V to 3.3V you don't need LM317. <S> The simplest (and very good) schematic for such things is the following: simulate this circuit – Schematic created using CircuitLab <S> This schematic has additional advantage that protects the 3.3V input from external influences, for example high negative or positive voltage peaks, static discharges, etc. <S> Depending on R1 power rating, the schematic can withstand input signals up to several hundreds volts for short time and several thousands volts static discharge without harm for the low voltage logic. <S> It works following way: If the input voltage is higher than 3.3V+0.6V = approx 4V, the diode D1 will open and will clamp the voltage in the point 1 to approximately 4V If the input voltage is lower than -0.6V the diode D2 will open and the voltage in point 1 will be clamped to approx -0.6V. <S> If the signal never goes under zero, D2 is always closed and can be safely removed. <S> (But then there will be no protection to negative input signals) <S> This way, the input voltage from 0..20V will be reguced to -0.6 .. <S> +3.9V that is safe for all 3.3V CMOS devices. <S> As long as this voltage is a little bit higher than the CMOS logic power voltage, some small current will flow through the input protection diodes of the CMOS ICs - it is determined by the difference between the forward voltage of the silicon diodes (D1 and D2) and the schottky protection diodes used by CMOS technology and the resistance of R2. <S> This current will be approximately few mA. <S> If this is too big, D1 and D2 can be changed to low current schottky diodes and this way making input current close to zero. <S> You can read more for the CMOS protection schematics in the following Fairchild application note . <S> Additional information: <S> As long as some people think that the above schematic can cause the Raspberry Pi GPIO IO failure, I made some effort and found GPIO electrical specifications . <S> According to this document, the input protection diodes are not schottky, but silicone. <S> This way, the above schematic will work even with smaller input current than expected. <S> Additionally, I increased the value of R2 to 10k, in order to increase the reliability of the schematic (in price of the maximal speed). <S> Anyway, this is the last edit by myself to this answer.
| You should be looking for slightly less than a 10:1 reduction. A simple 3.3v Zener Diode and current limiting resistor is another one.
|
Does current source affect flow of current in circuit with a variable resistor? Suppose you have a current source in series with a resistor R the current through the R resistor would be the current generated by the current source. How would the current through the circuit change if you replaced resistor R with resistor Y , where the value of resistor Y>R ? Original circuit <Q> It would be exactly the same current. <S> Only the voltage would change. <A> By definition of the ideal current source, the current through it will be what's written on the schematic. <S> The current source will develop as much voltage as necessary for the current to be what the schematic prescribes. <S> An ideal current source is, well,... an idealization. <S> You can imagine a character like a herald with a trumpet from a fairy tail proclaiming: <S> " The King said 100 mA. " <A> Here's a worked example. <S> Say R is a 1K resistor. <S> According to ohm's law, the voltage drop across the resistor is I * R, which is 4 mA * 1000 R = 4 V. <S> If now R is replaced with Y, and Y is 2K, then the new voltage drop across the resistor is 4 mA * 2000 R = 8 <S> V. <S> So since the current by definition is constant, <S> The voltage changes with the resistance in a linear fashion.
| The current wouldn't change if the value of R changes in this circuit.
|
STM32-H407 write program with USB mini cable (USB-OTG) I have Olimex STM32-H407. Manual says you require JTAG/SWD cable. Until I get JTAG/SWD cable, I am trying to write program on the board with USB mini cable. Is it possible? My PC or IDE (crossworks) do not seem to recognize STM32-H407 when USB cable is connected. <Q> Try to use the free version of Keil to program it as it supports my STM32F4 from the usb connection.. <S> (have to install the drivers for the STLink though) <S> If not as the other poster said above get a JTAG/SWD cable.. <S> If you want something <S> high end then one of the Segger series as it's supported by practically any IDE <S> but they can get ridiculously expensive.. <S> ~(£1000 <S> 's) <S> and it's supported well in Keil and most other ARM IDEs. <S> A really cheap way to program ARM chips though is to buy an STM32F4-discovery board as they are only £9 and contain the STLINK programmer on the board and a pin header for it.. <S> So you could use it just as a programmer for other boards.. <S> Pretty cool huh.. <A> At least for first time no! <S> You should use the J-TAG for write the program. <S> if you want download the program to MCU by USB, you should change the bootloader that suport USB. <S> but if i were you, i use the J-TAG for this because the many IDE suport it(J-TAG) and as well as it has many advantages, for example you can debug your program. <A> There seem to be 3 main approaches for ARM Microcontroller development. <S> You need a JTAG cable which supports OpenOCD, for example, the relatively cheap Olimex one here: https://www.sparkfun.com/products/8278 . <S> The second is to use the KEIL toolset, which uses their proprietary (but official) compiler and IDE with the ULINK 2/ <S> ME/Pro adapters. <S> A free version is available (code size limited), and bootleg (but functional) <S> ULINK2 <S> adapters are readily available off of eBay for ~$20. <S> This approach lets you use the most "official" tools, since KEIL is a subsidiary of ARM, and you have access to the most advanced trace/debugging features. <S> This also is the most vendor independent option, since KEIL Uvision supports hardware from many manufacturers. <S> The third is to use vendor specific approach by using a vendor's IDE and compiler, for example, <S> STLink <S> as lilSebastian mentioned. <S> I know NXP has something similar through their LPC-XPresso. <S> These usually have their own IDE which is coupled to the vendor specific debugger hardware, and is usually the cheapest option - but of course you are locked into that vendor.
| I personally have the Segger Jlink Edu version (£50) and works well as long as your product isn't commerical The first is to use the FOSS (Free Open Source Software) tools, a good starting point is launchpad: https://launchpad.net/gcc-arm-embedded .
|
Can I "trick" a PC Powersupply to power something other than a Motherboard? I have a generic PC powersupply I'm using to power a BFL ASIC Bitcoin Miner. It takes an input similar to a PC Video card with two connectors that look like this Connector 1 Connector 2 OOO OOO OOO OOO The generic PC PSU requires a motherboard to send power to the AUX outputs. Is there any way I can "trick" the PSU into powering the rest of the other devices safely? Suppose there is no DIP switch to press, can I just connect one pin of the Motherboard output to ground? (or similar) I'd prefer to do this with no additional soldering/resistors etc. <Q> Sure thing!Those connectors you're describing seem to be 6 pin PCI Express power connectors, where top width of the pins will be 12 V (usually yellow cable) and the others (bottom row) connected to ground. <S> These are usually shared across rails inside the PSU (usually different physical switching semiconductors, to spread the load). <S> In order to fire up an ATX power supply, you'll need to pull the power-on signal low by connecting it to ground. <S> This is pin 16 (a green wire) on the main 20/24 pin connector. <S> Just short that to any ground (black) wire on the 20/24 pin main connector. <S> Whilst a little unsafe, it can be done. <S> Also, as the PSU uses a switch-mode configuration to regulate line voltage down to ATX voltages you need to consider the loading on the power supply. <S> An unloaded switch mode power supply without any protection can oscillate in ways that were not intended for its usually operation. <S> Some PSU manufacturers cut costs by omitting components that help stabilise the power supply with no/low loading and count in it being used to power a PC only. <A> For my graduation engineering project I needed a bench power supply which can deliver ~80W. <S> I used this manual to convert a usual ATX power supply into a bench one. <S> The resulting power supply is outstanding! <S> If I understood your question correctly, you're not interested in a totally general bench power supply, but just want to make the usual power supply work without actually connecting it to the motherboard, right? <S> If so, then you should make the following connections: Green wire (POWER_ON) to black wire (GND). <S> The PSU will be controlled by the rear switch. <S> Brown wire (SENSE) to orange wire (3.3V). <S> If this doesn't work, try a red wire (5V) instead. <S> Safety: <S> As long as your PSU powers some internal circuitry and its outputs are hardwired to some PCB, you may not worry about safety issues or minimal load conditions. <S> In this case you may omit the power resistor which is suggested in the article. <S> P.S. <S> The trick with the fan instead of a bleeder resistor is ingenious! <A> There is a very nice video tutorial on the topic available: JumperOneTV tutorial on how to convert an ATX power supply to lab bench power supply.
| However, if you plan to move the connections and may incidentally touch the outputs (even if the PSU is off), you MUST add the bleeder power resistor as suggested in the article.
|
What is the difference between 1N4001 and 1N4007 other than their maximum reverse voltage? I compared 1N400x diodes here . As far as I see, all of their properties are same other than their maximum reverse voltages. Their maximum current recovery time reverse leakage current capacitance are the same. It looks like 1N4007 is the super version of all other 1N400x diodes. So, why would one produce 1N4001...1N4006 diodes, and why would one buy them? If 1N4007 does the job alone, then why are the other versions still in the market? <Q> The answers by @Vasiliy and @johnfound are incorrect. <S> 1N400x diodes are not all identical except for "accidental" manufacturing variations. <S> Diodes with higher reverse voltage ratings are intentionally manufactured with lighter doping so that the depletion region for a given reverse voltage is wider than it otherwise would be. <S> The disadvantage with lighter doping is that the forward resistance and voltage drop for a high-voltage diode is higher than it would be for a lower-voltage diode. <S> So, you can use a 1N4007 for all of your applications, but your circuit efficiency will be slightly higher if you use a more appropriately-rated diode in low-voltage applications. <A> There appears to be two fundamentally different types of diodes sold as 1N4001.. <S> 1N4007. <S> The first type is a conventional diode and is sold as 1N4001.. <S> 1N4005. <S> There is no disadvantage (except possibly price) in using 1N4005 diodes for everything. <S> for example in 100k price Digikey lists both at $11.20/k as of this writing. <S> The second type is a PIN construction and is used for 1N4006 and 1N4007. <S> 1N4006-1N4007 have worse forward and reverse recovery time. <S> They also have lower junction capacitance at all reverse bias voltages (eg. <S> 10pF vs. 15pF at -10V). <S> For actual curves illustrating the difference, refer to the Motorola Semiconductor Library databooks. <S> For example: <S> For 50/60Hz rectification there is little substantial difference, and there is no difference in forward voltage at a given current. <S> In modern times we would likely use a different type of diode at higher frequencies (over a few kHz square wave or maybe 5kHz sine wave) <S> so the differences are no longer that important, but a few folks have pushed the PIN types into RF service. <A> Due to process variations, manufactured semiconductor devices may have different characteristics. <S> Many manufacturers employ " binning " strategy for manufactured parts: they test the parts and divide them between several "bins" based on devices' performance. <S> Once they do this they can sell the better performing devices for more money. <S> I'm completely sure that binning strategy is employed for 1N400x, but I can't say how many pools were initially produced. <S> My guess is 2 pools, from which 7 bins were derived. <S> This guess is based on the fact that the data for Typical Junction Capacitance in the datasheet has two regions. <S> Even if I'm right about this manufacturer, the number of pools can be manufacturer specific. <S> The difference between these diodes is mainly their reverse breakdown voltage. <S> There are many more parameters which differ; part of the differences are mentioned in the datasheet (like the aforementioned junction capacitance), others are not. <S> In general, x20 ratio in reverse breakdown voltages (between 1N4001 and 1N4007) reflects major differences in junctions' properties. <S> These properties must affect almost any electrical parameter of the diode. <S> Manufacturers tend to represent these diodes as having exactly the same properties because the very fine differences are not important for main areas of employment of these diodes. <S> There are applications which require more precision though. <S> People say that there are also applications which take advantage of diodes' reverse breakdown. <S> In these applications you might want to be able to choose a suitable breakdown voltage. <S> I don't know the specifics though. <S> My guess is that years ago, <S> when these diodes were just introduced and the semiconductor processes were not mature, the differences between different diodes were more pronounce. <S> Summary: <S> If the price is the same and you use these diodes in "standard" applications (like low frequency rectification), you may use any of them as long as it satisfies your requirements for reverse breakdown voltage. <S> If you are planning to use them for something more sensitive, you might want to test them all to see which one suites better. <A> I sure like the answer from Spehro Pefhany, but in today's datasheets- many do not mention any differences anymore... <S> http://www.comchiptech.com/cms/UserFiles/QW-BG013%201N4001%20Thru456224.%201N4007%20REV.A.pdf <S> http://www.mccsemi.com/up_pdf/1N4001-1N4007(DO-41).pdf <S> http://www.vishay.com/docs/88504/1n4001gp.pdf <S> http://www.onsemi.com/pub/Collateral/1N4001-D.PDF <S> The Diodes Inc. original version has this difference, where the Junction Capacitance is worse for the lower voltage versions... <S> But they are all 8pF in the new 1N400xG versions ... <S> Seems there is no perceivable difference anymore, other than many BOM's <S> have different versions <S> spec'd in, so each MFR keeps offering every version. <A> These all are the same diode. <S> After sorting they are marked respectively. <S> It is a common practice not only for diodes. <S> Additionally, sometimes (not very often) there are schematics where the diode works in avalanche breakdown mode, so you will need the breakdown voltage to be predictable.
| The semiconductor technology is not so precise, so, the diodes, produced in one technological cycle are different. In my experience the price difference is very nominal or nonexistent in large quantities-
|
How do i find nichrome temperature I have 2 meters, 32wg, 19 ohm per meter. NIchrome wire I want to calulate what amps and volts i need so 2 meters of nichrome heats to 35 celsius. How can i calulate this and what formula do i need to use. <Q> You can't. <S> Sorry. <S> The temperature of the wire depends not only on the electrical power on this wire, but also on the ambient conditions - i.e. how the heat is dissipated. <S> This way, the temperature of the wire will not be constant in time, but will change depending on the air temperature and movement, materials that are in contact with the wire and so on. <S> As long as the theory behind such phenomenons is too complex, the calculations are actually possible, but very complex. <S> In most cases, experimental way is much more reliable and useful. <S> Simply use regulated power supply and change the wire current until the temperature becomes what you need. <S> But always remember that in other conditions it will be different. <A> It can be done but it's not especially easy. <S> Measure its resistance at a known temperature, and calculate what resistance you expect at the desired temperature. <S> This Wikipedia article describes how the resistance of various materials including Nichrome varies with temperature. <S> Drive it with a known voltage and measure the current. <S> (the current will vary until the temperature has stabilised). <S> Or a fixed current and measure the voltage, if that is easier. <S> From the known voltage and measured current, compute the resistance. <S> If this doesn't correspond to the desired temperature, readjust the drive voltage and repeat... <A> Best source of information would be in the datasheet for your wire. <S> Barring that, there are some common things that would help. <S> Current is based on \$I = <S> V/R\$. <S> Given that you provide 19Ω per meter, and you have 2 meters <S> , that's 38Ω. <S> But that is <S> it's room temperature ( <S> Typically ~21°C). <S> As temperature rises, the resistance rises. <S> But let's work with that. <S> Consider \$I <S> = <S> \dfrac{V}{38}\$. <S> And you want a ~14°C rise. <S> Most of the time, standard tables show extremely high temperature rises. <S> So these can be used for a reference. <S> A 32 awg straight wire raised from (Room Temperature 70 <S> °f) 20 <S> °c to 400°f (204°c) takes <S> 680mA. 1000 <S> °f (538°c) is twice the current. <S> And 2000°F (1093°c) is twice that again. <S> So current is doubled for roughly slightly 2.6 the temperature but resistance rises with temperature, so quadruple the current for five times the temperature. <S> We can assume that the inverse is true. <S> At lower temperatures, less current gives higher temperature rises. <S> With your 38Ω piece of wire <S> (Straightened out, not coiled) to 400°F, that is ~26V ( not including resistance changes ). <S> (0.68 <S> = 26V / 38Ω). <S> 35°c is 95°F. <S> That's slightly more than a fourth of 400°F. <S> So try cutting the current to a 5th of that. <S> 0.68 / 5 = 0.136. <S> $$ V = <S> I <S> \cdot R $$ <S> $$ V = 0.136 <S> \cdot 38 = 5.168V <S> $$ Try 5v. <S> You should get a rise to less than 100 degrees fahrenheit, roughly less than 37°c. <S> Anything else would require a calibrated temperature sensor and testing. <S> Reduce current by half for coiled wire. <S> And carefully check resistance when the wire is at the temperature you want (after you disconnect the power)
| In order to make the temperature constant you will need to make the ambient conditions pretty stable, or to use temperature regulator that to regulate the electrical power on the wire in order to get the same temperature in different conditions.
|
Is it possible to reverse engineer an analogue IC from a physical example? Lately I've been investigating custom ICs developed by Roland in the late 70s/Early 80s for their analogue synthesizers. They stopped manufacturing these components around 1989, there are no datasheets available and they will not release, or do not have information on them. The IR3109 is a DIP16 filter chip made from four cascaded OTAs and buffers controlled by one exponential converter. A rough internal diagram is provided in some synth service manuals, and people have made clones that sound pretty close. The one I'm interested in is the IR3R01, a DIP16 'envelope generator' chip. Used to create a DC voltage out in response to keys being pressed on a keyboard and applied to the filter or amplifier. I was wondering if it is possible to examine these ICs somehow and work out what components and values are inside. Maybe exposing the die and evaluating it under an electron microscope? I'm sure if it is possible it would be very expensive. <Q> Of course it's possible. <S> There are many companies that provide these services. <S> The real question is whether or not you could do this at home. <S> You might get away without needing a SEM (Scanning Electron Microscope), that design might be done in ~3u geometry which would imagable using visible light. <S> You'll need a wet bench to etch off layers, like HF for SiO2 <S> but you will also have to remove Si3N4, SiON and Aluminum. <S> It's possible you may need a dry etch (Ar plasma in a vacuum chamber) to remove tungsten plugs in vias. <S> Your main issues will be measuring the exact values of resistors and capacitors (if there are any). <S> Delineating the boundaries of substrate implants (decoration with more nasty chemicals in a wet bench) and determination of doping profiles. <S> The doping profiles are easily obtained in a SIMS unit (Secondary Ion Mass spectrometer) but some of the structural details of implants in the FEOL <S> (Front End of Line) can be subtle. <S> There will be subtle layer thicknesses that will need to measured before they are damaged or reduced in thickness by the wet etches. <S> There will be significant topography of the surface of the die <S> (CMP didn't exist then) so depth of focus might complicate picture taking. <S> It would be unlikely that you'd be able to get the exact transistor characteristics that the original chip had easily. <S> You'd really need to understand not just processing but transistor physics and the role of different implants. <S> On the positive side, if you had multiple chips (which you would need) you might be able to liberate access to a transistor and be able to put it on a curve tracer to measure directly. <S> The feature size is large enough and being an analog chip it would probably have some large transistors in it. <S> But there is no certainty in that. <S> The other good news is that you can buy old SEM's for low cost. <S> Only a few $10K and even though they are grainy this chip has large features. <S> Mind you <S> if you have a SIMS unit that also can image (it is a modified SEM) <S> so you might get away without duplicating eqt. <A> Your last paragraph is basically correct: you can image the chip and then either copy it directly or reverse engineer it to produce a more modern version. <S> The first step might be doable by a university lab with the correct equipment, but the reproduction is not going to be a cheap process (hundreds of thousands of $). <S> Getting an "exact" sound reproduction might not even be possible with modern IC processes. <S> The other alternative is to characterise its analog behaviour as a black box, then emulate it with a DSP. <S> People are unlikely to be happy with this solution. <A> There's a few interesting things in patent documents (I believe there's some great stuff by Bob Moog in his patents) <S> so you might strike lucky there. <S> to replicate the thing exactly when it's an analogue part. <S> You can take the black-box approach of not caring what is inside the box, but qualifying its behaviour and trying to replicate it. <S> This may or may not be a hiding to nothing, it could work great, it could be a huge pain, or you could invent something even better by accident along the way. <S> There's also (I'm <S> sure) ways/software to qualify the response and then squirt that model into a DSP, microcontroller, or somesuch. <S> Of course, purists won't like that, and it is kinda cheating. <S> TBH your description sounds like it's a fairly simple function, so the "black box" approach of ignoring the insides and just developing a circuit that does the same thing may be the easiest option.
| As mentioned above, there's ways to "de-cap" a chip and read its structure, although you may have to do a fair bit of reverse-engineering, guesswork, etc.
|
Fully diff signal to single ended signal I'm designign a circuit using the AMC1200 isolation amplifier from TI. http://www.ti.com/product/amc1200-q1 As you can see the output is differential, and I'd like too feed it to a schmidt trigger to catch the 2.5V transitions. The problem is that the trigger is single ended, so here is my question:is there an easy way to transform the fully differential output in a single ended output i.e. having the difference between the outputs? I know I can use just one of the outputs but I basically loose half of the dynamic range, and that might be a problem. <Q> Here's what the output from the AMC1200 looks like: - As you can see either output will swing from about 1.3V to about 3.9V and if you used a normal differential to single end converter, the minimum voltage out would be 2.6V to 7.8V. <S> I suspect you have a 5V supply and don't want to over-complicate things with adding a 10V positive supply (and possibly a small negative supply) so that you could use an instrumentation amp like the AD8221 <S> : - But, if you do think this complication is necessary then that's fine. <S> You don't need a gain set resistor but you do need to set an offset on pin 6 to set the "mid-point" or neutral position of your output. <S> The AD8221 is good for over 100kHz <S> so no problem there. <S> On the other hand just use one of the single-ended outputs from the isolation amp <S> and I'm sure it will be just fine. <S> You're only feeding a comparator so any noise can be easily filtered and using a Schmitt trigger should avoid multiple threshold triggering. <A> There are chips called differential line receivers that do exactly what you are asking about. <A> The reason the output of that device is differential is noise immunity. <S> Current measurements suffer greatly from noise and using differential can shield them. <S> This device was made to interface directly with a differential input ADC that will take care of properly recovering the data. <S> If, however, you don't need fast measurements and don't care about this, a differential to single ended converter can be used. <S> As you might know, the output of the Op Amp is directly proportional to the difference in the two. <S> You will need to design the Op Amp with the right gain depending on the voltage swing of the device. <S> Note, however, that the bandwidth can be rather limited, and that you will lose noise immunity and some accuracy.
| A simple way to do this is to use an Op Amp.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.